From b5da34890d166b7472bfd83149e5457bbab13b53 Mon Sep 17 00:00:00 2001 From: Mike S Date: Thu, 21 Mar 2019 21:17:45 -0500 Subject: [PATCH] Bluetooth config (#5) * Display BLE device, service & char info * Bluetooth LE Connection control - Removed hard coding of specific devices - Added device lookup from local db to connect to devices - removed python script that is no longer used * Make BLE Support more dynamic - Char lookups - Auto connect - read / write / toggle based on more general endpoint * Fixed the async/await for read to enable toggle - removed unused python scripts - updated eslint for windows development linebreak - added airbnb linter - Fixed some but not all linting issues * Sidetracked to outlet control & rename * Finish rename * Commit WIP for laptop access * Finish outlet add / delete and update of table * rename * update dependencies * Refactor modules and Added temperature detail page * not sure but save point * updating dependencies * Dependency Update and stop pop * Package --- .vscode/settings.json | 2 + CONTRIBUTING.md | 6 +- README.md | 6 +- controller/README.md | 21 + controller/raspberry-pi/piMonitor.py | 122 - controller/server/.eslintrc.json | 11 +- controller/server/.prettierrc | 6 + controller/server/db/{opex.db => orca.db} | Bin 49152 -> 57344 bytes .../get_all_bt_device_and_service_info.sql | 12 + ...et_specific_bt_device_and_service_info.sql | 14 + controller/server/package-lock.json | 10879 ++-- controller/server/package.json | 181 +- controller/server/public/favicon.ico | Bin 3870 -> 40894 bytes controller/server/public/favicon.old.ico | Bin 0 -> 3870 bytes controller/server/public/favicon.png | Bin 0 -> 3332 bytes controller/server/public/index.html | 8 +- controller/server/public/manifest.json | 4 +- .../assets/img/avatars/monopoly-run.png | Bin 0 -> 26402 bytes controller/server/src/client/src/_nav.js | 224 +- .../client/src/assets/img/brand/orca-logo.svg | 67 + .../src/assets/img/brand/orca-logo2.svg | 67 + .../src/assets/img/brand/orca-logo3.svg | 61 + .../src/client/src/assets/img/brand/orca.png | Bin 0 -> 25122 bytes .../containers/DefaultLayout/DefaultFooter.js | 9 +- .../containers/DefaultLayout/DefaultHeader.js | 160 +- .../containers/DefaultLayout/DefaultLayout.js | 18 +- controller/server/src/client/src/routes.js | 59 +- .../src/client/src/views/Config/Bluetooth.js | 318 + .../src/client/src/views/Config/Settings.js | 308 + .../src/client/src/views/Config/index.js | 6 + .../client/src/views/Dashboard/Dashboard.js | 1208 +- .../client/src/views/Modules/Temperature.js | 298 + .../src/views/Modules/Temperature.test.js | 18 + .../src/client/src/views/Outlets/Outlets.js | 531 + .../src/client/src/views/Outlets/package.json | 6 + .../server/src/client/src/views/index.js | 6 + controller/server/src/server/api/bluetooth.js | 52 + controller/server/src/server/api/index.js | 4 +- controller/server/src/server/api/outlets.js | 67 + .../server/src/server/api/powerController.js | 300 +- .../server/src/server/config/database.js | 82 + controller/server/src/server/server.js | 29 +- controller/server/webpack.config.js | 71 +- controller/server/yarn.lock | 3718 +- node_modules/.bin/prettier | 15 + node_modules/.bin/prettier.cmd | 7 + node_modules/prettier/LICENSE | 7 + node_modules/prettier/README.md | 111 + node_modules/prettier/bin-prettier.js | 43866 ++++++++++++++++ node_modules/prettier/index.js | 41847 +++++++++++++++ node_modules/prettier/package.json | 59 + node_modules/prettier/parser-angular.js | 1 + node_modules/prettier/parser-babylon.js | 1 + node_modules/prettier/parser-flow.js | 1 + node_modules/prettier/parser-glimmer.js | 1 + node_modules/prettier/parser-graphql.js | 1 + node_modules/prettier/parser-html.js | 1 + node_modules/prettier/parser-markdown.js | 1 + node_modules/prettier/parser-postcss.js | 32712 ++++++++++++ node_modules/prettier/parser-typescript.js | 1 + node_modules/prettier/parser-yaml.js | 1 + node_modules/prettier/standalone.js | 30219 +++++++++++ node_modules/prettier/third-party.js | 4973 ++ package-lock.json | 12 + website/README.md | 4 +- website/package-lock.json | 2 +- website/package.json | 8 +- website/public/manifest.json | 4 +- 68 files changed, 165389 insertions(+), 7425 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 controller/raspberry-pi/piMonitor.py create mode 100644 controller/server/.prettierrc rename controller/server/db/{opex.db => orca.db} (79%) create mode 100644 controller/server/db/queries/get_all_bt_device_and_service_info.sql create mode 100644 controller/server/db/queries/get_specific_bt_device_and_service_info.sql create mode 100644 controller/server/public/favicon.old.ico create mode 100644 controller/server/public/favicon.png create mode 100644 controller/server/src/client/public/assets/img/avatars/monopoly-run.png create mode 100644 controller/server/src/client/src/assets/img/brand/orca-logo.svg create mode 100644 controller/server/src/client/src/assets/img/brand/orca-logo2.svg create mode 100644 controller/server/src/client/src/assets/img/brand/orca-logo3.svg create mode 100644 controller/server/src/client/src/assets/img/brand/orca.png create mode 100644 controller/server/src/client/src/views/Config/Bluetooth.js create mode 100644 controller/server/src/client/src/views/Config/Settings.js create mode 100644 controller/server/src/client/src/views/Config/index.js create mode 100644 controller/server/src/client/src/views/Modules/Temperature.js create mode 100644 controller/server/src/client/src/views/Modules/Temperature.test.js create mode 100644 controller/server/src/client/src/views/Outlets/Outlets.js create mode 100644 controller/server/src/client/src/views/Outlets/package.json create mode 100644 controller/server/src/server/api/bluetooth.js create mode 100644 controller/server/src/server/api/outlets.js create mode 100644 controller/server/src/server/config/database.js create mode 100644 node_modules/.bin/prettier create mode 100644 node_modules/.bin/prettier.cmd create mode 100644 node_modules/prettier/LICENSE create mode 100644 node_modules/prettier/README.md create mode 100644 node_modules/prettier/bin-prettier.js create mode 100644 node_modules/prettier/index.js create mode 100644 node_modules/prettier/package.json create mode 100644 node_modules/prettier/parser-angular.js create mode 100644 node_modules/prettier/parser-babylon.js create mode 100644 node_modules/prettier/parser-flow.js create mode 100644 node_modules/prettier/parser-glimmer.js create mode 100644 node_modules/prettier/parser-graphql.js create mode 100644 node_modules/prettier/parser-html.js create mode 100644 node_modules/prettier/parser-markdown.js create mode 100644 node_modules/prettier/parser-postcss.js create mode 100644 node_modules/prettier/parser-typescript.js create mode 100644 node_modules/prettier/parser-yaml.js create mode 100644 node_modules/prettier/standalone.js create mode 100644 node_modules/prettier/third-party.js create mode 100644 package-lock.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7a73a41 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8397a88..da0e3f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ -# Contributing to opex -We are excited that you are enthusiastic and want to contribute to Opex. Please familiarize yourself with the information below to help you get started with your first contribution. +# Contributing to ocra +We are excited that you are enthusiastic and want to contribute to Orca. Please familiarize yourself with the information below to help you get started with your first contribution. ## Contribution Process -1. Fork Opex +1. Fork Orca 2. Complete and commit changes to a git branch on your fork 3. Create a Pull Request outlining your changes 4. Discuss if necessary on the 'Conversation' Tab of your PR while your code is being reviewed diff --git a/README.md b/README.md index af6e72d..47f6c52 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Opex +# Orca -Opex is an opensource aquarium controller that uses affordable and easily accessible components such as the raspberry-pi, arduino, and other components frequently found on adafruit. The objective of this project is to create a modular, affordable, DIY aquarium controller to monitor, automate, and simplify maintanence of your aquarium similar to the level of other consumer level controllers. The project consists of a two part system: a cloud/web based monitoring, controller, and backup, as well as an all-in-one physical controller to run and manage your tank(s) when offline. +Orca is an opensource aquarium controller that uses affordable and easily accessible components such as the raspberry-pi, arduino, and other components frequently found on adafruit. The objective of this project is to create a modular, affordable, DIY aquarium controller to monitor, automate, and simplify maintanence of your aquarium similar to the level of other consumer level controllers. The project consists of a two part system: a cloud/web based monitoring, controller, and backup, as well as an all-in-one physical controller to run and manage your tank(s) when offline. ## Features (Current and Upcoming) - Multiple Tank Support @@ -17,4 +17,4 @@ Opex is an opensource aquarium controller that uses affordable and easily access ## [Controller Information](/controller/README.md) -## [Website Information](/website/README.md) +## [Website Information](/website/README.md) (On hold until controller is further along) diff --git a/controller/README.md b/controller/README.md index 70f0add..05ee514 100644 --- a/controller/README.md +++ b/controller/README.md @@ -12,6 +12,27 @@ This README is to explain how to put together the physical components of the con ---- +### Install and Enable BlueZ (BLE Support) +1. `cd ~` +2. `wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.50.tar.xz` +3. `tar xvf bluez-5.50.tar.xz` +4. `cd bluez-5.50` +5. `sudo apt-get update` +6. `sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev` +7. `./configure` +8. `make` +9. `sudo make install` +10. `sudo systemctl start bluetooth` +11. `systemctl status bluetooth` Should see Active status +12. `sudo systemctl enable bluetooth` +13. Reboot the pi +14. `sudo nano /lib/systemd/system/bluetooth.service` + - Add ` --experimental` to the end of `ExecStart` line +15. `sudo systemctl daemon-reload` +16. `sudo systemctl restart bluetooth` + +---- + ### Global Part List (Needed for all) * [Raspberry-Pi Model 3B](https://www.amazon.com/gp/product/B01LPLPBS8/) * [Arduino Uno R3](https://www.amazon.com/gp/product/B01EWOE0UU/) diff --git a/controller/raspberry-pi/piMonitor.py b/controller/raspberry-pi/piMonitor.py deleted file mode 100644 index 4fa9b9e..0000000 --- a/controller/raspberry-pi/piMonitor.py +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/python3 - -import MySQLdb as mysql -import smtplib -from email.mime.text import MIMEText - -import os -import time -import glob -import serial -import re - -# global variables -speriod=(15*60)-1 - -#Sets up the device on the system and returns the filename -def find_ds18b20(): - # sets up the sensor with Raspbian's built in driver - os.system('modprobe w1-gpio') - os.system('modprobe w1-therm') - - #find the file that was created throught the setup above - base_dir = '/sys/bus/w1/devices/' - device_folder = glob.glob(base_dir + '28*')[0] - device_file = device_folder + '/w1_slave' - return device_file - -# store the temperature in the database -def log_temperature(temp): - - conn=mysql.connect("DB-HOST", "USER", "PASS", "DB") - curs=conn.cursor() - - curs.execute("INSERT INTO temperature(tank_id, temperature) values(1, %s)", (float(temp),)) - - # commit the changes - conn.commit() - - conn.close() - -# send a text alert email if the temp is outside of set bounds -def send_alert(temp): - msg = MIMEText('Temperature is %s F' % temp) - msg['Subject'] = 'Tank Warning' - msg['From'] = 'monitor@mikesfishtank.com' - msg['To'] = '555555555@txt.att.net' - - conn = smtplib.SMTP('SMTP-HOST', 587) - conn.login('email-login', 'email-pass') - - try: - conn.sendmail('monitor@mikesfishtank.com', '5555555555@txt.att.net', msg.as_string()) - finally: - conn.quit() - -# display the contents of the database -def display_data(): - - conn=sqlite3.connect(dbname) - curs=conn.cursor() - - for row in curs.execute("SELECT * FROM temps"): - print(str(row[0])+" "+str(row[1])) - - conn.close() - - - -# get temerature -# returns None on error, or the temperature as a float -def get_temp(sensorName): - f = open(sensorName, 'r') - lines = f.readlines() - f.close() - - if lines[0].strip()[-3:] != 'YES': - return None - temperature_start_pos = lines[1].find('t=') - - if temperature_start_pos == -1: - return None - - temp_string = lines[1][temperature_start_pos+2:] - temp_c = float(temp_string) / 1000.0 - - if temp_c != None: - temp_f = convert_c_to_f(temp_c) - print("%.1f C, %.1f F" % (temp_c, temp_f)) - - return temp_f - -def convert_c_to_f(temp_c): - return temp_c * 9.0 / 5.0 + 32.0 - -# main function -# This is where the program starts -def main(): - #while True: - - sensorName = find_ds18b20() - - # get the temperature from the device file - temperature = get_temp(sensorName) - print("temperature="+str(temperature)) - - # Store the temperature in the database - log_temperature(temperature) - - if temperature > 80 or temperature < 77: - send_alert(temperature) - - # display the contents of the database - #display_data() - -# time.sleep(speriod) - - -if __name__=="__main__": - main() - - - diff --git a/controller/server/.eslintrc.json b/controller/server/.eslintrc.json index 224d26b..1a45d53 100644 --- a/controller/server/.eslintrc.json +++ b/controller/server/.eslintrc.json @@ -1,6 +1,7 @@ { "parser": "babel-eslint", - "extends": ["airbnb"], + "extends": ["airbnb", "prettier", "prettier/react"], + "plugins": ["prettier"], "env": { "browser": true, "node": true @@ -8,6 +9,12 @@ "rules": { "no-console": "off", "comma-dangle": "off", - "react/jsx-filename-extension": "off" + "react/jsx-filename-extension": [ + 1, + { + "extensions": [".js", ".jsx"] + } + ], + "linebreak-style": 0 } } \ No newline at end of file diff --git a/controller/server/.prettierrc b/controller/server/.prettierrc new file mode 100644 index 0000000..e5318ba --- /dev/null +++ b/controller/server/.prettierrc @@ -0,0 +1,6 @@ +{ + "singleQuote": true, + "trailingComma": "es5", + "tabWidth": 2, + "useTabs": false +} \ No newline at end of file diff --git a/controller/server/db/opex.db b/controller/server/db/orca.db similarity index 79% rename from controller/server/db/opex.db rename to controller/server/db/orca.db index fc57c129d96ef76215c98653c57d753b8ad3095d..83b0d1af58da81950be818051027aec929fadf38 100644 GIT binary patch delta 2083 zcma)7OKclO7@qZOAGYUDN-QUF!cO8mYSoG3=0WOmz)sdpP)Ju39(mY;wIJ-NB9g zT|O>e5jKU*k1wn`M)mp(@AdmReL>4i&8YdJHlu3k<8!%u+0-_aRH7+`q@uAgg_J4C z-V(@7Qyn)h7Rm$xGBHkul`(}G4n>a)MTeCjnajIA!p2*Da(g*sd9NtksU3Jwrl&xtxTn1e9ws^~0heGsI$uBu3w|dljn11Q%wK-ox z0<$aFToT&jaz-Y8XbW55qsV?>+)~c<#X-Y0fkdDIZZ9}zxdzH zT#msvHG%~;5Zs52Pq3fZXjsU9un~@(b!biDl+Vm~@ee!Prbu)$)1mgxpb;@Wc+Gy((cKw)n_JTUAE? zjthTPLf;OdwJM=^htN_0&!W+wT|cAx5ItC+l3{!JeK2DJBhf2=s@^=H;&^hq!tX zuOYY#=ivjGhGA#}8{WWcc#Q>l3qJ*Gh=jOpm%9V8xRPx5ctRX=Y&uusk)FQDKs?gl z7wH{{L=T9|8?%IC`)&onPq4y#egbVx7F)MS;HAF_<7?2lodSv1+%u!p@4)oP3j7B=#wGbZAj=wB!7Cfs4! zeT4;Cv~#S6P8Pgg9FzqUbuiQ*$h-;KP1S(xFi{(ANi&t*1b$Q1C)-TaYNB4*YN8f; o${<=yKulFwmQ2)bpxQx}p?R_6|9~x!@q4lkHkq??^klmEAK{!ip8x;= delta 680 zcmX|;%}*0S7{+J1?RIy&JMT7yY^x$8AZ6vFhsMN&7(-zZVrdD~kHiRRVNI%~6lhI6 z*%IQxlQ>?Dig+hky^xrwi5EZ85EDZW95BQSi3I-wrv;tNyz|VHXEMJxQ+_X$%fjQ6 z{%(Yjdc0hG&#v}F+q+R;M_E%gkSy0+5L3t1O}VD}HLvd!c}X;)X$y{D@0Ao~1D`W` zd+`cper>&zPFTa%gq0YyCTXTPy<{)m%g)$KwCh++mrB`LlfBihv6{Rs+(J3_Mrmi% zchM~-M8tx=QG+v}iaFvn`ulOELa!W&>ulZ^mI`BH-M-HcQS4!_d}sCSEFDdxdh+Qx zo2INADW>+7uqg@=a~lw`;^s7wtvb6-&?DEfq{13v&3MHXg{msTSwM)F2K>WDmhEtiU?V!Vq+Tn>hZB zZ^YTlQ_NX+5bQKqJ!h~G3A3LM+PJ%qVE?FtapG= 2.1.2 < 3" + } + } } }, "bonjour": { @@ -2440,9 +4412,9 @@ }, "dependencies": { "array-flatten": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", - "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true } } @@ -2453,9 +4425,9 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, "bootstrap": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.1.3.tgz", - "integrity": "sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz", + "integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==" }, "bplist-parser": { "version": "0.0.6", @@ -2527,7 +4499,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -2572,7 +4544,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { @@ -2605,13 +4577,13 @@ } }, "browserslist": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.1.2.tgz", - "integrity": "sha512-docXmVcYth9AiW5183dEe2IxnbmpXF4jiM6efGBVRAli/iDSS894Svvjenrv5NPqAJ4dEJULmT4MSvmLG9qoYg==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.2.tgz", + "integrity": "sha512-zmJVLiKLrzko0iszd/V4SsjTaomFeoVzQGYYOYgRgsbh7WNh95RgDB0CmBdFWYs/3MyFSt69NypjL/h3iaddKQ==", "requires": { - "caniuse-lite": "^1.0.30000888", - "electron-to-chromium": "^1.3.73", - "node-releases": "^1.0.0-alpha.12" + "caniuse-lite": "^1.0.30000951", + "electron-to-chromium": "^1.3.116", + "node-releases": "^1.1.11" } }, "bser": { @@ -2624,7 +4596,7 @@ }, "buffer": { "version": "4.9.1", - "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { @@ -2675,24 +4647,54 @@ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", + "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "requires": { + "bluebird": "^3.5.3", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", "y18n": "^4.0.0" + }, + "dependencies": { + "bluebird": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", + "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==" + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "requires": { + "yallist": "^3.0.2" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" + } } }, "cache-base": { @@ -2716,18 +4718,26 @@ "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "requires": { + "callsites": "^2.0.0" + } + }, "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", "requires": { - "callsites": "^0.2.0" + "caller-callsite": "^2.0.0" } }, "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" + "version": "2.0.0", + "resolved": "http://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" }, "camel-case": { "version": "3.0.0", @@ -2739,9 +4749,10 @@ } }, "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", + "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "dev": true }, "camelcase-keys": { "version": "2.1.0", @@ -2771,32 +4782,37 @@ } }, "caniuse-lite": { - "version": "1.0.30000889", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000889.tgz", - "integrity": "sha512-MFxcQ6x/LEEoaIhO7Zdb7Eg8YyNONN+WBnS5ERJ0li2yRw51+i4xXUNxnLaveTb/4ZoJqsWKEmlomhG2pYzlQA==" + "version": "1.0.30000951", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000951.tgz", + "integrity": "sha512-eRhP+nQ6YUkIcNQ6hnvdhMkdc7n3zadog0KXNRxAZTT2kHjUb1yGn71OrPhSn8MOvlX97g5CR97kGVj8fMsXWg==" }, "capture-exit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz", - "integrity": "sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", + "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", "requires": { - "rsvp": "^3.3.3" + "rsvp": "^4.8.4" } }, "case-sensitive-paths-webpack-plugin": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.2.tgz", - "integrity": "sha512-oEZgAFfEvKtjSRCu6VgYkuGxwrWXMnQzyBmlLPP7r6PWQVtHxP5Z5N6XsuJvtoVax78am/r7lr46bwo3IVEBOg==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.2.0.tgz", + "integrity": "sha512-u5ElzokS8A1pm9vM3/iDgTcI3xqHxuCao94Oz8etI3cf0Tio0p8izkDYbTIn09uP3yUUr6+veaE6IkjnTYS46g==" }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, + "ccount": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.3.tgz", + "integrity": "sha512-Jt9tIBkRc9POUof7QA/VwWd+58fKkEEfI+/t1/eOlxKM7ZhrczNzMFefge7Ai+39y1pR/pP6cI19guHy3FSLmw==" + }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -2809,20 +4825,20 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, "chart.js": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.7.3.tgz", - "integrity": "sha512-3+7k/DbR92m6BsMUYP6M0dMsMVZpMnwkUyNSAbqolHKsbIzH2Q4LWVEHHYq7v0fmEV8whXE0DrjANulw9j2K5g==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.8.0.tgz", + "integrity": "sha512-Di3wUL4BFvqI5FB5K26aQ+hvWh8wnP9A3DWGvXHVkO13D3DSnaSsdZx29cXlEsYKVkn1E2az+ZYFS4t0zi8x0w==", "requires": { "chartjs-color": "^2.1.0", "moment": "^2.10.2" } }, "chartjs-color": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.2.0.tgz", - "integrity": "sha1-hKL7dVeH7YXDndbdjHsdiEKbrq4=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.3.0.tgz", + "integrity": "sha512-hEvVheqczsoHD+fZ+tfPUE+1+RbV6b+eksp2LwAhwRTVXEjCSEavvk+Hg3H6SZfGlPh/UfmWKGIvZbtobOEm3g==", "requires": { - "chartjs-color-string": "^0.5.0", + "chartjs-color-string": "^0.6.0", "color-convert": "^0.5.3" }, "dependencies": { @@ -2834,9 +4850,9 @@ } }, "chartjs-color-string": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.5.0.tgz", - "integrity": "sha512-amWNvCOXlOUYxZVDSa0YOab5K/lmEhbFNKI55PWc4mlv28BDzA7zaoQTGxSBgJMHIW+hGX8YUrvw/FH4LyhwSQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz", + "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==", "requires": { "color-name": "^1.0.0" } @@ -2859,6 +4875,11 @@ "parse5": "^3.0.1" }, "dependencies": { + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, "domhandler": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", @@ -2868,16 +4889,16 @@ } }, "htmlparser2": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.0.tgz", - "integrity": "sha512-J1nEUGv+MkXS0weHNWVKJJ+UrLfePxRWpN3C9bEi9fLxL2+ggW94DQvgYVXsaT30PGwYRIZKNZXuyMhp3Di4bQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", "requires": { - "domelementtype": "^1.3.0", + "domelementtype": "^1.3.1", "domhandler": "^2.3.0", "domutils": "^1.5.1", "entities": "^1.1.1", "inherits": "^2.0.1", - "readable-stream": "^3.0.6" + "readable-stream": "^3.1.1" } }, "parse5": { @@ -2889,9 +4910,9 @@ } }, "readable-stream": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.0.6.tgz", - "integrity": "sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz", + "integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2899,9 +4920,9 @@ } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", "requires": { "safe-buffer": "~5.1.0" } @@ -2912,7 +4933,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.0", @@ -2944,9 +4964,9 @@ } }, "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" }, "cipher-base": { "version": "1.0.4", @@ -2958,11 +4978,6 @@ "safe-buffer": "^5.0.1" } }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" - }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -3128,6 +5143,14 @@ "delayed-stream": "~1.0.0" } }, + "comma-separated-tokens": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.5.tgz", + "integrity": "sha512-Cg90/fcK93n0ecgYTAz1jaA3zvnQ0ExlmKY1rdbyHqAx6BHxwoJc+J7HDu0iuQ7ixEs1qaa+WyQ6oeuBpYP1iA==", + "requires": { + "trim": "0.0.1" + } + }, "commander": { "version": "2.17.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", @@ -3143,31 +5166,44 @@ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, + "compare-versions": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.4.0.tgz", + "integrity": "sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg==" + }, "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "compressible": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz", - "integrity": "sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.16.tgz", + "integrity": "sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA==", "dev": true, "requires": { - "mime-db": ">= 1.36.0 < 2" + "mime-db": ">= 1.38.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", + "dev": true + } } }, "compression": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", - "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, "requires": { "accepts": "~1.3.5", "bytes": "3.0.0", - "compressible": "~2.0.14", + "compressible": "~2.0.16", "debug": "2.6.9", - "on-headers": "~1.0.1", + "on-headers": "~1.0.2", "safe-buffer": "5.1.2", "vary": "~1.1.2" }, @@ -3203,7 +5239,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -3226,16 +5262,16 @@ } }, "concurrently": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-4.0.1.tgz", - "integrity": "sha512-D8UI+mlI/bfvrA57SeKOht6sEpb01dKk+8Yee4fbnkk1Ue8r3S+JXoEdFZIpzQlXJGtnxo47Wvvg/kG4ba3U6Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-4.1.0.tgz", + "integrity": "sha512-pwzXCE7qtOB346LyO9eFWpkFJVO3JQZ/qU/feGeaAHiX1M3Rw3zgXKc5cZ8vSH5DGygkjzLFDzA/pwoQDkRNGg==", "dev": true, "requires": { "chalk": "^2.4.1", "date-fns": "^1.23.0", "lodash": "^4.17.10", "read-pkg": "^4.0.1", - "rxjs": "6.2.2", + "rxjs": "^6.3.3", "spawn-command": "^0.0.2-1", "supports-color": "^4.5.0", "tree-kill": "^1.1.0", @@ -3260,14 +5296,14 @@ } }, "confusing-browser-globals": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.5.tgz", - "integrity": "sha512-tHo1tQL/9Ox5RELbkCAJhnViqWlzBz3MG1bB2czbHjH2mWd4aYUgNCNLfysFL7c4LoDws7pjg2tj48Gmpw4QHA==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.6.tgz", + "integrity": "sha512-GzyX86c2TvaagAOR+lHL2Yq4T4EnoBcnojZBcNbxVKSunxmGTnioXHR5Mo2ha/XnCoQw8eurvj6Ta+SwPEPkKg==" }, "connect-history-api-fallback": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", - "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", "dev": true }, "console-browserify": { @@ -3342,9 +5378,37 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" + }, + "core-js-compat": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.0.0.tgz", + "integrity": "sha512-W/Ppz34uUme3LmXWjMgFlYyGnbo1hd9JvA0LNQ4EmieqVjg2GPYbj3H6tcdP2QGPGWdRKUqZVbVKLNIFVs/HiA==", + "requires": { + "browserslist": "^4.5.1", + "core-js": "3.0.0", + "core-js-pure": "3.0.0", + "semver": "^5.6.0" + }, + "dependencies": { + "core-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.0.tgz", + "integrity": "sha512-WBmxlgH2122EzEJ6GH8o9L/FeoUKxxxZ6q6VUxoTlsE4EvbTWKJb447eyVxTEuq0LpXjlq/kCB2qgBvsYRkLvQ==" + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + } + } + }, + "core-js-pure": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.0.0.tgz", + "integrity": "sha512-yPiS3fQd842RZDgo/TAKGgS0f3p2nxssF1H65DIZvZv0Od5CygP8puHXn3IQiM/39VAvgCbdaMQpresrbGgt9g==" }, "core-util-is": { "version": "1.0.2", @@ -3373,7 +5437,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { @@ -3386,7 +5450,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { @@ -3398,6 +5462,15 @@ "sha.js": "^2.4.8" } }, + "create-react-context": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.2.3.tgz", + "integrity": "sha512-CQBmD0+QGgTaxDL3OX1IDXYqjkp2It4RIbcb99jS6AEg27Ga+a9G3JtK6SIu0HBwPLZlmwt9F7UwWA4Bn92Rag==", + "requires": { + "fbjs": "^0.8.0", + "gud": "^1.0.0" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -3429,6 +5502,14 @@ "randomfill": "^1.0.3" } }, + "css-blank-pseudo": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz", + "integrity": "sha512-LHz35Hr83dnFeipc7oqFDmsjHdljj3TQtxGGiNWSOsTLIAubSm4TEz8qCaKFpk7idaQ1GfWscF4E6mgpBysA1w==", + "requires": { + "postcss": "^7.0.5" + } + }, "css-color-names": { "version": "0.0.4", "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", @@ -3441,53 +5522,121 @@ "requires": { "postcss": "^7.0.1", "timsort": "^0.3.0" + } + }, + "css-has-pseudo": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-0.10.0.tgz", + "integrity": "sha512-Z8hnfsZu4o/kt+AuFzeGpLVhFOGO9mluyHBaA2bA8aCGTwah5sT3WV/fTHH8UNZUytOIImuGPrl/prlb4oX4qQ==", + "requires": { + "postcss": "^7.0.6", + "postcss-selector-parser": "^5.0.0-rc.4" }, "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", + "cssesc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", + "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==" + }, + "postcss-selector-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", + "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" + "cssesc": "^2.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" } } } }, "css-loader": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-1.0.0.tgz", - "integrity": "sha512-tMXlTYf3mIMt3b0dDCOQFJiVvxbocJ5Ho577WiGPYPZcqVEO218L2iU22pDXzkTZCLDE+9AmGSUkWxeh/nZReA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-2.1.1.tgz", + "integrity": "sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w==", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "css-selector-tokenizer": "^0.7.0", - "icss-utils": "^2.1.0", - "loader-utils": "^1.0.2", - "lodash.camelcase": "^4.3.0", - "postcss": "^6.0.23", - "postcss-modules-extract-imports": "^1.2.0", - "postcss-modules-local-by-default": "^1.2.0", - "postcss-modules-scope": "^1.1.0", - "postcss-modules-values": "^1.3.0", + "camelcase": "^5.2.0", + "icss-utils": "^4.1.0", + "loader-utils": "^1.2.3", + "normalize-path": "^3.0.0", + "postcss": "^7.0.14", + "postcss-modules-extract-imports": "^2.0.0", + "postcss-modules-local-by-default": "^2.0.6", + "postcss-modules-scope": "^2.1.0", + "postcss-modules-values": "^2.0.0", "postcss-value-parser": "^3.3.0", - "source-list-map": "^2.0.0" + "schema-utils": "^1.0.0" }, "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "big.js": "^3.1.3", + "big.js": "^5.2.2", "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "json5": "^1.0.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "postcss": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", + "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" } } } }, + "css-prefers-color-scheme": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-3.1.1.tgz", + "integrity": "sha512-MTu6+tMs9S3EUqzmqLXEcgNRbNkkD/TGFvowpeoWJn5Vfq7FMgsmRQs9X5NXAURiOBmOxm/lLjsDNXDE6k9bhg==", + "requires": { + "postcss": "^7.0.5" + } + }, "css-select": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", @@ -3504,51 +5653,6 @@ "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==" }, - "css-selector-tokenizer": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", - "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", - "dev": true, - "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - } - } - } - }, "css-tree": { "version": "1.0.0-alpha.28", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz", @@ -3581,86 +5685,62 @@ "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" }, "cssdb": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-3.2.1.tgz", - "integrity": "sha512-I0IS8zvxED8sQtFZnV7M+AkhWqTgp1HIyfMQJBbjdn4GgurBt7NCZaDgrWiAN2kNJN34mhF1p50aZIMQu290mA==" + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-4.4.0.tgz", + "integrity": "sha512-LsTAR1JPEM9TpGhl/0p3nQecC2LJ0kD8X5YARu1hk/9I1gril5vDtMZyNxcEpxxDj34YNck/ucjuoUd66K03oQ==" }, "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, "cssnano": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.7.tgz", - "integrity": "sha512-AiXL90l+MDuQmRNyypG2P7ux7K4XklxYzNNUd5HXZCNcH8/N9bHPcpN97v8tXgRVeFL/Ed8iP8mVmAAu0ZpT7A==", + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", + "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==", "requires": { "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.5", + "cssnano-preset-default": "^4.0.7", "is-resolvable": "^1.0.0", "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "cssnano-preset-default": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.5.tgz", - "integrity": "sha512-f1uhya0ZAjPYtDD58QkBB0R+uYdzHPei7cDxJyQQIHt5acdhyGXaSXl2nDLzWHLwGFbZcHxQtkJS8mmNwnxTvw==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz", + "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==", "requires": { "css-declaration-sorter": "^4.0.1", "cssnano-util-raw-cache": "^4.0.1", "postcss": "^7.0.0", - "postcss-calc": "^7.0.0", - "postcss-colormin": "^4.0.2", + "postcss-calc": "^7.0.1", + "postcss-colormin": "^4.0.3", "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.1", + "postcss-discard-comments": "^4.0.2", "postcss-discard-duplicates": "^4.0.2", "postcss-discard-empty": "^4.0.1", "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.9", - "postcss-merge-rules": "^4.0.2", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.1", - "postcss-minify-params": "^4.0.1", - "postcss-minify-selectors": "^4.0.1", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.1", - "postcss-normalize-positions": "^4.0.1", - "postcss-normalize-repeat-style": "^4.0.1", - "postcss-normalize-string": "^4.0.1", - "postcss-normalize-timing-functions": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", "postcss-normalize-unicode": "^4.0.1", "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.1", - "postcss-ordered-values": "^4.1.1", - "postcss-reduce-initial": "^4.0.2", - "postcss-reduce-transforms": "^4.0.1", - "postcss-svgo": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-svgo": "^4.0.2", "postcss-unique-selectors": "^4.0.1" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "cssnano-util-get-arguments": { @@ -3679,18 +5759,6 @@ "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", "requires": { "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "cssnano-util-same-parent": { @@ -3723,14 +5791,14 @@ } }, "cssom": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz", - "integrity": "sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog==" + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz", + "integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==" }, "cssstyle": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.1.1.tgz", - "integrity": "sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz", + "integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==", "requires": { "cssom": "0.3.x" } @@ -3769,12 +5837,24 @@ "abab": "^2.0.0", "whatwg-mimetype": "^2.2.0", "whatwg-url": "^7.0.0" + }, + "dependencies": { + "whatwg-url": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", + "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + } } }, "date-fns": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", - "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==", + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", + "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==", "dev": true }, "date-now": { @@ -3792,13 +5872,9 @@ } }, "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", - "dev": true, - "requires": { - "xregexp": "4.0.0" - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decode-uri-component": { "version": "0.2.0", @@ -3814,8 +5890,7 @@ "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "optional": true + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, "deep-is": { "version": "0.1.3", @@ -3823,21 +5898,28 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, "default-gateway": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz", - "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", "dev": true, "requires": { - "execa": "^0.10.0", + "execa": "^1.0.0", "ip-regex": "^2.1.0" } }, "default-require-extensions": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", - "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "^3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + } } }, "define-properties": { @@ -3929,19 +6011,16 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "requires": { - "repeating": "^2.0.0" - } + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true }, "detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "optional": true + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, "detect-newline": { "version": "2.1.0", @@ -3963,14 +6042,14 @@ "debug": "^2.6.0" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" + "diff-sequences": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.3.0.tgz", + "integrity": "sha512-xLqpez+Zj9GKSnPWS0WZw1igGocZ+uua8+y+5dDNTT934N3QuY1sp2LkHzwiaYQGz60hMq0pjAshdeXm5VUOEw==" }, "diffie-hellman": { "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { @@ -4113,24 +6192,24 @@ } }, "dotenv": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.1.0.tgz", - "integrity": "sha512-/veDn2ztgRlB7gKmE3i9f6CmDIyXAy6d5nBq+whO9SLX+Zs1sXEgFLPi+aSuWqUuusMfbi84fT8j34fs1HaYUw==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", + "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==" }, "dotenv-expand": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-4.2.0.tgz", - "integrity": "sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU=" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", + "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" }, "duplexer": { "version": "0.1.1", - "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" }, "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", "requires": { "end-of-stream": "^1.0.0", "inherits": "^2.0.1", @@ -4145,7 +6224,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -4182,14 +6261,14 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.73", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.73.tgz", - "integrity": "sha512-6PIg7v9zRoVGh6EheRF8h6Plti+3Yo/qtHobS4/Htyt53DNHmKKGFqSae1AIk0k1S4gCQvt7I2WgpbuZNcDY+g==" + "version": "1.3.119", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.119.tgz", + "integrity": "sha512-3mtqcAWa4HgG+Djh/oNXlPH0cOH6MmtwxN1nHSaReb9P0Vn51qYPqYwLeoSuAX9loU1wrOBhFbiX3CkeIxPfgg==" }, "element-closest": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/element-closest/-/element-closest-2.0.2.tgz", - "integrity": "sha1-cqdAoQdFM4LijfnOXbtajfD5Zuw=" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/element-closest/-/element-closest-3.0.1.tgz", + "integrity": "sha512-Wm8B0in+k6GsSCra8vLVnFIjIrff2T1s2b++jU6VL6mqIteP19THxDXwT5JDrmJPlqT3YifOK9cu28+uRGUdew==" }, "elliptic": { "version": "6.4.1", @@ -4207,9 +6286,9 @@ } }, "emoji-regex": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.5.1.tgz", - "integrity": "sha512-PAHp6TxrCy7MGMFidro8uikr+zlJJKJ/Q6mm2ExZ7HwkyR9lSVFfE3kt36qcwa24BQL7y0G9axycGjK1A/0uNQ==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, "emojis-list": { "version": "2.1.0", @@ -4221,6 +6300,14 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "~0.4.13" + } + }, "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", @@ -4246,17 +6333,19 @@ "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" }, "enzyme": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.7.0.tgz", - "integrity": "sha512-QLWx+krGK6iDNyR1KlH5YPZqxZCQaVF6ike1eDJAOg0HvSkSCVImPsdWaNw6v+VrnK92Kg8jIOYhuOSS9sBpyg==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.9.0.tgz", + "integrity": "sha512-JqxI2BRFHbmiP7/UFqvsjxTirWoM1HfeaJrmVSZ9a1EADKkZgdPcAuISPMpoUiHlac9J4dYt81MC5BBIrbJGMg==", "requires": { "array.prototype.flat": "^1.2.1", "cheerio": "^1.0.0-rc.2", "function.prototype.name": "^1.1.0", "has": "^1.0.3", + "html-element-map": "^1.0.0", "is-boolean-object": "^1.0.0", "is-callable": "^1.1.4", "is-number-object": "^1.0.3", + "is-regex": "^1.0.4", "is-string": "^1.0.4", "is-subset": "^0.1.1", "lodash.escape": "^4.0.1", @@ -4272,27 +6361,74 @@ } }, "enzyme-adapter-react-16": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.6.0.tgz", - "integrity": "sha512-ay9eGFpChyUDnjTFMMJHzrb681LF3hPWJLEA7RoLFG9jSWAdAm2V50pGmFV9dYGJgh5HfdiqM+MNvle41Yf/PA==", + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.11.2.tgz", + "integrity": "sha512-2ruTTCPRb0lPuw/vKTXGVZVBZqh83MNDnakMhzxhpJcIbneEwNy2Cv0KvL97pl57/GOazJHflWNLjwWhex5AAA==", "requires": { - "enzyme-adapter-utils": "^1.8.0", - "function.prototype.name": "^1.1.0", + "enzyme-adapter-utils": "^1.10.1", "object.assign": "^4.1.0", - "object.values": "^1.0.4", - "prop-types": "^15.6.2", - "react-is": "^16.5.2", - "react-test-renderer": "^16.0.0-0" + "object.values": "^1.1.0", + "prop-types": "^15.7.2", + "react-is": "^16.8.4", + "react-test-renderer": "^16.0.0-0", + "semver": "^5.6.0" + }, + "dependencies": { + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + } } }, "enzyme-adapter-utils": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.8.1.tgz", - "integrity": "sha512-s3QB3xQAowaDS2sHhmEqrT13GJC4+n5bG015ZkLv60n9k5vhxxHTQRIneZmQ4hmdCZEBrvUJ89PG6fRI5OEeuQ==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.10.1.tgz", + "integrity": "sha512-oasinhhLoBuZsIkTe8mx0HiudtfErUtG0Ooe1FOplu/t4c9rOmyG5gtrBASK6u4whHIRWvv0cbZMElzNTR21SA==", "requires": { "function.prototype.name": "^1.1.0", "object.assign": "^4.1.0", - "prop-types": "^15.6.2" + "object.fromentries": "^2.0.0", + "prop-types": "^15.7.2", + "semver": "^5.6.0" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + } } }, "errno": { @@ -4344,9 +6480,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", + "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", "requires": { "esprima": "^3.1.3", "estraverse": "^4.2.0", @@ -4363,68 +6499,99 @@ } }, "eslint": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.6.0.tgz", - "integrity": "sha512-/eVYs9VVVboX286mBK7bbKnO1yamUy2UCRjiY6MryhQL2PaaXCExsCQ2aO83OeYRhU2eCU/FMFP+tVMoOrzNrA==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.3.tgz", + "integrity": "sha512-vMGi0PjCHSokZxE0NLp2VneGw5sio7SSiDNgIUn2tC0XkWJRNOIoHIg3CliLVfXnJsiHxGAYrkw0PieAu8+KYQ==", "requires": { "@babel/code-frame": "^7.0.0", - "ajv": "^6.5.3", + "ajv": "^6.9.1", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", + "espree": "^5.0.1", "esquery": "^1.0.1", "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", + "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", "globals": "^11.7.0", "ignore": "^4.0.6", + "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.1.0", - "is-resolvable": "^1.1.0", + "inquirer": "^6.2.2", "js-yaml": "^3.12.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.5", + "lodash": "^4.17.11", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^2.0.0", - "require-uncached": "^1.0.3", + "regexpp": "^2.0.1", "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1", - "table": "^4.0.3", + "table": "^5.2.3", "text-table": "^0.2.0" }, "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { "ms": "^2.1.1" } }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "requires": { + "esutils": "^2.0.2" + } + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -4435,12 +6602,51 @@ } } }, + "eslint-config-airbnb": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-17.1.0.tgz", + "integrity": "sha512-R9jw28hFfEQnpPau01NO5K/JWMGLi6aymiF6RsnMURjTk+MqZKllCqGK/0tOvHkPi/NWSSOU2Ced/GX++YxLnw==", + "dev": true, + "requires": { + "eslint-config-airbnb-base": "^13.1.0", + "object.assign": "^4.1.0", + "object.entries": "^1.0.4" + } + }, + "eslint-config-airbnb-base": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz", + "integrity": "sha512-XWwQtf3U3zIoKO1BbHh6aUhJZQweOwSt4c2JrPDg9FP3Ltv3+YfEv7jIDB8275tVnO/qOHbfuYg3kzw6Je7uWw==", + "dev": true, + "requires": { + "eslint-restricted-globals": "^0.1.1", + "object.assign": "^4.1.0", + "object.entries": "^1.0.4" + } + }, + "eslint-config-prettier": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-4.1.0.tgz", + "integrity": "sha512-zILwX9/Ocz4SV2vX7ox85AsrAgXV3f2o2gpIicdMIOra48WYqgUnWNH/cR/iHtmD2Vb3dLSC3LiEJnS05Gkw7w==", + "dev": true, + "requires": { + "get-stdin": "^6.0.0" + }, + "dependencies": { + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + } + } + }, "eslint-config-react-app": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-3.0.5.tgz", - "integrity": "sha512-GjPuy0pbaCkl4+9wm8p0xpl/x/AGFy3wKuju3WNVefDNDDu8T6Ap1OFMDDJbYnOAI+4jfyAE3VT06lAYcJVpdw==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-3.0.8.tgz", + "integrity": "sha512-Ovi6Bva67OjXrom9Y/SLJRkrGqKhMAL0XCH8BizPhjEVEhYczl2ZKiNZI2CuqO5/CJwAfMwRXAVGY0KToWr1aA==", "requires": { - "confusing-browser-globals": "^1.0.5" + "confusing-browser-globals": "^1.0.6" } }, "eslint-import-resolver-node": { @@ -4453,9 +6659,9 @@ } }, "eslint-loader": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-2.1.1.tgz", - "integrity": "sha512-1GrJFfSevQdYpoDzx8mEE2TDWsb/zmFuY09l6hURg1AeFIKQOvZ+vH0UPjzmd1CZIbfTV5HUkMeBmFiDBkgIsQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-2.1.2.tgz", + "integrity": "sha512-rA9XiXEOilLYPOIInvVH5S/hYfyTPyxag6DZhoQOduM+3TkghAEQ3VcFO8VnX4J4qg/UIBzp72aOf/xvYmpmsg==", "requires": { "loader-fs-cache": "^1.0.0", "loader-utils": "^1.0.2", @@ -4464,77 +6670,116 @@ "rimraf": "^2.6.1" }, "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "requires": { - "big.js": "^3.1.3", + "big.js": "^5.2.2", "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "json5": "^1.0.1" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, "eslint-module-utils": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", - "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz", + "integrity": "sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w==", "requires": { "debug": "^2.6.8", - "pkg-dir": "^1.0.0" + "pkg-dir": "^2.0.0" }, "dependencies": { "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "p-try": "^1.0.0" } }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "requires": { - "pinkie-promise": "^2.0.0" + "p-limit": "^1.1.0" } }, - "pkg-dir": { + "p-try": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "requires": { - "find-up": "^1.0.0" + "find-up": "^2.1.0" } } } }, "eslint-plugin-flowtype": { - "version": "2.50.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.1.tgz", - "integrity": "sha512-9kRxF9hfM/O6WGZcZPszOVPd2W0TLHBtceulLTsGfwMPtiCCLnCW0ssRiOOiXyqrCA20pm1iXdXm7gQeN306zQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.4.2.tgz", + "integrity": "sha512-sv6O6fiN3dIwhU4qRxfcyIpbKGVvsxwIQ6vgBLudpQKjH1rEyEFEOjGzGEUBTQP9J8LdTZm37OjiqZ0ZeFOa6g==", "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "eslint-plugin-import": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", - "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.16.0.tgz", + "integrity": "sha512-z6oqWlf1x5GkHIFgrSvtmudnqM6Q60KM4KvpWi5ubonMjycLjndvd5+8VAZIsTlHC03djdgJuyKG6XO577px6A==", "requires": { "contains-path": "^0.1.0", - "debug": "^2.6.8", + "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.2.0", - "has": "^1.0.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.3", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.3.0", + "has": "^1.0.3", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", "read-pkg-up": "^2.0.0", - "resolve": "^1.6.0" + "resolve": "^1.9.0" }, "dependencies": { "doctrine": { @@ -4546,6 +6791,14 @@ "isarray": "^1.0.0" } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4553,7 +6806,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "requires": { "graceful-fs": "^4.1.2", @@ -4562,6 +6815,36 @@ "strip-bom": "^3.0.0" } }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -4580,7 +6863,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" }, "read-pkg": { @@ -4610,36 +6893,65 @@ } }, "eslint-plugin-jsx-a11y": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.1.2.tgz", - "integrity": "sha512-7gSSmwb3A+fQwtw0arguwMdOdzmKUgnUcbSNlo+GjKLAQFuC2EZxWqG9XHRI8VscBJD5a8raz3RuxQNFW+XJbw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.1.tgz", + "integrity": "sha512-cjN2ObWrRz0TTw7vEcGQrx+YltMvZoOEx4hWU8eEERDnBIU00OTq7Vr+jA7DFKxiwLNv4tTh5Pq2GUNEa8b6+w==", "requires": { "aria-query": "^3.0.0", "array-includes": "^3.0.3", "ast-types-flow": "^0.0.7", - "axobject-query": "^2.0.1", + "axobject-query": "^2.0.2", "damerau-levenshtein": "^1.0.4", - "emoji-regex": "^6.5.1", + "emoji-regex": "^7.0.2", "has": "^1.0.3", "jsx-ast-utils": "^2.0.1" } }, + "eslint-plugin-prettier": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.1.tgz", + "integrity": "sha512-/PMttrarPAY78PLvV3xfWibMOdMDl57hmlQ2XqFeA37wd+CJ7WSxV7txqjVPHi/AAFKd2lX0ZqfsOc/i5yFCSQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, "eslint-plugin-react": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", - "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", + "version": "7.12.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz", + "integrity": "sha512-1puHJkXJY+oS1t467MjbqjvX53uQ05HXwjqDgdbGBqf5j9eeydI54G3KwiJmWciQ0HTBacIKw2jgwSBSH3yfgQ==", "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", "has": "^1.0.3", "jsx-ast-utils": "^2.0.1", - "prop-types": "^15.6.2" + "object.fromentries": "^2.0.0", + "prop-types": "^15.6.2", + "resolve": "^1.9.0" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, + "eslint-restricted-globals": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz", + "integrity": "sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=", + "dev": true + }, "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" @@ -4656,20 +6968,13 @@ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" }, "espree": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", - "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", "requires": { - "acorn": "^6.0.2", + "acorn": "^6.0.7", "acorn-jsx": "^5.0.0", "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", - "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==" - } } }, "esprima": { @@ -4715,17 +7020,17 @@ "dev": true }, "events": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", "dev": true }, "eventsource": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", - "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", + "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", "requires": { - "original": ">=0.0.5" + "original": "^1.0.0" } }, "evp_bytestokey": { @@ -4739,26 +7044,32 @@ } }, "exec-sh": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz", - "integrity": "sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw==", - "requires": { - "merge": "^1.2.0" - } + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz", + "integrity": "sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg==" }, "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "requires": { "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", + "get-stream": "^4.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + } } }, "exit": { @@ -4798,86 +7109,36 @@ } } }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "requires": { - "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "expand-tilde": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, "requires": { "homedir-polyfill": "^1.0.1" } }, "expect": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-23.6.0.tgz", - "integrity": "sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-24.5.0.tgz", + "integrity": "sha512-p2Gmc0CLxOgkyA93ySWmHFYHUPFIHG6XZ06l7WArWAsrqYVaVEkOU5NtT5i68KUyGKbkQgDCkiT65bWmdoL6Bw==", "requires": { + "@jest/types": "^24.5.0", "ansi-styles": "^3.2.0", - "jest-diff": "^23.6.0", - "jest-get-type": "^22.1.0", - "jest-matcher-utils": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-regex-util": "^23.3.0" + "jest-get-type": "^24.3.0", + "jest-matcher-utils": "^24.5.0", + "jest-message-util": "^24.5.0", + "jest-regex-util": "^24.3.0" } }, "express": { - "version": "4.16.3", - "resolved": "http://registry.npmjs.org/express/-/express-4.16.3.tgz", - "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", "requires": { "accepts": "~1.3.5", "array-flatten": "1.1.1", - "body-parser": "1.18.2", + "body-parser": "1.18.3", "content-disposition": "0.5.2", "content-type": "~1.0.4", "cookie": "0.3.1", @@ -4894,10 +7155,10 @@ "on-finished": "~2.3.0", "parseurl": "~1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.3", - "qs": "6.5.1", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", "range-parser": "~1.2.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "send": "0.16.2", "serve-static": "1.13.2", "setprototypeof": "1.1.0", @@ -4905,6 +7166,13 @@ "type-is": "~1.6.16", "utils-merge": "1.0.1", "vary": "~1.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } } }, "extend": { @@ -5020,16 +7288,22 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "fast-glob": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.3.tgz", - "integrity": "sha512-NiX+JXjnx43RzvVFwRWfPKo4U+1BrK5pJPsHQdKMlLoFHrrGktXglQhHliSihWAq+m1z6fHk3uwGHrtRbS9vLA==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.6.tgz", + "integrity": "sha512-0BvMaZc1k9F+MeWWMe8pL6YltFzZYcJsYU7D4JyDA6PAczaXvxqQQ/z+mDF7/4Mw01DeUc+i3CTKajnkANkV4w==", "requires": { "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", + "@nodelib/fs.stat": "^1.1.2", "glob-parent": "^3.1.0", "is-glob": "^4.0.0", - "merge2": "^1.2.1", + "merge2": "^1.2.3", "micromatch": "^3.1.10" } }, @@ -5043,12 +7317,6 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, - "fastparse": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", - "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", - "dev": true - }, "faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -5066,6 +7334,35 @@ "bser": "^2.0.0" } }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "requires": { + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.18" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "~2.0.3" + } + } + } + }, "figgy-pudding": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", @@ -5080,42 +7377,57 @@ } }, "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "^2.0.1" } }, "file-loader": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-2.0.0.tgz", - "integrity": "sha512-YCsBfd1ZGCyonOKLxPiKPdu+8ld9HAaMEvJewzz+b2eTF7uL5Zm/HdBF6FjCrpCMRq25Mi0U1gl4pwn2TlH7hQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", + "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", "dev": true, "requires": { "loader-utils": "^1.0.2", "schema-utils": "^1.0.0" }, "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "big.js": "^3.1.3", + "big.js": "^5.2.2", "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "json5": "^1.0.1" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true } } }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" - }, "fileset": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", @@ -5165,86 +7477,79 @@ "unpipe": "~1.0.0" } }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" + "locate-path": "^3.0.0" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, "requires": { - "locate-path": "^2.0.0" + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } } }, "flag-icon-css": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/flag-icon-css/-/flag-icon-css-3.2.1.tgz", - "integrity": "sha512-0t7zPm2crM2cBIm3epZQ+EmiHuzgFNTTSMUMkWlrztDDGL+y31D+eY8zaB9zYCzJGAsn4KEMAKY+jCU1mt9jwg==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/flag-icon-css/-/flag-icon-css-3.3.0.tgz", + "integrity": "sha512-u5lCGVExrJJRykNGd//ZrBU5Bkt0LTZJFSuG+Az/pwcHgzDeFwomwFbsgVtI1aJd6ysyHsx+5UGrA+nhSGd4yw==" }, "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" }, "dependencies": { - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - } - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "glob": "^7.1.3" } - }, - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==" + }, "flatten": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" }, "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" }, "dependencies": { "isarray": { @@ -5254,7 +7559,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -5277,22 +7582,28 @@ } }, "follow-redirects": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.8.tgz", - "integrity": "sha512-sy1mXPmv7kLAMKW/8XofG7o9T+6gAjzdZK4AJF6ryqQYUa/hnzgiypoeUecZ53x7XiqKNEpNqLtS97MshW2nxg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", + "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", "dev": true, "requires": { - "debug": "=3.1.0" + "debug": "^3.2.6" }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, @@ -5319,6 +7630,27 @@ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, + "fork-ts-checker-webpack-plugin": { + "version": "1.0.0-alpha.6", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.0.0-alpha.6.tgz", + "integrity": "sha512-s/V+58nLrUjuXyzYk8AL11XG8bxIirTbafDLMn26sL59HQx8QvvsRTqOkhq4MV0coIkog1jZuH/E9Abm8zFZ2g==", + "requires": { + "babel-code-frame": "^6.22.0", + "chalk": "^2.4.1", + "chokidar": "^2.0.4", + "micromatch": "^3.1.10", + "minimatch": "^3.0.4", + "semver": "^5.6.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + } + } + }, "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", @@ -5363,7 +7695,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -5386,9 +7718,9 @@ } }, "fs-extra": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz", - "integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -5399,7 +7731,6 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "optional": true, "requires": { "minipass": "^2.2.1" } @@ -5421,9 +7752,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", "optional": true, "requires": { "nan": "^2.9.2", @@ -5445,7 +7776,7 @@ "optional": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "optional": true, "requires": { @@ -5466,7 +7797,7 @@ } }, "chownr": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "optional": true }, @@ -5496,7 +7827,7 @@ } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true, "optional": true }, @@ -5539,7 +7870,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.3", "bundled": true, "optional": true, "requires": { @@ -5557,11 +7888,11 @@ "optional": true }, "iconv-lite": { - "version": "0.4.21", + "version": "0.4.24", "bundled": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { @@ -5614,15 +7945,15 @@ "bundled": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.5", "bundled": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.1.0", + "version": "1.2.1", "bundled": true, "optional": true, "requires": { @@ -5642,7 +7973,7 @@ "optional": true }, "needle": { - "version": "2.2.0", + "version": "2.2.4", "bundled": true, "optional": true, "requires": { @@ -5652,17 +7983,17 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.3", "bundled": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -5678,12 +8009,12 @@ } }, "npm-bundled": { - "version": "1.0.3", + "version": "1.0.5", "bundled": true, "optional": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.2.0", "bundled": true, "optional": true, "requires": { @@ -5748,11 +8079,11 @@ "optional": true }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -5780,15 +8111,15 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.6.3", "bundled": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", "bundled": true }, "safer-buffer": { @@ -5802,7 +8133,7 @@ "optional": true }, "semver": { - "version": "5.5.0", + "version": "5.6.0", "bundled": true, "optional": true }, @@ -5846,16 +8177,16 @@ "optional": true }, "tar": { - "version": "4.4.1", + "version": "4.4.8", "bundled": true, "optional": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.2" } }, @@ -5865,11 +8196,11 @@ "optional": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -5877,7 +8208,7 @@ "bundled": true }, "yallist": { - "version": "3.0.2", + "version": "3.0.3", "bundled": true } } @@ -5971,11 +8302,6 @@ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" }, - "get-stream": { - "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -6002,38 +8328,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", @@ -6059,31 +8353,21 @@ "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" }, "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" + "global-prefix": "^3.0.0" } }, - "global-modules-path": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/global-modules-path/-/global-modules-path-2.3.0.tgz", - "integrity": "sha512-HchvMJNYh9dGSCy8pOQ2O8u/hoXaL+0XhnrwH0RyLiSXMMTl9W3N6KUU73+JFOg5PGjtzl6VZzUQsnrpm7Szag==", - "dev": true - }, "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" } }, "globals": { @@ -6132,6 +8416,11 @@ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==" + }, "gzip-size": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz", @@ -6141,78 +8430,27 @@ "pify": "^3.0.0" } }, - "h2x-core": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/h2x-core/-/h2x-core-1.1.1.tgz", - "integrity": "sha512-LdXe4Irs731knLtHgLyFrnJCumfiqXXQwKN1IMUhi37li29PLfLbMDvfK7Rk4wmgHLKP+sIITT1mcJV4QsC3nw==", - "requires": { - "h2x-generate": "^1.1.0", - "h2x-parse": "^1.1.1", - "h2x-traverse": "^1.1.0" - } - }, - "h2x-generate": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/h2x-generate/-/h2x-generate-1.1.0.tgz", - "integrity": "sha512-L7Hym0yb20QIjvqeULUPOeh/cyvScdOAyJ6oRlh5dF0+w92hf3OiTk1q15KBijde7jGEe+0R4aOmtW8gkPNIzg==", - "requires": { - "h2x-traverse": "^1.1.0" - } - }, - "h2x-parse": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/h2x-parse/-/h2x-parse-1.1.1.tgz", - "integrity": "sha512-WRSmPF+tIWuUXVEZaYRhcZx/JGEJx8LjZpDDtrvMr5m/GTR0NerydCik5dRzcKXPWCtfXxuJRLR4v2P4HB2B1A==", - "requires": { - "h2x-types": "^1.1.0", - "jsdom": ">=11.0.0" - } - }, - "h2x-plugin-jsx": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/h2x-plugin-jsx/-/h2x-plugin-jsx-1.2.0.tgz", - "integrity": "sha512-a7Vb3BHhJJq0dPDNdqguEyQirENkVsFtvM2YkiaT5h/fmGhmM1nDy3BLeJeSKi2tL2g9v4ykm2Z+GG9QrhDgPA==", - "requires": { - "h2x-types": "^1.1.0" - } - }, - "h2x-traverse": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/h2x-traverse/-/h2x-traverse-1.1.0.tgz", - "integrity": "sha512-1ND8ZbISLSUgpLHYJRvhvElITvs0g44L7RxjeXViz5XP6rooa+FtXTFLByl2Yg01zj2txubifHIuU4pgvj8l+A==", - "requires": { - "h2x-types": "^1.1.0" - } - }, - "h2x-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/h2x-types/-/h2x-types-1.1.0.tgz", - "integrity": "sha512-QdH5qfLcdF209UsCdM0ZNZ9Dwm2PHvMfeLZtivBrjX3Y/df4US2pwsUC4HBfWhye/mx/t6puODeC7Oacb/Ol8g==" - }, "handle-thing": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", - "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", + "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==", "dev": true }, "handlebars": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", - "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.1.tgz", + "integrity": "sha512-3Zhi6C0euYZL5sM0Zcy7lInLXKQ+YLcF/olbN010mzGQ4XVm50JeyBnMqofHh696GrciGruC7kCcApPDJvVgwA==", "requires": { - "async": "^2.5.0", + "neo-async": "^2.6.0", "optimist": "^0.6.1", "source-map": "^0.6.1", "uglify-js": "^3.1.4" }, "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "requires": { - "lodash": "^4.17.10" - } + "neo-async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", + "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==" } } }, @@ -6329,15 +8567,43 @@ } }, "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, + "hast-util-from-parse5": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-5.0.0.tgz", + "integrity": "sha512-A7ev5OseS/J15214cvDdcI62uwovJO2PB60Xhnq7kaxvvQRFDEccuqbkrFXU03GPBGopdPqlpQBRqIcDS/Fjbg==", + "requires": { + "ccount": "^1.0.3", + "hastscript": "^5.0.0", + "property-information": "^5.0.0", + "web-namespaces": "^1.1.2", + "xtend": "^4.0.1" + } + }, + "hast-util-parse-selector": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.1.tgz", + "integrity": "sha512-Xyh0v+nHmQvrOqop2Jqd8gOdyQtE8sIP9IQf7mlVDqp924W4w/8Liuguk2L2qei9hARnQSG2m+wAOCxM7npJVw==" + }, + "hastscript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-5.0.0.tgz", + "integrity": "sha512-xJtuJ8D42Xtq5yJrnDg/KAIxl2cXBXKoiIJwmWX9XMf8113qHTGl/Bf7jEsxmENJ4w6q4Tfl8s/Y6mEZo8x8qw==", + "requires": { + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.2.0", + "property-information": "^5.0.1", + "space-separated-tokens": "^1.0.0" + } + }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", @@ -6349,25 +8615,19 @@ "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==" }, "history": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/history/-/history-4.7.2.tgz", - "integrity": "sha512-1zkBRWW6XweO0NBcjiphtVJVsIQ+SXF29z9DVkceeaSLVMFXHool+fdCZD4spDCfZJCILPILc3bm7Bc+HRi0nA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/history/-/history-4.9.0.tgz", + "integrity": "sha512-H2DkjCjXf0Op9OAr6nJ56fcRkTSNrUiv41vNJ6IswJjif6wlpZK0BTfFbi7qK9dXLSYZxkq5lBsj3vUjlYBYZA==", "requires": { - "invariant": "^2.2.1", + "@babel/runtime": "^7.1.2", "loose-envify": "^1.2.0", "resolve-pathname": "^2.2.0", - "value-equal": "^0.4.0", - "warning": "^3.0.0" + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^0.4.0" }, "dependencies": { - "warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", - "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", - "requires": { - "loose-envify": "^1.0.0" - } - } + "warning": {} } }, "hmac-drbg": { @@ -6382,28 +8642,23 @@ } }, "hoek": { - "version": "4.2.1", - "resolved": "http://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.2.tgz", + "integrity": "sha512-6qhh/wahGYZHFSFw12tBbJw5fsAhhwrrG/y3Cs0YMTv2WzMnL0oLPnQJjv1QJvEfylRSOFuP+xCu+tdx0tD16Q==" }, "hoist-non-react-statics": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", - "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", + "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" + "react-is": "^16.7.0" } }, "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, "requires": { "parse-passwd": "^1.0.0" } @@ -6477,6 +8732,14 @@ "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==" }, + "html-element-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.0.0.tgz", + "integrity": "sha512-/SP6aOiM5Ai9zALvCxDubIeez0LvG3qP7R9GcRDnJEP/HBmv0A8A9K0o8+HFudcFt46+i921ANjzKsjPjb7Enw==", + "requires": { + "array-filter": "^1.0.0" + } + }, "html-encoding-sniffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", @@ -6517,6 +8780,19 @@ "tapable": "^1.0.0", "toposort": "^1.0.0", "util.promisify": "1.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + } } }, "htmlparser2": { @@ -6558,9 +8834,9 @@ } }, "http-parser-js": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", - "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz", + "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==" }, "http-proxy": { "version": "1.17.0", @@ -6574,15 +8850,15 @@ } }, "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", "dev": true, "requires": { - "http-proxy": "^1.16.2", + "http-proxy": "^1.17.0", "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" + "lodash": "^4.17.11", + "micromatch": "^3.1.10" } }, "http-signature": { @@ -6613,12 +8889,34 @@ "dev": true }, "icss-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz", - "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.0.tgz", + "integrity": "sha512-3DEun4VOeMvSczifM3F2cKQrDQ5Pj6WKhkOq6HD4QTnDUAq8MQRxy5TX6Sy1iY6WPBe4gQ3p5vTECjbIkglkkQ==", "dev": true, "requires": { - "postcss": "^6.0.1" + "postcss": "^7.0.14" + }, + "dependencies": { + "postcss": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", + "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "identity-obj-proxy": { @@ -6649,15 +8947,14 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "optional": true, "requires": { "minimatch": "^3.0.4" } }, "immer": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/immer/-/immer-1.7.2.tgz", - "integrity": "sha512-4Urocwu9+XLDJw4Tc6ZCg7APVjjLInCFvO4TwGsAYV5zT6YYSor14dsZR0+0tHlDIN92cFUOq+i7fC00G5vTxA==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/immer/-/immer-1.10.0.tgz", + "integrity": "sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg==" }, "import-cwd": { "version": "2.1.0", @@ -6667,6 +8964,15 @@ "import-from": "^2.1.0" } }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, "import-from": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", @@ -6679,7 +8985,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "dev": true, "requires": { "pkg-dir": "^3.0.0", "resolve-cwd": "^2.0.0" @@ -6689,7 +8994,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -6698,17 +9002,15 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", - "dev": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", "requires": { "p-try": "^2.0.0" } @@ -6717,7 +9019,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, "requires": { "p-limit": "^2.0.0" } @@ -6725,14 +9026,12 @@ "p-try": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", - "dev": true + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==" }, "pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, "requires": { "find-up": "^3.0.0" } @@ -6788,54 +9087,70 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", - "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz", + "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==", "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^3.0.0", + "external-editor": "^3.0.3", "figures": "^2.0.0", - "lodash": "^4.17.10", + "lodash": "^4.17.11", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rxjs": "^6.1.0", + "rxjs": "^6.4.0", "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", + "strip-ansi": "^5.0.0", "through": "^2.3.6" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "requires": { + "tslib": "^1.9.0" + } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } } } }, "internal-ip": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz", - "integrity": "sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.2.0.tgz", + "integrity": "sha512-ZY8Rk+hlvFeuMmG5uH1MXhhdeMntmIaxaInvAmzMq/SHV8rv4Kh+6GiQNNDQd0wZFrcO+FiTBo8lui/osKOyJw==", "dev": true, "requires": { - "default-gateway": "^2.6.0", - "ipaddr.js": "^1.5.2" + "default-gateway": "^4.0.1", + "ipaddr.js": "^1.9.0" + }, + "dependencies": { + "ipaddr.js": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "dev": true + } } }, "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, "invariant": { @@ -6849,8 +9164,7 @@ "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" }, "ip": { "version": "1.1.5", @@ -6901,7 +9215,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, "requires": { "binary-extensions": "^1.0.0" } @@ -6930,11 +9243,11 @@ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" }, "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "requires": { - "ci-info": "^1.5.0" + "ci-info": "^2.0.0" } }, "is-color-stop": { @@ -6995,19 +9308,6 @@ "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "requires": { - "is-primitive": "^2.0.0" - } - }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -7032,9 +9332,9 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-generator-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", - "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.0.0.tgz", + "integrity": "sha512-elzyIdM7iKoFHzcrndIqjYomImhxrFRnGP3galODoII4TB9gI7mZ+FnlLQmmjf27SxHS2gKEeyhX5/+YRS6H9g==" }, "is-glob": { "version": "4.0.0", @@ -7075,12 +9375,14 @@ "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true }, "is-path-in-cwd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, "requires": { "is-path-inside": "^1.0.0" } @@ -7089,10 +9391,16 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, "requires": { "path-is-inside": "^1.0.1" } }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -7101,16 +9409,6 @@ "isobject": "^3.0.1" } }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" - }, "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", @@ -7213,108 +9511,222 @@ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + } + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "istanbul-api": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.7.tgz", - "integrity": "sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA==", - "requires": { - "async": "^2.1.4", - "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.2.1", - "istanbul-lib-hook": "^1.2.2", - "istanbul-lib-instrument": "^1.10.2", - "istanbul-lib-report": "^1.1.5", - "istanbul-lib-source-maps": "^1.2.6", - "istanbul-reports": "^1.5.1", - "js-yaml": "^3.7.0", - "mkdirp": "^0.5.1", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.1.tgz", + "integrity": "sha512-kVmYrehiwyeBAk/wE71tW6emzLiHGjYIiDrc8sfyty4F8M02/lrgXSm+R1kXysmF20zArvmZXjlE/mg24TVPJw==", + "requires": { + "async": "^2.6.1", + "compare-versions": "^3.2.1", + "fileset": "^2.0.3", + "istanbul-lib-coverage": "^2.0.3", + "istanbul-lib-hook": "^2.0.3", + "istanbul-lib-instrument": "^3.1.0", + "istanbul-lib-report": "^2.0.4", + "istanbul-lib-source-maps": "^3.0.2", + "istanbul-reports": "^2.1.1", + "js-yaml": "^3.12.0", + "make-dir": "^1.3.0", + "minimatch": "^3.0.4", "once": "^1.4.0" }, "dependencies": { "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" + } + } + } + }, + "istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==" + }, + "istanbul-lib-hook": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz", + "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==", + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", + "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", + "requires": { + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.3", + "semver": "^5.5.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", + "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", + "requires": { + "@babel/types": "^7.4.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", + "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", + "requires": { + "@babel/types": "^7.4.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/traverse": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.0.tgz", + "integrity": "sha512-/DtIHKfyg2bBKnIN+BItaIlEg5pjAnzHOIQe5w+rHAw/rg9g0V7T4rqPX8BJPfW11kt3koyjAnTNwCzb28Y1PA==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.0", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.0", + "@babel/parser": "^7.4.0", + "@babel/types": "^7.4.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + }, + "dependencies": { + "@babel/generator": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", + "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", + "requires": { + "@babel/types": "^7.4.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/parser": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.2.tgz", + "integrity": "sha512-9fJTDipQFvlfSVdD/JBtkiY0br9BtfvW2R8wo6CX/Ej2eMuV0gWPk1M67Mt3eggQvBqYW1FCEk8BN7WvGm/g5g==" + }, + "@babel/types": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==" - }, - "istanbul-lib-hook": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz", - "integrity": "sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw==", - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.1", - "semver": "^5.3.0" - } - }, "istanbul-lib-report": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz", - "integrity": "sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz", + "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==", "requires": { - "istanbul-lib-coverage": "^1.2.1", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "supports-color": "^6.0.0" }, "dependencies": { - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" - }, "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "requires": { - "has-flag": "^1.0.0" + "has-flag": "^3.0.0" } } } }, "istanbul-lib-source-maps": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz", - "integrity": "sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.2.tgz", + "integrity": "sha512-JX4v0CiKTGp9fZPmoxpu9YEkPbEqCqBbO3403VabKjH+NRXo72HafD5UgnjTEqHL2SAjaZK1XDuDOkn6I5QVfQ==", "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.1", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { "ms": "^2.1.1" } @@ -7323,1145 +9735,467 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, "istanbul-reports": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.1.tgz", - "integrity": "sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz", + "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==", "requires": { - "handlebars": "^4.0.3" + "handlebars": "^4.1.0" } }, "jest": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-23.6.0.tgz", - "integrity": "sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-24.5.0.tgz", + "integrity": "sha512-lxL+Fq5/RH7inxxmfS2aZLCf8MsS+YCUBfeiNO6BWz/MmjhDGaIEA/2bzEf9q4Q0X+mtFHiinHFvQ0u+RvW/qQ==", "requires": { - "import-local": "^1.0.0", - "jest-cli": "^23.6.0" + "import-local": "^2.0.0", + "jest-cli": "^24.5.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "import-local": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", - "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", - "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - }, "jest-cli": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.6.0.tgz", - "integrity": "sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.5.0.tgz", + "integrity": "sha512-P+Jp0SLO4KWN0cGlNtC7JV0dW1eSFR7eRpoOucP2UM0sqlzp/bVHeo71Omonvigrj9AvCKy7NtQANtqJ7FXz8g==", "requires": { - "ansi-escapes": "^3.0.0", + "@jest/core": "^24.5.0", + "@jest/test-result": "^24.5.0", + "@jest/types": "^24.5.0", "chalk": "^2.0.1", "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "import-local": "^1.0.0", - "is-ci": "^1.0.10", - "istanbul-api": "^1.3.1", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-instrument": "^1.10.1", - "istanbul-lib-source-maps": "^1.2.4", - "jest-changed-files": "^23.4.2", - "jest-config": "^23.6.0", - "jest-environment-jsdom": "^23.4.0", - "jest-get-type": "^22.1.0", - "jest-haste-map": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-regex-util": "^23.3.0", - "jest-resolve-dependencies": "^23.6.0", - "jest-runner": "^23.6.0", - "jest-runtime": "^23.6.0", - "jest-snapshot": "^23.6.0", - "jest-util": "^23.4.0", - "jest-validate": "^23.6.0", - "jest-watcher": "^23.4.0", - "jest-worker": "^23.2.0", - "micromatch": "^2.3.11", - "node-notifier": "^5.2.1", - "prompts": "^0.1.9", - "realpath-native": "^1.0.0", - "rimraf": "^2.5.4", - "slash": "^1.0.0", - "string-length": "^2.0.0", - "strip-ansi": "^4.0.0", - "which": "^1.2.12", - "yargs": "^11.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yargs": { - "version": "11.1.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", - "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - } - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "requires": { - "camelcase": "^4.1.0" + "import-local": "^2.0.0", + "is-ci": "^2.0.0", + "jest-config": "^24.5.0", + "jest-util": "^24.5.0", + "jest-validate": "^24.5.0", + "prompts": "^2.0.1", + "realpath-native": "^1.1.0", + "yargs": "^12.0.2" } } } }, "jest-changed-files": { - "version": "23.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz", - "integrity": "sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.5.0.tgz", + "integrity": "sha512-Ikl29dosYnTsH9pYa1Tv9POkILBhN/TLZ37xbzgNsZ1D2+2n+8oEZS2yP1BrHn/T4Rs4Ggwwbp/x8CKOS5YJOg==", "requires": { + "@jest/types": "^24.5.0", + "execa": "^1.0.0", "throat": "^4.0.0" } }, "jest-config": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.6.0.tgz", - "integrity": "sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.5.0.tgz", + "integrity": "sha512-t2UTh0Z2uZhGBNVseF8wA2DS2SuBiLOL6qpLq18+OZGfFUxTM7BzUVKyHFN/vuN+s/aslY1COW95j1Rw81huOQ==", "requires": { - "babel-core": "^6.0.0", - "babel-jest": "^23.6.0", + "@babel/core": "^7.1.0", + "@jest/types": "^24.5.0", + "babel-jest": "^24.5.0", "chalk": "^2.0.1", "glob": "^7.1.1", - "jest-environment-jsdom": "^23.4.0", - "jest-environment-node": "^23.4.0", - "jest-get-type": "^22.1.0", - "jest-jasmine2": "^23.6.0", - "jest-regex-util": "^23.3.0", - "jest-resolve": "^23.6.0", - "jest-util": "^23.4.0", - "jest-validate": "^23.6.0", - "micromatch": "^2.3.11", - "pretty-format": "^23.6.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - } + "jest-environment-jsdom": "^24.5.0", + "jest-environment-node": "^24.5.0", + "jest-get-type": "^24.3.0", + "jest-jasmine2": "^24.5.0", + "jest-regex-util": "^24.3.0", + "jest-resolve": "^24.5.0", + "jest-util": "^24.5.0", + "jest-validate": "^24.5.0", + "micromatch": "^3.1.10", + "pretty-format": "^24.5.0", + "realpath-native": "^1.1.0" } }, "jest-diff": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.6.0.tgz", - "integrity": "sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.5.0.tgz", + "integrity": "sha512-mCILZd9r7zqL9Uh6yNoXjwGQx0/J43OD2vvWVKwOEOLZliQOsojXwqboubAQ+Tszrb6DHGmNU7m4whGeB9YOqw==", "requires": { "chalk": "^2.0.1", - "diff": "^3.2.0", - "jest-get-type": "^22.1.0", - "pretty-format": "^23.6.0" + "diff-sequences": "^24.3.0", + "jest-get-type": "^24.3.0", + "pretty-format": "^24.5.0" } }, "jest-docblock": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.2.0.tgz", - "integrity": "sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c=", + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.3.0.tgz", + "integrity": "sha512-nlANmF9Yq1dufhFlKG9rasfQlrY7wINJbo3q01tu56Jv5eBU5jirylhF2O5ZBnLxzOVBGRDz/9NAwNyBtG4Nyg==", "requires": { "detect-newline": "^2.1.0" } }, "jest-each": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.6.0.tgz", - "integrity": "sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.5.0.tgz", + "integrity": "sha512-6gy3Kh37PwIT5sNvNY2VchtIFOOBh8UCYnBlxXMb5sr5wpJUDPTUATX2Axq1Vfk+HWTMpsYPeVYp4TXx5uqUBw==", "requires": { + "@jest/types": "^24.5.0", "chalk": "^2.0.1", - "pretty-format": "^23.6.0" + "jest-get-type": "^24.3.0", + "jest-util": "^24.5.0", + "pretty-format": "^24.5.0" } }, "jest-environment-jsdom": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz", - "integrity": "sha1-BWp5UrP+pROsYqFAosNox52eYCM=", - "requires": { - "jest-mock": "^23.2.0", - "jest-util": "^23.4.0", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.5.0.tgz", + "integrity": "sha512-62Ih5HbdAWcsqBx2ktUnor/mABBo1U111AvZWcLKeWN/n/gc5ZvDBKe4Og44fQdHKiXClrNGC6G0mBo6wrPeGQ==", + "requires": { + "@jest/environment": "^24.5.0", + "@jest/fake-timers": "^24.5.0", + "@jest/types": "^24.5.0", + "jest-mock": "^24.5.0", + "jest-util": "^24.5.0", "jsdom": "^11.5.1" - }, - "dependencies": { - "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", - "requires": { - "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", - "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", - "domexception": "^1.0.1", - "escodegen": "^1.9.1", - "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", - "pn": "^1.1.0", - "request": "^2.87.0", - "request-promise-native": "^1.0.5", - "sax": "^1.2.4", - "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", - "w3c-hr-time": "^1.0.1", - "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", - "xml-name-validator": "^3.0.0" - } - }, - "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==" - }, - "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, - "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", - "requires": { - "async-limiter": "~1.0.0" - } - } } }, "jest-environment-node": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.4.0.tgz", - "integrity": "sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA=", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.5.0.tgz", + "integrity": "sha512-du6FuyWr/GbKLsmAbzNF9mpr2Iu2zWSaq/BNHzX+vgOcts9f2ayXBweS7RAhr+6bLp6qRpMB6utAMF5Ygktxnw==", "requires": { - "jest-mock": "^23.2.0", - "jest-util": "^23.4.0" + "@jest/environment": "^24.5.0", + "@jest/fake-timers": "^24.5.0", + "@jest/types": "^24.5.0", + "jest-mock": "^24.5.0", + "jest-util": "^24.5.0" } }, "jest-get-type": { - "version": "22.4.3", - "resolved": "http://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", - "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==" + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.3.0.tgz", + "integrity": "sha512-HYF6pry72YUlVcvUx3sEpMRwXEWGEPlJ0bSPVnB3b3n++j4phUEoSPcS6GC0pPJ9rpyPSe4cb5muFo6D39cXow==" }, "jest-haste-map": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.6.0.tgz", - "integrity": "sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg==", - "requires": { - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.1.11", - "invariant": "^2.2.4", - "jest-docblock": "^23.2.0", - "jest-serializer": "^23.0.1", - "jest-worker": "^23.2.0", - "micromatch": "^2.3.11", - "sane": "^2.0.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.5.0.tgz", + "integrity": "sha512-mb4Yrcjw9vBgSvobDwH8QUovxApdimGcOkp+V1ucGGw4Uvr3VzZQBJhNm1UY3dXYm4XXyTW2G7IBEZ9pM2ggRQ==", + "requires": { + "@jest/types": "^24.5.0", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.1.15", + "invariant": "^2.2.4", + "jest-serializer": "^24.4.0", + "jest-util": "^24.5.0", + "jest-worker": "^24.4.0", + "micromatch": "^3.1.10", + "sane": "^4.0.3" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" } } }, "jest-jasmine2": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz", - "integrity": "sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.5.0.tgz", + "integrity": "sha512-sfVrxVcx1rNUbBeyIyhkqZ4q+seNKyAG6iM0S2TYBdQsXjoFDdqWFfsUxb6uXSsbimbXX/NMkJIwUZ1uT9+/Aw==", "requires": { - "babel-traverse": "^6.0.0", + "@babel/traverse": "^7.1.0", + "@jest/environment": "^24.5.0", + "@jest/test-result": "^24.5.0", + "@jest/types": "^24.5.0", "chalk": "^2.0.1", "co": "^4.6.0", - "expect": "^23.6.0", - "is-generator-fn": "^1.0.0", - "jest-diff": "^23.6.0", - "jest-each": "^23.6.0", - "jest-matcher-utils": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-snapshot": "^23.6.0", - "jest-util": "^23.4.0", - "pretty-format": "^23.6.0" + "expect": "^24.5.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^24.5.0", + "jest-matcher-utils": "^24.5.0", + "jest-message-util": "^24.5.0", + "jest-runtime": "^24.5.0", + "jest-snapshot": "^24.5.0", + "jest-util": "^24.5.0", + "pretty-format": "^24.5.0", + "throat": "^4.0.0" } }, "jest-leak-detector": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz", - "integrity": "sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.5.0.tgz", + "integrity": "sha512-LZKBjGovFRx3cRBkqmIg+BZnxbrLqhQl09IziMk3oeh1OV81Hg30RUIx885mq8qBv1PA0comB9bjKcuyNO1bCQ==", "requires": { - "pretty-format": "^23.6.0" + "pretty-format": "^24.5.0" } }, "jest-matcher-utils": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz", - "integrity": "sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.5.0.tgz", + "integrity": "sha512-QM1nmLROjLj8GMGzg5VBra3I9hLpjMPtF1YqzQS3rvWn2ltGZLrGAO1KQ9zUCVi5aCvrkbS5Ndm2evIP9yZg1Q==", "requires": { "chalk": "^2.0.1", - "jest-get-type": "^22.1.0", - "pretty-format": "^23.6.0" + "jest-diff": "^24.5.0", + "jest-get-type": "^24.3.0", + "pretty-format": "^24.5.0" } }, "jest-message-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", - "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.5.0.tgz", + "integrity": "sha512-6ZYgdOojowCGiV0D8WdgctZEAe+EcFU+KrVds+0ZjvpZurUW2/oKJGltJ6FWY2joZwYXN5VL36GPV6pNVRqRnQ==", "requires": { - "@babel/code-frame": "^7.0.0-beta.35", + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.5.0", + "@jest/types": "^24.5.0", + "@types/stack-utils": "^1.0.1", "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", + "micromatch": "^3.1.10", + "slash": "^2.0.0", "stack-utils": "^1.0.1" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - } } }, "jest-mock": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz", - "integrity": "sha1-rRxg8p6HGdR8JuETgJi20YsmETQ=" + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.5.0.tgz", + "integrity": "sha512-ZnAtkWrKf48eERgAOiUxVoFavVBziO2pAi2MfZ1+bGXVkDfxWLxU0//oJBkgwbsv6OAmuLBz4XFFqvCFMqnGUw==", + "requires": { + "@jest/types": "^24.5.0" + } }, "jest-pnp-resolver": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.0.1.tgz", - "integrity": "sha512-kzhvJQp+9k0a/hpvIIzOJgOwfOqmnohdrAMZW2EscH3kxR2VWD7EcPa10cio8EK9V7PcD75bhG1pFnO70zGwSQ==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz", + "integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==" }, "jest-regex-util": { - "version": "23.3.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.3.0.tgz", - "integrity": "sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U=" + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.3.0.tgz", + "integrity": "sha512-tXQR1NEOyGlfylyEjg1ImtScwMq8Oh3iJbGTjN7p0J23EuVX1MA8rwU69K4sLbCmwzgCUbVkm0FkSF9TdzOhtg==" }, "jest-resolve": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.6.0.tgz", - "integrity": "sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.5.0.tgz", + "integrity": "sha512-ZIfGqLX1Rg8xJpQqNjdoO8MuxHV1q/i2OO1hLXjgCWFWs5bsedS8UrOdgjUqqNae6DXA+pCyRmdcB7lQEEbXew==", "requires": { + "@jest/types": "^24.5.0", "browser-resolve": "^1.11.3", "chalk": "^2.0.1", - "realpath-native": "^1.0.0" + "jest-pnp-resolver": "^1.2.1", + "realpath-native": "^1.1.0" } }, "jest-resolve-dependencies": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz", - "integrity": "sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.5.0.tgz", + "integrity": "sha512-dRVM1D+gWrFfrq2vlL5P9P/i8kB4BOYqYf3S7xczZ+A6PC3SgXYSErX/ScW/469pWMboM1uAhgLF+39nXlirCQ==", "requires": { - "jest-regex-util": "^23.3.0", - "jest-snapshot": "^23.6.0" + "@jest/types": "^24.5.0", + "jest-regex-util": "^24.3.0", + "jest-snapshot": "^24.5.0" } }, "jest-runner": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.6.0.tgz", - "integrity": "sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA==", - "requires": { + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.5.0.tgz", + "integrity": "sha512-oqsiS9TkIZV5dVkD+GmbNfWBRPIvxqmlTQ+AQUJUQ07n+4xTSDc40r+aKBynHw9/tLzafC00DIbJjB2cOZdvMA==", + "requires": { + "@jest/console": "^24.3.0", + "@jest/environment": "^24.5.0", + "@jest/test-result": "^24.5.0", + "@jest/types": "^24.5.0", + "chalk": "^2.4.2", "exit": "^0.1.2", - "graceful-fs": "^4.1.11", - "jest-config": "^23.6.0", - "jest-docblock": "^23.2.0", - "jest-haste-map": "^23.6.0", - "jest-jasmine2": "^23.6.0", - "jest-leak-detector": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-runtime": "^23.6.0", - "jest-util": "^23.4.0", - "jest-worker": "^23.2.0", + "graceful-fs": "^4.1.15", + "jest-config": "^24.5.0", + "jest-docblock": "^24.3.0", + "jest-haste-map": "^24.5.0", + "jest-jasmine2": "^24.5.0", + "jest-leak-detector": "^24.5.0", + "jest-message-util": "^24.5.0", + "jest-resolve": "^24.5.0", + "jest-runtime": "^24.5.0", + "jest-util": "^24.5.0", + "jest-worker": "^24.4.0", "source-map-support": "^0.5.6", "throat": "^4.0.0" }, "dependencies": { - "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" } } }, "jest-runtime": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.6.0.tgz", - "integrity": "sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw==", - "requires": { - "babel-core": "^6.0.0", - "babel-plugin-istanbul": "^4.1.6", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.5.0.tgz", + "integrity": "sha512-GTFHzfLdwpaeoDPilNpBrorlPoNZuZrwKKzKJs09vWwHo+9TOsIIuszK8cWOuKC7ss07aN1922Ge8fsGdsqCuw==", + "requires": { + "@jest/console": "^24.3.0", + "@jest/environment": "^24.5.0", + "@jest/source-map": "^24.3.0", + "@jest/transform": "^24.5.0", + "@jest/types": "^24.5.0", + "@types/yargs": "^12.0.2", "chalk": "^2.0.1", - "convert-source-map": "^1.4.0", "exit": "^0.1.2", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.1.11", - "jest-config": "^23.6.0", - "jest-haste-map": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-regex-util": "^23.3.0", - "jest-resolve": "^23.6.0", - "jest-snapshot": "^23.6.0", - "jest-util": "^23.4.0", - "jest-validate": "^23.6.0", - "micromatch": "^2.3.11", - "realpath-native": "^1.0.0", - "slash": "^1.0.0", - "strip-bom": "3.0.0", - "write-file-atomic": "^2.1.0", - "yargs": "^11.0.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "jest-config": "^24.5.0", + "jest-haste-map": "^24.5.0", + "jest-message-util": "^24.5.0", + "jest-mock": "^24.5.0", + "jest-regex-util": "^24.3.0", + "jest-resolve": "^24.5.0", + "jest-snapshot": "^24.5.0", + "jest-util": "^24.5.0", + "jest-validate": "^24.5.0", + "realpath-native": "^1.1.0", + "slash": "^2.0.0", + "strip-bom": "^3.0.0", + "yargs": "^12.0.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yargs": { - "version": "11.1.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", - "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - } - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "requires": { - "camelcase": "^4.1.0" - } } } }, "jest-serializer": { - "version": "23.0.1", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz", - "integrity": "sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU=" + "version": "24.4.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.4.0.tgz", + "integrity": "sha512-k//0DtglVstc1fv+GY/VHDIjrtNjdYvYjMlbLUed4kxrE92sIUewOi5Hj3vrpB8CXfkJntRPDRjCrCvUhBdL8Q==" }, "jest-snapshot": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.6.0.tgz", - "integrity": "sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.5.0.tgz", + "integrity": "sha512-eBEeJb5ROk0NcpodmSKnCVgMOo+Qsu5z9EDl3tGffwPzK1yV37mjGWF2YeIz1NkntgTzP+fUL4s09a0+0dpVWA==", "requires": { - "babel-types": "^6.0.0", + "@babel/types": "^7.0.0", + "@jest/types": "^24.5.0", "chalk": "^2.0.1", - "jest-diff": "^23.6.0", - "jest-matcher-utils": "^23.6.0", - "jest-message-util": "^23.4.0", - "jest-resolve": "^23.6.0", + "expect": "^24.5.0", + "jest-diff": "^24.5.0", + "jest-matcher-utils": "^24.5.0", + "jest-message-util": "^24.5.0", + "jest-resolve": "^24.5.0", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "pretty-format": "^23.6.0", + "pretty-format": "^24.5.0", "semver": "^5.5.0" } }, "jest-util": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", - "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", - "requires": { - "callsites": "^2.0.0", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.5.0.tgz", + "integrity": "sha512-Xy8JsD0jvBz85K7VsTIQDuY44s+hYJyppAhcsHsOsGisVtdhar6fajf2UOf2mEVEgh15ZSdA0zkCuheN8cbr1Q==", + "requires": { + "@jest/console": "^24.3.0", + "@jest/fake-timers": "^24.5.0", + "@jest/source-map": "^24.3.0", + "@jest/test-result": "^24.5.0", + "@jest/types": "^24.5.0", + "@types/node": "*", + "callsites": "^3.0.0", "chalk": "^2.0.1", - "graceful-fs": "^4.1.11", - "is-ci": "^1.0.10", - "jest-message-util": "^23.4.0", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", "mkdirp": "^0.5.1", - "slash": "^1.0.0", + "slash": "^2.0.0", "source-map": "^0.6.0" }, "dependencies": { "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==" + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" } } }, "jest-validate": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz", - "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.5.0.tgz", + "integrity": "sha512-gg0dYszxjgK2o11unSIJhkOFZqNRQbWOAB2/LOUdsd2LfD9oXiMeuee8XsT0iRy5EvSccBgB4h/9HRbIo3MHgQ==", "requires": { + "@jest/types": "^24.5.0", + "camelcase": "^5.0.0", "chalk": "^2.0.1", - "jest-get-type": "^22.1.0", + "jest-get-type": "^24.3.0", "leven": "^2.1.0", - "pretty-format": "^23.6.0" + "pretty-format": "^24.5.0" + }, + "dependencies": { + "camelcase": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", + "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==" + } } }, "jest-watcher": { - "version": "23.4.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.4.0.tgz", - "integrity": "sha1-0uKM50+NrWxq/JIrksq+9u0FyRw=", - "requires": { + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.5.0.tgz", + "integrity": "sha512-/hCpgR6bg0nKvD3nv4KasdTxuhwfViVMHUATJlnGCD0r1QrmIssimPbmc5KfAQblAVxkD8xrzuij9vfPUk1/rA==", + "requires": { + "@jest/test-result": "^24.5.0", + "@jest/types": "^24.5.0", + "@types/node": "*", + "@types/yargs": "^12.0.9", "ansi-escapes": "^3.0.0", "chalk": "^2.0.1", + "jest-util": "^24.5.0", "string-length": "^2.0.0" } }, "jest-worker": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz", - "integrity": "sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk=", + "version": "24.4.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.4.0.tgz", + "integrity": "sha512-BH9X/klG9vxwoO99ZBUbZFfV8qO0XNZ5SIiCyYK2zOuJBl6YJVAeNIQjcoOVNu4HGEHeYEKsUWws8kSlSbZ9YQ==", "requires": { - "merge-stream": "^1.0.1" + "@types/node": "*", + "merge-stream": "^1.0.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "requires": { + "has-flag": "^3.0.0" + } + } } }, "joi": { - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-11.4.0.tgz", - "integrity": "sha512-O7Uw+w/zEWgbL6OcHbyACKSj0PkQeUgmehdoXVSxt92QFCq4+1390Rwh5moI2K/OgC7D8RHRZqHZxT2husMJHA==", + "version": "14.3.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-14.3.1.tgz", + "integrity": "sha512-LQDdM+pkOrpAn4Lp+neNIFV3axv1Vna3j38bisbQhETPMANYRbFJFUyOZcOClYvM/hppMhGWuKSFEK9vjrB+bQ==", "requires": { - "hoek": "4.x.x", + "hoek": "6.x.x", "isemail": "3.x.x", - "topo": "2.x.x" + "topo": "3.x.x" } }, "js-base64": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", - "integrity": "sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.0.tgz", + "integrity": "sha512-wlEBIZ5LP8usDylWbDNhKPEFVFdI5hCHpnVoT/Ysvoi/PRhJENm/Rlh9TvjYB38HFfKZN7OzEbRjmjvLkFw11g==" }, "js-levenshtein": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.4.tgz", - "integrity": "sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow==" + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==" }, "js-tokens": { "version": "4.0.0", @@ -8469,9 +10203,9 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", + "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -8483,42 +10217,47 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsdom": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.0.0.tgz", - "integrity": "sha512-Kmq4ASMNkgpY+YufE322EnIKoiz0UWY2DRkKlU7d5YrIW4xiVRhWFrZV1fr6w/ZNxQ50wGAH5gGRzydgnmkkvw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", + "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", "requires": { "abab": "^2.0.0", - "acorn": "^6.0.2", - "acorn-globals": "^4.3.0", + "acorn": "^5.5.3", + "acorn-globals": "^4.1.0", "array-equal": "^1.0.0", - "cssom": "^0.3.4", - "cssstyle": "^1.1.1", - "data-urls": "^1.0.1", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": "^1.0.0", + "data-urls": "^1.0.0", "domexception": "^1.0.1", - "escodegen": "^1.11.0", + "escodegen": "^1.9.1", "html-encoding-sniffer": "^1.0.2", - "nwsapi": "^2.0.9", - "parse5": "5.1.0", + "left-pad": "^1.3.0", + "nwsapi": "^2.0.7", + "parse5": "4.0.0", "pn": "^1.1.0", - "request": "^2.88.0", + "request": "^2.87.0", "request-promise-native": "^1.0.5", - "saxes": "^3.1.3", + "sax": "^1.2.4", "symbol-tree": "^3.2.2", - "tough-cookie": "^2.4.3", + "tough-cookie": "^2.3.4", "w3c-hr-time": "^1.0.1", - "w3c-xmlserializer": "^1.0.0", "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.2.0", - "whatwg-url": "^7.0.0", - "ws": "^6.1.0", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.1", + "ws": "^5.2.0", "xml-name-validator": "^3.0.0" }, "dependencies": { "acorn": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", - "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==" + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==" + }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==" } } }, @@ -8614,9 +10353,9 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, "kleur": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz", - "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.2.tgz", + "integrity": "sha512-3h7B2WRT5LNXOtQiAaWonilegHcPSf9nLVXlSTci8lu1dZUuui61+EsPEZqSVxY7rXYmB2DVKMQILxaO5WL61Q==" }, "last-call-webpack-plugin": { "version": "3.0.0", @@ -8636,7 +10375,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, "requires": { "invert-kv": "^2.0.0" } @@ -8705,57 +10443,21 @@ "mkdirp": "^0.5.1", "pkg-dir": "^1.0.0" } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", - "requires": { - "find-up": "^1.0.0" - } } } }, "loader-runner": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.1.tgz", - "integrity": "sha512-By6ZFY7ETWOc9RFaAIb23IjJVcM4dvJC/N57nmdz9RSkMXvAXGI7SyVlAw3v8vjtDRlqThgVDVmTnr9fqMlxkw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", "dev": true }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "requires": { - "p-locate": "^2.0.0", + "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, @@ -8774,12 +10476,6 @@ "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -8788,8 +10484,7 @@ "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, "lodash.escape": { "version": "4.0.1", @@ -8916,11 +10611,16 @@ "tmpl": "1.0.x" } }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, "map-age-cleaner": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz", - "integrity": "sha512-UN1dNocxQq44IhJyMI4TU8phc2m9BddacHRPRjKGLYaF0jqd3xLz0jS0skpAU9WgYyoR4gHtUpzytNBS385FWQ==", - "dev": true, + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", "requires": { "p-defer": "^1.0.0" } @@ -8943,11 +10643,6 @@ "object-visit": "^1.0.0" } }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=" - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -8974,14 +10669,13 @@ }, "media-typer": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "mem": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", - "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^1.0.0", @@ -9059,11 +10753,6 @@ } } }, - "merge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==" - }, "merge-deep": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.2.tgz", @@ -9104,7 +10793,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -9167,9 +10856,9 @@ } }, "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", + "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==" }, "mime-db": { "version": "1.36.0", @@ -9190,24 +10879,42 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, "mini-css-extract-plugin": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.3.tgz", - "integrity": "sha512-Mxs0nxzF1kxPv4TRi2NimewgXlJqh0rGE30vviCU2WHrpbta6wklnUV9dr9FUtoAHmB3p3LeXEC+ZjgHvB0Dzg==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz", + "integrity": "sha512-IuaLjruM0vMKhUUT51fQdQzBYTX49dLj8w68ALEAe2A4iYNpIC4eMac67mt3NzycvjOlf07/kYxJDc0RTl1Wqw==", "requires": { "loader-utils": "^1.1.0", "schema-utils": "^1.0.0", "webpack-sources": "^1.1.0" }, "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "requires": { - "big.js": "^3.1.3", + "big.js": "^5.2.2", "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "json5": "^1.0.1" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, @@ -9261,16 +10968,14 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.1.tgz", "integrity": "sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg==", - "optional": true, "requires": { "minipass": "^2.2.1" } }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "dev": true, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", "requires": { "concat-stream": "^1.5.0", "duplexify": "^3.4.2", @@ -9278,7 +10983,7 @@ "flush-write-stream": "^1.0.0", "from2": "^2.1.0", "parallel-transform": "^1.1.0", - "pump": "^2.0.1", + "pump": "^3.0.0", "pumpify": "^1.3.3", "stream-each": "^1.1.0", "through2": "^2.0.0" @@ -9328,9 +11033,17 @@ } }, "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, + "moment-timezone": { + "version": "0.5.23", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.23.tgz", + "integrity": "sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w==", + "requires": { + "moment": ">= 2.9.0" + } }, "moo": { "version": "0.4.3", @@ -9405,22 +11118,28 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, "nearley": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.15.1.tgz", - "integrity": "sha512-8IUY/rUrKz2mIynUGh8k+tul1awMKEjeHHC5G3FHvvyAW6oq4mQfNp2c0BMea+sYZJvYcrrM6GmZVIle/GRXGw==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.16.0.tgz", + "integrity": "sha512-Tr9XD3Vt/EujXbZBv6UAHYoLUSMQAxSsTnm9K3koXzjzNWY195NqALeyrzLZBKzAkL3gl92BcSogqrHjD8QuUg==", "requires": { + "commander": "^2.19.0", "moo": "^0.4.3", - "nomnom": "~1.6.2", "railroad-diagrams": "^1.0.0", "randexp": "0.4.6", "semver": "^5.4.1" + }, + "dependencies": { + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" + } } }, "needle": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.4.tgz", "integrity": "sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA==", - "optional": true, "requires": { "debug": "^2.1.2", "iconv-lite": "^0.4.4", @@ -9476,6 +11195,15 @@ } } }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, "node-forge": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", @@ -9514,9 +11242,9 @@ "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=" }, "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", + "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", "dev": true, "requires": { "assert": "^1.1.1", @@ -9526,7 +11254,7 @@ "constants-browserify": "^1.0.0", "crypto-browserify": "^3.11.0", "domain-browser": "^1.1.1", - "events": "^1.0.0", + "events": "^3.0.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", "path-browserify": "0.0.0", @@ -9540,7 +11268,7 @@ "timers-browserify": "^2.0.4", "tty-browserify": "0.0.0", "url": "^0.11.0", - "util": "^0.10.3", + "util": "^0.11.0", "vm-browserify": "0.0.4" }, "dependencies": { @@ -9558,7 +11286,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -9569,12 +11297,23 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -9582,12 +11321,18 @@ } } }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=" + }, "node-notifier": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.3.0.tgz", - "integrity": "sha512-AhENzCSGZnZJgBARsUjnQ7DnZbzyP+HxlVXuD0xqAnvL8q+OqtSX7lGg9e8nHzwXkMMXNdVeqq4E2M3EUAqX6Q==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz", + "integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==", "requires": { "growly": "^1.3.0", + "is-wsl": "^1.1.0", "semver": "^5.5.0", "shellwords": "^0.1.1", "which": "^1.3.0" @@ -9597,7 +11342,6 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==", - "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -9615,7 +11359,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "optional": true, "requires": { "abbrev": "1", "osenv": "^0.1.4" @@ -9624,14 +11367,12 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "optional": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "tar": { "version": "4.4.8", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", - "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", @@ -9645,23 +11386,22 @@ "yallist": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "optional": true + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" } } }, "node-releases": { - "version": "1.0.0-alpha.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.0-alpha.12.tgz", - "integrity": "sha512-VPB4rTPqpVyWKBHbSa4YPFme3+8WHsOSpvbp0Mfj0bWsC8TEjt4HQrLl1hsBDELlp1nB4lflSgSuGTYiuyaP7Q==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.11.tgz", + "integrity": "sha512-8v1j5KfP+s5WOTa1spNUAOfreajQPN12JXbRR0oDE+YrJBQCXBnNqUDj27EKpPLOoSiU3tKi3xGPB+JaOdUEQQ==", "requires": { "semver": "^5.3.0" } }, "node-sass": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.4.tgz", - "integrity": "sha512-MXyurANsUoE4/6KmfMkwGcBzAnJQ5xJBGW7Ei6ea8KnUKuzHr/SguVBIi3uaUAHtZCPUYkvlJ3Ef5T5VAwVpaA==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz", + "integrity": "sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==", "requires": { "async-foreach": "^0.1.3", "chalk": "^1.1.1", @@ -9717,22 +11457,6 @@ } } }, - "nomnom": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.6.2.tgz", - "integrity": "sha1-hKZqJgF0QI/Ft3oY+IjszET7aXE=", - "requires": { - "colors": "0.5.x", - "underscore": "~1.4.4" - }, - "dependencies": { - "colors": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz", - "integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=" - } - } - }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -9773,14 +11497,12 @@ "npm-bundled": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", - "integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==", - "optional": true + "integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==" }, "npm-packlist": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.12.tgz", "integrity": "sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g==", - "optional": true, "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" @@ -9824,9 +11546,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nwsapi": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz", - "integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.1.tgz", + "integrity": "sha512-T5GaA1J/d34AC8mkrFD2O0DR17kwJ702ZOtJOsS8RpbsQZVOC2/xYFb1i/cw+xdM54JIlMuojjDOYct8GIWtwg==" }, "oauth-sign": { "version": "0.9.0", @@ -9867,9 +11589,9 @@ } }, "object-hash": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.0.tgz", - "integrity": "sha512-05KzQ70lSeGSrZJQXE5wNDiTkBJDlUT/myi6RX9dVIvz7a7Qh4oH93BQdiPMn27nldYvVQCKMUaM83AfizZlsQ==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==" }, "object-inspect": { "version": "1.6.0", @@ -9916,6 +11638,17 @@ "has": "^1.0.1" } }, + "object.fromentries": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.0.tgz", + "integrity": "sha512-9iLiI6H083uiqUuvzyY6qrlmc/Gz8hLQFOcb/Ri/0xXFkSNS3ctV+CbE6yM2+AnkYfOB3dGjdzC0wrMLIhQICA==", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.11.0", + "function-bind": "^1.1.1", + "has": "^1.0.1" + } + }, "object.getownpropertydescriptors": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", @@ -9925,15 +11658,6 @@ "es-abstract": "^1.5.1" } }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -9968,9 +11692,9 @@ } }, "on-headers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true }, "once": { @@ -10055,12 +11779,11 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.0.1.tgz", - "integrity": "sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "requires": { - "execa": "^0.10.0", + "execa": "^1.0.0", "lcid": "^2.0.0", "mem": "^4.0.0" } @@ -10082,8 +11805,15 @@ "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + }, + "p-each-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", + "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "requires": { + "p-reduce": "^1.0.0" + } }, "p-finally": { "version": "1.0.0", @@ -10093,23 +11823,22 @@ "p-is-promise": { "version": "1.1.0", "resolved": "http://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", - "dev": true + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "requires": { - "p-try": "^1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.0.0" } }, "p-map": { @@ -10118,15 +11847,20 @@ "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", "dev": true }, - "p-try": { + "p-reduce": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=" + }, + "p-try": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", + "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==" }, "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", "dev": true }, "parallel-transform": { @@ -10146,7 +11880,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -10176,43 +11910,33 @@ "no-case": "^2.2.0" } }, + "parent-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", + "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", + "requires": { + "callsites": "^3.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==" + } + } + }, "parse-asn1": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", "dev": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - } + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, "parse-json": { @@ -10227,7 +11951,8 @@ "parse-passwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true }, "parse5": { "version": "5.1.0", @@ -10343,12 +12068,39 @@ "pinkie": "^2.0.0" } }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "requires": { - "find-up": "^2.1.0" + "find-up": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + } } }, "pkg-up": { @@ -10357,32 +12109,70 @@ "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", "requires": { "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + } } }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" - }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==" }, "pnp-webpack-plugin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.1.0.tgz", - "integrity": "sha512-CPCdcFxx7fEcDMWTDjXe2Wypt4JuMt4q5Q2UrpTcyBBkLiCIyPEh/mCGmUWIcNkKGyXwQ9Y2wVhlKm6ketiBNQ==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.4.1.tgz", + "integrity": "sha512-S4kz+5rvWvD0w1O63eTJeXIxW4JHK0wPRMO7GmPhbZXJnTePcfrWZlni4BoglIf7pLSY18xtqo3MSnVkoAFXKg==", + "requires": { + "ts-pnp": "^1.0.0" + } }, "popper.js": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.4.tgz", - "integrity": "sha1-juwdj/AqWjoVLdQ0FKFce3n9abY=" + "version": "1.14.6", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.6.tgz", + "integrity": "sha512-AGwHGQBKumlk/MDfrSOf0JHhJCImdDMcGNoqKmKkU+68GFazv3CQ6q9r7Ja1sKDZmYWTckY/uLyEznheTDycnA==" }, "portfinder": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.17.tgz", - "integrity": "sha512-syFcRIRzVI1BoEFOCaAiizwDolh1S1YXSodsVhncbhjzjZQulhczNRbqnUl9N31Q4dKGOXsNDqxC2BWBgSMqeQ==", + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", + "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", "dev": true, "requires": { "async": "^1.5.2", @@ -10396,33 +12186,47 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.13.tgz", + "integrity": "sha512-h8SY6kQTd1wISHWjz+E6cswdhMuyBZRb16pSTv3W4zYZ3/YbyWeJdNUeOXB5IdZqE1U76OUEjjjqsC3z2f3hVg==", "requires": { - "chalk": "^2.4.1", + "chalk": "^2.4.2", "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "requires": { + "has-flag": "^3.0.0" + } + } } }, "postcss-attribute-case-insensitive": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.0.tgz", - "integrity": "sha512-K/zqdg0/UgUgC8qR0lDuxYzmowPpnvrrNC5YuoqzhHMubR9AuhsPlpVu3jjkLHgDAzR+ohD/m7//iGnN9WxbzQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.1.tgz", + "integrity": "sha512-L2YKB3vF4PetdTIthQVeT+7YiSzMoNMLLYxPXXppOOP7NoazEAy45sh2LvJ8leCQjfBcfkYQs8TtCcQjeZTp8A==", "requires": { "postcss": "^7.0.2", - "postcss-selector-parser": "^5.0.0-rc.3" + "postcss-selector-parser": "^5.0.0" }, "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", + "cssesc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", + "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==" + }, + "postcss-selector-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", + "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" + "cssesc": "^2.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" } } } @@ -10438,16 +12242,6 @@ "postcss-value-parser": "^3.3.1" }, "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - }, "postcss-value-parser": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", @@ -10462,18 +12256,16 @@ "requires": { "postcss": "^7.0.2", "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } + } + }, + "postcss-color-gray": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-gray/-/postcss-color-gray-5.0.0.tgz", + "integrity": "sha512-q6BuRnAGKM/ZRpfDascZlIZPjvwsRye7UDNalqVz3s7GDxMtqPY6+Q871liNxsonUw8oC61OG+PSaysYpl1bnw==", + "requires": { + "@csstools/convert-colors": "^1.4.0", + "postcss": "^7.0.5", + "postcss-values-parser": "^2.0.0" } }, "postcss-color-hex-alpha": { @@ -10483,40 +12275,16 @@ "requires": { "postcss": "^7.0.2", "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-color-mod-function": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/postcss-color-mod-function/-/postcss-color-mod-function-3.0.3.tgz", - "integrity": "sha512-YP4VG+xufxaVtzV6ZmhEtc+/aTXH3d0JLpnYfxqTvwZPbJhWqp8bSY3nfNzNRFLgB4XSaBA82OE4VjOOKpCdVQ==", - "requires": { - "@csstools/convert-colors": "^1.4.0", - "postcss": "^7.0.2", - "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/postcss-color-mod-function/-/postcss-color-mod-function-3.0.3.tgz", + "integrity": "sha512-YP4VG+xufxaVtzV6ZmhEtc+/aTXH3d0JLpnYfxqTvwZPbJhWqp8bSY3nfNzNRFLgB4XSaBA82OE4VjOOKpCdVQ==", + "requires": { + "@csstools/convert-colors": "^1.4.0", + "postcss": "^7.0.2", + "postcss-values-parser": "^2.0.0" } }, "postcss-color-rebeccapurple": { @@ -10526,42 +12294,18 @@ "requires": { "postcss": "^7.0.2", "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-colormin": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.2.tgz", - "integrity": "sha512-1QJc2coIehnVFsz0otges8kQLsryi4lo19WD+U5xCWvXd0uw/Z+KKYnbiNDCnO9GP+PvErPHCG0jNvWTngk9Rw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", + "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", "requires": { "browserslist": "^4.0.0", "color": "^3.0.0", "has": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-convert-values": { @@ -10571,18 +12315,6 @@ "requires": { "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-custom-media": { @@ -10591,39 +12323,15 @@ "integrity": "sha512-bWPCdZKdH60wKOTG4HKEgxWnZVjAIVNOJDvi3lkuTa90xo/K0YHa2ZnlKLC5e2qF8qCcMQXt0yzQITBp8d0OFA==", "requires": { "postcss": "^7.0.5" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-custom-properties": { - "version": "8.0.8", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-8.0.8.tgz", - "integrity": "sha512-G3U8uSxj0B4jPJ1QBF5WYeW716n5HV/wcH2lOTV1V+EI+F0T0/ZOhl32MLLTMD79bN2mE77IOoclbCoLl4QtPA==", + "version": "8.0.9", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-8.0.9.tgz", + "integrity": "sha512-/Lbn5GP2JkKhgUO2elMs4NnbUJcvHX4AaF5nuJDaNkd2chYW1KA5qtOGGgdkBEWcXtKSQfHXzT7C6grEVyb13w==", "requires": { "postcss": "^7.0.5", "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-custom-selectors": { @@ -10633,18 +12341,6 @@ "requires": { "postcss": "^7.0.2", "postcss-selector-parser": "^5.0.0-rc.3" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-dir-pseudo-class": { @@ -10654,38 +12350,14 @@ "requires": { "postcss": "^7.0.2", "postcss-selector-parser": "^5.0.0-rc.3" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-discard-comments": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.1.tgz", - "integrity": "sha512-Ay+rZu1Sz6g8IdzRjUgG2NafSNpp2MSMOQUb+9kkzzzP+kh07fP0yNbhtFejURnyVXSX3FYy2nVNW1QTnNjgBQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", + "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", "requires": { "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-discard-duplicates": { @@ -10694,18 +12366,6 @@ "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", "requires": { "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-discard-empty": { @@ -10714,18 +12374,6 @@ "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", "requires": { "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-discard-overridden": { @@ -10734,18 +12382,15 @@ "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", "requires": { "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } + } + }, + "postcss-double-position-gradients": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-1.0.0.tgz", + "integrity": "sha512-G+nV8EnQq25fOI8CH/B6krEohGWnF5+3A6H/+JEpOncu5dCnkS1QQ6+ct3Jkaepw1NGVqqOZH6lqrm244mCftA==", + "requires": { + "postcss": "^7.0.5", + "postcss-values-parser": "^2.0.0" } }, "postcss-env-function": { @@ -10755,18 +12400,6 @@ "requires": { "postcss": "^7.0.2", "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-flexbugs-fixes": { @@ -10795,18 +12428,6 @@ "integrity": "sha512-Z5CkWBw0+idJHSV6+Bgf2peDOFf/x4o+vX/pwcNYrWpXFrSfTkQ3JQ1ojrq9yS+upnAlNRHeg8uEwFTgorjI8g==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-focus-within": { @@ -10815,18 +12436,6 @@ "integrity": "sha512-W0APui8jQeBKbCGZudW37EeMCjDeVxKgiYfIIEo8Bdh5SpB9sxds/Iq8SEuzS0Q4YFOlG7EPFulbbxujpkrV2w==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-font-variant": { @@ -10835,18 +12444,6 @@ "integrity": "sha512-M8BFYKOvCrI2aITzDad7kWuXXTm0YhGdP9Q8HanmN4EF1Hmcgs1KK5rSHylt/lUJe8yLxiSwWAHdScoEiIxztg==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-gap-properties": { @@ -10855,18 +12452,6 @@ "integrity": "sha512-QZSqDaMgXCHuHTEzMsS2KfVDOq7ZFiknSpkrPJY6jmxbugUPTuSzs/vuE5I3zv0WAS+3vhrlqhijiprnuQfzmg==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-image-set-function": { @@ -10876,18 +12461,6 @@ "requires": { "postcss": "^7.0.2", "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-initial": { @@ -10896,41 +12469,17 @@ "integrity": "sha512-WzrqZ5nG9R9fUtrA+we92R4jhVvEB32IIRTzfIG/PLL8UV4CvbF1ugTEHEFX6vWxl41Xt5RTCJPEZkuWzrOM+Q==", "requires": { "lodash.template": "^4.2.4", - "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } - } - }, - "postcss-lab-function": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-2.0.1.tgz", - "integrity": "sha512-whLy1IeZKY+3fYdqQFuDBf8Auw+qFuVnChWjmxm/UhHWqNHZx+B99EwxTvGYmUBqe3Fjxs4L1BoZTJmPu6usVg==", - "requires": { - "@csstools/convert-colors": "^1.4.0", - "postcss": "^7.0.2", - "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } + "postcss": "^7.0.2" + } + }, + "postcss-lab-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-2.0.1.tgz", + "integrity": "sha512-whLy1IeZKY+3fYdqQFuDBf8Auw+qFuVnChWjmxm/UhHWqNHZx+B99EwxTvGYmUBqe3Fjxs4L1BoZTJmPu6usVg==", + "requires": { + "@csstools/convert-colors": "^1.4.0", + "postcss": "^7.0.2", + "postcss-values-parser": "^2.0.0" } }, "postcss-load-config": { @@ -10994,18 +12543,6 @@ "integrity": "sha512-1SUKdJc2vuMOmeItqGuNaC+N8MzBWFWEkAnRnLpFYj1tGGa7NqyVBujfRtgNa2gXR+6RkGUiB2O5Vmh7E2RmiA==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-media-minmax": { @@ -11014,47 +12551,23 @@ "integrity": "sha512-fo9moya6qyxsjbFAYl97qKO9gyre3qvbMnkOZeZwlsW6XYFsvs2DMGDlchVLfAd8LHPZDxivu/+qW2SMQeTHBw==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-merge-longhand": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.9.tgz", - "integrity": "sha512-UVMXrXF5K/kIwUbK/crPFCytpWbNX2Q3dZSc8+nQUgfOHrCT4+MHncpdxVphUlQeZxlLXUJbDyXc5NBhTnS2tA==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", + "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", "requires": { "css-color-names": "0.0.4", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0", "stylehacks": "^4.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-merge-rules": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.2.tgz", - "integrity": "sha512-UiuXwCCJtQy9tAIxsnurfF0mrNHKc4NnNx6NxqmzNNjXpQwLSukUxELHTRF0Rg1pAmcoKLih8PwvZbiordchag==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", + "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", "requires": { "browserslist": "^4.0.0", "caniuse-api": "^3.0.0", @@ -11064,16 +12577,6 @@ "vendors": "^1.0.0" }, "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - }, "postcss-selector-parser": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", @@ -11093,47 +12596,23 @@ "requires": { "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-minify-gradients": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.1.tgz", - "integrity": "sha512-pySEW3E6Ly5mHm18rekbWiAjVi/Wj8KKt2vwSfVFAWdW6wOIekgqxKxLU7vJfb107o3FDNPkaYFCxGAJBFyogA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", + "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", "requires": { "cssnano-util-get-arguments": "^4.0.0", "is-color-stop": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-minify-params": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.1.tgz", - "integrity": "sha512-h4W0FEMEzBLxpxIVelRtMheskOKKp52ND6rJv+nBS33G1twu2tCyurYj/YtgU76+UDCvWeNs0hs8HFAWE2OUFg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", + "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", "requires": { "alphanum-sort": "^1.0.0", "browserslist": "^4.0.0", @@ -11141,24 +12620,12 @@ "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0", "uniqs": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-minify-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.1.tgz", - "integrity": "sha512-8+plQkomve3G+CodLCgbhAKrb5lekAnLYuL1d7Nz+/7RANpBEVdgBkPNwljfSKvZ9xkkZTZITd04KP+zeJTJqg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", + "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", "requires": { "alphanum-sort": "^1.0.0", "has": "^1.0.0", @@ -11166,16 +12633,6 @@ "postcss-selector-parser": "^3.0.0" }, "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - }, "postcss-selector-parser": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", @@ -11189,42 +12646,75 @@ } }, "postcss-modules-extract-imports": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz", - "integrity": "sha1-ZhQOzs447wa/DT41XWm/WdFB6oU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", + "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", "dev": true, "requires": { - "postcss": "^6.0.1" + "postcss": "^7.0.5" } }, "postcss-modules-local-by-default": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", - "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz", + "integrity": "sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA==", "dev": true, "requires": { - "css-selector-tokenizer": "^0.7.0", - "postcss": "^6.0.1" + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0", + "postcss-value-parser": "^3.3.1" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } } }, "postcss-modules-scope": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", - "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.1.0.tgz", + "integrity": "sha512-91Rjps0JnmtUB0cujlc8KIKCsJXWjzuxGeT/+Q2i2HXKZ7nBUeF9YQTZZTNvHVoNYj1AthsjnGLtqDUE0Op79A==", "dev": true, "requires": { - "css-selector-tokenizer": "^0.7.0", - "postcss": "^6.0.1" + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } } }, "postcss-modules-values": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", - "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz", + "integrity": "sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w==", "dev": true, "requires": { "icss-replace-symbols": "^1.1.0", - "postcss": "^6.0.1" + "postcss": "^7.0.6" } }, "postcss-nesting": { @@ -11233,18 +12723,6 @@ "integrity": "sha512-WSsbVd5Ampi3Y0nk/SKr5+K34n52PqMqEfswu6RtU4r7wA8vSD+gM8/D9qq4aJkHImwn1+9iEFTbjoWsQeqtaQ==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-normalize-charset": { @@ -11253,152 +12731,68 @@ "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", "requires": { "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-normalize-display-values": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.1.tgz", - "integrity": "sha512-R5mC4vaDdvsrku96yXP7zak+O3Mm9Y8IslUobk7IMP+u/g+lXvcN4jngmHY5zeJnrQvE13dfAg5ViU05ZFDwdg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", + "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", "requires": { "cssnano-util-get-match": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-normalize-positions": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.1.tgz", - "integrity": "sha512-GNoOaLRBM0gvH+ZRb2vKCIujzz4aclli64MBwDuYGU2EY53LwiP7MxOZGE46UGtotrSnmarPPZ69l2S/uxdaWA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", + "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", "requires": { "cssnano-util-get-arguments": "^4.0.0", "has": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-normalize-repeat-style": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.1.tgz", - "integrity": "sha512-fFHPGIjBUyUiswY2rd9rsFcC0t3oRta4wxE1h3lpwfQZwFeFjXFSiDtdJ7APCmHQOnUZnqYBADNRPKPwFAONgA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", + "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", "requires": { "cssnano-util-get-arguments": "^4.0.0", "cssnano-util-get-match": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-normalize-string": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.1.tgz", - "integrity": "sha512-IJoexFTkAvAq5UZVxWXAGE0yLoNN/012v7TQh5nDo6imZJl2Fwgbhy3J2qnIoaDBrtUP0H7JrXlX1jjn2YcvCQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", + "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", "requires": { "has": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-normalize-timing-functions": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.1.tgz", - "integrity": "sha512-1nOtk7ze36+63ONWD8RCaRDYsnzorrj+Q6fxkQV+mlY5+471Qx9kspqv0O/qQNMeApg8KNrRf496zHwJ3tBZ7w==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", + "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", "requires": { "cssnano-util-get-match": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-normalize-unicode": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" } }, "postcss-normalize-url": { @@ -11410,61 +12804,25 @@ "normalize-url": "^3.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-normalize-whitespace": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.1.tgz", - "integrity": "sha512-U8MBODMB2L+nStzOk6VvWWjZgi5kQNShCyjRhMT3s+W9Jw93yIjOnrEkKYD3Ul7ChWbEcjDWmXq0qOL9MIAnAw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", + "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", "requires": { "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-ordered-values": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.1.tgz", - "integrity": "sha512-PeJiLgJWPzkVF8JuKSBcylaU+hDJ/TX3zqAMIjlghgn1JBi6QwQaDZoDIlqWRcCAI8SxKrt3FCPSRmOgKRB97Q==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", + "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", "requires": { "cssnano-util-get-arguments": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-overflow-shorthand": { @@ -11473,18 +12831,6 @@ "integrity": "sha512-aK0fHc9CBNx8jbzMYhshZcEv8LtYnBIRYQD5i7w/K/wS9c2+0NSR6B3OVMu5y0hBHYLcMGjfU+dmWYNKH0I85g==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-page-break": { @@ -11493,18 +12839,6 @@ "integrity": "sha512-tkpTSrLpfLfD9HvgOlJuigLuk39wVTbbd8RKcy8/ugV2bNBUW3xU+AIqyxhDrQr1VUj1RmyJrBn1YWrqUm9zAQ==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-place": { @@ -11514,39 +12848,32 @@ "requires": { "postcss": "^7.0.2", "postcss-values-parser": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-preset-env": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.0.6.tgz", - "integrity": "sha512-W1Wtqngl7BMe4s9o76odTaVs4HXVLhOHD+L5Ez+7x15yiA+98W/WVO6IPlC1q9BIkgAckRtUFmEDr0sNufXZIQ==", - "requires": { - "autoprefixer": "^9.1.5", - "browserslist": "^4.1.1", - "caniuse-lite": "^1.0.30000887", - "cssdb": "^3.2.1", - "postcss": "^7.0.2", - "postcss-attribute-case-insensitive": "^4.0.0", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.6.0.tgz", + "integrity": "sha512-I3zAiycfqXpPIFD6HXhLfWXIewAWO8emOKz+QSsxaUZb9Dp8HbF5kUf+4Wy/AxR33o+LRoO8blEWCHth0ZsCLA==", + "requires": { + "autoprefixer": "^9.4.9", + "browserslist": "^4.4.2", + "caniuse-lite": "^1.0.30000939", + "css-blank-pseudo": "^0.1.4", + "css-has-pseudo": "^0.10.0", + "css-prefers-color-scheme": "^3.1.1", + "cssdb": "^4.3.0", + "postcss": "^7.0.14", + "postcss-attribute-case-insensitive": "^4.0.1", "postcss-color-functional-notation": "^2.0.1", + "postcss-color-gray": "^5.0.0", "postcss-color-hex-alpha": "^5.0.2", "postcss-color-mod-function": "^3.0.3", "postcss-color-rebeccapurple": "^4.0.1", - "postcss-custom-media": "^7.0.4", - "postcss-custom-properties": "^8.0.5", + "postcss-custom-media": "^7.0.7", + "postcss-custom-properties": "^8.0.9", "postcss-custom-selectors": "^5.1.2", "postcss-dir-pseudo-class": "^5.0.0", + "postcss-double-position-gradients": "^1.0.0", "postcss-env-function": "^2.0.2", "postcss-focus-visible": "^4.0.0", "postcss-focus-within": "^3.0.0", @@ -11567,14 +12894,50 @@ "postcss-selector-not": "^4.0.0" }, "dependencies": { + "browserslist": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.2.tgz", + "integrity": "sha512-zmJVLiKLrzko0iszd/V4SsjTaomFeoVzQGYYOYgRgsbh7WNh95RgDB0CmBdFWYs/3MyFSt69NypjL/h3iaddKQ==", + "requires": { + "caniuse-lite": "^1.0.30000951", + "electron-to-chromium": "^1.3.116", + "node-releases": "^1.1.11" + } + }, + "caniuse-lite": { + "version": "1.0.30000951", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000951.tgz", + "integrity": "sha512-eRhP+nQ6YUkIcNQ6hnvdhMkdc7n3zadog0KXNRxAZTT2kHjUb1yGn71OrPhSn8MOvlX97g5CR97kGVj8fMsXWg==" + }, + "electron-to-chromium": { + "version": "1.3.119", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.119.tgz", + "integrity": "sha512-3mtqcAWa4HgG+Djh/oNXlPH0cOH6MmtwxN1nHSaReb9P0Vn51qYPqYwLeoSuAX9loU1wrOBhFbiX3CkeIxPfgg==" + }, + "node-releases": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.11.tgz", + "integrity": "sha512-8v1j5KfP+s5WOTa1spNUAOfreajQPN12JXbRR0oDE+YrJBQCXBnNqUDj27EKpPLOoSiU3tKi3xGPB+JaOdUEQQ==", + "requires": { + "semver": "^5.3.0" + } + }, "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", + "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", "requires": { - "chalk": "^2.4.1", + "chalk": "^2.4.2", "source-map": "^0.6.1", - "supports-color": "^5.5.0" + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "requires": { + "has-flag": "^3.0.0" } } } @@ -11586,64 +12949,28 @@ "requires": { "postcss": "^7.0.2", "postcss-selector-parser": "^5.0.0-rc.3" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-reduce-initial": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.2.tgz", - "integrity": "sha512-epUiC39NonKUKG+P3eAOKKZtm5OtAtQJL7Ye0CBN1f+UQTHzqotudp+hki7zxXm7tT0ZAKDMBj1uihpPjP25ug==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", + "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", "requires": { "browserslist": "^4.0.0", "caniuse-api": "^3.0.0", "has": "^1.0.0", "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-reduce-transforms": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.1.tgz", - "integrity": "sha512-sZVr3QlGs0pjh6JAIe6DzWvBaqYw05V1t3d9Tp+VnFRT5j+rsqoWsysh/iSD7YNsULjq9IAylCznIwVd5oU/zA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", + "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", "requires": { "cssnano-util-get-match": "^4.0.0", "has": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-replace-overflow-wrap": { @@ -11652,18 +12979,6 @@ "integrity": "sha512-2T5hcEHArDT6X9+9dVSPQdo7QHzG4XKclFT8rU5TzJPDN7RIRTbO9c4drUISOVemLj03aezStHCR2AIcr8XLpw==", "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-safe-parser": { @@ -11693,18 +13008,6 @@ "requires": { "balanced-match": "^1.0.0", "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-selector-not": { @@ -11714,18 +13017,6 @@ "requires": { "balanced-match": "^1.0.0", "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-selector-parser": { @@ -11738,6 +13029,10 @@ "uniq": "^1.0.1" }, "dependencies": { + "@babel/generator": {}, + "@babel/template": {}, + "@babel/traverse": {}, + "babel-eslint": {}, "cssesc": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", @@ -11746,26 +13041,14 @@ } }, "postcss-svgo": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.1.tgz", - "integrity": "sha512-YD5uIk5NDRySy0hcI+ZJHwqemv2WiqqzDgtvgMzO8EGSkK5aONyX8HMVFRFJSdO8wUWTuisUFn/d7yRRbBr5Qw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz", + "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==", "requires": { "is-svg": "^3.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0", "svgo": "^1.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-unique-selectors": { @@ -11776,18 +13059,6 @@ "alphanum-sort": "^1.0.0", "postcss": "^7.0.0", "uniqs": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - } } }, "postcss-value-parser": { @@ -11796,9 +13067,9 @@ "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" }, "postcss-values-parser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.0.tgz", - "integrity": "sha512-cyRdkgbRRefu91ByAlJow4y9w/hnBmmWgLpWmlFQ2bpIy2eKrqowt3VeYcaHQ08otVXmC9V2JtYW1Z/RpvYR8A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz", + "integrity": "sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg==", "requires": { "flatten": "^1.0.2", "indexes-of": "^1.0.1", @@ -11810,20 +13081,25 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" - }, "prettier": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.3.tgz", - "integrity": "sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg==" + "version": "1.16.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz", + "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } }, "pretty-bytes": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", - "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.1.0.tgz", + "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==" }, "pretty-error": { "version": "2.1.1", @@ -11835,18 +13111,20 @@ } }, "pretty-format": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz", - "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==", + "version": "24.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.5.0.tgz", + "integrity": "sha512-/3RuSghukCf8Riu5Ncve0iI+BzVkbRU5EeUoArKARZobREycuH5O4waxvaNIloEXdb0qwgmEAed5vTpX1HNROQ==", "requires": { - "ansi-regex": "^3.0.0", - "ansi-styles": "^3.2.0" + "@jest/types": "^24.5.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" } } }, @@ -11867,9 +13145,9 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", - "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "promise": { "version": "8.0.2", @@ -11885,21 +13163,30 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" }, "prompts": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz", - "integrity": "sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.0.4.tgz", + "integrity": "sha512-HTzM3UWp/99A0gk51gAegwo1QRYA7xjcZufMNe33rCclFszUYAuHe1fIN/3ZmiHeGPkUsNaRyQm1hHOfM0PKxA==", "requires": { - "kleur": "^2.0.1", - "sisteransi": "^0.1.1" + "kleur": "^3.0.2", + "sisteransi": "^1.0.0" } }, "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "property-information": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.0.1.tgz", + "integrity": "sha512-nAtBDVeSwFM3Ot/YxT7s4NqZmqXI7lLzf46BThvotEtYf2uk2yH0ACYuWQkJ7gxKs49PPtKVY0UlDGkyN9aJlw==", + "requires": { + "xtend": "^4.0.1" } }, "proxy-addr": { @@ -11949,9 +13236,9 @@ } }, "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -11965,6 +13252,17 @@ "duplexify": "^3.6.0", "inherits": "^2.0.3", "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } } }, "punycode": { @@ -11978,9 +13276,9 @@ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "querystring": { "version": "0.2.0", @@ -11995,9 +13293,9 @@ "dev": true }, "querystringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", - "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz", + "integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==" }, "raf": { "version": "3.4.1", @@ -12017,31 +13315,14 @@ "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", "requires": { - "discontinuous-range": "1.0.0", - "ret": "~0.1.10" - } - }, - "randomatic": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" - } + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" } }, "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -12063,36 +13344,23 @@ "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" }, "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", "requires": { "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", "unpipe": "1.0.0" }, "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": ">= 1.3.1 < 2" + "safer-buffer": ">= 2.1.2 < 3" } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" } } }, @@ -12100,7 +13368,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -12111,41 +13378,49 @@ "minimist": { "version": "1.2.0", "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "optional": true + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, "react": { - "version": "16.5.2", - "resolved": "https://registry.npmjs.org/react/-/react-16.5.2.tgz", - "integrity": "sha512-FDCSVd3DjVTmbEAjUNX6FgfAmQ+ypJfHUsqUJOYNCBUp1h8lqmtC+0mXJ+JjsWx4KAVTkk1vKd1hLQPvEviSuw==", + "version": "16.8.4", + "resolved": "https://registry.npmjs.org/react/-/react-16.8.4.tgz", + "integrity": "sha512-0GQ6gFXfUH7aZcjGVymlPOASTuSjlQL4ZtVC5YKH+3JL6bBLCVO21DknzmaPlI90LN253ojj02nsapy+j7wIjg==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "schedule": "^0.5.0" + "scheduler": "^0.13.4" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, "react-app-polyfill": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-0.1.3.tgz", - "integrity": "sha512-Fl5Pic4F15G05qX7RmUqPZr1MtyFKJKSlRwMhel4kvDLrk/KcQ9QbpvyMTzv/0NN5957XFQ7r1BNHWi7qN59Pw==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-0.2.2.tgz", + "integrity": "sha512-mAYn96B/nB6kWG87Ry70F4D4rsycU43VYTj3ZCbKP+SLJXwC0x6YCbwcICh3uW8/C9s1VgP197yx+w7SCWeDdQ==", "requires": { - "core-js": "2.5.7", + "core-js": "2.6.4", "object-assign": "4.1.1", "promise": "8.0.2", - "raf": "3.4.0", + "raf": "3.4.1", "whatwg-fetch": "3.0.0" }, "dependencies": { - "raf": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.0.tgz", - "integrity": "sha512-pDP/NMRAXoTfrhCfyfSEwJAKLaxBU9eApMeBPB1TkDouZmvPerIClV8lTAd+uF8ZiTaVl69e1FCxQrAd/VTjGw==", - "requires": { - "performance-now": "^2.1.0" - } + "core-js": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.4.tgz", + "integrity": "sha512-05qQ5hXShcqGkPZpXEFLIpxayZscVD2kuMBZewxiIPPEagukO4mqgPA9CWhUvFBJfy3ODdK2p9xyHh7FTU9/7A==" } } }, @@ -12156,69 +13431,90 @@ "requires": { "lodash": "^4.17.4", "prop-types": "^15.5.8" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, "react-dev-utils": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-6.1.1.tgz", - "integrity": "sha512-ThbJ86coVd6wV/QiTo8klDTvdAJ1WsFCGQN07+UkN+QN9CtCSsl/+YuDJToKGeG8X4j9HMGXNKbk2QhPAZr43w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-8.0.0.tgz", + "integrity": "sha512-TK8cj7eghvxfe7bfBluLGpI/upo4EXC+G74hYmPucAG8C2XcbT+vKnlWPwLnABb75Zk+mR6D556Da+yvDjljrw==", "requires": { "@babel/code-frame": "7.0.0", "address": "1.0.3", - "browserslist": "4.1.1", - "chalk": "2.4.1", + "browserslist": "4.4.1", + "chalk": "2.4.2", "cross-spawn": "6.0.5", "detect-port-alt": "1.1.6", "escape-string-regexp": "1.0.5", "filesize": "3.6.1", "find-up": "3.0.0", - "global-modules": "1.0.0", - "globby": "8.0.1", + "fork-ts-checker-webpack-plugin": "1.0.0-alpha.6", + "global-modules": "2.0.0", + "globby": "8.0.2", "gzip-size": "5.0.0", - "immer": "1.7.2", - "inquirer": "6.2.0", + "immer": "1.10.0", + "inquirer": "6.2.1", "is-root": "2.0.0", - "loader-utils": "1.1.0", + "loader-utils": "1.2.3", "opn": "5.4.0", "pkg-up": "2.0.0", - "react-error-overlay": "^5.1.0", + "react-error-overlay": "^5.1.4", "recursive-readdir": "2.2.2", "shell-quote": "1.6.1", - "sockjs-client": "1.1.5", - "strip-ansi": "4.0.0", + "sockjs-client": "1.3.0", + "strip-ansi": "5.0.0", "text-table": "0.2.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" }, "browserslist": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.1.1.tgz", - "integrity": "sha512-VBorw+tgpOtZ1BYhrVSVTzTt/3+vSE3eFUh0N2GCFK1HffceOaf32YS/bs6WiFhjDAblAFrx85jMy3BG9fBK2Q==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", + "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", "requires": { - "caniuse-lite": "^1.0.30000884", - "electron-to-chromium": "^1.3.62", - "node-releases": "^1.0.0-alpha.11" + "caniuse-lite": "^1.0.30000929", + "electron-to-chromium": "^1.3.103", + "node-releases": "^1.1.3" } }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } + "caniuse-lite": { + "version": "1.0.30000951", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000951.tgz", + "integrity": "sha512-eRhP+nQ6YUkIcNQ6hnvdhMkdc7n3zadog0KXNRxAZTT2kHjUb1yGn71OrPhSn8MOvlX97g5CR97kGVj8fMsXWg==" + }, + "electron-to-chromium": { + "version": "1.3.119", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.119.tgz", + "integrity": "sha512-3mtqcAWa4HgG+Djh/oNXlPH0cOH6MmtwxN1nHSaReb9P0Vn51qYPqYwLeoSuAX9loU1wrOBhFbiX3CkeIxPfgg==" }, + "global-prefix": {}, "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", + "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", "requires": { "array-union": "^1.0.1", - "dir-glob": "^2.0.0", + "dir-glob": "2.0.0", "fast-glob": "^2.0.2", "glob": "^7.1.2", "ignore": "^3.3.5", @@ -12231,76 +13527,104 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "inquirer": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz", + "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.0", + "figures": "^2.0.0", + "lodash": "^4.17.10", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.1.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.0.0", + "through": "^2.3.6" } }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "minimist": "^1.2.0" } }, - "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "requires": { - "p-try": "^2.0.0" + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" } }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "node-releases": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.11.tgz", + "integrity": "sha512-8v1j5KfP+s5WOTa1spNUAOfreajQPN12JXbRR0oDE+YrJBQCXBnNqUDj27EKpPLOoSiU3tKi3xGPB+JaOdUEQQ==", "requires": { - "p-limit": "^2.0.0" + "semver": "^5.3.0" } }, - "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==" + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.0.0" } } } }, "react-dom": { - "version": "16.5.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.5.2.tgz", - "integrity": "sha512-RC8LDw8feuZOHVgzEf7f+cxBr/DnKdqp56VU0lAs1f4UfKc4cU8wU4fTq/mgnvynLQo8OtlPC19NUFh/zjZPuA==", + "version": "16.8.4", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.4.tgz", + "integrity": "sha512-Ob2wK7XG2tUDt7ps7LtLzGYYB6DXMCLj0G5fO6WeEICtT4/HdpOi7W/xLzZnR6RCG1tYza60nMdqtxzA8FaPJQ==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "schedule": "^0.5.0" + "scheduler": "^0.13.4" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, "react-error-overlay": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-5.1.0.tgz", - "integrity": "sha512-akMy/BQT5m1J3iJIHkSb4qycq2wzllWsmmolaaFVnb+LPV9cIJ/nTud40ZsiiT0H3P+/wXIdbjx2fzF61OaeOQ==" + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-5.1.4.tgz", + "integrity": "sha512-fp+U98OMZcnduQ+NSEiQa4s/XMsbp+5KlydmkbESOw4P69iWZ68ZMFM5a2BuE0FgqPBKApJyRuYHR95jM8lAmg==" }, "react-is": { - "version": "16.6.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.0.tgz", - "integrity": "sha512-q8U7k0Fi7oxF1HvQgyBjPwDXeMplEsArnKt2iYhuIF86+GBbgLHdAmokL3XUFjTd7Q363OSNG55FOGUdONVn1g==" + "version": "16.8.4", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.4.tgz", + "integrity": "sha512-PVadd+WaUDOAciICm/J1waJaSvgq+4rHE/K70j0PFqKhkTBsPv/82UGQJNXAngz1fOQLLxI6z1sEDmJDQhCTAA==" }, "react-lifecycles-compat": { "version": "3.0.4", @@ -12313,12 +13637,24 @@ "integrity": "sha512-C8Aui0ZpMd4KokxRdVAm2bQtI03k2RMRNzOB+IipV3yxFTSVICv7WoUr5L9ALB5BmKO1iHgZtWM8EvYG83otdg==", "requires": { "prop-types": "^15.5.0" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, "react-moment": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/react-moment/-/react-moment-0.8.3.tgz", - "integrity": "sha512-9wFd3tS44D5NPjuDUGv7qinXKIE50wy2TsOJEUn3pNVO2z7edc1hsjKF5Ol2w7I7qmWd3X1h52/y5H/Ufi7xIA==" + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/react-moment/-/react-moment-0.8.4.tgz", + "integrity": "sha512-QhI19OcfhiAn60/O6bMR0w8ApXrPFCjv6+eV0I/P9/AswzjgEAx4L7VxMBCpS/jrythLa12Q9v88req+ys4YpA==" }, "react-onclickout": { "version": "2.0.8", @@ -12326,12 +13662,24 @@ "integrity": "sha1-0XixP7h6SBNWdhtFSqYN9wabLaQ=" }, "react-perfect-scrollbar": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/react-perfect-scrollbar/-/react-perfect-scrollbar-1.4.0.tgz", - "integrity": "sha512-A7RsCbyHw/6zhIqqBUdXNJA2RBByeFDRIx8x0vESKX9AaQq/0u56nBx5Oi4LmZ08AXziBDB+Rpm2Lq1r/iMbwg==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/react-perfect-scrollbar/-/react-perfect-scrollbar-1.4.4.tgz", + "integrity": "sha512-Ivu3I8LiwJs4ZSxl0dS39uhtzElBQo1wTW2d+9CkR08UBGp9zWXWDVlG4AYGP3jGJrQZQIsBCznRROR0j6l3HQ==", "requires": { "perfect-scrollbar": "^1.4.0", "prop-types": "^15.6.1" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, "react-popper": { @@ -12341,20 +13689,35 @@ "requires": { "popper.js": "^1.14.1", "prop-types": "^15.6.1" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, "react-router": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz", - "integrity": "sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.0.0.tgz", + "integrity": "sha512-6EQDakGdLG/it2x9EaCt9ZpEEPxnd0OCLBHQ1AcITAAx7nCnyvnzf76jKWG1s2/oJ7SSviUgfWHofdYljFexsA==", "requires": { - "history": "^4.7.2", - "hoist-non-react-statics": "^2.5.0", - "invariant": "^2.2.4", + "@babel/runtime": "^7.1.2", + "create-react-context": "^0.2.2", + "history": "^4.9.0", + "hoist-non-react-statics": "^3.1.0", "loose-envify": "^1.3.1", "path-to-regexp": "^1.7.0", - "prop-types": "^15.6.1", - "warning": "^4.0.1" + "prop-types": "^15.6.2", + "react-is": "^16.6.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" }, "dependencies": { "path-to-regexp": { @@ -12364,45 +13727,80 @@ "requires": { "isarray": "0.0.1" } + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } } } }, "react-router-config": { - "version": "4.4.0-beta.6", - "resolved": "https://registry.npmjs.org/react-router-config/-/react-router-config-4.4.0-beta.6.tgz", - "integrity": "sha512-qxqqJ4LDok3UNRpJEs2NwCOBxugvKA71I4N5mk/qeZwo3EiUnqsX7YVyDIiGcTvzKx+h8qVTUyJeCqOe0fFMGw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/react-router-config/-/react-router-config-5.0.0.tgz", + "integrity": "sha512-si94cIg3HRXgwZB4vJGW6xkxOTMwCe1BXyBjkLstqZ+1rpqqAvo280BeQ8ZjIyYgiM/TDOa5Yu+HC4swUwri1w==", "requires": { "@babel/runtime": "^7.1.2" } }, "react-router-dom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.3.1.tgz", - "integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.0.0.tgz", + "integrity": "sha512-wSpja5g9kh5dIteZT3tUoggjnsa+TPFHSMrpHXMpFsaHhQkm/JNVGh2jiF9Dkh4+duj4MKCkwO6H08u6inZYgQ==", "requires": { - "history": "^4.7.2", - "invariant": "^2.2.4", + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", "loose-envify": "^1.3.1", - "prop-types": "^15.6.1", - "react-router": "^4.3.1", - "warning": "^4.0.1" + "prop-types": "^15.6.2", + "react-router": "5.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, "react-test-renderer": { - "version": "16.6.0", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.6.0.tgz", - "integrity": "sha512-w+Y3YT7OX1LP5KO7HCd0YR34Ol1qmISHaooPNMRYa6QzmwtcWhEGuZPr34wO8UCBIokswuhyLQUq7rjPDcEtJA==", + "version": "16.8.4", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.8.4.tgz", + "integrity": "sha512-jQ9Tf/ilIGSr55Cz23AZ/7H3ABEdo9oy2zF9nDHZyhLHDSLKuoILxw2ifpBfuuwQvj4LCoqdru9iZf7gwFH28A==", "requires": { "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "react-is": "^16.6.0", - "scheduler": "^0.10.0" + "react-is": "^16.8.4", + "scheduler": "^0.13.4" + }, + "dependencies": { + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + } } }, "react-transition-group": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.5.0.tgz", - "integrity": "sha512-qYB3JBF+9Y4sE4/Mg/9O6WFpdoYjeeYqx0AFb64PTazVy8RPMiE3A47CG9QmM4WJ/mzDiZYslV+Uly6O1Erlgw==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.5.3.tgz", + "integrity": "sha512-2DGFck6h99kLNr8pOFk+z4Soq3iISydwOFeeEVPjTN6+Y01CmvbWmnN02VuTWyFdnRtIDPe+wy2q6Ui8snBPZg==", "requires": { "dom-helpers": "^3.3.1", "loose-envify": "^1.4.0", @@ -12411,10 +13809,11 @@ } }, "reactstrap": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/reactstrap/-/reactstrap-6.5.0.tgz", - "integrity": "sha512-dWb3fB/wBAiQloteKlf+j9Nl2VLe6BMZgTEt6hpeTt0t9TwtkeU+2v2NBYONZaF4FZATfMiIKozhWpc2HmLW1g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/reactstrap/-/reactstrap-7.1.0.tgz", + "integrity": "sha512-wtc4RkgnGn1TsZ0AxOZ2OqT+b8YmCWZj/tErPujWLepxzlEEhveZGC+uDerdaHVSAzJUP2DTk605iper7hutQQ==", "requires": { + "@babel/runtime": "^7.2.0", "classnames": "^2.2.3", "lodash.isfunction": "^3.0.9", "lodash.isobject": "^3.0.2", @@ -12423,6 +13822,31 @@ "react-lifecycles-compat": "^3.0.4", "react-popper": "^0.10.4", "react-transition-group": "^2.3.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.2.0.tgz", + "integrity": "sha512-oouEibCbHMVdZSDlJBO6bZmID/zA/G/Qx3H1d3rSNPTD+L8UNKvCat7aKWSJ74zYbm5zWGh0GQN0hKj8zYFTCg==", + "requires": { + "regenerator-runtime": "^0.12.0" + } + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "regenerator-runtime": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + } } }, "read-pkg": { @@ -12489,7 +13913,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, "requires": { "graceful-fs": "^4.1.11", "micromatch": "^3.1.10", @@ -12499,14 +13922,12 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "readable-stream": { "version": "2.3.6", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -12521,7 +13942,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "requires": { "safe-buffer": "~5.1.0" } @@ -12529,9 +13949,9 @@ } }, "realpath-native": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.2.tgz", - "integrity": "sha512-+S3zTvVt9yTntFrBpm7TQmQ3tzpCrnA1a/y+3cUHAc9ZR6aIjG0WNLR+Rj79QpJktY+VeW/TQtFlQ1bzsehI8g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.1.0.tgz", + "integrity": "sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA==", "requires": { "util.promisify": "^1.0.0" } @@ -12567,9 +13987,9 @@ } }, "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" }, "regenerator-transform": { "version": "0.13.3", @@ -12579,14 +13999,6 @@ "private": "^0.1.6" } }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -12596,33 +14008,38 @@ "safe-regex": "^1.1.0" } }, + "regexp-tree": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.5.tgz", + "integrity": "sha512-nUmxvfJyAODw+0B13hj8CFVAxhe7fDEAgJgaotBu3nnR+IgGgZq59YedJP5VYTlkEfqjuK6TuRpnymKdatLZfQ==" + }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" }, "regexpu-core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz", - "integrity": "sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", + "integrity": "sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==", "requires": { "regenerate": "^1.4.0", "regenerate-unicode-properties": "^7.0.0", - "regjsgen": "^0.4.0", - "regjsparser": "^0.3.0", + "regjsgen": "^0.5.0", + "regjsparser": "^0.6.0", "unicode-match-property-ecmascript": "^1.0.4", "unicode-match-property-value-ecmascript": "^1.0.2" } }, "regjsgen": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.4.0.tgz", - "integrity": "sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", + "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==" }, "regjsparser": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.3.0.tgz", - "integrity": "sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", + "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", "requires": { "jsesc": "~0.5.0" }, @@ -12634,6 +14051,16 @@ } } }, + "rehype-parse": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rehype-parse/-/rehype-parse-6.0.0.tgz", + "integrity": "sha512-V2OjMD0xcSt39G4uRdMTqDXXm6HwkUbLMDayYKA/d037j8/OtVSQ+tqKwYWOuyBeoCs/3clXRe30VUjeMDTBSA==", + "requires": { + "hast-util-from-parse5": "^5.0.0", + "parse5": "^5.0.0", + "xtend": "^4.0.1" + } + }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -12674,6 +14101,11 @@ "is-finite": "^1.0.0" } }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -12714,21 +14146,21 @@ } }, "request-promise-core": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz", - "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", + "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", "requires": { - "lodash": "^4.13.1" + "lodash": "^4.17.11" } }, "request-promise-native": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz", - "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", + "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", "requires": { - "request-promise-core": "1.1.1", - "stealthy-require": "^1.1.0", - "tough-cookie": ">=2.3.3" + "request-promise-core": "1.1.2", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" } }, "require-directory": { @@ -12746,33 +14178,17 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" - } - } - }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } }, "resolve-cwd": { @@ -12787,9 +14203,36 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, "requires": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" + }, + "dependencies": { + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + } } }, "resolve-from": { @@ -12859,9 +14302,9 @@ } }, "rsvp": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", - "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==" + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.4.tgz", + "integrity": "sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA==" }, "run-async": { "version": "2.3.0", @@ -12880,9 +14323,9 @@ } }, "rxjs": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", - "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", "requires": { "tslib": "^1.9.0" } @@ -12906,24 +14349,24 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sane": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz", - "integrity": "sha1-tNwYYcIbQn6SlQej51HiosuKs/o=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", + "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", "requires": { + "@cnakazawa/watch": "^1.0.3", "anymatch": "^2.0.0", - "capture-exit": "^1.2.0", - "exec-sh": "^0.2.0", + "capture-exit": "^2.0.0", + "exec-sh": "^0.3.2", + "execa": "^1.0.0", "fb-watchman": "^2.0.0", - "fsevents": "^1.2.3", "micromatch": "^3.1.4", "minimist": "^1.1.1", - "walker": "~1.0.5", - "watch": "~0.18.0" + "walker": "~1.0.5" }, "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } @@ -13003,11 +14446,6 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, "yargs": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", @@ -13104,26 +14542,10 @@ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, - "saxes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.3.tgz", - "integrity": "sha512-Nc5DXc5A+m3rUDtkS+vHlBWKT7mCKjJPyia7f8YMW773hsXVv2wEHQZGE0zs4+5PLwz9U5Sbl/94Cnd9vHV7Bg==", - "requires": { - "xmlchars": "^1.3.1" - } - }, - "schedule": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/schedule/-/schedule-0.5.0.tgz", - "integrity": "sha512-HUcJicG5Ou8xfR//c2rPT0lPIRR09vVvN81T9fqfVgBmhERUbDEQoYKjpBxbueJnCPpSu2ujXzOnRQt6x9o/jw==", - "requires": { - "object-assign": "^4.1.1" - } - }, "scheduler": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.10.0.tgz", - "integrity": "sha512-+TSTVTCBAA3h8Anei3haDc1IRwMeDmtI/y/o3iBe3Mjl2vwYF9DtPDt929HyRmV/e7au7CLu8sc4C4W0VOs29w==", + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.4.tgz", + "integrity": "sha512-cvSOlRPxOHs5dAhP9yiS/6IDmVAVxmk33f0CtTJRkmUWcb1Us+t7b1wqdzoC0REw2muC9V5f1L/w5R5uKGaepA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -13150,7 +14572,7 @@ "dependencies": { "source-map": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { "amdefine": ">=0.0.4" @@ -13165,9 +14587,9 @@ "dev": true }, "selfsigned": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.3.tgz", - "integrity": "sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz", + "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", "dev": true, "requires": { "node-forge": "0.7.5" @@ -13196,12 +14618,19 @@ "on-finished": "~2.3.0", "range-parser": "~1.2.0", "statuses": "~1.4.0" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + } } }, "serialize-javascript": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", - "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", + "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==" }, "serve-index": { "version": "1.9.1", @@ -13258,8 +14687,7 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "setprototypeof": { "version": "1.1.0", @@ -13268,7 +14696,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -13324,6 +14752,13 @@ "array-map": "~0.0.0", "array-reduce": "~0.0.0", "jsonify": "~0.0.0" + }, + "dependencies": { + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=" + } } }, "shellwords": { @@ -13357,20 +14792,22 @@ } }, "sisteransi": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz", - "integrity": "sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.0.tgz", + "integrity": "sha512-N+z4pHB4AmUv0SjveWRd6q1Nj5w62m5jodv+GD8lvmbY/83T/rpbJGZOnK5T149OldDj4Db07BSv9xY4K6NTPQ==" }, "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" }, "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", "is-fullwidth-code-point": "^2.0.0" } }, @@ -13487,18 +14924,26 @@ } }, "sockjs-client": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz", - "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", + "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", "requires": { - "debug": "^2.6.6", - "eventsource": "0.1.6", - "faye-websocket": "~0.11.0", - "inherits": "^2.0.1", + "debug": "^3.2.5", + "eventsource": "^1.0.7", + "faye-websocket": "~0.11.1", + "inherits": "^2.0.3", "json3": "^3.3.2", - "url-parse": "^1.1.8" + "url-parse": "^1.4.3" }, "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, "faye-websocket": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", @@ -13506,6 +14951,11 @@ "requires": { "websocket-driver": ">=0.5.1" } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" } } }, @@ -13532,18 +14982,12 @@ } }, "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.11.tgz", + "integrity": "sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ==", "requires": { - "source-map": "^0.5.6" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - } + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, "source-map-url": { @@ -13551,6 +14995,14 @@ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, + "space-separated-tokens": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.2.tgz", + "integrity": "sha512-G3jprCEw+xFEs0ORweLmblJ3XLymGGr6hxZYTYZjIlvDti9vOBUjRQa1Rzjt012aRrocKstHwdNi+F7HguPsEA==", + "requires": { + "trim": "0.0.1" + } + }, "spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", @@ -13586,59 +15038,79 @@ "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==" }, "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.0.tgz", + "integrity": "sha512-ot0oEGT/PGUpzf/6uk4AWLqkq+irlqHXkrdbk51oWONh3bxQmBuljxPNl66zlRRcIJStWq0QkLUCPOPjgjvU0Q==", "dev": true, "requires": { - "debug": "^2.6.8", - "handle-thing": "^1.2.5", + "debug": "^4.1.0", + "handle-thing": "^2.0.0", "http-deceiver": "^1.2.7", - "safe-buffer": "^5.0.1", "select-hose": "^2.0.0", - "spdy-transport": "^2.0.18" + "spdy-transport": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } } }, "spdy-transport": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", - "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", "dev": true, "requires": { - "debug": "^2.6.8", - "detect-node": "^2.0.3", + "debug": "^4.1.0", + "detect-node": "^2.0.4", "hpack.js": "^2.1.6", - "obuf": "^1.1.1", - "readable-stream": "^2.2.9", - "safe-buffer": "^5.0.1", - "wbuf": "^1.7.2" + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" }, "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz", + "integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -13659,6 +15131,23 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "sqlite3": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.0.6.tgz", + "integrity": "sha512-EqBXxHdKiwvNMRCgml86VTL5TK1i0IKiumnfxykX0gh6H6jaKijAXvE9O1N7+omfNSawR2fOmIyJZcfe8HYWpw==", + "requires": { + "nan": "~2.10.0", + "node-pre-gyp": "^0.11.0", + "request": "^2.87.0" + }, + "dependencies": { + "nan": { + "version": "2.10.0", + "resolved": "http://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" + } + } + }, "sshpk": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", @@ -13676,12 +15165,11 @@ } }, "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "dev": true, + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "requires": { - "safe-buffer": "^5.1.1" + "figgy-pudding": "^3.5.1" } }, "stable": { @@ -13690,9 +15178,9 @@ "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" }, "stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", + "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==" }, "static-extend": { "version": "0.1.2", @@ -13761,9 +15249,9 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" }, "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", "dev": true, "requires": { "inherits": "~2.0.1", @@ -13778,7 +15266,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -13832,7 +15320,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -13978,58 +15466,59 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, "style-loader": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.0.tgz", - "integrity": "sha512-uCcN7XWHkqwGVt7skpInW6IGO1tG6ReyFQ1Cseh0VcN6VdcFQi62aG/2F3Y9ueA8x4IVlfaSUxpmQXQD9QrEuQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", + "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", "dev": true, "requires": { "loader-utils": "^1.1.0", - "schema-utils": "^0.4.5" + "schema-utils": "^1.0.0" }, "dependencies": { - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "minimist": "^1.2.0" } }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true } } }, "stylehacks": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.1.tgz", - "integrity": "sha512-TK5zEPeD9NyC1uPIdjikzsgWxdQQN/ry1X3d1iOz1UkYDCmcr928gWD1KHgyC27F50UnE0xCTrBOO1l6KR8M4w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", + "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", "requires": { "browserslist": "^4.0.0", "postcss": "^7.0.0", "postcss-selector-parser": "^3.0.0" }, "dependencies": { - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - } - }, "postcss-selector-parser": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", @@ -14112,16 +15601,50 @@ "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=" }, "table": { - "version": "4.0.3", - "resolved": "http://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", - "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz", + "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==", + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, "tapable": { @@ -14131,7 +15654,7 @@ }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "requires": { "block-stream": "*", @@ -14140,126 +15663,60 @@ } }, "terser": { - "version": "3.10.8", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.10.8.tgz", - "integrity": "sha512-GQJHWJ/vbx0EgRk+lBMONMmKaT+ifeo/XgT/hi3KpzEEFOERVyFuJSVXH8grcmJjiqKY35ds8rBCxvABUeyyuQ==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", + "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", "requires": { - "commander": "~2.17.1", + "commander": "^2.19.0", "source-map": "~0.6.1", - "source-map-support": "~0.5.6" + "source-map-support": "~0.5.10" }, "dependencies": { - "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" } } }, "terser-webpack-plugin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.1.0.tgz", - "integrity": "sha512-61lV0DSxMAZ8AyZG7/A4a3UPlrbOBo8NIQ4tJzLPAdGOQ+yoNC7l5ijEow27lBAL2humer01KLS6bGIMYQxKoA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz", + "integrity": "sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA==", "requires": { "cacache": "^11.0.2", "find-cache-dir": "^2.0.0", "schema-utils": "^1.0.0", "serialize-javascript": "^1.4.0", "source-map": "^0.6.1", - "terser": "^3.8.1", + "terser": "^3.16.1", "webpack-sources": "^1.1.0", "worker-farm": "^1.5.2" }, "dependencies": { - "cacache": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.2.0.tgz", - "integrity": "sha512-IFWl6lfK6wSeYCHUXh+N1lY72UDrpyrYQJNIVQf48paDuWbv5RbAtJYf/4gUQFObTCHZwdZ5sI8Iw7nqwP6nlQ==", - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "figgy-pudding": "^3.1.0", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.3", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.0", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, "find-cache-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", - "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "requires": { "commondir": "^1.0.1", - "make-dir": "^1.0.0", + "make-dir": "^2.0.0", "pkg-dir": "^3.0.0" } }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "requires": { - "p-limit": "^2.0.0" + "pify": "^4.0.1", + "semver": "^5.6.0" } }, - "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==" + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" }, "pkg-dir": { "version": "3.0.0", @@ -14269,116 +15726,66 @@ "find-up": "^3.0.0" } }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "requires": { - "figgy-pudding": "^3.5.1" - } + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" } } }, "test-exclude": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.3.tgz", - "integrity": "sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz", + "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==", "requires": { "arrify": "^1.0.1", - "micromatch": "^2.3.11", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", "require-main-filename": "^1.0.1" }, "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "requires": { - "is-posix-bracket": "^0.1.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "is-extglob": "^1.0.0" + "pify": "^3.0.0" } }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "requires": { - "is-extglob": "^1.0.0" + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", "requires": { - "is-buffer": "^1.1.5" + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" } } }, @@ -14394,15 +15801,15 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "requires": { - "readable-stream": "^2.1.5", + "readable-stream": "~2.3.6", "xtend": "~4.0.1" }, "dependencies": { @@ -14413,7 +15820,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -14436,9 +15843,9 @@ } }, "thunky": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", - "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", + "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", "dev": true }, "timers-browserify": { @@ -14455,6 +15862,16 @@ "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=" }, + "tiny-invariant": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.0.3.tgz", + "integrity": "sha512-ytQx8T4DL8PjlX53yYzcIC0WhIZbpR0p1qcYjw2pHu3w6UtgWwFJQ/02cnhOnBBhlFx/edUIfcagCaQSe3KMWg==" + }, + "tiny-warning": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.2.tgz", + "integrity": "sha512-rru86D9CpQRLvsFG5XFdy0KdLAvjdQDyZCsRcuu60WtzFylDM3eAWSxEVz5kzL2Gp544XiUvPbVKtOA/txLi9Q==" + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -14518,11 +15935,11 @@ } }, "topo": { - "version": "2.0.2", - "resolved": "http://registry.npmjs.org/topo/-/topo-2.0.2.tgz", - "integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.3.tgz", + "integrity": "sha512-IgpPtvD4kjrJ7CRA3ov2FhWQADwv+Tdqbsf1ZnPUSAtCJ9e1Z44MmoSGDXGk4IppoZA7jd/QRkNddlLJWlUZsQ==", "requires": { - "hoek": "4.x.x" + "hoek": "6.x.x" } }, "toposort": { @@ -14555,11 +15972,16 @@ } }, "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", + "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", "dev": true }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" + }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", @@ -14570,6 +15992,11 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "trough": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.3.tgz", + "integrity": "sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==" + }, "true-case-path": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", @@ -14583,6 +16010,11 @@ "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==" }, + "ts-pnp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.0.1.tgz", + "integrity": "sha512-Zzg9XH0anaqhNSlDRibNC8Kp+B9KNM0uRIpLpGkGyrgRIttA7zZBhotTSEoEyuDrz3QW2LGtu2dxuk34HzIGnQ==" + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", @@ -14629,6 +16061,11 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "ua-parser-js": { + "version": "0.7.19", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz", + "integrity": "sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ==" + }, "uglify-js": { "version": "3.4.9", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", @@ -14638,55 +16075,6 @@ "source-map": "~0.6.1" } }, - "uglifyjs-webpack-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", - "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } - } - }, - "underscore": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", - "integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ=" - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -14711,6 +16099,21 @@ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz", "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==" }, + "unified": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz", + "integrity": "sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw==", + "requires": { + "@types/unist": "^2.0.0", + "@types/vfile": "^3.0.0", + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^1.1.0", + "trough": "^1.0.0", + "vfile": "^3.0.0", + "x-is-string": "^0.1.0" + } + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -14769,6 +16172,11 @@ "imurmurhash": "^0.1.4" } }, + "unist-util-stringify-position": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", + "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==" + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -14828,8 +16236,7 @@ "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==" }, "upper-case": { "version": "1.1.3", @@ -14868,9 +16275,9 @@ } }, "url-loader": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.1.tgz", - "integrity": "sha512-vugEeXjyYFBCUOpX+ZuaunbK3QXMKaQ3zUnRfIpRBlGkY7QizCnzyyn2ASfcxsvyU3ef+CJppVywnl3Kgf13Gg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz", + "integrity": "sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==", "requires": { "loader-utils": "^1.1.0", "mime": "^2.0.3", @@ -14895,9 +16302,9 @@ } }, "url-parse": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz", - "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz", + "integrity": "sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg==", "requires": { "querystringify": "^2.0.0", "requires-port": "^1.0.0" @@ -14919,9 +16326,9 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", "dev": true, "requires": { "inherits": "2.0.3" @@ -14996,6 +16403,32 @@ "extsprintf": "^1.2.0" } }, + "vfile": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz", + "integrity": "sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==", + "requires": { + "is-buffer": "^2.0.0", + "replace-ext": "1.0.0", + "unist-util-stringify-position": "^1.0.0", + "vfile-message": "^1.0.0" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==" + } + } + }, + "vfile-message": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", + "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", + "requires": { + "unist-util-stringify-position": "^1.1.1" + } + }, "vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", @@ -15013,16 +16446,6 @@ "browser-process-hrtime": "^0.1.2" } }, - "w3c-xmlserializer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.0.0.tgz", - "integrity": "sha512-0et1+9uXYiIRAecx1D5Z1nk60+vimniGdIKl4XjeqkWi6acoHNlXMv1VR5jV+jF4ooeO08oWbYxeAJOcon1oMA==", - "requires": { - "domexception": "^1.0.1", - "webidl-conversions": "^4.0.2", - "xml-name-validator": "^3.0.0" - } - }, "walker": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", @@ -15031,30 +16454,6 @@ "makeerror": "1.0.x" } }, - "warning": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.2.tgz", - "integrity": "sha512-wbTp09q/9C+jJn4KKJfJfoS6VleK/Dti0yqWSm6KMvJ4MRCXFQNapHuJXutJIrWV0Cf4AhTdeIe4qdKHR1+Hug==", - "requires": { - "loose-envify": "^1.0.0" - } - }, - "watch": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz", - "integrity": "sha1-KAlUdsbffJDJYxOJkMClQj60uYY=", - "requires": { - "exec-sh": "^0.2.0", - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } - }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", @@ -15075,23 +16474,28 @@ "minimalistic-assert": "^1.0.0" } }, + "web-namespaces": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.2.tgz", + "integrity": "sha512-II+n2ms4mPxK+RnIxRPOw3zwF2jRscdJIUE9BfkKHm4FYEg9+biIoTMnaZF5MpemE3T+VhMLrhbyD4ilkPCSbg==" + }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" }, "webpack": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.20.2.tgz", - "integrity": "sha512-75WFUMblcWYcocjSLlXCb71QuGyH7egdBZu50FtBGl2Nso8CK3Ej+J7bTZz2FPFq5l6fzCisD9modB7t30ikuA==", + "version": "4.29.6", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.6.tgz", + "integrity": "sha512-MwBwpiE1BQpMDkbnUUaW6K8RFZjljJHArC6tWQJoFm0oQtfoSebtg4Y7/QHnJ/SddtjYLHaKGX64CFjG5rehJw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.8", - "@webassemblyjs/helper-module-context": "1.7.8", - "@webassemblyjs/wasm-edit": "1.7.8", - "@webassemblyjs/wasm-parser": "1.7.8", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/wasm-edit": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", "ajv": "^6.1.0", "ajv-keywords": "^3.1.0", "chrome-trace-event": "^1.0.0", @@ -15105,91 +16509,140 @@ "mkdirp": "~0.5.0", "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", + "schema-utils": "^1.0.0", "tapable": "^1.1.0", - "uglifyjs-webpack-plugin": "^1.2.4", + "terser-webpack-plugin": "^1.1.0", "watchpack": "^1.5.0", "webpack-sources": "^1.3.0" }, "dependencies": { - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "minimist": "^1.2.0" } }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true } } }, "webpack-cli": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz", - "integrity": "sha512-Cnqo7CeqeSvC6PTdts+dywNi5CRlIPbLx1AoUPK2T6vC1YAugMG3IOoO9DmEscd+Dghw7uRlnzV1KwOe5IrtgQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.0.tgz", + "integrity": "sha512-t1M7G4z5FhHKJ92WRKwZ1rtvi7rHc0NZoZRbSkol0YKl4HvcC8+DsmGDmK7MmZxHSAetHagiOsjOB6MmzC2TUw==", "dev": true, "requires": { "chalk": "^2.4.1", "cross-spawn": "^6.0.5", "enhanced-resolve": "^4.1.0", - "global-modules-path": "^2.3.0", + "findup-sync": "^2.0.0", + "global-modules": "^1.0.0", "import-local": "^2.0.0", "interpret": "^1.1.0", "loader-utils": "^1.1.0", "supports-color": "^5.5.0", "v8-compile-cache": "^2.0.2", - "yargs": "^12.0.2" + "yargs": "^12.0.5" }, "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "big.js": "^3.1.3", + "big.js": "^5.2.2", "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "json5": "^1.0.1" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true } } }, "webpack-dev-middleware": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz", - "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.6.1.tgz", + "integrity": "sha512-XQmemun8QJexMEvNFbD2BIg4eSKrmSIMrTfnl2nql2Sc6OGAYFyb8rwuYrCjl/IiEYYuyTEiimMscu7EXji/Dw==", "dev": true, "requires": { - "memory-fs": "~0.4.1", + "memory-fs": "^0.4.1", "mime": "^2.3.1", "range-parser": "^1.0.3", "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", - "dev": true - } } }, "webpack-dev-server": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.9.tgz", - "integrity": "sha512-fqPkuNalLuc/hRC2QMkVYJkgNmRvxZQo7ykA2e1XRg/tMJm3qY7ZaD6d89/Fqjxtj9bOrn5wZzLD2n84lJdvWg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.2.1.tgz", + "integrity": "sha512-sjuE4mnmx6JOh9kvSbPYw3u/6uxCLHNWfhWaIPwcXWsvWOPN+nc5baq4i9jui3oOBRXGonK9+OI0jVkaz6/rCw==", "dev": true, "requires": { "ansi-html": "0.0.7", @@ -15197,13 +16650,13 @@ "chokidar": "^2.0.0", "compression": "^1.5.2", "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", + "debug": "^4.1.1", "del": "^3.0.0", "express": "^4.16.2", "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", + "http-proxy-middleware": "^0.19.1", "import-local": "^2.0.0", - "internal-ip": "^3.0.1", + "internal-ip": "^4.2.0", "ip": "^1.1.5", "killable": "^1.0.0", "loglevel": "^1.4.1", @@ -15211,31 +16664,92 @@ "portfinder": "^1.0.9", "schema-utils": "^1.0.0", "selfsigned": "^1.9.1", + "semver": "^5.6.0", "serve-index": "^1.7.2", "sockjs": "0.3.19", - "sockjs-client": "1.1.5", - "spdy": "^3.4.1", + "sockjs-client": "1.3.0", + "spdy": "^4.0.0", "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "webpack-dev-middleware": "3.4.0", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.5.1", "webpack-log": "^2.0.0", "yargs": "12.0.2" }, "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" } }, + "decamelize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", + "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", + "dev": true, + "requires": { + "xregexp": "4.0.0" + } + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", + "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^2.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^10.1.0" + } + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } } } }, @@ -15306,14 +16820,14 @@ "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" }, "whatwg-mimetype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.2.0.tgz", - "integrity": "sha512-5YSO1nMd5D1hY3WzAQV3PzZL83W3YeyR1yW9PcH26Weh1t+Vzh9B6XkDh7aXm83HBZ4nSMvkjvN2H2ySWIvBgw==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" }, "whatwg-url": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", - "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", + "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", "requires": { "lodash.sortby": "^4.7.0", "tr46": "^1.0.1", @@ -15347,50 +16861,59 @@ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" }, "workbox-background-sync": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-3.6.3.tgz", - "integrity": "sha512-ypLo0B6dces4gSpaslmDg5wuoUWrHHVJfFWwl1udvSylLdXvnrfhFfriCS42SNEe5lsZtcNZF27W/SMzBlva7Q==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-4.1.1.tgz", + "integrity": "sha512-z8iKAx7f3cfQpGaRrrl2CpP4dGe+vHk05vJbzscwA7e1K8vyNl6zALBtIyyAvEZzMsofsiGEZqt2g/8CfyfQ5g==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, - "workbox-broadcast-cache-update": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-broadcast-cache-update/-/workbox-broadcast-cache-update-3.6.3.tgz", - "integrity": "sha512-pJl4lbClQcvp0SyTiEw0zLSsVYE1RDlCPtpKnpMjxFtu8lCFTAEuVyzxp9w7GF4/b3P4h5nyQ+q7V9mIR7YzGg==", + "workbox-broadcast-update": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-4.1.1.tgz", + "integrity": "sha512-gq83a8F6ESQobfltaxzoUTz0mEpTOsXHmy9Po9kKMT1UjXTWh/4NDF3HwQYaxJckOER9NITB3BuoXlXr3tI8aA==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, "workbox-build": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-3.6.3.tgz", - "integrity": "sha512-w0clZ/pVjL8VXy6GfthefxpEXs0T8uiRuopZSFVQ8ovfbH6c6kUpEh6DcYwm/Y6dyWPiCucdyAZotgjz+nRz8g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-4.1.1.tgz", + "integrity": "sha512-+QRtNFKDq7RlIpigsh26joUNoEN+c3pQ+yT8Rs29RtpM50S1nKggFUQY0HoRvN7tzvuzIgxCrx3osxOQ8hmj7Q==", "requires": { - "babel-runtime": "^6.26.0", - "common-tags": "^1.4.0", + "@babel/runtime": "^7.3.4", + "common-tags": "^1.8.0", "fs-extra": "^4.0.2", - "glob": "^7.1.2", - "joi": "^11.1.1", + "glob": "^7.1.3", + "joi": "^14.3.1", "lodash.template": "^4.4.0", - "pretty-bytes": "^4.0.2", - "stringify-object": "^3.2.2", + "pretty-bytes": "^5.1.0", + "stringify-object": "^3.3.0", "strip-comments": "^1.0.2", - "workbox-background-sync": "^3.6.3", - "workbox-broadcast-cache-update": "^3.6.3", - "workbox-cache-expiration": "^3.6.3", - "workbox-cacheable-response": "^3.6.3", - "workbox-core": "^3.6.3", - "workbox-google-analytics": "^3.6.3", - "workbox-navigation-preload": "^3.6.3", - "workbox-precaching": "^3.6.3", - "workbox-range-requests": "^3.6.3", - "workbox-routing": "^3.6.3", - "workbox-strategies": "^3.6.3", - "workbox-streams": "^3.6.3", - "workbox-sw": "^3.6.3" + "workbox-background-sync": "^4.1.1", + "workbox-broadcast-update": "^4.1.1", + "workbox-cacheable-response": "^4.1.1", + "workbox-core": "^4.1.1", + "workbox-expiration": "^4.1.1", + "workbox-google-analytics": "^4.1.1", + "workbox-navigation-preload": "^4.1.1", + "workbox-precaching": "^4.1.1", + "workbox-range-requests": "^4.1.1", + "workbox-routing": "^4.1.1", + "workbox-strategies": "^4.1.1", + "workbox-streams": "^4.1.1", + "workbox-sw": "^4.1.1", + "workbox-window": "^4.1.1" }, "dependencies": { + "@babel/runtime": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.2.tgz", + "integrity": "sha512-7Bl2rALb7HpvXFL7TETNzKSAeBVCPHELzc0C//9FCxN8nsiueWSJBqaF+2oIJScyILStASR/Cx5WMkXGYTiJFA==", + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, "fs-extra": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", @@ -15400,102 +16923,115 @@ "jsonfile": "^4.0.0", "universalify": "^0.1.0" } + }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" } } }, - "workbox-cache-expiration": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-cache-expiration/-/workbox-cache-expiration-3.6.3.tgz", - "integrity": "sha512-+ECNph/6doYx89oopO/UolYdDmQtGUgo8KCgluwBF/RieyA1ZOFKfrSiNjztxOrGJoyBB7raTIOlEEwZ1LaHoA==", - "requires": { - "workbox-core": "^3.6.3" - } - }, "workbox-cacheable-response": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-3.6.3.tgz", - "integrity": "sha512-QpmbGA9SLcA7fklBLm06C4zFg577Dt8u3QgLM0eMnnbaVv3rhm4vbmDpBkyTqvgK/Ly8MBDQzlXDtUCswQwqqg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-4.1.1.tgz", + "integrity": "sha512-uc1zkeidJgAMXHvUbspKJt3NzXHAcb5D+7sX6HrCZIMneS4ZxMvdB86giIR3bveV4PaOssqIYVrWUJvIehK/NA==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, "workbox-core": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-3.6.3.tgz", - "integrity": "sha512-cx9cx0nscPkIWs8Pt98HGrS9/aORuUcSkWjG25GqNWdvD/pSe7/5Oh3BKs0fC+rUshCiyLbxW54q0hA+GqZeSQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-4.1.1.tgz", + "integrity": "sha512-RbzMWnDW7UvfstwOs8ERDFTH6zr7akm4wIbIednFs1TnAvZbN3gpIBoEv53kaMr0uMYDSXI2KxaLmmz9WX1PXA==" + }, + "workbox-expiration": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-4.1.1.tgz", + "integrity": "sha512-N/fbypqCbFrrKDhVnTyGXhkFTgjA8aRUydkxCpgJM1ajf7udQYD4XWTQxXosPJC2UVsa2/kPCBYFQOQ1Fu/2TA==", + "requires": { + "workbox-core": "^4.1.1" + } }, "workbox-google-analytics": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-3.6.3.tgz", - "integrity": "sha512-RQBUo/6SXtIaQTRFj4RQZ9e1gAl7D8oS5S+Hi173Kk70/BgJjzPwXpC5A249Jv5YfkCOLMQCeF9A27BiD0b0ig==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-4.1.1.tgz", + "integrity": "sha512-ByZYHv61u4dFQXQAXZZ1bNgcJ45yA85C8OAlSDGwqOuv72dZoybG3EMtJo/0ChO6irxWI1pictF2pTW7JxcCkQ==", "requires": { - "workbox-background-sync": "^3.6.3", - "workbox-core": "^3.6.3", - "workbox-routing": "^3.6.3", - "workbox-strategies": "^3.6.3" + "workbox-background-sync": "^4.1.1", + "workbox-core": "^4.1.1", + "workbox-routing": "^4.1.1", + "workbox-strategies": "^4.1.1" } }, "workbox-navigation-preload": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-3.6.3.tgz", - "integrity": "sha512-dd26xTX16DUu0i+MhqZK/jQXgfIitu0yATM4jhRXEmpMqQ4MxEeNvl2CgjDMOHBnCVMax+CFZQWwxMx/X/PqCw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-4.1.1.tgz", + "integrity": "sha512-U+QEpcOgakBFZ6Aiv438DTvkZQX518qxfu280kEPZnFU88wIFBAK9V4MmJcoX60fk1INTD//YnfSxI0cLy1N+g==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, "workbox-precaching": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-3.6.3.tgz", - "integrity": "sha512-aBqT66BuMFviPTW6IpccZZHzpA8xzvZU2OM1AdhmSlYDXOJyb1+Z6blVD7z2Q8VNtV1UVwQIdImIX+hH3C3PIw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-4.1.1.tgz", + "integrity": "sha512-GuoBH85MzVpzmF8c5Sql1i9HYdOqcpRDdNPLrIkWEfuvURO5M/jT+cGcyfFq35Xo7xRb4kE79H4hnF3EnCkFRw==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, "workbox-range-requests": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-3.6.3.tgz", - "integrity": "sha512-R+yLWQy7D9aRF9yJ3QzwYnGFnGDhMUij4jVBUVtkl67oaVoP1ymZ81AfCmfZro2kpPRI+vmNMfxxW531cqdx8A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-4.1.1.tgz", + "integrity": "sha512-i9i7tRTcXveCJdi4lK7XstgHweTwkqEGR7GPauYIDGAZplWrxDOAOUDSvkH8ibOxEgO6f0VFhyYY6fPB6u+oSA==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, "workbox-routing": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-3.6.3.tgz", - "integrity": "sha512-bX20i95OKXXQovXhFOViOK63HYmXvsIwZXKWbSpVeKToxMrp0G/6LZXnhg82ijj/S5yhKNRf9LeGDzaqxzAwMQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-4.1.1.tgz", + "integrity": "sha512-slOb+2Nfn8V3fG/TtN0c0k4OOyuwLSnZUv+zyZeJafSU3MrQPC58bPeG7HOZZDwoQAsBG9VSukjRDFR0F1lXKg==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, "workbox-strategies": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-3.6.3.tgz", - "integrity": "sha512-Pg5eulqeKet2y8j73Yw6xTgLdElktcWExGkzDVCGqfV9JCvnGuEpz5eVsCIK70+k4oJcBCin9qEg3g3CwEIH3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-4.1.1.tgz", + "integrity": "sha512-ejmRqmjwn9DYsl1QVZkRb1V/iaBzhsh3YwJelfXQk68JpB36WjwY9csFQ2gSvlLCCg3d4MVFFxKfmHVyVnhwAA==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, "workbox-streams": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-3.6.3.tgz", - "integrity": "sha512-rqDuS4duj+3aZUYI1LsrD2t9hHOjwPqnUIfrXSOxSVjVn83W2MisDF2Bj+dFUZv4GalL9xqErcFW++9gH+Z27w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-4.1.1.tgz", + "integrity": "sha512-6TKC4rrvnjbLpWtgHIYWjWS28h0SqSWogkJIKC1f/6MjJCmi2qM7PYJwXR0/t8lJVZj61ujVSulZ92XQmy3GhQ==", "requires": { - "workbox-core": "^3.6.3" + "workbox-core": "^4.1.1" } }, "workbox-sw": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-3.6.3.tgz", - "integrity": "sha512-IQOUi+RLhvYCiv80RP23KBW/NTtIvzvjex28B8NW1jOm+iV4VIu3VXKXTA6er5/wjjuhmtB28qEAUqADLAyOSg==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-4.1.1.tgz", + "integrity": "sha512-3nQFWFyG1W21x7TUVBsobrLoFDEy7ck/3nx2W1I3c+DhLCIu7B+IAnQVdefK+oRju5fIDWwOQ63fok8Uz7E/Gw==" }, "workbox-webpack-plugin": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-3.6.2.tgz", - "integrity": "sha512-FGSkcaiMDM41uTGkYf7O6hf2W7UvkNc+iUIltfGiRp+qeQfXKOOh5fJCz+a6AFkeuGELSSYROsQRuOqX8LytcQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-4.1.1.tgz", + "integrity": "sha512-Fygc8qrh/IOeJeZ4NETs9arYtJEwcO0Yy7JRkX5DSOHCSkWHxOX1ryazAcK0ACyMJOQuU9zJVmx+mnn0zqYKtA==", "requires": { - "babel-runtime": "^6.26.0", + "@babel/runtime": "^7.0.0", "json-stable-stringify": "^1.0.1", - "workbox-build": "^3.6.2" + "workbox-build": "^4.1.1" + } + }, + "workbox-window": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-4.1.1.tgz", + "integrity": "sha512-KadE/DdNY1f6Va3MMOSigheLSgNxWHV/K/iDHnLMpo2EBGVpfwRCOuEwJNHlWA3G5WdpZlyTmtShf/5Mbb6dNg==", + "requires": { + "workbox-core": "^4.1.1" } }, "worker-farm": { @@ -15541,17 +17077,17 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", "requires": { "mkdirp": "^0.5.1" } }, "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz", + "integrity": "sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg==", "requires": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", @@ -15559,23 +17095,23 @@ } }, "ws": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.0.tgz", - "integrity": "sha512-H3dGVdGvW2H8bnYpIDc3u3LH8Wue3Qh+Zto6aXXFzvESkTVT6rAfKR6tR/+coaUvxs8yHtmNV0uioBF62ZGSTg==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", "requires": { "async-limiter": "~1.0.0" } }, + "x-is-string": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", + "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=" + }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" }, - "xmlchars": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz", - "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==" - }, "xpc-connection": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/xpc-connection/-/xpc-connection-0.1.4.tgz", @@ -15597,9 +17133,9 @@ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, "yallist": { "version": "2.1.2", @@ -15607,13 +17143,12 @@ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", - "dev": true, + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "requires": { "cliui": "^4.0.0", - "decamelize": "^2.0.0", + "decamelize": "^1.2.0", "find-up": "^3.0.0", "get-caller-file": "^1.0.1", "os-locale": "^3.0.0", @@ -15623,14 +17158,13 @@ "string-width": "^2.0.0", "which-module": "^2.0.0", "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" + "yargs-parser": "^11.1.1" }, "dependencies": { "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -15639,17 +17173,15 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", - "dev": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", "requires": { "p-try": "^2.0.0" } @@ -15658,7 +17190,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, "requires": { "p-limit": "^2.0.0" } @@ -15666,18 +17197,24 @@ "p-try": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", - "dev": true + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==" } } }, "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==" + } } } } diff --git a/controller/server/package.json b/controller/server/package.json index 80019f8..332bc6a 100644 --- a/controller/server/package.json +++ b/controller/server/package.json @@ -1,7 +1,7 @@ { - "name": "opex-controller", + "name": "orca-controller", "version": "1.0.0", - "description": "The standalone controller for the Opex System", + "description": "The standalone controller for the Orca System", "author": { "name": "Mike S.", "email": "", @@ -18,112 +18,119 @@ "test": "exit 0" }, "dependencies": { - "@coreui/coreui": "^2.1.1", + "@coreui/coreui": "2.1.6", "@coreui/icons": "0.3.0", - "@svgr/webpack": "4.0.3", + "@svgr/webpack": "4.1.0", "babel-core": "7.0.0-bridge.0", "babel-eslint": "10.0.1", - "babel-jest": "23.6.0", - "babel-plugin-named-asset-import": "^0.2.3", - "babel-preset-react-app": "^6.1.0", + "babel-jest": "24.5.0", + "babel-plugin-named-asset-import": "0.3.1", + "babel-preset-react-app": "7.0.2", "bfj": "6.1.1", - "bootstrap": "^4.1.3", - "case-sensitive-paths-webpack-plugin": "2.1.2", - "chalk": "2.4.1", - "chart.js": "^2.7.3", - "classnames": "^2.2.6", - "core-js": "^2.5.7", - "dotenv": "^6.1.0", - "dotenv-expand": "4.2.0", - "element-closest": "^2.0.2", - "enzyme": "^3.7.0", - "enzyme-adapter-react-16": "^1.7.0", - "eslint": "5.9.0", - "eslint-config-react-app": "^3.0.5", - "eslint-loader": "2.1.1", - "eslint-plugin-flowtype": "3.2.0", - "eslint-plugin-import": "2.14.0", - "eslint-plugin-jsx-a11y": "6.1.2", - "eslint-plugin-react": "7.11.1", - "express": "^4.16.4", - "flag-icon-css": "^3.2.1", - "font-awesome": "^4.7.0", + "bootstrap": "4.3.1", + "case-sensitive-paths-webpack-plugin": "2.2.0", + "chalk": "2.4.2", + "chart.js": "2.8.0", + "classnames": "2.2.6", + "core-js": "2.6.5", + "dotenv": "7.0.0", + "dotenv-expand": "5.1.0", + "element-closest": "3.0.1", + "enzyme": "3.9.0", + "enzyme-adapter-react-16": "1.11.2", + "eslint": "5.15.3", + "eslint-config-react-app": "3.0.8", + "eslint-loader": "2.1.2", + "eslint-plugin-flowtype": "3.4.2", + "eslint-plugin-import": "2.16.0", + "eslint-plugin-jsx-a11y": "6.2.1", + "eslint-plugin-react": "7.12.4", + "express": "4.16.4", + "flag-icon-css": "3.3.0", + "font-awesome": "4.7.0", "fs-extra": "7.0.1", - "html-webpack-plugin": "^3.2.0", + "html-webpack-plugin": "3.2.0", "identity-obj-proxy": "3.0.0", - "jest": "23.6.0", - "jest-pnp-resolver": "1.0.2", - "jest-resolve": "23.6.0", - "mini-css-extract-plugin": "0.4.4", - "moment": "^2.22.2", - "noble": "^1.9.1", - "node-sass": "^4.10.0", + "jest": "24.5.0", + "jest-pnp-resolver": "1.2.1", + "jest-resolve": "24.5.0", + "mime": "2.4.0", + "mini-css-extract-plugin": "0.5.0", + "moment": "2.24.0", + "moment-timezone": "0.5.23", + "noble": "1.9.1", + "node-sass": "4.11.0", "optimize-css-assets-webpack-plugin": "5.0.1", - "pnp-webpack-plugin": "1.2.1", + "pnp-webpack-plugin": "1.4.1", "postcss-flexbugs-fixes": "4.1.0", "postcss-loader": "3.0.0", - "postcss-preset-env": "6.4.0", + "postcss-preset-env": "6.6.0", "postcss-safe-parser": "4.0.1", - "prop-types": "^15.6.2", - "react": "^16.6.3", - "react-app-polyfill": "^0.1.3", - "react-chartjs-2": "^2.7.4", - "react-dev-utils": "^6.1.1", - "react-dom": "^16.6.3", - "react-loadable": "^5.5.0", - "react-moment": "^0.8.4", - "react-onclickout": "^2.0.8", - "react-perfect-scrollbar": "^1.4.2", - "react-router-config": "^4.4.0-beta.6", - "react-router-dom": "^4.3.1", - "react-test-renderer": "^16.6.3", - "reactstrap": "^6.5.0", - "resolve": "1.8.1", + "prop-types": "15.7.2", + "react": "16.8.4", + "react-app-polyfill": "0.2.2", + "react-chartjs-2": "2.7.4", + "react-dev-utils": "8.0.0", + "react-dom": "16.8.4", + "react-loadable": "5.5.0", + "react-moment": "0.8.4", + "react-onclickout": "2.0.8", + "react-perfect-scrollbar": "1.4.4", + "react-router-config": "5.0.0", + "react-router-dom": "5.0.0", + "react-test-renderer": "16.8.4", + "reactstrap": "7.1.0", + "resolve": "1.10.0", "sass-loader": "7.1.0", - "simple-line-icons": "^2.4.1", - "terser-webpack-plugin": "1.1.0", + "simple-line-icons": "2.4.1", + "sqlite3": "4.0.6", + "terser-webpack-plugin": "1.2.3", "url-loader": "1.1.2", "webpack-manifest-plugin": "2.0.4", - "workbox-webpack-plugin": "3.6.3" + "workbox-webpack-plugin": "4.1.1" }, "devDependencies": { - "@babel/core": "^7.1.2", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-decorators": "^7.0.0", - "@babel/plugin-proposal-do-expressions": "^7.0.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-export-namespace-from": "^7.0.0", - "@babel/plugin-proposal-function-bind": "^7.0.0", - "@babel/plugin-proposal-function-sent": "^7.0.0", - "@babel/plugin-proposal-json-strings": "^7.0.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-proposal-pipeline-operator": "^7.0.0", - "@babel/plugin-proposal-throw-expressions": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-import-meta": "^7.0.0", - "@babel/polyfill": "^7.0.0", - "@babel/preset-env": "^7.1.0", - "@babel/preset-react": "^7.0.0", - "babel-loader": "^8.0.4", - "babel-plugin-react-svg": "^2.1.0", - "concurrently": "^4.0.1", - "css-loader": "^1.0.0", - "file-loader": "^2.0.0", - "style-loader": "^0.23.0", - "webpack": "^4.20.2", - "webpack-cli": "^3.1.2", - "webpack-dev-server": "^3.1.9" + "@babel/core": "7.4.0", + "@babel/plugin-proposal-class-properties": "7.4.0", + "@babel/plugin-proposal-decorators": "7.4.0", + "@babel/plugin-proposal-do-expressions": "7.2.0", + "@babel/plugin-proposal-export-default-from": "7.2.0", + "@babel/plugin-proposal-export-namespace-from": "7.2.0", + "@babel/plugin-proposal-function-bind": "7.2.0", + "@babel/plugin-proposal-function-sent": "7.2.0", + "@babel/plugin-proposal-json-strings": "7.2.0", + "@babel/plugin-proposal-logical-assignment-operators": "7.2.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "7.2.0", + "@babel/plugin-proposal-numeric-separator": "7.2.0", + "@babel/plugin-proposal-optional-chaining": "7.2.0", + "@babel/plugin-proposal-pipeline-operator": "7.3.2", + "@babel/plugin-proposal-throw-expressions": "7.2.0", + "@babel/plugin-syntax-dynamic-import": "7.2.0", + "@babel/plugin-syntax-import-meta": "7.2.0", + "@babel/polyfill": "7.4.0", + "@babel/preset-env": "7.4.2", + "@babel/preset-react": "7.0.0", + "babel-loader": "8.0.5", + "babel-plugin-react-svg": "2.1.0", + "concurrently": "4.1.0", + "css-loader": "2.1.1", + "eslint-config-airbnb": "17.1.0", + "eslint-config-prettier": "4.1.0", + "eslint-plugin-prettier": "3.0.1", + "file-loader": "3.0.1", + "prettier": "1.16.4", + "style-loader": "0.23.1", + "webpack": "4.29.6", + "webpack-cli": "3.3.0", + "webpack-dev-server": "3.2.1" }, "proxy": "http://localhost:3000/", "repository": { "type": "git", - "url": "https://github.com/bhcmoney/opex.git" + "url": "https://github.com/bhcmoney/orca.git" }, "bugs": { - "url": "https://github.com/bhcmoney/opex/issues" + "url": "https://github.com/bhcmoney/orca/issues" }, "keywords": [ "node", diff --git a/controller/server/public/favicon.ico b/controller/server/public/favicon.ico index a11777cc471a4344702741ab1c8a588998b1311a..44fcb2b4a98a419c3d2918cc04a1587f53cf7b06 100644 GIT binary patch literal 40894 zcmeI52YeO9_QyA&gdV!|1VTqTp=0RMd+!~5qM)JzDg?!b2>4LZ2MD$&icb*>HZ(j0 zo{EB^QuPH;1O-HVLKJf6|NTww#>?d<+&~h8|Lo^;ve~`6Gv~~2&Y3f3$~sPnlglYw z*x?-MOv>pv102UGRVwNFzPyg}9`_<6ldf0sT*pF=Q?H))x{Bi*ui!Z2nkHRWAL=-d zws)NBq`{-4m~@|$y$sHjhl961(;g@xtFnUjZuJa|X%=I5Pt zdGh3WyGoTRMJiRQ1kaH{rI0IEE(fYlzDFxmsPIdJ1`UQcY}hcUca=AJiiQ*{R4}o5 zi{@v#cJDg9-=KaaS3I>MWX{|~1&y|*^Jwe7kat~0rF=Qi+TC{M!+rf`wMzYQEZaPjmz zrWcxc?Zkj-EPQz3+m9`O%(U;=-V`oe*c2>S(1;JEB^otu)R|!;huu}GRH>X@x^+1( zjas#8ebcjdPcvrx7*noXIa9J^NmHy?vE;M{4;yS^?~eVsb=%ehYSgUZ3>!7{^YQgVE$)_*n zQ>j|DYK!6RWK>j?p-!IV|IOvgm)}HQJ^bIN{2i!Hp+beWf=872sa?Bv?klgnQfa+` zoZFD`k%-8MLGV$;|9x*=j6%Mr5U-#_Y}TxqGh)ODbhchT(ke@PF!xsN#N2_Ea!s|&x&McFjWrb z$l5PXj)Tn#WM}Me-aoQAP)F>>I%F*^xzp>AEhFuMoL{4^9-|EFTx2<($CA<(uTXE& zPQYe;f5jD7#I$J9B4>>nHO_lJtv6ggIWLj^Q;$#Aty^~o^`%ZqbtWx&kfs9_g73|; zGw8gbe#TQbE7z}IKP^cGeAZk4tC03V^wYHK(9U3kcJ?3Cf5`CB!z)5Lxeoa5g>GJd zn4@%JD~3pbo>l?nWDvtnlfd}m~s`$B~-3jd0+j8^%r&P(XD!+@Iuav+h$xS z$>iT}pL4r&)2%mESop}oSO2l{AD+mHk;!(Php6dElqYW{j|?Y;W;qLp==rY&fA zgE(%By)FFN7oUClqt8Dw5C7v~+s=T2wei#=L%mAQFMt0020MM=hFfmvzJ1SjXV9=g z7tG<+w_m;Gz0L2Pe*N9oO^a474ED=XfdT~#HpnP1>XdDtl-JOaL(R=IZ{FLsL))fJ znm2Ji{OH3}^XNCQ-+?ym+8EjNS$EAcb?eo&?F=~Bwnq7hZ`CQu)3rxeGjHKM)4XN# zILfMQr>>n+O`momPIYngxX}h2Or5%Q47T3T?%6gCTW-s&Sn*;8Y)!2zYniogtu@o8 zPctpAYWeW}3+@lQ@s=A?%mcgKfOg=y%2AcKlh+~W3~hnIhTC>id7;OqQR7Co?UP)R zQ+SP;Fy?>Q`yrH>ZMOnt5)%{Spr5(10maCt4sFax+KGQvu3Y&ra(QUaOr@wwX42$I z=IYK@8`>4aZ?=q9y|hZdeU&#)-a6=v17?A;NWLdMB@c(Z@^G$CUNdOhc95S(ehB`C zsa&P9EkET;`Ixfh%9>(Di>;v?i>dw9;nmd;FiSB*+C1B)()LclFF4brX_EwW<#@|h zEq{-UNGd;mGa|4$OBw!yb1}{i`Gg`*Pvp5JnfU$`%BG6SCj*ZBwD}K0rJ)Q+-uhBiRPiO2<+b4Y$zB-9!TvH$T8 z9l#6uVLat~G@O4tN?suSpMW`+jGtj%5RaMB>PWWZkjf2dY>`IsZ%@S z^3R(uuksIr*2s4XFC1=&U3ey3Ga+%@q;W43!x%Gi?8xd+-es$nISuOt7ZVAlz`FJ9 z=5+4XIWO^vF|@gdT;Huo(IVDYkpEk?TGfOG(G9+B+PvwLox67KK#U>Rm~mr*Nj}wQ zhK?BO;1h;Vn=x%3{`Rl!uWo-%+=Q2t{cVhy$(KK${F$S~Nal3u(Ip&8HT~3n#6NNd z4IPy4-ud?~Aa-*m?muycvM@P9t=&1t5BKE*J7FqBR``9ukO5Ek?%%uYz##)u%OAyev_t*Qr+h=y{-C?@->~3RD>Z>XCqWaj>b_a_b? zHT*H^M1g(-`lXiLdA}`Kyx_IF=iP1neCmNwpQ1|DD(CejTwdIA5ii(i)4Wx4v+U_* zhWD*86RZF5V4SsUKM-+UFf?kG~@9@uUzeD{);tl4$2k$e~_hfuj zHrN2$2bE4xU-yDdG(;@_!sX!42Rt~$y%k4QpDr3cW>OxzDG$$8t*$rao zKI&5{?(40$Z*VT{@9$GK>g$D~O9lP&4RlR?aOh8jQWqDI_HXd;8~ySG>{g=UIl{)p zN3mj`daM51N=S!IT9{C8^HM%zu`Ra-%Fq8E{WJ%R6$`#qSX0)C^#8smhIDtc=FQ#! zpI;~&+g5WwnHQAr$;=H)^ntj8+-~u zJ)!mBbOv6G;>vElReeE+Jmo8t|CAW`HI&c&y#E_~EGGY;omy`_>PNrzclhwY$3(~h zf7KDy+0xKG)ZZVuR-e+iytw*Yzd`*(;RFvqQXb7Ho0P;o@4j$@+JW6^csYjb(dtLL zhfm+O2mf!Pe`{@;%M17mM>`UTI_6$fgB?LA4|`4m2iiznZMI_jwZ zi;q|qnm~W|1^C!NxhPIQlk%tlHo3s2IDF)Sd|yxXe{@AUQ;qZY@bNNyMJ$}Law0H80%V1Xbz{h;~>EbD~4sX9CoP0mT2e<}u;3c!NSNvXi z<)zJE19gWoEpMNUl<5K})%cRn^BM849IVFam9Qtqn6q9=2sb8~B8)ka!T9k)sjmFNP1^ob+~YBLmY@9<{6|XHv-%W7#2qVTTqN88_m?-SVE4zj&j`B44#(r|b`MY-F)8us}p z)KcZIxVZea1uh z0AJvT9KH2H@Agl2&-K5@x za(>8{clFWX*Wh!RMvWSsM22=yW)x|f@_=Xgb@@2IuR5bxiwNJ|^6rg2Zl^C;Uj4zW zcEGdz;tJ3%@r_Sx<0I<-v}@PSQtQ^O?iggGXK5cz=4!UblW->%+o# zGw27GcltN#%X{v;_s&Gdd_9bx#xv&oD*gI9h*LJ0IC)}t+jebp_8;6oy;%x6J=si- zkg*fTmZ@H|`rQ2a@+T@rCK3(>3Kp>Ot8(Sb*?1bWMLdkXC-myq>!+?gyKbf5KB`Z@ zJ`v!Nt7XfULFb!}4~F&~*tgk~X;U^3_e#{f4e>1QWYyz)Q_ReTj@4q){GsGJ@J@X`s7kOKf&eEpMRb|M;`ZD zvGpd+n*74ti2GZ$X;rpErw&RxLl5Fc4)MV*#Jl%C_54%j?SH>**1fmR#y_c3*6-0- zvpX(gnz}?;n`unNrOd?F8b_Wul>tx{CK0;y??iP;GqX> zEL8SW{9sR$W9GrgqWL2u#*9du@V5!;d-m;FYrxO}PWuk&+r^tYZK^Z=n(-wbUH0g! zZ@l-0`Q)ol%z>i^Y|K*eJk@>KADz|qrd5{iy}Fw@_ssDyCu%)qRcZ3|lO5ud>4pVm z8uIvx$8Xv2;fCM#e!JHkJ$2L^IeEm~Hv2Y1EXbBW@ffR{ZhYKd7W|A9>lb=p7CgMb z+;!hwnqTuGb7D%|Hs>}cJU;3qSialCl+{(u4H*ec)&*LVJv+b2)tHefAltt}Zp!y}9xp~IT=AD1P zV`Jl*r_9`~uhF?y*H63tk};s3Y*Aei;TIe6yZO`2wl1yw=So{<#8i{#s1YBw@}wq< z@Ns34-BP)uUuONL^=8)GSw@(4?A-BP#K>46y^aGb5%PYvS2~561mcttBa>orMkFP8m$MBUy zn5cf^gIL{HUx6_Ji;2qP$yHC9{Xg!va=iHJi>5)N2KsFa7*&NX8Uy!5Z!94cIZ7i( zGvpYI9QQ!)BFiz2#RQVYtzVKyc5B8RGYsWwWpnG7>K1bf&5CDNnD`^{=IcXWn|tQp zW0>dZL06VRg|GoGE9r8UJoIlvk)O#~Sn%^d`ng2+)9()i_S z=%~LetRpe_BDM|e-M9C7x>B-4Nvq$z`t-76y3#4H-tVU_wTCo^(l`5b{a>*XbVWK} z961`me=JyhFFB}N9*qGndSsFHy>Gq!R#Ux3bvst=)-mae@KC+-)qCj*v;mBwkVo@O z1M-dkWn*fzE4iVIRvKi`c&7tD`*P zf_`|AV-|7*Je3JKBw<4Q-kq~*|B6(|?-gd-l2D4%v}lIv&VZjS~h0Py%b&2S!wDz_45|*@8_O1 zPiq`B6$)`8`Ab<0Jb#{+Ud~7&TlJ;H#zAbrm)Nkb8JS;p+9~4+2AYSs4IJ!vAy{b6 z+PAceg|f>n<#Nl2vH^#V;P9J^1vuDsI$)u(&<8Ri&+IeQ<#_&VY13$>B&oWT1K&vajso*ad5HF zTp*F+R>a%(Femq)%mqy#7HAa9B<}ZGb{VFhzJNmr^i^s&CfFoYa^0z zU~It7YhsMTv~AngXb!s{CX2K2NFO}FpfF_jzH{3M*EYF0XuOHBP}8PO8;ggFiPlD- zCwpi^3S{GvK6rq^fYflH{kC&U)m{h(UqVlQLr)rJW05{ss2ph@R{H9Ls}sV(#iDiF z)``oWT9(K>{zUeAOkA>jN#esxA5PT%26N}lO}O#a8-HM(#SZ4Uzs6pY^VuVDIQUh~ z#wmE5nA07?{z4tW;%8wH2nUVp3oG^2bLGxu|JOau87X;1Ny8orhCMwE`!L%%jqF2Y z_eo|Qjv4>A@#fkau06}1jNe_|`+>Xd`VHn|+Wnl^Ki9nb!Mk=(Bj#Ww$E$>iNV*{sJ{g6P=GSXo54ijo-7I>> zU)i3a2O*=!kA4na@GM=q)UX$udHIc(?b?uyTQ}PEQks`Pd+zMy_>|ixR6kv$_=zZ^ zF;e@(Ude`im``I*7lR99z~|c8%lVqQ$Sv8^_n7uWTfKI*d42usM*HGv?bH|hzA)c> z|BX3(^01wIt#(6gw)){BwHqS0f0$VqG56ElapxU&Pb}6N|Jtcrr|IBg2lX#!Ebu$; zTJg^np0#hUwf0DB3AXRvZuT79W4=57ojHE`xFz8vKgsoLg^Nh-yX*gECPrF+eD8zz z8os5W?@icsf@3F*J<_RDr)HNc9@B51{`|W4*V%QaTEDsTzdP+Z8?A*ro&XMBVoyVT zGvu6gMa);VzLoshKMNzR`H+vHb(ZXpZr56}w%tP;_#(QJ>vF+m?)`IfAj3!29)10X zJyQ7}JAKUJp!26+eQLjhqB--LuPu^}h?uu+N&b&W_+&Ol>dR;iw)U@-|EE3u(09Z7 ze692RnSCo-XLU?&ntoFr){O4gnqaM&(;ob)TlkZ9O}xHCqwmpZe!F5&SCmRx7pe6N zS_9x+XOO(!Gp!i;+PU}_TpSPV9)@= zUVnBifxDi-UALmOcZ^M#u@lA`?YsKy>Sv8))jkILK7;nr3J0-h9QjDUwCLH{XOZ?2&RD8#W-TVZu6(3D}}jvPW8faLGU4I}B0zaF`^ zPBu=I5g4g`YSp@xZLd=E7qlm{`m3Mq`OIwna;vRNuFhzm0{MaJBWdps{K_v!j~-nt zE8)VLBCRL-5VB+3?i#$ThLQF+(tga^k2)p4PGv2>LpmIPINsXVFYp_!&U}`nGg>pR zZ``Sm#6I_mGyF7o_~4kVgbCwxp{)1n2|WQmanK&{ISic@K7Tew+LM4a&4&KBq3o=` zmzwV_yx2S59RB&RIq>5Fv+vNpB%Rrf&aj`jVh-xp%dcZEaRb&rgHNBVgh?P?z$XV( z8hjc;-N9!fGzWZ^La(Dk@fWK{vT?4R^Y!WcZJqYB*SdJ({AThElMUYnu;1tk#%ItT z?%Ids$6tRmhkiO_{(JbpX7|C}X2-rAX4}qf=9Zba__s%k!058+KL)}Kd`d!H!ACf) z1D~VmiIMtszOfL#bz$vRT6_k5CrtjYyZ6$;qX*5`-+yg&M)>-*M<3!dLSd>_u^^Irq*nx5wUY+I4J~X1}gM!v;qE#{EC+Pu7`N z-g+guJ@Sb$90#NBmuvZ7h;M9NPVlJ*O#mO+I_;-$CK!xb#k4ZZpI&YrU-`I=QOVa< z96@`ius1{UcPP^8*RiL8eP4YhwMG8z5pf_7G!Kk&UP!*b!tY>|7krvQ*U^uO!`D6` zd;($ArE3@aO%(Y?+T&3B#b|#s*)G@j4z@j#olA?Y!_WQz|DfDoq0EDofxhE)>OWFW zCuz_3QO5h}pIZHKF^Xv&W3=Cx+5z9#q2g_BA2zkVQEEOz5Ez{#7Bm|jN|*U!_zbxj zn`jF?fM2%;8WL<-WyW*(O6A>Hi`%bP8L7VyJ}0RA@s#y9%=;Kym5v^Vhz`3Mj59i59*%w@cGsCVSTZ2 z>#iG*kv~jbpC8>cdJtnyPsX%~*-Lw5?OY&R7bp&t4j6qyy%`FhL5)LV?~2kE&4=`j z6?a_XG(JP`w3Jh3K8r2*Ol_)S#3Em8e02tV&YSZ~TckeHFxsM(&_UsoNf_;epE*#q zKxKstd68u%a-EQDiuriQB|JdXE6_VxPjPA@T<(?8B=(6^RN*;Ig#l}Zx+NSh= zO81EcT?IZ*LZ`qdd0!^sl$su;6!T8a*3Fzf(-1fI;CpMYu$1~oYl5j$Dan&r_pzlT zUE3;L{INk_KDrcMSo07LO#+{fA-m5M7+HLTQ)+r7Um+!bA*HdS6k(cxcknr;wJE|UoiRFu9vzb|`Ht^_(Z|8? zmldAD?<+1JP$XRZu-T2ir2Cv|)@OyWZf*edEchISjPSVxjMk$^eXw;87n`}+WuNh7AE=C(|8ccD58IuW4K7UrJ)3%@HWw{i0~Wkep?X$FrmIA~we-CjKEWtUy>WtUN9 z1s3(81JGYC29Zjch4Gs`*fyBGcs=U>`&^&(yH4=C)>q$spO5#uj${8~-{1YOW1Wa| ze%F`dla3^Q{I4Cq-|fcB_JyS99lMBAH|#ZgBWnld zuGf>6>n1(VcFQ`FpVu=SHUa$~uPeLvbJFv%_A)6!@3XpN%iQPMa^!PuGw{7u2D*;b z+Z++z>o|Lr#Ib&l_g*UlU7OgX8_K|5o4BMK$=9Bw>)Gz_+F6<-BKcZvhRq=9eUtP+ z4r5;=8Se`wp)imAaUBz1&wG6$Bwh)`PEEc}%F|7c8WhJ*c8_ble;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?$AaJ)3I+^m|Zyj#*?Kp@w(lQdJZf4 z#|IJW5z+S^e9@(6hW6N~{pj8|NO*>1)E=%?nNUAkmv~OY&ZV;m-%?pQ_11)hAr0oAwILrlsGawpxx4D43J&K=n+p3WLnlDsQ$b(9+4 z?mO^hmV^F8MV{4Lx>(Q=aHhQ1){0d*(e&s%G=i5rq3;t{JC zmgbn5Nkl)t@fPH$v;af26lyhH!k+#}_&aBK4baYPbZy$5aFx4}ka&qxl z$=Rh$W;U)>-=S-0=?7FH9dUAd2(q#4TCAHky!$^~;Dz^j|8_wuKc*YzfdAht@Q&ror?91Dm!N03=4=O!a)I*0q~p0g$Fm$pmr$ zb;wD;STDIi$@M%y1>p&_>%?UP($15gou_ue1u0!4(%81;qcIW8NyxFEvXpiJ|H4wz z*mFT(qVx1FKufG11hByuX%lPk4t#WZ{>8ka2efjY`~;AL6vWyQKpJun2nRiZYDij$ zP>4jQXPaP$UC$yIVgGa)jDV;F0l^n(V=HMRB5)20V7&r$jmk{UUIe zVjKroK}JAbD>B`2cwNQ&GDLx8{pg`7hbA~grk|W6LgiZ`8y`{Iq0i>t!3p2}MS6S+ zO_ruKyAElt)rdS>CtF7j{&6rP-#c=7evGMt7B6`7HG|-(WL`bDUAjyn+k$mx$CH;q2Dz4x;cPP$hW=`pFfLO)!jaCL@V2+F)So3}vg|%O*^T1j>C2lx zsURO-zIJC$^$g2byVbRIo^w>UxK}74^TqUiRR#7s_X$e)$6iYG1(PcW7un-va-S&u zHk9-6Zn&>T==A)lM^D~bk{&rFzCi35>UR!ZjQkdSiNX*-;l4z9j*7|q`TBl~Au`5& z+c)*8?#-tgUR$Zd%Q3bs96w6k7q@#tUn`5rj+r@_sAVVLqco|6O{ILX&U-&-cbVa3 zY?ngHR@%l{;`ri%H*0EhBWrGjv!LE4db?HEWb5mu*t@{kv|XwK8?npOshmzf=vZA@ zVSN9sL~!sn?r(AK)Q7Jk2(|M67Uy3I{eRy z_l&Y@A>;vjkWN5I2xvFFTLX0i+`{qz7C_@bo`ZUzDugfq4+>a3?1v%)O+YTd6@Ul7 zAfLfm=nhZ`)P~&v90$&UcF+yXm9sq!qCx3^9gzIcO|Y(js^Fj)Rvq>nQAHI92ap=P z10A4@prk+AGWCb`2)dQYFuR$|H6iDE8p}9a?#nV2}LBCoCf(Xi2@szia7#gY>b|l!-U`c}@ zLdhvQjc!BdLJvYvzzzngnw51yRYCqh4}$oRCy-z|v3Hc*d|?^Wj=l~18*E~*cR_kU z{XsxM1i{V*4GujHQ3DBpl2w4FgFR48Nma@HPgnyKoIEY-MqmMeY=I<%oG~l!f<+FN z1ZY^;10j4M4#HYXP zw5eJpA_y(>uLQ~OucgxDLuf}fVs272FaMxhn4xnDGIyLXnw>Xsd^J8XhcWIwIoQ9} z%FoSJTAGW(SRGwJwb=@pY7r$uQRK3Zd~XbxU)ts!4XsJrCycrWSI?e!IqwqIR8+Jh zlRjZ`UO1I!BtJR_2~7AbkbSm%XQqxEPkz6BTGWx8e}nQ=w7bZ|eVP4?*Tb!$(R)iC z9)&%bS*u(lXqzitAN)Oo=&Ytn>%Hzjc<5liuPi>zC_nw;Z0AE3Y$Jao_Q90R-gl~5 z_xAb2J%eArrC1CN4G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ diff --git a/controller/server/public/favicon.old.ico b/controller/server/public/favicon.old.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?$AaJ)3I+^m|Zyj#*?Kp@w(lQdJZf4 z#|IJW5z+S^e9@(6hW6N~{pj8|NO*>1)E=%?nNUAkmv~OY&ZV;m-%?pQ_11)hAr0oAwILrlsGawpxx4D43J&K=n+p3WLnlDsQ$b(9+4 z?mO^hmV^F8MV{4Lx>(Q=aHhQ1){0d*(e&s%G=i5rq3;t{JC zmgbn5Nkl)t@fPH$v;af26lyhH!k+#}_&aBK4baYPbZy$5aFx4}ka&qxl z$=Rh$W;U)>-=S-0=?7FH9dUAd2(q#4TCAHky!$^~;Dz^j|8_wuKc*YzfdAht@Q&ror?91Dm!N03=4=O!a)I*0q~p0g$Fm$pmr$ zb;wD;STDIi$@M%y1>p&_>%?UP($15gou_ue1u0!4(%81;qcIW8NyxFEvXpiJ|H4wz z*mFT(qVx1FKufG11hByuX%lPk4t#WZ{>8ka2efjY`~;AL6vWyQKpJun2nRiZYDij$ zP>4jQXPaP$UC$yIVgGa)jDV;F0l^n(V=HMRB5)20V7&r$jmk{UUIe zVjKroK}JAbD>B`2cwNQ&GDLx8{pg`7hbA~grk|W6LgiZ`8y`{Iq0i>t!3p2}MS6S+ zO_ruKyAElt)rdS>CtF7j{&6rP-#c=7evGMt7B6`7HG|-(WL`bDUAjyn+k$mx$CH;q2Dz4x;cPP$hW=`pFfLO)!jaCL@V2+F)So3}vg|%O*^T1j>C2lx zsURO-zIJC$^$g2byVbRIo^w>UxK}74^TqUiRR#7s_X$e)$6iYG1(PcW7un-va-S&u zHk9-6Zn&>T==A)lM^D~bk{&rFzCi35>UR!ZjQkdSiNX*-;l4z9j*7|q`TBl~Au`5& z+c)*8?#-tgUR$Zd%Q3bs96w6k7q@#tUn`5rj+r@_sAVVLqco|6O{ILX&U-&-cbVa3 zY?ngHR@%l{;`ri%H*0EhBWrGjv!LE4db?HEWb5mu*t@{kv|XwK8?npOshmzf=vZA@ zVSN9sL~!sn?r(AK)Q7Jk2(|M67Uy3I{eRy z_l&Y@A>;vjkWN5I2xvFFTLX0i+`{qz7C_@bo`ZUzDugfq4+>a3?1v%)O+YTd6@Ul7 zAfLfm=nhZ`)P~&v90$&UcF+yXm9sq!qCx3^9gzIcO|Y(js^Fj)Rvq>nQAHI92ap=P z10A4@prk+AGWCb`2)dQYFuR$|H6iDE8p}9a?#nV2}LBCoCf(Xi2@szia7#gY>b|l!-U`c}@ zLdhvQjc!BdLJvYvzzzngnw51yRYCqh4}$oRCy-z|v3Hc*d|?^Wj=l~18*E~*cR_kU z{XsxM1i{V*4GujHQ3DBpl2w4FgFR48Nma@HPgnyKoIEY-MqmMeY=I<%oG~l!f<+FN z1ZY^;10j4M4#HYXP zw5eJpA_y(>uLQ~OucgxDLuf}fVs272FaMxhn4xnDGIyLXnw>Xsd^J8XhcWIwIoQ9} z%FoSJTAGW(SRGwJwb=@pY7r$uQRK3Zd~XbxU)ts!4XsJrCycrWSI?e!IqwqIR8+Jh zlRjZ`UO1I!BtJR_2~7AbkbSm%XQqxEPkz6BTGWx8e}nQ=w7bZ|eVP4?*Tb!$(R)iC z9)&%bS*u(lXqzitAN)Oo=&Ytn>%Hzjc<5liuPi>zC_nw;Z0AE3Y$Jao_Q90R-gl~5 z_xAb2J%eArrC1CN4G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/controller/server/public/favicon.png b/controller/server/public/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..625f9f2fd2c5fb222a671ebc6b1d978ed084a24f GIT binary patch literal 3332 zcmV+f4g2zmP)05d}fkVlCrSQSxV zSp^kjR|+Bsy1tfTcYPIVEyAh=C|0OiaBH>D4YEEEbpcTjL<9i~5d`EF^3G&3Av2Rq zX1b^Q?2pL|A(;e{dBXZtb)8$u?e25GZ_d4^@4elOh!Ck@jEw=X6+jUYRfOB0P=E`! z16_eJ#shdCKn8%MFuM~nM64hHrUJ-rEB6VfBcX&U+zxbudjNnj2K*{W_`w*{w}}D9 zSaO)%2^k``%VLb_7-Qf#4vewe!tGC}z#=irQmItwjIqjg5mFDJpVR47!s}V^5s?wX zah$#_GCUEI#&KMJxcv$RB2thJ-Id2q54T^TKtu|{ah$G$7~nYWx8e3H6o|+yi{m&Q z;7xfwc65Ave1_F(tqiq4W5$f(h-eUiR3dT#aJ5-05!D_)eq0XJy&`f@*Jw12jIl(Z zlPFJEES8dB-n)(b0sxbVXcT}EL^KRQtcR-()xI;NS{7^ zQW#?8 z<}d*HL^KpY47n?>DJv_pbo3?S1kq}>Hv{<2hZvsneP*-yqd?p%CnqNdz(OMW1AwGn zlHXmOS|W<^aqT1J<>fxJ#)un37-QMK#PC?g*wX-dEy$=*qqG3#5YYkvc>yHfm+jZZ z-|N%U(=}C9Rn48+A88Sil$5jrz;oS12pD6x8;!=@J-M#IV3^P*!u>>~27)F6<~}qR zmP;1e`teo}5$mGfRsb_c_R8ZfYO?pnqNA$sc+xDY9d-fM1KXKZFepK zm}xefKk?L!C_&QF(inhd#+U$fD~9J`arI3DZaR{jkUXW;**dw{PDJ##jZ=Sq#RQh3EMuj^mW1 zq$KUQf^mu2BeGfgz;wv63`eU28%j2yv9U1}V$>7S%K-jiG#aIzwo|LsrUQ71h-L%O z5Rn4lNt?~KE~2t5j^jLwQZ|m`>Z78fqIjO~&-1(rfEIwZU;ln6UQ~=&bu2_tL`zEx zL{Y@|`@cs+Lqo74!DDRzRuj=`lgZR6L%LR2ES4$&3pE=*#*-Vk@ogj-;@+aZdg_mG?t4t#e2rg~G4u9Yz`19OY#V&<%w5aI+#qJ+bT4x@NZ zamOFSB>?l9nwmZf9!pmuV1kSsIWi6IU%ZF>eDrco$k*RY^(Mr}$Ge3PB{)SV%FdVJ zk^G=gyq-+0Asclc!9^qfb5xok0gllwh;k zAW9-crwEti!lrjOp>$(u`*YR;_)BwhbB{A9e{sd2ZZH@)BAO2Otmja;$&Lq*LPWf$ zfq}9;JtsLO8F>YHU>t)eirBq#cei5)V+>C(dm8f|n&@RvnANn+svAGvee4 z-`y1vK`p4U`pwlSno#792C*$GbGpkH&R@XFmsX;pyaE{mGcafFoTf9soVllTW9eQ$ zIrR%F02nc1#5i(Kb`6Lm@_pG>dn@Ye>v8(z>29NA=`%|)u3#K2R*P2%Nt7T;B6e=u ziS_H&!|8OQ@a95{FB*Tc;(Wz~(v78Nzt{`_SXNfnA|iSN-DE$b$Baht!^KGLn+li9 z1$&Df4WfB+nsXspjYm?PGW=N8R^XJavjo02lb#*n8l9MoV z*33)JR_7xnYfJtUC^7>9)v)Yg`w|io#+^NL7Ul+b#CB}ts+Fs7^vF>R9X1q$hYSW7 zV6)m_wOCPEQHgKA`4)D2_e6!N%bR%HM8w9%!fLg8GqPP@?!vqOdKaQ7V#04GAbWWB zX}iTfY2(I?)dAu$U|>t1SsI&HkoQYoLEgaD)>d4+a1p0|K82GfPU7efN0C>M2XliN zKOg@YHk%D#04b3-*n59GYgZwCV7m9=vFt(_mM>e5e*ODl%JeC6Lw&>gPd@tOv4Alc zU@#)Wiq}@~LY#1*XhKoG5GOzo1PE~gqNAfhL|}}8h)`Zuj*{0)@adLMBT|gatW3PH z{DsR;@}h*Fe*6h_b#+KhNwuChcH-{ChY#-wAb$bJ70)5hE_-(K#M>v%(r7dg;sgk4 z0fI(ATwEMD?(&|xciwsjEC03kaCybm5K?-@Jqs~}YUwyIqp6%PWALubNVS>-;_i59o6^+dwyEQ92D@llRcVBUFaqh0H ztveIq1bnvTGc0**Nw+CzFv$0XnfK3xev}@PB%!vZ)^0Q!m+$y|$E(!a3x)|@u7|w% z@{6ppqO#PGW0)P^C!VR})R#rk2wrjCfA4*~viubQp(DQ|^rQ5cI(;fCD=Ho5&Yb(_ zkwZuRL_`7G-Wf_S#PJzm1iFU;2uNFVT4 zW>#i_=oI<4-+H^#h6F`X;BvVjitZ^6e-NjMLuzU&1`Qd6)U;HW=n(4~&5d949KUkU zo;|1ix_AVl*K6tv7B676HMMu_-M#k%##lVyd%KRy<$}ZE0I%W^rHX<|rE(upD#XOZ zASO1(ZDV2(9UTpgMuWuUL?k38AUY;mZfa~YHkcZ|vou;t4<0zJd5f*(w7u1S%+_T4 z{?MUAXZ&p6bqBu%QLELn0Br6kLdWv(;lt6V&y}y6%d#xWvOIp@zI{LV<-`pHzh7x1 zqMbzKA|mgA?yFo;QE|m!FUvAqE?2b6<=SL07&QL+aihR*K^zW86A|t9kl)qO($WHx z$ppYHM!O>`Iy(CAez)WXK|o&mB%-xl3DG`MDl01?ilQevyjD?^y8_|IjetN2vRzS> zQ@%uKe@K!9lgZ>2!*jS?uFN4rhQtQKm+Kt?5k!(CBBC|jMTe(cQ&V$RQIt)xEIZo? zv#qSG%n=A*u6G1%Z!gdDv5c`Z05YzYaRJC_ZEZb~o13eZBq_z|bXJ}{d)65cN3L@O zZ0DjZ%MPCB?*#A-fRwK4k$b^w8W9}_(A0MPiZ%rFOAfLupCY2kL}ckI1#Uai0(svX z2?77KhN37(iD()T*}EB2{%=0n*HZ-LTPKR5>?fibL?m{RahZZ~-x~ozePM?&Rsdi< zV=TAbz+TN5(@BzK4cd*bV+8eUK;+)ipGQPX6h)~bqLW0l_*XHy#{U3Vo~jsR99TsF O0000 - - - - CoreUI for React + + + + ORCA +```js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +``` + +### Output + +```js +foo( + reallyLongArg(), + omgSoManyParameters(), + IShouldRefactorThis(), + isThereSeriouslyAnotherOne() +); +``` + +Prettier can be run [in your editor](http://prettier.io/docs/en/editors.html) on-save, in a [pre-commit hook](https://prettier.io/docs/en/precommit.html), or in [CI environments](https://prettier.io/docs/en/cli.html#list-different) to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again! + +--- + +**[Documentation](https://prettier.io/docs/en/)** + + +[Install](https://prettier.io/docs/en/install.html) · +[Options](https://prettier.io/docs/en/options.html) · +[CLI](https://prettier.io/docs/en/cli.html) · +[API](https://prettier.io/docs/en/api.html) + +**[Playground](https://prettier.io/playground/)** + +--- + +## Badge + +Show the world you're using _Prettier_ → [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) + +```md +[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/node_modules/prettier/bin-prettier.js b/node_modules/prettier/bin-prettier.js new file mode 100644 index 0000000..1a32108 --- /dev/null +++ b/node_modules/prettier/bin-prettier.js @@ -0,0 +1,43866 @@ +#!/usr/bin/env node +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var fs = _interopDefault(require('fs')); +var os = _interopDefault(require('os')); +var path = _interopDefault(require('path')); +var assert = _interopDefault(require('assert')); +var util = _interopDefault(require('util')); +var events = _interopDefault(require('events')); +var thirdParty = require('./third-party'); +var thirdParty__default = thirdParty['default']; +var readline = _interopDefault(require('readline')); + +var name = "prettier"; +var version$1 = "1.15.2"; +var description = "Prettier is an opinionated code formatter"; +var bin = { + "prettier": "./bin/prettier.js" +}; +var repository = "prettier/prettier"; +var homepage = "https://prettier.io"; +var author = "James Long"; +var license = "MIT"; +var main = "./index.js"; +var engines = { + "node": ">=6" +}; +var dependencies = { + "@angular/compiler": "6.1.10", + "@babel/code-frame": "7.0.0-beta.46", + "@babel/parser": "7.1.5", + "@glimmer/syntax": "0.30.3", + "@iarna/toml": "2.0.0", + "angular-estree-parser": "1.1.5", + "angular-html-parser": "1.0.0", + "camelcase": "4.1.0", + "chalk": "2.1.0", + "cjk-regex": "2.0.0", + "cosmiconfig": "5.0.6", + "dashify": "0.2.2", + "dedent": "0.7.0", + "diff": "3.2.0", + "editorconfig": "0.15.2", + "editorconfig-to-prettier": "0.1.0", + "emoji-regex": "6.5.1", + "escape-string-regexp": "1.0.5", + "esutils": "2.0.2", + "find-parent-dir": "0.3.0", + "find-project-root": "1.1.1", + "flow-parser": "0.84.0", + "get-stream": "3.0.0", + "globby": "6.1.0", + "graphql": "0.13.2", + "html-element-attributes": "2.0.0", + "html-styles": "1.0.0", + "html-tag-names": "1.1.2", + "ignore": "3.3.7", + "jest-docblock": "23.2.0", + "json-stable-stringify": "1.0.1", + "leven": "2.1.0", + "lines-and-columns": "1.1.6", + "linguist-languages": "6.2.1-dev.20180706", + "lodash.uniqby": "4.7.0", + "mem": "1.1.0", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "n-readlines": "1.0.0", + "normalize-path": "3.0.0", + "parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee", + "postcss-less": "1.1.5", + "postcss-media-query-parser": "0.2.3", + "postcss-scss": "1.0.6", + "postcss-selector-parser": "2.2.3", + "postcss-values-parser": "1.5.0", + "regexp-util": "1.2.2", + "remark-math": "1.0.4", + "remark-parse": "5.0.0", + "resolve": "1.5.0", + "semver": "5.4.1", + "string-width": "2.1.1", + "typescript": "3.0.1", + "typescript-estree": "1.0.0", + "unicode-regex": "2.0.0", + "unified": "6.1.6", + "vnopts": "1.0.2", + "yaml": "1.0.0-rc.8", + "yaml-unist-parser": "1.0.0-rc.4" +}; +var devDependencies = { + "@babel/cli": "7.1.5", + "@babel/core": "7.1.5", + "@babel/preset-env": "7.1.5", + "babel-loader": "8.0.4", + "benchmark": "2.1.4", + "builtin-modules": "2.0.0", + "codecov": "2.2.0", + "cross-env": "5.0.5", + "eslint": "4.18.2", + "eslint-config-prettier": "2.9.0", + "eslint-friendly-formatter": "3.0.0", + "eslint-plugin-import": "2.9.0", + "eslint-plugin-prettier": "2.6.0", + "eslint-plugin-react": "7.7.0", + "execa": "0.10.0", + "jest": "23.3.0", + "jest-junit": "5.0.0", + "jest-snapshot-serializer-ansi": "1.0.0", + "jest-snapshot-serializer-raw": "1.1.0", + "jest-watch-typeahead": "0.1.0", + "mkdirp": "0.5.1", + "prettier": "1.15.1", + "prettylint": "1.0.0", + "rimraf": "2.6.2", + "rollup": "0.47.6", + "rollup-plugin-alias": "1.4.0", + "rollup-plugin-babel": "4.0.0-beta.4", + "rollup-plugin-commonjs": "8.2.6", + "rollup-plugin-json": "2.1.1", + "rollup-plugin-node-builtins": "2.0.0", + "rollup-plugin-node-globals": "1.1.0", + "rollup-plugin-node-resolve": "2.0.0", + "rollup-plugin-replace": "1.2.1", + "rollup-plugin-uglify": "3.0.0", + "shelljs": "0.8.1", + "snapshot-diff": "0.4.0", + "strip-ansi": "4.0.0", + "tempy": "0.2.1", + "webpack": "3.12.0" +}; +var resolutions = { + "@babel/code-frame": "7.0.0-beta.46" +}; +var scripts = { + "prepublishOnly": "echo \"Error: must publish from dist/\" && exit 1", + "prepare-release": "yarn && yarn build && yarn test:dist", + "test": "jest", + "test:dist": "node ./scripts/test-dist.js", + "test-integration": "jest tests_integration", + "perf-repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "perf-repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "perf-benchmark": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-benchmark --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "lint": "cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter", + "lint-docs": "prettylint {.,docs,website,website/blog}/*.md", + "build": "node --max-old-space-size=2048 ./scripts/build/build.js", + "build-docs": "node ./scripts/build-docs.js", + "check-deps": "node ./scripts/check-deps.js" +}; +var _package = { + name: name, + version: version$1, + description: description, + bin: bin, + repository: repository, + homepage: homepage, + author: author, + license: license, + main: main, + engines: engines, + dependencies: dependencies, + devDependencies: devDependencies, + resolutions: resolutions, + scripts: scripts +}; + +var _package$1 = Object.freeze({ + name: name, + version: version$1, + description: description, + bin: bin, + repository: repository, + homepage: homepage, + author: author, + license: license, + main: main, + engines: engines, + dependencies: dependencies, + devDependencies: devDependencies, + resolutions: resolutions, + scripts: scripts, + default: _package +}); + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + +function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var base = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports['default'] = + /*istanbul ignore end*/ + Diff; + + function Diff() {} + + Diff.prototype = { + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + diff: function diff(oldString, newString) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + var callback = options.callback; + + if (typeof options === 'function') { + callback = options; + options = {}; + } + + this.options = options; + var self = this; + + function done(value) { + if (callback) { + setTimeout(function () { + callback(undefined, value); + }, 0); + return true; + } else { + return value; + } + } // Allow subclasses to massage the input prior to running + + + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, + oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + // Identity per the equality and tokenizer + return done([{ + value: this.join(newString), + count: newString.length + }]); + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = + /*istanbul ignore start*/ + void 0; + + var addPath = bestPath[diagonalPath - 1], + removePath = bestPath[diagonalPath + 1], + _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen, + canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + + + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list + + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } + + _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done + + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } + + editLength++; + } // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced. + + + if (callback) { + (function exec() { + setTimeout(function () { + // This should not happen, but we want to be safe. + + /* istanbul ignore next */ + if (editLength > maxEditLength) { + return callback(); + } + + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + pushComponent: function pushComponent(components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; + } else { + components.push({ + count: 1, + added: added, + removed: removed + }); + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, + oldLen = oldString.length, + newPos = basePath.newPos, + oldPos = newPos - diagonalPath, + commonCount = 0; + + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + + basePath.newPos = newPos; + return oldPos; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + equals: function equals(left, right) { + return left === right; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + removeEmpty: function removeEmpty(array) { + var ret = []; + + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + + return ret; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + castInput: function castInput(value) { + return value; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + tokenize: function tokenize(value) { + return value.split(''); + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + join: function join(chars) { + return chars.join(''); + } + }; + + function buildValues(diff, components, newString, oldString, useLongestToken) { + var componentPos = 0, + componentLen = components.length, + newPos = 0, + oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = diff.join(value); + } else { + component.value = diff.join(newString.slice(newPos, newPos + component.count)); + } + + newPos += component.count; // Common case + + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; // Reverse add and remove so removes are output first to match common convention + // The diffing algorithm is tied to add then remove output and this is the simplest + // route to get the desired output with minimal overhead. + + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } // Special case handle for when one terminal is ignored. For this case we merge the + // terminal into the prior string and drop the change. + + + var lastComponent = components[componentLen - 1]; + + if (componentLen > 1 && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + + return components; + } + + function clonePath(path$$1) { + return { + newPos: path$$1.newPos, + components: path$$1.components.slice(0) + }; + } +}); +unwrapExports(base); + +var character = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.characterDiff = undefined; + exports. + /*istanbul ignore end*/ + diffChars = diffChars; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var characterDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + characterDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + function diffChars(oldStr, newStr, callback) { + return characterDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(character); + +var params = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + generateOptions = generateOptions; + + function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } else if (options) { + for (var name in options) { + /* istanbul ignore else */ + if (options.hasOwnProperty(name)) { + defaults[name] = options[name]; + } + } + } + + return defaults; + } +}); +unwrapExports(params); + +var word = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.wordDiff = undefined; + exports. + /*istanbul ignore end*/ + diffWords = diffWords; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWordsWithSpace = diffWordsWithSpace; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode + // + // Ranges and exceptions: + // Latin-1 Supplement, 0080–00FF + // - U+00D7 × Multiplication sign + // - U+00F7 ÷ Division sign + // Latin Extended-A, 0100–017F + // Latin Extended-B, 0180–024F + // IPA Extensions, 0250–02AF + // Spacing Modifier Letters, 02B0–02FF + // - U+02C7 ˇ ˇ Caron + // - U+02D8 ˘ ˘ Breve + // - U+02D9 ˙ ˙ Dot Above + // - U+02DA ˚ ˚ Ring Above + // - U+02DB ˛ ˛ Ogonek + // - U+02DC ˜ ˜ Small Tilde + // - U+02DD ˝ ˝ Double Acute Accent + // Latin Extended Additional, 1E00–1EFF + + + var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; + var reWhitespace = /\S/; + var wordDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + wordDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + wordDiff.equals = function (left, right) { + return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); + }; + + wordDiff.tokenize = function (value) { + var tokens = value.split(/(\s+|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. + + for (var i = 0; i < tokens.length - 1; i++) { + // If we have an empty string in the next field and we have only word chars before and after, merge + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + + return tokens; + }; + + function diffWords(oldStr, newStr, callback) { + var options = + /*istanbul ignore start*/ + (0, params.generateOptions + /*istanbul ignore end*/ + )(callback, { + ignoreWhitespace: true + }); + return wordDiff.diff(oldStr, newStr, options); + } + + function diffWordsWithSpace(oldStr, newStr, callback) { + return wordDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(word); + +var line = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.lineDiff = undefined; + exports. + /*istanbul ignore end*/ + diffLines = diffLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffTrimmedLines = diffTrimmedLines; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var lineDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + lineDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + lineDiff.tokenize = function (value) { + var retLines = [], + linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line + + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } // Merge the content and line separators into single tokens + + + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + + retLines.push(line); + } + } + + return retLines; + }; + + function diffLines(oldStr, newStr, callback) { + return lineDiff.diff(oldStr, newStr, callback); + } + + function diffTrimmedLines(oldStr, newStr, callback) { + var options = + /*istanbul ignore start*/ + (0, params.generateOptions + /*istanbul ignore end*/ + )(callback, { + ignoreWhitespace: true + }); + return lineDiff.diff(oldStr, newStr, options); + } +}); +unwrapExports(line); + +var sentence = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.sentenceDiff = undefined; + exports. + /*istanbul ignore end*/ + diffSentences = diffSentences; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var sentenceDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + sentenceDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + sentenceDiff.tokenize = function (value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); + }; + + function diffSentences(oldStr, newStr, callback) { + return sentenceDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(sentence); + +var css = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.cssDiff = undefined; + exports. + /*istanbul ignore end*/ + diffCss = diffCss; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var cssDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + cssDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + cssDiff.tokenize = function (value) { + return value.split(/([{}:;,]|\s+)/); + }; + + function diffCss(oldStr, newStr, callback) { + return cssDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(css); + +var json = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.jsonDiff = undefined; + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + }; + + exports. + /*istanbul ignore end*/ + diffJson = diffJson; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + canonicalize = canonicalize; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var objectPrototypeToString = Object.prototype.toString; + var jsonDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + jsonDiff = new + /*istanbul ignore start*/ + _base2['default'](); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a + // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + + jsonDiff.useLongestToken = true; + jsonDiff.tokenize = + /*istanbul ignore start*/ + line.lineDiff. + /*istanbul ignore end*/ + tokenize; + + jsonDiff.castInput = function (value) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + undefinedReplacement = this.options.undefinedReplacement; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value), function (k, v) { + if (typeof v === 'undefined') { + return undefinedReplacement; + } + + return v; + }, ' '); + }; + + jsonDiff.equals = function (left, right) { + return ( + /*istanbul ignore start*/ + _base2['default']. + /*istanbul ignore end*/ + prototype.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')) + ); + }; + + function diffJson(oldObj, newObj, options) { + return jsonDiff.diff(oldObj, newObj, options); + } // This function handles the presence of circular references by bailing out when encountering an + // object that is already on the "stack" of items being processed. + + + function canonicalize(obj, stack, replacementStack) { + stack = stack || []; + replacementStack = replacementStack || []; + var i = + /*istanbul ignore start*/ + void 0; + + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + + var canonicalizedObj = + /*istanbul ignore start*/ + void 0; + + if ('[object Array]' === objectPrototypeToString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack); + } + + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + + if ( + /*istanbul ignore start*/ + (typeof + /*istanbul ignore end*/ + obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + var sortedKeys = [], + key = + /*istanbul ignore start*/ + void 0; + + for (key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(key)) { + sortedKeys.push(key); + } + } + + sortedKeys.sort(); + + for (i = 0; i < sortedKeys.length; i += 1) { + key = sortedKeys[i]; + canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack); + } + + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + + return canonicalizedObj; + } +}); +unwrapExports(json); + +var array = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.arrayDiff = undefined; + exports. + /*istanbul ignore end*/ + diffArrays = diffArrays; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var arrayDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + arrayDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + arrayDiff.tokenize = arrayDiff.join = function (value) { + return value.slice(); + }; + + function diffArrays(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); + } +}); +unwrapExports(array); + +var parse = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + parsePatch = parsePatch; + + function parsePatch(uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], + list = [], + i = 0; + + function parseIndex() { + var index = {}; + list.push(index); // Parse diff metadata + + while (i < diffstr.length) { + var line = diffstr[i]; // File header found, end parsing diff metadata + + if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { + break; + } // Diff index + + + var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); + + if (header) { + index.index = header[1]; + } + + i++; + } // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + + + parseFileHeader(index); + parseFileHeader(index); // Parse hunks + + index.hunks = []; + + while (i < diffstr.length) { + var _line = diffstr[i]; + + if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { + break; + } else if (/^@@/.test(_line)) { + index.hunks.push(parseHunk()); + } else if (_line && options.strict) { + // Ignore unexpected content unless in strict mode + throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); + } else { + i++; + } + } + } // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + + + function parseFileHeader(index) { + var headerPattern = /^(---|\+\+\+)\s+([\S ]*)(?:\t(.*?)\s*)?$/; + var fileHeader = headerPattern.exec(diffstr[i]); + + if (fileHeader) { + var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; + index[keyPrefix + 'FileName'] = fileHeader[2]; + index[keyPrefix + 'Header'] = fileHeader[3]; + i++; + } + } // Parses a hunk + // This assumes that we are at the start of a hunk. + + + function parseHunk() { + var chunkHeaderIndex = i, + chunkHeaderLine = diffstr[i++], + chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + var hunk = { + oldStart: +chunkHeader[1], + oldLines: +chunkHeader[2] || 1, + newStart: +chunkHeader[3], + newLines: +chunkHeader[4] || 1, + lines: [], + linedelimiters: [] + }; + var addCount = 0, + removeCount = 0; + + for (; i < diffstr.length; i++) { + // Lines starting with '---' could be mistaken for the "remove line" operation + // But they could be the header for the next file. Therefore prune such cases out. + if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { + break; + } + + var operation = diffstr[i][0]; + + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + hunk.linedelimiters.push(delimiters[i] || '\n'); + + if (operation === '+') { + addCount++; + } else if (operation === '-') { + removeCount++; + } else if (operation === ' ') { + addCount++; + removeCount++; + } + } else { + break; + } + } // Handle the empty block count case + + + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } // Perform optional sanity checking + + + if (options.strict) { + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + } + + return hunk; + } + + while (i < diffstr.length) { + parseIndex(); + } + + return list; + } +}); +unwrapExports(parse); + +var distanceIterator = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + "use strict"; + + exports.__esModule = true; + + exports["default"] = + /*istanbul ignore end*/ + function (start, minLine, maxLine) { + var wantForward = true, + backwardExhausted = false, + forwardExhausted = false, + localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } else { + wantForward = false; + } // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + + + if (start + localOffset <= maxLine) { + return localOffset; + } + + forwardExhausted = true; + } + + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + + + if (minLine <= start - localOffset) { + return -localOffset++; + } + + backwardExhausted = true; + return iterator(); + } // We tried to fit hunk before text beginning and beyond text lenght, then + // hunk can't fit on the text. Return undefined + + }; + }; +}); +unwrapExports(distanceIterator); + +var apply = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + applyPatch = applyPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatches = applyPatches; + /*istanbul ignore start*/ + + var _distanceIterator2 = _interopRequireDefault(distanceIterator); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + function applyPatch(source, uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (0, parse.parsePatch + /*istanbul ignore end*/ + )(uniDiff); + } + + if (Array.isArray(uniDiff)) { + if (uniDiff.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + + uniDiff = uniDiff[0]; + } // Apply the diff to the input + + + var lines = source.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], + hunks = uniDiff.hunks, + compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) + /*istanbul ignore start*/ + { + return ( + /*istanbul ignore end*/ + line === patchContent + ); + }, + errorCount = 0, + fuzzFactor = options.fuzzFactor || 0, + minLine = 0, + offset = 0, + removeEOFNL = + /*istanbul ignore start*/ + void 0 + /*istanbul ignore end*/ + , + addEOFNL = + /*istanbul ignore start*/ + void 0; + /** + * Checks if the hunk exactly fits on the provided location + */ + + + function hunkFits(hunk, toPos) { + for (var j = 0; j < hunk.lines.length; j++) { + var line = hunk.lines[j], + operation = line[0], + content = line.substr(1); + + if (operation === ' ' || operation === '-') { + // Context sanity check + if (!compareLine(toPos + 1, lines[toPos], operation, content)) { + errorCount++; + + if (errorCount > fuzzFactor) { + return false; + } + } + + toPos++; + } + } + + return true; + } // Search best fit offsets for each hunk based on the previous ones + + + for (var i = 0; i < hunks.length; i++) { + var hunk = hunks[i], + maxLine = lines.length - hunk.oldLines, + localOffset = 0, + toPos = offset + hunk.oldStart - 1; + var iterator = + /*istanbul ignore start*/ + (0, _distanceIterator2['default'] + /*istanbul ignore end*/ + )(toPos, minLine, maxLine); + + for (; localOffset !== undefined; localOffset = iterator()) { + if (hunkFits(hunk, toPos + localOffset)) { + hunk.offset = offset += localOffset; + break; + } + } + + if (localOffset === undefined) { + return false; + } // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + + + minLine = hunk.offset + hunk.oldStart + hunk.oldLines; + } // Apply patch hunks + + + for (var _i = 0; _i < hunks.length; _i++) { + var _hunk = hunks[_i], + _toPos = _hunk.offset + _hunk.newStart - 1; + + if (_hunk.newLines == 0) { + _toPos++; + } + + for (var j = 0; j < _hunk.lines.length; j++) { + var line = _hunk.lines[j], + operation = line[0], + content = line.substr(1), + delimiter = _hunk.linedelimiters[j]; + + if (operation === ' ') { + _toPos++; + } else if (operation === '-') { + lines.splice(_toPos, 1); + delimiters.splice(_toPos, 1); + /* istanbul ignore else */ + } else if (operation === '+') { + lines.splice(_toPos, 0, content); + delimiters.splice(_toPos, 0, delimiter); + _toPos++; + } else if (operation === '\\') { + var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; + + if (previousOperation === '+') { + removeEOFNL = true; + } else if (previousOperation === '-') { + addEOFNL = true; + } + } + } + } // Handle EOFNL insertion/removal + + + if (removeEOFNL) { + while (!lines[lines.length - 1]) { + lines.pop(); + delimiters.pop(); + } + } else if (addEOFNL) { + lines.push(''); + delimiters.push('\n'); + } + + for (var _k = 0; _k < lines.length - 1; _k++) { + lines[_k] = lines[_k] + delimiters[_k]; + } + + return lines.join(''); + } // Wrapper that supports multiple file patches via callbacks. + + + function applyPatches(uniDiff, options) { + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (0, parse.parsePatch + /*istanbul ignore end*/ + )(uniDiff); + } + + var currentIndex = 0; + + function processIndex() { + var index = uniDiff[currentIndex++]; + + if (!index) { + return options.complete(); + } + + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + + var updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + + processIndex(); + }); + }); + } + + processIndex(); + } +}); +unwrapExports(apply); + +var create = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + structuredPatch = structuredPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createTwoFilesPatch = createTwoFilesPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createPatch = createPatch; + /*istanbul ignore start*/ + + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return Array.from(arr); + } + } + /*istanbul ignore end*/ + + + function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (!options) { + options = {}; + } + + if (typeof options.context === 'undefined') { + options.context = 4; + } + + var diff = + /*istanbul ignore start*/ + (0, line.diffLines + /*istanbul ignore end*/ + )(oldStr, newStr, options); + diff.push({ + value: '', + lines: [] + }); // Append an empty value to make cleanup easier + + function contextLines(lines) { + return lines.map(function (entry) { + return ' ' + entry; + }); + } + + var hunks = []; + var oldRangeStart = 0, + newRangeStart = 0, + curRange = [], + oldLine = 1, + newLine = 1; + /*istanbul ignore start*/ + + var _loop = function _loop( + /*istanbul ignore end*/ + i) { + var current = diff[i], + lines = current.lines || current.value.replace(/\n$/, '').split('\n'); + current.lines = lines; + + if (current.added || current.removed) { + /*istanbul ignore start*/ + var _curRange; + /*istanbul ignore end*/ + // If we have previous context, start with that + + + if (!oldRangeStart) { + var prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + + if (prev) { + curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } // Output our changes + + /*istanbul ignore start*/ + + + (_curRange = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + lines.map(function (entry) { + return (current.added ? '+' : '-') + entry; + }))); // Track the updated file position + + + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } + } else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= options.context * 2 && i < diff.length - 2) { + /*istanbul ignore start*/ + var _curRange2; + /*istanbul ignore end*/ + // Overlapping + + /*istanbul ignore start*/ + + + (_curRange2 = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange2 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + contextLines(lines))); + } else { + /*istanbul ignore start*/ + var _curRange3; + /*istanbul ignore end*/ + // end the range and output + + + var contextSize = Math.min(lines.length, options.context); + /*istanbul ignore start*/ + + (_curRange3 = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange3 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + contextLines(lines.slice(0, contextSize)))); + + var hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + + if (i >= diff.length - 2 && lines.length <= options.context) { + // EOF is inside this hunk + var oldEOFNewline = /\n$/.test(oldStr); + var newEOFNewline = /\n$/.test(newStr); + + if (lines.length == 0 && !oldEOFNewline) { + // special case: old has no eol and no trailing context; no-nl can end up before adds + curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); + } else if (!oldEOFNewline || !newEOFNewline) { + curRange.push('\\ No newline at end of file'); + } + } + + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + + oldLine += lines.length; + newLine += lines.length; + } + }; + + for (var i = 0; i < diff.length; i++) { + /*istanbul ignore start*/ + _loop( + /*istanbul ignore end*/ + i); + } + + return { + oldFileName: oldFileName, + newFileName: newFileName, + oldHeader: oldHeader, + newHeader: newHeader, + hunks: hunks + }; + } + + function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + var ret = []; + + if (oldFileName == newFileName) { + ret.push('Index: ' + oldFileName); + } + + ret.push('==================================================================='); + ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); + ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); + + for (var i = 0; i < diff.hunks.length; i++) { + var hunk = diff.hunks[i]; + ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); + ret.push.apply(ret, hunk.lines); + } + + return ret.join('\n') + '\n'; + } + + function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); + } +}); +unwrapExports(create); + +var dmp = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + "use strict"; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + convertChangesToDMP = convertChangesToDMP; // See: http://code.google.com/p/google-diff-match-patch/wiki/API + + function convertChangesToDMP(changes) { + var ret = [], + change = + /*istanbul ignore start*/ + void 0 + /*istanbul ignore end*/ + , + operation = + /*istanbul ignore start*/ + void 0; + + for (var i = 0; i < changes.length; i++) { + change = changes[i]; + + if (change.added) { + operation = 1; + } else if (change.removed) { + operation = -1; + } else { + operation = 0; + } + + ret.push([operation, change.value]); + } + + return ret; + } +}); +unwrapExports(dmp); + +var xml = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + convertChangesToXML = convertChangesToXML; + + function convertChangesToXML(changes) { + var ret = []; + + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + + ret.push(escapeHTML(change.value)); + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + } + + return ret.join(''); + } + + function escapeHTML(s) { + var n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; + } +}); +unwrapExports(xml); + +var lib = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.diffArrays = exports.diffJson = exports.diffCss = exports.diffSentences = exports.diffTrimmedLines = exports.diffLines = exports.diffWordsWithSpace = exports.diffWords = exports.diffChars = exports.Diff = undefined; + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + + exports. + /*istanbul ignore end*/ + Diff = _base2['default']; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffChars = character.diffChars; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWords = word.diffWords; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWordsWithSpace = word.diffWordsWithSpace; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffLines = line.diffLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffTrimmedLines = line.diffTrimmedLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffSentences = sentence.diffSentences; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffCss = css.diffCss; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffJson = json.diffJson; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffArrays = array.diffArrays; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + structuredPatch = create.structuredPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createTwoFilesPatch = create.createTwoFilesPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createPatch = create.createPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatch = apply.applyPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatches = apply.applyPatches; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + parsePatch = parse.parsePatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + convertChangesToDMP = dmp.convertChangesToDMP; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + convertChangesToXML = xml.convertChangesToXML; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + canonicalize = json.canonicalize; + /* See LICENSE file for terms of use */ + + /* + * Text diff implementation. + * + * This library supports the following APIS: + * JsDiff.diffChars: Character by character diff + * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace + * JsDiff.diffLines: Line based diff + * + * JsDiff.diffCss: Diff targeted at CSS content + * + * These methods are based on the implementation proposed in + * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). + * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 + */ +}); +unwrapExports(lib); + +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ +var normalizePath = function normalizePath(path$$1, stripTrailing) { + if (typeof path$$1 !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path$$1 === '\\' || path$$1 === '/') return '/'; + var len = path$$1.length; + if (len <= 1) return path$$1; // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + + var prefix = ''; + + if (len > 4 && path$$1[3] === '\\') { + var ch = path$$1[2]; + + if ((ch === '?' || ch === '.') && path$$1.slice(0, 2) === '\\\\') { + path$$1 = path$$1.slice(2); + prefix = '//'; + } + } + + var segs = path$$1.split(/[/\\]+/); + + if (stripTrailing !== false && segs[segs.length - 1] === '') { + segs.pop(); + } + + return prefix + segs.join('/'); +}; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); +} + +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !_isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct(Class, arguments, _getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return _setPrototypeOf(Wrapper, Class); + }; + + return _wrapNativeSuper(Class); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _getPrototypeOf(object); + if (object === null) break; + } + + return object; +} + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = _superPropBase(target, property); + + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} + +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); +} + +function _toArray(arr) { + return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); +} + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} + +function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + + return typeof key === "symbol" ? key : String(key); +} + +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + + keys.push(element.key); +} + +function _fromElementDescriptor(element) { + var obj = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + return obj; +} + +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + return _toArray(elementObjects).map(function (elementObject) { + var element = _toElementDescriptor(elementObject); + + _disallowProperty(elementObject, "finisher", "An element descriptor"); + + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} + +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + + if (kind !== "method" && kind !== "field") { + throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"'); + } + + var key = _toPropertyKey(elementObject.key); + + var placement = String(elementObject.placement); + + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"'); + } + + var descriptor = elementObject.descriptor; + + _disallowProperty(elementObject, "elements", "An element descriptor"); + + var element = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor) + }; + + if (kind !== "field") { + _disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + + element.initializer = elementObject.initializer; + } + + return element; +} + +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + + var finisher = _optionalCallableProperty(elementObject, "finisher"); + + var extras = _toElementDescriptors(elementObject.extras); + + return { + element: element, + finisher: finisher, + extras: extras + }; +} + +function _fromClassDescriptor(elements) { + var obj = { + kind: "class", + elements: elements.map(_fromElementDescriptor) + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + return obj; +} + +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + + if (kind !== "class") { + throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"'); + } + + _disallowProperty(obj, "key", "A class descriptor"); + + _disallowProperty(obj, "placement", "A class descriptor"); + + _disallowProperty(obj, "descriptor", "A class descriptor"); + + _disallowProperty(obj, "initializer", "A class descriptor"); + + _disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + + var elements = _toElementDescriptors(obj.elements); + + return { + elements: elements, + finisher: finisher + }; +} + +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } +} + +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} + +/** + * @class + */ + + +var LineByLine = +/*#__PURE__*/ +function () { + function LineByLine(file, options) { + _classCallCheck(this, LineByLine); + + options = options || {}; + if (!options.readChunk) options.readChunk = 1024; + + if (!options.newLineCharacter) { + options.newLineCharacter = 0x0a; //linux line ending + } else { + options.newLineCharacter = options.newLineCharacter.charCodeAt(0); + } + + if (typeof file === 'number') { + this.fd = file; + } else { + this.fd = fs.openSync(file, 'r'); + } + + this.options = options; + this.newLineCharacter = options.newLineCharacter; + this.reset(); + } + + _createClass(LineByLine, [{ + key: "_searchInBuffer", + value: function _searchInBuffer(buffer, hexNeedle) { + var found = -1; + + for (var i = 0; i <= buffer.length; i++) { + var b_byte = buffer[i]; + + if (b_byte === hexNeedle) { + found = i; + break; + } + } + + return found; + } + }, { + key: "reset", + value: function reset() { + this.eofReached = false; + this.linesCache = []; + this.fdPosition = 0; + } + }, { + key: "close", + value: function close() { + fs.closeSync(this.fd); + this.fd = null; + } + }, { + key: "_extractLines", + value: function _extractLines(buffer) { + var line; + var lines = []; + var bufferPosition = 0; + var lastNewLineBufferPosition = 0; + + while (true) { + var bufferPositionValue = buffer[bufferPosition++]; + + if (bufferPositionValue === this.newLineCharacter) { + line = buffer.slice(lastNewLineBufferPosition, bufferPosition); + lines.push(line); + lastNewLineBufferPosition = bufferPosition; + } else if (!bufferPositionValue) { + break; + } + } + + var leftovers = buffer.slice(lastNewLineBufferPosition, bufferPosition); + + if (leftovers.length) { + lines.push(leftovers); + } + + return lines; + } + }, { + key: "_readChunk", + value: function _readChunk(lineLeftovers) { + var totalBytesRead = 0; + var bytesRead; + var buffers = []; + + do { + var readBuffer = new Buffer(this.options.readChunk); + bytesRead = fs.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition); + totalBytesRead = totalBytesRead + bytesRead; + this.fdPosition = this.fdPosition + bytesRead; + buffers.push(readBuffer); + } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1); + + var bufferData = Buffer.concat(buffers); + + if (bytesRead < this.options.readChunk) { + this.eofReached = true; + bufferData = bufferData.slice(0, totalBytesRead); + } + + if (totalBytesRead) { + this.linesCache = this._extractLines(bufferData); + + if (lineLeftovers) { + this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]); + } + } + + return totalBytesRead; + } + }, { + key: "next", + value: function next() { + if (!this.fd) return false; + var line = false; + + if (this.eofReached && this.linesCache.length === 0) { + return line; + } + + var bytesRead; + + if (!this.linesCache.length) { + bytesRead = this._readChunk(); + } + + if (this.linesCache.length) { + line = this.linesCache.shift(); + var lastLineCharacter = line[line.length - 1]; + + if (lastLineCharacter !== 0x0a) { + bytesRead = this._readChunk(line); + + if (bytesRead) { + line = this.linesCache.shift(); + } + } + } + + if (this.eofReached && this.linesCache.length === 0) { + this.close(); + } + + if (line && line[line.length - 1] === this.newLineCharacter) { + line = line.slice(0, line.length - 1); + } + + return line; + } + }]); + + return LineByLine; +}(); + +var readlines = LineByLine; + +var ConfigError = +/*#__PURE__*/ +function (_Error) { + _inherits(ConfigError, _Error); + + function ConfigError() { + _classCallCheck(this, ConfigError); + + return _possibleConstructorReturn(this, _getPrototypeOf(ConfigError).apply(this, arguments)); + } + + return ConfigError; +}(_wrapNativeSuper(Error)); + +var DebugError = +/*#__PURE__*/ +function (_Error2) { + _inherits(DebugError, _Error2); + + function DebugError() { + _classCallCheck(this, DebugError); + + return _possibleConstructorReturn(this, _getPrototypeOf(DebugError).apply(this, arguments)); + } + + return DebugError; +}(_wrapNativeSuper(Error)); + +var UndefinedParserError$1 = +/*#__PURE__*/ +function (_Error3) { + _inherits(UndefinedParserError, _Error3); + + function UndefinedParserError() { + _classCallCheck(this, UndefinedParserError); + + return _possibleConstructorReturn(this, _getPrototypeOf(UndefinedParserError).apply(this, arguments)); + } + + return UndefinedParserError; +}(_wrapNativeSuper(Error)); + +var errors = { + ConfigError, + DebugError, + UndefinedParserError: UndefinedParserError$1 +}; + +var semver = createCommonjsModule(function (module, exports) { + exports = module.exports = SemVer; // The debug function is excluded entirely from the minified version. + + /* nomin */ + + var debug; + /* nomin */ + + if (typeof process === 'object' && + /* nomin */ + process.env && + /* nomin */ + process.env.NODE_DEBUG && + /* nomin */ + /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ + debug = function debug() { + /* nomin */ + var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ + + args.unshift('SEMVER'); + /* nomin */ + + console.log.apply(console, args); + /* nomin */ + }; + /* nomin */ + else + /* nomin */ + debug = function debug() {}; // Note: this is the semver.org version of the spec that it implements + // Not necessarily the package version of this code. + + exports.SEMVER_SPEC_VERSION = '2.0.0'; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; // The actual regexps go on exports.re + + var re = exports.re = []; + var src = exports.src = []; + var R = 0; // The following Regular Expressions can be used for tokenizing, + // validating, and parsing SemVer version strings. + // ## Numeric Identifier + // A single `0`, or a non-zero digit followed by zero or more digits. + + var NUMERICIDENTIFIER = R++; + src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; + var NUMERICIDENTIFIERLOOSE = R++; + src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; // ## Non-numeric Identifier + // Zero or more digits, followed by a letter or hyphen, and then zero or + // more letters, digits, or hyphens. + + var NONNUMERICIDENTIFIER = R++; + src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; // ## Main Version + // Three dot-separated numeric identifiers. + + var MAINVERSION = R++; + src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')'; + var MAINVERSIONLOOSE = R++; + src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; // ## Pre-release Version Identifier + // A numeric identifier, or a non-numeric identifier. + + var PRERELEASEIDENTIFIER = R++; + src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')'; + var PRERELEASEIDENTIFIERLOOSE = R++; + src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')'; // ## Pre-release Version + // Hyphen, followed by one or more dot-separated pre-release version + // identifiers. + + var PRERELEASE = R++; + src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + var PRERELEASELOOSE = R++; + src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; // ## Build Metadata Identifier + // Any combination of digits, letters, or hyphens. + + var BUILDIDENTIFIER = R++; + src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; // ## Build Metadata + // Plus sign, followed by one or more period-separated build metadata + // identifiers. + + var BUILD = R++; + src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; // ## Full Version String + // A main version, followed optionally by a pre-release version and + // build metadata. + // Note that the only major, minor, patch, and pre-release sections of + // the version string are capturing groups. The build metadata is not a + // capturing group, because it should not ever be used in version + // comparison. + + var FULL = R++; + var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?'; + src[FULL] = '^' + FULLPLAIN + '$'; // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. + // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty + // common in the npm registry. + + var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?'; + var LOOSE = R++; + src[LOOSE] = '^' + LOOSEPLAIN + '$'; + var GTLT = R++; + src[GTLT] = '((?:<|>)?=?)'; // Something like "2.*" or "1.2.x". + // Note that "x.x" is a valid xRange identifer, meaning "any version" + // Only the first item is strictly required. + + var XRANGEIDENTIFIERLOOSE = R++; + src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; + var XRANGEIDENTIFIER = R++; + src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + var XRANGEPLAIN = R++; + src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGEPLAINLOOSE = R++; + src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGE = R++; + src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; + var XRANGELOOSE = R++; + src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; // Tilde ranges. + // Meaning is "reasonably at or greater than" + + var LONETILDE = R++; + src[LONETILDE] = '(?:~>?)'; + var TILDETRIM = R++; + src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; + re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); + var tildeTrimReplace = '$1~'; + var TILDE = R++; + src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; + var TILDELOOSE = R++; + src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; // Caret ranges. + // Meaning is "at least and backwards compatible with" + + var LONECARET = R++; + src[LONECARET] = '(?:\\^)'; + var CARETTRIM = R++; + src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; + re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); + var caretTrimReplace = '$1^'; + var CARET = R++; + src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; + var CARETLOOSE = R++; + src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; // A simple gt/lt/eq thing, or just "" to indicate "any version" + + var COMPARATORLOOSE = R++; + src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; + var COMPARATOR = R++; + src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; // An expression to strip any whitespace between the gtlt and the thing + // it modifies, so that `> 1.2.3` ==> `>1.2.3` + + var COMPARATORTRIM = R++; + src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; // this one has to use the /g flag + + re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); + var comparatorTrimReplace = '$1$2$3'; // Something like `1.2.3 - 1.2.4` + // Note that these all use the loose form, because they'll be + // checked against either the strict or loose comparator form + // later. + + var HYPHENRANGE = R++; + src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$'; + var HYPHENRANGELOOSE = R++; + src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$'; // Star ranges basically just allow anything at all. + + var STAR = R++; + src[STAR] = '(<|>)?=?\\s*\\*'; // Compile to actual regexp objects. + // All are flag-free, unless they were created above with a flag. + + for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) re[i] = new RegExp(src[i]); + } + + exports.parse = parse; + + function parse(version, loose) { + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + if (version.length > MAX_LENGTH) return null; + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } + } + + exports.valid = valid; + + function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; + } + + exports.clean = clean; + + function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; + } + + exports.SemVer = SemVer; + + function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) return version;else version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters'); + if (!(this instanceof SemVer)) return new SemVer(version, loose); + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + if (!m) throw new TypeError('Invalid Version: ' + version); + this.raw = version; // these are actually numbers + + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError('Invalid major version'); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError('Invalid minor version'); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError('Invalid patch version'); // numberify any prerelease numeric ids + + if (!m[4]) this.prerelease = [];else this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + + return id; + }); + this.build = m[5] ? m[5].split('.') : []; + this.format(); + } + + SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) this.version += '-' + this.prerelease.join('.'); + return this.version; + }; + + SemVer.prototype.toString = function () { + return this.version; + }; + + SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); + return this.compareMain(other) || this.comparePre(other); + }; + + SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + + SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); // NOT having a prerelease is > having one + + if (this.prerelease.length && !other.prerelease.length) return -1;else if (!this.prerelease.length && other.prerelease.length) return 1;else if (!this.prerelease.length && !other.prerelease.length) return 0; + var i = 0; + + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) return 0;else if (b === undefined) return 1;else if (a === undefined) return -1;else if (a === b) continue;else return compareIdentifiers(a, b); + } while (++i); + }; // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + + + SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + + case 'prerelease': + if (this.prerelease.length === 0) this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + + case 'pre': + if (this.prerelease.length === 0) this.prerelease = [0];else { + var i = this.prerelease.length; + + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; + } else this.prerelease = [identifier, 0]; + } + + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + + this.format(); + this.raw = this.version; + return this; + }; + + exports.inc = inc; + + function inc(version, release, loose, identifier) { + if (typeof loose === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + + exports.diff = diff; + + function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre' + key; + } + } + } + + return 'prerelease'; + } + + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } + } + + exports.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : a > b ? 1 : 0; + } + + exports.rcompareIdentifiers = rcompareIdentifiers; + + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + + exports.major = major; + + function major(a, loose) { + return new SemVer(a, loose).major; + } + + exports.minor = minor; + + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + + exports.patch = patch; + + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + + exports.compare = compare; + + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + + exports.compareLoose = compareLoose; + + function compareLoose(a, b) { + return compare(a, b, true); + } + + exports.rcompare = rcompare; + + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + + exports.sort = sort; + + function sort(list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose); + }); + } + + exports.rsort = rsort; + + function rsort(list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose); + }); + } + + exports.gt = gt; + + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + + exports.lt = lt; + + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + + exports.eq = eq; + + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + + exports.neq = neq; + + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + + exports.gte = gte; + + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + + exports.lte = lte; + + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + + exports.cmp = cmp; + + function cmp(a, op, b, loose) { + var ret; + + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + + case '': + case '=': + case '==': + ret = eq(a, b, loose); + break; + + case '!=': + ret = neq(a, b, loose); + break; + + case '>': + ret = gt(a, b, loose); + break; + + case '>=': + ret = gte(a, b, loose); + break; + + case '<': + ret = lt(a, b, loose); + break; + + case '<=': + ret = lte(a, b, loose); + break; + + default: + throw new TypeError('Invalid operator: ' + op); + } + + return ret; + } + + exports.Comparator = Comparator; + + function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) return comp;else comp = comp.value; + } + + if (!(this instanceof Comparator)) return new Comparator(comp, loose); + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + if (this.semver === ANY) this.value = '';else this.value = this.operator + this.semver.version; + debug('comp', this); + } + + var ANY = {}; + + Comparator.prototype.parse = function (comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + if (!m) throw new TypeError('Invalid comparator: ' + comp); + this.operator = m[1]; + if (this.operator === '=') this.operator = ''; // if it literally is just '>' or '' then allow anything. + + if (!m[2]) this.semver = ANY;else this.semver = new SemVer(m[2], this.loose); + }; + + Comparator.prototype.toString = function () { + return this.value; + }; + + Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.loose); + if (this.semver === ANY) return true; + if (typeof version === 'string') version = new SemVer(version, this.loose); + return cmp(version, this.operator, this.semver, this.loose); + }; + + Comparator.prototype.intersects = function (comp, loose) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, loose); + return satisfies(this.value, rangeTmp, loose); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, loose); + return satisfies(comp.semver, rangeTmp, loose); + } + + var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, loose) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<'); + var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, loose) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>'); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + + exports.Range = Range; + + function Range(range, loose) { + if (range instanceof Range) { + if (range.loose === loose) { + return range; + } else { + return new Range(range.raw, loose); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, loose); + } + + if (!(this instanceof Range)) return new Range(range, loose); + this.loose = loose; // First, split based on boolean or || + + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()); + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); + } + + Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; + }; + + Range.prototype.toString = function () { + return this.range; + }; + + Range.prototype.parseRange = function (range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); // `~ 1.2.3` => `~1.2.3` + + range = range.replace(re[TILDETRIM], tildeTrimReplace); // `^ 1.2.3` => `^1.2.3` + + range = range.replace(re[CARETTRIM], caretTrimReplace); // normalize spaces + + range = range.split(/\s+/).join(' '); // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe); + }); + } + + set = set.map(function (comp) { + return new Comparator(comp, loose); + }); + return set; + }; + + Range.prototype.intersects = function (range, loose) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, loose); + }); + }); + }); + }); + }; // Mostly just for testing and legacy API reasons + + + exports.toComparators = toComparators; + + function toComparators(range, loose) { + return new Range(range, loose).set.map(function (comp) { + return comp.map(function (c) { + return c.value; + }).join(' ').trim().split(' '); + }); + } // comprised of xranges, tildes, stars, and gtlt's at this point. + // already replaced the hyphen ranges + // turn into a set of JUST comparators. + + + function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; + } + + function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; + } // ~, ~> --> * (any, kinda silly) + // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 + // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 + // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 + // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 + // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 + + + function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, loose); + }).join(' '); + } + + function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + debug('tilde return', ret); + return ret; + }); + } // ^ --> * (any, kinda silly) + // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 + // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 + // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 + // ^1.2.3 --> >=1.2.3 <2.0.0 + // ^1.2.0 --> >=1.2.0 <2.0.0 + + + function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, loose); + }).join(' '); + } + + function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) { + if (M === '0') ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0'; + } + debug('caret return', ret); + return ret; + }); + } + + function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, loose); + }).join(' '); + } + + function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === '=' && anyX) gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) m = 0; + if (xp) p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) M = +M + 1;else m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + return ret; + }); + } // Because * is AND-ed with everything else in the comparator, + // and '' means "any version", just remove the *s entirely. + + + function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); // Looseness is ignored here. star is always as loose as it gets! + + return comp.trim().replace(re[STAR], ''); + } // This function is passed to string.replace(re[HYPHENRANGE]) + // M, m, patch, prerelease, build + // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 + // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do + // 1.2 - 3.4 => >=1.2.0 <3.5.0 + + + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) from = '';else if (isX(fm)) from = '>=' + fM + '.0.0';else if (isX(fp)) from = '>=' + fM + '.' + fm + '.0';else from = '>=' + from; + if (isX(tM)) to = '';else if (isX(tm)) to = '<' + (+tM + 1) + '.0.0';else if (isX(tp)) to = '<' + tM + '.' + (+tm + 1) + '.0';else if (tpr) to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;else to = '<=' + to; + return (from + ' ' + to).trim(); + } // if ANY of the sets match ALL of its comparators, then pass + + + Range.prototype.test = function (version) { + if (!version) return false; + if (typeof version === 'string') version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) return true; + } + + return false; + }; + + function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } // Version has a -pre, but it's not one of the ones we like. + + + return false; + } + + return true; + } + + exports.satisfies = satisfies; + + function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + + return range.test(version); + } + + exports.maxSatisfying = maxSatisfying; + + function maxSatisfying(versions, range, loose) { + var max = null; + var maxSV = null; + + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, loose) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v; + maxSV = new SemVer(max, loose); + } + } + }); + return max; + } + + exports.minSatisfying = minSatisfying; + + function minSatisfying(versions, range, loose) { + var min = null; + var minSV = null; + + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, loose) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v; + minSV = new SemVer(min, loose); + } + } + }); + return min; + } + + exports.validRange = validRange; + + function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } + } // Determine if version is less than all the versions possible in the range + + + exports.ltr = ltr; + + function ltr(version, range, loose) { + return outside(version, range, '<', loose); + } // Determine if version is greater than all the versions possible in the range. + + + exports.gtr = gtr; + + function gtr(version, range, loose) { + return outside(version, range, '>', loose); + } + + exports.outside = outside; + + function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + var gtfn, ltefn, ltfn, comp, ecomp; + + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } // If it satisifes the range it is not outside + + + if (satisfies(version, range, loose)) { + return false; + } // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + var high = null; + var low = null; + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0'); + } + + high = high || comparator; + low = low || comparator; + + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); // If the edge version comparator has a operator then our version + // isn't outside it + + if (high.operator === comp || high.operator === ecomp) { + return false; + } // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + + + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + + return true; + } + + exports.prerelease = prerelease; + + function prerelease(version, loose) { + var parsed = parse(version, loose); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + + exports.intersects = intersects; + + function intersects(r1, r2, loose) { + r1 = new Range(r1, loose); + r2 = new Range(r2, loose); + return r1.intersects(r2); + } +}); + +var arrayify = function arrayify(object, keyName) { + return Object.keys(object).reduce(function (array, key) { + return array.concat(Object.assign({ + [keyName]: key + }, object[key])); + }, []); +}; + +var dedent_1 = createCommonjsModule(function (module) { + "use strict"; + + function dedent(strings) { + var raw = void 0; + + if (typeof strings === "string") { + // dedent can be used as a plain function + raw = [strings]; + } else { + raw = strings.raw; + } // first, perform interpolation + + + var result = ""; + + for (var i = 0; i < raw.length; i++) { + result += raw[i]. // join lines when there is a suppressed newline + replace(/\\\n[ \t]*/g, ""). // handle escaped backticks + replace(/\\`/g, "`"); + + if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) { + result += arguments.length <= i + 1 ? undefined : arguments[i + 1]; + } + } // now strip indentation + + + var lines = result.split("\n"); + var mindent = null; + lines.forEach(function (l) { + var m = l.match(/^(\s+)\S+/); + + if (m) { + var indent = m[1].length; + + if (!mindent) { + // this is the first indented line + mindent = indent; + } else { + mindent = Math.min(mindent, indent); + } + } + }); + + if (mindent !== null) { + result = lines.map(function (l) { + return l[0] === " " ? l.slice(mindent) : l; + }).join("\n"); + } // dedent eats leading and trailing whitespace too + + + result = result.trim(); // handle escaped newlines at the end to ensure they don't get stripped too + + return result.replace(/\\n/g, "\n"); + } + + { + module.exports = dedent; + } +}); + +var CATEGORY_CONFIG = "Config"; +var CATEGORY_EDITOR = "Editor"; +var CATEGORY_FORMAT = "Format"; +var CATEGORY_OTHER = "Other"; +var CATEGORY_OUTPUT = "Output"; +var CATEGORY_GLOBAL = "Global"; +var CATEGORY_SPECIAL = "Special"; +/** + * @typedef {Object} OptionInfo + * @property {string} since - available since version + * @property {string} category + * @property {'int' | 'boolean' | 'choice' | 'path'} type + * @property {boolean} array - indicate it's an array of the specified type + * @property {boolean?} deprecated - deprecated since version + * @property {OptionRedirectInfo?} redirect - redirect deprecated option + * @property {string} description + * @property {string?} oppositeDescription - for `false` option + * @property {OptionValueInfo} default + * @property {OptionRangeInfo?} range - for type int + * @property {OptionChoiceInfo?} choices - for type choice + * @property {(value: any) => boolean} exception + * + * @typedef {number | boolean | string} OptionValue + * @typedef {OptionValue | [{ value: OptionValue[] }] | Array<{ since: string, value: OptionValue}>} OptionValueInfo + * + * @typedef {Object} OptionRedirectInfo + * @property {string} option + * @property {OptionValue} value + * + * @typedef {Object} OptionRangeInfo + * @property {number} start - recommended range start + * @property {number} end - recommended range end + * @property {number} step - recommended range step + * + * @typedef {Object} OptionChoiceInfo + * @property {boolean | string} value - boolean for the option that is originally boolean type + * @property {string?} description - undefined if redirect + * @property {string?} since - undefined if available since the first version of the option + * @property {string?} deprecated - deprecated since version + * @property {OptionValueInfo?} redirect - redirect deprecated value + * + * @property {string?} cliName + * @property {string?} cliCategory + * @property {string?} cliDescription + */ + +/** @type {{ [name: string]: OptionInfo } */ + +var options$2 = { + cursorOffset: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: -1, + range: { + start: -1, + end: Infinity, + step: 1 + }, + description: dedent_1` + Print (to stderr) where a cursor at the given position would move to after formatting. + This option cannot be used with --range-start and --range-end. + `, + cliCategory: CATEGORY_EDITOR + }, + endOfLine: { + since: "1.15.0", + category: CATEGORY_GLOBAL, + type: "choice", + default: "auto", + description: "Which end of line characters to apply.", + choices: [{ + value: "auto", + description: dedent_1` + Maintain existing + (mixed values within one file are normalised by looking at what's used after the first line) + ` + }, { + value: "lf", + description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" + }, { + value: "crlf", + description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" + }, { + value: "cr", + description: "Carriage Return character only (\\r), used very rarely" + }] + }, + filepath: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "path", + description: "Specify the input filepath. This will be used to do parser inference.", + cliName: "stdin-filepath", + cliCategory: CATEGORY_OTHER, + cliDescription: "Path to the file to pretend that stdin comes from." + }, + insertPragma: { + since: "1.8.0", + category: CATEGORY_SPECIAL, + type: "boolean", + default: false, + description: "Insert @format pragma into file's first docblock comment.", + cliCategory: CATEGORY_OTHER + }, + parser: { + since: "0.0.10", + category: CATEGORY_GLOBAL, + type: "choice", + default: [{ + since: "0.0.10", + value: "babylon" + }, { + since: "1.13.0", + value: undefined + }], + description: "Which parser to use.", + exception: function exception(value) { + return typeof value === "string" || typeof value === "function"; + }, + choices: [{ + value: "flow", + description: "Flow" + }, { + value: "babylon", + description: "JavaScript" + }, { + value: "typescript", + since: "1.4.0", + description: "TypeScript" + }, { + value: "css", + since: "1.7.1", + description: "CSS" + }, { + value: "postcss", + since: "1.4.0", + description: "CSS/Less/SCSS", + deprecated: "1.7.1", + redirect: "css" + }, { + value: "less", + since: "1.7.1", + description: "Less" + }, { + value: "scss", + since: "1.7.1", + description: "SCSS" + }, { + value: "json", + since: "1.5.0", + description: "JSON" + }, { + value: "json5", + since: "1.13.0", + description: "JSON5" + }, { + value: "json-stringify", + since: "1.13.0", + description: "JSON.stringify" + }, { + value: "graphql", + since: "1.5.0", + description: "GraphQL" + }, { + value: "markdown", + since: "1.8.0", + description: "Markdown" + }, { + value: "mdx", + since: "1.15.0", + description: "MDX" + }, { + value: "vue", + since: "1.10.0", + description: "Vue" + }, { + value: "yaml", + since: "1.14.0", + description: "YAML" + }, { + value: "glimmer", + since: null, + description: "Handlebars" + }, { + value: "html", + since: "1.15.0", + description: "HTML" + }, { + value: "angular", + since: "1.15.0", + description: "Angular" + }] + }, + plugins: { + since: "1.10.0", + type: "path", + array: true, + default: [{ + value: [] + }], + category: CATEGORY_GLOBAL, + description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", + exception: function exception(value) { + return typeof value === "string" || typeof value === "object"; + }, + cliName: "plugin", + cliCategory: CATEGORY_CONFIG + }, + pluginSearchDirs: { + since: "1.13.0", + type: "path", + array: true, + default: [{ + value: [] + }], + category: CATEGORY_GLOBAL, + description: dedent_1` + Custom directory that contains prettier plugins in node_modules subdirectory. + Overrides default behavior when plugins are searched relatively to the location of Prettier. + Multiple values are accepted. + `, + exception: function exception(value) { + return typeof value === "string" || typeof value === "object"; + }, + cliName: "plugin-search-dir", + cliCategory: CATEGORY_CONFIG + }, + printWidth: { + since: "0.0.0", + category: CATEGORY_GLOBAL, + type: "int", + default: 80, + description: "The line length where Prettier will try wrap.", + range: { + start: 0, + end: Infinity, + step: 1 + } + }, + rangeEnd: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: Infinity, + range: { + start: 0, + end: Infinity, + step: 1 + }, + description: dedent_1` + Format code ending at a given character offset (exclusive). + The range will extend forwards to the end of the selected statement. + This option cannot be used with --cursor-offset. + `, + cliCategory: CATEGORY_EDITOR + }, + rangeStart: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: 0, + range: { + start: 0, + end: Infinity, + step: 1 + }, + description: dedent_1` + Format code starting at a given character offset. + The range will extend backwards to the start of the first line containing the selected statement. + This option cannot be used with --cursor-offset. + `, + cliCategory: CATEGORY_EDITOR + }, + requirePragma: { + since: "1.7.0", + category: CATEGORY_SPECIAL, + type: "boolean", + default: false, + description: dedent_1` + Require either '@prettier' or '@format' to be present in the file's first docblock comment + in order for it to be formatted. + `, + cliCategory: CATEGORY_OTHER + }, + tabWidth: { + type: "int", + category: CATEGORY_GLOBAL, + default: 2, + description: "Number of spaces per indentation level.", + range: { + start: 0, + end: Infinity, + step: 1 + } + }, + useFlowParser: { + since: "0.0.0", + category: CATEGORY_GLOBAL, + type: "boolean", + default: [{ + since: "0.0.0", + value: false + }, { + since: "1.15.0", + value: undefined + }], + deprecated: "0.0.10", + description: "Use flow parser.", + redirect: { + option: "parser", + value: "flow" + }, + cliName: "flow-parser" + }, + useTabs: { + since: "1.0.0", + category: CATEGORY_GLOBAL, + type: "boolean", + default: false, + description: "Indent with tabs instead of spaces." + } +}; +var coreOptions$1 = { + CATEGORY_CONFIG, + CATEGORY_EDITOR, + CATEGORY_FORMAT, + CATEGORY_OTHER, + CATEGORY_OUTPUT, + CATEGORY_GLOBAL, + CATEGORY_SPECIAL, + options: options$2 +}; + +var require$$0 = ( _package$1 && _package ) || _package$1; + +var currentVersion = require$$0.version; +var coreOptions = coreOptions$1.options; + +function getSupportInfo$2(version, opts) { + opts = Object.assign({ + plugins: [], + showUnreleased: false, + showDeprecated: false, + showInternal: false + }, opts); + + if (!version) { + // pre-release version is smaller than the normal version in semver, + // we need to treat it as the normal one so as to test new features. + version = currentVersion.split("-", 1)[0]; + } + + var plugins = opts.plugins; + var options = arrayify(Object.assign(plugins.reduce(function (currentOptions, plugin) { + return Object.assign(currentOptions, plugin.options); + }, {}), coreOptions), "name").sort(function (a, b) { + return a.name === b.name ? 0 : a.name < b.name ? -1 : 1; + }).filter(filterSince).filter(filterDeprecated).map(mapDeprecated).map(mapInternal).map(function (option) { + var newOption = Object.assign({}, option); + + if (Array.isArray(newOption.default)) { + newOption.default = newOption.default.length === 1 ? newOption.default[0].value : newOption.default.filter(filterSince).sort(function (info1, info2) { + return semver.compare(info2.since, info1.since); + })[0].value; + } + + if (Array.isArray(newOption.choices)) { + newOption.choices = newOption.choices.filter(filterSince).filter(filterDeprecated).map(mapDeprecated); + } + + return newOption; + }).map(function (option) { + var filteredPlugins = plugins.filter(function (plugin) { + return plugin.defaultOptions && plugin.defaultOptions[option.name]; + }); + var pluginDefaults = filteredPlugins.reduce(function (reduced, plugin) { + reduced[plugin.name] = plugin.defaultOptions[option.name]; + return reduced; + }, {}); + return Object.assign(option, { + pluginDefaults + }); + }); + var usePostCssParser = semver.lt(version, "1.7.1"); + var languages = plugins.reduce(function (all, plugin) { + return all.concat(plugin.languages || []); + }, []).filter(filterSince).map(function (language) { + // Prevent breaking changes + if (language.name === "Markdown") { + return Object.assign({}, language, { + parsers: ["markdown"] + }); + } + + if (language.name === "TypeScript") { + return Object.assign({}, language, { + parsers: ["typescript"] + }); + } + + if (usePostCssParser && (language.name === "CSS" || language.group === "CSS")) { + return Object.assign({}, language, { + parsers: ["postcss"] + }); + } + + return language; + }); + return { + languages, + options + }; + + function filterSince(object) { + return opts.showUnreleased || !("since" in object) || object.since && semver.gte(version, object.since); + } + + function filterDeprecated(object) { + return opts.showDeprecated || !("deprecated" in object) || object.deprecated && semver.lt(version, object.deprecated); + } + + function mapDeprecated(object) { + if (!object.deprecated || opts.showDeprecated) { + return object; + } + + var newObject = Object.assign({}, object); + delete newObject.deprecated; + delete newObject.redirect; + return newObject; + } + + function mapInternal(object) { + if (opts.showInternal) { + return object; + } + + var newObject = Object.assign({}, object); + delete newObject.cliName; + delete newObject.cliCategory; + delete newObject.cliDescription; + return newObject; + } +} + +var support = { + getSupportInfo: getSupportInfo$2 +}; + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +/* global Reflect, Promise */ +var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (b.hasOwnProperty(p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); +}; + +function __extends(d, b) { + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var _assign = function __assign() { + _assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + } + + return t; + }; + + return _assign.apply(this, arguments); +}; + +function __rest(s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) { + if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + } + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function (target, key) { + decorator(target, key, paramIndex); + }; +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } +} +function __exportStar(m, exports) { + for (var p in m) { + if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } +} +function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], + i = 0; + if (m) return m.call(o); + return { + next: function next() { + if (o && i >= o.length) o = void 0; + return { + value: o && o[i++], + done: !o + }; + } + }; +} +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +} +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(__read(arguments[i])); + } + + return ar; +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), + i, + q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i; + + function verb(n) { + if (g[n]) i[n] = function (v) { + return new Promise(function (a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + + function fulfill(value) { + resume("next", value); + } + + function reject(value) { + resume("throw", value); + } + + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function () { + return this; + }, i; + + function verb(n, f) { + i[n] = o[n] ? function (v) { + return (p = !p) ? { + value: __await(o[n](v)), + done: n === "return" + } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], + i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i); + + function verb(n) { + i[n] = o[n] && function (v) { + return new Promise(function (resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function (v) { + resolve({ + value: v, + done: d + }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { + value: raw + }); + } else { + cooked.raw = raw; + } + + return cooked; +} + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) { + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result.default = mod; + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; +} + +var tslib_1 = Object.freeze({ + __extends: __extends, + get __assign () { return _assign; }, + __rest: __rest, + __decorate: __decorate, + __param: __param, + __metadata: __metadata, + __awaiter: __awaiter, + __generator: __generator, + __exportStar: __exportStar, + __values: __values, + __read: __read, + __spread: __spread, + __await: __await, + __asyncGenerator: __asyncGenerator, + __asyncDelegator: __asyncDelegator, + __asyncValues: __asyncValues, + __makeTemplateObject: __makeTemplateObject, + __importStar: __importStar, + __importDefault: __importDefault +}); + +var api = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.apiDescriptor = { + key: function key(_key) { + return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(_key) ? _key : JSON.stringify(_key); + }, + + value(value) { + if (value === null || typeof value !== 'object') { + return JSON.stringify(value); + } + + if (Array.isArray(value)) { + return `[${value.map(function (subValue) { + return exports.apiDescriptor.value(subValue); + }).join(', ')}]`; + } + + var keys = Object.keys(value); + return keys.length === 0 ? '{}' : `{ ${keys.map(function (key) { + return `${exports.apiDescriptor.key(key)}: ${exports.apiDescriptor.value(value[key])}`; + }).join(', ')} }`; + }, + + pair: function pair(_ref) { + var key = _ref.key, + value = _ref.value; + return exports.apiDescriptor.value({ + [key]: value + }); + } + }; +}); +unwrapExports(api); + +var descriptors = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(api, exports); +}); +unwrapExports(descriptors); + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +var escapeStringRegexp = function escapeStringRegexp(str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +var colorName = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + +var conversions = createCommonjsModule(function (module) { + /* MIT license */ + // NOTE: conversions should only return primitive values (i.e. arrays, or + // values that give correct `typeof` results). + // do not use box values types (i.e. Number(), String(), etc.) + var reverseKeywords = {}; + + for (var key in colorName) { + if (colorName.hasOwnProperty(key)) { + reverseKeywords[colorName[key]] = key; + } + } + + var convert = module.exports = { + rgb: { + channels: 3, + labels: 'rgb' + }, + hsl: { + channels: 3, + labels: 'hsl' + }, + hsv: { + channels: 3, + labels: 'hsv' + }, + hwb: { + channels: 3, + labels: 'hwb' + }, + cmyk: { + channels: 4, + labels: 'cmyk' + }, + xyz: { + channels: 3, + labels: 'xyz' + }, + lab: { + channels: 3, + labels: 'lab' + }, + lch: { + channels: 3, + labels: 'lch' + }, + hex: { + channels: 1, + labels: ['hex'] + }, + keyword: { + channels: 1, + labels: ['keyword'] + }, + ansi16: { + channels: 1, + labels: ['ansi16'] + }, + ansi256: { + channels: 1, + labels: ['ansi256'] + }, + hcg: { + channels: 3, + labels: ['h', 'c', 'g'] + }, + apple: { + channels: 3, + labels: ['r16', 'g16', 'b16'] + }, + gray: { + channels: 1, + labels: ['gray'] + } + }; // hide .channels and .labels properties + + for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', { + value: channels + }); + Object.defineProperty(convert[model], 'labels', { + value: labels + }); + } + } + + convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; + }; + + convert.rgb.hsv = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var v; + + if (max === 0) { + s = 0; + } else { + s = delta / max * 1000 / 10; + } + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + v = max / 255 * 1000 / 10; + return [h, s, v]; + }; + + convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; + }; + + convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; + }; + /** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ + + + function comparativeDistance(x, y) { + return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); + } + + convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in colorName) { + if (colorName.hasOwnProperty(keyword)) { + var value = colorName[keyword]; // Compute comparative distance + + var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest + + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; + }; + + convert.keyword.rgb = function (keyword) { + return colorName[keyword]; + }; + + convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; // assume sRGB + + r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; + g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; + b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; + var x = r * 0.4124 + g * 0.3576 + b * 0.1805; + var y = r * 0.2126 + g * 0.7152 + b * 0.0722; + var z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; + }; + + convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + + convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + rgb = [0, 0, 0]; + + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; + }; + + convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; + }; + + convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - s * f); + var t = 255 * v * (1 - s * (1 - f)); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + + case 1: + return [q, v, p]; + + case 2: + return [p, v, t]; + + case 3: + return [p, q, v]; + + case 4: + return [t, p, v]; + + case 5: + return [v, p, q]; + } + }; + + convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; + }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb + + + convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; // wh + bl cant be > 1 + + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; + break; + + case 1: + r = n; + g = v; + b = wh; + break; + + case 2: + r = wh; + g = v; + b = n; + break; + + case 3: + r = wh; + g = n; + b = v; + break; + + case 4: + r = n; + g = wh; + b = v; + break; + + case 5: + r = v; + g = wh; + b = n; + break; + } + + return [r * 255, g * 255, b * 255]; + }; + + convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; + }; + + convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.2040 + z * 1.0570; // assume sRGB + + r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92; + g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92; + b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; + }; + + convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + + convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; + }; + + convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + return [l, c, h]; + }; + + convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + return [l, a, b]; + }; + + convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; + }; + + convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); + }; + + convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round((r - 8) / 247 * 24) + 232; + } + + var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; + }; + + convert.ansi16.rgb = function (args) { + var color = args % 10; // handle greyscale + + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = (color & 1) * mult * 255; + var g = (color >> 1 & 1) * mult * 255; + var b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; + }; + + convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = rem % 6 / 5 * 255; + return [r, g, b]; + }; + + convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; + }; + + convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = integer >> 16 & 0xFF; + var g = integer >> 8 & 0xFF; + var b = integer & 0xFF; + return [r, g, b]; + }; + + convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = max - min; + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; + }; + + convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; + }; + + convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; + }; + + convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = h % 1 * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; + } + + mg = (1.0 - c) * g; + return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255]; + }; + + convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; + }; + + convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; + }; + + convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; + }; + + convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; + }; + + convert.apple.rgb = function (apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + + convert.rgb.apple = function (rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + + convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; + }; + + convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; + }; + + convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; + }; + + convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; + }; + + convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; + }; + + convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; + }; + + convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; +}); + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ +// https://jsperf.com/object-keys-vs-for-in-with-closure/3 + +var models$1 = Object.keys(conversions); + +function buildGraph() { + var graph = {}; + + for (var len = models$1.length, i = 0; i < len; i++) { + graph[models$1[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} // https://en.wikipedia.org/wiki/Breadth-first_search + + +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path$$1 = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + var cur = graph[toModel].parent; + + while (graph[cur].parent) { + path$$1.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path$$1; + return fn; +} + +var route = function route(fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + var models = Object.keys(graph); + + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + +var convert = {}; +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function wrappedFn(args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; // preserve .conversion property if there is one + + + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function wrappedFn(args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + + if (typeof result === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; // preserve .conversion property if there is one + + + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + Object.defineProperty(convert[fromModel], 'channels', { + value: conversions[fromModel].channels + }); + Object.defineProperty(convert[fromModel], 'labels', { + value: conversions[fromModel].labels + }); + var routes = route(fromModel); + var routeModels = Object.keys(routes); + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); +var colorConvert = convert; + +var ansiStyles = createCommonjsModule(function (module) { + 'use strict'; + + var wrapAnsi16 = function wrapAnsi16(fn, offset) { + return function () { + var code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; + }; + }; + + var wrapAnsi256 = function wrapAnsi256(fn, offset) { + return function () { + var code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; + }; + }; + + var wrapAnsi16m = function wrapAnsi16m(fn, offset) { + return function () { + var rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; + }; + }; + + function assembleStyles() { + var codes = new Map(); + var styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; // Fix humans + + styles.color.grey = styles.color.gray; + + var _arr = Object.keys(styles); + + for (var _i = 0; _i < _arr.length; _i++) { + var groupName = _arr[_i]; + var group = styles[groupName]; + + var _arr3 = Object.keys(group); + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var styleName = _arr3[_i3]; + var style = group[styleName]; + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + group[styleName] = styles[styleName]; + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } + + var ansi2ansi = function ansi2ansi(n) { + return n; + }; + + var rgb2rgb = function rgb2rgb(r, g, b) { + return [r, g, b]; + }; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + var _arr2 = Object.keys(colorConvert); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var key = _arr2[_i2]; + + if (typeof colorConvert[key] !== 'object') { + continue; + } + + var suite = colorConvert[key]; + + if (key === 'ansi16') { + key = 'ansi'; + } + + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + + return styles; + } // Make the export immutable + + + Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles + }); +}); + +var hasFlag = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (flag, argv) { + argv = argv || process.argv; + var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--'; + var pos = argv.indexOf(prefix + flag); + var terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; +}); + +var env = process.env; +var forceColor; + +if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { + forceColor = true; +} + +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + var min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + var osRelease = os.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env; + }) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + var level = supportsColor(stream); + return translateLevel(level); +} + +var supportsColor_1 = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; + +var templates = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]); + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var chalk = createCommonjsModule(function (module) { + 'use strict'; + + var stdoutColor = supportsColor_1.stdout; + var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + + var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + + var skipModels = new Set(['gray']); + var styles = Object.create(null); + + function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; + } + + function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); + } // Use bright blue on Windows as the normal blue color is illegible + + + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; + } + + var _arr = Object.keys(ansiStyles); + + var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + + }; + }; + + for (var _i = 0; _i < _arr.length; _i++) { + _loop(); + } + + styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } + + }; + ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + + var _arr2 = Object.keys(ansiStyles.color.ansi); + + var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + + }; + }; + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; + } + + ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + + var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + + var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + + }; + }; + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; + } + + var proto = Object.defineProperties(function () {}, styles); + + function build(_styles, _empty, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + + get() { + return self.level; + }, + + set(level) { + self.level = level; + } + + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + + get() { + return self.enabled; + }, + + set(enabled) { + self.enabled = enabled; + } + + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; + } + + function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; + } + + function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates(chalk, parts.join('')); + } + + Object.defineProperties(Chalk.prototype, styles); + module.exports = Chalk(); // eslint-disable-line new-cap + + module.exports.supportsColor = stdoutColor; + module.exports.default = module.exports; // For TypeScript +}); + +var common = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.commonDeprecatedHandler = function (keyOrPair, redirectTo, _ref) { + var descriptor = _ref.descriptor; + var messages = [`${chalk.default.yellow(typeof keyOrPair === 'string' ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair))} is deprecated`]; + + if (redirectTo) { + messages.push(`we now treat it as ${chalk.default.blue(typeof redirectTo === 'string' ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))}`); + } + + return messages.join('; ') + '.'; + }; +}); +unwrapExports(common); + +var deprecated = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(common, exports); +}); +unwrapExports(deprecated); + +var common$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.commonInvalidHandler = function (key, value, utils) { + return [`Invalid ${chalk.default.red(utils.descriptor.key(key))} value.`, `Expected ${chalk.default.blue(utils.schemas[key].expected(utils))},`, `but received ${chalk.default.red(utils.descriptor.value(value))}.`].join(' '); + }; +}); +unwrapExports(common$2); + +var invalid = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(common$2, exports); +}); +unwrapExports(invalid); + +/* eslint-disable no-nested-ternary */ +var arr = []; +var charCodeCache = []; + +var leven$1 = function leven(a, b) { + if (a === b) { + return 0; + } + + var swap = a; // Swapping the strings if `a` is longer than `b` so we know which one is the + // shortest & which one is the longest + + if (a.length > b.length) { + a = b; + b = swap; + } + + var aLen = a.length; + var bLen = b.length; + + if (aLen === 0) { + return bLen; + } + + if (bLen === 0) { + return aLen; + } // Performing suffix trimming: + // We can linearly drop suffix common to both strings since they + // don't increase distance at all + // Note: `~-` is the bitwise way to perform a `- 1` operation + + + while (aLen > 0 && a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen)) { + aLen--; + bLen--; + } + + if (aLen === 0) { + return bLen; + } // Performing prefix trimming + // We can linearly drop prefix common to both strings since they + // don't increase distance at all + + + var start = 0; + + while (start < aLen && a.charCodeAt(start) === b.charCodeAt(start)) { + start++; + } + + aLen -= start; + bLen -= start; + + if (aLen === 0) { + return bLen; + } + + var bCharCode; + var ret; + var tmp; + var tmp2; + var i = 0; + var j = 0; + + while (i < aLen) { + charCodeCache[start + i] = a.charCodeAt(start + i); + arr[i] = ++i; + } + + while (j < bLen) { + bCharCode = b.charCodeAt(start + j); + tmp = j++; + ret = j; + + for (i = 0; i < aLen; i++) { + tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1; + tmp = arr[i]; + ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2; + } + } + + return ret; +}; + +var leven_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.levenUnknownHandler = function (key, value, _ref) { + var descriptor = _ref.descriptor, + logger = _ref.logger, + schemas = _ref.schemas; + var messages = [`Ignored unknown option ${chalk.default.yellow(descriptor.pair({ + key, + value + }))}.`]; + var suggestion = Object.keys(schemas).sort().find(function (knownKey) { + return leven$1(key, knownKey) < 3; + }); + + if (suggestion) { + messages.push(`Did you mean ${chalk.default.blue(descriptor.key(suggestion))}?`); + } + + logger.warn(messages.join(' ')); + }; +}); +unwrapExports(leven_1); + +var unknown = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(leven_1, exports); +}); +unwrapExports(unknown); + +var handlers = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(deprecated, exports); + + tslib_1.__exportStar(invalid, exports); + + tslib_1.__exportStar(unknown, exports); +}); +unwrapExports(handlers); + +var schema = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + var HANDLER_KEYS = ['default', 'expected', 'validate', 'deprecated', 'forward', 'redirect', 'overlap', 'preprocess', 'postprocess']; + + function createSchema(SchemaConstructor, parameters) { + var schema = new SchemaConstructor(parameters); + var subSchema = Object.create(schema); + + for (var _i = 0; _i < HANDLER_KEYS.length; _i++) { + var handlerKey = HANDLER_KEYS[_i]; + + if (handlerKey in parameters) { + subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length); + } + } + + return subSchema; + } + + exports.createSchema = createSchema; + + var Schema = + /*#__PURE__*/ + function () { + function Schema(parameters) { + _classCallCheck(this, Schema); + + this.name = parameters.name; + } + + _createClass(Schema, [{ + key: "default", + value: function _default(_utils) { + return undefined; + } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length` + + }, { + key: "expected", + value: function expected(_utils) { + return 'nothing'; + } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length` + + }, { + key: "validate", + value: function validate(_value, _utils) { + return false; + } + }, { + key: "deprecated", + value: function deprecated(_value, _utils) { + return false; + } + }, { + key: "forward", + value: function forward(_value, _utils) { + return undefined; + } + }, { + key: "redirect", + value: function redirect(_value, _utils) { + return undefined; + } + }, { + key: "overlap", + value: function overlap(currentValue, _newValue, _utils) { + return currentValue; + } + }, { + key: "preprocess", + value: function preprocess(value, _utils) { + return value; + } + }, { + key: "postprocess", + value: function postprocess(value, _utils) { + return value; + } + }], [{ + key: "create", + value: function create(parameters) { + // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/5863 + return createSchema(this, parameters); + } + }]); + + return Schema; + }(); + + exports.Schema = Schema; + + function normalizeHandler(handler, superSchema, handlerArgumentsLength) { + return typeof handler === 'function' ? function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return handler.apply(void 0, _toConsumableArray(args.slice(0, handlerArgumentsLength - 1)).concat([superSchema], _toConsumableArray(args.slice(handlerArgumentsLength - 1)))); + } : function () { + return handler; + }; + } +}); +unwrapExports(schema); + +var alias = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var AliasSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(AliasSchema, _schema_1$Schema); + + function AliasSchema(parameters) { + var _this; + + _classCallCheck(this, AliasSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(AliasSchema).call(this, parameters)); + _this._sourceName = parameters.sourceName; + return _this; + } + + _createClass(AliasSchema, [{ + key: "expected", + value: function expected(utils) { + return utils.schemas[this._sourceName].expected(utils); + } + }, { + key: "validate", + value: function validate(value, utils) { + return utils.schemas[this._sourceName].validate(value, utils); + } + }, { + key: "redirect", + value: function redirect(_value, _utils) { + return this._sourceName; + } + }]); + + return AliasSchema; + }(schema.Schema); + + exports.AliasSchema = AliasSchema; +}); +unwrapExports(alias); + +var any = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var AnySchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(AnySchema, _schema_1$Schema); + + function AnySchema() { + _classCallCheck(this, AnySchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(AnySchema).apply(this, arguments)); + } + + _createClass(AnySchema, [{ + key: "expected", + value: function expected() { + return 'anything'; + } + }, { + key: "validate", + value: function validate() { + return true; + } + }]); + + return AnySchema; + }(schema.Schema); + + exports.AnySchema = AnySchema; +}); +unwrapExports(any); + +var array$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var ArraySchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(ArraySchema, _schema_1$Schema); + + function ArraySchema(_a) { + var _this; + + _classCallCheck(this, ArraySchema); + + var valueSchema = _a.valueSchema, + _a$name = _a.name, + name = _a$name === void 0 ? valueSchema.name : _a$name, + handlers = tslib_1.__rest(_a, ["valueSchema", "name"]); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ArraySchema).call(this, Object.assign({}, handlers, { + name + }))); + _this._valueSchema = valueSchema; + return _this; + } + + _createClass(ArraySchema, [{ + key: "expected", + value: function expected(utils) { + return `an array of ${this._valueSchema.expected(utils)}`; + } + }, { + key: "validate", + value: function validate(value, utils) { + if (!Array.isArray(value)) { + return false; + } + + var invalidValues = []; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var subValue = _step.value; + var subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue); + + if (subValidateResult !== true) { + invalidValues.push(subValidateResult.value); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return invalidValues.length === 0 ? true : { + value: invalidValues + }; + } + }, { + key: "deprecated", + value: function deprecated(value, utils) { + var deprecatedResult = []; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var subValue = _step2.value; + var subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue); + + if (subDeprecatedResult !== false) { + deprecatedResult.push.apply(deprecatedResult, _toConsumableArray(subDeprecatedResult.map(function (_ref) { + var deprecatedValue = _ref.value; + return { + value: [deprecatedValue] + }; + }))); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return deprecatedResult; + } + }, { + key: "forward", + value: function forward(value, utils) { + var forwardResult = []; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = value[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var subValue = _step3.value; + var subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue); + forwardResult.push.apply(forwardResult, _toConsumableArray(subForwardResult.map(wrapTransferResult))); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + return forwardResult; + } + }, { + key: "redirect", + value: function redirect(value, utils) { + var remain = []; + var redirect = []; + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = value[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var subValue = _step4.value; + var subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue); + + if ('remain' in subRedirectResult) { + remain.push(subRedirectResult.remain); + } + + redirect.push.apply(redirect, _toConsumableArray(subRedirectResult.redirect.map(wrapTransferResult))); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + + return remain.length === 0 ? { + redirect + } : { + redirect, + remain + }; + } + }, { + key: "overlap", + value: function overlap(currentValue, newValue) { + return currentValue.concat(newValue); + } + }]); + + return ArraySchema; + }(schema.Schema); + + exports.ArraySchema = ArraySchema; + + function wrapTransferResult(_ref2) { + var from = _ref2.from, + to = _ref2.to; + return { + from: [from], + to + }; + } +}); +unwrapExports(array$2); + +var boolean_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var BooleanSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(BooleanSchema, _schema_1$Schema); + + function BooleanSchema() { + _classCallCheck(this, BooleanSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(BooleanSchema).apply(this, arguments)); + } + + _createClass(BooleanSchema, [{ + key: "expected", + value: function expected() { + return 'true or false'; + } + }, { + key: "validate", + value: function validate(value) { + return typeof value === 'boolean'; + } + }]); + + return BooleanSchema; + }(schema.Schema); + + exports.BooleanSchema = BooleanSchema; +}); +unwrapExports(boolean_1); + +var utils = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + function recordFromArray(array, mainKey) { + var record = Object.create(null); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var value = _step.value; + var key = value[mainKey]; // istanbul ignore next + + if (record[key]) { + throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key)}`); + } // @ts-ignore + + + record[key] = value; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return record; + } + + exports.recordFromArray = recordFromArray; + + function mapFromArray(array, mainKey) { + var map = new Map(); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = array[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var value = _step2.value; + var key = value[mainKey]; // istanbul ignore next + + if (map.has(key)) { + throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key)}`); + } + + map.set(key, value); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return map; + } + + exports.mapFromArray = mapFromArray; + + function createAutoChecklist() { + var map = Object.create(null); + return function (id) { + var idString = JSON.stringify(id); + + if (map[idString]) { + return true; + } + + map[idString] = true; + return false; + }; + } + + exports.createAutoChecklist = createAutoChecklist; + + function partition(array, predicate) { + var trueArray = []; + var falseArray = []; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = array[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var value = _step3.value; + + if (predicate(value)) { + trueArray.push(value); + } else { + falseArray.push(value); + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + return [trueArray, falseArray]; + } + + exports.partition = partition; + + function isInt(value) { + return value === Math.floor(value); + } + + exports.isInt = isInt; + + function comparePrimitive(a, b) { + if (a === b) { + return 0; + } + + var typeofA = typeof a; + var typeofB = typeof b; + var orders = ['undefined', 'object', 'boolean', 'number', 'string']; + + if (typeofA !== typeofB) { + return orders.indexOf(typeofA) - orders.indexOf(typeofB); + } + + if (typeofA !== 'string') { + return Number(a) - Number(b); + } + + return a.localeCompare(b); + } + + exports.comparePrimitive = comparePrimitive; + + function normalizeDefaultResult(result) { + return result === undefined ? {} : result; + } + + exports.normalizeDefaultResult = normalizeDefaultResult; + + function normalizeValidateResult(result, value) { + return result === true ? true : result === false ? { + value + } : result; + } + + exports.normalizeValidateResult = normalizeValidateResult; + + function normalizeDeprecatedResult(result, value) { + var doNotNormalizeTrue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{ + value + }] : 'value' in result ? [result] : result.length === 0 ? false : result; + } + + exports.normalizeDeprecatedResult = normalizeDeprecatedResult; + + function normalizeTransferResult(result, value) { + return typeof result === 'string' || 'key' in result ? { + from: value, + to: result + } : 'from' in result ? { + from: result.from, + to: result.to + } : { + from: value, + to: result.to + }; + } + + exports.normalizeTransferResult = normalizeTransferResult; + + function normalizeForwardResult(result, value) { + return result === undefined ? [] : Array.isArray(result) ? result.map(function (transferResult) { + return normalizeTransferResult(transferResult, value); + }) : [normalizeTransferResult(result, value)]; + } + + exports.normalizeForwardResult = normalizeForwardResult; + + function normalizeRedirectResult(result, value) { + var redirect = normalizeForwardResult(typeof result === 'object' && 'redirect' in result ? result.redirect : result, value); + return redirect.length === 0 ? { + remain: value, + redirect + } : typeof result === 'object' && 'remain' in result ? { + remain: result.remain, + redirect + } : { + redirect + }; + } + + exports.normalizeRedirectResult = normalizeRedirectResult; +}); +unwrapExports(utils); + +var choice = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var ChoiceSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(ChoiceSchema, _schema_1$Schema); + + function ChoiceSchema(parameters) { + var _this; + + _classCallCheck(this, ChoiceSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ChoiceSchema).call(this, parameters)); + _this._choices = utils.mapFromArray(parameters.choices.map(function (choice) { + return choice && typeof choice === 'object' ? choice : { + value: choice + }; + }), 'value'); + return _this; + } + + _createClass(ChoiceSchema, [{ + key: "expected", + value: function expected(_ref) { + var _this2 = this; + + var descriptor = _ref.descriptor; + var choiceValues = Array.from(this._choices.keys()).map(function (value) { + return _this2._choices.get(value); + }).filter(function (choiceInfo) { + return !choiceInfo.deprecated; + }).map(function (choiceInfo) { + return choiceInfo.value; + }).sort(utils.comparePrimitive).map(descriptor.value); + var head = choiceValues.slice(0, -2); + var tail = choiceValues.slice(-2); + return head.concat(tail.join(' or ')).join(', '); + } + }, { + key: "validate", + value: function validate(value) { + return this._choices.has(value); + } + }, { + key: "deprecated", + value: function deprecated(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo && choiceInfo.deprecated ? { + value + } : false; + } + }, { + key: "forward", + value: function forward(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo ? choiceInfo.forward : undefined; + } + }, { + key: "redirect", + value: function redirect(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo ? choiceInfo.redirect : undefined; + } + }]); + + return ChoiceSchema; + }(schema.Schema); + + exports.ChoiceSchema = ChoiceSchema; +}); +unwrapExports(choice); + +var number = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var NumberSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(NumberSchema, _schema_1$Schema); + + function NumberSchema() { + _classCallCheck(this, NumberSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(NumberSchema).apply(this, arguments)); + } + + _createClass(NumberSchema, [{ + key: "expected", + value: function expected() { + return 'a number'; + } + }, { + key: "validate", + value: function validate(value, _utils) { + return typeof value === 'number'; + } + }]); + + return NumberSchema; + }(schema.Schema); + + exports.NumberSchema = NumberSchema; +}); +unwrapExports(number); + +var integer = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var IntegerSchema = + /*#__PURE__*/ + function (_number_1$NumberSchem) { + _inherits(IntegerSchema, _number_1$NumberSchem); + + function IntegerSchema() { + _classCallCheck(this, IntegerSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(IntegerSchema).apply(this, arguments)); + } + + _createClass(IntegerSchema, [{ + key: "expected", + value: function expected() { + return 'an integer'; + } + }, { + key: "validate", + value: function validate(value, utils$$2) { + return utils$$2.normalizeValidateResult(_get(_getPrototypeOf(IntegerSchema.prototype), "validate", this).call(this, value, utils$$2), value) === true && utils.isInt(value); + } + }]); + + return IntegerSchema; + }(number.NumberSchema); + + exports.IntegerSchema = IntegerSchema; +}); +unwrapExports(integer); + +var string = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var StringSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(StringSchema, _schema_1$Schema); + + function StringSchema() { + _classCallCheck(this, StringSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(StringSchema).apply(this, arguments)); + } + + _createClass(StringSchema, [{ + key: "expected", + value: function expected() { + return 'a string'; + } + }, { + key: "validate", + value: function validate(value) { + return typeof value === 'string'; + } + }]); + + return StringSchema; + }(schema.Schema); + + exports.StringSchema = StringSchema; +}); +unwrapExports(string); + +var schemas = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(alias, exports); + + tslib_1.__exportStar(any, exports); + + tslib_1.__exportStar(array$2, exports); + + tslib_1.__exportStar(boolean_1, exports); + + tslib_1.__exportStar(choice, exports); + + tslib_1.__exportStar(integer, exports); + + tslib_1.__exportStar(number, exports); + + tslib_1.__exportStar(string, exports); +}); +unwrapExports(schemas); + +var defaults = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.defaultDescriptor = api.apiDescriptor; + exports.defaultUnknownHandler = leven_1.levenUnknownHandler; + exports.defaultInvalidHandler = invalid.commonInvalidHandler; + exports.defaultDeprecatedHandler = common.commonDeprecatedHandler; +}); +unwrapExports(defaults); + +var normalize$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.normalize = function (options, schemas, opts) { + return new Normalizer(schemas, opts).normalize(options); + }; + + var Normalizer = + /*#__PURE__*/ + function () { + function Normalizer(schemas, opts) { + _classCallCheck(this, Normalizer); + + // istanbul ignore next + var _ref = opts || {}, + _ref$logger = _ref.logger, + logger = _ref$logger === void 0 ? console : _ref$logger, + _ref$descriptor = _ref.descriptor, + descriptor = _ref$descriptor === void 0 ? defaults.defaultDescriptor : _ref$descriptor, + _ref$unknown = _ref.unknown, + unknown = _ref$unknown === void 0 ? defaults.defaultUnknownHandler : _ref$unknown, + _ref$invalid = _ref.invalid, + invalid = _ref$invalid === void 0 ? defaults.defaultInvalidHandler : _ref$invalid, + _ref$deprecated = _ref.deprecated, + deprecated = _ref$deprecated === void 0 ? defaults.defaultDeprecatedHandler : _ref$deprecated; + + this._utils = { + descriptor, + logger: + /* istanbul ignore next */ + logger || { + warn: function warn() {} + }, + schemas: utils.recordFromArray(schemas, 'name'), + normalizeDefaultResult: utils.normalizeDefaultResult, + normalizeDeprecatedResult: utils.normalizeDeprecatedResult, + normalizeForwardResult: utils.normalizeForwardResult, + normalizeRedirectResult: utils.normalizeRedirectResult, + normalizeValidateResult: utils.normalizeValidateResult + }; + this._unknownHandler = unknown; + this._invalidHandler = invalid; + this._deprecatedHandler = deprecated; + this.cleanHistory(); + } + + _createClass(Normalizer, [{ + key: "cleanHistory", + value: function cleanHistory() { + this._hasDeprecationWarned = utils.createAutoChecklist(); + } + }, { + key: "normalize", + value: function normalize(options) { + var _this = this; + + var normalized = {}; + var restOptionsArray = [options]; + + var applyNormalization = function applyNormalization() { + while (restOptionsArray.length !== 0) { + var currentOptions = restOptionsArray.shift(); + + var transferredOptionsArray = _this._applyNormalization(currentOptions, normalized); + + restOptionsArray.push.apply(restOptionsArray, _toConsumableArray(transferredOptionsArray)); + } + }; + + applyNormalization(); + + var _arr = Object.keys(this._utils.schemas); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + var schema = this._utils.schemas[key]; + + if (!(key in normalized)) { + var defaultResult = utils.normalizeDefaultResult(schema.default(this._utils)); + + if ('value' in defaultResult) { + restOptionsArray.push({ + [key]: defaultResult.value + }); + } + } + } + + applyNormalization(); + + var _arr2 = Object.keys(this._utils.schemas); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _key = _arr2[_i2]; + var _schema = this._utils.schemas[_key]; + + if (_key in normalized) { + normalized[_key] = _schema.postprocess(normalized[_key], this._utils); + } + } + + return normalized; + } + }, { + key: "_applyNormalization", + value: function _applyNormalization(options, normalized) { + var _this2 = this; + + var transferredOptionsArray = []; + + var _utils_1$partition = utils.partition(Object.keys(options), function (key) { + return key in _this2._utils.schemas; + }), + _utils_1$partition2 = _slicedToArray(_utils_1$partition, 2), + knownOptionNames = _utils_1$partition2[0], + unknownOptionNames = _utils_1$partition2[1]; + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + var _loop = function _loop() { + var key = _step.value; + var schema = _this2._utils.schemas[key]; + var value = schema.preprocess(options[key], _this2._utils); + var validateResult = utils.normalizeValidateResult(schema.validate(value, _this2._utils), value); + + if (validateResult !== true) { + var invalidValue = validateResult.value; + + var errorMessageOrError = _this2._invalidHandler(key, invalidValue, _this2._utils); + + throw typeof errorMessageOrError === 'string' ? new Error(errorMessageOrError) : + /* istanbul ignore next*/ + errorMessageOrError; + } + + var appendTransferredOptions = function appendTransferredOptions(_ref2) { + var from = _ref2.from, + to = _ref2.to; + transferredOptionsArray.push(typeof to === 'string' ? { + [to]: from + } : { + [to.key]: to.value + }); + }; + + var warnDeprecated = function warnDeprecated(_ref3) { + var currentValue = _ref3.value, + redirectTo = _ref3.redirectTo; + var deprecatedResult = utils.normalizeDeprecatedResult(schema.deprecated(currentValue, _this2._utils), value, + /* doNotNormalizeTrue */ + true); + + if (deprecatedResult === false) { + return; + } + + if (deprecatedResult === true) { + if (!_this2._hasDeprecationWarned(key)) { + _this2._utils.logger.warn(_this2._deprecatedHandler(key, redirectTo, _this2._utils)); + } + } else { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = deprecatedResult[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var deprecatedValue = _step3.value.value; + var pair = { + key, + value: deprecatedValue + }; + + if (!_this2._hasDeprecationWarned(pair)) { + var redirectToPair = typeof redirectTo === 'string' ? { + key: redirectTo, + value: deprecatedValue + } : redirectTo; + + _this2._utils.logger.warn(_this2._deprecatedHandler(pair, redirectToPair, _this2._utils)); + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + }; + + var forwardResult = utils.normalizeForwardResult(schema.forward(value, _this2._utils), value); + forwardResult.forEach(appendTransferredOptions); + var redirectResult = utils.normalizeRedirectResult(schema.redirect(value, _this2._utils), value); + redirectResult.redirect.forEach(appendTransferredOptions); + + if ('remain' in redirectResult) { + var remainingValue = redirectResult.remain; + normalized[key] = key in normalized ? schema.overlap(normalized[key], remainingValue, _this2._utils) : remainingValue; + warnDeprecated({ + value: remainingValue + }); + } + + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = redirectResult.redirect[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var _step4$value = _step4.value, + from = _step4$value.from, + to = _step4$value.to; + warnDeprecated({ + value: from, + redirectTo: to + }); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + }; + + for (var _iterator = knownOptionNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + _loop(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = unknownOptionNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var key = _step2.value; + var value = options[key]; + + var unknownResult = this._unknownHandler(key, value, this._utils); + + if (unknownResult) { + var _arr3 = Object.keys(unknownResult); + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var unknownKey = _arr3[_i3]; + var unknownOption = { + [unknownKey]: unknownResult[unknownKey] + }; + + if (unknownKey in this._utils.schemas) { + transferredOptionsArray.push(unknownOption); + } else { + Object.assign(normalized, unknownOption); + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return transferredOptionsArray; + } + }]); + + return Normalizer; + }(); + + exports.Normalizer = Normalizer; +}); +unwrapExports(normalize$1); + +var lib$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(descriptors, exports); + + tslib_1.__exportStar(handlers, exports); + + tslib_1.__exportStar(schemas, exports); + + tslib_1.__exportStar(normalize$1, exports); + + tslib_1.__exportStar(schema, exports); +}); +unwrapExports(lib$1); + +var hasFlag$3 = function hasFlag(flag, argv) { + argv = argv || process.argv; + var terminatorPos = argv.indexOf('--'); + var prefix = /^-{1,2}/.test(flag) ? '' : '--'; + var pos = argv.indexOf(prefix + flag); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; + +var supportsColor$1 = createCommonjsModule(function (module) { + 'use strict'; + + var env = process.env; + + var support = function support(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + }; + + var supportLevel = function () { + if (hasFlag$3('no-color') || hasFlag$3('no-colors') || hasFlag$3('color=false')) { + return 0; + } + + if (hasFlag$3('color=16m') || hasFlag$3('color=full') || hasFlag$3('color=truecolor')) { + return 3; + } + + if (hasFlag$3('color=256')) { + return 2; + } + + if (hasFlag$3('color') || hasFlag$3('colors') || hasFlag$3('color=true') || hasFlag$3('color=always')) { + return 1; + } + + if (process.stdout && !process.stdout.isTTY) { + return 0; + } + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. + var osRelease = os.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env; + }) || env.CI_NAME === 'codeship') { + return 1; + } + + return 0; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if ('TERM_PROGRAM' in env) { + var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Hyper': + return 3; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return 0; + } + + return 0; + }(); + + if ('FORCE_COLOR' in env) { + supportLevel = parseInt(env.FORCE_COLOR, 10) === 0 ? 0 : supportLevel || 1; + } + + module.exports = process && support(supportLevel); +}); + +var templates$2 = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f0-9]{4}|x[a-f0-9]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[0-9a-f]{4}|x[0-9a-f]{2}|.)|([^\\])/gi; + var ESCAPES = { + n: '\n', + r: '\r', + t: '\t', + b: '\b', + f: '\f', + v: '\v', + 0: '\0', + '\\': '\\', + e: '\u001b', + a: '\u0007' + }; + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES[c] || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + +var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + +var skipModels = new Set(['gray']); +var styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = supportsColor$1 ? supportsColor$1.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); +} // Use bright blue on Windows as the normal blue color is illegible + + +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +var _arr = Object.keys(ansiStyles); + +var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], key); + } + + }; +}; + +for (var _i = 0; _i < _arr.length; _i++) { + _loop(); +} + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + +var _arr2 = Object.keys(ansiStyles.color.ansi); + +var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model); + }; + } + + }; +}; + +for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + +var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + +var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model); + }; + } + + }; +}; + +for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; +} + +var proto = Object.defineProperties(function () {}, styles); + +function build(_styles, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + + get() { + return self.level; + }, + + set(level) { + self.level = level; + } + + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + + get() { + return self.enabled; + }, + + set(enabled) { + self.enabled = enabled; + } + + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates$2(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); +var chalk$2 = Chalk(); // eslint-disable-line new-cap + +var supportsColor_1$2 = supportsColor$1; +chalk$2.supportsColor = supportsColor_1$2; + +var cliDescriptor = { + key: function key(_key) { + return _key.length === 1 ? `-${_key}` : `--${_key}`; + }, + value: function value(_value) { + return lib$1.apiDescriptor.value(_value); + }, + pair: function pair(_ref) { + var key = _ref.key, + value = _ref.value; + return value === false ? `--no-${key}` : value === true ? cliDescriptor.key(key) : value === "" ? `${cliDescriptor.key(key)} without an argument` : `${cliDescriptor.key(key)}=${value}`; + } +}; + +var FlagSchema = +/*#__PURE__*/ +function (_vnopts$ChoiceSchema) { + _inherits(FlagSchema, _vnopts$ChoiceSchema); + + function FlagSchema(_ref2) { + var _this; + + var name = _ref2.name, + flags = _ref2.flags; + + _classCallCheck(this, FlagSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(FlagSchema).call(this, { + name, + choices: flags + })); + _this._flags = flags.slice().sort(); + return _this; + } + + _createClass(FlagSchema, [{ + key: "preprocess", + value: function preprocess(value, utils) { + if (typeof value === "string" && value.length !== 0 && this._flags.indexOf(value) === -1) { + var suggestion = this._flags.find(function (flag) { + return leven$1(flag, value) < 3; + }); + + if (suggestion) { + utils.logger.warn([`Unknown flag ${chalk$2.yellow(utils.descriptor.value(value))},`, `did you mean ${chalk$2.blue(utils.descriptor.value(suggestion))}?`].join(" ")); + return suggestion; + } + } + + return value; + } + }, { + key: "expected", + value: function expected() { + return "a flag"; + } + }]); + + return FlagSchema; +}(lib$1.ChoiceSchema); + +function normalizeOptions$1(options, optionInfos) { + var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + logger = _ref3.logger, + _ref3$isCLI = _ref3.isCLI, + isCLI = _ref3$isCLI === void 0 ? false : _ref3$isCLI, + _ref3$passThrough = _ref3.passThrough, + passThrough = _ref3$passThrough === void 0 ? false : _ref3$passThrough; + + var unknown = !passThrough ? lib$1.levenUnknownHandler : Array.isArray(passThrough) ? function (key, value) { + return passThrough.indexOf(key) === -1 ? undefined : { + [key]: value + }; + } : function (key, value) { + return { + [key]: value + }; + }; + var descriptor = isCLI ? cliDescriptor : lib$1.apiDescriptor; + var schemas = optionInfosToSchemas(optionInfos, { + isCLI + }); + return lib$1.normalize(options, schemas, { + logger, + unknown, + descriptor + }); +} + +function optionInfosToSchemas(optionInfos, _ref4) { + var isCLI = _ref4.isCLI; + var schemas = []; + + if (isCLI) { + schemas.push(lib$1.AnySchema.create({ + name: "_" + })); + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = optionInfos[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var optionInfo = _step.value; + schemas.push(optionInfoToSchema(optionInfo, { + isCLI, + optionInfos + })); + + if (optionInfo.alias && isCLI) { + schemas.push(lib$1.AliasSchema.create({ + name: optionInfo.alias, + sourceName: optionInfo.name + })); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return schemas; +} + +function optionInfoToSchema(optionInfo, _ref5) { + var isCLI = _ref5.isCLI, + optionInfos = _ref5.optionInfos; + var SchemaConstructor; + var parameters = { + name: optionInfo.name + }; + var handlers = {}; + + switch (optionInfo.type) { + case "int": + SchemaConstructor = lib$1.IntegerSchema; + + if (isCLI) { + parameters.preprocess = function (value) { + return Number(value); + }; + } + + break; + + case "choice": + SchemaConstructor = lib$1.ChoiceSchema; + parameters.choices = optionInfo.choices.map(function (choiceInfo) { + return typeof choiceInfo === "object" && choiceInfo.redirect ? Object.assign({}, choiceInfo, { + redirect: { + to: { + key: optionInfo.name, + value: choiceInfo.redirect + } + } + }) : choiceInfo; + }); + break; + + case "boolean": + SchemaConstructor = lib$1.BooleanSchema; + break; + + case "flag": + SchemaConstructor = FlagSchema; + parameters.flags = optionInfos.map(function (optionInfo) { + return [].concat(optionInfo.alias || [], optionInfo.description ? optionInfo.name : [], optionInfo.oppositeDescription ? `no-${optionInfo.name}` : []); + }).reduce(function (a, b) { + return a.concat(b); + }, []); + break; + + case "path": + SchemaConstructor = lib$1.StringSchema; + break; + + default: + throw new Error(`Unexpected type ${optionInfo.type}`); + } + + if (optionInfo.exception) { + parameters.validate = function (value, schema, utils) { + return optionInfo.exception(value) || schema.validate(value, utils); + }; + } else { + parameters.validate = function (value, schema, utils) { + return value === undefined || schema.validate(value, utils); + }; + } + + if (optionInfo.redirect) { + handlers.redirect = function (value) { + return !value ? undefined : { + to: { + key: optionInfo.redirect.option, + value: optionInfo.redirect.value + } + }; + }; + } + + if (optionInfo.deprecated) { + handlers.deprecated = true; + } // allow CLI overriding, e.g., prettier package.json --tab-width 1 --tab-width 2 + + + if (isCLI && !optionInfo.array) { + var originalPreprocess = parameters.preprocess || function (x) { + return x; + }; + + parameters.preprocess = function (value, schema, utils) { + return schema.preprocess(originalPreprocess(Array.isArray(value) ? value[value.length - 1] : value), utils); + }; + } + + return optionInfo.array ? lib$1.ArraySchema.create(Object.assign(isCLI ? { + preprocess: function preprocess(v) { + return [].concat(v); + } + } : {}, handlers, { + valueSchema: SchemaConstructor.create(parameters) + })) : SchemaConstructor.create(Object.assign({}, parameters, handlers)); +} + +function normalizeApiOptions(options, optionInfos, opts) { + return normalizeOptions$1(options, optionInfos, opts); +} + +function normalizeCliOptions(options, optionInfos, opts) { + return normalizeOptions$1(options, optionInfos, Object.assign({ + isCLI: true + }, opts)); +} + +var optionsNormalizer = { + normalizeApiOptions, + normalizeCliOptions +}; + +var getLast = function getLast(arr) { + return arr.length > 0 ? arr[arr.length - 1] : null; +}; + +function locStart$1(node, opts) { + opts = opts || {}; // Handle nodes with decorators. They should start at the first decorator + + if (!opts.ignoreDecorators && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0) { + return locStart$1(node.declaration.decorators[0]); + } + + if (!opts.ignoreDecorators && node.decorators && node.decorators.length > 0) { + return locStart$1(node.decorators[0]); + } + + if (node.__location) { + return node.__location.startOffset; + } + + if (node.range) { + return node.range[0]; + } + + if (typeof node.start === "number") { + return node.start; + } + + if (node.loc) { + return node.loc.start; + } + + return null; +} + +function locEnd$1(node) { + var endNode = node.nodes && getLast(node.nodes); + + if (endNode && node.source && !node.source.end) { + node = endNode; + } + + if (node.__location) { + return node.__location.endOffset; + } + + var loc = node.range ? node.range[1] : typeof node.end === "number" ? node.end : null; + + if (node.typeAnnotation) { + return Math.max(loc, locEnd$1(node.typeAnnotation)); + } + + if (node.loc && !loc) { + return node.loc.end; + } + + return loc; +} + +var loc = { + locStart: locStart$1, + locEnd: locEnd$1 +}; + +var jsTokens = createCommonjsModule(function (module, exports) { + // Copyright 2014, 2015, 2016, 2017 Simon Lydell + // License: MIT. (See LICENSE.) + Object.defineProperty(exports, "__esModule", { + value: true + }); // This regex comes from regex.coffee, and is inserted here by generate-index.js + // (run `npm run build`). + + exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + + exports.matchToToken = function (match) { + var token = { + type: "invalid", + value: match[0] + }; + if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace"; + return token; + }; +}); +unwrapExports(jsTokens); + +var ast = createCommonjsModule(function (module) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + function isExpression(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'ArrayExpression': + case 'AssignmentExpression': + case 'BinaryExpression': + case 'CallExpression': + case 'ConditionalExpression': + case 'FunctionExpression': + case 'Identifier': + case 'Literal': + case 'LogicalExpression': + case 'MemberExpression': + case 'NewExpression': + case 'ObjectExpression': + case 'SequenceExpression': + case 'ThisExpression': + case 'UnaryExpression': + case 'UpdateExpression': + return true; + } + + return false; + } + + function isIterationStatement(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'DoWhileStatement': + case 'ForInStatement': + case 'ForStatement': + case 'WhileStatement': + return true; + } + + return false; + } + + function isStatement(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'BlockStatement': + case 'BreakStatement': + case 'ContinueStatement': + case 'DebuggerStatement': + case 'DoWhileStatement': + case 'EmptyStatement': + case 'ExpressionStatement': + case 'ForInStatement': + case 'ForStatement': + case 'IfStatement': + case 'LabeledStatement': + case 'ReturnStatement': + case 'SwitchStatement': + case 'ThrowStatement': + case 'TryStatement': + case 'VariableDeclaration': + case 'WhileStatement': + case 'WithStatement': + return true; + } + + return false; + } + + function isSourceElement(node) { + return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; + } + + function trailingStatement(node) { + switch (node.type) { + case 'IfStatement': + if (node.alternate != null) { + return node.alternate; + } + + return node.consequent; + + case 'LabeledStatement': + case 'ForStatement': + case 'ForInStatement': + case 'WhileStatement': + case 'WithStatement': + return node.body; + } + + return null; + } + + function isProblematicIfStatement(node) { + var current; + + if (node.type !== 'IfStatement') { + return false; + } + + if (node.alternate == null) { + return false; + } + + current = node.consequent; + + do { + if (current.type === 'IfStatement') { + if (current.alternate == null) { + return true; + } + } + + current = trailingStatement(current); + } while (current); + + return false; + } + + module.exports = { + isExpression: isExpression, + isStatement: isStatement, + isIterationStatement: isIterationStatement, + isSourceElement: isSourceElement, + isProblematicIfStatement: isProblematicIfStatement, + trailingStatement: trailingStatement + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var code = createCommonjsModule(function (module) { + /* + Copyright (C) 2013-2014 Yusuke Suzuki + Copyright (C) 2014 Ivan Nikulin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; // See `tools/generate-identifier-regex.js`. + + ES5Regex = { + // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, + // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ + }; + ES6Regex = { + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + + function isDecimalDigit(ch) { + return 0x30 <= ch && ch <= 0x39; // 0..9 + } + + function isHexDigit(ch) { + return 0x30 <= ch && ch <= 0x39 || // 0..9 + 0x61 <= ch && ch <= 0x66 || // a..f + 0x41 <= ch && ch <= 0x46; // A..F + } + + function isOctalDigit(ch) { + return ch >= 0x30 && ch <= 0x37; // 0..7 + } // 7.2 White Space + + + NON_ASCII_WHITESPACES = [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF]; + + function isWhiteSpace(ch) { + return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0; + } // 7.3 Line Terminators + + + function isLineTerminator(ch) { + return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029; + } // 7.6 Identifier Names and Identifiers + + + function fromCodePoint(cp) { + if (cp <= 0xFFFF) { + return String.fromCharCode(cp); + } + + var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800); + var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00); + return cu1 + cu2; + } + + IDENTIFIER_START = new Array(0x80); + + for (ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || // a..z + ch >= 0x41 && ch <= 0x5A || // A..Z + ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) + } + + IDENTIFIER_PART = new Array(0x80); + + for (ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || // a..z + ch >= 0x41 && ch <= 0x5A || // A..Z + ch >= 0x30 && ch <= 0x39 || // 0..9 + ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) + } + + function isIdentifierStartES5(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } + + function isIdentifierPartES5(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + + function isIdentifierStartES6(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } + + function isIdentifierPartES6(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + + module.exports = { + isDecimalDigit: isDecimalDigit, + isHexDigit: isHexDigit, + isOctalDigit: isOctalDigit, + isWhiteSpace: isWhiteSpace, + isLineTerminator: isLineTerminator, + isIdentifierStartES5: isIdentifierStartES5, + isIdentifierPartES5: isIdentifierPartES5, + isIdentifierStartES6: isIdentifierStartES6, + isIdentifierPartES6: isIdentifierPartES6 + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var keyword = createCommonjsModule(function (module) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + var code$$1 = code; + + function isStrictModeReservedWordES6(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'let': + return true; + + default: + return false; + } + } + + function isKeywordES5(id, strict) { + // yield should not be treated as keyword under non-strict mode. + if (!strict && id === 'yield') { + return false; + } + + return isKeywordES6(id, strict); + } + + function isKeywordES6(id, strict) { + if (strict && isStrictModeReservedWordES6(id)) { + return true; + } + + switch (id.length) { + case 2: + return id === 'if' || id === 'in' || id === 'do'; + + case 3: + return id === 'var' || id === 'for' || id === 'new' || id === 'try'; + + case 4: + return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum'; + + case 5: + return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super'; + + case 6: + return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import'; + + case 7: + return id === 'default' || id === 'finally' || id === 'extends'; + + case 8: + return id === 'function' || id === 'continue' || id === 'debugger'; + + case 10: + return id === 'instanceof'; + + default: + return false; + } + } + + function isReservedWordES5(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); + } + + function isReservedWordES6(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + function isIdentifierNameES5(id) { + var i, iz, ch; + + if (id.length === 0) { + return false; + } + + ch = id.charCodeAt(0); + + if (!code$$1.isIdentifierStartES5(ch)) { + return false; + } + + for (i = 1, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + + if (!code$$1.isIdentifierPartES5(ch)) { + return false; + } + } + + return true; + } + + function decodeUtf16(lead, trail) { + return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + } + + function isIdentifierNameES6(id) { + var i, iz, ch, lowCh, check; + + if (id.length === 0) { + return false; + } + + check = code$$1.isIdentifierStartES6; + + for (i = 0, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + + if (0xD800 <= ch && ch <= 0xDBFF) { + ++i; + + if (i >= iz) { + return false; + } + + lowCh = id.charCodeAt(i); + + if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) { + return false; + } + + ch = decodeUtf16(ch, lowCh); + } + + if (!check(ch)) { + return false; + } + + check = code$$1.isIdentifierPartES6; + } + + return true; + } + + function isIdentifierES5(id, strict) { + return isIdentifierNameES5(id) && !isReservedWordES5(id, strict); + } + + function isIdentifierES6(id, strict) { + return isIdentifierNameES6(id) && !isReservedWordES6(id, strict); + } + + module.exports = { + isKeywordES5: isKeywordES5, + isKeywordES6: isKeywordES6, + isReservedWordES5: isReservedWordES5, + isReservedWordES6: isReservedWordES6, + isRestrictedWord: isRestrictedWord, + isIdentifierNameES5: isIdentifierNameES5, + isIdentifierNameES6: isIdentifierNameES6, + isIdentifierES5: isIdentifierES5, + isIdentifierES6: isIdentifierES6 + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var utils$2 = createCommonjsModule(function (module, exports) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + exports.ast = ast; + exports.code = code; + exports.keyword = keyword; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var hasFlag$6 = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (flag, argv) { + argv = argv || process.argv; + var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--'; + var pos = argv.indexOf(prefix + flag); + var terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; +}); + +var env$1 = process.env; +var forceColor$1; + +if (hasFlag$6('no-color') || hasFlag$6('no-colors') || hasFlag$6('color=false')) { + forceColor$1 = false; +} else if (hasFlag$6('color') || hasFlag$6('colors') || hasFlag$6('color=true') || hasFlag$6('color=always')) { + forceColor$1 = true; +} + +if ('FORCE_COLOR' in env$1) { + forceColor$1 = env$1.FORCE_COLOR.length === 0 || parseInt(env$1.FORCE_COLOR, 10) !== 0; +} + +function translateLevel$1(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor$4(stream) { + if (forceColor$1 === false) { + return 0; + } + + if (hasFlag$6('color=16m') || hasFlag$6('color=full') || hasFlag$6('color=truecolor')) { + return 3; + } + + if (hasFlag$6('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor$1 !== true) { + return 0; + } + + var min = forceColor$1 ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + var osRelease = os.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env$1) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env$1; + }) || env$1.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env$1) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env$1.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env$1) { + var version = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env$1.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env$1.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) { + return 1; + } + + if ('COLORTERM' in env$1) { + return 1; + } + + if (env$1.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel$1(stream) { + var level = supportsColor$4(stream); + return translateLevel$1(level); +} + +var supportsColor_1$3 = { + supportsColor: getSupportLevel$1, + stdout: getSupportLevel$1(process.stdout), + stderr: getSupportLevel$1(process.stderr) +}; + +var templates$4 = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]); + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var chalk$5 = createCommonjsModule(function (module) { + 'use strict'; + + var stdoutColor = supportsColor_1$3.stdout; + var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + + var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + + var skipModels = new Set(['gray']); + var styles = Object.create(null); + + function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; + } + + function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); + } // Use bright blue on Windows as the normal blue color is illegible + + + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; + } + + var _arr = Object.keys(ansiStyles); + + var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + + }; + }; + + for (var _i = 0; _i < _arr.length; _i++) { + _loop(); + } + + styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } + + }; + ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + + var _arr2 = Object.keys(ansiStyles.color.ansi); + + var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + + }; + }; + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; + } + + ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + + var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + + var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + + }; + }; + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; + } + + var proto = Object.defineProperties(function () {}, styles); + + function build(_styles, _empty, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + + get() { + return self.level; + }, + + set(level) { + self.level = level; + } + + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + + get() { + return self.enabled; + }, + + set(enabled) { + self.enabled = enabled; + } + + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; + } + + function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; + } + + function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates$4(chalk, parts.join('')); + } + + Object.defineProperties(Chalk.prototype, styles); + module.exports = Chalk(); // eslint-disable-line new-cap + + module.exports.supportsColor = stdoutColor; + module.exports.default = module.exports; // For TypeScript +}); + +var lib$3 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.shouldHighlight = shouldHighlight; + exports.getChalk = getChalk; + exports.default = highlight; + + function _jsTokens() { + var data = _interopRequireWildcard(jsTokens); + + _jsTokens = function _jsTokens() { + return data; + }; + + return data; + } + + function _esutils() { + var data = _interopRequireDefault(utils$2); + + _esutils = function _esutils() { + return data; + }; + + return data; + } + + function _chalk() { + var data = _interopRequireDefault(chalk$5); + + _chalk = function _chalk() { + return data; + }; + + return data; + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } + } + + function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsx_tag: chalk.yellow, + punctuator: chalk.yellow, + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold + }; + } + + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + var JSX_TAG = /^[a-z][\w-]*$/i; + var BRACKET = /^[()[\]{}]$/; + + function getTokenType(match) { + var _match$slice = match.slice(-2), + offset = _match$slice[0], + text = _match$slice[1]; + + var token = (0, _jsTokens().matchToToken)(match); + + if (token.type === "name") { + if (_esutils().default.keyword.isReservedWordES6(token.value)) { + return "keyword"; + } + + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == ""), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return " " + maybeHighlight(defs.gutter, gutter) + line; + } + }).join("\n"); + + if (opts.message && !hasColumns) { + frame = "" + " ".repeat(numberMaxWidth + 1) + opts.message + "\n" + frame; + } + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } + } + + function _default(rawLines, lineNumber, colNumber, opts) { + if (opts === void 0) { + opts = {}; + } + + if (!deprecationWarningShown) { + deprecationWarningShown = true; + var message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + var deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + + colNumber = Math.max(colNumber, 0); + var location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); + } +}); +unwrapExports(lib$2); + +var ConfigError$1 = errors.ConfigError; +var locStart = loc.locStart; +var locEnd = loc.locEnd; // Use defineProperties()/getOwnPropertyDescriptor() to prevent +// triggering the parsers getters. + +var ownNames = Object.getOwnPropertyNames; +var ownDescriptor = Object.getOwnPropertyDescriptor; + +function getParsers(options) { + var parsers = {}; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = options.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var plugin = _step.value; + + if (!plugin.parsers) { + continue; + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = ownNames(plugin.parsers)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var name = _step2.value; + Object.defineProperty(parsers, name, ownDescriptor(plugin.parsers, name)); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return parsers; +} + +function resolveParser$1(opts, parsers) { + parsers = parsers || getParsers(opts); + + if (typeof opts.parser === "function") { + // Custom parser API always works with JavaScript. + return { + parse: opts.parser, + astFormat: "estree", + locStart, + locEnd + }; + } + + if (typeof opts.parser === "string") { + if (parsers.hasOwnProperty(opts.parser)) { + return parsers[opts.parser]; + } + + try { + return { + parse: require(path.resolve(process.cwd(), opts.parser)), + astFormat: "estree", + locStart, + locEnd + }; + } catch (err) { + /* istanbul ignore next */ + throw new ConfigError$1(`Couldn't resolve parser "${opts.parser}"`); + } + } +} + +function parse$2(text, opts) { + var parsers = getParsers(opts); // Create a new object {parserName: parseFn}. Uses defineProperty() to only call + // the parsers getters when actually calling the parser `parse` function. + + var parsersForCustomParserApi = Object.keys(parsers).reduce(function (object, parserName) { + return Object.defineProperty(object, parserName, { + enumerable: true, + + get() { + return parsers[parserName].parse; + } + + }); + }, {}); + var parser = resolveParser$1(opts, parsers); + + try { + if (parser.preprocess) { + text = parser.preprocess(text, opts); + } + + return { + text, + ast: parser.parse(text, parsersForCustomParserApi, opts) + }; + } catch (error) { + var loc$$1 = error.loc; + + if (loc$$1) { + var codeFrame = lib$2; + error.codeFrame = codeFrame.codeFrameColumns(text, loc$$1, { + highlightCode: true + }); + error.message += "\n" + error.codeFrame; + throw error; + } + /* istanbul ignore next */ + + + throw error.stack; + } +} + +var parser = { + parse: parse$2, + resolveParser: resolveParser$1 +}; + +var UndefinedParserError = errors.UndefinedParserError; +var getSupportInfo$1 = support.getSupportInfo; +var resolveParser = parser.resolveParser; +var hiddenDefaults = { + astFormat: "estree", + printer: {}, + originalText: undefined, + locStart: null, + locEnd: null +}; // Copy options and fill in default values. + +function normalize(options, opts) { + opts = opts || {}; + var rawOptions = Object.assign({}, options); + var supportOptions = getSupportInfo$1(null, { + plugins: options.plugins, + showUnreleased: true, + showDeprecated: true + }).options; + var defaults = supportOptions.reduce(function (reduced, optionInfo) { + return optionInfo.default !== undefined ? Object.assign(reduced, { + [optionInfo.name]: optionInfo.default + }) : reduced; + }, Object.assign({}, hiddenDefaults)); + + if (!rawOptions.parser) { + if (!rawOptions.filepath) { + var logger = opts.logger || console; + logger.warn("No parser and no filepath given, using 'babylon' the parser now " + "but this will throw an error in the future. " + "Please specify a parser or a filepath so one can be inferred."); + rawOptions.parser = "babylon"; + } else { + rawOptions.parser = inferParser(rawOptions.filepath, rawOptions.plugins); + + if (!rawOptions.parser) { + throw new UndefinedParserError(`No parser could be inferred for file: ${rawOptions.filepath}`); + } + } + } + + var parser$$1 = resolveParser(optionsNormalizer.normalizeApiOptions(rawOptions, [supportOptions.find(function (x) { + return x.name === "parser"; + })], { + passThrough: true, + logger: false + })); + rawOptions.astFormat = parser$$1.astFormat; + rawOptions.locEnd = parser$$1.locEnd; + rawOptions.locStart = parser$$1.locStart; + var plugin = getPlugin(rawOptions); + rawOptions.printer = plugin.printers[rawOptions.astFormat]; + var pluginDefaults = supportOptions.filter(function (optionInfo) { + return optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name]; + }).reduce(function (reduced, optionInfo) { + return Object.assign(reduced, { + [optionInfo.name]: optionInfo.pluginDefaults[plugin.name] + }); + }, {}); + var mixedDefaults = Object.assign({}, defaults, pluginDefaults); + Object.keys(mixedDefaults).forEach(function (k) { + if (rawOptions[k] == null) { + rawOptions[k] = mixedDefaults[k]; + } + }); + + if (rawOptions.parser === "json") { + rawOptions.trailingComma = "none"; + } + + return optionsNormalizer.normalizeApiOptions(rawOptions, supportOptions, Object.assign({ + passThrough: Object.keys(hiddenDefaults) + }, opts)); +} + +function getPlugin(options) { + var astFormat = options.astFormat; + + if (!astFormat) { + throw new Error("getPlugin() requires astFormat to be set"); + } + + var printerPlugin = options.plugins.find(function (plugin) { + return plugin.printers && plugin.printers[astFormat]; + }); + + if (!printerPlugin) { + throw new Error(`Couldn't find plugin for AST format "${astFormat}"`); + } + + return printerPlugin; +} + +function getInterpreter(filepath) { + if (typeof filepath !== "string") { + return ""; + } + + var fd; + + try { + fd = fs.openSync(filepath, "r"); + } catch (err) { + return ""; + } + + try { + var liner = new readlines(fd); + var firstLine = liner.next().toString("utf8"); // #!/bin/env node, #!/usr/bin/env node + + var m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/); + + if (m1) { + return m1[1]; + } // #!/bin/node, #!/usr/bin/node, #!/usr/local/bin/node + + + var m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/); + + if (m2) { + return m2[1]; + } + + return ""; + } catch (err) { + // There are some weird cases where paths are missing, causing Jest + // failures. It's unclear what these correspond to in the real world. + return ""; + } finally { + try { + // There are some weird cases where paths are missing, causing Jest + // failures. It's unclear what these correspond to in the real world. + fs.closeSync(fd); + } catch (err) {// nop + } + } +} + +function inferParser(filepath, plugins) { + var filepathParts = normalizePath(filepath).split("/"); + var filename = filepathParts[filepathParts.length - 1].toLowerCase(); // If the file has no extension, we can try to infer the language from the + // interpreter in the shebang line, if any; but since this requires FS access, + // do it last. + + var language = getSupportInfo$1(null, { + plugins + }).languages.find(function (language) { + return language.since !== null && (language.extensions && language.extensions.some(function (extension) { + return filename.endsWith(extension); + }) || language.filenames && language.filenames.find(function (name) { + return name.toLowerCase() === filename; + }) || filename.indexOf(".") === -1 && language.interpreters && language.interpreters.indexOf(getInterpreter(filepath)) !== -1); + }); + return language && language.parsers[0]; +} + +var options = { + normalize, + hiddenDefaults, + inferParser +}; + +function massageAST(ast, options, parent) { + if (Array.isArray(ast)) { + return ast.map(function (e) { + return massageAST(e, options, parent); + }).filter(function (e) { + return e; + }); + } + + if (!ast || typeof ast !== "object") { + return ast; + } + + var newObj = {}; + + var _arr = Object.keys(ast); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + + if (typeof ast[key] !== "function") { + newObj[key] = massageAST(ast[key], options, ast); + } + } + + if (options.printer.massageAstNode) { + var result = options.printer.massageAstNode(ast, newObj, parent); + + if (result === null) { + return undefined; + } + + if (result) { + return result; + } + } + + return newObj; +} + +var massageAst = massageAST; + +function concat$1(parts) { + return { + type: "concat", + parts + }; +} + +function indent$1(contents) { + return { + type: "indent", + contents + }; +} + +function align(n, contents) { + return { + type: "align", + contents, + n + }; +} + +function group(contents, opts) { + opts = opts || {}; + + return { + type: "group", + id: opts.id, + contents: contents, + break: !!opts.shouldBreak, + expandedStates: opts.expandedStates + }; +} + +function dedentToRoot(contents) { + return align(-Infinity, contents); +} + +function markAsRoot(contents) { + return align({ + type: "root" + }, contents); +} + +function dedent$1(contents) { + return align(-1, contents); +} + +function conditionalGroup(states, opts) { + return group(states[0], Object.assign(opts || {}, { + expandedStates: states + })); +} + +function fill(parts) { + return { + type: "fill", + parts + }; +} + +function ifBreak(breakContents, flatContents, opts) { + opts = opts || {}; + + return { + type: "if-break", + breakContents, + flatContents, + groupId: opts.groupId + }; +} + +function lineSuffix$1(contents) { + return { + type: "line-suffix", + contents + }; +} + +var lineSuffixBoundary = { + type: "line-suffix-boundary" +}; +var breakParent$1 = { + type: "break-parent" +}; +var trim = { + type: "trim" +}; +var line$2 = { + type: "line" +}; +var softline = { + type: "line", + soft: true +}; +var hardline$1 = concat$1([{ + type: "line", + hard: true +}, breakParent$1]); +var literalline = concat$1([{ + type: "line", + hard: true, + literal: true +}, breakParent$1]); +var cursor$1 = { + type: "cursor", + placeholder: Symbol("cursor") +}; + +function join$1(sep, arr) { + var res = []; + + for (var i = 0; i < arr.length; i++) { + if (i !== 0) { + res.push(sep); + } + + res.push(arr[i]); + } + + return concat$1(res); +} + +function addAlignmentToDoc(doc, size, tabWidth) { + var aligned = doc; + + if (size > 0) { + // Use indent to add tabs for all the levels of tabs we need + for (var i = 0; i < Math.floor(size / tabWidth); ++i) { + aligned = indent$1(aligned); + } // Use align for all the spaces that are needed + + + aligned = align(size % tabWidth, aligned); // size is absolute from 0 and not relative to the current + // indentation, so we use -Infinity to reset the indentation to 0 + + aligned = align(-Infinity, aligned); + } + + return aligned; +} + +var docBuilders = { + concat: concat$1, + join: join$1, + line: line$2, + softline, + hardline: hardline$1, + literalline, + group, + conditionalGroup, + fill, + lineSuffix: lineSuffix$1, + lineSuffixBoundary, + cursor: cursor$1, + breakParent: breakParent$1, + ifBreak, + trim, + indent: indent$1, + align, + addAlignmentToDoc, + markAsRoot, + dedentToRoot, + dedent: dedent$1 +}; + +var ansiRegex = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function () { + var pattern = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'].join('|'); + return new RegExp(pattern, 'g'); + }; +}); + +var stripAnsi = function stripAnsi(input) { + return typeof input === 'string' ? input.replace(ansiRegex(), '') : input; +}; + +var isFullwidthCodePoint = createCommonjsModule(function (module) { + 'use strict'; + /* eslint-disable yoda */ + + module.exports = function (x) { + if (Number.isNaN(x)) { + return false; + } // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + + + if (x >= 0x1100 && (x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + 0x2e80 <= x && x <= 0x3247 && x !== 0x303f || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + 0x3250 <= x && x <= 0x4dbf || // CJK Unified Ideographs .. Yi Radicals + 0x4e00 <= x && x <= 0xa4c6 || // Hangul Jamo Extended-A + 0xa960 <= x && x <= 0xa97c || // Hangul Syllables + 0xac00 <= x && x <= 0xd7a3 || // CJK Compatibility Ideographs + 0xf900 <= x && x <= 0xfaff || // Vertical Forms + 0xfe10 <= x && x <= 0xfe19 || // CJK Compatibility Forms .. Small Form Variants + 0xfe30 <= x && x <= 0xfe6b || // Halfwidth and Fullwidth Forms + 0xff01 <= x && x <= 0xff60 || 0xffe0 <= x && x <= 0xffe6 || // Kana Supplement + 0x1b000 <= x && x <= 0x1b001 || // Enclosed Ideographic Supplement + 0x1f200 <= x && x <= 0x1f251 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + 0x20000 <= x && x <= 0x3fffd)) { + return true; + } + + return false; + }; +}); + +var stringWidth = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (str) { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + str = stripAnsi(str); + var width = 0; + + for (var i = 0; i < str.length; i++) { + var code = str.codePointAt(i); // Ignore control characters + + if (code <= 0x1F || code >= 0x7F && code <= 0x9F) { + continue; + } // Ignore combining characters + + + if (code >= 0x300 && code <= 0x36F) { + continue; + } // Surrogates + + + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; + }; +}); + +var emojiRegex$1 = function emojiRegex() { + // https://mathiasbynens.be/notes/es-unicode-property-escapes#emoji + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]\uFE0F|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F/g; +}; + +var emojiRegex = emojiRegex$1(); // eslint-disable-next-line no-control-regex + +var notAsciiRegex = /[^\x20-\x7F]/; + +function isExportDeclaration(node) { + if (node) { + switch (node.type) { + case "ExportDefaultDeclaration": + case "ExportDefaultSpecifier": + case "DeclareExportDeclaration": + case "ExportNamedDeclaration": + case "ExportAllDeclaration": + return true; + } + } + + return false; +} + +function getParentExportDeclaration(path$$1) { + var parentNode = path$$1.getParentNode(); + + if (path$$1.getName() === "declaration" && isExportDeclaration(parentNode)) { + return parentNode; + } + + return null; +} + +function getPenultimate(arr) { + if (arr.length > 1) { + return arr[arr.length - 2]; + } + + return null; +} + +function getLast$3(arr) { + if (arr.length > 0) { + return arr[arr.length - 1]; + } + + return null; +} + +function skip(chars) { + return function (text, index, opts) { + var backwards = opts && opts.backwards; // Allow `skip` functions to be threaded together without having + // to check for failures (did someone say monads?). + + if (index === false) { + return false; + } + + var length = text.length; + var cursor = index; + + while (cursor >= 0 && cursor < length) { + var c = text.charAt(cursor); + + if (chars instanceof RegExp) { + if (!chars.test(c)) { + return cursor; + } + } else if (chars.indexOf(c) === -1) { + return cursor; + } + + backwards ? cursor-- : cursor++; + } + + if (cursor === -1 || cursor === length) { + // If we reached the beginning or end of the file, return the + // out-of-bounds cursor. It's up to the caller to handle this + // correctly. We don't want to indicate `false` though if it + // actually skipped valid characters. + return cursor; + } + + return false; + }; +} + +var skipWhitespace = skip(/\s/); +var skipSpaces = skip(" \t"); +var skipToLineEnd = skip(",; \t"); +var skipEverythingButNewLine = skip(/[^\r\n]/); + +function skipInlineComment(text, index) { + if (index === false) { + return false; + } + + if (text.charAt(index) === "/" && text.charAt(index + 1) === "*") { + for (var i = index + 2; i < text.length; ++i) { + if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") { + return i + 2; + } + } + } + + return index; +} + +function skipTrailingComment(text, index) { + if (index === false) { + return false; + } + + if (text.charAt(index) === "/" && text.charAt(index + 1) === "/") { + return skipEverythingButNewLine(text, index); + } + + return index; +} // This one doesn't use the above helper function because it wants to +// test \r\n in order and `skip` doesn't support ordering and we only +// want to skip one newline. It's simple to implement. + + +function skipNewline$1(text, index, opts) { + var backwards = opts && opts.backwards; + + if (index === false) { + return false; + } + + var atIndex = text.charAt(index); + + if (backwards) { + if (text.charAt(index - 1) === "\r" && atIndex === "\n") { + return index - 2; + } + + if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") { + return index - 1; + } + } else { + if (atIndex === "\r" && text.charAt(index + 1) === "\n") { + return index + 2; + } + + if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") { + return index + 1; + } + } + + return index; +} + +function hasNewline$1(text, index, opts) { + opts = opts || {}; + var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + var idx2 = skipNewline$1(text, idx, opts); + return idx !== idx2; +} + +function hasNewlineInRange(text, start, end) { + for (var i = start; i < end; ++i) { + if (text.charAt(i) === "\n") { + return true; + } + } + + return false; +} // Note: this function doesn't ignore leading comments unlike isNextLineEmpty + + +function isPreviousLineEmpty$1(text, node, locStart) { + var idx = locStart(node) - 1; + idx = skipSpaces(text, idx, { + backwards: true + }); + idx = skipNewline$1(text, idx, { + backwards: true + }); + idx = skipSpaces(text, idx, { + backwards: true + }); + var idx2 = skipNewline$1(text, idx, { + backwards: true + }); + return idx !== idx2; +} + +function isNextLineEmptyAfterIndex(text, index) { + var oldIdx = null; + var idx = index; + + while (idx !== oldIdx) { + // We need to skip all the potential trailing inline comments + oldIdx = idx; + idx = skipToLineEnd(text, idx); + idx = skipInlineComment(text, idx); + idx = skipSpaces(text, idx); + } + + idx = skipTrailingComment(text, idx); + idx = skipNewline$1(text, idx); + return hasNewline$1(text, idx); +} + +function isNextLineEmpty(text, node, locEnd) { + return isNextLineEmptyAfterIndex(text, locEnd(node)); +} + +function getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, idx) { + var oldIdx = null; + + while (idx !== oldIdx) { + oldIdx = idx; + idx = skipSpaces(text, idx); + idx = skipInlineComment(text, idx); + idx = skipTrailingComment(text, idx); + idx = skipNewline$1(text, idx); + } + + return idx; +} + +function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) { + return getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, locEnd(node)); +} + +function getNextNonSpaceNonCommentCharacter(text, node, locEnd) { + return text.charAt(getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd)); +} + +function hasSpaces(text, index, opts) { + opts = opts || {}; + var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + return idx !== index; +} + +function setLocStart(node, index) { + if (node.range) { + node.range[0] = index; + } else { + node.start = index; + } +} + +function setLocEnd(node, index) { + if (node.range) { + node.range[1] = index; + } else { + node.end = index; + } +} + +var PRECEDENCE = {}; +[["|>"], ["||", "??"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].forEach(function (tier, i) { + tier.forEach(function (op) { + PRECEDENCE[op] = i; + }); +}); + +function getPrecedence(op) { + return PRECEDENCE[op]; +} + +var equalityOperators = { + "==": true, + "!=": true, + "===": true, + "!==": true +}; +var multiplicativeOperators = { + "*": true, + "/": true, + "%": true +}; +var bitshiftOperators = { + ">>": true, + ">>>": true, + "<<": true +}; + +function shouldFlatten(parentOp, nodeOp) { + if (getPrecedence(nodeOp) !== getPrecedence(parentOp)) { + return false; + } // ** is right-associative + // x ** y ** z --> x ** (y ** z) + + + if (parentOp === "**") { + return false; + } // x == y == z --> (x == y) == z + + + if (equalityOperators[parentOp] && equalityOperators[nodeOp]) { + return false; + } // x * y % z --> (x * y) % z + + + if (nodeOp === "%" && multiplicativeOperators[parentOp] || parentOp === "%" && multiplicativeOperators[nodeOp]) { + return false; + } // x * y / z --> (x * y) / z + // x / y * z --> (x / y) * z + + + if (nodeOp !== parentOp && multiplicativeOperators[nodeOp] && multiplicativeOperators[parentOp]) { + return false; + } // x << y << z --> (x << y) << z + + + if (bitshiftOperators[parentOp] && bitshiftOperators[nodeOp]) { + return false; + } + + return true; +} + +function isBitwiseOperator(operator) { + return !!bitshiftOperators[operator] || operator === "|" || operator === "^" || operator === "&"; +} // Tests if an expression starts with `{`, or (if forbidFunctionClassAndDoExpr +// holds) `function`, `class`, or `do {}`. Will be overzealous if there's +// already necessary grouping parentheses. + + +function startsWithNoLookaheadToken(node, forbidFunctionClassAndDoExpr) { + node = getLeftMost(node); + + switch (node.type) { + case "FunctionExpression": + case "ClassExpression": + case "DoExpression": + return forbidFunctionClassAndDoExpr; + + case "ObjectExpression": + return true; + + case "MemberExpression": + return startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr); + + case "TaggedTemplateExpression": + if (node.tag.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + + return startsWithNoLookaheadToken(node.tag, forbidFunctionClassAndDoExpr); + + case "CallExpression": + if (node.callee.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + + return startsWithNoLookaheadToken(node.callee, forbidFunctionClassAndDoExpr); + + case "ConditionalExpression": + return startsWithNoLookaheadToken(node.test, forbidFunctionClassAndDoExpr); + + case "UpdateExpression": + return !node.prefix && startsWithNoLookaheadToken(node.argument, forbidFunctionClassAndDoExpr); + + case "BindExpression": + return node.object && startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr); + + case "SequenceExpression": + return startsWithNoLookaheadToken(node.expressions[0], forbidFunctionClassAndDoExpr); + + case "TSAsExpression": + return startsWithNoLookaheadToken(node.expression, forbidFunctionClassAndDoExpr); + + default: + return false; + } +} + +function getLeftMost(node) { + if (node.left) { + return getLeftMost(node.left); + } + + return node; +} + +function getAlignmentSize(value, tabWidth, startIndex) { + startIndex = startIndex || 0; + var size = 0; + + for (var i = startIndex; i < value.length; ++i) { + if (value[i] === "\t") { + // Tabs behave in a way that they are aligned to the nearest + // multiple of tabWidth: + // 0 -> 4, 1 -> 4, 2 -> 4, 3 -> 4 + // 4 -> 8, 5 -> 8, 6 -> 8, 7 -> 8 ... + size = size + tabWidth - size % tabWidth; + } else { + size++; + } + } + + return size; +} + +function getIndentSize(value, tabWidth) { + var lastNewlineIndex = value.lastIndexOf("\n"); + + if (lastNewlineIndex === -1) { + return 0; + } + + return getAlignmentSize( // All the leading whitespaces + value.slice(lastNewlineIndex + 1).match(/^[ \t]*/)[0], tabWidth); +} + +function getPreferredQuote(raw, preferredQuote) { + // `rawContent` is the string exactly like it appeared in the input source + // code, without its enclosing quotes. + var rawContent = raw.slice(1, -1); + var double = { + quote: '"', + regex: /"/g + }; + var single = { + quote: "'", + regex: /'/g + }; + var preferred = preferredQuote === "'" ? single : double; + var alternate = preferred === single ? double : single; + var result = preferred.quote; // If `rawContent` contains at least one of the quote preferred for enclosing + // the string, we might want to enclose with the alternate quote instead, to + // minimize the number of escaped quotes. + + if (rawContent.includes(preferred.quote) || rawContent.includes(alternate.quote)) { + var numPreferredQuotes = (rawContent.match(preferred.regex) || []).length; + var numAlternateQuotes = (rawContent.match(alternate.regex) || []).length; + result = numPreferredQuotes > numAlternateQuotes ? alternate.quote : preferred.quote; + } + + return result; +} + +function printString(raw, options, isDirectiveLiteral) { + // `rawContent` is the string exactly like it appeared in the input source + // code, without its enclosing quotes. + var rawContent = raw.slice(1, -1); // Check for the alternate quote, to determine if we're allowed to swap + // the quotes on a DirectiveLiteral. + + var canChangeDirectiveQuotes = !rawContent.includes('"') && !rawContent.includes("'"); + var enclosingQuote = options.parser === "json" ? '"' : options.__isInHtmlAttribute ? "'" : getPreferredQuote(raw, options.singleQuote ? "'" : '"'); // Directives are exact code unit sequences, which means that you can't + // change the escape sequences they use. + // See https://github.com/prettier/prettier/issues/1555 + // and https://tc39.github.io/ecma262/#directive-prologue + + if (isDirectiveLiteral) { + if (canChangeDirectiveQuotes) { + return enclosingQuote + rawContent + enclosingQuote; + } + + return raw; + } // It might sound unnecessary to use `makeString` even if the string already + // is enclosed with `enclosingQuote`, but it isn't. The string could contain + // unnecessary escapes (such as in `"\'"`). Always using `makeString` makes + // sure that we consistently output the minimum amount of escaped quotes. + + + return makeString(rawContent, enclosingQuote, !(options.parser === "css" || options.parser === "less" || options.parser === "scss" || options.parentParser === "html" || options.parentParser === "vue" || options.parentParser === "angular")); +} + +function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) { + var otherQuote = enclosingQuote === '"' ? "'" : '"'; // Matches _any_ escape and unescaped quotes (both single and double). + + var regex = /\\([\s\S])|(['"])/g; // Escape and unescape single and double quotes as needed to be able to + // enclose `rawContent` with `enclosingQuote`. + + var newContent = rawContent.replace(regex, function (match, escaped, quote) { + // If we matched an escape, and the escaped character is a quote of the + // other type than we intend to enclose the string with, there's no need for + // it to be escaped, so return it _without_ the backslash. + if (escaped === otherQuote) { + return escaped; + } // If we matched an unescaped quote and it is of the _same_ type as we + // intend to enclose the string with, it must be escaped, so return it with + // a backslash. + + + if (quote === enclosingQuote) { + return "\\" + quote; + } + + if (quote) { + return quote; + } // Unescape any unnecessarily escaped character. + // Adapted from https://github.com/eslint/eslint/blob/de0b4ad7bd820ade41b1f606008bea68683dc11a/lib/rules/no-useless-escape.js#L27 + + + return unescapeUnnecessaryEscapes && /^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(escaped) ? escaped : "\\" + escaped; + }); + return enclosingQuote + newContent + enclosingQuote; +} + +function printNumber(rawNumber) { + return rawNumber.toLowerCase() // Remove unnecessary plus and zeroes from scientific notation. + .replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3") // Remove unnecessary scientific notation (1e0). + .replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1") // Make sure numbers always start with a digit. + .replace(/^([+-])?\./, "$10.") // Remove extraneous trailing decimal zeroes. + .replace(/(\.\d+?)0+(?=e|$)/, "$1") // Remove trailing dot. + .replace(/\.(?=e|$)/, ""); +} + +function getMaxContinuousCount(str, target) { + var results = str.match(new RegExp(`(${escapeStringRegexp(target)})+`, "g")); + + if (results === null) { + return 0; + } + + return results.reduce(function (maxCount, result) { + return Math.max(maxCount, result.length / target.length); + }, 0); +} + +function getStringWidth$1(text) { + if (!text) { + return 0; + } // shortcut to avoid needless string `RegExp`s, replacements, and allocations within `string-width` + + + if (!notAsciiRegex.test(text)) { + return text.length; + } // emojis are considered 2-char width for consistency + // see https://github.com/sindresorhus/string-width/issues/11 + // for the reason why not implemented in `string-width` + + + return stringWidth(text.replace(emojiRegex, " ")); +} + +function hasIgnoreComment(path$$1) { + var node = path$$1.getValue(); + return hasNodeIgnoreComment(node); +} + +function hasNodeIgnoreComment(node) { + return node && node.comments && node.comments.length > 0 && node.comments.some(function (comment) { + return comment.value.trim() === "prettier-ignore"; + }); +} + +function matchAncestorTypes(path$$1, types, index) { + index = index || 0; + types = types.slice(); + + while (types.length) { + var parent = path$$1.getParentNode(index); + var type = types.shift(); + + if (!parent || parent.type !== type) { + return false; + } + + index++; + } + + return true; +} + +function addCommentHelper(node, comment) { + var comments = node.comments || (node.comments = []); + comments.push(comment); + comment.printed = false; // For some reason, TypeScript parses `// x` inside of JSXText as a comment + // We already "print" it via the raw text, we don't need to re-print it as a + // comment + + if (node.type === "JSXText") { + comment.printed = true; + } +} + +function addLeadingComment$1(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addDanglingComment$1(node, comment) { + comment.leading = false; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addTrailingComment$1(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} + +function isWithinParentArrayProperty(path$$1, propertyName) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + + if (parent == null) { + return false; + } + + if (!Array.isArray(parent[propertyName])) { + return false; + } + + var key = path$$1.getName(); + return parent[propertyName][key] === node; +} + +var util$1 = { + getStringWidth: getStringWidth$1, + getMaxContinuousCount, + getPrecedence, + shouldFlatten, + isBitwiseOperator, + isExportDeclaration, + getParentExportDeclaration, + getPenultimate, + getLast: getLast$3, + getNextNonSpaceNonCommentCharacterIndexWithStartIndex, + getNextNonSpaceNonCommentCharacterIndex, + getNextNonSpaceNonCommentCharacter, + skip, + skipWhitespace, + skipSpaces, + skipToLineEnd, + skipEverythingButNewLine, + skipInlineComment, + skipTrailingComment, + skipNewline: skipNewline$1, + isNextLineEmptyAfterIndex, + isNextLineEmpty, + isPreviousLineEmpty: isPreviousLineEmpty$1, + hasNewline: hasNewline$1, + hasNewlineInRange, + hasSpaces, + setLocStart, + setLocEnd, + startsWithNoLookaheadToken, + getAlignmentSize, + getIndentSize, + getPreferredQuote, + printString, + printNumber, + hasIgnoreComment, + hasNodeIgnoreComment, + makeString, + matchAncestorTypes, + addLeadingComment: addLeadingComment$1, + addDanglingComment: addDanglingComment$1, + addTrailingComment: addTrailingComment$1, + isWithinParentArrayProperty +}; + +function guessEndOfLine$1(text) { + var index = text.indexOf("\r"); + + if (index >= 0) { + return text.charAt(index + 1) === "\n" ? "crlf" : "cr"; + } + + return "lf"; +} + +function convertEndOfLineToChars$2(value) { + switch (value) { + case "cr": + return "\r"; + + case "crlf": + return "\r\n"; + + default: + return "\n"; + } +} + +var endOfLine = { + guessEndOfLine: guessEndOfLine$1, + convertEndOfLineToChars: convertEndOfLineToChars$2 +}; + +var getStringWidth = util$1.getStringWidth; +var convertEndOfLineToChars$1 = endOfLine.convertEndOfLineToChars; +var concat$2 = docBuilders.concat; +var fill$1 = docBuilders.fill; +var cursor$2 = docBuilders.cursor; +/** @type {{[groupId: PropertyKey]: MODE}} */ + +var groupModeMap; +var MODE_BREAK = 1; +var MODE_FLAT = 2; + +function rootIndent() { + return { + value: "", + length: 0, + queue: [] + }; +} + +function makeIndent(ind, options) { + return generateInd(ind, { + type: "indent" + }, options); +} + +function makeAlign(ind, n, options) { + return n === -Infinity ? ind.root || rootIndent() : n < 0 ? generateInd(ind, { + type: "dedent" + }, options) : !n ? ind : n.type === "root" ? Object.assign({}, ind, { + root: ind + }) : typeof n === "string" ? generateInd(ind, { + type: "stringAlign", + n + }, options) : generateInd(ind, { + type: "numberAlign", + n + }, options); +} + +function generateInd(ind, newPart, options) { + var queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : ind.queue.concat(newPart); + var value = ""; + var length = 0; + var lastTabs = 0; + var lastSpaces = 0; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = queue[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var part = _step.value; + + switch (part.type) { + case "indent": + flush(); + + if (options.useTabs) { + addTabs(1); + } else { + addSpaces(options.tabWidth); + } + + break; + + case "stringAlign": + flush(); + value += part.n; + length += part.n.length; + break; + + case "numberAlign": + lastTabs += 1; + lastSpaces += part.n; + break; + + /* istanbul ignore next */ + + default: + throw new Error(`Unexpected type '${part.type}'`); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + flushSpaces(); + return Object.assign({}, ind, { + value, + length, + queue + }); + + function addTabs(count) { + value += "\t".repeat(count); + length += options.tabWidth * count; + } + + function addSpaces(count) { + value += " ".repeat(count); + length += count; + } + + function flush() { + if (options.useTabs) { + flushTabs(); + } else { + flushSpaces(); + } + } + + function flushTabs() { + if (lastTabs > 0) { + addTabs(lastTabs); + } + + resetLast(); + } + + function flushSpaces() { + if (lastSpaces > 0) { + addSpaces(lastSpaces); + } + + resetLast(); + } + + function resetLast() { + lastTabs = 0; + lastSpaces = 0; + } +} + +function trim$1(out) { + if (out.length === 0) { + return 0; + } + + var trimCount = 0; // Trim whitespace at the end of line + + while (out.length > 0 && typeof out[out.length - 1] === "string" && out[out.length - 1].match(/^[ \t]*$/)) { + trimCount += out.pop().length; + } + + if (out.length && typeof out[out.length - 1] === "string") { + var trimmed = out[out.length - 1].replace(/[ \t]*$/, ""); + trimCount += out[out.length - 1].length - trimmed.length; + out[out.length - 1] = trimmed; + } + + return trimCount; +} + +function fits(next, restCommands, width, options, mustBeFlat) { + var restIdx = restCommands.length; + var cmds = [next]; // `out` is only used for width counting because `trim` requires to look + // backwards for space characters. + + var out = []; + + while (width >= 0) { + if (cmds.length === 0) { + if (restIdx === 0) { + return true; + } + + cmds.push(restCommands[restIdx - 1]); + restIdx--; + continue; + } + + var x = cmds.pop(); + var ind = x[0]; + var mode = x[1]; + var doc = x[2]; + + if (typeof doc === "string") { + out.push(doc); + width -= getStringWidth(doc); + } else { + switch (doc.type) { + case "concat": + for (var i = doc.parts.length - 1; i >= 0; i--) { + cmds.push([ind, mode, doc.parts[i]]); + } + + break; + + case "indent": + cmds.push([makeIndent(ind, options), mode, doc.contents]); + break; + + case "align": + cmds.push([makeAlign(ind, doc.n, options), mode, doc.contents]); + break; + + case "trim": + width += trim$1(out); + break; + + case "group": + if (mustBeFlat && doc.break) { + return false; + } + + cmds.push([ind, doc.break ? MODE_BREAK : mode, doc.contents]); + + if (doc.id) { + groupModeMap[doc.id] = cmds[cmds.length - 1][1]; + } + + break; + + case "fill": + for (var _i = doc.parts.length - 1; _i >= 0; _i--) { + cmds.push([ind, mode, doc.parts[_i]]); + } + + break; + + case "if-break": + { + var groupMode = doc.groupId ? groupModeMap[doc.groupId] : mode; + + if (groupMode === MODE_BREAK) { + if (doc.breakContents) { + cmds.push([ind, mode, doc.breakContents]); + } + } + + if (groupMode === MODE_FLAT) { + if (doc.flatContents) { + cmds.push([ind, mode, doc.flatContents]); + } + } + + break; + } + + case "line": + switch (mode) { + // fallthrough + case MODE_FLAT: + if (!doc.hard) { + if (!doc.soft) { + out.push(" "); + width -= 1; + } + + break; + } + + return true; + + case MODE_BREAK: + return true; + } + + break; + } + } + } + + return false; +} + +function printDocToString$1(doc, options) { + groupModeMap = {}; + var width = options.printWidth; + var newLine = convertEndOfLineToChars$1(options.endOfLine); + var pos = 0; // cmds is basically a stack. We've turned a recursive call into a + // while loop which is much faster. The while loop below adds new + // cmds to the array instead of recursively calling `print`. + + var cmds = [[rootIndent(), MODE_BREAK, doc]]; + var out = []; + var shouldRemeasure = false; + var lineSuffix = []; + + while (cmds.length !== 0) { + var x = cmds.pop(); + var ind = x[0]; + var mode = x[1]; + var _doc = x[2]; + + if (typeof _doc === "string") { + out.push(_doc); + pos += getStringWidth(_doc); + } else { + switch (_doc.type) { + case "cursor": + out.push(cursor$2.placeholder); + break; + + case "concat": + for (var i = _doc.parts.length - 1; i >= 0; i--) { + cmds.push([ind, mode, _doc.parts[i]]); + } + + break; + + case "indent": + cmds.push([makeIndent(ind, options), mode, _doc.contents]); + break; + + case "align": + cmds.push([makeAlign(ind, _doc.n, options), mode, _doc.contents]); + break; + + case "trim": + pos -= trim$1(out); + break; + + case "group": + switch (mode) { + case MODE_FLAT: + if (!shouldRemeasure) { + cmds.push([ind, _doc.break ? MODE_BREAK : MODE_FLAT, _doc.contents]); + break; + } + + // fallthrough + + case MODE_BREAK: + { + shouldRemeasure = false; + var next = [ind, MODE_FLAT, _doc.contents]; + var rem = width - pos; + + if (!_doc.break && fits(next, cmds, rem, options)) { + cmds.push(next); + } else { + // Expanded states are a rare case where a document + // can manually provide multiple representations of + // itself. It provides an array of documents + // going from the least expanded (most flattened) + // representation first to the most expanded. If a + // group has these, we need to manually go through + // these states and find the first one that fits. + if (_doc.expandedStates) { + var mostExpanded = _doc.expandedStates[_doc.expandedStates.length - 1]; + + if (_doc.break) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + break; + } else { + for (var _i2 = 1; _i2 < _doc.expandedStates.length + 1; _i2++) { + if (_i2 >= _doc.expandedStates.length) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + break; + } else { + var state = _doc.expandedStates[_i2]; + var cmd = [ind, MODE_FLAT, state]; + + if (fits(cmd, cmds, rem, options)) { + cmds.push(cmd); + break; + } + } + } + } + } else { + cmds.push([ind, MODE_BREAK, _doc.contents]); + } + } + + break; + } + } + + if (_doc.id) { + groupModeMap[_doc.id] = cmds[cmds.length - 1][1]; + } + + break; + // Fills each line with as much code as possible before moving to a new + // line with the same indentation. + // + // Expects doc.parts to be an array of alternating content and + // whitespace. The whitespace contains the linebreaks. + // + // For example: + // ["I", line, "love", line, "monkeys"] + // or + // [{ type: group, ... }, softline, { type: group, ... }] + // + // It uses this parts structure to handle three main layout cases: + // * The first two content items fit on the same line without + // breaking + // -> output the first content item and the whitespace "flat". + // * Only the first content item fits on the line without breaking + // -> output the first content item "flat" and the whitespace with + // "break". + // * Neither content item fits on the line without breaking + // -> output the first content item and the whitespace with "break". + + case "fill": + { + var _rem = width - pos; + + var parts = _doc.parts; + + if (parts.length === 0) { + break; + } + + var content = parts[0]; + var contentFlatCmd = [ind, MODE_FLAT, content]; + var contentBreakCmd = [ind, MODE_BREAK, content]; + var contentFits = fits(contentFlatCmd, [], _rem, options, true); + + if (parts.length === 1) { + if (contentFits) { + cmds.push(contentFlatCmd); + } else { + cmds.push(contentBreakCmd); + } + + break; + } + + var whitespace = parts[1]; + var whitespaceFlatCmd = [ind, MODE_FLAT, whitespace]; + var whitespaceBreakCmd = [ind, MODE_BREAK, whitespace]; + + if (parts.length === 2) { + if (contentFits) { + cmds.push(whitespaceFlatCmd); + cmds.push(contentFlatCmd); + } else { + cmds.push(whitespaceBreakCmd); + cmds.push(contentBreakCmd); + } + + break; + } // At this point we've handled the first pair (context, separator) + // and will create a new fill doc for the rest of the content. + // Ideally we wouldn't mutate the array here but coping all the + // elements to a new array would make this algorithm quadratic, + // which is unusable for large arrays (e.g. large texts in JSX). + + + parts.splice(0, 2); + var remainingCmd = [ind, mode, fill$1(parts)]; + var secondContent = parts[0]; + var firstAndSecondContentFlatCmd = [ind, MODE_FLAT, concat$2([content, whitespace, secondContent])]; + var firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], _rem, options, true); + + if (firstAndSecondContentFits) { + cmds.push(remainingCmd); + cmds.push(whitespaceFlatCmd); + cmds.push(contentFlatCmd); + } else if (contentFits) { + cmds.push(remainingCmd); + cmds.push(whitespaceBreakCmd); + cmds.push(contentFlatCmd); + } else { + cmds.push(remainingCmd); + cmds.push(whitespaceBreakCmd); + cmds.push(contentBreakCmd); + } + + break; + } + + case "if-break": + { + var groupMode = _doc.groupId ? groupModeMap[_doc.groupId] : mode; + + if (groupMode === MODE_BREAK) { + if (_doc.breakContents) { + cmds.push([ind, mode, _doc.breakContents]); + } + } + + if (groupMode === MODE_FLAT) { + if (_doc.flatContents) { + cmds.push([ind, mode, _doc.flatContents]); + } + } + + break; + } + + case "line-suffix": + lineSuffix.push([ind, mode, _doc.contents]); + break; + + case "line-suffix-boundary": + if (lineSuffix.length > 0) { + cmds.push([ind, mode, { + type: "line", + hard: true + }]); + } + + break; + + case "line": + switch (mode) { + case MODE_FLAT: + if (!_doc.hard) { + if (!_doc.soft) { + out.push(" "); + pos += 1; + } + + break; + } else { + // This line was forced into the output even if we + // were in flattened mode, so we need to tell the next + // group that no matter what, it needs to remeasure + // because the previous measurement didn't accurately + // capture the entire expression (this is necessary + // for nested groups) + shouldRemeasure = true; + } + + // fallthrough + + case MODE_BREAK: + if (lineSuffix.length) { + cmds.push([ind, mode, _doc]); + [].push.apply(cmds, lineSuffix.reverse()); + lineSuffix = []; + break; + } + + if (_doc.literal) { + if (ind.root) { + out.push(newLine, ind.root.value); + pos = ind.root.length; + } else { + out.push(newLine); + pos = 0; + } + } else { + pos -= trim$1(out); + out.push(newLine + ind.value); + pos = ind.length; + } + + break; + } + + break; + + default: + } + } + } + + var cursorPlaceholderIndex = out.indexOf(cursor$2.placeholder); + + if (cursorPlaceholderIndex !== -1) { + var otherCursorPlaceholderIndex = out.indexOf(cursor$2.placeholder, cursorPlaceholderIndex + 1); + var beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); + var aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join(""); + var afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join(""); + return { + formatted: beforeCursor + aroundCursor + afterCursor, + cursorNodeStart: beforeCursor.length, + cursorNodeText: aroundCursor + }; + } + + return { + formatted: out.join("") + }; +} + +var docPrinter = { + printDocToString: printDocToString$1 +}; + +var traverseDocOnExitStackMarker = {}; + +function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { + var docsStack = [doc]; + + while (docsStack.length !== 0) { + var _doc = docsStack.pop(); + + if (_doc === traverseDocOnExitStackMarker) { + onExit(docsStack.pop()); + continue; + } + + var shouldRecurse = true; + + if (onEnter) { + if (onEnter(_doc) === false) { + shouldRecurse = false; + } + } + + if (onExit) { + docsStack.push(_doc); + docsStack.push(traverseDocOnExitStackMarker); + } + + if (shouldRecurse) { + // When there are multiple parts to process, + // the parts need to be pushed onto the stack in reverse order, + // so that they are processed in the original order + // when the stack is popped. + if (_doc.type === "concat" || _doc.type === "fill") { + for (var ic = _doc.parts.length, i = ic - 1; i >= 0; --i) { + docsStack.push(_doc.parts[i]); + } + } else if (_doc.type === "if-break") { + if (_doc.flatContents) { + docsStack.push(_doc.flatContents); + } + + if (_doc.breakContents) { + docsStack.push(_doc.breakContents); + } + } else if (_doc.type === "group" && _doc.expandedStates) { + if (shouldTraverseConditionalGroups) { + for (var _ic = _doc.expandedStates.length, _i = _ic - 1; _i >= 0; --_i) { + docsStack.push(_doc.expandedStates[_i]); + } + } else { + docsStack.push(_doc.contents); + } + } else if (_doc.contents) { + docsStack.push(_doc.contents); + } + } + } +} + +function mapDoc(doc, cb) { + if (doc.type === "concat" || doc.type === "fill") { + var parts = doc.parts.map(function (part) { + return mapDoc(part, cb); + }); + return cb(Object.assign({}, doc, { + parts + })); + } else if (doc.type === "if-break") { + var breakContents = doc.breakContents && mapDoc(doc.breakContents, cb); + var flatContents = doc.flatContents && mapDoc(doc.flatContents, cb); + return cb(Object.assign({}, doc, { + breakContents, + flatContents + })); + } else if (doc.contents) { + var contents = mapDoc(doc.contents, cb); + return cb(Object.assign({}, doc, { + contents + })); + } + + return cb(doc); +} + +function findInDoc(doc, fn, defaultValue) { + var result = defaultValue; + var hasStopped = false; + + function findInDocOnEnterFn(doc) { + var maybeResult = fn(doc); + + if (maybeResult !== undefined) { + hasStopped = true; + result = maybeResult; + } + + if (hasStopped) { + return false; + } + } + + traverseDoc(doc, findInDocOnEnterFn); + return result; +} + +function isEmpty(n) { + return typeof n === "string" && n.length === 0; +} + +function isLineNextFn(doc) { + if (typeof doc === "string") { + return false; + } + + if (doc.type === "line") { + return true; + } +} + +function isLineNext(doc) { + return findInDoc(doc, isLineNextFn, false); +} + +function willBreakFn(doc) { + if (doc.type === "group" && doc.break) { + return true; + } + + if (doc.type === "line" && doc.hard) { + return true; + } + + if (doc.type === "break-parent") { + return true; + } +} + +function willBreak(doc) { + return findInDoc(doc, willBreakFn, false); +} + +function breakParentGroup(groupStack) { + if (groupStack.length > 0) { + var parentGroup = groupStack[groupStack.length - 1]; // Breaks are not propagated through conditional groups because + // the user is expected to manually handle what breaks. + + if (!parentGroup.expandedStates) { + parentGroup.break = true; + } + } + + return null; +} + +function propagateBreaks(doc) { + var alreadyVisitedSet = new Set(); + var groupStack = []; + + function propagateBreaksOnEnterFn(doc) { + if (doc.type === "break-parent") { + breakParentGroup(groupStack); + } + + if (doc.type === "group") { + groupStack.push(doc); + + if (alreadyVisitedSet.has(doc)) { + return false; + } + + alreadyVisitedSet.add(doc); + } + } + + function propagateBreaksOnExitFn(doc) { + if (doc.type === "group") { + var group = groupStack.pop(); + + if (group.break) { + breakParentGroup(groupStack); + } + } + } + + traverseDoc(doc, propagateBreaksOnEnterFn, propagateBreaksOnExitFn, + /* shouldTraverseConditionalGroups */ + true); +} + +function removeLinesFn(doc) { + // Force this doc into flat mode by statically converting all + // lines into spaces (or soft lines into nothing). Hard lines + // should still output because there's too great of a chance + // of breaking existing assumptions otherwise. + if (doc.type === "line" && !doc.hard) { + return doc.soft ? "" : " "; + } else if (doc.type === "if-break") { + return doc.flatContents || ""; + } + + return doc; +} + +function removeLines(doc) { + return mapDoc(doc, removeLinesFn); +} + +function stripTrailingHardline(doc) { + // HACK remove ending hardline, original PR: #1984 + if (doc.type === "concat" && doc.parts.length !== 0) { + var lastPart = doc.parts[doc.parts.length - 1]; + + if (lastPart.type === "concat") { + if (lastPart.parts.length === 2 && lastPart.parts[0].hard && lastPart.parts[1].type === "break-parent") { + return { + type: "concat", + parts: doc.parts.slice(0, -1) + }; + } + + return { + type: "concat", + parts: doc.parts.slice(0, -1).concat(stripTrailingHardline(lastPart)) + }; + } + } + + return doc; +} + +var docUtils = { + isEmpty, + willBreak, + isLineNext, + traverseDoc, + mapDoc, + propagateBreaks, + removeLines, + stripTrailingHardline +}; + +function flattenDoc(doc) { + if (doc.type === "concat") { + var res = []; + + for (var i = 0; i < doc.parts.length; ++i) { + var doc2 = doc.parts[i]; + + if (typeof doc2 !== "string" && doc2.type === "concat") { + [].push.apply(res, flattenDoc(doc2).parts); + } else { + var flattened = flattenDoc(doc2); + + if (flattened !== "") { + res.push(flattened); + } + } + } + + return Object.assign({}, doc, { + parts: res + }); + } else if (doc.type === "if-break") { + return Object.assign({}, doc, { + breakContents: doc.breakContents != null ? flattenDoc(doc.breakContents) : null, + flatContents: doc.flatContents != null ? flattenDoc(doc.flatContents) : null + }); + } else if (doc.type === "group") { + return Object.assign({}, doc, { + contents: flattenDoc(doc.contents), + expandedStates: doc.expandedStates ? doc.expandedStates.map(flattenDoc) : doc.expandedStates + }); + } else if (doc.contents) { + return Object.assign({}, doc, { + contents: flattenDoc(doc.contents) + }); + } + + return doc; +} + +function printDoc(doc) { + if (typeof doc === "string") { + return JSON.stringify(doc); + } + + if (doc.type === "line") { + if (doc.literal) { + return "literalline"; + } + + if (doc.hard) { + return "hardline"; + } + + if (doc.soft) { + return "softline"; + } + + return "line"; + } + + if (doc.type === "break-parent") { + return "breakParent"; + } + + if (doc.type === "trim") { + return "trim"; + } + + if (doc.type === "concat") { + return "[" + doc.parts.map(printDoc).join(", ") + "]"; + } + + if (doc.type === "indent") { + return "indent(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "align") { + return doc.n === -Infinity ? "dedentToRoot(" + printDoc(doc.contents) + ")" : doc.n < 0 ? "dedent(" + printDoc(doc.contents) + ")" : doc.n.type === "root" ? "markAsRoot(" + printDoc(doc.contents) + ")" : "align(" + JSON.stringify(doc.n) + ", " + printDoc(doc.contents) + ")"; + } + + if (doc.type === "if-break") { + return "ifBreak(" + printDoc(doc.breakContents) + (doc.flatContents ? ", " + printDoc(doc.flatContents) : "") + ")"; + } + + if (doc.type === "group") { + if (doc.expandedStates) { + return "conditionalGroup(" + "[" + doc.expandedStates.map(printDoc).join(",") + "])"; + } + + return (doc.break ? "wrappedGroup" : "group") + "(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "fill") { + return "fill" + "(" + doc.parts.map(printDoc).join(", ") + ")"; + } + + if (doc.type === "line-suffix") { + return "lineSuffix(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "line-suffix-boundary") { + return "lineSuffixBoundary"; + } + + throw new Error("Unknown doc type " + doc.type); +} + +var docDebug = { + printDocToDebug: function printDocToDebug(doc) { + return printDoc(flattenDoc(doc)); + } +}; + +var doc = { + builders: docBuilders, + printer: docPrinter, + utils: docUtils, + debug: docDebug +}; + +var mapDoc$1 = doc.utils.mapDoc; + +function isNextLineEmpty$1(text, node, options) { + return util$1.isNextLineEmpty(text, node, options.locEnd); +} + +function isPreviousLineEmpty$2(text, node, options) { + return util$1.isPreviousLineEmpty(text, node, options.locStart); +} + +function getNextNonSpaceNonCommentCharacterIndex$1(text, node, options) { + return util$1.getNextNonSpaceNonCommentCharacterIndex(text, node, options.locEnd); +} + +var utilShared = { + getMaxContinuousCount: util$1.getMaxContinuousCount, + getStringWidth: util$1.getStringWidth, + getAlignmentSize: util$1.getAlignmentSize, + getIndentSize: util$1.getIndentSize, + skip: util$1.skip, + skipWhitespace: util$1.skipWhitespace, + skipSpaces: util$1.skipSpaces, + skipNewline: util$1.skipNewline, + skipToLineEnd: util$1.skipToLineEnd, + skipEverythingButNewLine: util$1.skipEverythingButNewLine, + skipInlineComment: util$1.skipInlineComment, + skipTrailingComment: util$1.skipTrailingComment, + hasNewline: util$1.hasNewline, + hasNewlineInRange: util$1.hasNewlineInRange, + hasSpaces: util$1.hasSpaces, + isNextLineEmpty: isNextLineEmpty$1, + isNextLineEmptyAfterIndex: util$1.isNextLineEmptyAfterIndex, + isPreviousLineEmpty: isPreviousLineEmpty$2, + getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$1, + mapDoc: mapDoc$1, + // TODO: remove in 2.0, we already exposed it in docUtils + makeString: util$1.makeString, + addLeadingComment: util$1.addLeadingComment, + addDanglingComment: util$1.addDanglingComment, + addTrailingComment: util$1.addTrailingComment +}; + +var _require$$0$builders = doc.builders; +var concat = _require$$0$builders.concat; +var hardline = _require$$0$builders.hardline; +var breakParent = _require$$0$builders.breakParent; +var indent = _require$$0$builders.indent; +var lineSuffix = _require$$0$builders.lineSuffix; +var join = _require$$0$builders.join; +var cursor = _require$$0$builders.cursor; +var hasNewline = util$1.hasNewline; +var skipNewline = util$1.skipNewline; +var isPreviousLineEmpty = util$1.isPreviousLineEmpty; +var addLeadingComment = utilShared.addLeadingComment; +var addDanglingComment = utilShared.addDanglingComment; +var addTrailingComment = utilShared.addTrailingComment; +var childNodesCacheKey = Symbol("child-nodes"); + +function getSortedChildNodes(node, options, resultArray) { + if (!node) { + return; + } + + var printer = options.printer, + locStart = options.locStart, + locEnd = options.locEnd; + + if (resultArray) { + if (node && printer.canAttachComment && printer.canAttachComment(node)) { + // This reverse insertion sort almost always takes constant + // time because we almost always (maybe always?) append the + // nodes in order anyway. + var i; + + for (i = resultArray.length - 1; i >= 0; --i) { + if (locStart(resultArray[i]) <= locStart(node) && locEnd(resultArray[i]) <= locEnd(node)) { + break; + } + } + + resultArray.splice(i + 1, 0, node); + return; + } + } else if (node[childNodesCacheKey]) { + return node[childNodesCacheKey]; + } + + var childNodes; + + if (printer.getCommentChildNodes) { + childNodes = printer.getCommentChildNodes(node); + } else if (node && typeof node === "object") { + childNodes = Object.keys(node).filter(function (n) { + return n !== "enclosingNode" && n !== "precedingNode" && n !== "followingNode"; + }).map(function (n) { + return node[n]; + }); + } + + if (!childNodes) { + return; + } + + if (!resultArray) { + Object.defineProperty(node, childNodesCacheKey, { + value: resultArray = [], + enumerable: false + }); + } + + childNodes.forEach(function (childNode) { + getSortedChildNodes(childNode, options, resultArray); + }); + return resultArray; +} // As efficiently as possible, decorate the comment object with +// .precedingNode, .enclosingNode, and/or .followingNode properties, at +// least one of which is guaranteed to be defined. + + +function decorateComment(node, comment, options) { + var locStart = options.locStart, + locEnd = options.locEnd; + var childNodes = getSortedChildNodes(node, options); + var precedingNode; + var followingNode; // Time to dust off the old binary search robes and wizard hat. + + var left = 0; + var right = childNodes.length; + + while (left < right) { + var middle = left + right >> 1; + var child = childNodes[middle]; + + if (locStart(child) - locStart(comment) <= 0 && locEnd(comment) - locEnd(child) <= 0) { + // The comment is completely contained by this child node. + comment.enclosingNode = child; + decorateComment(child, comment, options); + return; // Abandon the binary search at this level. + } + + if (locEnd(child) - locStart(comment) <= 0) { + // This child node falls completely before the comment. + // Because we will never consider this node or any nodes + // before it again, this node must be the closest preceding + // node we have encountered so far. + precedingNode = child; + left = middle + 1; + continue; + } + + if (locEnd(comment) - locStart(child) <= 0) { + // This child node falls completely after the comment. + // Because we will never consider this node or any nodes after + // it again, this node must be the closest following node we + // have encountered so far. + followingNode = child; + right = middle; + continue; + } + /* istanbul ignore next */ + + + throw new Error("Comment location overlaps with node location"); + } // We don't want comments inside of different expressions inside of the same + // template literal to move to another expression. + + + if (comment.enclosingNode && comment.enclosingNode.type === "TemplateLiteral") { + var quasis = comment.enclosingNode.quasis; + var commentIndex = findExpressionIndexForComment(quasis, comment, options); + + if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options) !== commentIndex) { + precedingNode = null; + } + + if (followingNode && findExpressionIndexForComment(quasis, followingNode, options) !== commentIndex) { + followingNode = null; + } + } + + if (precedingNode) { + comment.precedingNode = precedingNode; + } + + if (followingNode) { + comment.followingNode = followingNode; + } +} + +function attach(comments, ast, text, options) { + if (!Array.isArray(comments)) { + return; + } + + var tiesToBreak = []; + var locStart = options.locStart, + locEnd = options.locEnd; + comments.forEach(function (comment, i) { + if (options.parser === "json" || options.parser === "json5" || options.parser === "__js_expression" || options.parser === "__vue_expression") { + if (locStart(comment) - locStart(ast) <= 0) { + addLeadingComment(ast, comment); + return; + } + + if (locEnd(comment) - locEnd(ast) >= 0) { + addTrailingComment(ast, comment); + return; + } + } + + decorateComment(ast, comment, options); + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + var pluginHandleOwnLineComment = options.printer.handleComments && options.printer.handleComments.ownLine ? options.printer.handleComments.ownLine : function () { + return false; + }; + var pluginHandleEndOfLineComment = options.printer.handleComments && options.printer.handleComments.endOfLine ? options.printer.handleComments.endOfLine : function () { + return false; + }; + var pluginHandleRemainingComment = options.printer.handleComments && options.printer.handleComments.remaining ? options.printer.handleComments.remaining : function () { + return false; + }; + var isLastComment = comments.length - 1 === i; + + if (hasNewline(text, locStart(comment), { + backwards: true + })) { + // If a comment exists on its own line, prefer a leading comment. + // We also need to check if it's the first line of the file. + if (pluginHandleOwnLineComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (followingNode) { + // Always a leading comment. + addLeadingComment(followingNode, comment); + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } else if (hasNewline(text, locEnd(comment))) { + if (pluginHandleEndOfLineComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (precedingNode) { + // There is content before this comment on the same line, but + // none after it, so prefer a trailing comment of the previous node. + addTrailingComment(precedingNode, comment); + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } else { + if (pluginHandleRemainingComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (precedingNode && followingNode) { + // Otherwise, text exists both before and after the comment on + // the same line. If there is both a preceding and following + // node, use a tie-breaking algorithm to determine if it should + // be attached to the next or previous node. In the last case, + // simply attach the right node; + var tieCount = tiesToBreak.length; + + if (tieCount > 0) { + var lastTie = tiesToBreak[tieCount - 1]; + + if (lastTie.followingNode !== comment.followingNode) { + breakTies(tiesToBreak, text, options); + } + } + + tiesToBreak.push(comment); + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } + }); + breakTies(tiesToBreak, text, options); + comments.forEach(function (comment) { + // These node references were useful for breaking ties, but we + // don't need them anymore, and they create cycles in the AST that + // may lead to infinite recursion if we don't delete them here. + delete comment.precedingNode; + delete comment.enclosingNode; + delete comment.followingNode; + }); +} + +function breakTies(tiesToBreak, text, options) { + var tieCount = tiesToBreak.length; + + if (tieCount === 0) { + return; + } + + var _tiesToBreak$ = tiesToBreak[0], + precedingNode = _tiesToBreak$.precedingNode, + followingNode = _tiesToBreak$.followingNode; + var gapEndPos = options.locStart(followingNode); // Iterate backwards through tiesToBreak, examining the gaps + // between the tied comments. In order to qualify as leading, a + // comment must be separated from followingNode by an unbroken series of + // gaps (or other comments). Gaps should only contain whitespace or open + // parentheses. + + var indexOfFirstLeadingComment; + + for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) { + var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert.strictEqual(comment.precedingNode, precedingNode); + assert.strictEqual(comment.followingNode, followingNode); + var gap = text.slice(options.locEnd(comment), gapEndPos).trim(); + + if (gap === "" || /^\(+$/.test(gap)) { + gapEndPos = options.locStart(comment); + } else { + // The gap string contained something other than whitespace or open + // parentheses. + break; + } + } + + tiesToBreak.forEach(function (comment, i) { + if (i < indexOfFirstLeadingComment) { + addTrailingComment(precedingNode, comment); + } else { + addLeadingComment(followingNode, comment); + } + }); + tiesToBreak.length = 0; +} + +function printComment(commentPath, options) { + var comment = commentPath.getValue(); + comment.printed = true; + return options.printer.printComment(commentPath, options); +} + +function findExpressionIndexForComment(quasis, comment, options) { + var startPos = options.locStart(comment) - 1; + + for (var i = 1; i < quasis.length; ++i) { + if (startPos < getQuasiRange(quasis[i]).start) { + return i - 1; + } + } // We haven't found it, it probably means that some of the locations are off. + // Let's just return the first one. + + /* istanbul ignore next */ + + + return 0; +} + +function getQuasiRange(expr) { + if (expr.start !== undefined) { + // Babylon + return { + start: expr.start, + end: expr.end + }; + } // Flow + + + return { + start: expr.range[0], + end: expr.range[1] + }; +} + +function printLeadingComment(commentPath, print, options) { + var comment = commentPath.getValue(); + var contents = printComment(commentPath, options); + + if (!contents) { + return ""; + } + + var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // Leading block comments should see if they need to stay on the + // same line or not. + + if (isBlock) { + return concat([contents, hasNewline(options.originalText, options.locEnd(comment)) ? hardline : " "]); + } + + return concat([contents, hardline]); +} + +function printTrailingComment(commentPath, print, options) { + var comment = commentPath.getValue(); + var contents = printComment(commentPath, options); + + if (!contents) { + return ""; + } + + var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // We don't want the line to break + // when the parentParentNode is a ClassDeclaration/-Expression + // And the parentNode is in the superClass property + + var parentNode = commentPath.getNode(1); + var parentParentNode = commentPath.getNode(2); + var isParentSuperClass = parentParentNode && (parentParentNode.type === "ClassDeclaration" || parentParentNode.type === "ClassExpression") && parentParentNode.superClass === parentNode; + + if (hasNewline(options.originalText, options.locStart(comment), { + backwards: true + })) { + // This allows comments at the end of nested structures: + // { + // x: 1, + // y: 2 + // // A comment + // } + // Those kinds of comments are almost always leading comments, but + // here it doesn't go "outside" the block and turns it into a + // trailing comment for `2`. We can simulate the above by checking + // if this a comment on its own line; normal trailing comments are + // always at the end of another expression. + var isLineBeforeEmpty = isPreviousLineEmpty(options.originalText, comment, options.locStart); + return lineSuffix(concat([hardline, isLineBeforeEmpty ? hardline : "", contents])); + } else if (isBlock || isParentSuperClass) { + // Trailing block comments never need a newline + return concat([" ", contents]); + } + + return concat([lineSuffix(" " + contents), !isBlock ? breakParent : ""]); +} + +function printDanglingComments(path$$1, options, sameIndent, filter) { + var parts = []; + var node = path$$1.getValue(); + + if (!node || !node.comments) { + return ""; + } + + path$$1.each(function (commentPath) { + var comment = commentPath.getValue(); + + if (comment && !comment.leading && !comment.trailing && (!filter || filter(comment))) { + parts.push(printComment(commentPath, options)); + } + }, "comments"); + + if (parts.length === 0) { + return ""; + } + + if (sameIndent) { + return join(hardline, parts); + } + + return indent(concat([hardline, join(hardline, parts)])); +} + +function prependCursorPlaceholder(path$$1, options, printed) { + if (path$$1.getNode() === options.cursorNode && path$$1.getValue()) { + return concat([cursor, printed, cursor]); + } + + return printed; +} + +function printComments(path$$1, print, options, needsSemi) { + var value = path$$1.getValue(); + var printed = print(path$$1); + var comments = value && value.comments; + + if (!comments || comments.length === 0) { + return prependCursorPlaceholder(path$$1, options, printed); + } + + var leadingParts = []; + var trailingParts = [needsSemi ? ";" : "", printed]; + path$$1.each(function (commentPath) { + var comment = commentPath.getValue(); + var leading = comment.leading, + trailing = comment.trailing; + + if (leading) { + var contents = printLeadingComment(commentPath, print, options); + + if (!contents) { + return; + } + + leadingParts.push(contents); + var text = options.originalText; + + if (hasNewline(text, skipNewline(text, options.locEnd(comment)))) { + leadingParts.push(hardline); + } + } else if (trailing) { + trailingParts.push(printTrailingComment(commentPath, print, options)); + } + }, "comments"); + return prependCursorPlaceholder(path$$1, options, concat(leadingParts.concat(trailingParts))); +} + +var comments = { + attach, + printComments, + printDanglingComments, + getSortedChildNodes +}; + +function FastPath(value) { + assert.ok(this instanceof FastPath); + this.stack = [value]; +} // The name of the current property is always the penultimate element of +// this.stack, and always a String. + + +FastPath.prototype.getName = function getName() { + var s = this.stack; + var len = s.length; + + if (len > 1) { + return s[len - 2]; + } // Since the name is always a string, null is a safe sentinel value to + // return if we do not know the name of the (root) value. + + /* istanbul ignore next */ + + + return null; +}; // The value of the current property is always the final element of +// this.stack. + + +FastPath.prototype.getValue = function getValue() { + var s = this.stack; + return s[s.length - 1]; +}; + +function getNodeHelper(path$$1, count) { + var s = path$$1.stack; + + for (var i = s.length - 1; i >= 0; i -= 2) { + var value = s[i]; + + if (value && !Array.isArray(value) && --count < 0) { + return value; + } + } + + return null; +} + +FastPath.prototype.getNode = function getNode(count) { + return getNodeHelper(this, ~~count); +}; + +FastPath.prototype.getParentNode = function getParentNode(count) { + return getNodeHelper(this, ~~count + 1); +}; // Temporarily push properties named by string arguments given after the +// callback function onto this.stack, then call the callback with a +// reference to this (modified) FastPath object. Note that the stack will +// be restored to its original state after the callback is finished, so it +// is probably a mistake to retain a reference to the path. + + +FastPath.prototype.call = function call(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + var result = callback(this); + s.length = origLen; + return result; +}; // Similar to FastPath.prototype.call, except that the value obtained by +// accessing this.getValue()[name1][name2]... should be array-like. The +// callback will be called with a reference to this path object for each +// element of the array. + + +FastPath.prototype.each = function each(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + for (var _i = 0; _i < value.length; ++_i) { + if (_i in value) { + s.push(_i, value[_i]); // If the callback needs to know the value of i, call + // path.getName(), assuming path is the parameter name. + + callback(this); + s.length -= 2; + } + } + + s.length = origLen; +}; // Similar to FastPath.prototype.each, except that the results of the +// callback function invocations are stored in an array and returned at +// the end of the iteration. + + +FastPath.prototype.map = function map(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + var result = new Array(value.length); + + for (var _i2 = 0; _i2 < value.length; ++_i2) { + if (_i2 in value) { + s.push(_i2, value[_i2]); + result[_i2] = callback(this, _i2); + s.length -= 2; + } + } + + s.length = origLen; + return result; +}; + +var fastPath = FastPath; + +var normalize$3 = options.normalize; + +function printSubtree(path$$1, print, options$$1, printAstToDoc) { + if (options$$1.printer.embed) { + return options$$1.printer.embed(path$$1, print, function (text, partialNextOptions) { + return textToDoc(text, partialNextOptions, options$$1, printAstToDoc); + }, options$$1); + } +} + +function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc) { + var nextOptions = normalize$3(Object.assign({}, parentOptions, partialNextOptions, { + parentParser: parentOptions.parser, + originalText: text + }), { + passThrough: true + }); + var result = parser.parse(text, nextOptions); + var ast = result.ast; + text = result.text; + var astComments = ast.comments; + delete ast.comments; + comments.attach(astComments, ast, text, nextOptions); + return printAstToDoc(ast, nextOptions); +} + +var multiparser = { + printSubtree +}; + +var doc$2 = doc; +var docBuilders$2 = doc$2.builders; +var concat$3 = docBuilders$2.concat; +var hardline$2 = docBuilders$2.hardline; +var addAlignmentToDoc$1 = docBuilders$2.addAlignmentToDoc; +var docUtils$2 = doc$2.utils; +/** + * Takes an abstract syntax tree (AST) and recursively converts it to a + * document (series of printing primitives). + * + * This is done by descending down the AST recursively. The recursion + * involves two functions that call each other: + * + * 1. printGenerically(), which is defined as an inner function here. + * It basically takes care of node caching. + * 2. callPluginPrintFunction(), which checks for some options, and + * ultimately calls the print() function provided by the plugin. + * + * The plugin function will call printGenerically() again for child nodes + * of the current node, which will do its housekeeping, then call the + * plugin function again, and so on. + * + * All the while, these functions pass a "path" variable around, which + * is a stack-like data structure (FastPath) that maintains the current + * state of the recursion. It is called "path", because it represents + * the path to the current node through the Abstract Syntax Tree. + */ + +function printAstToDoc(ast, options) { + var alignmentSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var printer = options.printer; + + if (printer.preprocess) { + ast = printer.preprocess(ast, options); + } + + var cache = new Map(); + + function printGenerically(path$$1, args) { + var node = path$$1.getValue(); + var shouldCache = node && typeof node === "object" && args === undefined; + + if (shouldCache && cache.has(node)) { + return cache.get(node); + } // We let JSXElement print its comments itself because it adds () around + // UnionTypeAnnotation has to align the child without the comments + + + var res; + + if (printer.willPrintOwnComments && printer.willPrintOwnComments(path$$1)) { + res = callPluginPrintFunction(path$$1, options, printGenerically, args); + } else { + // printComments will call the plugin print function and check for + // comments to print + res = comments.printComments(path$$1, function (p) { + return callPluginPrintFunction(p, options, printGenerically, args); + }, options, args && args.needsSemi); + } + + if (shouldCache) { + cache.set(node, res); + } + + return res; + } + + var doc$$2 = printGenerically(new fastPath(ast)); + + if (alignmentSize > 0) { + // Add a hardline to make the indents take effect + // It should be removed in index.js format() + doc$$2 = addAlignmentToDoc$1(docUtils$2.removeLines(concat$3([hardline$2, doc$$2])), alignmentSize, options.tabWidth); + } + + docUtils$2.propagateBreaks(doc$$2); + return doc$$2; +} + +function callPluginPrintFunction(path$$1, options, printPath, args) { + assert.ok(path$$1 instanceof fastPath); + var node = path$$1.getValue(); + var printer = options.printer; // Escape hatch + + if (printer.hasPrettierIgnore && printer.hasPrettierIgnore(path$$1)) { + return options.originalText.slice(options.locStart(node), options.locEnd(node)); + } + + if (node) { + try { + // Potentially switch to a different parser + var sub = multiparser.printSubtree(path$$1, printPath, options, printAstToDoc); + + if (sub) { + return sub; + } + } catch (error) { + /* istanbul ignore if */ + if (process.env.PRETTIER_DEBUG) { + throw error; + } // Continue with current parser + + } + } + + return printer.print(path$$1, options, printPath, args); +} + +var astToDoc = printAstToDoc; + +function findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts) { + var resultStartNode = startNodeAndParents.node; + var resultEndNode = endNodeAndParents.node; + + if (resultStartNode === resultEndNode) { + return { + startNode: resultStartNode, + endNode: resultEndNode + }; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = endNodeAndParents.parentNodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var endParent = _step.value; + + if (endParent.type !== "Program" && endParent.type !== "File" && opts.locStart(endParent) >= opts.locStart(startNodeAndParents.node)) { + resultEndNode = endParent; + } else { + break; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = startNodeAndParents.parentNodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var startParent = _step2.value; + + if (startParent.type !== "Program" && startParent.type !== "File" && opts.locEnd(startParent) <= opts.locEnd(endNodeAndParents.node)) { + resultStartNode = startParent; + } else { + break; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return { + startNode: resultStartNode, + endNode: resultEndNode + }; +} + +function findNodeAtOffset(node, offset, options, predicate, parentNodes) { + predicate = predicate || function () { + return true; + }; + + parentNodes = parentNodes || []; + var start = options.locStart(node, options.locStart); + var end = options.locEnd(node, options.locEnd); + + if (start <= offset && offset <= end) { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = comments.getSortedChildNodes(node, options)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var childNode = _step3.value; + var childResult = findNodeAtOffset(childNode, offset, options, predicate, [node].concat(parentNodes)); + + if (childResult) { + return childResult; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + if (predicate(node)) { + return { + node: node, + parentNodes: parentNodes + }; + } + } +} // See https://www.ecma-international.org/ecma-262/5.1/#sec-A.5 + + +function isSourceElement(opts, node) { + if (node == null) { + return false; + } // JS and JS like to avoid repetitions + + + var jsSourceElements = ["FunctionDeclaration", "BlockStatement", "BreakStatement", "ContinueStatement", "DebuggerStatement", "DoWhileStatement", "EmptyStatement", "ExpressionStatement", "ForInStatement", "ForStatement", "IfStatement", "LabeledStatement", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "VariableDeclaration", "WhileStatement", "WithStatement", "ClassDeclaration", // ES 2015 + "ImportDeclaration", // Module + "ExportDefaultDeclaration", // Module + "ExportNamedDeclaration", // Module + "ExportAllDeclaration", // Module + "TypeAlias", // Flow + "InterfaceDeclaration", // Flow, TypeScript + "TypeAliasDeclaration", // TypeScript + "ExportAssignment", // TypeScript + "ExportDeclaration" // TypeScript + ]; + var jsonSourceElements = ["ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral"]; + var graphqlSourceElements = ["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]; + + switch (opts.parser) { + case "flow": + case "babylon": + case "typescript": + return jsSourceElements.indexOf(node.type) > -1; + + case "json": + return jsonSourceElements.indexOf(node.type) > -1; + + case "graphql": + return graphqlSourceElements.indexOf(node.kind) > -1; + + case "vue": + return node.tag !== "root"; + } + + return false; +} + +function calculateRange(text, opts, ast) { + // Contract the range so that it has non-whitespace characters at its endpoints. + // This ensures we can format a range that doesn't end on a node. + var rangeStringOrig = text.slice(opts.rangeStart, opts.rangeEnd); + var startNonWhitespace = Math.max(opts.rangeStart + rangeStringOrig.search(/\S/), opts.rangeStart); + var endNonWhitespace; + + for (endNonWhitespace = opts.rangeEnd; endNonWhitespace > opts.rangeStart; --endNonWhitespace) { + if (text[endNonWhitespace - 1].match(/\S/)) { + break; + } + } + + var startNodeAndParents = findNodeAtOffset(ast, startNonWhitespace, opts, function (node) { + return isSourceElement(opts, node); + }); + var endNodeAndParents = findNodeAtOffset(ast, endNonWhitespace, opts, function (node) { + return isSourceElement(opts, node); + }); + + if (!startNodeAndParents || !endNodeAndParents) { + return { + rangeStart: 0, + rangeEnd: 0 + }; + } + + var siblingAncestors = findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts); + var startNode = siblingAncestors.startNode, + endNode = siblingAncestors.endNode; + var rangeStart = Math.min(opts.locStart(startNode, opts.locStart), opts.locStart(endNode, opts.locStart)); + var rangeEnd = Math.max(opts.locEnd(startNode, opts.locEnd), opts.locEnd(endNode, opts.locEnd)); + return { + rangeStart: rangeStart, + rangeEnd: rangeEnd + }; +} + +var rangeUtil = { + calculateRange, + findNodeAtOffset +}; + +var normalizeOptions = options.normalize; +var guessEndOfLine = endOfLine.guessEndOfLine; +var convertEndOfLineToChars = endOfLine.convertEndOfLineToChars; +var printDocToString = doc.printer.printDocToString; +var printDocToDebug = doc.debug.printDocToDebug; +var UTF8BOM = 0xfeff; +var CURSOR = Symbol("cursor"); + +function ensureAllCommentsPrinted(astComments) { + if (!astComments) { + return; + } + + for (var i = 0; i < astComments.length; ++i) { + if (astComments[i].value.trim() === "prettier-ignore") { + // If there's a prettier-ignore, we're not printing that sub-tree so we + // don't know if the comments was printed or not. + return; + } + } + + astComments.forEach(function (comment) { + if (!comment.printed) { + throw new Error('Comment "' + comment.value.trim() + '" was not printed. Please report this error!'); + } + + delete comment.printed; + }); +} + +function attachComments(text, ast, opts) { + var astComments = ast.comments; + + if (astComments) { + delete ast.comments; + comments.attach(astComments, ast, text, opts); + } + + ast.tokens = []; + opts.originalText = opts.parser === "yaml" ? text : text.trimRight(); + return astComments; +} + +function coreFormat(text, opts, addAlignmentSize) { + if (!text || !text.trim().length) { + return { + formatted: "", + cursorOffset: 0 + }; + } + + addAlignmentSize = addAlignmentSize || 0; + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + var originalText = text; + text = parsed.text; + + if (opts.cursorOffset >= 0) { + var nodeResult = rangeUtil.findNodeAtOffset(ast, opts.cursorOffset, opts); + + if (nodeResult && nodeResult.node) { + opts.cursorNode = nodeResult.node; + } + } + + var astComments = attachComments(text, ast, opts); + var doc$$1 = astToDoc(ast, opts, addAlignmentSize); + + if (opts.endOfLine === "auto") { + opts.endOfLine = guessEndOfLine(originalText); + } + + var result = printDocToString(doc$$1, opts); + ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline + + if (addAlignmentSize > 0) { + var trimmed = result.formatted.trim(); + + if (result.cursorNodeStart !== undefined) { + result.cursorNodeStart -= result.formatted.indexOf(trimmed); + } + + result.formatted = trimmed + convertEndOfLineToChars(opts.endOfLine); + } + + if (opts.cursorOffset >= 0) { + var oldCursorNodeStart; + var oldCursorNodeText; + var cursorOffsetRelativeToOldCursorNode; + var newCursorNodeStart; + var newCursorNodeText; + + if (opts.cursorNode && result.cursorNodeText) { + oldCursorNodeStart = opts.locStart(opts.cursorNode); + oldCursorNodeText = text.slice(oldCursorNodeStart, opts.locEnd(opts.cursorNode)); + cursorOffsetRelativeToOldCursorNode = opts.cursorOffset - oldCursorNodeStart; + newCursorNodeStart = result.cursorNodeStart; + newCursorNodeText = result.cursorNodeText; + } else { + oldCursorNodeStart = 0; + oldCursorNodeText = text; + cursorOffsetRelativeToOldCursorNode = opts.cursorOffset; + newCursorNodeStart = 0; + newCursorNodeText = result.formatted; + } + + if (oldCursorNodeText === newCursorNodeText) { + return { + formatted: result.formatted, + cursorOffset: newCursorNodeStart + cursorOffsetRelativeToOldCursorNode + }; + } // diff old and new cursor node texts, with a special cursor + // symbol inserted to find out where it moves to + + + var oldCursorNodeCharArray = oldCursorNodeText.split(""); + oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR); + var newCursorNodeCharArray = newCursorNodeText.split(""); + var cursorNodeDiff = lib.diffArrays(oldCursorNodeCharArray, newCursorNodeCharArray); + var cursorOffset = newCursorNodeStart; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = cursorNodeDiff[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var entry = _step.value; + + if (entry.removed) { + if (entry.value.indexOf(CURSOR) > -1) { + break; + } + } else { + cursorOffset += entry.count; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return { + formatted: result.formatted, + cursorOffset + }; + } + + return { + formatted: result.formatted + }; +} + +function formatRange(text, opts) { + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + text = parsed.text; + var range = rangeUtil.calculateRange(text, opts, ast); + var rangeStart = range.rangeStart; + var rangeEnd = range.rangeEnd; + var rangeString = text.slice(rangeStart, rangeEnd); // Try to extend the range backwards to the beginning of the line. + // This is so we can detect indentation correctly and restore it. + // Use `Math.min` since `lastIndexOf` returns 0 when `rangeStart` is 0 + + var rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1); + var indentString = text.slice(rangeStart2, rangeStart); + var alignmentSize = util$1.getAlignmentSize(indentString, opts.tabWidth); + var rangeResult = coreFormat(rangeString, Object.assign({}, opts, { + rangeStart: 0, + rangeEnd: Infinity, + printWidth: opts.printWidth - alignmentSize, + // track the cursor offset only if it's within our range + cursorOffset: opts.cursorOffset >= rangeStart && opts.cursorOffset < rangeEnd ? opts.cursorOffset - rangeStart : -1 + }), alignmentSize); // Since the range contracts to avoid trailing whitespace, + // we need to remove the newline that was inserted by the `format` call. + + var rangeTrimmed = rangeResult.formatted.trimRight(); + var formatted = text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd); + var cursorOffset = opts.cursorOffset; + + if (opts.cursorOffset >= rangeEnd) { + // handle the case where the cursor was past the end of the range + cursorOffset = opts.cursorOffset - rangeEnd + (rangeStart + rangeTrimmed.length); + } else if (rangeResult.cursorOffset !== undefined) { + // handle the case where the cursor was in the range + cursorOffset = rangeResult.cursorOffset + rangeStart; + } // keep the cursor as it was if it was before the start of the range + + + return { + formatted, + cursorOffset + }; +} + +function format(text, opts) { + var selectedParser = parser.resolveParser(opts); + var hasPragma = !selectedParser.hasPragma || selectedParser.hasPragma(text); + + if (opts.requirePragma && !hasPragma) { + return { + formatted: text + }; + } + + if (opts.rangeStart > 0 || opts.rangeEnd < text.length) { + return formatRange(text, opts); + } + + var hasUnicodeBOM = text.charCodeAt(0) === UTF8BOM; + + if (hasUnicodeBOM) { + text = text.substring(1); + } + + if (opts.insertPragma && opts.printer.insertPragma && !hasPragma) { + text = opts.printer.insertPragma(text); + } + + var result = coreFormat(text, opts); + + if (hasUnicodeBOM) { + result.formatted = String.fromCharCode(UTF8BOM) + result.formatted; + } + + return result; +} + +var core = { + formatWithCursor(text, opts) { + opts = normalizeOptions(opts); + return format(text, opts); + }, + + parse(text, opts, massage) { + opts = normalizeOptions(opts); + var parsed = parser.parse(text, opts); + + if (massage) { + parsed.ast = massageAst(parsed.ast, opts); + } + + return parsed; + }, + + formatAST(ast, opts) { + opts = normalizeOptions(opts); + var doc$$1 = astToDoc(ast, opts); + return printDocToString(doc$$1, opts); + }, + + // Doesn't handle shebang for now + formatDoc(doc$$1, opts) { + var debug = printDocToDebug(doc$$1); + opts = normalizeOptions(Object.assign({}, opts, { + parser: "babylon" + })); + return format(debug, opts).formatted; + }, + + printToDoc(text, opts) { + opts = normalizeOptions(opts); + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + text = parsed.text; + attachComments(text, ast, opts); + return astToDoc(ast, opts); + }, + + printDocToString(doc$$1, opts) { + return printDocToString(doc$$1, normalizeOptions(opts)); + } + +}; + +var _createClass$1 = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +function _classCallCheck$1(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var ignore = function ignore() { + return new IgnoreBase(); +}; // A simple implementation of make-array + + +function make_array(subject) { + return Array.isArray(subject) ? subject : [subject]; +} + +var REGEX_BLANK_LINE = /^\s+$/; +var REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\\!/; +var REGEX_LEADING_EXCAPED_HASH = /^\\#/; +var SLASH = '/'; +var KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore') +/* istanbul ignore next */ +: 'node-ignore'; + +var IgnoreBase = function () { + function IgnoreBase() { + _classCallCheck$1(this, IgnoreBase); + + this._rules = []; + this[KEY_IGNORE] = true; + + this._initCache(); + } + + _createClass$1(IgnoreBase, [{ + key: '_initCache', + value: function _initCache() { + this._cache = {}; + } // @param {Array.|string|Ignore} pattern + + }, { + key: 'add', + value: function add(pattern) { + this._added = false; + + if (typeof pattern === 'string') { + pattern = pattern.split(/\r?\n/g); + } + + make_array(pattern).forEach(this._addPattern, this); // Some rules have just added to the ignore, + // making the behavior changed. + + if (this._added) { + this._initCache(); + } + + return this; + } // legacy + + }, { + key: 'addPattern', + value: function addPattern(pattern) { + return this.add(pattern); + } + }, { + key: '_addPattern', + value: function _addPattern(pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + + if (this._checkPattern(pattern)) { + var rule = this._createRule(pattern); + + this._added = true; + + this._rules.push(rule); + } + } + }, { + key: '_checkPattern', + value: function _checkPattern(pattern) { + // > A blank line matches no files, so it can serve as a separator for readability. + return pattern && typeof pattern === 'string' && !REGEX_BLANK_LINE.test(pattern) // > A line starting with # serves as a comment. + && pattern.indexOf('#') !== 0; + } + }, { + key: 'filter', + value: function filter(paths) { + var _this = this; + + return make_array(paths).filter(function (path$$1) { + return _this._filter(path$$1); + }); + } + }, { + key: 'createFilter', + value: function createFilter() { + var _this2 = this; + + return function (path$$1) { + return _this2._filter(path$$1); + }; + } + }, { + key: 'ignores', + value: function ignores(path$$1) { + return !this._filter(path$$1); + } + }, { + key: '_createRule', + value: function _createRule(pattern) { + var origin = pattern; + var negative = false; // > An optional prefix "!" which negates the pattern; + + if (pattern.indexOf('!') === 0) { + negative = true; + pattern = pattern.substr(1); + } + + pattern = pattern // > Put a backslash ("\") in front of the first "!" for patterns that begin with a literal "!", for example, `"\!important!.txt"`. + .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that begin with a hash. + .replace(REGEX_LEADING_EXCAPED_HASH, '#'); + var regex = make_regex(pattern, negative); + return { + origin: origin, + pattern: pattern, + negative: negative, + regex: regex + }; + } // @returns `Boolean` true if the `path` is NOT ignored + + }, { + key: '_filter', + value: function _filter(path$$1, slices) { + if (!path$$1) { + return false; + } + + if (path$$1 in this._cache) { + return this._cache[path$$1]; + } + + if (!slices) { + // path/to/a.js + // ['path', 'to', 'a.js'] + slices = path$$1.split(SLASH); + } + + slices.pop(); + return this._cache[path$$1] = slices.length // > It is not possible to re-include a file if a parent directory of that file is excluded. + // If the path contains a parent directory, check the parent first + ? this._filter(slices.join(SLASH) + SLASH, slices) && this._test(path$$1) // Or only test the path + : this._test(path$$1); + } // @returns {Boolean} true if a file is NOT ignored + + }, { + key: '_test', + value: function _test(path$$1) { + // Explicitly define variable type by setting matched to `0` + var matched = 0; + + this._rules.forEach(function (rule) { + // if matched = true, then we only test negative rules + // if matched = false, then we test non-negative rules + if (!(matched ^ rule.negative)) { + matched = rule.negative ^ rule.regex.test(path$$1); + } + }); + + return !matched; + } + }]); + + return IgnoreBase; +}(); // > If the pattern ends with a slash, +// > it is removed for the purpose of the following description, +// > but it would only find a match with a directory. +// > In other words, foo/ will match a directory foo and paths underneath it, +// > but will not match a regular file or a symbolic link foo +// > (this is consistent with the way how pathspec works in general in Git). +// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' +// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call +// you could use option `mark: true` with `glob` +// '`foo/`' should not continue with the '`..`' + + +var DEFAULT_REPLACER_PREFIX = [// > Trailing spaces are ignored unless they are quoted with backslash ("\") +[// (a\ ) -> (a ) +// (a ) -> (a) +// (a \ ) -> (a ) +/\\?\s+$/, function (match) { + return match.indexOf('\\') === 0 ? ' ' : ''; +}], // replace (\ ) with ' ' +[/\\\s/g, function () { + return ' '; +}], // Escape metacharacters +// which is written down by users but means special for regular expressions. +// > There are 12 characters with special meanings: +// > - the backslash \, +// > - the caret ^, +// > - the dollar sign $, +// > - the period or dot ., +// > - the vertical bar or pipe symbol |, +// > - the question mark ?, +// > - the asterisk or star *, +// > - the plus sign +, +// > - the opening parenthesis (, +// > - the closing parenthesis ), +// > - and the opening square bracket [, +// > - the opening curly brace {, +// > These special characters are often called "metacharacters". +[/[\\\^$.|?*+()\[{]/g, function (match) { + return '\\' + match; +}], // leading slash +[// > A leading slash matches the beginning of the pathname. +// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". +// A leading slash matches the beginning of the pathname +/^\//, function () { + return '^'; +}], // replace special metacharacter slash after the leading slash +[/\//g, function () { + return '\\/'; +}], [// > A leading "**" followed by a slash means match in all directories. +// > For example, "**/foo" matches file or directory "foo" anywhere, +// > the same as pattern "foo". +// > "**/foo/bar" matches file or directory "bar" anywhere that is directly under directory "foo". +// Notice that the '*'s have been replaced as '\\*' +/^\^*\\\*\\\*\\\//, // '**/foo' <-> 'foo' +function () { + return '^(?:.*\\/)?'; +}]]; +var DEFAULT_REPLACER_SUFFIX = [// starting +[// there will be no leading '/' (which has been replaced by section "leading slash") +// If starts with '**', adding a '^' to the regular expression also works +/^(?=[^\^])/, function () { + return !/\/(?!$)/.test(this) // > If the pattern does not contain a slash /, Git treats it as a shell glob pattern + // Actually, if there is only a trailing slash, git also treats it as a shell glob pattern + ? '(?:^|\\/)' // > Otherwise, Git treats the pattern as a shell glob suitable for consumption by fnmatch(3) + : '^'; +}], // two globstars +[// Use lookahead assertions so that we could match more than one `'/**'` +/\\\/\\\*\\\*(?=\\\/|$)/g, // Zero, one or several directories +// should not use '*', or it will be replaced by the next replacer +// Check if it is not the last `'/**'` +function (match, index, str) { + return index + 6 < str.length // case: /**/ + // > A slash followed by two consecutive asterisks then a slash matches zero or more directories. + // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. + // '/**/' + ? '(?:\\/[^\\/]+)*' // case: /** + // > A trailing `"/**"` matches everything inside. + // #21: everything inside but it should not include the current folder + : '\\/.+'; +}], // intermediate wildcards +[// Never replace escaped '*' +// ignore rule '\*' will match the path '*' +// 'abc.*/' -> go +// 'abc.*' -> skip this rule +/(^|[^\\]+)\\\*(?=.+)/g, // '*.js' matches '.js' +// '*.js' doesn't match 'abc' +function (match, p1) { + return p1 + '[^\\/]*'; +}], // trailing wildcard +[/(\^|\\\/)?\\\*$/, function (match, p1) { + return (p1 // '\^': + // '/*' does not match '' + // '/*' does not match everything + // '\\\/': + // 'abc/*' does not match 'abc/' + ? p1 + '[^/]+' // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*') + '(?=$|\\/$)'; +}], [// unescape +/\\\\\\/g, function () { + return '\\'; +}]]; +var POSITIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [// 'f' +// matches +// - /f(end) +// - /f/ +// - (start)f(end) +// - (start)f/ +// doesn't match +// - oof +// - foo +// pseudo: +// -> (^|/)f(/|$) +// ending +[// 'js' will not match 'js.' +// 'ab' will not match 'abc' +/(?:[^*\/])$/, // 'js*' will not match 'a.js' +// 'js/' will not match 'a.js' +// 'js' will match 'a.js' and 'a.js/' +function (match) { + return match + '(?=$|\\/)'; +}]], DEFAULT_REPLACER_SUFFIX); +var NEGATIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [// #24 +// The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) +// A negative pattern without a trailing wildcard should not +// re-include the things inside that directory. +// eg: +// ['node_modules/*', '!node_modules'] +// should ignore `node_modules/a.js` +[/(?:[^*\/])$/, function (match) { + return match + '(?=$|\\/$)'; +}]], DEFAULT_REPLACER_SUFFIX); // A simple cache, because an ignore rule only has only one certain meaning + +var cache = {}; // @param {pattern} + +function make_regex(pattern, negative) { + var r = cache[pattern]; + + if (r) { + return r; + } + + var replacers = negative ? NEGATIVE_REPLACERS : POSITIVE_REPLACERS; + var source = replacers.reduce(function (prev, current) { + return prev.replace(current[0], current[1].bind(pattern)); + }, pattern); + return cache[pattern] = new RegExp(source, 'i'); +} // Windows +// -------------------------------------------------------------- + +/* istanbul ignore if */ + + +if ( // Detect `process` so that it can run in browsers. +typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) { + var filter = IgnoreBase.prototype._filter; + + var make_posix = function make_posix(str) { + return /^\\\\\?\\/.test(str) || /[^\x00-\x80]+/.test(str) ? str : str.replace(/\\/g, '/'); + }; + + IgnoreBase.prototype._filter = function (path$$1, slices) { + path$$1 = make_posix(path$$1); + return filter.call(this, path$$1, slices); + }; +} + +/** + * @param {string} filename + * @returns {Promise} + */ + + +function getFileContentOrNull(filename) { + return new Promise(function (resolve, reject) { + fs.readFile(filename, "utf8", function (error, data) { + if (error && error.code !== "ENOENT") { + reject(createError(filename, error)); + } else { + resolve(error ? null : data); + } + }); + }); +} +/** + * @param {string} filename + * @returns {null | string} + */ + + +getFileContentOrNull.sync = function (filename) { + try { + return fs.readFileSync(filename, "utf8"); + } catch (error) { + if (error && error.code === "ENOENT") { + return null; + } + + throw createError(filename, error); + } +}; + +function createError(filename, error) { + return new Error(`Unable to read ${filename}: ${error.message}`); +} + +var getFileContentOrNull_1 = getFileContentOrNull; + +/** + * @param {undefined | string} ignorePath + * @param {undefined | boolean} withNodeModules + */ + + +function createIgnorer(ignorePath, withNodeModules) { + return (!ignorePath ? Promise.resolve(null) : getFileContentOrNull_1(path.resolve(ignorePath))).then(function (ignoreContent) { + return _createIgnorer(ignoreContent, withNodeModules); + }); +} +/** + * @param {undefined | string} ignorePath + * @param {undefined | boolean} withNodeModules + */ + + +createIgnorer.sync = function (ignorePath, withNodeModules) { + var ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path.resolve(ignorePath)); + return _createIgnorer(ignoreContent, withNodeModules); +}; +/** + * @param {null | string} ignoreContent + * @param {undefined | boolean} withNodeModules + */ + + +function _createIgnorer(ignoreContent, withNodeModules) { + var ignorer = ignore().add(ignoreContent || ""); + + if (!withNodeModules) { + ignorer.add("node_modules"); + } + + return ignorer; +} + +var createIgnorer_1 = createIgnorer; + +/** + * @typedef {{ ignorePath?: string, withNodeModules?: boolean, plugins: object }} FileInfoOptions + * @typedef {{ ignored: boolean, inferredParser: string | null }} FileInfoResult + */ + +/** + * @param {string} filePath + * @param {FileInfoOptions} opts + * @returns {Promise} + * + * Please note that prettier.getFileInfo() expects opts.plugins to be an array of paths, + * not an object. A transformation from this array to an object is automatically done + * internally by the method wrapper. See withPlugins() in index.js. + */ + + +function getFileInfo(filePath, opts) { + return createIgnorer_1(opts.ignorePath, opts.withNodeModules).then(function (ignorer) { + return _getFileInfo(ignorer, filePath, opts.plugins); + }); +} +/** + * @param {string} filePath + * @param {FileInfoOptions} opts + * @returns {FileInfoResult} + */ + + +getFileInfo.sync = function (filePath, opts) { + var ignorer = createIgnorer_1.sync(opts.ignorePath, opts.withNodeModules); + return _getFileInfo(ignorer, filePath, opts.plugins); +}; + +function _getFileInfo(ignorer, filePath, plugins) { + var ignored = ignorer.ignores(filePath); + var inferredParser = options.inferParser(filePath, plugins) || null; + return { + ignored, + inferredParser + }; +} + +var getFileInfo_1 = getFileInfo; + +var lodash_uniqby = createCommonjsModule(function (module, exports) { + /** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + /** Used as the `TypeError` message for "Functions" methods. */ + + var FUNC_ERROR_TEXT = 'Expected a function'; + /** Used to stand-in for `undefined` hash values. */ + + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used to compose bitmasks for comparison styles. */ + + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + /** Used as references for various `Number` constants. */ + + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + /** `Object#toString` result references. */ + + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + /** Used to match property names within property paths. */ + + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + /** Used to match backslashes in property paths. */ + + var reEscapeChar = /\\(\\)?/g; + /** Used to detect host constructors (Safari). */ + + var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** Used to detect unsigned integer values. */ + + var reIsUint = /^(?:0|[1-9]\d*)$/; + /** Used to identify `toStringTag` values of typed arrays. */ + + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + /** Detect free variable `global` from Node.js. */ + + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + /** Detect free variable `self`. */ + + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + + var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports; + /** Detect free variable `module`. */ + + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + /** Detect the popular CommonJS extension `module.exports`. */ + + var moduleExports = freeModule && freeModule.exports === freeExports; + /** Detect free variable `process` from Node.js. */ + + var freeProcess = moduleExports && freeGlobal.process; + /** Used to access faster Node.js helpers. */ + + var nodeUtil = function () { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} + }(); + /* Node.js helper references. */ + + + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; + } + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + + + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + + return false; + } + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + + + function arraySome(array, predicate) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + + return false; + } + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + + return -1; + } + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + + return -1; + } + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + + + function baseIsNaN(value) { + return value !== value; + } + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + + + function baseProperty(key) { + return function (object) { + return object == null ? undefined : object[key]; + }; + } + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + + + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + + return result; + } + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + + + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + /** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function cacheHas(cache, key) { + return cache.has(key); + } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + + + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + /** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ + + + function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + + return result; + } + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + + + function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + + + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + + + function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + /** Used for built-in method references. */ + + + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + /** Used to detect overreaching core-js shims. */ + + var coreJsData = root['__core-js_shared__']; + /** Used to detect methods masquerading as native. */ + + var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); + /** Used to resolve the decompiled source of functions. */ + + + var funcToString = funcProto.toString; + /** Used to check objects for own properties. */ + + var hasOwnProperty = objectProto.hasOwnProperty; + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + + var objectToString = objectProto.toString; + /** Used to detect if a method is native. */ + + var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + /** Built-in value references. */ + + var Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + /* Built-in method references for those with the same name as other `lodash` methods. */ + + var nativeKeys = overArg(Object.keys, Object); + /* Built-in method references that are verified to be native. */ + + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + /** Used to detect maps, sets, and weakmaps. */ + + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + /** Used to convert symbols to primitives and strings. */ + + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + + + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function hashGet(key) { + var data = this.__data__; + + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + + + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } // Add methods to `Hash`. + + + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + + + function listCacheClear() { + this.__data__ = []; + } + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + + var lastIndex = data.length - 1; + + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + + return true; + } + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + return index < 0 ? undefined : data[index][1]; + } + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + + + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + + return this; + } // Add methods to `ListCache`. + + + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + + + function mapCacheClear() { + this.__data__ = { + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() + }; + } + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); + } + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + + + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } // Add methods to `MapCache`. + + + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + + function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + this.__data__ = new MapCache(); + + while (++index < length) { + this.add(values[index]); + } + } + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + + + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + + return this; + } + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + + + function setCacheHas(value) { + return this.__data__.has(value); + } // Add methods to `SetCache`. + + + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Stack(entries) { + this.__data__ = new ListCache(entries); + } + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + + + function stackClear() { + this.__data__ = new ListCache(); + } + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function stackDelete(key) { + return this.__data__['delete'](key); + } + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function stackGet(key) { + return this.__data__.get(key); + } + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function stackHas(key) { + return this.__data__.has(key); + } + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + + + function stackSet(key, value) { + var cache = this.__data__; + + if (cache instanceof ListCache) { + var pairs = cache.__data__; + + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + return this; + } + + cache = this.__data__ = new MapCache(pairs); + } + + cache.set(key, value); + return this; + } // Add methods to `Stack`. + + + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + + function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + + return result; + } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function assocIndexOf(array, key) { + var length = array.length; + + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + + return -1; + } + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + + + function baseGet(object, path$$1) { + path$$1 = isKey(path$$1, object) ? [path$$1] : castPath(path$$1); + var index = 0, + length = path$$1.length; + + while (object != null && index < length) { + object = object[toKey(path$$1[index++])]; + } + + return index && index == length ? object : undefined; + } + /** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + function baseGetTag(value) { + return objectToString.call(value); + } + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + + + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @param {boolean} [bitmask] The bitmask of comparison flags. + * The bitmask may be composed of the following flags: + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + + + function baseIsEqual(value, other, customizer, bitmask, stack) { + if (value === other) { + return true; + } + + if (value == null || other == null || !isObject(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + + return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + } + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = getTag(object); + objTag = objTag == argsTag ? objectTag : objTag; + } + + if (!othIsArr) { + othTag = getTag(other); + othTag = othTag == argsTag ? objectTag : othTag; + } + + var objIsObj = objTag == objectTag && !isHostObject(object), + othIsObj = othTag == objectTag && !isHostObject(other), + isSameTag = objTag == othTag; + + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + } + + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + } + } + + if (!isSameTag) { + return false; + } + + stack || (stack = new Stack()); + return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + } + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + + + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + + object = Object(object); + + while (index--) { + var data = matchData[index]; + + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) { + return false; + } + } + } + + return true; + } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + + + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + + + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + } + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + + + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + + if (value == null) { + return identity; + } + + if (typeof value == 'object') { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + + return property(value); + } + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + + + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + + var result = []; + + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + + return result; + } + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + + + function baseMatches(source) { + var matchData = getMatchData(source); + + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + + return function (object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + + + function baseMatchesProperty(path$$1, srcValue) { + if (isKey(path$$1) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path$$1), srcValue); + } + + return function (object) { + var objValue = get(object, path$$1); + return objValue === undefined && objValue === srcValue ? hasIn(object, path$$1) : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + }; + } + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + + + function basePropertyDeep(path$$1) { + return function (object) { + return baseGet(object, path$$1); + }; + } + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + + + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + + + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + + if (set) { + return setToArray(set); + } + + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + + outer: while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + + if (isCommon && computed === computed) { + var seenIndex = seen.length; + + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + + if (iteratee) { + seen.push(computed); + } + + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + + result.push(value); + } + } + + return result; + } + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ + + + function castPath(value) { + return isArray(value) ? value : stringToPath(value); + } + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + + + var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function (values) { + return new Set(values); + }; + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + + function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(array); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var index = -1, + result = true, + seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. + + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + + if (compared !== undefined) { + if (compared) { + continue; + } + + result = false; + break; + } // Recursively compare arrays (susceptible to call stack limits). + + + if (seen) { + if (!arraySome(other, function (othValue, othIndex) { + if (!seen.has(othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.add(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + result = false; + break; + } + } + + stack['delete'](array); + stack['delete'](other); + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked) { + return stacked == other; + } + + bitmask |= UNORDERED_COMPARE_FLAG; // Recursively compare objects (susceptible to call stack limits). + + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + + } + + return false; + } + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + + var index = objLength; + + while (index--) { + var key = objProps[index]; + + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } // Recursively compare objects (susceptible to call stack limits). + + + if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) { + result = false; + break; + } + + skipCtor || (skipCtor = key == 'constructor'); + } + + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + + stack['delete'](object); + stack['delete'](other); + return result; + } + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + + + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + + + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + + return result; + } + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + + + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11, + // for data views in Edge < 14, and promises in Node.js. + + if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function getTag(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + } + + return result; + }; + } + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + + + function hasPath(object, path$$1, hasFunc) { + path$$1 = isKey(path$$1, object) ? [path$$1] : castPath(path$$1); + var result, + index = -1, + length = path$$1.length; + + while (++index < length) { + var key = toKey(path$$1[index]); + + if (!(result = object != null && hasFunc(object, key))) { + break; + } + + object = object[key]; + } + + if (result) { + return result; + } + + var length = object ? object.length : 0; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + + + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + } + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + + + function isKey(value, object) { + if (isArray(value)) { + return false; + } + + var type = typeof value; + + if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { + return true; + } + + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + + + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; + } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + + + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + + + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + return value === proto; + } + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + + + function isStrictComparable(value) { + return value === value && !isObject(value); + } + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + + + function matchesStrictComparable(key, srcValue) { + return function (object) { + if (object == null) { + return false; + } + + return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); + }; + } + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + + + var stringToPath = memoize(function (string) { + string = toString(string); + var result = []; + + if (reLeadingDot.test(string)) { + result.push(''); + } + + string.replace(rePropName, function (match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : number || match); + }); + return result; + }); + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ + + + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + + try { + return func + ''; + } catch (e) {} + } + + return ''; + } + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] + * The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + + + function uniqBy(array, iteratee) { + return array && array.length ? baseUniq(array, baseIteratee(iteratee, 2)) : []; + } + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + + + function memoize(func, resolver) { + if (typeof func != 'function' || resolver && typeof resolver != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + + var memoized = function memoized() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } // Assign cache to `_.memoize`. + + + memoize.Cache = MapCache; + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + + function eq(value, other) { + return value === other || value !== value && other !== other; + } + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + + + function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + + + var isArray = Array.isArray; + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + + + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + + + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + + + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + + + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + + + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + + + function isSymbol(value) { + return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + + + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + + function toString(value) { + return value == null ? '' : baseToString(value); + } + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + + + function get(object, path$$1, defaultValue) { + var result = object == null ? undefined : baseGet(object, path$$1); + return result === undefined ? defaultValue : result; + } + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + + + function hasIn(object, path$$1) { + return object != null && hasPath(object, path$$1, baseHasIn); + } + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + + + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + + + function identity(value) { + return value; + } + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + + + function noop() {} // No operation performed. + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + + + function property(path$$1) { + return isKey(path$$1) ? baseProperty(toKey(path$$1)) : basePropertyDeep(path$$1); + } + + module.exports = uniqBy; +}); + +var PENDING = 'pending'; +var SETTLED = 'settled'; +var FULFILLED = 'fulfilled'; +var REJECTED = 'rejected'; + +var NOOP = function NOOP() {}; + +var isNode = typeof commonjsGlobal !== 'undefined' && typeof commonjsGlobal.process !== 'undefined' && typeof commonjsGlobal.process.emit === 'function'; +var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; +var asyncQueue = []; +var asyncTimer; + +function asyncFlush() { + // run promise callbacks + for (var i = 0; i < asyncQueue.length; i++) { + asyncQueue[i][0](asyncQueue[i][1]); + } // reset async asyncQueue + + + asyncQueue = []; + asyncTimer = false; +} + +function asyncCall(callback, arg) { + asyncQueue.push([callback, arg]); + + if (!asyncTimer) { + asyncTimer = true; + asyncSetTimer(asyncFlush, 0); + } +} + +function invokeResolver(resolver, promise) { + function resolvePromise(value) { + resolve(promise, value); + } + + function rejectPromise(reason) { + reject(promise, reason); + } + + try { + resolver(resolvePromise, rejectPromise); + } catch (e) { + rejectPromise(e); + } +} + +function invokeCallback(subscriber) { + var owner = subscriber.owner; + var settled = owner._state; + var value = owner._data; + var callback = subscriber[settled]; + var promise = subscriber.then; + + if (typeof callback === 'function') { + settled = FULFILLED; + + try { + value = callback(value); + } catch (e) { + reject(promise, e); + } + } + + if (!handleThenable(promise, value)) { + if (settled === FULFILLED) { + resolve(promise, value); + } + + if (settled === REJECTED) { + reject(promise, value); + } + } +} + +function handleThenable(promise, value) { + var resolved; + + try { + if (promise === value) { + throw new TypeError('A promises callback cannot return that same promise.'); + } + + if (value && (typeof value === 'function' || typeof value === 'object')) { + // then should be retrieved only once + var then = value.then; + + if (typeof then === 'function') { + then.call(value, function (val) { + if (!resolved) { + resolved = true; + + if (value === val) { + fulfill(promise, val); + } else { + resolve(promise, val); + } + } + }, function (reason) { + if (!resolved) { + resolved = true; + reject(promise, reason); + } + }); + return true; + } + } + } catch (e) { + if (!resolved) { + reject(promise, e); + } + + return true; + } + + return false; +} + +function resolve(promise, value) { + if (promise === value || !handleThenable(promise, value)) { + fulfill(promise, value); + } +} + +function fulfill(promise, value) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = value; + asyncCall(publishFulfillment, promise); + } +} + +function reject(promise, reason) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = reason; + asyncCall(publishRejection, promise); + } +} + +function publish(promise) { + promise._then = promise._then.forEach(invokeCallback); +} + +function publishFulfillment(promise) { + promise._state = FULFILLED; + publish(promise); +} + +function publishRejection(promise) { + promise._state = REJECTED; + publish(promise); + + if (!promise._handled && isNode) { + commonjsGlobal.process.emit('unhandledRejection', promise._data, promise); + } +} + +function notifyRejectionHandled(promise) { + commonjsGlobal.process.emit('rejectionHandled', promise); +} +/** + * @class + */ + + +function Promise$1(resolver) { + if (typeof resolver !== 'function') { + throw new TypeError('Promise resolver ' + resolver + ' is not a function'); + } + + if (this instanceof Promise$1 === false) { + throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); + } + + this._then = []; + invokeResolver(resolver, this); +} + +Promise$1.prototype = { + constructor: Promise$1, + _state: PENDING, + _then: null, + _data: undefined, + _handled: false, + then: function then(onFulfillment, onRejection) { + var subscriber = { + owner: this, + then: new this.constructor(NOOP), + fulfilled: onFulfillment, + rejected: onRejection + }; + + if ((onRejection || onFulfillment) && !this._handled) { + this._handled = true; + + if (this._state === REJECTED && isNode) { + asyncCall(notifyRejectionHandled, this); + } + } + + if (this._state === FULFILLED || this._state === REJECTED) { + // already resolved, call callback async + asyncCall(invokeCallback, subscriber); + } else { + // subscribe + this._then.push(subscriber); + } + + return subscriber.then; + }, + catch: function _catch(onRejection) { + return this.then(null, onRejection); + } +}; + +Promise$1.all = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.all().'); + } + + return new Promise$1(function (resolve, reject) { + var results = []; + var remaining = 0; + + function resolver(index) { + remaining++; + return function (value) { + results[index] = value; + + if (! --remaining) { + resolve(results); + } + }; + } + + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolver(i), reject); + } else { + results[i] = promise; + } + } + + if (!remaining) { + resolve(results); + } + }); +}; + +Promise$1.race = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.race().'); + } + + return new Promise$1(function (resolve, reject) { + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolve, reject); + } else { + resolve(promise); + } + } + }); +}; + +Promise$1.resolve = function (value) { + if (value && typeof value === 'object' && value.constructor === Promise$1) { + return value; + } + + return new Promise$1(function (resolve) { + resolve(value); + }); +}; + +Promise$1.reject = function (reason) { + return new Promise$1(function (resolve, reject) { + reject(reason); + }); +}; + +var pinkie = Promise$1; + +var pinkiePromise = typeof Promise === 'function' ? Promise : pinkie; + +var arrayUniq = createCommonjsModule(function (module) { + 'use strict'; // there's 3 implementations written in increasing order of efficiency + // 1 - no Set type is defined + + function uniqNoSet(arr) { + var ret = []; + + for (var i = 0; i < arr.length; i++) { + if (ret.indexOf(arr[i]) === -1) { + ret.push(arr[i]); + } + } + + return ret; + } // 2 - a simple Set type is defined + + + function uniqSet(arr) { + var seen = new Set(); + return arr.filter(function (el) { + if (!seen.has(el)) { + seen.add(el); + return true; + } + + return false; + }); + } // 3 - a standard Set type is defined and it has a forEach method + + + function uniqSetWithForEach(arr) { + var ret = []; + new Set(arr).forEach(function (el) { + ret.push(el); + }); + return ret; + } // V8 currently has a broken implementation + // https://github.com/joyent/node/issues/8449 + + + function doesForEachActuallyWork() { + var ret = false; + new Set([true]).forEach(function (el) { + ret = el; + }); + return ret === true; + } + + if ('Set' in commonjsGlobal) { + if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { + module.exports = uniqSetWithForEach; + } else { + module.exports = uniqSet; + } + } else { + module.exports = uniqNoSet; + } +}); + +var arrayUnion = function arrayUnion() { + return arrayUniq([].concat.apply([], arguments)); +}; + +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ +/* eslint-disable no-unused-vars */ + +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } // Detect buggy property enumeration order in older V8 versions. + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + + + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + + test1[5] = 'de'; + + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + + + var test2 = {}; + + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + + if (order2.join('') !== '0123456789') { + return false; + } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + + + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var isWindows = process.platform === 'win32'; // JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + + if (DEBUG) { + var backtrace = new Error(); + callback = debugCallback; + } else callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) console.trace(msg);else console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] + +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} // Regex to find the device root, including trailing slash. E.g. 'c:\\'. + + +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +var realpathSync$1 = function realpathSync(p, cache) { + // make p is absolute + p = path.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; // current character position in p + + var pos; // the partial path so far, including a trailing slash if any + + var current; // the partial path without a trailing slash (except when pointing at a root) + + var base; // the partial path scanned in the previous round, with slash + + var previous; + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; // On windows, check that the root exists. On unix there is no need. + + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + + + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; // continue if not a symlink + + if (knownHard[base] || cache && cache[base] === base) { + continue; + } + + var resolvedLink; + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + + + var linkTarget = null; + + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + + resolvedLink = path.resolve(previous, linkTarget); // track this, if given a cache. + + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } // resolve the link, then start over + + + p = path.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + return p; +}; + +var realpath$1 = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } // make p is absolute + + + p = path.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; // current character position in p + + var pos; // the partial path so far, including a trailing slash if any + + var current; // the partial path without a trailing slash (except when pointing at a root) + + var base; // the partial path scanned in the previous round, with slash + + var previous; + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; // On windows, check that the root exists. On unix there is no need. + + if (isWindows && !knownHard[base]) { + fs.lstat(base, function (err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } // walk down the path, swapping out linked pathparts for their real + // values + + + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } // find the next part + + + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; // continue if not a symlink + + if (knownHard[base] || cache && cache[base] === base) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); // if not a symlink, skip to the next path part + + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + + + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + + fs.stat(base, function (err) { + if (err) return cb(err); + fs.readlink(base, function (err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + var resolvedLink = path.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = path.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; + +var old = { + realpathSync: realpathSync$1, + realpath: realpath$1 +}; + +var fs_realpath = realpath; +realpath.realpath = realpath; +realpath.sync = realpathSync; +realpath.realpathSync = realpathSync; +realpath.monkeypatch = monkeypatch; +realpath.unmonkeypatch = unmonkeypatch; +var origRealpath = fs.realpath; +var origRealpathSync = fs.realpathSync; +var version$2 = process.version; +var ok = /^v[0-5]\./.test(version$2); + +function newError(er) { + return er && er.syscall === 'realpath' && (er.code === 'ELOOP' || er.code === 'ENOMEM' || er.code === 'ENAMETOOLONG'); +} + +function realpath(p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb); + } + + if (typeof cache === 'function') { + cb = cache; + cache = null; + } + + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); +} + +function realpathSync(p, cache) { + if (ok) { + return origRealpathSync(p, cache); + } + + try { + return origRealpathSync(p, cache); + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache); + } else { + throw er; + } + } +} + +function monkeypatch() { + fs.realpath = realpath; + fs.realpathSync = realpathSync; +} + +function unmonkeypatch() { + fs.realpath = origRealpath; + fs.realpathSync = origRealpathSync; +} + +var concatMap = function concatMap(xs, fn) { + var res = []; + + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x);else res.push(x); + } + + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +var balancedMatch = balanced; + +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; + +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [left, right]; + } + } + + return result; +} + +var braceExpansion = expandTop; +var escSlash = '\0SLASH' + Math.random() + '\0'; +var escOpen = '\0OPEN' + Math.random() + '\0'; +var escClose = '\0CLOSE' + Math.random() + '\0'; +var escComma = '\0COMMA' + Math.random() + '\0'; +var escPeriod = '\0PERIOD' + Math.random() + '\0'; + +function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash).split('\\{').join(escOpen).split('\\}').join(escClose).split('\\,').join(escComma).split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\').split(escOpen).join('{').split(escClose).join('}').split(escComma).join(',').split(escPeriod).join('.'); +} // Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} + + +function parseCommaParts(str) { + if (!str) return ['']; + var parts = []; + var m = balancedMatch('{', '}', str); + if (!m) return str.split(','); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + p[p.length - 1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + return parts; +} + +function expandTop(str) { + if (!str) return []; // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function embrace(str) { + return '{' + str + '}'; +} + +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} + +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + var m = balancedMatch('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + + return [str]; + } + + var n; + + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : ['']; + return post.map(function (p) { + return m.pre + n[0] + p; + }); + } + } + } // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + // no need to expand pre, since it is guaranteed to be free of brace-sets + + + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : ['']; + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + + if (reverse) { + incr *= -1; + test = gte; + } + + var pad = n.some(isPadded); + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') c = ''; + } else { + c = String(i); + + if (pad) { + var need = width - c.length; + + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) c = '-' + z + c.slice(1);else c = z + c; + } + } + } + + N.push(c); + } + } else { + N = concatMap(n, function (el) { + return expand(el, false); + }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) expansions.push(expansion); + } + } + + return expansions; +} + +var minimatch_1 = minimatch; +minimatch.Minimatch = Minimatch$1; +var path$2 = { + sep: '/' +}; + +try { + path$2 = path; +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch$1.GLOBSTAR = {}; +var plTypes = { + '!': { + open: '(?:(?!(?:', + close: '))[^/]*?)' + }, + '?': { + open: '(?:', + close: ')?' + }, + '+': { + open: '(?:', + close: ')+' + }, + '*': { + open: '(?:', + close: ')*' + }, + '@': { + open: '(?:', + close: ')' + } // any single thing other than / + // don't need to escape / when using new RegExp() + +}; +var qmark = '[^/]'; // * => any number of characters + +var star = qmark + '*?'; // ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. + +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'; // not a ^ or / followed by a dot, +// followed by anything, any number of times. + +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'; // characters that need to be escaped in RegExp. + +var reSpecials = charSet('().*{}+?[]^$\\!'); // "abc" -> { a:true, b:true, c:true } + +function charSet(s) { + return s.split('').reduce(function (set, c) { + set[c] = true; + return set; + }, {}); +} // normalizes slashes. + + +var slashSplit = /\/+/; +minimatch.filter = filter$1; + +function filter$1(pattern, options) { + options = options || {}; + return function (p, i, list) { + return minimatch(p, pattern, options); + }; +} + +function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function (k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function (k) { + t[k] = a[k]; + }); + return t; +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch; + var orig = minimatch; + + var m = function minimatch(p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)); + }; + + m.Minimatch = function Minimatch(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + + return m; +}; + +Minimatch$1.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch$1; + return minimatch.defaults(def).Minimatch; +}; + +function minimatch(p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required'); + } + + if (!options) options = {}; // shortcut: comments match nothing. + + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } // "" only matches "" + + + if (pattern.trim() === '') return p === ''; + return new Minimatch$1(pattern, options).match(p); +} + +function Minimatch$1(pattern, options) { + if (!(this instanceof Minimatch$1)) { + return new Minimatch$1(pattern, options); + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required'); + } + + if (!options) options = {}; + pattern = pattern.trim(); // windows support: need to use /, not \ + + if (path$2.sep !== '/') { + pattern = pattern.split(path$2.sep).join('/'); + } + + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; // make the set of regexps etc. + + this.make(); +} + +Minimatch$1.prototype.debug = function () {}; + +Minimatch$1.prototype.make = make; + +function make() { + // don't do it more than once. + if (this._made) return; + var pattern = this.pattern; + var options = this.options; // empty patterns and comments match nothing. + + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + + if (!pattern) { + this.empty = true; + return; + } // step 1: figure out negation, etc. + + + this.parseNegate(); // step 2: expand braces + + var set = this.globSet = this.braceExpand(); + if (options.debug) this.debug = console.error; + this.debug(this.pattern, set); // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + + set = this.globParts = set.map(function (s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); // glob --> regexps + + set = set.map(function (s, si, set) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); // filter out everything that didn't compile properly. + + set = set.filter(function (s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; +} + +Minimatch$1.prototype.parseNegate = parseNegate; + +function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === '!'; i++) { + negate = !negate; + negateOffset++; + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; +} // Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c + + +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options); +}; + +Minimatch$1.prototype.braceExpand = braceExpand; + +function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch$1) { + options = this.options; + } else { + options = {}; + } + } + + pattern = typeof pattern === 'undefined' ? this.pattern : pattern; + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern'); + } + + if (options.nobrace || !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern]; + } + + return braceExpansion(pattern); +} // parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. + + +Minimatch$1.prototype.parse = parse$3; +var SUBPARSE = {}; + +function parse$3(pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long'); + } + + var options = this.options; // shortcuts + + if (!options.noglobstar && pattern === '**') return GLOBSTAR; + if (pattern === '') return ''; + var re = ''; + var hasMagic = !!options.nocase; + var escaping = false; // ? => one single character + + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)'; + var self = this; + + function clearStateChar() { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break; + + case '?': + re += qmark; + hasMagic = true; + break; + + default: + re += '\\' + stateChar; + break; + } + + self.debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + } + + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c); // skip over any that are escaped. + + if (escaping && reSpecials[c]) { + re += '\\' + c; + escaping = false; + continue; + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false; + + case '\\': + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + + if (inClass) { + this.debug(' in class'); + if (c === '!' && i === classStart + 1) c = '^'; + re += c; + continue; + } // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + + + self.debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + + if (options.noext) clearStateChar(); + continue; + + case '(': + if (inClass) { + re += '('; + continue; + } + + if (!stateChar) { + re += '\\('; + continue; + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); // negation is (?:(?!js)[^/]*) + + re += stateChar === '!' ? '(?:(?!(?:' : '(?:'; + this.debug('plType %j %j', stateChar, re); + stateChar = false; + continue; + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)'; + continue; + } + + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); // negation is (?:(?!js)[^/]*) + // The others are (?:) + + re += pl.close; + + if (pl.type === '!') { + negativeLists.push(pl); + } + + pl.reEnd = re.length; + continue; + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|'; + escaping = false; + continue; + } + + clearStateChar(); + re += '|'; + continue; + // these are mostly the same in regexp and glob + + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + + if (inClass) { + re += '\\' + c; + continue; + } + + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c; + escaping = false; + continue; + } // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + + + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i); + + try { + RegExp('[' + cs + ']'); + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + } // finish up the class. + + + hasMagic = true; + inClass = false; + re += c; + continue; + + default: + // swallow any state char that wasn't consumed + clearStateChar(); + + if (escaping) { + // no need + escaping = false; + } else if (reSpecials[c] && !(c === '^' && inClass)) { + re += '\\'; + } + + re += c; + } // switch + + } // for + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + + + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + '\\[' + sp[0]; + hasMagic = hasMagic || sp[1]; + } // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + + + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug('setting tail', re, pl); // maybe some even number of \, then maybe 1 \, followed by a | + + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + } // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + + + return $1 + $1 + $2 + '|'; + }); + this.debug('tail=%j\n %s', tail, tail, pl, re); + var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } // handle trailing things that only matter at the very end. + + + clearStateChar(); + + if (escaping) { + // trailing \\ + re += '\\\\'; + } // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + + + var addPatternStart = false; + + switch (re.charAt(0)) { + case '.': + case '[': + case '(': + addPatternStart = true; + } // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + + + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + + var openParensBefore = nlBefore.split('(').length - 1; + var cleanAfter = nlAfter; + + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + + nlAfter = cleanAfter; + var dollar = ''; + + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$'; + } + + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + + + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + + if (addPatternStart) { + re = patternStart + re; + } // parsing just a piece of a larger pattern. + + + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + + + if (!hasMagic) { + return globUnescape(pattern); + } + + var flags = options.nocase ? 'i' : ''; + + try { + var regExp = new RegExp('^' + re + '$', flags); + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.'); + } + + regExp._glob = pattern; + regExp._src = re; + return regExp; +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch$1(pattern, options || {}).makeRe(); +}; + +Minimatch$1.prototype.makeRe = makeRe; + +function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + + var set = this.set; + + if (!set.length) { + this.regexp = false; + return this.regexp; + } + + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? 'i' : ''; + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return p === GLOBSTAR ? twoStar : typeof p === 'string' ? regExpEscape(p) : p._src; + }).join('\\\/'); + }).join('|'); // must match entire pattern + // ending in a * or ** will make it less strict. + + re = '^(?:' + re + ')$'; // can match anything, as long as it's not this. + + if (this.negate) re = '^(?!' + re + ').*$'; + + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + + return this.regexp; +} + +minimatch.match = function (list, pattern, options) { + options = options || {}; + var mm = new Minimatch$1(pattern, options); + list = list.filter(function (f) { + return mm.match(f); + }); + + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + + return list; +}; + +Minimatch$1.prototype.match = match; + +function match(f, partial) { + this.debug('match', f, this.pattern); // short-circuit in the case of busted things. + // comments, etc. + + if (this.comment) return false; + if (this.empty) return f === ''; + if (f === '/' && partial) return true; + var options = this.options; // windows: need to use /, not \ + + if (path$2.sep !== '/') { + f = f.split(path$2.sep).join('/'); + } // treat the test path as a set of pathparts. + + + f = f.split(slashSplit); + this.debug(this.pattern, 'split', f); // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set; + this.debug(this.pattern, 'set', set); // Find the basename of the path by looking for the last non-empty segment + + var filename; + var i; + + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + + var hit = this.matchOne(file, pattern, partial); + + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + + + if (options.flipNegate) return false; + return this.negate; +} // set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. + + +Minimatch$1.prototype.matchOne = function (file, pattern, partial) { + var options = this.options; + this.debug('matchOne', { + 'this': this, + file: file, + pattern: pattern + }); + this.debug('matchOne', file.length, pattern.length); + + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug('matchOne loop'); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); // should be impossible. + // some invalid regexp stuff in the set. + + if (p === false) return false; + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]); // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + + var fr = fi; + var pr = pi + 1; + + if (pr === pl) { + this.debug('** at the end'); // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || !options.dot && file[fi].charAt(0) === '.') return false; + } + + return true; + } // ok, let's see if we can swallow whatever we can. + + + while (fr < fl) { + var swallowee = file[fr]; + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); // XXX remove this slice. Just pass the start index. + + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee); // found a match. + + return true; + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || !options.dot && swallowee.charAt(0) === '.') { + this.debug('dot detected!', file, fr, pattern, pr); + break; + } // ** swallows a segment, and continue. + + + this.debug('globstar swallow a segment, and continue'); + fr++; + } + } // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + + + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr); + if (fr === fl) return true; + } + + return false; + } // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + + + var hit; + + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + + this.debug('string match', p, f, hit); + } else { + hit = f.match(p); + this.debug('pattern match', p, f, hit); + } + + if (!hit) return false; + } // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + // now either we fell off the end of the pattern, or we're done. + + + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true; + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial; + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = fi === fl - 1 && file[fi] === ''; + return emptyFileEnd; + } // should be unreachable. + + + throw new Error('wtf?'); +}; // replace stuff like \* with * + + +function globUnescape(s) { + return s.replace(/\\(.)/g, '$1'); +} + +function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +} + +var inherits_browser = createCommonjsModule(function (module) { + if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + + var TempCtor = function TempCtor() {}; + + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } +}); + +var inherits = createCommonjsModule(function (module) { + try { + var util$$1 = util; + if (typeof util$$1.inherits !== 'function') throw ''; + module.exports = util$$1.inherits; + } catch (e) { + module.exports = inherits_browser; + } +}); + +function posix(path$$1) { + return path$$1.charAt(0) === '/'; +} + +function win32(path$$1) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path$$1); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); // UNC paths are always absolute + + return Boolean(result[2] || isUnc); +} + +var pathIsAbsolute = process.platform === 'win32' ? win32 : posix; +var posix_1 = posix; +var win32_1 = win32; +pathIsAbsolute.posix = posix_1; +pathIsAbsolute.win32 = win32_1; + +var alphasort_1 = alphasort$2; +var alphasorti_1 = alphasorti$2; +var setopts_1 = setopts$2; +var ownProp_1 = ownProp$2; +var makeAbs_1 = makeAbs; +var finish_1 = finish; +var mark_1 = mark; +var isIgnored_1 = isIgnored$2; +var childrenIgnored_1 = childrenIgnored$2; + +function ownProp$2(obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field); +} + +var Minimatch$3 = minimatch_1.Minimatch; + +function alphasorti$2(a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()); +} + +function alphasort$2(a, b) { + return a.localeCompare(b); +} + +function setupIgnores(self, options) { + self.ignore = options.ignore || []; + if (!Array.isArray(self.ignore)) self.ignore = [self.ignore]; + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap); + } +} // ignore patterns are always in dot:true mode. + + +function ignoreMap(pattern) { + var gmatcher = null; + + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, ''); + gmatcher = new Minimatch$3(gpattern, { + dot: true + }); + } + + return { + matcher: new Minimatch$3(pattern, { + dot: true + }), + gmatcher: gmatcher + }; +} + +function setopts$2(self, pattern, options) { + if (!options) options = {}; // base-matching: just use globstar for that. + + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar"); + } + + pattern = "**/" + pattern; + } + + self.silent = !!options.silent; + self.pattern = pattern; + self.strict = options.strict !== false; + self.realpath = !!options.realpath; + self.realpathCache = options.realpathCache || Object.create(null); + self.follow = !!options.follow; + self.dot = !!options.dot; + self.mark = !!options.mark; + self.nodir = !!options.nodir; + if (self.nodir) self.mark = true; + self.sync = !!options.sync; + self.nounique = !!options.nounique; + self.nonull = !!options.nonull; + self.nosort = !!options.nosort; + self.nocase = !!options.nocase; + self.stat = !!options.stat; + self.noprocess = !!options.noprocess; + self.absolute = !!options.absolute; + self.maxLength = options.maxLength || Infinity; + self.cache = options.cache || Object.create(null); + self.statCache = options.statCache || Object.create(null); + self.symlinks = options.symlinks || Object.create(null); + setupIgnores(self, options); + self.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp$2(options, "cwd")) self.cwd = cwd;else { + self.cwd = path.resolve(options.cwd); + self.changedCwd = self.cwd !== cwd; + } + self.root = options.root || path.resolve(self.cwd, "/"); + self.root = path.resolve(self.root); + if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/"); // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + + self.cwdAbs = pathIsAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd); + if (process.platform === "win32") self.cwdAbs = self.cwdAbs.replace(/\\/g, "/"); + self.nomount = !!options.nomount; // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + + options.nonegate = true; + options.nocomment = true; + self.minimatch = new Minimatch$3(pattern, options); + self.options = self.minimatch.options; +} + +function finish(self) { + var nou = self.nounique; + var all = nou ? [] : Object.create(null); + + for (var i = 0, l = self.matches.length; i < l; i++) { + var matches = self.matches[i]; + + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i]; + if (nou) all.push(literal);else all[literal] = true; + } + } else { + // had matches + var m = Object.keys(matches); + if (nou) all.push.apply(all, m);else m.forEach(function (m) { + all[m] = true; + }); + } + } + + if (!nou) all = Object.keys(all); + if (!self.nosort) all = all.sort(self.nocase ? alphasorti$2 : alphasort$2); // at *some* point we statted all of these + + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]); + } + + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !/\/$/.test(e); + var c = self.cache[e] || self.cache[makeAbs(self, e)]; + if (notDir && c) notDir = c !== 'DIR' && !Array.isArray(c); + return notDir; + }); + } + } + + if (self.ignore.length) all = all.filter(function (m) { + return !isIgnored$2(self, m); + }); + self.found = all; +} + +function mark(self, p) { + var abs = makeAbs(self, p); + var c = self.cache[abs]; + var m = p; + + if (c) { + var isDir = c === 'DIR' || Array.isArray(c); + var slash = p.slice(-1) === '/'; + if (isDir && !slash) m += '/';else if (!isDir && slash) m = m.slice(0, -1); + + if (m !== p) { + var mabs = makeAbs(self, m); + self.statCache[mabs] = self.statCache[abs]; + self.cache[mabs] = self.cache[abs]; + } + } + + return m; +} // lotta situps... + + +function makeAbs(self, f) { + var abs = f; + + if (f.charAt(0) === '/') { + abs = path.join(self.root, f); + } else if (pathIsAbsolute(f) || f === '') { + abs = f; + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f); + } else { + abs = path.resolve(f); + } + + if (process.platform === 'win32') abs = abs.replace(/\\/g, '/'); + return abs; +} // Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents + + +function isIgnored$2(self, path$$2) { + if (!self.ignore.length) return false; + return self.ignore.some(function (item) { + return item.matcher.match(path$$2) || !!(item.gmatcher && item.gmatcher.match(path$$2)); + }); +} + +function childrenIgnored$2(self, path$$2) { + if (!self.ignore.length) return false; + return self.ignore.some(function (item) { + return !!(item.gmatcher && item.gmatcher.match(path$$2)); + }); +} + +var common$4 = { + alphasort: alphasort_1, + alphasorti: alphasorti_1, + setopts: setopts_1, + ownProp: ownProp_1, + makeAbs: makeAbs_1, + finish: finish_1, + mark: mark_1, + isIgnored: isIgnored_1, + childrenIgnored: childrenIgnored_1 +}; + +var sync$1 = globSync; +globSync.GlobSync = GlobSync$1; +var setopts$1 = common$4.setopts; +var ownProp$1 = common$4.ownProp; +var childrenIgnored$1 = common$4.childrenIgnored; +var isIgnored$1 = common$4.isIgnored; + +function globSync(pattern, options) { + if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n' + 'See: https://github.com/isaacs/node-glob/issues/167'); + return new GlobSync$1(pattern, options).found; +} + +function GlobSync$1(pattern, options) { + if (!pattern) throw new Error('must provide pattern'); + if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n' + 'See: https://github.com/isaacs/node-glob/issues/167'); + if (!(this instanceof GlobSync$1)) return new GlobSync$1(pattern, options); + setopts$1(this, pattern, options); + if (this.noprocess) return this; + var n = this.minimatch.set.length; + this.matches = new Array(n); + + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false); + } + + this._finish(); +} + +GlobSync$1.prototype._finish = function () { + assert(this instanceof GlobSync$1); + + if (this.realpath) { + var self = this; + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null); + + for (var p in matchset) { + try { + p = self._makeAbs(p); + var real = fs_realpath.realpathSync(p, self.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === 'stat') set[self._makeAbs(p)] = true;else throw er; + } + } + }); + } + + common$4.finish(this); +}; + +GlobSync$1.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync$1); // Get the first [n] parts of pattern that are all strings. + + var n = 0; + + while (typeof pattern[n] === 'string') { + n++; + } // now n is the index of the first one that is *not* a string. + // See if there's anything else + + + var prefix; + + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index); + + return; + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null; + break; + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/'); + break; + } + + var remain = pattern.slice(n); // get the list of entries. + + var read; + if (prefix === null) read = '.';else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join('/'))) { + if (!prefix || !pathIsAbsolute(prefix)) prefix = '/' + prefix; + read = prefix; + } else read = prefix; + + var abs = this._makeAbs(read); //if ignored, skip processing + + + if (childrenIgnored$1(this, read)) return; + var isGlobStar = remain[0] === minimatch_1.GLOBSTAR; + if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar);else this._processReaddir(prefix, read, abs, remain, index, inGlobStar); +}; + +GlobSync$1.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); // if the abs isn't a dir, then nothing can match! + + + if (!entries) return; // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === '.'; + var matchedEntries = []; + + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + + if (e.charAt(0) !== '.' || dotOk) { + var m; + + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + + if (m) matchedEntries.push(e); + } + } + + var len = matchedEntries.length; // If there are no matched entries, then nothing matches. + + if (len === 0) return; // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) this.matches[index] = Object.create(null); + + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + + if (prefix) { + if (prefix.slice(-1) !== '/') e = prefix + '/' + e;else e = prefix + e; + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e); + } + + this._emitMatch(index, e); + } // This was the last one, and no stats were needed + + + return; + } // now test all matched entries as stand-ins for that part + // of the pattern. + + + remain.shift(); + + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) newPattern = [prefix, e];else newPattern = [e]; + + this._process(newPattern.concat(remain), index, inGlobStar); + } +}; + +GlobSync$1.prototype._emitMatch = function (index, e) { + if (isIgnored$1(this, e)) return; + + var abs = this._makeAbs(e); + + if (this.mark) e = this._mark(e); + + if (this.absolute) { + e = abs; + } + + if (this.matches[index][e]) return; + + if (this.nodir) { + var c = this.cache[abs]; + if (c === 'DIR' || Array.isArray(c)) return; + } + + this.matches[index][e] = true; + if (this.stat) this._stat(e); +}; + +GlobSync$1.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) return this._readdir(abs, false); + var entries; + var lstat; + var stat; + + try { + lstat = fs.lstatSync(abs); + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null; + } + } + + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + + if (!isSym && lstat && !lstat.isDirectory()) this.cache[abs] = 'FILE';else entries = this._readdir(abs, false); + return entries; +}; + +GlobSync$1.prototype._readdir = function (abs, inGlobStar) { + var entries; + if (inGlobStar && !ownProp$1(this.symlinks, abs)) return this._readdirInGlobStar(abs); + + if (ownProp$1(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === 'FILE') return null; + if (Array.isArray(c)) return c; + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)); + } catch (er) { + this._readdirError(abs, er); + + return null; + } +}; + +GlobSync$1.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === '/') e = abs + e;else e = abs + '/' + e; + this.cache[e] = true; + } + } + + this.cache[abs] = entries; // mark and cache dir-ness + + return entries; +}; + +GlobSync$1.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + + case 'ENOTDIR': + // totally normal. means it *does* exist. + var abs = this._makeAbs(f); + + this.cache[abs] = 'FILE'; + + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error; + } + + break; + + case 'ENOENT': // not terribly unusual + + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false; + break; + + default: + // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false; + if (this.strict) throw er; + if (!this.silent) console.error('glob error', er); + break; + } +}; + +GlobSync$1.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + + + if (!entries) return; // test without the globstar, and with every child both below + // and replacing the globstar. + + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); // the noGlobStar pattern exits the inGlobStar state + + this._process(noGlobStar, index, false); + + var len = entries.length; + var isSym = this.symlinks[abs]; // If it's a symlink, and we're in a globstar, then stop + + if (isSym && inGlobStar) return; + + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === '.' && !this.dot) continue; // these two cases enter the inGlobStar state + + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + + this._process(instead, index, true); + + var below = gspref.concat(entries[i], remain); + + this._process(below, index, true); + } +}; + +GlobSync$1.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix); + + if (!this.matches[index]) this.matches[index] = Object.create(null); // If it doesn't exist, then just mark the lack of results + + if (!exists) return; + + if (prefix && pathIsAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) prefix += '/'; + } + } + + if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/'); // Mark this as a match + + this._emitMatch(index, prefix); +}; // Returns either 'DIR', 'FILE', or false + + +GlobSync$1.prototype._stat = function (f) { + var abs = this._makeAbs(f); + + var needDir = f.slice(-1) === '/'; + if (f.length > this.maxLength) return false; + + if (!this.stat && ownProp$1(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) c = 'DIR'; // It exists, but maybe not how we need it + + if (!needDir || c === 'DIR') return c; + if (needDir && c === 'FILE') return false; // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists; + var stat = this.statCache[abs]; + + if (!stat) { + var lstat; + + try { + lstat = fs.lstatSync(abs); + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false; + return false; + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + + this.statCache[abs] = stat; + var c = true; + if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE'; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === 'FILE') return false; + return c; +}; + +GlobSync$1.prototype._mark = function (p) { + return common$4.mark(this, p); +}; + +GlobSync$1.prototype._makeAbs = function (f) { + return common$4.makeAbs(this, f); +}; + +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +var wrappy_1 = wrappy; + +function wrappy(fn, cb) { + if (fn && cb) return wrappy(fn)(cb); + if (typeof fn !== 'function') throw new TypeError('need wrapper function'); + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k]; + }); + return wrapper; + + function wrapper() { + var args = new Array(arguments.length); + + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + var ret = fn.apply(this, args); + var cb = args[args.length - 1]; + + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k]; + }); + } + + return ret; + } +} + +var once_1 = wrappy_1(once); +var strict = wrappy_1(onceStrict); +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function value() { + return once(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function value() { + return onceStrict(this); + }, + configurable: true + }); +}); + +function once(fn) { + var f = function f() { + if (f.called) return f.value; + f.called = true; + return f.value = fn.apply(this, arguments); + }; + + f.called = false; + return f; +} + +function onceStrict(fn) { + var f = function f() { + if (f.called) throw new Error(f.onceError); + f.called = true; + return f.value = fn.apply(this, arguments); + }; + + var name = fn.name || 'Function wrapped with `once`'; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; +} + +once_1.strict = strict; + +var reqs = Object.create(null); +var inflight_1 = wrappy_1(inflight); + +function inflight(key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null; + } else { + reqs[key] = [cb]; + return makeres(key); + } +} + +function makeres(key) { + return once_1(function RES() { + var cbs = reqs[key]; + var len = cbs.length; + var args = slice(arguments); // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args); + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len); + process.nextTick(function () { + RES.apply(null, args); + }); + } else { + delete reqs[key]; + } + } + }); +} + +function slice(args) { + var length = args.length; + var array = []; + + for (var i = 0; i < length; i++) { + array[i] = args[i]; + } + + return array; +} + +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +var glob_1 = glob; +var EE = events.EventEmitter; +var setopts = common$4.setopts; +var ownProp = common$4.ownProp; +var childrenIgnored = common$4.childrenIgnored; +var isIgnored = common$4.isIgnored; + +function glob(pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {}; + if (!options) options = {}; + + if (options.sync) { + if (cb) throw new TypeError('callback provided to sync glob'); + return sync$1(pattern, options); + } + + return new Glob(pattern, options, cb); +} + +glob.sync = sync$1; +var GlobSync = glob.GlobSync = sync$1.GlobSync; // old api surface + +glob.glob = glob; + +function extend(origin, add) { + if (add === null || typeof add !== 'object') { + return origin; + } + + var keys = Object.keys(add); + var i = keys.length; + + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + + return origin; +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_); + options.noprocess = true; + var g = new Glob(pattern, options); + var set = g.minimatch.set; + if (!pattern) return false; + if (set.length > 1) return true; + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') return true; + } + + return false; +}; + +glob.Glob = Glob; +inherits(Glob, EE); + +function Glob(pattern, options, cb) { + if (typeof options === 'function') { + cb = options; + options = null; + } + + if (options && options.sync) { + if (cb) throw new TypeError('callback provided to sync glob'); + return new GlobSync(pattern, options); + } + + if (!(this instanceof Glob)) return new Glob(pattern, options, cb); + setopts(this, pattern, options); + this._didRealPath = false; // process each pattern in the minimatch set + + var n = this.minimatch.set.length; // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + + this.matches = new Array(n); + + if (typeof cb === 'function') { + cb = once_1(cb); + this.on('error', cb); + this.on('end', function (matches) { + cb(null, matches); + }); + } + + var self = this; + this._processing = 0; + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + if (this.noprocess) return this; + if (n === 0) return done(); + var sync = true; + + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false, done); + } + + sync = false; + + function done() { + --self._processing; + + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish(); + }); + } else { + self._finish(); + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob); + if (this.aborted) return; + if (this.realpath && !this._didRealpath) return this._realpath(); + common$4.finish(this); + this.emit('end', this.found); +}; + +Glob.prototype._realpath = function () { + if (this._didRealpath) return; + this._didRealpath = true; + var n = this.matches.length; + if (n === 0) return this._finish(); + var self = this; + + for (var i = 0; i < this.matches.length; i++) { + this._realpathSet(i, next); + } + + function next() { + if (--n === 0) self._finish(); + } +}; + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index]; + if (!matchset) return cb(); + var found = Object.keys(matchset); + var self = this; + var n = found.length; + if (n === 0) return cb(); + var set = this.matches[index] = Object.create(null); + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p); + fs_realpath.realpath(p, self.realpathCache, function (er, real) { + if (!er) set[real] = true;else if (er.syscall === 'stat') set[p] = true;else self.emit('error', er); // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set; + cb(); + } + }); + }); +}; + +Glob.prototype._mark = function (p) { + return common$4.mark(this, p); +}; + +Glob.prototype._makeAbs = function (f) { + return common$4.makeAbs(this, f); +}; + +Glob.prototype.abort = function () { + this.aborted = true; + this.emit('abort'); +}; + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true; + this.emit('pause'); + } +}; + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume'); + this.paused = false; + + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + + this._emitQueue.length = 0; + + for (var i = 0; i < eq.length; i++) { + var e = eq[i]; + + this._emitMatch(e[0], e[1]); + } + } + + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + + this._processQueue.length = 0; + + for (var i = 0; i < pq.length; i++) { + var p = pq[i]; + this._processing--; + + this._process(p[0], p[1], p[2], p[3]); + } + } + } +}; + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === 'function'); + if (this.aborted) return; + this._processing++; + + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + + return; + } //console.error('PROCESS %d', this._processing, pattern) + // Get the first [n] parts of pattern that are all strings. + + + var n = 0; + + while (typeof pattern[n] === 'string') { + n++; + } // now n is the index of the first one that is *not* a string. + // see if there's anything else + + + var prefix; + + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb); + + return; + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null; + break; + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/'); + break; + } + + var remain = pattern.slice(n); // get the list of entries. + + var read; + if (prefix === null) read = '.';else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join('/'))) { + if (!prefix || !pathIsAbsolute(prefix)) prefix = '/' + prefix; + read = prefix; + } else read = prefix; + + var abs = this._makeAbs(read); //if ignored, skip _processing + + + if (childrenIgnored(this, read)) return cb(); + var isGlobStar = remain[0] === minimatch_1.GLOBSTAR; + if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb);else this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); +}; + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this; + + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); +}; + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + // if the abs isn't a dir, then nothing can match! + if (!entries) return cb(); // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === '.'; + var matchedEntries = []; + + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + + if (e.charAt(0) !== '.' || dotOk) { + var m; + + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + + if (m) matchedEntries.push(e); + } + } //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + + var len = matchedEntries.length; // If there are no matched entries, then nothing matches. + + if (len === 0) return cb(); // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) this.matches[index] = Object.create(null); + + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + + if (prefix) { + if (prefix !== '/') e = prefix + '/' + e;else e = prefix + e; + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e); + } + + this._emitMatch(index, e); + } // This was the last one, and no stats were needed + + + return cb(); + } // now test all matched entries as stand-ins for that part + // of the pattern. + + + remain.shift(); + + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + + if (prefix) { + if (prefix !== '/') e = prefix + '/' + e;else e = prefix + e; + } + + this._process([e].concat(remain), index, inGlobStar, cb); + } + + cb(); +}; + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) return; + if (isIgnored(this, e)) return; + + if (this.paused) { + this._emitQueue.push([index, e]); + + return; + } + + var abs = pathIsAbsolute(e) ? e : this._makeAbs(e); + if (this.mark) e = this._mark(e); + if (this.absolute) e = abs; + if (this.matches[index][e]) return; + + if (this.nodir) { + var c = this.cache[abs]; + if (c === 'DIR' || Array.isArray(c)) return; + } + + this.matches[index][e] = true; + var st = this.statCache[abs]; + if (st) this.emit('stat', e, st); + this.emit('match', e); +}; + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) return; // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + + if (this.follow) return this._readdir(abs, false, cb); + var lstatkey = 'lstat\0' + abs; + var self = this; + var lstatcb = inflight_1(lstatkey, lstatcb_); + if (lstatcb) fs.lstat(abs, lstatcb); + + function lstatcb_(er, lstat) { + if (er && er.code === 'ENOENT') return cb(); + var isSym = lstat && lstat.isSymbolicLink(); + self.symlinks[abs] = isSym; // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE'; + cb(); + } else self._readdir(abs, false, cb); + } +}; + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) return; + cb = inflight_1('readdir\0' + abs + '\0' + inGlobStar, cb); + if (!cb) return; //console.error('RD %j %j', +inGlobStar, abs) + + if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs, cb); + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === 'FILE') return cb(); + if (Array.isArray(c)) return cb(null, c); + } + + var self = this; + fs.readdir(abs, readdirCb(this, abs, cb)); +}; + +function readdirCb(self, abs, cb) { + return function (er, entries) { + if (er) self._readdirError(abs, er, cb);else self._readdirEntries(abs, entries, cb); + }; +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) return; // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === '/') e = abs + e;else e = abs + '/' + e; + this.cache[e] = true; + } + } + + this.cache[abs] = entries; + return cb(null, entries); +}; + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) return; // handle errors, and cache the information + + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + + case 'ENOTDIR': + // totally normal. means it *does* exist. + var abs = this._makeAbs(f); + + this.cache[abs] = 'FILE'; + + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit('error', error); + this.abort(); + } + + break; + + case 'ENOENT': // not terribly unusual + + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false; + break; + + default: + // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false; + + if (this.strict) { + this.emit('error', er); // If the error is handled, then we abort + // if not, we threw out of here + + this.abort(); + } + + if (!this.silent) console.error('glob error', er); + break; + } + + return cb(); +}; + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this; + + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); +}; + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) return cb(); // test without the globstar, and with every child both below + // and replacing the globstar. + + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); // the noGlobStar pattern exits the inGlobStar state + + this._process(noGlobStar, index, false, cb); + + var isSym = this.symlinks[abs]; + var len = entries.length; // If it's a symlink, and we're in a globstar, then stop + + if (isSym && inGlobStar) return cb(); + + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === '.' && !this.dot) continue; // these two cases enter the inGlobStar state + + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + + this._process(instead, index, true, cb); + + var below = gspref.concat(entries[i], remain); + + this._process(below, index, true, cb); + } + + cb(); +}; + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this; + + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb); + }); +}; + +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + //console.error('ps2', prefix, exists) + if (!this.matches[index]) this.matches[index] = Object.create(null); // If it doesn't exist, then just mark the lack of results + + if (!exists) return cb(); + + if (prefix && pathIsAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) prefix += '/'; + } + } + + if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/'); // Mark this as a match + + this._emitMatch(index, prefix); + + cb(); +}; // Returns either 'DIR', 'FILE', or false + + +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f); + + var needDir = f.slice(-1) === '/'; + if (f.length > this.maxLength) return cb(); + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) c = 'DIR'; // It exists, but maybe not how we need it + + if (!needDir || c === 'DIR') return cb(null, c); + if (needDir && c === 'FILE') return cb(); // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists; + var stat = this.statCache[abs]; + + if (stat !== undefined) { + if (stat === false) return cb(null, stat);else { + var type = stat.isDirectory() ? 'DIR' : 'FILE'; + if (needDir && type === 'FILE') return cb();else return cb(null, type, stat); + } + } + + var self = this; + var statcb = inflight_1('stat\0' + abs, lstatcb_); + if (statcb) fs.lstat(abs, statcb); + + function lstatcb_(er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) self._stat2(f, abs, null, lstat, cb);else self._stat2(f, abs, er, stat, cb); + }); + } else { + self._stat2(f, abs, er, lstat, cb); + } + } +}; + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false; + return cb(); + } + + var needDir = f.slice(-1) === '/'; + this.statCache[abs] = stat; + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) return cb(null, false, stat); + var c = true; + if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE'; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === 'FILE') return cb(); + return cb(null, c, stat); +}; + +var pify_1 = createCommonjsModule(function (module) { + 'use strict'; + + var processFn = function processFn(fn, P, opts) { + return function () { + var that = this; + var args = new Array(arguments.length); + + for (var i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P(function (resolve, reject) { + args.push(function (err, result) { + if (err) { + reject(err); + } else if (opts.multiArgs) { + var results = new Array(arguments.length - 1); + + for (var i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + fn.apply(that, args); + }); + }; + }; + + var pify = module.exports = function (obj, P, opts) { + if (typeof P !== 'function') { + opts = P; + P = Promise; + } + + opts = opts || {}; + opts.exclude = opts.exclude || [/.+Sync$/]; + + var filter = function filter(key) { + var match = function match(pattern) { + return typeof pattern === 'string' ? key === pattern : pattern.test(key); + }; + + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + var ret = typeof obj === 'function' ? function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, P, opts).apply(this, arguments); + } : {}; + return Object.keys(obj).reduce(function (ret, key) { + var x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x; + return ret; + }, ret); + }; + + pify.all = pify; +}); + +var globP = pify_1(glob_1, pinkiePromise).bind(glob_1); + +function isNegative(pattern) { + return pattern[0] === '!'; +} + +function isString(value) { + return typeof value === 'string'; +} + +function assertPatternsInput(patterns) { + if (!patterns.every(isString)) { + throw new TypeError('patterns must be a string or an array of strings'); + } +} + +function generateGlobTasks(patterns, opts) { + patterns = [].concat(patterns); + assertPatternsInput(patterns); + var globTasks = []; + opts = objectAssign({ + cache: Object.create(null), + statCache: Object.create(null), + realpathCache: Object.create(null), + symlinks: Object.create(null), + ignore: [] + }, opts); + patterns.forEach(function (pattern, i) { + if (isNegative(pattern)) { + return; + } + + var ignore = patterns.slice(i).filter(isNegative).map(function (pattern) { + return pattern.slice(1); + }); + globTasks.push({ + pattern: pattern, + opts: objectAssign({}, opts, { + ignore: opts.ignore.concat(ignore) + }) + }); + }); + return globTasks; +} + +var globby = function globby(patterns, opts) { + var globTasks; + + try { + globTasks = generateGlobTasks(patterns, opts); + } catch (err) { + return pinkiePromise.reject(err); + } + + return pinkiePromise.all(globTasks.map(function (task) { + return globP(task.pattern, task.opts); + })).then(function (paths) { + return arrayUnion.apply(null, paths); + }); +}; + +var sync = function sync(patterns, opts) { + var globTasks = generateGlobTasks(patterns, opts); + return globTasks.reduce(function (matches, task) { + return arrayUnion(matches, glob_1.sync(task.pattern, task.opts)); + }, []); +}; + +var generateGlobTasks_1 = generateGlobTasks; + +var hasMagic = function hasMagic(patterns, opts) { + return [].concat(patterns).some(function (pattern) { + return glob_1.hasMagic(pattern, opts); + }); +}; + +globby.sync = sync; +globby.generateGlobTasks = generateGlobTasks_1; +globby.hasMagic = hasMagic; + +var assert$2 = true; +var buffer_ieee754 = "< 0.9.7"; +var buffer = true; +var child_process = true; +var cluster = true; +var console$1 = true; +var constants = true; +var crypto = true; +var _debugger = "< 8"; +var dgram = true; +var dns = true; +var domain = true; +var events$1 = true; +var freelist = "< 6"; +var fs$2 = true; +var http = true; +var http2 = ">= 8.8"; +var https = true; +var _http_server = ">= 0.11"; +var _linklist = "< 8"; +var module$1 = true; +var net = true; +var os$1 = true; +var path$3 = true; +var perf_hooks = ">= 8.5"; +var process$1 = ">= 1"; +var punycode = true; +var querystring = true; +var readline$1 = true; +var repl = true; +var stream = true; +var string_decoder = true; +var sys = true; +var timers = true; +var tls = true; +var tty = true; +var url = true; +var util$4 = true; +var v8 = ">= 1"; +var vm = true; +var zlib = true; +var core$3 = { + assert: assert$2, + buffer_ieee754: buffer_ieee754, + buffer: buffer, + child_process: child_process, + cluster: cluster, + console: console$1, + constants: constants, + crypto: crypto, + _debugger: _debugger, + dgram: dgram, + dns: dns, + domain: domain, + events: events$1, + freelist: freelist, + fs: fs$2, + http: http, + http2: http2, + https: https, + _http_server: _http_server, + _linklist: _linklist, + module: module$1, + net: net, + os: os$1, + path: path$3, + perf_hooks: perf_hooks, + process: process$1, + punycode: punycode, + querystring: querystring, + readline: readline$1, + repl: repl, + stream: stream, + string_decoder: string_decoder, + sys: sys, + timers: timers, + tls: tls, + tty: tty, + url: url, + util: util$4, + v8: v8, + vm: vm, + zlib: zlib +}; + +var core$4 = Object.freeze({ + assert: assert$2, + buffer_ieee754: buffer_ieee754, + buffer: buffer, + child_process: child_process, + cluster: cluster, + console: console$1, + constants: constants, + crypto: crypto, + _debugger: _debugger, + dgram: dgram, + dns: dns, + domain: domain, + events: events$1, + freelist: freelist, + fs: fs$2, + http: http, + http2: http2, + https: https, + _http_server: _http_server, + _linklist: _linklist, + module: module$1, + net: net, + os: os$1, + path: path$3, + perf_hooks: perf_hooks, + process: process$1, + punycode: punycode, + querystring: querystring, + readline: readline$1, + repl: repl, + stream: stream, + string_decoder: string_decoder, + sys: sys, + timers: timers, + tls: tls, + tty: tty, + url: url, + util: util$4, + v8: v8, + vm: vm, + zlib: zlib, + default: core$3 +}); + +var data = ( core$4 && core$3 ) || core$4; + +var current = process.versions && process.versions.node && process.versions.node.split('.') || []; + +function versionIncluded(specifier) { + if (specifier === true) { + return true; + } + + var parts = specifier.split(' '); + var op = parts[0]; + var versionParts = parts[1].split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = Number(current[i] || 0); + var ver = Number(versionParts[i] || 0); + + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + + if (op === '<') { + return cur < ver; + } else if (op === '>=') { + return cur >= ver; + } else { + return false; + } + } + + return false; +} + +var core$2 = {}; + +for (var mod in data) { + // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core$2[mod] = versionIncluded(data[mod]); + } +} + +var core_1 = core$2; + +var caller = function caller() { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + + Error.prepareStackTrace = function (_, stack) { + return stack; + }; + + var stack = new Error().stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; + +var pathParse = createCommonjsModule(function (module) { + 'use strict'; + + var isWindows = process.platform === 'win32'; // Regex to split a windows path into three parts: [*, device, slash, + // tail] windows-only + + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; // Regex to split the tail part of the above into [*, dir, basename, ext] + + var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; + var win32 = {}; // Function to split a filename into [root, dir, basename, ext] + + function win32SplitPath(filename) { + // Separate device+slash from tail + var result = splitDeviceRe.exec(filename), + device = (result[1] || '') + (result[2] || ''), + tail = result[3] || ''; // Split the tail into dir, basename and extension + + var result2 = splitTailRe.exec(tail), + dir = result2[1], + basename = result2[2], + ext = result2[3]; + return [device, dir, basename, ext]; + } + + win32.parse = function (pathString) { + if (typeof pathString !== 'string') { + throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString); + } + + var allParts = win32SplitPath(pathString); + + if (!allParts || allParts.length !== 4) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + return { + root: allParts[0], + dir: allParts[0] + allParts[1].slice(0, -1), + base: allParts[2], + ext: allParts[3], + name: allParts[2].slice(0, allParts[2].length - allParts[3].length) + }; + }; // Split a filename into [root, dir, basename, ext], unix version + // 'root' is just a slash, or nothing. + + + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + var posix = {}; + + function posixSplitPath(filename) { + return splitPathRe.exec(filename).slice(1); + } + + posix.parse = function (pathString) { + if (typeof pathString !== 'string') { + throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString); + } + + var allParts = posixSplitPath(pathString); + + if (!allParts || allParts.length !== 4) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + allParts[1] = allParts[1] || ''; + allParts[2] = allParts[2] || ''; + allParts[3] = allParts[3] || ''; + return { + root: allParts[0], + dir: allParts[0] + allParts[1].slice(0, -1), + base: allParts[2], + ext: allParts[3], + name: allParts[2].slice(0, allParts[2].length - allParts[3].length) + }; + }; + + if (isWindows) module.exports = win32.parse;else + /* posix */ + module.exports = posix.parse; + module.exports.posix = posix.parse; + module.exports.win32 = win32.parse; +}); + +var parse$4 = path.parse || pathParse; + +var nodeModulesPaths = function nodeModulesPaths(start, opts) { + var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules']; // ensure that `start` is an absolute path at this point, + // resolving against the process' current working directory + + var absoluteStart = path.resolve(start); + + if (opts && opts.preserveSymlinks === false) { + try { + absoluteStart = fs.realpathSync(absoluteStart); + } catch (err) { + if (err.code !== 'ENOENT') { + throw err; + } + } + } + + var prefix = '/'; + + if (/^([A-Za-z]:)/.test(absoluteStart)) { + prefix = ''; + } else if (/^\\\\/.test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse$4(absoluteStart); + + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse$4(parsed.dir); + } + + var dirs = paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.join(prefix, aPath, moduleDir); + })); + }, []); + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; + +var async = function resolve(x, options, callback) { + var cb = callback; + var opts = options || {}; + + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + var isFile = opts.isFile || function (file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + + var readFile = opts.readFile || fs.readFile; + var extensions = opts.extensions || ['.js']; + var y = opts.basedir || path.dirname(caller()); + opts.paths = opts.paths || []; + + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..' || x.slice(-1) === '/') res += '/'; + + if (/\/$/.test(x) && res === y) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else loadNodeModules(x, y, function (err, n, pkg) { + if (err) cb(err);else if (n) cb(null, n, pkg);else if (core_1[x]) return cb(null, x);else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + + function onfile(err, m, pkg) { + if (err) cb(err);else if (m) cb(null, m, pkg);else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err);else if (d) cb(null, d, pkg);else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + var pkg = loadPackage; + if (pkg) onpkg(null, pkg);else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load([''].concat(extensions.slice()), path.resolve(dir, r), pkg); + } + + isFile(file, onex); + } + + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + + if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) { + return cb(null); + } + + if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null); + var pkgfile = path.join(dir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + readFile(pkgfile, function (err, body) { + if (err) cb(err); + + try { + var pkg = JSON.parse(body); + } catch (jsonErr) {} + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + cb(null, pkg, dir); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + var pkgfile = path.join(x, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + readFile(pkgfile, function (err, body) { + if (err) return cb(err); + + try { + var pkg = JSON.parse(body); + } catch (jsonErr) {} + + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg.main) { + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + var file = path.join(dir, x); + loadAsFile(file, undefined, onfile); + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(path.join(dir, x), undefined, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + + function loadNodeModules(x, start, cb) { + processDirs(cb, nodeModulesPaths(start, opts)); + } +}; + +var sync$3 = function sync(x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + + var opts = options || {}; + + var isFile = opts.isFile || function (file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + + return stat.isFile() || stat.isFIFO(); + }; + + var readFileSync = opts.readFileSync || fs.readFileSync; + var extensions = opts.extensions || ['.js']; + var y = opts.basedir || path.dirname(caller()); + opts.paths = opts.paths || []; + + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return m; + } else { + var n = loadNodeModulesSync(x, y); + if (n) return n; + } + + if (core_1[x]) return x; + var err = new Error("Cannot find module '" + x + "' from '" + y + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + + if (isFile(file)) { + return file; + } + } + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(x, '/package.json'); + + if (isFile(pkgfile)) { + try { + var body = readFileSync(pkgfile, 'UTF8'); + var pkg = JSON.parse(body); + + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, x); + } + + if (pkg.main) { + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } + } catch (e) {} + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var dirs = nodeModulesPaths(start, opts); + + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(path.join(dir, '/', x)); + if (m) return m; + var n = loadAsDirectorySync(path.join(dir, '/', x)); + if (n) return n; + } + } +}; + +var resolve$1 = createCommonjsModule(function (module, exports) { + async.core = core_1; + + async.isCore = function isCore(x) { + return core_1[x]; + }; + + async.sync = sync$3; + exports = async; + module.exports = async; +}); + +var _require$$0$builders$1 = doc.builders; +var indent$3 = _require$$0$builders$1.indent; +var join$3 = _require$$0$builders$1.join; +var hardline$4 = _require$$0$builders$1.hardline; +var softline$2 = _require$$0$builders$1.softline; +var literalline$2 = _require$$0$builders$1.literalline; +var concat$5 = _require$$0$builders$1.concat; +var group$2 = _require$$0$builders$1.group; +var dedentToRoot$1 = _require$$0$builders$1.dedentToRoot; +var _require$$0$utils = doc.utils; +var mapDoc$2 = _require$$0$utils.mapDoc; +var stripTrailingHardline$1 = _require$$0$utils.stripTrailingHardline; + +function embed(path$$1, print, textToDoc +/*, options */ +) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + + switch (node.type) { + case "TemplateLiteral": + { + var isCss = [isStyledJsx, isStyledComponents, isCssProp, isAngularComponentStyles].some(function (isIt) { + return isIt(path$$1); + }); + + if (isCss) { + // Get full template literal with expressions replaced by placeholders + var rawQuasis = node.quasis.map(function (q) { + return q.value.raw; + }); + var placeholderID = 0; + var text = rawQuasis.reduce(function (prevVal, currVal, idx) { + return idx == 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal; + }, ""); + var doc$$2 = textToDoc(text, { + parser: "css" + }); + return transformCssDoc(doc$$2, path$$1, print); + } + /* + * react-relay and graphql-tag + * graphql`...` + * graphql.experimental`...` + * gql`...` + * + * This intentionally excludes Relay Classic tags, as Prettier does not + * support Relay Classic formatting. + */ + + + if (isGraphQL(path$$1)) { + var expressionDocs = node.expressions ? path$$1.map(print, "expressions") : []; + var numQuasis = node.quasis.length; + + if (numQuasis === 1 && node.quasis[0].value.raw.trim() === "") { + return "``"; + } + + var parts = []; + + for (var i = 0; i < numQuasis; i++) { + var templateElement = node.quasis[i]; + var isFirst = i === 0; + var isLast = i === numQuasis - 1; + var _text = templateElement.value.cooked; // Bail out if any of the quasis have an invalid escape sequence + // (which would make the `cooked` value be `null` or `undefined`) + + if (typeof _text !== "string") { + return null; + } + + var lines = _text.split("\n"); + + var numLines = lines.length; + var expressionDoc = expressionDocs[i]; + var startsWithBlankLine = numLines > 2 && lines[0].trim() === "" && lines[1].trim() === ""; + var endsWithBlankLine = numLines > 2 && lines[numLines - 1].trim() === "" && lines[numLines - 2].trim() === ""; + var commentsAndWhitespaceOnly = lines.every(function (line) { + return /^\s*(?:#[^\r\n]*)?$/.test(line); + }); // Bail out if an interpolation occurs within a comment. + + if (!isLast && /#[^\r\n]*$/.test(lines[numLines - 1])) { + return null; + } + + var _doc = null; + + if (commentsAndWhitespaceOnly) { + _doc = printGraphqlComments(lines); + } else { + _doc = stripTrailingHardline$1(textToDoc(_text, { + parser: "graphql" + })); + } + + if (_doc) { + _doc = escapeTemplateCharacters(_doc, false); + + if (!isFirst && startsWithBlankLine) { + parts.push(""); + } + + parts.push(_doc); + + if (!isLast && endsWithBlankLine) { + parts.push(""); + } + } else if (!isFirst && !isLast && startsWithBlankLine) { + parts.push(""); + } + + if (expressionDoc) { + parts.push(concat$5(["${", expressionDoc, "}"])); + } + } + + return concat$5(["`", indent$3(concat$5([hardline$4, join$3(hardline$4, parts)])), hardline$4, "`"]); + } + + if (isHtml(path$$1)) { + return printHtmlTemplateLiteral(path$$1, print, textToDoc, "html"); + } + + if (isAngularComponentTemplate(path$$1)) { + return printHtmlTemplateLiteral(path$$1, print, textToDoc, "angular"); + } + + break; + } + + case "TemplateElement": + { + /** + * md`...` + * markdown`...` + */ + if (parentParent && parentParent.type === "TaggedTemplateExpression" && parent.quasis.length === 1 && parentParent.tag.type === "Identifier" && (parentParent.tag.name === "md" || parentParent.tag.name === "markdown")) { + var _text2 = parent.quasis[0].value.raw.replace(/((?:\\\\)*)\\`/g, function (_, backslashes) { + return "\\".repeat(backslashes.length / 2) + "`"; + }); + + var indentation = getIndentation(_text2); + var hasIndent = indentation !== ""; + return concat$5([hasIndent ? indent$3(concat$5([softline$2, printMarkdown(_text2.replace(new RegExp(`^${indentation}`, "gm"), ""))])) : concat$5([literalline$2, dedentToRoot$1(printMarkdown(_text2))]), softline$2]); + } + + break; + } + } + + function printMarkdown(text) { + var doc$$2 = textToDoc(text, { + parser: "markdown", + __inJsTemplate: true + }); + return stripTrailingHardline$1(escapeTemplateCharacters(doc$$2, true)); + } +} + +function getIndentation(str) { + var firstMatchedIndent = str.match(/^([^\S\n]*)\S/m); + return firstMatchedIndent === null ? "" : firstMatchedIndent[1]; +} + +function escapeTemplateCharacters(doc$$2, raw) { + return mapDoc$2(doc$$2, function (currentDoc) { + if (!currentDoc.parts) { + return currentDoc; + } + + var parts = []; + currentDoc.parts.forEach(function (part) { + if (typeof part === "string") { + parts.push(raw ? part.replace(/(\\*)`/g, "$1$1\\`") : part.replace(/([\\`]|\$\{)/g, "\\$1")); + } else { + parts.push(part); + } + }); + return Object.assign({}, currentDoc, { + parts + }); + }); +} + +function transformCssDoc(quasisDoc, path$$1, print) { + var parentNode = path$$1.getValue(); + var isEmpty = parentNode.quasis.length === 1 && !parentNode.quasis[0].value.raw.trim(); + + if (isEmpty) { + return "``"; + } + + var expressionDocs = parentNode.expressions ? path$$1.map(print, "expressions") : []; + var newDoc = replacePlaceholders(quasisDoc, expressionDocs); + /* istanbul ignore if */ + + if (!newDoc) { + throw new Error("Couldn't insert all the expressions"); + } + + return concat$5(["`", indent$3(concat$5([hardline$4, stripTrailingHardline$1(newDoc)])), softline$2, "`"]); +} // Search all the placeholders in the quasisDoc tree +// and replace them with the expression docs one by one +// returns a new doc with all the placeholders replaced, +// or null if it couldn't replace any expression + + +function replacePlaceholders(quasisDoc, expressionDocs) { + if (!expressionDocs || !expressionDocs.length) { + return quasisDoc; + } + + var expressions = expressionDocs.slice(); + var replaceCounter = 0; + var newDoc = mapDoc$2(quasisDoc, function (doc$$2) { + if (!doc$$2 || !doc$$2.parts || !doc$$2.parts.length) { + return doc$$2; + } + + var parts = doc$$2.parts; + var atIndex = parts.indexOf("@"); + var placeholderIndex = atIndex + 1; + + if (atIndex > -1 && typeof parts[placeholderIndex] === "string" && parts[placeholderIndex].startsWith("prettier-placeholder")) { + // If placeholder is split, join it + var at = parts[atIndex]; + var placeholder = parts[placeholderIndex]; + var rest = parts.slice(placeholderIndex + 1); + parts = parts.slice(0, atIndex).concat([at + placeholder]).concat(rest); + } + + var atPlaceholderIndex = parts.findIndex(function (part) { + return typeof part === "string" && part.startsWith("@prettier-placeholder"); + }); + + if (atPlaceholderIndex > -1) { + var _placeholder = parts[atPlaceholderIndex]; + + var _rest = parts.slice(atPlaceholderIndex + 1); + + var placeholderMatch = _placeholder.match(/@prettier-placeholder-(.+)-id([\s\S]*)/); + + var placeholderID = placeholderMatch[1]; // When the expression has a suffix appended, like: + // animation: linear ${time}s ease-out; + + var suffix = placeholderMatch[2]; + var expression = expressions[placeholderID]; + replaceCounter++; + parts = parts.slice(0, atPlaceholderIndex).concat(["${", expression, "}" + suffix]).concat(_rest); + } + + return Object.assign({}, doc$$2, { + parts: parts + }); + }); + return expressions.length === replaceCounter ? newDoc : null; +} + +function printGraphqlComments(lines) { + var parts = []; + var seenComment = false; + lines.map(function (textLine) { + return textLine.trim(); + }).forEach(function (textLine, i, array) { + // Lines are either whitespace only, or a comment (with poential whitespace + // around it). Drop whitespace-only lines. + if (textLine === "") { + return; + } + + if (array[i - 1] === "" && seenComment) { + // If a non-first comment is preceded by a blank (whitespace only) line, + // add in a blank line. + parts.push(concat$5([hardline$4, textLine])); + } else { + parts.push(textLine); + } + + seenComment = true; + }); // If `lines` was whitespace only, return `null`. + + return parts.length === 0 ? null : join$3(hardline$4, parts); +} +/** + * Template literal in this context: + * + */ + + +function isStyledJsx(path$$1) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + return parentParent && node.quasis && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXElement" && parentParent.openingElement.name.name === "style" && parentParent.openingElement.attributes.some(function (attribute) { + return attribute.name.name === "jsx"; + }); +} +/** + * Angular Components can have: + * - Inline HTML template + * - Inline CSS styles + * + * ...which are both within template literals somewhere + * inside of the Component decorator factory. + * + * E.g. + * @Component({ + * template: `
...
`, + * styles: [`h1 { color: blue; }`] + * }) + */ + + +function isAngularComponentStyles(path$$1) { + return isPathMatch(path$$1, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "ArrayExpression" && name === "elements"; + }, function (node, name) { + return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "styles" && name === "value"; + }].concat(getAngularComponentObjectExpressionPredicates())); +} + +function isAngularComponentTemplate(path$$1) { + return isPathMatch(path$$1, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "template" && name === "value"; + }].concat(getAngularComponentObjectExpressionPredicates())); +} + +function getAngularComponentObjectExpressionPredicates() { + return [function (node, name) { + return node.type === "ObjectExpression" && name === "properties"; + }, function (node, name) { + return node.type === "CallExpression" && node.callee.type === "Identifier" && node.callee.name === "Component" && name === "arguments"; + }, function (node, name) { + return node.type === "Decorator" && name === "expression"; + }]; +} +/** + * styled-components template literals + */ + + +function isStyledComponents(path$$1) { + var parent = path$$1.getParentNode(); + + if (!parent || parent.type !== "TaggedTemplateExpression") { + return false; + } + + var tag = parent.tag; + + switch (tag.type) { + case "MemberExpression": + return (// styled.foo`` + isStyledIdentifier(tag.object) || // Component.extend`` + isStyledExtend(tag) + ); + + case "CallExpression": + return (// styled(Component)`` + isStyledIdentifier(tag.callee) || tag.callee.type === "MemberExpression" && (tag.callee.object.type === "MemberExpression" && ( // styled.foo.attr({})`` + isStyledIdentifier(tag.callee.object.object) || // Component.extend.attr({)`` + isStyledExtend(tag.callee.object)) || // styled(Component).attr({})`` + tag.callee.object.type === "CallExpression" && isStyledIdentifier(tag.callee.object.callee)) + ); + + case "Identifier": + // css`` + return tag.name === "css"; + + default: + return false; + } +} +/** + * JSX element with CSS prop + */ + + +function isCssProp(path$$1) { + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + return parentParent && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" && parentParent.name.type === "JSXIdentifier" && parentParent.name.name === "css"; +} + +function isStyledIdentifier(node) { + return node.type === "Identifier" && node.name === "styled"; +} + +function isStyledExtend(node) { + return /^[A-Z]/.test(node.object.name) && node.property.name === "extend"; +} +/* + * react-relay and graphql-tag + * graphql`...` + * graphql.experimental`...` + * gql`...` + * GraphQL comment block + * + * This intentionally excludes Relay Classic tags, as Prettier does not + * support Relay Classic formatting. + */ + + +function isGraphQL(path$$1) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + return hasLanguageComment(node, "GraphQL") || parent && (parent.type === "TaggedTemplateExpression" && (parent.tag.type === "MemberExpression" && parent.tag.object.name === "graphql" && parent.tag.property.name === "experimental" || parent.tag.type === "Identifier" && (parent.tag.name === "gql" || parent.tag.name === "graphql")) || parent.type === "CallExpression" && parent.callee.type === "Identifier" && parent.callee.name === "graphql"); +} + +function hasLanguageComment(node, languageName) { + // This checks for a leading comment that is exactly `/* GraphQL */` + // In order to be in line with other implementations of this comment tag + // we will not trim the comment value and we will expect exactly one space on + // either side of the GraphQL string + // Also see ./clean.js + return node.leadingComments && node.leadingComments.some(function (comment) { + return comment.type === "CommentBlock" && comment.value === ` ${languageName} `; + }); +} + +function isPathMatch(path$$1, predicateStack) { + var stack = path$$1.stack.slice(); + var name = null; + var node = stack.pop(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = predicateStack[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var predicate = _step.value; + + if (node === undefined) { + return false; + } // skip index/array + + + if (typeof name === "number") { + name = stack.pop(); + node = stack.pop(); + } + + if (!predicate(node, name)) { + return false; + } + + name = stack.pop(); + node = stack.pop(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return true; +} +/** + * - html`...` + * - HTML comment block + */ + + +function isHtml(path$$1) { + var node = path$$1.getValue(); + return hasLanguageComment(node, "HTML") || isPathMatch(path$$1, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "TaggedTemplateExpression" && node.tag.type === "Identifier" && node.tag.name === "html" && name === "quasi"; + }]); +} + +function printHtmlTemplateLiteral(path$$1, print, textToDoc, parser) { + var node = path$$1.getValue(); + var placeholderPattern = "prettierhtmlplaceholder(\\d+)redlohecalplmthreitterp"; + var placeholders = node.expressions.map(function (_, i) { + return `prettierhtmlplaceholder${i}redlohecalplmthreitterp`; + }); + var text = node.quasis.map(function (quasi, index, quasis) { + return index === quasis.length - 1 ? quasi.value.raw : quasi.value.raw + placeholders[index]; + }).join(""); + var expressionDocs = path$$1.map(print, "expressions"); + + if (expressionDocs.length === 0 && text.trim().length === 0) { + return "``"; + } + + var contentDoc = mapDoc$2(stripTrailingHardline$1(textToDoc(text, { + parser + })), function (doc$$2) { + var placeholderRegex = new RegExp(placeholderPattern, "g"); + var hasPlaceholder = typeof doc$$2 === "string" && placeholderRegex.test(doc$$2); + + if (!hasPlaceholder) { + return doc$$2; + } + + var parts = []; + var components = doc$$2.split(placeholderRegex); + + for (var i = 0; i < components.length; i++) { + var component = components[i]; + + if (i % 2 === 0) { + if (component) { + parts.push(component); + } + + continue; + } + + var placeholderIndex = +component; + parts.push(concat$5(["${", group$2(concat$5([indent$3(concat$5([softline$2, expressionDocs[placeholderIndex]])), softline$2])), "}"])); + } + + return concat$5(parts); + }); + return group$2(concat$5(["`", indent$3(concat$5([hardline$4, group$2(contentDoc)])), softline$2, "`"])); +} + +var embed_1 = embed; + +function clean(ast, newObj, parent) { + ["range", "raw", "comments", "leadingComments", "trailingComments", "extra", "start", "end", "flags"].forEach(function (name) { + delete newObj[name]; + }); + + if (ast.type === "BigIntLiteral") { + newObj.value = newObj.value.toLowerCase(); + } // We remove extra `;` and add them when needed + + + if (ast.type === "EmptyStatement") { + return null; + } // We move text around, including whitespaces and add {" "} + + + if (ast.type === "JSXText") { + return null; + } + + if (ast.type === "JSXExpressionContainer" && ast.expression.type === "Literal" && ast.expression.value === " ") { + return null; + } // (TypeScript) Ignore `static` in `constructor(static p) {}` + // and `export` in `constructor(export p) {}` + + + if (ast.type === "TSParameterProperty" && ast.accessibility === null && !ast.readonly) { + return { + type: "Identifier", + name: ast.parameter.name, + typeAnnotation: newObj.parameter.typeAnnotation, + decorators: newObj.decorators + }; + } // (TypeScript) ignore empty `specifiers` array + + + if (ast.type === "TSNamespaceExportDeclaration" && ast.specifiers && ast.specifiers.length === 0) { + delete newObj.specifiers; + } // (TypeScript) bypass TSParenthesizedType + + + if (ast.type === "TSParenthesizedType" && ast.typeAnnotation.type === "TSTypeAnnotation") { + return newObj.typeAnnotation.typeAnnotation; + } // We convert
to
+ + + if (ast.type === "JSXOpeningElement") { + delete newObj.selfClosing; + } + + if (ast.type === "JSXElement") { + delete newObj.closingElement; + } // We change {'key': value} into {key: value} + + + if ((ast.type === "Property" || ast.type === "ObjectProperty" || ast.type === "MethodDefinition" || ast.type === "ClassProperty" || ast.type === "TSPropertySignature" || ast.type === "ObjectTypeProperty") && typeof ast.key === "object" && ast.key && (ast.key.type === "Literal" || ast.key.type === "StringLiteral" || ast.key.type === "Identifier")) { + delete newObj.key; + } + + if (ast.type === "OptionalMemberExpression" && ast.optional === false) { + newObj.type = "MemberExpression"; + delete newObj.optional; + } // Remove raw and cooked values from TemplateElement when it's CSS + // styled-jsx + + + if (ast.type === "JSXElement" && ast.openingElement.name.name === "style" && ast.openingElement.attributes.some(function (attr) { + return attr.name.name === "jsx"; + })) { + var templateLiterals = newObj.children.filter(function (child) { + return child.type === "JSXExpressionContainer" && child.expression.type === "TemplateLiteral"; + }).map(function (container) { + return container.expression; + }); + var quasis = templateLiterals.reduce(function (quasis, templateLiteral) { + return quasis.concat(templateLiteral.quasis); + }, []); + quasis.forEach(function (q) { + return delete q.value; + }); + } // CSS template literals in css prop + + + if (ast.type === "JSXAttribute" && ast.name.name === "css" && ast.value.type === "JSXExpressionContainer" && ast.value.expression.type === "TemplateLiteral") { + newObj.value.expression.quasis.forEach(function (q) { + return delete q.value; + }); + } // Angular Components: Inline HTML template and Inline CSS styles + + + var expression = ast.expression || ast.callee; + + if (ast.type === "Decorator" && expression.type === "CallExpression" && expression.callee.name === "Component" && expression.arguments.length === 1) { + var astProps = ast.expression.arguments[0].properties; + newObj.expression.arguments[0].properties.forEach(function (prop, index) { + var templateLiteral = null; + + switch (astProps[index].key.name) { + case "styles": + if (prop.value.type === "ArrayExpression") { + templateLiteral = prop.value.elements[0]; + } + + break; + + case "template": + if (prop.value.type === "TemplateLiteral") { + templateLiteral = prop.value; + } + + break; + } + + if (templateLiteral) { + templateLiteral.quasis.forEach(function (q) { + return delete q.value; + }); + } + }); + } // styled-components, graphql, markdown + + + if (ast.type === "TaggedTemplateExpression" && (ast.tag.type === "MemberExpression" || ast.tag.type === "Identifier" && (ast.tag.name === "gql" || ast.tag.name === "graphql" || ast.tag.name === "css" || ast.tag.name === "md" || ast.tag.name === "markdown" || ast.tag.name === "html") || ast.tag.type === "CallExpression")) { + newObj.quasi.quasis.forEach(function (quasi) { + return delete quasi.value; + }); + } + + if (ast.type === "TemplateLiteral") { + // This checks for a leading comment that is exactly `/* GraphQL */` + // In order to be in line with other implementations of this comment tag + // we will not trim the comment value and we will expect exactly one space on + // either side of the GraphQL string + // Also see ./embed.js + var hasLanguageComment = ast.leadingComments && ast.leadingComments.some(function (comment) { + return comment.type === "CommentBlock" && ["GraphQL", "HTML"].some(function (languageName) { + return comment.value === ` ${languageName} `; + }); + }); + + if (hasLanguageComment || parent.type === "CallExpression" && parent.callee.name === "graphql") { + newObj.quasis.forEach(function (quasi) { + return delete quasi.value; + }); + } + } +} + +var clean_1 = clean; + +var detectNewline = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + var newlines = str.match(/(?:\r?\n)/g) || []; + + if (newlines.length === 0) { + return null; + } + + var crlf = newlines.filter(function (el) { + return el === '\r\n'; + }).length; + var lf = newlines.length - crlf; + return crlf > lf ? '\r\n' : '\n'; + }; + + module.exports.graceful = function (str) { + return module.exports(str) || '\n'; + }; +}); + +var build$1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports.extract = extract; + exports.strip = strip; + exports.parse = parse; + exports.parseWithComments = parseWithComments; + exports.print = print; + + var _detectNewline; + + function _load_detectNewline() { + return _detectNewline = _interopRequireDefault(detectNewline); + } + + var _os; + + function _load_os() { + return _os = os; + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + /** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + + + var commentEndRe = /\*\/$/; + var commentStartRe = /^\/\*\*/; + var docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/; + var lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g; + var ltrimNewlineRe = /^(\r?\n)+/; + var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g; + var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; + var stringStartRe = /(\r?\n|^) *\* ?/g; + + function extract(contents) { + var match = contents.match(docblockRe); + return match ? match[0].trimLeft() : ''; + } + + function strip(contents) { + var match = contents.match(docblockRe); + return match && match[0] ? contents.substring(match[0].length) : contents; + } + + function parse(docblock) { + return parseWithComments(docblock).pragmas; + } + + function parseWithComments(docblock) { + var line = (0, (_detectNewline || _load_detectNewline()).default)(docblock) || (_os || _load_os()).EOL; + + docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives + + var prev = ''; + + while (prev !== docblock) { + prev = docblock; + docblock = docblock.replace(multilineRe, `${line}$1 $2${line}`); + } + + docblock = docblock.replace(ltrimNewlineRe, '').trimRight(); + var result = Object.create(null); + var comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').trimRight(); + var match; + + while (match = propertyRe.exec(docblock)) { + // strip linecomments from pragmas + var nextPragma = match[2].replace(lineCommentRe, ''); + + if (typeof result[match[1]] === 'string' || Array.isArray(result[match[1]])) { + result[match[1]] = [].concat(result[match[1]], nextPragma); + } else { + result[match[1]] = nextPragma; + } + } + + return { + comments, + pragmas: result + }; + } + + function print(_ref) { + var _ref$comments = _ref.comments; + var comments = _ref$comments === undefined ? '' : _ref$comments; + var _ref$pragmas = _ref.pragmas; + var pragmas = _ref$pragmas === undefined ? {} : _ref$pragmas; + + var line = (0, (_detectNewline || _load_detectNewline()).default)(comments) || (_os || _load_os()).EOL; + + var head = '/**'; + var start = ' *'; + var tail = ' */'; + var keys = Object.keys(pragmas); + var printedObject = keys.map(function (key) { + return printKeyValues(key, pragmas[key]); + }).reduce(function (arr, next) { + return arr.concat(next); + }, []).map(function (keyValue) { + return start + ' ' + keyValue + line; + }).join(''); + + if (!comments) { + if (keys.length === 0) { + return ''; + } + + if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) { + var value = pragmas[keys[0]]; + return `${head} ${printKeyValues(keys[0], value)[0]}${tail}`; + } + } + + var printedComments = comments.split(line).map(function (textLine) { + return `${start} ${textLine}`; + }).join(line) + line; + return head + line + (comments ? printedComments : '') + (comments && keys.length ? start + line : '') + printedObject + tail; + } + + function printKeyValues(key, valueOrArray) { + return [].concat(valueOrArray).map(function (value) { + return `@${key} ${value}`.trim(); + }); + } +}); +unwrapExports(build$1); + +function hasPragma(text) { + var pragmas = Object.keys(build$1.parse(build$1.extract(text))); + return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1; +} + +function insertPragma$1(text) { + var parsedDocblock = build$1.parseWithComments(build$1.extract(text)); + var pragmas = Object.assign({ + format: "" + }, parsedDocblock.pragmas); + var newDocblock = build$1.print({ + pragmas, + comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines + + }).replace(/(\r\n|\r)/g, "\n"); // normalise newlines (mitigate use of os.EOL by jest-docblock) + + var strippedText = build$1.strip(text); + var separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n"; + return newDocblock + separatingNewlines + strippedText; +} + +var pragma = { + hasPragma, + insertPragma: insertPragma$1 +}; + +var addLeadingComment$2 = utilShared.addLeadingComment; +var addTrailingComment$2 = utilShared.addTrailingComment; +var addDanglingComment$2 = utilShared.addDanglingComment; + +function handleOwnLineComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleMemberExpressionComments(enclosingNode, followingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleImportSpecifierComments(enclosingNode, comment) || handleForComments(enclosingNode, precedingNode, comment) || handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) || handleAssignmentPatternComments(enclosingNode, comment) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options)) { + return true; + } + + return false; +} + +function handleEndOfLineComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) || handleImportSpecifierComments(enclosingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleLabeledStatementComments(enclosingNode, comment) || handleCallExpressionComments(precedingNode, enclosingNode, comment) || handlePropertyComments(enclosingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleTypeAliasComments(enclosingNode, followingNode, comment) || handleVariableDeclaratorComments(enclosingNode, followingNode, comment)) { + return true; + } + + return false; +} + +function handleRemainingComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) || handleCommentInEmptyParens(text, enclosingNode, comment, options) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleCommentAfterArrowParams(text, enclosingNode, comment, options) || handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) || handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) || handleBreakAndContinueStatementComments(enclosingNode, comment)) { + return true; + } + + return false; +} + +function addBlockStatementFirstComment(node, comment) { + var body = node.body.filter(function (n) { + return n.type !== "EmptyStatement"; + }); + + if (body.length === 0) { + addDanglingComment$2(node, comment); + } else { + addLeadingComment$2(body[0], comment); + } +} + +function addBlockOrNotComment(node, comment) { + if (node.type === "BlockStatement") { + addBlockStatementFirstComment(node, comment); + } else { + addLeadingComment$2(node, comment); + } +} // There are often comments before the else clause of if statements like +// +// if (1) { ... } +// // comment +// else { ... } +// +// They are being attached as leading comments of the BlockExpression which +// is not well printed. What we want is to instead move the comment inside +// of the block and make it leadingComment of the first element of the block +// or dangling comment of the block if there is nothing inside +// +// if (1) { ... } +// else { +// // comment +// ... +// } + + +function handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + if (!enclosingNode || enclosingNode.type !== "IfStatement" || !followingNode) { + return false; + } // We unfortunately have no way using the AST or location of nodes to know + // if the comment is positioned before the condition parenthesis: + // if (a /* comment */) {} + // The only workaround I found is to look at the next character to see if + // it is a ). + + + var nextCharacter = util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd); + + if (nextCharacter === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Comments before `else`: + // - treat as trailing comments of the consequent, if it's a BlockStatement + // - treat as a dangling comment otherwise + + + if (precedingNode === enclosingNode.consequent && followingNode === enclosingNode.alternate) { + if (precedingNode.type === "BlockStatement") { + addTrailingComment$2(precedingNode, comment); + } else { + addDanglingComment$2(enclosingNode, comment); + } + + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + if (followingNode.type === "IfStatement") { + addBlockOrNotComment(followingNode.consequent, comment); + return true; + } // For comments positioned after the condition parenthesis in an if statement + // before the consequent without brackets on, such as + // if (a) /* comment */ true, + // we look at the next character to see if the following node + // is the consequent for the if statement + + + if (enclosingNode.consequent === followingNode) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + if (!enclosingNode || enclosingNode.type !== "WhileStatement" || !followingNode) { + return false; + } // We unfortunately have no way using the AST or location of nodes to know + // if the comment is positioned before the condition parenthesis: + // while (a /* comment */) {} + // The only workaround I found is to look at the next character to see if + // it is a ). + + + var nextCharacter = util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd); + + if (nextCharacter === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + return false; +} // Same as IfStatement but for TryStatement + + +function handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) { + if (!enclosingNode || enclosingNode.type !== "TryStatement" && enclosingNode.type !== "CatchClause" || !followingNode) { + return false; + } + + if (enclosingNode.type === "CatchClause" && precedingNode) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + if (followingNode.type === "TryStatement") { + addBlockOrNotComment(followingNode.finalizer, comment); + return true; + } + + if (followingNode.type === "CatchClause") { + addBlockOrNotComment(followingNode.body, comment); + return true; + } + + return false; +} + +function handleMemberExpressionComments(enclosingNode, followingNode, comment) { + if (enclosingNode && enclosingNode.type === "MemberExpression" && followingNode && followingNode.type === "Identifier") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) { + var isSameLineAsPrecedingNode = precedingNode && !util$1.hasNewlineInRange(text, options.locEnd(precedingNode), options.locStart(comment)); + + if ((!precedingNode || !isSameLineAsPrecedingNode) && enclosingNode && enclosingNode.type === "ConditionalExpression" && followingNode) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ObjectProperty" || enclosingNode.type === "Property") && enclosingNode.shorthand && enclosingNode.key === precedingNode && enclosingNode.value.type === "AssignmentPattern") { + addTrailingComment$2(enclosingNode.value.left, comment); + return true; + } + + return false; +} + +function handleClassComments(enclosingNode, precedingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ClassDeclaration" || enclosingNode.type === "ClassExpression") && enclosingNode.decorators && enclosingNode.decorators.length > 0 && !(followingNode && followingNode.type === "Decorator")) { + if (!enclosingNode.decorators || enclosingNode.decorators.length === 0) { + addLeadingComment$2(enclosingNode, comment); + } else { + addTrailingComment$2(enclosingNode.decorators[enclosingNode.decorators.length - 1], comment); + } + + return true; + } + + return false; +} + +function handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) { + // This is only needed for estree parsers (flow, typescript) to attach + // after a method name: + // obj = { fn /*comment*/() {} }; + if (enclosingNode && precedingNode && (enclosingNode.type === "Property" || enclosingNode.type === "MethodDefinition") && precedingNode.type === "Identifier" && enclosingNode.key === precedingNode && // special Property case: { key: /*comment*/(value) }; + // comment should be attached to value instead of key + util$1.getNextNonSpaceNonCommentCharacter(text, precedingNode, options.locEnd) !== ":") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Print comments between decorators and class methods as a trailing comment + // on the decorator node instead of the method node + + + if (precedingNode && enclosingNode && precedingNode.type === "Decorator" && (enclosingNode.type === "ClassMethod" || enclosingNode.type === "ClassProperty" || enclosingNode.type === "TSAbstractClassProperty" || enclosingNode.type === "TSAbstractMethodDefinition" || enclosingNode.type === "MethodDefinition")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) { + if (util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== "(") { + return false; + } + + if (precedingNode && enclosingNode && (enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ClassMethod" || enclosingNode.type === "MethodDefinition" || enclosingNode.type === "ObjectMethod")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleCommentAfterArrowParams(text, enclosingNode, comment, options) { + if (!(enclosingNode && enclosingNode.type === "ArrowFunctionExpression")) { + return false; + } + + var index = utilShared.getNextNonSpaceNonCommentCharacterIndex(text, comment, options); + + if (text.substr(index, 2) === "=>") { + addDanglingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleCommentInEmptyParens(text, enclosingNode, comment, options) { + if (util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== ")") { + return false; + } // Only add dangling comments to fix the case when no params are present, + // i.e. a function without any argument. + + + if (enclosingNode && ((enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ArrowFunctionExpression" && (enclosingNode.body.type !== "CallExpression" || enclosingNode.body.arguments.length === 0) || enclosingNode.type === "ClassMethod" || enclosingNode.type === "ObjectMethod") && enclosingNode.params.length === 0 || (enclosingNode.type === "CallExpression" || enclosingNode.type === "NewExpression") && enclosingNode.arguments.length === 0)) { + addDanglingComment$2(enclosingNode, comment); + return true; + } + + if (enclosingNode && enclosingNode.type === "MethodDefinition" && enclosingNode.value.params.length === 0) { + addDanglingComment$2(enclosingNode.value, comment); + return true; + } + + return false; +} + +function handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + // Type definitions functions + if (precedingNode && precedingNode.type === "FunctionTypeParam" && enclosingNode && enclosingNode.type === "FunctionTypeAnnotation" && followingNode && followingNode.type !== "FunctionTypeParam") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Real functions + + + if (precedingNode && (precedingNode.type === "Identifier" || precedingNode.type === "AssignmentPattern") && enclosingNode && (enclosingNode.type === "ArrowFunctionExpression" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "ObjectMethod" || enclosingNode.type === "ClassMethod") && util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (enclosingNode && enclosingNode.type === "FunctionDeclaration" && followingNode && followingNode.type === "BlockStatement") { + var functionParamRightParenIndex = function () { + if (enclosingNode.params.length !== 0) { + return util$1.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(util$1.getLast(enclosingNode.params))); + } + + var functionParamLeftParenIndex = util$1.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(enclosingNode.id)); + return util$1.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, functionParamLeftParenIndex + 1); + }(); + + if (options.locStart(comment) > functionParamRightParenIndex) { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + } + + return false; +} + +function handleImportSpecifierComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "ImportSpecifier") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleLabeledStatementComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "LabeledStatement") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleBreakAndContinueStatementComments(enclosingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ContinueStatement" || enclosingNode.type === "BreakStatement") && !enclosingNode.label) { + addTrailingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleCallExpressionComments(precedingNode, enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "CallExpression" && precedingNode && enclosingNode.callee === precedingNode && enclosingNode.arguments.length > 0) { + addLeadingComment$2(enclosingNode.arguments[0], comment); + return true; + } + + return false; +} + +function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handlePropertyComments(enclosingNode, comment) { + if (enclosingNode && (enclosingNode.type === "Property" || enclosingNode.type === "ObjectProperty")) { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleOnlyComments(enclosingNode, ast, comment, isLastComment) { + // With Flow the enclosingNode is undefined so use the AST instead. + if (ast && ast.body && ast.body.length === 0) { + if (isLastComment) { + addDanglingComment$2(ast, comment); + } else { + addLeadingComment$2(ast, comment); + } + + return true; + } else if (enclosingNode && enclosingNode.type === "Program" && enclosingNode.body.length === 0 && enclosingNode.directives && enclosingNode.directives.length === 0) { + if (isLastComment) { + addDanglingComment$2(enclosingNode, comment); + } else { + addLeadingComment$2(enclosingNode, comment); + } + + return true; + } + + return false; +} + +function handleForComments(enclosingNode, precedingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ForInStatement" || enclosingNode.type === "ForOfStatement")) { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) { + if (precedingNode && precedingNode.type === "ImportSpecifier" && enclosingNode && enclosingNode.type === "ImportDeclaration" && util$1.hasNewline(text, options.locEnd(comment))) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleAssignmentPatternComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "AssignmentPattern") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleTypeAliasComments(enclosingNode, followingNode, comment) { + if (enclosingNode && enclosingNode.type === "TypeAlias") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleVariableDeclaratorComments(enclosingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "VariableDeclarator" || enclosingNode.type === "AssignmentExpression") && followingNode && (followingNode.type === "ObjectExpression" || followingNode.type === "ArrayExpression" || followingNode.type === "TemplateLiteral" || followingNode.type === "TaggedTemplateExpression")) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) { + if (!enclosingNode || enclosingNode.type !== "TSMappedType") { + return false; + } + + if (followingNode && followingNode.type === "TSTypeParameter" && followingNode.name) { + addLeadingComment$2(followingNode.name, comment); + return true; + } + + if (precedingNode && precedingNode.type === "TSTypeParameter" && precedingNode.constraint) { + addTrailingComment$2(precedingNode.constraint, comment); + return true; + } + + return false; +} + +function isBlockComment(comment) { + return comment.type === "Block" || comment.type === "CommentBlock"; +} + +var comments$3 = { + handleOwnLineComment, + handleEndOfLineComment, + handleRemainingComment, + isBlockComment +}; + +// Flow annotation comments cannot be split across lines. For example: +// +// (this /* +// : any */).foo = 5; +// +// is not picked up by Flow (see https://github.com/facebook/flow/issues/7050), so +// removing the newline would create a type annotation that the user did not intend +// to create. + +var NON_LINE_TERMINATING_WHITE_SPACE = "(?:(?=.)\\s)"; +var FLOW_SHORTHAND_ANNOTATION = new RegExp(`^${NON_LINE_TERMINATING_WHITE_SPACE}*:`); +var FLOW_ANNOTATION = new RegExp(`^${NON_LINE_TERMINATING_WHITE_SPACE}*::`); + +function hasFlowShorthandAnnotationComment$2(node) { + // https://flow.org/en/docs/types/comments/ + // Syntax example: const r = new (window.Request /*: Class */)(""); + return node.extra && node.extra.parenthesized && node.trailingComments && node.trailingComments[0].value.match(FLOW_SHORTHAND_ANNOTATION); +} + +function hasFlowAnnotationComment$1(comments) { + return comments && comments[0].value.match(FLOW_ANNOTATION); +} + +function hasNode$1(node, fn) { + if (!node || typeof node !== "object") { + return false; + } + + if (Array.isArray(node)) { + return node.some(function (value) { + return hasNode$1(value, fn); + }); + } + + var result = fn(node); + return typeof result === "boolean" ? result : Object.keys(node).some(function (key) { + return hasNode$1(node[key], fn); + }); +} + +var utils$4 = { + hasNode: hasNode$1, + hasFlowShorthandAnnotationComment: hasFlowShorthandAnnotationComment$2, + hasFlowAnnotationComment: hasFlowAnnotationComment$1 +}; + +var hasFlowShorthandAnnotationComment$1 = utils$4.hasFlowShorthandAnnotationComment; + +function hasClosureCompilerTypeCastComment(text, path$$1, locStart, locEnd) { + // https://github.com/google/closure-compiler/wiki/Annotating-Types#type-casts + // Syntax example: var x = /** @type {string} */ (fruit); + var n = path$$1.getValue(); + return util$1.getNextNonSpaceNonCommentCharacter(text, n, locEnd) === ")" && (hasTypeCastComment(n) || hasAncestorTypeCastComment(0)); // for sub-item: /** @type {array} */ (numberOrString).map(x => x); + + function hasAncestorTypeCastComment(index) { + var ancestor = path$$1.getParentNode(index); + return ancestor && util$1.getNextNonSpaceNonCommentCharacter(text, ancestor, locEnd) !== ")" && /^[\s(]*$/.test(text.slice(locStart(ancestor), locStart(n))) ? hasTypeCastComment(ancestor) || hasAncestorTypeCastComment(index + 1) : false; + } + + function hasTypeCastComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.leading && comments$3.isBlockComment(comment) && comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/) && util$1.getNextNonSpaceNonCommentCharacter(text, comment, locEnd) === "("; + }); + } +} + +function needsParens(path$$1, options) { + var parent = path$$1.getParentNode(); + + if (!parent) { + return false; + } + + var name = path$$1.getName(); + var node = path$$1.getNode(); // If the value of this path is some child of a Node and not a Node + // itself, then it doesn't need parentheses. Only Node objects (in + // fact, only Expression nodes) need parentheses. + + if (path$$1.getValue() !== node) { + return false; + } // Only statements don't need parentheses. + + + if (isStatement(node)) { + return false; + } // Closure compiler requires that type casted expressions to be surrounded by + // parentheses. + + + if (hasClosureCompilerTypeCastComment(options.originalText, path$$1, options.locStart, options.locEnd)) { + return true; + } + + if ( // Preserve parens if we have a Flow annotation comment, unless we're using the Flow + // parser. The Flow parser turns Flow comments into type annotation nodes in its + // AST, which we handle separately. + options.parser !== "flow" && hasFlowShorthandAnnotationComment$1(path$$1.getValue())) { + return true; + } // Identifiers never need parentheses. + + + if (node.type === "Identifier") { + return false; + } + + if (parent.type === "ParenthesizedExpression") { + return false; + } // Add parens around the extends clause of a class. It is needed for almost + // all expressions. + + + if ((parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node && (node.type === "ArrowFunctionExpression" || node.type === "AssignmentExpression" || node.type === "AwaitExpression" || node.type === "BinaryExpression" || node.type === "ConditionalExpression" || node.type === "LogicalExpression" || node.type === "NewExpression" || node.type === "ObjectExpression" || node.type === "ParenthesizedExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "UnaryExpression" || node.type === "UpdateExpression" || node.type === "YieldExpression")) { + return true; + } + + if (parent.type === "ArrowFunctionExpression" && parent.body === node && node.type !== "SequenceExpression" && // these have parens added anyway + util$1.startsWithNoLookaheadToken(node, + /* forbidFunctionClassAndDoExpr */ + false) || parent.type === "ExpressionStatement" && util$1.startsWithNoLookaheadToken(node, + /* forbidFunctionClassAndDoExpr */ + true)) { + return true; + } + + switch (node.type) { + case "CallExpression": + { + var firstParentNotMemberExpression = parent; + var i = 0; + + while (firstParentNotMemberExpression && firstParentNotMemberExpression.type === "MemberExpression") { + firstParentNotMemberExpression = path$$1.getParentNode(++i); + } + + if (firstParentNotMemberExpression.type === "NewExpression" && firstParentNotMemberExpression.callee === path$$1.getParentNode(i - 1)) { + return true; + } + + if (parent.type === "BindExpression" && parent.callee === node) { + return true; + } + + return false; + } + + case "SpreadElement": + case "SpreadProperty": + return parent.type === "MemberExpression" && name === "object" && parent.object === node; + + case "UpdateExpression": + if (parent.type === "UnaryExpression") { + return node.prefix && (node.operator === "++" && parent.operator === "+" || node.operator === "--" && parent.operator === "-"); + } + + // else fallthrough + + case "UnaryExpression": + switch (parent.type) { + case "UnaryExpression": + return node.operator === parent.operator && (node.operator === "+" || node.operator === "-"); + + case "BindExpression": + return true; + + case "MemberExpression": + return name === "object" && parent.object === node; + + case "TaggedTemplateExpression": + return true; + + case "NewExpression": + case "CallExpression": + return name === "callee" && parent.callee === node; + + case "BinaryExpression": + return parent.operator === "**" && name === "left"; + + case "TSNonNullExpression": + return true; + + default: + return false; + } + + case "BinaryExpression": + { + if (parent.type === "UpdateExpression") { + return true; + } + + var isLeftOfAForStatement = function isLeftOfAForStatement(node) { + var i = 0; + + while (node) { + var _parent = path$$1.getParentNode(i++); + + if (!_parent) { + return false; + } + + if (_parent.type === "ForStatement" && _parent.init === node) { + return true; + } + + node = _parent; + } + + return false; + }; + + if (node.operator === "in" && isLeftOfAForStatement(node)) { + return true; + } + } + // fallthrough + + case "TSTypeAssertionExpression": + case "TSAsExpression": + case "LogicalExpression": + switch (parent.type) { + case "ConditionalExpression": + return node.type === "TSAsExpression"; + + case "CallExpression": + case "NewExpression": + return name === "callee" && parent.callee === node; + + case "ClassExpression": + case "ClassDeclaration": + case "TSAbstractClassDeclaration": + return name === "superClass" && parent.superClass === node; + + case "TSTypeAssertionExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BindExpression": + case "AwaitExpression": + case "TSAsExpression": + case "TSNonNullExpression": + case "UpdateExpression": + return true; + + case "MemberExpression": + return name === "object" && parent.object === node; + + case "AssignmentExpression": + return parent.left === node && (node.type === "TSTypeAssertionExpression" || node.type === "TSAsExpression"); + + case "Decorator": + return parent.expression === node && (node.type === "TSTypeAssertionExpression" || node.type === "TSAsExpression"); + + case "BinaryExpression": + case "LogicalExpression": + { + if (!node.operator && node.type !== "TSTypeAssertionExpression") { + return true; + } + + var po = parent.operator; + var pp = util$1.getPrecedence(po); + var no = node.operator; + var np = util$1.getPrecedence(no); + + if (pp > np) { + return true; + } + + if ((po === "||" || po === "??") && no === "&&") { + return true; + } + + if (pp === np && name === "right") { + assert.strictEqual(parent.right, node); + return true; + } + + if (pp === np && !util$1.shouldFlatten(po, no)) { + return true; + } + + if (pp < np && no === "%") { + return po === "+" || po === "-"; + } // Add parenthesis when working with bitwise operators + // It's not stricly needed but helps with code understanding + + + if (util$1.isBitwiseOperator(po)) { + return true; + } + + return false; + } + + default: + return false; + } + + case "TSParenthesizedType": + { + var grandParent = path$$1.getParentNode(1); + + if ((parent.type === "TSTypeParameter" || parent.type === "TypeParameter" || parent.type === "VariableDeclarator" || parent.type === "TSTypeAnnotation" || parent.type === "GenericTypeAnnotation" || parent.type === "TSTypeReference") && node.typeAnnotation.type === "TSTypeAnnotation" && node.typeAnnotation.typeAnnotation.type !== "TSFunctionType" && grandParent.type !== "TSTypeOperator" && grandParent.type !== "TSOptionalType") { + return false; + } // Delegate to inner TSParenthesizedType + + + if (node.typeAnnotation.type === "TSParenthesizedType") { + return false; + } + + return true; + } + + case "SequenceExpression": + switch (parent.type) { + case "ReturnStatement": + return false; + + case "ForStatement": + // Although parentheses wouldn't hurt around sequence + // expressions in the head of for loops, traditional style + // dictates that e.g. i++, j++ should not be wrapped with + // parentheses. + return false; + + case "ExpressionStatement": + return name !== "expression"; + + case "ArrowFunctionExpression": + // We do need parentheses, but SequenceExpressions are handled + // specially when printing bodies of arrow functions. + return name !== "body"; + + default: + // Otherwise err on the side of overparenthesization, adding + // explicit exceptions above if this proves overzealous. + return true; + } + + case "YieldExpression": + if (parent.type === "UnaryExpression" || parent.type === "AwaitExpression" || parent.type === "TSAsExpression" || parent.type === "TSNonNullExpression") { + return true; + } + + // else fallthrough + + case "AwaitExpression": + switch (parent.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "BinaryExpression": + case "LogicalExpression": + case "SpreadElement": + case "SpreadProperty": + case "TSAsExpression": + case "TSNonNullExpression": + case "BindExpression": + return true; + + case "MemberExpression": + return parent.object === node; + + case "NewExpression": + case "CallExpression": + return parent.callee === node; + + case "ConditionalExpression": + return parent.test === node; + + default: + return false; + } + + case "ArrayTypeAnnotation": + return parent.type === "NullableTypeAnnotation"; + + case "IntersectionTypeAnnotation": + case "UnionTypeAnnotation": + return parent.type === "ArrayTypeAnnotation" || parent.type === "NullableTypeAnnotation" || parent.type === "IntersectionTypeAnnotation" || parent.type === "UnionTypeAnnotation"; + + case "NullableTypeAnnotation": + return parent.type === "ArrayTypeAnnotation"; + + case "FunctionTypeAnnotation": + { + var ancestor = parent.type === "NullableTypeAnnotation" ? path$$1.getParentNode(1) : parent; + return ancestor.type === "UnionTypeAnnotation" || ancestor.type === "IntersectionTypeAnnotation" || ancestor.type === "ArrayTypeAnnotation" || // We should check ancestor's parent to know whether the parentheses + // are really needed, but since ??T doesn't make sense this check + // will almost never be true. + ancestor.type === "NullableTypeAnnotation"; + } + + case "StringLiteral": + case "NumericLiteral": + case "Literal": + if (typeof node.value === "string" && parent.type === "ExpressionStatement" && ( // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2 + // See corresponding workaround in printer.js case: "Literal" + options.parser !== "typescript" && !parent.directive || options.parser === "typescript" && options.originalText.substr(options.locStart(node) - 1, 1) === "(")) { + // To avoid becoming a directive + var _grandParent = path$$1.getParentNode(1); + + return _grandParent.type === "Program" || _grandParent.type === "BlockStatement"; + } + + return parent.type === "MemberExpression" && typeof node.value === "number" && name === "object" && parent.object === node; + + case "AssignmentExpression": + { + var _grandParent2 = path$$1.getParentNode(1); + + if (parent.type === "ArrowFunctionExpression" && parent.body === node) { + return true; + } else if (parent.type === "ClassProperty" && parent.key === node && parent.computed) { + return false; + } else if (parent.type === "TSPropertySignature" && parent.name === node) { + return false; + } else if (parent.type === "ForStatement" && (parent.init === node || parent.update === node)) { + return false; + } else if (parent.type === "ExpressionStatement") { + return node.left.type === "ObjectPattern"; + } else if (parent.type === "TSPropertySignature" && parent.key === node) { + return false; + } else if (parent.type === "AssignmentExpression") { + return false; + } else if (parent.type === "SequenceExpression" && _grandParent2 && _grandParent2.type === "ForStatement" && (_grandParent2.init === parent || _grandParent2.update === parent)) { + return false; + } else if (parent.type === "Property" && parent.value === node) { + return false; + } else if (parent.type === "NGChainedExpression") { + return false; + } + + return true; + } + + case "ConditionalExpression": + switch (parent.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + case "ExportDefaultDeclaration": + case "AwaitExpression": + case "JSXSpreadAttribute": + case "TSTypeAssertionExpression": + case "TypeCastExpression": + case "TSAsExpression": + case "TSNonNullExpression": + case "OptionalMemberExpression": + return true; + + case "NewExpression": + case "CallExpression": + return name === "callee" && parent.callee === node; + + case "ConditionalExpression": + return name === "test" && parent.test === node; + + case "MemberExpression": + return name === "object" && parent.object === node; + + default: + return false; + } + + case "FunctionExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee"; + // Not strictly necessary, but it's clearer to the reader if IIFEs are wrapped in parentheses. + + case "TaggedTemplateExpression": + return true; + // This is basically a kind of IIFE. + + case "ExportDefaultDeclaration": + return true; + + default: + return false; + } + + case "ArrowFunctionExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee"; + + case "NewExpression": + return name === "callee"; + + case "MemberExpression": + return name === "object"; + + case "TSAsExpression": + case "BindExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "BinaryExpression": + case "AwaitExpression": + case "TSTypeAssertionExpression": + return true; + + case "ConditionalExpression": + return name === "test"; + + default: + return false; + } + + case "ClassExpression": + return parent.type === "ExportDefaultDeclaration"; + + case "OptionalMemberExpression": + return parent.type === "MemberExpression"; + + case "MemberExpression": + if (parent.type === "BindExpression" && name === "callee" && parent.callee === node) { + var object = node.object; + + while (object) { + if (object.type === "CallExpression") { + return true; + } + + if (object.type !== "MemberExpression" && object.type !== "BindExpression") { + break; + } + + object = object.object; + } + } + + return false; + + case "BindExpression": + if (parent.type === "BindExpression" && name === "callee" && parent.callee === node || parent.type === "MemberExpression") { + return true; + } + + return false; + + case "NGPipeExpression": + if (parent.type === "NGRoot" || parent.type === "ObjectProperty" || parent.type === "ArrayExpression" || (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && parent.arguments[name] === node || parent.type === "NGPipeExpression" && name === "right" || parent.type === "MemberExpression" && name === "property" || parent.type === "AssignmentExpression") { + return false; + } + + return true; + } + + return false; +} + +function isStatement(node) { + return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "ForAwaitStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || node.type === "FunctionDeclaration" || node.type === "IfStatement" || node.type === "ImportDeclaration" || node.type === "InterfaceDeclaration" || node.type === "LabeledStatement" || node.type === "MethodDefinition" || node.type === "ReturnStatement" || node.type === "SwitchStatement" || node.type === "ThrowStatement" || node.type === "TryStatement" || node.type === "TSAbstractClassDeclaration" || node.type === "TSEnumDeclaration" || node.type === "TSImportEqualsDeclaration" || node.type === "TSInterfaceDeclaration" || node.type === "TSModuleDeclaration" || node.type === "TSNamespaceExportDeclaration" || node.type === "TypeAlias" || node.type === "VariableDeclaration" || node.type === "WhileStatement" || node.type === "WithStatement"; +} + +var needsParens_1 = needsParens; + +var _require$$0$builders$2 = doc.builders; +var concat$6 = _require$$0$builders$2.concat; +var join$4 = _require$$0$builders$2.join; +var line$4 = _require$$0$builders$2.line; + +function printHtmlBinding$1(path$$1, options, print) { + var node = path$$1.getValue(); + + if (options.__onHtmlBindingRoot && path$$1.getName() === null) { + options.__onHtmlBindingRoot(node); + } + + if (node.type !== "File") { + return; + } + + if (options.__isVueForBindingLeft) { + return path$$1.call(function (functionDeclarationPath) { + var _functionDeclarationP = functionDeclarationPath.getValue(), + params = _functionDeclarationP.params; + + return concat$6([params.length > 1 ? "(" : "", join$4(concat$6([",", line$4]), functionDeclarationPath.map(print, "params")), params.length > 1 ? ")" : ""]); + }, "program", "body", 0); + } + + if (options.__isVueSlotScope) { + return path$$1.call(function (functionDeclarationPath) { + return join$4(concat$6([",", line$4]), functionDeclarationPath.map(print, "params")); + }, "program", "body", 0); + } +} + +var htmlBinding = { + printHtmlBinding: printHtmlBinding$1 +}; + +function preprocess(ast, options) { + switch (options.parser) { + case "json": + case "json5": + case "json-stringify": + case "__js_expression": + case "__vue_expression": + return Object.assign({}, ast, { + type: options.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot", + node: ast, + comments: [] + }); + + default: + return ast; + } +} + +var preprocess_1 = preprocess; + +var getParentExportDeclaration$1 = util$1.getParentExportDeclaration; +var isExportDeclaration$1 = util$1.isExportDeclaration; +var shouldFlatten$1 = util$1.shouldFlatten; +var getNextNonSpaceNonCommentCharacter$1 = util$1.getNextNonSpaceNonCommentCharacter; +var hasNewline$2 = util$1.hasNewline; +var hasNewlineInRange$1 = util$1.hasNewlineInRange; +var getLast$4 = util$1.getLast; +var getStringWidth$2 = util$1.getStringWidth; +var printString$1 = util$1.printString; +var printNumber$1 = util$1.printNumber; +var hasIgnoreComment$1 = util$1.hasIgnoreComment; +var skipWhitespace$1 = util$1.skipWhitespace; +var hasNodeIgnoreComment$1 = util$1.hasNodeIgnoreComment; +var getPenultimate$1 = util$1.getPenultimate; +var startsWithNoLookaheadToken$1 = util$1.startsWithNoLookaheadToken; +var getIndentSize$1 = util$1.getIndentSize; +var matchAncestorTypes$1 = util$1.matchAncestorTypes; +var getPreferredQuote$1 = util$1.getPreferredQuote; +var isNextLineEmpty$2 = utilShared.isNextLineEmpty; +var isNextLineEmptyAfterIndex$1 = utilShared.isNextLineEmptyAfterIndex; +var getNextNonSpaceNonCommentCharacterIndex$2 = utilShared.getNextNonSpaceNonCommentCharacterIndex; +var isIdentifierName = utils$2.keyword.isIdentifierNameES5; +var insertPragma = pragma.insertPragma; +var printHtmlBinding = htmlBinding.printHtmlBinding; +var hasNode = utils$4.hasNode; +var hasFlowAnnotationComment = utils$4.hasFlowAnnotationComment; +var hasFlowShorthandAnnotationComment = utils$4.hasFlowShorthandAnnotationComment; +var _require$$6$builders = doc.builders; +var concat$4 = _require$$6$builders.concat; +var join$2 = _require$$6$builders.join; +var line$3 = _require$$6$builders.line; +var hardline$3 = _require$$6$builders.hardline; +var softline$1 = _require$$6$builders.softline; +var literalline$1 = _require$$6$builders.literalline; +var group$1 = _require$$6$builders.group; +var indent$2 = _require$$6$builders.indent; +var align$1 = _require$$6$builders.align; +var conditionalGroup$1 = _require$$6$builders.conditionalGroup; +var fill$2 = _require$$6$builders.fill; +var ifBreak$1 = _require$$6$builders.ifBreak; +var breakParent$2 = _require$$6$builders.breakParent; +var lineSuffixBoundary$1 = _require$$6$builders.lineSuffixBoundary; +var addAlignmentToDoc$2 = _require$$6$builders.addAlignmentToDoc; +var dedent$2 = _require$$6$builders.dedent; +var _require$$6$utils = doc.utils; +var willBreak$1 = _require$$6$utils.willBreak; +var isLineNext$1 = _require$$6$utils.isLineNext; +var isEmpty$1 = _require$$6$utils.isEmpty; +var removeLines$1 = _require$$6$utils.removeLines; +var printDocToString$2 = doc.printer.printDocToString; +var uid = 0; + +function shouldPrintComma(options, level) { + level = level || "es5"; + + switch (options.trailingComma) { + case "all": + if (level === "all") { + return true; + } + + // fallthrough + + case "es5": + if (level === "es5") { + return true; + } + + // fallthrough + + case "none": + default: + return false; + } +} + +function genericPrint(path$$1, options, printPath, args) { + var node = path$$1.getValue(); + var needsParens = false; + var linesWithoutParens = printPathNoParens(path$$1, options, printPath, args); + + if (!node || isEmpty$1(linesWithoutParens)) { + return linesWithoutParens; + } + + var parentExportDecl = getParentExportDeclaration$1(path$$1); + var decorators = []; + + if (node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "TSAbstractClassProperty" || node.type === "ClassPrivateProperty") {// their decorators are handled themselves + } else if (node.decorators && node.decorators.length > 0 && // If the parent node is an export declaration and the decorator + // was written before the export, the export will be responsible + // for printing the decorators. + !(parentExportDecl && options.locStart(parentExportDecl, { + ignoreDecorators: true + }) > options.locStart(node.decorators[0]))) { + var shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators(node, options); + var separator = shouldBreak ? hardline$3 : line$3; + path$$1.each(function (decoratorPath) { + var decorator = decoratorPath.getValue(); + + if (decorator.expression) { + decorator = decorator.expression; + } else { + decorator = decorator.callee; + } + + decorators.push(printPath(decoratorPath), separator); + }, "decorators"); + + if (parentExportDecl) { + decorators.unshift(hardline$3); + } + } else if (isExportDeclaration$1(node) && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0 && // Only print decorators here if they were written before the export, + // otherwise they are printed by the node.declaration + options.locStart(node, { + ignoreDecorators: true + }) > options.locStart(node.declaration.decorators[0])) { + // Export declarations are responsible for printing any decorators + // that logically apply to node.declaration. + path$$1.each(function (decoratorPath) { + var decorator = decoratorPath.getValue(); + var prefix = decorator.type === "Decorator" ? "" : "@"; + decorators.push(prefix, printPath(decoratorPath), hardline$3); + }, "declaration", "decorators"); + } else { + // Nodes with decorators can't have parentheses, so we can avoid + // computing pathNeedsParens() except in this case. + needsParens = needsParens_1(path$$1, options); + } + + var parts = []; + + if (needsParens) { + parts.unshift("("); + } + + parts.push(linesWithoutParens); + + if (needsParens) { + var _node = path$$1.getValue(); + + if (hasFlowShorthandAnnotationComment(_node)) { + parts.push(" /*"); + parts.push(_node.trailingComments[0].value.trimLeft()); + parts.push("*/"); + _node.trailingComments[0].printed = true; + } + + parts.push(")"); + } + + if (decorators.length > 0) { + return group$1(concat$4(decorators.concat(parts))); + } + + return concat$4(parts); +} + +function hasNewlineBetweenOrAfterDecorators(node, options) { + return hasNewlineInRange$1(options.originalText, options.locStart(node.decorators[0]), options.locEnd(getLast$4(node.decorators))) || hasNewline$2(options.originalText, options.locEnd(getLast$4(node.decorators))); +} + +function printDecorators(path$$1, options, print) { + var node = path$$1.getValue(); + return group$1(concat$4([join$2(line$3, path$$1.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators(node, options) ? hardline$3 : line$3])); +} + +function hasPrettierIgnore(path$$1) { + return hasIgnoreComment$1(path$$1) || hasJsxIgnoreComment(path$$1); +} + +function hasJsxIgnoreComment(path$$1) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + + if (!parent || !node || !isJSXNode(node) || !isJSXNode(parent)) { + return false; + } // Lookup the previous sibling, ignoring any empty JSXText elements + + + var index = parent.children.indexOf(node); + var prevSibling = null; + + for (var i = index; i > 0; i--) { + var candidate = parent.children[i - 1]; + + if (candidate.type === "JSXText" && !isMeaningfulJSXText(candidate)) { + continue; + } + + prevSibling = candidate; + break; + } + + return prevSibling && prevSibling.type === "JSXExpressionContainer" && prevSibling.expression.type === "JSXEmptyExpression" && prevSibling.expression.comments && prevSibling.expression.comments.find(function (comment) { + return comment.value.trim() === "prettier-ignore"; + }); +} +/** + * The following is the shared logic for + * ternary operators, namely ConditionalExpression + * and TSConditionalType + * @typedef {Object} OperatorOptions + * @property {() => Array} beforeParts - Parts to print before the `?`. + * @property {(breakClosingParen: boolean) => Array} afterParts - Parts to print after the conditional expression. + * @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode. + * @property {string} conditionalNodeType - The type of the conditional expression node, ie "ConditionalExpression" or "TSConditionalType". + * @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg "consequent". + * @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg "alternate". + * @property {string} testNodePropertyName - The property at which the test node can be found on the main node, eg "test". + * @property {boolean} breakNested - Whether to break all nested ternaries when one breaks. + * @param {FastPath} path - The path to the ConditionalExpression/TSConditionalType node. + * @param {Options} options - Prettier options + * @param {Function} print - Print function to call recursively + * @param {OperatorOptions} operatorOptions + * @returns Doc + */ + + +function printTernaryOperator(path$$1, options, print, operatorOptions) { + var node = path$$1.getValue(); + var testNode = node[operatorOptions.testNodePropertyName]; + var consequentNode = node[operatorOptions.consequentNodePropertyName]; + var alternateNode = node[operatorOptions.alternateNodePropertyName]; + var parts = []; // We print a ConditionalExpression in either "JSX mode" or "normal mode". + // See tests/jsx/conditional-expression.js for more info. + + var jsxMode = false; + var parent = path$$1.getParentNode(); + var forceNoIndent = parent.type === operatorOptions.conditionalNodeType; // Find the outermost non-ConditionalExpression parent, and the outermost + // ConditionalExpression parent. We'll use these to determine if we should + // print in JSX mode. + + var currentParent; + var previousParent; + var i = 0; + + do { + previousParent = currentParent || node; + currentParent = path$$1.getParentNode(i); + i++; + } while (currentParent && currentParent.type === operatorOptions.conditionalNodeType); + + var firstNonConditionalParent = currentParent || parent; + var lastConditionalParent = previousParent; + + if (operatorOptions.shouldCheckJsx && (isJSXNode(testNode) || isJSXNode(consequentNode) || isJSXNode(alternateNode) || conditionalExpressionChainContainsJSX(lastConditionalParent))) { + jsxMode = true; + forceNoIndent = true; // Even though they don't need parens, we wrap (almost) everything in + // parens when using ?: within JSX, because the parens are analogous to + // curly braces in an if statement. + + var wrap = function wrap(doc$$2) { + return concat$4([ifBreak$1("(", ""), indent$2(concat$4([softline$1, doc$$2])), softline$1, ifBreak$1(")", "")]); + }; // The only things we don't wrap are: + // * Nested conditional expressions in alternates + // * null + + + var isNull = function isNull(node) { + return node.type === "NullLiteral" || node.type === "Literal" && node.value === null; + }; + + parts.push(" ? ", isNull(consequentNode) ? path$$1.call(print, operatorOptions.consequentNodePropertyName) : wrap(path$$1.call(print, operatorOptions.consequentNodePropertyName)), " : ", alternateNode.type === operatorOptions.conditionalNodeType || isNull(alternateNode) ? path$$1.call(print, operatorOptions.alternateNodePropertyName) : wrap(path$$1.call(print, operatorOptions.alternateNodePropertyName))); + } else { + // normal mode + var part = concat$4([line$3, "? ", consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$1("", "(") : "", align$1(2, path$$1.call(print, operatorOptions.consequentNodePropertyName)), consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$1("", ")") : "", line$3, ": ", alternateNode.type === operatorOptions.conditionalNodeType ? path$$1.call(print, operatorOptions.alternateNodePropertyName) : align$1(2, path$$1.call(print, operatorOptions.alternateNodePropertyName))]); + parts.push(parent.type !== operatorOptions.conditionalNodeType || parent[operatorOptions.alternateNodePropertyName] === node ? part : options.useTabs ? dedent$2(indent$2(part)) : align$1(Math.max(0, options.tabWidth - 2), part)); + } // We want a whole chain of ConditionalExpressions to all + // break if any of them break. That means we should only group around the + // outer-most ConditionalExpression. + + + var maybeGroup = function maybeGroup(doc$$2) { + return operatorOptions.breakNested ? parent === firstNonConditionalParent ? group$1(doc$$2) : doc$$2 : group$1(doc$$2); + }; // Break the closing paren to keep the chain right after it: + // (a + // ? b + // : c + // ).call() + + + var breakClosingParen = !jsxMode && (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && !parent.computed; + return maybeGroup(concat$4([].concat(function (testDoc) { + return ( + /** + * a + * ? b + * : multiline + * test + * node + * ^^ align(2) + * ? d + * : e + */ + parent.type === operatorOptions.conditionalNodeType && parent[operatorOptions.alternateNodePropertyName] === node ? align$1(2, testDoc) : testDoc + ); + }(concat$4(operatorOptions.beforeParts())), forceNoIndent ? concat$4(parts) : indent$2(concat$4(parts)), operatorOptions.afterParts(breakClosingParen)))); +} + +function getTypeScriptMappedTypeModifier(tokenNode, keyword) { + if (tokenNode.type === "TSPlusToken") { + return "+" + keyword; + } else if (tokenNode.type === "TSMinusToken") { + return "-" + keyword; + } + + return keyword; +} + +function printPathNoParens(path$$1, options, print, args) { + var n = path$$1.getValue(); + var semi = options.semi ? ";" : ""; + + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + var htmlBinding$$1 = printHtmlBinding(path$$1, options, print); + + if (htmlBinding$$1) { + return htmlBinding$$1; + } + + var parts = []; + + switch (n.type) { + case "JsExpressionRoot": + return path$$1.call(print, "node"); + + case "JsonRoot": + return concat$4([path$$1.call(print, "node"), hardline$3]); + + case "File": + // Print @babel/parser's InterpreterDirective here so that + // leading comments on the `Program` node get printed after the hashbang. + if (n.program && n.program.interpreter) { + parts.push(path$$1.call(function (programPath) { + return programPath.call(print, "interpreter"); + }, "program")); + } + + parts.push(path$$1.call(print, "program")); + return concat$4(parts); + + case "Program": + // Babel 6 + if (n.directives) { + path$$1.each(function (childPath) { + parts.push(print(childPath), semi, hardline$3); + + if (isNextLineEmpty$2(options.originalText, childPath.getValue(), options)) { + parts.push(hardline$3); + } + }, "directives"); + } + + parts.push(path$$1.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body")); + parts.push(comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true)); // Only force a trailing newline if there were any contents. + + if (n.body.length || n.comments) { + parts.push(hardline$3); + } + + return concat$4(parts); + // Babel extension. + + case "EmptyStatement": + return ""; + + case "ExpressionStatement": + // Detect Flow-parsed directives + if (n.directive) { + return concat$4([nodeStr(n.expression, options, true), semi]); + } // Do not append semicolon after the only JSX element in a program + + + return concat$4([path$$1.call(print, "expression"), isTheOnlyJSXElementInMarkdown(options, path$$1) ? "" : semi]); + // Babel extension. + + case "ParenthesizedExpression": + return concat$4(["(", path$$1.call(print, "expression"), ")"]); + + case "AssignmentExpression": + return printAssignment(n.left, path$$1.call(print, "left"), concat$4([" ", n.operator]), n.right, path$$1.call(print, "right"), options); + + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + { + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + var isInsideParenthesis = n !== parent.body && (parent.type === "IfStatement" || parent.type === "WhileStatement" || parent.type === "DoWhileStatement"); + + var _parts = printBinaryishExpressions(path$$1, print, options, + /* isNested */ + false, isInsideParenthesis); // if ( + // this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft + // ) { + // + // looks super weird, we want to break the children if the parent breaks + // + // if ( + // this.hasPlugin("dynamicImports") && + // this.lookahead().type === tt.parenLeft + // ) { + + + if (isInsideParenthesis) { + return concat$4(_parts); + } // Break between the parens in unaries or in a member expression, i.e. + // + // ( + // a && + // b && + // c + // ).call() + + + if (parent.type === "UnaryExpression" || (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && !parent.computed) { + return group$1(concat$4([indent$2(concat$4([softline$1, concat$4(_parts)])), softline$1])); + } // Avoid indenting sub-expressions in some cases where the first sub-expression is already + // indented accordingly. We should indent sub-expressions where the first case isn't indented. + + + var shouldNotIndent = parent.type === "ReturnStatement" || parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" || n.type !== "NGPipeExpression" && (parent.type === "NGRoot" && options.parser === "__ng_binding" || parent.type === "NGMicrosyntaxExpression" && parentParent.type === "NGMicrosyntax" && parentParent.body.length === 1) || n === parent.body && parent.type === "ArrowFunctionExpression" || n !== parent.body && parent.type === "ForStatement" || parent.type === "ConditionalExpression" && parentParent.type !== "ReturnStatement" && parentParent.type !== "CallExpression"; + var shouldIndentIfInlining = parent.type === "AssignmentExpression" || parent.type === "VariableDeclarator" || parent.type === "ClassProperty" || parent.type === "TSAbstractClassProperty" || parent.type === "ClassPrivateProperty" || parent.type === "ObjectProperty" || parent.type === "Property"; + var samePrecedenceSubExpression = isBinaryish(n.left) && shouldFlatten$1(n.operator, n.left.operator); + + if (shouldNotIndent || shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression || !shouldInlineLogicalExpression(n) && shouldIndentIfInlining) { + return group$1(concat$4(_parts)); + } + + if (_parts.length === 0) { + return ""; + } // If the right part is a JSX node, we include it in a separate group to + // prevent it breaking the whole chain, so we can print the expression like: + // + // foo && bar && ( + // + // + // + // ) + + + var hasJSX = isJSXNode(n.right); + var rest = concat$4(hasJSX ? _parts.slice(1, -1) : _parts.slice(1)); + var groupId = Symbol("logicalChain-" + ++uid); + var chain = group$1(concat$4([// Don't include the initial expression in the indentation + // level. The first item is guaranteed to be the first + // left-most expression. + _parts.length > 0 ? _parts[0] : "", indent$2(rest)]), { + id: groupId + }); + + if (!hasJSX) { + return chain; + } + + var jsxPart = getLast$4(_parts); + return group$1(concat$4([chain, ifBreak$1(indent$2(jsxPart), jsxPart, { + groupId + })])); + } + + case "AssignmentPattern": + return concat$4([path$$1.call(print, "left"), " = ", path$$1.call(print, "right")]); + + case "TSTypeAssertionExpression": + { + var shouldBreakAfterCast = !(n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression"); + var castGroup = group$1(concat$4(["<", indent$2(concat$4([softline$1, path$$1.call(print, "typeAnnotation")])), softline$1, ">"])); + var exprContents = concat$4([ifBreak$1("("), indent$2(concat$4([softline$1, path$$1.call(print, "expression")])), softline$1, ifBreak$1(")")]); + + if (shouldBreakAfterCast) { + return conditionalGroup$1([concat$4([castGroup, path$$1.call(print, "expression")]), concat$4([castGroup, group$1(exprContents, { + shouldBreak: true + })]), concat$4([castGroup, path$$1.call(print, "expression")])]); + } + + return group$1(concat$4([castGroup, path$$1.call(print, "expression")])); + } + + case "OptionalMemberExpression": + case "MemberExpression": + { + var _parent = path$$1.getParentNode(); + + var firstNonMemberParent; + var i = 0; + + do { + firstNonMemberParent = path$$1.getParentNode(i); + i++; + } while (firstNonMemberParent && (firstNonMemberParent.type === "MemberExpression" || firstNonMemberParent.type === "OptionalMemberExpression" || firstNonMemberParent.type === "TSNonNullExpression")); + + var shouldInline = firstNonMemberParent && (firstNonMemberParent.type === "NewExpression" || firstNonMemberParent.type === "BindExpression" || firstNonMemberParent.type === "VariableDeclarator" && firstNonMemberParent.id.type !== "Identifier" || firstNonMemberParent.type === "AssignmentExpression" && firstNonMemberParent.left.type !== "Identifier") || n.computed || n.object.type === "Identifier" && n.property.type === "Identifier" && _parent.type !== "MemberExpression" && _parent.type !== "OptionalMemberExpression"; + return concat$4([path$$1.call(print, "object"), shouldInline ? printMemberLookup(path$$1, options, print) : group$1(indent$2(concat$4([softline$1, printMemberLookup(path$$1, options, print)])))]); + } + + case "MetaProperty": + return concat$4([path$$1.call(print, "meta"), ".", path$$1.call(print, "property")]); + + case "BindExpression": + if (n.object) { + parts.push(path$$1.call(print, "object")); + } + + parts.push(group$1(indent$2(concat$4([softline$1, printBindExpressionCallee(path$$1, options, print)])))); + return concat$4(parts); + + case "Identifier": + { + return concat$4([n.name, printOptionalToken(path$$1), printTypeAnnotation(path$$1, options, print)]); + } + + case "SpreadElement": + case "SpreadElementPattern": + case "RestProperty": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + case "ObjectTypeSpreadProperty": + return concat$4(["...", path$$1.call(print, "argument"), printTypeAnnotation(path$$1, options, print)]); + + case "FunctionDeclaration": + case "FunctionExpression": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(printFunctionDeclaration(path$$1, print, options)); + + if (!n.body) { + parts.push(semi); + } + + return concat$4(parts); + + case "ArrowFunctionExpression": + { + if (n.async) { + parts.push("async "); + } + + if (shouldPrintParamsWithoutParens(path$$1, options)) { + parts.push(path$$1.call(print, "params", 0)); + } else { + parts.push(group$1(concat$4([printFunctionParams(path$$1, print, options, + /* expandLast */ + args && (args.expandLastArg || args.expandFirstArg), + /* printTypeParams */ + true), printReturnType(path$$1, print, options)]))); + } + + var dangling = comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true, function (comment) { + var nextCharacter = getNextNonSpaceNonCommentCharacterIndex$2(options.originalText, comment, options); + return options.originalText.substr(nextCharacter, 2) === "=>"; + }); + + if (dangling) { + parts.push(" ", dangling); + } + + parts.push(" =>"); + var body = path$$1.call(function (bodyPath) { + return print(bodyPath, args); + }, "body"); // We want to always keep these types of nodes on the same line + // as the arrow. + + if (!hasLeadingOwnLineComment(options.originalText, n.body, options) && (n.body.type === "ArrayExpression" || n.body.type === "ObjectExpression" || n.body.type === "BlockStatement" || isJSXNode(n.body) || isTemplateOnItsOwnLine(n.body, options.originalText, options) || n.body.type === "ArrowFunctionExpression" || n.body.type === "DoExpression")) { + return group$1(concat$4([concat$4(parts), " ", body])); + } // We handle sequence expressions as the body of arrows specially, + // so that the required parentheses end up on their own lines. + + + if (n.body.type === "SequenceExpression") { + return group$1(concat$4([concat$4(parts), group$1(concat$4([" (", indent$2(concat$4([softline$1, body])), softline$1, ")"]))])); + } // if the arrow function is expanded as last argument, we are adding a + // level of indentation and need to add a softline to align the closing ) + // with the opening (, or if it's inside a JSXExpression (e.g. an attribute) + // we should align the expression's closing } with the line with the opening {. + + + var shouldAddSoftLine = (args && args.expandLastArg || path$$1.getParentNode().type === "JSXExpressionContainer") && !(n.comments && n.comments.length); + var printTrailingComma = args && args.expandLastArg && shouldPrintComma(options, "all"); // In order to avoid confusion between + // a => a ? a : a + // a <= a ? a : a + + var shouldAddParens = n.body.type === "ConditionalExpression" && !startsWithNoLookaheadToken$1(n.body, + /* forbidFunctionAndClass */ + false); + return group$1(concat$4([concat$4(parts), group$1(concat$4([indent$2(concat$4([line$3, shouldAddParens ? ifBreak$1("", "(") : "", body, shouldAddParens ? ifBreak$1("", ")") : ""])), shouldAddSoftLine ? concat$4([ifBreak$1(printTrailingComma ? "," : ""), softline$1]) : ""]))])); + } + + case "MethodDefinition": + case "TSAbstractMethodDefinition": + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.type === "TSAbstractMethodDefinition") { + parts.push("abstract "); + } + + parts.push(printMethod(path$$1, options, print)); + return concat$4(parts); + + case "YieldExpression": + parts.push("yield"); + + if (n.delegate) { + parts.push("*"); + } + + if (n.argument) { + parts.push(" ", path$$1.call(print, "argument")); + } + + return concat$4(parts); + + case "AwaitExpression": + return concat$4(["await ", path$$1.call(print, "argument")]); + + case "ImportSpecifier": + if (n.importKind) { + parts.push(path$$1.call(print, "importKind"), " "); + } + + parts.push(path$$1.call(print, "imported")); + + if (n.local && n.local.name !== n.imported.name) { + parts.push(" as ", path$$1.call(print, "local")); + } + + return concat$4(parts); + + case "ExportSpecifier": + parts.push(path$$1.call(print, "local")); + + if (n.exported && n.exported.name !== n.local.name) { + parts.push(" as ", path$$1.call(print, "exported")); + } + + return concat$4(parts); + + case "ImportNamespaceSpecifier": + parts.push("* as "); + + if (n.local) { + parts.push(path$$1.call(print, "local")); + } else if (n.id) { + parts.push(path$$1.call(print, "id")); + } + + return concat$4(parts); + + case "ImportDefaultSpecifier": + if (n.local) { + return path$$1.call(print, "local"); + } + + return path$$1.call(print, "id"); + + case "TSExportAssignment": + return concat$4(["export = ", path$$1.call(print, "expression"), semi]); + + case "ExportDefaultDeclaration": + case "ExportNamedDeclaration": + return printExportDeclaration(path$$1, options, print); + + case "ExportAllDeclaration": + parts.push("export "); + + if (n.exportKind === "type") { + parts.push("type "); + } + + parts.push("* from ", path$$1.call(print, "source"), semi); + return concat$4(parts); + + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return path$$1.call(print, "exported"); + + case "ImportDeclaration": + { + parts.push("import "); + + if (n.importKind && n.importKind !== "value") { + parts.push(n.importKind + " "); + } + + var standalones = []; + var grouped = []; + + if (n.specifiers && n.specifiers.length > 0) { + path$$1.each(function (specifierPath) { + var value = specifierPath.getValue(); + + if (value.type === "ImportDefaultSpecifier" || value.type === "ImportNamespaceSpecifier") { + standalones.push(print(specifierPath)); + } else { + grouped.push(print(specifierPath)); + } + }, "specifiers"); + + if (standalones.length > 0) { + parts.push(join$2(", ", standalones)); + } + + if (standalones.length > 0 && grouped.length > 0) { + parts.push(", "); + } + + if (grouped.length === 1 && standalones.length === 0 && n.specifiers && !n.specifiers.some(function (node) { + return node.comments; + })) { + parts.push(concat$4(["{", options.bracketSpacing ? " " : "", concat$4(grouped), options.bracketSpacing ? " " : "", "}"])); + } else if (grouped.length >= 1) { + parts.push(group$1(concat$4(["{", indent$2(concat$4([options.bracketSpacing ? line$3 : softline$1, join$2(concat$4([",", line$3]), grouped)])), ifBreak$1(shouldPrintComma(options) ? "," : ""), options.bracketSpacing ? line$3 : softline$1, "}"]))); + } + + parts.push(" from "); + } else if (n.importKind && n.importKind === "type" || // import {} from 'x' + /{\s*}/.test(options.originalText.slice(options.locStart(n), options.locStart(n.source)))) { + parts.push("{} from "); + } + + parts.push(path$$1.call(print, "source"), semi); + return concat$4(parts); + } + + case "Import": + return "import"; + + case "BlockStatement": + { + var naked = path$$1.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); + var hasContent = n.body.find(function (node) { + return node.type !== "EmptyStatement"; + }); + var hasDirectives = n.directives && n.directives.length > 0; + + var _parent2 = path$$1.getParentNode(); + + var _parentParent = path$$1.getParentNode(1); + + if (!hasContent && !hasDirectives && !hasDanglingComments(n) && (_parent2.type === "ArrowFunctionExpression" || _parent2.type === "FunctionExpression" || _parent2.type === "FunctionDeclaration" || _parent2.type === "ObjectMethod" || _parent2.type === "ClassMethod" || _parent2.type === "ForStatement" || _parent2.type === "WhileStatement" || _parent2.type === "DoWhileStatement" || _parent2.type === "DoExpression" || _parent2.type === "CatchClause" && !_parentParent.finalizer)) { + return "{}"; + } + + parts.push("{"); // Babel 6 + + if (hasDirectives) { + path$$1.each(function (childPath) { + parts.push(indent$2(concat$4([hardline$3, print(childPath), semi]))); + + if (isNextLineEmpty$2(options.originalText, childPath.getValue(), options)) { + parts.push(hardline$3); + } + }, "directives"); + } + + if (hasContent) { + parts.push(indent$2(concat$4([hardline$3, naked]))); + } + + parts.push(comments.printDanglingComments(path$$1, options)); + parts.push(hardline$3, "}"); + return concat$4(parts); + } + + case "ReturnStatement": + parts.push("return"); + + if (n.argument) { + if (returnArgumentHasLeadingComment(options, n.argument)) { + parts.push(concat$4([" (", indent$2(concat$4([hardline$3, path$$1.call(print, "argument")])), hardline$3, ")"])); + } else if (n.argument.type === "LogicalExpression" || n.argument.type === "BinaryExpression" || n.argument.type === "SequenceExpression") { + parts.push(group$1(concat$4([ifBreak$1(" (", " "), indent$2(concat$4([softline$1, path$$1.call(print, "argument")])), softline$1, ifBreak$1(")")]))); + } else { + parts.push(" ", path$$1.call(print, "argument")); + } + } + + if (hasDanglingComments(n)) { + parts.push(" ", comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true)); + } + + parts.push(semi); + return concat$4(parts); + + case "NewExpression": + case "OptionalCallExpression": + case "CallExpression": + { + var isNew = n.type === "NewExpression"; + var optional = printOptionalToken(path$$1); + + if ( // We want to keep CommonJS- and AMD-style require calls, and AMD-style + // define calls, as a unit. + // e.g. `define(["some/lib", (lib) => {` + !isNew && n.callee.type === "Identifier" && (n.callee.name === "require" || n.callee.name === "define") || n.callee.type === "Import" || // Template literals as single arguments + n.arguments.length === 1 && isTemplateOnItsOwnLine(n.arguments[0], options.originalText, options) || // Keep test declarations on a single line + // e.g. `it('long name', () => {` + !isNew && isTestCall(n, path$$1.getParentNode())) { + return concat$4([isNew ? "new " : "", path$$1.call(print, "callee"), optional, printFunctionTypeParameters(path$$1, options, print), concat$4(["(", join$2(", ", path$$1.map(print, "arguments")), ")"])]); + } // Inline Flow annotation comments following Identifiers in Call nodes need to + // stay with the Identifier. For example: + // + // foo /*:: */(bar); + // + // Here, we ensure that such comments stay between the Identifier and the Callee. + + + var isIdentifierWithFlowAnnotation = n.callee.type === "Identifier" && hasFlowAnnotationComment(n.callee.trailingComments); + + if (isIdentifierWithFlowAnnotation) { + n.callee.trailingComments[0].printed = true; + } // We detect calls on member lookups and possibly print them in a + // special chain format. See `printMemberChain` for more info. + + + if (!isNew && isMemberish(n.callee)) { + return printMemberChain(path$$1, options, print); + } + + return concat$4([isNew ? "new " : "", path$$1.call(print, "callee"), optional, isIdentifierWithFlowAnnotation ? `/*:: ${n.callee.trailingComments[0].value.substring(2).trim()} */` : "", printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]); + } + + case "TSInterfaceDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(n.abstract ? "abstract " : "", printTypeScriptModifiers(path$$1, options, print), "interface ", path$$1.call(print, "id"), n.typeParameters ? path$$1.call(print, "typeParameters") : "", " "); + + if (n.heritage.length) { + parts.push(group$1(indent$2(concat$4([softline$1, "extends ", (n.heritage.length === 1 ? identity$1 : indent$2)(join$2(concat$4([",", line$3]), path$$1.map(print, "heritage"))), " "])))); + } + + parts.push(path$$1.call(print, "body")); + return concat$4(parts); + + case "ObjectTypeInternalSlot": + return concat$4([n.static ? "static " : "", "[[", path$$1.call(print, "id"), "]]", printOptionalToken(path$$1), n.method ? "" : ": ", path$$1.call(print, "value")]); + + case "ObjectExpression": + case "ObjectPattern": + case "ObjectTypeAnnotation": + case "TSInterfaceBody": + case "TSTypeLiteral": + { + var propertiesField; + + if (n.type === "TSTypeLiteral") { + propertiesField = "members"; + } else if (n.type === "TSInterfaceBody") { + propertiesField = "body"; + } else { + propertiesField = "properties"; + } + + var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; + var fields = []; + + if (isTypeAnnotation) { + fields.push("indexers", "callProperties", "internalSlots"); + } + + fields.push(propertiesField); + var firstProperty = fields.map(function (field) { + return n[field][0]; + }).sort(function (a, b) { + return options.locStart(a) - options.locStart(b); + })[0]; + + var _parent3 = path$$1.getParentNode(0); + + var isFlowInterfaceLikeBody = isTypeAnnotation && _parent3 && (_parent3.type === "InterfaceDeclaration" || _parent3.type === "DeclareInterface" || _parent3.type === "DeclareClass") && path$$1.getName() === "body"; + var shouldBreak = n.type === "TSInterfaceBody" || isFlowInterfaceLikeBody || n.type === "ObjectPattern" && _parent3.type !== "FunctionDeclaration" && _parent3.type !== "FunctionExpression" && _parent3.type !== "ArrowFunctionExpression" && _parent3.type !== "AssignmentPattern" && _parent3.type !== "CatchClause" && n.properties.some(function (property) { + return property.value && (property.value.type === "ObjectPattern" || property.value.type === "ArrayPattern"); + }) || n.type !== "ObjectPattern" && firstProperty && hasNewlineInRange$1(options.originalText, options.locStart(n), options.locStart(firstProperty)); + var separator = isFlowInterfaceLikeBody ? ";" : n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" ? ifBreak$1(semi, ";") : ","; + var leftBrace = n.exact ? "{|" : "{"; + var rightBrace = n.exact ? "|}" : "}"; // Unfortunately, things are grouped together in the ast can be + // interleaved in the source code. So we need to reorder them before + // printing them. + + var propsAndLoc = []; + fields.forEach(function (field) { + path$$1.each(function (childPath) { + var node = childPath.getValue(); + propsAndLoc.push({ + node: node, + printed: print(childPath), + loc: options.locStart(node) + }); + }, field); + }); + var separatorParts = []; + var props = propsAndLoc.sort(function (a, b) { + return a.loc - b.loc; + }).map(function (prop) { + var result = concat$4(separatorParts.concat(group$1(prop.printed))); + separatorParts = [separator, line$3]; + + if ((prop.node.type === "TSPropertySignature" || prop.node.type === "TSMethodSignature") && hasNodeIgnoreComment$1(prop.node)) { + separatorParts.shift(); + } + + if (isNextLineEmpty$2(options.originalText, prop.node, options)) { + separatorParts.push(hardline$3); + } + + return result; + }); + + if (n.inexact) { + props.push(concat$4(separatorParts.concat(group$1("...")))); + } + + var lastElem = getLast$4(n[propertiesField]); + var canHaveTrailingSeparator = !(lastElem && (lastElem.type === "RestProperty" || lastElem.type === "RestElement" || hasNodeIgnoreComment$1(lastElem) || n.inexact)); + var content; + + if (props.length === 0 && !n.typeAnnotation) { + if (!hasDanglingComments(n)) { + return concat$4([leftBrace, rightBrace]); + } + + content = group$1(concat$4([leftBrace, comments.printDanglingComments(path$$1, options), softline$1, rightBrace, printOptionalToken(path$$1)])); + } else { + content = concat$4([leftBrace, indent$2(concat$4([options.bracketSpacing ? line$3 : softline$1, concat$4(props)])), ifBreak$1(canHaveTrailingSeparator && (separator !== "," || shouldPrintComma(options)) ? separator : ""), concat$4([options.bracketSpacing ? line$3 : softline$1, rightBrace]), printOptionalToken(path$$1), printTypeAnnotation(path$$1, options, print)]); + } // If we inline the object as first argument of the parent, we don't want + // to create another group so that the object breaks before the return + // type + + + var parentParentParent = path$$1.getParentNode(2); + + if (n.type === "ObjectPattern" && _parent3 && shouldHugArguments(_parent3) && _parent3.params[0] === n || shouldHugType(n) && parentParentParent && shouldHugArguments(parentParentParent) && parentParentParent.params[0].typeAnnotation && parentParentParent.params[0].typeAnnotation.typeAnnotation === n) { + return content; + } + + return group$1(content, { + shouldBreak + }); + } + // Babel 6 + + case "ObjectProperty": // Non-standard AST node type. + + case "Property": + if (n.method || n.kind === "get" || n.kind === "set") { + return printMethod(path$$1, options, print); + } + + if (n.shorthand) { + parts.push(path$$1.call(print, "value")); + } else { + var printedLeft; + + if (n.computed) { + printedLeft = concat$4(["[", path$$1.call(print, "key"), "]"]); + } else { + printedLeft = printPropertyKey(path$$1, options, print); + } + + parts.push(printAssignment(n.key, printedLeft, ":", n.value, path$$1.call(print, "value"), options)); + } + + return concat$4(parts); + // Babel 6 + + case "ClassMethod": + if (n.decorators && n.decorators.length !== 0) { + parts.push(printDecorators(path$$1, options, print)); + } + + if (n.static) { + parts.push("static "); + } + + parts = parts.concat(printObjectMethod(path$$1, options, print)); + return concat$4(parts); + // Babel 6 + + case "ObjectMethod": + return printObjectMethod(path$$1, options, print); + + case "Decorator": + return concat$4(["@", path$$1.call(print, "expression"), path$$1.call(print, "callee")]); + + case "ArrayExpression": + case "ArrayPattern": + if (n.elements.length === 0) { + if (!hasDanglingComments(n)) { + parts.push("[]"); + } else { + parts.push(group$1(concat$4(["[", comments.printDanglingComments(path$$1, options), softline$1, "]"]))); + } + } else { + var _lastElem = getLast$4(n.elements); + + var canHaveTrailingComma = !(_lastElem && _lastElem.type === "RestElement"); // JavaScript allows you to have empty elements in an array which + // changes its length based on the number of commas. The algorithm + // is that if the last argument is null, we need to force insert + // a comma to ensure JavaScript recognizes it. + // [,].length === 1 + // [1,].length === 1 + // [1,,].length === 2 + // + // Note that getLast returns null if the array is empty, but + // we already check for an empty array just above so we are safe + + var needsForcedTrailingComma = canHaveTrailingComma && _lastElem === null; + parts.push(group$1(concat$4(["[", indent$2(concat$4([softline$1, printArrayItems(path$$1, options, "elements", print)])), needsForcedTrailingComma ? "," : "", ifBreak$1(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma(options) ? "," : ""), comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), softline$1, "]"]))); + } + + parts.push(printOptionalToken(path$$1), printTypeAnnotation(path$$1, options, print)); + return concat$4(parts); + + case "SequenceExpression": + { + var _parent4 = path$$1.getParentNode(0); + + if (_parent4.type === "ExpressionStatement" || _parent4.type === "ForStatement") { + // For ExpressionStatements and for-loop heads, which are among + // the few places a SequenceExpression appears unparenthesized, we want + // to indent expressions after the first. + var _parts2 = []; + path$$1.each(function (p) { + if (p.getName() === 0) { + _parts2.push(print(p)); + } else { + _parts2.push(",", indent$2(concat$4([line$3, print(p)]))); + } + }, "expressions"); + return group$1(concat$4(_parts2)); + } + + return group$1(concat$4([join$2(concat$4([",", line$3]), path$$1.map(print, "expressions"))])); + } + + case "ThisExpression": + return "this"; + + case "Super": + return "super"; + + case "NullLiteral": + // Babel 6 Literal split + return "null"; + + case "RegExpLiteral": + // Babel 6 Literal split + return printRegex(n); + + case "NumericLiteral": + // Babel 6 Literal split + return printNumber$1(n.extra.raw); + + case "BigIntLiteral": + return concat$4([printNumber$1(n.extra.rawValue), "n"]); + + case "BooleanLiteral": // Babel 6 Literal split + + case "StringLiteral": // Babel 6 Literal split + + case "Literal": + { + if (n.regex) { + return printRegex(n.regex); + } + + if (typeof n.value === "number") { + return printNumber$1(n.raw); + } + + if (typeof n.value !== "string") { + return "" + n.value; + } // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2 + // See corresponding workaround in needs-parens.js + + + var grandParent = path$$1.getParentNode(1); + var isTypeScriptDirective = options.parser === "typescript" && typeof n.value === "string" && grandParent && (grandParent.type === "Program" || grandParent.type === "BlockStatement"); + return nodeStr(n, options, isTypeScriptDirective); + } + + case "Directive": + return path$$1.call(print, "value"); + // Babel 6 + + case "DirectiveLiteral": + return nodeStr(n, options); + + case "UnaryExpression": + parts.push(n.operator); + + if (/[a-z]$/.test(n.operator)) { + parts.push(" "); + } + + parts.push(path$$1.call(print, "argument")); + return concat$4(parts); + + case "UpdateExpression": + parts.push(path$$1.call(print, "argument"), n.operator); + + if (n.prefix) { + parts.reverse(); + } + + return concat$4(parts); + + case "ConditionalExpression": + return printTernaryOperator(path$$1, options, print, { + beforeParts: function beforeParts() { + return [path$$1.call(print, "test")]; + }, + afterParts: function afterParts(breakClosingParen) { + return [breakClosingParen ? softline$1 : ""]; + }, + shouldCheckJsx: true, + conditionalNodeType: "ConditionalExpression", + consequentNodePropertyName: "consequent", + alternateNodePropertyName: "alternate", + testNodePropertyName: "test", + breakNested: true + }); + + case "VariableDeclaration": + { + var printed = path$$1.map(function (childPath) { + return print(childPath); + }, "declarations"); // We generally want to terminate all variable declarations with a + // semicolon, except when they in the () part of for loops. + + var parentNode = path$$1.getParentNode(); + var isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement" || parentNode.type === "ForAwaitStatement"; + var hasValue = n.declarations.some(function (decl) { + return decl.init; + }); + var firstVariable; + + if (printed.length === 1 && !n.declarations[0].comments) { + firstVariable = printed[0]; + } else if (printed.length > 0) { + // Indent first var to comply with eslint one-var rule + firstVariable = indent$2(printed[0]); + } + + parts = [isNodeStartingWithDeclare(n, options) ? "declare " : "", n.kind, firstVariable ? concat$4([" ", firstVariable]) : "", indent$2(concat$4(printed.slice(1).map(function (p) { + return concat$4([",", hasValue && !isParentForLoop ? hardline$3 : line$3, p]); + })))]; + + if (!(isParentForLoop && parentNode.body !== n)) { + parts.push(semi); + } + + return group$1(concat$4(parts)); + } + + case "VariableDeclarator": + return printAssignment(n.id, concat$4([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]), " =", n.init, n.init && path$$1.call(print, "init"), options); + + case "WithStatement": + return group$1(concat$4(["with (", path$$1.call(print, "object"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); + + case "IfStatement": + { + var con = adjustClause(n.consequent, path$$1.call(print, "consequent")); + var opening = group$1(concat$4(["if (", group$1(concat$4([indent$2(concat$4([softline$1, path$$1.call(print, "test")])), softline$1])), ")", con])); + parts.push(opening); + + if (n.alternate) { + var commentOnOwnLine = hasTrailingComment(n.consequent) && n.consequent.comments.some(function (comment) { + return comment.trailing && !comments$3.isBlockComment(comment); + }) || needsHardlineAfterDanglingComment(n); + var elseOnSameLine = n.consequent.type === "BlockStatement" && !commentOnOwnLine; + parts.push(elseOnSameLine ? " " : hardline$3); + + if (hasDanglingComments(n)) { + parts.push(comments.printDanglingComments(path$$1, options, true), commentOnOwnLine ? hardline$3 : " "); + } + + parts.push("else", group$1(adjustClause(n.alternate, path$$1.call(print, "alternate"), n.alternate.type === "IfStatement"))); + } + + return concat$4(parts); + } + + case "ForStatement": + { + var _body = adjustClause(n.body, path$$1.call(print, "body")); // We want to keep dangling comments above the loop to stay consistent. + // Any comment positioned between the for statement and the parentheses + // is going to be printed before the statement. + + + var _dangling = comments.printDanglingComments(path$$1, options, + /* sameLine */ + true); + + var printedComments = _dangling ? concat$4([_dangling, softline$1]) : ""; + + if (!n.init && !n.test && !n.update) { + return concat$4([printedComments, group$1(concat$4(["for (;;)", _body]))]); + } + + return concat$4([printedComments, group$1(concat$4(["for (", group$1(concat$4([indent$2(concat$4([softline$1, path$$1.call(print, "init"), ";", line$3, path$$1.call(print, "test"), ";", line$3, path$$1.call(print, "update")])), softline$1])), ")", _body]))]); + } + + case "WhileStatement": + return group$1(concat$4(["while (", group$1(concat$4([indent$2(concat$4([softline$1, path$$1.call(print, "test")])), softline$1])), ")", adjustClause(n.body, path$$1.call(print, "body"))])); + + case "ForInStatement": + // Note: esprima can't actually parse "for each (". + return group$1(concat$4([n.each ? "for each (" : "for (", path$$1.call(print, "left"), " in ", path$$1.call(print, "right"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); + + case "ForOfStatement": + case "ForAwaitStatement": + { + // Babylon 7 removed ForAwaitStatement in favor of ForOfStatement + // with `"await": true`: + // https://github.com/estree/estree/pull/138 + var isAwait = n.type === "ForAwaitStatement" || n.await; + return group$1(concat$4(["for", isAwait ? " await" : "", " (", path$$1.call(print, "left"), " of ", path$$1.call(print, "right"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); + } + + case "DoWhileStatement": + { + var clause = adjustClause(n.body, path$$1.call(print, "body")); + var doBody = group$1(concat$4(["do", clause])); + parts = [doBody]; + + if (n.body.type === "BlockStatement") { + parts.push(" "); + } else { + parts.push(hardline$3); + } + + parts.push("while ("); + parts.push(group$1(concat$4([indent$2(concat$4([softline$1, path$$1.call(print, "test")])), softline$1])), ")", semi); + return concat$4(parts); + } + + case "DoExpression": + return concat$4(["do ", path$$1.call(print, "body")]); + + case "BreakStatement": + parts.push("break"); + + if (n.label) { + parts.push(" ", path$$1.call(print, "label")); + } + + parts.push(semi); + return concat$4(parts); + + case "ContinueStatement": + parts.push("continue"); + + if (n.label) { + parts.push(" ", path$$1.call(print, "label")); + } + + parts.push(semi); + return concat$4(parts); + + case "LabeledStatement": + if (n.body.type === "EmptyStatement") { + return concat$4([path$$1.call(print, "label"), ":;"]); + } + + return concat$4([path$$1.call(print, "label"), ": ", path$$1.call(print, "body")]); + + case "TryStatement": + return concat$4(["try ", path$$1.call(print, "block"), n.handler ? concat$4([" ", path$$1.call(print, "handler")]) : "", n.finalizer ? concat$4([" finally ", path$$1.call(print, "finalizer")]) : ""]); + + case "CatchClause": + if (n.param) { + var hasComments = n.param.comments && n.param.comments.some(function (comment) { + return !comments$3.isBlockComment(comment) || comment.leading && hasNewline$2(options.originalText, options.locEnd(comment)) || comment.trailing && hasNewline$2(options.originalText, options.locStart(comment), { + backwards: true + }); + }); + var param = path$$1.call(print, "param"); + return concat$4(["catch ", hasComments ? concat$4(["(", indent$2(concat$4([softline$1, param])), softline$1, ") "]) : concat$4(["(", param, ") "]), path$$1.call(print, "body")]); + } + + return concat$4(["catch ", path$$1.call(print, "body")]); + + case "ThrowStatement": + return concat$4(["throw ", path$$1.call(print, "argument"), semi]); + // Note: ignoring n.lexical because it has no printing consequences. + + case "SwitchStatement": + return concat$4([group$1(concat$4(["switch (", indent$2(concat$4([softline$1, path$$1.call(print, "discriminant")])), softline$1, ")"])), " {", n.cases.length > 0 ? indent$2(concat$4([hardline$3, join$2(hardline$3, path$$1.map(function (casePath) { + var caseNode = casePath.getValue(); + return concat$4([casePath.call(print), n.cases.indexOf(caseNode) !== n.cases.length - 1 && isNextLineEmpty$2(options.originalText, caseNode, options) ? hardline$3 : ""]); + }, "cases"))])) : "", hardline$3, "}"]); + + case "SwitchCase": + { + if (n.test) { + parts.push("case ", path$$1.call(print, "test"), ":"); + } else { + parts.push("default:"); + } + + var consequent = n.consequent.filter(function (node) { + return node.type !== "EmptyStatement"; + }); + + if (consequent.length > 0) { + var cons = path$$1.call(function (consequentPath) { + return printStatementSequence(consequentPath, options, print); + }, "consequent"); + parts.push(consequent.length === 1 && consequent[0].type === "BlockStatement" ? concat$4([" ", cons]) : indent$2(concat$4([hardline$3, cons]))); + } + + return concat$4(parts); + } + // JSX extensions below. + + case "DebuggerStatement": + return concat$4(["debugger", semi]); + + case "JSXAttribute": + parts.push(path$$1.call(print, "name")); + + if (n.value) { + var res; + + if (isStringLiteral(n.value)) { + var raw = rawText(n.value); // Unescape all quotes so we get an accurate preferred quote + + var final = raw.replace(/'/g, "'").replace(/"/g, '"'); + var quote = getPreferredQuote$1(final, options.jsxSingleQuote ? "'" : '"'); + + var _escape = quote === "'" ? "'" : """; + + final = final.slice(1, -1).replace(new RegExp(quote, "g"), _escape); + res = concat$4([quote, final, quote]); + } else { + res = path$$1.call(print, "value"); + } + + parts.push("=", res); + } + + return concat$4(parts); + + case "JSXIdentifier": + return "" + n.name; + + case "JSXNamespacedName": + return join$2(":", [path$$1.call(print, "namespace"), path$$1.call(print, "name")]); + + case "JSXMemberExpression": + return join$2(".", [path$$1.call(print, "object"), path$$1.call(print, "property")]); + + case "TSQualifiedName": + return join$2(".", [path$$1.call(print, "left"), path$$1.call(print, "right")]); + + case "JSXSpreadAttribute": + case "JSXSpreadChild": + { + return concat$4(["{", path$$1.call(function (p) { + var printed = concat$4(["...", print(p)]); + var n = p.getValue(); + + if (!n.comments || !n.comments.length) { + return printed; + } + + return concat$4([indent$2(concat$4([softline$1, comments.printComments(p, function () { + return printed; + }, options)])), softline$1]); + }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"]); + } + + case "JSXExpressionContainer": + { + var _parent5 = path$$1.getParentNode(0); + + var preventInline = _parent5.type === "JSXAttribute" && n.expression.comments && n.expression.comments.length > 0; + + var _shouldInline = !preventInline && (n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "OptionalCallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "JSXEmptyExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode(_parent5) && (n.expression.type === "ConditionalExpression" || isBinaryish(n.expression))); + + if (_shouldInline) { + return group$1(concat$4(["{", path$$1.call(print, "expression"), lineSuffixBoundary$1, "}"])); + } + + return group$1(concat$4(["{", indent$2(concat$4([softline$1, path$$1.call(print, "expression")])), softline$1, lineSuffixBoundary$1, "}"])); + } + + case "JSXFragment": + case "TSJsxFragment": + case "JSXElement": + { + var elem = comments.printComments(path$$1, function () { + return printJSXElement(path$$1, options, print); + }, options); + return maybeWrapJSXElementInParens(path$$1, elem); + } + + case "JSXOpeningElement": + { + var _n = path$$1.getValue(); + + var nameHasComments = _n.name && _n.name.comments && _n.name.comments.length > 0; // Don't break self-closing elements with no attributes and no comments + + if (_n.selfClosing && !_n.attributes.length && !nameHasComments) { + return concat$4(["<", path$$1.call(print, "name"), path$$1.call(print, "typeParameters"), " />"]); + } // don't break up opening elements with a single long text attribute + + + if (_n.attributes && _n.attributes.length === 1 && _n.attributes[0].value && isStringLiteral(_n.attributes[0].value) && !_n.attributes[0].value.value.includes("\n") && // We should break for the following cases: + //
+ //
+ !nameHasComments && (!_n.attributes[0].comments || !_n.attributes[0].comments.length)) { + return group$1(concat$4(["<", path$$1.call(print, "name"), path$$1.call(print, "typeParameters"), " ", concat$4(path$$1.map(print, "attributes")), _n.selfClosing ? " />" : ">"])); + } + + var lastAttrHasTrailingComments = _n.attributes.length && hasTrailingComment(getLast$4(_n.attributes)); + var bracketSameLine = // Simple tags (no attributes and no comment in tag name) should be + // kept unbroken regardless of `jsxBracketSameLine` + !_n.attributes.length && !nameHasComments || options.jsxBracketSameLine && ( // We should print the bracket in a new line for the following cases: + //
+ //
+ !nameHasComments || _n.attributes.length) && !lastAttrHasTrailingComments; // We should print the opening element expanded if any prop value is a + // string literal with newlines + + var _shouldBreak = _n.attributes && _n.attributes.some(function (attr) { + return attr.value && isStringLiteral(attr.value) && attr.value.value.includes("\n"); + }); + + return group$1(concat$4(["<", path$$1.call(print, "name"), path$$1.call(print, "typeParameters"), concat$4([indent$2(concat$4(path$$1.map(function (attr) { + return concat$4([line$3, print(attr)]); + }, "attributes"))), _n.selfClosing ? line$3 : bracketSameLine ? ">" : softline$1]), _n.selfClosing ? "/>" : bracketSameLine ? "" : ">"]), { + shouldBreak: _shouldBreak + }); + } + + case "JSXClosingElement": + return concat$4([""]); + + case "JSXOpeningFragment": + case "JSXClosingFragment": + case "TSJsxOpeningFragment": + case "TSJsxClosingFragment": + { + var hasComment = n.comments && n.comments.length; + var hasOwnLineComment = hasComment && !n.comments.every(comments$3.isBlockComment); + var isOpeningFragment = n.type === "JSXOpeningFragment" || n.type === "TSJsxOpeningFragment"; + return concat$4([isOpeningFragment ? "<" : ""]); + } + + case "JSXText": + /* istanbul ignore next */ + throw new Error("JSXTest should be handled by JSXElement"); + + case "JSXEmptyExpression": + { + var requiresHardline = n.comments && !n.comments.every(comments$3.isBlockComment); + return concat$4([comments.printDanglingComments(path$$1, options, + /* sameIndent */ + !requiresHardline), requiresHardline ? hardline$3 : ""]); + } + + case "ClassBody": + if (!n.comments && n.body.length === 0) { + return "{}"; + } + + return concat$4(["{", n.body.length > 0 ? indent$2(concat$4([hardline$3, path$$1.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body")])) : comments.printDanglingComments(path$$1, options), hardline$3, "}"]); + + case "ClassProperty": + case "TSAbstractClassProperty": + case "ClassPrivateProperty": + { + if (n.decorators && n.decorators.length !== 0) { + parts.push(printDecorators(path$$1, options, print)); + } + + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.type === "TSAbstractClassProperty") { + parts.push("abstract "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + var variance = getFlowVariance(n); + + if (variance) { + parts.push(variance); + } + + if (n.computed) { + parts.push("[", path$$1.call(print, "key"), "]"); + } else { + parts.push(printPropertyKey(path$$1, options, print)); + } + + parts.push(printOptionalToken(path$$1)); + parts.push(printTypeAnnotation(path$$1, options, print)); + + if (n.value) { + parts.push(" =", printAssignmentRight(n.key, n.value, path$$1.call(print, "value"), options)); + } + + parts.push(semi); + return group$1(concat$4(parts)); + } + + case "ClassDeclaration": + case "ClassExpression": + case "TSAbstractClassDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(concat$4(printClass(path$$1, options, print))); + return concat$4(parts); + + case "TSInterfaceHeritage": + parts.push(path$$1.call(print, "id")); + + if (n.typeParameters) { + parts.push(path$$1.call(print, "typeParameters")); + } + + return concat$4(parts); + + case "TemplateElement": + return join$2(literalline$1, n.value.raw.split(/\r?\n/g)); + + case "TemplateLiteral": + { + var expressions = path$$1.map(print, "expressions"); + + var _parentNode = path$$1.getParentNode(); + /** + * describe.each`table`(name, fn) + * describe.only.each`table`(name, fn) + * describe.skip.each`table`(name, fn) + * test.each`table`(name, fn) + * test.only.each`table`(name, fn) + * test.skip.each`table`(name, fn) + * + * Ref: https://github.com/facebook/jest/pull/6102 + */ + + + var jestEachTriggerRegex = /^[xf]?(describe|it|test)$/; + + if (_parentNode.type === "TaggedTemplateExpression" && _parentNode.quasi === n && _parentNode.tag.type === "MemberExpression" && _parentNode.tag.property.type === "Identifier" && _parentNode.tag.property.name === "each" && (_parentNode.tag.object.type === "Identifier" && jestEachTriggerRegex.test(_parentNode.tag.object.name) || _parentNode.tag.object.type === "MemberExpression" && _parentNode.tag.object.property.type === "Identifier" && (_parentNode.tag.object.property.name === "only" || _parentNode.tag.object.property.name === "skip") && _parentNode.tag.object.object.type === "Identifier" && jestEachTriggerRegex.test(_parentNode.tag.object.object.name))) { + /** + * a | b | expected + * ${1} | ${1} | ${2} + * ${1} | ${2} | ${3} + * ${2} | ${1} | ${3} + */ + var headerNames = n.quasis[0].value.raw.trim().split(/\s*\|\s*/); + + if (headerNames.length > 1 || headerNames.some(function (headerName) { + return headerName.length !== 0; + })) { + var stringifiedExpressions = expressions.map(function (doc$$2) { + return "${" + printDocToString$2(doc$$2, Object.assign({}, options, { + printWidth: Infinity + })).formatted + "}"; + }); + var tableBody = [{ + hasLineBreak: false, + cells: [] + }]; + + for (var _i = 1; _i < n.quasis.length; _i++) { + var row = tableBody[tableBody.length - 1]; + var correspondingExpression = stringifiedExpressions[_i - 1]; + row.cells.push(correspondingExpression); + + if (correspondingExpression.indexOf("\n") !== -1) { + row.hasLineBreak = true; + } + + if (n.quasis[_i].value.raw.indexOf("\n") !== -1) { + tableBody.push({ + hasLineBreak: false, + cells: [] + }); + } + } + + var maxColumnCount = tableBody.reduce(function (maxColumnCount, row) { + return Math.max(maxColumnCount, row.cells.length); + }, headerNames.length); + var maxColumnWidths = Array.from(new Array(maxColumnCount), function () { + return 0; + }); + var table = [{ + cells: headerNames + }].concat(tableBody.filter(function (row) { + return row.cells.length !== 0; + })); + table.filter(function (row) { + return !row.hasLineBreak; + }).forEach(function (row) { + row.cells.forEach(function (cell, index) { + maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth$2(cell)); + }); + }); + parts.push("`", indent$2(concat$4([hardline$3, join$2(hardline$3, table.map(function (row) { + return join$2(" | ", row.cells.map(function (cell, index) { + return row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth$2(cell)); + })); + }))])), hardline$3, "`"); + return concat$4(parts); + } + } + + parts.push("`"); + path$$1.each(function (childPath) { + var i = childPath.getName(); + parts.push(print(childPath)); + + if (i < expressions.length) { + // For a template literal of the following form: + // `someQuery { + // ${call({ + // a, + // b, + // })} + // }` + // the expression is on its own line (there is a \n in the previous + // quasi literal), therefore we want to indent the JavaScript + // expression inside at the beginning of ${ instead of the beginning + // of the `. + var tabWidth = options.tabWidth; + var indentSize = getIndentSize$1(childPath.getValue().value.raw, tabWidth); + var _printed = expressions[i]; + + if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression") { + _printed = concat$4([indent$2(concat$4([softline$1, _printed])), softline$1]); + } + + var aligned = addAlignmentToDoc$2(_printed, indentSize, tabWidth); + parts.push(group$1(concat$4(["${", aligned, lineSuffixBoundary$1, "}"]))); + } + }, "quasis"); + parts.push("`"); + return concat$4(parts); + } + // These types are unprintable because they serve as abstract + // supertypes for other (printable) types. + + case "TaggedTemplateExpression": + return concat$4([path$$1.call(print, "tag"), path$$1.call(print, "typeParameters"), path$$1.call(print, "quasi")]); + + case "Node": + case "Printable": + case "SourceLocation": + case "Position": + case "Statement": + case "Function": + case "Pattern": + case "Expression": + case "Declaration": + case "Specifier": + case "NamedSpecifier": + case "Comment": + case "MemberTypeAnnotation": // Flow + + case "Type": + /* istanbul ignore next */ + throw new Error("unprintable type: " + JSON.stringify(n.type)); + // Type Annotations for Facebook Flow, typically stripped out or + // transformed away before printing. + + case "TypeAnnotation": + case "TSTypeAnnotation": + if (n.typeAnnotation) { + return path$$1.call(print, "typeAnnotation"); + } + /* istanbul ignore next */ + + + return ""; + + case "TSTupleType": + case "TupleTypeAnnotation": + { + var typesField = n.type === "TSTupleType" ? "elementTypes" : "types"; + return group$1(concat$4(["[", indent$2(concat$4([softline$1, printArrayItems(path$$1, options, typesField, print)])), // TypeScript doesn't support trailing commas in tuple types + n.type === "TSTupleType" ? "" : ifBreak$1(shouldPrintComma(options) ? "," : ""), comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), softline$1, "]"])); + } + + case "ExistsTypeAnnotation": + return "*"; + + case "EmptyTypeAnnotation": + return "empty"; + + case "AnyTypeAnnotation": + return "any"; + + case "MixedTypeAnnotation": + return "mixed"; + + case "ArrayTypeAnnotation": + return concat$4([path$$1.call(print, "elementType"), "[]"]); + + case "BooleanTypeAnnotation": + return "boolean"; + + case "BooleanLiteralTypeAnnotation": + return "" + n.value; + + case "DeclareClass": + return printFlowDeclaration(path$$1, printClass(path$$1, options, print)); + + case "DeclareFunction": + // For TypeScript the DeclareFunction node shares the AST + // structure with FunctionDeclaration + if (n.params) { + return concat$4(["declare ", printFunctionDeclaration(path$$1, print, options), semi]); + } + + return printFlowDeclaration(path$$1, ["function ", path$$1.call(print, "id"), n.predicate ? " " : "", path$$1.call(print, "predicate"), semi]); + + case "DeclareModule": + return printFlowDeclaration(path$$1, ["module ", path$$1.call(print, "id"), " ", path$$1.call(print, "body")]); + + case "DeclareModuleExports": + return printFlowDeclaration(path$$1, ["module.exports", ": ", path$$1.call(print, "typeAnnotation"), semi]); + + case "DeclareVariable": + return printFlowDeclaration(path$$1, ["var ", path$$1.call(print, "id"), semi]); + + case "DeclareExportAllDeclaration": + return concat$4(["declare export * from ", path$$1.call(print, "source")]); + + case "DeclareExportDeclaration": + return concat$4(["declare ", printExportDeclaration(path$$1, options, print)]); + + case "DeclareOpaqueType": + case "OpaqueType": + { + parts.push("opaque type ", path$$1.call(print, "id"), path$$1.call(print, "typeParameters")); + + if (n.supertype) { + parts.push(": ", path$$1.call(print, "supertype")); + } + + if (n.impltype) { + parts.push(" = ", path$$1.call(print, "impltype")); + } + + parts.push(semi); + + if (n.type === "DeclareOpaqueType") { + return printFlowDeclaration(path$$1, parts); + } + + return concat$4(parts); + } + + case "FunctionTypeAnnotation": + case "TSFunctionType": + { + // FunctionTypeAnnotation is ambiguous: + // declare function foo(a: B): void; OR + // var A: (a: B) => void; + var _parent6 = path$$1.getParentNode(0); + + var _parentParent2 = path$$1.getParentNode(1); + + var _parentParentParent = path$$1.getParentNode(2); + + var isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !((_parent6.type === "ObjectTypeProperty" || _parent6.type === "ObjectTypeInternalSlot") && !getFlowVariance(_parent6) && !_parent6.optional && options.locStart(_parent6) === options.locStart(n) || _parent6.type === "ObjectTypeCallProperty" || _parentParentParent && _parentParentParent.type === "DeclareFunction"); + var needsColon = isArrowFunctionTypeAnnotation && (_parent6.type === "TypeAnnotation" || _parent6.type === "TSTypeAnnotation"); // Sadly we can't put it inside of FastPath::needsColon because we are + // printing ":" as part of the expression and it would put parenthesis + // around :( + + var needsParens = needsColon && isArrowFunctionTypeAnnotation && (_parent6.type === "TypeAnnotation" || _parent6.type === "TSTypeAnnotation") && _parentParent2.type === "ArrowFunctionExpression"; + + if (isObjectTypePropertyAFunction(_parent6, options)) { + isArrowFunctionTypeAnnotation = true; + needsColon = true; + } + + if (needsParens) { + parts.push("("); + } + + parts.push(printFunctionParams(path$$1, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true)); // The returnType is not wrapped in a TypeAnnotation, so the colon + // needs to be added separately. + + if (n.returnType || n.predicate || n.typeAnnotation) { + parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path$$1.call(print, "returnType"), path$$1.call(print, "predicate"), path$$1.call(print, "typeAnnotation")); + } + + if (needsParens) { + parts.push(")"); + } + + return group$1(concat$4(parts)); + } + + case "TSRestType": + return concat$4(["...", path$$1.call(print, "typeAnnotation")]); + + case "TSOptionalType": + return concat$4([path$$1.call(print, "typeAnnotation"), "?"]); + + case "FunctionTypeParam": + return concat$4([path$$1.call(print, "name"), printOptionalToken(path$$1), n.name ? ": " : "", path$$1.call(print, "typeAnnotation")]); + + case "GenericTypeAnnotation": + return concat$4([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]); + + case "DeclareInterface": + case "InterfaceDeclaration": + case "InterfaceTypeAnnotation": + { + if (n.type === "DeclareInterface" || isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push("interface"); + + if (n.type === "DeclareInterface" || n.type === "InterfaceDeclaration") { + parts.push(" ", path$$1.call(print, "id"), path$$1.call(print, "typeParameters")); + } + + if (n["extends"].length > 0) { + parts.push(group$1(indent$2(concat$4([line$3, "extends ", (n.extends.length === 1 ? identity$1 : indent$2)(join$2(concat$4([",", line$3]), path$$1.map(print, "extends")))])))); + } + + parts.push(" ", path$$1.call(print, "body")); + return group$1(concat$4(parts)); + } + + case "ClassImplements": + case "InterfaceExtends": + return concat$4([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]); + + case "TSIntersectionType": + case "IntersectionTypeAnnotation": + { + var types = path$$1.map(print, "types"); + var result = []; + var wasIndented = false; + + for (var _i2 = 0; _i2 < types.length; ++_i2) { + if (_i2 === 0) { + result.push(types[_i2]); + } else if (isObjectType(n.types[_i2 - 1]) && isObjectType(n.types[_i2])) { + // If both are objects, don't indent + result.push(concat$4([" & ", wasIndented ? indent$2(types[_i2]) : types[_i2]])); + } else if (!isObjectType(n.types[_i2 - 1]) && !isObjectType(n.types[_i2])) { + // If no object is involved, go to the next line if it breaks + result.push(indent$2(concat$4([" &", line$3, types[_i2]]))); + } else { + // If you go from object to non-object or vis-versa, then inline it + if (_i2 > 1) { + wasIndented = true; + } + + result.push(" & ", _i2 > 1 ? indent$2(types[_i2]) : types[_i2]); + } + } + + return group$1(concat$4(result)); + } + + case "TSUnionType": + case "UnionTypeAnnotation": + { + // single-line variation + // A | B | C + // multi-line variation + // | A + // | B + // | C + var _parent7 = path$$1.getParentNode(); + + var _parentParent3 = path$$1.getParentNode(1); // If there's a leading comment, the parent is doing the indentation + + + var shouldIndent = _parent7.type !== "TypeParameterInstantiation" && _parent7.type !== "TSTypeParameterInstantiation" && _parent7.type !== "GenericTypeAnnotation" && _parent7.type !== "TSTypeReference" && !(_parent7.type === "FunctionTypeParam" && !_parent7.name) && _parentParent3.type !== "TSTypeAssertionExpression" && !((_parent7.type === "TypeAlias" || _parent7.type === "VariableDeclarator") && hasLeadingOwnLineComment(options.originalText, n, options)); // { + // a: string + // } | null | void + // should be inlined and not be printed in the multi-line variant + + var shouldHug = shouldHugType(n); // We want to align the children but without its comment, so it looks like + // | child1 + // // comment + // | child2 + + var _printed2 = path$$1.map(function (typePath) { + var printedType = typePath.call(print); + + if (!shouldHug) { + printedType = align$1(2, printedType); + } + + return comments.printComments(typePath, function () { + return printedType; + }, options); + }, "types"); + + if (shouldHug) { + return join$2(" | ", _printed2); + } + + var code = concat$4([ifBreak$1(concat$4([shouldIndent ? line$3 : "", "| "])), join$2(concat$4([line$3, "| "]), _printed2)]); + var hasParens; + + if (n.type === "TSUnionType") { + var greatGrandParent = path$$1.getParentNode(2); + var greatGreatGrandParent = path$$1.getParentNode(3); + hasParens = greatGrandParent && greatGrandParent.type === "TSParenthesizedType" && greatGreatGrandParent && (greatGreatGrandParent.type === "TSUnionType" || greatGreatGrandParent.type === "TSIntersectionType"); + } else { + hasParens = needsParens_1(path$$1, options); + } + + if (hasParens) { + return group$1(concat$4([indent$2(code), softline$1])); + } + + return group$1(shouldIndent ? indent$2(code) : code); + } + + case "NullableTypeAnnotation": + return concat$4(["?", path$$1.call(print, "typeAnnotation")]); + + case "TSNullKeyword": + case "NullLiteralTypeAnnotation": + return "null"; + + case "ThisTypeAnnotation": + return "this"; + + case "NumberTypeAnnotation": + return "number"; + + case "ObjectTypeCallProperty": + if (n.static) { + parts.push("static "); + } + + parts.push(path$$1.call(print, "value")); + return concat$4(parts); + + case "ObjectTypeIndexer": + { + var _variance = getFlowVariance(n); + + return concat$4([_variance || "", "[", path$$1.call(print, "id"), n.id ? ": " : "", path$$1.call(print, "key"), "]: ", path$$1.call(print, "value")]); + } + + case "ObjectTypeProperty": + { + var _variance2 = getFlowVariance(n); + + var modifier = ""; + + if (n.proto) { + modifier = "proto "; + } else if (n.static) { + modifier = "static "; + } + + return concat$4([modifier, isGetterOrSetter(n) ? n.kind + " " : "", _variance2 || "", printPropertyKey(path$$1, options, print), printOptionalToken(path$$1), isFunctionNotation(n, options) ? "" : ": ", path$$1.call(print, "value")]); + } + + case "QualifiedTypeIdentifier": + return concat$4([path$$1.call(print, "qualification"), ".", path$$1.call(print, "id")]); + + case "StringLiteralTypeAnnotation": + return nodeStr(n, options); + + case "NumberLiteralTypeAnnotation": + assert.strictEqual(typeof n.value, "number"); + + if (n.extra != null) { + return printNumber$1(n.extra.raw); + } + + return printNumber$1(n.raw); + + case "StringTypeAnnotation": + return "string"; + + case "DeclareTypeAlias": + case "TypeAlias": + { + if (n.type === "DeclareTypeAlias" || isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + var _printed3 = printAssignmentRight(n.id, n.right, path$$1.call(print, "right"), options); + + parts.push("type ", path$$1.call(print, "id"), path$$1.call(print, "typeParameters"), " =", _printed3, semi); + return group$1(concat$4(parts)); + } + + case "TypeCastExpression": + { + var value = path$$1.getValue(); // Flow supports a comment syntax for specifying type annotations: https://flow.org/en/docs/types/comments/. + // Unfortunately, its parser doesn't differentiate between comment annotations and regular + // annotations when producing an AST. So to preserve parentheses around type casts that use + // the comment syntax, we need to hackily read the source itself to see if the code contains + // a type annotation comment. + // + // Note that we're able to use the normal whitespace regex here because the Flow parser has + // already deemed this AST node to be a type cast. Only the Babylon parser needs the + // non-line-break whitespace regex, which is why hasFlowShorthandAnnotationComment() is + // implemented differently. + + var commentSyntax = value && value.typeAnnotation && value.typeAnnotation.range && options.originalText.substring(value.typeAnnotation.range[0]).match(/^\/\*\s*:/); + return concat$4(["(", path$$1.call(print, "expression"), commentSyntax ? " /*" : "", ": ", path$$1.call(print, "typeAnnotation"), commentSyntax ? " */" : "", ")"]); + } + + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": + { + var _value = path$$1.getValue(); + + var commentStart = _value.range ? options.originalText.substring(0, _value.range[0]).lastIndexOf("/*") : -1; // As noted in the TypeCastExpression comments above, we're able to use a normal whitespace regex here + // because we know for sure that this is a type definition. + + var _commentSyntax = commentStart >= 0 && options.originalText.substring(commentStart).match(/^\/\*\s*::/); + + if (_commentSyntax) { + return concat$4(["/*:: ", printTypeParameters(path$$1, options, print, "params"), " */"]); + } + + return printTypeParameters(path$$1, options, print, "params"); + } + + case "TSTypeParameterDeclaration": + case "TSTypeParameterInstantiation": + return printTypeParameters(path$$1, options, print, "params"); + + case "TSTypeParameter": + case "TypeParameter": + { + var _parent8 = path$$1.getParentNode(); + + if (_parent8.type === "TSMappedType") { + parts.push("[", path$$1.call(print, "name")); + + if (n.constraint) { + parts.push(" in ", path$$1.call(print, "constraint")); + } + + parts.push("]"); + return concat$4(parts); + } + + var _variance3 = getFlowVariance(n); + + if (_variance3) { + parts.push(_variance3); + } + + parts.push(path$$1.call(print, "name")); + + if (n.bound) { + parts.push(": "); + parts.push(path$$1.call(print, "bound")); + } + + if (n.constraint) { + parts.push(" extends ", path$$1.call(print, "constraint")); + } + + if (n["default"]) { + parts.push(" = ", path$$1.call(print, "default")); + } + + return concat$4(parts); + } + + case "TypeofTypeAnnotation": + return concat$4(["typeof ", path$$1.call(print, "argument")]); + + case "VoidTypeAnnotation": + return "void"; + + case "InferredPredicate": + return "%checks"; + // Unhandled types below. If encountered, nodes of these types should + // be either left alone or desugared into AST types that are fully + // supported by the pretty-printer. + + case "DeclaredPredicate": + return concat$4(["%checks(", path$$1.call(print, "value"), ")"]); + + case "TSAbstractKeyword": + return "abstract"; + + case "TSAnyKeyword": + return "any"; + + case "TSAsyncKeyword": + return "async"; + + case "TSBooleanKeyword": + return "boolean"; + + case "TSConstKeyword": + return "const"; + + case "TSDeclareKeyword": + return "declare"; + + case "TSExportKeyword": + return "export"; + + case "TSNeverKeyword": + return "never"; + + case "TSNumberKeyword": + return "number"; + + case "TSObjectKeyword": + return "object"; + + case "TSProtectedKeyword": + return "protected"; + + case "TSPrivateKeyword": + return "private"; + + case "TSPublicKeyword": + return "public"; + + case "TSReadonlyKeyword": + return "readonly"; + + case "TSSymbolKeyword": + return "symbol"; + + case "TSStaticKeyword": + return "static"; + + case "TSStringKeyword": + return "string"; + + case "TSUndefinedKeyword": + return "undefined"; + + case "TSUnknownKeyword": + return "unknown"; + + case "TSVoidKeyword": + return "void"; + + case "TSAsExpression": + return concat$4([path$$1.call(print, "expression"), " as ", path$$1.call(print, "typeAnnotation")]); + + case "TSArrayType": + return concat$4([path$$1.call(print, "elementType"), "[]"]); + + case "TSPropertySignature": + { + if (n.export) { + parts.push("export "); + } + + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + if (n.computed) { + parts.push("["); + } + + parts.push(printPropertyKey(path$$1, options, print)); + + if (n.computed) { + parts.push("]"); + } + + parts.push(printOptionalToken(path$$1)); + + if (n.typeAnnotation) { + parts.push(": "); + parts.push(path$$1.call(print, "typeAnnotation")); + } // This isn't valid semantically, but it's in the AST so we can print it. + + + if (n.initializer) { + parts.push(" = ", path$$1.call(print, "initializer")); + } + + return concat$4(parts); + } + + case "TSParameterProperty": + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.export) { + parts.push("export "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + parts.push(path$$1.call(print, "parameter")); + return concat$4(parts); + + case "TSTypeReference": + return concat$4([path$$1.call(print, "typeName"), printTypeParameters(path$$1, options, print, "typeParameters")]); + + case "TSTypeQuery": + return concat$4(["typeof ", path$$1.call(print, "exprName")]); + + case "TSParenthesizedType": + { + return path$$1.call(print, "typeAnnotation"); + } + + case "TSIndexSignature": + { + var _parent9 = path$$1.getParentNode(); + + return concat$4([n.export ? "export " : "", n.accessibility ? concat$4([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", path$$1.call(print, "index"), "]: ", path$$1.call(print, "typeAnnotation"), _parent9.type === "ClassBody" ? semi : ""]); + } + + case "TSTypePredicate": + return concat$4([path$$1.call(print, "parameterName"), " is ", path$$1.call(print, "typeAnnotation")]); + + case "TSNonNullExpression": + return concat$4([path$$1.call(print, "expression"), "!"]); + + case "TSThisType": + return "this"; + + case "TSImportType": + return concat$4([!n.isTypeOf ? "" : "typeof ", "import(", path$$1.call(print, "parameter"), ")", !n.qualifier ? "" : concat$4([".", path$$1.call(print, "qualifier")]), printTypeParameters(path$$1, options, print, "typeParameters")]); + + case "TSLiteralType": + return path$$1.call(print, "literal"); + + case "TSIndexedAccessType": + return concat$4([path$$1.call(print, "objectType"), "[", path$$1.call(print, "indexType"), "]"]); + + case "TSConstructSignature": + case "TSConstructorType": + case "TSCallSignature": + { + if (n.type !== "TSCallSignature") { + parts.push("new "); + } + + parts.push(group$1(printFunctionParams(path$$1, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true))); + + if (n.typeAnnotation) { + var isType = n.type === "TSConstructorType"; + parts.push(isType ? " => " : ": ", path$$1.call(print, "typeAnnotation")); + } + + return concat$4(parts); + } + + case "TSTypeOperator": + return concat$4([n.operator, " ", path$$1.call(print, "typeAnnotation")]); + + case "TSMappedType": + return group$1(concat$4(["{", indent$2(concat$4([options.bracketSpacing ? line$3 : softline$1, n.readonlyToken ? concat$4([getTypeScriptMappedTypeModifier(n.readonlyToken, "readonly"), " "]) : "", printTypeScriptModifiers(path$$1, options, print), path$$1.call(print, "typeParameter"), n.questionToken ? getTypeScriptMappedTypeModifier(n.questionToken, "?") : "", ": ", path$$1.call(print, "typeAnnotation")])), comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), options.bracketSpacing ? line$3 : softline$1, "}"])); + + case "TSMethodSignature": + parts.push(n.accessibility ? concat$4([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path$$1.call(print, "key"), n.computed ? "]" : "", printOptionalToken(path$$1), printFunctionParams(path$$1, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true)); + + if (n.typeAnnotation) { + parts.push(": ", path$$1.call(print, "typeAnnotation")); + } + + return group$1(concat$4(parts)); + + case "TSNamespaceExportDeclaration": + parts.push("export as namespace ", path$$1.call(print, "name")); + + if (options.semi) { + parts.push(";"); + } + + return group$1(concat$4(parts)); + + case "TSEnumDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + if (n.modifiers) { + parts.push(printTypeScriptModifiers(path$$1, options, print)); + } + + if (n.const) { + parts.push("const "); + } + + parts.push("enum ", path$$1.call(print, "id"), " "); + + if (n.members.length === 0) { + parts.push(group$1(concat$4(["{", comments.printDanglingComments(path$$1, options), softline$1, "}"]))); + } else { + parts.push(group$1(concat$4(["{", indent$2(concat$4([hardline$3, printArrayItems(path$$1, options, "members", print), shouldPrintComma(options, "es5") ? "," : ""])), comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), hardline$3, "}"]))); + } + + return concat$4(parts); + + case "TSEnumMember": + parts.push(path$$1.call(print, "id")); + + if (n.initializer) { + parts.push(" = ", path$$1.call(print, "initializer")); + } + + return concat$4(parts); + + case "TSImportEqualsDeclaration": + parts.push(printTypeScriptModifiers(path$$1, options, print), "import ", path$$1.call(print, "name"), " = ", path$$1.call(print, "moduleReference")); + + if (options.semi) { + parts.push(";"); + } + + return group$1(concat$4(parts)); + + case "TSExternalModuleReference": + return concat$4(["require(", path$$1.call(print, "expression"), ")"]); + + case "TSModuleDeclaration": + { + var _parent10 = path$$1.getParentNode(); + + var isExternalModule = isLiteral(n.id); + var parentIsDeclaration = _parent10.type === "TSModuleDeclaration"; + var bodyIsDeclaration = n.body && n.body.type === "TSModuleDeclaration"; + + if (parentIsDeclaration) { + parts.push("."); + } else { + if (n.declare === true) { + parts.push("declare "); + } + + parts.push(printTypeScriptModifiers(path$$1, options, print)); + var textBetweenNodeAndItsId = options.originalText.slice(options.locStart(n), options.locStart(n.id)); // Global declaration looks like this: + // (declare)? global { ... } + + var isGlobalDeclaration = n.id.type === "Identifier" && n.id.name === "global" && !/namespace|module/.test(textBetweenNodeAndItsId); + + if (!isGlobalDeclaration) { + parts.push(isExternalModule || /\smodule\s/.test(textBetweenNodeAndItsId) ? "module " : "namespace "); + } + } + + parts.push(path$$1.call(print, "id")); + + if (bodyIsDeclaration) { + parts.push(path$$1.call(print, "body")); + } else if (n.body) { + parts.push(" {", indent$2(concat$4([line$3, path$$1.call(function (bodyPath) { + return comments.printDanglingComments(bodyPath, options, true); + }, "body"), group$1(path$$1.call(print, "body"))])), line$3, "}"); + } else { + parts.push(semi); + } + + return concat$4(parts); + } + + case "TSModuleBlock": + return path$$1.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); + + case "PrivateName": + return concat$4(["#", path$$1.call(print, "id")]); + + case "TSConditionalType": + return printTernaryOperator(path$$1, options, print, { + beforeParts: function beforeParts() { + return [path$$1.call(print, "checkType"), " ", "extends", " ", path$$1.call(print, "extendsType")]; + }, + afterParts: function afterParts() { + return []; + }, + shouldCheckJsx: false, + conditionalNodeType: "TSConditionalType", + consequentNodePropertyName: "trueType", + alternateNodePropertyName: "falseType", + testNodePropertyName: "checkType", + breakNested: true + }); + + case "TSInferType": + return concat$4(["infer", " ", path$$1.call(print, "typeParameter")]); + + case "InterpreterDirective": + parts.push("#!", n.value, hardline$3); + + if (isNextLineEmpty$2(options.originalText, n, options)) { + parts.push(hardline$3); + } + + return concat$4(parts); + + case "NGRoot": + return concat$4([].concat(path$$1.call(print, "node"), !n.node.comments || n.node.comments.length === 0 ? [] : concat$4([" //", n.node.comments[0].value.trimRight()]))); + + case "NGChainedExpression": + return group$1(join$2(concat$4([";", line$3]), path$$1.map(function (childPath) { + return hasNgSideEffect(childPath) ? print(childPath) : concat$4(["(", print(childPath), ")"]); + }, "expressions"))); + + case "NGEmptyExpression": + return ""; + + case "NGQuotedExpression": + return concat$4([n.prefix, ":", n.value]); + + case "NGMicrosyntax": + return concat$4(path$$1.map(function (childPath, index) { + return concat$4([index === 0 ? "" : isNgForOf(childPath) ? " " : concat$4([";", line$3]), print(childPath)]); + }, "body")); + + case "NGMicrosyntaxKey": + return /^[a-z_$][a-z0-9_$]*(-[a-z_$][a-z0-9_$])*$/i.test(n.name) ? n.name : JSON.stringify(n.name); + + case "NGMicrosyntaxExpression": + return concat$4([path$$1.call(print, "expression"), n.alias === null ? "" : concat$4([" as ", path$$1.call(print, "alias")])]); + + case "NGMicrosyntaxKeyedExpression": + return concat$4([path$$1.call(print, "key"), isNgForOf(path$$1) ? " " : ": ", path$$1.call(print, "expression")]); + + case "NGMicrosyntaxLet": + return concat$4(["let ", path$$1.call(print, "key"), n.value === null ? "" : concat$4([" = ", path$$1.call(print, "value")])]); + + case "NGMicrosyntaxAs": + return concat$4([path$$1.call(print, "key"), " as ", path$$1.call(print, "alias")]); + + default: + /* istanbul ignore next */ + throw new Error("unknown type: " + JSON.stringify(n.type)); + } +} +/** prefer `let hero of heros` over `let hero; of: heros` */ + + +function isNgForOf(path$$1) { + var node = path$$1.getValue(); + var index = path$$1.getName(); + var parentNode = path$$1.getParentNode(); + return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null; +} +/** identify if an angular expression seems to have side effects */ + + +function hasNgSideEffect(path$$1) { + return hasNode(path$$1.getValue(), function (node) { + switch (node.type) { + case undefined: + return false; + + case "CallExpression": + case "OptionalCallExpression": + case "AssignmentExpression": + return true; + } + }); +} + +function printStatementSequence(path$$1, options, print) { + var printed = []; + var bodyNode = path$$1.getNode(); + var isClass = bodyNode.type === "ClassBody"; + path$$1.map(function (stmtPath, i) { + var stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy + // "statements," it's safer simply to skip them. + + /* istanbul ignore if */ + + if (!stmt) { + return; + } // Skip printing EmptyStatement nodes to avoid leaving stray + // semicolons lying around. + + + if (stmt.type === "EmptyStatement") { + return; + } + + var stmtPrinted = print(stmtPath); + var text = options.originalText; + var parts = []; // in no-semi mode, prepend statement with semicolon if it might break ASI + // don't prepend the only JSX element in a program with semicolon + + if (!options.semi && !isClass && !isTheOnlyJSXElementInMarkdown(options, stmtPath) && stmtNeedsASIProtection(stmtPath, options)) { + if (stmt.comments && stmt.comments.some(function (comment) { + return comment.leading; + })) { + parts.push(print(stmtPath, { + needsSemi: true + })); + } else { + parts.push(";", stmtPrinted); + } + } else { + parts.push(stmtPrinted); + } + + if (!options.semi && isClass) { + if (classPropMayCauseASIProblems(stmtPath)) { + parts.push(";"); + } else if (stmt.type === "ClassProperty") { + var nextChild = bodyNode.body[i + 1]; + + if (classChildNeedsASIProtection(nextChild)) { + parts.push(";"); + } + } + } + + if (isNextLineEmpty$2(text, stmt, options) && !isLastStatement(stmtPath)) { + parts.push(hardline$3); + } + + printed.push(concat$4(parts)); + }); + return join$2(hardline$3, printed); +} + +function printPropertyKey(path$$1, options, print) { + var node = path$$1.getNode(); + var key = node.key; + + if (key.type === "Identifier" && !node.computed && options.parser === "json") { + // a -> "a" + return path$$1.call(function (keyPath) { + return comments.printComments(keyPath, function () { + return JSON.stringify(key.name); + }, options); + }, "key"); + } + + if (isStringLiteral(key) && isIdentifierName(key.value) && !node.computed && options.parser !== "json" && !(options.parser === "typescript" && node.type === "ClassProperty")) { + // 'a' -> a + return path$$1.call(function (keyPath) { + return comments.printComments(keyPath, function () { + return key.value; + }, options); + }, "key"); + } + + return path$$1.call(print, "key"); +} + +function printMethod(path$$1, options, print) { + var node = path$$1.getNode(); + var semi = options.semi ? ";" : ""; + var kind = node.kind; + var parts = []; + + if (node.type === "ObjectMethod" || node.type === "ClassMethod") { + node.value = node; + } + + if (node.value.async) { + parts.push("async "); + } + + if (!kind || kind === "init" || kind === "method" || kind === "constructor") { + if (node.value.generator) { + parts.push("*"); + } + } else { + assert.ok(kind === "get" || kind === "set"); + parts.push(kind, " "); + } + + var key = printPropertyKey(path$$1, options, print); + + if (node.computed) { + key = concat$4(["[", key, "]"]); + } + + parts.push(key, concat$4(path$$1.call(function (valuePath) { + return [printFunctionTypeParameters(valuePath, options, print), group$1(concat$4([printFunctionParams(valuePath, print, options), printReturnType(valuePath, print, options)]))]; + }, "value"))); + + if (!node.value.body || node.value.body.length === 0) { + parts.push(semi); + } else { + parts.push(" ", path$$1.call(print, "value", "body")); + } + + return concat$4(parts); +} + +function couldGroupArg(arg) { + return arg.type === "ObjectExpression" && (arg.properties.length > 0 || arg.comments) || arg.type === "ArrayExpression" && (arg.elements.length > 0 || arg.comments) || arg.type === "TSTypeAssertionExpression" || arg.type === "TSAsExpression" || arg.type === "FunctionExpression" || arg.type === "ArrowFunctionExpression" && !arg.returnType && (arg.body.type === "BlockStatement" || arg.body.type === "ArrowFunctionExpression" || arg.body.type === "ObjectExpression" || arg.body.type === "ArrayExpression" || arg.body.type === "CallExpression" || arg.body.type === "OptionalCallExpression" || arg.body.type === "ConditionalExpression" || isJSXNode(arg.body)); +} + +function shouldGroupLastArg(args) { + var lastArg = getLast$4(args); + var penultimateArg = getPenultimate$1(args); + return !hasLeadingComment(lastArg) && !hasTrailingComment(lastArg) && couldGroupArg(lastArg) && ( // If the last two arguments are of the same type, + // disable last element expansion. + !penultimateArg || penultimateArg.type !== lastArg.type); +} + +function shouldGroupFirstArg(args) { + if (args.length !== 2) { + return false; + } + + var firstArg = args[0]; + var secondArg = args[1]; + return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === "FunctionExpression" || firstArg.type === "ArrowFunctionExpression" && firstArg.body.type === "BlockStatement") && secondArg.type !== "FunctionExpression" && secondArg.type !== "ArrowFunctionExpression" && secondArg.type !== "ConditionalExpression" && !couldGroupArg(secondArg); +} + +function isSimpleFlowType(node) { + var flowTypeAnnotations = ["AnyTypeAnnotation", "NullLiteralTypeAnnotation", "GenericTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation", "BooleanTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringTypeAnnotation"]; + return node && flowTypeAnnotations.indexOf(node.type) !== -1 && !(node.type === "GenericTypeAnnotation" && node.typeParameters); +} + +var functionCompositionFunctionNames = new Set(["pipe", // RxJS, Ramda +"pipeP", // Ramda +"pipeK", // Ramda +"compose", // Ramda, Redux +"composeFlipped", // Not from any library, but common in Haskell, so supported +"composeP", // Ramda +"composeK", // Ramda +"flow", // Lodash +"flowRight", // Lodash +"connect", // Redux +"createSelector" // Reselect +]); + +function isFunctionCompositionFunction(node) { + switch (node.type) { + case "OptionalMemberExpression": + case "MemberExpression": + { + return isFunctionCompositionFunction(node.property); + } + + case "Identifier": + { + return functionCompositionFunctionNames.has(node.name); + } + + case "StringLiteral": + case "Literal": + { + return functionCompositionFunctionNames.has(node.value); + } + } +} + +function printArgumentsList(path$$1, options, print) { + var node = path$$1.getValue(); + var args = node.arguments; + + if (args.length === 0) { + return concat$4(["(", comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), ")"]); + } + + var anyArgEmptyLine = false; + var hasEmptyLineFollowingFirstArg = false; + var lastArgIndex = args.length - 1; + var printedArguments = path$$1.map(function (argPath, index) { + var arg = argPath.getNode(); + var parts = [print(argPath)]; + + if (index === lastArgIndex) {// do nothing + } else if (isNextLineEmpty$2(options.originalText, arg, options)) { + if (index === 0) { + hasEmptyLineFollowingFirstArg = true; + } + + anyArgEmptyLine = true; + parts.push(",", hardline$3, hardline$3); + } else { + parts.push(",", line$3); + } + + return concat$4(parts); + }, "arguments"); + var maybeTrailingComma = shouldPrintComma(options, "all") ? "," : ""; + + function allArgsBrokenOut() { + return group$1(concat$4(["(", indent$2(concat$4([line$3, concat$4(printedArguments)])), maybeTrailingComma, line$3, ")"]), { + shouldBreak: true + }); + } // We want to get + // pipe( + // x => x + 1, + // x => x - 1 + // ) + // here, but not + // process.stdout.pipe(socket) + + + if (isFunctionCompositionFunction(node.callee) && args.length > 1) { + return allArgsBrokenOut(); + } + + var shouldGroupFirst = shouldGroupFirstArg(args); + var shouldGroupLast = shouldGroupLastArg(args); + + if (shouldGroupFirst || shouldGroupLast) { + var shouldBreak = (shouldGroupFirst ? printedArguments.slice(1).some(willBreak$1) : printedArguments.slice(0, -1).some(willBreak$1)) || anyArgEmptyLine; // We want to print the last argument with a special flag + + var printedExpanded; + var i = 0; + path$$1.each(function (argPath) { + if (shouldGroupFirst && i === 0) { + printedExpanded = [concat$4([argPath.call(function (p) { + return print(p, { + expandFirstArg: true + }); + }), printedArguments.length > 1 ? "," : "", hasEmptyLineFollowingFirstArg ? hardline$3 : line$3, hasEmptyLineFollowingFirstArg ? hardline$3 : ""])].concat(printedArguments.slice(1)); + } + + if (shouldGroupLast && i === args.length - 1) { + printedExpanded = printedArguments.slice(0, -1).concat(argPath.call(function (p) { + return print(p, { + expandLastArg: true + }); + })); + } + + i++; + }, "arguments"); + var somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1); + return concat$4([somePrintedArgumentsWillBreak ? breakParent$2 : "", conditionalGroup$1([concat$4([ifBreak$1(indent$2(concat$4(["(", softline$1, concat$4(printedExpanded)])), concat$4(["(", concat$4(printedExpanded)])), somePrintedArgumentsWillBreak ? concat$4([ifBreak$1(maybeTrailingComma), softline$1]) : "", ")"]), shouldGroupFirst ? concat$4(["(", group$1(printedExpanded[0], { + shouldBreak: true + }), concat$4(printedExpanded.slice(1)), ")"]) : concat$4(["(", concat$4(printedArguments.slice(0, -1)), group$1(getLast$4(printedExpanded), { + shouldBreak: true + }), ")"]), allArgsBrokenOut()], { + shouldBreak + })]); + } + + return group$1(concat$4(["(", indent$2(concat$4([softline$1, concat$4(printedArguments)])), ifBreak$1(shouldPrintComma(options, "all") ? "," : ""), softline$1, ")"]), { + shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine + }); +} + +function printTypeAnnotation(path$$1, options, print) { + var node = path$$1.getValue(); + + if (!node.typeAnnotation) { + return ""; + } + + var parentNode = path$$1.getParentNode(); + var isDefinite = node.definite || parentNode && parentNode.type === "VariableDeclarator" && parentNode.definite; + var isFunctionDeclarationIdentifier = parentNode.type === "DeclareFunction" && parentNode.id === node; + + if (isFlowAnnotationComment(options.originalText, node.typeAnnotation, options)) { + return concat$4([" /*: ", path$$1.call(print, "typeAnnotation"), " */"]); + } + + return concat$4([isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", path$$1.call(print, "typeAnnotation")]); +} + +function printFunctionTypeParameters(path$$1, options, print) { + var fun = path$$1.getValue(); + + if (fun.typeArguments) { + return path$$1.call(print, "typeArguments"); + } + + if (fun.typeParameters) { + return path$$1.call(print, "typeParameters"); + } + + return ""; +} + +function printFunctionParams(path$$1, print, options, expandArg, printTypeParams) { + var fun = path$$1.getValue(); + var paramsField = fun.parameters ? "parameters" : "params"; + var typeParams = printTypeParams ? printFunctionTypeParameters(path$$1, options, print) : ""; + var printed = []; + + if (fun[paramsField]) { + printed = path$$1.map(print, paramsField); + } + + if (fun.rest) { + printed.push(concat$4(["...", path$$1.call(print, "rest")])); + } + + if (printed.length === 0) { + return concat$4([typeParams, "(", comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true, function (comment) { + return getNextNonSpaceNonCommentCharacter$1(options.originalText, comment, options.locEnd) === ")"; + }), ")"]); + } + + var lastParam = getLast$4(fun[paramsField]); // If the parent is a call with the first/last argument expansion and this is the + // params of the first/last argument, we dont want the arguments to break and instead + // want the whole expression to be on a new line. + // + // Good: Bad: + // verylongcall( verylongcall(( + // (a, b) => { a, + // } b, + // }) ) => { + // }) + + if (expandArg && !(fun[paramsField] && fun[paramsField].some(function (n) { + return n.comments; + }))) { + return group$1(concat$4([removeLines$1(typeParams), "(", join$2(", ", printed.map(removeLines$1)), ")"])); + } // Single object destructuring should hug + // + // function({ + // a, + // b, + // c + // }) {} + + + if (shouldHugArguments(fun)) { + return concat$4([typeParams, "(", join$2(", ", printed), ")"]); + } + + var parent = path$$1.getParentNode(); // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})` + + if (isTestCall(parent)) { + return concat$4([typeParams, "(", join$2(", ", printed), ")"]); + } + + var isFlowShorthandWithOneArg = (isObjectTypePropertyAFunction(parent, options) || isTypeAnnotationAFunction(parent, options) || parent.type === "TypeAlias" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || parent.type === "IntersectionTypeAnnotation" || parent.type === "FunctionTypeAnnotation" && parent.returnType === fun) && fun[paramsField].length === 1 && fun[paramsField][0].name === null && fun[paramsField][0].typeAnnotation && fun.typeParameters === null && isSimpleFlowType(fun[paramsField][0].typeAnnotation) && !fun.rest; + + if (isFlowShorthandWithOneArg) { + if (options.arrowParens === "always") { + return concat$4(["(", concat$4(printed), ")"]); + } + + return concat$4(printed); + } + + var canHaveTrailingComma = !(lastParam && lastParam.type === "RestElement") && !fun.rest; + return concat$4([typeParams, "(", indent$2(concat$4([softline$1, join$2(concat$4([",", line$3]), printed)])), ifBreak$1(canHaveTrailingComma && shouldPrintComma(options, "all") ? "," : ""), softline$1, ")"]); +} + +function shouldPrintParamsWithoutParens(path$$1, options) { + if (options.arrowParens === "always") { + return false; + } + + if (options.arrowParens === "avoid") { + var node = path$$1.getValue(); + return canPrintParamsWithoutParens(node); + } // Fallback default; should be unreachable + + + return false; +} + +function canPrintParamsWithoutParens(node) { + return node.params.length === 1 && !node.rest && !node.typeParameters && !hasDanglingComments(node) && node.params[0].type === "Identifier" && !node.params[0].typeAnnotation && !node.params[0].comments && !node.params[0].optional && !node.predicate && !node.returnType; +} + +function printFunctionDeclaration(path$$1, print, options) { + var n = path$$1.getValue(); + var parts = []; + + if (n.async) { + parts.push("async "); + } + + parts.push("function"); + + if (n.generator) { + parts.push("*"); + } + + if (n.id) { + parts.push(" ", path$$1.call(print, "id")); + } + + parts.push(printFunctionTypeParameters(path$$1, options, print), group$1(concat$4([printFunctionParams(path$$1, print, options), printReturnType(path$$1, print, options)])), n.body ? " " : "", path$$1.call(print, "body")); + return concat$4(parts); +} + +function printObjectMethod(path$$1, options, print) { + var objMethod = path$$1.getValue(); + var parts = []; + + if (objMethod.async) { + parts.push("async "); + } + + if (objMethod.generator) { + parts.push("*"); + } + + if (objMethod.method || objMethod.kind === "get" || objMethod.kind === "set") { + return printMethod(path$$1, options, print); + } + + var key = printPropertyKey(path$$1, options, print); + + if (objMethod.computed) { + parts.push("[", key, "]"); + } else { + parts.push(key); + } + + parts.push(printFunctionTypeParameters(path$$1, options, print), group$1(concat$4([printFunctionParams(path$$1, print, options), printReturnType(path$$1, print, options)])), " ", path$$1.call(print, "body")); + return concat$4(parts); +} + +function printReturnType(path$$1, print, options) { + var n = path$$1.getValue(); + var returnType = path$$1.call(print, "returnType"); + + if (n.returnType && isFlowAnnotationComment(options.originalText, n.returnType, options)) { + return concat$4([" /*: ", returnType, " */"]); + } + + var parts = [returnType]; // prepend colon to TypeScript type annotation + + if (n.returnType && n.returnType.typeAnnotation) { + parts.unshift(": "); + } + + if (n.predicate) { + // The return type will already add the colon, but otherwise we + // need to do it ourselves + parts.push(n.returnType ? " " : ": ", path$$1.call(print, "predicate")); + } + + return concat$4(parts); +} + +function printExportDeclaration(path$$1, options, print) { + var decl = path$$1.getValue(); + var semi = options.semi ? ";" : ""; + var parts = ["export "]; + var isDefault = decl["default"] || decl.type === "ExportDefaultDeclaration"; + + if (isDefault) { + parts.push("default "); + } + + parts.push(comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true)); + + if (needsHardlineAfterDanglingComment(decl)) { + parts.push(hardline$3); + } + + if (decl.declaration) { + parts.push(path$$1.call(print, "declaration")); + + if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSAbstractClassDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction") { + parts.push(semi); + } + } else { + if (decl.specifiers && decl.specifiers.length > 0) { + var specifiers = []; + var defaultSpecifiers = []; + var namespaceSpecifiers = []; + path$$1.each(function (specifierPath) { + var specifierType = path$$1.getValue().type; + + if (specifierType === "ExportSpecifier") { + specifiers.push(print(specifierPath)); + } else if (specifierType === "ExportDefaultSpecifier") { + defaultSpecifiers.push(print(specifierPath)); + } else if (specifierType === "ExportNamespaceSpecifier") { + namespaceSpecifiers.push(concat$4(["* as ", print(specifierPath)])); + } + }, "specifiers"); + var isNamespaceFollowed = namespaceSpecifiers.length !== 0 && specifiers.length !== 0; + var isDefaultFollowed = defaultSpecifiers.length !== 0 && (namespaceSpecifiers.length !== 0 || specifiers.length !== 0); + parts.push(decl.exportKind === "type" ? "type " : "", concat$4(defaultSpecifiers), concat$4([isDefaultFollowed ? ", " : ""]), concat$4(namespaceSpecifiers), concat$4([isNamespaceFollowed ? ", " : ""]), specifiers.length !== 0 ? group$1(concat$4(["{", indent$2(concat$4([options.bracketSpacing ? line$3 : softline$1, join$2(concat$4([",", line$3]), specifiers)])), ifBreak$1(shouldPrintComma(options) ? "," : ""), options.bracketSpacing ? line$3 : softline$1, "}"])) : ""); + } else { + parts.push("{}"); + } + + if (decl.source) { + parts.push(" from ", path$$1.call(print, "source")); + } + + parts.push(semi); + } + + return concat$4(parts); +} + +function printFlowDeclaration(path$$1, parts) { + var parentExportDecl = getParentExportDeclaration$1(path$$1); + + if (parentExportDecl) { + assert.strictEqual(parentExportDecl.type, "DeclareExportDeclaration"); + } else { + // If the parent node has type DeclareExportDeclaration, then it + // will be responsible for printing the "declare" token. Otherwise + // it needs to be printed with this non-exported declaration node. + parts.unshift("declare "); + } + + return concat$4(parts); +} + +function getFlowVariance(path$$1) { + if (!path$$1.variance) { + return null; + } // Babylon 7.0 currently uses variance node type, and flow should + // follow suit soon: + // https://github.com/babel/babel/issues/4722 + + + var variance = path$$1.variance.kind || path$$1.variance; + + switch (variance) { + case "plus": + return "+"; + + case "minus": + return "-"; + + default: + /* istanbul ignore next */ + return variance; + } +} + +function printTypeScriptModifiers(path$$1, options, print) { + var n = path$$1.getValue(); + + if (!n.modifiers || !n.modifiers.length) { + return ""; + } + + return concat$4([join$2(" ", path$$1.map(print, "modifiers")), " "]); +} + +function printTypeParameters(path$$1, options, print, paramsKey) { + var n = path$$1.getValue(); + + if (!n[paramsKey]) { + return ""; + } // for TypeParameterDeclaration typeParameters is a single node + + + if (!Array.isArray(n[paramsKey])) { + return path$$1.call(print, paramsKey); + } + + var grandparent = path$$1.getNode(2); + var isParameterInTestCall = grandparent != null && isTestCall(grandparent); + var shouldInline = isParameterInTestCall || n[paramsKey].length === 0 || n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === "GenericTypeAnnotation" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === "TSTypeReference" && shouldHugType(n[paramsKey][0].typeName) || n[paramsKey][0].type === "NullableTypeAnnotation"); + + if (shouldInline) { + return concat$4(["<", join$2(", ", path$$1.map(print, paramsKey)), ">"]); + } + + return group$1(concat$4(["<", indent$2(concat$4([softline$1, join$2(concat$4([",", line$3]), path$$1.map(print, paramsKey))])), ifBreak$1(options.parser !== "typescript" && shouldPrintComma(options, "all") ? "," : ""), softline$1, ">"])); +} + +function printClass(path$$1, options, print) { + var n = path$$1.getValue(); + var parts = []; + + if (n.type === "TSAbstractClassDeclaration") { + parts.push("abstract "); + } + + parts.push("class"); + + if (n.id) { + parts.push(" ", path$$1.call(print, "id")); + } + + parts.push(path$$1.call(print, "typeParameters")); + var partsGroup = []; + + if (n.superClass) { + var printed = concat$4(["extends ", path$$1.call(print, "superClass"), path$$1.call(print, "superTypeParameters")]); // Keep old behaviour of extends in same line + // If there is only on extends and there are not comments + + if ((!n.implements || n.implements.length === 0) && (!n.superClass.comments || n.superClass.comments.length === 0)) { + parts.push(concat$4([" ", path$$1.call(function (superClass) { + return comments.printComments(superClass, function () { + return printed; + }, options); + }, "superClass")])); + } else { + partsGroup.push(group$1(concat$4([line$3, path$$1.call(function (superClass) { + return comments.printComments(superClass, function () { + return printed; + }, options); + }, "superClass")]))); + } + } else if (n.extends && n.extends.length > 0) { + parts.push(" extends ", join$2(", ", path$$1.map(print, "extends"))); + } + + if (n["mixins"] && n["mixins"].length > 0) { + partsGroup.push(line$3, "mixins ", group$1(indent$2(join$2(concat$4([",", line$3]), path$$1.map(print, "mixins"))))); + } + + if (n["implements"] && n["implements"].length > 0) { + partsGroup.push(line$3, "implements", group$1(indent$2(concat$4([line$3, join$2(concat$4([",", line$3]), path$$1.map(print, "implements"))])))); + } + + if (partsGroup.length > 0) { + parts.push(group$1(indent$2(concat$4(partsGroup)))); + } + + if (n.body && n.body.comments && hasLeadingOwnLineComment(options.originalText, n.body, options)) { + parts.push(hardline$3); + } else { + parts.push(" "); + } + + parts.push(path$$1.call(print, "body")); + return parts; +} + +function printOptionalToken(path$$1) { + var node = path$$1.getValue(); + + if (!node.optional) { + return ""; + } + + if (node.type === "OptionalCallExpression" || node.type === "OptionalMemberExpression" && node.computed) { + return "?."; + } + + return "?"; +} + +function printMemberLookup(path$$1, options, print) { + var property = path$$1.call(print, "property"); + var n = path$$1.getValue(); + var optional = printOptionalToken(path$$1); + + if (!n.computed) { + return concat$4([optional, ".", property]); + } + + if (!n.property || isNumericLiteral(n.property)) { + return concat$4([optional, "[", property, "]"]); + } + + return group$1(concat$4([optional, "[", indent$2(concat$4([softline$1, property])), softline$1, "]"])); +} + +function printBindExpressionCallee(path$$1, options, print) { + return concat$4(["::", path$$1.call(print, "callee")]); +} // We detect calls on member expressions specially to format a +// common pattern better. The pattern we are looking for is this: +// +// arr +// .map(x => x + 1) +// .filter(x => x > 10) +// .some(x => x % 2) +// +// The way it is structured in the AST is via a nested sequence of +// MemberExpression and CallExpression. We need to traverse the AST +// and make groups out of it to print it in the desired way. + + +function printMemberChain(path$$1, options, print) { + // The first phase is to linearize the AST by traversing it down. + // + // a().b() + // has the following AST structure: + // CallExpression(MemberExpression(CallExpression(Identifier))) + // and we transform it into + // [Identifier, CallExpression, MemberExpression, CallExpression] + var printedNodes = []; // Here we try to retain one typed empty line after each call expression or + // the first group whether it is in parentheses or not + + function shouldInsertEmptyLineAfter(node) { + var originalText = options.originalText; + var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$2(originalText, node, options); + var nextChar = originalText.charAt(nextCharIndex); // if it is cut off by a parenthesis, we only account for one typed empty + // line after that parenthesis + + if (nextChar == ")") { + return isNextLineEmptyAfterIndex$1(originalText, nextCharIndex + 1, options); + } + + return isNextLineEmpty$2(originalText, node, options); + } + + function rec(path$$1) { + var node = path$$1.getValue(); + + if ((node.type === "CallExpression" || node.type === "OptionalCallExpression") && (isMemberish(node.callee) || node.callee.type === "CallExpression" || node.callee.type === "OptionalCallExpression")) { + printedNodes.unshift({ + node: node, + printed: concat$4([comments.printComments(path$$1, function () { + return concat$4([printOptionalToken(path$$1), printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]); + }, options), shouldInsertEmptyLineAfter(node) ? hardline$3 : ""]) + }); + path$$1.call(function (callee) { + return rec(callee); + }, "callee"); + } else if (isMemberish(node)) { + printedNodes.unshift({ + node: node, + needsParens: needsParens_1(path$$1, options), + printed: comments.printComments(path$$1, function () { + return node.type === "OptionalMemberExpression" || node.type === "MemberExpression" ? printMemberLookup(path$$1, options, print) : printBindExpressionCallee(path$$1, options, print); + }, options) + }); + path$$1.call(function (object) { + return rec(object); + }, "object"); + } else if (node.type === "TSNonNullExpression") { + printedNodes.unshift({ + node: node, + printed: comments.printComments(path$$1, function () { + return "!"; + }, options) + }); + path$$1.call(function (expression) { + return rec(expression); + }, "expression"); + } else { + printedNodes.unshift({ + node: node, + printed: path$$1.call(print) + }); + } + } // Note: the comments of the root node have already been printed, so we + // need to extract this first call without printing them as they would + // if handled inside of the recursive call. + + + var node = path$$1.getValue(); + printedNodes.unshift({ + node, + printed: concat$4([printOptionalToken(path$$1), printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]) + }); + path$$1.call(function (callee) { + return rec(callee); + }, "callee"); // Once we have a linear list of printed nodes, we want to create groups out + // of it. + // + // a().b.c().d().e + // will be grouped as + // [ + // [Identifier, CallExpression], + // [MemberExpression, MemberExpression, CallExpression], + // [MemberExpression, CallExpression], + // [MemberExpression], + // ] + // so that we can print it as + // a() + // .b.c() + // .d() + // .e + // The first group is the first node followed by + // - as many CallExpression as possible + // < fn()()() >.something() + // - as many array acessors as possible + // < fn()[0][1][2] >.something() + // - then, as many MemberExpression as possible but the last one + // < this.items >.something() + + var groups = []; + var currentGroup = [printedNodes[0]]; + var i = 1; + + for (; i < printedNodes.length; ++i) { + if (printedNodes[i].node.type === "TSNonNullExpression" || printedNodes[i].node.type === "OptionalCallExpression" || printedNodes[i].node.type === "CallExpression" || (printedNodes[i].node.type === "MemberExpression" || printedNodes[i].node.type === "OptionalMemberExpression") && printedNodes[i].node.computed && isNumericLiteral(printedNodes[i].node.property)) { + currentGroup.push(printedNodes[i]); + } else { + break; + } + } + + if (printedNodes[0].node.type !== "CallExpression" && printedNodes[0].node.type !== "OptionalCallExpression") { + for (; i + 1 < printedNodes.length; ++i) { + if (isMemberish(printedNodes[i].node) && isMemberish(printedNodes[i + 1].node)) { + currentGroup.push(printedNodes[i]); + } else { + break; + } + } + } + + groups.push(currentGroup); + currentGroup = []; // Then, each following group is a sequence of MemberExpression followed by + // a sequence of CallExpression. To compute it, we keep adding things to the + // group until we has seen a CallExpression in the past and reach a + // MemberExpression + + var hasSeenCallExpression = false; + + for (; i < printedNodes.length; ++i) { + if (hasSeenCallExpression && isMemberish(printedNodes[i].node)) { + // [0] should be appended at the end of the group instead of the + // beginning of the next one + if (printedNodes[i].node.computed && isNumericLiteral(printedNodes[i].node.property)) { + currentGroup.push(printedNodes[i]); + continue; + } + + groups.push(currentGroup); + currentGroup = []; + hasSeenCallExpression = false; + } + + if (printedNodes[i].node.type === "CallExpression" || printedNodes[i].node.type === "OptionalCallExpression") { + hasSeenCallExpression = true; + } + + currentGroup.push(printedNodes[i]); + + if (printedNodes[i].node.comments && printedNodes[i].node.comments.some(function (comment) { + return comment.trailing; + })) { + groups.push(currentGroup); + currentGroup = []; + hasSeenCallExpression = false; + } + } + + if (currentGroup.length > 0) { + groups.push(currentGroup); + } // There are cases like Object.keys(), Observable.of(), _.values() where + // they are the subject of all the chained calls and therefore should + // be kept on the same line: + // + // Object.keys(items) + // .filter(x => x) + // .map(x => x) + // + // In order to detect those cases, we use an heuristic: if the first + // node is an identifier with the name starting with a capital + // letter or just a sequence of _$. The rationale is that they are + // likely to be factories. + + + function isFactory(name) { + return /^[A-Z]|^[_$]+$/.test(name); + } // In case the Identifier is shorter than tab width, we can keep the + // first call in a single line, if it's an ExpressionStatement. + // + // d3.scaleLinear() + // .domain([0, 100]) + // .range([0, width]); + // + + + function isShort(name) { + return name.length <= options.tabWidth; + } + + function shouldNotWrap(groups) { + var parent = path$$1.getParentNode(); + var isExpression = parent && parent.type === "ExpressionStatement"; + var hasComputed = groups[1].length && groups[1][0].node.computed; + + if (groups[0].length === 1) { + var firstNode = groups[0][0].node; + return firstNode.type === "ThisExpression" || firstNode.type === "Identifier" && (isFactory(firstNode.name) || isExpression && isShort(firstNode.name) || hasComputed); + } + + var lastNode = getLast$4(groups[0]).node; + return (lastNode.type === "MemberExpression" || lastNode.type === "OptionalMemberExpression") && lastNode.property.type === "Identifier" && (isFactory(lastNode.property.name) || hasComputed); + } + + var shouldMerge = groups.length >= 2 && !groups[1][0].node.comments && shouldNotWrap(groups); + + function printGroup(printedGroup) { + var result = []; + + for (var _i3 = 0; _i3 < printedGroup.length; _i3++) { + // Checks if the next node (i.e. the parent node) needs parens + // and print accordingly + if (printedGroup[_i3 + 1] && printedGroup[_i3 + 1].needsParens) { + result.push("(", printedGroup[_i3].printed, printedGroup[_i3 + 1].printed, ")"); + _i3++; + } else { + result.push(printedGroup[_i3].printed); + } + } + + return concat$4(result); + } + + function printIndentedGroup(groups) { + if (groups.length === 0) { + return ""; + } + + return indent$2(group$1(concat$4([hardline$3, join$2(hardline$3, groups.map(printGroup))]))); + } + + var printedGroups = groups.map(printGroup); + var oneLine = concat$4(printedGroups); + var cutoff = shouldMerge ? 3 : 2; + var flatGroups = groups.slice(0, cutoff).reduce(function (res, group) { + return res.concat(group); + }, []); + var hasComment = flatGroups.slice(1, -1).some(function (node) { + return hasLeadingComment(node.node); + }) || flatGroups.slice(0, -1).some(function (node) { + return hasTrailingComment(node.node); + }) || groups[cutoff] && hasLeadingComment(groups[cutoff][0].node); // If we only have a single `.`, we shouldn't do anything fancy and just + // render everything concatenated together. + + if (groups.length <= cutoff && !hasComment) { + return group$1(oneLine); + } // Find out the last node in the first group and check if it has an + // empty line after + + + var lastNodeBeforeIndent = getLast$4(shouldMerge ? groups.slice(1, 2)[0] : groups[0]).node; + var shouldHaveEmptyLineBeforeIndent = lastNodeBeforeIndent.type !== "CallExpression" && lastNodeBeforeIndent.type !== "OptionalCallExpression" && shouldInsertEmptyLineAfter(lastNodeBeforeIndent); + var expanded = concat$4([printGroup(groups[0]), shouldMerge ? concat$4(groups.slice(1, 2).map(printGroup)) : "", shouldHaveEmptyLineBeforeIndent ? hardline$3 : "", printIndentedGroup(groups.slice(shouldMerge ? 2 : 1))]); + var callExpressions = printedNodes.map(function (_ref) { + var node = _ref.node; + return node; + }).filter(isCallOrOptionalCallExpression); // We don't want to print in one line if there's: + // * A comment. + // * 3 or more chained calls. + // * Any group but the last one has a hard line. + // If the last group is a function it's okay to inline if it fits. + + if (hasComment || callExpressions.length >= 3 || printedGroups.slice(0, -1).some(willBreak$1) || + /** + * scopes.filter(scope => scope.value !== '').map((scope, i) => { + * // multi line content + * }) + */ + function (lastGroupDoc, lastGroupNode) { + return isCallOrOptionalCallExpression(lastGroupNode) && willBreak$1(lastGroupDoc); + }(getLast$4(printedGroups), getLast$4(getLast$4(groups)).node) && callExpressions.slice(0, -1).some(function (n) { + return n.arguments.some(isFunctionOrArrowExpression); + })) { + return group$1(expanded); + } + + return concat$4([// We only need to check `oneLine` because if `expanded` is chosen + // that means that the parent group has already been broken + // naturally + willBreak$1(oneLine) || shouldHaveEmptyLineBeforeIndent ? breakParent$2 : "", conditionalGroup$1([oneLine, expanded])]); +} + +function isCallOrOptionalCallExpression(node) { + return node.type === "CallExpression" || node.type === "OptionalCallExpression"; +} + +function isJSXNode(node) { + return node.type === "JSXElement" || node.type === "JSXFragment" || node.type === "TSJsxFragment"; +} + +function isEmptyJSXElement(node) { + if (node.children.length === 0) { + return true; + } + + if (node.children.length > 1) { + return false; + } // if there is one text child and does not contain any meaningful text + // we can treat the element as empty. + + + var child = node.children[0]; + return isLiteral(child) && !isMeaningfulJSXText(child); +} // Only space, newline, carriage return, and tab are treated as whitespace +// inside JSX. + + +var jsxWhitespaceChars = " \n\r\t"; +var containsNonJsxWhitespaceRegex = new RegExp("[^" + jsxWhitespaceChars + "]"); +var matchJsxWhitespaceRegex = new RegExp("([" + jsxWhitespaceChars + "]+)"); // Meaningful if it contains non-whitespace characters, +// or it contains whitespace without a new line. + +function isMeaningfulJSXText(node) { + return isLiteral(node) && (containsNonJsxWhitespaceRegex.test(rawText(node)) || !/\n/.test(rawText(node))); +} + +function conditionalExpressionChainContainsJSX(node) { + return Boolean(getConditionalChainContents(node).find(isJSXNode)); +} // If we have nested conditional expressions, we want to print them in JSX mode +// if there's at least one JSXElement somewhere in the tree. +// +// A conditional expression chain like this should be printed in normal mode, +// because there aren't JSXElements anywhere in it: +// +// isA ? "A" : isB ? "B" : isC ? "C" : "Unknown"; +// +// But a conditional expression chain like this should be printed in JSX mode, +// because there is a JSXElement in the last ConditionalExpression: +// +// isA ? "A" : isB ? "B" : isC ? "C" : Unknown; +// +// This type of ConditionalExpression chain is structured like this in the AST: +// +// ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ..., +// } +// } +// } +// +// We want to traverse over that shape and convert it into a flat structure so +// that we can find if there's a JSXElement somewhere inside. + + +function getConditionalChainContents(node) { + // Given this code: + // + // // Using a ConditionalExpression as the consequent is uncommon, but should + // // be handled. + // A ? B : C ? D : E ? F ? G : H : I + // + // which has this AST: + // + // ConditionalExpression { + // test: Identifier(A), + // consequent: Identifier(B), + // alternate: ConditionalExpression { + // test: Identifier(C), + // consequent: Identifier(D), + // alternate: ConditionalExpression { + // test: Identifier(E), + // consequent: ConditionalExpression { + // test: Identifier(F), + // consequent: Identifier(G), + // alternate: Identifier(H), + // }, + // alternate: Identifier(I), + // } + // } + // } + // + // we should return this Array: + // + // [ + // Identifier(A), + // Identifier(B), + // Identifier(C), + // Identifier(D), + // Identifier(E), + // Identifier(F), + // Identifier(G), + // Identifier(H), + // Identifier(I) + // ]; + // + // This loses the information about whether each node was the test, + // consequent, or alternate, but we don't care about that here- we are only + // flattening this structure to find if there's any JSXElements inside. + var nonConditionalExpressions = []; + + function recurse(node) { + if (node.type === "ConditionalExpression") { + recurse(node.test); + recurse(node.consequent); + recurse(node.alternate); + } else { + nonConditionalExpressions.push(node); + } + } + + recurse(node); + return nonConditionalExpressions; +} // Detect an expression node representing `{" "}` + + +function isJSXWhitespaceExpression(node) { + return node.type === "JSXExpressionContainer" && isLiteral(node.expression) && node.expression.value === " " && !node.expression.comments; +} + +function separatorNoWhitespace(isFacebookTranslationTag, child, childNode, nextNode) { + if (isFacebookTranslationTag) { + return ""; + } + + if (childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement) { + return child.length === 1 ? softline$1 : hardline$3; + } + + return softline$1; +} + +function separatorWithWhitespace(isFacebookTranslationTag, child, childNode, nextNode) { + if (isFacebookTranslationTag) { + return hardline$3; + } + + if (child.length === 1) { + return childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement ? hardline$3 : softline$1; + } + + return hardline$3; +} // JSX Children are strange, mostly for two reasons: +// 1. JSX reads newlines into string values, instead of skipping them like JS +// 2. up to one whitespace between elements within a line is significant, +// but not between lines. +// +// Leading, trailing, and lone whitespace all need to +// turn themselves into the rather ugly `{' '}` when breaking. +// +// We print JSX using the `fill` doc primitive. +// This requires that we give it an array of alternating +// content and whitespace elements. +// To ensure this we add dummy `""` content elements as needed. + + +function printJSXChildren(path$$1, options, print, jsxWhitespace, isFacebookTranslationTag) { + var n = path$$1.getValue(); + var children = []; // using `map` instead of `each` because it provides `i` + + path$$1.map(function (childPath, i) { + var child = childPath.getValue(); + + if (isLiteral(child)) { + var text = rawText(child); // Contains a non-whitespace character + + if (isMeaningfulJSXText(child)) { + var words = text.split(matchJsxWhitespaceRegex); // Starts with whitespace + + if (words[0] === "") { + children.push(""); + words.shift(); + + if (/\n/.test(words[0])) { + var next = n.children[i + 1]; + children.push(separatorWithWhitespace(isFacebookTranslationTag, words[1], child, next)); + } else { + children.push(jsxWhitespace); + } + + words.shift(); + } + + var endWhitespace; // Ends with whitespace + + if (getLast$4(words) === "") { + words.pop(); + endWhitespace = words.pop(); + } // This was whitespace only without a new line. + + + if (words.length === 0) { + return; + } + + words.forEach(function (word, i) { + if (i % 2 === 1) { + children.push(line$3); + } else { + children.push(word); + } + }); + + if (endWhitespace !== undefined) { + if (/\n/.test(endWhitespace)) { + var _next = n.children[i + 1]; + children.push(separatorWithWhitespace(isFacebookTranslationTag, getLast$4(children), child, _next)); + } else { + children.push(jsxWhitespace); + } + } else { + var _next2 = n.children[i + 1]; + children.push(separatorNoWhitespace(isFacebookTranslationTag, getLast$4(children), child, _next2)); + } + } else if (/\n/.test(text)) { + // Keep (up to one) blank line between tags/expressions/text. + // Note: We don't keep blank lines between text elements. + if (text.match(/\n/g).length > 1) { + children.push(""); + children.push(hardline$3); + } + } else { + children.push(""); + children.push(jsxWhitespace); + } + } else { + var printedChild = print(childPath); + children.push(printedChild); + var _next3 = n.children[i + 1]; + + var directlyFollowedByMeaningfulText = _next3 && isMeaningfulJSXText(_next3); + + if (directlyFollowedByMeaningfulText) { + var firstWord = rawText(_next3).trim().split(matchJsxWhitespaceRegex)[0]; + children.push(separatorNoWhitespace(isFacebookTranslationTag, firstWord, child, _next3)); + } else { + children.push(hardline$3); + } + } + }, "children"); + return children; +} // JSX expands children from the inside-out, instead of the outside-in. +// This is both to break children before attributes, +// and to ensure that when children break, their parents do as well. +// +// Any element that is written without any newlines and fits on a single line +// is left that way. +// Not only that, any user-written-line containing multiple JSX siblings +// should also be kept on one line if possible, +// so each user-written-line is wrapped in its own group. +// +// Elements that contain newlines or don't fit on a single line (recursively) +// are fully-split, using hardline and shouldBreak: true. +// +// To support that case properly, all leading and trailing spaces +// are stripped from the list of children, and replaced with a single hardline. + + +function printJSXElement(path$$1, options, print) { + var n = path$$1.getValue(); // Turn
into
+ + if (n.type === "JSXElement" && isEmptyJSXElement(n)) { + n.openingElement.selfClosing = true; + return path$$1.call(print, "openingElement"); + } + + var openingLines = n.type === "JSXElement" ? path$$1.call(print, "openingElement") : path$$1.call(print, "openingFragment"); + var closingLines = n.type === "JSXElement" ? path$$1.call(print, "closingElement") : path$$1.call(print, "closingFragment"); + + if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) { + return concat$4([openingLines, concat$4(path$$1.map(print, "children")), closingLines]); + } // Convert `{" "}` to text nodes containing a space. + // This makes it easy to turn them into `jsxWhitespace` which + // can then print as either a space or `{" "}` when breaking. + + + n.children = n.children.map(function (child) { + if (isJSXWhitespaceExpression(child)) { + return { + type: "JSXText", + value: " ", + raw: " " + }; + } + + return child; + }); + var containsTag = n.children.filter(isJSXNode).length > 0; + var containsMultipleExpressions = n.children.filter(function (child) { + return child.type === "JSXExpressionContainer"; + }).length > 1; + var containsMultipleAttributes = n.type === "JSXElement" && n.openingElement.attributes.length > 1; // Record any breaks. Should never go from true to false, only false to true. + + var forcedBreak = willBreak$1(openingLines) || containsTag || containsMultipleAttributes || containsMultipleExpressions; + var rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}'; + var jsxWhitespace = ifBreak$1(concat$4([rawJsxWhitespace, softline$1]), " "); + var isFacebookTranslationTag = n.openingElement && n.openingElement.name && n.openingElement.name.name === "fbt"; + var children = printJSXChildren(path$$1, options, print, jsxWhitespace, isFacebookTranslationTag); + var containsText = n.children.filter(function (child) { + return isMeaningfulJSXText(child); + }).length > 0; // We can end up we multiple whitespace elements with empty string + // content between them. + // We need to remove empty whitespace and softlines before JSX whitespace + // to get the correct output. + + for (var i = children.length - 2; i >= 0; i--) { + var isPairOfEmptyStrings = children[i] === "" && children[i + 1] === ""; + var isPairOfHardlines = children[i] === hardline$3 && children[i + 1] === "" && children[i + 2] === hardline$3; + var isLineFollowedByJSXWhitespace = (children[i] === softline$1 || children[i] === hardline$3) && children[i + 1] === "" && children[i + 2] === jsxWhitespace; + var isJSXWhitespaceFollowedByLine = children[i] === jsxWhitespace && children[i + 1] === "" && (children[i + 2] === softline$1 || children[i + 2] === hardline$3); + var isDoubleJSXWhitespace = children[i] === jsxWhitespace && children[i + 1] === "" && children[i + 2] === jsxWhitespace; + var isPairOfHardOrSoftLines = children[i] === softline$1 && children[i + 1] === "" && children[i + 2] === hardline$3 || children[i] === hardline$3 && children[i + 1] === "" && children[i + 2] === softline$1; + + if (isPairOfHardlines && containsText || isPairOfEmptyStrings || isLineFollowedByJSXWhitespace || isDoubleJSXWhitespace || isPairOfHardOrSoftLines) { + children.splice(i, 2); + } else if (isJSXWhitespaceFollowedByLine) { + children.splice(i + 1, 2); + } + } // Trim trailing lines (or empty strings) + + + while (children.length && (isLineNext$1(getLast$4(children)) || isEmpty$1(getLast$4(children)))) { + children.pop(); + } // Trim leading lines (or empty strings) + + + while (children.length && (isLineNext$1(children[0]) || isEmpty$1(children[0])) && (isLineNext$1(children[1]) || isEmpty$1(children[1]))) { + children.shift(); + children.shift(); + } // Tweak how we format children if outputting this element over multiple lines. + // Also detect whether we will force this element to output over multiple lines. + + + var multilineChildren = []; + children.forEach(function (child, i) { + // There are a number of situations where we need to ensure we display + // whitespace as `{" "}` when outputting this element over multiple lines. + if (child === jsxWhitespace) { + if (i === 1 && children[i - 1] === "") { + if (children.length === 2) { + // Solitary whitespace + multilineChildren.push(rawJsxWhitespace); + return; + } // Leading whitespace + + + multilineChildren.push(concat$4([rawJsxWhitespace, hardline$3])); + return; + } else if (i === children.length - 1) { + // Trailing whitespace + multilineChildren.push(rawJsxWhitespace); + return; + } else if (children[i - 1] === "" && children[i - 2] === hardline$3) { + // Whitespace after line break + multilineChildren.push(rawJsxWhitespace); + return; + } + } + + multilineChildren.push(child); + + if (willBreak$1(child)) { + forcedBreak = true; + } + }); // If there is text we use `fill` to fit as much onto each line as possible. + // When there is no text (just tags and expressions) we use `group` + // to output each on a separate line. + + var content = containsText ? fill$2(multilineChildren) : group$1(concat$4(multilineChildren), { + shouldBreak: true + }); + var multiLineElem = group$1(concat$4([openingLines, indent$2(concat$4([hardline$3, content])), hardline$3, closingLines])); + + if (forcedBreak) { + return multiLineElem; + } + + return conditionalGroup$1([group$1(concat$4([openingLines, concat$4(children), closingLines])), multiLineElem]); +} + +function maybeWrapJSXElementInParens(path$$1, elem) { + var parent = path$$1.getParentNode(); + + if (!parent) { + return elem; + } + + var NO_WRAP_PARENTS = { + ArrayExpression: true, + JSXAttribute: true, + JSXElement: true, + JSXExpressionContainer: true, + JSXFragment: true, + TSJsxFragment: true, + ExpressionStatement: true, + CallExpression: true, + OptionalCallExpression: true, + ConditionalExpression: true, + JsExpressionRoot: true + }; + + if (NO_WRAP_PARENTS[parent.type]) { + return elem; + } + + var shouldBreak = matchAncestorTypes$1(path$$1, ["ArrowFunctionExpression", "CallExpression", "JSXExpressionContainer"]); + return group$1(concat$4([ifBreak$1("("), indent$2(concat$4([softline$1, elem])), softline$1, ifBreak$1(")")]), { + shouldBreak + }); +} + +function isBinaryish(node) { + return node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression"; +} + +function isMemberish(node) { + return node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "BindExpression" && node.object; +} + +function shouldInlineLogicalExpression(node) { + if (node.type !== "LogicalExpression") { + return false; + } + + if (node.right.type === "ObjectExpression" && node.right.properties.length !== 0) { + return true; + } + + if (node.right.type === "ArrayExpression" && node.right.elements.length !== 0) { + return true; + } + + if (isJSXNode(node.right)) { + return true; + } + + return false; +} // For binary expressions to be consistent, we need to group +// subsequent operators with the same precedence level under a single +// group. Otherwise they will be nested such that some of them break +// onto new lines but not all. Operators with the same precedence +// level should either all break or not. Because we group them by +// precedence level and the AST is structured based on precedence +// level, things are naturally broken up correctly, i.e. `&&` is +// broken before `+`. + + +function printBinaryishExpressions(path$$1, print, options, isNested, isInsideParenthesis) { + var parts = []; + var node = path$$1.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same. + + if (isBinaryish(node)) { + // Put all operators with the same precedence level in the same + // group. The reason we only need to do this with the `left` + // expression is because given an expression like `1 + 2 - 3`, it + // is always parsed like `((1 + 2) - 3)`, meaning the `left` side + // is where the rest of the expression will exist. Binary + // expressions on the right side mean they have a difference + // precedence level and should be treated as a separate group, so + // print them normally. (This doesn't hold for the `**` operator, + // which is unique in that it is right-associative.) + if (shouldFlatten$1(node.operator, node.left.operator)) { + // Flatten them out by recursively calling this function. + parts = parts.concat(path$$1.call(function (left) { + return printBinaryishExpressions(left, print, options, + /* isNested */ + true, isInsideParenthesis); + }, "left")); + } else { + parts.push(path$$1.call(print, "left")); + } + + var shouldInline = shouldInlineLogicalExpression(node); + var lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options.parser === "__vue_expression") && !hasLeadingOwnLineComment(options.originalText, node.right, options); + var operator = node.type === "NGPipeExpression" ? "|" : node.operator; + var rightSuffix = node.type === "NGPipeExpression" && node.arguments.length !== 0 ? group$1(indent$2(concat$4([softline$1, ": ", join$2(concat$4([softline$1, ":", ifBreak$1(" ")]), path$$1.map(print, "arguments").map(function (arg) { + return align$1(2, group$1(arg)); + }))]))) : ""; + var right = shouldInline ? concat$4([operator, " ", path$$1.call(print, "right"), rightSuffix]) : concat$4([lineBeforeOperator ? softline$1 : "", operator, lineBeforeOperator ? " " : line$3, path$$1.call(print, "right"), rightSuffix]); // If there's only a single binary expression, we want to create a group + // in order to avoid having a small right part like -1 be on its own line. + + var parent = path$$1.getParentNode(); + var shouldGroup = !(isInsideParenthesis && node.type === "LogicalExpression") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type; + parts.push(" ", shouldGroup ? group$1(right) : right); // The root comments are already printed, but we need to manually print + // the other ones since we don't call the normal print on BinaryExpression, + // only for the left and right parts + + if (isNested && node.comments) { + parts = comments.printComments(path$$1, function () { + return concat$4(parts); + }, options); + } + } else { + // Our stopping case. Simply print the node normally. + parts.push(path$$1.call(print)); + } + + return parts; +} + +function printAssignmentRight(leftNode, rightNode, printedRight, options) { + if (hasLeadingOwnLineComment(options.originalText, rightNode, options)) { + return indent$2(concat$4([hardline$3, printedRight])); + } + + var canBreak = isBinaryish(rightNode) && !shouldInlineLogicalExpression(rightNode) || rightNode.type === "ConditionalExpression" && isBinaryish(rightNode.test) && !shouldInlineLogicalExpression(rightNode.test) || rightNode.type === "StringLiteralTypeAnnotation" || rightNode.type === "ClassExpression" && rightNode.decorators && rightNode.decorators.length || (leftNode.type === "Identifier" || isStringLiteral(leftNode) || leftNode.type === "MemberExpression") && (isStringLiteral(rightNode) || isMemberExpressionChain(rightNode)) && // do not put values on a separate line from the key in json + options.parser !== "json" && options.parser !== "json5"; + + if (canBreak) { + return group$1(indent$2(concat$4([line$3, printedRight]))); + } + + return concat$4([" ", printedRight]); +} + +function printAssignment(leftNode, printedLeft, operator, rightNode, printedRight, options) { + if (!rightNode) { + return printedLeft; + } + + var printed = printAssignmentRight(leftNode, rightNode, printedRight, options); + return group$1(concat$4([printedLeft, operator, printed])); +} + +function adjustClause(node, clause, forceSpace) { + if (node.type === "EmptyStatement") { + return ";"; + } + + if (node.type === "BlockStatement" || forceSpace) { + return concat$4([" ", clause]); + } + + return indent$2(concat$4([line$3, clause])); +} + +function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) { + var raw = rawText(node); + var isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral"; + return printString$1(raw, options, isDirectiveLiteral); +} + +function printRegex(node) { + var flags = node.flags.split("").sort().join(""); + return `/${node.pattern}/${flags}`; +} + +function isLastStatement(path$$1) { + var parent = path$$1.getParentNode(); + + if (!parent) { + return true; + } + + var node = path$$1.getValue(); + var body = (parent.body || parent.consequent).filter(function (stmt) { + return stmt.type !== "EmptyStatement"; + }); + return body && body[body.length - 1] === node; +} + +function hasLeadingComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.leading; + }); +} + +function hasTrailingComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.trailing; + }); +} + +function hasLeadingOwnLineComment(text, node, options) { + if (isJSXNode(node)) { + return hasNodeIgnoreComment$1(node); + } + + var res = node.comments && node.comments.some(function (comment) { + return comment.leading && hasNewline$2(text, options.locEnd(comment)); + }); + return res; +} + +function hasNakedLeftSide(node) { + return node.type === "AssignmentExpression" || node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression" || node.type === "ConditionalExpression" || node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "BindExpression" || node.type === "UpdateExpression" && !node.prefix || node.type === "TSNonNullExpression"; +} + +function isFlowAnnotationComment(text, typeAnnotation, options) { + var start = options.locStart(typeAnnotation); + var end = skipWhitespace$1(text, options.locEnd(typeAnnotation)); + return text.substr(start, 2) === "/*" && text.substr(end, 2) === "*/"; +} + +function getLeftSide(node) { + if (node.expressions) { + return node.expressions[0]; + } + + return node.left || node.test || node.callee || node.object || node.tag || node.argument || node.expression; +} + +function getLeftSidePathName(path$$1, node) { + if (node.expressions) { + return ["expressions", 0]; + } + + if (node.left) { + return ["left"]; + } + + if (node.test) { + return ["test"]; + } + + if (node.object) { + return ["object"]; + } + + if (node.callee) { + return ["callee"]; + } + + if (node.tag) { + return ["tag"]; + } + + if (node.argument) { + return ["argument"]; + } + + if (node.expression) { + return ["expression"]; + } + + throw new Error("Unexpected node has no left side", node); +} + +function exprNeedsASIProtection(path$$1, options) { + var node = path$$1.getValue(); + var maybeASIProblem = needsParens_1(path$$1, options) || node.type === "ParenthesizedExpression" || node.type === "TypeCastExpression" || node.type === "ArrowFunctionExpression" && !shouldPrintParamsWithoutParens(path$$1, options) || node.type === "ArrayExpression" || node.type === "ArrayPattern" || node.type === "UnaryExpression" && node.prefix && (node.operator === "+" || node.operator === "-") || node.type === "TemplateLiteral" || node.type === "TemplateElement" || isJSXNode(node) || node.type === "BindExpression" && !node.object || node.type === "RegExpLiteral" || node.type === "Literal" && node.pattern || node.type === "Literal" && node.regex; + + if (maybeASIProblem) { + return true; + } + + if (!hasNakedLeftSide(node)) { + return false; + } + + return path$$1.call.apply(path$$1, [function (childPath) { + return exprNeedsASIProtection(childPath, options); + }].concat(getLeftSidePathName(path$$1, node))); +} + +function stmtNeedsASIProtection(path$$1, options) { + var node = path$$1.getNode(); + + if (node.type !== "ExpressionStatement") { + return false; + } + + return path$$1.call(function (childPath) { + return exprNeedsASIProtection(childPath, options); + }, "expression"); +} + +function classPropMayCauseASIProblems(path$$1) { + var node = path$$1.getNode(); + + if (node.type !== "ClassProperty") { + return false; + } + + var name = node.key && node.key.name; // this isn't actually possible yet with most parsers available today + // so isn't properly tested yet. + + if ((name === "static" || name === "get" || name === "set") && !node.value && !node.typeAnnotation) { + return true; + } +} + +function classChildNeedsASIProtection(node) { + if (!node) { + return; + } + + if (node.static || node.accessibility // TypeScript + ) { + return false; + } + + if (!node.computed) { + var name = node.key && node.key.name; + + if (name === "in" || name === "instanceof") { + return true; + } + } + + switch (node.type) { + case "ClassProperty": + case "TSAbstractClassProperty": + return node.computed; + + case "MethodDefinition": // Flow + + case "TSAbstractMethodDefinition": // TypeScript + + case "ClassMethod": + { + // Babylon + var isAsync = node.value ? node.value.async : node.async; + var isGenerator = node.value ? node.value.generator : node.generator; + + if (isAsync || node.kind === "get" || node.kind === "set") { + return false; + } + + if (node.computed || isGenerator) { + return true; + } + + return false; + } + + default: + /* istanbul ignore next */ + return false; + } +} // This recurses the return argument, looking for the first token +// (the leftmost leaf node) and, if it (or its parents) has any +// leadingComments, returns true (so it can be wrapped in parens). + + +function returnArgumentHasLeadingComment(options, argument) { + if (hasLeadingOwnLineComment(options.originalText, argument, options)) { + return true; + } + + if (hasNakedLeftSide(argument)) { + var leftMost = argument; + var newLeftMost; + + while (newLeftMost = getLeftSide(leftMost)) { + leftMost = newLeftMost; + + if (hasLeadingOwnLineComment(options.originalText, leftMost, options)) { + return true; + } + } + } + + return false; +} + +function isMemberExpressionChain(node) { + if (node.type !== "MemberExpression" && node.type !== "OptionalMemberExpression") { + return false; + } + + if (node.object.type === "Identifier") { + return true; + } + + return isMemberExpressionChain(node.object); +} // Hack to differentiate between the following two which have the same ast +// type T = { method: () => void }; +// type T = { method(): void }; + + +function isObjectTypePropertyAFunction(node, options) { + return (node.type === "ObjectTypeProperty" || node.type === "ObjectTypeInternalSlot") && node.value.type === "FunctionTypeAnnotation" && !node.static && !isFunctionNotation(node, options); +} // TODO: This is a bad hack and we need a better way to distinguish between +// arrow functions and otherwise + + +function isFunctionNotation(node, options) { + return isGetterOrSetter(node) || sameLocStart(node, node.value, options); +} + +function isGetterOrSetter(node) { + return node.kind === "get" || node.kind === "set"; +} + +function sameLocStart(nodeA, nodeB, options) { + return options.locStart(nodeA) === options.locStart(nodeB); +} // Hack to differentiate between the following two which have the same ast +// declare function f(a): void; +// var f: (a) => void; + + +function isTypeAnnotationAFunction(node, options) { + return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options); +} + +function isNodeStartingWithDeclare(node, options) { + if (!(options.parser === "flow" || options.parser === "typescript")) { + return false; + } + + return options.originalText.slice(0, options.locStart(node)).match(/declare[ \t]*$/) || options.originalText.slice(node.range[0], node.range[1]).startsWith("declare "); +} + +function shouldHugType(node) { + if (isSimpleFlowType(node) || isObjectType(node)) { + return true; + } + + if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") { + var voidCount = node.types.filter(function (n) { + return n.type === "VoidTypeAnnotation" || n.type === "TSVoidKeyword" || n.type === "NullLiteralTypeAnnotation" || n.type === "TSNullKeyword"; + }).length; + var objectCount = node.types.filter(function (n) { + return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral" || // This is a bit aggressive but captures Array<{x}> + n.type === "GenericTypeAnnotation" || n.type === "TSTypeReference"; + }).length; + + if (node.types.length - 1 === voidCount && objectCount > 0) { + return true; + } + } + + return false; +} + +function shouldHugArguments(fun) { + return fun && fun.params && fun.params.length === 1 && !fun.params[0].comments && (fun.params[0].type === "ObjectPattern" || fun.params[0].type === "ArrayPattern" || fun.params[0].type === "Identifier" && fun.params[0].typeAnnotation && (fun.params[0].typeAnnotation.type === "TypeAnnotation" || fun.params[0].typeAnnotation.type === "TSTypeAnnotation") && isObjectType(fun.params[0].typeAnnotation.typeAnnotation) || fun.params[0].type === "FunctionTypeParam" && isObjectType(fun.params[0].typeAnnotation) || fun.params[0].type === "AssignmentPattern" && (fun.params[0].left.type === "ObjectPattern" || fun.params[0].left.type === "ArrayPattern") && (fun.params[0].right.type === "Identifier" || fun.params[0].right.type === "ObjectExpression" && fun.params[0].right.properties.length === 0 || fun.params[0].right.type === "ArrayExpression" && fun.params[0].right.elements.length === 0)) && !fun.rest; +} + +function templateLiteralHasNewLines(template) { + return template.quasis.some(function (quasi) { + return quasi.value.raw.includes("\n"); + }); +} + +function isTemplateOnItsOwnLine(n, text, options) { + return (n.type === "TemplateLiteral" && templateLiteralHasNewLines(n) || n.type === "TaggedTemplateExpression" && templateLiteralHasNewLines(n.quasi)) && !hasNewline$2(text, options.locStart(n), { + backwards: true + }); +} + +function printArrayItems(path$$1, options, printPath, print) { + var printedElements = []; + var separatorParts = []; + path$$1.each(function (childPath) { + printedElements.push(concat$4(separatorParts)); + printedElements.push(group$1(print(childPath))); + separatorParts = [",", line$3]; + + if (childPath.getValue() && isNextLineEmpty$2(options.originalText, childPath.getValue(), options)) { + separatorParts.push(softline$1); + } + }, printPath); + return concat$4(printedElements); +} + +function hasDanglingComments(node) { + return node.comments && node.comments.some(function (comment) { + return !comment.leading && !comment.trailing; + }); +} + +function needsHardlineAfterDanglingComment(node) { + if (!node.comments) { + return false; + } + + var lastDanglingComment = getLast$4(node.comments.filter(function (comment) { + return !comment.leading && !comment.trailing; + })); + return lastDanglingComment && !comments$3.isBlockComment(lastDanglingComment); +} + +function isLiteral(node) { + return node.type === "BooleanLiteral" || node.type === "DirectiveLiteral" || node.type === "Literal" || node.type === "NullLiteral" || node.type === "NumericLiteral" || node.type === "RegExpLiteral" || node.type === "StringLiteral" || node.type === "TemplateLiteral" || node.type === "TSTypeLiteral" || node.type === "JSXText"; +} + +function isNumericLiteral(node) { + return node.type === "NumericLiteral" || node.type === "Literal" && typeof node.value === "number"; +} + +function isStringLiteral(node) { + return node.type === "StringLiteral" || node.type === "Literal" && typeof node.value === "string"; +} + +function isObjectType(n) { + return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral"; +} + +var unitTestRe = /^(skip|[fx]?(it|describe|test))$/; // eg; `describe("some string", (done) => {})` + +function isTestCall(n, parent) { + if (n.type !== "CallExpression") { + return false; + } + + if (n.arguments.length === 1) { + if (isAngularTestWrapper(n) && parent && isTestCall(parent)) { + return isFunctionOrArrowExpression(n.arguments[0]); + } + + if (isUnitTestSetUp(n)) { + return isAngularTestWrapper(n.arguments[0]); + } + } else if (n.arguments.length === 2 || n.arguments.length === 3) { + if ((n.callee.type === "Identifier" && unitTestRe.test(n.callee.name) || isSkipOrOnlyBlock(n)) && (isTemplateLiteral(n.arguments[0]) || isStringLiteral(n.arguments[0]))) { + // it("name", () => { ... }, 2500) + if (n.arguments[2] && !isNumericLiteral(n.arguments[2])) { + return false; + } + + return (n.arguments.length === 2 ? isFunctionOrArrowExpression(n.arguments[1]) : isFunctionOrArrowExpressionWithBody(n.arguments[1]) && n.arguments[1].params.length <= 1) || isAngularTestWrapper(n.arguments[1]); + } + } + + return false; +} + +function isSkipOrOnlyBlock(node) { + return (node.callee.type === "MemberExpression" || node.callee.type === "OptionalMemberExpression") && node.callee.object.type === "Identifier" && node.callee.property.type === "Identifier" && unitTestRe.test(node.callee.object.name) && (node.callee.property.name === "only" || node.callee.property.name === "skip"); +} + +function isTemplateLiteral(node) { + return node.type === "TemplateLiteral"; +} // `inject` is used in AngularJS 1.x, `async` in Angular 2+ +// example: https://docs.angularjs.org/guide/unit-testing#using-beforeall- + + +function isAngularTestWrapper(node) { + return (node.type === "CallExpression" || node.type === "OptionalCallExpression") && node.callee.type === "Identifier" && (node.callee.name === "async" || node.callee.name === "inject" || node.callee.name === "fakeAsync"); +} + +function isFunctionOrArrowExpression(node) { + return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression"; +} + +function isFunctionOrArrowExpressionWithBody(node) { + return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression" && node.body.type === "BlockStatement"; +} + +function isUnitTestSetUp(n) { + var unitTestSetUpRe = /^(before|after)(Each|All)$/; + return n.callee.type === "Identifier" && unitTestSetUpRe.test(n.callee.name) && n.arguments.length === 1; +} + +function isTheOnlyJSXElementInMarkdown(options, path$$1) { + if (options.parentParser !== "markdown" && options.parentParser !== "mdx") { + return false; + } + + var node = path$$1.getNode(); + + if (!node.expression || !isJSXNode(node.expression)) { + return false; + } + + var parent = path$$1.getParentNode(); + return parent.type === "Program" && parent.body.length == 1; +} + +function willPrintOwnComments(path$$1) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + return (node && (isJSXNode(node) || hasFlowShorthandAnnotationComment(node) || parent && parent.type === "CallExpression" && (hasFlowAnnotationComment(node.leadingComments) || hasFlowAnnotationComment(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && !hasIgnoreComment$1(path$$1); +} + +function canAttachComment(node) { + return node.type && node.type !== "CommentBlock" && node.type !== "CommentLine" && node.type !== "Line" && node.type !== "Block" && node.type !== "EmptyStatement" && node.type !== "TemplateElement" && node.type !== "Import" && !(node.callee && node.callee.type === "Import"); +} + +function printComment$1(commentPath, options) { + var comment = commentPath.getValue(); + + switch (comment.type) { + case "CommentBlock": + case "Block": + { + if (isIndentableBlockComment(comment)) { + var printed = printIndentableBlockComment(comment); // We need to prevent an edge case of a previous trailing comment + // printed as a `lineSuffix` which causes the comments to be + // interleaved. See https://github.com/prettier/prettier/issues/4412 + + if (comment.trailing && !hasNewline$2(options.originalText, options.locStart(comment), { + backwards: true + })) { + return concat$4([hardline$3, printed]); + } + + return printed; + } + + var isInsideFlowComment = options.originalText.substr(options.locEnd(comment) - 3, 3) === "*-/"; + return "/*" + comment.value + (isInsideFlowComment ? "*-/" : "*/"); + } + + case "CommentLine": + case "Line": + // Print shebangs with the proper comment characters + if (options.originalText.slice(options.locStart(comment)).startsWith("#!")) { + return "#!" + comment.value.trimRight(); + } + + return "//" + comment.value.trimRight(); + + default: + throw new Error("Not a comment: " + JSON.stringify(comment)); + } +} + +function isIndentableBlockComment(comment) { + // If the comment has multiple lines and every line starts with a star + // we can fix the indentation of each line. The stars in the `/*` and + // `*/` delimiters are not included in the comment value, so add them + // back first. + var lines = `*${comment.value}*`.split("\n"); + return lines.length > 1 && lines.every(function (line) { + return line.trim()[0] === "*"; + }); +} + +function printIndentableBlockComment(comment) { + var lines = comment.value.split("\n"); + return concat$4(["/*", join$2(hardline$3, lines.map(function (line, index) { + return index === 0 ? line.trimRight() : " " + (index < lines.length - 1 ? line.trim() : line.trimLeft()); + })), "*/"]); +} + +function rawText(node) { + return node.extra ? node.extra.raw : node.raw; +} + +function identity$1(x) { + return x; +} + +var printerEstree = { + preprocess: preprocess_1, + print: genericPrint, + embed: embed_1, + insertPragma, + massageAstNode: clean_1, + hasPrettierIgnore, + willPrintOwnComments, + canAttachComment, + printComment: printComment$1, + isBlockComment: comments$3.isBlockComment, + handleComments: { + ownLine: comments$3.handleOwnLineComment, + endOfLine: comments$3.handleEndOfLineComment, + remaining: comments$3.handleRemainingComment + } +}; + +var _require$$0$builders$3 = doc.builders; +var concat$7 = _require$$0$builders$3.concat; +var hardline$5 = _require$$0$builders$3.hardline; +var indent$4 = _require$$0$builders$3.indent; +var join$5 = _require$$0$builders$3.join; + +function genericPrint$1(path$$1, options, print) { + var node = path$$1.getValue(); + + switch (node.type) { + case "JsonRoot": + return concat$7([path$$1.call(print, "node"), hardline$5]); + + case "ArrayExpression": + return node.elements.length === 0 ? "[]" : concat$7(["[", indent$4(concat$7([hardline$5, join$5(concat$7([",", hardline$5]), path$$1.map(print, "elements"))])), hardline$5, "]"]); + + case "ObjectExpression": + return node.properties.length === 0 ? "{}" : concat$7(["{", indent$4(concat$7([hardline$5, join$5(concat$7([",", hardline$5]), path$$1.map(print, "properties"))])), hardline$5, "}"]); + + case "ObjectProperty": + return concat$7([path$$1.call(print, "key"), ": ", path$$1.call(print, "value")]); + + case "UnaryExpression": + return concat$7([node.operator === "+" ? "" : node.operator, path$$1.call(print, "argument")]); + + case "NullLiteral": + return "null"; + + case "BooleanLiteral": + return node.value ? "true" : "false"; + + case "StringLiteral": + case "NumericLiteral": + return JSON.stringify(node.value); + + case "Identifier": + return JSON.stringify(node.name); + + default: + /* istanbul ignore next */ + throw new Error("unknown type: " + JSON.stringify(node.type)); + } +} + +function clean$2(node, newNode +/*, parent*/ +) { + delete newNode.start; + delete newNode.end; + delete newNode.extra; + delete newNode.loc; + delete newNode.comments; + + if (node.type === "Identifier") { + return { + type: "StringLiteral", + value: node.name + }; + } + + if (node.type === "UnaryExpression" && node.operator === "+") { + return newNode.argument; + } +} + +var printerEstreeJson = { + preprocess: preprocess_1, + print: genericPrint$1, + massageAstNode: clean$2 +}; + +var CATEGORY_COMMON = "Common"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var commonOptions = { + bracketSpacing: { + since: "0.0.0", + category: CATEGORY_COMMON, + type: "boolean", + default: true, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + singleQuote: { + since: "0.0.0", + category: CATEGORY_COMMON, + type: "boolean", + default: false, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + since: "1.8.2", + category: CATEGORY_COMMON, + type: "choice", + default: [{ + since: "1.8.2", + value: true + }, { + since: "1.9.0", + value: "preserve" + }], + description: "How to wrap prose.", + choices: [{ + since: "1.9.0", + value: "always", + description: "Wrap prose if it exceeds the print width." + }, { + since: "1.9.0", + value: "never", + description: "Do not wrap prose." + }, { + since: "1.9.0", + value: "preserve", + description: "Wrap prose as-is." + }, { + value: false, + deprecated: "1.9.0", + redirect: "never" + }, { + value: true, + deprecated: "1.9.0", + redirect: "always" + }] + } +}; + +var CATEGORY_JAVASCRIPT = "JavaScript"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var options$3 = { + arrowParens: { + since: "1.9.0", + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "avoid", + description: "Include parentheses around a sole arrow function parameter.", + choices: [{ + value: "avoid", + description: "Omit parens when possible. Example: `x => x`" + }, { + value: "always", + description: "Always include parens. Example: `(x) => x`" + }] + }, + bracketSpacing: commonOptions.bracketSpacing, + jsxBracketSameLine: { + since: "0.17.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Put > on the last line instead of at a new line." + }, + semi: { + since: "1.0.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: true, + description: "Print semicolons.", + oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." + }, + singleQuote: commonOptions.singleQuote, + jsxSingleQuote: { + since: "1.15.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use single quotes in JSX." + }, + trailingComma: { + since: "0.0.0", + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: [{ + since: "0.0.0", + value: false + }, { + since: "0.19.0", + value: "none" + }], + description: "Print trailing commas wherever possible when multi-line.", + choices: [{ + value: "none", + description: "No trailing commas." + }, { + value: "es5", + description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" + }, { + value: "all", + description: "Trailing commas wherever possible (including function arguments)." + }, { + value: true, + deprecated: "0.19.0", + redirect: "es5" + }, { + value: false, + deprecated: "0.19.0", + redirect: "none" + }] + } +}; + +var createLanguage = function createLanguage(linguistData, _ref) { + var extend = _ref.extend, + override = _ref.override; + var language = {}; + + for (var key in linguistData) { + var newKey = key === "languageId" ? "linguistLanguageId" : key; + language[newKey] = linguistData[key]; + } + + if (extend) { + for (var _key in extend) { + language[_key] = (language[_key] || []).concat(extend[_key]); + } + } + + for (var _key2 in override) { + language[_key2] = override[_key2]; + } + + return language; +}; + +var name$1 = "JavaScript"; +var type = "programming"; +var tmScope = "source.js"; +var aceMode = "javascript"; +var codemirrorMode = "javascript"; +var codemirrorMimeType = "text/javascript"; +var color = "#f1e05a"; +var aliases = ["js", "node"]; +var extensions = [".js", "._js", ".bones", ".es", ".es6", ".frag", ".gs", ".jake", ".jsb", ".jscad", ".jsfl", ".jsm", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib"]; +var filenames = ["Jakefile"]; +var interpreters = ["node"]; +var languageId = 183; +var javascript = { + name: name$1, + type: type, + tmScope: tmScope, + aceMode: aceMode, + codemirrorMode: codemirrorMode, + codemirrorMimeType: codemirrorMimeType, + color: color, + aliases: aliases, + extensions: extensions, + filenames: filenames, + interpreters: interpreters, + languageId: languageId +}; + +var javascript$1 = Object.freeze({ + name: name$1, + type: type, + tmScope: tmScope, + aceMode: aceMode, + codemirrorMode: codemirrorMode, + codemirrorMimeType: codemirrorMimeType, + color: color, + aliases: aliases, + extensions: extensions, + filenames: filenames, + interpreters: interpreters, + languageId: languageId, + default: javascript +}); + +var name$2 = "JSX"; +var type$1 = "programming"; +var group$3 = "JavaScript"; +var extensions$1 = [".jsx"]; +var tmScope$1 = "source.js.jsx"; +var aceMode$1 = "javascript"; +var codemirrorMode$1 = "jsx"; +var codemirrorMimeType$1 = "text/jsx"; +var languageId$1 = 178; +var jsx = { + name: name$2, + type: type$1, + group: group$3, + extensions: extensions$1, + tmScope: tmScope$1, + aceMode: aceMode$1, + codemirrorMode: codemirrorMode$1, + codemirrorMimeType: codemirrorMimeType$1, + languageId: languageId$1 +}; + +var jsx$1 = Object.freeze({ + name: name$2, + type: type$1, + group: group$3, + extensions: extensions$1, + tmScope: tmScope$1, + aceMode: aceMode$1, + codemirrorMode: codemirrorMode$1, + codemirrorMimeType: codemirrorMimeType$1, + languageId: languageId$1, + default: jsx +}); + +var name$3 = "TypeScript"; +var type$2 = "programming"; +var color$1 = "#2b7489"; +var aliases$1 = ["ts"]; +var extensions$2 = [".ts", ".tsx"]; +var tmScope$2 = "source.ts"; +var aceMode$2 = "typescript"; +var codemirrorMode$2 = "javascript"; +var codemirrorMimeType$2 = "application/typescript"; +var languageId$2 = 378; +var typescript = { + name: name$3, + type: type$2, + color: color$1, + aliases: aliases$1, + extensions: extensions$2, + tmScope: tmScope$2, + aceMode: aceMode$2, + codemirrorMode: codemirrorMode$2, + codemirrorMimeType: codemirrorMimeType$2, + languageId: languageId$2 +}; + +var typescript$1 = Object.freeze({ + name: name$3, + type: type$2, + color: color$1, + aliases: aliases$1, + extensions: extensions$2, + tmScope: tmScope$2, + aceMode: aceMode$2, + codemirrorMode: codemirrorMode$2, + codemirrorMimeType: codemirrorMimeType$2, + languageId: languageId$2, + default: typescript +}); + +var name$4 = "JSON"; +var type$3 = "data"; +var tmScope$3 = "source.json"; +var group$4 = "JavaScript"; +var aceMode$3 = "json"; +var codemirrorMode$3 = "javascript"; +var codemirrorMimeType$3 = "application/json"; +var searchable = false; +var extensions$3 = [".json", ".avsc", ".geojson", ".gltf", ".JSON-tmLanguage", ".jsonl", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest"]; +var filenames$1 = [".arcconfig", ".htmlhintrc", ".tern-config", ".tern-project", "composer.lock", "mcmod.info"]; +var languageId$3 = 174; +var json$2 = { + name: name$4, + type: type$3, + tmScope: tmScope$3, + group: group$4, + aceMode: aceMode$3, + codemirrorMode: codemirrorMode$3, + codemirrorMimeType: codemirrorMimeType$3, + searchable: searchable, + extensions: extensions$3, + filenames: filenames$1, + languageId: languageId$3 +}; + +var json$3 = Object.freeze({ + name: name$4, + type: type$3, + tmScope: tmScope$3, + group: group$4, + aceMode: aceMode$3, + codemirrorMode: codemirrorMode$3, + codemirrorMimeType: codemirrorMimeType$3, + searchable: searchable, + extensions: extensions$3, + filenames: filenames$1, + languageId: languageId$3, + default: json$2 +}); + +var name$5 = "JSON with Comments"; +var type$4 = "data"; +var group$5 = "JSON"; +var tmScope$4 = "source.js"; +var aceMode$4 = "javascript"; +var codemirrorMode$4 = "javascript"; +var codemirrorMimeType$4 = "text/javascript"; +var aliases$2 = ["jsonc"]; +var extensions$4 = [".sublime-build", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"]; +var filenames$2 = [".babelrc", ".eslintrc.json", ".jscsrc", ".jshintrc", ".jslintrc", "tsconfig.json"]; +var languageId$4 = 423; +var jsonWithComments = { + name: name$5, + type: type$4, + group: group$5, + tmScope: tmScope$4, + aceMode: aceMode$4, + codemirrorMode: codemirrorMode$4, + codemirrorMimeType: codemirrorMimeType$4, + aliases: aliases$2, + extensions: extensions$4, + filenames: filenames$2, + languageId: languageId$4 +}; + +var jsonWithComments$1 = Object.freeze({ + name: name$5, + type: type$4, + group: group$5, + tmScope: tmScope$4, + aceMode: aceMode$4, + codemirrorMode: codemirrorMode$4, + codemirrorMimeType: codemirrorMimeType$4, + aliases: aliases$2, + extensions: extensions$4, + filenames: filenames$2, + languageId: languageId$4, + default: jsonWithComments +}); + +var name$6 = "JSON5"; +var type$5 = "data"; +var extensions$5 = [".json5"]; +var tmScope$5 = "source.js"; +var aceMode$5 = "javascript"; +var codemirrorMode$5 = "javascript"; +var codemirrorMimeType$5 = "application/json"; +var languageId$5 = 175; +var json5 = { + name: name$6, + type: type$5, + extensions: extensions$5, + tmScope: tmScope$5, + aceMode: aceMode$5, + codemirrorMode: codemirrorMode$5, + codemirrorMimeType: codemirrorMimeType$5, + languageId: languageId$5 +}; + +var json5$1 = Object.freeze({ + name: name$6, + type: type$5, + extensions: extensions$5, + tmScope: tmScope$5, + aceMode: aceMode$5, + codemirrorMode: codemirrorMode$5, + codemirrorMimeType: codemirrorMimeType$5, + languageId: languageId$5, + default: json5 +}); + +var require$$0$20 = ( javascript$1 && javascript ) || javascript$1; + +var require$$1$9 = ( jsx$1 && jsx ) || jsx$1; + +var require$$2$10 = ( typescript$1 && typescript ) || typescript$1; + +var require$$3$3 = ( json$3 && json$2 ) || json$3; + +var require$$4$2 = ( jsonWithComments$1 && jsonWithComments ) || jsonWithComments$1; + +var require$$5$1 = ( json5$1 && json5 ) || json5$1; + +var languages = [createLanguage(require$$0$20, { + override: { + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascript"] + }, + extend: { + interpreters: ["nodejs"] + } +}), createLanguage(require$$0$20, { + override: { + name: "Flow", + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascript"], + aliases: [], + filenames: [], + extensions: [".js.flow"] + } +}), createLanguage(require$$1$9, { + override: { + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascriptreact"] + } +}), createLanguage(require$$2$10, { + override: { + since: "1.4.0", + parsers: ["typescript"], + vscodeLanguageIds: ["typescript", "typescriptreact"] + } +}), createLanguage(require$$3$3, { + override: { + name: "JSON.stringify", + since: "1.13.0", + parsers: ["json-stringify"], + vscodeLanguageIds: ["json"], + extensions: [], + // .json file defaults to json instead of json-stringify + filenames: ["package.json", "package-lock.json", "composer.json"] + } +}), createLanguage(require$$3$3, { + override: { + since: "1.5.0", + parsers: ["json"], + vscodeLanguageIds: ["json"] + }, + extend: { + filenames: [".prettierrc"] + } +}), createLanguage(require$$4$2, { + override: { + since: "1.5.0", + parsers: ["json"], + vscodeLanguageIds: ["jsonc"] + }, + extend: { + filenames: [".eslintrc"] + } +}), createLanguage(require$$5$1, { + override: { + since: "1.13.0", + parsers: ["json5"], + vscodeLanguageIds: ["json5"] + } +})]; +var printers = { + estree: printerEstree, + "estree-json": printerEstreeJson +}; +var languageJs = { + languages, + options: options$3, + printers +}; + +var index$12 = ["a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "listing", "main", "map", "mark", "marquee", "math", "menu", "menuitem", "meta", "meter", "multicol", "nav", "nextid", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "pre", "progress", "q", "rb", "rbc", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp"]; + +var htmlTagNames = Object.freeze({ + default: index$12 +}); + +var htmlTagNames$1 = ( htmlTagNames && index$12 ) || htmlTagNames; + +function clean$3(ast, newObj, parent) { + ["raw", // front-matter + "raws", "sourceIndex", "source", "before", "after", "trailingComma"].forEach(function (name) { + delete newObj[name]; + }); + + if (ast.type === "yaml") { + delete newObj.value; + } // --insert-pragma + + + if (ast.type === "css-comment" && parent.type === "css-root" && parent.nodes.length !== 0 && ( // first non-front-matter comment + parent.nodes[0] === ast || (parent.nodes[0].type === "yaml" || parent.nodes[0].type === "toml") && parent.nodes[1] === ast)) { + /** + * something + * + * @format + */ + delete newObj.text; // standalone pragma + + if (/^\*\s*@(format|prettier)\s*$/.test(ast.text)) { + return null; + } + } + + if (ast.type === "media-query" || ast.type === "media-query-list" || ast.type === "media-feature-expression") { + delete newObj.value; + } + + if (ast.type === "css-rule") { + delete newObj.params; + } + + if (ast.type === "selector-combinator") { + newObj.value = newObj.value.replace(/\s+/g, " "); + } + + if (ast.type === "media-feature") { + newObj.value = newObj.value.replace(/ /g, ""); + } + + if (ast.type === "value-word" && (ast.isColor && ast.isHex || ["initial", "inherit", "unset", "revert"].indexOf(newObj.value.replace().toLowerCase()) !== -1) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo") { + newObj.value = newObj.value.toLowerCase(); + } + + if (ast.type === "css-decl") { + newObj.prop = newObj.prop.toLowerCase(); + } + + if (ast.type === "css-atrule" || ast.type === "css-import") { + newObj.name = newObj.name.toLowerCase(); + } + + if (ast.type === "value-number") { + newObj.unit = newObj.unit.toLowerCase(); + } + + if ((ast.type === "media-feature" || ast.type === "media-keyword" || ast.type === "media-type" || ast.type === "media-unknown" || ast.type === "media-url" || ast.type === "media-value" || ast.type === "selector-attribute" || ast.type === "selector-string" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "value-string") && newObj.value) { + newObj.value = cleanCSSStrings(newObj.value); + } + + if (ast.type === "selector-attribute") { + newObj.attribute = newObj.attribute.trim(); + + if (newObj.namespace) { + if (typeof newObj.namespace === "string") { + newObj.namespace = newObj.namespace.trim(); + + if (newObj.namespace.length === 0) { + newObj.namespace = true; + } + } + } + + if (newObj.value) { + newObj.value = newObj.value.trim().replace(/^['"]|['"]$/g, ""); + delete newObj.quoted; + } + } + + if ((ast.type === "media-value" || ast.type === "media-type" || ast.type === "value-number" || ast.type === "selector-root-invalid" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "selector-tag") && newObj.value) { + newObj.value = newObj.value.replace(/([\d.eE+-]+)([a-zA-Z]*)/g, function (match, numStr, unit) { + var num = Number(numStr); + return isNaN(num) ? match : num + unit.toLowerCase(); + }); + } + + if (ast.type === "selector-tag") { + var lowercasedValue = ast.value.toLowerCase(); + + if (htmlTagNames$1.indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + + if (["from", "to"].indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + } // Workaround when `postcss-values-parser` parse `not`, `and` or `or` keywords as `value-func` + + + if (ast.type === "css-atrule" && ast.name.toLowerCase() === "supports") { + delete newObj.value; + } // Workaround for SCSS nested properties + + + if (ast.type === "selector-unknown") { + delete newObj.value; + } +} + +function cleanCSSStrings(value) { + return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1"); +} + +var clean_1$2 = clean$3; + +var _require$$0$builders$4 = doc.builders; +var hardline$7 = _require$$0$builders$4.hardline; +var literalline$3 = _require$$0$builders$4.literalline; +var concat$9 = _require$$0$builders$4.concat; +var markAsRoot$1 = _require$$0$builders$4.markAsRoot; +var mapDoc$3 = doc.utils.mapDoc; + +function embed$2(path$$1, print, textToDoc +/*, options */ +) { + var node = path$$1.getValue(); + + if (node.type === "yaml") { + return markAsRoot$1(concat$9(["---", hardline$7, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, { + parser: "yaml" + })) : "", "---", hardline$7])); + } + + return null; + + function replaceNewlinesWithLiterallines(doc$$2) { + return mapDoc$3(doc$$2, function (currentDoc) { + return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$9(currentDoc.split(/(\n)/g).map(function (v, i) { + return i % 2 === 0 ? v : literalline$3; + })) : currentDoc; + }); + } +} + +var embed_1$2 = embed$2; + +var DELIMITER_MAP = { + "---": "yaml", + "+++": "toml" +}; + +function parse$5(text) { + var delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp).join("|"); + var match = text.match( // trailing spaces after delimiters are allowed + new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`)); + + if (match === null) { + return { + frontMatter: null, + content: text + }; + } + + var raw = match[0].replace(/\n$/, ""); + var delimiter = match[1]; + var value = match[2]; + return { + frontMatter: { + type: DELIMITER_MAP[delimiter], + value, + raw + }, + content: match[0].replace(/[^\n]/g, " ") + text.slice(match[0].length) + }; +} + +var frontMatter = parse$5; + +function hasPragma$1(text) { + return pragma.hasPragma(frontMatter(text).content); +} + +function insertPragma$3(text) { + var _parseFrontMatter = frontMatter(text), + frontMatter$$1 = _parseFrontMatter.frontMatter, + content = _parseFrontMatter.content; + + return (frontMatter$$1 ? frontMatter$$1.raw + "\n\n" : "") + pragma.insertPragma(content); +} + +var pragma$2 = { + hasPragma: hasPragma$1, + insertPragma: insertPragma$3 +}; + +var colorAdjusterFunctions = ["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"]; + +function getAncestorCounter(path$$1, typeOrTypes) { + var types = [].concat(typeOrTypes); + var counter = -1; + var ancestorNode; + + while (ancestorNode = path$$1.getParentNode(++counter)) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode$1(path$$1, typeOrTypes) { + var counter = getAncestorCounter(path$$1, typeOrTypes); + return counter === -1 ? null : path$$1.getParentNode(counter); +} + +function getPropOfDeclNode$1(path$$1) { + var declAncestorNode = getAncestorNode$1(path$$1, "css-decl"); + return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase(); +} + +function isSCSS$1(parser, text) { + var hasExplicitParserChoice = parser === "less" || parser === "scss"; + var IS_POSSIBLY_SCSS = /(\w\s*: [^}:]+|#){|@import[^\n]+(url|,)/; + return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text); +} + +function isWideKeywords$1(value) { + return ["initial", "inherit", "unset", "revert"].indexOf(value.toLowerCase()) !== -1; +} + +function isKeyframeAtRuleKeywords$1(path$$1, value) { + var atRuleAncestorNode = getAncestorNode$1(path$$1, "css-atrule"); + return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].indexOf(value.toLowerCase()) !== -1; +} + +function maybeToLowerCase$1(value) { + return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase(); +} + +function insideValueFunctionNode$1(path$$1, functionName) { + var funcAncestorNode = getAncestorNode$1(path$$1, "value-func"); + return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName; +} + +function insideICSSRuleNode$1(path$$1) { + var ruleAncestorNode = getAncestorNode$1(path$$1, "css-rule"); + return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export")); +} + +function insideAtRuleNode$1(path$$1, atRuleNameOrAtRuleNames) { + var atRuleNames = [].concat(atRuleNameOrAtRuleNames); + var atRuleAncestorNode = getAncestorNode$1(path$$1, "css-atrule"); + return atRuleAncestorNode && atRuleNames.indexOf(atRuleAncestorNode.name.toLowerCase()) !== -1; +} + +function insideURLFunctionInImportAtRuleNode$1(path$$1) { + var node = path$$1.getValue(); + var atRuleAncestorNode = getAncestorNode$1(path$$1, "css-atrule"); + return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2; +} + +function isURLFunctionNode$1(node) { + return node.type === "value-func" && node.value.toLowerCase() === "url"; +} + +function isLastNode$1(path$$1, node) { + var parentNode = path$$1.getParentNode(); + + if (!parentNode) { + return false; + } + + var nodes = parentNode.nodes; + return nodes && nodes.indexOf(node) === nodes.length - 1; +} + +function isHTMLTag$1(value) { + return htmlTagNames$1.indexOf(value.toLowerCase()) !== -1; +} + +function isDetachedRulesetDeclarationNode$1(node) { + // If a Less file ends up being parsed with the SCSS parser, Less + // variable declarations will be parsed as atrules with names ending + // with a colon, so keep the original case then. + if (!node.selector) { + return false; + } + + return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value); +} + +function isForKeywordNode$1(node) { + return node.type === "value-word" && ["from", "through", "end"].indexOf(node.value) !== -1; +} + +function isIfElseKeywordNode$1(node) { + return node.type === "value-word" && ["and", "or", "not"].indexOf(node.value) !== -1; +} + +function isEachKeywordNode$1(node) { + return node.type === "value-word" && node.value === "in"; +} + +function isMultiplicationNode$1(node) { + return node.type === "value-operator" && node.value === "*"; +} + +function isDivisionNode$1(node) { + return node.type === "value-operator" && node.value === "/"; +} + +function isAdditionNode$1(node) { + return node.type === "value-operator" && node.value === "+"; +} + +function isSubtractionNode$1(node) { + return node.type === "value-operator" && node.value === "-"; +} + +function isModuloNode(node) { + return node.type === "value-operator" && node.value === "%"; +} + +function isMathOperatorNode$1(node) { + return isMultiplicationNode$1(node) || isDivisionNode$1(node) || isAdditionNode$1(node) || isSubtractionNode$1(node) || isModuloNode(node); +} + +function isEqualityOperatorNode$1(node) { + return node.type === "value-word" && ["==", "!="].indexOf(node.value) !== -1; +} + +function isRelationalOperatorNode$1(node) { + return node.type === "value-word" && ["<", ">", "<=", ">="].indexOf(node.value) !== -1; +} + +function isSCSSControlDirectiveNode$1(node) { + return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].indexOf(node.name) !== -1; +} + +function isSCSSNestedPropertyNode(node) { + if (!node.selector) { + return false; + } + + return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":"); +} + +function isDetachedRulesetCallNode$1(node) { + return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params); +} + +function isTemplatePlaceholderNode$1(node) { + return node.name.startsWith("prettier-placeholder"); +} + +function isTemplatePropNode$1(node) { + return node.prop.startsWith("@prettier-placeholder"); +} + +function isPostcssSimpleVarNode$1(currentNode, nextNode) { + return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before; +} + +function hasComposesNode$1(node) { + return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes"; +} + +function hasParensAroundNode$1(node) { + return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null; +} + +function hasEmptyRawBefore$1(node) { + return node.raws && node.raws.before === ""; +} + +function isKeyValuePairNode$1(node) { + return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon"; +} + +function isKeyValuePairInParenGroupNode(node) { + return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode$1(node.groups[0]); +} + +function isSCSSMapItemNode$1(path$$1) { + var node = path$$1.getValue(); // Ignore empty item (i.e. `$key: ()`) + + if (node.groups.length === 0) { + return false; + } + + var parentParentNode = path$$1.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`) + + if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) { + return false; + } + + var declNode = getAncestorNode$1(path$$1, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`) + + if (declNode && declNode.prop && declNode.prop.startsWith("$")) { + return true; + } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`) + + + if (isKeyValuePairInParenGroupNode(parentParentNode)) { + return true; + } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`) + + + if (parentParentNode.type === "value-func") { + return true; + } + + return false; +} + +function isInlineValueCommentNode$1(node) { + return node.type === "value-comment" && node.inline; +} + +function isHashNode$1(node) { + return node.type === "value-word" && node.value === "#"; +} + +function isLeftCurlyBraceNode$1(node) { + return node.type === "value-word" && node.value === "{"; +} + +function isRightCurlyBraceNode$1(node) { + return node.type === "value-word" && node.value === "}"; +} + +function isWordNode$1(node) { + return ["value-word", "value-atword"].indexOf(node.type) !== -1; +} + +function isColonNode$1(node) { + return node.type === "value-colon"; +} + +function isMediaAndSupportsKeywords$1(node) { + return node.value && ["not", "and", "or"].indexOf(node.value.toLowerCase()) !== -1; +} + +function isColorAdjusterFuncNode$1(node) { + if (node.type !== "value-func") { + return false; + } + + return colorAdjusterFunctions.indexOf(node.value.toLowerCase()) !== -1; +} + +var utils$6 = { + getAncestorCounter, + getAncestorNode: getAncestorNode$1, + getPropOfDeclNode: getPropOfDeclNode$1, + maybeToLowerCase: maybeToLowerCase$1, + insideValueFunctionNode: insideValueFunctionNode$1, + insideICSSRuleNode: insideICSSRuleNode$1, + insideAtRuleNode: insideAtRuleNode$1, + insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode$1, + isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords$1, + isHTMLTag: isHTMLTag$1, + isWideKeywords: isWideKeywords$1, + isSCSS: isSCSS$1, + isLastNode: isLastNode$1, + isSCSSControlDirectiveNode: isSCSSControlDirectiveNode$1, + isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode$1, + isRelationalOperatorNode: isRelationalOperatorNode$1, + isEqualityOperatorNode: isEqualityOperatorNode$1, + isMultiplicationNode: isMultiplicationNode$1, + isDivisionNode: isDivisionNode$1, + isAdditionNode: isAdditionNode$1, + isSubtractionNode: isSubtractionNode$1, + isModuloNode, + isMathOperatorNode: isMathOperatorNode$1, + isEachKeywordNode: isEachKeywordNode$1, + isForKeywordNode: isForKeywordNode$1, + isURLFunctionNode: isURLFunctionNode$1, + isIfElseKeywordNode: isIfElseKeywordNode$1, + hasComposesNode: hasComposesNode$1, + hasParensAroundNode: hasParensAroundNode$1, + hasEmptyRawBefore: hasEmptyRawBefore$1, + isSCSSNestedPropertyNode, + isDetachedRulesetCallNode: isDetachedRulesetCallNode$1, + isTemplatePlaceholderNode: isTemplatePlaceholderNode$1, + isTemplatePropNode: isTemplatePropNode$1, + isPostcssSimpleVarNode: isPostcssSimpleVarNode$1, + isKeyValuePairNode: isKeyValuePairNode$1, + isKeyValuePairInParenGroupNode, + isSCSSMapItemNode: isSCSSMapItemNode$1, + isInlineValueCommentNode: isInlineValueCommentNode$1, + isHashNode: isHashNode$1, + isLeftCurlyBraceNode: isLeftCurlyBraceNode$1, + isRightCurlyBraceNode: isRightCurlyBraceNode$1, + isWordNode: isWordNode$1, + isColonNode: isColonNode$1, + isMediaAndSupportsKeywords: isMediaAndSupportsKeywords$1, + isColorAdjusterFuncNode: isColorAdjusterFuncNode$1 +}; + +var insertPragma$2 = pragma$2.insertPragma; +var printNumber$2 = util$1.printNumber; +var printString$2 = util$1.printString; +var hasIgnoreComment$2 = util$1.hasIgnoreComment; +var hasNewline$3 = util$1.hasNewline; +var isNextLineEmpty$3 = utilShared.isNextLineEmpty; +var _require$$3$builders = doc.builders; +var concat$8 = _require$$3$builders.concat; +var join$6 = _require$$3$builders.join; +var line$5 = _require$$3$builders.line; +var hardline$6 = _require$$3$builders.hardline; +var softline$3 = _require$$3$builders.softline; +var group$6 = _require$$3$builders.group; +var fill$3 = _require$$3$builders.fill; +var indent$5 = _require$$3$builders.indent; +var dedent$3 = _require$$3$builders.dedent; +var ifBreak$2 = _require$$3$builders.ifBreak; +var removeLines$2 = doc.utils.removeLines; +var getAncestorNode = utils$6.getAncestorNode; +var getPropOfDeclNode = utils$6.getPropOfDeclNode; +var maybeToLowerCase = utils$6.maybeToLowerCase; +var insideValueFunctionNode = utils$6.insideValueFunctionNode; +var insideICSSRuleNode = utils$6.insideICSSRuleNode; +var insideAtRuleNode = utils$6.insideAtRuleNode; +var insideURLFunctionInImportAtRuleNode = utils$6.insideURLFunctionInImportAtRuleNode; +var isKeyframeAtRuleKeywords = utils$6.isKeyframeAtRuleKeywords; +var isHTMLTag = utils$6.isHTMLTag; +var isWideKeywords = utils$6.isWideKeywords; +var isSCSS = utils$6.isSCSS; +var isLastNode = utils$6.isLastNode; +var isSCSSControlDirectiveNode = utils$6.isSCSSControlDirectiveNode; +var isDetachedRulesetDeclarationNode = utils$6.isDetachedRulesetDeclarationNode; +var isRelationalOperatorNode = utils$6.isRelationalOperatorNode; +var isEqualityOperatorNode = utils$6.isEqualityOperatorNode; +var isMultiplicationNode = utils$6.isMultiplicationNode; +var isDivisionNode = utils$6.isDivisionNode; +var isAdditionNode = utils$6.isAdditionNode; +var isSubtractionNode = utils$6.isSubtractionNode; +var isMathOperatorNode = utils$6.isMathOperatorNode; +var isEachKeywordNode = utils$6.isEachKeywordNode; +var isForKeywordNode = utils$6.isForKeywordNode; +var isURLFunctionNode = utils$6.isURLFunctionNode; +var isIfElseKeywordNode = utils$6.isIfElseKeywordNode; +var hasComposesNode = utils$6.hasComposesNode; +var hasParensAroundNode = utils$6.hasParensAroundNode; +var hasEmptyRawBefore = utils$6.hasEmptyRawBefore; +var isKeyValuePairNode = utils$6.isKeyValuePairNode; +var isDetachedRulesetCallNode = utils$6.isDetachedRulesetCallNode; +var isTemplatePlaceholderNode = utils$6.isTemplatePlaceholderNode; +var isTemplatePropNode = utils$6.isTemplatePropNode; +var isPostcssSimpleVarNode = utils$6.isPostcssSimpleVarNode; +var isSCSSMapItemNode = utils$6.isSCSSMapItemNode; +var isInlineValueCommentNode = utils$6.isInlineValueCommentNode; +var isHashNode = utils$6.isHashNode; +var isLeftCurlyBraceNode = utils$6.isLeftCurlyBraceNode; +var isRightCurlyBraceNode = utils$6.isRightCurlyBraceNode; +var isWordNode = utils$6.isWordNode; +var isColonNode = utils$6.isColonNode; +var isMediaAndSupportsKeywords = utils$6.isMediaAndSupportsKeywords; +var isColorAdjusterFuncNode = utils$6.isColorAdjusterFuncNode; + +function shouldPrintComma$1(options) { + switch (options.trailingComma) { + case "all": + case "es5": + return true; + + case "none": + default: + return false; + } +} + +function genericPrint$2(path$$1, options, print) { + var node = path$$1.getValue(); + /* istanbul ignore if */ + + if (!node) { + return ""; + } + + if (typeof node === "string") { + return node; + } + + switch (node.type) { + case "yaml": + case "toml": + return concat$8([node.raw, hardline$6]); + + case "css-root": + { + var nodes = printNodeSequence(path$$1, options, print); + + if (nodes.parts.length) { + return concat$8([nodes, hardline$6]); + } + + return nodes; + } + + case "css-comment": + { + if (node.raws.content) { + return node.raws.content // there's a bug in the less parser that trailing `\r`s are included in inline comments + .replace(/^(\/\/[^]+)\r+$/, "$1"); + } + + var text = options.originalText.slice(options.locStart(node), options.locEnd(node)); + var rawText = node.raws.text || node.text; // Workaround a bug where the location is off. + // https://github.com/postcss/postcss-scss/issues/63 + + if (text.indexOf(rawText) === -1) { + if (node.raws.inline) { + return concat$8(["// ", rawText]); + } + + return concat$8(["/* ", rawText, " */"]); + } + + return text; + } + + case "css-rule": + { + return concat$8([path$$1.call(print, "selector"), node.important ? " !important" : "", node.nodes ? concat$8([" {", node.nodes.length > 0 ? indent$5(concat$8([hardline$6, printNodeSequence(path$$1, options, print)])) : "", hardline$6, "}", isDetachedRulesetDeclarationNode(node) ? ";" : ""]) : ";"]); + } + + case "css-decl": + { + var parentNode = path$$1.getParentNode(); + return concat$8([node.raws.before.replace(/[\s;]/g, ""), insideICSSRuleNode(path$$1) ? node.prop : maybeToLowerCase(node.prop), node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), node.extend ? "" : " ", hasComposesNode(node) ? removeLines$2(path$$1.call(print, "value")) : path$$1.call(print, "value"), node.raws.important ? node.raws.important.replace(/\s*!\s*important/i, " !important") : node.important ? " !important" : "", node.raws.scssDefault ? node.raws.scssDefault.replace(/\s*!default/i, " !default") : node.scssDefault ? " !default" : "", node.raws.scssGlobal ? node.raws.scssGlobal.replace(/\s*!global/i, " !global") : node.scssGlobal ? " !global" : "", node.nodes ? concat$8([" {", indent$5(concat$8([softline$3, printNodeSequence(path$$1, options, print)])), softline$3, "}"]) : isTemplatePropNode(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]); + } + + case "css-atrule": + { + var _parentNode = path$$1.getParentNode(); + + return concat$8(["@", // If a Less file ends up being parsed with the SCSS parser, Less + // variable declarations will be parsed as at-rules with names ending + // with a colon, so keep the original case then. + isDetachedRulesetCallNode(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase(node.name), node.params ? concat$8([isDetachedRulesetCallNode(node) ? "" : isTemplatePlaceholderNode(node) && /^\s*\n/.test(node.raws.afterName) ? /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$8([hardline$6, hardline$6]) : hardline$6 : " ", path$$1.call(print, "params")]) : "", node.selector ? indent$5(concat$8([" ", path$$1.call(print, "selector")])) : "", node.value ? group$6(concat$8([" ", path$$1.call(print, "value"), isSCSSControlDirectiveNode(node) ? hasParensAroundNode(node) ? " " : line$5 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$8([isSCSSControlDirectiveNode(node) ? "" : " ", "{", indent$5(concat$8([node.nodes.length > 0 ? softline$3 : "", printNodeSequence(path$$1, options, print)])), softline$3, "}"]) : isTemplatePlaceholderNode(node) && !_parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]); + } + // postcss-media-query-parser + + case "media-query-list": + { + var parts = []; + path$$1.each(function (childPath) { + var node = childPath.getValue(); + + if (node.type === "media-query" && node.value === "") { + return; + } + + parts.push(childPath.call(print)); + }, "nodes"); + return group$6(indent$5(join$6(line$5, parts))); + } + + case "media-query": + { + return concat$8([join$6(" ", path$$1.map(print, "nodes")), isLastNode(path$$1, node) ? "" : ","]); + } + + case "media-type": + { + return adjustNumbers(adjustStrings(node.value, options)); + } + + case "media-feature-expression": + { + if (!node.nodes) { + return node.value; + } + + return concat$8(["(", concat$8(path$$1.map(print, "nodes")), ")"]); + } + + case "media-feature": + { + return maybeToLowerCase(adjustStrings(node.value.replace(/ +/g, " "), options)); + } + + case "media-colon": + { + return concat$8([node.value, " "]); + } + + case "media-value": + { + return adjustNumbers(adjustStrings(node.value, options)); + } + + case "media-keyword": + { + return adjustStrings(node.value, options); + } + + case "media-url": + { + return adjustStrings(node.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/gi, ")"), options); + } + + case "media-unknown": + { + return node.value; + } + // postcss-selector-parser + + case "selector-root": + { + return group$6(concat$8([insideAtRuleNode(path$$1, "custom-selector") ? concat$8([getAncestorNode(path$$1, "css-atrule").customSelector, line$5]) : "", join$6(concat$8([",", insideAtRuleNode(path$$1, ["extend", "custom-selector", "nest"]) ? line$5 : hardline$6]), path$$1.map(print, "nodes"))])); + } + + case "selector-selector": + { + return group$6(indent$5(concat$8(path$$1.map(print, "nodes")))); + } + + case "selector-comment": + { + return node.value; + } + + case "selector-string": + { + return adjustStrings(node.value, options); + } + + case "selector-tag": + { + var _parentNode2 = path$$1.getParentNode(); + + var index = _parentNode2 && _parentNode2.nodes.indexOf(node); + + var prevNode = index && _parentNode2.nodes[index - 1]; + return concat$8([node.namespace ? concat$8([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isHTMLTag(node.value) || isKeyframeAtRuleKeywords(path$$1, node.value) ? node.value.toLowerCase() : node.value)]); + } + + case "selector-id": + { + return concat$8(["#", node.value]); + } + + case "selector-class": + { + return concat$8([".", adjustNumbers(adjustStrings(node.value, options))]); + } + + case "selector-attribute": + { + return concat$8(["[", node.namespace ? concat$8([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.attribute.trim(), node.operator ? node.operator : "", node.value ? quoteAttributeValue(adjustStrings(node.value.trim(), options), options) : "", node.insensitive ? " i" : "", "]"]); + } + + case "selector-combinator": + { + if (node.value === "+" || node.value === ">" || node.value === "~" || node.value === ">>>") { + var _parentNode3 = path$$1.getParentNode(); + + var _leading = _parentNode3.type === "selector-selector" && _parentNode3.nodes[0] === node ? "" : line$5; + + return concat$8([_leading, node.value, isLastNode(path$$1, node) ? "" : " "]); + } + + var leading = node.value.trim().startsWith("(") ? line$5 : ""; + var value = adjustNumbers(adjustStrings(node.value.trim(), options)) || line$5; + return concat$8([leading, value]); + } + + case "selector-universal": + { + return concat$8([node.namespace ? concat$8([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.value]); + } + + case "selector-pseudo": + { + return concat$8([maybeToLowerCase(node.value), node.nodes && node.nodes.length > 0 ? concat$8(["(", join$6(", ", path$$1.map(print, "nodes")), ")"]) : ""]); + } + + case "selector-nesting": + { + return node.value; + } + + case "selector-unknown": + { + var ruleAncestorNode = getAncestorNode(path$$1, "css-rule"); // Nested SCSS property + + if (ruleAncestorNode && ruleAncestorNode.isSCSSNesterProperty) { + return adjustNumbers(adjustStrings(maybeToLowerCase(node.value), options)); + } + + return node.value; + } + // postcss-values-parser + + case "value-value": + case "value-root": + { + return path$$1.call(print, "group"); + } + + case "value-comment": + { + return concat$8([node.inline ? "//" : "/*", node.value, node.inline ? "" : "*/"]); + } + + case "value-comma_group": + { + var _parentNode4 = path$$1.getParentNode(); + + var parentParentNode = path$$1.getParentNode(1); + var declAncestorProp = getPropOfDeclNode(path$$1); + var isGridValue = declAncestorProp && _parentNode4.type === "value-value" && (declAncestorProp === "grid" || declAncestorProp.startsWith("grid-template")); + var atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + var isControlDirective = atRuleAncestorNode && isSCSSControlDirectiveNode(atRuleAncestorNode); + var printed = path$$1.map(print, "groups"); + var _parts = []; + var insideURLFunction = insideValueFunctionNode(path$$1, "url"); + var insideSCSSInterpolationInString = false; + var didBreak = false; + + for (var i = 0; i < node.groups.length; ++i) { + _parts.push(printed[i]); // Ignore value inside `url()` + + + if (insideURLFunction) { + continue; + } + + var iPrevNode = node.groups[i - 1]; + var iNode = node.groups[i]; + var iNextNode = node.groups[i + 1]; + var iNextNextNode = node.groups[i + 2]; // Ignore after latest node (i.e. before semicolon) + + if (!iNextNode) { + continue; + } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`) + + + var isStartSCSSinterpolationInString = iNode.type === "value-string" && iNode.value.startsWith("#{"); + var isEndingSCSSinterpolationInString = insideSCSSInterpolationInString && iNextNode.type === "value-string" && iNextNode.value.endsWith("}"); + + if (isStartSCSSinterpolationInString || isEndingSCSSinterpolationInString) { + insideSCSSInterpolationInString = !insideSCSSInterpolationInString; + continue; + } + + if (insideSCSSInterpolationInString) { + continue; + } // Ignore colon (i.e. `:`) + + + if (isColonNode(iNode) || isColonNode(iNextNode)) { + continue; + } // Ignore `@` in Less (i.e. `@@var;`) + + + if (iNode.type === "value-atword" && iNode.value === "") { + continue; + } // Ignore `~` in Less (i.e. `content: ~"^//* some horrible but needed css hack";`) + + + if (iNode.value === "~") { + continue; + } // Ignore `\` (i.e. `$variable: \@small;`) + + + if (iNode.value === "\\") { + continue; + } // Ignore `$$` (i.e. `background-color: $$(style)Color;`) + + + if (isPostcssSimpleVarNode(iNode, iNextNode)) { + continue; + } // Ignore spaces after `#` and after `{` and before `}` in SCSS interpolation (i.e. `#{variable}`) + + + if (isHashNode(iNode) || isLeftCurlyBraceNode(iNode) || isRightCurlyBraceNode(iNextNode) || isLeftCurlyBraceNode(iNextNode) && hasEmptyRawBefore(iNextNode) || isRightCurlyBraceNode(iNode) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`) + + + if (iNode.value === "--" && isHashNode(iNextNode)) { + continue; + } // Formatting math operations + + + var isMathOperator = isMathOperatorNode(iNode); + var isNextMathOperator = isMathOperatorNode(iNextNode); // Print spaces before and after math operators beside SCSS interpolation as is + // (i.e. `#{$var}+5`, `#{$var} +5`, `#{$var}+ 5`, `#{$var} + 5`) + // (i.e. `5+#{$var}`, `5 +#{$var}`, `5+ #{$var}`, `5 + #{$var}`) + + if ((isMathOperator && isHashNode(iNextNode) || isNextMathOperator && isRightCurlyBraceNode(iNode)) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Print spaces before and after addition and subtraction math operators as is in `calc` function + // due to the fact that it is not valid syntax + // (i.e. `calc(1px+1px)`, `calc(1px+ 1px)`, `calc(1px +1px)`, `calc(1px + 1px)`) + + + if (insideValueFunctionNode(path$$1, "calc") && (isAdditionNode(iNode) || isAdditionNode(iNextNode) || isSubtractionNode(iNode) || isSubtractionNode(iNextNode)) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Print spaces after `+` and `-` in color adjuster functions as is (e.g. `color(red l(+ 20%))`) + // Adjusters with signed numbers (e.g. `color(red l(+20%))`) output as-is. + + + var isColorAdjusterNode = (isAdditionNode(iNode) || isSubtractionNode(iNode)) && i === 0 && (iNextNode.type === "value-number" || iNextNode.isHex) && parentParentNode && isColorAdjusterFuncNode(parentParentNode) && !hasEmptyRawBefore(iNextNode); + var requireSpaceBeforeOperator = iNextNextNode && iNextNextNode.type === "value-func" || iNextNextNode && isWordNode(iNextNextNode) || iNode.type === "value-func" || isWordNode(iNode); + var requireSpaceAfterOperator = iNextNode.type === "value-func" || isWordNode(iNextNode) || iPrevNode && iPrevNode.type === "value-func" || iPrevNode && isWordNode(iPrevNode); // Formatting `/`, `+`, `-` sign + + if (!(isMultiplicationNode(iNextNode) || isMultiplicationNode(iNode)) && !insideValueFunctionNode(path$$1, "calc") && !isColorAdjusterNode && (isDivisionNode(iNextNode) && !requireSpaceBeforeOperator || isDivisionNode(iNode) && !requireSpaceAfterOperator || isAdditionNode(iNextNode) && !requireSpaceBeforeOperator || isAdditionNode(iNode) && !requireSpaceAfterOperator || isSubtractionNode(iNextNode) || isSubtractionNode(iNode)) && (hasEmptyRawBefore(iNextNode) || isMathOperator && (!iPrevNode || iPrevNode && isMathOperatorNode(iPrevNode)))) { + continue; + } // Ignore inline comment, they already contain newline at end (i.e. `// Comment`) + // Add `hardline` after inline comment (i.e. `// comment\n foo: bar;`) + + + var isInlineComment = isInlineValueCommentNode(iNode); + + if (iPrevNode && isInlineValueCommentNode(iPrevNode) || isInlineComment || isInlineValueCommentNode(iNextNode)) { + if (isInlineComment) { + _parts.push(hardline$6); + } + + continue; + } // Handle keywords in SCSS control directive + + + if (isControlDirective && (isEqualityOperatorNode(iNextNode) || isRelationalOperatorNode(iNextNode) || isIfElseKeywordNode(iNextNode) || isEachKeywordNode(iNode) || isForKeywordNode(iNode))) { + _parts.push(" "); + + continue; + } // At-rule `namespace` should be in one line + + + if (atRuleAncestorNode && atRuleAncestorNode.name.toLowerCase() === "namespace") { + _parts.push(" "); + + continue; + } // Formatting `grid` property + + + if (isGridValue) { + if (iNode.source && iNextNode.source && iNode.source.start.line !== iNextNode.source.start.line) { + _parts.push(hardline$6); + + didBreak = true; + } else { + _parts.push(" "); + } + + continue; + } // Add `space` before next math operation + // Note: `grip` property have `/` delimiter and it is not math operation, so + // `grid` property handles above + + + if (isNextMathOperator) { + _parts.push(" "); + + continue; + } // Be default all values go through `line` + + + _parts.push(line$5); + } + + if (didBreak) { + _parts.unshift(hardline$6); + } + + if (isControlDirective) { + return group$6(indent$5(concat$8(_parts))); + } // Indent is not needed for import url when url is very long + // and node has two groups + // when type is value-comma_group + // example @import url("verylongurl") projection,tv + + + if (insideURLFunctionInImportAtRuleNode(path$$1)) { + return group$6(fill$3(_parts)); + } + + return group$6(indent$5(fill$3(_parts))); + } + + case "value-paren_group": + { + var _parentNode5 = path$$1.getParentNode(); + + if (_parentNode5 && isURLFunctionNode(_parentNode5) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) { + return concat$8([node.open ? path$$1.call(print, "open") : "", join$6(",", path$$1.map(print, "groups")), node.close ? path$$1.call(print, "close") : ""]); + } + + if (!node.open) { + var _printed = path$$1.map(print, "groups"); + + var res = []; + + for (var _i = 0; _i < _printed.length; _i++) { + if (_i !== 0) { + res.push(concat$8([",", line$5])); + } + + res.push(_printed[_i]); + } + + return group$6(indent$5(fill$3(res))); + } + + var isSCSSMapItem = isSCSSMapItemNode(path$$1); + return group$6(concat$8([node.open ? path$$1.call(print, "open") : "", indent$5(concat$8([softline$3, join$6(concat$8([",", line$5]), path$$1.map(function (childPath) { + var node = childPath.getValue(); + var printed = print(childPath); // Key/Value pair in open paren already indented + + if (isKeyValuePairNode(node) && node.type === "value-comma_group" && node.groups && node.groups[2] && node.groups[2].type === "value-paren_group") { + printed.contents.contents.parts[1] = group$6(printed.contents.contents.parts[1]); + return group$6(dedent$3(printed)); + } + + return printed; + }, "groups"))])), ifBreak$2(isSCSS(options.parser, options.originalText) && isSCSSMapItem && shouldPrintComma$1(options) ? "," : ""), softline$3, node.close ? path$$1.call(print, "close") : ""]), { + shouldBreak: isSCSSMapItem + }); + } + + case "value-func": + { + return concat$8([node.value, insideAtRuleNode(path$$1, "supports") && isMediaAndSupportsKeywords(node) ? " " : "", path$$1.call(print, "group")]); + } + + case "value-paren": + { + return node.value; + } + + case "value-number": + { + return concat$8([printCssNumber(node.value), maybeToLowerCase(node.unit)]); + } + + case "value-operator": + { + return node.value; + } + + case "value-word": + { + if (node.isColor && node.isHex || isWideKeywords(node.value)) { + return node.value.toLowerCase(); + } + + return node.value; + } + + case "value-colon": + { + return concat$8([node.value, // Don't add spaces on `:` in `url` function (i.e. `url(fbglyph: cross-outline, fig-white)`) + insideValueFunctionNode(path$$1, "url") ? "" : line$5]); + } + + case "value-comma": + { + return concat$8([node.value, " "]); + } + + case "value-string": + { + return printString$2(node.raws.quote + node.value + node.raws.quote, options); + } + + case "value-atword": + { + return concat$8(["@", node.value]); + } + + case "value-unicode-range": + { + return node.value; + } + + case "value-unknown": + { + return node.value; + } + + default: + /* istanbul ignore next */ + throw new Error(`Unknown postcss type ${JSON.stringify(node.type)}`); + } +} + +function printNodeSequence(path$$1, options, print) { + var node = path$$1.getValue(); + var parts = []; + var i = 0; + path$$1.map(function (pathChild) { + var prevNode = node.nodes[i - 1]; + + if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") { + var childNode = pathChild.getValue(); + parts.push(options.originalText.slice(options.locStart(childNode), options.locEnd(childNode))); + } else { + parts.push(pathChild.call(print)); + } + + if (i !== node.nodes.length - 1) { + if (node.nodes[i + 1].type === "css-comment" && !hasNewline$3(options.originalText, options.locStart(node.nodes[i + 1]), { + backwards: true + }) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml" || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else" && node.nodes[i].type !== "css-comment") { + parts.push(" "); + } else { + parts.push(hardline$6); + + if (isNextLineEmpty$3(options.originalText, pathChild.getValue(), options) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml") { + parts.push(hardline$6); + } + } + } + + i++; + }, "nodes"); + return concat$8(parts); +} + +var STRING_REGEX = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g; +var NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g; +var STANDARD_UNIT_REGEX = /[a-zA-Z]+/g; +var WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g; +var ADJUST_NUMBERS_REGEX = RegExp(STRING_REGEX.source + `|` + `(${WORD_PART_REGEX.source})?` + `(${NUMBER_REGEX.source})` + `(${STANDARD_UNIT_REGEX.source})?`, "g"); + +function adjustStrings(value, options) { + return value.replace(STRING_REGEX, function (match) { + return printString$2(match, options); + }); +} + +function quoteAttributeValue(value, options) { + var quote = options.singleQuote ? "'" : '"'; + return value.includes('"') || value.includes("'") ? value : quote + value + quote; +} + +function adjustNumbers(value) { + return value.replace(ADJUST_NUMBERS_REGEX, function (match, quote, wordPart, number, unit) { + return !wordPart && number ? (wordPart || "") + printCssNumber(number) + maybeToLowerCase(unit || "") : match; + }); +} + +function printCssNumber(rawNumber) { + return printNumber$2(rawNumber) // Remove trailing `.0`. + .replace(/\.0(?=$|e)/, ""); +} + +var printerPostcss = { + print: genericPrint$2, + embed: embed_1$2, + insertPragma: insertPragma$2, + hasPrettierIgnore: hasIgnoreComment$2, + massageAstNode: clean_1$2 +}; + +var options$6 = { + singleQuote: commonOptions.singleQuote +}; + +var name$7 = "CSS"; +var type$6 = "markup"; +var tmScope$6 = "source.css"; +var aceMode$6 = "css"; +var codemirrorMode$6 = "css"; +var codemirrorMimeType$6 = "text/css"; +var color$2 = "#563d7c"; +var extensions$6 = [".css"]; +var languageId$6 = 50; +var css$2 = { + name: name$7, + type: type$6, + tmScope: tmScope$6, + aceMode: aceMode$6, + codemirrorMode: codemirrorMode$6, + codemirrorMimeType: codemirrorMimeType$6, + color: color$2, + extensions: extensions$6, + languageId: languageId$6 +}; + +var css$3 = Object.freeze({ + name: name$7, + type: type$6, + tmScope: tmScope$6, + aceMode: aceMode$6, + codemirrorMode: codemirrorMode$6, + codemirrorMimeType: codemirrorMimeType$6, + color: color$2, + extensions: extensions$6, + languageId: languageId$6, + default: css$2 +}); + +var name$8 = "PostCSS"; +var type$7 = "markup"; +var tmScope$7 = "source.postcss"; +var group$7 = "CSS"; +var extensions$7 = [".pcss"]; +var aceMode$7 = "text"; +var languageId$7 = 262764437; +var postcss = { + name: name$8, + type: type$7, + tmScope: tmScope$7, + group: group$7, + extensions: extensions$7, + aceMode: aceMode$7, + languageId: languageId$7 +}; + +var postcss$1 = Object.freeze({ + name: name$8, + type: type$7, + tmScope: tmScope$7, + group: group$7, + extensions: extensions$7, + aceMode: aceMode$7, + languageId: languageId$7, + default: postcss +}); + +var name$9 = "Less"; +var type$8 = "markup"; +var group$8 = "CSS"; +var extensions$8 = [".less"]; +var tmScope$8 = "source.css.less"; +var aceMode$8 = "less"; +var codemirrorMode$7 = "css"; +var codemirrorMimeType$7 = "text/css"; +var languageId$8 = 198; +var less = { + name: name$9, + type: type$8, + group: group$8, + extensions: extensions$8, + tmScope: tmScope$8, + aceMode: aceMode$8, + codemirrorMode: codemirrorMode$7, + codemirrorMimeType: codemirrorMimeType$7, + languageId: languageId$8 +}; + +var less$1 = Object.freeze({ + name: name$9, + type: type$8, + group: group$8, + extensions: extensions$8, + tmScope: tmScope$8, + aceMode: aceMode$8, + codemirrorMode: codemirrorMode$7, + codemirrorMimeType: codemirrorMimeType$7, + languageId: languageId$8, + default: less +}); + +var name$10 = "SCSS"; +var type$9 = "markup"; +var tmScope$9 = "source.scss"; +var group$9 = "CSS"; +var aceMode$9 = "scss"; +var codemirrorMode$8 = "css"; +var codemirrorMimeType$8 = "text/x-scss"; +var extensions$9 = [".scss"]; +var languageId$9 = 329; +var scss = { + name: name$10, + type: type$9, + tmScope: tmScope$9, + group: group$9, + aceMode: aceMode$9, + codemirrorMode: codemirrorMode$8, + codemirrorMimeType: codemirrorMimeType$8, + extensions: extensions$9, + languageId: languageId$9 +}; + +var scss$1 = Object.freeze({ + name: name$10, + type: type$9, + tmScope: tmScope$9, + group: group$9, + aceMode: aceMode$9, + codemirrorMode: codemirrorMode$8, + codemirrorMimeType: codemirrorMimeType$8, + extensions: extensions$9, + languageId: languageId$9, + default: scss +}); + +var require$$0$22 = ( css$3 && css$2 ) || css$3; + +var require$$1$10 = ( postcss$1 && postcss ) || postcss$1; + +var require$$2$11 = ( less$1 && less ) || less$1; + +var require$$3$4 = ( scss$1 && scss ) || scss$1; + +var languages$1 = [createLanguage(require$$0$22, { + override: { + since: "1.4.0", + parsers: ["css"], + vscodeLanguageIds: ["css"] + } +}), createLanguage(require$$1$10, { + override: { + since: "1.4.0", + parsers: ["css"], + vscodeLanguageIds: ["postcss"] + }, + extend: { + extensions: [".postcss"] + } +}), createLanguage(require$$2$11, { + override: { + since: "1.4.0", + parsers: ["less"], + vscodeLanguageIds: ["less"] + } +}), createLanguage(require$$3$4, { + override: { + since: "1.4.0", + parsers: ["scss"], + vscodeLanguageIds: ["scss"] + } +})]; +var printers$1 = { + postcss: printerPostcss +}; +var languageCss = { + languages: languages$1, + options: options$6, + printers: printers$1 +}; + +var _require$$0$builders$5 = doc.builders; +var concat$10 = _require$$0$builders$5.concat; +var join$7 = _require$$0$builders$5.join; +var softline$4 = _require$$0$builders$5.softline; +var hardline$8 = _require$$0$builders$5.hardline; +var line$6 = _require$$0$builders$5.line; +var group$10 = _require$$0$builders$5.group; +var indent$6 = _require$$0$builders$5.indent; +var ifBreak$3 = _require$$0$builders$5.ifBreak; // http://w3c.github.io/html/single-page.html#void-elements + +var voidTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]; // Formatter based on @glimmerjs/syntax's built-in test formatter: +// https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/generation/print.ts + +function print(path$$1, options, print) { + var n = path$$1.getValue(); + /* istanbul ignore if*/ + + if (!n) { + return ""; + } + + switch (n.type) { + case "Program": + { + return group$10(join$7(softline$4, path$$1.map(print, "body").filter(function (text) { + return text !== ""; + }))); + } + + case "ElementNode": + { + var tagFirstChar = n.tag[0]; + var isLocal = n.tag.indexOf(".") !== -1; + var isGlimmerComponent = tagFirstChar.toUpperCase() === tagFirstChar || isLocal; + var hasChildren = n.children.length > 0; + var isVoid = isGlimmerComponent && !hasChildren || voidTags.indexOf(n.tag) !== -1; + var closeTag = isVoid ? concat$10([" />", softline$4]) : ">"; + + var _getParams = function _getParams(path$$1, print) { + return indent$6(concat$10([n.attributes.length ? line$6 : "", join$7(line$6, path$$1.map(print, "attributes")), n.modifiers.length ? line$6 : "", join$7(line$6, path$$1.map(print, "modifiers")), n.comments.length ? line$6 : "", join$7(line$6, path$$1.map(print, "comments"))])); + }; // The problem here is that I want to not break at all if the children + // would not break but I need to force an indent, so I use a hardline. + + /** + * What happens now: + *
+ * Hello + *
+ * ==> + *
Hello
+ * This is due to me using hasChildren to decide to put the hardline in. + * I would rather use a {DOES THE WHOLE THING NEED TO BREAK} + */ + + + return concat$10([group$10(concat$10(["<", n.tag, _getParams(path$$1, print), n.blockParams.length ? ` as |${n.blockParams.join(" ")}|` : "", ifBreak$3(softline$4, ""), closeTag])), group$10(concat$10([indent$6(join$7(softline$4, [""].concat(path$$1.map(print, "children")))), ifBreak$3(hasChildren ? hardline$8 : "", ""), !isVoid ? concat$10([""]) : ""]))]); + } + + case "BlockStatement": + { + var pp = path$$1.getParentNode(1); + var isElseIf = pp && pp.inverse && pp.inverse.body[0] === n && pp.inverse.body[0].path.parts[0] === "if"; + var hasElseIf = n.inverse && n.inverse.body[0] && n.inverse.body[0].type === "BlockStatement" && n.inverse.body[0].path.parts[0] === "if"; + var indentElse = hasElseIf ? function (a) { + return a; + } : indent$6; + + if (n.inverse) { + return concat$10([isElseIf ? concat$10(["{{else ", printPathParams(path$$1, print), "}}"]) : printOpenBlock(path$$1, print), indent$6(concat$10([hardline$8, path$$1.call(print, "program")])), n.inverse && !hasElseIf ? concat$10([hardline$8, "{{else}}"]) : "", n.inverse ? indentElse(concat$10([hardline$8, path$$1.call(print, "inverse")])) : "", isElseIf ? "" : concat$10([hardline$8, printCloseBlock(path$$1, print)])]); + } else if (isElseIf) { + return concat$10([concat$10(["{{else ", printPathParams(path$$1, print), "}}"]), indent$6(concat$10([hardline$8, path$$1.call(print, "program")]))]); + } + /** + * I want this boolean to be: if params are going to cause a break, + * not that it has params. + */ + + + var hasParams = n.params.length > 0 || n.hash.pairs.length > 0; + + var _hasChildren = n.program.body.length > 0; + + return concat$10([printOpenBlock(path$$1, print), group$10(concat$10([indent$6(concat$10([softline$4, path$$1.call(print, "program")])), hasParams && _hasChildren ? hardline$8 : softline$4, printCloseBlock(path$$1, print)]))]); + } + + case "ElementModifierStatement": + case "MustacheStatement": + { + var _pp = path$$1.getParentNode(1); + + var isConcat = _pp && _pp.type === "ConcatStatement"; + return group$10(concat$10([n.escaped === false ? "{{{" : "{{", printPathParams(path$$1, print), isConcat ? "" : softline$4, n.escaped === false ? "}}}" : "}}"])); + } + + case "SubExpression": + { + var params = getParams(path$$1, print); + var printedParams = params.length > 0 ? indent$6(concat$10([line$6, group$10(join$7(line$6, params))])) : ""; + return group$10(concat$10(["(", printPath(path$$1, print), printedParams, softline$4, ")"])); + } + + case "AttrNode": + { + var isText = n.value.type === "TextNode"; + + if (isText && n.value.loc.start.column === n.value.loc.end.column) { + return concat$10([n.name]); + } + + var quote = isText ? '"' : ""; + return concat$10([n.name, "=", quote, path$$1.call(print, "value"), quote]); + } + + case "ConcatStatement": + { + return concat$10(['"', group$10(indent$6(join$7(softline$4, path$$1.map(function (partPath) { + return print(partPath); + }, "parts").filter(function (a) { + return a !== ""; + })))), '"']); + } + + case "Hash": + { + return concat$10([join$7(line$6, path$$1.map(print, "pairs"))]); + } + + case "HashPair": + { + return concat$10([n.key, "=", path$$1.call(print, "value")]); + } + + case "TextNode": + { + var leadingSpace = ""; + var trailingSpace = ""; // preserve a space inside of an attribute node where whitespace present, when next to mustache statement. + + var inAttrNode = path$$1.stack.indexOf("attributes") >= 0; + + if (inAttrNode) { + var parentNode = path$$1.getParentNode(0); + + var _isConcat = parentNode.type === "ConcatStatement"; + + if (_isConcat) { + var parts = parentNode.parts; + var partIndex = parts.indexOf(n); + + if (partIndex > 0) { + var partType = parts[partIndex - 1].type; + var isMustache = partType === "MustacheStatement"; + + if (isMustache) { + leadingSpace = " "; + } + } + + if (partIndex < parts.length - 1) { + var _partType = parts[partIndex + 1].type; + + var _isMustache = _partType === "MustacheStatement"; + + if (_isMustache) { + trailingSpace = " "; + } + } + } + } + + return n.chars.replace(/^\s+/, leadingSpace).replace(/\s+$/, trailingSpace); + } + + case "MustacheCommentStatement": + { + var dashes = n.value.indexOf("}}") > -1 ? "--" : ""; + return concat$10(["{{!", dashes, n.value, dashes, "}}"]); + } + + case "PathExpression": + { + return n.original; + } + + case "BooleanLiteral": + { + return String(n.value); + } + + case "CommentStatement": + { + return concat$10([""]); + } + + case "StringLiteral": + { + return printStringLiteral(n.value, options); + } + + case "NumberLiteral": + { + return String(n.value); + } + + case "UndefinedLiteral": + { + return "undefined"; + } + + case "NullLiteral": + { + return "null"; + } + + /* istanbul ignore next */ + + default: + throw new Error("unknown glimmer type: " + JSON.stringify(n.type)); + } +} +/** + * Prints a string literal with the correct surrounding quotes based on + * `options.singleQuote` and the number of escaped quotes contained in + * the string literal. This function is the glimmer equivalent of `printString` + * in `common/util`, but has differences because of the way escaped characters + * are treated in hbs string literals. + * @param {string} stringLiteral - the string literal value + * @param {object} options - the prettier options object + */ + + +function printStringLiteral(stringLiteral, options) { + var double = { + quote: '"', + regex: /"/g + }; + var single = { + quote: "'", + regex: /'/g + }; + var preferred = options.singleQuote ? single : double; + var alternate = preferred === single ? double : single; + var shouldUseAlternateQuote = false; // If `stringLiteral` contains at least one of the quote preferred for + // enclosing the string, we might want to enclose with the alternate quote + // instead, to minimize the number of escaped quotes. + + if (stringLiteral.includes(preferred.quote) || stringLiteral.includes(alternate.quote)) { + var numPreferredQuotes = (stringLiteral.match(preferred.regex) || []).length; + var numAlternateQuotes = (stringLiteral.match(alternate.regex) || []).length; + shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes; + } + + var enclosingQuote = shouldUseAlternateQuote ? alternate : preferred; + var escapedStringLiteral = stringLiteral.replace(enclosingQuote.regex, `\\${enclosingQuote.quote}`); + return `${enclosingQuote.quote}${escapedStringLiteral}${enclosingQuote.quote}`; +} + +function printPath(path$$1, print) { + return path$$1.call(print, "path"); +} + +function getParams(path$$1, print) { + var node = path$$1.getValue(); + var parts = []; + + if (node.params.length > 0) { + parts = parts.concat(path$$1.map(print, "params")); + } + + if (node.hash && node.hash.pairs.length > 0) { + parts.push(path$$1.call(print, "hash")); + } + + return parts; +} + +function printPathParams(path$$1, print) { + var parts = []; + parts.push(printPath(path$$1, print)); + parts = parts.concat(getParams(path$$1, print)); + return indent$6(group$10(join$7(line$6, parts))); +} + +function printBlockParams(path$$1) { + var block = path$$1.getValue(); + + if (!block.program || !block.program.blockParams.length) { + return ""; + } + + return concat$10([" as |", block.program.blockParams.join(" "), "|"]); +} + +function printOpenBlock(path$$1, print) { + return group$10(concat$10(["{{#", printPathParams(path$$1, print), printBlockParams(path$$1), softline$4, "}}"])); +} + +function printCloseBlock(path$$1, print) { + return concat$10(["{{/", path$$1.call(print, "path"), "}}"]); +} + +function clean$5(ast, newObj) { + delete newObj.loc; // (Glimmer/HTML) ignore TextNode whitespace + + if (ast.type === "TextNode") { + if (ast.chars.replace(/\s+/, "") === "") { + return null; + } + + newObj.chars = ast.chars.replace(/^\s+/, "").replace(/\s+$/, ""); + } +} + +var printerGlimmer = { + print, + massageAstNode: clean$5 +}; + +var name$11 = "Handlebars"; +var type$10 = "markup"; +var group$11 = "HTML"; +var aliases$3 = ["hbs", "htmlbars"]; +var extensions$10 = [".handlebars", ".hbs"]; +var tmScope$10 = "text.html.handlebars"; +var aceMode$10 = "handlebars"; +var languageId$10 = 155; +var handlebars = { + name: name$11, + type: type$10, + group: group$11, + aliases: aliases$3, + extensions: extensions$10, + tmScope: tmScope$10, + aceMode: aceMode$10, + languageId: languageId$10 +}; + +var handlebars$1 = Object.freeze({ + name: name$11, + type: type$10, + group: group$11, + aliases: aliases$3, + extensions: extensions$10, + tmScope: tmScope$10, + aceMode: aceMode$10, + languageId: languageId$10, + default: handlebars +}); + +var require$$0$23 = ( handlebars$1 && handlebars ) || handlebars$1; + +var languages$2 = [createLanguage(require$$0$23, { + override: { + since: null, + // unreleased + parsers: ["glimmer"], + vscodeLanguageIds: ["handlebars"] + } +})]; +var printers$2 = { + glimmer: printerGlimmer +}; +var languageHandlebars = { + languages: languages$2, + printers: printers$2 +}; + +function hasPragma$2(text) { + return /^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(text); +} + +function insertPragma$5(text) { + return "# @format\n\n" + text; +} + +var pragma$4 = { + hasPragma: hasPragma$2, + insertPragma: insertPragma$5 +}; + +var _require$$0$builders$6 = doc.builders; +var concat$11 = _require$$0$builders$6.concat; +var join$8 = _require$$0$builders$6.join; +var hardline$9 = _require$$0$builders$6.hardline; +var line$7 = _require$$0$builders$6.line; +var softline$5 = _require$$0$builders$6.softline; +var group$12 = _require$$0$builders$6.group; +var indent$7 = _require$$0$builders$6.indent; +var ifBreak$4 = _require$$0$builders$6.ifBreak; +var hasIgnoreComment$3 = util$1.hasIgnoreComment; +var isNextLineEmpty$4 = utilShared.isNextLineEmpty; +var insertPragma$4 = pragma$4.insertPragma; + +function genericPrint$3(path$$1, options, print) { + var n = path$$1.getValue(); + + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + switch (n.kind) { + case "Document": + { + var parts = []; + path$$1.map(function (pathChild, index) { + parts.push(concat$11([pathChild.call(print)])); + + if (index !== n.definitions.length - 1) { + parts.push(hardline$9); + + if (isNextLineEmpty$4(options.originalText, pathChild.getValue(), options)) { + parts.push(hardline$9); + } + } + }, "definitions"); + return concat$11([concat$11(parts), hardline$9]); + } + + case "OperationDefinition": + { + var hasOperation = options.originalText[options.locStart(n)] !== "{"; + var hasName = !!n.name; + return concat$11([hasOperation ? n.operation : "", hasOperation && hasName ? concat$11([" ", path$$1.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.map(print, "variableDefinitions"))])), softline$5, ")"])) : "", printDirectives(path$$1, print, n), n.selectionSet ? !hasOperation && !hasName ? "" : " " : "", path$$1.call(print, "selectionSet")]); + } + + case "FragmentDefinition": + { + return concat$11(["fragment ", path$$1.call(print, "name"), " on ", path$$1.call(print, "typeCondition"), printDirectives(path$$1, print, n), " ", path$$1.call(print, "selectionSet")]); + } + + case "SelectionSet": + { + return concat$11(["{", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (selectionsPath) { + return printSequence(selectionsPath, options, print); + }, "selections"))])), hardline$9, "}"]); + } + + case "Field": + { + return group$12(concat$11([n.alias ? concat$11([path$$1.call(print, "alias"), ": "]) : "", path$$1.call(print, "name"), n.arguments.length > 0 ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$5, ")"])) : "", printDirectives(path$$1, print, n), n.selectionSet ? " " : "", path$$1.call(print, "selectionSet")])); + } + + case "Name": + { + return n.value; + } + + case "StringValue": + { + if (n.block) { + return concat$11(['"""', hardline$9, join$8(hardline$9, n.value.replace(/"""/g, "\\$&").split("\n")), hardline$9, '"""']); + } + + return concat$11(['"', n.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']); + } + + case "IntValue": + case "FloatValue": + case "EnumValue": + { + return n.value; + } + + case "BooleanValue": + { + return n.value ? "true" : "false"; + } + + case "NullValue": + { + return "null"; + } + + case "Variable": + { + return concat$11(["$", path$$1.call(print, "name")]); + } + + case "ListValue": + { + return group$12(concat$11(["[", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.map(print, "values"))])), softline$5, "]"])); + } + + case "ObjectValue": + { + return group$12(concat$11(["{", options.bracketSpacing && n.fields.length > 0 ? " " : "", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.map(print, "fields"))])), softline$5, ifBreak$4("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), "}"])); + } + + case "ObjectField": + case "Argument": + { + return concat$11([path$$1.call(print, "name"), ": ", path$$1.call(print, "value")]); + } + + case "Directive": + { + return concat$11(["@", path$$1.call(print, "name"), n.arguments.length > 0 ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$5, ")"])) : ""]); + } + + case "NamedType": + { + return path$$1.call(print, "name"); + } + + case "VariableDefinition": + { + return concat$11([path$$1.call(print, "variable"), ": ", path$$1.call(print, "type"), n.defaultValue ? concat$11([" = ", path$$1.call(print, "defaultValue")]) : ""]); + } + + case "TypeExtensionDefinition": + { + return concat$11(["extend ", path$$1.call(print, "definition")]); + } + + case "ObjectTypeExtension": + case "ObjectTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "ObjectTypeExtension" ? "extend " : "", "type ", path$$1.call(print, "name"), n.interfaces.length > 0 ? concat$11([" implements ", join$8(determineInterfaceSeparator(options.originalText.substr(options.locStart(n), options.locEnd(n))), path$$1.map(print, "interfaces"))]) : "", printDirectives(path$$1, print, n), n.fields.length > 0 ? concat$11([" {", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$9, "}"]) : ""]); + } + + case "FieldDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", path$$1.call(print, "name"), n.arguments.length > 0 ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$5, ")"])) : "", ": ", path$$1.call(print, "type"), printDirectives(path$$1, print, n)]); + } + + case "DirectiveDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", "directive ", "@", path$$1.call(print, "name"), n.arguments.length > 0 ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$5, ")"])) : "", concat$11([" on ", join$8(" | ", path$$1.map(print, "locations"))])]); + } + + case "EnumTypeExtension": + case "EnumTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "EnumTypeExtension" ? "extend " : "", "enum ", path$$1.call(print, "name"), printDirectives(path$$1, print, n), n.values.length > 0 ? concat$11([" {", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (valuesPath) { + return printSequence(valuesPath, options, print); + }, "values"))])), hardline$9, "}"]) : ""]); + } + + case "EnumValueDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", path$$1.call(print, "name"), printDirectives(path$$1, print, n)]); + } + + case "InputValueDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? n.description.block ? hardline$9 : line$7 : "", path$$1.call(print, "name"), ": ", path$$1.call(print, "type"), n.defaultValue ? concat$11([" = ", path$$1.call(print, "defaultValue")]) : "", printDirectives(path$$1, print, n)]); + } + + case "InputObjectTypeExtension": + case "InputObjectTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", path$$1.call(print, "name"), printDirectives(path$$1, print, n), n.fields.length > 0 ? concat$11([" {", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$9, "}"]) : ""]); + } + + case "SchemaDefinition": + { + return concat$11(["schema", printDirectives(path$$1, print, n), " {", n.operationTypes.length > 0 ? indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (opsPath) { + return printSequence(opsPath, options, print); + }, "operationTypes"))])) : "", hardline$9, "}"]); + } + + case "OperationTypeDefinition": + { + return concat$11([path$$1.call(print, "operation"), ": ", path$$1.call(print, "type")]); + } + + case "InterfaceTypeExtension": + case "InterfaceTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", path$$1.call(print, "name"), printDirectives(path$$1, print, n), n.fields.length > 0 ? concat$11([" {", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$9, "}"]) : ""]); + } + + case "FragmentSpread": + { + return concat$11(["...", path$$1.call(print, "name"), printDirectives(path$$1, print, n)]); + } + + case "InlineFragment": + { + return concat$11(["...", n.typeCondition ? concat$11([" on ", path$$1.call(print, "typeCondition")]) : "", printDirectives(path$$1, print, n), " ", path$$1.call(print, "selectionSet")]); + } + + case "UnionTypeExtension": + case "UnionTypeDefinition": + { + return group$12(concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", group$12(concat$11([n.kind === "UnionTypeExtension" ? "extend " : "", "union ", path$$1.call(print, "name"), printDirectives(path$$1, print, n), n.types.length > 0 ? concat$11([" =", ifBreak$4("", " "), indent$7(concat$11([ifBreak$4(concat$11([line$7, " "])), join$8(concat$11([line$7, "| "]), path$$1.map(print, "types"))]))]) : ""]))])); + } + + case "ScalarTypeExtension": + case "ScalarTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", path$$1.call(print, "name"), printDirectives(path$$1, print, n)]); + } + + case "NonNullType": + { + return concat$11([path$$1.call(print, "type"), "!"]); + } + + case "ListType": + { + return concat$11(["[", path$$1.call(print, "type"), "]"]); + } + + default: + /* istanbul ignore next */ + throw new Error("unknown graphql type: " + JSON.stringify(n.kind)); + } +} + +function printDirectives(path$$1, print, n) { + if (n.directives.length === 0) { + return ""; + } + + return concat$11([" ", group$12(indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", " "), softline$5]), path$$1.map(print, "directives"))])))]); +} + +function printSequence(sequencePath, options, print) { + var count = sequencePath.getValue().length; + return sequencePath.map(function (path$$1, i) { + var printed = print(path$$1); + + if (isNextLineEmpty$4(options.originalText, path$$1.getValue(), options) && i < count - 1) { + return concat$11([printed, hardline$9]); + } + + return printed; + }); +} + +function canAttachComment$1(node) { + return node.kind && node.kind !== "Comment"; +} + +function printComment$2(commentPath) { + var comment = commentPath.getValue(); + + if (comment.kind === "Comment") { + return "#" + comment.value.trimRight(); + } + + throw new Error("Not a comment: " + JSON.stringify(comment)); +} + +function determineInterfaceSeparator(originalSource) { + var start = originalSource.indexOf("implements"); + + if (start === -1) { + throw new Error("Must implement interfaces: " + originalSource); + } + + var end = originalSource.indexOf("{"); + + if (end === -1) { + end = originalSource.length; + } + + return originalSource.substr(start, end).includes("&") ? " & " : ", "; +} + +function clean$6(node, newNode +/*, parent*/ +) { + delete newNode.loc; + delete newNode.comments; +} + +var printerGraphql = { + print: genericPrint$3, + massageAstNode: clean$6, + hasPrettierIgnore: hasIgnoreComment$3, + insertPragma: insertPragma$4, + printComment: printComment$2, + canAttachComment: canAttachComment$1 +}; + +var options$9 = { + bracketSpacing: commonOptions.bracketSpacing +}; + +var name$12 = "GraphQL"; +var type$11 = "data"; +var extensions$11 = [".graphql", ".gql"]; +var tmScope$11 = "source.graphql"; +var aceMode$11 = "text"; +var languageId$11 = 139; +var graphql = { + name: name$12, + type: type$11, + extensions: extensions$11, + tmScope: tmScope$11, + aceMode: aceMode$11, + languageId: languageId$11 +}; + +var graphql$1 = Object.freeze({ + name: name$12, + type: type$11, + extensions: extensions$11, + tmScope: tmScope$11, + aceMode: aceMode$11, + languageId: languageId$11, + default: graphql +}); + +var require$$0$24 = ( graphql$1 && graphql ) || graphql$1; + +var languages$3 = [createLanguage(require$$0$24, { + override: { + since: "1.5.0", + parsers: ["graphql"], + vscodeLanguageIds: ["graphql"] + } +})]; +var printers$3 = { + graphql: printerGraphql +}; +var languageGraphql = { + languages: languages$3, + options: options$9, + printers: printers$3 +}; + +const json$6 = {"cjkPattern":"[\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\u303f\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312e\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u32fe\\u3300-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fea\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]","kPattern":"[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]","punctuationPattern":"[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0af0\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166d-\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e49\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc9\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]"}; + +var cjkPattern = json$6.cjkPattern; +var kPattern = json$6.kPattern; +var punctuationPattern$1 = json$6.punctuationPattern; +var getLast$5 = util$1.getLast; +var kRegex = new RegExp(kPattern); +var punctuationRegex = new RegExp(punctuationPattern$1); +/** + * split text into whitespaces and words + * @param {string} text + * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>} + */ + +function splitText$1(text, options) { + var KIND_NON_CJK = "non-cjk"; + var KIND_CJ_LETTER = "cj-letter"; + var KIND_K_LETTER = "k-letter"; + var KIND_CJK_PUNCTUATION = "cjk-punctuation"; + var nodes = []; + (options.proseWrap === "preserve" ? text : text.replace(new RegExp(`(${cjkPattern})\n(${cjkPattern})`, "g"), "$1$2")).split(/([ \t\n]+)/).forEach(function (token, index, tokens) { + // whitespace + if (index % 2 === 1) { + nodes.push({ + type: "whitespace", + value: /\n/.test(token) ? "\n" : " " + }); + return; + } // word separated by whitespace + + + if ((index === 0 || index === tokens.length - 1) && token === "") { + return; + } + + token.split(new RegExp(`(${cjkPattern})`)).forEach(function (innerToken, innerIndex, innerTokens) { + if ((innerIndex === 0 || innerIndex === innerTokens.length - 1) && innerToken === "") { + return; + } // non-CJK word + + + if (innerIndex % 2 === 0) { + if (innerToken !== "") { + appendNode({ + type: "word", + value: innerToken, + kind: KIND_NON_CJK, + hasLeadingPunctuation: punctuationRegex.test(innerToken[0]), + hasTrailingPunctuation: punctuationRegex.test(getLast$5(innerToken)) + }); + } + + return; + } // CJK character + + + appendNode(punctuationRegex.test(innerToken) ? { + type: "word", + value: innerToken, + kind: KIND_CJK_PUNCTUATION, + hasLeadingPunctuation: true, + hasTrailingPunctuation: true + } : { + type: "word", + value: innerToken, + kind: kRegex.test(innerToken) ? KIND_K_LETTER : KIND_CJ_LETTER, + hasLeadingPunctuation: false, + hasTrailingPunctuation: false + }); + }); + }); + return nodes; + + function appendNode(node) { + var lastNode = getLast$5(nodes); + + if (lastNode && lastNode.type === "word") { + if (lastNode.kind === KIND_NON_CJK && node.kind === KIND_CJ_LETTER && !lastNode.hasTrailingPunctuation || lastNode.kind === KIND_CJ_LETTER && node.kind === KIND_NON_CJK && !node.hasLeadingPunctuation) { + nodes.push({ + type: "whitespace", + value: " " + }); + } else if (!isBetween(KIND_NON_CJK, KIND_CJK_PUNCTUATION) && // disallow leading/trailing full-width whitespace + ![lastNode.value, node.value].some(function (value) { + return /\u3000/.test(value); + })) { + nodes.push({ + type: "whitespace", + value: "" + }); + } + } + + nodes.push(node); + + function isBetween(kind1, kind2) { + return lastNode.kind === kind1 && node.kind === kind2 || lastNode.kind === kind2 && node.kind === kind1; + } + } +} + +function getOrderedListItemInfo$1(orderListItem, originalText) { + var _originalText$slice$m = originalText.slice(orderListItem.position.start.offset, orderListItem.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/), + _originalText$slice$m2 = _slicedToArray(_originalText$slice$m, 4), + numberText = _originalText$slice$m2[1], + marker = _originalText$slice$m2[2], + leadingSpaces = _originalText$slice$m2[3]; + + return { + numberText, + marker, + leadingSpaces + }; +} // workaround for https://github.com/remarkjs/remark/issues/351 +// leading and trailing newlines are stripped by remark + + +function getFencedCodeBlockValue$2(node, originalText) { + var text = originalText.slice(node.position.start.offset, node.position.end.offset); + var leadingSpaceCount = text.match(/^\s*/)[0].length; + var replaceRegex = new RegExp(`^\\s{0,${leadingSpaceCount}}`); + var lineContents = text.replace(/\r\n?/g, "\n").split("\n"); + var markerStyle = text[leadingSpaceCount]; // ` or ~ + + var marker = text.slice(leadingSpaceCount).match(new RegExp(`^[${markerStyle}]+`))[0]; // https://spec.commonmark.org/0.28/#example-104: Closing fences may be indented by 0-3 spaces + // https://spec.commonmark.org/0.28/#example-93: The closing code fence must be at least as long as the opening fence + + var hasEndMarker = new RegExp(`^\\s{0,3}${marker}`).test(lineContents[lineContents.length - 1].slice(getIndent(lineContents.length - 1))); + return lineContents.slice(1, hasEndMarker ? -1 : undefined).map(function (x, i) { + return x.slice(getIndent(i + 1)).replace(replaceRegex, ""); + }).join("\n"); + + function getIndent(lineIndex) { + return node.position.indent[lineIndex - 1] - 1; + } +} + +function mapAst(ast, handler) { + return function preorder(node, index, parentStack) { + parentStack = parentStack || []; + var newNode = Object.assign({}, handler(node, index, parentStack)); + + if (newNode.children) { + newNode.children = newNode.children.map(function (child, index) { + return preorder(child, index, [newNode].concat(parentStack)); + }); + } + + return newNode; + }(ast, null, null); +} + +var utils$8 = { + mapAst, + splitText: splitText$1, + punctuationPattern: punctuationPattern$1, + getFencedCodeBlockValue: getFencedCodeBlockValue$2, + getOrderedListItemInfo: getOrderedListItemInfo$1 +}; + +var _require$$0$builders$8 = doc.builders; +var hardline$11 = _require$$0$builders$8.hardline; +var literalline$5 = _require$$0$builders$8.literalline; +var concat$13 = _require$$0$builders$8.concat; +var markAsRoot$3 = _require$$0$builders$8.markAsRoot; +var mapDoc$5 = doc.utils.mapDoc; +var getFencedCodeBlockValue$1 = utils$8.getFencedCodeBlockValue; + +function embed$4(path$$1, print, textToDoc, options) { + var node = path$$1.getValue(); + + if (node.type === "code" && node.lang !== null) { + // only look for the first string so as to support [markdown-preview-enhanced](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk) + var langMatch = node.lang.match(/^[A-Za-z0-9_-]+/); + var lang = langMatch ? langMatch[0] : ""; + var parser = getParserName(lang); + + if (parser) { + var styleUnit = options.__inJsTemplate ? "~" : "`"; + var style = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1)); + var doc$$2 = textToDoc(getFencedCodeBlockValue$1(node, options.originalText), { + parser + }); + return markAsRoot$3(concat$13([style, node.lang, hardline$11, replaceNewlinesWithLiterallines(doc$$2), style])); + } + } + + if (node.type === "yaml") { + return markAsRoot$3(concat$13(["---", hardline$11, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, { + parser: "yaml" + })) : "", "---"])); + } // MDX + + + switch (node.type) { + case "importExport": + return textToDoc(node.value, { + parser: "babylon" + }); + + case "jsx": + return textToDoc(node.value, { + parser: "__js_expression" + }); + } + + return null; + + function getParserName(lang) { + var supportInfo = support.getSupportInfo(null, { + plugins: options.plugins + }); + var language = supportInfo.languages.find(function (language) { + return language.name.toLowerCase() === lang || language.aliases && language.aliases.indexOf(lang) !== -1 || language.extensions && language.extensions.find(function (ext) { + return ext.substring(1) === lang; + }); + }); + + if (language) { + return language.parsers[0]; + } + + return null; + } + + function replaceNewlinesWithLiterallines(doc$$2) { + return mapDoc$5(doc$$2, function (currentDoc) { + return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$13(currentDoc.split(/(\n)/g).map(function (v, i) { + return i % 2 === 0 ? v : literalline$5; + })) : currentDoc; + }); + } +} + +var embed_1$4 = embed$4; + +var pragma$6 = createCommonjsModule(function (module) { + "use strict"; + + var pragmas = ["format", "prettier"]; + + function startWithPragma(text) { + var pragma = `@(${pragmas.join("|")})`; + var regex = new RegExp([``, ``].join("|"), "m"); + var matched = text.match(regex); + return matched && matched.index === 0; + } + + module.exports = { + startWithPragma, + hasPragma: function hasPragma(text) { + return startWithPragma(frontMatter(text).content.trimLeft()); + }, + insertPragma: function insertPragma(text) { + var extracted = frontMatter(text); + var pragma = ``; + return extracted.frontMatter ? `${extracted.frontMatter.raw}\n\n${pragma}\n\n${extracted.content}` : `${pragma}\n\n${extracted.content}`; + } + }; +}); + +var getOrderedListItemInfo$2 = utils$8.getOrderedListItemInfo; +var mapAst$1 = utils$8.mapAst; +var splitText$2 = utils$8.splitText; // 0x0 ~ 0x10ffff + +var isSingleCharRegex = /^([\u0000-\uffff]|[\ud800-\udbff][\udc00-\udfff])$/; + +function preprocess$2(ast, options) { + ast = restoreUnescapedCharacter(ast, options); + ast = mergeContinuousTexts(ast); + ast = transformInlineCode(ast); + ast = transformIndentedCodeblockAndMarkItsParentList(ast, options); + ast = markAlignedList(ast, options); + ast = splitTextIntoSentences(ast, options); + ast = transformImportExport(ast); + ast = mergeContinuousImportExport(ast); + return ast; +} + +function transformImportExport(ast) { + return mapAst$1(ast, function (node) { + if (node.type !== "import" && node.type !== "export") { + return node; + } + + return Object.assign({}, node, { + type: "importExport" + }); + }); +} + +function transformInlineCode(ast) { + return mapAst$1(ast, function (node) { + if (node.type !== "inlineCode") { + return node; + } + + return Object.assign({}, node, { + value: node.value.replace(/\s+/g, " ") + }); + }); +} + +function restoreUnescapedCharacter(ast, options) { + return mapAst$1(ast, function (node) { + return node.type !== "text" ? node : Object.assign({}, node, { + value: node.value !== "*" && node.value !== "_" && node.value !== "$" && // handle these cases in printer + isSingleCharRegex.test(node.value) && node.position.end.offset - node.position.start.offset !== node.value.length ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : node.value + }); + }); +} + +function mergeContinuousImportExport(ast) { + return mergeChildren(ast, function (prevNode, node) { + return prevNode.type === "importExport" && node.type === "importExport"; + }, function (prevNode, node) { + return { + type: "importExport", + value: prevNode.value + "\n\n" + node.value, + position: { + start: prevNode.position.start, + end: node.position.end + } + }; + }); +} + +function mergeChildren(ast, shouldMerge, mergeNode) { + return mapAst$1(ast, function (node) { + if (!node.children) { + return node; + } + + var children = node.children.reduce(function (current, child) { + var lastChild = current[current.length - 1]; + + if (lastChild && shouldMerge(lastChild, child)) { + current.splice(-1, 1, mergeNode(lastChild, child)); + } else { + current.push(child); + } + + return current; + }, []); + return Object.assign({}, node, { + children + }); + }); +} + +function mergeContinuousTexts(ast) { + return mergeChildren(ast, function (prevNode, node) { + return prevNode.type === "text" && node.type === "text"; + }, function (prevNode, node) { + return { + type: "text", + value: prevNode.value + node.value, + position: { + start: prevNode.position.start, + end: node.position.end + } + }; + }); +} + +function splitTextIntoSentences(ast, options) { + return mapAst$1(ast, function (node, index, _ref) { + var _ref2 = _slicedToArray(_ref, 1), + parentNode = _ref2[0]; + + if (node.type !== "text") { + return node; + } + + var value = node.value; + + if (parentNode.type === "paragraph") { + if (index === 0) { + value = value.trimLeft(); + } + + if (index === parentNode.children.length - 1) { + value = value.trimRight(); + } + } + + return { + type: "sentence", + position: node.position, + children: splitText$2(value, options) + }; + }); +} + +function transformIndentedCodeblockAndMarkItsParentList(ast, options) { + return mapAst$1(ast, function (node, index, parentStack) { + if (node.type === "code") { + // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it + var isIndented = /^\n?( {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset)); + node.isIndented = isIndented; + + if (isIndented) { + for (var i = 0; i < parentStack.length; i++) { + var parent = parentStack[i]; // no need to check checked items + + if (parent.hasIndentedCodeblock) { + break; + } + + if (parent.type === "list") { + parent.hasIndentedCodeblock = true; + } + } + } + } + + return node; + }); +} + +function markAlignedList(ast, options) { + return mapAst$1(ast, function (node, index, parentStack) { + if (node.type === "list" && node.children.length !== 0) { + // if one of its parents is not aligned, it's not possible to be aligned in sub-lists + for (var i = 0; i < parentStack.length; i++) { + var parent = parentStack[i]; + + if (parent.type === "list" && !parent.isAligned) { + node.isAligned = false; + return node; + } + } + + node.isAligned = isAligned(node); + } + + return node; + }); + + function getListItemStart(listItem) { + return listItem.children.length === 0 ? -1 : listItem.children[0].position.start.column - 1; + } + + function isAligned(list) { + if (!list.ordered) { + /** + * - 123 + * - 123 + */ + return true; + } + + var _list$children = _slicedToArray(list.children, 2), + firstItem = _list$children[0], + secondItem = _list$children[1]; + + var firstInfo = getOrderedListItemInfo$2(firstItem, options.originalText); + + if (firstInfo.leadingSpaces.length > 1) { + /** + * 1. 123 + * + * 1. 123 + * 1. 123 + */ + return true; + } + + var firstStart = getListItemStart(firstItem); + + if (firstStart === -1) { + /** + * 1. + * + * 1. + * 1. + */ + return false; + } + + if (list.children.length === 1) { + /** + * aligned: + * + * 11. 123 + * + * not aligned: + * + * 1. 123 + */ + return firstStart % options.tabWidth === 0; + } + + var secondStart = getListItemStart(secondItem); + + if (firstStart !== secondStart) { + /** + * 11. 123 + * 1. 123 + * + * 1. 123 + * 11. 123 + */ + return false; + } + + if (firstStart % options.tabWidth === 0) { + /** + * 11. 123 + * 12. 123 + */ + return true; + } + /** + * aligned: + * + * 11. 123 + * 1. 123 + * + * not aligned: + * + * 1. 123 + * 2. 123 + */ + + + var secondInfo = getOrderedListItemInfo$2(secondItem, options.originalText); + return secondInfo.leadingSpaces.length > 1; + } +} + +var preprocess_1$2 = preprocess$2; + +var _require$$0$builders$7 = doc.builders; +var concat$12 = _require$$0$builders$7.concat; +var join$9 = _require$$0$builders$7.join; +var line$8 = _require$$0$builders$7.line; +var literalline$4 = _require$$0$builders$7.literalline; +var markAsRoot$2 = _require$$0$builders$7.markAsRoot; +var hardline$10 = _require$$0$builders$7.hardline; +var softline$6 = _require$$0$builders$7.softline; +var fill$4 = _require$$0$builders$7.fill; +var align$2 = _require$$0$builders$7.align; +var indent$8 = _require$$0$builders$7.indent; +var group$13 = _require$$0$builders$7.group; +var mapDoc$4 = doc.utils.mapDoc; +var printDocToString$3 = doc.printer.printDocToString; +var getFencedCodeBlockValue = utils$8.getFencedCodeBlockValue; +var getOrderedListItemInfo = utils$8.getOrderedListItemInfo; +var splitText = utils$8.splitText; +var punctuationPattern = utils$8.punctuationPattern; +var TRAILING_HARDLINE_NODES = ["importExport"]; +var SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"]; +var SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"]; +var INLINE_NODE_TYPES = ["liquidNode", "inlineCode", "emphasis", "strong", "delete", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"]; +var INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat(["tableCell", "paragraph", "heading"]); + +function genericPrint$4(path$$1, options, print) { + var node = path$$1.getValue(); + + if (shouldRemainTheSameContent(path$$1)) { + return concat$12(splitText(options.originalText.slice(node.position.start.offset, node.position.end.offset), options).map(function (node) { + return node.type === "word" ? node.value : node.value === "" ? "" : printLine(path$$1, node.value, options); + })); + } + + switch (node.type) { + case "root": + if (node.children.length === 0) { + return ""; + } + + return concat$12([normalizeDoc(printRoot(path$$1, options, print)), TRAILING_HARDLINE_NODES.indexOf(getLastDescendantNode(node).type) === -1 ? hardline$10 : ""]); + + case "paragraph": + return printChildren(path$$1, options, print, { + postprocessor: fill$4 + }); + + case "sentence": + return printChildren(path$$1, options, print); + + case "word": + return node.value.replace(/[*$]/g, "\\$&") // escape all `*` and `$` (math) + .replace(new RegExp([`(^|${punctuationPattern})(_+)`, `(_+)(${punctuationPattern}|$)`].join("|"), "g"), function (_, text1, underscore1, underscore2, text2) { + return (underscore1 ? `${text1}${underscore1}` : `${underscore2}${text2}`).replace(/_/g, "\\_"); + }); + // escape all `_` except concating with non-punctuation, e.g. `1_2_3` is not considered emphasis + + case "whitespace": + { + var parentNode = path$$1.getParentNode(); + var index = parentNode.children.indexOf(node); + var nextNode = parentNode.children[index + 1]; + var proseWrap = // leading char that may cause different syntax + nextNode && /^>|^([-+*]|#{1,6}|[0-9]+[.)])$/.test(nextNode.value) ? "never" : options.proseWrap; + return printLine(path$$1, node.value, { + proseWrap + }); + } + + case "emphasis": + { + var _parentNode = path$$1.getParentNode(); + + var _index = _parentNode.children.indexOf(node); + + var prevNode = _parentNode.children[_index - 1]; + var _nextNode = _parentNode.children[_index + 1]; + var hasPrevOrNextWord = // `1*2*3` is considered emphais but `1_2_3` is not + prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && util$1.getLast(prevNode.children).type === "word" && !util$1.getLast(prevNode.children).hasTrailingPunctuation || _nextNode && _nextNode.type === "sentence" && _nextNode.children.length > 0 && _nextNode.children[0].type === "word" && !_nextNode.children[0].hasLeadingPunctuation; + var style = hasPrevOrNextWord || getAncestorNode$2(path$$1, "emphasis") ? "*" : "_"; + return concat$12([style, printChildren(path$$1, options, print), style]); + } + + case "strong": + return concat$12(["**", printChildren(path$$1, options, print), "**"]); + + case "delete": + return concat$12(["~~", printChildren(path$$1, options, print), "~~"]); + + case "inlineCode": + { + var backtickCount = util$1.getMaxContinuousCount(node.value, "`"); + + var _style = backtickCount === 1 ? "``" : "`"; + + var gap = backtickCount ? " " : ""; + return concat$12([_style, gap, node.value, gap, _style]); + } + + case "link": + switch (options.originalText[node.position.start.offset]) { + case "<": + { + var mailto = "mailto:"; + var url = // is parsed as { url: "mailto:hello@example.com" } + node.url.startsWith(mailto) && options.originalText.slice(node.position.start.offset + 1, node.position.start.offset + 1 + mailto.length) !== mailto ? node.url.slice(mailto.length) : node.url; + return concat$12(["<", url, ">"]); + } + + case "[": + return concat$12(["[", printChildren(path$$1, options, print), "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]); + + default: + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + } + + case "image": + return concat$12(["![", node.alt || "", "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]); + + case "blockquote": + return concat$12(["> ", align$2("> ", printChildren(path$$1, options, print))]); + + case "heading": + return concat$12(["#".repeat(node.depth) + " ", printChildren(path$$1, options, print)]); + + case "code": + { + if (node.isIndented) { + // indented code block + var alignment = " ".repeat(4); + return align$2(alignment, concat$12([alignment, replaceNewlinesWith(node.value, hardline$10)])); + } // fenced code block + + + var styleUnit = options.__inJsTemplate ? "~" : "`"; + + var _style2 = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1)); + + return concat$12([_style2, node.lang || "", hardline$10, replaceNewlinesWith(getFencedCodeBlockValue(node, options.originalText), hardline$10), hardline$10, _style2]); + } + + case "yaml": + case "toml": + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + + case "html": + { + var _parentNode2 = path$$1.getParentNode(); + + var value = _parentNode2.type === "root" && util$1.getLast(_parentNode2.children) === node ? node.value.trimRight() : node.value; + var isHtmlComment = /^$/.test(value); + return replaceNewlinesWith(value, isHtmlComment ? hardline$10 : markAsRoot$2(literalline$4)); + } + + case "list": + { + var nthSiblingIndex = getNthListSiblingIndex(node, path$$1.getParentNode()); + var isGitDiffFriendlyOrderedList = node.ordered && node.children.length > 1 && +getOrderedListItemInfo(node.children[1], options.originalText).numberText === 1; + return printChildren(path$$1, options, print, { + processor: function processor(childPath, index) { + var prefix = getPrefix(); + return concat$12([prefix, align$2(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))]); + + function getPrefix() { + var rawPrefix = node.ordered ? (index === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* "; + return node.isAligned || + /* workaround for https://github.com/remarkjs/remark/issues/315 */ + node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix; + } + } + }); + } + + case "thematicBreak": + { + var counter = getAncestorCounter$1(path$$1, "list"); + + if (counter === -1) { + return "---"; + } + + var _nthSiblingIndex = getNthListSiblingIndex(path$$1.getParentNode(counter), path$$1.getParentNode(counter + 1)); + + return _nthSiblingIndex % 2 === 0 ? "***" : "---"; + } + + case "linkReference": + return concat$12(["[", printChildren(path$$1, options, print), "]", node.referenceType === "full" ? concat$12(["[", node.identifier, "]"]) : node.referenceType === "collapsed" ? "[]" : ""]); + + case "imageReference": + switch (node.referenceType) { + case "full": + return concat$12(["![", node.alt || "", "][", node.identifier, "]"]); + + default: + return concat$12(["![", node.alt, "]", node.referenceType === "collapsed" ? "[]" : ""]); + } + + case "definition": + { + var lineOrSpace = options.proseWrap === "always" ? line$8 : " "; + return group$13(concat$12([concat$12(["[", node.identifier, "]:"]), indent$8(concat$12([lineOrSpace, printUrl(node.url), node.title === null ? "" : concat$12([lineOrSpace, printTitle(node.title, options, false)])]))])); + } + + case "footnote": + return concat$12(["[^", printChildren(path$$1, options, print), "]"]); + + case "footnoteReference": + return concat$12(["[^", node.identifier, "]"]); + + case "footnoteDefinition": + { + var _nextNode2 = path$$1.getParentNode().children[path$$1.getName() + 1]; + var shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line); + return concat$12(["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren(path$$1, options, print) : group$13(concat$12([align$2(" ".repeat(options.tabWidth), printChildren(path$$1, options, print, { + processor: function processor(childPath, index) { + return index === 0 ? group$13(concat$12([softline$6, softline$6, childPath.call(print)])) : childPath.call(print); + } + })), _nextNode2 && _nextNode2.type === "footnoteDefinition" ? softline$6 : ""]))]); + } + + case "table": + return printTable(path$$1, options, print); + + case "tableCell": + return printChildren(path$$1, options, print); + + case "break": + return /\s/.test(options.originalText[node.position.start.offset]) ? concat$12([" ", markAsRoot$2(literalline$4)]) : concat$12(["\\", hardline$10]); + + case "liquidNode": + return replaceNewlinesWith(node.value, hardline$10); + // MDX + + case "importExport": + case "jsx": + return node.value; + // fallback to the original text if multiparser failed + + case "math": + return concat$12(["$$", hardline$10, node.value ? concat$12([replaceNewlinesWith(node.value, hardline$10), hardline$10]) : "", "$$"]); + + case "inlineMath": + { + // $$math$$ can be block math in some variants + // see https://github.com/Rokt33r/remark-math#double-dollars-in-inline + var _style3 = options.originalText[node.position.start.offset + 1] === "$" ? "$$" : "$"; + + return concat$12([_style3, node.value, _style3]); + } + + case "tableRow": // handled in "table" + + case "listItem": // handled in "list" + + default: + throw new Error(`Unknown markdown type ${JSON.stringify(node.type)}`); + } +} + +function printListItem(path$$1, options, print, listPrefix) { + var node = path$$1.getValue(); + var prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] "; + return concat$12([prefix, printChildren(path$$1, options, print, { + processor: function processor(childPath, index) { + if (index === 0 && childPath.getValue().type !== "list") { + return align$2(" ".repeat(prefix.length), childPath.call(print)); + } + + var alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block + ); + return concat$12([alignment, align$2(alignment, childPath.call(print))]); + } + })]); +} + +function alignListPrefix(prefix, options) { + var additionalSpaces = getAdditionalSpaces(); + return prefix + " ".repeat(additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block + ); + + function getAdditionalSpaces() { + var restSpaces = prefix.length % options.tabWidth; + return restSpaces === 0 ? 0 : options.tabWidth - restSpaces; + } +} + +function getNthListSiblingIndex(node, parentNode) { + return getNthSiblingIndex(node, parentNode, function (siblingNode) { + return siblingNode.ordered === node.ordered; + }); +} + +function replaceNewlinesWith(str, doc$$2) { + return join$9(doc$$2, str.replace(/\r\n?/g, "\n").split("\n")); +} + +function getNthSiblingIndex(node, parentNode, condition) { + condition = condition || function () { + return true; + }; + + var index = -1; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = parentNode.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var childNode = _step.value; + + if (childNode.type === node.type && condition(childNode)) { + index++; + } else { + index = -1; + } + + if (childNode === node) { + return index; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +} + +function getAncestorCounter$1(path$$1, typeOrTypes) { + var types = [].concat(typeOrTypes); + var counter = -1; + var ancestorNode; + + while (ancestorNode = path$$1.getParentNode(++counter)) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode$2(path$$1, typeOrTypes) { + var counter = getAncestorCounter$1(path$$1, typeOrTypes); + return counter === -1 ? null : path$$1.getParentNode(counter); +} + +function printLine(path$$1, value, options) { + if (options.proseWrap === "preserve" && value === "\n") { + return hardline$10; + } + + var isBreakable = options.proseWrap === "always" && !getAncestorNode$2(path$$1, SINGLE_LINE_NODE_TYPES); + return value !== "" ? isBreakable ? line$8 : " " : isBreakable ? softline$6 : ""; +} + +function printTable(path$$1, options, print) { + var node = path$$1.getValue(); + var contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } } + + path$$1.map(function (rowPath) { + var rowContents = []; + rowPath.map(function (cellPath) { + rowContents.push(printDocToString$3(cellPath.call(print), options).formatted); + }, "children"); + contents.push(rowContents); + }, "children"); + var columnMaxWidths = contents.reduce(function (currentWidths, rowContents) { + return currentWidths.map(function (width, columnIndex) { + return Math.max(width, util$1.getStringWidth(rowContents[columnIndex])); + }); + }, contents[0].map(function () { + return 3; + }) // minimum width = 3 (---, :--, :-:, --:) + ); + return join$9(hardline$10, [printRow(contents[0]), printSeparator(), join$9(hardline$10, contents.slice(1).map(printRow))]); + + function printSeparator() { + return concat$12(["| ", join$9(" | ", columnMaxWidths.map(function (width, index) { + switch (node.align[index]) { + case "left": + return ":" + "-".repeat(width - 1); + + case "right": + return "-".repeat(width - 1) + ":"; + + case "center": + return ":" + "-".repeat(width - 2) + ":"; + + default: + return "-".repeat(width); + } + })), " |"]); + } + + function printRow(rowContents) { + return concat$12(["| ", join$9(" | ", rowContents.map(function (rowContent, columnIndex) { + switch (node.align[columnIndex]) { + case "right": + return alignRight(rowContent, columnMaxWidths[columnIndex]); + + case "center": + return alignCenter(rowContent, columnMaxWidths[columnIndex]); + + default: + return alignLeft(rowContent, columnMaxWidths[columnIndex]); + } + })), " |"]); + } + + function alignLeft(text, width) { + return concat$12([text, " ".repeat(width - util$1.getStringWidth(text))]); + } + + function alignRight(text, width) { + return concat$12([" ".repeat(width - util$1.getStringWidth(text)), text]); + } + + function alignCenter(text, width) { + var spaces = width - util$1.getStringWidth(text); + var left = Math.floor(spaces / 2); + var right = spaces - left; + return concat$12([" ".repeat(left), text, " ".repeat(right)]); + } +} + +function printRoot(path$$1, options, print) { + /** @typedef {{ index: number, offset: number }} IgnorePosition */ + + /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */ + var ignoreRanges = []; + /** @type {IgnorePosition | null} */ + + var ignoreStart = null; + var children = path$$1.getValue().children; + children.forEach(function (childNode, index) { + switch (isPrettierIgnore(childNode)) { + case "start": + if (ignoreStart === null) { + ignoreStart = { + index, + offset: childNode.position.end.offset + }; + } + + break; + + case "end": + if (ignoreStart !== null) { + ignoreRanges.push({ + start: ignoreStart, + end: { + index, + offset: childNode.position.start.offset + } + }); + ignoreStart = null; + } + + break; + + default: + // do nothing + break; + } + }); + return printChildren(path$$1, options, print, { + processor: function processor(childPath, index) { + if (ignoreRanges.length !== 0) { + var ignoreRange = ignoreRanges[0]; + + if (index === ignoreRange.start.index) { + return concat$12([children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value]); + } + + if (ignoreRange.start.index < index && index < ignoreRange.end.index) { + return false; + } + + if (index === ignoreRange.end.index) { + ignoreRanges.shift(); + return false; + } + } + + return childPath.call(print); + } + }); +} + +function printChildren(path$$1, options, print, events$$1) { + events$$1 = events$$1 || {}; + var postprocessor = events$$1.postprocessor || concat$12; + + var processor = events$$1.processor || function (childPath) { + return childPath.call(print); + }; + + var node = path$$1.getValue(); + var parts = []; + var lastChildNode; + path$$1.map(function (childPath, index) { + var childNode = childPath.getValue(); + var result = processor(childPath, index); + + if (result !== false) { + var data = { + parts, + prevNode: lastChildNode, + parentNode: node, + options + }; + + if (!shouldNotPrePrintHardline(childNode, data)) { + parts.push(hardline$10); + + if (lastChildNode && TRAILING_HARDLINE_NODES.indexOf(lastChildNode.type) !== -1) { + if (shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$10); + } + } else { + if (shouldPrePrintDoubleHardline(childNode, data) || shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$10); + } + + if (shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$10); + } + } + } + + parts.push(result); + lastChildNode = childNode; + } + }, "children"); + return postprocessor(parts); +} + +function getLastDescendantNode(node) { + var current = node; + + while (current.children && current.children.length !== 0) { + current = current.children[current.children.length - 1]; + } + + return current; +} +/** @return {false | 'next' | 'start' | 'end'} */ + + +function isPrettierIgnore(node) { + if (node.type !== "html") { + return false; + } + + var match = node.value.match(/^$/); + return match === null ? false : match[1] ? match[1] : "next"; +} + +function shouldNotPrePrintHardline(node, data) { + var isFirstNode = data.parts.length === 0; + var isInlineNode = INLINE_NODE_TYPES.indexOf(node.type) !== -1; + var isInlineHTML = node.type === "html" && INLINE_NODE_WRAPPER_TYPES.indexOf(data.parentNode.type) !== -1; + return isFirstNode || isInlineNode || isInlineHTML; +} + +function shouldPrePrintDoubleHardline(node, data) { + var isSequence = (data.prevNode && data.prevNode.type) === node.type; + var isSiblingNode = isSequence && SIBLING_NODE_TYPES.indexOf(node.type) !== -1; + var isInTightListItem = data.parentNode.type === "listItem" && !data.parentNode.loose; + var isPrevNodeLooseListItem = data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose; + var isPrevNodePrettierIgnore = isPrettierIgnore(data.prevNode) === "next"; + var isBlockHtmlWithoutBlankLineBetweenPrevHtml = node.type === "html" && data.prevNode && data.prevNode.type === "html" && data.prevNode.position.end.line + 1 === node.position.start.line; + return isPrevNodeLooseListItem || !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || isBlockHtmlWithoutBlankLineBetweenPrevHtml); +} + +function shouldPrePrintTripleHardline(node, data) { + var isPrevNodeList = data.prevNode && data.prevNode.type === "list"; + var isIndentedCode = node.type === "code" && node.isIndented; + return isPrevNodeList && isIndentedCode; +} + +function shouldRemainTheSameContent(path$$1) { + var ancestorNode = getAncestorNode$2(path$$1, ["linkReference", "imageReference"]); + return ancestorNode && (ancestorNode.type !== "linkReference" || ancestorNode.referenceType !== "full"); +} + +function normalizeDoc(doc$$2) { + return mapDoc$4(doc$$2, function (currentDoc) { + if (!currentDoc.parts) { + return currentDoc; + } + + if (currentDoc.type === "concat" && currentDoc.parts.length === 1) { + return currentDoc.parts[0]; + } + + var parts = []; + currentDoc.parts.forEach(function (part) { + if (part.type === "concat") { + parts.push.apply(parts, part.parts); + } else if (part !== "") { + parts.push(part); + } + }); + return Object.assign({}, currentDoc, { + parts: normalizeParts(parts) + }); + }); +} + +function printUrl(url, dangerousCharOrChars) { + var dangerousChars = [" "].concat(dangerousCharOrChars || []); + return new RegExp(dangerousChars.map(function (x) { + return `\\${x}`; + }).join("|")).test(url) ? `<${url}>` : url; +} + +function printTitle(title, options, printSpace) { + if (printSpace == null) { + printSpace = true; + } + + if (!title) { + return ""; + } + + if (printSpace) { + return " " + printTitle(title, options, false); + } + + if (title.includes('"') && title.includes("'") && !title.includes(")")) { + return `(${title})`; // avoid escaped quotes + } // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split + + + var singleCount = title.split("'").length - 1; + var doubleCount = title.split('"').length - 1; + var quote = singleCount > doubleCount ? '"' : doubleCount > singleCount ? "'" : options.singleQuote ? "'" : '"'; + title = title.replace(new RegExp(`(${quote})`, "g"), "\\$1"); + return `${quote}${title}${quote}`; +} + +function normalizeParts(parts) { + return parts.reduce(function (current, part) { + var lastPart = util$1.getLast(current); + + if (typeof lastPart === "string" && typeof part === "string") { + current.splice(-1, 1, lastPart + part); + } else { + current.push(part); + } + + return current; + }, []); +} + +function clamp(value, min, max) { + return value < min ? min : value > max ? max : value; +} + +function clean$7(ast, newObj, parent) { + delete newObj.position; + delete newObj.raw; // front-matter + // for codeblock + + if (ast.type === "code" || ast.type === "yaml" || ast.type === "import" || ast.type === "export" || ast.type === "jsx") { + delete newObj.value; + } + + if (ast.type === "list") { + delete newObj.isAligned; + } // texts can be splitted or merged + + + if (ast.type === "text") { + return null; + } + + if (ast.type === "inlineCode") { + newObj.value = ast.value.replace(/[ \t\n]+/g, " "); + } // for insert pragma + + + if (parent && parent.type === "root" && parent.children.length > 0 && (parent.children[0] === ast || (parent.children[0].type === "yaml" || parent.children[0].type === "toml") && parent.children[1] === ast) && ast.type === "html" && pragma$6.startWithPragma(ast.value)) { + return null; + } +} + +function hasPrettierIgnore$1(path$$1) { + var index = +path$$1.getName(); + + if (index === 0) { + return false; + } + + var prevNode = path$$1.getParentNode().children[index - 1]; + return isPrettierIgnore(prevNode) === "next"; +} + +var printerMarkdown = { + preprocess: preprocess_1$2, + print: genericPrint$4, + embed: embed_1$4, + massageAstNode: clean$7, + hasPrettierIgnore: hasPrettierIgnore$1, + insertPragma: pragma$6.insertPragma +}; + +var options$12 = { + proseWrap: commonOptions.proseWrap, + singleQuote: commonOptions.singleQuote +}; + +var name$13 = "Markdown"; +var type$12 = "prose"; +var aliases$4 = ["pandoc"]; +var aceMode$12 = "markdown"; +var codemirrorMode$9 = "gfm"; +var codemirrorMimeType$9 = "text/x-gfm"; +var wrap = true; +var extensions$12 = [".md", ".markdown", ".mdown", ".mdwn", ".mkd", ".mkdn", ".mkdown", ".ronn", ".workbook"]; +var tmScope$12 = "source.gfm"; +var languageId$12 = 222; +var markdown = { + name: name$13, + type: type$12, + aliases: aliases$4, + aceMode: aceMode$12, + codemirrorMode: codemirrorMode$9, + codemirrorMimeType: codemirrorMimeType$9, + wrap: wrap, + extensions: extensions$12, + tmScope: tmScope$12, + languageId: languageId$12 +}; + +var markdown$1 = Object.freeze({ + name: name$13, + type: type$12, + aliases: aliases$4, + aceMode: aceMode$12, + codemirrorMode: codemirrorMode$9, + codemirrorMimeType: codemirrorMimeType$9, + wrap: wrap, + extensions: extensions$12, + tmScope: tmScope$12, + languageId: languageId$12, + default: markdown +}); + +var require$$0$27 = ( markdown$1 && markdown ) || markdown$1; + +var languages$4 = [createLanguage(require$$0$27, { + override: { + since: "1.8.0", + parsers: ["remark"], + vscodeLanguageIds: ["markdown"] + }, + extend: { + filenames: ["README"] + } +}), createLanguage({ + name: "MDX", + extensions: [".mdx"] +}, // TODO: use linguist data +{ + override: { + since: "1.15.0", + parsers: ["mdx"], + vscodeLanguageIds: ["mdx"] + } +})]; +var printers$4 = { + mdast: printerMarkdown +}; +var languageMarkdown = { + languages: languages$4, + options: options$12, + printers: printers$4 +}; + +var clean$8 = function clean(ast, newNode) { + delete newNode.sourceSpan; + delete newNode.startSourceSpan; + delete newNode.endSourceSpan; + delete newNode.nameSpan; + delete newNode.valueSpan; + + if (ast.type === "text" || ast.type === "comment") { + return null; + } // may be formatted by multiparser + + + if (ast.type === "yaml" || ast.type === "toml") { + return null; + } + + if (ast.type === "attribute") { + delete newNode.value; + } + + if (ast.type === "docType") { + delete newNode.value; + } +}; + +var a = ["accesskey", "charset", "coords", "download", "href", "hreflang", "name", "ping", "referrerpolicy", "rel", "rev", "shape", "tabindex", "target", "type"]; +var abbr = ["title"]; +var applet = ["align", "alt", "archive", "code", "codebase", "height", "hspace", "name", "object", "vspace", "width"]; +var area = ["accesskey", "alt", "coords", "download", "href", "hreflang", "nohref", "ping", "referrerpolicy", "rel", "shape", "tabindex", "target", "type"]; +var audio = ["autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src"]; +var base$2 = ["href", "target"]; +var basefont = ["color", "face", "size"]; +var bdo = ["dir"]; +var blockquote = ["cite"]; +var body = ["alink", "background", "bgcolor", "link", "text", "vlink"]; +var br = ["clear"]; +var button = ["accesskey", "autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "tabindex", "type", "value"]; +var canvas = ["height", "width"]; +var caption = ["align"]; +var col = ["align", "char", "charoff", "span", "valign", "width"]; +var colgroup = ["align", "char", "charoff", "span", "valign", "width"]; +var data$1 = ["value"]; +var del = ["cite", "datetime"]; +var details = ["open"]; +var dfn = ["title"]; +var dialog = ["open"]; +var dir = ["compact"]; +var div = ["align"]; +var dl = ["compact"]; +var embed$7 = ["height", "src", "type", "width"]; +var fieldset = ["disabled", "form", "name"]; +var font = ["color", "face", "size"]; +var form = ["accept", "accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"]; +var frame = ["frameborder", "longdesc", "marginheight", "marginwidth", "name", "noresize", "scrolling", "src"]; +var frameset = ["cols", "rows"]; +var h1 = ["align"]; +var h2 = ["align"]; +var h3 = ["align"]; +var h4 = ["align"]; +var h5 = ["align"]; +var h6 = ["align"]; +var head = ["profile"]; +var hr = ["align", "noshade", "size", "width"]; +var html = ["manifest", "version"]; +var iframe = ["align", "allowfullscreen", "allowpaymentrequest", "allowusermedia", "frameborder", "height", "longdesc", "marginheight", "marginwidth", "name", "referrerpolicy", "sandbox", "scrolling", "src", "srcdoc", "width"]; +var img = ["align", "alt", "border", "crossorigin", "decoding", "height", "hspace", "ismap", "longdesc", "name", "referrerpolicy", "sizes", "src", "srcset", "usemap", "vspace", "width"]; +var input = ["accept", "accesskey", "align", "alt", "autocomplete", "autofocus", "checked", "dirname", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "ismap", "list", "max", "maxlength", "min", "minlength", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "tabindex", "title", "type", "usemap", "value", "width"]; +var ins = ["cite", "datetime"]; +var isindex = ["prompt"]; +var label = ["accesskey", "for", "form"]; +var legend = ["accesskey", "align"]; +var li = ["type", "value"]; +var link$1 = ["as", "charset", "color", "crossorigin", "href", "hreflang", "integrity", "media", "nonce", "referrerpolicy", "rel", "rev", "sizes", "target", "title", "type"]; +var map = ["name"]; +var menu = ["compact"]; +var meta = ["charset", "content", "http-equiv", "name", "scheme"]; +var meter = ["high", "low", "max", "min", "optimum", "value"]; +var object = ["align", "archive", "border", "classid", "codebase", "codetype", "data", "declare", "form", "height", "hspace", "name", "standby", "tabindex", "type", "typemustmatch", "usemap", "vspace", "width"]; +var ol = ["compact", "reversed", "start", "type"]; +var optgroup = ["disabled", "label"]; +var option = ["disabled", "label", "selected", "value"]; +var output = ["for", "form", "name"]; +var p = ["align"]; +var param = ["name", "type", "value", "valuetype"]; +var pre = ["width"]; +var progress = ["max", "value"]; +var q = ["cite"]; +var script = ["async", "charset", "crossorigin", "defer", "integrity", "language", "nomodule", "nonce", "referrerpolicy", "src", "type"]; +var select = ["autocomplete", "autofocus", "disabled", "form", "multiple", "name", "required", "size", "tabindex"]; +var slot = ["name"]; +var source = ["media", "sizes", "src", "srcset", "type"]; +var style = ["media", "nonce", "title", "type"]; +var table = ["align", "bgcolor", "border", "cellpadding", "cellspacing", "frame", "rules", "summary", "width"]; +var tbody = ["align", "char", "charoff", "valign"]; +var td = ["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"]; +var textarea = ["accesskey", "autocomplete", "autofocus", "cols", "dirname", "disabled", "form", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows", "tabindex", "wrap"]; +var tfoot = ["align", "char", "charoff", "valign"]; +var th = ["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"]; +var thead = ["align", "char", "charoff", "valign"]; +var time = ["datetime"]; +var tr = ["align", "bgcolor", "char", "charoff", "valign"]; +var track = ["default", "kind", "label", "src", "srclang"]; +var ul = ["compact", "type"]; +var video = ["autoplay", "controls", "crossorigin", "height", "loop", "muted", "playsinline", "poster", "preload", "src", "width"]; +var index$13 = { + a: a, + abbr: abbr, + applet: applet, + area: area, + audio: audio, + base: base$2, + basefont: basefont, + bdo: bdo, + blockquote: blockquote, + body: body, + br: br, + button: button, + canvas: canvas, + caption: caption, + col: col, + colgroup: colgroup, + data: data$1, + del: del, + details: details, + dfn: dfn, + dialog: dialog, + dir: dir, + div: div, + dl: dl, + embed: embed$7, + fieldset: fieldset, + font: font, + form: form, + frame: frame, + frameset: frameset, + h1: h1, + h2: h2, + h3: h3, + h4: h4, + h5: h5, + h6: h6, + head: head, + hr: hr, + html: html, + iframe: iframe, + img: img, + input: input, + ins: ins, + isindex: isindex, + label: label, + legend: legend, + li: li, + link: link$1, + map: map, + menu: menu, + meta: meta, + meter: meter, + object: object, + ol: ol, + optgroup: optgroup, + option: option, + output: output, + p: p, + param: param, + pre: pre, + progress: progress, + q: q, + script: script, + select: select, + slot: slot, + source: source, + style: style, + table: table, + tbody: tbody, + td: td, + textarea: textarea, + tfoot: tfoot, + th: th, + thead: thead, + time: time, + tr: tr, + track: track, + ul: ul, + video: video, + "*": ["accesskey", "autocapitalize", "class", "contenteditable", "dir", "draggable", "hidden", "id", "inputmode", "is", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "nonce", "slot", "spellcheck", "style", "tabindex", "title", "translate"] +}; + +var htmlElementAttributes = Object.freeze({ + a: a, + abbr: abbr, + applet: applet, + area: area, + audio: audio, + base: base$2, + basefont: basefont, + bdo: bdo, + blockquote: blockquote, + body: body, + br: br, + button: button, + canvas: canvas, + caption: caption, + col: col, + colgroup: colgroup, + data: data$1, + del: del, + details: details, + dfn: dfn, + dialog: dialog, + dir: dir, + div: div, + dl: dl, + embed: embed$7, + fieldset: fieldset, + font: font, + form: form, + frame: frame, + frameset: frameset, + h1: h1, + h2: h2, + h3: h3, + h4: h4, + h5: h5, + h6: h6, + head: head, + hr: hr, + html: html, + iframe: iframe, + img: img, + input: input, + ins: ins, + isindex: isindex, + label: label, + legend: legend, + li: li, + link: link$1, + map: map, + menu: menu, + meta: meta, + meter: meter, + object: object, + ol: ol, + optgroup: optgroup, + option: option, + output: output, + p: p, + param: param, + pre: pre, + progress: progress, + q: q, + script: script, + select: select, + slot: slot, + source: source, + style: style, + table: table, + tbody: tbody, + td: td, + textarea: textarea, + tfoot: tfoot, + th: th, + thead: thead, + time: time, + tr: tr, + track: track, + ul: ul, + video: video, + default: index$13 +}); + +const json$9 = {"CSS_DISPLAY_TAGS":{"area":"none","base":"none","basefont":"none","datalist":"none","head":"none","link":"none","meta":"none","noembed":"none","noframes":"none","param":"none","rp":"none","script":"none","source":"block","style":"none","template":"inline","track":"block","title":"none","html":"block","body":"block","address":"block","blockquote":"block","center":"block","div":"block","figure":"block","figcaption":"block","footer":"block","form":"block","header":"block","hr":"block","legend":"block","listing":"block","main":"block","p":"block","plaintext":"block","pre":"block","xmp":"block","slot":"contents","ruby":"ruby","rt":"ruby-text","article":"block","aside":"block","h1":"block","h2":"block","h3":"block","h4":"block","h5":"block","h6":"block","hgroup":"block","nav":"block","section":"block","dir":"block","dd":"block","dl":"block","dt":"block","ol":"block","ul":"block","li":"list-item","table":"table","caption":"table-caption","colgroup":"table-column-group","col":"table-column","thead":"table-header-group","tbody":"table-row-group","tfoot":"table-footer-group","tr":"table-row","td":"table-cell","th":"table-cell","fieldset":"block","button":"inline-block","video":"inline-block","audio":"inline-block"},"CSS_DISPLAY_DEFAULT":"inline","CSS_WHITE_SPACE_TAGS":{"listing":"pre","plaintext":"pre","pre":"pre","xmp":"pre","nobr":"nowrap","table":"initial","textarea":"pre-wrap"},"CSS_WHITE_SPACE_DEFAULT":"normal"}; + +var htmlElementAttributes$1 = ( htmlElementAttributes && index$13 ) || htmlElementAttributes; + +var concat$15 = doc.builders.concat; +var mapDoc$7 = doc.utils.mapDoc; +var CSS_DISPLAY_TAGS = json$9.CSS_DISPLAY_TAGS; +var CSS_DISPLAY_DEFAULT = json$9.CSS_DISPLAY_DEFAULT; +var CSS_WHITE_SPACE_TAGS = json$9.CSS_WHITE_SPACE_TAGS; +var CSS_WHITE_SPACE_DEFAULT = json$9.CSS_WHITE_SPACE_DEFAULT; +var HTML_TAGS = arrayToMap(htmlTagNames$1); +var HTML_ELEMENT_ATTRIBUTES = mapObject(htmlElementAttributes$1, arrayToMap); + +function arrayToMap(array) { + var map = Object.create(null); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var value = _step.value; + map[value] = true; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return map; +} + +function mapObject(object, fn) { + var newObject = Object.create(null); + + var _arr = Object.keys(object); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + newObject[key] = fn(object[key], key); + } + + return newObject; +} + +function shouldPreserveContent$1(node) { + if (node.type === "element" && node.fullName === "template" && node.attrMap.lang && node.attrMap.lang !== "html") { + return true; + } // unterminated node in ie conditional comment + // e.g. + + + if (node.type === "ieConditionalComment" && node.lastChild && !node.lastChild.isSelfClosing && !node.lastChild.endSourceSpan) { + return true; + } // incomplete html in ie conditional comment + // e.g. + + + if (node.type === "ieConditionalComment" && !node.complete) { + return true; + } // TODO: handle non-text children in
+
+
+  if (isPreLikeNode$1(node) && node.children.some(function (child) {
+    return child.type !== "text" && child.type !== "interpolation";
+  })) {
+    return true;
+  }
+
+  return false;
+}
+
+function hasPrettierIgnore$3(node) {
+  if (node.type === "attribute" || node.type === "text") {
+    return false;
+  }
+
+  if (!node.parent) {
+    return false;
+  }
+
+  if (typeof node.index !== "number" || node.index === 0) {
+    return false;
+  }
+
+  var prevNode = node.parent.children[node.index - 1];
+  return isPrettierIgnore$1(prevNode);
+}
+
+function isPrettierIgnore$1(node) {
+  return node.type === "comment" && node.value.trim() === "prettier-ignore";
+}
+
+function getPrettierIgnoreAttributeCommentData$1(value) {
+  var match = value.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);
+
+  if (!match) {
+    return false;
+  }
+
+  if (!match[1]) {
+    return true;
+  }
+
+  return match[1].split(/\s+/);
+}
+
+function isScriptLikeTag$1(node) {
+  return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
+}
+
+function isFrontMatterNode(node) {
+  return node.type === "yaml" || node.type === "toml";
+}
+
+function canHaveInterpolation(node) {
+  return node.children && !isScriptLikeTag$1(node);
+}
+
+function isWhitespaceSensitiveNode(node) {
+  return isScriptLikeTag$1(node) || node.type === "interpolation" || isIndentationSensitiveNode(node);
+}
+
+function isIndentationSensitiveNode(node) {
+  return getNodeCssStyleWhiteSpace(node).startsWith("pre");
+}
+
+function isLeadingSpaceSensitiveNode(node) {
+  if (isFrontMatterNode(node)) {
+    return false;
+  }
+
+  if ((node.type === "text" || node.type === "interpolation") && node.prev && (node.prev.type === "text" || node.prev.type === "interpolation")) {
+    return true;
+  }
+
+  if (!node.parent || node.parent.cssDisplay === "none") {
+    return false;
+  }
+
+  if (!node.prev && node.parent.type === "element" && node.parent.tagDefinition.ignoreFirstLf) {
+    return false;
+  }
+
+  if (isPreLikeNode$1(node.parent)) {
+    return true;
+  }
+
+  if (!node.prev && (node.parent.type === "root" || isScriptLikeTag$1(node.parent) || !isFirstChildLeadingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
+    return false;
+  }
+
+  if (node.prev && !isNextLeadingSpaceSensitiveCssDisplay(node.prev.cssDisplay)) {
+    return false;
+  }
+
+  return true;
+}
+
+function isTrailingSpaceSensitiveNode(node) {
+  if (isFrontMatterNode(node)) {
+    return false;
+  }
+
+  if ((node.type === "text" || node.type === "interpolation") && node.next && (node.next.type === "text" || node.next.type === "interpolation")) {
+    return true;
+  }
+
+  if (!node.parent || node.parent.cssDisplay === "none") {
+    return false;
+  }
+
+  if (isPreLikeNode$1(node.parent)) {
+    return true;
+  }
+
+  if (!node.next && (node.parent.type === "root" || isScriptLikeTag$1(node.parent) || !isLastChildTrailingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
+    return false;
+  }
+
+  if (node.next && !isPrevTrailingSpaceSensitiveCssDisplay(node.next.cssDisplay)) {
+    return false;
+  }
+
+  return true;
+}
+
+function isDanglingSpaceSensitiveNode(node) {
+  return isDanglingSpaceSensitiveCssDisplay(node.cssDisplay) && !isScriptLikeTag$1(node);
+}
+
+function replaceNewlines$1(text, replacement) {
+  return text.split(/(\n)/g).map(function (data, index) {
+    return index % 2 === 1 ? replacement : data;
+  });
+}
+
+function replaceDocNewlines$1(doc$$2, replacement) {
+  return mapDoc$7(doc$$2, function (currentDoc) {
+    return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$15(replaceNewlines$1(currentDoc, replacement)) : currentDoc;
+  });
+}
+
+function forceNextEmptyLine$1(node) {
+  return isFrontMatterNode(node) || node.next && node.sourceSpan.end.line + 1 < node.next.sourceSpan.start.line;
+}
+/** firstChild leadingSpaces and lastChild trailingSpaces */
+
+
+function forceBreakContent$1(node) {
+  return forceBreakChildren$1(node) || node.type === "element" && node.children.length !== 0 && (["body", "template", "script", "style"].indexOf(node.name) !== -1 || node.children.some(function (child) {
+    return hasNonTextChild(child);
+  }));
+}
+/** spaces between children */
+
+
+function forceBreakChildren$1(node) {
+  return node.type === "element" && node.children.length !== 0 && (["html", "head", "ul", "ol", "select"].indexOf(node.name) !== -1 || node.cssDisplay.startsWith("table") && node.cssDisplay !== "table-cell");
+}
+
+function preferHardlineAsLeadingSpaces$1(node) {
+  return preferHardlineAsSurroundingSpaces(node) || node.prev && preferHardlineAsTrailingSpaces(node.prev) || isCustomElementWithSurroundingLineBreak(node);
+}
+
+function preferHardlineAsTrailingSpaces(node) {
+  return preferHardlineAsSurroundingSpaces(node) || node.type === "element" && node.fullName === "br" || isCustomElementWithSurroundingLineBreak(node);
+}
+
+function isCustomElementWithSurroundingLineBreak(node) {
+  return isCustomElement(node) && hasSurroundingLineBreak(node);
+}
+
+function isCustomElement(node) {
+  return node.type === "element" && !node.namespace && (node.name.includes("-") || /[A-Z]/.test(node.name[0]));
+}
+
+function hasSurroundingLineBreak(node) {
+  return hasLeadingLineBreak(node) && hasTrailingLineBreak(node);
+}
+
+function hasLeadingLineBreak(node) {
+  return node.hasLeadingSpaces && (node.prev ? node.prev.sourceSpan.end.line < node.sourceSpan.start.line : node.parent.type === "root" || node.parent.startSourceSpan.end.line < node.sourceSpan.start.line);
+}
+
+function hasTrailingLineBreak(node) {
+  return node.hasTrailingSpaces && (node.next ? node.next.sourceSpan.start.line > node.sourceSpan.end.line : node.parent.type === "root" || node.parent.endSourceSpan.start.line > node.sourceSpan.end.line);
+}
+
+function preferHardlineAsSurroundingSpaces(node) {
+  switch (node.type) {
+    case "ieConditionalComment":
+    case "comment":
+    case "directive":
+      return true;
+
+    case "element":
+      return ["script", "select"].indexOf(node.name) !== -1;
+  }
+
+  return false;
+}
+
+function getLastDescendant$1(node) {
+  return node.lastChild ? getLastDescendant$1(node.lastChild) : node;
+}
+
+function hasNonTextChild(node) {
+  return node.children && node.children.some(function (child) {
+    return child.type !== "text";
+  });
+}
+
+function inferScriptParser$1(node) {
+  if (node.name === "script" && !node.attrMap.src) {
+    if (!node.attrMap.lang && !node.attrMap.type || node.attrMap.type === "module" || node.attrMap.type === "text/javascript" || node.attrMap.type === "text/babel" || node.attrMap.type === "application/javascript") {
+      return "babylon";
+    }
+
+    if (node.attrMap.type === "application/x-typescript" || node.attrMap.lang === "ts" || node.attrMap.lang === "tsx") {
+      return "typescript";
+    }
+
+    if (node.attrMap.type === "text/markdown") {
+      return "markdown";
+    }
+  }
+
+  if (node.name === "style") {
+    if (!node.attrMap.lang || node.attrMap.lang === "postcss") {
+      return "css";
+    }
+
+    if (node.attrMap.lang === "scss") {
+      return "scss";
+    }
+
+    if (node.attrMap.lang === "less") {
+      return "less";
+    }
+  }
+
+  return null;
+}
+
+function isBlockLikeCssDisplay(cssDisplay) {
+  return cssDisplay === "block" || cssDisplay === "list-item" || cssDisplay.startsWith("table");
+}
+
+function isFirstChildLeadingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+}
+
+function isLastChildTrailingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+}
+
+function isPrevTrailingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay);
+}
+
+function isNextLeadingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay);
+}
+
+function isDanglingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+}
+
+function isPreLikeNode$1(node) {
+  return getNodeCssStyleWhiteSpace(node).startsWith("pre");
+}
+
+function countParents$1(path$$1) {
+  var predicate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
+    return true;
+  };
+  var counter = 0;
+
+  for (var i = path$$1.stack.length - 1; i >= 0; i--) {
+    var value = path$$1.stack[i];
+
+    if (value && typeof value === "object" && !Array.isArray(value) && predicate(value)) {
+      counter++;
+    }
+  }
+
+  return counter;
+}
+
+function hasParent(node, fn) {
+  var current = node;
+
+  while (current) {
+    if (fn(current)) {
+      return true;
+    }
+
+    current = current.parent;
+  }
+
+  return false;
+}
+
+function getNodeCssStyleDisplay(node, options) {
+  if (node.prev && node.prev.type === "comment") {
+    // 
+    var match = node.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);
+
+    if (match) {
+      return match[1];
+    }
+  }
+
+  var isInSvgForeignObject = false;
+
+  if (node.type === "element" && node.namespace === "svg") {
+    if (hasParent(node, function (parent) {
+      return parent.fullName === "svg:foreignObject";
+    })) {
+      isInSvgForeignObject = true;
+    } else {
+      return node.name === "svg" ? "inline-block" : "block";
+    }
+  }
+
+  switch (options.htmlWhitespaceSensitivity) {
+    case "strict":
+      return "inline";
+
+    case "ignore":
+      return "block";
+
+    default:
+      return node.type === "element" && (!node.namespace || isInSvgForeignObject) && CSS_DISPLAY_TAGS[node.name] || CSS_DISPLAY_DEFAULT;
+  }
+}
+
+function getNodeCssStyleWhiteSpace(node) {
+  return node.type === "element" && !node.namespace && CSS_WHITE_SPACE_TAGS[node.name] || CSS_WHITE_SPACE_DEFAULT;
+}
+
+function getCommentData$1(node) {
+  var rightTrimmedValue = node.value.trimRight();
+  var hasLeadingEmptyLine = /^[^\S\n]*?\n/.test(node.value);
+
+  if (hasLeadingEmptyLine) {
+    /**
+     *     
+     */
+    return dedentString$1(rightTrimmedValue.replace(/^\s*\n/, ""));
+  }
+  /**
+   *     
+   *
+   *     
+   *
+   *     
+   */
+
+
+  if (!rightTrimmedValue.includes("\n")) {
+    return rightTrimmedValue.trimLeft();
+  }
+
+  var firstNewlineIndex = rightTrimmedValue.indexOf("\n");
+  var dataWithoutLeadingLine = rightTrimmedValue.slice(firstNewlineIndex + 1);
+  var minIndentationForDataWithoutLeadingLine = getMinIndentation(dataWithoutLeadingLine);
+  var leadingSpaces = rightTrimmedValue.match(/^[^\n\S]*/)[0].length;
+  var commentDataStartColumn = node.sourceSpan.start.col + "
+   */
+
+  if (minIndentationForDataWithoutLeadingLine >= commentDataStartColumn) {
+    return dedentString$1(" ".repeat(commentDataStartColumn) + rightTrimmedValue.slice(leadingSpaces));
+  }
+
+  var leadingLineValue = rightTrimmedValue.slice(0, firstNewlineIndex);
+  /**
+   *     
+   */
+
+  return leadingLineValue.trim() + "\n" + dedentString$1(dataWithoutLeadingLine, minIndentationForDataWithoutLeadingLine);
+}
+
+function getMinIndentation(text) {
+  var minIndentation = Infinity;
+  var _iteratorNormalCompletion2 = true;
+  var _didIteratorError2 = false;
+  var _iteratorError2 = undefined;
+
+  try {
+    for (var _iterator2 = text.split("\n")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+      var lineText = _step2.value;
+
+      if (lineText.length === 0) {
+        continue;
+      }
+
+      if (/\S/.test(lineText[0])) {
+        return 0;
+      }
+
+      var indentation = lineText.match(/^\s*/)[0].length;
+
+      if (lineText.length === indentation) {
+        continue;
+      }
+
+      if (indentation < minIndentation) {
+        minIndentation = indentation;
+      }
+    }
+  } catch (err) {
+    _didIteratorError2 = true;
+    _iteratorError2 = err;
+  } finally {
+    try {
+      if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+        _iterator2.return();
+      }
+    } finally {
+      if (_didIteratorError2) {
+        throw _iteratorError2;
+      }
+    }
+  }
+
+  return minIndentation === Infinity ? 0 : minIndentation;
+}
+
+function dedentString$1(text) {
+  var minIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMinIndentation(text);
+  return minIndent === 0 ? text : text.split("\n").map(function (lineText) {
+    return lineText.slice(minIndent);
+  }).join("\n");
+}
+
+function normalizeParts$2(parts) {
+  var newParts = [];
+  var restParts = parts.slice();
+
+  while (restParts.length !== 0) {
+    var part = restParts.shift();
+
+    if (!part) {
+      continue;
+    }
+
+    if (part.type === "concat") {
+      Array.prototype.unshift.apply(restParts, part.parts);
+      continue;
+    }
+
+    if (newParts.length !== 0 && typeof newParts[newParts.length - 1] === "string" && typeof part === "string") {
+      newParts.push(newParts.pop() + part);
+      continue;
+    }
+
+    newParts.push(part);
+  }
+
+  return newParts;
+}
+
+function identity$2(x) {
+  return x;
+}
+
+function shouldNotPrintClosingTag$1(node) {
+  return !node.isSelfClosing && !node.endSourceSpan && (hasPrettierIgnore$3(node) || shouldPreserveContent$1(node.parent));
+}
+
+var utils_1$3 = {
+  HTML_ELEMENT_ATTRIBUTES,
+  HTML_TAGS,
+  canHaveInterpolation,
+  countParents: countParents$1,
+  dedentString: dedentString$1,
+  forceBreakChildren: forceBreakChildren$1,
+  forceBreakContent: forceBreakContent$1,
+  forceNextEmptyLine: forceNextEmptyLine$1,
+  getCommentData: getCommentData$1,
+  getLastDescendant: getLastDescendant$1,
+  getNodeCssStyleDisplay,
+  getNodeCssStyleWhiteSpace,
+  getPrettierIgnoreAttributeCommentData: getPrettierIgnoreAttributeCommentData$1,
+  hasPrettierIgnore: hasPrettierIgnore$3,
+  identity: identity$2,
+  inferScriptParser: inferScriptParser$1,
+  isDanglingSpaceSensitiveNode,
+  isFrontMatterNode,
+  isIndentationSensitiveNode,
+  isLeadingSpaceSensitiveNode,
+  isPreLikeNode: isPreLikeNode$1,
+  isScriptLikeTag: isScriptLikeTag$1,
+  isTrailingSpaceSensitiveNode,
+  isWhitespaceSensitiveNode,
+  normalizeParts: normalizeParts$2,
+  preferHardlineAsLeadingSpaces: preferHardlineAsLeadingSpaces$1,
+  preferHardlineAsTrailingSpaces,
+  replaceDocNewlines: replaceDocNewlines$1,
+  replaceNewlines: replaceNewlines$1,
+  shouldNotPrintClosingTag: shouldNotPrintClosingTag$1,
+  shouldPreserveContent: shouldPreserveContent$1
+};
+
+var canHaveInterpolation$1 = utils_1$3.canHaveInterpolation;
+var getNodeCssStyleDisplay$1 = utils_1$3.getNodeCssStyleDisplay;
+var isDanglingSpaceSensitiveNode$1 = utils_1$3.isDanglingSpaceSensitiveNode;
+var isIndentationSensitiveNode$1 = utils_1$3.isIndentationSensitiveNode;
+var isLeadingSpaceSensitiveNode$1 = utils_1$3.isLeadingSpaceSensitiveNode;
+var isTrailingSpaceSensitiveNode$1 = utils_1$3.isTrailingSpaceSensitiveNode;
+var isWhitespaceSensitiveNode$1 = utils_1$3.isWhitespaceSensitiveNode;
+var PREPROCESS_PIPELINE = [removeIgnorableFirstLf, mergeCdataIntoText, extractInterpolation, extractWhitespaces, addCssDisplay, addIsSelfClosing, addIsSpaceSensitive, mergeSimpleElementIntoText];
+
+function preprocess$4(ast, options) {
+  for (var _i = 0; _i < PREPROCESS_PIPELINE.length; _i++) {
+    var fn = PREPROCESS_PIPELINE[_i];
+    ast = fn(ast, options);
+  }
+
+  return ast;
+}
+
+function removeIgnorableFirstLf(ast
+/*, options */
+) {
+  return ast.map(function (node) {
+    if (node.type === "element" && node.tagDefinition.ignoreFirstLf && node.children.length !== 0 && node.children[0].type === "text" && node.children[0].value[0] === "\n") {
+      var text = node.children[0];
+      return node.clone({
+        children: text.value.length === 1 ? node.children.slice(1) : [].concat(text.clone({
+          value: text.value.slice(1)
+        }), node.children.slice(1))
+      });
+    }
+
+    return node;
+  });
+}
+
+function mergeNodeIntoText(ast, shouldMerge, getValue) {
+  return ast.map(function (node) {
+    if (node.children) {
+      var shouldMergeResults = node.children.map(shouldMerge);
+
+      if (shouldMergeResults.some(Boolean)) {
+        var newChildren = [];
+
+        for (var i = 0; i < node.children.length; i++) {
+          var child = node.children[i];
+
+          if (child.type !== "text" && !shouldMergeResults[i]) {
+            newChildren.push(child);
+            continue;
+          }
+
+          var newChild = child.type === "text" ? child : child.clone({
+            type: "text",
+            value: getValue(child)
+          });
+
+          if (newChildren.length === 0 || newChildren[newChildren.length - 1].type !== "text") {
+            newChildren.push(newChild);
+            continue;
+          }
+
+          var lastChild = newChildren.pop();
+          var ParseSourceSpan = lastChild.sourceSpan.constructor;
+          newChildren.push(lastChild.clone({
+            value: lastChild.value + newChild.value,
+            sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, newChild.sourceSpan.end)
+          }));
+        }
+
+        return node.clone({
+          children: newChildren
+        });
+      }
+    }
+
+    return node;
+  });
+}
+
+function mergeCdataIntoText(ast
+/*, options */
+) {
+  return mergeNodeIntoText(ast, function (node) {
+    return node.type === "cdata";
+  }, function (node) {
+    return ``;
+  });
+}
+
+function mergeSimpleElementIntoText(ast
+/*, options */
+) {
+  var isSimpleElement = function isSimpleElement(node) {
+    return node.type === "element" && node.attrs.length === 0 && node.children.length === 1 && node.firstChild.type === "text" && // \xA0: non-breaking whitespace
+    !/[^\S\xA0]/.test(node.children[0].value) && !node.firstChild.hasLeadingSpaces && !node.firstChild.hasTrailingSpaces && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces && node.prev && node.prev.type === "text" && node.next && node.next.type === "text";
+  };
+
+  return ast.map(function (node) {
+    if (node.children) {
+      var isSimpleElementResults = node.children.map(isSimpleElement);
+
+      if (isSimpleElementResults.some(Boolean)) {
+        var newChildren = [];
+
+        for (var i = 0; i < node.children.length; i++) {
+          var child = node.children[i];
+
+          if (isSimpleElementResults[i]) {
+            var lastChild = newChildren.pop();
+            var nextChild = node.children[++i];
+            var ParseSourceSpan = node.sourceSpan.constructor;
+            var isTrailingSpaceSensitive = nextChild.isTrailingSpaceSensitive,
+                hasTrailingSpaces = nextChild.hasTrailingSpaces;
+            newChildren.push(lastChild.clone({
+              value: lastChild.value + `<${child.rawName}>` + child.firstChild.value + `` + nextChild.value,
+              sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, nextChild.sourceSpan.end),
+              isTrailingSpaceSensitive,
+              hasTrailingSpaces
+            }));
+          } else {
+            newChildren.push(child);
+          }
+        }
+
+        return node.clone({
+          children: newChildren
+        });
+      }
+    }
+
+    return node;
+  });
+}
+
+function extractInterpolation(ast, options) {
+  if (options.parser === "html") {
+    return ast;
+  }
+
+  var interpolationRegex = /\{\{([\s\S]+?)\}\}/g;
+  return ast.map(function (node) {
+    if (!canHaveInterpolation$1(node)) {
+      return node;
+    }
+
+    var newChildren = [];
+    var _iteratorNormalCompletion = true;
+    var _didIteratorError = false;
+    var _iteratorError = undefined;
+
+    try {
+      for (var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+        var child = _step.value;
+
+        if (child.type !== "text") {
+          newChildren.push(child);
+          continue;
+        }
+
+        var ParseSourceSpan = child.sourceSpan.constructor;
+        var startSourceSpan = child.sourceSpan.start;
+        var endSourceSpan = null;
+        var components = child.value.split(interpolationRegex);
+
+        for (var i = 0; i < components.length; i++, startSourceSpan = endSourceSpan) {
+          var value = components[i];
+
+          if (i % 2 === 0) {
+            endSourceSpan = startSourceSpan.moveBy(value.length);
+
+            if (value.length !== 0) {
+              newChildren.push({
+                type: "text",
+                value,
+                sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan)
+              });
+            }
+
+            continue;
+          }
+
+          endSourceSpan = startSourceSpan.moveBy(value.length + 4); // `{{` + `}}`
+
+          newChildren.push({
+            type: "interpolation",
+            sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan),
+            children: value.length === 0 ? [] : [{
+              type: "text",
+              value,
+              sourceSpan: new ParseSourceSpan(startSourceSpan.moveBy(2), endSourceSpan.moveBy(-2))
+            }]
+          });
+        }
+      }
+    } catch (err) {
+      _didIteratorError = true;
+      _iteratorError = err;
+    } finally {
+      try {
+        if (!_iteratorNormalCompletion && _iterator.return != null) {
+          _iterator.return();
+        }
+      } finally {
+        if (_didIteratorError) {
+          throw _iteratorError;
+        }
+      }
+    }
+
+    return node.clone({
+      children: newChildren
+    });
+  });
+}
+/**
+ * - add `hasLeadingSpaces` field
+ * - add `hasTrailingSpaces` field
+ * - add `hasDanglingSpaces` field for parent nodes
+ * - add `isWhitespaceSensitive`, `isIndentationSensitive` field for text nodes
+ * - remove insensitive whitespaces
+ */
+
+
+function extractWhitespaces(ast
+/*, options*/
+) {
+  var TYPE_WHITESPACE = "whitespace";
+  return ast.map(function (node) {
+    if (!node.children) {
+      return node;
+    }
+
+    if (node.children.length === 0 || node.children.length === 1 && node.children[0].type === "text" && node.children[0].value.trim().length === 0) {
+      return node.clone({
+        children: [],
+        hasDanglingSpaces: node.children.length !== 0
+      });
+    }
+
+    var isWhitespaceSensitive = isWhitespaceSensitiveNode$1(node);
+    var isIndentationSensitive = isIndentationSensitiveNode$1(node);
+    return node.clone({
+      children: node.children // extract whitespace nodes
+      .reduce(function (newChildren, child) {
+        if (child.type !== "text") {
+          return newChildren.concat(child);
+        }
+
+        if (isWhitespaceSensitive) {
+          return newChildren.concat(Object.assign({}, child, {
+            isWhitespaceSensitive,
+            isIndentationSensitive
+          }));
+        }
+
+        var localChildren = [];
+
+        var _child$value$match = child.value.match(/^(\s*)([\s\S]*?)(\s*)$/),
+            _child$value$match2 = _slicedToArray(_child$value$match, 4),
+            leadingSpaces = _child$value$match2[1],
+            text = _child$value$match2[2],
+            trailingSpaces = _child$value$match2[3];
+
+        if (leadingSpaces) {
+          localChildren.push({
+            type: TYPE_WHITESPACE
+          });
+        }
+
+        var ParseSourceSpan = child.sourceSpan.constructor;
+
+        if (text) {
+          localChildren.push({
+            type: "text",
+            value: text,
+            sourceSpan: new ParseSourceSpan(child.sourceSpan.start.moveBy(leadingSpaces.length), child.sourceSpan.end.moveBy(-trailingSpaces.length))
+          });
+        }
+
+        if (trailingSpaces) {
+          localChildren.push({
+            type: TYPE_WHITESPACE
+          });
+        }
+
+        return newChildren.concat(localChildren);
+      }, []) // set hasLeadingSpaces/hasTrailingSpaces and filter whitespace nodes
+      .reduce(function (newChildren, child, i, children) {
+        if (child.type === TYPE_WHITESPACE) {
+          return newChildren;
+        }
+
+        var hasLeadingSpaces = i !== 0 && children[i - 1].type === TYPE_WHITESPACE;
+        var hasTrailingSpaces = i !== children.length - 1 && children[i + 1].type === TYPE_WHITESPACE;
+        return newChildren.concat(Object.assign({}, child, {
+          hasLeadingSpaces,
+          hasTrailingSpaces
+        }));
+      }, [])
+    });
+  });
+}
+
+function addIsSelfClosing(ast
+/*, options */
+) {
+  return ast.map(function (node) {
+    return Object.assign(node, {
+      isSelfClosing: !node.children || node.type === "element" && (node.tagDefinition.isVoid || // self-closing
+      node.startSourceSpan === node.endSourceSpan)
+    });
+  });
+}
+
+function addCssDisplay(ast, options) {
+  return ast.map(function (node) {
+    return Object.assign(node, {
+      cssDisplay: getNodeCssStyleDisplay$1(node, options)
+    });
+  });
+}
+/**
+ * - add `isLeadingSpaceSensitive` field
+ * - add `isTrailingSpaceSensitive` field
+ * - add `isDanglingSpaceSensitive` field for parent nodes
+ */
+
+
+function addIsSpaceSensitive(ast
+/*, options */
+) {
+  return ast.map(function (node) {
+    if (!node.children) {
+      return node;
+    }
+
+    if (node.children.length === 0) {
+      return node.clone({
+        isDanglingSpaceSensitive: isDanglingSpaceSensitiveNode$1(node)
+      });
+    }
+
+    return node.clone({
+      children: node.children.map(function (child) {
+        return Object.assign({}, child, {
+          isLeadingSpaceSensitive: isLeadingSpaceSensitiveNode$1(child),
+          isTrailingSpaceSensitive: isTrailingSpaceSensitiveNode$1(child)
+        });
+      }).map(function (child, index, children) {
+        return Object.assign({}, child, {
+          isLeadingSpaceSensitive: index === 0 ? child.isLeadingSpaceSensitive : children[index - 1].isTrailingSpaceSensitive && child.isLeadingSpaceSensitive,
+          isTrailingSpaceSensitive: index === children.length - 1 ? child.isTrailingSpaceSensitive : children[index + 1].isLeadingSpaceSensitive && child.isTrailingSpaceSensitive
+        });
+      })
+    });
+  });
+}
+
+var preprocess_1$4 = preprocess$4;
+
+function hasPragma$3(text) {
+  return /^\s*/.test(text);
+}
+
+function insertPragma$7(text) {
+  return "\n\n" + text.replace(/^\s*\n/, "");
+}
+
+var pragma$9 = {
+  hasPragma: hasPragma$3,
+  insertPragma: insertPragma$7
+};
+
+var _require$$0$builders$9 = doc.builders;
+var concat$16 = _require$$0$builders$9.concat;
+var group$15 = _require$$0$builders$9.group;
+/**
+ *     v-for="... in ..."
+ *     v-for="... of ..."
+ *     v-for="(..., ...) in ..."
+ *     v-for="(..., ...) of ..."
+ */
+
+function printVueFor$1(value, textToDoc) {
+  var _parseVueFor = parseVueFor(value),
+      left = _parseVueFor.left,
+      operator = _parseVueFor.operator,
+      right = _parseVueFor.right;
+
+  return concat$16([group$15(textToDoc(`function _(${left}) {}`, {
+    parser: "babylon",
+    __isVueForBindingLeft: true
+  })), " ", operator, " ", textToDoc(right, {
+    parser: "__js_expression"
+  })]);
+} // modified from https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/parser/index.js#L370-L387
+
+
+function parseVueFor(value) {
+  var forAliasRE = /([^]*?)\s+(in|of)\s+([^]*)/;
+  var forIteratorRE = /,([^,}\]]*)(?:,([^,}\]]*))?$/;
+  var stripParensRE = /^\(|\)$/g;
+  var inMatch = value.match(forAliasRE);
+
+  if (!inMatch) {
+    return;
+  }
+
+  var res = {};
+  res.for = inMatch[3].trim();
+  var alias = inMatch[1].trim().replace(stripParensRE, "");
+  var iteratorMatch = alias.match(forIteratorRE);
+
+  if (iteratorMatch) {
+    res.alias = alias.replace(forIteratorRE, "");
+    res.iterator1 = iteratorMatch[1].trim();
+
+    if (iteratorMatch[2]) {
+      res.iterator2 = iteratorMatch[2].trim();
+    }
+  } else {
+    res.alias = alias;
+  }
+
+  return {
+    left: `${[res.alias, res.iterator1, res.iterator2].filter(Boolean).join(",")}`,
+    operator: inMatch[2],
+    right: res.for
+  };
+}
+
+function printVueSlotScope$1(value, textToDoc) {
+  return textToDoc(`function _(${value}) {}`, {
+    parser: "babylon",
+    __isVueSlotScope: true
+  });
+}
+
+var syntaxVue = {
+  printVueFor: printVueFor$1,
+  printVueSlotScope: printVueSlotScope$1
+};
+
+var parseSrcset = createCommonjsModule(function (module) {
+  /**
+   * Srcset Parser
+   *
+   * By Alex Bell |  MIT License
+   *
+   * JS Parser for the string value that appears in markup 
+   *
+   * @returns Array [{url: _, d: _, w: _, h:_}, ...]
+   *
+   * Based super duper closely on the reference algorithm at:
+   * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute
+   *
+   * Most comments are copied in directly from the spec
+   * (except for comments in parens).
+   */
+  (function (root, factory) {
+    if (typeof undefined === 'function' && undefined.amd) {
+      // AMD. Register as an anonymous module.
+      undefined([], factory);
+    } else if ('object' === 'object' && module.exports) {
+      // Node. Does not work with strict CommonJS, but
+      // only CommonJS-like environments that support module.exports,
+      // like Node.
+      module.exports = factory();
+    } else {
+      // Browser globals (root is window)
+      root.parseSrcset = factory();
+    }
+  })(commonjsGlobal, function () {
+    // 1. Let input be the value passed to this algorithm.
+    return function (input, options) {
+      var logger = options && options.logger || console; // UTILITY FUNCTIONS
+      // Manual is faster than RegEx
+      // http://bjorn.tipling.com/state-and-regular-expressions-in-javascript
+      // http://jsperf.com/whitespace-character/5
+
+      function isSpace(c) {
+        return c === "\u0020" || // space
+        c === "\u0009" || // horizontal tab
+        c === "\u000A" || // new line
+        c === "\u000C" || // form feed
+        c === "\u000D"; // carriage return
+      }
+
+      function collectCharacters(regEx) {
+        var chars,
+            match = regEx.exec(input.substring(pos));
+
+        if (match) {
+          chars = match[0];
+          pos += chars.length;
+          return chars;
+        }
+      }
+
+      var inputLength = input.length,
+          // (Don't use \s, to avoid matching non-breaking space)
+      regexLeadingSpaces = /^[ \t\n\r\u000c]+/,
+          regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/,
+          regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/,
+          regexTrailingCommas = /[,]+$/,
+          regexNonNegativeInteger = /^\d+$/,
+          // ( Positive or negative or unsigned integers or decimals, without or without exponents.
+      // Must include at least one digit.
+      // According to spec tests any decimal point must be followed by a digit.
+      // No leading plus sign is allowed.)
+      // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number
+      regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,
+          url,
+          descriptors,
+          currentDescriptor,
+          state,
+          c,
+          // 2. Let position be a pointer into input, initially pointing at the start
+      //    of the string.
+      pos = 0,
+          // 3. Let candidates be an initially empty source set.
+      candidates = []; // 4. Splitting loop: Collect a sequence of characters that are space
+      //    characters or U+002C COMMA characters. If any U+002C COMMA characters
+      //    were collected, that is a parse error.
+
+      while (true) {
+        collectCharacters(regexLeadingCommasOrSpaces); // 5. If position is past the end of input, return candidates and abort these steps.
+
+        if (pos >= inputLength) {
+          return candidates; // (we're done, this is the sole return path)
+        } // 6. Collect a sequence of characters that are not space characters,
+        //    and let that be url.
+
+
+        url = collectCharacters(regexLeadingNotSpaces); // 7. Let descriptors be a new empty list.
+
+        descriptors = []; // 8. If url ends with a U+002C COMMA character (,), follow these substeps:
+        //		(1). Remove all trailing U+002C COMMA characters from url. If this removed
+        //         more than one character, that is a parse error.
+
+        if (url.slice(-1) === ",") {
+          url = url.replace(regexTrailingCommas, ""); // (Jump ahead to step 9 to skip tokenization and just push the candidate).
+
+          parseDescriptors(); //	Otherwise, follow these substeps:
+        } else {
+          tokenize();
+        } // (close else of step 8)
+        // 16. Return to the step labeled splitting loop.
+
+      } // (Close of big while loop.)
+
+      /**
+       * Tokenizes descriptor properties prior to parsing
+       * Returns undefined.
+       */
+
+
+      function tokenize() {
+        // 8.1. Descriptor tokeniser: Skip whitespace
+        collectCharacters(regexLeadingSpaces); // 8.2. Let current descriptor be the empty string.
+
+        currentDescriptor = ""; // 8.3. Let state be in descriptor.
+
+        state = "in descriptor";
+
+        while (true) {
+          // 8.4. Let c be the character at position.
+          c = input.charAt(pos); //  Do the following depending on the value of state.
+          //  For the purpose of this step, "EOF" is a special character representing
+          //  that position is past the end of input.
+          // In descriptor
+
+          if (state === "in descriptor") {
+            // Do the following, depending on the value of c:
+            // Space character
+            // If current descriptor is not empty, append current descriptor to
+            // descriptors and let current descriptor be the empty string.
+            // Set state to after descriptor.
+            if (isSpace(c)) {
+              if (currentDescriptor) {
+                descriptors.push(currentDescriptor);
+                currentDescriptor = "";
+                state = "after descriptor";
+              } // U+002C COMMA (,)
+              // Advance position to the next character in input. If current descriptor
+              // is not empty, append current descriptor to descriptors. Jump to the step
+              // labeled descriptor parser.
+
+            } else if (c === ",") {
+              pos += 1;
+
+              if (currentDescriptor) {
+                descriptors.push(currentDescriptor);
+              }
+
+              parseDescriptors();
+              return; // U+0028 LEFT PARENTHESIS (()
+              // Append c to current descriptor. Set state to in parens.
+            } else if (c === "\u0028") {
+              currentDescriptor = currentDescriptor + c;
+              state = "in parens"; // EOF
+              // If current descriptor is not empty, append current descriptor to
+              // descriptors. Jump to the step labeled descriptor parser.
+            } else if (c === "") {
+              if (currentDescriptor) {
+                descriptors.push(currentDescriptor);
+              }
+
+              parseDescriptors();
+              return; // Anything else
+              // Append c to current descriptor.
+            } else {
+              currentDescriptor = currentDescriptor + c;
+            } // (end "in descriptor"
+            // In parens
+
+          } else if (state === "in parens") {
+            // U+0029 RIGHT PARENTHESIS ())
+            // Append c to current descriptor. Set state to in descriptor.
+            if (c === ")") {
+              currentDescriptor = currentDescriptor + c;
+              state = "in descriptor"; // EOF
+              // Append current descriptor to descriptors. Jump to the step labeled
+              // descriptor parser.
+            } else if (c === "") {
+              descriptors.push(currentDescriptor);
+              parseDescriptors();
+              return; // Anything else
+              // Append c to current descriptor.
+            } else {
+              currentDescriptor = currentDescriptor + c;
+            } // After descriptor
+
+          } else if (state === "after descriptor") {
+            // Do the following, depending on the value of c:
+            // Space character: Stay in this state.
+            if (isSpace(c)) {// EOF: Jump to the step labeled descriptor parser.
+            } else if (c === "") {
+              parseDescriptors();
+              return; // Anything else
+              // Set state to in descriptor. Set position to the previous character in input.
+            } else {
+              state = "in descriptor";
+              pos -= 1;
+            }
+          } // Advance position to the next character in input.
+
+
+          pos += 1; // Repeat this step.
+        } // (close while true loop)
+
+      }
+      /**
+       * Adds descriptor properties to a candidate, pushes to the candidates array
+       * @return undefined
+       */
+      // Declared outside of the while loop so that it's only created once.
+
+
+      function parseDescriptors() {
+        // 9. Descriptor parser: Let error be no.
+        var pError = false,
+            // 10. Let width be absent.
+        // 11. Let density be absent.
+        // 12. Let future-compat-h be absent. (We're implementing it now as h)
+        w,
+            d,
+            h,
+            i,
+            candidate = {},
+            desc,
+            lastChar,
+            value,
+            intVal,
+            floatVal; // 13. For each descriptor in descriptors, run the appropriate set of steps
+        // from the following list:
+
+        for (i = 0; i < descriptors.length; i++) {
+          desc = descriptors[i];
+          lastChar = desc[desc.length - 1];
+          value = desc.substring(0, desc.length - 1);
+          intVal = parseInt(value, 10);
+          floatVal = parseFloat(value); // If the descriptor consists of a valid non-negative integer followed by
+          // a U+0077 LATIN SMALL LETTER W character
+
+          if (regexNonNegativeInteger.test(value) && lastChar === "w") {
+            // If width and density are not both absent, then let error be yes.
+            if (w || d) {
+              pError = true;
+            } // Apply the rules for parsing non-negative integers to the descriptor.
+            // If the result is zero, let error be yes.
+            // Otherwise, let width be the result.
+
+
+            if (intVal === 0) {
+              pError = true;
+            } else {
+              w = intVal;
+            } // If the descriptor consists of a valid floating-point number followed by
+            // a U+0078 LATIN SMALL LETTER X character
+
+          } else if (regexFloatingPoint.test(value) && lastChar === "x") {
+            // If width, density and future-compat-h are not all absent, then let error
+            // be yes.
+            if (w || d || h) {
+              pError = true;
+            } // Apply the rules for parsing floating-point number values to the descriptor.
+            // If the result is less than zero, let error be yes. Otherwise, let density
+            // be the result.
+
+
+            if (floatVal < 0) {
+              pError = true;
+            } else {
+              d = floatVal;
+            } // If the descriptor consists of a valid non-negative integer followed by
+            // a U+0068 LATIN SMALL LETTER H character
+
+          } else if (regexNonNegativeInteger.test(value) && lastChar === "h") {
+            // If height and density are not both absent, then let error be yes.
+            if (h || d) {
+              pError = true;
+            } // Apply the rules for parsing non-negative integers to the descriptor.
+            // If the result is zero, let error be yes. Otherwise, let future-compat-h
+            // be the result.
+
+
+            if (intVal === 0) {
+              pError = true;
+            } else {
+              h = intVal;
+            } // Anything else, Let error be yes.
+
+          } else {
+            pError = true;
+          }
+        } // (close step 13 for loop)
+        // 15. If error is still no, then append a new image source to candidates whose
+        // URL is url, associated with a width width if not absent and a pixel
+        // density density if not absent. Otherwise, there is a parse error.
+
+
+        if (!pError) {
+          candidate.url = url;
+
+          if (w) {
+            candidate.w = w;
+          }
+
+          if (d) {
+            candidate.d = d;
+          }
+
+          if (h) {
+            candidate.h = h;
+          }
+
+          candidates.push(candidate);
+        } else if (logger && logger.error) {
+          logger.error("Invalid srcset descriptor found in '" + input + "' at '" + desc + "'.");
+        }
+      } // (close parseDescriptors fn)
+
+    };
+  });
+});
+
+var _require$$0$builders$10 = doc.builders;
+var concat$17 = _require$$0$builders$10.concat;
+var ifBreak$6 = _require$$0$builders$10.ifBreak;
+var join$11 = _require$$0$builders$10.join;
+var line$10 = _require$$0$builders$10.line;
+
+function printImgSrcset$1(value) {
+  var srcset = parseSrcset(value, {
+    logger: {
+      error(message) {
+        throw new Error(message);
+      }
+
+    }
+  });
+  var hasW = srcset.some(function (src) {
+    return src.w;
+  });
+  var hasH = srcset.some(function (src) {
+    return src.h;
+  });
+  var hasX = srcset.some(function (src) {
+    return src.d;
+  });
+
+  if (hasW + hasH + hasX !== 1) {
+    throw new Error(`Mixed descriptor in srcset is not supported`);
+  }
+
+  var key = hasW ? "w" : hasH ? "h" : "d";
+  var unit = hasW ? "w" : hasH ? "h" : "x";
+
+  var getMax = function getMax(values) {
+    return Math.max.apply(Math, values);
+  };
+
+  var urls = srcset.map(function (src) {
+    return src.url;
+  });
+  var maxUrlLength = getMax(urls.map(function (url) {
+    return url.length;
+  }));
+  var descriptors = srcset.map(function (src) {
+    return src[key];
+  }).map(function (descriptor) {
+    return descriptor ? descriptor.toString() : "";
+  });
+  var descriptorLeftLengths = descriptors.map(function (descriptor) {
+    var index = descriptor.indexOf(".");
+    return index === -1 ? descriptor.length : index;
+  });
+  var maxDescriptorLeftLength = getMax(descriptorLeftLengths);
+  return join$11(concat$17([",", line$10]), urls.map(function (url, index) {
+    var parts = [url];
+    var descriptor = descriptors[index];
+
+    if (descriptor) {
+      var urlPadding = maxUrlLength - url.length + 1;
+      var descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[index];
+      var alignment = " ".repeat(urlPadding + descriptorPadding);
+      parts.push(ifBreak$6(alignment, " "), descriptor + unit);
+    }
+
+    return concat$17(parts);
+  }));
+}
+
+var syntaxAttribute = {
+  printImgSrcset: printImgSrcset$1
+};
+
+var builders = doc.builders;
+var _require$$0$utils$1 = doc.utils;
+var stripTrailingHardline$2 = _require$$0$utils$1.stripTrailingHardline;
+var mapDoc$6 = _require$$0$utils$1.mapDoc;
+var breakParent$3 = builders.breakParent;
+var fill$5 = builders.fill;
+var group$14 = builders.group;
+var hardline$12 = builders.hardline;
+var ifBreak$5 = builders.ifBreak;
+var indent$9 = builders.indent;
+var join$10 = builders.join;
+var line$9 = builders.line;
+var literalline$6 = builders.literalline;
+var markAsRoot$4 = builders.markAsRoot;
+var softline$7 = builders.softline;
+var countParents = utils_1$3.countParents;
+var dedentString = utils_1$3.dedentString;
+var forceBreakChildren = utils_1$3.forceBreakChildren;
+var forceBreakContent = utils_1$3.forceBreakContent;
+var forceNextEmptyLine = utils_1$3.forceNextEmptyLine;
+var getCommentData = utils_1$3.getCommentData;
+var getLastDescendant = utils_1$3.getLastDescendant;
+var getPrettierIgnoreAttributeCommentData = utils_1$3.getPrettierIgnoreAttributeCommentData;
+var hasPrettierIgnore$2 = utils_1$3.hasPrettierIgnore;
+var inferScriptParser = utils_1$3.inferScriptParser;
+var isPreLikeNode = utils_1$3.isPreLikeNode;
+var isScriptLikeTag = utils_1$3.isScriptLikeTag;
+var normalizeParts$1 = utils_1$3.normalizeParts;
+var preferHardlineAsLeadingSpaces = utils_1$3.preferHardlineAsLeadingSpaces;
+var replaceDocNewlines = utils_1$3.replaceDocNewlines;
+var replaceNewlines = utils_1$3.replaceNewlines;
+var shouldNotPrintClosingTag = utils_1$3.shouldNotPrintClosingTag;
+var shouldPreserveContent = utils_1$3.shouldPreserveContent;
+var insertPragma$6 = pragma$9.insertPragma;
+var printVueFor = syntaxVue.printVueFor;
+var printVueSlotScope = syntaxVue.printVueSlotScope;
+var printImgSrcset = syntaxAttribute.printImgSrcset;
+
+function concat$14(parts) {
+  var newParts = normalizeParts$1(parts);
+  return newParts.length === 0 ? "" : newParts.length === 1 ? newParts[0] : builders.concat(newParts);
+}
+
+function embed$6(path$$1, print, textToDoc, options) {
+  var node = path$$1.getValue();
+
+  switch (node.type) {
+    case "text":
+      {
+        if (isScriptLikeTag(node.parent)) {
+          var parser = inferScriptParser(node.parent);
+
+          if (parser) {
+            var value = parser === "markdown" ? dedentString(node.value.replace(/^[^\S\n]*?\n/, "")) : node.value;
+            return builders.concat([concat$14([breakParent$3, printOpeningTagPrefix(node), markAsRoot$4(stripTrailingHardline$2(textToDoc(value, {
+              parser
+            }))), printClosingTagSuffix(node)])]);
+          }
+        } else if (node.parent.type === "interpolation") {
+          return concat$14([indent$9(concat$14([line$9, textToDoc(node.value, options.parser === "angular" ? {
+            parser: "__ng_interpolation",
+            trailingComma: "none"
+          } : options.parser === "vue" ? {
+            parser: "__vue_expression"
+          } : {
+            parser: "__js_expression"
+          })])), node.parent.next && needsToBorrowPrevClosingTagEndMarker(node.parent.next) ? " " : line$9]);
+        }
+
+        break;
+      }
+
+    case "attribute":
+      {
+        if (!node.value) {
+          break;
+        }
+
+        var embeddedAttributeValueDoc = printEmbeddedAttributeValue(node, function (code, opts) {
+          return (// strictly prefer single quote to avoid unnecessary html entity escape
+            textToDoc(code, Object.assign({
+              __isInHtmlAttribute: true
+            }, opts))
+          );
+        }, options);
+
+        if (embeddedAttributeValueDoc) {
+          return concat$14([node.rawName, '="', mapDoc$6(embeddedAttributeValueDoc, function (doc$$2) {
+            return typeof doc$$2 === "string" ? doc$$2.replace(/"/g, """) : doc$$2;
+          }), '"']);
+        }
+
+        break;
+      }
+
+    case "yaml":
+      return markAsRoot$4(concat$14(["---", hardline$12, node.value.trim().length === 0 ? "" : replaceDocNewlines(textToDoc(node.value, {
+        parser: "yaml"
+      }), literalline$6), "---"]));
+  }
+}
+
+function genericPrint$5(path$$1, options, print) {
+  var node = path$$1.getValue();
+
+  switch (node.type) {
+    case "root":
+      // use original concat to not break stripTrailingHardline
+      return builders.concat([group$14(printChildren$1(path$$1, options, print)), hardline$12]);
+
+    case "element":
+    case "ieConditionalComment":
+      {
+        /**
+         * do not break:
+         *
+         *     
{{ + * ~ + * interpolation + * }}
+ * ~ + * + * exception: break if the opening tag breaks + * + *
{{ + * interpolation + * }}
+ */ + var shouldHugContent = node.children.length === 1 && node.firstChild.type === "interpolation" && node.firstChild.isLeadingSpaceSensitive && !node.firstChild.hasLeadingSpaces && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces; + var attrGroupId = Symbol("element-attr-group-id"); + return concat$14([group$14(concat$14([group$14(printOpeningTag(path$$1, options, print), { + id: attrGroupId + }), node.children.length === 0 ? node.hasDanglingSpaces && node.isDanglingSpaceSensitive ? line$9 : "" : concat$14([forceBreakContent(node) ? breakParent$3 : "", function (childrenDoc) { + return shouldHugContent ? ifBreak$5(indent$9(childrenDoc), childrenDoc, { + groupId: attrGroupId + }) : isScriptLikeTag(node) && node.parent.type === "root" && options.parser === "vue" ? childrenDoc : indent$9(childrenDoc); + }(concat$14([shouldHugContent ? ifBreak$5(softline$7, "", { + groupId: attrGroupId + }) : node.firstChild.type === "text" && node.firstChild.isWhitespaceSensitive && node.firstChild.isIndentationSensitive ? node.children.length === 1 && node.firstChild.type === "text" && node.firstChild.value.indexOf("\n") === -1 || node.firstChild.sourceSpan.start.line === node.lastChild.sourceSpan.end.line ? "" : literalline$6 : node.firstChild.hasLeadingSpaces && node.firstChild.isLeadingSpaceSensitive ? line$9 : softline$7, printChildren$1(path$$1, options, print)])), (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? " " : "" : shouldHugContent ? ifBreak$5(softline$7, "", { + groupId: attrGroupId + }) : node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? line$9 : node.type === "element" && isPreLikeNode(node) && node.lastChild.type === "text" && (node.lastChild.value.indexOf("\n") === -1 || new RegExp(`\\n\\s{${options.tabWidth * countParents(path$$1, function (n) { + return n.parent && n.parent.type !== "root"; + })}}$`).test(node.lastChild.value)) ? + /** + *
+ *
+         *         something
+         *       
+ * ~ + *
+ */ + "" : softline$7])])), printClosingTag(node)]); + } + + case "interpolation": + return concat$14([printOpeningTagStart(node), concat$14(path$$1.map(print, "children")), printClosingTagEnd(node)]); + + case "text": + { + if (node.parent.type === "interpolation") { + // replace the trailing literalline with hardline for better readability + var trailingNewlineRegex = /\n[^\S\n]*?$/; + var hasTrailingNewline = trailingNewlineRegex.test(node.value); + var value = hasTrailingNewline ? node.value.replace(trailingNewlineRegex, "") : node.value; + return concat$14([concat$14(replaceNewlines(value, literalline$6)), hasTrailingNewline ? hardline$12 : ""]); + } + + return fill$5(normalizeParts$1([].concat(printOpeningTagPrefix(node), getTextValueParts(node), printClosingTagSuffix(node)))); + } + + case "docType": + return concat$14([group$14(concat$14([printOpeningTagStart(node), " ", node.value.replace(/^html\b/i, "html").replace(/\s+/g, " ")])), printClosingTagEnd(node)]); + + case "comment": + { + var _value = getCommentData(node); + + return concat$14([group$14(concat$14([printOpeningTagStart(node), _value.trim().length === 0 ? "" : concat$14([indent$9(concat$14([node.prev && needsToBorrowNextOpeningTagStartMarker(node.prev) ? breakParent$3 : "", line$9, concat$14(replaceNewlines(_value, hardline$12))])), (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? " " : line$9])])), printClosingTagEnd(node)]); + } + + case "attribute": + return concat$14([node.rawName, node.value === null ? "" : concat$14(['="', concat$14(replaceNewlines(node.value.replace(/"/g, """), literalline$6)), '"'])]); + + case "yaml": + case "toml": + return node.raw; + + default: + throw new Error(`Unexpected node type ${node.type}`); + } +} + +function printChildren$1(path$$1, options, print) { + var node = path$$1.getValue(); + + if (forceBreakChildren(node)) { + return concat$14([breakParent$3, concat$14(path$$1.map(function (childPath) { + var childNode = childPath.getValue(); + var prevBetweenLine = !childNode.prev ? "" : printBetweenLine(childNode.prev, childNode); + return concat$14([!prevBetweenLine ? "" : concat$14([prevBetweenLine, forceNextEmptyLine(childNode.prev) ? hardline$12 : ""]), printChild(childPath)]); + }, "children"))]); + } + + var groupIds = node.children.map(function () { + return Symbol(""); + }); + return concat$14(path$$1.map(function (childPath, childIndex) { + var childNode = childPath.getValue(); + + if (childNode.type === "text") { + return printChild(childPath); + } + + var prevParts = []; + var leadingParts = []; + var trailingParts = []; + var nextParts = []; + var prevBetweenLine = childNode.prev ? printBetweenLine(childNode.prev, childNode) : ""; + var nextBetweenLine = childNode.next ? printBetweenLine(childNode, childNode.next) : ""; + + if (prevBetweenLine) { + if (forceNextEmptyLine(childNode.prev)) { + prevParts.push(hardline$12, hardline$12); + } else if (prevBetweenLine === hardline$12) { + prevParts.push(hardline$12); + } else { + if (childNode.prev.type === "text") { + leadingParts.push(prevBetweenLine); + } else { + leadingParts.push(ifBreak$5("", softline$7, { + groupId: groupIds[childIndex - 1] + })); + } + } + } + + if (nextBetweenLine) { + if (forceNextEmptyLine(childNode)) { + if (childNode.next.type === "text") { + nextParts.push(hardline$12, hardline$12); + } + } else if (nextBetweenLine === hardline$12) { + if (childNode.next.type === "text") { + nextParts.push(hardline$12); + } + } else { + trailingParts.push(nextBetweenLine); + } + } + + return concat$14([].concat(prevParts, group$14(concat$14([concat$14(leadingParts), group$14(concat$14([printChild(childPath), concat$14(trailingParts)]), { + id: groupIds[childIndex] + })])), nextParts)); + }, "children")); + + function printChild(childPath) { + var child = childPath.getValue(); + + if (hasPrettierIgnore$2(child)) { + return concat$14([].concat(printOpeningTagPrefix(child), replaceNewlines(options.originalText.slice(options.locStart(child) + (child.prev && needsToBorrowNextOpeningTagStartMarker(child.prev) ? printOpeningTagStartMarker(child).length : 0), options.locEnd(child) - (child.next && needsToBorrowPrevClosingTagEndMarker(child.next) ? printClosingTagEndMarker(child).length : 0)), literalline$6), printClosingTagSuffix(child))); + } + + if (shouldPreserveContent(child)) { + return concat$14([].concat(printOpeningTagPrefix(child), group$14(printOpeningTag(childPath, options, print)), replaceNewlines(options.originalText.slice(child.startSourceSpan.end.offset - (child.firstChild && needsToBorrowParentOpeningTagEndMarker(child.firstChild) ? printOpeningTagEndMarker(child).length : 0), child.endSourceSpan.start.offset + (child.lastChild && needsToBorrowParentClosingTagStartMarker(child.lastChild) ? printClosingTagStartMarker(child).length : 0)), literalline$6), printClosingTag(child), printClosingTagSuffix(child))); + } + + return print(childPath); + } + + function printBetweenLine(prevNode, nextNode) { + return needsToBorrowNextOpeningTagStartMarker(prevNode) && ( + /** + * 123
+ */ + nextNode.firstChild || + /** + * 123 + */ + nextNode.isSelfClosing || + /** + * 123123 + */ + prevNode.type === "element" && prevNode.isSelfClosing && needsToBorrowPrevClosingTagEndMarker(nextNode) ? "" : !nextNode.isLeadingSpaceSensitive || preferHardlineAsLeadingSpaces(nextNode) || + /** + * Want to write us a letter? Use ourmailing address. + */ + needsToBorrowPrevClosingTagEndMarker(nextNode) && prevNode.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild) && prevNode.lastChild.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild.lastChild) ? hardline$12 : nextNode.hasLeadingSpaces ? line$9 : softline$7; + } +} + +function printOpeningTag(path$$1, options, print) { + var node = path$$1.getValue(); + var forceNotToBreakAttrContent = node.type === "element" && node.fullName === "script" && node.attrs.length === 1 && node.attrs[0].fullName === "src" && node.children.length === 0; + return concat$14([printOpeningTagStart(node), !node.attrs || node.attrs.length === 0 ? node.isSelfClosing ? + /** + *
+ * ^ + */ + " " : "" : concat$14([indent$9(concat$14([forceNotToBreakAttrContent ? " " : line$9, join$10(line$9, function (ignoreAttributeData) { + var hasPrettierIgnoreAttribute = typeof ignoreAttributeData === "boolean" ? function () { + return ignoreAttributeData; + } : Array.isArray(ignoreAttributeData) ? function (attr) { + return ignoreAttributeData.indexOf(attr.rawName) !== -1; + } : function () { + return false; + }; + return path$$1.map(function (attrPath) { + var attr = attrPath.getValue(); + return hasPrettierIgnoreAttribute(attr) ? concat$14(replaceNewlines(options.originalText.slice(options.locStart(attr), options.locEnd(attr)), literalline$6)) : print(attrPath); + }, "attrs"); + }(node.prev && node.prev.type === "comment" && getPrettierIgnoreAttributeCommentData(node.prev.value)))])), + /** + * 123456 + */ + node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) || + /** + * 123 + */ + node.isSelfClosing && needsToBorrowLastChildClosingTagEndMarker(node.parent) ? "" : node.isSelfClosing ? forceNotToBreakAttrContent ? " " : line$9 : forceNotToBreakAttrContent ? "" : softline$7]), node.isSelfClosing ? "" : printOpeningTagEnd(node)]); +} + +function printOpeningTagStart(node) { + return node.prev && needsToBorrowNextOpeningTagStartMarker(node.prev) ? "" : concat$14([printOpeningTagPrefix(node), printOpeningTagStartMarker(node)]); +} + +function printOpeningTagEnd(node) { + return node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) ? "" : printOpeningTagEndMarker(node); +} + +function printClosingTag(node) { + return concat$14([node.isSelfClosing ? "" : printClosingTagStart(node), printClosingTagEnd(node)]); +} + +function printClosingTagStart(node) { + return node.lastChild && needsToBorrowParentClosingTagStartMarker(node.lastChild) ? "" : concat$14([printClosingTagPrefix(node), printClosingTagStartMarker(node)]); +} + +function printClosingTagEnd(node) { + return (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? "" : concat$14([printClosingTagEndMarker(node), printClosingTagSuffix(node)]); +} + +function needsToBorrowNextOpeningTagStartMarker(node) { + /** + * 123

+ */ + return node.next && node.type === "text" && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces; +} + +function needsToBorrowParentOpeningTagEndMarker(node) { + /** + *

123 + * ^ + * + *

123 + * ^ + * + *

+ */ + return node.lastChild && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces && getLastDescendant(node.lastChild).type !== "text"; +} + +function needsToBorrowParentClosingTagStartMarker(node) { + /** + *

+ * 123

+ * + * 123
+ */ + return !node.next && !node.hasTrailingSpaces && node.isTrailingSpaceSensitive && getLastDescendant(node).type === "text"; +} + +function printOpeningTagPrefix(node) { + return needsToBorrowParentOpeningTagEndMarker(node) ? printOpeningTagEndMarker(node.parent) : needsToBorrowPrevClosingTagEndMarker(node) ? printClosingTagEndMarker(node.prev) : ""; +} + +function printClosingTagPrefix(node) { + return needsToBorrowLastChildClosingTagEndMarker(node) ? printClosingTagEndMarker(node.lastChild) : ""; +} + +function printClosingTagSuffix(node) { + return needsToBorrowParentClosingTagStartMarker(node) ? printClosingTagStartMarker(node.parent) : needsToBorrowNextOpeningTagStartMarker(node) ? printOpeningTagStartMarker(node.next) : ""; +} + +function printOpeningTagStartMarker(node) { + switch (node.type) { + case "comment": + return ""; + + case "ieConditionalComment": + return `[endif]-->`; + + case "interpolation": + return "}}"; + + case "element": + if (node.isSelfClosing) { + return "/>"; + } + + // fall through + + default: + return ">"; + } +} + +function getTextValueParts(node) { + var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.value; + return node.isWhitespaceSensitive ? node.isIndentationSensitive ? replaceNewlines(value, literalline$6) : replaceNewlines(dedentString(value.replace(/^\s*?\n|\n\s*?$/g, "")), hardline$12) : // non-breaking whitespace: 0xA0 + join$10(line$9, value.split(/[^\S\xA0]+/)).parts; +} + +function printEmbeddedAttributeValue(node, originalTextToDoc, options) { + var isKeyMatched = function isKeyMatched(patterns) { + return new RegExp(patterns.join("|")).test(node.fullName); + }; + + var getValue = function getValue() { + return node.value.replace(/"/g, '"').replace(/'/g, "'"); + }; + + var shouldHug = false; + + var __onHtmlBindingRoot = function __onHtmlBindingRoot(root) { + var rootNode = root.type === "NGRoot" ? root.node.type === "NGMicrosyntax" && root.node.body.length === 1 && root.node.body[0].type === "NGMicrosyntaxExpression" ? root.node.body[0].expression : root.node : root.type === "JsExpressionRoot" ? root.node : root; + + if (rootNode && (rootNode.type === "ObjectExpression" || rootNode.type === "ArrayExpression")) { + shouldHug = true; + } + }; + + var printHug = function printHug(doc$$2) { + return group$14(doc$$2); + }; + + var printExpand = function printExpand(doc$$2) { + return group$14(concat$14([indent$9(concat$14([softline$7, doc$$2])), softline$7])); + }; + + var printMaybeHug = function printMaybeHug(doc$$2) { + return shouldHug ? printHug(doc$$2) : printExpand(doc$$2); + }; + + var textToDoc = function textToDoc(code, opts) { + return originalTextToDoc(code, Object.assign({ + __onHtmlBindingRoot + }, opts)); + }; + + if (node.fullName === "srcset" && (node.parent.fullName === "img" || node.parent.fullName === "source")) { + return printExpand(printImgSrcset(getValue())); + } + + if (options.parser === "vue") { + if (node.fullName === "v-for") { + return printVueFor(getValue(), textToDoc); + } + + if (node.fullName === "slot-scope") { + return printVueSlotScope(getValue(), textToDoc); + } + /** + * @click="jsStatement" + * @click="jsExpression" + * v-on:click="jsStatement" + * v-on:click="jsExpression" + */ + + + var vueEventBindingPatterns = ["^@", "^v-on:"]; + /** + * :class="vueExpression" + * v-bind:id="vueExpression" + */ + + var vueExpressionBindingPatterns = ["^:", "^v-bind:"]; + /** + * v-if="jsExpression" + */ + + var jsExpressionBindingPatterns = ["^v-"]; + + if (isKeyMatched(vueEventBindingPatterns)) { + // copied from https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/codegen/events.js#L3-L4 + var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/; + var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; + var value = getValue() // https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/helpers.js#L104 + .trim(); + return printMaybeHug(simplePathRE.test(value) || fnExpRE.test(value) ? textToDoc(value, { + parser: "__js_expression" + }) : stripTrailingHardline$2(textToDoc(value, { + parser: "babylon" + }))); + } + + if (isKeyMatched(vueExpressionBindingPatterns)) { + return printMaybeHug(textToDoc(getValue(), { + parser: "__vue_expression" + })); + } + + if (isKeyMatched(jsExpressionBindingPatterns)) { + return printMaybeHug(textToDoc(getValue(), { + parser: "__js_expression" + })); + } + } + + if (options.parser === "angular") { + var ngTextToDoc = function ngTextToDoc(code, opts) { + return (// angular does not allow trailing comma + textToDoc(code, Object.assign({ + trailingComma: "none" + }, opts)) + ); + }; + /** + * *directive="angularDirective" + */ + + + var ngDirectiveBindingPatterns = ["^\\*"]; + /** + * (click)="angularStatement" + * on-click="angularStatement" + */ + + var ngStatementBindingPatterns = ["^\\(.+\\)$", "^on-"]; + /** + * [target]="angularExpression" + * bind-target="angularExpression" + * [(target)]="angularExpression" + * bindon-target="angularExpression" + */ + + var ngExpressionBindingPatterns = ["^\\[.+\\]$", "^bind(on)?-"]; + + if (isKeyMatched(ngStatementBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_action" + })); + } + + if (isKeyMatched(ngExpressionBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_binding" + })); + } + + if (isKeyMatched(ngDirectiveBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_directive" + })); + } + } + + return null; +} + +var printerHtml = { + preprocess: preprocess_1$4, + print: genericPrint$5, + insertPragma: insertPragma$6, + massageAstNode: clean$8, + embed: embed$6 +}; + +var CATEGORY_HTML = "HTML"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var options$15 = { + htmlWhitespaceSensitivity: { + since: "1.15.0", + category: CATEGORY_HTML, + type: "choice", + default: "css", + description: "How to handle whitespaces in HTML.", + choices: [{ + value: "css", + description: "Respect the default value of CSS display property." + }, { + value: "strict", + description: "Whitespaces are considered sensitive." + }, { + value: "ignore", + description: "Whitespaces are considered insensitive." + }] + } +}; + +var name$14 = "HTML"; +var type$13 = "markup"; +var tmScope$13 = "text.html.basic"; +var aceMode$13 = "html"; +var codemirrorMode$10 = "htmlmixed"; +var codemirrorMimeType$10 = "text/html"; +var color$3 = "#e34c26"; +var aliases$5 = ["xhtml"]; +var extensions$13 = [".html", ".htm", ".html.hl", ".inc", ".st", ".xht", ".xhtml"]; +var languageId$13 = 146; +var html$1 = { + name: name$14, + type: type$13, + tmScope: tmScope$13, + aceMode: aceMode$13, + codemirrorMode: codemirrorMode$10, + codemirrorMimeType: codemirrorMimeType$10, + color: color$3, + aliases: aliases$5, + extensions: extensions$13, + languageId: languageId$13 +}; + +var html$2 = Object.freeze({ + name: name$14, + type: type$13, + tmScope: tmScope$13, + aceMode: aceMode$13, + codemirrorMode: codemirrorMode$10, + codemirrorMimeType: codemirrorMimeType$10, + color: color$3, + aliases: aliases$5, + extensions: extensions$13, + languageId: languageId$13, + default: html$1 +}); + +var name$15 = "Vue"; +var type$14 = "markup"; +var color$4 = "#2c3e50"; +var extensions$14 = [".vue"]; +var tmScope$14 = "text.html.vue"; +var aceMode$14 = "html"; +var languageId$14 = 391; +var vue = { + name: name$15, + type: type$14, + color: color$4, + extensions: extensions$14, + tmScope: tmScope$14, + aceMode: aceMode$14, + languageId: languageId$14 +}; + +var vue$1 = Object.freeze({ + name: name$15, + type: type$14, + color: color$4, + extensions: extensions$14, + tmScope: tmScope$14, + aceMode: aceMode$14, + languageId: languageId$14, + default: vue +}); + +var require$$0$29 = ( html$2 && html$1 ) || html$2; + +var require$$1$12 = ( vue$1 && vue ) || vue$1; + +var languages$5 = [createLanguage(require$$0$29, { + override: { + name: "Angular", + since: "1.15.0", + parsers: ["angular"], + vscodeLanguageIds: ["html"], + extensions: [".component.html"], + filenames: [] + } +}), createLanguage(require$$0$29, { + override: { + since: "1.15.0", + parsers: ["html"], + vscodeLanguageIds: ["html"] + } +}), createLanguage(require$$1$12, { + override: { + since: "1.10.0", + parsers: ["vue"], + vscodeLanguageIds: ["vue"] + } +})]; +var printers$5 = { + html: printerHtml +}; +var languageHtml = { + languages: languages$5, + printers: printers$5, + options: options$15 +}; + +function isPragma$1(text) { + return /^\s*@(prettier|format)\s*$/.test(text); +} + +function hasPragma$4(text) { + return /^\s*#[^\n\S]*@(prettier|format)\s*?(\n|$)/.test(text); +} + +function insertPragma$9(text) { + return `# @format\n\n${text}`; +} + +var pragma$11 = { + isPragma: isPragma$1, + hasPragma: hasPragma$4, + insertPragma: insertPragma$9 +}; + +function getLast$7(array) { + return array[array.length - 1]; +} + +function getAncestorCount$1(path$$1, filter) { + var counter = 0; + var pathStackLength = path$$1.stack.length - 1; + + for (var i = 0; i < pathStackLength; i++) { + var value = path$$1.stack[i]; + + if (isNode$2(value) && filter(value)) { + counter++; + } + } + + return counter; +} +/** + * @param {any} value + * @param {string[]=} types + */ + + +function isNode$2(value, types) { + return value && typeof value.type === "string" && (!types || types.indexOf(value.type) !== -1); +} + +function mapNode$1(node, callback, parent) { + return callback("children" in node ? Object.assign({}, node, { + children: node.children.map(function (childNode) { + return mapNode$1(childNode, callback, node); + }) + }) : node, parent); +} + +function defineShortcut$1(x, key, getter) { + Object.defineProperty(x, key, { + get: getter, + enumerable: false + }); +} + +function isNextLineEmpty$6(node, text) { + var newlineCount = 0; + var textLength = text.length; + + for (var i = node.position.end.offset - 1; i < textLength; i++) { + var char = text[i]; + + if (char === "\n") { + newlineCount++; + } + + if (newlineCount === 1 && /\S/.test(char)) { + return false; + } + + if (newlineCount === 2) { + return true; + } + } + + return false; +} + +function isLastDescendantNode$1(path$$1) { + var node = path$$1.getValue(); + + switch (node.type) { + case "tag": + case "anchor": + case "comment": + return false; + } + + var pathStackLength = path$$1.stack.length; + + for (var i = 1; i < pathStackLength; i++) { + var item = path$$1.stack[i]; + var parentItem = path$$1.stack[i - 1]; + + if (Array.isArray(parentItem) && typeof item === "number" && item !== parentItem.length - 1) { + return false; + } + } + + return true; +} + +function getLastDescendantNode$2(node) { + return "children" in node && node.children.length !== 0 ? getLastDescendantNode$2(getLast$7(node.children)) : node; +} + +function isPrettierIgnore$2(comment) { + return comment.value.trim() === "prettier-ignore"; +} + +function hasPrettierIgnore$5(path$$1) { + var node = path$$1.getValue(); + + if (node.type === "documentBody") { + var document = path$$1.getParentNode(); + return hasEndComments$1(document.head) && isPrettierIgnore$2(getLast$7(document.head.endComments)); + } + + return hasLeadingComments$1(node) && isPrettierIgnore$2(getLast$7(node.leadingComments)); +} + +function isEmptyNode$1(node) { + return (!node.children || node.children.length === 0) && !hasComments(node); +} + +function hasComments(node) { + return hasLeadingComments$1(node) || hasMiddleComments$1(node) || hasIndicatorComment$1(node) || hasTrailingComment$2(node) || hasEndComments$1(node); +} + +function hasLeadingComments$1(node) { + return node && node.leadingComments && node.leadingComments.length !== 0; +} + +function hasMiddleComments$1(node) { + return node && node.middleComments && node.middleComments.length !== 0; +} + +function hasIndicatorComment$1(node) { + return node && node.indicatorComment; +} + +function hasTrailingComment$2(node) { + return node && node.trailingComment; +} + +function hasEndComments$1(node) { + return node && node.endComments && node.endComments.length !== 0; +} +/** + * " a b c d e f " -> [" a b", "c d", "e f "] + */ + + +function splitWithSingleSpace(text) { + var parts = []; + var lastPart = undefined; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = text.split(/( +)/g)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var part = _step.value; + + if (part !== " ") { + if (lastPart === " ") { + parts.push(part); + } else { + parts.push((parts.pop() || "") + part); + } + } else if (lastPart === undefined) { + parts.unshift(""); + } + + lastPart = part; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + if (lastPart === " ") { + parts.push((parts.pop() || "") + " "); + } + + if (parts[0] === "") { + parts.shift(); + parts.unshift(" " + (parts.shift() || "")); + } + + return parts; +} + +function getFlowScalarLineContents$1(nodeType, content, options) { + var rawLineContents = content.split("\n").map(function (lineContent, index, lineContents) { + return index === 0 && index === lineContents.length - 1 ? lineContent : index !== 0 && index !== lineContents.length - 1 ? lineContent.trim() : index === 0 ? lineContent.trimRight() : lineContent.trimLeft(); + }); + + if (options.proseWrap === "preserve") { + return rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : [lineContent]; + }); + } + + return rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent); + }).reduce(function (reduced, lineContentWords, index) { + return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !( // trailing backslash in quoteDouble should be preserved + nodeType === "quoteDouble" && getLast$7(getLast$7(reduced)).endsWith("\\")) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]); + }, []).map(function (lineContentWords) { + return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords; + }); +} + +function getBlockValueLineContents$1(node, _ref) { + var parentIndent = _ref.parentIndent, + isLastDescendant = _ref.isLastDescendant, + options = _ref.options; + var content = node.position.start.line === node.position.end.line ? "" : options.originalText.slice(node.position.start.offset, node.position.end.offset) // exclude open line `>` or `|` + .match(/^[^\n]*?\n([\s\S]*)$/)[1]; + var leadingSpaceCount = node.indent === null ? function (match) { + return match ? match[1].length : Infinity; + }(content.match(/^( *)\S/m)) : node.indent - 1 + parentIndent; + var rawLineContents = content.split("\n").map(function (lineContent) { + return lineContent.slice(leadingSpaceCount); + }); + + if (options.proseWrap === "preserve" || node.type === "blockLiteral") { + return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : [lineContent]; + })); + } + + return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent); + }).reduce(function (reduced, lineContentWords, index) { + return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !/^\s/.test(lineContentWords[0]) && !/^\s|\s$/.test(getLast$7(reduced)) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]); + }, []).map(function (lineContentWords) { + return lineContentWords.reduce(function (reduced, word) { + return (// disallow trailing spaces + reduced.length !== 0 && /\s$/.test(getLast$7(reduced)) ? reduced.concat(reduced.pop() + " " + word) : reduced.concat(word) + ); + }, []); + }).map(function (lineContentWords) { + return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords; + })); + + function removeUnnecessaryTrailingNewlines(lineContents) { + if (node.chomping === "keep") { + return getLast$7(lineContents).length === 0 ? lineContents.slice(0, -1) : lineContents; + } + + var trailingNewlineCount = 0; + + for (var i = lineContents.length - 1; i >= 0; i--) { + if (lineContents[i].length === 0) { + trailingNewlineCount++; + } else { + break; + } + } + + return trailingNewlineCount === 0 ? lineContents : trailingNewlineCount >= 2 && !isLastDescendant ? // next empty line + lineContents.slice(0, -(trailingNewlineCount - 1)) : lineContents.slice(0, -trailingNewlineCount); + } +} + +var utils$10 = { + getLast: getLast$7, + getAncestorCount: getAncestorCount$1, + isNode: isNode$2, + isEmptyNode: isEmptyNode$1, + mapNode: mapNode$1, + defineShortcut: defineShortcut$1, + isNextLineEmpty: isNextLineEmpty$6, + isLastDescendantNode: isLastDescendantNode$1, + getBlockValueLineContents: getBlockValueLineContents$1, + getFlowScalarLineContents: getFlowScalarLineContents$1, + getLastDescendantNode: getLastDescendantNode$2, + hasPrettierIgnore: hasPrettierIgnore$5, + hasLeadingComments: hasLeadingComments$1, + hasMiddleComments: hasMiddleComments$1, + hasIndicatorComment: hasIndicatorComment$1, + hasTrailingComment: hasTrailingComment$2, + hasEndComments: hasEndComments$1 +}; + +var insertPragma$8 = pragma$11.insertPragma; +var isPragma = pragma$11.isPragma; +var getAncestorCount = utils$10.getAncestorCount; +var getBlockValueLineContents = utils$10.getBlockValueLineContents; +var getFlowScalarLineContents = utils$10.getFlowScalarLineContents; +var getLast$6 = utils$10.getLast; +var getLastDescendantNode$1 = utils$10.getLastDescendantNode; +var hasLeadingComments = utils$10.hasLeadingComments; +var hasMiddleComments = utils$10.hasMiddleComments; +var hasIndicatorComment = utils$10.hasIndicatorComment; +var hasTrailingComment$1 = utils$10.hasTrailingComment; +var hasEndComments = utils$10.hasEndComments; +var hasPrettierIgnore$4 = utils$10.hasPrettierIgnore; +var isLastDescendantNode = utils$10.isLastDescendantNode; +var isNextLineEmpty$5 = utils$10.isNextLineEmpty; +var isNode$1 = utils$10.isNode; +var isEmptyNode = utils$10.isEmptyNode; +var defineShortcut = utils$10.defineShortcut; +var mapNode = utils$10.mapNode; +var docBuilders$3 = doc.builders; +var conditionalGroup$2 = docBuilders$3.conditionalGroup; +var breakParent$4 = docBuilders$3.breakParent; +var concat$18 = docBuilders$3.concat; +var dedent$4 = docBuilders$3.dedent; +var dedentToRoot$2 = docBuilders$3.dedentToRoot; +var fill$6 = docBuilders$3.fill; +var group$16 = docBuilders$3.group; +var hardline$13 = docBuilders$3.hardline; +var ifBreak$7 = docBuilders$3.ifBreak; +var join$12 = docBuilders$3.join; +var line$11 = docBuilders$3.line; +var lineSuffix$2 = docBuilders$3.lineSuffix; +var literalline$7 = docBuilders$3.literalline; +var markAsRoot$5 = docBuilders$3.markAsRoot; +var softline$8 = docBuilders$3.softline; + +function preprocess$6(ast) { + return mapNode(ast, defineShortcuts); +} + +function defineShortcuts(node) { + switch (node.type) { + case "document": + defineShortcut(node, "head", function () { + return node.children[0]; + }); + defineShortcut(node, "body", function () { + return node.children[1]; + }); + break; + + case "documentBody": + case "sequenceItem": + case "flowSequenceItem": + case "mappingKey": + case "mappingValue": + defineShortcut(node, "content", function () { + return node.children[0]; + }); + break; + + case "mappingItem": + case "flowMappingItem": + defineShortcut(node, "key", function () { + return node.children[0]; + }); + defineShortcut(node, "value", function () { + return node.children[1]; + }); + break; + } + + return node; +} + +function genericPrint$6(path$$1, options, print) { + var node = path$$1.getValue(); + var parentNode = path$$1.getParentNode(); + var tag = !node.tag ? "" : path$$1.call(print, "tag"); + var anchor = !node.anchor ? "" : path$$1.call(print, "anchor"); + var nextEmptyLine = isNode$1(node, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !isLastDescendantNode(path$$1) ? printNextEmptyLine(path$$1, options.originalText) : ""; + return concat$18([node.type !== "mappingValue" && hasLeadingComments(node) ? concat$18([join$12(hardline$13, path$$1.map(print, "leadingComments")), hardline$13]) : "", tag, tag && anchor ? " " : "", anchor, tag || anchor ? isNode$1(node, ["sequence", "mapping"]) && !hasMiddleComments(node) ? hardline$13 : " " : "", hasMiddleComments(node) ? concat$18([node.middleComments.length === 1 ? "" : hardline$13, join$12(hardline$13, path$$1.map(print, "middleComments")), hardline$13]) : "", hasPrettierIgnore$4(path$$1) ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : group$16(_print(node, parentNode, path$$1, options, print)), hasTrailingComment$1(node) && !isNode$1(node, ["document", "documentHead"]) ? lineSuffix$2(concat$18([node.type === "mappingValue" && !node.content ? "" : " ", parentNode.type === "mappingKey" && path$$1.getParentNode(2).type === "mapping" && isInlineNode(node) ? "" : breakParent$4, path$$1.call(print, "trailingComment")])) : "", nextEmptyLine, hasEndComments(node) && !isNode$1(node, ["documentHead", "documentBody"]) ? align$3(node.type === "sequenceItem" ? 2 : 0, concat$18([hardline$13, join$12(hardline$13, path$$1.map(print, "endComments"))])) : ""]); +} + +function _print(node, parentNode, path$$1, options, print) { + switch (node.type) { + case "root": + return concat$18([join$12(hardline$13, path$$1.map(function (childPath, index) { + var document = node.children[index]; + var nextDocument = node.children[index + 1]; + return concat$18([print(childPath), shouldPrintDocumentEndMarker(document, nextDocument) ? concat$18([hardline$13, "...", hasTrailingComment$1(document) ? concat$18([" ", path$$1.call(print, "trailingComment")]) : ""]) : !nextDocument || hasTrailingComment$1(nextDocument.head) ? "" : concat$18([hardline$13, "---"])]); + }, "children")), node.children.length === 0 || function (lastDescendantNode) { + return isNode$1(lastDescendantNode, ["blockLiteral", "blockFolded"]) && lastDescendantNode.chomping === "keep"; + }(getLastDescendantNode$1(node)) ? "" : hardline$13]); + + case "document": + { + var nextDocument = parentNode.children[path$$1.getName() + 1]; + return join$12(hardline$13, [shouldPrintDocumentHeadEndMarker(node, nextDocument) === "head" ? join$12(hardline$13, [node.head.children.length === 0 && node.head.endComments.length === 0 ? "" : path$$1.call(print, "head"), concat$18(["---", hasTrailingComment$1(node.head) ? concat$18([" ", path$$1.call(print, "head", "trailingComment")]) : ""])].filter(Boolean)) : "", shouldPrintDocumentBody(node) ? path$$1.call(print, "body") : ""].filter(Boolean)); + } + + case "documentHead": + return join$12(hardline$13, [].concat(path$$1.map(print, "children"), path$$1.map(print, "endComments"))); + + case "documentBody": + { + var children = join$12(hardline$13, path$$1.map(print, "children")).parts; + var endComments = join$12(hardline$13, path$$1.map(print, "endComments")).parts; + var separator = children.length === 0 || endComments.length === 0 ? "" : function (lastDescendantNode) { + return isNode$1(lastDescendantNode, ["blockFolded", "blockLiteral"]) ? lastDescendantNode.chomping === "keep" ? // there's already a newline printed at the end of blockValue (chomping=keep, lastDescendant=true) + "" : // an extra newline for better readability + concat$18([hardline$13, hardline$13]) : hardline$13; + }(getLastDescendantNode$1(node)); + return concat$18([].concat(children, separator, endComments)); + } + + case "directive": + return concat$18(["%", join$12(" ", [node.name].concat(node.parameters))]); + + case "comment": + return concat$18(["#", node.value]); + + case "alias": + return concat$18(["*", node.value]); + + case "tag": + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + + case "anchor": + return concat$18(["&", node.value]); + + case "plain": + return printFlowScalarContent(node.type, options.originalText.slice(node.position.start.offset, node.position.end.offset), options); + + case "quoteDouble": + case "quoteSingle": + { + var singleQuote = "'"; + var doubleQuote = '"'; + var raw = options.originalText.slice(node.position.start.offset + 1, node.position.end.offset - 1); + + if (node.type === "quoteSingle" && raw.includes("\\") || node.type === "quoteDouble" && /\\[^"]/.test(raw)) { + // only quoteDouble can use escape chars + // and quoteSingle do not need to escape backslashes + var originalQuote = node.type === "quoteDouble" ? doubleQuote : singleQuote; + return concat$18([originalQuote, printFlowScalarContent(node.type, raw, options), originalQuote]); + } else if (raw.includes(doubleQuote)) { + return concat$18([singleQuote, printFlowScalarContent(node.type, node.type === "quoteDouble" ? raw // double quote needs to be escaped by backslash in quoteDouble + .replace(/\\"/g, doubleQuote).replace(/'/g, singleQuote.repeat(2)) : raw, options), singleQuote]); + } + + if (raw.includes(singleQuote)) { + return concat$18([doubleQuote, printFlowScalarContent(node.type, node.type === "quoteSingle" ? // single quote needs to be escaped by 2 single quotes in quoteSingle + raw.replace(/''/g, singleQuote) : raw, options), doubleQuote]); + } + + var quote = options.singleQuote ? singleQuote : doubleQuote; + return concat$18([quote, printFlowScalarContent(node.type, raw, options), quote]); + } + + case "blockFolded": + case "blockLiteral": + { + var parentIndent = getAncestorCount(path$$1, function (ancestorNode) { + return isNode$1(ancestorNode, ["sequence", "mapping"]); + }); + var isLastDescendant = isLastDescendantNode(path$$1); + return concat$18([node.type === "blockFolded" ? ">" : "|", node.indent === null ? "" : node.indent.toString(), node.chomping === "clip" ? "" : node.chomping === "keep" ? "+" : "-", hasIndicatorComment(node) ? concat$18([" ", path$$1.call(print, "indicatorComment")]) : "", (node.indent === null ? dedent$4 : dedentToRoot$2)(align$3(node.indent === null ? options.tabWidth : node.indent - 1 + parentIndent, concat$18(getBlockValueLineContents(node, { + parentIndent, + isLastDescendant, + options + }).reduce(function (reduced, lineWords, index, lineContents) { + return reduced.concat(index === 0 ? hardline$13 : "", fill$6(join$12(line$11, lineWords).parts), index !== lineContents.length - 1 ? lineWords.length === 0 ? hardline$13 : markAsRoot$5(literalline$7) : node.chomping === "keep" && isLastDescendant ? lineWords.length === 0 ? dedentToRoot$2(hardline$13) : dedentToRoot$2(literalline$7) : ""); + }, []))))]); + } + + case "sequence": + return join$12(hardline$13, path$$1.map(print, "children")); + + case "sequenceItem": + return concat$18(["- ", align$3(2, !node.content ? "" : path$$1.call(print, "content"))]); + + case "mappingKey": + return !node.content ? "" : path$$1.call(print, "content"); + + case "mappingValue": + return !node.content ? "" : path$$1.call(print, "content"); + + case "mapping": + return join$12(hardline$13, path$$1.map(print, "children")); + + case "mappingItem": + case "flowMappingItem": + { + var isEmptyMappingKey = isEmptyNode(node.key); + var isEmptyMappingValue = isEmptyNode(node.value); + + if (isEmptyMappingKey && isEmptyMappingValue) { + return concat$18([": "]); + } + + var key = path$$1.call(print, "key"); + var value = path$$1.call(print, "value"); + + if (isEmptyMappingValue) { + return node.type === "flowMappingItem" && parentNode.type === "flowMapping" ? key : node.type === "mappingItem" && isAbsolutelyPrintedAsSingleLineNode(node.key.content, options) && !hasTrailingComment$1(node.key.content) && (!parentNode.tag || parentNode.tag.value !== "tag:yaml.org,2002:set") ? concat$18([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ":"]) : concat$18(["? ", align$3(2, key)]); + } + + if (isEmptyMappingKey) { + return concat$18([": ", align$3(2, value)]); + } + + var groupId = Symbol("mappingKey"); + var forceExplicitKey = hasLeadingComments(node.value) || !isInlineNode(node.key.content); + return forceExplicitKey ? concat$18(["? ", align$3(2, key), hardline$13, join$12("", path$$1.map(print, "value", "leadingComments").map(function (comment) { + return concat$18([comment, hardline$13]); + })), ": ", align$3(2, value)]) : // force singleline + isSingleLineNode(node.key.content) && !hasLeadingComments(node.key.content) && !hasMiddleComments(node.key.content) && !hasTrailingComment$1(node.key.content) && !hasEndComments(node.key) && !hasLeadingComments(node.value.content) && !hasMiddleComments(node.value.content) && !hasEndComments(node.value) && isAbsolutelyPrintedAsSingleLineNode(node.value.content, options) ? concat$18([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ": ", value]) : conditionalGroup$2([concat$18([group$16(concat$18([ifBreak$7("? "), group$16(align$3(2, key), { + id: groupId + })])), ifBreak$7(concat$18([hardline$13, ": ", align$3(2, value)]), indent(concat$18([needsSpaceInFrontOfMappingValue(node) ? " " : "", ":", hasLeadingComments(node.value.content) || hasEndComments(node.value) && node.value.content && !isNode$1(node.value.content, ["mapping", "sequence"]) || parentNode.type === "mapping" && hasTrailingComment$1(node.key.content) && isInlineNode(node.value.content) || isNode$1(node.value.content, ["mapping", "sequence"]) && node.value.content.tag === null && node.value.content.anchor === null ? hardline$13 : !node.value.content ? "" : line$11, value])), { + groupId + })])]); + } + + case "flowMapping": + case "flowSequence": + { + var openMarker = node.type === "flowMapping" ? "{" : "["; + var closeMarker = node.type === "flowMapping" ? "}" : "]"; + var bracketSpacing = node.type === "flowMapping" && node.children.length !== 0 && options.bracketSpacing ? line$11 : softline$8; + + var isLastItemEmptyMappingItem = node.children.length !== 0 && function (lastItem) { + return lastItem.type === "flowMappingItem" && isEmptyNode(lastItem.key) && isEmptyNode(lastItem.value); + }(getLast$6(node.children)); + + return concat$18([openMarker, indent(concat$18([bracketSpacing, concat$18(path$$1.map(function (childPath, index) { + return concat$18([print(childPath), index === node.children.length - 1 ? "" : concat$18([",", line$11, node.children[index].position.start.line !== node.children[index + 1].position.start.line ? printNextEmptyLine(childPath, options.originalText) : ""])]); + }, "children")), ifBreak$7(",", "")])), isLastItemEmptyMappingItem ? "" : bracketSpacing, closeMarker]); + } + + case "flowSequenceItem": + return path$$1.call(print, "content"); + // istanbul ignore next + + default: + throw new Error(`Unexpected node type ${node.type}`); + } + + function indent(doc$$2) { + return docBuilders$3.align(" ".repeat(options.tabWidth), doc$$2); + } +} + +function align$3(n, doc$$2) { + return typeof n === "number" && n > 0 ? docBuilders$3.align(" ".repeat(n), doc$$2) : docBuilders$3.align(n, doc$$2); +} + +function isInlineNode(node) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + case "alias": + case "flowMapping": + case "flowSequence": + return true; + + default: + return false; + } +} + +function isSingleLineNode(node) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + return node.position.start.line === node.position.end.line; + + case "alias": + return true; + + default: + return false; + } +} + +function shouldPrintDocumentBody(document) { + return document.body.children.length !== 0 || hasEndComments(document.body); +} + +function shouldPrintDocumentEndMarker(document, nextDocument) { + return ( + /** + *... # trailingComment + */ + hasTrailingComment$1(document) || nextDocument && ( + /** + * ... + * %DIRECTIVE + * --- + */ + nextDocument.head.children.length !== 0 || + /** + * ... + * # endComment + * --- + */ + hasEndComments(nextDocument.head)) + ); +} + +function shouldPrintDocumentHeadEndMarker(document, nextDocument) { + if ( + /** + * %DIRECTIVE + * --- + */ + document.head.children.length !== 0 || + /** + * # end comment + * --- + */ + hasEndComments(document.head) || + /** + * --- # trailing comment + */ + hasTrailingComment$1(document.head)) { + return "head"; + } + + if (shouldPrintDocumentEndMarker(document, nextDocument)) { + return false; + } + + return nextDocument ? "root" : false; +} + +function isAbsolutelyPrintedAsSingleLineNode(node, options) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteSingle": + case "quoteDouble": + break; + + case "alias": + return true; + + default: + return false; + } + + if (options.proseWrap === "preserve") { + return node.position.start.line === node.position.end.line; + } + + if ( // backslash-newline + /\\$/m.test(options.originalText.slice(node.position.start.offset, node.position.end.offset))) { + return false; + } + + switch (options.proseWrap) { + case "never": + return node.value.indexOf("\n") === -1; + + case "always": + return !/[\n ]/.test(node.value); + // istanbul ignore next + + default: + return false; + } +} + +function needsSpaceInFrontOfMappingValue(node) { + return node.key.content && node.key.content.type === "alias"; +} + +function printNextEmptyLine(path$$1, originalText) { + var node = path$$1.getValue(); + var root = path$$1.stack[0]; + root.isNextEmptyLinePrintedChecklist = root.isNextEmptyLinePrintedChecklist || []; + + if (!root.isNextEmptyLinePrintedChecklist[node.position.end.line]) { + if (isNextLineEmpty$5(node, originalText)) { + root.isNextEmptyLinePrintedChecklist[node.position.end.line] = true; + return softline$8; + } + } + + return ""; +} + +function printFlowScalarContent(nodeType, content, options) { + var lineContents = getFlowScalarLineContents(nodeType, content, options); + return join$12(hardline$13, lineContents.map(function (lineContentWords) { + return fill$6(join$12(line$11, lineContentWords).parts); + })); +} + +function clean$11(node, newNode +/*, parent */ +) { + if (isNode$1(newNode)) { + delete newNode.position; + + switch (newNode.type) { + case "comment": + // insert pragma + if (isPragma(newNode.value)) { + return null; + } + + break; + + case "quoteDouble": + case "quoteSingle": + newNode.type = "quote"; + break; + } + } +} + +var printerYaml = { + preprocess: preprocess$6, + print: genericPrint$6, + massageAstNode: clean$11, + insertPragma: insertPragma$8 +}; + +var options$18 = { + bracketSpacing: commonOptions.bracketSpacing, + singleQuote: commonOptions.singleQuote, + proseWrap: commonOptions.proseWrap +}; + +var name$16 = "YAML"; +var type$15 = "data"; +var tmScope$15 = "source.yaml"; +var aliases$6 = ["yml"]; +var extensions$15 = [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yml.mysql"]; +var filenames$3 = [".clang-format", ".clang-tidy", ".gemrc", "glide.lock"]; +var aceMode$15 = "yaml"; +var codemirrorMode$11 = "yaml"; +var codemirrorMimeType$11 = "text/x-yaml"; +var languageId$15 = 407; +var yaml = { + name: name$16, + type: type$15, + tmScope: tmScope$15, + aliases: aliases$6, + extensions: extensions$15, + filenames: filenames$3, + aceMode: aceMode$15, + codemirrorMode: codemirrorMode$11, + codemirrorMimeType: codemirrorMimeType$11, + languageId: languageId$15 +}; + +var yaml$1 = Object.freeze({ + name: name$16, + type: type$15, + tmScope: tmScope$15, + aliases: aliases$6, + extensions: extensions$15, + filenames: filenames$3, + aceMode: aceMode$15, + codemirrorMode: codemirrorMode$11, + codemirrorMimeType: codemirrorMimeType$11, + languageId: languageId$15, + default: yaml +}); + +var require$$0$31 = ( yaml$1 && yaml ) || yaml$1; + +var languages$6 = [createLanguage(require$$0$31, { + override: { + since: "1.14.0", + parsers: ["yaml"], + vscodeLanguageIds: ["yaml"] + } +})]; +var languageYaml = { + languages: languages$6, + printers: { + yaml: printerYaml + }, + options: options$18 +}; + +// plugin will look for `eval("require")()` and transform to `require()` in the bundle, +// and rewrite the paths to require from the top-level. +// We need to list the parsers and getters so we can load them only when necessary. + + +var internalPlugins = [// JS +languageJs, { + parsers: { + // JS - Babylon + get babylon() { + return require("./parser-babylon").parsers.babylon; + }, + + get json() { + return require("./parser-babylon").parsers.json; + }, + + get json5() { + return require("./parser-babylon").parsers.json5; + }, + + get "json-stringify"() { + return require("./parser-babylon").parsers["json-stringify"]; + }, + + get __js_expression() { + return require("./parser-babylon").parsers.__js_expression; + }, + + get __vue_expression() { + return require("./parser-babylon").parsers.__vue_expression; + }, + + // JS - Flow + get flow() { + return require("./parser-flow").parsers.flow; + }, + + // JS - TypeScript + get typescript() { + return require("./parser-typescript").parsers.typescript; + }, + + /** + * TODO: Remove this old alias in a major version + */ + get "typescript-eslint"() { + return require("./parser-typescript").parsers.typescript; + }, + + // JS - Angular Action + get __ng_action() { + return require("./parser-angular").parsers.__ng_action; + }, + + // JS - Angular Binding + get __ng_binding() { + return require("./parser-angular").parsers.__ng_binding; + }, + + // JS - Angular Interpolation + get __ng_interpolation() { + return require("./parser-angular").parsers.__ng_interpolation; + }, + + // JS - Angular Directive + get __ng_directive() { + return require("./parser-angular").parsers.__ng_directive; + } + + } +}, // CSS +languageCss, { + parsers: { + // TODO: switch these to just `postcss` and use `language` instead. + get css() { + return require("./parser-postcss").parsers.css; + }, + + get less() { + return require("./parser-postcss").parsers.css; + }, + + get scss() { + return require("./parser-postcss").parsers.css; + } + + } +}, // Handlebars +languageHandlebars, { + parsers: { + get glimmer() { + return require("./parser-glimmer").parsers.glimmer; + } + + } +}, // GraphQL +languageGraphql, { + parsers: { + get graphql() { + return require("./parser-graphql").parsers.graphql; + } + + } +}, // Markdown +languageMarkdown, { + parsers: { + get remark() { + return require("./parser-markdown").parsers.remark; + }, + + // TODO: Delete this in 2.0 + get markdown() { + return require("./parser-markdown").parsers.remark; + }, + + get mdx() { + return require("./parser-markdown").parsers.mdx; + } + + } +}, languageHtml, { + parsers: { + // HTML + get html() { + return require("./parser-html").parsers.html; + }, + + // Vue + get vue() { + return require("./parser-html").parsers.vue; + }, + + // Angular + get angular() { + return require("./parser-html").parsers.angular; + } + + } +}, // YAML +languageYaml, { + parsers: { + get yaml() { + return require("./parser-yaml").parsers.yaml; + } + + } +}]; + +var thirdParty$1 = ( thirdParty && thirdParty__default ) || thirdParty; + +function loadPlugins(plugins, pluginSearchDirs) { + if (!plugins) { + plugins = []; + } + + if (!pluginSearchDirs) { + pluginSearchDirs = []; + } // unless pluginSearchDirs are provided, auto-load plugins from node_modules that are parent to Prettier + + + if (!pluginSearchDirs.length) { + var autoLoadDir = thirdParty$1.findParentDir(__dirname, "node_modules"); + + if (autoLoadDir) { + pluginSearchDirs = [autoLoadDir]; + } + } + + var externalManualLoadPluginInfos = plugins.map(function (pluginName) { + var requirePath; + + try { + // try local files + requirePath = resolve$1.sync(path.resolve(process.cwd(), pluginName)); + } catch (e) { + // try node modules + requirePath = resolve$1.sync(pluginName, { + basedir: process.cwd() + }); + } + + return { + name: pluginName, + requirePath + }; + }); + var externalAutoLoadPluginInfos = pluginSearchDirs.map(function (pluginSearchDir) { + var resolvedPluginSearchDir = path.resolve(process.cwd(), pluginSearchDir); + + if (!isDirectory(resolvedPluginSearchDir)) { + throw new Error(`${pluginSearchDir} does not exist or is not a directory`); + } + + var nodeModulesDir = path.resolve(resolvedPluginSearchDir, "node_modules"); + return findPluginsInNodeModules(nodeModulesDir).map(function (pluginName) { + return { + name: pluginName, + requirePath: resolve$1.sync(pluginName, { + basedir: resolvedPluginSearchDir + }) + }; + }); + }).reduce(function (a, b) { + return a.concat(b); + }, []); + var externalPlugins = lodash_uniqby(externalManualLoadPluginInfos.concat(externalAutoLoadPluginInfos), "requirePath").map(function (externalPluginInfo) { + return Object.assign({ + name: externalPluginInfo.name + }, require(externalPluginInfo.requirePath)); + }); + return internalPlugins.concat(externalPlugins); +} + +function findPluginsInNodeModules(nodeModulesDir) { + var pluginPackageJsonPaths = globby.sync(["prettier-plugin-*/package.json", "@prettier/plugin-*/package.json"], { + cwd: nodeModulesDir + }); + return pluginPackageJsonPaths.map(path.dirname); +} + +function isDirectory(dir) { + try { + return fs.statSync(dir).isDirectory(); + } catch (e) { + return false; + } +} + +var loadPlugins_1 = loadPlugins; + +var mimicFn = function mimicFn(to, from) { + // TODO: use `Reflect.ownKeys()` when targeting Node.js 6 + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var prop = _step.value; + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +}; + +var mem = createCommonjsModule(function (module) { + 'use strict'; + + var cacheStore = new WeakMap(); + + var defaultCacheKey = function defaultCacheKey(x) { + if (arguments.length === 1 && (x === null || x === undefined || typeof x !== 'function' && typeof x !== 'object')) { + return x; + } + + return JSON.stringify(arguments); + }; + + module.exports = function (fn, opts) { + opts = Object.assign({ + cacheKey: defaultCacheKey, + cache: new Map() + }, opts); + + var memoized = function memoized() { + var cache = cacheStore.get(memoized); + var key = opts.cacheKey.apply(null, arguments); + + if (cache.has(key)) { + var c = cache.get(key); + + if (typeof opts.maxAge !== 'number' || Date.now() < c.maxAge) { + return c.data; + } + } + + var ret = fn.apply(null, arguments); + cache.set(key, { + data: ret, + maxAge: Date.now() + (opts.maxAge || 0) + }); + return ret; + }; + + mimicFn(memoized, fn); + cacheStore.set(memoized, opts.cache); + return memoized; + }; + + module.exports.clear = function (fn) { + var cache = cacheStore.get(fn); + + if (cache && typeof cache.clear === 'function') { + cache.clear(); + } + }; +}); + +var semver$3 = createCommonjsModule(function (module, exports) { + exports = module.exports = SemVer; // The debug function is excluded entirely from the minified version. + + /* nomin */ + + var debug; + /* nomin */ + + if (typeof process === 'object' && + /* nomin */ + process.env && + /* nomin */ + process.env.NODE_DEBUG && + /* nomin */ + /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ + debug = function debug() { + /* nomin */ + var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ + + args.unshift('SEMVER'); + /* nomin */ + + console.log.apply(console, args); + /* nomin */ + }; + /* nomin */ + else + /* nomin */ + debug = function debug() {}; // Note: this is the semver.org version of the spec that it implements + // Not necessarily the package version of this code. + + exports.SEMVER_SPEC_VERSION = '2.0.0'; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; // Max safe segment length for coercion. + + var MAX_SAFE_COMPONENT_LENGTH = 16; // The actual regexps go on exports.re + + var re = exports.re = []; + var src = exports.src = []; + var R = 0; // The following Regular Expressions can be used for tokenizing, + // validating, and parsing SemVer version strings. + // ## Numeric Identifier + // A single `0`, or a non-zero digit followed by zero or more digits. + + var NUMERICIDENTIFIER = R++; + src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; + var NUMERICIDENTIFIERLOOSE = R++; + src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; // ## Non-numeric Identifier + // Zero or more digits, followed by a letter or hyphen, and then zero or + // more letters, digits, or hyphens. + + var NONNUMERICIDENTIFIER = R++; + src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; // ## Main Version + // Three dot-separated numeric identifiers. + + var MAINVERSION = R++; + src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')'; + var MAINVERSIONLOOSE = R++; + src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; // ## Pre-release Version Identifier + // A numeric identifier, or a non-numeric identifier. + + var PRERELEASEIDENTIFIER = R++; + src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')'; + var PRERELEASEIDENTIFIERLOOSE = R++; + src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')'; // ## Pre-release Version + // Hyphen, followed by one or more dot-separated pre-release version + // identifiers. + + var PRERELEASE = R++; + src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + var PRERELEASELOOSE = R++; + src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; // ## Build Metadata Identifier + // Any combination of digits, letters, or hyphens. + + var BUILDIDENTIFIER = R++; + src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; // ## Build Metadata + // Plus sign, followed by one or more period-separated build metadata + // identifiers. + + var BUILD = R++; + src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; // ## Full Version String + // A main version, followed optionally by a pre-release version and + // build metadata. + // Note that the only major, minor, patch, and pre-release sections of + // the version string are capturing groups. The build metadata is not a + // capturing group, because it should not ever be used in version + // comparison. + + var FULL = R++; + var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?'; + src[FULL] = '^' + FULLPLAIN + '$'; // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. + // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty + // common in the npm registry. + + var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?'; + var LOOSE = R++; + src[LOOSE] = '^' + LOOSEPLAIN + '$'; + var GTLT = R++; + src[GTLT] = '((?:<|>)?=?)'; // Something like "2.*" or "1.2.x". + // Note that "x.x" is a valid xRange identifer, meaning "any version" + // Only the first item is strictly required. + + var XRANGEIDENTIFIERLOOSE = R++; + src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; + var XRANGEIDENTIFIER = R++; + src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + var XRANGEPLAIN = R++; + src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGEPLAINLOOSE = R++; + src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGE = R++; + src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; + var XRANGELOOSE = R++; + src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; // Coercion. + // Extract anything that could conceivably be a part of a valid semver + + var COERCE = R++; + src[COERCE] = '(?:^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])'; // Tilde ranges. + // Meaning is "reasonably at or greater than" + + var LONETILDE = R++; + src[LONETILDE] = '(?:~>?)'; + var TILDETRIM = R++; + src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; + re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); + var tildeTrimReplace = '$1~'; + var TILDE = R++; + src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; + var TILDELOOSE = R++; + src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; // Caret ranges. + // Meaning is "at least and backwards compatible with" + + var LONECARET = R++; + src[LONECARET] = '(?:\\^)'; + var CARETTRIM = R++; + src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; + re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); + var caretTrimReplace = '$1^'; + var CARET = R++; + src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; + var CARETLOOSE = R++; + src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; // A simple gt/lt/eq thing, or just "" to indicate "any version" + + var COMPARATORLOOSE = R++; + src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; + var COMPARATOR = R++; + src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; // An expression to strip any whitespace between the gtlt and the thing + // it modifies, so that `> 1.2.3` ==> `>1.2.3` + + var COMPARATORTRIM = R++; + src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; // this one has to use the /g flag + + re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); + var comparatorTrimReplace = '$1$2$3'; // Something like `1.2.3 - 1.2.4` + // Note that these all use the loose form, because they'll be + // checked against either the strict or loose comparator form + // later. + + var HYPHENRANGE = R++; + src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$'; + var HYPHENRANGELOOSE = R++; + src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$'; // Star ranges basically just allow anything at all. + + var STAR = R++; + src[STAR] = '(<|>)?=?\\s*\\*'; // Compile to actual regexp objects. + // All are flag-free, unless they were created above with a flag. + + for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) re[i] = new RegExp(src[i]); + } + + exports.parse = parse; + + function parse(version, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + if (version.length > MAX_LENGTH) return null; + var r = options.loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) return null; + + try { + return new SemVer(version, options); + } catch (er) { + return null; + } + } + + exports.valid = valid; + + function valid(version, options) { + var v = parse(version, options); + return v ? v.version : null; + } + + exports.clean = clean; + + function clean(version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options); + return s ? s.version : null; + } + + exports.SemVer = SemVer; + + function SemVer(version, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (version instanceof SemVer) { + if (version.loose === options.loose) return version;else version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters'); + if (!(this instanceof SemVer)) return new SemVer(version, options); + debug('SemVer', version, options); + this.options = options; + this.loose = !!options.loose; + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]); + if (!m) throw new TypeError('Invalid Version: ' + version); + this.raw = version; // these are actually numbers + + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError('Invalid major version'); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError('Invalid minor version'); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError('Invalid patch version'); // numberify any prerelease numeric ids + + if (!m[4]) this.prerelease = [];else this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + + return id; + }); + this.build = m[5] ? m[5].split('.') : []; + this.format(); + } + + SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) this.version += '-' + this.prerelease.join('.'); + return this.version; + }; + + SemVer.prototype.toString = function () { + return this.version; + }; + + SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other); + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return this.compareMain(other) || this.comparePre(other); + }; + + SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + + SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); // NOT having a prerelease is > having one + + if (this.prerelease.length && !other.prerelease.length) return -1;else if (!this.prerelease.length && other.prerelease.length) return 1;else if (!this.prerelease.length && !other.prerelease.length) return 0; + var i = 0; + + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) return 0;else if (b === undefined) return 1;else if (a === undefined) return -1;else if (a === b) continue;else return compareIdentifiers(a, b); + } while (++i); + }; // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + + + SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + + case 'prerelease': + if (this.prerelease.length === 0) this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + + case 'pre': + if (this.prerelease.length === 0) this.prerelease = [0];else { + var i = this.prerelease.length; + + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; + } else this.prerelease = [identifier, 0]; + } + + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + + this.format(); + this.raw = this.version; + return this; + }; + + exports.inc = inc; + + function inc(version, release, loose, identifier) { + if (typeof loose === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + + exports.diff = diff; + + function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre' + key; + } + } + } + + return 'prerelease'; + } + + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } + } + + exports.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : a > b ? 1 : 0; + } + + exports.rcompareIdentifiers = rcompareIdentifiers; + + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + + exports.major = major; + + function major(a, loose) { + return new SemVer(a, loose).major; + } + + exports.minor = minor; + + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + + exports.patch = patch; + + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + + exports.compare = compare; + + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + + exports.compareLoose = compareLoose; + + function compareLoose(a, b) { + return compare(a, b, true); + } + + exports.rcompare = rcompare; + + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + + exports.sort = sort; + + function sort(list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose); + }); + } + + exports.rsort = rsort; + + function rsort(list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose); + }); + } + + exports.gt = gt; + + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + + exports.lt = lt; + + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + + exports.eq = eq; + + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + + exports.neq = neq; + + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + + exports.gte = gte; + + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + + exports.lte = lte; + + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + + exports.cmp = cmp; + + function cmp(a, op, b, loose) { + var ret; + + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + + case '': + case '=': + case '==': + ret = eq(a, b, loose); + break; + + case '!=': + ret = neq(a, b, loose); + break; + + case '>': + ret = gt(a, b, loose); + break; + + case '>=': + ret = gte(a, b, loose); + break; + + case '<': + ret = lt(a, b, loose); + break; + + case '<=': + ret = lte(a, b, loose); + break; + + default: + throw new TypeError('Invalid operator: ' + op); + } + + return ret; + } + + exports.Comparator = Comparator; + + function Comparator(comp, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) return comp;else comp = comp.value; + } + + if (!(this instanceof Comparator)) return new Comparator(comp, options); + debug('comparator', comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) this.value = '';else this.value = this.operator + this.semver.version; + debug('comp', this); + } + + var ANY = {}; + + Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + if (!m) throw new TypeError('Invalid comparator: ' + comp); + this.operator = m[1]; + if (this.operator === '=') this.operator = ''; // if it literally is just '>' or '' then allow anything. + + if (!m[2]) this.semver = ANY;else this.semver = new SemVer(m[2], this.options.loose); + }; + + Comparator.prototype.toString = function () { + return this.value; + }; + + Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose); + if (this.semver === ANY) return true; + if (typeof version === 'string') version = new SemVer(version, this.options); + return cmp(version, this.operator, this.semver, this.options); + }; + + Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + + var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<'); + var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>'); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + + exports.Range = Range; + + function Range(range, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options); + } + + if (!(this instanceof Range)) return new Range(range, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; // First, split based on boolean or || + + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()); + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); + } + + Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; + }; + + Range.prototype.toString = function () { + return this.range; + }; + + Range.prototype.parseRange = function (range) { + var loose = this.options.loose; + range = range.trim(); // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); // `~ 1.2.3` => `~1.2.3` + + range = range.replace(re[TILDETRIM], tildeTrimReplace); // `^ 1.2.3` => `^1.2.3` + + range = range.replace(re[CARETTRIM], caretTrimReplace); // normalize spaces + + range = range.split(/\s+/).join(' '); // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options); + }, this).join(' ').split(/\s+/); + + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe); + }); + } + + set = set.map(function (comp) { + return new Comparator(comp, this.options); + }, this); + return set; + }; + + Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + }; // Mostly just for testing and legacy API reasons + + + exports.toComparators = toComparators; + + function toComparators(range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value; + }).join(' ').trim().split(' '); + }); + } // comprised of xranges, tildes, stars, and gtlt's at this point. + // already replaced the hyphen ranges + // turn into a set of JUST comparators. + + + function parseComparator(comp, options) { + debug('comp', comp, options); + comp = replaceCarets(comp, options); + debug('caret', comp); + comp = replaceTildes(comp, options); + debug('tildes', comp); + comp = replaceXRanges(comp, options); + debug('xrange', comp); + comp = replaceStars(comp, options); + debug('stars', comp); + return comp; + } + + function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; + } // ~, ~> --> * (any, kinda silly) + // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 + // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 + // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 + // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 + // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 + + + function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options); + }).join(' '); + } + + function replaceTilde(comp, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + debug('tilde return', ret); + return ret; + }); + } // ^ --> * (any, kinda silly) + // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 + // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 + // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 + // ^1.2.3 --> >=1.2.3 <2.0.0 + // ^1.2.0 --> >=1.2.0 <2.0.0 + + + function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options); + }).join(' '); + } + + function replaceCaret(comp, options) { + debug('caret', comp, options); + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) { + if (M === '0') ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0'; + } + debug('caret return', ret); + return ret; + }); + } + + function replaceXRanges(comp, options) { + debug('replaceXRanges', comp, options); + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options); + }).join(' '); + } + + function replaceXRange(comp, options) { + comp = comp.trim(); + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === '=' && anyX) gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) m = 0; + if (xp) p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) M = +M + 1;else m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + return ret; + }); + } // Because * is AND-ed with everything else in the comparator, + // and '' means "any version", just remove the *s entirely. + + + function replaceStars(comp, options) { + debug('replaceStars', comp, options); // Looseness is ignored here. star is always as loose as it gets! + + return comp.trim().replace(re[STAR], ''); + } // This function is passed to string.replace(re[HYPHENRANGE]) + // M, m, patch, prerelease, build + // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 + // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do + // 1.2 - 3.4 => >=1.2.0 <3.5.0 + + + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) from = '';else if (isX(fm)) from = '>=' + fM + '.0.0';else if (isX(fp)) from = '>=' + fM + '.' + fm + '.0';else from = '>=' + from; + if (isX(tM)) to = '';else if (isX(tm)) to = '<' + (+tM + 1) + '.0.0';else if (isX(tp)) to = '<' + tM + '.' + (+tm + 1) + '.0';else if (tpr) to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;else to = '<=' + to; + return (from + ' ' + to).trim(); + } // if ANY of the sets match ALL of its comparators, then pass + + + Range.prototype.test = function (version) { + if (!version) return false; + if (typeof version === 'string') version = new SemVer(version, this.options); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) return true; + } + + return false; + }; + + function testSet(set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) return false; + } + + if (!options) options = {}; + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } // Version has a -pre, but it's not one of the ones we like. + + + return false; + } + + return true; + } + + exports.satisfies = satisfies; + + function satisfies(version, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + + return range.test(version); + } + + exports.maxSatisfying = maxSatisfying; + + function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + } + + exports.minSatisfying = minSatisfying; + + function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + } + + exports.validRange = validRange; + + function validRange(range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*'; + } catch (er) { + return null; + } + } // Determine if version is less than all the versions possible in the range + + + exports.ltr = ltr; + + function ltr(version, range, options) { + return outside(version, range, '<', options); + } // Determine if version is greater than all the versions possible in the range. + + + exports.gtr = gtr; + + function gtr(version, range, options) { + return outside(version, range, '>', options); + } + + exports.outside = outside; + + function outside(version, range, hilo, options) { + version = new SemVer(version, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } // If it satisifes the range it is not outside + + + if (satisfies(version, range, options)) { + return false; + } // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + var high = null; + var low = null; + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0'); + } + + high = high || comparator; + low = low || comparator; + + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); // If the edge version comparator has a operator then our version + // isn't outside it + + if (high.operator === comp || high.operator === ecomp) { + return false; + } // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + + + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + + return true; + } + + exports.prerelease = prerelease; + + function prerelease(version, options) { + var parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + + exports.intersects = intersects; + + function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + } + + exports.coerce = coerce; + + function coerce(version) { + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + var match = version.match(re[COERCE]); + if (match == null) return null; + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); + } +}); + +var hasOwnProperty$1 = Object.prototype.hasOwnProperty; +var pseudomap = PseudoMap; + +function PseudoMap(set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'"); + this.clear(); + + if (set) { + if (set instanceof PseudoMap || typeof Map === 'function' && set instanceof Map) set.forEach(function (value, key) { + this.set(key, value); + }, this);else if (Array.isArray(set)) set.forEach(function (kv) { + this.set(kv[0], kv[1]); + }, this);else throw new TypeError('invalid argument'); + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this; + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') fn.call(thisp, this._data[k].value, this._data[k].key); + }, this); +}; + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k); +}; + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k); + return res && res.value; +}; + +PseudoMap.prototype.set = function (k, v) { + set$1(this._data, k, v); +}; + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k); + + if (res) { + delete this._data[res._index]; + this._data.size--; + } +}; + +PseudoMap.prototype.clear = function () { + var data = Object.create(null); + data.size = 0; + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }); +}; + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function get() { + return this._data.size; + }, + set: function set(n) {}, + enumerable: true, + configurable: true +}); + +PseudoMap.prototype.values = PseudoMap.prototype.keys = PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version'); +}; // Either identical, or both NaN + + +function same(a, b) { + return a === b || a !== a && b !== b; +} + +function Entry$1(k, v, i) { + this.key = k; + this.value = v; + this._index = i; +} + +function find(data, k) { + for (var i = 0, s = '_' + k, key = s; hasOwnProperty$1.call(data, key); key = s + i++) { + if (same(data[key].key, k)) return data[key]; + } +} + +function set$1(data, k, v) { + for (var i = 0, s = '_' + k, key = s; hasOwnProperty$1.call(data, key); key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v; + return; + } + } + + data.size++; + data[key] = new Entry$1(k, v, key); +} + +var map$1 = createCommonjsModule(function (module) { + if (process.env.npm_package_name === 'pseudomap' && process.env.npm_lifecycle_script === 'test') process.env.TEST_PSEUDOMAP = 'true'; + + if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map; + } else { + module.exports = pseudomap; + } +}); + +var yallist = Yallist; +Yallist.Node = Node; +Yallist.create = Yallist; + +function Yallist(list) { + var self = this; + + if (!(self instanceof Yallist)) { + self = new Yallist(); + } + + self.tail = null; + self.head = null; + self.length = 0; + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item); + }); + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]); + } + } + + return self; +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list'); + } + + var next = node.next; + var prev = node.prev; + + if (next) { + next.prev = prev; + } + + if (prev) { + prev.next = next; + } + + if (node === this.head) { + this.head = next; + } + + if (node === this.tail) { + this.tail = prev; + } + + node.list.length--; + node.next = null; + node.prev = null; + node.list = null; +}; + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return; + } + + if (node.list) { + node.list.removeNode(node); + } + + var head = this.head; + node.list = this; + node.next = head; + + if (head) { + head.prev = node; + } + + this.head = node; + + if (!this.tail) { + this.tail = node; + } + + this.length++; +}; + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return; + } + + if (node.list) { + node.list.removeNode(node); + } + + var tail = this.tail; + node.list = this; + node.prev = tail; + + if (tail) { + tail.next = node; + } + + this.tail = node; + + if (!this.head) { + this.head = node; + } + + this.length++; +}; + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]); + } + + return this.length; +}; + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]); + } + + return this.length; +}; + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined; + } + + var res = this.tail.value; + this.tail = this.tail.prev; + + if (this.tail) { + this.tail.next = null; + } else { + this.head = null; + } + + this.length--; + return res; +}; + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined; + } + + var res = this.head.value; + this.head = this.head.next; + + if (this.head) { + this.head.prev = null; + } else { + this.tail = null; + } + + this.length--; + return res; +}; + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this; + + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this); + walker = walker.next; + } +}; + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this; + + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this); + walker = walker.prev; + } +}; + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next; + } + + if (i === n && walker !== null) { + return walker.value; + } +}; + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev; + } + + if (i === n && walker !== null) { + return walker.value; + } +}; + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.next; + } + + return res; +}; + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.prev; + } + + return res; +}; + +Yallist.prototype.reduce = function (fn, initial) { + var acc; + var walker = this.head; + + if (arguments.length > 1) { + acc = initial; + } else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } else { + throw new TypeError('Reduce of empty list with no initial value'); + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i); + walker = walker.next; + } + + return acc; +}; + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc; + var walker = this.tail; + + if (arguments.length > 1) { + acc = initial; + } else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else { + throw new TypeError('Reduce of empty list with no initial value'); + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i); + walker = walker.prev; + } + + return acc; +}; + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length); + + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.next; + } + + return arr; +}; + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length); + + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + + return arr; +}; + +Yallist.prototype.slice = function (from, to) { + to = to || this.length; + + if (to < 0) { + to += this.length; + } + + from = from || 0; + + if (from < 0) { + from += this.length; + } + + var ret = new Yallist(); + + if (to < from || to < 0) { + return ret; + } + + if (from < 0) { + from = 0; + } + + if (to > this.length) { + to = this.length; + } + + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next; + } + + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value); + } + + return ret; +}; + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length; + + if (to < 0) { + to += this.length; + } + + from = from || 0; + + if (from < 0) { + from += this.length; + } + + var ret = new Yallist(); + + if (to < from || to < 0) { + return ret; + } + + if (from < 0) { + from = 0; + } + + if (to > this.length) { + to = this.length; + } + + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev; + } + + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value); + } + + return ret; +}; + +Yallist.prototype.reverse = function () { + var head = this.head; + var tail = this.tail; + + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + + this.head = tail; + this.tail = head; + return this; +}; + +function push(self, item) { + self.tail = new Node(item, self.tail, null, self); + + if (!self.head) { + self.head = self.tail; + } + + self.length++; +} + +function unshift(self, item) { + self.head = new Node(item, null, self.head, self); + + if (!self.tail) { + self.tail = self.head; + } + + self.length++; +} + +function Node(value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list); + } + + this.list = list; + this.value = value; + + if (prev) { + prev.next = this; + this.prev = prev; + } else { + this.prev = null; + } + + if (next) { + next.prev = this; + this.next = next; + } else { + this.next = null; + } +} + +var lruCache = LRUCache; // This will be a proper iterable 'Map' in engines that support it, +// or a fakey-fake PseudoMap in older versions. +// A linked list to keep track of recently-used-ness +// use symbols if possible, otherwise just _props + +var hasSymbol = typeof Symbol === 'function'; +var makeSymbol; + +if (hasSymbol) { + makeSymbol = function makeSymbol(key) { + return Symbol(key); + }; +} else { + makeSymbol = function makeSymbol(key) { + return '_' + key; + }; +} + +var MAX = makeSymbol('max'); +var LENGTH = makeSymbol('length'); +var LENGTH_CALCULATOR = makeSymbol('lengthCalculator'); +var ALLOW_STALE = makeSymbol('allowStale'); +var MAX_AGE = makeSymbol('maxAge'); +var DISPOSE = makeSymbol('dispose'); +var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet'); +var LRU_LIST = makeSymbol('lruList'); +var CACHE = makeSymbol('cache'); + +function naiveLength() { + return 1; +} // lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. + + +function LRUCache(options) { + if (!(this instanceof LRUCache)) { + return new LRUCache(options); + } + + if (typeof options === 'number') { + options = { + max: options + }; + } + + if (!options) { + options = {}; + } + + var max = this[MAX] = options.max; // Kind of weird to have a default max of Infinity, but oh well. + + if (!max || !(typeof max === 'number') || max <= 0) { + this[MAX] = Infinity; + } + + var lc = options.length || naiveLength; + + if (typeof lc !== 'function') { + lc = naiveLength; + } + + this[LENGTH_CALCULATOR] = lc; + this[ALLOW_STALE] = options.stale || false; + this[MAX_AGE] = options.maxAge || 0; + this[DISPOSE] = options.dispose; + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; + this.reset(); +} // resize the cache when the max changes. + + +Object.defineProperty(LRUCache.prototype, 'max', { + set: function set(mL) { + if (!mL || !(typeof mL === 'number') || mL <= 0) { + mL = Infinity; + } + + this[MAX] = mL; + trim$2(this); + }, + get: function get() { + return this[MAX]; + }, + enumerable: true +}); +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function set(allowStale) { + this[ALLOW_STALE] = !!allowStale; + }, + get: function get() { + return this[ALLOW_STALE]; + }, + enumerable: true +}); +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function set(mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0; + } + + this[MAX_AGE] = mA; + trim$2(this); + }, + get: function get() { + return this[MAX_AGE]; + }, + enumerable: true +}); // resize the cache when the lengthCalculator changes. + +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function set(lC) { + if (typeof lC !== 'function') { + lC = naiveLength; + } + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC; + this[LENGTH] = 0; + this[LRU_LIST].forEach(function (hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); + this[LENGTH] += hit.length; + }, this); + } + + trim$2(this); + }, + get: function get() { + return this[LENGTH_CALCULATOR]; + }, + enumerable: true +}); +Object.defineProperty(LRUCache.prototype, 'length', { + get: function get() { + return this[LENGTH]; + }, + enumerable: true +}); +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function get() { + return this[LRU_LIST].length; + }, + enumerable: true +}); + +LRUCache.prototype.rforEach = function (fn, thisp) { + thisp = thisp || this; + + for (var walker = this[LRU_LIST].tail; walker !== null;) { + var prev = walker.prev; + forEachStep(this, fn, walker, thisp); + walker = prev; + } +}; + +function forEachStep(self, fn, node, thisp) { + var hit = node.value; + + if (isStale(self, hit)) { + del$1(self, node); + + if (!self[ALLOW_STALE]) { + hit = undefined; + } + } + + if (hit) { + fn.call(thisp, hit.value, hit.key, self); + } +} + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this; + + for (var walker = this[LRU_LIST].head; walker !== null;) { + var next = walker.next; + forEachStep(this, fn, walker, thisp); + walker = next; + } +}; + +LRUCache.prototype.keys = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.key; + }, this); +}; + +LRUCache.prototype.values = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.value; + }, this); +}; + +LRUCache.prototype.reset = function () { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { + this[LRU_LIST].forEach(function (hit) { + this[DISPOSE](hit.key, hit.value); + }, this); + } + + this[CACHE] = new map$1(); // hash of items by key + + this[LRU_LIST] = new yallist(); // list of items in order of use recency + + this[LENGTH] = 0; // length of items in the list +}; + +LRUCache.prototype.dump = function () { + return this[LRU_LIST].map(function (hit) { + if (!isStale(this, hit)) { + return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }; + } + }, this).toArray().filter(function (h) { + return h; + }); +}; + +LRUCache.prototype.dumpLru = function () { + return this[LRU_LIST]; +}; + +LRUCache.prototype.inspect = function (n, opts) { + var str = 'LRUCache {'; + var extras = false; + var as = this[ALLOW_STALE]; + + if (as) { + str += '\n allowStale: true'; + extras = true; + } + + var max = this[MAX]; + + if (max && max !== Infinity) { + if (extras) { + str += ','; + } + + str += '\n max: ' + util.inspect(max, opts); + extras = true; + } + + var maxAge = this[MAX_AGE]; + + if (maxAge) { + if (extras) { + str += ','; + } + + str += '\n maxAge: ' + util.inspect(maxAge, opts); + extras = true; + } + + var lc = this[LENGTH_CALCULATOR]; + + if (lc && lc !== naiveLength) { + if (extras) { + str += ','; + } + + str += '\n length: ' + util.inspect(this[LENGTH], opts); + extras = true; + } + + var didFirst = false; + this[LRU_LIST].forEach(function (item) { + if (didFirst) { + str += ',\n '; + } else { + if (extras) { + str += ',\n'; + } + + didFirst = true; + str += '\n '; + } + + var key = util.inspect(item.key).split('\n').join('\n '); + var val = { + value: item.value + }; + + if (item.maxAge !== maxAge) { + val.maxAge = item.maxAge; + } + + if (lc !== naiveLength) { + val.length = item.length; + } + + if (isStale(this, item)) { + val.stale = true; + } + + val = util.inspect(val, opts).split('\n').join('\n '); + str += key + ' => ' + val; + }); + + if (didFirst || extras) { + str += '\n'; + } + + str += '}'; + return str; +}; + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE]; + var now = maxAge ? Date.now() : 0; + var len = this[LENGTH_CALCULATOR](value, key); + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del$1(this, this[CACHE].get(key)); + return false; + } + + var node = this[CACHE].get(key); + var item = node.value; // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key, item.value); + } + } + + item.now = now; + item.maxAge = maxAge; + item.value = value; + this[LENGTH] += len - item.length; + item.length = len; + this.get(key); + trim$2(this); + return true; + } + + var hit = new Entry(key, value, len, now, maxAge); // oversized objects fall out of cache automatically. + + if (hit.length > this[MAX]) { + if (this[DISPOSE]) { + this[DISPOSE](key, value); + } + + return false; + } + + this[LENGTH] += hit.length; + this[LRU_LIST].unshift(hit); + this[CACHE].set(key, this[LRU_LIST].head); + trim$2(this); + return true; +}; + +LRUCache.prototype.has = function (key) { + if (!this[CACHE].has(key)) return false; + var hit = this[CACHE].get(key).value; + + if (isStale(this, hit)) { + return false; + } + + return true; +}; + +LRUCache.prototype.get = function (key) { + return get(this, key, true); +}; + +LRUCache.prototype.peek = function (key) { + return get(this, key, false); +}; + +LRUCache.prototype.pop = function () { + var node = this[LRU_LIST].tail; + if (!node) return null; + del$1(this, node); + return node.value; +}; + +LRUCache.prototype.del = function (key) { + del$1(this, this[CACHE].get(key)); +}; + +LRUCache.prototype.load = function (arr) { + // reset the cache + this.reset(); + var now = Date.now(); // A previous serialized cache has the most recent items first + + for (var l = arr.length - 1; l >= 0; l--) { + var hit = arr[l]; + var expiresAt = hit.e || 0; + + if (expiresAt === 0) { + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v); + } else { + var maxAge = expiresAt - now; // dont add already expired items + + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge); + } + } + } +}; + +LRUCache.prototype.prune = function () { + var self = this; + this[CACHE].forEach(function (value, key) { + get(self, key, false); + }); +}; + +function get(self, key, doUse) { + var node = self[CACHE].get(key); + + if (node) { + var hit = node.value; + + if (isStale(self, hit)) { + del$1(self, node); + if (!self[ALLOW_STALE]) hit = undefined; + } else { + if (doUse) { + self[LRU_LIST].unshiftNode(node); + } + } + + if (hit) hit = hit.value; + } + + return hit; +} + +function isStale(self, hit) { + if (!hit || !hit.maxAge && !self[MAX_AGE]) { + return false; + } + + var stale = false; + var diff = Date.now() - hit.now; + + if (hit.maxAge) { + stale = diff > hit.maxAge; + } else { + stale = self[MAX_AGE] && diff > self[MAX_AGE]; + } + + return stale; +} + +function trim$2(self) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + var prev = walker.prev; + del$1(self, walker); + walker = prev; + } + } +} + +function del$1(self, node) { + if (node) { + var hit = node.value; + + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value); + } + + self[LENGTH] -= hit.length; + self[CACHE].delete(hit.key); + self[LRU_LIST].removeNode(node); + } +} // classy, since V8 prefers predictable objects. + + +function Entry(key, value, length, now, maxAge) { + this.key = key; + this.value = value; + this.length = length; + this.now = now; + this.maxAge = maxAge || 0; +} + +var sigmund_1 = sigmund; + +function sigmund(subject, maxSessions) { + maxSessions = maxSessions || 10; + var notes = []; + var analysis = ''; + var RE = RegExp; + + function psychoAnalyze(subject, session) { + if (session > maxSessions) return; + + if (typeof subject === 'function' || typeof subject === 'undefined') { + return; + } + + if (typeof subject !== 'object' || !subject || subject instanceof RE) { + analysis += subject; + return; + } + + if (notes.indexOf(subject) !== -1 || session === maxSessions) return; + notes.push(subject); + analysis += '{'; + Object.keys(subject).forEach(function (issue, _, __) { + // pseudo-private values. skip those. + if (issue.charAt(0) === '_') return; + var to = typeof subject[issue]; + if (to === 'function' || to === 'undefined') return; + analysis += issue; + psychoAnalyze(subject[issue], session + 1); + }); + } + + psychoAnalyze(subject, 0); + return analysis; +} // vim: set softtabstop=4 shiftwidth=4: + +var fnmatch = createCommonjsModule(function (module, exports) { + // Based on minimatch.js by isaacs + var platform = typeof process === "object" ? process.platform : "win32"; + if (module) module.exports = minimatch;else exports.minimatch = minimatch; + minimatch.Minimatch = Minimatch; + var cache = minimatch.cache = new lruCache({ + max: 100 + }), + GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var qmark = "[^/]" // * => any number of characters + , + star = qmark + "*?" // ** when dots are allowed. Anything goes, except .. and . + // not (^ or / followed by one or two dots followed by $ or /), + // followed by anything, any number of times. + , + twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" // not a ^ or / followed by a dot, + // followed by anything, any number of times. + , + twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" // characters that need to be escaped in RegExp. + , + reSpecials = charSet("().*{}+?[]^$\\!"); // "abc" -> { a:true, b:true, c:true } + + function charSet(s) { + return s.split("").reduce(function (set, c) { + set[c] = true; + return set; + }, {}); + } // normalizes slashes. + + + var slashSplit = /\/+/; + minimatch.monkeyPatch = monkeyPatch; + + function monkeyPatch() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "match"); + var orig = desc.value; + + desc.value = function (p) { + if (p instanceof Minimatch) return p.match(this); + return orig.call(this, p); + }; + + Object.defineProperty(String.prototype, desc); + } + + minimatch.filter = filter; + + function filter(pattern, options) { + options = options || {}; + return function (p, i, list) { + return minimatch(p, pattern, options); + }; + } + + function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function (k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function (k) { + t[k] = a[k]; + }); + return t; + } + + minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch; + var orig = minimatch; + + var m = function minimatch(p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)); + }; + + m.Minimatch = function Minimatch(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + + return m; + }; + + Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch; + return minimatch.defaults(def).Minimatch; + }; + + function minimatch(p, pattern, options) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + + if (!options) options = {}; // shortcut: comments match nothing. + + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } // "" only matches "" + + + if (pattern.trim() === "") return p === ""; + return new Minimatch(pattern, options).match(p); + } + + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options, cache); + } + + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + + if (!options) options = {}; // windows: need to use /, not \ + // On other platforms, \ is a valid (albeit bad) filename char. + + if (platform === "win32") { + pattern = pattern.split("\\").join("/"); + } // lru storage. + // these things aren't particularly big, but walking down the string + // and turning it into a regexp can get pretty costly. + + + var cacheKey = pattern + "\n" + sigmund_1(options); + var cached = minimatch.cache.get(cacheKey); + if (cached) return cached; + minimatch.cache.set(cacheKey, this); + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; // make the set of regexps etc. + + this.make(); + } + + Minimatch.prototype.make = make; + + function make() { + // don't do it more than once. + if (this._made) return; + var pattern = this.pattern; + var options = this.options; // empty patterns and comments match nothing. + + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + + if (!pattern) { + this.empty = true; + return; + } // step 1: figure out negation, etc. + + + this.parseNegate(); // step 2: expand braces + + var set = this.globSet = this.braceExpand(); + if (options.debug) console.error(this.pattern, set); // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + + set = this.globParts = set.map(function (s) { + return s.split(slashSplit); + }); + if (options.debug) console.error(this.pattern, set); // glob --> regexps + + set = set.map(function (s, si, set) { + return s.map(this.parse, this); + }, this); + if (options.debug) console.error(this.pattern, set); // filter out everything that didn't compile properly. + + set = set.filter(function (s) { + return -1 === s.indexOf(false); + }); + if (options.debug) console.error(this.pattern, set); + this.set = set; + } + + Minimatch.prototype.parseNegate = parseNegate; + + function parseNegate() { + var pattern = this.pattern, + negate = false, + options = this.options, + negateOffset = 0; + if (options.nonegate) return; + + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } // Brace expansion: + // a{b,c}d -> abd acd + // a{b,}c -> abc ac + // a{0..3}d -> a0d a1d a2d a3d + // a{b,c{d,e}f}g -> abg acdfg acefg + // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg + // + // Invalid sets are not expanded. + // a{2..}b -> a{2..}b + // a{b}c -> a{b}c + + + minimatch.braceExpand = function (pattern, options) { + return new Minimatch(pattern, options).braceExpand(); + }; + + Minimatch.prototype.braceExpand = braceExpand; + + function braceExpand(pattern, options) { + options = options || this.options; + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + + if (typeof pattern === "undefined") { + throw new Error("undefined pattern"); + } + + if (options.nobrace || !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern]; + } + + var escaping = false; // examples and comments refer to this crazy pattern: + // a{b,c{d,e},{f,g}h}x{y,z} + // expected: + // abxy + // abxz + // acdxy + // acdxz + // acexy + // acexz + // afhxy + // afhxz + // aghxy + // aghxz + // everything before the first \{ is just a prefix. + // So, we pluck that off, and work with the rest, + // and then prepend it to everything we find. + + if (pattern.charAt(0) !== "{") { + // console.error(pattern) + var prefix = null; + + for (var i = 0, l = pattern.length; i < l; i++) { + var c = pattern.charAt(i); // console.error(i, c) + + if (c === "\\") { + escaping = !escaping; + } else if (c === "{" && !escaping) { + prefix = pattern.substr(0, i); + break; + } + } // actually no sets, all { were escaped. + + + if (prefix === null) { + // console.error("no sets") + return [pattern]; + } + + var tail = braceExpand(pattern.substr(i), options); + return tail.map(function (t) { + return prefix + t; + }); + } // now we have something like: + // {b,c{d,e},{f,g}h}x{y,z} + // walk through the set, expanding each part, until + // the set ends. then, we'll expand the suffix. + // If the set only has a single member, then'll put the {} back + // first, handle numeric sets, since they're easier + + + var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/); + + if (numset) { + // console.error("numset", numset[1], numset[2]) + var suf = braceExpand(pattern.substr(numset[0].length), options), + start = +numset[1], + end = +numset[2], + inc = start > end ? -1 : 1, + set = []; + + for (var i = start; i != end + inc; i += inc) { + // append all the suffixes + for (var ii = 0, ll = suf.length; ii < ll; ii++) { + set.push(i + suf[ii]); + } + } + + return set; + } // ok, walk through the set + // We hope, somewhat optimistically, that there + // will be a } at the end. + // If the closing brace isn't found, then the pattern is + // interpreted as braceExpand("\\" + pattern) so that + // the leading \{ will be interpreted literally. + + + var i = 1 // skip the \{ + , + depth = 1, + set = [], + member = "", + sawEnd = false, + escaping = false; + + function addMember() { + set.push(member); + member = ""; + } // console.error("Entering for") + + + FOR: for (i = 1, l = pattern.length; i < l; i++) { + var c = pattern.charAt(i); // console.error("", i, c) + + if (escaping) { + escaping = false; + member += "\\" + c; + } else { + switch (c) { + case "\\": + escaping = true; + continue; + + case "{": + depth++; + member += "{"; + continue; + + case "}": + depth--; // if this closes the actual set, then we're done + + if (depth === 0) { + addMember(); // pluck off the close-brace + + i++; + break FOR; + } else { + member += c; + continue; + } + + case ",": + if (depth === 1) { + addMember(); + } else { + member += c; + } + + continue; + + default: + member += c; + continue; + } // switch + + } // else + + } // for + // now we've either finished the set, and the suffix is + // pattern.substr(i), or we have *not* closed the set, + // and need to escape the leading brace + + + if (depth !== 0) { + // console.error("didn't close", pattern) + return braceExpand("\\" + pattern, options); + } // x{y,z} -> ["xy", "xz"] + // console.error("set", set) + // console.error("suffix", pattern.substr(i)) + + + var suf = braceExpand(pattern.substr(i), options); // ["b", "c{d,e}","{f,g}h"] -> + // [["b"], ["cd", "ce"], ["fh", "gh"]] + + var addBraces = set.length === 1; // console.error("set pre-expanded", set) + + set = set.map(function (p) { + return braceExpand(p, options); + }); // console.error("set expanded", set) + // [["b"], ["cd", "ce"], ["fh", "gh"]] -> + // ["b", "cd", "ce", "fh", "gh"] + + set = set.reduce(function (l, r) { + return l.concat(r); + }); + + if (addBraces) { + set = set.map(function (s) { + return "{" + s + "}"; + }); + } // now attach the suffixes. + + + var ret = []; + + for (var i = 0, l = set.length; i < l; i++) { + for (var ii = 0, ll = suf.length; ii < ll; ii++) { + ret.push(set[i] + suf[ii]); + } + } + + return ret; + } // parse a component of the expanded set. + // At this point, no pattern may contain "/" in it + // so we're going to return a 2d array, where each entry is the full + // pattern, split on '/', and then turned into a regular expression. + // A regexp is made at the end which joins each array with an + // escaped /, and another full one which joins each regexp with |. + // + // Following the lead of Bash 4.1, note that "**" only has special meaning + // when it is the *only* thing in a path portion. Otherwise, any series + // of * is equivalent to a single *. Globstar behavior is enabled by + // default, and can be disabled by setting options.noglobstar. + + + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + + function parse(pattern, isSub) { + var options = this.options; // shortcuts + + if (!options.noglobstar && pattern === "**") return GLOBSTAR; + if (pattern === "") return ""; + var re = "", + hasMagic = !!options.nocase, + escaping = false // ? => one single character + , + patternListStack = [], + plType, + stateChar, + inClass = false, + reClassStart = -1, + classStart = -1 // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + , + patternStart = pattern.charAt(0) === "." ? "" // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" : "(?!\\.)"; + + function clearStateChar() { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + + case "?": + re += qmark; + hasMagic = true; + break; + + default: + re += "\\" + stateChar; + break; + } + + stateChar = false; + } + } + + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + if (options.debug) { + console.error("%s\t%s %s %j", pattern, i, re, c); + } // skip over any that are escaped. + + + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + + SWITCH: switch (c) { + case "/": + // completely not allowed, even escaped. + // Should already be path-split by now. + return false; + + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + + case "?": + case "*": + case "+": + case "@": + case "!": + if (options.debug) { + console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c); + } // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + + + if (inClass) { + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + + + clearStateChar(); + stateChar = c; // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + + if (options.noext) clearStateChar(); + continue; + + case "(": + if (inClass) { + re += "("; + continue; + } + + if (!stateChar) { + re += "\\("; + continue; + } + + plType = stateChar; + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }); // negation is (?:(?!js)[^/]*) + + re += stateChar === "!" ? "(?:(?!" : "(?:"; + stateChar = false; + continue; + + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + + hasMagic = true; + re += ")"; + plType = patternListStack.pop().type; // negation is (?:(?!js)[^/]*) + // The others are (?:) + + switch (plType) { + case "!": + re += "[^/]*?)"; + break; + + case "?": + case "+": + case "*": + re += plType; + + case "@": + break; + // the default anyway + } + + continue; + + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + + re += "|"; + continue; + // these are mostly the same in regexp and glob + + case "[": + // swallow any state-tracking char before the [ + clearStateChar(); + + if (inClass) { + re += "\\" + c; + continue; + } + + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + + case "]": + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } // finish up the class. + + + hasMagic = true; + inClass = false; + re += c; + continue; + + default: + // swallow any state char that wasn't consumed + clearStateChar(); + + if (escaping) { + // no need + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + + re += c; + } // switch + + } // for + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + + + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + var cs = pattern.substr(classStart + 1), + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + + + var pl; + + while (pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3); // maybe some even number of \, then maybe 1 \, followed by a | + + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = "\\"; + } // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + + + return $1 + $1 + $2 + "|"; + }); // console.error("tail=%j\n %s", tail, tail) + + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } // handle trailing things that only matter at the very end. + + + clearStateChar(); + + if (escaping) { + // trailing \\ + re += "\\\\"; + } // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + + + var addPatternStart = false; + + switch (re.charAt(0)) { + case ".": + case "[": + case "(": + addPatternStart = true; + } // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + + + if (re !== "" && hasMagic) re = "(?=.)" + re; + if (addPatternStart) re = patternStart + re; // parsing just a piece of a larger pattern. + + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + + + if (!hasMagic) { + return globUnescape(pattern); + } + + var flags = options.nocase ? "i" : "", + regExp = new RegExp("^" + re + "$", flags); + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + + minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + + Minimatch.prototype.makeRe = makeRe; + + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + + var set = this.set; + if (!set.length) return this.regexp = false; + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot, + flags = options.nocase ? "i" : ""; + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\\/"); + }).join("|"); // must match entire pattern + // ending in a * or ** will make it less strict. + + re = "^(?:" + re + ")$"; // can match anything, as long as it's not this. + + if (this.negate) re = "^(?!" + re + ").*$"; + + try { + return this.regexp = new RegExp(re, flags); + } catch (ex) { + return this.regexp = false; + } + } + + minimatch.match = function (list, pattern, options) { + var mm = new Minimatch(pattern, options); + list = list.filter(function (f) { + return mm.match(f); + }); + + if (options.nonull && !list.length) { + list.push(pattern); + } + + return list; + }; + + Minimatch.prototype.match = match; + + function match(f, partial) { + // console.error("match", f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; // windows: need to use /, not \ + // On other platforms, \ is a valid (albeit bad) filename char. + + if (platform === "win32") { + f = f.split("\\").join("/"); + } // treat the test path as a set of pathparts. + + + f = f.split(slashSplit); + + if (options.debug) { + console.error(this.pattern, "split", f); + } // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + + var set = this.set; // console.error(this.pattern, "set", set) + + for (var i = 0, l = set.length; i < l; i++) { + var pattern = set[i]; + var hit = this.matchOne(f, pattern, partial); + + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + + + if (options.flipNegate) return false; + return this.negate; + } // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + + + Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options; + + if (options.debug) { + console.error("matchOne", { + "this": this, + file: file, + pattern: pattern + }); + } + + if (options.matchBase && pattern.length === 1) { + file = path.basename(file.join("/")).split("/"); + } + + if (options.debug) { + console.error("matchOne", file.length, pattern.length); + } + + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + if (options.debug) { + console.error("matchOne loop"); + } + + var p = pattern[pi], + f = file[fi]; + + if (options.debug) { + console.error(pattern, p, f); + } // should be impossible. + // some invalid regexp stuff in the set. + + + if (p === false) return false; + + if (p === GLOBSTAR) { + if (options.debug) console.error('GLOBSTAR', [pattern, p, f]); // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + + var fr = fi, + pr = pi + 1; + + if (pr === pl) { + if (options.debug) console.error('** at the end'); // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + + return true; + } // ok, let's see if we can swallow whatever we can. + + + WHILE: while (fr < fl) { + var swallowee = file[fr]; + + if (options.debug) { + console.error('\nglobstar while', file, fr, pattern, pr, swallowee); + } // XXX remove this slice. Just pass the start index. + + + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + if (options.debug) console.error('globstar found match!', fr, fl, swallowee); // found a match. + + return true; + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + if (options.debug) console.error("dot detected!", file, fr, pattern, pr); + break WHILE; + } // ** swallows a segment, and continue. + + + if (options.debug) console.error('globstar swallow a segment, and continue'); + fr++; + } + } // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + + + if (partial) { + // ran out of file + // console.error("\n>>> no match, partial?", file, fr, pattern, pr) + if (fr === fl) return true; + } + + return false; + } // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + + + var hit; + + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + + if (options.debug) { + console.error("string match", p, f, hit); + } + } else { + hit = f.match(p); + + if (options.debug) { + console.error("pattern match", p, f, hit); + } + } + + if (!hit) return false; + } // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + // now either we fell off the end of the pattern, or we're done. + + + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true; + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial; + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = fi === fl - 1 && file[fi] === ""; + return emptyFileEnd; + } // should be unreachable. + + + throw new Error("wtf?"); + }; // replace stuff like \* with * + + + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } +}); + +var ini = createCommonjsModule(function (module, exports) { + "use strict"; // Based on iniparser by shockie + + var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + var __generator = commonjsGlobal && commonjsGlobal.__generator || function (thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } + }; + + var __importStar = commonjsGlobal && commonjsGlobal.__importStar || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) { + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var fs$$2 = __importStar(fs); + /** + * define the possible values: + * section: [section] + * param: key=value + * comment: ;this is a comment + */ + + + var regex = { + section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/, + param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/, + comment: /^\s*[#;].*$/ + }; + /** + * Parses an .ini file + * @param file The location of the .ini file + */ + + function parse(file) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , new Promise(function (resolve, reject) { + fs$$2.readFile(file, 'utf8', function (err, data) { + if (err) { + reject(err); + return; + } + + resolve(parseString(data)); + }); + })]; + }); + }); + } + + exports.parse = parse; + + function parseSync(file) { + return parseString(fs$$2.readFileSync(file, 'utf8')); + } + + exports.parseSync = parseSync; + + function parseString(data) { + var sectionBody = {}; + var sectionName = null; + var value = [[sectionName, sectionBody]]; + var lines = data.split(/\r\n|\r|\n/); + lines.forEach(function (line) { + var match; + + if (regex.comment.test(line)) { + return; + } + + if (regex.param.test(line)) { + match = line.match(regex.param); + sectionBody[match[1]] = match[2]; + } else if (regex.section.test(line)) { + match = line.match(regex.section); + sectionName = match[1]; + sectionBody = {}; + value.push([sectionName, sectionBody]); + } + }); + return value; + } + + exports.parseString = parseString; +}); +unwrapExports(ini); + +var name$17 = "editorconfig"; +var version$3 = "0.15.2"; +var description$1 = "EditorConfig File Locator and Interpreter for Node.js"; +var keywords = ["editorconfig", "core"]; +var main$1 = "src/index.js"; +var contributors = ["Hong Xu (topbug.net)", "Jed Mao (https://github.com/jedmao/)", "Trey Hunner (http://treyhunner.com)"]; +var directories = { + "bin": "./bin", + "lib": "./lib" +}; +var scripts$1 = { + "clean": "rimraf dist", + "prebuild": "npm run clean", + "build": "tsc", + "pretest": "npm run lint && npm run build && npm run copy && cmake .", + "test": "ctest .", + "pretest:ci": "npm run pretest", + "test:ci": "ctest -VV --output-on-failure .", + "lint": "npm run eclint && npm run tslint", + "eclint": "eclint check --indent_size ignore \"src/**\"", + "tslint": "tslint --project tsconfig.json --exclude package.json", + "copy": "cpy .npmignore LICENSE README.md CHANGELOG.md dist && cpy bin/* dist/bin && cpy src/lib/fnmatch*.* dist/src/lib", + "prepub": "npm run lint && npm run build && npm run copy", + "pub": "npm publish ./dist" +}; +var repository$1 = { + "type": "git", + "url": "git://github.com/editorconfig/editorconfig-core-js.git" +}; +var bugs = "https://github.com/editorconfig/editorconfig-core-js/issues"; +var author$1 = "EditorConfig Team"; +var license$1 = "MIT"; +var dependencies$1 = { + "@types/node": "^10.11.7", + "@types/semver": "^5.5.0", + "commander": "^2.19.0", + "lru-cache": "^4.1.3", + "semver": "^5.6.0", + "sigmund": "^1.0.1" +}; +var devDependencies$1 = { + "@types/mocha": "^5.2.5", + "cpy-cli": "^2.0.0", + "eclint": "^2.8.0", + "mocha": "^5.2.0", + "rimraf": "^2.6.2", + "should": "^13.2.3", + "tslint": "^5.11.0", + "typescript": "^3.1.3" +}; +var _package$2 = { + name: name$17, + version: version$3, + description: description$1, + keywords: keywords, + main: main$1, + contributors: contributors, + directories: directories, + scripts: scripts$1, + repository: repository$1, + bugs: bugs, + author: author$1, + license: license$1, + dependencies: dependencies$1, + devDependencies: devDependencies$1 +}; + +var _package$3 = Object.freeze({ + name: name$17, + version: version$3, + description: description$1, + keywords: keywords, + main: main$1, + contributors: contributors, + directories: directories, + scripts: scripts$1, + repository: repository$1, + bugs: bugs, + author: author$1, + license: license$1, + dependencies: dependencies$1, + devDependencies: devDependencies$1, + default: _package$2 +}); + +var require$$4$6 = ( _package$3 && _package$2 ) || _package$3; + +var src$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + var __generator = commonjsGlobal && commonjsGlobal.__generator || function (thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } + }; + + var __importStar = commonjsGlobal && commonjsGlobal.__importStar || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) { + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + + var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod + }; + }; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var fs$$2 = __importStar(fs); + + var path$$2 = __importStar(path); + + var semver = __importStar(semver$3); + + var fnmatch_1 = __importDefault(fnmatch); + + exports.parseString = ini.parseString; + + var package_json_1 = __importDefault(require$$4$6); + + var knownProps = { + end_of_line: true, + indent_style: true, + indent_size: true, + insert_final_newline: true, + trim_trailing_whitespace: true, + charset: true + }; + + function fnmatch$$1(filepath, glob) { + var matchOptions = { + matchBase: true, + dot: true, + noext: true + }; + glob = glob.replace(/\*\*/g, '{*,**/**/**}'); + return fnmatch_1.default(filepath, glob, matchOptions); + } + + function getConfigFileNames(filepath, options) { + var paths = []; + + do { + filepath = path$$2.dirname(filepath); + paths.push(path$$2.join(filepath, options.config)); + } while (filepath !== options.root); + + return paths; + } + + function processMatches(matches, version) { + // Set indent_size to 'tab' if indent_size is unspecified and + // indent_style is set to 'tab'. + if ('indent_style' in matches && matches.indent_style === 'tab' && !('indent_size' in matches) && semver.gte(version, '0.10.0')) { + matches.indent_size = 'tab'; + } // Set tab_width to indent_size if indent_size is specified and + // tab_width is unspecified + + + if ('indent_size' in matches && !('tab_width' in matches) && matches.indent_size !== 'tab') { + matches.tab_width = matches.indent_size; + } // Set indent_size to tab_width if indent_size is 'tab' + + + if ('indent_size' in matches && 'tab_width' in matches && matches.indent_size === 'tab') { + matches.indent_size = matches.tab_width; + } + + return matches; + } + + function processOptions(options, filepath) { + if (options === void 0) { + options = {}; + } + + return { + config: options.config || '.editorconfig', + version: options.version || package_json_1.default.version, + root: path$$2.resolve(options.root || path$$2.parse(filepath).root) + }; + } + + function buildFullGlob(pathPrefix, glob) { + switch (glob.indexOf('/')) { + case -1: + glob = '**/' + glob; + break; + + case 0: + glob = glob.substring(1); + break; + + default: + break; + } + + return path$$2.join(pathPrefix, glob); + } + + function extendProps(props, options) { + if (props === void 0) { + props = {}; + } + + if (options === void 0) { + options = {}; + } + + for (var key in options) { + if (options.hasOwnProperty(key)) { + var value = options[key]; + var key2 = key.toLowerCase(); + var value2 = value; + + if (knownProps[key2]) { + value2 = value.toLowerCase(); + } + + try { + value2 = JSON.parse(value); + } catch (e) {} + + if (typeof value === 'undefined' || value === null) { + // null and undefined are values specific to JSON (no special meaning + // in editorconfig) & should just be returned as regular strings. + value2 = String(value); + } + + props[key2] = value2; + } + } + + return props; + } + + function parseFromConfigs(configs, filepath, options) { + return processMatches(configs.reverse().reduce(function (matches, file) { + var pathPrefix = path$$2.dirname(file.name); + file.contents.forEach(function (section) { + var glob = section[0]; + var options2 = section[1]; + + if (!glob) { + return; + } + + var fullGlob = buildFullGlob(pathPrefix, glob); + + if (!fnmatch$$1(filepath, fullGlob)) { + return; + } + + matches = extendProps(matches, options2); + }); + return matches; + }, {}), options.version); + } + + function getConfigsForFiles(files) { + var configs = []; + + for (var i in files) { + if (files.hasOwnProperty(i)) { + var file = files[i]; + var contents = ini.parseString(file.contents); + configs.push({ + name: file.name, + contents: contents + }); + + if ((contents[0][1].root || '').toLowerCase() === 'true') { + break; + } + } + } + + return configs; + } + + function readConfigFiles(filepaths) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , Promise.all(filepaths.map(function (name) { + return new Promise(function (resolve) { + fs$$2.readFile(name, 'utf8', function (err, data) { + resolve({ + name: name, + contents: err ? '' : data + }); + }); + }); + }))]; + }); + }); + } + + function readConfigFilesSync(filepaths) { + var files = []; + var file; + filepaths.forEach(function (filepath) { + try { + file = fs$$2.readFileSync(filepath, 'utf8'); + } catch (e) { + file = ''; + } + + files.push({ + name: filepath, + contents: file + }); + }); + return files; + } + + function opts(filepath, options) { + if (options === void 0) { + options = {}; + } + + var resolvedFilePath = path$$2.resolve(filepath); + return [resolvedFilePath, processOptions(options, resolvedFilePath)]; + } + + function parseFromFiles(filepath, files, options) { + if (options === void 0) { + options = {}; + } + + return __awaiter(this, void 0, void 0, function () { + var _a, resolvedFilePath, processedOptions; + + return __generator(this, function (_b) { + _a = opts(filepath, options), resolvedFilePath = _a[0], processedOptions = _a[1]; + return [2 + /*return*/ + , files.then(getConfigsForFiles).then(function (configs) { + return parseFromConfigs(configs, resolvedFilePath, processedOptions); + })]; + }); + }); + } + + exports.parseFromFiles = parseFromFiles; + + function parseFromFilesSync(filepath, files, options) { + if (options === void 0) { + options = {}; + } + + var _a = opts(filepath, options), + resolvedFilePath = _a[0], + processedOptions = _a[1]; + + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); + } + + exports.parseFromFilesSync = parseFromFilesSync; + + function parse(_filepath, _options) { + if (_options === void 0) { + _options = {}; + } + + return __awaiter(this, void 0, void 0, function () { + var _a, resolvedFilePath, processedOptions, filepaths; + + return __generator(this, function (_b) { + _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; + filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + return [2 + /*return*/ + , readConfigFiles(filepaths).then(getConfigsForFiles).then(function (configs) { + return parseFromConfigs(configs, resolvedFilePath, processedOptions); + })]; + }); + }); + } + + exports.parse = parse; + + function parseSync(_filepath, _options) { + if (_options === void 0) { + _options = {}; + } + + var _a = opts(_filepath, _options), + resolvedFilePath = _a[0], + processedOptions = _a[1]; + + var filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + var files = readConfigFilesSync(filepaths); + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); + } + + exports.parseSync = parseSync; +}); +unwrapExports(src$2); + +var editorconfigToPrettier = editorConfigToPrettier; + +function editorConfigToPrettier(editorConfig) { + if (!editorConfig || Object.keys(editorConfig).length === 0) { + return null; + } + + var result = {}; + + if (editorConfig.indent_style) { + result.useTabs = editorConfig.indent_style === "tab"; + } + + if (editorConfig.indent_size === "tab") { + result.useTabs = true; + } + + if (result.useTabs && editorConfig.tab_width) { + result.tabWidth = editorConfig.tab_width; + } else if (editorConfig.indent_style === "space" && editorConfig.indent_size && editorConfig.indent_size !== "tab") { + result.tabWidth = editorConfig.indent_size; + } else if (editorConfig.tab_width !== undefined) { + result.tabWidth = editorConfig.tab_width; + } + + if (editorConfig.max_line_length && editorConfig.max_line_length !== "off") { + result.printWidth = editorConfig.max_line_length; + } + + if (editorConfig.quote_type === "single") { + result.singleQuote = true; + } else if (editorConfig.quote_type === "double") { + result.singleQuote = false; + } + + if (["cr", "crlf", "lf"].indexOf(editorConfig.end_of_line) !== -1) { + result.endOfLine = editorConfig.end_of_line; + } + + return result; +} + +function markerExists(files, markers) { + return markers.some(function (marker) { + return files.some(function (file) { + return file === marker; + }); + }); +} + +function traverseFolder(directory, levels, markers) { + var files = fs.readdirSync(directory); + + if (levels === 0) { + return null; + } else if (markerExists(files, markers)) { + return directory; + } else { + return traverseFolder(path.resolve(directory, '..'), levels - 1, markers); + } +} + +var findProjectRoot = function findRoot(dir, opts) { + if (!dir) throw new Error("Directory not defined"); + opts = opts || {}; + var levels = opts.maxDepth || findRoot.MAX_DEPTH; + var markers = opts.markers || findRoot.MARKERS; + return traverseFolder(dir, levels, markers); +}; + +var MAX_DEPTH = 9; +var MARKERS = ['.git', '.hg']; +findProjectRoot.MAX_DEPTH = MAX_DEPTH; +findProjectRoot.MARKERS = MARKERS; + +var resolveConfigEditorconfig = createCommonjsModule(function (module) { + "use strict"; + + var maybeParse = function maybeParse(filePath, config, parse) { + var root = findProjectRoot(path.dirname(path.resolve(filePath))); + return filePath && parse(filePath, { + root + }); + }; + + var editorconfigAsyncNoCache = function editorconfigAsyncNoCache(filePath, config) { + return Promise.resolve(maybeParse(filePath, config, src$2.parse)).then(editorconfigToPrettier); + }; + + var editorconfigAsyncWithCache = mem(editorconfigAsyncNoCache); + + var editorconfigSyncNoCache = function editorconfigSyncNoCache(filePath, config) { + return editorconfigToPrettier(maybeParse(filePath, config, src$2.parseSync)); + }; + + var editorconfigSyncWithCache = mem(editorconfigSyncNoCache); + + function getLoadFunction(opts) { + if (!opts.editorconfig) { + return function () { + return null; + }; + } + + if (opts.sync) { + return opts.cache ? editorconfigSyncWithCache : editorconfigSyncNoCache; + } + + return opts.cache ? editorconfigAsyncWithCache : editorconfigAsyncNoCache; + } + + function clearCache() { + mem.clear(editorconfigSyncWithCache); + mem.clear(editorconfigAsyncWithCache); + } + + module.exports = { + getLoadFunction, + clearCache + }; +}); + +var ParserEND = 0x110000; + +var ParserError = +/*#__PURE__*/ +function (_Error) { + _inherits(ParserError, _Error); + + /* istanbul ignore next */ + function ParserError(msg, filename, linenumber) { + var _this; + + _classCallCheck(this, ParserError); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ParserError).call(this, '[ParserError] ' + msg, filename, linenumber)); + _this.code = 'ParserError'; + if (Error.captureStackTrace) Error.captureStackTrace(_assertThisInitialized(_assertThisInitialized(_this)), ParserError); + return _this; + } + + return ParserError; +}(_wrapNativeSuper(Error)); + +var State = function State(parser) { + _classCallCheck(this, State); + + this.parser = parser; + this.buf = ''; + this.returned = null; + this.result = null; + this.resultTable = null; + this.resultArr = null; +}; + +var Parser = +/*#__PURE__*/ +function () { + function Parser() { + _classCallCheck(this, Parser); + + this.pos = 0; + this.col = 0; + this.line = 0; + this.obj = {}; + this.ctx = this.obj; + this.stack = []; + this._buf = ''; + this.char = null; + this.ii = 0; + this.state = new State(this.parseStart); + } + + _createClass(Parser, [{ + key: "parse", + value: function parse(str) { + /* istanbul ignore next */ + if (str.length === 0 || str.length == null) return; + this._buf = String(str); + this.ii = -1; + this.char = -1; + var getNext; + + while (getNext === false || this.nextChar()) { + getNext = this.runOne(); + } + + this._buf = null; + } + }, { + key: "nextChar", + value: function nextChar() { + if (this.char === 0x0A) { + ++this.line; + this.col = -1; + } + + ++this.ii; + this.char = this._buf.codePointAt(this.ii); + ++this.pos; + ++this.col; + return this.haveBuffer(); + } + }, { + key: "haveBuffer", + value: function haveBuffer() { + return this.ii < this._buf.length; + } + }, { + key: "runOne", + value: function runOne() { + return this.state.parser.call(this, this.state.returned); + } + }, { + key: "finish", + value: function finish() { + this.char = ParserEND; + var last; + + do { + last = this.state.parser; + this.runOne(); + } while (this.state.parser !== last); + + this.ctx = null; + this.state = null; + this._buf = null; + return this.obj; + } + }, { + key: "next", + value: function next(fn) { + /* istanbul ignore next */ + if (typeof fn !== 'function') throw new ParserError('Tried to set state to non-existent state: ' + JSON.stringify(fn)); + this.state.parser = fn; + } + }, { + key: "goto", + value: function goto(fn) { + this.next(fn); + return this.runOne(); + } + }, { + key: "call", + value: function call(fn, returnWith) { + if (returnWith) this.next(returnWith); + this.stack.push(this.state); + this.state = new State(fn); + } + }, { + key: "callNow", + value: function callNow(fn, returnWith) { + this.call(fn, returnWith); + return this.runOne(); + } + }, { + key: "return", + value: function _return(value) { + /* istanbul ignore next */ + if (!this.stack.length) throw this.error(new ParserError('Stack underflow')); + if (value === undefined) value = this.state.buf; + this.state = this.stack.pop(); + this.state.returned = value; + } + }, { + key: "returnNow", + value: function returnNow(value) { + this.return(value); + return this.runOne(); + } + }, { + key: "consume", + value: function consume() { + /* istanbul ignore next */ + if (this.char === ParserEND) throw this.error(new ParserError('Unexpected end-of-buffer')); + this.state.buf += this._buf[this.ii]; + } + }, { + key: "error", + value: function error(err) { + err.line = this.line; + err.col = this.col; + err.pos = this.pos; + return err; + } + /* istanbul ignore next */ + + }, { + key: "parseStart", + value: function parseStart() { + throw new ParserError('Must declare a parseStart method'); + } + }]); + + return Parser; +}(); + +Parser.END = ParserEND; +Parser.Error = ParserError; +var parser$2 = Parser; + +var createDatetime = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (value) { + var date = new Date(value); + /* istanbul ignore if */ + + if (isNaN(date)) { + throw new TypeError('Invalid Datetime'); + } else { + return date; + } + }; +}); + +var formatNum = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (d, num) { + num = String(num); + + while (num.length < d) { + num = '0' + num; + } + + return num; + }; +}); + +var createDatetimeFloat = createCommonjsModule(function (module) { + 'use strict'; + + var FloatingDateTime = + /*#__PURE__*/ + function (_Date) { + _inherits(FloatingDateTime, _Date); + + function FloatingDateTime(value) { + var _this; + + _classCallCheck(this, FloatingDateTime); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(FloatingDateTime).call(this, value + 'Z')); + _this.isFloating = true; + return _this; + } + + _createClass(FloatingDateTime, [{ + key: "toISOString", + value: function toISOString() { + var date = `${this.getUTCFullYear()}-${formatNum(2, this.getUTCMonth() + 1)}-${formatNum(2, this.getUTCDate())}`; + var time = `${formatNum(2, this.getUTCHours())}:${formatNum(2, this.getUTCMinutes())}:${formatNum(2, this.getUTCSeconds())}.${formatNum(3, this.getUTCMilliseconds())}`; + return `${date}T${time}`; + } + }]); + + return FloatingDateTime; + }(_wrapNativeSuper(Date)); + + module.exports = function (value) { + var date = new FloatingDateTime(value); + /* istanbul ignore if */ + + if (isNaN(date)) { + throw new TypeError('Invalid Datetime'); + } else { + return date; + } + }; +}); + +var createDate = createCommonjsModule(function (module) { + 'use strict'; + + var DateTime = commonjsGlobal.Date; + + var Date = + /*#__PURE__*/ + function (_DateTime) { + _inherits(Date, _DateTime); + + function Date(value) { + var _this; + + _classCallCheck(this, Date); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Date).call(this, value)); + _this.isDate = true; + return _this; + } + + _createClass(Date, [{ + key: "toISOString", + value: function toISOString() { + return `${this.getUTCFullYear()}-${formatNum(2, this.getUTCMonth() + 1)}-${formatNum(2, this.getUTCDate())}`; + } + }]); + + return Date; + }(DateTime); + + module.exports = function (value) { + var date = new Date(value); + /* istanbul ignore if */ + + if (isNaN(date)) { + throw new TypeError('Invalid Datetime'); + } else { + return date; + } + }; +}); + +var createTime = createCommonjsModule(function (module) { + 'use strict'; + + var Time = + /*#__PURE__*/ + function (_Date) { + _inherits(Time, _Date); + + function Time(value) { + var _this; + + _classCallCheck(this, Time); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Time).call(this, `0000-01-01T${value}Z`)); + _this.isTime = true; + return _this; + } + + _createClass(Time, [{ + key: "toISOString", + value: function toISOString() { + return `${formatNum(2, this.getUTCHours())}:${formatNum(2, this.getUTCMinutes())}:${formatNum(2, this.getUTCSeconds())}.${formatNum(3, this.getUTCMilliseconds())}`; + } + }]); + + return Time; + }(_wrapNativeSuper(Date)); + + module.exports = function (value) { + var date = new Time(value); + /* istanbul ignore if */ + + if (isNaN(date)) { + throw new TypeError('Invalid Datetime'); + } else { + return date; + } + }; +}); + +var tomlParser = createCommonjsModule(function (module) { + 'use strict'; + /* eslint-disable no-new-wrappers, no-eval, camelcase, operator-linebreak */ + + module.exports = makeParserClass(parser$2); + module.exports.makeParserClass = makeParserClass; + + var TomlError = + /*#__PURE__*/ + function (_Error) { + _inherits(TomlError, _Error); + + function TomlError(msg) { + var _this; + + _classCallCheck(this, TomlError); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(TomlError).call(this, msg)); + /* istanbul ignore next */ + + if (Error.captureStackTrace) Error.captureStackTrace(_assertThisInitialized(_assertThisInitialized(_this)), TomlError); + _this.fromTOML = true; + _this.wrapped = null; + return _this; + } + + return TomlError; + }(_wrapNativeSuper(Error)); + + TomlError.wrap = function (err) { + var terr = new TomlError(err.message); + terr.code = err.code; + terr.wrapped = err; + return terr; + }; + + module.exports.TomlError = TomlError; + var CTRL_I = 0x09; + var CTRL_J = 0x0A; + var CTRL_M = 0x0D; + var CTRL_CHAR_BOUNDARY = 0x1F; // the last non-character in the latin1 region of unicode, except DEL + + var CHAR_SP = 0x20; + var CHAR_QUOT = 0x22; + var CHAR_NUM = 0x23; + var CHAR_APOS = 0x27; + var CHAR_PLUS = 0x2B; + var CHAR_COMMA = 0x2C; + var CHAR_HYPHEN = 0x2D; + var CHAR_PERIOD = 0x2E; + var CHAR_0 = 0x30; + var CHAR_1 = 0x31; + var CHAR_7 = 0x37; + var CHAR_9 = 0x39; + var CHAR_COLON = 0x3A; + var CHAR_EQUALS = 0x3D; + var CHAR_A = 0x41; + var CHAR_E = 0x45; + var CHAR_F = 0x46; + var CHAR_T = 0x54; + var CHAR_U = 0x55; + var CHAR_Z = 0x5A; + var CHAR_LOWBAR = 0x5F; + var CHAR_a = 0x61; + var CHAR_b = 0x62; + var CHAR_e = 0x65; + var CHAR_f = 0x66; + var CHAR_i = 0x69; + var CHAR_l = 0x6C; + var CHAR_n = 0x6E; + var CHAR_o = 0x6F; + var CHAR_r = 0x72; + var CHAR_s = 0x73; + var CHAR_t = 0x74; + var CHAR_u = 0x75; + var CHAR_x = 0x78; + var CHAR_z = 0x7A; + var CHAR_LCUB = 0x7B; + var CHAR_RCUB = 0x7D; + var CHAR_LSQB = 0x5B; + var CHAR_BSOL = 0x5C; + var CHAR_RSQB = 0x5D; + var CHAR_DEL = 0x7F; + var SURROGATE_FIRST = 0xD800; + var SURROGATE_LAST = 0xDFFF; + var escapes = { + [CHAR_b]: '\x08', + [CHAR_t]: '\x09', + [CHAR_n]: '\x0a', + [CHAR_f]: '\x0c', + [CHAR_r]: '\x0d', + [CHAR_QUOT]: '\x22', + [CHAR_BSOL]: '\x5c' + }; + + function isDigit(cp) { + return cp >= CHAR_0 && cp <= CHAR_9; + } + + function isHexit(cp) { + return cp >= CHAR_A && cp <= CHAR_F || cp >= CHAR_a && cp <= CHAR_f || cp >= CHAR_0 && cp <= CHAR_9; + } + + function isBit(cp) { + return cp === CHAR_1 || cp === CHAR_0; + } + + function isOctit(cp) { + return cp >= CHAR_0 && cp <= CHAR_7; + } + + function isAlphaNumQuoteHyphen(cp) { + return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_APOS || cp === CHAR_QUOT || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN; + } + + function isAlphaNumHyphen(cp) { + return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN; + } + + var _type = Symbol('type'); + + var _declared = Symbol('declared'); + + var INLINE_TABLE = Symbol('inline-table'); + + function InlineTable() { + return Object.defineProperties({}, { + [_type]: { + value: INLINE_TABLE + } + }); + } + + function isInlineTable(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === INLINE_TABLE; + } + + var TABLE = Symbol('table'); + + function Table() { + return Object.defineProperties({}, { + [_type]: { + value: TABLE + }, + [_declared]: { + value: false, + writable: true + } + }); + } + + function isTable(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === TABLE; + } + + var _contentType = Symbol('content-type'); + + var INLINE_LIST = Symbol('inline-list'); + + function InlineList(type) { + return Object.defineProperties([], { + [_type]: { + value: INLINE_LIST + }, + [_contentType]: { + value: type + } + }); + } + + function isInlineList(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === INLINE_LIST; + } + + var LIST = Symbol('list'); + + function List() { + return Object.defineProperties([], { + [_type]: { + value: LIST + } + }); + } + + function isList(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === LIST; + } // in an eval, to let bundlers not slurp in a util proxy + + + var utilInspect = eval(`require('util').inspect`); + /* istanbul ignore next */ + + var _inspect = utilInspect && utilInspect.custom || 'inspect'; + + var BoxedBigInt = + /*#__PURE__*/ + function () { + function BoxedBigInt(value) { + _classCallCheck(this, BoxedBigInt); + + try { + this.value = commonjsGlobal.BigInt(value); + } catch (_) { + /* istanbul ignore next */ + this.value = null; + } + + Object.defineProperty(this, _type, { + value: INTEGER + }); + } + + _createClass(BoxedBigInt, [{ + key: "isNaN", + value: function isNaN() { + return this.value === null; + } + /* istanbul ignore next */ + + }, { + key: "toString", + value: function toString() { + return String(this.value); + } + /* istanbul ignore next */ + + }, { + key: _inspect, + value: function value() { + return `[BigInt: ${this.toString()}]}`; + } + }, { + key: "valueOf", + value: function valueOf() { + return this.value; + } + }]); + + return BoxedBigInt; + }(); + + var INTEGER = Symbol('integer'); + + function Integer(_value) { + var num = Number(_value); // -0 is a float thing, not an int thing + + if (Object.is(num, -0)) num = 0; + /* istanbul ignore else */ + + if (commonjsGlobal.BigInt && !Number.isSafeInteger(num)) { + return new BoxedBigInt(_value); + } else { + /* istanbul ignore next */ + return Object.defineProperties(new Number(num), { + isNaN: { + value: function value() { + return isNaN(this); + } + }, + [_type]: { + value: INTEGER + }, + [_inspect]: { + value: function value() { + return `[Integer: ${_value}]`; + } + } + }); + } + } + + function isInteger(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === INTEGER; + } + + var FLOAT = Symbol('float'); + + function Float(_value2) { + /* istanbul ignore next */ + return Object.defineProperties(new Number(_value2), { + [_type]: { + value: FLOAT + }, + [_inspect]: { + value: function value() { + return `[Float: ${_value2}]`; + } + } + }); + } + + function isFloat(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === FLOAT; + } + + function tomlType(value) { + var type = typeof value; + + if (type === 'object') { + /* istanbul ignore if */ + if (value === null) return 'null'; + if (value instanceof Date) return 'datetime'; + /* istanbul ignore else */ + + if (_type in value) { + switch (value[_type]) { + case INLINE_TABLE: + return 'inline-table'; + + case INLINE_LIST: + return 'inline-list'; + + /* istanbul ignore next */ + + case TABLE: + return 'table'; + + /* istanbul ignore next */ + + case LIST: + return 'list'; + + case FLOAT: + return 'float'; + + case INTEGER: + return 'integer'; + } + } + } + + return type; + } + + function makeParserClass(Parser) { + var TOMLParser = + /*#__PURE__*/ + function (_Parser) { + _inherits(TOMLParser, _Parser); + + function TOMLParser() { + var _this2; + + _classCallCheck(this, TOMLParser); + + _this2 = _possibleConstructorReturn(this, _getPrototypeOf(TOMLParser).call(this)); + _this2.ctx = _this2.obj = Table(); + return _this2; + } + /* MATCH HELPER */ + + + _createClass(TOMLParser, [{ + key: "atEndOfWord", + value: function atEndOfWord() { + return this.char === CHAR_NUM || this.char === CTRL_I || this.char === CHAR_SP || this.atEndOfLine(); + } + }, { + key: "atEndOfLine", + value: function atEndOfLine() { + return this.char === Parser.END || this.char === CTRL_J || this.char === CTRL_M; + } + }, { + key: "parseStart", + value: function parseStart() { + if (this.char === Parser.END) { + return null; + } else if (this.char === CHAR_LSQB) { + return this.call(this.parseTableOrList); + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + return null; + } else if (isAlphaNumQuoteHyphen(this.char)) { + return this.callNow(this.parseAssignStatement); + } else { + throw this.error(new TomlError(`Unknown character "${this.char}"`)); + } + } // HELPER, this strips any whitespace and comments to the end of the line + // then RETURNS. Last state in a production. + + }, { + key: "parseWhitespaceToEOL", + value: function parseWhitespaceToEOL() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + return null; + } else if (this.char === CHAR_NUM) { + return this.goto(this.parseComment); + } else if (this.char === Parser.END || this.char === CTRL_J) { + return this.return(); + } else { + throw this.error(new TomlError('Unexpected character, expected only whitespace or comments till end of line')); + } + } + /* ASSIGNMENT: key = value */ + + }, { + key: "parseAssignStatement", + value: function parseAssignStatement() { + return this.callNow(this.parseAssign, this.recordAssignStatement); + } + }, { + key: "recordAssignStatement", + value: function recordAssignStatement(kv) { + var target = this.ctx; + var finalKey = kv.key.pop(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = kv.key[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var kw = _step.value; + + if (kw in target && (!isTable(target[kw]) || target[kw][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); + } + + target = target[kw] = target[kw] || Table(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + if (finalKey in target) { + throw this.error(new TomlError("Can't redefine existing key")); + } // unbox our numbers + + + if (isInteger(kv.value) || isFloat(kv.value)) { + target[finalKey] = kv.value.valueOf(); + } else { + target[finalKey] = kv.value; + } + + return this.goto(this.parseWhitespaceToEOL); + } + /* ASSSIGNMENT expression, key = value possibly inside an inline table */ + + }, { + key: "parseAssign", + value: function parseAssign() { + return this.callNow(this.parseKeyword, this.recordAssignKeyword); + } + }, { + key: "recordAssignKeyword", + value: function recordAssignKeyword(key) { + if (this.state.resultTable) { + this.state.resultTable.push(key); + } else { + this.state.resultTable = [key]; + } + + return this.goto(this.parseAssignKeywordPreDot); + } + }, { + key: "parseAssignKeywordPreDot", + value: function parseAssignKeywordPreDot() { + if (this.char === CHAR_PERIOD) { + return this.next(this.parseAssignKeywordPostDot); + } else if (this.char !== CHAR_SP && this.char !== CTRL_I) { + return this.goto(this.parseAssignEqual); + } + } + }, { + key: "parseAssignKeywordPostDot", + value: function parseAssignKeywordPostDot() { + if (this.char !== CHAR_SP && this.char !== CTRL_I) { + return this.callNow(this.parseKeyword, this.recordAssignKeyword); + } + } + }, { + key: "parseAssignEqual", + value: function parseAssignEqual() { + if (this.char === CHAR_EQUALS) { + return this.next(this.parseAssignPreValue); + } else { + throw this.error(new TomlError('Invalid character, expected "="')); + } + } + }, { + key: "parseAssignPreValue", + value: function parseAssignPreValue() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseValue, this.recordAssignValue); + } + } + }, { + key: "recordAssignValue", + value: function recordAssignValue(value) { + return this.returnNow({ + key: this.state.resultTable, + value: value + }); + } + /* COMMENTS: #...eol */ + + }, { + key: "parseComment", + value: function parseComment() { + do { + if (this.char === Parser.END || this.char === CTRL_J) { + return this.return(); + } + } while (this.nextChar()); + } + /* TABLES AND LISTS, [foo] and [[foo]] */ + + }, { + key: "parseTableOrList", + value: function parseTableOrList() { + if (this.char === CHAR_LSQB) { + this.next(this.parseList); + } else { + return this.goto(this.parseTable); + } + } + /* TABLE [foo.bar.baz] */ + + }, { + key: "parseTable", + value: function parseTable() { + this.ctx = this.obj; + return this.goto(this.parseTableNext); + } + }, { + key: "parseTableNext", + value: function parseTableNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseKeyword, this.parseTableMore); + } + } + }, { + key: "parseTableMore", + value: function parseTableMore(keyword) { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === CHAR_RSQB) { + if (keyword in this.ctx && (!isTable(this.ctx[keyword]) || this.ctx[keyword][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); + } else { + this.ctx = this.ctx[keyword] = this.ctx[keyword] || Table(); + this.ctx[_declared] = true; + } + + return this.next(this.parseWhitespaceToEOL); + } else if (this.char === CHAR_PERIOD) { + if (!(keyword in this.ctx)) { + this.ctx = this.ctx[keyword] = Table(); + } else if (isTable(this.ctx[keyword])) { + this.ctx = this.ctx[keyword]; + } else if (isList(this.ctx[keyword])) { + this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1]; + } else { + throw this.error(new TomlError("Can't redefine existing key")); + } + + return this.next(this.parseTableNext); + } else { + throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')); + } + } + /* LIST [[a.b.c]] */ + + }, { + key: "parseList", + value: function parseList() { + this.ctx = this.obj; + return this.goto(this.parseListNext); + } + }, { + key: "parseListNext", + value: function parseListNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseKeyword, this.parseListMore); + } + } + }, { + key: "parseListMore", + value: function parseListMore(keyword) { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === CHAR_RSQB) { + if (!(keyword in this.ctx)) { + this.ctx[keyword] = List(); + } + + if (isInlineList(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline array")); + } else if (isList(this.ctx[keyword])) { + var next = Table(); + this.ctx[keyword].push(next); + this.ctx = next; + } else { + throw this.error(new TomlError("Can't redefine an existing key")); + } + + return this.next(this.parseListEnd); + } else if (this.char === CHAR_PERIOD) { + if (!(keyword in this.ctx)) { + this.ctx = this.ctx[keyword] = Table(); + } else if (isInlineList(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline array")); + } else if (isInlineTable(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline table")); + } else if (isList(this.ctx[keyword])) { + this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1]; + } else if (isTable(this.ctx[keyword])) { + this.ctx = this.ctx[keyword]; + } else { + throw this.error(new TomlError("Can't redefine an existing key")); + } + + return this.next(this.parseListNext); + } else { + throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')); + } + } + }, { + key: "parseListEnd", + value: function parseListEnd(keyword) { + if (this.char === CHAR_RSQB) { + return this.next(this.parseWhitespaceToEOL); + } else { + throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')); + } + } + /* VALUE string, number, boolean, inline list, inline object */ + + }, { + key: "parseValue", + value: function parseValue() { + if (this.char === Parser.END) { + throw this.error(new TomlError('Key without value')); + } else if (this.char === CHAR_QUOT) { + return this.next(this.parseDoubleString); + } + + if (this.char === CHAR_APOS) { + return this.next(this.parseSingleString); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + return this.goto(this.parseNumberSign); + } else if (this.char === CHAR_i) { + return this.next(this.parseInf); + } else if (this.char === CHAR_n) { + return this.next(this.parseNan); + } else if (isDigit(this.char)) { + return this.goto(this.parseNumberOrDateTime); + } else if (this.char === CHAR_t || this.char === CHAR_f) { + return this.goto(this.parseBoolean); + } else if (this.char === CHAR_LSQB) { + return this.call(this.parseInlineList, this.recordValue); + } else if (this.char === CHAR_LCUB) { + return this.call(this.parseInlineTable, this.recordValue); + } else { + throw this.error(new TomlError('Unexpected character, expecting string, number, datetime, boolean, inline array or inline table')); + } + } + }, { + key: "recordValue", + value: function recordValue(value) { + return this.returnNow(value); + } + }, { + key: "parseInf", + value: function parseInf() { + if (this.char === CHAR_n) { + return this.next(this.parseInf2); + } else { + throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')); + } + } + }, { + key: "parseInf2", + value: function parseInf2() { + if (this.char === CHAR_f) { + if (this.state.buf === '-') { + return this.return(-Infinity); + } else { + return this.return(Infinity); + } + } else { + throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')); + } + } + }, { + key: "parseNan", + value: function parseNan() { + if (this.char === CHAR_a) { + return this.next(this.parseNan2); + } else { + throw this.error(new TomlError('Unexpected character, expected "nan"')); + } + } + }, { + key: "parseNan2", + value: function parseNan2() { + if (this.char === CHAR_n) { + return this.return(NaN); + } else { + throw this.error(new TomlError('Unexpected character, expected "nan"')); + } + } + /* KEYS, barewords or basic, literal, or dotted */ + + }, { + key: "parseKeyword", + value: function parseKeyword() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseBasicString); + } else if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralString); + } else { + return this.goto(this.parseBareKey); + } + } + /* KEYS: barewords */ + + }, { + key: "parseBareKey", + value: function parseBareKey() { + do { + if (this.char === Parser.END) { + throw this.error(new TomlError('Key ended without value')); + } else if (isAlphaNumHyphen(this.char)) { + this.consume(); + } else if (this.state.buf.length === 0) { + throw this.error(new TomlError('Empty bare keys are not allowed')); + } else { + return this.returnNow(); + } + } while (this.nextChar()); + } + /* STRINGS, single quoted (literal) */ + + }, { + key: "parseSingleString", + value: function parseSingleString() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiStringMaybe); + } else { + return this.goto(this.parseLiteralString); + } + } + }, { + key: "parseLiteralString", + value: function parseLiteralString() { + do { + if (this.char === CHAR_APOS) { + return this.return(); + } else if (this.atEndOfLine()) { + throw this.error(new TomlError('Unterminated string')); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + }, { + key: "parseLiteralMultiStringMaybe", + value: function parseLiteralMultiStringMaybe() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiString); + } else { + return this.returnNow(); + } + } + }, { + key: "parseLiteralMultiString", + value: function parseLiteralMultiString() { + if (this.char === CTRL_M) { + return null; + } else if (this.char === CTRL_J) { + return this.next(this.parseLiteralMultiStringContent); + } else { + return this.goto(this.parseLiteralMultiStringContent); + } + } + }, { + key: "parseLiteralMultiStringContent", + value: function parseLiteralMultiStringContent() { + do { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiEnd); + } else if (this.char === Parser.END) { + throw this.error(new TomlError('Unterminated multi-line string')); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + }, { + key: "parseLiteralMultiEnd", + value: function parseLiteralMultiEnd() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiEnd2); + } else { + this.state.buf += "'"; + return this.goto(this.parseLiteralMultiStringContent); + } + } + }, { + key: "parseLiteralMultiEnd2", + value: function parseLiteralMultiEnd2() { + if (this.char === CHAR_APOS) { + return this.return(); + } else { + this.state.buf += "''"; + return this.goto(this.parseLiteralMultiStringContent); + } + } + /* STRINGS double quoted */ + + }, { + key: "parseDoubleString", + value: function parseDoubleString() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiStringMaybe); + } else { + return this.goto(this.parseBasicString); + } + } + }, { + key: "parseBasicString", + value: function parseBasicString() { + do { + if (this.char === CHAR_BSOL) { + return this.call(this.parseEscape, this.recordEscapeReplacement); + } else if (this.char === CHAR_QUOT) { + return this.return(); + } else if (this.atEndOfLine()) { + throw this.error(new TomlError('Unterminated string')); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + }, { + key: "recordEscapeReplacement", + value: function recordEscapeReplacement(replacement) { + this.state.buf += replacement; + return this.goto(this.parseBasicString); + } + }, { + key: "parseMultiStringMaybe", + value: function parseMultiStringMaybe() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiString); + } else { + return this.returnNow(); + } + } + }, { + key: "parseMultiString", + value: function parseMultiString() { + if (this.char === CTRL_M) { + return null; + } else if (this.char === CTRL_J) { + return this.next(this.parseMultiStringContent); + } else { + return this.goto(this.parseMultiStringContent); + } + } + }, { + key: "parseMultiStringContent", + value: function parseMultiStringContent() { + do { + if (this.char === CHAR_BSOL) { + return this.call(this.parseMultiEscape, this.recordMultiEscapeReplacement); + } else if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiEnd); + } else if (this.char === Parser.END) { + throw this.error(new TomlError('Unterminated multi-line string')); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + }, { + key: "errorControlCharInString", + value: function errorControlCharInString() { + var displayCode = '\\u00'; + + if (this.char < 16) { + displayCode += '0'; + } + + displayCode += this.char.toString(16); + return this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${displayCode} instead`)); + } + }, { + key: "recordMultiEscapeReplacement", + value: function recordMultiEscapeReplacement(replacement) { + this.state.buf += replacement; + return this.goto(this.parseMultiStringContent); + } + }, { + key: "parseMultiEnd", + value: function parseMultiEnd() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiEnd2); + } else { + this.state.buf += '"'; + return this.goto(this.parseMultiStringContent); + } + } + }, { + key: "parseMultiEnd2", + value: function parseMultiEnd2() { + if (this.char === CHAR_QUOT) { + return this.return(); + } else { + this.state.buf += '""'; + return this.goto(this.parseMultiStringContent); + } + } + }, { + key: "parseMultiEscape", + value: function parseMultiEscape() { + if (this.char === CTRL_M || this.char === CTRL_J) { + return this.next(this.parseMultiTrim); + } else if (this.char === CHAR_SP || this.char === CTRL_I) { + return this.next(this.parsePreMultiTrim); + } else { + return this.goto(this.parseEscape); + } + } + }, { + key: "parsePreMultiTrim", + value: function parsePreMultiTrim() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === CTRL_M || this.char === CTRL_J) { + return this.next(this.parseMultiTrim); + } else { + throw this.error(new TomlError("Can't escape whitespace")); + } + } + }, { + key: "parseMultiTrim", + value: function parseMultiTrim() { + // explicitly whitespace here, END should follow the same path as chars + if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + return null; + } else { + return this.returnNow(); + } + } + }, { + key: "parseEscape", + value: function parseEscape() { + if (this.char in escapes) { + return this.return(escapes[this.char]); + } else if (this.char === CHAR_u) { + return this.call(this.parseSmallUnicode, this.parseUnicodeReturn); + } else if (this.char === CHAR_U) { + return this.call(this.parseLargeUnicode, this.parseUnicodeReturn); + } else { + throw this.error(new TomlError('Unknown escape character: ' + this.char)); + } + } + }, { + key: "parseUnicodeReturn", + value: function parseUnicodeReturn(char) { + try { + var codePoint = parseInt(char, 16); + + if (codePoint >= SURROGATE_FIRST && codePoint <= SURROGATE_LAST) { + throw this.error(new TomlError('Invalid unicode, character in range 0xD800 - 0xDFFF is reserved')); + } + + return this.returnNow(String.fromCodePoint(codePoint)); + } catch (ex) { + throw this.error(TomlError.wrap(ex)); + } + } + }, { + key: "parseSmallUnicode", + value: function parseSmallUnicode() { + if (!isHexit(this.char)) { + throw this.error(new TomlError('Invalid character in unicode sequence, expected hex')); + } else { + this.consume(); + if (this.state.buf.length >= 4) return this.return(); + } + } + }, { + key: "parseLargeUnicode", + value: function parseLargeUnicode() { + if (!isHexit(this.char)) { + throw this.error(new TomlError('Invalid character in unicode sequence, expected hex')); + } else { + this.consume(); + if (this.state.buf.length >= 8) return this.return(); + } + } + /* NUMBERS */ + + }, { + key: "parseNumberSign", + value: function parseNumberSign() { + this.consume(); + return this.next(this.parseMaybeSignedInfOrNan); + } + }, { + key: "parseMaybeSignedInfOrNan", + value: function parseMaybeSignedInfOrNan() { + if (this.char === CHAR_i) { + return this.next(this.parseInf); + } else if (this.char === CHAR_n) { + return this.next(this.parseNan); + } else { + return this.callNow(this.parseNoUnder, this.parseNumberInteger); + } + } + }, { + key: "parseNumberInteger", + value: function parseNumberInteger() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); + } else if (this.char === CHAR_PERIOD) { + this.consume(); + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else { + var result = Integer(this.state.buf); + /* istanbul ignore if */ + + if (result.isNaN()) { + throw this.error(new TomlError('Invalid number')); + } else { + return this.returnNow(result); + } + } + } + }, { + key: "parseNoUnder", + value: function parseNoUnder() { + if (this.char === CHAR_LOWBAR) { + throw this.error(new TomlError('Unexpected character, expected digit, exponent marker(e) or whitespace')); + } else if (this.atEndOfWord() || this.char === CHAR_E || this.char === CHAR_e) { + throw this.error(new TomlError('Incomplete number')); + } + + return this.returnNow(); + } + }, { + key: "parseNumberFloat", + value: function parseNumberFloat() { + if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); + } else { + return this.returnNow(Float(this.state.buf)); + } + } + }, { + key: "parseNumberExponentSign", + value: function parseNumberExponentSign() { + if (isDigit(this.char)) { + return this.goto(this.parseNumberExponent); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.call(this.parseNoUnder, this.parseNumberExponent); + } else { + throw this.error(new TomlError('Unexpected character, expected -, + or digit')); + } + } + }, { + key: "parseNumberExponent", + value: function parseNumberExponent() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else { + return this.returnNow(Float(this.state.buf)); + } + } + /* NUMBERS or DATETIMES */ + + }, { + key: "parseNumberOrDateTime", + value: function parseNumberOrDateTime() { + if (this.char === CHAR_0) { + this.consume(); + return this.next(this.parseNumberBaseOrDateTime); + } else { + return this.goto(this.parseNumberOrDateTimeOnly); + } + } + }, { + key: "parseNumberOrDateTimeOnly", + value: function parseNumberOrDateTimeOnly() { + // note, if two zeros are in a row then it MUST be a date + if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder, this.parseNumberInteger); + } else if (isDigit(this.char)) { + this.consume(); + if (this.state.buf.length > 4) this.next(this.parseNumberInteger); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); + } else if (this.char === CHAR_PERIOD) { + this.consume(); + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else if (this.char === CHAR_HYPHEN) { + return this.goto(this.parseDateTime); + } else if (this.char === CHAR_COLON) { + return this.goto(this.parseOnlyTimeHour); + } else { + return this.returnNow(Integer(this.state.buf)); + } + } + }, { + key: "parseDateTimeOnly", + value: function parseDateTimeOnly() { + if (this.state.buf.length < 4) { + if (isDigit(this.char)) { + return this.consume(); + } else if (this.char === CHAR_COLON) { + return this.goto(this.parseOnlyTimeHour); + } else { + throw this.error(new TomlError('Expected digit while parsing year part of a date')); + } + } else { + if (this.char === CHAR_HYPHEN) { + return this.goto(this.parseDateTime); + } else { + throw this.error(new TomlError('Expected hyphen (-) while parsing year part of date')); + } + } + } + }, { + key: "parseNumberBaseOrDateTime", + value: function parseNumberBaseOrDateTime() { + if (this.char === CHAR_b) { + this.consume(); + return this.call(this.parseNoUnder, this.parseIntegerBin); + } else if (this.char === CHAR_o) { + this.consume(); + return this.call(this.parseNoUnder, this.parseIntegerOct); + } else if (this.char === CHAR_x) { + this.consume(); + return this.call(this.parseNoUnder, this.parseIntegerHex); + } else if (this.char === CHAR_PERIOD) { + return this.goto(this.parseNumberInteger); + } else if (isDigit(this.char)) { + return this.goto(this.parseDateTimeOnly); + } else { + return this.returnNow(Integer(this.state.buf)); + } + } + }, { + key: "parseIntegerHex", + value: function parseIntegerHex() { + if (isHexit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else { + var result = Integer(this.state.buf); + /* istanbul ignore if */ + + if (result.isNaN()) { + throw this.error(new TomlError('Invalid number')); + } else { + return this.returnNow(result); + } + } + } + }, { + key: "parseIntegerOct", + value: function parseIntegerOct() { + if (isOctit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else { + var result = Integer(this.state.buf); + /* istanbul ignore if */ + + if (result.isNaN()) { + throw this.error(new TomlError('Invalid number')); + } else { + return this.returnNow(result); + } + } + } + }, { + key: "parseIntegerBin", + value: function parseIntegerBin() { + if (isBit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else { + var result = Integer(this.state.buf); + /* istanbul ignore if */ + + if (result.isNaN()) { + throw this.error(new TomlError('Invalid number')); + } else { + return this.returnNow(result); + } + } + } + /* DATETIME */ + + }, { + key: "parseDateTime", + value: function parseDateTime() { + // we enter here having just consumed the year and about to consume the hyphen + if (this.state.buf.length < 4) { + throw this.error(new TomlError('Years less than 1000 must be zero padded to four characters')); + } + + this.state.result = this.state.buf; + this.state.buf = ''; + return this.next(this.parseDateMonth); + } + }, { + key: "parseDateMonth", + value: function parseDateMonth() { + if (this.char === CHAR_HYPHEN) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError('Months less than 10 must be zero padded to two characters')); + } + + this.state.result += '-' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseDateDay); + } else if (isDigit(this.char)) { + this.consume(); + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseDateDay", + value: function parseDateDay() { + if (this.char === CHAR_T || this.char === CHAR_SP) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError('Days less than 10 must be zero padded to two characters')); + } + + this.state.result += '-' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseStartTimeHour); + } else if (this.atEndOfWord()) { + return this.return(createDate(this.state.result + '-' + this.state.buf)); + } else if (isDigit(this.char)) { + this.consume(); + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseStartTimeHour", + value: function parseStartTimeHour() { + if (this.atEndOfWord()) { + return this.returnNow(createDate(this.state.result)); + } else { + return this.goto(this.parseTimeHour); + } + } + }, { + key: "parseTimeHour", + value: function parseTimeHour() { + if (this.char === CHAR_COLON) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError('Hours less than 10 must be zero padded to two characters')); + } + + this.state.result += 'T' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseTimeMin); + } else if (isDigit(this.char)) { + this.consume(); + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseTimeMin", + value: function parseTimeMin() { + if (this.state.buf.length < 2 && isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { + this.state.result += ':' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseTimeSec); + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseTimeSec", + value: function parseTimeSec() { + if (isDigit(this.char)) { + this.consume(); + + if (this.state.buf.length === 2) { + this.state.result += ':' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseTimeZoneOrFraction); + } + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseOnlyTimeHour", + value: function parseOnlyTimeHour() { + /* istanbul ignore else */ + if (this.char === CHAR_COLON) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError('Hours less than 10 must be zero padded to two characters')); + } + + this.state.result = this.state.buf; + this.state.buf = ''; + return this.next(this.parseOnlyTimeMin); + } else { + throw this.error(new TomlError('Incomplete time')); + } + } + }, { + key: "parseOnlyTimeMin", + value: function parseOnlyTimeMin() { + if (this.state.buf.length < 2 && isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { + this.state.result += ':' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseOnlyTimeSec); + } else { + throw this.error(new TomlError('Incomplete time')); + } + } + }, { + key: "parseOnlyTimeSec", + value: function parseOnlyTimeSec() { + if (isDigit(this.char)) { + this.consume(); + + if (this.state.buf.length === 2) { + return this.next(this.parseOnlyTimeFractionMaybe); + } + } else { + throw this.error(new TomlError('Incomplete time')); + } + } + }, { + key: "parseOnlyTimeFractionMaybe", + value: function parseOnlyTimeFractionMaybe() { + this.state.result += ':' + this.state.buf; + + if (this.char === CHAR_PERIOD) { + this.state.buf = ''; + this.next(this.parseOnlyTimeFraction); + } else { + return this.return(createTime(this.state.result)); + } + } + }, { + key: "parseOnlyTimeFraction", + value: function parseOnlyTimeFraction() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.atEndOfWord()) { + if (this.state.buf.length === 0) throw this.error(new TomlError('Expected digit in milliseconds')); + return this.returnNow(createTime(this.state.result + '.' + this.state.buf)); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')); + } + } + }, { + key: "parseTimeZoneOrFraction", + value: function parseTimeZoneOrFraction() { + if (this.char === CHAR_PERIOD) { + this.consume(); + this.next(this.parseDateTimeFraction); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.next(this.parseTimeZoneHour); + } else if (this.char === CHAR_Z) { + this.consume(); + return this.return(createDatetime(this.state.result + this.state.buf)); + } else if (this.atEndOfWord()) { + return this.returnNow(createDatetimeFloat(this.state.result + this.state.buf)); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')); + } + } + }, { + key: "parseDateTimeFraction", + value: function parseDateTimeFraction() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 1) { + throw this.error(new TomlError('Expected digit in milliseconds')); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.next(this.parseTimeZoneHour); + } else if (this.char === CHAR_Z) { + this.consume(); + return this.return(createDatetime(this.state.result + this.state.buf)); + } else if (this.atEndOfWord()) { + return this.returnNow(createDatetimeFloat(this.state.result + this.state.buf)); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')); + } + } + }, { + key: "parseTimeZoneHour", + value: function parseTimeZoneHour() { + if (isDigit(this.char)) { + this.consume(); // FIXME: No more regexps + + if (/\d\d$/.test(this.state.buf)) return this.next(this.parseTimeZoneSep); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected digit')); + } + } + }, { + key: "parseTimeZoneSep", + value: function parseTimeZoneSep() { + if (this.char === CHAR_COLON) { + this.consume(); + this.next(this.parseTimeZoneMin); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected colon')); + } + } + }, { + key: "parseTimeZoneMin", + value: function parseTimeZoneMin() { + if (isDigit(this.char)) { + this.consume(); + if (/\d\d$/.test(this.state.buf)) return this.return(createDatetime(this.state.result + this.state.buf)); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected digit')); + } + } + /* BOOLEAN */ + + }, { + key: "parseBoolean", + value: function parseBoolean() { + /* istanbul ignore else */ + if (this.char === CHAR_t) { + this.consume(); + return this.next(this.parseTrue_r); + } else if (this.char === CHAR_f) { + this.consume(); + return this.next(this.parseFalse_a); + } + } + }, { + key: "parseTrue_r", + value: function parseTrue_r() { + if (this.char === CHAR_r) { + this.consume(); + return this.next(this.parseTrue_u); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseTrue_u", + value: function parseTrue_u() { + if (this.char === CHAR_u) { + this.consume(); + return this.next(this.parseTrue_e); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseTrue_e", + value: function parseTrue_e() { + if (this.char === CHAR_e) { + return this.return(true); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseFalse_a", + value: function parseFalse_a() { + if (this.char === CHAR_a) { + this.consume(); + return this.next(this.parseFalse_l); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseFalse_l", + value: function parseFalse_l() { + if (this.char === CHAR_l) { + this.consume(); + return this.next(this.parseFalse_s); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseFalse_s", + value: function parseFalse_s() { + if (this.char === CHAR_s) { + this.consume(); + return this.next(this.parseFalse_e); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseFalse_e", + value: function parseFalse_e() { + if (this.char === CHAR_e) { + return this.return(false); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + /* INLINE LISTS */ + + }, { + key: "parseInlineList", + value: function parseInlineList() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { + return null; + } else if (this.char === Parser.END) { + throw this.error(new TomlError('Unterminated inline array')); + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CHAR_RSQB) { + return this.return(this.state.resultArr || InlineList()); + } else { + return this.callNow(this.parseValue, this.recordInlineListValue); + } + } + }, { + key: "recordInlineListValue", + value: function recordInlineListValue(value) { + if (this.state.resultArr) { + var listType = this.state.resultArr[_contentType]; + var valueType = tomlType(value); + + if (listType !== valueType) { + throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${listType} and ${valueType}`)); + } + } else { + this.state.resultArr = InlineList(tomlType(value)); + } + + if (isFloat(value) || isInteger(value)) { + // unbox now that we've verified they're ok + this.state.resultArr.push(value.valueOf()); + } else { + this.state.resultArr.push(value); + } + + return this.goto(this.parseInlineListNext); + } + }, { + key: "parseInlineListNext", + value: function parseInlineListNext() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { + return null; + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CHAR_COMMA) { + return this.next(this.parseInlineList); + } else if (this.char === CHAR_RSQB) { + return this.goto(this.parseInlineList); + } else { + throw this.error(new TomlError('Invalid character, expected whitespace, comma (,) or close bracket (])')); + } + } + /* INLINE TABLE */ + + }, { + key: "parseInlineTable", + value: function parseInlineTable() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { + throw this.error(new TomlError('Unterminated inline array')); + } else if (this.char === CHAR_RCUB) { + return this.return(this.state.resultTable || InlineTable()); + } else { + if (!this.state.resultTable) this.state.resultTable = InlineTable(); + return this.callNow(this.parseAssign, this.recordInlineTableValue); + } + } + }, { + key: "recordInlineTableValue", + value: function recordInlineTableValue(kv) { + var target = this.state.resultTable; + var finalKey = kv.key.pop(); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = kv.key[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var kw = _step2.value; + + if (kw in target && (!isTable(target[kw]) || target[kw][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); + } + + target = target[kw] = target[kw] || Table(); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + if (finalKey in target) { + throw this.error(new TomlError("Can't redefine existing key")); + } + + if (isInteger(kv.value) || isFloat(kv.value)) { + target[finalKey] = kv.value.valueOf(); + } else { + target[finalKey] = kv.value; + } + + return this.goto(this.parseInlineTableNext); + } + }, { + key: "parseInlineTableNext", + value: function parseInlineTableNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { + throw this.error(new TomlError('Unterminated inline array')); + } else if (this.char === CHAR_COMMA) { + return this.next(this.parseInlineTable); + } else if (this.char === CHAR_RCUB) { + return this.goto(this.parseInlineTable); + } else { + throw this.error(new TomlError('Invalid character, expected whitespace, comma (,) or close bracket (])')); + } + } + }]); + + return TOMLParser; + }(Parser); + + return TOMLParser; + } +}); + +var parsePrettyError = prettyError; + +function prettyError(err, buf) { + /* istanbul ignore if */ + if (err.pos == null || err.line == null) return err; + var msg = err.message; + msg += ` at row ${err.line + 1}, col ${err.col + 1}, pos ${err.pos}:\n`; + /* istanbul ignore else */ + + if (buf && buf.split) { + var lines = buf.split(/\n/); + var lineNumWidth = String(Math.min(lines.length, err.line + 3)).length; + var linePadding = ' '; + + while (linePadding.length < lineNumWidth) { + linePadding += ' '; + } + + for (var ii = Math.max(0, err.line - 1); ii < Math.min(lines.length, err.line + 2); ++ii) { + var lineNum = String(ii + 1); + if (lineNum.length < lineNumWidth) lineNum = ' ' + lineNum; + + if (err.line === ii) { + msg += lineNum + '> ' + lines[ii] + '\n'; + msg += linePadding + ' '; + + for (var hh = 0; hh < err.col; ++hh) { + msg += ' '; + } + + msg += '^\n'; + } else { + msg += lineNum + ': ' + lines[ii] + '\n'; + } + } + } + + err.message = msg + '\n'; + return err; +} + +var parseString_1 = parseString; + +function parseString(str) { + if (commonjsGlobal.Buffer && commonjsGlobal.Buffer.isBuffer(str)) { + str = str.toString('utf8'); + } + + var parser = new tomlParser(); + + try { + parser.parse(str); + return parser.finish(); + } catch (ex) { + throw parsePrettyError(ex, str); + } +} + +var loadToml = function loadToml(filePath, content) { + try { + return parseString_1(content); + } catch (error) { + error.message = `TOML Error in ${filePath}:\n${error.message}`; + throw error; + } +}; + +var resolveConfig_1 = createCommonjsModule(function (module) { + "use strict"; + + var getExplorerMemoized = mem(function (opts) { + var explorer = thirdParty$1.cosmiconfig("prettier", { + cache: opts.cache, + transform: function transform(result) { + if (result && result.config) { + if (typeof result.config !== "object") { + throw new Error(`Config is only allowed to be an object, ` + `but received ${typeof result.config} in "${result.filepath}"`); + } + + delete result.config.$schema; + } + + return result; + }, + searchPlaces: ["package.json", ".prettierrc", ".prettierrc.json", ".prettierrc.yaml", ".prettierrc.yml", ".prettierrc.js", "prettier.config.js", ".prettierrc.toml"], + loaders: { + ".toml": loadToml + } + }); + + var _load = opts.sync ? explorer.loadSync : explorer.load; + + var search = opts.sync ? explorer.searchSync : explorer.search; + return { + // cosmiconfig v4 interface + load: function load(searchPath, configPath) { + return configPath ? _load(configPath) : search(searchPath); + } + }; + }); + /** @param {{ cache: boolean, sync: boolean }} opts */ + + function getLoadFunction(opts) { + // Normalize opts before passing to a memoized function + opts = Object.assign({ + sync: false, + cache: false + }, opts); + return getExplorerMemoized(opts).load; + } + + function _resolveConfig(filePath, opts, sync) { + opts = Object.assign({ + useCache: true + }, opts); + var loadOpts = { + cache: !!opts.useCache, + sync: !!sync, + editorconfig: !!opts.editorconfig + }; + var load = getLoadFunction(loadOpts); + var loadEditorConfig = resolveConfigEditorconfig.getLoadFunction(loadOpts); + var arr = [load, loadEditorConfig].map(function (l) { + return l(filePath, opts.config); + }); + + var unwrapAndMerge = function unwrapAndMerge(arr) { + var result = arr[0]; + var editorConfigured = arr[1]; + var merged = Object.assign({}, editorConfigured, mergeOverrides(Object.assign({}, result), filePath)); + ["plugins", "pluginSearchDirs"].forEach(function (optionName) { + if (Array.isArray(merged[optionName])) { + merged[optionName] = merged[optionName].map(function (value) { + return typeof value === "string" && value.startsWith(".") // relative path + ? path.resolve(path.dirname(result.filepath), value) : value; + }); + } + }); + + if (!result && !editorConfigured) { + return null; + } + + return merged; + }; + + if (loadOpts.sync) { + return unwrapAndMerge(arr); + } + + return Promise.all(arr).then(unwrapAndMerge); + } + + var resolveConfig = function resolveConfig(filePath, opts) { + return _resolveConfig(filePath, opts, false); + }; + + resolveConfig.sync = function (filePath, opts) { + return _resolveConfig(filePath, opts, true); + }; + + function clearCache() { + mem.clear(getExplorerMemoized); + resolveConfigEditorconfig.clearCache(); + } + + function resolveConfigFile(filePath) { + var load = getLoadFunction({ + sync: false + }); + return load(filePath).then(function (result) { + return result ? result.filepath : null; + }); + } + + resolveConfigFile.sync = function (filePath) { + var load = getLoadFunction({ + sync: true + }); + var result = load(filePath); + return result ? result.filepath : null; + }; + + function mergeOverrides(configResult, filePath) { + var options = Object.assign({}, configResult.config); + + if (filePath && options.overrides) { + var relativeFilePath = path.relative(path.dirname(configResult.filepath), filePath); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = options.overrides[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var override = _step.value; + + if (pathMatchesGlobs(relativeFilePath, override.files, override.excludeFiles)) { + Object.assign(options, override.options); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + + delete options.overrides; + return options; + } // Based on eslint: https://github.com/eslint/eslint/blob/master/lib/config/config-ops.js + + + function pathMatchesGlobs(filePath, patterns, excludedPatterns) { + var patternList = [].concat(patterns); + var excludedPatternList = [].concat(excludedPatterns || []); + var opts = { + matchBase: true + }; + return patternList.some(function (pattern) { + return minimatch_1(filePath, pattern, opts); + }) && !excludedPatternList.some(function (excludedPattern) { + return minimatch_1(filePath, excludedPattern, opts); + }); + } + + module.exports = { + resolveConfig, + resolveConfigFile, + clearCache + }; +}); + +var version = require$$0.version; +var getSupportInfo = support.getSupportInfo; // Luckily `opts` is always the 2nd argument + +function _withPlugins(fn) { + return function () { + var args = Array.from(arguments); + var opts = args[1] || {}; + args[1] = Object.assign({}, opts, { + plugins: loadPlugins_1(opts.plugins, opts.pluginSearchDirs) + }); + return fn.apply(null, args); + }; +} + +function withPlugins(fn) { + var resultingFn = _withPlugins(fn); + + if (fn.sync) { + resultingFn.sync = _withPlugins(fn.sync); + } + + return resultingFn; +} + +var formatWithCursor = withPlugins(core.formatWithCursor); +var src = { + formatWithCursor, + + format(text, opts) { + return formatWithCursor(text, opts).formatted; + }, + + check: function check(text, opts) { + var formatted = formatWithCursor(text, opts).formatted; + return formatted === text; + }, + doc, + resolveConfig: resolveConfig_1.resolveConfig, + resolveConfigFile: resolveConfig_1.resolveConfigFile, + clearConfigCache: resolveConfig_1.clearCache, + getFileInfo: withPlugins(getFileInfo_1), + getSupportInfo: withPlugins(getSupportInfo), + version, + util: utilShared, + + /* istanbul ignore next */ + __debug: { + parse: withPlugins(core.parse), + formatAST: withPlugins(core.formatAST), + formatDoc: withPlugins(core.formatDoc), + printToDoc: withPlugins(core.printToDoc), + printDocToString: withPlugins(core.printDocToString) + } +}; + +var prettier$2 = src; + +var at; +var ch; +var escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' +}; +var text; +var error = function error(m) { + // Call error when something is wrong. + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text + }; +}; +var next = function next(c) { + // If a c parameter is provided, verify that it matches the current character. + if (c && c !== ch) { + error("Expected '" + c + "' instead of '" + ch + "'"); + } // Get the next character. When there are no more characters, + // return the empty string. + + + ch = text.charAt(at); + at += 1; + return ch; +}; +var number$2 = function number() { + // Parse a number value. + var number, + string = ''; + + if (ch === '-') { + string = '-'; + next('-'); + } + + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + + if (ch === '.') { + string += '.'; + + while (next() && ch >= '0' && ch <= '9') { + string += ch; + } + } + + if (ch === 'e' || ch === 'E') { + string += ch; + next(); + + if (ch === '-' || ch === '+') { + string += ch; + next(); + } + + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + } + + number = +string; + + if (!isFinite(number)) { + error("Bad number"); + } else { + return number; + } +}; +var string$2 = function string() { + // Parse a string value. + var hex, + i, + string = '', + uffff; // When parsing for string values, we must look for " and \ characters. + + if (ch === '"') { + while (next()) { + if (ch === '"') { + next(); + return string; + } else if (ch === '\\') { + next(); + + if (ch === 'u') { + uffff = 0; + + for (i = 0; i < 4; i += 1) { + hex = parseInt(next(), 16); + + if (!isFinite(hex)) { + break; + } + + uffff = uffff * 16 + hex; + } + + string += String.fromCharCode(uffff); + } else if (typeof escapee[ch] === 'string') { + string += escapee[ch]; + } else { + break; + } + } else { + string += ch; + } + } + } + + error("Bad string"); +}; +var white = function white() { + // Skip whitespace. + while (ch && ch <= ' ') { + next(); + } +}; +var word$2 = function word() { + // true, false, or null. + switch (ch) { + case 't': + next('t'); + next('r'); + next('u'); + next('e'); + return true; + + case 'f': + next('f'); + next('a'); + next('l'); + next('s'); + next('e'); + return false; + + case 'n': + next('n'); + next('u'); + next('l'); + next('l'); + return null; + } + + error("Unexpected '" + ch + "'"); +}; +var value; +var array$4 = function array() { + // Parse an array value. + var array = []; + + if (ch === '[') { + next('['); + white(); + + if (ch === ']') { + next(']'); + return array; // empty array + } + + while (ch) { + array.push(value()); + white(); + + if (ch === ']') { + next(']'); + return array; + } + + next(','); + white(); + } + } + + error("Bad array"); +}; +var object$1 = function object() { + // Parse an object value. + var key, + object = {}; + + if (ch === '{') { + next('{'); + white(); + + if (ch === '}') { + next('}'); + return object; // empty object + } + + while (ch) { + key = string$2(); + white(); + next(':'); + + if (Object.hasOwnProperty.call(object, key)) { + error('Duplicate key "' + key + '"'); + } + + object[key] = value(); + white(); + + if (ch === '}') { + next('}'); + return object; + } + + next(','); + white(); + } + } + + error("Bad object"); +}; + +value = function value() { + // Parse a JSON value. It could be an object, an array, a string, a number, + // or a word. + white(); + + switch (ch) { + case '{': + return object$1(); + + case '[': + return array$4(); + + case '"': + return string$2(); + + case '-': + return number$2(); + + default: + return ch >= '0' && ch <= '9' ? number$2() : word$2(); + } +}; // Return the json_parse function. It will have access to all of the above +// functions and variables. + + +var parse$8 = function parse(source, reviver) { + var result; + text = source; + at = 0; + ch = ' '; + result = value(); + white(); + + if (ch) { + error("Syntax error"); + } // If there is a reviver function, we recursively walk the new structure, + // passing each name/value pair to the reviver function for possible + // transformation, starting with a temporary root object that holds the result + // in an empty key. If there is not a reviver function, we simply return the + // result. + + + return typeof reviver === 'function' ? function walk(holder, key) { + var k, + v, + value = holder[key]; + + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + + return reviver.call(holder, key, value); + }({ + '': result + }, '') : result; +}; + +var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; +var gap; +var indent$10; +var meta$1 = { + // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"': '\\"', + '\\': '\\\\' +}; +var rep; + +function quote(string) { + // If the string contains no control characters, no quote characters, and no + // backslash characters, then we can safely slap some quotes around it. + // Otherwise we must also replace the offending characters with safe escape + // sequences. + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta$1[a]; + return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; +} + +function str(key, holder) { + // Produce a string from holder[key]. + var i, + // The loop counter. + k, + // The member key. + v, + // The member value. + length, + mind = gap, + partial, + value = holder[key]; // If the value has a toJSON method, call it to obtain a replacement value. + + if (value && typeof value === 'object' && typeof value.toJSON === 'function') { + value = value.toJSON(key); + } // If we were called with a replacer function, then call the replacer to + // obtain a replacement value. + + + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } // What happens next depends on the value's type. + + + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + // JSON numbers must be finite. Encode non-finite numbers as null. + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + // If the value is a boolean or null, convert it to a string. Note: + // typeof null does not produce 'null'. The case is included here in + // the remote chance that this gets fixed someday. + return String(value); + + case 'object': + if (!value) return 'null'; + gap += indent$10; + partial = []; // Array.isArray + + if (Object.prototype.toString.apply(value) === '[object Array]') { + length = value.length; + + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } // Join all of the elements together, separated with commas, and + // wrap them in brackets. + + + v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']'; + gap = mind; + return v; + } // If the replacer is an array, use it to select the members to be + // stringified. + + + if (rep && typeof rep === 'object') { + length = rep.length; + + for (i = 0; i < length; i += 1) { + k = rep[i]; + + if (typeof k === 'string') { + v = str(k, value); + + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } else { + // Otherwise, iterate through all of the keys in the object. + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = str(k, value); + + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } // Join all of the member texts together, separated with commas, + // and wrap them in braces. + + + v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}'; + gap = mind; + return v; + } +} + +var stringify$1 = function stringify(value, replacer, space) { + var i; + gap = ''; + indent$10 = ''; // If the space parameter is a number, make an indent string containing that + // many spaces. + + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent$10 += ' '; + } + } // If the space parameter is a string, it will be used as the indent string. + else if (typeof space === 'string') { + indent$10 = space; + } // If there is a replacer, it must be a function or an array. + // Otherwise, throw an error. + + + rep = replacer; + + if (replacer && typeof replacer !== 'function' && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } // Make a fake root object containing our value under the key of ''. + // Return the result of stringifying the value. + + + return str('', { + '': value + }); +}; + +var parse$7 = parse$8; +var stringify = stringify$1; +var jsonify = { + parse: parse$7, + stringify: stringify +}; + +var json$10 = typeof JSON !== 'undefined' ? JSON : jsonify; + +var jsonStableStringify = function jsonStableStringify(obj, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { + cmp: opts + }; + var space = opts.space || ''; + if (typeof space === 'number') space = Array(space + 1).join(' '); + var cycles = typeof opts.cycles === 'boolean' ? opts.cycles : false; + + var replacer = opts.replacer || function (key, value) { + return value; + }; + + var cmp = opts.cmp && function (f) { + return function (node) { + return function (a, b) { + var aobj = { + key: a, + value: node[a] + }; + var bobj = { + key: b, + value: node[b] + }; + return f(aobj, bobj); + }; + }; + }(opts.cmp); + + var seen = []; + return function stringify(parent, key, node, level) { + var indent = space ? '\n' + new Array(level + 1).join(space) : ''; + var colonSeparator = space ? ': ' : ':'; + + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + node = replacer.call(parent, key, node); + + if (node === undefined) { + return; + } + + if (typeof node !== 'object' || node === null) { + return json$10.stringify(node); + } + + if (isArray$1(node)) { + var out = []; + + for (var i = 0; i < node.length; i++) { + var item = stringify(node, i, node[i], level + 1) || json$10.stringify(null); + out.push(indent + space + item); + } + + return '[' + out.join(',') + indent + ']'; + } else { + if (seen.indexOf(node) !== -1) { + if (cycles) return json$10.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } else seen.push(node); + + var keys = objectKeys(node).sort(cmp && cmp(node)); + var out = []; + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node, key, node[key], level + 1); + if (!value) continue; + var keyValue = json$10.stringify(key) + colonSeparator + value; + + out.push(indent + space + keyValue); + } + + seen.splice(seen.indexOf(node), 1); + return '{' + out.join(',') + indent + '}'; + } + }({ + '': obj + }, '', obj, 0); +}; + +var isArray$1 = Array.isArray || function (x) { + return {}.toString.call(x) === '[object Array]'; +}; + +var objectKeys = Object.keys || function (obj) { + var has = Object.prototype.hasOwnProperty || function () { + return true; + }; + + var keys = []; + + for (var key in obj) { + if (has.call(obj, key)) keys.push(key); + } + + return keys; +}; + +function preserveCamelCase(str) { + var isLastCharLower = false; + var isLastCharUpper = false; + var isLastLastCharUpper = false; + + for (var i = 0; i < str.length; i++) { + var c = str[i]; + + if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { + str = str.substr(0, i) + '-' + str.substr(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { + str = str.substr(0, i - 1) + '-' + str.substr(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = c.toLowerCase() === c; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = c.toUpperCase() === c; + } + } + + return str; +} + +var camelcase = function camelcase(str) { + if (arguments.length > 1) { + str = Array.from(arguments).map(function (x) { + return x.trim(); + }).filter(function (x) { + return x.length; + }).join('-'); + } else { + str = str.trim(); + } + + if (str.length === 0) { + return ''; + } + + if (str.length === 1) { + return str.toLowerCase(); + } + + if (/^[a-z0-9]+$/.test(str)) { + return str; + } + + var hasUpperCase = str !== str.toLowerCase(); + + if (hasUpperCase) { + str = preserveCamelCase(str); + } + + return str.replace(/^[_.\- ]+/, '').toLowerCase().replace(/[_.\- ]+(\w|$)/g, function (m, p1) { + return p1.toUpperCase(); + }); +}; + +/*! + * dashify + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ +var dashify = function dashify(str) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + str = str.replace(/([a-z])([A-Z])/g, '$1-$2'); + str = str.replace(/[ \t\W]/g, '-'); + str = str.replace(/^-+|-+$/g, ''); + return str.toLowerCase(); +}; + +var minimist = function minimist(args, opts) { + if (!opts) opts = {}; + var flags = { + bools: {}, + strings: {}, + unknownFn: null + }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + var defaults = opts['default'] || {}; + var argv = { + _: [] + }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--') + 1); + args = args.slice(0, args.indexOf('--')); + } + + function argDefined(key, arg) { + return flags.allBools && /^--[^=]+$/.test(arg) || flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg(key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + + var value = !flags.strings[key] && isNumber(val) ? Number(val) : val; + setKey(argv, key.split('.'), value); + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + function setKey(obj, keys, value) { + var o = obj; + keys.slice(0, -1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + var key = keys[keys.length - 1]; + + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } else if (Array.isArray(o[key])) { + o[key].push(value); + } else { + o[key] = [o[key], value]; + } + } + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + var key = m[1]; + var value = m[2]; + + if (flags.bools[key]) { + value = value !== 'false'; + } + + setArg(key, value, arg); + } else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + + if (next !== undefined && !/^-/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); + i++; + } else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true', arg); + i++; + } else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1, -1).split(''); + var broken = false; + + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j + 2); + + if (next === '-') { + setArg(letters[j], next, arg); + continue; + } + + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + + if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], arg.slice(j + 2), arg); + broken = true; + break; + } else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + var key = arg.slice(-1)[0]; + + if (!broken && key !== '-') { + if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i + 1], arg); + i++; + } else if (args[i + 1] && /true|false/.test(args[i + 1])) { + setArg(key, args[i + 1] === 'true', arg); + i++; + } else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push(flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)); + } + + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + + break; + } + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function (key) { + argv['--'].push(key); + }); + } else { + notFlags.forEach(function (key) { + argv._.push(key); + }); + } + + return argv; +}; + +function hasKey(obj, keys) { + var o = obj; + keys.slice(0, -1).forEach(function (key) { + o = o[key] || {}; + }); + var key = keys[keys.length - 1]; + return key in o; +} + +function isNumber(x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +var PLACEHOLDER = null; +/** + * unspecified boolean flag without default value is parsed as `undefined` instead of `false` + */ + +var minimist_1 = function minimist_1(args, options) { + var boolean = options.boolean || []; + var defaults = options.default || {}; + var booleanWithoutDefault = boolean.filter(function (key) { + return !(key in defaults); + }); + var newDefaults = Object.assign({}, defaults, booleanWithoutDefault.reduce(function (reduced, key) { + return Object.assign(reduced, { + [key]: PLACEHOLDER + }); + }, {})); + var parsed = minimist(args, Object.assign({}, options, { + default: newDefaults + })); + return Object.keys(parsed).reduce(function (reduced, key) { + if (parsed[key] !== PLACEHOLDER) { + reduced[key] = parsed[key]; + } + + return reduced; + }, {}); +}; + +var categoryOrder = [coreOptions$1.CATEGORY_OUTPUT, coreOptions$1.CATEGORY_FORMAT, coreOptions$1.CATEGORY_CONFIG, coreOptions$1.CATEGORY_EDITOR, coreOptions$1.CATEGORY_OTHER]; +/** + * { + * [optionName]: { + * // The type of the option. For 'choice', see also `choices` below. + * // When passing a type other than the ones listed below, the option is + * // treated as taking any string as argument, and `--option <${type}>` will + * // be displayed in --help. + * type: "boolean" | "choice" | "int" | string; + * + * // Default value to be passed to the minimist option `default`. + * default?: any; + * + * // Alias name to be passed to the minimist option `alias`. + * alias?: string; + * + * // For grouping options by category in --help. + * category?: string; + * + * // Description to be displayed in --help. If omitted, the option won't be + * // shown at all in --help (but see also `oppositeDescription` below). + * description?: string; + * + * // Description for `--no-${name}` to be displayed in --help. If omitted, + * // `--no-${name}` won't be shown. + * oppositeDescription?: string; + * + * // Indicate if this option is simply passed to the API. + * // true: use camelified name as the API option name. + * // string: use this value as the API option name. + * forwardToApi?: boolean | string; + * + * // Indicate that a CLI flag should be an array when forwarded to the API. + * array?: boolean; + * + * // Specify available choices for validation. They will also be displayed + * // in --help as . + * // Use an object instead of a string if a choice is deprecated and should + * // be treated as `redirect` instead, or if you'd like to add description for + * // the choice. + * choices?: Array< + * | string + * | { value: string, description?: string, deprecated?: boolean, redirect?: string } + * >; + * + * // If the option has a value that is an exception to the regular value + * // constraints, indicate that value here (or use a function for more + * // flexibility). + * exception?: ((value: any) => boolean); + * + * // Indicate that the option is deprecated. Use a string to add an extra + * // message to --help for the option, for example to suggest a replacement + * // option. + * deprecated?: true | string; + * } + * } + * + * Note: The options below are sorted alphabetically. + */ + +var options$21 = { + color: { + // The supports-color package (a sub sub dependency) looks directly at + // `process.argv` for `--no-color` and such-like options. The reason it is + // listed here is to avoid "Ignored unknown option: --no-color" warnings. + // See https://github.com/chalk/supports-color/#info for more information. + type: "boolean", + default: true, + description: "Colorize error messages.", + oppositeDescription: "Do not colorize error messages." + }, + config: { + type: "path", + category: coreOptions$1.CATEGORY_CONFIG, + description: "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).", + oppositeDescription: "Do not look for a configuration file.", + exception: function exception(value) { + return value === false; + } + }, + "config-precedence": { + type: "choice", + category: coreOptions$1.CATEGORY_CONFIG, + default: "cli-override", + choices: [{ + value: "cli-override", + description: "CLI options take precedence over config file" + }, { + value: "file-override", + description: "Config file take precedence over CLI options" + }, { + value: "prefer-file", + description: dedent_1` + If a config file is found will evaluate it and ignore other CLI options. + If no config file is found CLI options will evaluate as normal. + ` + }], + description: "Define in which order config files and CLI options should be evaluated." + }, + "debug-benchmark": { + // Run the formatting benchmarks. Requires 'benchmark' module to be installed. + type: "boolean" + }, + "debug-check": { + // Run the formatting once again on the formatted output, throw if different. + type: "boolean" + }, + "debug-print-doc": { + type: "boolean" + }, + "debug-repeat": { + // Repeat the formatting a few times and measure the average duration. + type: "int", + default: 0 + }, + editorconfig: { + type: "boolean", + category: coreOptions$1.CATEGORY_CONFIG, + description: "Take .editorconfig into account when parsing configuration.", + oppositeDescription: "Don't take .editorconfig into account when parsing configuration.", + default: true + }, + "find-config-path": { + type: "path", + category: coreOptions$1.CATEGORY_CONFIG, + description: "Find and print the path to a configuration file for the given input file." + }, + "file-info": { + type: "path", + description: dedent_1` + Extract the following info (as JSON) for a given file path. Reported fields: + * ignored (boolean) - true if file path is filtered by --ignore-path + * inferredParser (string | null) - name of parser inferred from file path + ` + }, + help: { + type: "flag", + alias: "h", + description: dedent_1` + Show CLI usage, or details about the given flag. + Example: --help write + `, + exception: function exception(value) { + return value === ""; + } + }, + "ignore-path": { + type: "path", + category: coreOptions$1.CATEGORY_CONFIG, + default: ".prettierignore", + description: "Path to a file with patterns describing files to ignore." + }, + "list-different": { + type: "boolean", + category: coreOptions$1.CATEGORY_OUTPUT, + alias: "l", + description: "Print the names of files that are different from Prettier's formatting." + }, + loglevel: { + type: "choice", + description: "What level of logs to report.", + default: "log", + choices: ["silent", "error", "warn", "log", "debug"] + }, + stdin: { + type: "boolean", + description: "Force reading input from stdin." + }, + "support-info": { + type: "boolean", + description: "Print support information as JSON." + }, + version: { + type: "boolean", + alias: "v", + description: "Print Prettier version." + }, + "with-node-modules": { + type: "boolean", + category: coreOptions$1.CATEGORY_CONFIG, + description: "Process files inside 'node_modules' directory." + }, + write: { + type: "boolean", + category: coreOptions$1.CATEGORY_OUTPUT, + description: "Edit files in-place. (Beware!)" + } +}; +var usageSummary = dedent_1` + Usage: prettier [options] [file/glob ...] + + By default, output is written to stdout. + Stdin is read if it is piped to Prettier and no files are given. +`; +var constant = { + categoryOrder, + options: options$21, + usageSummary +}; + +var OPTION_USAGE_THRESHOLD = 25; +var CHOICE_USAGE_MARGIN = 3; +var CHOICE_USAGE_INDENTATION = 2; + +function getOptions(argv, detailedOptions) { + return detailedOptions.filter(function (option) { + return option.forwardToApi; + }).reduce(function (current, option) { + return Object.assign(current, { + [option.forwardToApi]: argv[option.name] + }); + }, {}); +} + +function cliifyOptions(object, apiDetailedOptionMap) { + return Object.keys(object || {}).reduce(function (output, key) { + var apiOption = apiDetailedOptionMap[key]; + var cliKey = apiOption ? apiOption.name : key; + output[dashify(cliKey)] = object[key]; + return output; + }, {}); +} + +function diff(a, b) { + return lib.createTwoFilesPatch("", "", a, b, "", "", { + context: 2 + }); +} + +function handleError(context, filename, error) { + if (error instanceof errors.UndefinedParserError) { + if (context.argv["write"] && process.stdout.isTTY) { + readline.clearLine(process.stdout, 0); + readline.cursorTo(process.stdout, 0, null); + } + + if (!context.argv["list-different"]) { + process.exitCode = 2; + } + + context.logger.error(error.message); + return; + } + + if (context.argv["write"]) { + // Add newline to split errors from filename line. + process.stdout.write("\n"); + } + + var isParseError = Boolean(error && error.loc); + var isValidationError = /Validation Error/.test(error && error.message); // For parse errors and validation errors, we only want to show the error + // message formatted in a nice way. `String(error)` takes care of that. Other + // (unexpected) errors are passed as-is as a separate argument to + // `console.error`. That includes the stack trace (if any), and shows a nice + // `util.inspect` of throws things that aren't `Error` objects. (The Flow + // parser has mistakenly thrown arrays sometimes.) + + if (isParseError) { + context.logger.error(`${filename}: ${String(error)}`); + } else if (isValidationError || error instanceof errors.ConfigError) { + context.logger.error(String(error)); // If validation fails for one file, it will fail for all of them. + + process.exit(1); + } else if (error instanceof errors.DebugError) { + context.logger.error(`${filename}: ${error.message}`); + } else { + context.logger.error(filename + ": " + (error.stack || error)); + } // Don't exit the process if one file failed + + + process.exitCode = 2; +} + +function logResolvedConfigPathOrDie(context) { + var configFile = prettier$2.resolveConfigFile.sync(context.argv["find-config-path"]); + + if (configFile) { + context.logger.log(path.relative(process.cwd(), configFile)); + } else { + process.exit(1); + } +} + +function logFileInfoOrDie(context) { + var options$$2 = { + ignorePath: context.argv["ignore-path"], + withNodeModules: context.argv["with-node-modules"], + plugins: context.argv["plugin"], + pluginSearchDirs: context.argv["plugin-search-dir"] + }; + context.logger.log(prettier$2.format(jsonStableStringify(prettier$2.getFileInfo.sync(context.argv["file-info"], options$$2)), { + parser: "json" + })); +} + +function writeOutput(context, result, options$$2) { + // Don't use `console.log` here since it adds an extra newline at the end. + process.stdout.write(context.argv["debug-check"] ? result.filepath : result.formatted); + + if (options$$2 && options$$2.cursorOffset >= 0) { + process.stderr.write(result.cursorOffset + "\n"); + } +} + +function listDifferent(context, input, options$$2, filename) { + if (!context.argv["list-different"]) { + return; + } + + try { + if (!options$$2.filepath && !options$$2.parser) { + throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser."); + } + + if (!prettier$2.check(input, options$$2)) { + if (!context.argv["write"]) { + context.logger.log(filename); + } + + process.exitCode = 1; + } + } catch (error) { + context.logger.error(error.message); + } + + return true; +} + +function format$1(context, input, opt) { + if (!opt.parser && !opt.filepath) { + throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser."); + } + + if (context.argv["debug-print-doc"]) { + var doc = prettier$2.__debug.printToDoc(input, opt); + + return { + formatted: prettier$2.__debug.formatDoc(doc) + }; + } + + if (context.argv["debug-check"]) { + var pp = prettier$2.format(input, opt); + var pppp = prettier$2.format(pp, opt); + + if (pp !== pppp) { + throw new errors.DebugError("prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp)); + } else { + var _stringify = function _stringify(obj) { + return JSON.stringify(obj, null, 2); + }; + + var ast = _stringify(prettier$2.__debug.parse(input, opt, + /* massage */ + true).ast); + + var past = _stringify(prettier$2.__debug.parse(pp, opt, + /* massage */ + true).ast); + + if (ast !== past) { + var MAX_AST_SIZE = 2097152; // 2MB + + var astDiff = ast.length > MAX_AST_SIZE || past.length > MAX_AST_SIZE ? "AST diff too large to render" : diff(ast, past); + throw new errors.DebugError("ast(input) !== ast(prettier(input))\n" + astDiff + "\n" + diff(input, pp)); + } + } + + return { + formatted: pp, + filepath: opt.filepath || "(stdin)\n" + }; + } + /* istanbul ignore if */ + + + if (context.argv["debug-benchmark"]) { + var benchmark; + + try { + benchmark = require("benchmark"); + } catch (err) { + context.logger.debug("'--debug-benchmark' requires the 'benchmark' package to be installed."); + process.exit(2); + } + + context.logger.debug("'--debug-benchmark' option found, measuring formatWithCursor with 'benchmark' module."); + var suite = new benchmark.Suite(); + suite.add("format", function () { + prettier$2.formatWithCursor(input, opt); + }).on("cycle", function (event) { + var results = { + benchmark: String(event.target), + hz: event.target.hz, + ms: event.target.times.cycle * 1000 + }; + context.logger.debug("'--debug-benchmark' measurements for formatWithCursor: " + JSON.stringify(results, null, 2)); + }).run({ + async: false + }); + } else if (context.argv["debug-repeat"] > 0) { + var repeat = context.argv["debug-repeat"]; + context.logger.debug("'--debug-repeat' option found, running formatWithCursor " + repeat + " times."); // should be using `performance.now()`, but only `Date` is cross-platform enough + + var now = Date.now ? function () { + return Date.now(); + } : function () { + return +new Date(); + }; + var totalMs = 0; + + for (var i = 0; i < repeat; ++i) { + var startMs = now(); + prettier$2.formatWithCursor(input, opt); + totalMs += now() - startMs; + } + + var averageMs = totalMs / repeat; + var results = { + repeat, + hz: 1000 / averageMs, + ms: averageMs + }; + context.logger.debug("'--debug-repeat' measurements for formatWithCursor: " + JSON.stringify(results, null, 2)); + } + + return prettier$2.formatWithCursor(input, opt); +} + +function getOptionsOrDie(context, filePath) { + try { + if (context.argv["config"] === false) { + context.logger.debug("'--no-config' option found, skip loading config file."); + return null; + } + + context.logger.debug(context.argv["config"] ? `load config file from '${context.argv["config"]}'` : `resolve config from '${filePath}'`); + var options$$2 = prettier$2.resolveConfig.sync(filePath, { + editorconfig: context.argv["editorconfig"], + config: context.argv["config"] + }); + context.logger.debug("loaded options `" + JSON.stringify(options$$2) + "`"); + return options$$2; + } catch (error) { + context.logger.error("Invalid configuration file: " + error.message); + process.exit(2); + } +} + +function getOptionsForFile(context, filepath) { + var options$$2 = getOptionsOrDie(context, filepath); + var hasPlugins = options$$2 && options$$2.plugins; + + if (hasPlugins) { + pushContextPlugins(context, options$$2.plugins); + } + + var appliedOptions = Object.assign({ + filepath + }, applyConfigPrecedence(context, options$$2 && optionsNormalizer.normalizeApiOptions(options$$2, context.supportOptions, { + logger: context.logger + }))); + context.logger.debug(`applied config-precedence (${context.argv["config-precedence"]}): ` + `${JSON.stringify(appliedOptions)}`); + + if (hasPlugins) { + popContextPlugins(context); + } + + return appliedOptions; +} + +function parseArgsToOptions(context, overrideDefaults) { + var minimistOptions = createMinimistOptions(context.detailedOptions); + var apiDetailedOptionMap = createApiDetailedOptionMap(context.detailedOptions); + return getOptions(optionsNormalizer.normalizeCliOptions(minimist_1(context.args, Object.assign({ + string: minimistOptions.string, + boolean: minimistOptions.boolean, + default: cliifyOptions(overrideDefaults, apiDetailedOptionMap) + })), context.detailedOptions, { + logger: false + }), context.detailedOptions); +} + +function applyConfigPrecedence(context, options$$2) { + try { + switch (context.argv["config-precedence"]) { + case "cli-override": + return parseArgsToOptions(context, options$$2); + + case "file-override": + return Object.assign({}, parseArgsToOptions(context), options$$2); + + case "prefer-file": + return options$$2 || parseArgsToOptions(context); + } + } catch (error) { + context.logger.error(error.toString()); + process.exit(2); + } +} + +function formatStdin(context) { + var filepath = context.argv["stdin-filepath"] ? path.resolve(process.cwd(), context.argv["stdin-filepath"]) : process.cwd(); + var ignorer = createIgnorerFromContextOrDie(context); + var relativeFilepath = path.relative(process.cwd(), filepath); + thirdParty$1.getStream(process.stdin).then(function (input) { + if (relativeFilepath && ignorer.filter([relativeFilepath]).length === 0) { + writeOutput(context, { + formatted: input + }); + return; + } + + var options$$2 = getOptionsForFile(context, filepath); + + try { + if (listDifferent(context, input, options$$2, "(stdin)")) { + return; + } + + writeOutput(context, format$1(context, input, options$$2), options$$2); + } catch (error) { + handleError(context, "stdin", error); + } + }); +} + +function createIgnorerFromContextOrDie(context) { + try { + return createIgnorer_1.sync(context.argv["ignore-path"], context.argv["with-node-modules"]); + } catch (e) { + context.logger.error(e.message); + process.exit(2); + } +} + +function eachFilename(context, patterns, callback) { + // The '!./' globs are due to https://github.com/prettier/prettier/issues/2110 + var ignoreNodeModules = context.argv["with-node-modules"] !== true; + + if (ignoreNodeModules) { + patterns = patterns.concat(["!**/node_modules/**", "!./node_modules/**"]); + } + + patterns = patterns.concat(["!**/.{git,svn,hg}/**", "!./.{git,svn,hg}/**"]); + + try { + var filePaths = globby.sync(patterns, { + dot: true, + nodir: true + }).map(function (filePath) { + return path.relative(process.cwd(), filePath); + }); + + if (filePaths.length === 0) { + context.logger.error(`No matching files. Patterns tried: ${patterns.join(" ")}`); + process.exitCode = 2; + return; + } + + filePaths.forEach(function (filePath) { + return callback(filePath, Object.assign(getOptionsForFile(context, filePath), { + filepath: filePath + })); + }); + } catch (error) { + context.logger.error(`Unable to expand glob patterns: ${patterns.join(" ")}\n${error.message}`); // Don't exit the process if one pattern failed + + process.exitCode = 2; + } +} + +function formatFiles(context) { + // The ignorer will be used to filter file paths after the glob is checked, + // before any files are actually written + var ignorer = createIgnorerFromContextOrDie(context); + eachFilename(context, context.filePatterns, function (filename, options$$2) { + var fileIgnored = ignorer.filter([filename]).length === 0; + + if (fileIgnored && (context.argv["debug-check"] || context.argv["write"] || context.argv["list-different"])) { + return; + } + + if (context.argv["write"] && process.stdout.isTTY) { + // Don't use `console.log` here since we need to replace this line. + context.logger.log(filename, { + newline: false + }); + } + + var input; + + try { + input = fs.readFileSync(filename, "utf8"); + } catch (error) { + // Add newline to split errors from filename line. + context.logger.log(""); + context.logger.error(`Unable to read file: ${filename}\n${error.message}`); // Don't exit the process if one file failed + + process.exitCode = 2; + return; + } + + if (fileIgnored) { + writeOutput(context, { + formatted: input + }, options$$2); + return; + } + + var start = Date.now(); + var result; + var output; + + try { + result = format$1(context, input, Object.assign({}, options$$2, { + filepath: filename + })); + output = result.formatted; + } catch (error) { + handleError(context, filename, error); + return; + } + + var isDifferent = output !== input; + + if (context.argv["list-different"] && isDifferent) { + context.logger.log(filename); + process.exitCode = 1; + } + + if (context.argv["write"]) { + if (process.stdout.isTTY) { + // Remove previously printed filename to log it with duration. + readline.clearLine(process.stdout, 0); + readline.cursorTo(process.stdout, 0, null); + } // Don't write the file if it won't change in order not to invalidate + // mtime based caches. + + + if (isDifferent) { + if (!context.argv["list-different"]) { + context.logger.log(`${filename} ${Date.now() - start}ms`); + } + + try { + fs.writeFileSync(filename, output, "utf8"); + } catch (error) { + context.logger.error(`Unable to write file: ${filename}\n${error.message}`); // Don't exit the process if one file failed + + process.exitCode = 2; + } + } else if (!context.argv["list-different"]) { + context.logger.log(`${chalk$2.grey(filename)} ${Date.now() - start}ms`); + } + } else if (context.argv["debug-check"]) { + if (result.filepath) { + context.logger.log(result.filepath); + } else { + process.exitCode = 2; + } + } else if (!context.argv["list-different"]) { + writeOutput(context, result, options$$2); + } + }); +} + +function getOptionsWithOpposites(options$$2) { + // Add --no-foo after --foo. + var optionsWithOpposites = options$$2.map(function (option) { + return [option.description ? option : null, option.oppositeDescription ? Object.assign({}, option, { + name: `no-${option.name}`, + type: "boolean", + description: option.oppositeDescription + }) : null]; + }); + return flattenArray(optionsWithOpposites).filter(Boolean); +} + +function createUsage(context) { + var options$$2 = getOptionsWithOpposites(context.detailedOptions).filter( // remove unnecessary option (e.g. `semi`, `color`, etc.), which is only used for --help + function (option) { + return !(option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-")); + }); + var groupedOptions = groupBy(options$$2, function (option) { + return option.category; + }); + var firstCategories = constant.categoryOrder.slice(0, -1); + var lastCategories = constant.categoryOrder.slice(-1); + var restCategories = Object.keys(groupedOptions).filter(function (category) { + return firstCategories.indexOf(category) === -1 && lastCategories.indexOf(category) === -1; + }); + var allCategories = firstCategories.concat(restCategories, lastCategories); + var optionsUsage = allCategories.map(function (category) { + var categoryOptions = groupedOptions[category].map(function (option) { + return createOptionUsage(context, option, OPTION_USAGE_THRESHOLD); + }).join("\n"); + return `${category} options:\n\n${indent$11(categoryOptions, 2)}`; + }); + return [constant.usageSummary].concat(optionsUsage, [""]).join("\n\n"); +} + +function createOptionUsage(context, option, threshold) { + var header = createOptionUsageHeader(option); + var optionDefaultValue = getOptionDefaultValue(context, option.name); + return createOptionUsageRow(header, `${option.description}${optionDefaultValue === undefined ? "" : `\nDefaults to ${createDefaultValueDisplay(optionDefaultValue)}.`}`, threshold); +} + +function createDefaultValueDisplay(value) { + return Array.isArray(value) ? `[${value.map(createDefaultValueDisplay).join(", ")}]` : value; +} + +function createOptionUsageHeader(option) { + var name = `--${option.name}`; + var alias = option.alias ? `-${option.alias},` : null; + var type = createOptionUsageType(option); + return [alias, name, type].filter(Boolean).join(" "); +} + +function createOptionUsageRow(header, content, threshold) { + var separator = header.length >= threshold ? `\n${" ".repeat(threshold)}` : " ".repeat(threshold - header.length); + var description = content.replace(/\n/g, `\n${" ".repeat(threshold)}`); + return `${header}${separator}${description}`; +} + +function createOptionUsageType(option) { + switch (option.type) { + case "boolean": + return null; + + case "choice": + return `<${option.choices.filter(function (choice) { + return choice.since !== null; + }).filter(function (choice) { + return !choice.deprecated; + }).map(function (choice) { + return choice.value; + }).join("|")}>`; + + default: + return `<${option.type}>`; + } +} + +function flattenArray(array) { + return [].concat.apply([], array); +} + +function createChoiceUsages(choices, margin, indentation) { + var activeChoices = choices.filter(function (choice) { + return !choice.deprecated && choice.since !== null; + }); + var threshold = activeChoices.map(function (choice) { + return choice.value.length; + }).reduce(function (current, length) { + return Math.max(current, length); + }, 0) + margin; + return activeChoices.map(function (choice) { + return indent$11(createOptionUsageRow(choice.value, choice.description, threshold), indentation); + }); +} + +function createDetailedUsage(context, flag) { + var option = getOptionsWithOpposites(context.detailedOptions).find(function (option) { + return option.name === flag || option.alias === flag; + }); + var header = createOptionUsageHeader(option); + var description = `\n\n${indent$11(option.description, 2)}`; + var choices = option.type !== "choice" ? "" : `\n\nValid options:\n\n${createChoiceUsages(option.choices, CHOICE_USAGE_MARGIN, CHOICE_USAGE_INDENTATION).join("\n")}`; + var optionDefaultValue = getOptionDefaultValue(context, option.name); + var defaults = optionDefaultValue !== undefined ? `\n\nDefault: ${createDefaultValueDisplay(optionDefaultValue)}` : ""; + var pluginDefaults = option.pluginDefaults && Object.keys(option.pluginDefaults).length ? `\nPlugin defaults:${Object.keys(option.pluginDefaults).map(function (key) { + return `\n* ${key}: ${createDefaultValueDisplay(option.pluginDefaults[key])}`; + })}` : ""; + return `${header}${description}${choices}${defaults}${pluginDefaults}`; +} + +function getOptionDefaultValue(context, optionName) { + // --no-option + if (!(optionName in context.detailedOptionMap)) { + return undefined; + } + + var option = context.detailedOptionMap[optionName]; + + if (option.default !== undefined) { + return option.default; + } + + var optionCamelName = camelcase(optionName); + + if (optionCamelName in context.apiDefaultOptions) { + return context.apiDefaultOptions[optionCamelName]; + } + + return undefined; +} + +function indent$11(str, spaces) { + return str.replace(/^/gm, " ".repeat(spaces)); +} + +function groupBy(array, getKey) { + return array.reduce(function (obj, item) { + var key = getKey(item); + var previousItems = key in obj ? obj[key] : []; + return Object.assign({}, obj, { + [key]: previousItems.concat(item) + }); + }, Object.create(null)); +} + +function pick(object, keys) { + return !keys ? object : keys.reduce(function (reduced, key) { + return Object.assign(reduced, { + [key]: object[key] + }); + }, {}); +} + +function createLogger(logLevel) { + return { + warn: createLogFunc("warn", "yellow"), + error: createLogFunc("error", "red"), + debug: createLogFunc("debug", "blue"), + log: createLogFunc("log") + }; + + function createLogFunc(loggerName, color) { + if (!shouldLog(loggerName)) { + return function () {}; + } + + var prefix = color ? `[${chalk$2[color](loggerName)}] ` : ""; + return function (message, opts) { + opts = Object.assign({ + newline: true + }, opts); + var stream = process[loggerName === "log" ? "stdout" : "stderr"]; + stream.write(message.replace(/^/gm, prefix) + (opts.newline ? "\n" : "")); + }; + } + + function shouldLog(loggerName) { + switch (logLevel) { + case "silent": + return false; + + default: + return true; + + case "debug": + if (loggerName === "debug") { + return true; + } + + // fall through + + case "log": + if (loggerName === "log") { + return true; + } + + // fall through + + case "warn": + if (loggerName === "warn") { + return true; + } + + // fall through + + case "error": + return loggerName === "error"; + } + } +} + +function normalizeDetailedOption(name, option) { + return Object.assign({ + category: coreOptions$1.CATEGORY_OTHER + }, option, { + choices: option.choices && option.choices.map(function (choice) { + var newChoice = Object.assign({ + description: "", + deprecated: false + }, typeof choice === "object" ? choice : { + value: choice + }); + + if (newChoice.value === true) { + newChoice.value = ""; // backward compability for original boolean option + } + + return newChoice; + }) + }); +} + +function normalizeDetailedOptionMap(detailedOptionMap) { + return Object.keys(detailedOptionMap).sort().reduce(function (normalized, name) { + var option = detailedOptionMap[name]; + return Object.assign(normalized, { + [name]: normalizeDetailedOption(name, option) + }); + }, {}); +} + +function createMinimistOptions(detailedOptions) { + return { + // we use vnopts' AliasSchema to handle aliases for better error messages + alias: {}, + boolean: detailedOptions.filter(function (option) { + return option.type === "boolean"; + }).map(function (option) { + return [option.name].concat(option.alias || []); + }).reduce(function (a, b) { + return a.concat(b); + }), + string: detailedOptions.filter(function (option) { + return option.type !== "boolean"; + }).map(function (option) { + return [option.name].concat(option.alias || []); + }).reduce(function (a, b) { + return a.concat(b); + }), + default: detailedOptions.filter(function (option) { + return !option.deprecated; + }).filter(function (option) { + return !option.forwardToApi || option.name === "plugin" || option.name === "plugin-search-dir"; + }).filter(function (option) { + return option.default !== undefined; + }).reduce(function (current, option) { + return Object.assign({ + [option.name]: option.default + }, current); + }, {}) + }; +} + +function createApiDetailedOptionMap(detailedOptions) { + return detailedOptions.reduce(function (current, option) { + return option.forwardToApi && option.forwardToApi !== option.name ? Object.assign(current, { + [option.forwardToApi]: option + }) : current; + }, {}); +} + +function createDetailedOptionMap(supportOptions) { + return supportOptions.reduce(function (reduced, option) { + var newOption = Object.assign({}, option, { + name: option.cliName || dashify(option.name), + description: option.cliDescription || option.description, + category: option.cliCategory || coreOptions$1.CATEGORY_FORMAT, + forwardToApi: option.name + }); + + if (option.deprecated) { + delete newOption.forwardToApi; + delete newOption.description; + delete newOption.oppositeDescription; + newOption.deprecated = true; + } + + return Object.assign(reduced, { + [newOption.name]: newOption + }); + }, {}); +} //-----------------------------context-util-start------------------------------- + +/** + * @typedef {Object} Context + * @property logger + * @property args + * @property argv + * @property filePatterns + * @property supportOptions + * @property detailedOptions + * @property detailedOptionMap + * @property apiDefaultOptions + */ + + +function createContext(args) { + var context = { + args + }; + updateContextArgv(context); + normalizeContextArgv(context, ["loglevel", "plugin", "plugin-search-dir"]); + context.logger = createLogger(context.argv["loglevel"]); + updateContextArgv(context, context.argv["plugin"], context.argv["plugin-search-dir"]); + return context; +} + +function initContext(context) { + // split into 2 step so that we could wrap this in a `try..catch` in cli/index.js + normalizeContextArgv(context); +} + +function updateContextOptions(context, plugins, pluginSearchDirs) { + var supportOptions = prettier$2.getSupportInfo(null, { + showDeprecated: true, + showUnreleased: true, + showInternal: true, + plugins, + pluginSearchDirs + }).options; + var detailedOptionMap = normalizeDetailedOptionMap(Object.assign({}, createDetailedOptionMap(supportOptions), constant.options)); + var detailedOptions = arrayify(detailedOptionMap, "name"); + var apiDefaultOptions = supportOptions.filter(function (optionInfo) { + return !optionInfo.deprecated; + }).reduce(function (reduced, optionInfo) { + return Object.assign(reduced, { + [optionInfo.name]: optionInfo.default + }); + }, Object.assign({}, options.hiddenDefaults)); + context.supportOptions = supportOptions; + context.detailedOptions = detailedOptions; + context.detailedOptionMap = detailedOptionMap; + context.apiDefaultOptions = apiDefaultOptions; +} + +function pushContextPlugins(context, plugins, pluginSearchDirs) { + context._supportOptions = context.supportOptions; + context._detailedOptions = context.detailedOptions; + context._detailedOptionMap = context.detailedOptionMap; + context._apiDefaultOptions = context.apiDefaultOptions; + updateContextOptions(context, plugins, pluginSearchDirs); +} + +function popContextPlugins(context) { + context.supportOptions = context._supportOptions; + context.detailedOptions = context._detailedOptions; + context.detailedOptionMap = context._detailedOptionMap; + context.apiDefaultOptions = context._apiDefaultOptions; +} + +function updateContextArgv(context, plugins, pluginSearchDirs) { + pushContextPlugins(context, plugins, pluginSearchDirs); + var minimistOptions = createMinimistOptions(context.detailedOptions); + var argv = minimist_1(context.args, minimistOptions); + context.argv = argv; + context.filePatterns = argv["_"]; +} + +function normalizeContextArgv(context, keys) { + var detailedOptions = !keys ? context.detailedOptions : context.detailedOptions.filter(function (option) { + return keys.indexOf(option.name) !== -1; + }); + var argv = !keys ? context.argv : pick(context.argv, keys); + context.argv = optionsNormalizer.normalizeCliOptions(argv, detailedOptions, { + logger: context.logger + }); +} //------------------------------context-util-end-------------------------------- + + +var util$5 = { + createContext, + createDetailedOptionMap, + createDetailedUsage, + createUsage, + format: format$1, + formatFiles, + formatStdin, + initContext, + logResolvedConfigPathOrDie, + logFileInfoOrDie, + normalizeDetailedOptionMap +}; + +function run(args) { + var context = util$5.createContext(args); + + try { + util$5.initContext(context); + context.logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`); + + if (context.argv["write"] && context.argv["debug-check"]) { + context.logger.error("Cannot use --write and --debug-check together."); + process.exit(1); + } + + if (context.argv["find-config-path"] && context.filePatterns.length) { + context.logger.error("Cannot use --find-config-path with multiple files"); + process.exit(1); + } + + if (context.argv["file-info"] && context.filePatterns.length) { + context.logger.error("Cannot use --file-info with multiple files"); + process.exit(1); + } + + if (context.argv["version"]) { + context.logger.log(prettier$2.version); + process.exit(0); + } + + if (context.argv["help"] !== undefined) { + context.logger.log(typeof context.argv["help"] === "string" && context.argv["help"] !== "" ? util$5.createDetailedUsage(context, context.argv["help"]) : util$5.createUsage(context)); + process.exit(0); + } + + if (context.argv["support-info"]) { + context.logger.log(prettier$2.format(jsonStableStringify(prettier$2.getSupportInfo()), { + parser: "json" + })); + process.exit(0); + } + + var hasFilePatterns = context.filePatterns.length !== 0; + var useStdin = context.argv["stdin"] || !hasFilePatterns && !process.stdin.isTTY; + + if (context.argv["find-config-path"]) { + util$5.logResolvedConfigPathOrDie(context); + } else if (context.argv["file-info"]) { + util$5.logFileInfoOrDie(context); + } else if (useStdin) { + util$5.formatStdin(context); + } else if (hasFilePatterns) { + util$5.formatFiles(context); + } else { + context.logger.log(util$5.createUsage(context)); + process.exit(1); + } + } catch (error) { + context.logger.error(error.message); + process.exit(1); + } +} + +var cli = { + run +}; + +cli.run(process.argv.slice(2)); +var prettier = {}; + +module.exports = prettier; diff --git a/node_modules/prettier/index.js b/node_modules/prettier/index.js new file mode 100644 index 0000000..d952f1f --- /dev/null +++ b/node_modules/prettier/index.js @@ -0,0 +1,41847 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var fs = _interopDefault(require('fs')); +var os = _interopDefault(require('os')); +var path = _interopDefault(require('path')); +var assert = _interopDefault(require('assert')); +var util = _interopDefault(require('util')); +var events = _interopDefault(require('events')); +var thirdParty = require('./third-party'); +var thirdParty__default = thirdParty['default']; + +var name = "prettier"; +var version$1 = "1.15.2"; +var description = "Prettier is an opinionated code formatter"; +var bin = { + "prettier": "./bin/prettier.js" +}; +var repository = "prettier/prettier"; +var homepage = "https://prettier.io"; +var author = "James Long"; +var license = "MIT"; +var main = "./index.js"; +var engines = { + "node": ">=6" +}; +var dependencies = { + "@angular/compiler": "6.1.10", + "@babel/code-frame": "7.0.0-beta.46", + "@babel/parser": "7.1.5", + "@glimmer/syntax": "0.30.3", + "@iarna/toml": "2.0.0", + "angular-estree-parser": "1.1.5", + "angular-html-parser": "1.0.0", + "camelcase": "4.1.0", + "chalk": "2.1.0", + "cjk-regex": "2.0.0", + "cosmiconfig": "5.0.6", + "dashify": "0.2.2", + "dedent": "0.7.0", + "diff": "3.2.0", + "editorconfig": "0.15.2", + "editorconfig-to-prettier": "0.1.0", + "emoji-regex": "6.5.1", + "escape-string-regexp": "1.0.5", + "esutils": "2.0.2", + "find-parent-dir": "0.3.0", + "find-project-root": "1.1.1", + "flow-parser": "0.84.0", + "get-stream": "3.0.0", + "globby": "6.1.0", + "graphql": "0.13.2", + "html-element-attributes": "2.0.0", + "html-styles": "1.0.0", + "html-tag-names": "1.1.2", + "ignore": "3.3.7", + "jest-docblock": "23.2.0", + "json-stable-stringify": "1.0.1", + "leven": "2.1.0", + "lines-and-columns": "1.1.6", + "linguist-languages": "6.2.1-dev.20180706", + "lodash.uniqby": "4.7.0", + "mem": "1.1.0", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "n-readlines": "1.0.0", + "normalize-path": "3.0.0", + "parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee", + "postcss-less": "1.1.5", + "postcss-media-query-parser": "0.2.3", + "postcss-scss": "1.0.6", + "postcss-selector-parser": "2.2.3", + "postcss-values-parser": "1.5.0", + "regexp-util": "1.2.2", + "remark-math": "1.0.4", + "remark-parse": "5.0.0", + "resolve": "1.5.0", + "semver": "5.4.1", + "string-width": "2.1.1", + "typescript": "3.0.1", + "typescript-estree": "1.0.0", + "unicode-regex": "2.0.0", + "unified": "6.1.6", + "vnopts": "1.0.2", + "yaml": "1.0.0-rc.8", + "yaml-unist-parser": "1.0.0-rc.4" +}; +var devDependencies = { + "@babel/cli": "7.1.5", + "@babel/core": "7.1.5", + "@babel/preset-env": "7.1.5", + "babel-loader": "8.0.4", + "benchmark": "2.1.4", + "builtin-modules": "2.0.0", + "codecov": "2.2.0", + "cross-env": "5.0.5", + "eslint": "4.18.2", + "eslint-config-prettier": "2.9.0", + "eslint-friendly-formatter": "3.0.0", + "eslint-plugin-import": "2.9.0", + "eslint-plugin-prettier": "2.6.0", + "eslint-plugin-react": "7.7.0", + "execa": "0.10.0", + "jest": "23.3.0", + "jest-junit": "5.0.0", + "jest-snapshot-serializer-ansi": "1.0.0", + "jest-snapshot-serializer-raw": "1.1.0", + "jest-watch-typeahead": "0.1.0", + "mkdirp": "0.5.1", + "prettier": "1.15.1", + "prettylint": "1.0.0", + "rimraf": "2.6.2", + "rollup": "0.47.6", + "rollup-plugin-alias": "1.4.0", + "rollup-plugin-babel": "4.0.0-beta.4", + "rollup-plugin-commonjs": "8.2.6", + "rollup-plugin-json": "2.1.1", + "rollup-plugin-node-builtins": "2.0.0", + "rollup-plugin-node-globals": "1.1.0", + "rollup-plugin-node-resolve": "2.0.0", + "rollup-plugin-replace": "1.2.1", + "rollup-plugin-uglify": "3.0.0", + "shelljs": "0.8.1", + "snapshot-diff": "0.4.0", + "strip-ansi": "4.0.0", + "tempy": "0.2.1", + "webpack": "3.12.0" +}; +var resolutions = { + "@babel/code-frame": "7.0.0-beta.46" +}; +var scripts = { + "prepublishOnly": "echo \"Error: must publish from dist/\" && exit 1", + "prepare-release": "yarn && yarn build && yarn test:dist", + "test": "jest", + "test:dist": "node ./scripts/test-dist.js", + "test-integration": "jest tests_integration", + "perf-repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "perf-repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "perf-benchmark": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-benchmark --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "lint": "cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter", + "lint-docs": "prettylint {.,docs,website,website/blog}/*.md", + "build": "node --max-old-space-size=2048 ./scripts/build/build.js", + "build-docs": "node ./scripts/build-docs.js", + "check-deps": "node ./scripts/check-deps.js" +}; +var _package = { + name: name, + version: version$1, + description: description, + bin: bin, + repository: repository, + homepage: homepage, + author: author, + license: license, + main: main, + engines: engines, + dependencies: dependencies, + devDependencies: devDependencies, + resolutions: resolutions, + scripts: scripts +}; + +var _package$1 = Object.freeze({ + name: name, + version: version$1, + description: description, + bin: bin, + repository: repository, + homepage: homepage, + author: author, + license: license, + main: main, + engines: engines, + dependencies: dependencies, + devDependencies: devDependencies, + resolutions: resolutions, + scripts: scripts, + default: _package +}); + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + +function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var base = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports['default'] = + /*istanbul ignore end*/ + Diff; + + function Diff() {} + + Diff.prototype = { + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + diff: function diff(oldString, newString) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + var callback = options.callback; + + if (typeof options === 'function') { + callback = options; + options = {}; + } + + this.options = options; + var self = this; + + function done(value) { + if (callback) { + setTimeout(function () { + callback(undefined, value); + }, 0); + return true; + } else { + return value; + } + } // Allow subclasses to massage the input prior to running + + + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, + oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + // Identity per the equality and tokenizer + return done([{ + value: this.join(newString), + count: newString.length + }]); + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = + /*istanbul ignore start*/ + void 0; + + var addPath = bestPath[diagonalPath - 1], + removePath = bestPath[diagonalPath + 1], + _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen, + canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + + + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list + + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } + + _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done + + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } + + editLength++; + } // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced. + + + if (callback) { + (function exec() { + setTimeout(function () { + // This should not happen, but we want to be safe. + + /* istanbul ignore next */ + if (editLength > maxEditLength) { + return callback(); + } + + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + pushComponent: function pushComponent(components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; + } else { + components.push({ + count: 1, + added: added, + removed: removed + }); + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, + oldLen = oldString.length, + newPos = basePath.newPos, + oldPos = newPos - diagonalPath, + commonCount = 0; + + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + + basePath.newPos = newPos; + return oldPos; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + equals: function equals(left, right) { + return left === right; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + removeEmpty: function removeEmpty(array) { + var ret = []; + + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + + return ret; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + castInput: function castInput(value) { + return value; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + tokenize: function tokenize(value) { + return value.split(''); + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + join: function join(chars) { + return chars.join(''); + } + }; + + function buildValues(diff, components, newString, oldString, useLongestToken) { + var componentPos = 0, + componentLen = components.length, + newPos = 0, + oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = diff.join(value); + } else { + component.value = diff.join(newString.slice(newPos, newPos + component.count)); + } + + newPos += component.count; // Common case + + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; // Reverse add and remove so removes are output first to match common convention + // The diffing algorithm is tied to add then remove output and this is the simplest + // route to get the desired output with minimal overhead. + + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } // Special case handle for when one terminal is ignored. For this case we merge the + // terminal into the prior string and drop the change. + + + var lastComponent = components[componentLen - 1]; + + if (componentLen > 1 && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + + return components; + } + + function clonePath(path$$1) { + return { + newPos: path$$1.newPos, + components: path$$1.components.slice(0) + }; + } +}); +unwrapExports(base); + +var character = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.characterDiff = undefined; + exports. + /*istanbul ignore end*/ + diffChars = diffChars; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var characterDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + characterDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + function diffChars(oldStr, newStr, callback) { + return characterDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(character); + +var params = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + generateOptions = generateOptions; + + function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } else if (options) { + for (var name in options) { + /* istanbul ignore else */ + if (options.hasOwnProperty(name)) { + defaults[name] = options[name]; + } + } + } + + return defaults; + } +}); +unwrapExports(params); + +var word = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.wordDiff = undefined; + exports. + /*istanbul ignore end*/ + diffWords = diffWords; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWordsWithSpace = diffWordsWithSpace; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode + // + // Ranges and exceptions: + // Latin-1 Supplement, 0080–00FF + // - U+00D7 × Multiplication sign + // - U+00F7 ÷ Division sign + // Latin Extended-A, 0100–017F + // Latin Extended-B, 0180–024F + // IPA Extensions, 0250–02AF + // Spacing Modifier Letters, 02B0–02FF + // - U+02C7 ˇ ˇ Caron + // - U+02D8 ˘ ˘ Breve + // - U+02D9 ˙ ˙ Dot Above + // - U+02DA ˚ ˚ Ring Above + // - U+02DB ˛ ˛ Ogonek + // - U+02DC ˜ ˜ Small Tilde + // - U+02DD ˝ ˝ Double Acute Accent + // Latin Extended Additional, 1E00–1EFF + + + var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; + var reWhitespace = /\S/; + var wordDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + wordDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + wordDiff.equals = function (left, right) { + return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); + }; + + wordDiff.tokenize = function (value) { + var tokens = value.split(/(\s+|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. + + for (var i = 0; i < tokens.length - 1; i++) { + // If we have an empty string in the next field and we have only word chars before and after, merge + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + + return tokens; + }; + + function diffWords(oldStr, newStr, callback) { + var options = + /*istanbul ignore start*/ + (0, params.generateOptions + /*istanbul ignore end*/ + )(callback, { + ignoreWhitespace: true + }); + return wordDiff.diff(oldStr, newStr, options); + } + + function diffWordsWithSpace(oldStr, newStr, callback) { + return wordDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(word); + +var line = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.lineDiff = undefined; + exports. + /*istanbul ignore end*/ + diffLines = diffLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffTrimmedLines = diffTrimmedLines; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var lineDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + lineDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + lineDiff.tokenize = function (value) { + var retLines = [], + linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line + + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } // Merge the content and line separators into single tokens + + + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + + retLines.push(line); + } + } + + return retLines; + }; + + function diffLines(oldStr, newStr, callback) { + return lineDiff.diff(oldStr, newStr, callback); + } + + function diffTrimmedLines(oldStr, newStr, callback) { + var options = + /*istanbul ignore start*/ + (0, params.generateOptions + /*istanbul ignore end*/ + )(callback, { + ignoreWhitespace: true + }); + return lineDiff.diff(oldStr, newStr, options); + } +}); +unwrapExports(line); + +var sentence = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.sentenceDiff = undefined; + exports. + /*istanbul ignore end*/ + diffSentences = diffSentences; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var sentenceDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + sentenceDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + sentenceDiff.tokenize = function (value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); + }; + + function diffSentences(oldStr, newStr, callback) { + return sentenceDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(sentence); + +var css = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.cssDiff = undefined; + exports. + /*istanbul ignore end*/ + diffCss = diffCss; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var cssDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + cssDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + cssDiff.tokenize = function (value) { + return value.split(/([{}:;,]|\s+)/); + }; + + function diffCss(oldStr, newStr, callback) { + return cssDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(css); + +var json = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.jsonDiff = undefined; + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + }; + + exports. + /*istanbul ignore end*/ + diffJson = diffJson; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + canonicalize = canonicalize; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var objectPrototypeToString = Object.prototype.toString; + var jsonDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + jsonDiff = new + /*istanbul ignore start*/ + _base2['default'](); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a + // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + + jsonDiff.useLongestToken = true; + jsonDiff.tokenize = + /*istanbul ignore start*/ + line.lineDiff. + /*istanbul ignore end*/ + tokenize; + + jsonDiff.castInput = function (value) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + undefinedReplacement = this.options.undefinedReplacement; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value), function (k, v) { + if (typeof v === 'undefined') { + return undefinedReplacement; + } + + return v; + }, ' '); + }; + + jsonDiff.equals = function (left, right) { + return ( + /*istanbul ignore start*/ + _base2['default']. + /*istanbul ignore end*/ + prototype.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')) + ); + }; + + function diffJson(oldObj, newObj, options) { + return jsonDiff.diff(oldObj, newObj, options); + } // This function handles the presence of circular references by bailing out when encountering an + // object that is already on the "stack" of items being processed. + + + function canonicalize(obj, stack, replacementStack) { + stack = stack || []; + replacementStack = replacementStack || []; + var i = + /*istanbul ignore start*/ + void 0; + + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + + var canonicalizedObj = + /*istanbul ignore start*/ + void 0; + + if ('[object Array]' === objectPrototypeToString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack); + } + + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + + if ( + /*istanbul ignore start*/ + (typeof + /*istanbul ignore end*/ + obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + var sortedKeys = [], + key = + /*istanbul ignore start*/ + void 0; + + for (key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(key)) { + sortedKeys.push(key); + } + } + + sortedKeys.sort(); + + for (i = 0; i < sortedKeys.length; i += 1) { + key = sortedKeys[i]; + canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack); + } + + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + + return canonicalizedObj; + } +}); +unwrapExports(json); + +var array = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.arrayDiff = undefined; + exports. + /*istanbul ignore end*/ + diffArrays = diffArrays; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var arrayDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + arrayDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + arrayDiff.tokenize = arrayDiff.join = function (value) { + return value.slice(); + }; + + function diffArrays(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); + } +}); +unwrapExports(array); + +var parse = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + parsePatch = parsePatch; + + function parsePatch(uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], + list = [], + i = 0; + + function parseIndex() { + var index = {}; + list.push(index); // Parse diff metadata + + while (i < diffstr.length) { + var line = diffstr[i]; // File header found, end parsing diff metadata + + if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { + break; + } // Diff index + + + var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); + + if (header) { + index.index = header[1]; + } + + i++; + } // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + + + parseFileHeader(index); + parseFileHeader(index); // Parse hunks + + index.hunks = []; + + while (i < diffstr.length) { + var _line = diffstr[i]; + + if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { + break; + } else if (/^@@/.test(_line)) { + index.hunks.push(parseHunk()); + } else if (_line && options.strict) { + // Ignore unexpected content unless in strict mode + throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); + } else { + i++; + } + } + } // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + + + function parseFileHeader(index) { + var headerPattern = /^(---|\+\+\+)\s+([\S ]*)(?:\t(.*?)\s*)?$/; + var fileHeader = headerPattern.exec(diffstr[i]); + + if (fileHeader) { + var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; + index[keyPrefix + 'FileName'] = fileHeader[2]; + index[keyPrefix + 'Header'] = fileHeader[3]; + i++; + } + } // Parses a hunk + // This assumes that we are at the start of a hunk. + + + function parseHunk() { + var chunkHeaderIndex = i, + chunkHeaderLine = diffstr[i++], + chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + var hunk = { + oldStart: +chunkHeader[1], + oldLines: +chunkHeader[2] || 1, + newStart: +chunkHeader[3], + newLines: +chunkHeader[4] || 1, + lines: [], + linedelimiters: [] + }; + var addCount = 0, + removeCount = 0; + + for (; i < diffstr.length; i++) { + // Lines starting with '---' could be mistaken for the "remove line" operation + // But they could be the header for the next file. Therefore prune such cases out. + if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { + break; + } + + var operation = diffstr[i][0]; + + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + hunk.linedelimiters.push(delimiters[i] || '\n'); + + if (operation === '+') { + addCount++; + } else if (operation === '-') { + removeCount++; + } else if (operation === ' ') { + addCount++; + removeCount++; + } + } else { + break; + } + } // Handle the empty block count case + + + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } // Perform optional sanity checking + + + if (options.strict) { + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + } + + return hunk; + } + + while (i < diffstr.length) { + parseIndex(); + } + + return list; + } +}); +unwrapExports(parse); + +var distanceIterator = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + "use strict"; + + exports.__esModule = true; + + exports["default"] = + /*istanbul ignore end*/ + function (start, minLine, maxLine) { + var wantForward = true, + backwardExhausted = false, + forwardExhausted = false, + localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } else { + wantForward = false; + } // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + + + if (start + localOffset <= maxLine) { + return localOffset; + } + + forwardExhausted = true; + } + + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + + + if (minLine <= start - localOffset) { + return -localOffset++; + } + + backwardExhausted = true; + return iterator(); + } // We tried to fit hunk before text beginning and beyond text lenght, then + // hunk can't fit on the text. Return undefined + + }; + }; +}); +unwrapExports(distanceIterator); + +var apply = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + applyPatch = applyPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatches = applyPatches; + /*istanbul ignore start*/ + + var _distanceIterator2 = _interopRequireDefault(distanceIterator); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + function applyPatch(source, uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (0, parse.parsePatch + /*istanbul ignore end*/ + )(uniDiff); + } + + if (Array.isArray(uniDiff)) { + if (uniDiff.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + + uniDiff = uniDiff[0]; + } // Apply the diff to the input + + + var lines = source.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], + hunks = uniDiff.hunks, + compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) + /*istanbul ignore start*/ + { + return ( + /*istanbul ignore end*/ + line === patchContent + ); + }, + errorCount = 0, + fuzzFactor = options.fuzzFactor || 0, + minLine = 0, + offset = 0, + removeEOFNL = + /*istanbul ignore start*/ + void 0 + /*istanbul ignore end*/ + , + addEOFNL = + /*istanbul ignore start*/ + void 0; + /** + * Checks if the hunk exactly fits on the provided location + */ + + + function hunkFits(hunk, toPos) { + for (var j = 0; j < hunk.lines.length; j++) { + var line = hunk.lines[j], + operation = line[0], + content = line.substr(1); + + if (operation === ' ' || operation === '-') { + // Context sanity check + if (!compareLine(toPos + 1, lines[toPos], operation, content)) { + errorCount++; + + if (errorCount > fuzzFactor) { + return false; + } + } + + toPos++; + } + } + + return true; + } // Search best fit offsets for each hunk based on the previous ones + + + for (var i = 0; i < hunks.length; i++) { + var hunk = hunks[i], + maxLine = lines.length - hunk.oldLines, + localOffset = 0, + toPos = offset + hunk.oldStart - 1; + var iterator = + /*istanbul ignore start*/ + (0, _distanceIterator2['default'] + /*istanbul ignore end*/ + )(toPos, minLine, maxLine); + + for (; localOffset !== undefined; localOffset = iterator()) { + if (hunkFits(hunk, toPos + localOffset)) { + hunk.offset = offset += localOffset; + break; + } + } + + if (localOffset === undefined) { + return false; + } // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + + + minLine = hunk.offset + hunk.oldStart + hunk.oldLines; + } // Apply patch hunks + + + for (var _i = 0; _i < hunks.length; _i++) { + var _hunk = hunks[_i], + _toPos = _hunk.offset + _hunk.newStart - 1; + + if (_hunk.newLines == 0) { + _toPos++; + } + + for (var j = 0; j < _hunk.lines.length; j++) { + var line = _hunk.lines[j], + operation = line[0], + content = line.substr(1), + delimiter = _hunk.linedelimiters[j]; + + if (operation === ' ') { + _toPos++; + } else if (operation === '-') { + lines.splice(_toPos, 1); + delimiters.splice(_toPos, 1); + /* istanbul ignore else */ + } else if (operation === '+') { + lines.splice(_toPos, 0, content); + delimiters.splice(_toPos, 0, delimiter); + _toPos++; + } else if (operation === '\\') { + var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; + + if (previousOperation === '+') { + removeEOFNL = true; + } else if (previousOperation === '-') { + addEOFNL = true; + } + } + } + } // Handle EOFNL insertion/removal + + + if (removeEOFNL) { + while (!lines[lines.length - 1]) { + lines.pop(); + delimiters.pop(); + } + } else if (addEOFNL) { + lines.push(''); + delimiters.push('\n'); + } + + for (var _k = 0; _k < lines.length - 1; _k++) { + lines[_k] = lines[_k] + delimiters[_k]; + } + + return lines.join(''); + } // Wrapper that supports multiple file patches via callbacks. + + + function applyPatches(uniDiff, options) { + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (0, parse.parsePatch + /*istanbul ignore end*/ + )(uniDiff); + } + + var currentIndex = 0; + + function processIndex() { + var index = uniDiff[currentIndex++]; + + if (!index) { + return options.complete(); + } + + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + + var updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + + processIndex(); + }); + }); + } + + processIndex(); + } +}); +unwrapExports(apply); + +var create = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + structuredPatch = structuredPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createTwoFilesPatch = createTwoFilesPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createPatch = createPatch; + /*istanbul ignore start*/ + + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return Array.from(arr); + } + } + /*istanbul ignore end*/ + + + function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (!options) { + options = {}; + } + + if (typeof options.context === 'undefined') { + options.context = 4; + } + + var diff = + /*istanbul ignore start*/ + (0, line.diffLines + /*istanbul ignore end*/ + )(oldStr, newStr, options); + diff.push({ + value: '', + lines: [] + }); // Append an empty value to make cleanup easier + + function contextLines(lines) { + return lines.map(function (entry) { + return ' ' + entry; + }); + } + + var hunks = []; + var oldRangeStart = 0, + newRangeStart = 0, + curRange = [], + oldLine = 1, + newLine = 1; + /*istanbul ignore start*/ + + var _loop = function _loop( + /*istanbul ignore end*/ + i) { + var current = diff[i], + lines = current.lines || current.value.replace(/\n$/, '').split('\n'); + current.lines = lines; + + if (current.added || current.removed) { + /*istanbul ignore start*/ + var _curRange; + /*istanbul ignore end*/ + // If we have previous context, start with that + + + if (!oldRangeStart) { + var prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + + if (prev) { + curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } // Output our changes + + /*istanbul ignore start*/ + + + (_curRange = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + lines.map(function (entry) { + return (current.added ? '+' : '-') + entry; + }))); // Track the updated file position + + + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } + } else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= options.context * 2 && i < diff.length - 2) { + /*istanbul ignore start*/ + var _curRange2; + /*istanbul ignore end*/ + // Overlapping + + /*istanbul ignore start*/ + + + (_curRange2 = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange2 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + contextLines(lines))); + } else { + /*istanbul ignore start*/ + var _curRange3; + /*istanbul ignore end*/ + // end the range and output + + + var contextSize = Math.min(lines.length, options.context); + /*istanbul ignore start*/ + + (_curRange3 = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange3 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + contextLines(lines.slice(0, contextSize)))); + + var hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + + if (i >= diff.length - 2 && lines.length <= options.context) { + // EOF is inside this hunk + var oldEOFNewline = /\n$/.test(oldStr); + var newEOFNewline = /\n$/.test(newStr); + + if (lines.length == 0 && !oldEOFNewline) { + // special case: old has no eol and no trailing context; no-nl can end up before adds + curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); + } else if (!oldEOFNewline || !newEOFNewline) { + curRange.push('\\ No newline at end of file'); + } + } + + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + + oldLine += lines.length; + newLine += lines.length; + } + }; + + for (var i = 0; i < diff.length; i++) { + /*istanbul ignore start*/ + _loop( + /*istanbul ignore end*/ + i); + } + + return { + oldFileName: oldFileName, + newFileName: newFileName, + oldHeader: oldHeader, + newHeader: newHeader, + hunks: hunks + }; + } + + function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + var ret = []; + + if (oldFileName == newFileName) { + ret.push('Index: ' + oldFileName); + } + + ret.push('==================================================================='); + ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); + ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); + + for (var i = 0; i < diff.hunks.length; i++) { + var hunk = diff.hunks[i]; + ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); + ret.push.apply(ret, hunk.lines); + } + + return ret.join('\n') + '\n'; + } + + function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); + } +}); +unwrapExports(create); + +var dmp = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + "use strict"; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + convertChangesToDMP = convertChangesToDMP; // See: http://code.google.com/p/google-diff-match-patch/wiki/API + + function convertChangesToDMP(changes) { + var ret = [], + change = + /*istanbul ignore start*/ + void 0 + /*istanbul ignore end*/ + , + operation = + /*istanbul ignore start*/ + void 0; + + for (var i = 0; i < changes.length; i++) { + change = changes[i]; + + if (change.added) { + operation = 1; + } else if (change.removed) { + operation = -1; + } else { + operation = 0; + } + + ret.push([operation, change.value]); + } + + return ret; + } +}); +unwrapExports(dmp); + +var xml = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + convertChangesToXML = convertChangesToXML; + + function convertChangesToXML(changes) { + var ret = []; + + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + + ret.push(escapeHTML(change.value)); + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + } + + return ret.join(''); + } + + function escapeHTML(s) { + var n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; + } +}); +unwrapExports(xml); + +var lib = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.diffArrays = exports.diffJson = exports.diffCss = exports.diffSentences = exports.diffTrimmedLines = exports.diffLines = exports.diffWordsWithSpace = exports.diffWords = exports.diffChars = exports.Diff = undefined; + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + + exports. + /*istanbul ignore end*/ + Diff = _base2['default']; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffChars = character.diffChars; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWords = word.diffWords; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWordsWithSpace = word.diffWordsWithSpace; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffLines = line.diffLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffTrimmedLines = line.diffTrimmedLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffSentences = sentence.diffSentences; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffCss = css.diffCss; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffJson = json.diffJson; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffArrays = array.diffArrays; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + structuredPatch = create.structuredPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createTwoFilesPatch = create.createTwoFilesPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createPatch = create.createPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatch = apply.applyPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatches = apply.applyPatches; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + parsePatch = parse.parsePatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + convertChangesToDMP = dmp.convertChangesToDMP; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + convertChangesToXML = xml.convertChangesToXML; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + canonicalize = json.canonicalize; + /* See LICENSE file for terms of use */ + + /* + * Text diff implementation. + * + * This library supports the following APIS: + * JsDiff.diffChars: Character by character diff + * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace + * JsDiff.diffLines: Line based diff + * + * JsDiff.diffCss: Diff targeted at CSS content + * + * These methods are based on the implementation proposed in + * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). + * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 + */ +}); +unwrapExports(lib); + +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ +var normalizePath = function normalizePath(path$$1, stripTrailing) { + if (typeof path$$1 !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path$$1 === '\\' || path$$1 === '/') return '/'; + var len = path$$1.length; + if (len <= 1) return path$$1; // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + + var prefix = ''; + + if (len > 4 && path$$1[3] === '\\') { + var ch = path$$1[2]; + + if ((ch === '?' || ch === '.') && path$$1.slice(0, 2) === '\\\\') { + path$$1 = path$$1.slice(2); + prefix = '//'; + } + } + + var segs = path$$1.split(/[/\\]+/); + + if (stripTrailing !== false && segs[segs.length - 1] === '') { + segs.pop(); + } + + return prefix + segs.join('/'); +}; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); +} + +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !_isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct(Class, arguments, _getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return _setPrototypeOf(Wrapper, Class); + }; + + return _wrapNativeSuper(Class); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _getPrototypeOf(object); + if (object === null) break; + } + + return object; +} + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = _superPropBase(target, property); + + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} + +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); +} + +function _toArray(arr) { + return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); +} + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} + +function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + + return typeof key === "symbol" ? key : String(key); +} + +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + + keys.push(element.key); +} + +function _fromElementDescriptor(element) { + var obj = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + return obj; +} + +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + return _toArray(elementObjects).map(function (elementObject) { + var element = _toElementDescriptor(elementObject); + + _disallowProperty(elementObject, "finisher", "An element descriptor"); + + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} + +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + + if (kind !== "method" && kind !== "field") { + throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"'); + } + + var key = _toPropertyKey(elementObject.key); + + var placement = String(elementObject.placement); + + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"'); + } + + var descriptor = elementObject.descriptor; + + _disallowProperty(elementObject, "elements", "An element descriptor"); + + var element = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor) + }; + + if (kind !== "field") { + _disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + + element.initializer = elementObject.initializer; + } + + return element; +} + +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + + var finisher = _optionalCallableProperty(elementObject, "finisher"); + + var extras = _toElementDescriptors(elementObject.extras); + + return { + element: element, + finisher: finisher, + extras: extras + }; +} + +function _fromClassDescriptor(elements) { + var obj = { + kind: "class", + elements: elements.map(_fromElementDescriptor) + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + return obj; +} + +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + + if (kind !== "class") { + throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"'); + } + + _disallowProperty(obj, "key", "A class descriptor"); + + _disallowProperty(obj, "placement", "A class descriptor"); + + _disallowProperty(obj, "descriptor", "A class descriptor"); + + _disallowProperty(obj, "initializer", "A class descriptor"); + + _disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + + var elements = _toElementDescriptors(obj.elements); + + return { + elements: elements, + finisher: finisher + }; +} + +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } +} + +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} + +/** + * @class + */ + + +var LineByLine = +/*#__PURE__*/ +function () { + function LineByLine(file, options) { + _classCallCheck(this, LineByLine); + + options = options || {}; + if (!options.readChunk) options.readChunk = 1024; + + if (!options.newLineCharacter) { + options.newLineCharacter = 0x0a; //linux line ending + } else { + options.newLineCharacter = options.newLineCharacter.charCodeAt(0); + } + + if (typeof file === 'number') { + this.fd = file; + } else { + this.fd = fs.openSync(file, 'r'); + } + + this.options = options; + this.newLineCharacter = options.newLineCharacter; + this.reset(); + } + + _createClass(LineByLine, [{ + key: "_searchInBuffer", + value: function _searchInBuffer(buffer, hexNeedle) { + var found = -1; + + for (var i = 0; i <= buffer.length; i++) { + var b_byte = buffer[i]; + + if (b_byte === hexNeedle) { + found = i; + break; + } + } + + return found; + } + }, { + key: "reset", + value: function reset() { + this.eofReached = false; + this.linesCache = []; + this.fdPosition = 0; + } + }, { + key: "close", + value: function close() { + fs.closeSync(this.fd); + this.fd = null; + } + }, { + key: "_extractLines", + value: function _extractLines(buffer) { + var line; + var lines = []; + var bufferPosition = 0; + var lastNewLineBufferPosition = 0; + + while (true) { + var bufferPositionValue = buffer[bufferPosition++]; + + if (bufferPositionValue === this.newLineCharacter) { + line = buffer.slice(lastNewLineBufferPosition, bufferPosition); + lines.push(line); + lastNewLineBufferPosition = bufferPosition; + } else if (!bufferPositionValue) { + break; + } + } + + var leftovers = buffer.slice(lastNewLineBufferPosition, bufferPosition); + + if (leftovers.length) { + lines.push(leftovers); + } + + return lines; + } + }, { + key: "_readChunk", + value: function _readChunk(lineLeftovers) { + var totalBytesRead = 0; + var bytesRead; + var buffers = []; + + do { + var readBuffer = new Buffer(this.options.readChunk); + bytesRead = fs.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition); + totalBytesRead = totalBytesRead + bytesRead; + this.fdPosition = this.fdPosition + bytesRead; + buffers.push(readBuffer); + } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1); + + var bufferData = Buffer.concat(buffers); + + if (bytesRead < this.options.readChunk) { + this.eofReached = true; + bufferData = bufferData.slice(0, totalBytesRead); + } + + if (totalBytesRead) { + this.linesCache = this._extractLines(bufferData); + + if (lineLeftovers) { + this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]); + } + } + + return totalBytesRead; + } + }, { + key: "next", + value: function next() { + if (!this.fd) return false; + var line = false; + + if (this.eofReached && this.linesCache.length === 0) { + return line; + } + + var bytesRead; + + if (!this.linesCache.length) { + bytesRead = this._readChunk(); + } + + if (this.linesCache.length) { + line = this.linesCache.shift(); + var lastLineCharacter = line[line.length - 1]; + + if (lastLineCharacter !== 0x0a) { + bytesRead = this._readChunk(line); + + if (bytesRead) { + line = this.linesCache.shift(); + } + } + } + + if (this.eofReached && this.linesCache.length === 0) { + this.close(); + } + + if (line && line[line.length - 1] === this.newLineCharacter) { + line = line.slice(0, line.length - 1); + } + + return line; + } + }]); + + return LineByLine; +}(); + +var readlines = LineByLine; + +var ConfigError = +/*#__PURE__*/ +function (_Error) { + _inherits(ConfigError, _Error); + + function ConfigError() { + _classCallCheck(this, ConfigError); + + return _possibleConstructorReturn(this, _getPrototypeOf(ConfigError).apply(this, arguments)); + } + + return ConfigError; +}(_wrapNativeSuper(Error)); + +var DebugError = +/*#__PURE__*/ +function (_Error2) { + _inherits(DebugError, _Error2); + + function DebugError() { + _classCallCheck(this, DebugError); + + return _possibleConstructorReturn(this, _getPrototypeOf(DebugError).apply(this, arguments)); + } + + return DebugError; +}(_wrapNativeSuper(Error)); + +var UndefinedParserError$1 = +/*#__PURE__*/ +function (_Error3) { + _inherits(UndefinedParserError, _Error3); + + function UndefinedParserError() { + _classCallCheck(this, UndefinedParserError); + + return _possibleConstructorReturn(this, _getPrototypeOf(UndefinedParserError).apply(this, arguments)); + } + + return UndefinedParserError; +}(_wrapNativeSuper(Error)); + +var errors = { + ConfigError, + DebugError, + UndefinedParserError: UndefinedParserError$1 +}; + +var semver = createCommonjsModule(function (module, exports) { + exports = module.exports = SemVer; // The debug function is excluded entirely from the minified version. + + /* nomin */ + + var debug; + /* nomin */ + + if (typeof process === 'object' && + /* nomin */ + process.env && + /* nomin */ + process.env.NODE_DEBUG && + /* nomin */ + /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ + debug = function debug() { + /* nomin */ + var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ + + args.unshift('SEMVER'); + /* nomin */ + + console.log.apply(console, args); + /* nomin */ + }; + /* nomin */ + else + /* nomin */ + debug = function debug() {}; // Note: this is the semver.org version of the spec that it implements + // Not necessarily the package version of this code. + + exports.SEMVER_SPEC_VERSION = '2.0.0'; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; // The actual regexps go on exports.re + + var re = exports.re = []; + var src = exports.src = []; + var R = 0; // The following Regular Expressions can be used for tokenizing, + // validating, and parsing SemVer version strings. + // ## Numeric Identifier + // A single `0`, or a non-zero digit followed by zero or more digits. + + var NUMERICIDENTIFIER = R++; + src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; + var NUMERICIDENTIFIERLOOSE = R++; + src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; // ## Non-numeric Identifier + // Zero or more digits, followed by a letter or hyphen, and then zero or + // more letters, digits, or hyphens. + + var NONNUMERICIDENTIFIER = R++; + src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; // ## Main Version + // Three dot-separated numeric identifiers. + + var MAINVERSION = R++; + src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')'; + var MAINVERSIONLOOSE = R++; + src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; // ## Pre-release Version Identifier + // A numeric identifier, or a non-numeric identifier. + + var PRERELEASEIDENTIFIER = R++; + src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')'; + var PRERELEASEIDENTIFIERLOOSE = R++; + src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')'; // ## Pre-release Version + // Hyphen, followed by one or more dot-separated pre-release version + // identifiers. + + var PRERELEASE = R++; + src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + var PRERELEASELOOSE = R++; + src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; // ## Build Metadata Identifier + // Any combination of digits, letters, or hyphens. + + var BUILDIDENTIFIER = R++; + src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; // ## Build Metadata + // Plus sign, followed by one or more period-separated build metadata + // identifiers. + + var BUILD = R++; + src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; // ## Full Version String + // A main version, followed optionally by a pre-release version and + // build metadata. + // Note that the only major, minor, patch, and pre-release sections of + // the version string are capturing groups. The build metadata is not a + // capturing group, because it should not ever be used in version + // comparison. + + var FULL = R++; + var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?'; + src[FULL] = '^' + FULLPLAIN + '$'; // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. + // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty + // common in the npm registry. + + var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?'; + var LOOSE = R++; + src[LOOSE] = '^' + LOOSEPLAIN + '$'; + var GTLT = R++; + src[GTLT] = '((?:<|>)?=?)'; // Something like "2.*" or "1.2.x". + // Note that "x.x" is a valid xRange identifer, meaning "any version" + // Only the first item is strictly required. + + var XRANGEIDENTIFIERLOOSE = R++; + src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; + var XRANGEIDENTIFIER = R++; + src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + var XRANGEPLAIN = R++; + src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGEPLAINLOOSE = R++; + src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGE = R++; + src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; + var XRANGELOOSE = R++; + src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; // Tilde ranges. + // Meaning is "reasonably at or greater than" + + var LONETILDE = R++; + src[LONETILDE] = '(?:~>?)'; + var TILDETRIM = R++; + src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; + re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); + var tildeTrimReplace = '$1~'; + var TILDE = R++; + src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; + var TILDELOOSE = R++; + src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; // Caret ranges. + // Meaning is "at least and backwards compatible with" + + var LONECARET = R++; + src[LONECARET] = '(?:\\^)'; + var CARETTRIM = R++; + src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; + re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); + var caretTrimReplace = '$1^'; + var CARET = R++; + src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; + var CARETLOOSE = R++; + src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; // A simple gt/lt/eq thing, or just "" to indicate "any version" + + var COMPARATORLOOSE = R++; + src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; + var COMPARATOR = R++; + src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; // An expression to strip any whitespace between the gtlt and the thing + // it modifies, so that `> 1.2.3` ==> `>1.2.3` + + var COMPARATORTRIM = R++; + src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; // this one has to use the /g flag + + re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); + var comparatorTrimReplace = '$1$2$3'; // Something like `1.2.3 - 1.2.4` + // Note that these all use the loose form, because they'll be + // checked against either the strict or loose comparator form + // later. + + var HYPHENRANGE = R++; + src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$'; + var HYPHENRANGELOOSE = R++; + src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$'; // Star ranges basically just allow anything at all. + + var STAR = R++; + src[STAR] = '(<|>)?=?\\s*\\*'; // Compile to actual regexp objects. + // All are flag-free, unless they were created above with a flag. + + for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) re[i] = new RegExp(src[i]); + } + + exports.parse = parse; + + function parse(version, loose) { + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + if (version.length > MAX_LENGTH) return null; + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } + } + + exports.valid = valid; + + function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; + } + + exports.clean = clean; + + function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; + } + + exports.SemVer = SemVer; + + function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) return version;else version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters'); + if (!(this instanceof SemVer)) return new SemVer(version, loose); + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + if (!m) throw new TypeError('Invalid Version: ' + version); + this.raw = version; // these are actually numbers + + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError('Invalid major version'); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError('Invalid minor version'); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError('Invalid patch version'); // numberify any prerelease numeric ids + + if (!m[4]) this.prerelease = [];else this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + + return id; + }); + this.build = m[5] ? m[5].split('.') : []; + this.format(); + } + + SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) this.version += '-' + this.prerelease.join('.'); + return this.version; + }; + + SemVer.prototype.toString = function () { + return this.version; + }; + + SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); + return this.compareMain(other) || this.comparePre(other); + }; + + SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + + SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); // NOT having a prerelease is > having one + + if (this.prerelease.length && !other.prerelease.length) return -1;else if (!this.prerelease.length && other.prerelease.length) return 1;else if (!this.prerelease.length && !other.prerelease.length) return 0; + var i = 0; + + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) return 0;else if (b === undefined) return 1;else if (a === undefined) return -1;else if (a === b) continue;else return compareIdentifiers(a, b); + } while (++i); + }; // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + + + SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + + case 'prerelease': + if (this.prerelease.length === 0) this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + + case 'pre': + if (this.prerelease.length === 0) this.prerelease = [0];else { + var i = this.prerelease.length; + + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; + } else this.prerelease = [identifier, 0]; + } + + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + + this.format(); + this.raw = this.version; + return this; + }; + + exports.inc = inc; + + function inc(version, release, loose, identifier) { + if (typeof loose === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + + exports.diff = diff; + + function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre' + key; + } + } + } + + return 'prerelease'; + } + + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } + } + + exports.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : a > b ? 1 : 0; + } + + exports.rcompareIdentifiers = rcompareIdentifiers; + + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + + exports.major = major; + + function major(a, loose) { + return new SemVer(a, loose).major; + } + + exports.minor = minor; + + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + + exports.patch = patch; + + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + + exports.compare = compare; + + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + + exports.compareLoose = compareLoose; + + function compareLoose(a, b) { + return compare(a, b, true); + } + + exports.rcompare = rcompare; + + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + + exports.sort = sort; + + function sort(list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose); + }); + } + + exports.rsort = rsort; + + function rsort(list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose); + }); + } + + exports.gt = gt; + + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + + exports.lt = lt; + + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + + exports.eq = eq; + + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + + exports.neq = neq; + + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + + exports.gte = gte; + + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + + exports.lte = lte; + + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + + exports.cmp = cmp; + + function cmp(a, op, b, loose) { + var ret; + + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + + case '': + case '=': + case '==': + ret = eq(a, b, loose); + break; + + case '!=': + ret = neq(a, b, loose); + break; + + case '>': + ret = gt(a, b, loose); + break; + + case '>=': + ret = gte(a, b, loose); + break; + + case '<': + ret = lt(a, b, loose); + break; + + case '<=': + ret = lte(a, b, loose); + break; + + default: + throw new TypeError('Invalid operator: ' + op); + } + + return ret; + } + + exports.Comparator = Comparator; + + function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) return comp;else comp = comp.value; + } + + if (!(this instanceof Comparator)) return new Comparator(comp, loose); + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + if (this.semver === ANY) this.value = '';else this.value = this.operator + this.semver.version; + debug('comp', this); + } + + var ANY = {}; + + Comparator.prototype.parse = function (comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + if (!m) throw new TypeError('Invalid comparator: ' + comp); + this.operator = m[1]; + if (this.operator === '=') this.operator = ''; // if it literally is just '>' or '' then allow anything. + + if (!m[2]) this.semver = ANY;else this.semver = new SemVer(m[2], this.loose); + }; + + Comparator.prototype.toString = function () { + return this.value; + }; + + Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.loose); + if (this.semver === ANY) return true; + if (typeof version === 'string') version = new SemVer(version, this.loose); + return cmp(version, this.operator, this.semver, this.loose); + }; + + Comparator.prototype.intersects = function (comp, loose) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, loose); + return satisfies(this.value, rangeTmp, loose); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, loose); + return satisfies(comp.semver, rangeTmp, loose); + } + + var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, loose) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<'); + var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, loose) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>'); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + + exports.Range = Range; + + function Range(range, loose) { + if (range instanceof Range) { + if (range.loose === loose) { + return range; + } else { + return new Range(range.raw, loose); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, loose); + } + + if (!(this instanceof Range)) return new Range(range, loose); + this.loose = loose; // First, split based on boolean or || + + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()); + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); + } + + Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; + }; + + Range.prototype.toString = function () { + return this.range; + }; + + Range.prototype.parseRange = function (range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); // `~ 1.2.3` => `~1.2.3` + + range = range.replace(re[TILDETRIM], tildeTrimReplace); // `^ 1.2.3` => `^1.2.3` + + range = range.replace(re[CARETTRIM], caretTrimReplace); // normalize spaces + + range = range.split(/\s+/).join(' '); // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe); + }); + } + + set = set.map(function (comp) { + return new Comparator(comp, loose); + }); + return set; + }; + + Range.prototype.intersects = function (range, loose) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, loose); + }); + }); + }); + }); + }; // Mostly just for testing and legacy API reasons + + + exports.toComparators = toComparators; + + function toComparators(range, loose) { + return new Range(range, loose).set.map(function (comp) { + return comp.map(function (c) { + return c.value; + }).join(' ').trim().split(' '); + }); + } // comprised of xranges, tildes, stars, and gtlt's at this point. + // already replaced the hyphen ranges + // turn into a set of JUST comparators. + + + function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; + } + + function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; + } // ~, ~> --> * (any, kinda silly) + // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 + // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 + // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 + // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 + // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 + + + function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, loose); + }).join(' '); + } + + function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + debug('tilde return', ret); + return ret; + }); + } // ^ --> * (any, kinda silly) + // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 + // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 + // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 + // ^1.2.3 --> >=1.2.3 <2.0.0 + // ^1.2.0 --> >=1.2.0 <2.0.0 + + + function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, loose); + }).join(' '); + } + + function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) { + if (M === '0') ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0'; + } + debug('caret return', ret); + return ret; + }); + } + + function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, loose); + }).join(' '); + } + + function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === '=' && anyX) gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) m = 0; + if (xp) p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) M = +M + 1;else m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + return ret; + }); + } // Because * is AND-ed with everything else in the comparator, + // and '' means "any version", just remove the *s entirely. + + + function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); // Looseness is ignored here. star is always as loose as it gets! + + return comp.trim().replace(re[STAR], ''); + } // This function is passed to string.replace(re[HYPHENRANGE]) + // M, m, patch, prerelease, build + // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 + // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do + // 1.2 - 3.4 => >=1.2.0 <3.5.0 + + + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) from = '';else if (isX(fm)) from = '>=' + fM + '.0.0';else if (isX(fp)) from = '>=' + fM + '.' + fm + '.0';else from = '>=' + from; + if (isX(tM)) to = '';else if (isX(tm)) to = '<' + (+tM + 1) + '.0.0';else if (isX(tp)) to = '<' + tM + '.' + (+tm + 1) + '.0';else if (tpr) to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;else to = '<=' + to; + return (from + ' ' + to).trim(); + } // if ANY of the sets match ALL of its comparators, then pass + + + Range.prototype.test = function (version) { + if (!version) return false; + if (typeof version === 'string') version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) return true; + } + + return false; + }; + + function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } // Version has a -pre, but it's not one of the ones we like. + + + return false; + } + + return true; + } + + exports.satisfies = satisfies; + + function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + + return range.test(version); + } + + exports.maxSatisfying = maxSatisfying; + + function maxSatisfying(versions, range, loose) { + var max = null; + var maxSV = null; + + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, loose) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v; + maxSV = new SemVer(max, loose); + } + } + }); + return max; + } + + exports.minSatisfying = minSatisfying; + + function minSatisfying(versions, range, loose) { + var min = null; + var minSV = null; + + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, loose) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v; + minSV = new SemVer(min, loose); + } + } + }); + return min; + } + + exports.validRange = validRange; + + function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } + } // Determine if version is less than all the versions possible in the range + + + exports.ltr = ltr; + + function ltr(version, range, loose) { + return outside(version, range, '<', loose); + } // Determine if version is greater than all the versions possible in the range. + + + exports.gtr = gtr; + + function gtr(version, range, loose) { + return outside(version, range, '>', loose); + } + + exports.outside = outside; + + function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + var gtfn, ltefn, ltfn, comp, ecomp; + + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } // If it satisifes the range it is not outside + + + if (satisfies(version, range, loose)) { + return false; + } // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + var high = null; + var low = null; + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0'); + } + + high = high || comparator; + low = low || comparator; + + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); // If the edge version comparator has a operator then our version + // isn't outside it + + if (high.operator === comp || high.operator === ecomp) { + return false; + } // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + + + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + + return true; + } + + exports.prerelease = prerelease; + + function prerelease(version, loose) { + var parsed = parse(version, loose); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + + exports.intersects = intersects; + + function intersects(r1, r2, loose) { + r1 = new Range(r1, loose); + r2 = new Range(r2, loose); + return r1.intersects(r2); + } +}); + +var arrayify = function arrayify(object, keyName) { + return Object.keys(object).reduce(function (array, key) { + return array.concat(Object.assign({ + [keyName]: key + }, object[key])); + }, []); +}; + +var dedent_1 = createCommonjsModule(function (module) { + "use strict"; + + function dedent(strings) { + var raw = void 0; + + if (typeof strings === "string") { + // dedent can be used as a plain function + raw = [strings]; + } else { + raw = strings.raw; + } // first, perform interpolation + + + var result = ""; + + for (var i = 0; i < raw.length; i++) { + result += raw[i]. // join lines when there is a suppressed newline + replace(/\\\n[ \t]*/g, ""). // handle escaped backticks + replace(/\\`/g, "`"); + + if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) { + result += arguments.length <= i + 1 ? undefined : arguments[i + 1]; + } + } // now strip indentation + + + var lines = result.split("\n"); + var mindent = null; + lines.forEach(function (l) { + var m = l.match(/^(\s+)\S+/); + + if (m) { + var indent = m[1].length; + + if (!mindent) { + // this is the first indented line + mindent = indent; + } else { + mindent = Math.min(mindent, indent); + } + } + }); + + if (mindent !== null) { + result = lines.map(function (l) { + return l[0] === " " ? l.slice(mindent) : l; + }).join("\n"); + } // dedent eats leading and trailing whitespace too + + + result = result.trim(); // handle escaped newlines at the end to ensure they don't get stripped too + + return result.replace(/\\n/g, "\n"); + } + + { + module.exports = dedent; + } +}); + +var CATEGORY_CONFIG = "Config"; +var CATEGORY_EDITOR = "Editor"; +var CATEGORY_FORMAT = "Format"; +var CATEGORY_OTHER = "Other"; +var CATEGORY_OUTPUT = "Output"; +var CATEGORY_GLOBAL = "Global"; +var CATEGORY_SPECIAL = "Special"; +/** + * @typedef {Object} OptionInfo + * @property {string} since - available since version + * @property {string} category + * @property {'int' | 'boolean' | 'choice' | 'path'} type + * @property {boolean} array - indicate it's an array of the specified type + * @property {boolean?} deprecated - deprecated since version + * @property {OptionRedirectInfo?} redirect - redirect deprecated option + * @property {string} description + * @property {string?} oppositeDescription - for `false` option + * @property {OptionValueInfo} default + * @property {OptionRangeInfo?} range - for type int + * @property {OptionChoiceInfo?} choices - for type choice + * @property {(value: any) => boolean} exception + * + * @typedef {number | boolean | string} OptionValue + * @typedef {OptionValue | [{ value: OptionValue[] }] | Array<{ since: string, value: OptionValue}>} OptionValueInfo + * + * @typedef {Object} OptionRedirectInfo + * @property {string} option + * @property {OptionValue} value + * + * @typedef {Object} OptionRangeInfo + * @property {number} start - recommended range start + * @property {number} end - recommended range end + * @property {number} step - recommended range step + * + * @typedef {Object} OptionChoiceInfo + * @property {boolean | string} value - boolean for the option that is originally boolean type + * @property {string?} description - undefined if redirect + * @property {string?} since - undefined if available since the first version of the option + * @property {string?} deprecated - deprecated since version + * @property {OptionValueInfo?} redirect - redirect deprecated value + * + * @property {string?} cliName + * @property {string?} cliCategory + * @property {string?} cliDescription + */ + +/** @type {{ [name: string]: OptionInfo } */ + +var options$2 = { + cursorOffset: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: -1, + range: { + start: -1, + end: Infinity, + step: 1 + }, + description: dedent_1` + Print (to stderr) where a cursor at the given position would move to after formatting. + This option cannot be used with --range-start and --range-end. + `, + cliCategory: CATEGORY_EDITOR + }, + endOfLine: { + since: "1.15.0", + category: CATEGORY_GLOBAL, + type: "choice", + default: "auto", + description: "Which end of line characters to apply.", + choices: [{ + value: "auto", + description: dedent_1` + Maintain existing + (mixed values within one file are normalised by looking at what's used after the first line) + ` + }, { + value: "lf", + description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" + }, { + value: "crlf", + description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" + }, { + value: "cr", + description: "Carriage Return character only (\\r), used very rarely" + }] + }, + filepath: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "path", + description: "Specify the input filepath. This will be used to do parser inference.", + cliName: "stdin-filepath", + cliCategory: CATEGORY_OTHER, + cliDescription: "Path to the file to pretend that stdin comes from." + }, + insertPragma: { + since: "1.8.0", + category: CATEGORY_SPECIAL, + type: "boolean", + default: false, + description: "Insert @format pragma into file's first docblock comment.", + cliCategory: CATEGORY_OTHER + }, + parser: { + since: "0.0.10", + category: CATEGORY_GLOBAL, + type: "choice", + default: [{ + since: "0.0.10", + value: "babylon" + }, { + since: "1.13.0", + value: undefined + }], + description: "Which parser to use.", + exception: function exception(value) { + return typeof value === "string" || typeof value === "function"; + }, + choices: [{ + value: "flow", + description: "Flow" + }, { + value: "babylon", + description: "JavaScript" + }, { + value: "typescript", + since: "1.4.0", + description: "TypeScript" + }, { + value: "css", + since: "1.7.1", + description: "CSS" + }, { + value: "postcss", + since: "1.4.0", + description: "CSS/Less/SCSS", + deprecated: "1.7.1", + redirect: "css" + }, { + value: "less", + since: "1.7.1", + description: "Less" + }, { + value: "scss", + since: "1.7.1", + description: "SCSS" + }, { + value: "json", + since: "1.5.0", + description: "JSON" + }, { + value: "json5", + since: "1.13.0", + description: "JSON5" + }, { + value: "json-stringify", + since: "1.13.0", + description: "JSON.stringify" + }, { + value: "graphql", + since: "1.5.0", + description: "GraphQL" + }, { + value: "markdown", + since: "1.8.0", + description: "Markdown" + }, { + value: "mdx", + since: "1.15.0", + description: "MDX" + }, { + value: "vue", + since: "1.10.0", + description: "Vue" + }, { + value: "yaml", + since: "1.14.0", + description: "YAML" + }, { + value: "glimmer", + since: null, + description: "Handlebars" + }, { + value: "html", + since: "1.15.0", + description: "HTML" + }, { + value: "angular", + since: "1.15.0", + description: "Angular" + }] + }, + plugins: { + since: "1.10.0", + type: "path", + array: true, + default: [{ + value: [] + }], + category: CATEGORY_GLOBAL, + description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", + exception: function exception(value) { + return typeof value === "string" || typeof value === "object"; + }, + cliName: "plugin", + cliCategory: CATEGORY_CONFIG + }, + pluginSearchDirs: { + since: "1.13.0", + type: "path", + array: true, + default: [{ + value: [] + }], + category: CATEGORY_GLOBAL, + description: dedent_1` + Custom directory that contains prettier plugins in node_modules subdirectory. + Overrides default behavior when plugins are searched relatively to the location of Prettier. + Multiple values are accepted. + `, + exception: function exception(value) { + return typeof value === "string" || typeof value === "object"; + }, + cliName: "plugin-search-dir", + cliCategory: CATEGORY_CONFIG + }, + printWidth: { + since: "0.0.0", + category: CATEGORY_GLOBAL, + type: "int", + default: 80, + description: "The line length where Prettier will try wrap.", + range: { + start: 0, + end: Infinity, + step: 1 + } + }, + rangeEnd: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: Infinity, + range: { + start: 0, + end: Infinity, + step: 1 + }, + description: dedent_1` + Format code ending at a given character offset (exclusive). + The range will extend forwards to the end of the selected statement. + This option cannot be used with --cursor-offset. + `, + cliCategory: CATEGORY_EDITOR + }, + rangeStart: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: 0, + range: { + start: 0, + end: Infinity, + step: 1 + }, + description: dedent_1` + Format code starting at a given character offset. + The range will extend backwards to the start of the first line containing the selected statement. + This option cannot be used with --cursor-offset. + `, + cliCategory: CATEGORY_EDITOR + }, + requirePragma: { + since: "1.7.0", + category: CATEGORY_SPECIAL, + type: "boolean", + default: false, + description: dedent_1` + Require either '@prettier' or '@format' to be present in the file's first docblock comment + in order for it to be formatted. + `, + cliCategory: CATEGORY_OTHER + }, + tabWidth: { + type: "int", + category: CATEGORY_GLOBAL, + default: 2, + description: "Number of spaces per indentation level.", + range: { + start: 0, + end: Infinity, + step: 1 + } + }, + useFlowParser: { + since: "0.0.0", + category: CATEGORY_GLOBAL, + type: "boolean", + default: [{ + since: "0.0.0", + value: false + }, { + since: "1.15.0", + value: undefined + }], + deprecated: "0.0.10", + description: "Use flow parser.", + redirect: { + option: "parser", + value: "flow" + }, + cliName: "flow-parser" + }, + useTabs: { + since: "1.0.0", + category: CATEGORY_GLOBAL, + type: "boolean", + default: false, + description: "Indent with tabs instead of spaces." + } +}; +var coreOptions$1 = { + CATEGORY_CONFIG, + CATEGORY_EDITOR, + CATEGORY_FORMAT, + CATEGORY_OTHER, + CATEGORY_OUTPUT, + CATEGORY_GLOBAL, + CATEGORY_SPECIAL, + options: options$2 +}; + +var require$$0 = ( _package$1 && _package ) || _package$1; + +var currentVersion = require$$0.version; +var coreOptions = coreOptions$1.options; + +function getSupportInfo$2(version, opts) { + opts = Object.assign({ + plugins: [], + showUnreleased: false, + showDeprecated: false, + showInternal: false + }, opts); + + if (!version) { + // pre-release version is smaller than the normal version in semver, + // we need to treat it as the normal one so as to test new features. + version = currentVersion.split("-", 1)[0]; + } + + var plugins = opts.plugins; + var options = arrayify(Object.assign(plugins.reduce(function (currentOptions, plugin) { + return Object.assign(currentOptions, plugin.options); + }, {}), coreOptions), "name").sort(function (a, b) { + return a.name === b.name ? 0 : a.name < b.name ? -1 : 1; + }).filter(filterSince).filter(filterDeprecated).map(mapDeprecated).map(mapInternal).map(function (option) { + var newOption = Object.assign({}, option); + + if (Array.isArray(newOption.default)) { + newOption.default = newOption.default.length === 1 ? newOption.default[0].value : newOption.default.filter(filterSince).sort(function (info1, info2) { + return semver.compare(info2.since, info1.since); + })[0].value; + } + + if (Array.isArray(newOption.choices)) { + newOption.choices = newOption.choices.filter(filterSince).filter(filterDeprecated).map(mapDeprecated); + } + + return newOption; + }).map(function (option) { + var filteredPlugins = plugins.filter(function (plugin) { + return plugin.defaultOptions && plugin.defaultOptions[option.name]; + }); + var pluginDefaults = filteredPlugins.reduce(function (reduced, plugin) { + reduced[plugin.name] = plugin.defaultOptions[option.name]; + return reduced; + }, {}); + return Object.assign(option, { + pluginDefaults + }); + }); + var usePostCssParser = semver.lt(version, "1.7.1"); + var languages = plugins.reduce(function (all, plugin) { + return all.concat(plugin.languages || []); + }, []).filter(filterSince).map(function (language) { + // Prevent breaking changes + if (language.name === "Markdown") { + return Object.assign({}, language, { + parsers: ["markdown"] + }); + } + + if (language.name === "TypeScript") { + return Object.assign({}, language, { + parsers: ["typescript"] + }); + } + + if (usePostCssParser && (language.name === "CSS" || language.group === "CSS")) { + return Object.assign({}, language, { + parsers: ["postcss"] + }); + } + + return language; + }); + return { + languages, + options + }; + + function filterSince(object) { + return opts.showUnreleased || !("since" in object) || object.since && semver.gte(version, object.since); + } + + function filterDeprecated(object) { + return opts.showDeprecated || !("deprecated" in object) || object.deprecated && semver.lt(version, object.deprecated); + } + + function mapDeprecated(object) { + if (!object.deprecated || opts.showDeprecated) { + return object; + } + + var newObject = Object.assign({}, object); + delete newObject.deprecated; + delete newObject.redirect; + return newObject; + } + + function mapInternal(object) { + if (opts.showInternal) { + return object; + } + + var newObject = Object.assign({}, object); + delete newObject.cliName; + delete newObject.cliCategory; + delete newObject.cliDescription; + return newObject; + } +} + +var support = { + getSupportInfo: getSupportInfo$2 +}; + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +/* global Reflect, Promise */ +var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (b.hasOwnProperty(p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); +}; + +function __extends(d, b) { + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var _assign = function __assign() { + _assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + } + + return t; + }; + + return _assign.apply(this, arguments); +}; + +function __rest(s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) { + if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + } + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function (target, key) { + decorator(target, key, paramIndex); + }; +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } +} +function __exportStar(m, exports) { + for (var p in m) { + if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } +} +function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], + i = 0; + if (m) return m.call(o); + return { + next: function next() { + if (o && i >= o.length) o = void 0; + return { + value: o && o[i++], + done: !o + }; + } + }; +} +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +} +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(__read(arguments[i])); + } + + return ar; +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), + i, + q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i; + + function verb(n) { + if (g[n]) i[n] = function (v) { + return new Promise(function (a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + + function fulfill(value) { + resume("next", value); + } + + function reject(value) { + resume("throw", value); + } + + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function () { + return this; + }, i; + + function verb(n, f) { + i[n] = o[n] ? function (v) { + return (p = !p) ? { + value: __await(o[n](v)), + done: n === "return" + } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], + i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i); + + function verb(n) { + i[n] = o[n] && function (v) { + return new Promise(function (resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function (v) { + resolve({ + value: v, + done: d + }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { + value: raw + }); + } else { + cooked.raw = raw; + } + + return cooked; +} + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) { + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result.default = mod; + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; +} + +var tslib_1 = Object.freeze({ + __extends: __extends, + get __assign () { return _assign; }, + __rest: __rest, + __decorate: __decorate, + __param: __param, + __metadata: __metadata, + __awaiter: __awaiter, + __generator: __generator, + __exportStar: __exportStar, + __values: __values, + __read: __read, + __spread: __spread, + __await: __await, + __asyncGenerator: __asyncGenerator, + __asyncDelegator: __asyncDelegator, + __asyncValues: __asyncValues, + __makeTemplateObject: __makeTemplateObject, + __importStar: __importStar, + __importDefault: __importDefault +}); + +var api = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.apiDescriptor = { + key: function key(_key) { + return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(_key) ? _key : JSON.stringify(_key); + }, + + value(value) { + if (value === null || typeof value !== 'object') { + return JSON.stringify(value); + } + + if (Array.isArray(value)) { + return `[${value.map(function (subValue) { + return exports.apiDescriptor.value(subValue); + }).join(', ')}]`; + } + + var keys = Object.keys(value); + return keys.length === 0 ? '{}' : `{ ${keys.map(function (key) { + return `${exports.apiDescriptor.key(key)}: ${exports.apiDescriptor.value(value[key])}`; + }).join(', ')} }`; + }, + + pair: function pair(_ref) { + var key = _ref.key, + value = _ref.value; + return exports.apiDescriptor.value({ + [key]: value + }); + } + }; +}); +unwrapExports(api); + +var descriptors = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(api, exports); +}); +unwrapExports(descriptors); + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +var escapeStringRegexp = function escapeStringRegexp(str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +var colorName = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + +var conversions = createCommonjsModule(function (module) { + /* MIT license */ + // NOTE: conversions should only return primitive values (i.e. arrays, or + // values that give correct `typeof` results). + // do not use box values types (i.e. Number(), String(), etc.) + var reverseKeywords = {}; + + for (var key in colorName) { + if (colorName.hasOwnProperty(key)) { + reverseKeywords[colorName[key]] = key; + } + } + + var convert = module.exports = { + rgb: { + channels: 3, + labels: 'rgb' + }, + hsl: { + channels: 3, + labels: 'hsl' + }, + hsv: { + channels: 3, + labels: 'hsv' + }, + hwb: { + channels: 3, + labels: 'hwb' + }, + cmyk: { + channels: 4, + labels: 'cmyk' + }, + xyz: { + channels: 3, + labels: 'xyz' + }, + lab: { + channels: 3, + labels: 'lab' + }, + lch: { + channels: 3, + labels: 'lch' + }, + hex: { + channels: 1, + labels: ['hex'] + }, + keyword: { + channels: 1, + labels: ['keyword'] + }, + ansi16: { + channels: 1, + labels: ['ansi16'] + }, + ansi256: { + channels: 1, + labels: ['ansi256'] + }, + hcg: { + channels: 3, + labels: ['h', 'c', 'g'] + }, + apple: { + channels: 3, + labels: ['r16', 'g16', 'b16'] + }, + gray: { + channels: 1, + labels: ['gray'] + } + }; // hide .channels and .labels properties + + for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', { + value: channels + }); + Object.defineProperty(convert[model], 'labels', { + value: labels + }); + } + } + + convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; + }; + + convert.rgb.hsv = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var v; + + if (max === 0) { + s = 0; + } else { + s = delta / max * 1000 / 10; + } + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + v = max / 255 * 1000 / 10; + return [h, s, v]; + }; + + convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; + }; + + convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; + }; + /** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ + + + function comparativeDistance(x, y) { + return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); + } + + convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in colorName) { + if (colorName.hasOwnProperty(keyword)) { + var value = colorName[keyword]; // Compute comparative distance + + var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest + + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; + }; + + convert.keyword.rgb = function (keyword) { + return colorName[keyword]; + }; + + convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; // assume sRGB + + r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; + g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; + b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; + var x = r * 0.4124 + g * 0.3576 + b * 0.1805; + var y = r * 0.2126 + g * 0.7152 + b * 0.0722; + var z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; + }; + + convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + + convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + rgb = [0, 0, 0]; + + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; + }; + + convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; + }; + + convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - s * f); + var t = 255 * v * (1 - s * (1 - f)); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + + case 1: + return [q, v, p]; + + case 2: + return [p, v, t]; + + case 3: + return [p, q, v]; + + case 4: + return [t, p, v]; + + case 5: + return [v, p, q]; + } + }; + + convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; + }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb + + + convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; // wh + bl cant be > 1 + + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; + break; + + case 1: + r = n; + g = v; + b = wh; + break; + + case 2: + r = wh; + g = v; + b = n; + break; + + case 3: + r = wh; + g = n; + b = v; + break; + + case 4: + r = n; + g = wh; + b = v; + break; + + case 5: + r = v; + g = wh; + b = n; + break; + } + + return [r * 255, g * 255, b * 255]; + }; + + convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; + }; + + convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.2040 + z * 1.0570; // assume sRGB + + r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92; + g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92; + b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; + }; + + convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + + convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; + }; + + convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + return [l, c, h]; + }; + + convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + return [l, a, b]; + }; + + convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; + }; + + convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); + }; + + convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round((r - 8) / 247 * 24) + 232; + } + + var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; + }; + + convert.ansi16.rgb = function (args) { + var color = args % 10; // handle greyscale + + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = (color & 1) * mult * 255; + var g = (color >> 1 & 1) * mult * 255; + var b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; + }; + + convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = rem % 6 / 5 * 255; + return [r, g, b]; + }; + + convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; + }; + + convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = integer >> 16 & 0xFF; + var g = integer >> 8 & 0xFF; + var b = integer & 0xFF; + return [r, g, b]; + }; + + convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = max - min; + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; + }; + + convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; + }; + + convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; + }; + + convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = h % 1 * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; + } + + mg = (1.0 - c) * g; + return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255]; + }; + + convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; + }; + + convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; + }; + + convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; + }; + + convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; + }; + + convert.apple.rgb = function (apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + + convert.rgb.apple = function (rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + + convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; + }; + + convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; + }; + + convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; + }; + + convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; + }; + + convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; + }; + + convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; + }; + + convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; +}); + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ +// https://jsperf.com/object-keys-vs-for-in-with-closure/3 + +var models$1 = Object.keys(conversions); + +function buildGraph() { + var graph = {}; + + for (var len = models$1.length, i = 0; i < len; i++) { + graph[models$1[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} // https://en.wikipedia.org/wiki/Breadth-first_search + + +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path$$1 = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + var cur = graph[toModel].parent; + + while (graph[cur].parent) { + path$$1.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path$$1; + return fn; +} + +var route = function route(fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + var models = Object.keys(graph); + + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + +var convert = {}; +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function wrappedFn(args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; // preserve .conversion property if there is one + + + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function wrappedFn(args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + + if (typeof result === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; // preserve .conversion property if there is one + + + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + Object.defineProperty(convert[fromModel], 'channels', { + value: conversions[fromModel].channels + }); + Object.defineProperty(convert[fromModel], 'labels', { + value: conversions[fromModel].labels + }); + var routes = route(fromModel); + var routeModels = Object.keys(routes); + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); +var colorConvert = convert; + +var ansiStyles = createCommonjsModule(function (module) { + 'use strict'; + + var wrapAnsi16 = function wrapAnsi16(fn, offset) { + return function () { + var code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; + }; + }; + + var wrapAnsi256 = function wrapAnsi256(fn, offset) { + return function () { + var code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; + }; + }; + + var wrapAnsi16m = function wrapAnsi16m(fn, offset) { + return function () { + var rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; + }; + }; + + function assembleStyles() { + var codes = new Map(); + var styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; // Fix humans + + styles.color.grey = styles.color.gray; + + var _arr = Object.keys(styles); + + for (var _i = 0; _i < _arr.length; _i++) { + var groupName = _arr[_i]; + var group = styles[groupName]; + + var _arr3 = Object.keys(group); + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var styleName = _arr3[_i3]; + var style = group[styleName]; + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + group[styleName] = styles[styleName]; + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } + + var ansi2ansi = function ansi2ansi(n) { + return n; + }; + + var rgb2rgb = function rgb2rgb(r, g, b) { + return [r, g, b]; + }; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + var _arr2 = Object.keys(colorConvert); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var key = _arr2[_i2]; + + if (typeof colorConvert[key] !== 'object') { + continue; + } + + var suite = colorConvert[key]; + + if (key === 'ansi16') { + key = 'ansi'; + } + + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + + return styles; + } // Make the export immutable + + + Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles + }); +}); + +var hasFlag = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (flag, argv) { + argv = argv || process.argv; + var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--'; + var pos = argv.indexOf(prefix + flag); + var terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; +}); + +var env = process.env; +var forceColor; + +if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { + forceColor = true; +} + +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + var min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + var osRelease = os.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env; + }) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + var level = supportsColor(stream); + return translateLevel(level); +} + +var supportsColor_1 = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; + +var templates = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]); + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var chalk = createCommonjsModule(function (module) { + 'use strict'; + + var stdoutColor = supportsColor_1.stdout; + var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + + var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + + var skipModels = new Set(['gray']); + var styles = Object.create(null); + + function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; + } + + function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); + } // Use bright blue on Windows as the normal blue color is illegible + + + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; + } + + var _arr = Object.keys(ansiStyles); + + var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + + }; + }; + + for (var _i = 0; _i < _arr.length; _i++) { + _loop(); + } + + styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } + + }; + ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + + var _arr2 = Object.keys(ansiStyles.color.ansi); + + var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + + }; + }; + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; + } + + ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + + var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + + var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + + }; + }; + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; + } + + var proto = Object.defineProperties(function () {}, styles); + + function build(_styles, _empty, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + + get() { + return self.level; + }, + + set(level) { + self.level = level; + } + + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + + get() { + return self.enabled; + }, + + set(enabled) { + self.enabled = enabled; + } + + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; + } + + function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; + } + + function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates(chalk, parts.join('')); + } + + Object.defineProperties(Chalk.prototype, styles); + module.exports = Chalk(); // eslint-disable-line new-cap + + module.exports.supportsColor = stdoutColor; + module.exports.default = module.exports; // For TypeScript +}); + +var common = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.commonDeprecatedHandler = function (keyOrPair, redirectTo, _ref) { + var descriptor = _ref.descriptor; + var messages = [`${chalk.default.yellow(typeof keyOrPair === 'string' ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair))} is deprecated`]; + + if (redirectTo) { + messages.push(`we now treat it as ${chalk.default.blue(typeof redirectTo === 'string' ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))}`); + } + + return messages.join('; ') + '.'; + }; +}); +unwrapExports(common); + +var deprecated = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(common, exports); +}); +unwrapExports(deprecated); + +var common$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.commonInvalidHandler = function (key, value, utils) { + return [`Invalid ${chalk.default.red(utils.descriptor.key(key))} value.`, `Expected ${chalk.default.blue(utils.schemas[key].expected(utils))},`, `but received ${chalk.default.red(utils.descriptor.value(value))}.`].join(' '); + }; +}); +unwrapExports(common$2); + +var invalid = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(common$2, exports); +}); +unwrapExports(invalid); + +/* eslint-disable no-nested-ternary */ +var arr = []; +var charCodeCache = []; + +var leven$1 = function leven(a, b) { + if (a === b) { + return 0; + } + + var swap = a; // Swapping the strings if `a` is longer than `b` so we know which one is the + // shortest & which one is the longest + + if (a.length > b.length) { + a = b; + b = swap; + } + + var aLen = a.length; + var bLen = b.length; + + if (aLen === 0) { + return bLen; + } + + if (bLen === 0) { + return aLen; + } // Performing suffix trimming: + // We can linearly drop suffix common to both strings since they + // don't increase distance at all + // Note: `~-` is the bitwise way to perform a `- 1` operation + + + while (aLen > 0 && a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen)) { + aLen--; + bLen--; + } + + if (aLen === 0) { + return bLen; + } // Performing prefix trimming + // We can linearly drop prefix common to both strings since they + // don't increase distance at all + + + var start = 0; + + while (start < aLen && a.charCodeAt(start) === b.charCodeAt(start)) { + start++; + } + + aLen -= start; + bLen -= start; + + if (aLen === 0) { + return bLen; + } + + var bCharCode; + var ret; + var tmp; + var tmp2; + var i = 0; + var j = 0; + + while (i < aLen) { + charCodeCache[start + i] = a.charCodeAt(start + i); + arr[i] = ++i; + } + + while (j < bLen) { + bCharCode = b.charCodeAt(start + j); + tmp = j++; + ret = j; + + for (i = 0; i < aLen; i++) { + tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1; + tmp = arr[i]; + ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2; + } + } + + return ret; +}; + +var leven_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.levenUnknownHandler = function (key, value, _ref) { + var descriptor = _ref.descriptor, + logger = _ref.logger, + schemas = _ref.schemas; + var messages = [`Ignored unknown option ${chalk.default.yellow(descriptor.pair({ + key, + value + }))}.`]; + var suggestion = Object.keys(schemas).sort().find(function (knownKey) { + return leven$1(key, knownKey) < 3; + }); + + if (suggestion) { + messages.push(`Did you mean ${chalk.default.blue(descriptor.key(suggestion))}?`); + } + + logger.warn(messages.join(' ')); + }; +}); +unwrapExports(leven_1); + +var unknown = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(leven_1, exports); +}); +unwrapExports(unknown); + +var handlers = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(deprecated, exports); + + tslib_1.__exportStar(invalid, exports); + + tslib_1.__exportStar(unknown, exports); +}); +unwrapExports(handlers); + +var schema = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + var HANDLER_KEYS = ['default', 'expected', 'validate', 'deprecated', 'forward', 'redirect', 'overlap', 'preprocess', 'postprocess']; + + function createSchema(SchemaConstructor, parameters) { + var schema = new SchemaConstructor(parameters); + var subSchema = Object.create(schema); + + for (var _i = 0; _i < HANDLER_KEYS.length; _i++) { + var handlerKey = HANDLER_KEYS[_i]; + + if (handlerKey in parameters) { + subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length); + } + } + + return subSchema; + } + + exports.createSchema = createSchema; + + var Schema = + /*#__PURE__*/ + function () { + function Schema(parameters) { + _classCallCheck(this, Schema); + + this.name = parameters.name; + } + + _createClass(Schema, [{ + key: "default", + value: function _default(_utils) { + return undefined; + } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length` + + }, { + key: "expected", + value: function expected(_utils) { + return 'nothing'; + } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length` + + }, { + key: "validate", + value: function validate(_value, _utils) { + return false; + } + }, { + key: "deprecated", + value: function deprecated(_value, _utils) { + return false; + } + }, { + key: "forward", + value: function forward(_value, _utils) { + return undefined; + } + }, { + key: "redirect", + value: function redirect(_value, _utils) { + return undefined; + } + }, { + key: "overlap", + value: function overlap(currentValue, _newValue, _utils) { + return currentValue; + } + }, { + key: "preprocess", + value: function preprocess(value, _utils) { + return value; + } + }, { + key: "postprocess", + value: function postprocess(value, _utils) { + return value; + } + }], [{ + key: "create", + value: function create(parameters) { + // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/5863 + return createSchema(this, parameters); + } + }]); + + return Schema; + }(); + + exports.Schema = Schema; + + function normalizeHandler(handler, superSchema, handlerArgumentsLength) { + return typeof handler === 'function' ? function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return handler.apply(void 0, _toConsumableArray(args.slice(0, handlerArgumentsLength - 1)).concat([superSchema], _toConsumableArray(args.slice(handlerArgumentsLength - 1)))); + } : function () { + return handler; + }; + } +}); +unwrapExports(schema); + +var alias = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var AliasSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(AliasSchema, _schema_1$Schema); + + function AliasSchema(parameters) { + var _this; + + _classCallCheck(this, AliasSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(AliasSchema).call(this, parameters)); + _this._sourceName = parameters.sourceName; + return _this; + } + + _createClass(AliasSchema, [{ + key: "expected", + value: function expected(utils) { + return utils.schemas[this._sourceName].expected(utils); + } + }, { + key: "validate", + value: function validate(value, utils) { + return utils.schemas[this._sourceName].validate(value, utils); + } + }, { + key: "redirect", + value: function redirect(_value, _utils) { + return this._sourceName; + } + }]); + + return AliasSchema; + }(schema.Schema); + + exports.AliasSchema = AliasSchema; +}); +unwrapExports(alias); + +var any = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var AnySchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(AnySchema, _schema_1$Schema); + + function AnySchema() { + _classCallCheck(this, AnySchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(AnySchema).apply(this, arguments)); + } + + _createClass(AnySchema, [{ + key: "expected", + value: function expected() { + return 'anything'; + } + }, { + key: "validate", + value: function validate() { + return true; + } + }]); + + return AnySchema; + }(schema.Schema); + + exports.AnySchema = AnySchema; +}); +unwrapExports(any); + +var array$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var ArraySchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(ArraySchema, _schema_1$Schema); + + function ArraySchema(_a) { + var _this; + + _classCallCheck(this, ArraySchema); + + var valueSchema = _a.valueSchema, + _a$name = _a.name, + name = _a$name === void 0 ? valueSchema.name : _a$name, + handlers = tslib_1.__rest(_a, ["valueSchema", "name"]); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ArraySchema).call(this, Object.assign({}, handlers, { + name + }))); + _this._valueSchema = valueSchema; + return _this; + } + + _createClass(ArraySchema, [{ + key: "expected", + value: function expected(utils) { + return `an array of ${this._valueSchema.expected(utils)}`; + } + }, { + key: "validate", + value: function validate(value, utils) { + if (!Array.isArray(value)) { + return false; + } + + var invalidValues = []; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var subValue = _step.value; + var subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue); + + if (subValidateResult !== true) { + invalidValues.push(subValidateResult.value); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return invalidValues.length === 0 ? true : { + value: invalidValues + }; + } + }, { + key: "deprecated", + value: function deprecated(value, utils) { + var deprecatedResult = []; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var subValue = _step2.value; + var subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue); + + if (subDeprecatedResult !== false) { + deprecatedResult.push.apply(deprecatedResult, _toConsumableArray(subDeprecatedResult.map(function (_ref) { + var deprecatedValue = _ref.value; + return { + value: [deprecatedValue] + }; + }))); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return deprecatedResult; + } + }, { + key: "forward", + value: function forward(value, utils) { + var forwardResult = []; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = value[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var subValue = _step3.value; + var subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue); + forwardResult.push.apply(forwardResult, _toConsumableArray(subForwardResult.map(wrapTransferResult))); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + return forwardResult; + } + }, { + key: "redirect", + value: function redirect(value, utils) { + var remain = []; + var redirect = []; + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = value[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var subValue = _step4.value; + var subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue); + + if ('remain' in subRedirectResult) { + remain.push(subRedirectResult.remain); + } + + redirect.push.apply(redirect, _toConsumableArray(subRedirectResult.redirect.map(wrapTransferResult))); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + + return remain.length === 0 ? { + redirect + } : { + redirect, + remain + }; + } + }, { + key: "overlap", + value: function overlap(currentValue, newValue) { + return currentValue.concat(newValue); + } + }]); + + return ArraySchema; + }(schema.Schema); + + exports.ArraySchema = ArraySchema; + + function wrapTransferResult(_ref2) { + var from = _ref2.from, + to = _ref2.to; + return { + from: [from], + to + }; + } +}); +unwrapExports(array$2); + +var boolean_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var BooleanSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(BooleanSchema, _schema_1$Schema); + + function BooleanSchema() { + _classCallCheck(this, BooleanSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(BooleanSchema).apply(this, arguments)); + } + + _createClass(BooleanSchema, [{ + key: "expected", + value: function expected() { + return 'true or false'; + } + }, { + key: "validate", + value: function validate(value) { + return typeof value === 'boolean'; + } + }]); + + return BooleanSchema; + }(schema.Schema); + + exports.BooleanSchema = BooleanSchema; +}); +unwrapExports(boolean_1); + +var utils = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + function recordFromArray(array, mainKey) { + var record = Object.create(null); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var value = _step.value; + var key = value[mainKey]; // istanbul ignore next + + if (record[key]) { + throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key)}`); + } // @ts-ignore + + + record[key] = value; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return record; + } + + exports.recordFromArray = recordFromArray; + + function mapFromArray(array, mainKey) { + var map = new Map(); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = array[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var value = _step2.value; + var key = value[mainKey]; // istanbul ignore next + + if (map.has(key)) { + throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key)}`); + } + + map.set(key, value); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return map; + } + + exports.mapFromArray = mapFromArray; + + function createAutoChecklist() { + var map = Object.create(null); + return function (id) { + var idString = JSON.stringify(id); + + if (map[idString]) { + return true; + } + + map[idString] = true; + return false; + }; + } + + exports.createAutoChecklist = createAutoChecklist; + + function partition(array, predicate) { + var trueArray = []; + var falseArray = []; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = array[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var value = _step3.value; + + if (predicate(value)) { + trueArray.push(value); + } else { + falseArray.push(value); + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + return [trueArray, falseArray]; + } + + exports.partition = partition; + + function isInt(value) { + return value === Math.floor(value); + } + + exports.isInt = isInt; + + function comparePrimitive(a, b) { + if (a === b) { + return 0; + } + + var typeofA = typeof a; + var typeofB = typeof b; + var orders = ['undefined', 'object', 'boolean', 'number', 'string']; + + if (typeofA !== typeofB) { + return orders.indexOf(typeofA) - orders.indexOf(typeofB); + } + + if (typeofA !== 'string') { + return Number(a) - Number(b); + } + + return a.localeCompare(b); + } + + exports.comparePrimitive = comparePrimitive; + + function normalizeDefaultResult(result) { + return result === undefined ? {} : result; + } + + exports.normalizeDefaultResult = normalizeDefaultResult; + + function normalizeValidateResult(result, value) { + return result === true ? true : result === false ? { + value + } : result; + } + + exports.normalizeValidateResult = normalizeValidateResult; + + function normalizeDeprecatedResult(result, value) { + var doNotNormalizeTrue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{ + value + }] : 'value' in result ? [result] : result.length === 0 ? false : result; + } + + exports.normalizeDeprecatedResult = normalizeDeprecatedResult; + + function normalizeTransferResult(result, value) { + return typeof result === 'string' || 'key' in result ? { + from: value, + to: result + } : 'from' in result ? { + from: result.from, + to: result.to + } : { + from: value, + to: result.to + }; + } + + exports.normalizeTransferResult = normalizeTransferResult; + + function normalizeForwardResult(result, value) { + return result === undefined ? [] : Array.isArray(result) ? result.map(function (transferResult) { + return normalizeTransferResult(transferResult, value); + }) : [normalizeTransferResult(result, value)]; + } + + exports.normalizeForwardResult = normalizeForwardResult; + + function normalizeRedirectResult(result, value) { + var redirect = normalizeForwardResult(typeof result === 'object' && 'redirect' in result ? result.redirect : result, value); + return redirect.length === 0 ? { + remain: value, + redirect + } : typeof result === 'object' && 'remain' in result ? { + remain: result.remain, + redirect + } : { + redirect + }; + } + + exports.normalizeRedirectResult = normalizeRedirectResult; +}); +unwrapExports(utils); + +var choice = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var ChoiceSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(ChoiceSchema, _schema_1$Schema); + + function ChoiceSchema(parameters) { + var _this; + + _classCallCheck(this, ChoiceSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ChoiceSchema).call(this, parameters)); + _this._choices = utils.mapFromArray(parameters.choices.map(function (choice) { + return choice && typeof choice === 'object' ? choice : { + value: choice + }; + }), 'value'); + return _this; + } + + _createClass(ChoiceSchema, [{ + key: "expected", + value: function expected(_ref) { + var _this2 = this; + + var descriptor = _ref.descriptor; + var choiceValues = Array.from(this._choices.keys()).map(function (value) { + return _this2._choices.get(value); + }).filter(function (choiceInfo) { + return !choiceInfo.deprecated; + }).map(function (choiceInfo) { + return choiceInfo.value; + }).sort(utils.comparePrimitive).map(descriptor.value); + var head = choiceValues.slice(0, -2); + var tail = choiceValues.slice(-2); + return head.concat(tail.join(' or ')).join(', '); + } + }, { + key: "validate", + value: function validate(value) { + return this._choices.has(value); + } + }, { + key: "deprecated", + value: function deprecated(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo && choiceInfo.deprecated ? { + value + } : false; + } + }, { + key: "forward", + value: function forward(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo ? choiceInfo.forward : undefined; + } + }, { + key: "redirect", + value: function redirect(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo ? choiceInfo.redirect : undefined; + } + }]); + + return ChoiceSchema; + }(schema.Schema); + + exports.ChoiceSchema = ChoiceSchema; +}); +unwrapExports(choice); + +var number = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var NumberSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(NumberSchema, _schema_1$Schema); + + function NumberSchema() { + _classCallCheck(this, NumberSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(NumberSchema).apply(this, arguments)); + } + + _createClass(NumberSchema, [{ + key: "expected", + value: function expected() { + return 'a number'; + } + }, { + key: "validate", + value: function validate(value, _utils) { + return typeof value === 'number'; + } + }]); + + return NumberSchema; + }(schema.Schema); + + exports.NumberSchema = NumberSchema; +}); +unwrapExports(number); + +var integer = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var IntegerSchema = + /*#__PURE__*/ + function (_number_1$NumberSchem) { + _inherits(IntegerSchema, _number_1$NumberSchem); + + function IntegerSchema() { + _classCallCheck(this, IntegerSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(IntegerSchema).apply(this, arguments)); + } + + _createClass(IntegerSchema, [{ + key: "expected", + value: function expected() { + return 'an integer'; + } + }, { + key: "validate", + value: function validate(value, utils$$2) { + return utils$$2.normalizeValidateResult(_get(_getPrototypeOf(IntegerSchema.prototype), "validate", this).call(this, value, utils$$2), value) === true && utils.isInt(value); + } + }]); + + return IntegerSchema; + }(number.NumberSchema); + + exports.IntegerSchema = IntegerSchema; +}); +unwrapExports(integer); + +var string = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var StringSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(StringSchema, _schema_1$Schema); + + function StringSchema() { + _classCallCheck(this, StringSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(StringSchema).apply(this, arguments)); + } + + _createClass(StringSchema, [{ + key: "expected", + value: function expected() { + return 'a string'; + } + }, { + key: "validate", + value: function validate(value) { + return typeof value === 'string'; + } + }]); + + return StringSchema; + }(schema.Schema); + + exports.StringSchema = StringSchema; +}); +unwrapExports(string); + +var schemas = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(alias, exports); + + tslib_1.__exportStar(any, exports); + + tslib_1.__exportStar(array$2, exports); + + tslib_1.__exportStar(boolean_1, exports); + + tslib_1.__exportStar(choice, exports); + + tslib_1.__exportStar(integer, exports); + + tslib_1.__exportStar(number, exports); + + tslib_1.__exportStar(string, exports); +}); +unwrapExports(schemas); + +var defaults = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.defaultDescriptor = api.apiDescriptor; + exports.defaultUnknownHandler = leven_1.levenUnknownHandler; + exports.defaultInvalidHandler = invalid.commonInvalidHandler; + exports.defaultDeprecatedHandler = common.commonDeprecatedHandler; +}); +unwrapExports(defaults); + +var normalize$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.normalize = function (options, schemas, opts) { + return new Normalizer(schemas, opts).normalize(options); + }; + + var Normalizer = + /*#__PURE__*/ + function () { + function Normalizer(schemas, opts) { + _classCallCheck(this, Normalizer); + + // istanbul ignore next + var _ref = opts || {}, + _ref$logger = _ref.logger, + logger = _ref$logger === void 0 ? console : _ref$logger, + _ref$descriptor = _ref.descriptor, + descriptor = _ref$descriptor === void 0 ? defaults.defaultDescriptor : _ref$descriptor, + _ref$unknown = _ref.unknown, + unknown = _ref$unknown === void 0 ? defaults.defaultUnknownHandler : _ref$unknown, + _ref$invalid = _ref.invalid, + invalid = _ref$invalid === void 0 ? defaults.defaultInvalidHandler : _ref$invalid, + _ref$deprecated = _ref.deprecated, + deprecated = _ref$deprecated === void 0 ? defaults.defaultDeprecatedHandler : _ref$deprecated; + + this._utils = { + descriptor, + logger: + /* istanbul ignore next */ + logger || { + warn: function warn() {} + }, + schemas: utils.recordFromArray(schemas, 'name'), + normalizeDefaultResult: utils.normalizeDefaultResult, + normalizeDeprecatedResult: utils.normalizeDeprecatedResult, + normalizeForwardResult: utils.normalizeForwardResult, + normalizeRedirectResult: utils.normalizeRedirectResult, + normalizeValidateResult: utils.normalizeValidateResult + }; + this._unknownHandler = unknown; + this._invalidHandler = invalid; + this._deprecatedHandler = deprecated; + this.cleanHistory(); + } + + _createClass(Normalizer, [{ + key: "cleanHistory", + value: function cleanHistory() { + this._hasDeprecationWarned = utils.createAutoChecklist(); + } + }, { + key: "normalize", + value: function normalize(options) { + var _this = this; + + var normalized = {}; + var restOptionsArray = [options]; + + var applyNormalization = function applyNormalization() { + while (restOptionsArray.length !== 0) { + var currentOptions = restOptionsArray.shift(); + + var transferredOptionsArray = _this._applyNormalization(currentOptions, normalized); + + restOptionsArray.push.apply(restOptionsArray, _toConsumableArray(transferredOptionsArray)); + } + }; + + applyNormalization(); + + var _arr = Object.keys(this._utils.schemas); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + var schema = this._utils.schemas[key]; + + if (!(key in normalized)) { + var defaultResult = utils.normalizeDefaultResult(schema.default(this._utils)); + + if ('value' in defaultResult) { + restOptionsArray.push({ + [key]: defaultResult.value + }); + } + } + } + + applyNormalization(); + + var _arr2 = Object.keys(this._utils.schemas); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _key = _arr2[_i2]; + var _schema = this._utils.schemas[_key]; + + if (_key in normalized) { + normalized[_key] = _schema.postprocess(normalized[_key], this._utils); + } + } + + return normalized; + } + }, { + key: "_applyNormalization", + value: function _applyNormalization(options, normalized) { + var _this2 = this; + + var transferredOptionsArray = []; + + var _utils_1$partition = utils.partition(Object.keys(options), function (key) { + return key in _this2._utils.schemas; + }), + _utils_1$partition2 = _slicedToArray(_utils_1$partition, 2), + knownOptionNames = _utils_1$partition2[0], + unknownOptionNames = _utils_1$partition2[1]; + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + var _loop = function _loop() { + var key = _step.value; + var schema = _this2._utils.schemas[key]; + var value = schema.preprocess(options[key], _this2._utils); + var validateResult = utils.normalizeValidateResult(schema.validate(value, _this2._utils), value); + + if (validateResult !== true) { + var invalidValue = validateResult.value; + + var errorMessageOrError = _this2._invalidHandler(key, invalidValue, _this2._utils); + + throw typeof errorMessageOrError === 'string' ? new Error(errorMessageOrError) : + /* istanbul ignore next*/ + errorMessageOrError; + } + + var appendTransferredOptions = function appendTransferredOptions(_ref2) { + var from = _ref2.from, + to = _ref2.to; + transferredOptionsArray.push(typeof to === 'string' ? { + [to]: from + } : { + [to.key]: to.value + }); + }; + + var warnDeprecated = function warnDeprecated(_ref3) { + var currentValue = _ref3.value, + redirectTo = _ref3.redirectTo; + var deprecatedResult = utils.normalizeDeprecatedResult(schema.deprecated(currentValue, _this2._utils), value, + /* doNotNormalizeTrue */ + true); + + if (deprecatedResult === false) { + return; + } + + if (deprecatedResult === true) { + if (!_this2._hasDeprecationWarned(key)) { + _this2._utils.logger.warn(_this2._deprecatedHandler(key, redirectTo, _this2._utils)); + } + } else { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = deprecatedResult[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var deprecatedValue = _step3.value.value; + var pair = { + key, + value: deprecatedValue + }; + + if (!_this2._hasDeprecationWarned(pair)) { + var redirectToPair = typeof redirectTo === 'string' ? { + key: redirectTo, + value: deprecatedValue + } : redirectTo; + + _this2._utils.logger.warn(_this2._deprecatedHandler(pair, redirectToPair, _this2._utils)); + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + }; + + var forwardResult = utils.normalizeForwardResult(schema.forward(value, _this2._utils), value); + forwardResult.forEach(appendTransferredOptions); + var redirectResult = utils.normalizeRedirectResult(schema.redirect(value, _this2._utils), value); + redirectResult.redirect.forEach(appendTransferredOptions); + + if ('remain' in redirectResult) { + var remainingValue = redirectResult.remain; + normalized[key] = key in normalized ? schema.overlap(normalized[key], remainingValue, _this2._utils) : remainingValue; + warnDeprecated({ + value: remainingValue + }); + } + + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = redirectResult.redirect[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var _step4$value = _step4.value, + from = _step4$value.from, + to = _step4$value.to; + warnDeprecated({ + value: from, + redirectTo: to + }); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + }; + + for (var _iterator = knownOptionNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + _loop(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = unknownOptionNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var key = _step2.value; + var value = options[key]; + + var unknownResult = this._unknownHandler(key, value, this._utils); + + if (unknownResult) { + var _arr3 = Object.keys(unknownResult); + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var unknownKey = _arr3[_i3]; + var unknownOption = { + [unknownKey]: unknownResult[unknownKey] + }; + + if (unknownKey in this._utils.schemas) { + transferredOptionsArray.push(unknownOption); + } else { + Object.assign(normalized, unknownOption); + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return transferredOptionsArray; + } + }]); + + return Normalizer; + }(); + + exports.Normalizer = Normalizer; +}); +unwrapExports(normalize$1); + +var lib$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(descriptors, exports); + + tslib_1.__exportStar(handlers, exports); + + tslib_1.__exportStar(schemas, exports); + + tslib_1.__exportStar(normalize$1, exports); + + tslib_1.__exportStar(schema, exports); +}); +unwrapExports(lib$1); + +var hasFlag$3 = function hasFlag(flag, argv) { + argv = argv || process.argv; + var terminatorPos = argv.indexOf('--'); + var prefix = /^-{1,2}/.test(flag) ? '' : '--'; + var pos = argv.indexOf(prefix + flag); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; + +var supportsColor$1 = createCommonjsModule(function (module) { + 'use strict'; + + var env = process.env; + + var support = function support(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + }; + + var supportLevel = function () { + if (hasFlag$3('no-color') || hasFlag$3('no-colors') || hasFlag$3('color=false')) { + return 0; + } + + if (hasFlag$3('color=16m') || hasFlag$3('color=full') || hasFlag$3('color=truecolor')) { + return 3; + } + + if (hasFlag$3('color=256')) { + return 2; + } + + if (hasFlag$3('color') || hasFlag$3('colors') || hasFlag$3('color=true') || hasFlag$3('color=always')) { + return 1; + } + + if (process.stdout && !process.stdout.isTTY) { + return 0; + } + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. + var osRelease = os.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env; + }) || env.CI_NAME === 'codeship') { + return 1; + } + + return 0; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if ('TERM_PROGRAM' in env) { + var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Hyper': + return 3; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return 0; + } + + return 0; + }(); + + if ('FORCE_COLOR' in env) { + supportLevel = parseInt(env.FORCE_COLOR, 10) === 0 ? 0 : supportLevel || 1; + } + + module.exports = process && support(supportLevel); +}); + +var templates$2 = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f0-9]{4}|x[a-f0-9]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[0-9a-f]{4}|x[0-9a-f]{2}|.)|([^\\])/gi; + var ESCAPES = { + n: '\n', + r: '\r', + t: '\t', + b: '\b', + f: '\f', + v: '\v', + 0: '\0', + '\\': '\\', + e: '\u001b', + a: '\u0007' + }; + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES[c] || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + +var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + +var skipModels = new Set(['gray']); +var styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = supportsColor$1 ? supportsColor$1.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); +} // Use bright blue on Windows as the normal blue color is illegible + + +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +var _arr = Object.keys(ansiStyles); + +var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], key); + } + + }; +}; + +for (var _i = 0; _i < _arr.length; _i++) { + _loop(); +} + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + +var _arr2 = Object.keys(ansiStyles.color.ansi); + +var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model); + }; + } + + }; +}; + +for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + +var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + +var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model); + }; + } + + }; +}; + +for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; +} + +var proto = Object.defineProperties(function () {}, styles); + +function build(_styles, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + + get() { + return self.level; + }, + + set(level) { + self.level = level; + } + + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + + get() { + return self.enabled; + }, + + set(enabled) { + self.enabled = enabled; + } + + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates$2(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); +var chalk$2 = Chalk(); // eslint-disable-line new-cap + +var supportsColor_1$2 = supportsColor$1; +chalk$2.supportsColor = supportsColor_1$2; + +var cliDescriptor = { + key: function key(_key) { + return _key.length === 1 ? `-${_key}` : `--${_key}`; + }, + value: function value(_value) { + return lib$1.apiDescriptor.value(_value); + }, + pair: function pair(_ref) { + var key = _ref.key, + value = _ref.value; + return value === false ? `--no-${key}` : value === true ? cliDescriptor.key(key) : value === "" ? `${cliDescriptor.key(key)} without an argument` : `${cliDescriptor.key(key)}=${value}`; + } +}; + +var FlagSchema = +/*#__PURE__*/ +function (_vnopts$ChoiceSchema) { + _inherits(FlagSchema, _vnopts$ChoiceSchema); + + function FlagSchema(_ref2) { + var _this; + + var name = _ref2.name, + flags = _ref2.flags; + + _classCallCheck(this, FlagSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(FlagSchema).call(this, { + name, + choices: flags + })); + _this._flags = flags.slice().sort(); + return _this; + } + + _createClass(FlagSchema, [{ + key: "preprocess", + value: function preprocess(value, utils) { + if (typeof value === "string" && value.length !== 0 && this._flags.indexOf(value) === -1) { + var suggestion = this._flags.find(function (flag) { + return leven$1(flag, value) < 3; + }); + + if (suggestion) { + utils.logger.warn([`Unknown flag ${chalk$2.yellow(utils.descriptor.value(value))},`, `did you mean ${chalk$2.blue(utils.descriptor.value(suggestion))}?`].join(" ")); + return suggestion; + } + } + + return value; + } + }, { + key: "expected", + value: function expected() { + return "a flag"; + } + }]); + + return FlagSchema; +}(lib$1.ChoiceSchema); + +function normalizeOptions$1(options, optionInfos) { + var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + logger = _ref3.logger, + _ref3$isCLI = _ref3.isCLI, + isCLI = _ref3$isCLI === void 0 ? false : _ref3$isCLI, + _ref3$passThrough = _ref3.passThrough, + passThrough = _ref3$passThrough === void 0 ? false : _ref3$passThrough; + + var unknown = !passThrough ? lib$1.levenUnknownHandler : Array.isArray(passThrough) ? function (key, value) { + return passThrough.indexOf(key) === -1 ? undefined : { + [key]: value + }; + } : function (key, value) { + return { + [key]: value + }; + }; + var descriptor = isCLI ? cliDescriptor : lib$1.apiDescriptor; + var schemas = optionInfosToSchemas(optionInfos, { + isCLI + }); + return lib$1.normalize(options, schemas, { + logger, + unknown, + descriptor + }); +} + +function optionInfosToSchemas(optionInfos, _ref4) { + var isCLI = _ref4.isCLI; + var schemas = []; + + if (isCLI) { + schemas.push(lib$1.AnySchema.create({ + name: "_" + })); + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = optionInfos[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var optionInfo = _step.value; + schemas.push(optionInfoToSchema(optionInfo, { + isCLI, + optionInfos + })); + + if (optionInfo.alias && isCLI) { + schemas.push(lib$1.AliasSchema.create({ + name: optionInfo.alias, + sourceName: optionInfo.name + })); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return schemas; +} + +function optionInfoToSchema(optionInfo, _ref5) { + var isCLI = _ref5.isCLI, + optionInfos = _ref5.optionInfos; + var SchemaConstructor; + var parameters = { + name: optionInfo.name + }; + var handlers = {}; + + switch (optionInfo.type) { + case "int": + SchemaConstructor = lib$1.IntegerSchema; + + if (isCLI) { + parameters.preprocess = function (value) { + return Number(value); + }; + } + + break; + + case "choice": + SchemaConstructor = lib$1.ChoiceSchema; + parameters.choices = optionInfo.choices.map(function (choiceInfo) { + return typeof choiceInfo === "object" && choiceInfo.redirect ? Object.assign({}, choiceInfo, { + redirect: { + to: { + key: optionInfo.name, + value: choiceInfo.redirect + } + } + }) : choiceInfo; + }); + break; + + case "boolean": + SchemaConstructor = lib$1.BooleanSchema; + break; + + case "flag": + SchemaConstructor = FlagSchema; + parameters.flags = optionInfos.map(function (optionInfo) { + return [].concat(optionInfo.alias || [], optionInfo.description ? optionInfo.name : [], optionInfo.oppositeDescription ? `no-${optionInfo.name}` : []); + }).reduce(function (a, b) { + return a.concat(b); + }, []); + break; + + case "path": + SchemaConstructor = lib$1.StringSchema; + break; + + default: + throw new Error(`Unexpected type ${optionInfo.type}`); + } + + if (optionInfo.exception) { + parameters.validate = function (value, schema, utils) { + return optionInfo.exception(value) || schema.validate(value, utils); + }; + } else { + parameters.validate = function (value, schema, utils) { + return value === undefined || schema.validate(value, utils); + }; + } + + if (optionInfo.redirect) { + handlers.redirect = function (value) { + return !value ? undefined : { + to: { + key: optionInfo.redirect.option, + value: optionInfo.redirect.value + } + }; + }; + } + + if (optionInfo.deprecated) { + handlers.deprecated = true; + } // allow CLI overriding, e.g., prettier package.json --tab-width 1 --tab-width 2 + + + if (isCLI && !optionInfo.array) { + var originalPreprocess = parameters.preprocess || function (x) { + return x; + }; + + parameters.preprocess = function (value, schema, utils) { + return schema.preprocess(originalPreprocess(Array.isArray(value) ? value[value.length - 1] : value), utils); + }; + } + + return optionInfo.array ? lib$1.ArraySchema.create(Object.assign(isCLI ? { + preprocess: function preprocess(v) { + return [].concat(v); + } + } : {}, handlers, { + valueSchema: SchemaConstructor.create(parameters) + })) : SchemaConstructor.create(Object.assign({}, parameters, handlers)); +} + +function normalizeApiOptions(options, optionInfos, opts) { + return normalizeOptions$1(options, optionInfos, opts); +} + +function normalizeCliOptions(options, optionInfos, opts) { + return normalizeOptions$1(options, optionInfos, Object.assign({ + isCLI: true + }, opts)); +} + +var optionsNormalizer = { + normalizeApiOptions, + normalizeCliOptions +}; + +var getLast = function getLast(arr) { + return arr.length > 0 ? arr[arr.length - 1] : null; +}; + +function locStart$1(node, opts) { + opts = opts || {}; // Handle nodes with decorators. They should start at the first decorator + + if (!opts.ignoreDecorators && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0) { + return locStart$1(node.declaration.decorators[0]); + } + + if (!opts.ignoreDecorators && node.decorators && node.decorators.length > 0) { + return locStart$1(node.decorators[0]); + } + + if (node.__location) { + return node.__location.startOffset; + } + + if (node.range) { + return node.range[0]; + } + + if (typeof node.start === "number") { + return node.start; + } + + if (node.loc) { + return node.loc.start; + } + + return null; +} + +function locEnd$1(node) { + var endNode = node.nodes && getLast(node.nodes); + + if (endNode && node.source && !node.source.end) { + node = endNode; + } + + if (node.__location) { + return node.__location.endOffset; + } + + var loc = node.range ? node.range[1] : typeof node.end === "number" ? node.end : null; + + if (node.typeAnnotation) { + return Math.max(loc, locEnd$1(node.typeAnnotation)); + } + + if (node.loc && !loc) { + return node.loc.end; + } + + return loc; +} + +var loc = { + locStart: locStart$1, + locEnd: locEnd$1 +}; + +var jsTokens = createCommonjsModule(function (module, exports) { + // Copyright 2014, 2015, 2016, 2017 Simon Lydell + // License: MIT. (See LICENSE.) + Object.defineProperty(exports, "__esModule", { + value: true + }); // This regex comes from regex.coffee, and is inserted here by generate-index.js + // (run `npm run build`). + + exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + + exports.matchToToken = function (match) { + var token = { + type: "invalid", + value: match[0] + }; + if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace"; + return token; + }; +}); +unwrapExports(jsTokens); + +var ast = createCommonjsModule(function (module) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + function isExpression(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'ArrayExpression': + case 'AssignmentExpression': + case 'BinaryExpression': + case 'CallExpression': + case 'ConditionalExpression': + case 'FunctionExpression': + case 'Identifier': + case 'Literal': + case 'LogicalExpression': + case 'MemberExpression': + case 'NewExpression': + case 'ObjectExpression': + case 'SequenceExpression': + case 'ThisExpression': + case 'UnaryExpression': + case 'UpdateExpression': + return true; + } + + return false; + } + + function isIterationStatement(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'DoWhileStatement': + case 'ForInStatement': + case 'ForStatement': + case 'WhileStatement': + return true; + } + + return false; + } + + function isStatement(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'BlockStatement': + case 'BreakStatement': + case 'ContinueStatement': + case 'DebuggerStatement': + case 'DoWhileStatement': + case 'EmptyStatement': + case 'ExpressionStatement': + case 'ForInStatement': + case 'ForStatement': + case 'IfStatement': + case 'LabeledStatement': + case 'ReturnStatement': + case 'SwitchStatement': + case 'ThrowStatement': + case 'TryStatement': + case 'VariableDeclaration': + case 'WhileStatement': + case 'WithStatement': + return true; + } + + return false; + } + + function isSourceElement(node) { + return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; + } + + function trailingStatement(node) { + switch (node.type) { + case 'IfStatement': + if (node.alternate != null) { + return node.alternate; + } + + return node.consequent; + + case 'LabeledStatement': + case 'ForStatement': + case 'ForInStatement': + case 'WhileStatement': + case 'WithStatement': + return node.body; + } + + return null; + } + + function isProblematicIfStatement(node) { + var current; + + if (node.type !== 'IfStatement') { + return false; + } + + if (node.alternate == null) { + return false; + } + + current = node.consequent; + + do { + if (current.type === 'IfStatement') { + if (current.alternate == null) { + return true; + } + } + + current = trailingStatement(current); + } while (current); + + return false; + } + + module.exports = { + isExpression: isExpression, + isStatement: isStatement, + isIterationStatement: isIterationStatement, + isSourceElement: isSourceElement, + isProblematicIfStatement: isProblematicIfStatement, + trailingStatement: trailingStatement + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var code = createCommonjsModule(function (module) { + /* + Copyright (C) 2013-2014 Yusuke Suzuki + Copyright (C) 2014 Ivan Nikulin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; // See `tools/generate-identifier-regex.js`. + + ES5Regex = { + // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, + // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ + }; + ES6Regex = { + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + + function isDecimalDigit(ch) { + return 0x30 <= ch && ch <= 0x39; // 0..9 + } + + function isHexDigit(ch) { + return 0x30 <= ch && ch <= 0x39 || // 0..9 + 0x61 <= ch && ch <= 0x66 || // a..f + 0x41 <= ch && ch <= 0x46; // A..F + } + + function isOctalDigit(ch) { + return ch >= 0x30 && ch <= 0x37; // 0..7 + } // 7.2 White Space + + + NON_ASCII_WHITESPACES = [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF]; + + function isWhiteSpace(ch) { + return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0; + } // 7.3 Line Terminators + + + function isLineTerminator(ch) { + return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029; + } // 7.6 Identifier Names and Identifiers + + + function fromCodePoint(cp) { + if (cp <= 0xFFFF) { + return String.fromCharCode(cp); + } + + var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800); + var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00); + return cu1 + cu2; + } + + IDENTIFIER_START = new Array(0x80); + + for (ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || // a..z + ch >= 0x41 && ch <= 0x5A || // A..Z + ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) + } + + IDENTIFIER_PART = new Array(0x80); + + for (ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || // a..z + ch >= 0x41 && ch <= 0x5A || // A..Z + ch >= 0x30 && ch <= 0x39 || // 0..9 + ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) + } + + function isIdentifierStartES5(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } + + function isIdentifierPartES5(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + + function isIdentifierStartES6(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } + + function isIdentifierPartES6(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + + module.exports = { + isDecimalDigit: isDecimalDigit, + isHexDigit: isHexDigit, + isOctalDigit: isOctalDigit, + isWhiteSpace: isWhiteSpace, + isLineTerminator: isLineTerminator, + isIdentifierStartES5: isIdentifierStartES5, + isIdentifierPartES5: isIdentifierPartES5, + isIdentifierStartES6: isIdentifierStartES6, + isIdentifierPartES6: isIdentifierPartES6 + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var keyword = createCommonjsModule(function (module) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + var code$$1 = code; + + function isStrictModeReservedWordES6(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'let': + return true; + + default: + return false; + } + } + + function isKeywordES5(id, strict) { + // yield should not be treated as keyword under non-strict mode. + if (!strict && id === 'yield') { + return false; + } + + return isKeywordES6(id, strict); + } + + function isKeywordES6(id, strict) { + if (strict && isStrictModeReservedWordES6(id)) { + return true; + } + + switch (id.length) { + case 2: + return id === 'if' || id === 'in' || id === 'do'; + + case 3: + return id === 'var' || id === 'for' || id === 'new' || id === 'try'; + + case 4: + return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum'; + + case 5: + return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super'; + + case 6: + return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import'; + + case 7: + return id === 'default' || id === 'finally' || id === 'extends'; + + case 8: + return id === 'function' || id === 'continue' || id === 'debugger'; + + case 10: + return id === 'instanceof'; + + default: + return false; + } + } + + function isReservedWordES5(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); + } + + function isReservedWordES6(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + function isIdentifierNameES5(id) { + var i, iz, ch; + + if (id.length === 0) { + return false; + } + + ch = id.charCodeAt(0); + + if (!code$$1.isIdentifierStartES5(ch)) { + return false; + } + + for (i = 1, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + + if (!code$$1.isIdentifierPartES5(ch)) { + return false; + } + } + + return true; + } + + function decodeUtf16(lead, trail) { + return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + } + + function isIdentifierNameES6(id) { + var i, iz, ch, lowCh, check; + + if (id.length === 0) { + return false; + } + + check = code$$1.isIdentifierStartES6; + + for (i = 0, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + + if (0xD800 <= ch && ch <= 0xDBFF) { + ++i; + + if (i >= iz) { + return false; + } + + lowCh = id.charCodeAt(i); + + if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) { + return false; + } + + ch = decodeUtf16(ch, lowCh); + } + + if (!check(ch)) { + return false; + } + + check = code$$1.isIdentifierPartES6; + } + + return true; + } + + function isIdentifierES5(id, strict) { + return isIdentifierNameES5(id) && !isReservedWordES5(id, strict); + } + + function isIdentifierES6(id, strict) { + return isIdentifierNameES6(id) && !isReservedWordES6(id, strict); + } + + module.exports = { + isKeywordES5: isKeywordES5, + isKeywordES6: isKeywordES6, + isReservedWordES5: isReservedWordES5, + isReservedWordES6: isReservedWordES6, + isRestrictedWord: isRestrictedWord, + isIdentifierNameES5: isIdentifierNameES5, + isIdentifierNameES6: isIdentifierNameES6, + isIdentifierES5: isIdentifierES5, + isIdentifierES6: isIdentifierES6 + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var utils$2 = createCommonjsModule(function (module, exports) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + exports.ast = ast; + exports.code = code; + exports.keyword = keyword; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var hasFlag$6 = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (flag, argv) { + argv = argv || process.argv; + var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--'; + var pos = argv.indexOf(prefix + flag); + var terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; +}); + +var env$1 = process.env; +var forceColor$1; + +if (hasFlag$6('no-color') || hasFlag$6('no-colors') || hasFlag$6('color=false')) { + forceColor$1 = false; +} else if (hasFlag$6('color') || hasFlag$6('colors') || hasFlag$6('color=true') || hasFlag$6('color=always')) { + forceColor$1 = true; +} + +if ('FORCE_COLOR' in env$1) { + forceColor$1 = env$1.FORCE_COLOR.length === 0 || parseInt(env$1.FORCE_COLOR, 10) !== 0; +} + +function translateLevel$1(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor$4(stream) { + if (forceColor$1 === false) { + return 0; + } + + if (hasFlag$6('color=16m') || hasFlag$6('color=full') || hasFlag$6('color=truecolor')) { + return 3; + } + + if (hasFlag$6('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor$1 !== true) { + return 0; + } + + var min = forceColor$1 ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + var osRelease = os.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env$1) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env$1; + }) || env$1.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env$1) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env$1.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env$1) { + var version = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env$1.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env$1.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) { + return 1; + } + + if ('COLORTERM' in env$1) { + return 1; + } + + if (env$1.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel$1(stream) { + var level = supportsColor$4(stream); + return translateLevel$1(level); +} + +var supportsColor_1$3 = { + supportsColor: getSupportLevel$1, + stdout: getSupportLevel$1(process.stdout), + stderr: getSupportLevel$1(process.stderr) +}; + +var templates$4 = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]); + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var chalk$5 = createCommonjsModule(function (module) { + 'use strict'; + + var stdoutColor = supportsColor_1$3.stdout; + var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + + var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + + var skipModels = new Set(['gray']); + var styles = Object.create(null); + + function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; + } + + function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); + } // Use bright blue on Windows as the normal blue color is illegible + + + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; + } + + var _arr = Object.keys(ansiStyles); + + var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + + }; + }; + + for (var _i = 0; _i < _arr.length; _i++) { + _loop(); + } + + styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } + + }; + ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + + var _arr2 = Object.keys(ansiStyles.color.ansi); + + var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + + }; + }; + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; + } + + ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + + var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + + var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + + }; + }; + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; + } + + var proto = Object.defineProperties(function () {}, styles); + + function build(_styles, _empty, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + + get() { + return self.level; + }, + + set(level) { + self.level = level; + } + + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + + get() { + return self.enabled; + }, + + set(enabled) { + self.enabled = enabled; + } + + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; + } + + function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; + } + + function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates$4(chalk, parts.join('')); + } + + Object.defineProperties(Chalk.prototype, styles); + module.exports = Chalk(); // eslint-disable-line new-cap + + module.exports.supportsColor = stdoutColor; + module.exports.default = module.exports; // For TypeScript +}); + +var lib$3 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.shouldHighlight = shouldHighlight; + exports.getChalk = getChalk; + exports.default = highlight; + + function _jsTokens() { + var data = _interopRequireWildcard(jsTokens); + + _jsTokens = function _jsTokens() { + return data; + }; + + return data; + } + + function _esutils() { + var data = _interopRequireDefault(utils$2); + + _esutils = function _esutils() { + return data; + }; + + return data; + } + + function _chalk() { + var data = _interopRequireDefault(chalk$5); + + _chalk = function _chalk() { + return data; + }; + + return data; + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } + } + + function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsx_tag: chalk.yellow, + punctuator: chalk.yellow, + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold + }; + } + + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + var JSX_TAG = /^[a-z][\w-]*$/i; + var BRACKET = /^[()[\]{}]$/; + + function getTokenType(match) { + var _match$slice = match.slice(-2), + offset = _match$slice[0], + text = _match$slice[1]; + + var token = (0, _jsTokens().matchToToken)(match); + + if (token.type === "name") { + if (_esutils().default.keyword.isReservedWordES6(token.value)) { + return "keyword"; + } + + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == ""), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return " " + maybeHighlight(defs.gutter, gutter) + line; + } + }).join("\n"); + + if (opts.message && !hasColumns) { + frame = "" + " ".repeat(numberMaxWidth + 1) + opts.message + "\n" + frame; + } + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } + } + + function _default(rawLines, lineNumber, colNumber, opts) { + if (opts === void 0) { + opts = {}; + } + + if (!deprecationWarningShown) { + deprecationWarningShown = true; + var message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + var deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + + colNumber = Math.max(colNumber, 0); + var location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); + } +}); +unwrapExports(lib$2); + +var ConfigError$1 = errors.ConfigError; +var locStart = loc.locStart; +var locEnd = loc.locEnd; // Use defineProperties()/getOwnPropertyDescriptor() to prevent +// triggering the parsers getters. + +var ownNames = Object.getOwnPropertyNames; +var ownDescriptor = Object.getOwnPropertyDescriptor; + +function getParsers(options) { + var parsers = {}; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = options.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var plugin = _step.value; + + if (!plugin.parsers) { + continue; + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = ownNames(plugin.parsers)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var name = _step2.value; + Object.defineProperty(parsers, name, ownDescriptor(plugin.parsers, name)); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return parsers; +} + +function resolveParser$1(opts, parsers) { + parsers = parsers || getParsers(opts); + + if (typeof opts.parser === "function") { + // Custom parser API always works with JavaScript. + return { + parse: opts.parser, + astFormat: "estree", + locStart, + locEnd + }; + } + + if (typeof opts.parser === "string") { + if (parsers.hasOwnProperty(opts.parser)) { + return parsers[opts.parser]; + } + + try { + return { + parse: require(path.resolve(process.cwd(), opts.parser)), + astFormat: "estree", + locStart, + locEnd + }; + } catch (err) { + /* istanbul ignore next */ + throw new ConfigError$1(`Couldn't resolve parser "${opts.parser}"`); + } + } +} + +function parse$2(text, opts) { + var parsers = getParsers(opts); // Create a new object {parserName: parseFn}. Uses defineProperty() to only call + // the parsers getters when actually calling the parser `parse` function. + + var parsersForCustomParserApi = Object.keys(parsers).reduce(function (object, parserName) { + return Object.defineProperty(object, parserName, { + enumerable: true, + + get() { + return parsers[parserName].parse; + } + + }); + }, {}); + var parser = resolveParser$1(opts, parsers); + + try { + if (parser.preprocess) { + text = parser.preprocess(text, opts); + } + + return { + text, + ast: parser.parse(text, parsersForCustomParserApi, opts) + }; + } catch (error) { + var loc$$1 = error.loc; + + if (loc$$1) { + var codeFrame = lib$2; + error.codeFrame = codeFrame.codeFrameColumns(text, loc$$1, { + highlightCode: true + }); + error.message += "\n" + error.codeFrame; + throw error; + } + /* istanbul ignore next */ + + + throw error.stack; + } +} + +var parser = { + parse: parse$2, + resolveParser: resolveParser$1 +}; + +var UndefinedParserError = errors.UndefinedParserError; +var getSupportInfo$1 = support.getSupportInfo; +var resolveParser = parser.resolveParser; +var hiddenDefaults = { + astFormat: "estree", + printer: {}, + originalText: undefined, + locStart: null, + locEnd: null +}; // Copy options and fill in default values. + +function normalize(options, opts) { + opts = opts || {}; + var rawOptions = Object.assign({}, options); + var supportOptions = getSupportInfo$1(null, { + plugins: options.plugins, + showUnreleased: true, + showDeprecated: true + }).options; + var defaults = supportOptions.reduce(function (reduced, optionInfo) { + return optionInfo.default !== undefined ? Object.assign(reduced, { + [optionInfo.name]: optionInfo.default + }) : reduced; + }, Object.assign({}, hiddenDefaults)); + + if (!rawOptions.parser) { + if (!rawOptions.filepath) { + var logger = opts.logger || console; + logger.warn("No parser and no filepath given, using 'babylon' the parser now " + "but this will throw an error in the future. " + "Please specify a parser or a filepath so one can be inferred."); + rawOptions.parser = "babylon"; + } else { + rawOptions.parser = inferParser(rawOptions.filepath, rawOptions.plugins); + + if (!rawOptions.parser) { + throw new UndefinedParserError(`No parser could be inferred for file: ${rawOptions.filepath}`); + } + } + } + + var parser$$1 = resolveParser(optionsNormalizer.normalizeApiOptions(rawOptions, [supportOptions.find(function (x) { + return x.name === "parser"; + })], { + passThrough: true, + logger: false + })); + rawOptions.astFormat = parser$$1.astFormat; + rawOptions.locEnd = parser$$1.locEnd; + rawOptions.locStart = parser$$1.locStart; + var plugin = getPlugin(rawOptions); + rawOptions.printer = plugin.printers[rawOptions.astFormat]; + var pluginDefaults = supportOptions.filter(function (optionInfo) { + return optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name]; + }).reduce(function (reduced, optionInfo) { + return Object.assign(reduced, { + [optionInfo.name]: optionInfo.pluginDefaults[plugin.name] + }); + }, {}); + var mixedDefaults = Object.assign({}, defaults, pluginDefaults); + Object.keys(mixedDefaults).forEach(function (k) { + if (rawOptions[k] == null) { + rawOptions[k] = mixedDefaults[k]; + } + }); + + if (rawOptions.parser === "json") { + rawOptions.trailingComma = "none"; + } + + return optionsNormalizer.normalizeApiOptions(rawOptions, supportOptions, Object.assign({ + passThrough: Object.keys(hiddenDefaults) + }, opts)); +} + +function getPlugin(options) { + var astFormat = options.astFormat; + + if (!astFormat) { + throw new Error("getPlugin() requires astFormat to be set"); + } + + var printerPlugin = options.plugins.find(function (plugin) { + return plugin.printers && plugin.printers[astFormat]; + }); + + if (!printerPlugin) { + throw new Error(`Couldn't find plugin for AST format "${astFormat}"`); + } + + return printerPlugin; +} + +function getInterpreter(filepath) { + if (typeof filepath !== "string") { + return ""; + } + + var fd; + + try { + fd = fs.openSync(filepath, "r"); + } catch (err) { + return ""; + } + + try { + var liner = new readlines(fd); + var firstLine = liner.next().toString("utf8"); // #!/bin/env node, #!/usr/bin/env node + + var m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/); + + if (m1) { + return m1[1]; + } // #!/bin/node, #!/usr/bin/node, #!/usr/local/bin/node + + + var m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/); + + if (m2) { + return m2[1]; + } + + return ""; + } catch (err) { + // There are some weird cases where paths are missing, causing Jest + // failures. It's unclear what these correspond to in the real world. + return ""; + } finally { + try { + // There are some weird cases where paths are missing, causing Jest + // failures. It's unclear what these correspond to in the real world. + fs.closeSync(fd); + } catch (err) {// nop + } + } +} + +function inferParser(filepath, plugins) { + var filepathParts = normalizePath(filepath).split("/"); + var filename = filepathParts[filepathParts.length - 1].toLowerCase(); // If the file has no extension, we can try to infer the language from the + // interpreter in the shebang line, if any; but since this requires FS access, + // do it last. + + var language = getSupportInfo$1(null, { + plugins + }).languages.find(function (language) { + return language.since !== null && (language.extensions && language.extensions.some(function (extension) { + return filename.endsWith(extension); + }) || language.filenames && language.filenames.find(function (name) { + return name.toLowerCase() === filename; + }) || filename.indexOf(".") === -1 && language.interpreters && language.interpreters.indexOf(getInterpreter(filepath)) !== -1); + }); + return language && language.parsers[0]; +} + +var options = { + normalize, + hiddenDefaults, + inferParser +}; + +function massageAST(ast, options, parent) { + if (Array.isArray(ast)) { + return ast.map(function (e) { + return massageAST(e, options, parent); + }).filter(function (e) { + return e; + }); + } + + if (!ast || typeof ast !== "object") { + return ast; + } + + var newObj = {}; + + var _arr = Object.keys(ast); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + + if (typeof ast[key] !== "function") { + newObj[key] = massageAST(ast[key], options, ast); + } + } + + if (options.printer.massageAstNode) { + var result = options.printer.massageAstNode(ast, newObj, parent); + + if (result === null) { + return undefined; + } + + if (result) { + return result; + } + } + + return newObj; +} + +var massageAst = massageAST; + +function concat$1(parts) { + return { + type: "concat", + parts + }; +} + +function indent$1(contents) { + return { + type: "indent", + contents + }; +} + +function align(n, contents) { + return { + type: "align", + contents, + n + }; +} + +function group(contents, opts) { + opts = opts || {}; + + return { + type: "group", + id: opts.id, + contents: contents, + break: !!opts.shouldBreak, + expandedStates: opts.expandedStates + }; +} + +function dedentToRoot(contents) { + return align(-Infinity, contents); +} + +function markAsRoot(contents) { + return align({ + type: "root" + }, contents); +} + +function dedent$1(contents) { + return align(-1, contents); +} + +function conditionalGroup(states, opts) { + return group(states[0], Object.assign(opts || {}, { + expandedStates: states + })); +} + +function fill(parts) { + return { + type: "fill", + parts + }; +} + +function ifBreak(breakContents, flatContents, opts) { + opts = opts || {}; + + return { + type: "if-break", + breakContents, + flatContents, + groupId: opts.groupId + }; +} + +function lineSuffix$1(contents) { + return { + type: "line-suffix", + contents + }; +} + +var lineSuffixBoundary = { + type: "line-suffix-boundary" +}; +var breakParent$1 = { + type: "break-parent" +}; +var trim = { + type: "trim" +}; +var line$2 = { + type: "line" +}; +var softline = { + type: "line", + soft: true +}; +var hardline$1 = concat$1([{ + type: "line", + hard: true +}, breakParent$1]); +var literalline = concat$1([{ + type: "line", + hard: true, + literal: true +}, breakParent$1]); +var cursor$1 = { + type: "cursor", + placeholder: Symbol("cursor") +}; + +function join$1(sep, arr) { + var res = []; + + for (var i = 0; i < arr.length; i++) { + if (i !== 0) { + res.push(sep); + } + + res.push(arr[i]); + } + + return concat$1(res); +} + +function addAlignmentToDoc(doc, size, tabWidth) { + var aligned = doc; + + if (size > 0) { + // Use indent to add tabs for all the levels of tabs we need + for (var i = 0; i < Math.floor(size / tabWidth); ++i) { + aligned = indent$1(aligned); + } // Use align for all the spaces that are needed + + + aligned = align(size % tabWidth, aligned); // size is absolute from 0 and not relative to the current + // indentation, so we use -Infinity to reset the indentation to 0 + + aligned = align(-Infinity, aligned); + } + + return aligned; +} + +var docBuilders = { + concat: concat$1, + join: join$1, + line: line$2, + softline, + hardline: hardline$1, + literalline, + group, + conditionalGroup, + fill, + lineSuffix: lineSuffix$1, + lineSuffixBoundary, + cursor: cursor$1, + breakParent: breakParent$1, + ifBreak, + trim, + indent: indent$1, + align, + addAlignmentToDoc, + markAsRoot, + dedentToRoot, + dedent: dedent$1 +}; + +var ansiRegex = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function () { + var pattern = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'].join('|'); + return new RegExp(pattern, 'g'); + }; +}); + +var stripAnsi = function stripAnsi(input) { + return typeof input === 'string' ? input.replace(ansiRegex(), '') : input; +}; + +var isFullwidthCodePoint = createCommonjsModule(function (module) { + 'use strict'; + /* eslint-disable yoda */ + + module.exports = function (x) { + if (Number.isNaN(x)) { + return false; + } // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + + + if (x >= 0x1100 && (x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + 0x2e80 <= x && x <= 0x3247 && x !== 0x303f || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + 0x3250 <= x && x <= 0x4dbf || // CJK Unified Ideographs .. Yi Radicals + 0x4e00 <= x && x <= 0xa4c6 || // Hangul Jamo Extended-A + 0xa960 <= x && x <= 0xa97c || // Hangul Syllables + 0xac00 <= x && x <= 0xd7a3 || // CJK Compatibility Ideographs + 0xf900 <= x && x <= 0xfaff || // Vertical Forms + 0xfe10 <= x && x <= 0xfe19 || // CJK Compatibility Forms .. Small Form Variants + 0xfe30 <= x && x <= 0xfe6b || // Halfwidth and Fullwidth Forms + 0xff01 <= x && x <= 0xff60 || 0xffe0 <= x && x <= 0xffe6 || // Kana Supplement + 0x1b000 <= x && x <= 0x1b001 || // Enclosed Ideographic Supplement + 0x1f200 <= x && x <= 0x1f251 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + 0x20000 <= x && x <= 0x3fffd)) { + return true; + } + + return false; + }; +}); + +var stringWidth = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (str) { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + str = stripAnsi(str); + var width = 0; + + for (var i = 0; i < str.length; i++) { + var code = str.codePointAt(i); // Ignore control characters + + if (code <= 0x1F || code >= 0x7F && code <= 0x9F) { + continue; + } // Ignore combining characters + + + if (code >= 0x300 && code <= 0x36F) { + continue; + } // Surrogates + + + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; + }; +}); + +var emojiRegex$1 = function emojiRegex() { + // https://mathiasbynens.be/notes/es-unicode-property-escapes#emoji + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]\uFE0F|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F/g; +}; + +var emojiRegex = emojiRegex$1(); // eslint-disable-next-line no-control-regex + +var notAsciiRegex = /[^\x20-\x7F]/; + +function isExportDeclaration(node) { + if (node) { + switch (node.type) { + case "ExportDefaultDeclaration": + case "ExportDefaultSpecifier": + case "DeclareExportDeclaration": + case "ExportNamedDeclaration": + case "ExportAllDeclaration": + return true; + } + } + + return false; +} + +function getParentExportDeclaration(path$$1) { + var parentNode = path$$1.getParentNode(); + + if (path$$1.getName() === "declaration" && isExportDeclaration(parentNode)) { + return parentNode; + } + + return null; +} + +function getPenultimate(arr) { + if (arr.length > 1) { + return arr[arr.length - 2]; + } + + return null; +} + +function getLast$3(arr) { + if (arr.length > 0) { + return arr[arr.length - 1]; + } + + return null; +} + +function skip(chars) { + return function (text, index, opts) { + var backwards = opts && opts.backwards; // Allow `skip` functions to be threaded together without having + // to check for failures (did someone say monads?). + + if (index === false) { + return false; + } + + var length = text.length; + var cursor = index; + + while (cursor >= 0 && cursor < length) { + var c = text.charAt(cursor); + + if (chars instanceof RegExp) { + if (!chars.test(c)) { + return cursor; + } + } else if (chars.indexOf(c) === -1) { + return cursor; + } + + backwards ? cursor-- : cursor++; + } + + if (cursor === -1 || cursor === length) { + // If we reached the beginning or end of the file, return the + // out-of-bounds cursor. It's up to the caller to handle this + // correctly. We don't want to indicate `false` though if it + // actually skipped valid characters. + return cursor; + } + + return false; + }; +} + +var skipWhitespace = skip(/\s/); +var skipSpaces = skip(" \t"); +var skipToLineEnd = skip(",; \t"); +var skipEverythingButNewLine = skip(/[^\r\n]/); + +function skipInlineComment(text, index) { + if (index === false) { + return false; + } + + if (text.charAt(index) === "/" && text.charAt(index + 1) === "*") { + for (var i = index + 2; i < text.length; ++i) { + if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") { + return i + 2; + } + } + } + + return index; +} + +function skipTrailingComment(text, index) { + if (index === false) { + return false; + } + + if (text.charAt(index) === "/" && text.charAt(index + 1) === "/") { + return skipEverythingButNewLine(text, index); + } + + return index; +} // This one doesn't use the above helper function because it wants to +// test \r\n in order and `skip` doesn't support ordering and we only +// want to skip one newline. It's simple to implement. + + +function skipNewline$1(text, index, opts) { + var backwards = opts && opts.backwards; + + if (index === false) { + return false; + } + + var atIndex = text.charAt(index); + + if (backwards) { + if (text.charAt(index - 1) === "\r" && atIndex === "\n") { + return index - 2; + } + + if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") { + return index - 1; + } + } else { + if (atIndex === "\r" && text.charAt(index + 1) === "\n") { + return index + 2; + } + + if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") { + return index + 1; + } + } + + return index; +} + +function hasNewline$1(text, index, opts) { + opts = opts || {}; + var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + var idx2 = skipNewline$1(text, idx, opts); + return idx !== idx2; +} + +function hasNewlineInRange(text, start, end) { + for (var i = start; i < end; ++i) { + if (text.charAt(i) === "\n") { + return true; + } + } + + return false; +} // Note: this function doesn't ignore leading comments unlike isNextLineEmpty + + +function isPreviousLineEmpty$1(text, node, locStart) { + var idx = locStart(node) - 1; + idx = skipSpaces(text, idx, { + backwards: true + }); + idx = skipNewline$1(text, idx, { + backwards: true + }); + idx = skipSpaces(text, idx, { + backwards: true + }); + var idx2 = skipNewline$1(text, idx, { + backwards: true + }); + return idx !== idx2; +} + +function isNextLineEmptyAfterIndex(text, index) { + var oldIdx = null; + var idx = index; + + while (idx !== oldIdx) { + // We need to skip all the potential trailing inline comments + oldIdx = idx; + idx = skipToLineEnd(text, idx); + idx = skipInlineComment(text, idx); + idx = skipSpaces(text, idx); + } + + idx = skipTrailingComment(text, idx); + idx = skipNewline$1(text, idx); + return hasNewline$1(text, idx); +} + +function isNextLineEmpty(text, node, locEnd) { + return isNextLineEmptyAfterIndex(text, locEnd(node)); +} + +function getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, idx) { + var oldIdx = null; + + while (idx !== oldIdx) { + oldIdx = idx; + idx = skipSpaces(text, idx); + idx = skipInlineComment(text, idx); + idx = skipTrailingComment(text, idx); + idx = skipNewline$1(text, idx); + } + + return idx; +} + +function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) { + return getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, locEnd(node)); +} + +function getNextNonSpaceNonCommentCharacter(text, node, locEnd) { + return text.charAt(getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd)); +} + +function hasSpaces(text, index, opts) { + opts = opts || {}; + var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + return idx !== index; +} + +function setLocStart(node, index) { + if (node.range) { + node.range[0] = index; + } else { + node.start = index; + } +} + +function setLocEnd(node, index) { + if (node.range) { + node.range[1] = index; + } else { + node.end = index; + } +} + +var PRECEDENCE = {}; +[["|>"], ["||", "??"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].forEach(function (tier, i) { + tier.forEach(function (op) { + PRECEDENCE[op] = i; + }); +}); + +function getPrecedence(op) { + return PRECEDENCE[op]; +} + +var equalityOperators = { + "==": true, + "!=": true, + "===": true, + "!==": true +}; +var multiplicativeOperators = { + "*": true, + "/": true, + "%": true +}; +var bitshiftOperators = { + ">>": true, + ">>>": true, + "<<": true +}; + +function shouldFlatten(parentOp, nodeOp) { + if (getPrecedence(nodeOp) !== getPrecedence(parentOp)) { + return false; + } // ** is right-associative + // x ** y ** z --> x ** (y ** z) + + + if (parentOp === "**") { + return false; + } // x == y == z --> (x == y) == z + + + if (equalityOperators[parentOp] && equalityOperators[nodeOp]) { + return false; + } // x * y % z --> (x * y) % z + + + if (nodeOp === "%" && multiplicativeOperators[parentOp] || parentOp === "%" && multiplicativeOperators[nodeOp]) { + return false; + } // x * y / z --> (x * y) / z + // x / y * z --> (x / y) * z + + + if (nodeOp !== parentOp && multiplicativeOperators[nodeOp] && multiplicativeOperators[parentOp]) { + return false; + } // x << y << z --> (x << y) << z + + + if (bitshiftOperators[parentOp] && bitshiftOperators[nodeOp]) { + return false; + } + + return true; +} + +function isBitwiseOperator(operator) { + return !!bitshiftOperators[operator] || operator === "|" || operator === "^" || operator === "&"; +} // Tests if an expression starts with `{`, or (if forbidFunctionClassAndDoExpr +// holds) `function`, `class`, or `do {}`. Will be overzealous if there's +// already necessary grouping parentheses. + + +function startsWithNoLookaheadToken(node, forbidFunctionClassAndDoExpr) { + node = getLeftMost(node); + + switch (node.type) { + case "FunctionExpression": + case "ClassExpression": + case "DoExpression": + return forbidFunctionClassAndDoExpr; + + case "ObjectExpression": + return true; + + case "MemberExpression": + return startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr); + + case "TaggedTemplateExpression": + if (node.tag.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + + return startsWithNoLookaheadToken(node.tag, forbidFunctionClassAndDoExpr); + + case "CallExpression": + if (node.callee.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + + return startsWithNoLookaheadToken(node.callee, forbidFunctionClassAndDoExpr); + + case "ConditionalExpression": + return startsWithNoLookaheadToken(node.test, forbidFunctionClassAndDoExpr); + + case "UpdateExpression": + return !node.prefix && startsWithNoLookaheadToken(node.argument, forbidFunctionClassAndDoExpr); + + case "BindExpression": + return node.object && startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr); + + case "SequenceExpression": + return startsWithNoLookaheadToken(node.expressions[0], forbidFunctionClassAndDoExpr); + + case "TSAsExpression": + return startsWithNoLookaheadToken(node.expression, forbidFunctionClassAndDoExpr); + + default: + return false; + } +} + +function getLeftMost(node) { + if (node.left) { + return getLeftMost(node.left); + } + + return node; +} + +function getAlignmentSize(value, tabWidth, startIndex) { + startIndex = startIndex || 0; + var size = 0; + + for (var i = startIndex; i < value.length; ++i) { + if (value[i] === "\t") { + // Tabs behave in a way that they are aligned to the nearest + // multiple of tabWidth: + // 0 -> 4, 1 -> 4, 2 -> 4, 3 -> 4 + // 4 -> 8, 5 -> 8, 6 -> 8, 7 -> 8 ... + size = size + tabWidth - size % tabWidth; + } else { + size++; + } + } + + return size; +} + +function getIndentSize(value, tabWidth) { + var lastNewlineIndex = value.lastIndexOf("\n"); + + if (lastNewlineIndex === -1) { + return 0; + } + + return getAlignmentSize( // All the leading whitespaces + value.slice(lastNewlineIndex + 1).match(/^[ \t]*/)[0], tabWidth); +} + +function getPreferredQuote(raw, preferredQuote) { + // `rawContent` is the string exactly like it appeared in the input source + // code, without its enclosing quotes. + var rawContent = raw.slice(1, -1); + var double = { + quote: '"', + regex: /"/g + }; + var single = { + quote: "'", + regex: /'/g + }; + var preferred = preferredQuote === "'" ? single : double; + var alternate = preferred === single ? double : single; + var result = preferred.quote; // If `rawContent` contains at least one of the quote preferred for enclosing + // the string, we might want to enclose with the alternate quote instead, to + // minimize the number of escaped quotes. + + if (rawContent.includes(preferred.quote) || rawContent.includes(alternate.quote)) { + var numPreferredQuotes = (rawContent.match(preferred.regex) || []).length; + var numAlternateQuotes = (rawContent.match(alternate.regex) || []).length; + result = numPreferredQuotes > numAlternateQuotes ? alternate.quote : preferred.quote; + } + + return result; +} + +function printString(raw, options, isDirectiveLiteral) { + // `rawContent` is the string exactly like it appeared in the input source + // code, without its enclosing quotes. + var rawContent = raw.slice(1, -1); // Check for the alternate quote, to determine if we're allowed to swap + // the quotes on a DirectiveLiteral. + + var canChangeDirectiveQuotes = !rawContent.includes('"') && !rawContent.includes("'"); + var enclosingQuote = options.parser === "json" ? '"' : options.__isInHtmlAttribute ? "'" : getPreferredQuote(raw, options.singleQuote ? "'" : '"'); // Directives are exact code unit sequences, which means that you can't + // change the escape sequences they use. + // See https://github.com/prettier/prettier/issues/1555 + // and https://tc39.github.io/ecma262/#directive-prologue + + if (isDirectiveLiteral) { + if (canChangeDirectiveQuotes) { + return enclosingQuote + rawContent + enclosingQuote; + } + + return raw; + } // It might sound unnecessary to use `makeString` even if the string already + // is enclosed with `enclosingQuote`, but it isn't. The string could contain + // unnecessary escapes (such as in `"\'"`). Always using `makeString` makes + // sure that we consistently output the minimum amount of escaped quotes. + + + return makeString(rawContent, enclosingQuote, !(options.parser === "css" || options.parser === "less" || options.parser === "scss" || options.parentParser === "html" || options.parentParser === "vue" || options.parentParser === "angular")); +} + +function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) { + var otherQuote = enclosingQuote === '"' ? "'" : '"'; // Matches _any_ escape and unescaped quotes (both single and double). + + var regex = /\\([\s\S])|(['"])/g; // Escape and unescape single and double quotes as needed to be able to + // enclose `rawContent` with `enclosingQuote`. + + var newContent = rawContent.replace(regex, function (match, escaped, quote) { + // If we matched an escape, and the escaped character is a quote of the + // other type than we intend to enclose the string with, there's no need for + // it to be escaped, so return it _without_ the backslash. + if (escaped === otherQuote) { + return escaped; + } // If we matched an unescaped quote and it is of the _same_ type as we + // intend to enclose the string with, it must be escaped, so return it with + // a backslash. + + + if (quote === enclosingQuote) { + return "\\" + quote; + } + + if (quote) { + return quote; + } // Unescape any unnecessarily escaped character. + // Adapted from https://github.com/eslint/eslint/blob/de0b4ad7bd820ade41b1f606008bea68683dc11a/lib/rules/no-useless-escape.js#L27 + + + return unescapeUnnecessaryEscapes && /^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(escaped) ? escaped : "\\" + escaped; + }); + return enclosingQuote + newContent + enclosingQuote; +} + +function printNumber(rawNumber) { + return rawNumber.toLowerCase() // Remove unnecessary plus and zeroes from scientific notation. + .replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3") // Remove unnecessary scientific notation (1e0). + .replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1") // Make sure numbers always start with a digit. + .replace(/^([+-])?\./, "$10.") // Remove extraneous trailing decimal zeroes. + .replace(/(\.\d+?)0+(?=e|$)/, "$1") // Remove trailing dot. + .replace(/\.(?=e|$)/, ""); +} + +function getMaxContinuousCount(str, target) { + var results = str.match(new RegExp(`(${escapeStringRegexp(target)})+`, "g")); + + if (results === null) { + return 0; + } + + return results.reduce(function (maxCount, result) { + return Math.max(maxCount, result.length / target.length); + }, 0); +} + +function getStringWidth$1(text) { + if (!text) { + return 0; + } // shortcut to avoid needless string `RegExp`s, replacements, and allocations within `string-width` + + + if (!notAsciiRegex.test(text)) { + return text.length; + } // emojis are considered 2-char width for consistency + // see https://github.com/sindresorhus/string-width/issues/11 + // for the reason why not implemented in `string-width` + + + return stringWidth(text.replace(emojiRegex, " ")); +} + +function hasIgnoreComment(path$$1) { + var node = path$$1.getValue(); + return hasNodeIgnoreComment(node); +} + +function hasNodeIgnoreComment(node) { + return node && node.comments && node.comments.length > 0 && node.comments.some(function (comment) { + return comment.value.trim() === "prettier-ignore"; + }); +} + +function matchAncestorTypes(path$$1, types, index) { + index = index || 0; + types = types.slice(); + + while (types.length) { + var parent = path$$1.getParentNode(index); + var type = types.shift(); + + if (!parent || parent.type !== type) { + return false; + } + + index++; + } + + return true; +} + +function addCommentHelper(node, comment) { + var comments = node.comments || (node.comments = []); + comments.push(comment); + comment.printed = false; // For some reason, TypeScript parses `// x` inside of JSXText as a comment + // We already "print" it via the raw text, we don't need to re-print it as a + // comment + + if (node.type === "JSXText") { + comment.printed = true; + } +} + +function addLeadingComment$1(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addDanglingComment$1(node, comment) { + comment.leading = false; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addTrailingComment$1(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} + +function isWithinParentArrayProperty(path$$1, propertyName) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + + if (parent == null) { + return false; + } + + if (!Array.isArray(parent[propertyName])) { + return false; + } + + var key = path$$1.getName(); + return parent[propertyName][key] === node; +} + +var util$1 = { + getStringWidth: getStringWidth$1, + getMaxContinuousCount, + getPrecedence, + shouldFlatten, + isBitwiseOperator, + isExportDeclaration, + getParentExportDeclaration, + getPenultimate, + getLast: getLast$3, + getNextNonSpaceNonCommentCharacterIndexWithStartIndex, + getNextNonSpaceNonCommentCharacterIndex, + getNextNonSpaceNonCommentCharacter, + skip, + skipWhitespace, + skipSpaces, + skipToLineEnd, + skipEverythingButNewLine, + skipInlineComment, + skipTrailingComment, + skipNewline: skipNewline$1, + isNextLineEmptyAfterIndex, + isNextLineEmpty, + isPreviousLineEmpty: isPreviousLineEmpty$1, + hasNewline: hasNewline$1, + hasNewlineInRange, + hasSpaces, + setLocStart, + setLocEnd, + startsWithNoLookaheadToken, + getAlignmentSize, + getIndentSize, + getPreferredQuote, + printString, + printNumber, + hasIgnoreComment, + hasNodeIgnoreComment, + makeString, + matchAncestorTypes, + addLeadingComment: addLeadingComment$1, + addDanglingComment: addDanglingComment$1, + addTrailingComment: addTrailingComment$1, + isWithinParentArrayProperty +}; + +function guessEndOfLine$1(text) { + var index = text.indexOf("\r"); + + if (index >= 0) { + return text.charAt(index + 1) === "\n" ? "crlf" : "cr"; + } + + return "lf"; +} + +function convertEndOfLineToChars$2(value) { + switch (value) { + case "cr": + return "\r"; + + case "crlf": + return "\r\n"; + + default: + return "\n"; + } +} + +var endOfLine = { + guessEndOfLine: guessEndOfLine$1, + convertEndOfLineToChars: convertEndOfLineToChars$2 +}; + +var getStringWidth = util$1.getStringWidth; +var convertEndOfLineToChars$1 = endOfLine.convertEndOfLineToChars; +var concat$2 = docBuilders.concat; +var fill$1 = docBuilders.fill; +var cursor$2 = docBuilders.cursor; +/** @type {{[groupId: PropertyKey]: MODE}} */ + +var groupModeMap; +var MODE_BREAK = 1; +var MODE_FLAT = 2; + +function rootIndent() { + return { + value: "", + length: 0, + queue: [] + }; +} + +function makeIndent(ind, options) { + return generateInd(ind, { + type: "indent" + }, options); +} + +function makeAlign(ind, n, options) { + return n === -Infinity ? ind.root || rootIndent() : n < 0 ? generateInd(ind, { + type: "dedent" + }, options) : !n ? ind : n.type === "root" ? Object.assign({}, ind, { + root: ind + }) : typeof n === "string" ? generateInd(ind, { + type: "stringAlign", + n + }, options) : generateInd(ind, { + type: "numberAlign", + n + }, options); +} + +function generateInd(ind, newPart, options) { + var queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : ind.queue.concat(newPart); + var value = ""; + var length = 0; + var lastTabs = 0; + var lastSpaces = 0; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = queue[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var part = _step.value; + + switch (part.type) { + case "indent": + flush(); + + if (options.useTabs) { + addTabs(1); + } else { + addSpaces(options.tabWidth); + } + + break; + + case "stringAlign": + flush(); + value += part.n; + length += part.n.length; + break; + + case "numberAlign": + lastTabs += 1; + lastSpaces += part.n; + break; + + /* istanbul ignore next */ + + default: + throw new Error(`Unexpected type '${part.type}'`); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + flushSpaces(); + return Object.assign({}, ind, { + value, + length, + queue + }); + + function addTabs(count) { + value += "\t".repeat(count); + length += options.tabWidth * count; + } + + function addSpaces(count) { + value += " ".repeat(count); + length += count; + } + + function flush() { + if (options.useTabs) { + flushTabs(); + } else { + flushSpaces(); + } + } + + function flushTabs() { + if (lastTabs > 0) { + addTabs(lastTabs); + } + + resetLast(); + } + + function flushSpaces() { + if (lastSpaces > 0) { + addSpaces(lastSpaces); + } + + resetLast(); + } + + function resetLast() { + lastTabs = 0; + lastSpaces = 0; + } +} + +function trim$1(out) { + if (out.length === 0) { + return 0; + } + + var trimCount = 0; // Trim whitespace at the end of line + + while (out.length > 0 && typeof out[out.length - 1] === "string" && out[out.length - 1].match(/^[ \t]*$/)) { + trimCount += out.pop().length; + } + + if (out.length && typeof out[out.length - 1] === "string") { + var trimmed = out[out.length - 1].replace(/[ \t]*$/, ""); + trimCount += out[out.length - 1].length - trimmed.length; + out[out.length - 1] = trimmed; + } + + return trimCount; +} + +function fits(next, restCommands, width, options, mustBeFlat) { + var restIdx = restCommands.length; + var cmds = [next]; // `out` is only used for width counting because `trim` requires to look + // backwards for space characters. + + var out = []; + + while (width >= 0) { + if (cmds.length === 0) { + if (restIdx === 0) { + return true; + } + + cmds.push(restCommands[restIdx - 1]); + restIdx--; + continue; + } + + var x = cmds.pop(); + var ind = x[0]; + var mode = x[1]; + var doc = x[2]; + + if (typeof doc === "string") { + out.push(doc); + width -= getStringWidth(doc); + } else { + switch (doc.type) { + case "concat": + for (var i = doc.parts.length - 1; i >= 0; i--) { + cmds.push([ind, mode, doc.parts[i]]); + } + + break; + + case "indent": + cmds.push([makeIndent(ind, options), mode, doc.contents]); + break; + + case "align": + cmds.push([makeAlign(ind, doc.n, options), mode, doc.contents]); + break; + + case "trim": + width += trim$1(out); + break; + + case "group": + if (mustBeFlat && doc.break) { + return false; + } + + cmds.push([ind, doc.break ? MODE_BREAK : mode, doc.contents]); + + if (doc.id) { + groupModeMap[doc.id] = cmds[cmds.length - 1][1]; + } + + break; + + case "fill": + for (var _i = doc.parts.length - 1; _i >= 0; _i--) { + cmds.push([ind, mode, doc.parts[_i]]); + } + + break; + + case "if-break": + { + var groupMode = doc.groupId ? groupModeMap[doc.groupId] : mode; + + if (groupMode === MODE_BREAK) { + if (doc.breakContents) { + cmds.push([ind, mode, doc.breakContents]); + } + } + + if (groupMode === MODE_FLAT) { + if (doc.flatContents) { + cmds.push([ind, mode, doc.flatContents]); + } + } + + break; + } + + case "line": + switch (mode) { + // fallthrough + case MODE_FLAT: + if (!doc.hard) { + if (!doc.soft) { + out.push(" "); + width -= 1; + } + + break; + } + + return true; + + case MODE_BREAK: + return true; + } + + break; + } + } + } + + return false; +} + +function printDocToString$1(doc, options) { + groupModeMap = {}; + var width = options.printWidth; + var newLine = convertEndOfLineToChars$1(options.endOfLine); + var pos = 0; // cmds is basically a stack. We've turned a recursive call into a + // while loop which is much faster. The while loop below adds new + // cmds to the array instead of recursively calling `print`. + + var cmds = [[rootIndent(), MODE_BREAK, doc]]; + var out = []; + var shouldRemeasure = false; + var lineSuffix = []; + + while (cmds.length !== 0) { + var x = cmds.pop(); + var ind = x[0]; + var mode = x[1]; + var _doc = x[2]; + + if (typeof _doc === "string") { + out.push(_doc); + pos += getStringWidth(_doc); + } else { + switch (_doc.type) { + case "cursor": + out.push(cursor$2.placeholder); + break; + + case "concat": + for (var i = _doc.parts.length - 1; i >= 0; i--) { + cmds.push([ind, mode, _doc.parts[i]]); + } + + break; + + case "indent": + cmds.push([makeIndent(ind, options), mode, _doc.contents]); + break; + + case "align": + cmds.push([makeAlign(ind, _doc.n, options), mode, _doc.contents]); + break; + + case "trim": + pos -= trim$1(out); + break; + + case "group": + switch (mode) { + case MODE_FLAT: + if (!shouldRemeasure) { + cmds.push([ind, _doc.break ? MODE_BREAK : MODE_FLAT, _doc.contents]); + break; + } + + // fallthrough + + case MODE_BREAK: + { + shouldRemeasure = false; + var next = [ind, MODE_FLAT, _doc.contents]; + var rem = width - pos; + + if (!_doc.break && fits(next, cmds, rem, options)) { + cmds.push(next); + } else { + // Expanded states are a rare case where a document + // can manually provide multiple representations of + // itself. It provides an array of documents + // going from the least expanded (most flattened) + // representation first to the most expanded. If a + // group has these, we need to manually go through + // these states and find the first one that fits. + if (_doc.expandedStates) { + var mostExpanded = _doc.expandedStates[_doc.expandedStates.length - 1]; + + if (_doc.break) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + break; + } else { + for (var _i2 = 1; _i2 < _doc.expandedStates.length + 1; _i2++) { + if (_i2 >= _doc.expandedStates.length) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + break; + } else { + var state = _doc.expandedStates[_i2]; + var cmd = [ind, MODE_FLAT, state]; + + if (fits(cmd, cmds, rem, options)) { + cmds.push(cmd); + break; + } + } + } + } + } else { + cmds.push([ind, MODE_BREAK, _doc.contents]); + } + } + + break; + } + } + + if (_doc.id) { + groupModeMap[_doc.id] = cmds[cmds.length - 1][1]; + } + + break; + // Fills each line with as much code as possible before moving to a new + // line with the same indentation. + // + // Expects doc.parts to be an array of alternating content and + // whitespace. The whitespace contains the linebreaks. + // + // For example: + // ["I", line, "love", line, "monkeys"] + // or + // [{ type: group, ... }, softline, { type: group, ... }] + // + // It uses this parts structure to handle three main layout cases: + // * The first two content items fit on the same line without + // breaking + // -> output the first content item and the whitespace "flat". + // * Only the first content item fits on the line without breaking + // -> output the first content item "flat" and the whitespace with + // "break". + // * Neither content item fits on the line without breaking + // -> output the first content item and the whitespace with "break". + + case "fill": + { + var _rem = width - pos; + + var parts = _doc.parts; + + if (parts.length === 0) { + break; + } + + var content = parts[0]; + var contentFlatCmd = [ind, MODE_FLAT, content]; + var contentBreakCmd = [ind, MODE_BREAK, content]; + var contentFits = fits(contentFlatCmd, [], _rem, options, true); + + if (parts.length === 1) { + if (contentFits) { + cmds.push(contentFlatCmd); + } else { + cmds.push(contentBreakCmd); + } + + break; + } + + var whitespace = parts[1]; + var whitespaceFlatCmd = [ind, MODE_FLAT, whitespace]; + var whitespaceBreakCmd = [ind, MODE_BREAK, whitespace]; + + if (parts.length === 2) { + if (contentFits) { + cmds.push(whitespaceFlatCmd); + cmds.push(contentFlatCmd); + } else { + cmds.push(whitespaceBreakCmd); + cmds.push(contentBreakCmd); + } + + break; + } // At this point we've handled the first pair (context, separator) + // and will create a new fill doc for the rest of the content. + // Ideally we wouldn't mutate the array here but coping all the + // elements to a new array would make this algorithm quadratic, + // which is unusable for large arrays (e.g. large texts in JSX). + + + parts.splice(0, 2); + var remainingCmd = [ind, mode, fill$1(parts)]; + var secondContent = parts[0]; + var firstAndSecondContentFlatCmd = [ind, MODE_FLAT, concat$2([content, whitespace, secondContent])]; + var firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], _rem, options, true); + + if (firstAndSecondContentFits) { + cmds.push(remainingCmd); + cmds.push(whitespaceFlatCmd); + cmds.push(contentFlatCmd); + } else if (contentFits) { + cmds.push(remainingCmd); + cmds.push(whitespaceBreakCmd); + cmds.push(contentFlatCmd); + } else { + cmds.push(remainingCmd); + cmds.push(whitespaceBreakCmd); + cmds.push(contentBreakCmd); + } + + break; + } + + case "if-break": + { + var groupMode = _doc.groupId ? groupModeMap[_doc.groupId] : mode; + + if (groupMode === MODE_BREAK) { + if (_doc.breakContents) { + cmds.push([ind, mode, _doc.breakContents]); + } + } + + if (groupMode === MODE_FLAT) { + if (_doc.flatContents) { + cmds.push([ind, mode, _doc.flatContents]); + } + } + + break; + } + + case "line-suffix": + lineSuffix.push([ind, mode, _doc.contents]); + break; + + case "line-suffix-boundary": + if (lineSuffix.length > 0) { + cmds.push([ind, mode, { + type: "line", + hard: true + }]); + } + + break; + + case "line": + switch (mode) { + case MODE_FLAT: + if (!_doc.hard) { + if (!_doc.soft) { + out.push(" "); + pos += 1; + } + + break; + } else { + // This line was forced into the output even if we + // were in flattened mode, so we need to tell the next + // group that no matter what, it needs to remeasure + // because the previous measurement didn't accurately + // capture the entire expression (this is necessary + // for nested groups) + shouldRemeasure = true; + } + + // fallthrough + + case MODE_BREAK: + if (lineSuffix.length) { + cmds.push([ind, mode, _doc]); + [].push.apply(cmds, lineSuffix.reverse()); + lineSuffix = []; + break; + } + + if (_doc.literal) { + if (ind.root) { + out.push(newLine, ind.root.value); + pos = ind.root.length; + } else { + out.push(newLine); + pos = 0; + } + } else { + pos -= trim$1(out); + out.push(newLine + ind.value); + pos = ind.length; + } + + break; + } + + break; + + default: + } + } + } + + var cursorPlaceholderIndex = out.indexOf(cursor$2.placeholder); + + if (cursorPlaceholderIndex !== -1) { + var otherCursorPlaceholderIndex = out.indexOf(cursor$2.placeholder, cursorPlaceholderIndex + 1); + var beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); + var aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join(""); + var afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join(""); + return { + formatted: beforeCursor + aroundCursor + afterCursor, + cursorNodeStart: beforeCursor.length, + cursorNodeText: aroundCursor + }; + } + + return { + formatted: out.join("") + }; +} + +var docPrinter = { + printDocToString: printDocToString$1 +}; + +var traverseDocOnExitStackMarker = {}; + +function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { + var docsStack = [doc]; + + while (docsStack.length !== 0) { + var _doc = docsStack.pop(); + + if (_doc === traverseDocOnExitStackMarker) { + onExit(docsStack.pop()); + continue; + } + + var shouldRecurse = true; + + if (onEnter) { + if (onEnter(_doc) === false) { + shouldRecurse = false; + } + } + + if (onExit) { + docsStack.push(_doc); + docsStack.push(traverseDocOnExitStackMarker); + } + + if (shouldRecurse) { + // When there are multiple parts to process, + // the parts need to be pushed onto the stack in reverse order, + // so that they are processed in the original order + // when the stack is popped. + if (_doc.type === "concat" || _doc.type === "fill") { + for (var ic = _doc.parts.length, i = ic - 1; i >= 0; --i) { + docsStack.push(_doc.parts[i]); + } + } else if (_doc.type === "if-break") { + if (_doc.flatContents) { + docsStack.push(_doc.flatContents); + } + + if (_doc.breakContents) { + docsStack.push(_doc.breakContents); + } + } else if (_doc.type === "group" && _doc.expandedStates) { + if (shouldTraverseConditionalGroups) { + for (var _ic = _doc.expandedStates.length, _i = _ic - 1; _i >= 0; --_i) { + docsStack.push(_doc.expandedStates[_i]); + } + } else { + docsStack.push(_doc.contents); + } + } else if (_doc.contents) { + docsStack.push(_doc.contents); + } + } + } +} + +function mapDoc(doc, cb) { + if (doc.type === "concat" || doc.type === "fill") { + var parts = doc.parts.map(function (part) { + return mapDoc(part, cb); + }); + return cb(Object.assign({}, doc, { + parts + })); + } else if (doc.type === "if-break") { + var breakContents = doc.breakContents && mapDoc(doc.breakContents, cb); + var flatContents = doc.flatContents && mapDoc(doc.flatContents, cb); + return cb(Object.assign({}, doc, { + breakContents, + flatContents + })); + } else if (doc.contents) { + var contents = mapDoc(doc.contents, cb); + return cb(Object.assign({}, doc, { + contents + })); + } + + return cb(doc); +} + +function findInDoc(doc, fn, defaultValue) { + var result = defaultValue; + var hasStopped = false; + + function findInDocOnEnterFn(doc) { + var maybeResult = fn(doc); + + if (maybeResult !== undefined) { + hasStopped = true; + result = maybeResult; + } + + if (hasStopped) { + return false; + } + } + + traverseDoc(doc, findInDocOnEnterFn); + return result; +} + +function isEmpty(n) { + return typeof n === "string" && n.length === 0; +} + +function isLineNextFn(doc) { + if (typeof doc === "string") { + return false; + } + + if (doc.type === "line") { + return true; + } +} + +function isLineNext(doc) { + return findInDoc(doc, isLineNextFn, false); +} + +function willBreakFn(doc) { + if (doc.type === "group" && doc.break) { + return true; + } + + if (doc.type === "line" && doc.hard) { + return true; + } + + if (doc.type === "break-parent") { + return true; + } +} + +function willBreak(doc) { + return findInDoc(doc, willBreakFn, false); +} + +function breakParentGroup(groupStack) { + if (groupStack.length > 0) { + var parentGroup = groupStack[groupStack.length - 1]; // Breaks are not propagated through conditional groups because + // the user is expected to manually handle what breaks. + + if (!parentGroup.expandedStates) { + parentGroup.break = true; + } + } + + return null; +} + +function propagateBreaks(doc) { + var alreadyVisitedSet = new Set(); + var groupStack = []; + + function propagateBreaksOnEnterFn(doc) { + if (doc.type === "break-parent") { + breakParentGroup(groupStack); + } + + if (doc.type === "group") { + groupStack.push(doc); + + if (alreadyVisitedSet.has(doc)) { + return false; + } + + alreadyVisitedSet.add(doc); + } + } + + function propagateBreaksOnExitFn(doc) { + if (doc.type === "group") { + var group = groupStack.pop(); + + if (group.break) { + breakParentGroup(groupStack); + } + } + } + + traverseDoc(doc, propagateBreaksOnEnterFn, propagateBreaksOnExitFn, + /* shouldTraverseConditionalGroups */ + true); +} + +function removeLinesFn(doc) { + // Force this doc into flat mode by statically converting all + // lines into spaces (or soft lines into nothing). Hard lines + // should still output because there's too great of a chance + // of breaking existing assumptions otherwise. + if (doc.type === "line" && !doc.hard) { + return doc.soft ? "" : " "; + } else if (doc.type === "if-break") { + return doc.flatContents || ""; + } + + return doc; +} + +function removeLines(doc) { + return mapDoc(doc, removeLinesFn); +} + +function stripTrailingHardline(doc) { + // HACK remove ending hardline, original PR: #1984 + if (doc.type === "concat" && doc.parts.length !== 0) { + var lastPart = doc.parts[doc.parts.length - 1]; + + if (lastPart.type === "concat") { + if (lastPart.parts.length === 2 && lastPart.parts[0].hard && lastPart.parts[1].type === "break-parent") { + return { + type: "concat", + parts: doc.parts.slice(0, -1) + }; + } + + return { + type: "concat", + parts: doc.parts.slice(0, -1).concat(stripTrailingHardline(lastPart)) + }; + } + } + + return doc; +} + +var docUtils = { + isEmpty, + willBreak, + isLineNext, + traverseDoc, + mapDoc, + propagateBreaks, + removeLines, + stripTrailingHardline +}; + +function flattenDoc(doc) { + if (doc.type === "concat") { + var res = []; + + for (var i = 0; i < doc.parts.length; ++i) { + var doc2 = doc.parts[i]; + + if (typeof doc2 !== "string" && doc2.type === "concat") { + [].push.apply(res, flattenDoc(doc2).parts); + } else { + var flattened = flattenDoc(doc2); + + if (flattened !== "") { + res.push(flattened); + } + } + } + + return Object.assign({}, doc, { + parts: res + }); + } else if (doc.type === "if-break") { + return Object.assign({}, doc, { + breakContents: doc.breakContents != null ? flattenDoc(doc.breakContents) : null, + flatContents: doc.flatContents != null ? flattenDoc(doc.flatContents) : null + }); + } else if (doc.type === "group") { + return Object.assign({}, doc, { + contents: flattenDoc(doc.contents), + expandedStates: doc.expandedStates ? doc.expandedStates.map(flattenDoc) : doc.expandedStates + }); + } else if (doc.contents) { + return Object.assign({}, doc, { + contents: flattenDoc(doc.contents) + }); + } + + return doc; +} + +function printDoc(doc) { + if (typeof doc === "string") { + return JSON.stringify(doc); + } + + if (doc.type === "line") { + if (doc.literal) { + return "literalline"; + } + + if (doc.hard) { + return "hardline"; + } + + if (doc.soft) { + return "softline"; + } + + return "line"; + } + + if (doc.type === "break-parent") { + return "breakParent"; + } + + if (doc.type === "trim") { + return "trim"; + } + + if (doc.type === "concat") { + return "[" + doc.parts.map(printDoc).join(", ") + "]"; + } + + if (doc.type === "indent") { + return "indent(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "align") { + return doc.n === -Infinity ? "dedentToRoot(" + printDoc(doc.contents) + ")" : doc.n < 0 ? "dedent(" + printDoc(doc.contents) + ")" : doc.n.type === "root" ? "markAsRoot(" + printDoc(doc.contents) + ")" : "align(" + JSON.stringify(doc.n) + ", " + printDoc(doc.contents) + ")"; + } + + if (doc.type === "if-break") { + return "ifBreak(" + printDoc(doc.breakContents) + (doc.flatContents ? ", " + printDoc(doc.flatContents) : "") + ")"; + } + + if (doc.type === "group") { + if (doc.expandedStates) { + return "conditionalGroup(" + "[" + doc.expandedStates.map(printDoc).join(",") + "])"; + } + + return (doc.break ? "wrappedGroup" : "group") + "(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "fill") { + return "fill" + "(" + doc.parts.map(printDoc).join(", ") + ")"; + } + + if (doc.type === "line-suffix") { + return "lineSuffix(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "line-suffix-boundary") { + return "lineSuffixBoundary"; + } + + throw new Error("Unknown doc type " + doc.type); +} + +var docDebug = { + printDocToDebug: function printDocToDebug(doc) { + return printDoc(flattenDoc(doc)); + } +}; + +var doc = { + builders: docBuilders, + printer: docPrinter, + utils: docUtils, + debug: docDebug +}; + +var mapDoc$1 = doc.utils.mapDoc; + +function isNextLineEmpty$1(text, node, options) { + return util$1.isNextLineEmpty(text, node, options.locEnd); +} + +function isPreviousLineEmpty$2(text, node, options) { + return util$1.isPreviousLineEmpty(text, node, options.locStart); +} + +function getNextNonSpaceNonCommentCharacterIndex$1(text, node, options) { + return util$1.getNextNonSpaceNonCommentCharacterIndex(text, node, options.locEnd); +} + +var utilShared = { + getMaxContinuousCount: util$1.getMaxContinuousCount, + getStringWidth: util$1.getStringWidth, + getAlignmentSize: util$1.getAlignmentSize, + getIndentSize: util$1.getIndentSize, + skip: util$1.skip, + skipWhitespace: util$1.skipWhitespace, + skipSpaces: util$1.skipSpaces, + skipNewline: util$1.skipNewline, + skipToLineEnd: util$1.skipToLineEnd, + skipEverythingButNewLine: util$1.skipEverythingButNewLine, + skipInlineComment: util$1.skipInlineComment, + skipTrailingComment: util$1.skipTrailingComment, + hasNewline: util$1.hasNewline, + hasNewlineInRange: util$1.hasNewlineInRange, + hasSpaces: util$1.hasSpaces, + isNextLineEmpty: isNextLineEmpty$1, + isNextLineEmptyAfterIndex: util$1.isNextLineEmptyAfterIndex, + isPreviousLineEmpty: isPreviousLineEmpty$2, + getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$1, + mapDoc: mapDoc$1, + // TODO: remove in 2.0, we already exposed it in docUtils + makeString: util$1.makeString, + addLeadingComment: util$1.addLeadingComment, + addDanglingComment: util$1.addDanglingComment, + addTrailingComment: util$1.addTrailingComment +}; + +var _require$$0$builders = doc.builders; +var concat = _require$$0$builders.concat; +var hardline = _require$$0$builders.hardline; +var breakParent = _require$$0$builders.breakParent; +var indent = _require$$0$builders.indent; +var lineSuffix = _require$$0$builders.lineSuffix; +var join = _require$$0$builders.join; +var cursor = _require$$0$builders.cursor; +var hasNewline = util$1.hasNewline; +var skipNewline = util$1.skipNewline; +var isPreviousLineEmpty = util$1.isPreviousLineEmpty; +var addLeadingComment = utilShared.addLeadingComment; +var addDanglingComment = utilShared.addDanglingComment; +var addTrailingComment = utilShared.addTrailingComment; +var childNodesCacheKey = Symbol("child-nodes"); + +function getSortedChildNodes(node, options, resultArray) { + if (!node) { + return; + } + + var printer = options.printer, + locStart = options.locStart, + locEnd = options.locEnd; + + if (resultArray) { + if (node && printer.canAttachComment && printer.canAttachComment(node)) { + // This reverse insertion sort almost always takes constant + // time because we almost always (maybe always?) append the + // nodes in order anyway. + var i; + + for (i = resultArray.length - 1; i >= 0; --i) { + if (locStart(resultArray[i]) <= locStart(node) && locEnd(resultArray[i]) <= locEnd(node)) { + break; + } + } + + resultArray.splice(i + 1, 0, node); + return; + } + } else if (node[childNodesCacheKey]) { + return node[childNodesCacheKey]; + } + + var childNodes; + + if (printer.getCommentChildNodes) { + childNodes = printer.getCommentChildNodes(node); + } else if (node && typeof node === "object") { + childNodes = Object.keys(node).filter(function (n) { + return n !== "enclosingNode" && n !== "precedingNode" && n !== "followingNode"; + }).map(function (n) { + return node[n]; + }); + } + + if (!childNodes) { + return; + } + + if (!resultArray) { + Object.defineProperty(node, childNodesCacheKey, { + value: resultArray = [], + enumerable: false + }); + } + + childNodes.forEach(function (childNode) { + getSortedChildNodes(childNode, options, resultArray); + }); + return resultArray; +} // As efficiently as possible, decorate the comment object with +// .precedingNode, .enclosingNode, and/or .followingNode properties, at +// least one of which is guaranteed to be defined. + + +function decorateComment(node, comment, options) { + var locStart = options.locStart, + locEnd = options.locEnd; + var childNodes = getSortedChildNodes(node, options); + var precedingNode; + var followingNode; // Time to dust off the old binary search robes and wizard hat. + + var left = 0; + var right = childNodes.length; + + while (left < right) { + var middle = left + right >> 1; + var child = childNodes[middle]; + + if (locStart(child) - locStart(comment) <= 0 && locEnd(comment) - locEnd(child) <= 0) { + // The comment is completely contained by this child node. + comment.enclosingNode = child; + decorateComment(child, comment, options); + return; // Abandon the binary search at this level. + } + + if (locEnd(child) - locStart(comment) <= 0) { + // This child node falls completely before the comment. + // Because we will never consider this node or any nodes + // before it again, this node must be the closest preceding + // node we have encountered so far. + precedingNode = child; + left = middle + 1; + continue; + } + + if (locEnd(comment) - locStart(child) <= 0) { + // This child node falls completely after the comment. + // Because we will never consider this node or any nodes after + // it again, this node must be the closest following node we + // have encountered so far. + followingNode = child; + right = middle; + continue; + } + /* istanbul ignore next */ + + + throw new Error("Comment location overlaps with node location"); + } // We don't want comments inside of different expressions inside of the same + // template literal to move to another expression. + + + if (comment.enclosingNode && comment.enclosingNode.type === "TemplateLiteral") { + var quasis = comment.enclosingNode.quasis; + var commentIndex = findExpressionIndexForComment(quasis, comment, options); + + if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options) !== commentIndex) { + precedingNode = null; + } + + if (followingNode && findExpressionIndexForComment(quasis, followingNode, options) !== commentIndex) { + followingNode = null; + } + } + + if (precedingNode) { + comment.precedingNode = precedingNode; + } + + if (followingNode) { + comment.followingNode = followingNode; + } +} + +function attach(comments, ast, text, options) { + if (!Array.isArray(comments)) { + return; + } + + var tiesToBreak = []; + var locStart = options.locStart, + locEnd = options.locEnd; + comments.forEach(function (comment, i) { + if (options.parser === "json" || options.parser === "json5" || options.parser === "__js_expression" || options.parser === "__vue_expression") { + if (locStart(comment) - locStart(ast) <= 0) { + addLeadingComment(ast, comment); + return; + } + + if (locEnd(comment) - locEnd(ast) >= 0) { + addTrailingComment(ast, comment); + return; + } + } + + decorateComment(ast, comment, options); + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + var pluginHandleOwnLineComment = options.printer.handleComments && options.printer.handleComments.ownLine ? options.printer.handleComments.ownLine : function () { + return false; + }; + var pluginHandleEndOfLineComment = options.printer.handleComments && options.printer.handleComments.endOfLine ? options.printer.handleComments.endOfLine : function () { + return false; + }; + var pluginHandleRemainingComment = options.printer.handleComments && options.printer.handleComments.remaining ? options.printer.handleComments.remaining : function () { + return false; + }; + var isLastComment = comments.length - 1 === i; + + if (hasNewline(text, locStart(comment), { + backwards: true + })) { + // If a comment exists on its own line, prefer a leading comment. + // We also need to check if it's the first line of the file. + if (pluginHandleOwnLineComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (followingNode) { + // Always a leading comment. + addLeadingComment(followingNode, comment); + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } else if (hasNewline(text, locEnd(comment))) { + if (pluginHandleEndOfLineComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (precedingNode) { + // There is content before this comment on the same line, but + // none after it, so prefer a trailing comment of the previous node. + addTrailingComment(precedingNode, comment); + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } else { + if (pluginHandleRemainingComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (precedingNode && followingNode) { + // Otherwise, text exists both before and after the comment on + // the same line. If there is both a preceding and following + // node, use a tie-breaking algorithm to determine if it should + // be attached to the next or previous node. In the last case, + // simply attach the right node; + var tieCount = tiesToBreak.length; + + if (tieCount > 0) { + var lastTie = tiesToBreak[tieCount - 1]; + + if (lastTie.followingNode !== comment.followingNode) { + breakTies(tiesToBreak, text, options); + } + } + + tiesToBreak.push(comment); + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } + }); + breakTies(tiesToBreak, text, options); + comments.forEach(function (comment) { + // These node references were useful for breaking ties, but we + // don't need them anymore, and they create cycles in the AST that + // may lead to infinite recursion if we don't delete them here. + delete comment.precedingNode; + delete comment.enclosingNode; + delete comment.followingNode; + }); +} + +function breakTies(tiesToBreak, text, options) { + var tieCount = tiesToBreak.length; + + if (tieCount === 0) { + return; + } + + var _tiesToBreak$ = tiesToBreak[0], + precedingNode = _tiesToBreak$.precedingNode, + followingNode = _tiesToBreak$.followingNode; + var gapEndPos = options.locStart(followingNode); // Iterate backwards through tiesToBreak, examining the gaps + // between the tied comments. In order to qualify as leading, a + // comment must be separated from followingNode by an unbroken series of + // gaps (or other comments). Gaps should only contain whitespace or open + // parentheses. + + var indexOfFirstLeadingComment; + + for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) { + var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert.strictEqual(comment.precedingNode, precedingNode); + assert.strictEqual(comment.followingNode, followingNode); + var gap = text.slice(options.locEnd(comment), gapEndPos).trim(); + + if (gap === "" || /^\(+$/.test(gap)) { + gapEndPos = options.locStart(comment); + } else { + // The gap string contained something other than whitespace or open + // parentheses. + break; + } + } + + tiesToBreak.forEach(function (comment, i) { + if (i < indexOfFirstLeadingComment) { + addTrailingComment(precedingNode, comment); + } else { + addLeadingComment(followingNode, comment); + } + }); + tiesToBreak.length = 0; +} + +function printComment(commentPath, options) { + var comment = commentPath.getValue(); + comment.printed = true; + return options.printer.printComment(commentPath, options); +} + +function findExpressionIndexForComment(quasis, comment, options) { + var startPos = options.locStart(comment) - 1; + + for (var i = 1; i < quasis.length; ++i) { + if (startPos < getQuasiRange(quasis[i]).start) { + return i - 1; + } + } // We haven't found it, it probably means that some of the locations are off. + // Let's just return the first one. + + /* istanbul ignore next */ + + + return 0; +} + +function getQuasiRange(expr) { + if (expr.start !== undefined) { + // Babylon + return { + start: expr.start, + end: expr.end + }; + } // Flow + + + return { + start: expr.range[0], + end: expr.range[1] + }; +} + +function printLeadingComment(commentPath, print, options) { + var comment = commentPath.getValue(); + var contents = printComment(commentPath, options); + + if (!contents) { + return ""; + } + + var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // Leading block comments should see if they need to stay on the + // same line or not. + + if (isBlock) { + return concat([contents, hasNewline(options.originalText, options.locEnd(comment)) ? hardline : " "]); + } + + return concat([contents, hardline]); +} + +function printTrailingComment(commentPath, print, options) { + var comment = commentPath.getValue(); + var contents = printComment(commentPath, options); + + if (!contents) { + return ""; + } + + var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // We don't want the line to break + // when the parentParentNode is a ClassDeclaration/-Expression + // And the parentNode is in the superClass property + + var parentNode = commentPath.getNode(1); + var parentParentNode = commentPath.getNode(2); + var isParentSuperClass = parentParentNode && (parentParentNode.type === "ClassDeclaration" || parentParentNode.type === "ClassExpression") && parentParentNode.superClass === parentNode; + + if (hasNewline(options.originalText, options.locStart(comment), { + backwards: true + })) { + // This allows comments at the end of nested structures: + // { + // x: 1, + // y: 2 + // // A comment + // } + // Those kinds of comments are almost always leading comments, but + // here it doesn't go "outside" the block and turns it into a + // trailing comment for `2`. We can simulate the above by checking + // if this a comment on its own line; normal trailing comments are + // always at the end of another expression. + var isLineBeforeEmpty = isPreviousLineEmpty(options.originalText, comment, options.locStart); + return lineSuffix(concat([hardline, isLineBeforeEmpty ? hardline : "", contents])); + } else if (isBlock || isParentSuperClass) { + // Trailing block comments never need a newline + return concat([" ", contents]); + } + + return concat([lineSuffix(" " + contents), !isBlock ? breakParent : ""]); +} + +function printDanglingComments(path$$1, options, sameIndent, filter) { + var parts = []; + var node = path$$1.getValue(); + + if (!node || !node.comments) { + return ""; + } + + path$$1.each(function (commentPath) { + var comment = commentPath.getValue(); + + if (comment && !comment.leading && !comment.trailing && (!filter || filter(comment))) { + parts.push(printComment(commentPath, options)); + } + }, "comments"); + + if (parts.length === 0) { + return ""; + } + + if (sameIndent) { + return join(hardline, parts); + } + + return indent(concat([hardline, join(hardline, parts)])); +} + +function prependCursorPlaceholder(path$$1, options, printed) { + if (path$$1.getNode() === options.cursorNode && path$$1.getValue()) { + return concat([cursor, printed, cursor]); + } + + return printed; +} + +function printComments(path$$1, print, options, needsSemi) { + var value = path$$1.getValue(); + var printed = print(path$$1); + var comments = value && value.comments; + + if (!comments || comments.length === 0) { + return prependCursorPlaceholder(path$$1, options, printed); + } + + var leadingParts = []; + var trailingParts = [needsSemi ? ";" : "", printed]; + path$$1.each(function (commentPath) { + var comment = commentPath.getValue(); + var leading = comment.leading, + trailing = comment.trailing; + + if (leading) { + var contents = printLeadingComment(commentPath, print, options); + + if (!contents) { + return; + } + + leadingParts.push(contents); + var text = options.originalText; + + if (hasNewline(text, skipNewline(text, options.locEnd(comment)))) { + leadingParts.push(hardline); + } + } else if (trailing) { + trailingParts.push(printTrailingComment(commentPath, print, options)); + } + }, "comments"); + return prependCursorPlaceholder(path$$1, options, concat(leadingParts.concat(trailingParts))); +} + +var comments = { + attach, + printComments, + printDanglingComments, + getSortedChildNodes +}; + +function FastPath(value) { + assert.ok(this instanceof FastPath); + this.stack = [value]; +} // The name of the current property is always the penultimate element of +// this.stack, and always a String. + + +FastPath.prototype.getName = function getName() { + var s = this.stack; + var len = s.length; + + if (len > 1) { + return s[len - 2]; + } // Since the name is always a string, null is a safe sentinel value to + // return if we do not know the name of the (root) value. + + /* istanbul ignore next */ + + + return null; +}; // The value of the current property is always the final element of +// this.stack. + + +FastPath.prototype.getValue = function getValue() { + var s = this.stack; + return s[s.length - 1]; +}; + +function getNodeHelper(path$$1, count) { + var s = path$$1.stack; + + for (var i = s.length - 1; i >= 0; i -= 2) { + var value = s[i]; + + if (value && !Array.isArray(value) && --count < 0) { + return value; + } + } + + return null; +} + +FastPath.prototype.getNode = function getNode(count) { + return getNodeHelper(this, ~~count); +}; + +FastPath.prototype.getParentNode = function getParentNode(count) { + return getNodeHelper(this, ~~count + 1); +}; // Temporarily push properties named by string arguments given after the +// callback function onto this.stack, then call the callback with a +// reference to this (modified) FastPath object. Note that the stack will +// be restored to its original state after the callback is finished, so it +// is probably a mistake to retain a reference to the path. + + +FastPath.prototype.call = function call(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + var result = callback(this); + s.length = origLen; + return result; +}; // Similar to FastPath.prototype.call, except that the value obtained by +// accessing this.getValue()[name1][name2]... should be array-like. The +// callback will be called with a reference to this path object for each +// element of the array. + + +FastPath.prototype.each = function each(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + for (var _i = 0; _i < value.length; ++_i) { + if (_i in value) { + s.push(_i, value[_i]); // If the callback needs to know the value of i, call + // path.getName(), assuming path is the parameter name. + + callback(this); + s.length -= 2; + } + } + + s.length = origLen; +}; // Similar to FastPath.prototype.each, except that the results of the +// callback function invocations are stored in an array and returned at +// the end of the iteration. + + +FastPath.prototype.map = function map(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + var result = new Array(value.length); + + for (var _i2 = 0; _i2 < value.length; ++_i2) { + if (_i2 in value) { + s.push(_i2, value[_i2]); + result[_i2] = callback(this, _i2); + s.length -= 2; + } + } + + s.length = origLen; + return result; +}; + +var fastPath = FastPath; + +var normalize$3 = options.normalize; + +function printSubtree(path$$1, print, options$$1, printAstToDoc) { + if (options$$1.printer.embed) { + return options$$1.printer.embed(path$$1, print, function (text, partialNextOptions) { + return textToDoc(text, partialNextOptions, options$$1, printAstToDoc); + }, options$$1); + } +} + +function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc) { + var nextOptions = normalize$3(Object.assign({}, parentOptions, partialNextOptions, { + parentParser: parentOptions.parser, + originalText: text + }), { + passThrough: true + }); + var result = parser.parse(text, nextOptions); + var ast = result.ast; + text = result.text; + var astComments = ast.comments; + delete ast.comments; + comments.attach(astComments, ast, text, nextOptions); + return printAstToDoc(ast, nextOptions); +} + +var multiparser = { + printSubtree +}; + +var doc$2 = doc; +var docBuilders$2 = doc$2.builders; +var concat$3 = docBuilders$2.concat; +var hardline$2 = docBuilders$2.hardline; +var addAlignmentToDoc$1 = docBuilders$2.addAlignmentToDoc; +var docUtils$2 = doc$2.utils; +/** + * Takes an abstract syntax tree (AST) and recursively converts it to a + * document (series of printing primitives). + * + * This is done by descending down the AST recursively. The recursion + * involves two functions that call each other: + * + * 1. printGenerically(), which is defined as an inner function here. + * It basically takes care of node caching. + * 2. callPluginPrintFunction(), which checks for some options, and + * ultimately calls the print() function provided by the plugin. + * + * The plugin function will call printGenerically() again for child nodes + * of the current node, which will do its housekeeping, then call the + * plugin function again, and so on. + * + * All the while, these functions pass a "path" variable around, which + * is a stack-like data structure (FastPath) that maintains the current + * state of the recursion. It is called "path", because it represents + * the path to the current node through the Abstract Syntax Tree. + */ + +function printAstToDoc(ast, options) { + var alignmentSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var printer = options.printer; + + if (printer.preprocess) { + ast = printer.preprocess(ast, options); + } + + var cache = new Map(); + + function printGenerically(path$$1, args) { + var node = path$$1.getValue(); + var shouldCache = node && typeof node === "object" && args === undefined; + + if (shouldCache && cache.has(node)) { + return cache.get(node); + } // We let JSXElement print its comments itself because it adds () around + // UnionTypeAnnotation has to align the child without the comments + + + var res; + + if (printer.willPrintOwnComments && printer.willPrintOwnComments(path$$1)) { + res = callPluginPrintFunction(path$$1, options, printGenerically, args); + } else { + // printComments will call the plugin print function and check for + // comments to print + res = comments.printComments(path$$1, function (p) { + return callPluginPrintFunction(p, options, printGenerically, args); + }, options, args && args.needsSemi); + } + + if (shouldCache) { + cache.set(node, res); + } + + return res; + } + + var doc$$2 = printGenerically(new fastPath(ast)); + + if (alignmentSize > 0) { + // Add a hardline to make the indents take effect + // It should be removed in index.js format() + doc$$2 = addAlignmentToDoc$1(docUtils$2.removeLines(concat$3([hardline$2, doc$$2])), alignmentSize, options.tabWidth); + } + + docUtils$2.propagateBreaks(doc$$2); + return doc$$2; +} + +function callPluginPrintFunction(path$$1, options, printPath, args) { + assert.ok(path$$1 instanceof fastPath); + var node = path$$1.getValue(); + var printer = options.printer; // Escape hatch + + if (printer.hasPrettierIgnore && printer.hasPrettierIgnore(path$$1)) { + return options.originalText.slice(options.locStart(node), options.locEnd(node)); + } + + if (node) { + try { + // Potentially switch to a different parser + var sub = multiparser.printSubtree(path$$1, printPath, options, printAstToDoc); + + if (sub) { + return sub; + } + } catch (error) { + /* istanbul ignore if */ + if (process.env.PRETTIER_DEBUG) { + throw error; + } // Continue with current parser + + } + } + + return printer.print(path$$1, options, printPath, args); +} + +var astToDoc = printAstToDoc; + +function findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts) { + var resultStartNode = startNodeAndParents.node; + var resultEndNode = endNodeAndParents.node; + + if (resultStartNode === resultEndNode) { + return { + startNode: resultStartNode, + endNode: resultEndNode + }; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = endNodeAndParents.parentNodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var endParent = _step.value; + + if (endParent.type !== "Program" && endParent.type !== "File" && opts.locStart(endParent) >= opts.locStart(startNodeAndParents.node)) { + resultEndNode = endParent; + } else { + break; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = startNodeAndParents.parentNodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var startParent = _step2.value; + + if (startParent.type !== "Program" && startParent.type !== "File" && opts.locEnd(startParent) <= opts.locEnd(endNodeAndParents.node)) { + resultStartNode = startParent; + } else { + break; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return { + startNode: resultStartNode, + endNode: resultEndNode + }; +} + +function findNodeAtOffset(node, offset, options, predicate, parentNodes) { + predicate = predicate || function () { + return true; + }; + + parentNodes = parentNodes || []; + var start = options.locStart(node, options.locStart); + var end = options.locEnd(node, options.locEnd); + + if (start <= offset && offset <= end) { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = comments.getSortedChildNodes(node, options)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var childNode = _step3.value; + var childResult = findNodeAtOffset(childNode, offset, options, predicate, [node].concat(parentNodes)); + + if (childResult) { + return childResult; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + if (predicate(node)) { + return { + node: node, + parentNodes: parentNodes + }; + } + } +} // See https://www.ecma-international.org/ecma-262/5.1/#sec-A.5 + + +function isSourceElement(opts, node) { + if (node == null) { + return false; + } // JS and JS like to avoid repetitions + + + var jsSourceElements = ["FunctionDeclaration", "BlockStatement", "BreakStatement", "ContinueStatement", "DebuggerStatement", "DoWhileStatement", "EmptyStatement", "ExpressionStatement", "ForInStatement", "ForStatement", "IfStatement", "LabeledStatement", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "VariableDeclaration", "WhileStatement", "WithStatement", "ClassDeclaration", // ES 2015 + "ImportDeclaration", // Module + "ExportDefaultDeclaration", // Module + "ExportNamedDeclaration", // Module + "ExportAllDeclaration", // Module + "TypeAlias", // Flow + "InterfaceDeclaration", // Flow, TypeScript + "TypeAliasDeclaration", // TypeScript + "ExportAssignment", // TypeScript + "ExportDeclaration" // TypeScript + ]; + var jsonSourceElements = ["ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral"]; + var graphqlSourceElements = ["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]; + + switch (opts.parser) { + case "flow": + case "babylon": + case "typescript": + return jsSourceElements.indexOf(node.type) > -1; + + case "json": + return jsonSourceElements.indexOf(node.type) > -1; + + case "graphql": + return graphqlSourceElements.indexOf(node.kind) > -1; + + case "vue": + return node.tag !== "root"; + } + + return false; +} + +function calculateRange(text, opts, ast) { + // Contract the range so that it has non-whitespace characters at its endpoints. + // This ensures we can format a range that doesn't end on a node. + var rangeStringOrig = text.slice(opts.rangeStart, opts.rangeEnd); + var startNonWhitespace = Math.max(opts.rangeStart + rangeStringOrig.search(/\S/), opts.rangeStart); + var endNonWhitespace; + + for (endNonWhitespace = opts.rangeEnd; endNonWhitespace > opts.rangeStart; --endNonWhitespace) { + if (text[endNonWhitespace - 1].match(/\S/)) { + break; + } + } + + var startNodeAndParents = findNodeAtOffset(ast, startNonWhitespace, opts, function (node) { + return isSourceElement(opts, node); + }); + var endNodeAndParents = findNodeAtOffset(ast, endNonWhitespace, opts, function (node) { + return isSourceElement(opts, node); + }); + + if (!startNodeAndParents || !endNodeAndParents) { + return { + rangeStart: 0, + rangeEnd: 0 + }; + } + + var siblingAncestors = findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts); + var startNode = siblingAncestors.startNode, + endNode = siblingAncestors.endNode; + var rangeStart = Math.min(opts.locStart(startNode, opts.locStart), opts.locStart(endNode, opts.locStart)); + var rangeEnd = Math.max(opts.locEnd(startNode, opts.locEnd), opts.locEnd(endNode, opts.locEnd)); + return { + rangeStart: rangeStart, + rangeEnd: rangeEnd + }; +} + +var rangeUtil = { + calculateRange, + findNodeAtOffset +}; + +var normalizeOptions = options.normalize; +var guessEndOfLine = endOfLine.guessEndOfLine; +var convertEndOfLineToChars = endOfLine.convertEndOfLineToChars; +var printDocToString = doc.printer.printDocToString; +var printDocToDebug = doc.debug.printDocToDebug; +var UTF8BOM = 0xfeff; +var CURSOR = Symbol("cursor"); + +function ensureAllCommentsPrinted(astComments) { + if (!astComments) { + return; + } + + for (var i = 0; i < astComments.length; ++i) { + if (astComments[i].value.trim() === "prettier-ignore") { + // If there's a prettier-ignore, we're not printing that sub-tree so we + // don't know if the comments was printed or not. + return; + } + } + + astComments.forEach(function (comment) { + if (!comment.printed) { + throw new Error('Comment "' + comment.value.trim() + '" was not printed. Please report this error!'); + } + + delete comment.printed; + }); +} + +function attachComments(text, ast, opts) { + var astComments = ast.comments; + + if (astComments) { + delete ast.comments; + comments.attach(astComments, ast, text, opts); + } + + ast.tokens = []; + opts.originalText = opts.parser === "yaml" ? text : text.trimRight(); + return astComments; +} + +function coreFormat(text, opts, addAlignmentSize) { + if (!text || !text.trim().length) { + return { + formatted: "", + cursorOffset: 0 + }; + } + + addAlignmentSize = addAlignmentSize || 0; + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + var originalText = text; + text = parsed.text; + + if (opts.cursorOffset >= 0) { + var nodeResult = rangeUtil.findNodeAtOffset(ast, opts.cursorOffset, opts); + + if (nodeResult && nodeResult.node) { + opts.cursorNode = nodeResult.node; + } + } + + var astComments = attachComments(text, ast, opts); + var doc$$1 = astToDoc(ast, opts, addAlignmentSize); + + if (opts.endOfLine === "auto") { + opts.endOfLine = guessEndOfLine(originalText); + } + + var result = printDocToString(doc$$1, opts); + ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline + + if (addAlignmentSize > 0) { + var trimmed = result.formatted.trim(); + + if (result.cursorNodeStart !== undefined) { + result.cursorNodeStart -= result.formatted.indexOf(trimmed); + } + + result.formatted = trimmed + convertEndOfLineToChars(opts.endOfLine); + } + + if (opts.cursorOffset >= 0) { + var oldCursorNodeStart; + var oldCursorNodeText; + var cursorOffsetRelativeToOldCursorNode; + var newCursorNodeStart; + var newCursorNodeText; + + if (opts.cursorNode && result.cursorNodeText) { + oldCursorNodeStart = opts.locStart(opts.cursorNode); + oldCursorNodeText = text.slice(oldCursorNodeStart, opts.locEnd(opts.cursorNode)); + cursorOffsetRelativeToOldCursorNode = opts.cursorOffset - oldCursorNodeStart; + newCursorNodeStart = result.cursorNodeStart; + newCursorNodeText = result.cursorNodeText; + } else { + oldCursorNodeStart = 0; + oldCursorNodeText = text; + cursorOffsetRelativeToOldCursorNode = opts.cursorOffset; + newCursorNodeStart = 0; + newCursorNodeText = result.formatted; + } + + if (oldCursorNodeText === newCursorNodeText) { + return { + formatted: result.formatted, + cursorOffset: newCursorNodeStart + cursorOffsetRelativeToOldCursorNode + }; + } // diff old and new cursor node texts, with a special cursor + // symbol inserted to find out where it moves to + + + var oldCursorNodeCharArray = oldCursorNodeText.split(""); + oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR); + var newCursorNodeCharArray = newCursorNodeText.split(""); + var cursorNodeDiff = lib.diffArrays(oldCursorNodeCharArray, newCursorNodeCharArray); + var cursorOffset = newCursorNodeStart; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = cursorNodeDiff[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var entry = _step.value; + + if (entry.removed) { + if (entry.value.indexOf(CURSOR) > -1) { + break; + } + } else { + cursorOffset += entry.count; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return { + formatted: result.formatted, + cursorOffset + }; + } + + return { + formatted: result.formatted + }; +} + +function formatRange(text, opts) { + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + text = parsed.text; + var range = rangeUtil.calculateRange(text, opts, ast); + var rangeStart = range.rangeStart; + var rangeEnd = range.rangeEnd; + var rangeString = text.slice(rangeStart, rangeEnd); // Try to extend the range backwards to the beginning of the line. + // This is so we can detect indentation correctly and restore it. + // Use `Math.min` since `lastIndexOf` returns 0 when `rangeStart` is 0 + + var rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1); + var indentString = text.slice(rangeStart2, rangeStart); + var alignmentSize = util$1.getAlignmentSize(indentString, opts.tabWidth); + var rangeResult = coreFormat(rangeString, Object.assign({}, opts, { + rangeStart: 0, + rangeEnd: Infinity, + printWidth: opts.printWidth - alignmentSize, + // track the cursor offset only if it's within our range + cursorOffset: opts.cursorOffset >= rangeStart && opts.cursorOffset < rangeEnd ? opts.cursorOffset - rangeStart : -1 + }), alignmentSize); // Since the range contracts to avoid trailing whitespace, + // we need to remove the newline that was inserted by the `format` call. + + var rangeTrimmed = rangeResult.formatted.trimRight(); + var formatted = text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd); + var cursorOffset = opts.cursorOffset; + + if (opts.cursorOffset >= rangeEnd) { + // handle the case where the cursor was past the end of the range + cursorOffset = opts.cursorOffset - rangeEnd + (rangeStart + rangeTrimmed.length); + } else if (rangeResult.cursorOffset !== undefined) { + // handle the case where the cursor was in the range + cursorOffset = rangeResult.cursorOffset + rangeStart; + } // keep the cursor as it was if it was before the start of the range + + + return { + formatted, + cursorOffset + }; +} + +function format(text, opts) { + var selectedParser = parser.resolveParser(opts); + var hasPragma = !selectedParser.hasPragma || selectedParser.hasPragma(text); + + if (opts.requirePragma && !hasPragma) { + return { + formatted: text + }; + } + + if (opts.rangeStart > 0 || opts.rangeEnd < text.length) { + return formatRange(text, opts); + } + + var hasUnicodeBOM = text.charCodeAt(0) === UTF8BOM; + + if (hasUnicodeBOM) { + text = text.substring(1); + } + + if (opts.insertPragma && opts.printer.insertPragma && !hasPragma) { + text = opts.printer.insertPragma(text); + } + + var result = coreFormat(text, opts); + + if (hasUnicodeBOM) { + result.formatted = String.fromCharCode(UTF8BOM) + result.formatted; + } + + return result; +} + +var core = { + formatWithCursor(text, opts) { + opts = normalizeOptions(opts); + return format(text, opts); + }, + + parse(text, opts, massage) { + opts = normalizeOptions(opts); + var parsed = parser.parse(text, opts); + + if (massage) { + parsed.ast = massageAst(parsed.ast, opts); + } + + return parsed; + }, + + formatAST(ast, opts) { + opts = normalizeOptions(opts); + var doc$$1 = astToDoc(ast, opts); + return printDocToString(doc$$1, opts); + }, + + // Doesn't handle shebang for now + formatDoc(doc$$1, opts) { + var debug = printDocToDebug(doc$$1); + opts = normalizeOptions(Object.assign({}, opts, { + parser: "babylon" + })); + return format(debug, opts).formatted; + }, + + printToDoc(text, opts) { + opts = normalizeOptions(opts); + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + text = parsed.text; + attachComments(text, ast, opts); + return astToDoc(ast, opts); + }, + + printDocToString(doc$$1, opts) { + return printDocToString(doc$$1, normalizeOptions(opts)); + } + +}; + +var _createClass$1 = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +function _classCallCheck$1(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var ignore = function ignore() { + return new IgnoreBase(); +}; // A simple implementation of make-array + + +function make_array(subject) { + return Array.isArray(subject) ? subject : [subject]; +} + +var REGEX_BLANK_LINE = /^\s+$/; +var REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\\!/; +var REGEX_LEADING_EXCAPED_HASH = /^\\#/; +var SLASH = '/'; +var KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore') +/* istanbul ignore next */ +: 'node-ignore'; + +var IgnoreBase = function () { + function IgnoreBase() { + _classCallCheck$1(this, IgnoreBase); + + this._rules = []; + this[KEY_IGNORE] = true; + + this._initCache(); + } + + _createClass$1(IgnoreBase, [{ + key: '_initCache', + value: function _initCache() { + this._cache = {}; + } // @param {Array.|string|Ignore} pattern + + }, { + key: 'add', + value: function add(pattern) { + this._added = false; + + if (typeof pattern === 'string') { + pattern = pattern.split(/\r?\n/g); + } + + make_array(pattern).forEach(this._addPattern, this); // Some rules have just added to the ignore, + // making the behavior changed. + + if (this._added) { + this._initCache(); + } + + return this; + } // legacy + + }, { + key: 'addPattern', + value: function addPattern(pattern) { + return this.add(pattern); + } + }, { + key: '_addPattern', + value: function _addPattern(pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + + if (this._checkPattern(pattern)) { + var rule = this._createRule(pattern); + + this._added = true; + + this._rules.push(rule); + } + } + }, { + key: '_checkPattern', + value: function _checkPattern(pattern) { + // > A blank line matches no files, so it can serve as a separator for readability. + return pattern && typeof pattern === 'string' && !REGEX_BLANK_LINE.test(pattern) // > A line starting with # serves as a comment. + && pattern.indexOf('#') !== 0; + } + }, { + key: 'filter', + value: function filter(paths) { + var _this = this; + + return make_array(paths).filter(function (path$$1) { + return _this._filter(path$$1); + }); + } + }, { + key: 'createFilter', + value: function createFilter() { + var _this2 = this; + + return function (path$$1) { + return _this2._filter(path$$1); + }; + } + }, { + key: 'ignores', + value: function ignores(path$$1) { + return !this._filter(path$$1); + } + }, { + key: '_createRule', + value: function _createRule(pattern) { + var origin = pattern; + var negative = false; // > An optional prefix "!" which negates the pattern; + + if (pattern.indexOf('!') === 0) { + negative = true; + pattern = pattern.substr(1); + } + + pattern = pattern // > Put a backslash ("\") in front of the first "!" for patterns that begin with a literal "!", for example, `"\!important!.txt"`. + .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that begin with a hash. + .replace(REGEX_LEADING_EXCAPED_HASH, '#'); + var regex = make_regex(pattern, negative); + return { + origin: origin, + pattern: pattern, + negative: negative, + regex: regex + }; + } // @returns `Boolean` true if the `path` is NOT ignored + + }, { + key: '_filter', + value: function _filter(path$$1, slices) { + if (!path$$1) { + return false; + } + + if (path$$1 in this._cache) { + return this._cache[path$$1]; + } + + if (!slices) { + // path/to/a.js + // ['path', 'to', 'a.js'] + slices = path$$1.split(SLASH); + } + + slices.pop(); + return this._cache[path$$1] = slices.length // > It is not possible to re-include a file if a parent directory of that file is excluded. + // If the path contains a parent directory, check the parent first + ? this._filter(slices.join(SLASH) + SLASH, slices) && this._test(path$$1) // Or only test the path + : this._test(path$$1); + } // @returns {Boolean} true if a file is NOT ignored + + }, { + key: '_test', + value: function _test(path$$1) { + // Explicitly define variable type by setting matched to `0` + var matched = 0; + + this._rules.forEach(function (rule) { + // if matched = true, then we only test negative rules + // if matched = false, then we test non-negative rules + if (!(matched ^ rule.negative)) { + matched = rule.negative ^ rule.regex.test(path$$1); + } + }); + + return !matched; + } + }]); + + return IgnoreBase; +}(); // > If the pattern ends with a slash, +// > it is removed for the purpose of the following description, +// > but it would only find a match with a directory. +// > In other words, foo/ will match a directory foo and paths underneath it, +// > but will not match a regular file or a symbolic link foo +// > (this is consistent with the way how pathspec works in general in Git). +// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' +// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call +// you could use option `mark: true` with `glob` +// '`foo/`' should not continue with the '`..`' + + +var DEFAULT_REPLACER_PREFIX = [// > Trailing spaces are ignored unless they are quoted with backslash ("\") +[// (a\ ) -> (a ) +// (a ) -> (a) +// (a \ ) -> (a ) +/\\?\s+$/, function (match) { + return match.indexOf('\\') === 0 ? ' ' : ''; +}], // replace (\ ) with ' ' +[/\\\s/g, function () { + return ' '; +}], // Escape metacharacters +// which is written down by users but means special for regular expressions. +// > There are 12 characters with special meanings: +// > - the backslash \, +// > - the caret ^, +// > - the dollar sign $, +// > - the period or dot ., +// > - the vertical bar or pipe symbol |, +// > - the question mark ?, +// > - the asterisk or star *, +// > - the plus sign +, +// > - the opening parenthesis (, +// > - the closing parenthesis ), +// > - and the opening square bracket [, +// > - the opening curly brace {, +// > These special characters are often called "metacharacters". +[/[\\\^$.|?*+()\[{]/g, function (match) { + return '\\' + match; +}], // leading slash +[// > A leading slash matches the beginning of the pathname. +// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". +// A leading slash matches the beginning of the pathname +/^\//, function () { + return '^'; +}], // replace special metacharacter slash after the leading slash +[/\//g, function () { + return '\\/'; +}], [// > A leading "**" followed by a slash means match in all directories. +// > For example, "**/foo" matches file or directory "foo" anywhere, +// > the same as pattern "foo". +// > "**/foo/bar" matches file or directory "bar" anywhere that is directly under directory "foo". +// Notice that the '*'s have been replaced as '\\*' +/^\^*\\\*\\\*\\\//, // '**/foo' <-> 'foo' +function () { + return '^(?:.*\\/)?'; +}]]; +var DEFAULT_REPLACER_SUFFIX = [// starting +[// there will be no leading '/' (which has been replaced by section "leading slash") +// If starts with '**', adding a '^' to the regular expression also works +/^(?=[^\^])/, function () { + return !/\/(?!$)/.test(this) // > If the pattern does not contain a slash /, Git treats it as a shell glob pattern + // Actually, if there is only a trailing slash, git also treats it as a shell glob pattern + ? '(?:^|\\/)' // > Otherwise, Git treats the pattern as a shell glob suitable for consumption by fnmatch(3) + : '^'; +}], // two globstars +[// Use lookahead assertions so that we could match more than one `'/**'` +/\\\/\\\*\\\*(?=\\\/|$)/g, // Zero, one or several directories +// should not use '*', or it will be replaced by the next replacer +// Check if it is not the last `'/**'` +function (match, index, str) { + return index + 6 < str.length // case: /**/ + // > A slash followed by two consecutive asterisks then a slash matches zero or more directories. + // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. + // '/**/' + ? '(?:\\/[^\\/]+)*' // case: /** + // > A trailing `"/**"` matches everything inside. + // #21: everything inside but it should not include the current folder + : '\\/.+'; +}], // intermediate wildcards +[// Never replace escaped '*' +// ignore rule '\*' will match the path '*' +// 'abc.*/' -> go +// 'abc.*' -> skip this rule +/(^|[^\\]+)\\\*(?=.+)/g, // '*.js' matches '.js' +// '*.js' doesn't match 'abc' +function (match, p1) { + return p1 + '[^\\/]*'; +}], // trailing wildcard +[/(\^|\\\/)?\\\*$/, function (match, p1) { + return (p1 // '\^': + // '/*' does not match '' + // '/*' does not match everything + // '\\\/': + // 'abc/*' does not match 'abc/' + ? p1 + '[^/]+' // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*') + '(?=$|\\/$)'; +}], [// unescape +/\\\\\\/g, function () { + return '\\'; +}]]; +var POSITIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [// 'f' +// matches +// - /f(end) +// - /f/ +// - (start)f(end) +// - (start)f/ +// doesn't match +// - oof +// - foo +// pseudo: +// -> (^|/)f(/|$) +// ending +[// 'js' will not match 'js.' +// 'ab' will not match 'abc' +/(?:[^*\/])$/, // 'js*' will not match 'a.js' +// 'js/' will not match 'a.js' +// 'js' will match 'a.js' and 'a.js/' +function (match) { + return match + '(?=$|\\/)'; +}]], DEFAULT_REPLACER_SUFFIX); +var NEGATIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [// #24 +// The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) +// A negative pattern without a trailing wildcard should not +// re-include the things inside that directory. +// eg: +// ['node_modules/*', '!node_modules'] +// should ignore `node_modules/a.js` +[/(?:[^*\/])$/, function (match) { + return match + '(?=$|\\/$)'; +}]], DEFAULT_REPLACER_SUFFIX); // A simple cache, because an ignore rule only has only one certain meaning + +var cache = {}; // @param {pattern} + +function make_regex(pattern, negative) { + var r = cache[pattern]; + + if (r) { + return r; + } + + var replacers = negative ? NEGATIVE_REPLACERS : POSITIVE_REPLACERS; + var source = replacers.reduce(function (prev, current) { + return prev.replace(current[0], current[1].bind(pattern)); + }, pattern); + return cache[pattern] = new RegExp(source, 'i'); +} // Windows +// -------------------------------------------------------------- + +/* istanbul ignore if */ + + +if ( // Detect `process` so that it can run in browsers. +typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) { + var filter = IgnoreBase.prototype._filter; + + var make_posix = function make_posix(str) { + return /^\\\\\?\\/.test(str) || /[^\x00-\x80]+/.test(str) ? str : str.replace(/\\/g, '/'); + }; + + IgnoreBase.prototype._filter = function (path$$1, slices) { + path$$1 = make_posix(path$$1); + return filter.call(this, path$$1, slices); + }; +} + +/** + * @param {string} filename + * @returns {Promise} + */ + + +function getFileContentOrNull(filename) { + return new Promise(function (resolve, reject) { + fs.readFile(filename, "utf8", function (error, data) { + if (error && error.code !== "ENOENT") { + reject(createError(filename, error)); + } else { + resolve(error ? null : data); + } + }); + }); +} +/** + * @param {string} filename + * @returns {null | string} + */ + + +getFileContentOrNull.sync = function (filename) { + try { + return fs.readFileSync(filename, "utf8"); + } catch (error) { + if (error && error.code === "ENOENT") { + return null; + } + + throw createError(filename, error); + } +}; + +function createError(filename, error) { + return new Error(`Unable to read ${filename}: ${error.message}`); +} + +var getFileContentOrNull_1 = getFileContentOrNull; + +/** + * @param {undefined | string} ignorePath + * @param {undefined | boolean} withNodeModules + */ + + +function createIgnorer(ignorePath, withNodeModules) { + return (!ignorePath ? Promise.resolve(null) : getFileContentOrNull_1(path.resolve(ignorePath))).then(function (ignoreContent) { + return _createIgnorer(ignoreContent, withNodeModules); + }); +} +/** + * @param {undefined | string} ignorePath + * @param {undefined | boolean} withNodeModules + */ + + +createIgnorer.sync = function (ignorePath, withNodeModules) { + var ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path.resolve(ignorePath)); + return _createIgnorer(ignoreContent, withNodeModules); +}; +/** + * @param {null | string} ignoreContent + * @param {undefined | boolean} withNodeModules + */ + + +function _createIgnorer(ignoreContent, withNodeModules) { + var ignorer = ignore().add(ignoreContent || ""); + + if (!withNodeModules) { + ignorer.add("node_modules"); + } + + return ignorer; +} + +var createIgnorer_1 = createIgnorer; + +/** + * @typedef {{ ignorePath?: string, withNodeModules?: boolean, plugins: object }} FileInfoOptions + * @typedef {{ ignored: boolean, inferredParser: string | null }} FileInfoResult + */ + +/** + * @param {string} filePath + * @param {FileInfoOptions} opts + * @returns {Promise} + * + * Please note that prettier.getFileInfo() expects opts.plugins to be an array of paths, + * not an object. A transformation from this array to an object is automatically done + * internally by the method wrapper. See withPlugins() in index.js. + */ + + +function getFileInfo(filePath, opts) { + return createIgnorer_1(opts.ignorePath, opts.withNodeModules).then(function (ignorer) { + return _getFileInfo(ignorer, filePath, opts.plugins); + }); +} +/** + * @param {string} filePath + * @param {FileInfoOptions} opts + * @returns {FileInfoResult} + */ + + +getFileInfo.sync = function (filePath, opts) { + var ignorer = createIgnorer_1.sync(opts.ignorePath, opts.withNodeModules); + return _getFileInfo(ignorer, filePath, opts.plugins); +}; + +function _getFileInfo(ignorer, filePath, plugins) { + var ignored = ignorer.ignores(filePath); + var inferredParser = options.inferParser(filePath, plugins) || null; + return { + ignored, + inferredParser + }; +} + +var getFileInfo_1 = getFileInfo; + +var lodash_uniqby = createCommonjsModule(function (module, exports) { + /** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + /** Used as the `TypeError` message for "Functions" methods. */ + + var FUNC_ERROR_TEXT = 'Expected a function'; + /** Used to stand-in for `undefined` hash values. */ + + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used to compose bitmasks for comparison styles. */ + + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + /** Used as references for various `Number` constants. */ + + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + /** `Object#toString` result references. */ + + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + /** Used to match property names within property paths. */ + + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + /** Used to match backslashes in property paths. */ + + var reEscapeChar = /\\(\\)?/g; + /** Used to detect host constructors (Safari). */ + + var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** Used to detect unsigned integer values. */ + + var reIsUint = /^(?:0|[1-9]\d*)$/; + /** Used to identify `toStringTag` values of typed arrays. */ + + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + /** Detect free variable `global` from Node.js. */ + + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + /** Detect free variable `self`. */ + + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + + var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports; + /** Detect free variable `module`. */ + + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + /** Detect the popular CommonJS extension `module.exports`. */ + + var moduleExports = freeModule && freeModule.exports === freeExports; + /** Detect free variable `process` from Node.js. */ + + var freeProcess = moduleExports && freeGlobal.process; + /** Used to access faster Node.js helpers. */ + + var nodeUtil = function () { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} + }(); + /* Node.js helper references. */ + + + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; + } + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + + + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + + return false; + } + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + + + function arraySome(array, predicate) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + + return false; + } + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + + return -1; + } + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + + return -1; + } + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + + + function baseIsNaN(value) { + return value !== value; + } + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + + + function baseProperty(key) { + return function (object) { + return object == null ? undefined : object[key]; + }; + } + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + + + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + + return result; + } + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + + + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + /** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function cacheHas(cache, key) { + return cache.has(key); + } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + + + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + /** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ + + + function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + + return result; + } + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + + + function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + + + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + + + function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + /** Used for built-in method references. */ + + + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + /** Used to detect overreaching core-js shims. */ + + var coreJsData = root['__core-js_shared__']; + /** Used to detect methods masquerading as native. */ + + var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); + /** Used to resolve the decompiled source of functions. */ + + + var funcToString = funcProto.toString; + /** Used to check objects for own properties. */ + + var hasOwnProperty = objectProto.hasOwnProperty; + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + + var objectToString = objectProto.toString; + /** Used to detect if a method is native. */ + + var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + /** Built-in value references. */ + + var Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + /* Built-in method references for those with the same name as other `lodash` methods. */ + + var nativeKeys = overArg(Object.keys, Object); + /* Built-in method references that are verified to be native. */ + + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + /** Used to detect maps, sets, and weakmaps. */ + + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + /** Used to convert symbols to primitives and strings. */ + + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + + + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function hashGet(key) { + var data = this.__data__; + + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + + + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } // Add methods to `Hash`. + + + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + + + function listCacheClear() { + this.__data__ = []; + } + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + + var lastIndex = data.length - 1; + + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + + return true; + } + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + return index < 0 ? undefined : data[index][1]; + } + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + + + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + + return this; + } // Add methods to `ListCache`. + + + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + + + function mapCacheClear() { + this.__data__ = { + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() + }; + } + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); + } + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + + + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } // Add methods to `MapCache`. + + + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + + function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + this.__data__ = new MapCache(); + + while (++index < length) { + this.add(values[index]); + } + } + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + + + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + + return this; + } + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + + + function setCacheHas(value) { + return this.__data__.has(value); + } // Add methods to `SetCache`. + + + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Stack(entries) { + this.__data__ = new ListCache(entries); + } + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + + + function stackClear() { + this.__data__ = new ListCache(); + } + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function stackDelete(key) { + return this.__data__['delete'](key); + } + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function stackGet(key) { + return this.__data__.get(key); + } + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function stackHas(key) { + return this.__data__.has(key); + } + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + + + function stackSet(key, value) { + var cache = this.__data__; + + if (cache instanceof ListCache) { + var pairs = cache.__data__; + + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + return this; + } + + cache = this.__data__ = new MapCache(pairs); + } + + cache.set(key, value); + return this; + } // Add methods to `Stack`. + + + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + + function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + + return result; + } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function assocIndexOf(array, key) { + var length = array.length; + + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + + return -1; + } + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + + + function baseGet(object, path$$1) { + path$$1 = isKey(path$$1, object) ? [path$$1] : castPath(path$$1); + var index = 0, + length = path$$1.length; + + while (object != null && index < length) { + object = object[toKey(path$$1[index++])]; + } + + return index && index == length ? object : undefined; + } + /** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + function baseGetTag(value) { + return objectToString.call(value); + } + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + + + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @param {boolean} [bitmask] The bitmask of comparison flags. + * The bitmask may be composed of the following flags: + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + + + function baseIsEqual(value, other, customizer, bitmask, stack) { + if (value === other) { + return true; + } + + if (value == null || other == null || !isObject(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + + return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + } + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = getTag(object); + objTag = objTag == argsTag ? objectTag : objTag; + } + + if (!othIsArr) { + othTag = getTag(other); + othTag = othTag == argsTag ? objectTag : othTag; + } + + var objIsObj = objTag == objectTag && !isHostObject(object), + othIsObj = othTag == objectTag && !isHostObject(other), + isSameTag = objTag == othTag; + + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + } + + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + } + } + + if (!isSameTag) { + return false; + } + + stack || (stack = new Stack()); + return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + } + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + + + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + + object = Object(object); + + while (index--) { + var data = matchData[index]; + + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) { + return false; + } + } + } + + return true; + } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + + + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + + + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + } + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + + + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + + if (value == null) { + return identity; + } + + if (typeof value == 'object') { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + + return property(value); + } + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + + + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + + var result = []; + + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + + return result; + } + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + + + function baseMatches(source) { + var matchData = getMatchData(source); + + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + + return function (object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + + + function baseMatchesProperty(path$$1, srcValue) { + if (isKey(path$$1) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path$$1), srcValue); + } + + return function (object) { + var objValue = get(object, path$$1); + return objValue === undefined && objValue === srcValue ? hasIn(object, path$$1) : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + }; + } + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + + + function basePropertyDeep(path$$1) { + return function (object) { + return baseGet(object, path$$1); + }; + } + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + + + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + + + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + + if (set) { + return setToArray(set); + } + + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + + outer: while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + + if (isCommon && computed === computed) { + var seenIndex = seen.length; + + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + + if (iteratee) { + seen.push(computed); + } + + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + + result.push(value); + } + } + + return result; + } + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ + + + function castPath(value) { + return isArray(value) ? value : stringToPath(value); + } + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + + + var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function (values) { + return new Set(values); + }; + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + + function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(array); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var index = -1, + result = true, + seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. + + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + + if (compared !== undefined) { + if (compared) { + continue; + } + + result = false; + break; + } // Recursively compare arrays (susceptible to call stack limits). + + + if (seen) { + if (!arraySome(other, function (othValue, othIndex) { + if (!seen.has(othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.add(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + result = false; + break; + } + } + + stack['delete'](array); + stack['delete'](other); + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked) { + return stacked == other; + } + + bitmask |= UNORDERED_COMPARE_FLAG; // Recursively compare objects (susceptible to call stack limits). + + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + + } + + return false; + } + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + + var index = objLength; + + while (index--) { + var key = objProps[index]; + + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } // Recursively compare objects (susceptible to call stack limits). + + + if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) { + result = false; + break; + } + + skipCtor || (skipCtor = key == 'constructor'); + } + + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + + stack['delete'](object); + stack['delete'](other); + return result; + } + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + + + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + + + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + + return result; + } + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + + + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11, + // for data views in Edge < 14, and promises in Node.js. + + if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function getTag(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + } + + return result; + }; + } + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + + + function hasPath(object, path$$1, hasFunc) { + path$$1 = isKey(path$$1, object) ? [path$$1] : castPath(path$$1); + var result, + index = -1, + length = path$$1.length; + + while (++index < length) { + var key = toKey(path$$1[index]); + + if (!(result = object != null && hasFunc(object, key))) { + break; + } + + object = object[key]; + } + + if (result) { + return result; + } + + var length = object ? object.length : 0; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + + + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + } + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + + + function isKey(value, object) { + if (isArray(value)) { + return false; + } + + var type = typeof value; + + if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { + return true; + } + + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + + + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; + } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + + + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + + + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + return value === proto; + } + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + + + function isStrictComparable(value) { + return value === value && !isObject(value); + } + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + + + function matchesStrictComparable(key, srcValue) { + return function (object) { + if (object == null) { + return false; + } + + return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); + }; + } + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + + + var stringToPath = memoize(function (string) { + string = toString(string); + var result = []; + + if (reLeadingDot.test(string)) { + result.push(''); + } + + string.replace(rePropName, function (match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : number || match); + }); + return result; + }); + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ + + + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + + try { + return func + ''; + } catch (e) {} + } + + return ''; + } + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] + * The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + + + function uniqBy(array, iteratee) { + return array && array.length ? baseUniq(array, baseIteratee(iteratee, 2)) : []; + } + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + + + function memoize(func, resolver) { + if (typeof func != 'function' || resolver && typeof resolver != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + + var memoized = function memoized() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } // Assign cache to `_.memoize`. + + + memoize.Cache = MapCache; + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + + function eq(value, other) { + return value === other || value !== value && other !== other; + } + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + + + function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + + + var isArray = Array.isArray; + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + + + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + + + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + + + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + + + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + + + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + + + function isSymbol(value) { + return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + + + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + + function toString(value) { + return value == null ? '' : baseToString(value); + } + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + + + function get(object, path$$1, defaultValue) { + var result = object == null ? undefined : baseGet(object, path$$1); + return result === undefined ? defaultValue : result; + } + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + + + function hasIn(object, path$$1) { + return object != null && hasPath(object, path$$1, baseHasIn); + } + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + + + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + + + function identity(value) { + return value; + } + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + + + function noop() {} // No operation performed. + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + + + function property(path$$1) { + return isKey(path$$1) ? baseProperty(toKey(path$$1)) : basePropertyDeep(path$$1); + } + + module.exports = uniqBy; +}); + +var PENDING = 'pending'; +var SETTLED = 'settled'; +var FULFILLED = 'fulfilled'; +var REJECTED = 'rejected'; + +var NOOP = function NOOP() {}; + +var isNode = typeof commonjsGlobal !== 'undefined' && typeof commonjsGlobal.process !== 'undefined' && typeof commonjsGlobal.process.emit === 'function'; +var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; +var asyncQueue = []; +var asyncTimer; + +function asyncFlush() { + // run promise callbacks + for (var i = 0; i < asyncQueue.length; i++) { + asyncQueue[i][0](asyncQueue[i][1]); + } // reset async asyncQueue + + + asyncQueue = []; + asyncTimer = false; +} + +function asyncCall(callback, arg) { + asyncQueue.push([callback, arg]); + + if (!asyncTimer) { + asyncTimer = true; + asyncSetTimer(asyncFlush, 0); + } +} + +function invokeResolver(resolver, promise) { + function resolvePromise(value) { + resolve(promise, value); + } + + function rejectPromise(reason) { + reject(promise, reason); + } + + try { + resolver(resolvePromise, rejectPromise); + } catch (e) { + rejectPromise(e); + } +} + +function invokeCallback(subscriber) { + var owner = subscriber.owner; + var settled = owner._state; + var value = owner._data; + var callback = subscriber[settled]; + var promise = subscriber.then; + + if (typeof callback === 'function') { + settled = FULFILLED; + + try { + value = callback(value); + } catch (e) { + reject(promise, e); + } + } + + if (!handleThenable(promise, value)) { + if (settled === FULFILLED) { + resolve(promise, value); + } + + if (settled === REJECTED) { + reject(promise, value); + } + } +} + +function handleThenable(promise, value) { + var resolved; + + try { + if (promise === value) { + throw new TypeError('A promises callback cannot return that same promise.'); + } + + if (value && (typeof value === 'function' || typeof value === 'object')) { + // then should be retrieved only once + var then = value.then; + + if (typeof then === 'function') { + then.call(value, function (val) { + if (!resolved) { + resolved = true; + + if (value === val) { + fulfill(promise, val); + } else { + resolve(promise, val); + } + } + }, function (reason) { + if (!resolved) { + resolved = true; + reject(promise, reason); + } + }); + return true; + } + } + } catch (e) { + if (!resolved) { + reject(promise, e); + } + + return true; + } + + return false; +} + +function resolve(promise, value) { + if (promise === value || !handleThenable(promise, value)) { + fulfill(promise, value); + } +} + +function fulfill(promise, value) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = value; + asyncCall(publishFulfillment, promise); + } +} + +function reject(promise, reason) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = reason; + asyncCall(publishRejection, promise); + } +} + +function publish(promise) { + promise._then = promise._then.forEach(invokeCallback); +} + +function publishFulfillment(promise) { + promise._state = FULFILLED; + publish(promise); +} + +function publishRejection(promise) { + promise._state = REJECTED; + publish(promise); + + if (!promise._handled && isNode) { + commonjsGlobal.process.emit('unhandledRejection', promise._data, promise); + } +} + +function notifyRejectionHandled(promise) { + commonjsGlobal.process.emit('rejectionHandled', promise); +} +/** + * @class + */ + + +function Promise$1(resolver) { + if (typeof resolver !== 'function') { + throw new TypeError('Promise resolver ' + resolver + ' is not a function'); + } + + if (this instanceof Promise$1 === false) { + throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); + } + + this._then = []; + invokeResolver(resolver, this); +} + +Promise$1.prototype = { + constructor: Promise$1, + _state: PENDING, + _then: null, + _data: undefined, + _handled: false, + then: function then(onFulfillment, onRejection) { + var subscriber = { + owner: this, + then: new this.constructor(NOOP), + fulfilled: onFulfillment, + rejected: onRejection + }; + + if ((onRejection || onFulfillment) && !this._handled) { + this._handled = true; + + if (this._state === REJECTED && isNode) { + asyncCall(notifyRejectionHandled, this); + } + } + + if (this._state === FULFILLED || this._state === REJECTED) { + // already resolved, call callback async + asyncCall(invokeCallback, subscriber); + } else { + // subscribe + this._then.push(subscriber); + } + + return subscriber.then; + }, + catch: function _catch(onRejection) { + return this.then(null, onRejection); + } +}; + +Promise$1.all = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.all().'); + } + + return new Promise$1(function (resolve, reject) { + var results = []; + var remaining = 0; + + function resolver(index) { + remaining++; + return function (value) { + results[index] = value; + + if (! --remaining) { + resolve(results); + } + }; + } + + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolver(i), reject); + } else { + results[i] = promise; + } + } + + if (!remaining) { + resolve(results); + } + }); +}; + +Promise$1.race = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.race().'); + } + + return new Promise$1(function (resolve, reject) { + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolve, reject); + } else { + resolve(promise); + } + } + }); +}; + +Promise$1.resolve = function (value) { + if (value && typeof value === 'object' && value.constructor === Promise$1) { + return value; + } + + return new Promise$1(function (resolve) { + resolve(value); + }); +}; + +Promise$1.reject = function (reason) { + return new Promise$1(function (resolve, reject) { + reject(reason); + }); +}; + +var pinkie = Promise$1; + +var pinkiePromise = typeof Promise === 'function' ? Promise : pinkie; + +var arrayUniq = createCommonjsModule(function (module) { + 'use strict'; // there's 3 implementations written in increasing order of efficiency + // 1 - no Set type is defined + + function uniqNoSet(arr) { + var ret = []; + + for (var i = 0; i < arr.length; i++) { + if (ret.indexOf(arr[i]) === -1) { + ret.push(arr[i]); + } + } + + return ret; + } // 2 - a simple Set type is defined + + + function uniqSet(arr) { + var seen = new Set(); + return arr.filter(function (el) { + if (!seen.has(el)) { + seen.add(el); + return true; + } + + return false; + }); + } // 3 - a standard Set type is defined and it has a forEach method + + + function uniqSetWithForEach(arr) { + var ret = []; + new Set(arr).forEach(function (el) { + ret.push(el); + }); + return ret; + } // V8 currently has a broken implementation + // https://github.com/joyent/node/issues/8449 + + + function doesForEachActuallyWork() { + var ret = false; + new Set([true]).forEach(function (el) { + ret = el; + }); + return ret === true; + } + + if ('Set' in commonjsGlobal) { + if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { + module.exports = uniqSetWithForEach; + } else { + module.exports = uniqSet; + } + } else { + module.exports = uniqNoSet; + } +}); + +var arrayUnion = function arrayUnion() { + return arrayUniq([].concat.apply([], arguments)); +}; + +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ +/* eslint-disable no-unused-vars */ + +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } // Detect buggy property enumeration order in older V8 versions. + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + + + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + + test1[5] = 'de'; + + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + + + var test2 = {}; + + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + + if (order2.join('') !== '0123456789') { + return false; + } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + + + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var isWindows = process.platform === 'win32'; // JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + + if (DEBUG) { + var backtrace = new Error(); + callback = debugCallback; + } else callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) console.trace(msg);else console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] + +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} // Regex to find the device root, including trailing slash. E.g. 'c:\\'. + + +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +var realpathSync$1 = function realpathSync(p, cache) { + // make p is absolute + p = path.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; // current character position in p + + var pos; // the partial path so far, including a trailing slash if any + + var current; // the partial path without a trailing slash (except when pointing at a root) + + var base; // the partial path scanned in the previous round, with slash + + var previous; + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; // On windows, check that the root exists. On unix there is no need. + + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + + + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; // continue if not a symlink + + if (knownHard[base] || cache && cache[base] === base) { + continue; + } + + var resolvedLink; + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + + + var linkTarget = null; + + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + + resolvedLink = path.resolve(previous, linkTarget); // track this, if given a cache. + + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } // resolve the link, then start over + + + p = path.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + return p; +}; + +var realpath$1 = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } // make p is absolute + + + p = path.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; // current character position in p + + var pos; // the partial path so far, including a trailing slash if any + + var current; // the partial path without a trailing slash (except when pointing at a root) + + var base; // the partial path scanned in the previous round, with slash + + var previous; + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; // On windows, check that the root exists. On unix there is no need. + + if (isWindows && !knownHard[base]) { + fs.lstat(base, function (err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } // walk down the path, swapping out linked pathparts for their real + // values + + + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } // find the next part + + + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; // continue if not a symlink + + if (knownHard[base] || cache && cache[base] === base) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); // if not a symlink, skip to the next path part + + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + + + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + + fs.stat(base, function (err) { + if (err) return cb(err); + fs.readlink(base, function (err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + var resolvedLink = path.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = path.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; + +var old = { + realpathSync: realpathSync$1, + realpath: realpath$1 +}; + +var fs_realpath = realpath; +realpath.realpath = realpath; +realpath.sync = realpathSync; +realpath.realpathSync = realpathSync; +realpath.monkeypatch = monkeypatch; +realpath.unmonkeypatch = unmonkeypatch; +var origRealpath = fs.realpath; +var origRealpathSync = fs.realpathSync; +var version$2 = process.version; +var ok = /^v[0-5]\./.test(version$2); + +function newError(er) { + return er && er.syscall === 'realpath' && (er.code === 'ELOOP' || er.code === 'ENOMEM' || er.code === 'ENAMETOOLONG'); +} + +function realpath(p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb); + } + + if (typeof cache === 'function') { + cb = cache; + cache = null; + } + + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); +} + +function realpathSync(p, cache) { + if (ok) { + return origRealpathSync(p, cache); + } + + try { + return origRealpathSync(p, cache); + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache); + } else { + throw er; + } + } +} + +function monkeypatch() { + fs.realpath = realpath; + fs.realpathSync = realpathSync; +} + +function unmonkeypatch() { + fs.realpath = origRealpath; + fs.realpathSync = origRealpathSync; +} + +var concatMap = function concatMap(xs, fn) { + var res = []; + + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x);else res.push(x); + } + + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +var balancedMatch = balanced; + +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; + +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [left, right]; + } + } + + return result; +} + +var braceExpansion = expandTop; +var escSlash = '\0SLASH' + Math.random() + '\0'; +var escOpen = '\0OPEN' + Math.random() + '\0'; +var escClose = '\0CLOSE' + Math.random() + '\0'; +var escComma = '\0COMMA' + Math.random() + '\0'; +var escPeriod = '\0PERIOD' + Math.random() + '\0'; + +function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash).split('\\{').join(escOpen).split('\\}').join(escClose).split('\\,').join(escComma).split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\').split(escOpen).join('{').split(escClose).join('}').split(escComma).join(',').split(escPeriod).join('.'); +} // Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} + + +function parseCommaParts(str) { + if (!str) return ['']; + var parts = []; + var m = balancedMatch('{', '}', str); + if (!m) return str.split(','); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + p[p.length - 1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + return parts; +} + +function expandTop(str) { + if (!str) return []; // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function embrace(str) { + return '{' + str + '}'; +} + +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} + +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + var m = balancedMatch('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + + return [str]; + } + + var n; + + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : ['']; + return post.map(function (p) { + return m.pre + n[0] + p; + }); + } + } + } // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + // no need to expand pre, since it is guaranteed to be free of brace-sets + + + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : ['']; + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + + if (reverse) { + incr *= -1; + test = gte; + } + + var pad = n.some(isPadded); + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') c = ''; + } else { + c = String(i); + + if (pad) { + var need = width - c.length; + + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) c = '-' + z + c.slice(1);else c = z + c; + } + } + } + + N.push(c); + } + } else { + N = concatMap(n, function (el) { + return expand(el, false); + }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) expansions.push(expansion); + } + } + + return expansions; +} + +var minimatch_1 = minimatch; +minimatch.Minimatch = Minimatch$1; +var path$2 = { + sep: '/' +}; + +try { + path$2 = path; +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch$1.GLOBSTAR = {}; +var plTypes = { + '!': { + open: '(?:(?!(?:', + close: '))[^/]*?)' + }, + '?': { + open: '(?:', + close: ')?' + }, + '+': { + open: '(?:', + close: ')+' + }, + '*': { + open: '(?:', + close: ')*' + }, + '@': { + open: '(?:', + close: ')' + } // any single thing other than / + // don't need to escape / when using new RegExp() + +}; +var qmark = '[^/]'; // * => any number of characters + +var star = qmark + '*?'; // ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. + +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'; // not a ^ or / followed by a dot, +// followed by anything, any number of times. + +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'; // characters that need to be escaped in RegExp. + +var reSpecials = charSet('().*{}+?[]^$\\!'); // "abc" -> { a:true, b:true, c:true } + +function charSet(s) { + return s.split('').reduce(function (set, c) { + set[c] = true; + return set; + }, {}); +} // normalizes slashes. + + +var slashSplit = /\/+/; +minimatch.filter = filter$1; + +function filter$1(pattern, options) { + options = options || {}; + return function (p, i, list) { + return minimatch(p, pattern, options); + }; +} + +function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function (k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function (k) { + t[k] = a[k]; + }); + return t; +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch; + var orig = minimatch; + + var m = function minimatch(p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)); + }; + + m.Minimatch = function Minimatch(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + + return m; +}; + +Minimatch$1.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch$1; + return minimatch.defaults(def).Minimatch; +}; + +function minimatch(p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required'); + } + + if (!options) options = {}; // shortcut: comments match nothing. + + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } // "" only matches "" + + + if (pattern.trim() === '') return p === ''; + return new Minimatch$1(pattern, options).match(p); +} + +function Minimatch$1(pattern, options) { + if (!(this instanceof Minimatch$1)) { + return new Minimatch$1(pattern, options); + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required'); + } + + if (!options) options = {}; + pattern = pattern.trim(); // windows support: need to use /, not \ + + if (path$2.sep !== '/') { + pattern = pattern.split(path$2.sep).join('/'); + } + + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; // make the set of regexps etc. + + this.make(); +} + +Minimatch$1.prototype.debug = function () {}; + +Minimatch$1.prototype.make = make; + +function make() { + // don't do it more than once. + if (this._made) return; + var pattern = this.pattern; + var options = this.options; // empty patterns and comments match nothing. + + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + + if (!pattern) { + this.empty = true; + return; + } // step 1: figure out negation, etc. + + + this.parseNegate(); // step 2: expand braces + + var set = this.globSet = this.braceExpand(); + if (options.debug) this.debug = console.error; + this.debug(this.pattern, set); // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + + set = this.globParts = set.map(function (s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); // glob --> regexps + + set = set.map(function (s, si, set) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); // filter out everything that didn't compile properly. + + set = set.filter(function (s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; +} + +Minimatch$1.prototype.parseNegate = parseNegate; + +function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === '!'; i++) { + negate = !negate; + negateOffset++; + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; +} // Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c + + +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options); +}; + +Minimatch$1.prototype.braceExpand = braceExpand; + +function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch$1) { + options = this.options; + } else { + options = {}; + } + } + + pattern = typeof pattern === 'undefined' ? this.pattern : pattern; + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern'); + } + + if (options.nobrace || !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern]; + } + + return braceExpansion(pattern); +} // parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. + + +Minimatch$1.prototype.parse = parse$3; +var SUBPARSE = {}; + +function parse$3(pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long'); + } + + var options = this.options; // shortcuts + + if (!options.noglobstar && pattern === '**') return GLOBSTAR; + if (pattern === '') return ''; + var re = ''; + var hasMagic = !!options.nocase; + var escaping = false; // ? => one single character + + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)'; + var self = this; + + function clearStateChar() { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break; + + case '?': + re += qmark; + hasMagic = true; + break; + + default: + re += '\\' + stateChar; + break; + } + + self.debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + } + + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c); // skip over any that are escaped. + + if (escaping && reSpecials[c]) { + re += '\\' + c; + escaping = false; + continue; + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false; + + case '\\': + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + + if (inClass) { + this.debug(' in class'); + if (c === '!' && i === classStart + 1) c = '^'; + re += c; + continue; + } // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + + + self.debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + + if (options.noext) clearStateChar(); + continue; + + case '(': + if (inClass) { + re += '('; + continue; + } + + if (!stateChar) { + re += '\\('; + continue; + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); // negation is (?:(?!js)[^/]*) + + re += stateChar === '!' ? '(?:(?!(?:' : '(?:'; + this.debug('plType %j %j', stateChar, re); + stateChar = false; + continue; + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)'; + continue; + } + + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); // negation is (?:(?!js)[^/]*) + // The others are (?:) + + re += pl.close; + + if (pl.type === '!') { + negativeLists.push(pl); + } + + pl.reEnd = re.length; + continue; + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|'; + escaping = false; + continue; + } + + clearStateChar(); + re += '|'; + continue; + // these are mostly the same in regexp and glob + + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + + if (inClass) { + re += '\\' + c; + continue; + } + + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c; + escaping = false; + continue; + } // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + + + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i); + + try { + RegExp('[' + cs + ']'); + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + } // finish up the class. + + + hasMagic = true; + inClass = false; + re += c; + continue; + + default: + // swallow any state char that wasn't consumed + clearStateChar(); + + if (escaping) { + // no need + escaping = false; + } else if (reSpecials[c] && !(c === '^' && inClass)) { + re += '\\'; + } + + re += c; + } // switch + + } // for + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + + + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + '\\[' + sp[0]; + hasMagic = hasMagic || sp[1]; + } // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + + + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug('setting tail', re, pl); // maybe some even number of \, then maybe 1 \, followed by a | + + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + } // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + + + return $1 + $1 + $2 + '|'; + }); + this.debug('tail=%j\n %s', tail, tail, pl, re); + var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } // handle trailing things that only matter at the very end. + + + clearStateChar(); + + if (escaping) { + // trailing \\ + re += '\\\\'; + } // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + + + var addPatternStart = false; + + switch (re.charAt(0)) { + case '.': + case '[': + case '(': + addPatternStart = true; + } // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + + + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + + var openParensBefore = nlBefore.split('(').length - 1; + var cleanAfter = nlAfter; + + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + + nlAfter = cleanAfter; + var dollar = ''; + + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$'; + } + + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + + + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + + if (addPatternStart) { + re = patternStart + re; + } // parsing just a piece of a larger pattern. + + + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + + + if (!hasMagic) { + return globUnescape(pattern); + } + + var flags = options.nocase ? 'i' : ''; + + try { + var regExp = new RegExp('^' + re + '$', flags); + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.'); + } + + regExp._glob = pattern; + regExp._src = re; + return regExp; +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch$1(pattern, options || {}).makeRe(); +}; + +Minimatch$1.prototype.makeRe = makeRe; + +function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + + var set = this.set; + + if (!set.length) { + this.regexp = false; + return this.regexp; + } + + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? 'i' : ''; + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return p === GLOBSTAR ? twoStar : typeof p === 'string' ? regExpEscape(p) : p._src; + }).join('\\\/'); + }).join('|'); // must match entire pattern + // ending in a * or ** will make it less strict. + + re = '^(?:' + re + ')$'; // can match anything, as long as it's not this. + + if (this.negate) re = '^(?!' + re + ').*$'; + + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + + return this.regexp; +} + +minimatch.match = function (list, pattern, options) { + options = options || {}; + var mm = new Minimatch$1(pattern, options); + list = list.filter(function (f) { + return mm.match(f); + }); + + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + + return list; +}; + +Minimatch$1.prototype.match = match; + +function match(f, partial) { + this.debug('match', f, this.pattern); // short-circuit in the case of busted things. + // comments, etc. + + if (this.comment) return false; + if (this.empty) return f === ''; + if (f === '/' && partial) return true; + var options = this.options; // windows: need to use /, not \ + + if (path$2.sep !== '/') { + f = f.split(path$2.sep).join('/'); + } // treat the test path as a set of pathparts. + + + f = f.split(slashSplit); + this.debug(this.pattern, 'split', f); // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set; + this.debug(this.pattern, 'set', set); // Find the basename of the path by looking for the last non-empty segment + + var filename; + var i; + + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + + var hit = this.matchOne(file, pattern, partial); + + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + + + if (options.flipNegate) return false; + return this.negate; +} // set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. + + +Minimatch$1.prototype.matchOne = function (file, pattern, partial) { + var options = this.options; + this.debug('matchOne', { + 'this': this, + file: file, + pattern: pattern + }); + this.debug('matchOne', file.length, pattern.length); + + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug('matchOne loop'); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); // should be impossible. + // some invalid regexp stuff in the set. + + if (p === false) return false; + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]); // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + + var fr = fi; + var pr = pi + 1; + + if (pr === pl) { + this.debug('** at the end'); // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || !options.dot && file[fi].charAt(0) === '.') return false; + } + + return true; + } // ok, let's see if we can swallow whatever we can. + + + while (fr < fl) { + var swallowee = file[fr]; + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); // XXX remove this slice. Just pass the start index. + + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee); // found a match. + + return true; + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || !options.dot && swallowee.charAt(0) === '.') { + this.debug('dot detected!', file, fr, pattern, pr); + break; + } // ** swallows a segment, and continue. + + + this.debug('globstar swallow a segment, and continue'); + fr++; + } + } // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + + + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr); + if (fr === fl) return true; + } + + return false; + } // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + + + var hit; + + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + + this.debug('string match', p, f, hit); + } else { + hit = f.match(p); + this.debug('pattern match', p, f, hit); + } + + if (!hit) return false; + } // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + // now either we fell off the end of the pattern, or we're done. + + + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true; + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial; + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = fi === fl - 1 && file[fi] === ''; + return emptyFileEnd; + } // should be unreachable. + + + throw new Error('wtf?'); +}; // replace stuff like \* with * + + +function globUnescape(s) { + return s.replace(/\\(.)/g, '$1'); +} + +function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +} + +var inherits_browser = createCommonjsModule(function (module) { + if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + + var TempCtor = function TempCtor() {}; + + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } +}); + +var inherits = createCommonjsModule(function (module) { + try { + var util$$1 = util; + if (typeof util$$1.inherits !== 'function') throw ''; + module.exports = util$$1.inherits; + } catch (e) { + module.exports = inherits_browser; + } +}); + +function posix(path$$1) { + return path$$1.charAt(0) === '/'; +} + +function win32(path$$1) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path$$1); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); // UNC paths are always absolute + + return Boolean(result[2] || isUnc); +} + +var pathIsAbsolute = process.platform === 'win32' ? win32 : posix; +var posix_1 = posix; +var win32_1 = win32; +pathIsAbsolute.posix = posix_1; +pathIsAbsolute.win32 = win32_1; + +var alphasort_1 = alphasort$2; +var alphasorti_1 = alphasorti$2; +var setopts_1 = setopts$2; +var ownProp_1 = ownProp$2; +var makeAbs_1 = makeAbs; +var finish_1 = finish; +var mark_1 = mark; +var isIgnored_1 = isIgnored$2; +var childrenIgnored_1 = childrenIgnored$2; + +function ownProp$2(obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field); +} + +var Minimatch$3 = minimatch_1.Minimatch; + +function alphasorti$2(a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()); +} + +function alphasort$2(a, b) { + return a.localeCompare(b); +} + +function setupIgnores(self, options) { + self.ignore = options.ignore || []; + if (!Array.isArray(self.ignore)) self.ignore = [self.ignore]; + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap); + } +} // ignore patterns are always in dot:true mode. + + +function ignoreMap(pattern) { + var gmatcher = null; + + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, ''); + gmatcher = new Minimatch$3(gpattern, { + dot: true + }); + } + + return { + matcher: new Minimatch$3(pattern, { + dot: true + }), + gmatcher: gmatcher + }; +} + +function setopts$2(self, pattern, options) { + if (!options) options = {}; // base-matching: just use globstar for that. + + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar"); + } + + pattern = "**/" + pattern; + } + + self.silent = !!options.silent; + self.pattern = pattern; + self.strict = options.strict !== false; + self.realpath = !!options.realpath; + self.realpathCache = options.realpathCache || Object.create(null); + self.follow = !!options.follow; + self.dot = !!options.dot; + self.mark = !!options.mark; + self.nodir = !!options.nodir; + if (self.nodir) self.mark = true; + self.sync = !!options.sync; + self.nounique = !!options.nounique; + self.nonull = !!options.nonull; + self.nosort = !!options.nosort; + self.nocase = !!options.nocase; + self.stat = !!options.stat; + self.noprocess = !!options.noprocess; + self.absolute = !!options.absolute; + self.maxLength = options.maxLength || Infinity; + self.cache = options.cache || Object.create(null); + self.statCache = options.statCache || Object.create(null); + self.symlinks = options.symlinks || Object.create(null); + setupIgnores(self, options); + self.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp$2(options, "cwd")) self.cwd = cwd;else { + self.cwd = path.resolve(options.cwd); + self.changedCwd = self.cwd !== cwd; + } + self.root = options.root || path.resolve(self.cwd, "/"); + self.root = path.resolve(self.root); + if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/"); // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + + self.cwdAbs = pathIsAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd); + if (process.platform === "win32") self.cwdAbs = self.cwdAbs.replace(/\\/g, "/"); + self.nomount = !!options.nomount; // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + + options.nonegate = true; + options.nocomment = true; + self.minimatch = new Minimatch$3(pattern, options); + self.options = self.minimatch.options; +} + +function finish(self) { + var nou = self.nounique; + var all = nou ? [] : Object.create(null); + + for (var i = 0, l = self.matches.length; i < l; i++) { + var matches = self.matches[i]; + + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i]; + if (nou) all.push(literal);else all[literal] = true; + } + } else { + // had matches + var m = Object.keys(matches); + if (nou) all.push.apply(all, m);else m.forEach(function (m) { + all[m] = true; + }); + } + } + + if (!nou) all = Object.keys(all); + if (!self.nosort) all = all.sort(self.nocase ? alphasorti$2 : alphasort$2); // at *some* point we statted all of these + + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]); + } + + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !/\/$/.test(e); + var c = self.cache[e] || self.cache[makeAbs(self, e)]; + if (notDir && c) notDir = c !== 'DIR' && !Array.isArray(c); + return notDir; + }); + } + } + + if (self.ignore.length) all = all.filter(function (m) { + return !isIgnored$2(self, m); + }); + self.found = all; +} + +function mark(self, p) { + var abs = makeAbs(self, p); + var c = self.cache[abs]; + var m = p; + + if (c) { + var isDir = c === 'DIR' || Array.isArray(c); + var slash = p.slice(-1) === '/'; + if (isDir && !slash) m += '/';else if (!isDir && slash) m = m.slice(0, -1); + + if (m !== p) { + var mabs = makeAbs(self, m); + self.statCache[mabs] = self.statCache[abs]; + self.cache[mabs] = self.cache[abs]; + } + } + + return m; +} // lotta situps... + + +function makeAbs(self, f) { + var abs = f; + + if (f.charAt(0) === '/') { + abs = path.join(self.root, f); + } else if (pathIsAbsolute(f) || f === '') { + abs = f; + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f); + } else { + abs = path.resolve(f); + } + + if (process.platform === 'win32') abs = abs.replace(/\\/g, '/'); + return abs; +} // Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents + + +function isIgnored$2(self, path$$2) { + if (!self.ignore.length) return false; + return self.ignore.some(function (item) { + return item.matcher.match(path$$2) || !!(item.gmatcher && item.gmatcher.match(path$$2)); + }); +} + +function childrenIgnored$2(self, path$$2) { + if (!self.ignore.length) return false; + return self.ignore.some(function (item) { + return !!(item.gmatcher && item.gmatcher.match(path$$2)); + }); +} + +var common$4 = { + alphasort: alphasort_1, + alphasorti: alphasorti_1, + setopts: setopts_1, + ownProp: ownProp_1, + makeAbs: makeAbs_1, + finish: finish_1, + mark: mark_1, + isIgnored: isIgnored_1, + childrenIgnored: childrenIgnored_1 +}; + +var sync$1 = globSync; +globSync.GlobSync = GlobSync$1; +var setopts$1 = common$4.setopts; +var ownProp$1 = common$4.ownProp; +var childrenIgnored$1 = common$4.childrenIgnored; +var isIgnored$1 = common$4.isIgnored; + +function globSync(pattern, options) { + if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n' + 'See: https://github.com/isaacs/node-glob/issues/167'); + return new GlobSync$1(pattern, options).found; +} + +function GlobSync$1(pattern, options) { + if (!pattern) throw new Error('must provide pattern'); + if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n' + 'See: https://github.com/isaacs/node-glob/issues/167'); + if (!(this instanceof GlobSync$1)) return new GlobSync$1(pattern, options); + setopts$1(this, pattern, options); + if (this.noprocess) return this; + var n = this.minimatch.set.length; + this.matches = new Array(n); + + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false); + } + + this._finish(); +} + +GlobSync$1.prototype._finish = function () { + assert(this instanceof GlobSync$1); + + if (this.realpath) { + var self = this; + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null); + + for (var p in matchset) { + try { + p = self._makeAbs(p); + var real = fs_realpath.realpathSync(p, self.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === 'stat') set[self._makeAbs(p)] = true;else throw er; + } + } + }); + } + + common$4.finish(this); +}; + +GlobSync$1.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync$1); // Get the first [n] parts of pattern that are all strings. + + var n = 0; + + while (typeof pattern[n] === 'string') { + n++; + } // now n is the index of the first one that is *not* a string. + // See if there's anything else + + + var prefix; + + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index); + + return; + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null; + break; + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/'); + break; + } + + var remain = pattern.slice(n); // get the list of entries. + + var read; + if (prefix === null) read = '.';else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join('/'))) { + if (!prefix || !pathIsAbsolute(prefix)) prefix = '/' + prefix; + read = prefix; + } else read = prefix; + + var abs = this._makeAbs(read); //if ignored, skip processing + + + if (childrenIgnored$1(this, read)) return; + var isGlobStar = remain[0] === minimatch_1.GLOBSTAR; + if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar);else this._processReaddir(prefix, read, abs, remain, index, inGlobStar); +}; + +GlobSync$1.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); // if the abs isn't a dir, then nothing can match! + + + if (!entries) return; // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === '.'; + var matchedEntries = []; + + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + + if (e.charAt(0) !== '.' || dotOk) { + var m; + + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + + if (m) matchedEntries.push(e); + } + } + + var len = matchedEntries.length; // If there are no matched entries, then nothing matches. + + if (len === 0) return; // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) this.matches[index] = Object.create(null); + + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + + if (prefix) { + if (prefix.slice(-1) !== '/') e = prefix + '/' + e;else e = prefix + e; + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e); + } + + this._emitMatch(index, e); + } // This was the last one, and no stats were needed + + + return; + } // now test all matched entries as stand-ins for that part + // of the pattern. + + + remain.shift(); + + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) newPattern = [prefix, e];else newPattern = [e]; + + this._process(newPattern.concat(remain), index, inGlobStar); + } +}; + +GlobSync$1.prototype._emitMatch = function (index, e) { + if (isIgnored$1(this, e)) return; + + var abs = this._makeAbs(e); + + if (this.mark) e = this._mark(e); + + if (this.absolute) { + e = abs; + } + + if (this.matches[index][e]) return; + + if (this.nodir) { + var c = this.cache[abs]; + if (c === 'DIR' || Array.isArray(c)) return; + } + + this.matches[index][e] = true; + if (this.stat) this._stat(e); +}; + +GlobSync$1.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) return this._readdir(abs, false); + var entries; + var lstat; + var stat; + + try { + lstat = fs.lstatSync(abs); + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null; + } + } + + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + + if (!isSym && lstat && !lstat.isDirectory()) this.cache[abs] = 'FILE';else entries = this._readdir(abs, false); + return entries; +}; + +GlobSync$1.prototype._readdir = function (abs, inGlobStar) { + var entries; + if (inGlobStar && !ownProp$1(this.symlinks, abs)) return this._readdirInGlobStar(abs); + + if (ownProp$1(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === 'FILE') return null; + if (Array.isArray(c)) return c; + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)); + } catch (er) { + this._readdirError(abs, er); + + return null; + } +}; + +GlobSync$1.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === '/') e = abs + e;else e = abs + '/' + e; + this.cache[e] = true; + } + } + + this.cache[abs] = entries; // mark and cache dir-ness + + return entries; +}; + +GlobSync$1.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + + case 'ENOTDIR': + // totally normal. means it *does* exist. + var abs = this._makeAbs(f); + + this.cache[abs] = 'FILE'; + + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error; + } + + break; + + case 'ENOENT': // not terribly unusual + + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false; + break; + + default: + // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false; + if (this.strict) throw er; + if (!this.silent) console.error('glob error', er); + break; + } +}; + +GlobSync$1.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + + + if (!entries) return; // test without the globstar, and with every child both below + // and replacing the globstar. + + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); // the noGlobStar pattern exits the inGlobStar state + + this._process(noGlobStar, index, false); + + var len = entries.length; + var isSym = this.symlinks[abs]; // If it's a symlink, and we're in a globstar, then stop + + if (isSym && inGlobStar) return; + + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === '.' && !this.dot) continue; // these two cases enter the inGlobStar state + + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + + this._process(instead, index, true); + + var below = gspref.concat(entries[i], remain); + + this._process(below, index, true); + } +}; + +GlobSync$1.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix); + + if (!this.matches[index]) this.matches[index] = Object.create(null); // If it doesn't exist, then just mark the lack of results + + if (!exists) return; + + if (prefix && pathIsAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) prefix += '/'; + } + } + + if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/'); // Mark this as a match + + this._emitMatch(index, prefix); +}; // Returns either 'DIR', 'FILE', or false + + +GlobSync$1.prototype._stat = function (f) { + var abs = this._makeAbs(f); + + var needDir = f.slice(-1) === '/'; + if (f.length > this.maxLength) return false; + + if (!this.stat && ownProp$1(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) c = 'DIR'; // It exists, but maybe not how we need it + + if (!needDir || c === 'DIR') return c; + if (needDir && c === 'FILE') return false; // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists; + var stat = this.statCache[abs]; + + if (!stat) { + var lstat; + + try { + lstat = fs.lstatSync(abs); + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false; + return false; + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + + this.statCache[abs] = stat; + var c = true; + if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE'; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === 'FILE') return false; + return c; +}; + +GlobSync$1.prototype._mark = function (p) { + return common$4.mark(this, p); +}; + +GlobSync$1.prototype._makeAbs = function (f) { + return common$4.makeAbs(this, f); +}; + +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +var wrappy_1 = wrappy; + +function wrappy(fn, cb) { + if (fn && cb) return wrappy(fn)(cb); + if (typeof fn !== 'function') throw new TypeError('need wrapper function'); + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k]; + }); + return wrapper; + + function wrapper() { + var args = new Array(arguments.length); + + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + var ret = fn.apply(this, args); + var cb = args[args.length - 1]; + + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k]; + }); + } + + return ret; + } +} + +var once_1 = wrappy_1(once); +var strict = wrappy_1(onceStrict); +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function value() { + return once(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function value() { + return onceStrict(this); + }, + configurable: true + }); +}); + +function once(fn) { + var f = function f() { + if (f.called) return f.value; + f.called = true; + return f.value = fn.apply(this, arguments); + }; + + f.called = false; + return f; +} + +function onceStrict(fn) { + var f = function f() { + if (f.called) throw new Error(f.onceError); + f.called = true; + return f.value = fn.apply(this, arguments); + }; + + var name = fn.name || 'Function wrapped with `once`'; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; +} + +once_1.strict = strict; + +var reqs = Object.create(null); +var inflight_1 = wrappy_1(inflight); + +function inflight(key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null; + } else { + reqs[key] = [cb]; + return makeres(key); + } +} + +function makeres(key) { + return once_1(function RES() { + var cbs = reqs[key]; + var len = cbs.length; + var args = slice(arguments); // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args); + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len); + process.nextTick(function () { + RES.apply(null, args); + }); + } else { + delete reqs[key]; + } + } + }); +} + +function slice(args) { + var length = args.length; + var array = []; + + for (var i = 0; i < length; i++) { + array[i] = args[i]; + } + + return array; +} + +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +var glob_1 = glob; +var EE = events.EventEmitter; +var setopts = common$4.setopts; +var ownProp = common$4.ownProp; +var childrenIgnored = common$4.childrenIgnored; +var isIgnored = common$4.isIgnored; + +function glob(pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {}; + if (!options) options = {}; + + if (options.sync) { + if (cb) throw new TypeError('callback provided to sync glob'); + return sync$1(pattern, options); + } + + return new Glob(pattern, options, cb); +} + +glob.sync = sync$1; +var GlobSync = glob.GlobSync = sync$1.GlobSync; // old api surface + +glob.glob = glob; + +function extend(origin, add) { + if (add === null || typeof add !== 'object') { + return origin; + } + + var keys = Object.keys(add); + var i = keys.length; + + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + + return origin; +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_); + options.noprocess = true; + var g = new Glob(pattern, options); + var set = g.minimatch.set; + if (!pattern) return false; + if (set.length > 1) return true; + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') return true; + } + + return false; +}; + +glob.Glob = Glob; +inherits(Glob, EE); + +function Glob(pattern, options, cb) { + if (typeof options === 'function') { + cb = options; + options = null; + } + + if (options && options.sync) { + if (cb) throw new TypeError('callback provided to sync glob'); + return new GlobSync(pattern, options); + } + + if (!(this instanceof Glob)) return new Glob(pattern, options, cb); + setopts(this, pattern, options); + this._didRealPath = false; // process each pattern in the minimatch set + + var n = this.minimatch.set.length; // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + + this.matches = new Array(n); + + if (typeof cb === 'function') { + cb = once_1(cb); + this.on('error', cb); + this.on('end', function (matches) { + cb(null, matches); + }); + } + + var self = this; + this._processing = 0; + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + if (this.noprocess) return this; + if (n === 0) return done(); + var sync = true; + + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false, done); + } + + sync = false; + + function done() { + --self._processing; + + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish(); + }); + } else { + self._finish(); + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob); + if (this.aborted) return; + if (this.realpath && !this._didRealpath) return this._realpath(); + common$4.finish(this); + this.emit('end', this.found); +}; + +Glob.prototype._realpath = function () { + if (this._didRealpath) return; + this._didRealpath = true; + var n = this.matches.length; + if (n === 0) return this._finish(); + var self = this; + + for (var i = 0; i < this.matches.length; i++) { + this._realpathSet(i, next); + } + + function next() { + if (--n === 0) self._finish(); + } +}; + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index]; + if (!matchset) return cb(); + var found = Object.keys(matchset); + var self = this; + var n = found.length; + if (n === 0) return cb(); + var set = this.matches[index] = Object.create(null); + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p); + fs_realpath.realpath(p, self.realpathCache, function (er, real) { + if (!er) set[real] = true;else if (er.syscall === 'stat') set[p] = true;else self.emit('error', er); // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set; + cb(); + } + }); + }); +}; + +Glob.prototype._mark = function (p) { + return common$4.mark(this, p); +}; + +Glob.prototype._makeAbs = function (f) { + return common$4.makeAbs(this, f); +}; + +Glob.prototype.abort = function () { + this.aborted = true; + this.emit('abort'); +}; + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true; + this.emit('pause'); + } +}; + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume'); + this.paused = false; + + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + + this._emitQueue.length = 0; + + for (var i = 0; i < eq.length; i++) { + var e = eq[i]; + + this._emitMatch(e[0], e[1]); + } + } + + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + + this._processQueue.length = 0; + + for (var i = 0; i < pq.length; i++) { + var p = pq[i]; + this._processing--; + + this._process(p[0], p[1], p[2], p[3]); + } + } + } +}; + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === 'function'); + if (this.aborted) return; + this._processing++; + + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + + return; + } //console.error('PROCESS %d', this._processing, pattern) + // Get the first [n] parts of pattern that are all strings. + + + var n = 0; + + while (typeof pattern[n] === 'string') { + n++; + } // now n is the index of the first one that is *not* a string. + // see if there's anything else + + + var prefix; + + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb); + + return; + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null; + break; + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/'); + break; + } + + var remain = pattern.slice(n); // get the list of entries. + + var read; + if (prefix === null) read = '.';else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join('/'))) { + if (!prefix || !pathIsAbsolute(prefix)) prefix = '/' + prefix; + read = prefix; + } else read = prefix; + + var abs = this._makeAbs(read); //if ignored, skip _processing + + + if (childrenIgnored(this, read)) return cb(); + var isGlobStar = remain[0] === minimatch_1.GLOBSTAR; + if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb);else this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); +}; + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this; + + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); +}; + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + // if the abs isn't a dir, then nothing can match! + if (!entries) return cb(); // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === '.'; + var matchedEntries = []; + + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + + if (e.charAt(0) !== '.' || dotOk) { + var m; + + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + + if (m) matchedEntries.push(e); + } + } //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + + var len = matchedEntries.length; // If there are no matched entries, then nothing matches. + + if (len === 0) return cb(); // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) this.matches[index] = Object.create(null); + + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + + if (prefix) { + if (prefix !== '/') e = prefix + '/' + e;else e = prefix + e; + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e); + } + + this._emitMatch(index, e); + } // This was the last one, and no stats were needed + + + return cb(); + } // now test all matched entries as stand-ins for that part + // of the pattern. + + + remain.shift(); + + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + + if (prefix) { + if (prefix !== '/') e = prefix + '/' + e;else e = prefix + e; + } + + this._process([e].concat(remain), index, inGlobStar, cb); + } + + cb(); +}; + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) return; + if (isIgnored(this, e)) return; + + if (this.paused) { + this._emitQueue.push([index, e]); + + return; + } + + var abs = pathIsAbsolute(e) ? e : this._makeAbs(e); + if (this.mark) e = this._mark(e); + if (this.absolute) e = abs; + if (this.matches[index][e]) return; + + if (this.nodir) { + var c = this.cache[abs]; + if (c === 'DIR' || Array.isArray(c)) return; + } + + this.matches[index][e] = true; + var st = this.statCache[abs]; + if (st) this.emit('stat', e, st); + this.emit('match', e); +}; + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) return; // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + + if (this.follow) return this._readdir(abs, false, cb); + var lstatkey = 'lstat\0' + abs; + var self = this; + var lstatcb = inflight_1(lstatkey, lstatcb_); + if (lstatcb) fs.lstat(abs, lstatcb); + + function lstatcb_(er, lstat) { + if (er && er.code === 'ENOENT') return cb(); + var isSym = lstat && lstat.isSymbolicLink(); + self.symlinks[abs] = isSym; // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE'; + cb(); + } else self._readdir(abs, false, cb); + } +}; + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) return; + cb = inflight_1('readdir\0' + abs + '\0' + inGlobStar, cb); + if (!cb) return; //console.error('RD %j %j', +inGlobStar, abs) + + if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs, cb); + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === 'FILE') return cb(); + if (Array.isArray(c)) return cb(null, c); + } + + var self = this; + fs.readdir(abs, readdirCb(this, abs, cb)); +}; + +function readdirCb(self, abs, cb) { + return function (er, entries) { + if (er) self._readdirError(abs, er, cb);else self._readdirEntries(abs, entries, cb); + }; +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) return; // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === '/') e = abs + e;else e = abs + '/' + e; + this.cache[e] = true; + } + } + + this.cache[abs] = entries; + return cb(null, entries); +}; + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) return; // handle errors, and cache the information + + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + + case 'ENOTDIR': + // totally normal. means it *does* exist. + var abs = this._makeAbs(f); + + this.cache[abs] = 'FILE'; + + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit('error', error); + this.abort(); + } + + break; + + case 'ENOENT': // not terribly unusual + + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false; + break; + + default: + // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false; + + if (this.strict) { + this.emit('error', er); // If the error is handled, then we abort + // if not, we threw out of here + + this.abort(); + } + + if (!this.silent) console.error('glob error', er); + break; + } + + return cb(); +}; + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this; + + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); +}; + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) return cb(); // test without the globstar, and with every child both below + // and replacing the globstar. + + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); // the noGlobStar pattern exits the inGlobStar state + + this._process(noGlobStar, index, false, cb); + + var isSym = this.symlinks[abs]; + var len = entries.length; // If it's a symlink, and we're in a globstar, then stop + + if (isSym && inGlobStar) return cb(); + + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === '.' && !this.dot) continue; // these two cases enter the inGlobStar state + + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + + this._process(instead, index, true, cb); + + var below = gspref.concat(entries[i], remain); + + this._process(below, index, true, cb); + } + + cb(); +}; + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this; + + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb); + }); +}; + +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + //console.error('ps2', prefix, exists) + if (!this.matches[index]) this.matches[index] = Object.create(null); // If it doesn't exist, then just mark the lack of results + + if (!exists) return cb(); + + if (prefix && pathIsAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) prefix += '/'; + } + } + + if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/'); // Mark this as a match + + this._emitMatch(index, prefix); + + cb(); +}; // Returns either 'DIR', 'FILE', or false + + +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f); + + var needDir = f.slice(-1) === '/'; + if (f.length > this.maxLength) return cb(); + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) c = 'DIR'; // It exists, but maybe not how we need it + + if (!needDir || c === 'DIR') return cb(null, c); + if (needDir && c === 'FILE') return cb(); // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists; + var stat = this.statCache[abs]; + + if (stat !== undefined) { + if (stat === false) return cb(null, stat);else { + var type = stat.isDirectory() ? 'DIR' : 'FILE'; + if (needDir && type === 'FILE') return cb();else return cb(null, type, stat); + } + } + + var self = this; + var statcb = inflight_1('stat\0' + abs, lstatcb_); + if (statcb) fs.lstat(abs, statcb); + + function lstatcb_(er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) self._stat2(f, abs, null, lstat, cb);else self._stat2(f, abs, er, stat, cb); + }); + } else { + self._stat2(f, abs, er, lstat, cb); + } + } +}; + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false; + return cb(); + } + + var needDir = f.slice(-1) === '/'; + this.statCache[abs] = stat; + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) return cb(null, false, stat); + var c = true; + if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE'; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === 'FILE') return cb(); + return cb(null, c, stat); +}; + +var pify_1 = createCommonjsModule(function (module) { + 'use strict'; + + var processFn = function processFn(fn, P, opts) { + return function () { + var that = this; + var args = new Array(arguments.length); + + for (var i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P(function (resolve, reject) { + args.push(function (err, result) { + if (err) { + reject(err); + } else if (opts.multiArgs) { + var results = new Array(arguments.length - 1); + + for (var i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + fn.apply(that, args); + }); + }; + }; + + var pify = module.exports = function (obj, P, opts) { + if (typeof P !== 'function') { + opts = P; + P = Promise; + } + + opts = opts || {}; + opts.exclude = opts.exclude || [/.+Sync$/]; + + var filter = function filter(key) { + var match = function match(pattern) { + return typeof pattern === 'string' ? key === pattern : pattern.test(key); + }; + + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + var ret = typeof obj === 'function' ? function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, P, opts).apply(this, arguments); + } : {}; + return Object.keys(obj).reduce(function (ret, key) { + var x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x; + return ret; + }, ret); + }; + + pify.all = pify; +}); + +var globP = pify_1(glob_1, pinkiePromise).bind(glob_1); + +function isNegative(pattern) { + return pattern[0] === '!'; +} + +function isString(value) { + return typeof value === 'string'; +} + +function assertPatternsInput(patterns) { + if (!patterns.every(isString)) { + throw new TypeError('patterns must be a string or an array of strings'); + } +} + +function generateGlobTasks(patterns, opts) { + patterns = [].concat(patterns); + assertPatternsInput(patterns); + var globTasks = []; + opts = objectAssign({ + cache: Object.create(null), + statCache: Object.create(null), + realpathCache: Object.create(null), + symlinks: Object.create(null), + ignore: [] + }, opts); + patterns.forEach(function (pattern, i) { + if (isNegative(pattern)) { + return; + } + + var ignore = patterns.slice(i).filter(isNegative).map(function (pattern) { + return pattern.slice(1); + }); + globTasks.push({ + pattern: pattern, + opts: objectAssign({}, opts, { + ignore: opts.ignore.concat(ignore) + }) + }); + }); + return globTasks; +} + +var globby = function globby(patterns, opts) { + var globTasks; + + try { + globTasks = generateGlobTasks(patterns, opts); + } catch (err) { + return pinkiePromise.reject(err); + } + + return pinkiePromise.all(globTasks.map(function (task) { + return globP(task.pattern, task.opts); + })).then(function (paths) { + return arrayUnion.apply(null, paths); + }); +}; + +var sync = function sync(patterns, opts) { + var globTasks = generateGlobTasks(patterns, opts); + return globTasks.reduce(function (matches, task) { + return arrayUnion(matches, glob_1.sync(task.pattern, task.opts)); + }, []); +}; + +var generateGlobTasks_1 = generateGlobTasks; + +var hasMagic = function hasMagic(patterns, opts) { + return [].concat(patterns).some(function (pattern) { + return glob_1.hasMagic(pattern, opts); + }); +}; + +globby.sync = sync; +globby.generateGlobTasks = generateGlobTasks_1; +globby.hasMagic = hasMagic; + +var assert$2 = true; +var buffer_ieee754 = "< 0.9.7"; +var buffer = true; +var child_process = true; +var cluster = true; +var console$1 = true; +var constants = true; +var crypto = true; +var _debugger = "< 8"; +var dgram = true; +var dns = true; +var domain = true; +var events$1 = true; +var freelist = "< 6"; +var fs$2 = true; +var http = true; +var http2 = ">= 8.8"; +var https = true; +var _http_server = ">= 0.11"; +var _linklist = "< 8"; +var module$1 = true; +var net = true; +var os$1 = true; +var path$3 = true; +var perf_hooks = ">= 8.5"; +var process$1 = ">= 1"; +var punycode = true; +var querystring = true; +var readline = true; +var repl = true; +var stream = true; +var string_decoder = true; +var sys = true; +var timers = true; +var tls = true; +var tty = true; +var url = true; +var util$4 = true; +var v8 = ">= 1"; +var vm = true; +var zlib = true; +var core$3 = { + assert: assert$2, + buffer_ieee754: buffer_ieee754, + buffer: buffer, + child_process: child_process, + cluster: cluster, + console: console$1, + constants: constants, + crypto: crypto, + _debugger: _debugger, + dgram: dgram, + dns: dns, + domain: domain, + events: events$1, + freelist: freelist, + fs: fs$2, + http: http, + http2: http2, + https: https, + _http_server: _http_server, + _linklist: _linklist, + module: module$1, + net: net, + os: os$1, + path: path$3, + perf_hooks: perf_hooks, + process: process$1, + punycode: punycode, + querystring: querystring, + readline: readline, + repl: repl, + stream: stream, + string_decoder: string_decoder, + sys: sys, + timers: timers, + tls: tls, + tty: tty, + url: url, + util: util$4, + v8: v8, + vm: vm, + zlib: zlib +}; + +var core$4 = Object.freeze({ + assert: assert$2, + buffer_ieee754: buffer_ieee754, + buffer: buffer, + child_process: child_process, + cluster: cluster, + console: console$1, + constants: constants, + crypto: crypto, + _debugger: _debugger, + dgram: dgram, + dns: dns, + domain: domain, + events: events$1, + freelist: freelist, + fs: fs$2, + http: http, + http2: http2, + https: https, + _http_server: _http_server, + _linklist: _linklist, + module: module$1, + net: net, + os: os$1, + path: path$3, + perf_hooks: perf_hooks, + process: process$1, + punycode: punycode, + querystring: querystring, + readline: readline, + repl: repl, + stream: stream, + string_decoder: string_decoder, + sys: sys, + timers: timers, + tls: tls, + tty: tty, + url: url, + util: util$4, + v8: v8, + vm: vm, + zlib: zlib, + default: core$3 +}); + +var data = ( core$4 && core$3 ) || core$4; + +var current = process.versions && process.versions.node && process.versions.node.split('.') || []; + +function versionIncluded(specifier) { + if (specifier === true) { + return true; + } + + var parts = specifier.split(' '); + var op = parts[0]; + var versionParts = parts[1].split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = Number(current[i] || 0); + var ver = Number(versionParts[i] || 0); + + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + + if (op === '<') { + return cur < ver; + } else if (op === '>=') { + return cur >= ver; + } else { + return false; + } + } + + return false; +} + +var core$2 = {}; + +for (var mod in data) { + // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core$2[mod] = versionIncluded(data[mod]); + } +} + +var core_1 = core$2; + +var caller = function caller() { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + + Error.prepareStackTrace = function (_, stack) { + return stack; + }; + + var stack = new Error().stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; + +var pathParse = createCommonjsModule(function (module) { + 'use strict'; + + var isWindows = process.platform === 'win32'; // Regex to split a windows path into three parts: [*, device, slash, + // tail] windows-only + + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; // Regex to split the tail part of the above into [*, dir, basename, ext] + + var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; + var win32 = {}; // Function to split a filename into [root, dir, basename, ext] + + function win32SplitPath(filename) { + // Separate device+slash from tail + var result = splitDeviceRe.exec(filename), + device = (result[1] || '') + (result[2] || ''), + tail = result[3] || ''; // Split the tail into dir, basename and extension + + var result2 = splitTailRe.exec(tail), + dir = result2[1], + basename = result2[2], + ext = result2[3]; + return [device, dir, basename, ext]; + } + + win32.parse = function (pathString) { + if (typeof pathString !== 'string') { + throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString); + } + + var allParts = win32SplitPath(pathString); + + if (!allParts || allParts.length !== 4) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + return { + root: allParts[0], + dir: allParts[0] + allParts[1].slice(0, -1), + base: allParts[2], + ext: allParts[3], + name: allParts[2].slice(0, allParts[2].length - allParts[3].length) + }; + }; // Split a filename into [root, dir, basename, ext], unix version + // 'root' is just a slash, or nothing. + + + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + var posix = {}; + + function posixSplitPath(filename) { + return splitPathRe.exec(filename).slice(1); + } + + posix.parse = function (pathString) { + if (typeof pathString !== 'string') { + throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString); + } + + var allParts = posixSplitPath(pathString); + + if (!allParts || allParts.length !== 4) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + allParts[1] = allParts[1] || ''; + allParts[2] = allParts[2] || ''; + allParts[3] = allParts[3] || ''; + return { + root: allParts[0], + dir: allParts[0] + allParts[1].slice(0, -1), + base: allParts[2], + ext: allParts[3], + name: allParts[2].slice(0, allParts[2].length - allParts[3].length) + }; + }; + + if (isWindows) module.exports = win32.parse;else + /* posix */ + module.exports = posix.parse; + module.exports.posix = posix.parse; + module.exports.win32 = win32.parse; +}); + +var parse$4 = path.parse || pathParse; + +var nodeModulesPaths = function nodeModulesPaths(start, opts) { + var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules']; // ensure that `start` is an absolute path at this point, + // resolving against the process' current working directory + + var absoluteStart = path.resolve(start); + + if (opts && opts.preserveSymlinks === false) { + try { + absoluteStart = fs.realpathSync(absoluteStart); + } catch (err) { + if (err.code !== 'ENOENT') { + throw err; + } + } + } + + var prefix = '/'; + + if (/^([A-Za-z]:)/.test(absoluteStart)) { + prefix = ''; + } else if (/^\\\\/.test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse$4(absoluteStart); + + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse$4(parsed.dir); + } + + var dirs = paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.join(prefix, aPath, moduleDir); + })); + }, []); + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; + +var async = function resolve(x, options, callback) { + var cb = callback; + var opts = options || {}; + + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + var isFile = opts.isFile || function (file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + + var readFile = opts.readFile || fs.readFile; + var extensions = opts.extensions || ['.js']; + var y = opts.basedir || path.dirname(caller()); + opts.paths = opts.paths || []; + + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..' || x.slice(-1) === '/') res += '/'; + + if (/\/$/.test(x) && res === y) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else loadNodeModules(x, y, function (err, n, pkg) { + if (err) cb(err);else if (n) cb(null, n, pkg);else if (core_1[x]) return cb(null, x);else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + + function onfile(err, m, pkg) { + if (err) cb(err);else if (m) cb(null, m, pkg);else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err);else if (d) cb(null, d, pkg);else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + var pkg = loadPackage; + if (pkg) onpkg(null, pkg);else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load([''].concat(extensions.slice()), path.resolve(dir, r), pkg); + } + + isFile(file, onex); + } + + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + + if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) { + return cb(null); + } + + if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null); + var pkgfile = path.join(dir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + readFile(pkgfile, function (err, body) { + if (err) cb(err); + + try { + var pkg = JSON.parse(body); + } catch (jsonErr) {} + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + cb(null, pkg, dir); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + var pkgfile = path.join(x, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + readFile(pkgfile, function (err, body) { + if (err) return cb(err); + + try { + var pkg = JSON.parse(body); + } catch (jsonErr) {} + + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg.main) { + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + var file = path.join(dir, x); + loadAsFile(file, undefined, onfile); + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(path.join(dir, x), undefined, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + + function loadNodeModules(x, start, cb) { + processDirs(cb, nodeModulesPaths(start, opts)); + } +}; + +var sync$3 = function sync(x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + + var opts = options || {}; + + var isFile = opts.isFile || function (file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + + return stat.isFile() || stat.isFIFO(); + }; + + var readFileSync = opts.readFileSync || fs.readFileSync; + var extensions = opts.extensions || ['.js']; + var y = opts.basedir || path.dirname(caller()); + opts.paths = opts.paths || []; + + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return m; + } else { + var n = loadNodeModulesSync(x, y); + if (n) return n; + } + + if (core_1[x]) return x; + var err = new Error("Cannot find module '" + x + "' from '" + y + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + + if (isFile(file)) { + return file; + } + } + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(x, '/package.json'); + + if (isFile(pkgfile)) { + try { + var body = readFileSync(pkgfile, 'UTF8'); + var pkg = JSON.parse(body); + + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, x); + } + + if (pkg.main) { + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } + } catch (e) {} + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var dirs = nodeModulesPaths(start, opts); + + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(path.join(dir, '/', x)); + if (m) return m; + var n = loadAsDirectorySync(path.join(dir, '/', x)); + if (n) return n; + } + } +}; + +var resolve$1 = createCommonjsModule(function (module, exports) { + async.core = core_1; + + async.isCore = function isCore(x) { + return core_1[x]; + }; + + async.sync = sync$3; + exports = async; + module.exports = async; +}); + +var _require$$0$builders$1 = doc.builders; +var indent$3 = _require$$0$builders$1.indent; +var join$3 = _require$$0$builders$1.join; +var hardline$4 = _require$$0$builders$1.hardline; +var softline$2 = _require$$0$builders$1.softline; +var literalline$2 = _require$$0$builders$1.literalline; +var concat$5 = _require$$0$builders$1.concat; +var group$2 = _require$$0$builders$1.group; +var dedentToRoot$1 = _require$$0$builders$1.dedentToRoot; +var _require$$0$utils = doc.utils; +var mapDoc$2 = _require$$0$utils.mapDoc; +var stripTrailingHardline$1 = _require$$0$utils.stripTrailingHardline; + +function embed(path$$1, print, textToDoc +/*, options */ +) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + + switch (node.type) { + case "TemplateLiteral": + { + var isCss = [isStyledJsx, isStyledComponents, isCssProp, isAngularComponentStyles].some(function (isIt) { + return isIt(path$$1); + }); + + if (isCss) { + // Get full template literal with expressions replaced by placeholders + var rawQuasis = node.quasis.map(function (q) { + return q.value.raw; + }); + var placeholderID = 0; + var text = rawQuasis.reduce(function (prevVal, currVal, idx) { + return idx == 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal; + }, ""); + var doc$$2 = textToDoc(text, { + parser: "css" + }); + return transformCssDoc(doc$$2, path$$1, print); + } + /* + * react-relay and graphql-tag + * graphql`...` + * graphql.experimental`...` + * gql`...` + * + * This intentionally excludes Relay Classic tags, as Prettier does not + * support Relay Classic formatting. + */ + + + if (isGraphQL(path$$1)) { + var expressionDocs = node.expressions ? path$$1.map(print, "expressions") : []; + var numQuasis = node.quasis.length; + + if (numQuasis === 1 && node.quasis[0].value.raw.trim() === "") { + return "``"; + } + + var parts = []; + + for (var i = 0; i < numQuasis; i++) { + var templateElement = node.quasis[i]; + var isFirst = i === 0; + var isLast = i === numQuasis - 1; + var _text = templateElement.value.cooked; // Bail out if any of the quasis have an invalid escape sequence + // (which would make the `cooked` value be `null` or `undefined`) + + if (typeof _text !== "string") { + return null; + } + + var lines = _text.split("\n"); + + var numLines = lines.length; + var expressionDoc = expressionDocs[i]; + var startsWithBlankLine = numLines > 2 && lines[0].trim() === "" && lines[1].trim() === ""; + var endsWithBlankLine = numLines > 2 && lines[numLines - 1].trim() === "" && lines[numLines - 2].trim() === ""; + var commentsAndWhitespaceOnly = lines.every(function (line) { + return /^\s*(?:#[^\r\n]*)?$/.test(line); + }); // Bail out if an interpolation occurs within a comment. + + if (!isLast && /#[^\r\n]*$/.test(lines[numLines - 1])) { + return null; + } + + var _doc = null; + + if (commentsAndWhitespaceOnly) { + _doc = printGraphqlComments(lines); + } else { + _doc = stripTrailingHardline$1(textToDoc(_text, { + parser: "graphql" + })); + } + + if (_doc) { + _doc = escapeTemplateCharacters(_doc, false); + + if (!isFirst && startsWithBlankLine) { + parts.push(""); + } + + parts.push(_doc); + + if (!isLast && endsWithBlankLine) { + parts.push(""); + } + } else if (!isFirst && !isLast && startsWithBlankLine) { + parts.push(""); + } + + if (expressionDoc) { + parts.push(concat$5(["${", expressionDoc, "}"])); + } + } + + return concat$5(["`", indent$3(concat$5([hardline$4, join$3(hardline$4, parts)])), hardline$4, "`"]); + } + + if (isHtml(path$$1)) { + return printHtmlTemplateLiteral(path$$1, print, textToDoc, "html"); + } + + if (isAngularComponentTemplate(path$$1)) { + return printHtmlTemplateLiteral(path$$1, print, textToDoc, "angular"); + } + + break; + } + + case "TemplateElement": + { + /** + * md`...` + * markdown`...` + */ + if (parentParent && parentParent.type === "TaggedTemplateExpression" && parent.quasis.length === 1 && parentParent.tag.type === "Identifier" && (parentParent.tag.name === "md" || parentParent.tag.name === "markdown")) { + var _text2 = parent.quasis[0].value.raw.replace(/((?:\\\\)*)\\`/g, function (_, backslashes) { + return "\\".repeat(backslashes.length / 2) + "`"; + }); + + var indentation = getIndentation(_text2); + var hasIndent = indentation !== ""; + return concat$5([hasIndent ? indent$3(concat$5([softline$2, printMarkdown(_text2.replace(new RegExp(`^${indentation}`, "gm"), ""))])) : concat$5([literalline$2, dedentToRoot$1(printMarkdown(_text2))]), softline$2]); + } + + break; + } + } + + function printMarkdown(text) { + var doc$$2 = textToDoc(text, { + parser: "markdown", + __inJsTemplate: true + }); + return stripTrailingHardline$1(escapeTemplateCharacters(doc$$2, true)); + } +} + +function getIndentation(str) { + var firstMatchedIndent = str.match(/^([^\S\n]*)\S/m); + return firstMatchedIndent === null ? "" : firstMatchedIndent[1]; +} + +function escapeTemplateCharacters(doc$$2, raw) { + return mapDoc$2(doc$$2, function (currentDoc) { + if (!currentDoc.parts) { + return currentDoc; + } + + var parts = []; + currentDoc.parts.forEach(function (part) { + if (typeof part === "string") { + parts.push(raw ? part.replace(/(\\*)`/g, "$1$1\\`") : part.replace(/([\\`]|\$\{)/g, "\\$1")); + } else { + parts.push(part); + } + }); + return Object.assign({}, currentDoc, { + parts + }); + }); +} + +function transformCssDoc(quasisDoc, path$$1, print) { + var parentNode = path$$1.getValue(); + var isEmpty = parentNode.quasis.length === 1 && !parentNode.quasis[0].value.raw.trim(); + + if (isEmpty) { + return "``"; + } + + var expressionDocs = parentNode.expressions ? path$$1.map(print, "expressions") : []; + var newDoc = replacePlaceholders(quasisDoc, expressionDocs); + /* istanbul ignore if */ + + if (!newDoc) { + throw new Error("Couldn't insert all the expressions"); + } + + return concat$5(["`", indent$3(concat$5([hardline$4, stripTrailingHardline$1(newDoc)])), softline$2, "`"]); +} // Search all the placeholders in the quasisDoc tree +// and replace them with the expression docs one by one +// returns a new doc with all the placeholders replaced, +// or null if it couldn't replace any expression + + +function replacePlaceholders(quasisDoc, expressionDocs) { + if (!expressionDocs || !expressionDocs.length) { + return quasisDoc; + } + + var expressions = expressionDocs.slice(); + var replaceCounter = 0; + var newDoc = mapDoc$2(quasisDoc, function (doc$$2) { + if (!doc$$2 || !doc$$2.parts || !doc$$2.parts.length) { + return doc$$2; + } + + var parts = doc$$2.parts; + var atIndex = parts.indexOf("@"); + var placeholderIndex = atIndex + 1; + + if (atIndex > -1 && typeof parts[placeholderIndex] === "string" && parts[placeholderIndex].startsWith("prettier-placeholder")) { + // If placeholder is split, join it + var at = parts[atIndex]; + var placeholder = parts[placeholderIndex]; + var rest = parts.slice(placeholderIndex + 1); + parts = parts.slice(0, atIndex).concat([at + placeholder]).concat(rest); + } + + var atPlaceholderIndex = parts.findIndex(function (part) { + return typeof part === "string" && part.startsWith("@prettier-placeholder"); + }); + + if (atPlaceholderIndex > -1) { + var _placeholder = parts[atPlaceholderIndex]; + + var _rest = parts.slice(atPlaceholderIndex + 1); + + var placeholderMatch = _placeholder.match(/@prettier-placeholder-(.+)-id([\s\S]*)/); + + var placeholderID = placeholderMatch[1]; // When the expression has a suffix appended, like: + // animation: linear ${time}s ease-out; + + var suffix = placeholderMatch[2]; + var expression = expressions[placeholderID]; + replaceCounter++; + parts = parts.slice(0, atPlaceholderIndex).concat(["${", expression, "}" + suffix]).concat(_rest); + } + + return Object.assign({}, doc$$2, { + parts: parts + }); + }); + return expressions.length === replaceCounter ? newDoc : null; +} + +function printGraphqlComments(lines) { + var parts = []; + var seenComment = false; + lines.map(function (textLine) { + return textLine.trim(); + }).forEach(function (textLine, i, array) { + // Lines are either whitespace only, or a comment (with poential whitespace + // around it). Drop whitespace-only lines. + if (textLine === "") { + return; + } + + if (array[i - 1] === "" && seenComment) { + // If a non-first comment is preceded by a blank (whitespace only) line, + // add in a blank line. + parts.push(concat$5([hardline$4, textLine])); + } else { + parts.push(textLine); + } + + seenComment = true; + }); // If `lines` was whitespace only, return `null`. + + return parts.length === 0 ? null : join$3(hardline$4, parts); +} +/** + * Template literal in this context: + * + */ + + +function isStyledJsx(path$$1) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + return parentParent && node.quasis && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXElement" && parentParent.openingElement.name.name === "style" && parentParent.openingElement.attributes.some(function (attribute) { + return attribute.name.name === "jsx"; + }); +} +/** + * Angular Components can have: + * - Inline HTML template + * - Inline CSS styles + * + * ...which are both within template literals somewhere + * inside of the Component decorator factory. + * + * E.g. + * @Component({ + * template: `
...
`, + * styles: [`h1 { color: blue; }`] + * }) + */ + + +function isAngularComponentStyles(path$$1) { + return isPathMatch(path$$1, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "ArrayExpression" && name === "elements"; + }, function (node, name) { + return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "styles" && name === "value"; + }].concat(getAngularComponentObjectExpressionPredicates())); +} + +function isAngularComponentTemplate(path$$1) { + return isPathMatch(path$$1, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "template" && name === "value"; + }].concat(getAngularComponentObjectExpressionPredicates())); +} + +function getAngularComponentObjectExpressionPredicates() { + return [function (node, name) { + return node.type === "ObjectExpression" && name === "properties"; + }, function (node, name) { + return node.type === "CallExpression" && node.callee.type === "Identifier" && node.callee.name === "Component" && name === "arguments"; + }, function (node, name) { + return node.type === "Decorator" && name === "expression"; + }]; +} +/** + * styled-components template literals + */ + + +function isStyledComponents(path$$1) { + var parent = path$$1.getParentNode(); + + if (!parent || parent.type !== "TaggedTemplateExpression") { + return false; + } + + var tag = parent.tag; + + switch (tag.type) { + case "MemberExpression": + return (// styled.foo`` + isStyledIdentifier(tag.object) || // Component.extend`` + isStyledExtend(tag) + ); + + case "CallExpression": + return (// styled(Component)`` + isStyledIdentifier(tag.callee) || tag.callee.type === "MemberExpression" && (tag.callee.object.type === "MemberExpression" && ( // styled.foo.attr({})`` + isStyledIdentifier(tag.callee.object.object) || // Component.extend.attr({)`` + isStyledExtend(tag.callee.object)) || // styled(Component).attr({})`` + tag.callee.object.type === "CallExpression" && isStyledIdentifier(tag.callee.object.callee)) + ); + + case "Identifier": + // css`` + return tag.name === "css"; + + default: + return false; + } +} +/** + * JSX element with CSS prop + */ + + +function isCssProp(path$$1) { + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + return parentParent && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" && parentParent.name.type === "JSXIdentifier" && parentParent.name.name === "css"; +} + +function isStyledIdentifier(node) { + return node.type === "Identifier" && node.name === "styled"; +} + +function isStyledExtend(node) { + return /^[A-Z]/.test(node.object.name) && node.property.name === "extend"; +} +/* + * react-relay and graphql-tag + * graphql`...` + * graphql.experimental`...` + * gql`...` + * GraphQL comment block + * + * This intentionally excludes Relay Classic tags, as Prettier does not + * support Relay Classic formatting. + */ + + +function isGraphQL(path$$1) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + return hasLanguageComment(node, "GraphQL") || parent && (parent.type === "TaggedTemplateExpression" && (parent.tag.type === "MemberExpression" && parent.tag.object.name === "graphql" && parent.tag.property.name === "experimental" || parent.tag.type === "Identifier" && (parent.tag.name === "gql" || parent.tag.name === "graphql")) || parent.type === "CallExpression" && parent.callee.type === "Identifier" && parent.callee.name === "graphql"); +} + +function hasLanguageComment(node, languageName) { + // This checks for a leading comment that is exactly `/* GraphQL */` + // In order to be in line with other implementations of this comment tag + // we will not trim the comment value and we will expect exactly one space on + // either side of the GraphQL string + // Also see ./clean.js + return node.leadingComments && node.leadingComments.some(function (comment) { + return comment.type === "CommentBlock" && comment.value === ` ${languageName} `; + }); +} + +function isPathMatch(path$$1, predicateStack) { + var stack = path$$1.stack.slice(); + var name = null; + var node = stack.pop(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = predicateStack[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var predicate = _step.value; + + if (node === undefined) { + return false; + } // skip index/array + + + if (typeof name === "number") { + name = stack.pop(); + node = stack.pop(); + } + + if (!predicate(node, name)) { + return false; + } + + name = stack.pop(); + node = stack.pop(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return true; +} +/** + * - html`...` + * - HTML comment block + */ + + +function isHtml(path$$1) { + var node = path$$1.getValue(); + return hasLanguageComment(node, "HTML") || isPathMatch(path$$1, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "TaggedTemplateExpression" && node.tag.type === "Identifier" && node.tag.name === "html" && name === "quasi"; + }]); +} + +function printHtmlTemplateLiteral(path$$1, print, textToDoc, parser) { + var node = path$$1.getValue(); + var placeholderPattern = "prettierhtmlplaceholder(\\d+)redlohecalplmthreitterp"; + var placeholders = node.expressions.map(function (_, i) { + return `prettierhtmlplaceholder${i}redlohecalplmthreitterp`; + }); + var text = node.quasis.map(function (quasi, index, quasis) { + return index === quasis.length - 1 ? quasi.value.raw : quasi.value.raw + placeholders[index]; + }).join(""); + var expressionDocs = path$$1.map(print, "expressions"); + + if (expressionDocs.length === 0 && text.trim().length === 0) { + return "``"; + } + + var contentDoc = mapDoc$2(stripTrailingHardline$1(textToDoc(text, { + parser + })), function (doc$$2) { + var placeholderRegex = new RegExp(placeholderPattern, "g"); + var hasPlaceholder = typeof doc$$2 === "string" && placeholderRegex.test(doc$$2); + + if (!hasPlaceholder) { + return doc$$2; + } + + var parts = []; + var components = doc$$2.split(placeholderRegex); + + for (var i = 0; i < components.length; i++) { + var component = components[i]; + + if (i % 2 === 0) { + if (component) { + parts.push(component); + } + + continue; + } + + var placeholderIndex = +component; + parts.push(concat$5(["${", group$2(concat$5([indent$3(concat$5([softline$2, expressionDocs[placeholderIndex]])), softline$2])), "}"])); + } + + return concat$5(parts); + }); + return group$2(concat$5(["`", indent$3(concat$5([hardline$4, group$2(contentDoc)])), softline$2, "`"])); +} + +var embed_1 = embed; + +function clean(ast, newObj, parent) { + ["range", "raw", "comments", "leadingComments", "trailingComments", "extra", "start", "end", "flags"].forEach(function (name) { + delete newObj[name]; + }); + + if (ast.type === "BigIntLiteral") { + newObj.value = newObj.value.toLowerCase(); + } // We remove extra `;` and add them when needed + + + if (ast.type === "EmptyStatement") { + return null; + } // We move text around, including whitespaces and add {" "} + + + if (ast.type === "JSXText") { + return null; + } + + if (ast.type === "JSXExpressionContainer" && ast.expression.type === "Literal" && ast.expression.value === " ") { + return null; + } // (TypeScript) Ignore `static` in `constructor(static p) {}` + // and `export` in `constructor(export p) {}` + + + if (ast.type === "TSParameterProperty" && ast.accessibility === null && !ast.readonly) { + return { + type: "Identifier", + name: ast.parameter.name, + typeAnnotation: newObj.parameter.typeAnnotation, + decorators: newObj.decorators + }; + } // (TypeScript) ignore empty `specifiers` array + + + if (ast.type === "TSNamespaceExportDeclaration" && ast.specifiers && ast.specifiers.length === 0) { + delete newObj.specifiers; + } // (TypeScript) bypass TSParenthesizedType + + + if (ast.type === "TSParenthesizedType" && ast.typeAnnotation.type === "TSTypeAnnotation") { + return newObj.typeAnnotation.typeAnnotation; + } // We convert
to
+ + + if (ast.type === "JSXOpeningElement") { + delete newObj.selfClosing; + } + + if (ast.type === "JSXElement") { + delete newObj.closingElement; + } // We change {'key': value} into {key: value} + + + if ((ast.type === "Property" || ast.type === "ObjectProperty" || ast.type === "MethodDefinition" || ast.type === "ClassProperty" || ast.type === "TSPropertySignature" || ast.type === "ObjectTypeProperty") && typeof ast.key === "object" && ast.key && (ast.key.type === "Literal" || ast.key.type === "StringLiteral" || ast.key.type === "Identifier")) { + delete newObj.key; + } + + if (ast.type === "OptionalMemberExpression" && ast.optional === false) { + newObj.type = "MemberExpression"; + delete newObj.optional; + } // Remove raw and cooked values from TemplateElement when it's CSS + // styled-jsx + + + if (ast.type === "JSXElement" && ast.openingElement.name.name === "style" && ast.openingElement.attributes.some(function (attr) { + return attr.name.name === "jsx"; + })) { + var templateLiterals = newObj.children.filter(function (child) { + return child.type === "JSXExpressionContainer" && child.expression.type === "TemplateLiteral"; + }).map(function (container) { + return container.expression; + }); + var quasis = templateLiterals.reduce(function (quasis, templateLiteral) { + return quasis.concat(templateLiteral.quasis); + }, []); + quasis.forEach(function (q) { + return delete q.value; + }); + } // CSS template literals in css prop + + + if (ast.type === "JSXAttribute" && ast.name.name === "css" && ast.value.type === "JSXExpressionContainer" && ast.value.expression.type === "TemplateLiteral") { + newObj.value.expression.quasis.forEach(function (q) { + return delete q.value; + }); + } // Angular Components: Inline HTML template and Inline CSS styles + + + var expression = ast.expression || ast.callee; + + if (ast.type === "Decorator" && expression.type === "CallExpression" && expression.callee.name === "Component" && expression.arguments.length === 1) { + var astProps = ast.expression.arguments[0].properties; + newObj.expression.arguments[0].properties.forEach(function (prop, index) { + var templateLiteral = null; + + switch (astProps[index].key.name) { + case "styles": + if (prop.value.type === "ArrayExpression") { + templateLiteral = prop.value.elements[0]; + } + + break; + + case "template": + if (prop.value.type === "TemplateLiteral") { + templateLiteral = prop.value; + } + + break; + } + + if (templateLiteral) { + templateLiteral.quasis.forEach(function (q) { + return delete q.value; + }); + } + }); + } // styled-components, graphql, markdown + + + if (ast.type === "TaggedTemplateExpression" && (ast.tag.type === "MemberExpression" || ast.tag.type === "Identifier" && (ast.tag.name === "gql" || ast.tag.name === "graphql" || ast.tag.name === "css" || ast.tag.name === "md" || ast.tag.name === "markdown" || ast.tag.name === "html") || ast.tag.type === "CallExpression")) { + newObj.quasi.quasis.forEach(function (quasi) { + return delete quasi.value; + }); + } + + if (ast.type === "TemplateLiteral") { + // This checks for a leading comment that is exactly `/* GraphQL */` + // In order to be in line with other implementations of this comment tag + // we will not trim the comment value and we will expect exactly one space on + // either side of the GraphQL string + // Also see ./embed.js + var hasLanguageComment = ast.leadingComments && ast.leadingComments.some(function (comment) { + return comment.type === "CommentBlock" && ["GraphQL", "HTML"].some(function (languageName) { + return comment.value === ` ${languageName} `; + }); + }); + + if (hasLanguageComment || parent.type === "CallExpression" && parent.callee.name === "graphql") { + newObj.quasis.forEach(function (quasi) { + return delete quasi.value; + }); + } + } +} + +var clean_1 = clean; + +var detectNewline = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + var newlines = str.match(/(?:\r?\n)/g) || []; + + if (newlines.length === 0) { + return null; + } + + var crlf = newlines.filter(function (el) { + return el === '\r\n'; + }).length; + var lf = newlines.length - crlf; + return crlf > lf ? '\r\n' : '\n'; + }; + + module.exports.graceful = function (str) { + return module.exports(str) || '\n'; + }; +}); + +var build$1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports.extract = extract; + exports.strip = strip; + exports.parse = parse; + exports.parseWithComments = parseWithComments; + exports.print = print; + + var _detectNewline; + + function _load_detectNewline() { + return _detectNewline = _interopRequireDefault(detectNewline); + } + + var _os; + + function _load_os() { + return _os = os; + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + /** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + + + var commentEndRe = /\*\/$/; + var commentStartRe = /^\/\*\*/; + var docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/; + var lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g; + var ltrimNewlineRe = /^(\r?\n)+/; + var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g; + var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; + var stringStartRe = /(\r?\n|^) *\* ?/g; + + function extract(contents) { + var match = contents.match(docblockRe); + return match ? match[0].trimLeft() : ''; + } + + function strip(contents) { + var match = contents.match(docblockRe); + return match && match[0] ? contents.substring(match[0].length) : contents; + } + + function parse(docblock) { + return parseWithComments(docblock).pragmas; + } + + function parseWithComments(docblock) { + var line = (0, (_detectNewline || _load_detectNewline()).default)(docblock) || (_os || _load_os()).EOL; + + docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives + + var prev = ''; + + while (prev !== docblock) { + prev = docblock; + docblock = docblock.replace(multilineRe, `${line}$1 $2${line}`); + } + + docblock = docblock.replace(ltrimNewlineRe, '').trimRight(); + var result = Object.create(null); + var comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').trimRight(); + var match; + + while (match = propertyRe.exec(docblock)) { + // strip linecomments from pragmas + var nextPragma = match[2].replace(lineCommentRe, ''); + + if (typeof result[match[1]] === 'string' || Array.isArray(result[match[1]])) { + result[match[1]] = [].concat(result[match[1]], nextPragma); + } else { + result[match[1]] = nextPragma; + } + } + + return { + comments, + pragmas: result + }; + } + + function print(_ref) { + var _ref$comments = _ref.comments; + var comments = _ref$comments === undefined ? '' : _ref$comments; + var _ref$pragmas = _ref.pragmas; + var pragmas = _ref$pragmas === undefined ? {} : _ref$pragmas; + + var line = (0, (_detectNewline || _load_detectNewline()).default)(comments) || (_os || _load_os()).EOL; + + var head = '/**'; + var start = ' *'; + var tail = ' */'; + var keys = Object.keys(pragmas); + var printedObject = keys.map(function (key) { + return printKeyValues(key, pragmas[key]); + }).reduce(function (arr, next) { + return arr.concat(next); + }, []).map(function (keyValue) { + return start + ' ' + keyValue + line; + }).join(''); + + if (!comments) { + if (keys.length === 0) { + return ''; + } + + if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) { + var value = pragmas[keys[0]]; + return `${head} ${printKeyValues(keys[0], value)[0]}${tail}`; + } + } + + var printedComments = comments.split(line).map(function (textLine) { + return `${start} ${textLine}`; + }).join(line) + line; + return head + line + (comments ? printedComments : '') + (comments && keys.length ? start + line : '') + printedObject + tail; + } + + function printKeyValues(key, valueOrArray) { + return [].concat(valueOrArray).map(function (value) { + return `@${key} ${value}`.trim(); + }); + } +}); +unwrapExports(build$1); + +function hasPragma(text) { + var pragmas = Object.keys(build$1.parse(build$1.extract(text))); + return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1; +} + +function insertPragma$1(text) { + var parsedDocblock = build$1.parseWithComments(build$1.extract(text)); + var pragmas = Object.assign({ + format: "" + }, parsedDocblock.pragmas); + var newDocblock = build$1.print({ + pragmas, + comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines + + }).replace(/(\r\n|\r)/g, "\n"); // normalise newlines (mitigate use of os.EOL by jest-docblock) + + var strippedText = build$1.strip(text); + var separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n"; + return newDocblock + separatingNewlines + strippedText; +} + +var pragma = { + hasPragma, + insertPragma: insertPragma$1 +}; + +var addLeadingComment$2 = utilShared.addLeadingComment; +var addTrailingComment$2 = utilShared.addTrailingComment; +var addDanglingComment$2 = utilShared.addDanglingComment; + +function handleOwnLineComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleMemberExpressionComments(enclosingNode, followingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleImportSpecifierComments(enclosingNode, comment) || handleForComments(enclosingNode, precedingNode, comment) || handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) || handleAssignmentPatternComments(enclosingNode, comment) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options)) { + return true; + } + + return false; +} + +function handleEndOfLineComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) || handleImportSpecifierComments(enclosingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleLabeledStatementComments(enclosingNode, comment) || handleCallExpressionComments(precedingNode, enclosingNode, comment) || handlePropertyComments(enclosingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleTypeAliasComments(enclosingNode, followingNode, comment) || handleVariableDeclaratorComments(enclosingNode, followingNode, comment)) { + return true; + } + + return false; +} + +function handleRemainingComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) || handleCommentInEmptyParens(text, enclosingNode, comment, options) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleCommentAfterArrowParams(text, enclosingNode, comment, options) || handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) || handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) || handleBreakAndContinueStatementComments(enclosingNode, comment)) { + return true; + } + + return false; +} + +function addBlockStatementFirstComment(node, comment) { + var body = node.body.filter(function (n) { + return n.type !== "EmptyStatement"; + }); + + if (body.length === 0) { + addDanglingComment$2(node, comment); + } else { + addLeadingComment$2(body[0], comment); + } +} + +function addBlockOrNotComment(node, comment) { + if (node.type === "BlockStatement") { + addBlockStatementFirstComment(node, comment); + } else { + addLeadingComment$2(node, comment); + } +} // There are often comments before the else clause of if statements like +// +// if (1) { ... } +// // comment +// else { ... } +// +// They are being attached as leading comments of the BlockExpression which +// is not well printed. What we want is to instead move the comment inside +// of the block and make it leadingComment of the first element of the block +// or dangling comment of the block if there is nothing inside +// +// if (1) { ... } +// else { +// // comment +// ... +// } + + +function handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + if (!enclosingNode || enclosingNode.type !== "IfStatement" || !followingNode) { + return false; + } // We unfortunately have no way using the AST or location of nodes to know + // if the comment is positioned before the condition parenthesis: + // if (a /* comment */) {} + // The only workaround I found is to look at the next character to see if + // it is a ). + + + var nextCharacter = util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd); + + if (nextCharacter === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Comments before `else`: + // - treat as trailing comments of the consequent, if it's a BlockStatement + // - treat as a dangling comment otherwise + + + if (precedingNode === enclosingNode.consequent && followingNode === enclosingNode.alternate) { + if (precedingNode.type === "BlockStatement") { + addTrailingComment$2(precedingNode, comment); + } else { + addDanglingComment$2(enclosingNode, comment); + } + + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + if (followingNode.type === "IfStatement") { + addBlockOrNotComment(followingNode.consequent, comment); + return true; + } // For comments positioned after the condition parenthesis in an if statement + // before the consequent without brackets on, such as + // if (a) /* comment */ true, + // we look at the next character to see if the following node + // is the consequent for the if statement + + + if (enclosingNode.consequent === followingNode) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + if (!enclosingNode || enclosingNode.type !== "WhileStatement" || !followingNode) { + return false; + } // We unfortunately have no way using the AST or location of nodes to know + // if the comment is positioned before the condition parenthesis: + // while (a /* comment */) {} + // The only workaround I found is to look at the next character to see if + // it is a ). + + + var nextCharacter = util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd); + + if (nextCharacter === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + return false; +} // Same as IfStatement but for TryStatement + + +function handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) { + if (!enclosingNode || enclosingNode.type !== "TryStatement" && enclosingNode.type !== "CatchClause" || !followingNode) { + return false; + } + + if (enclosingNode.type === "CatchClause" && precedingNode) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + if (followingNode.type === "TryStatement") { + addBlockOrNotComment(followingNode.finalizer, comment); + return true; + } + + if (followingNode.type === "CatchClause") { + addBlockOrNotComment(followingNode.body, comment); + return true; + } + + return false; +} + +function handleMemberExpressionComments(enclosingNode, followingNode, comment) { + if (enclosingNode && enclosingNode.type === "MemberExpression" && followingNode && followingNode.type === "Identifier") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) { + var isSameLineAsPrecedingNode = precedingNode && !util$1.hasNewlineInRange(text, options.locEnd(precedingNode), options.locStart(comment)); + + if ((!precedingNode || !isSameLineAsPrecedingNode) && enclosingNode && enclosingNode.type === "ConditionalExpression" && followingNode) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ObjectProperty" || enclosingNode.type === "Property") && enclosingNode.shorthand && enclosingNode.key === precedingNode && enclosingNode.value.type === "AssignmentPattern") { + addTrailingComment$2(enclosingNode.value.left, comment); + return true; + } + + return false; +} + +function handleClassComments(enclosingNode, precedingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ClassDeclaration" || enclosingNode.type === "ClassExpression") && enclosingNode.decorators && enclosingNode.decorators.length > 0 && !(followingNode && followingNode.type === "Decorator")) { + if (!enclosingNode.decorators || enclosingNode.decorators.length === 0) { + addLeadingComment$2(enclosingNode, comment); + } else { + addTrailingComment$2(enclosingNode.decorators[enclosingNode.decorators.length - 1], comment); + } + + return true; + } + + return false; +} + +function handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) { + // This is only needed for estree parsers (flow, typescript) to attach + // after a method name: + // obj = { fn /*comment*/() {} }; + if (enclosingNode && precedingNode && (enclosingNode.type === "Property" || enclosingNode.type === "MethodDefinition") && precedingNode.type === "Identifier" && enclosingNode.key === precedingNode && // special Property case: { key: /*comment*/(value) }; + // comment should be attached to value instead of key + util$1.getNextNonSpaceNonCommentCharacter(text, precedingNode, options.locEnd) !== ":") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Print comments between decorators and class methods as a trailing comment + // on the decorator node instead of the method node + + + if (precedingNode && enclosingNode && precedingNode.type === "Decorator" && (enclosingNode.type === "ClassMethod" || enclosingNode.type === "ClassProperty" || enclosingNode.type === "TSAbstractClassProperty" || enclosingNode.type === "TSAbstractMethodDefinition" || enclosingNode.type === "MethodDefinition")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) { + if (util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== "(") { + return false; + } + + if (precedingNode && enclosingNode && (enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ClassMethod" || enclosingNode.type === "MethodDefinition" || enclosingNode.type === "ObjectMethod")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleCommentAfterArrowParams(text, enclosingNode, comment, options) { + if (!(enclosingNode && enclosingNode.type === "ArrowFunctionExpression")) { + return false; + } + + var index = utilShared.getNextNonSpaceNonCommentCharacterIndex(text, comment, options); + + if (text.substr(index, 2) === "=>") { + addDanglingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleCommentInEmptyParens(text, enclosingNode, comment, options) { + if (util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== ")") { + return false; + } // Only add dangling comments to fix the case when no params are present, + // i.e. a function without any argument. + + + if (enclosingNode && ((enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ArrowFunctionExpression" && (enclosingNode.body.type !== "CallExpression" || enclosingNode.body.arguments.length === 0) || enclosingNode.type === "ClassMethod" || enclosingNode.type === "ObjectMethod") && enclosingNode.params.length === 0 || (enclosingNode.type === "CallExpression" || enclosingNode.type === "NewExpression") && enclosingNode.arguments.length === 0)) { + addDanglingComment$2(enclosingNode, comment); + return true; + } + + if (enclosingNode && enclosingNode.type === "MethodDefinition" && enclosingNode.value.params.length === 0) { + addDanglingComment$2(enclosingNode.value, comment); + return true; + } + + return false; +} + +function handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + // Type definitions functions + if (precedingNode && precedingNode.type === "FunctionTypeParam" && enclosingNode && enclosingNode.type === "FunctionTypeAnnotation" && followingNode && followingNode.type !== "FunctionTypeParam") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Real functions + + + if (precedingNode && (precedingNode.type === "Identifier" || precedingNode.type === "AssignmentPattern") && enclosingNode && (enclosingNode.type === "ArrowFunctionExpression" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "ObjectMethod" || enclosingNode.type === "ClassMethod") && util$1.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (enclosingNode && enclosingNode.type === "FunctionDeclaration" && followingNode && followingNode.type === "BlockStatement") { + var functionParamRightParenIndex = function () { + if (enclosingNode.params.length !== 0) { + return util$1.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(util$1.getLast(enclosingNode.params))); + } + + var functionParamLeftParenIndex = util$1.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(enclosingNode.id)); + return util$1.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, functionParamLeftParenIndex + 1); + }(); + + if (options.locStart(comment) > functionParamRightParenIndex) { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + } + + return false; +} + +function handleImportSpecifierComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "ImportSpecifier") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleLabeledStatementComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "LabeledStatement") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleBreakAndContinueStatementComments(enclosingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ContinueStatement" || enclosingNode.type === "BreakStatement") && !enclosingNode.label) { + addTrailingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleCallExpressionComments(precedingNode, enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "CallExpression" && precedingNode && enclosingNode.callee === precedingNode && enclosingNode.arguments.length > 0) { + addLeadingComment$2(enclosingNode.arguments[0], comment); + return true; + } + + return false; +} + +function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handlePropertyComments(enclosingNode, comment) { + if (enclosingNode && (enclosingNode.type === "Property" || enclosingNode.type === "ObjectProperty")) { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleOnlyComments(enclosingNode, ast, comment, isLastComment) { + // With Flow the enclosingNode is undefined so use the AST instead. + if (ast && ast.body && ast.body.length === 0) { + if (isLastComment) { + addDanglingComment$2(ast, comment); + } else { + addLeadingComment$2(ast, comment); + } + + return true; + } else if (enclosingNode && enclosingNode.type === "Program" && enclosingNode.body.length === 0 && enclosingNode.directives && enclosingNode.directives.length === 0) { + if (isLastComment) { + addDanglingComment$2(enclosingNode, comment); + } else { + addLeadingComment$2(enclosingNode, comment); + } + + return true; + } + + return false; +} + +function handleForComments(enclosingNode, precedingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ForInStatement" || enclosingNode.type === "ForOfStatement")) { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) { + if (precedingNode && precedingNode.type === "ImportSpecifier" && enclosingNode && enclosingNode.type === "ImportDeclaration" && util$1.hasNewline(text, options.locEnd(comment))) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleAssignmentPatternComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "AssignmentPattern") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleTypeAliasComments(enclosingNode, followingNode, comment) { + if (enclosingNode && enclosingNode.type === "TypeAlias") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleVariableDeclaratorComments(enclosingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "VariableDeclarator" || enclosingNode.type === "AssignmentExpression") && followingNode && (followingNode.type === "ObjectExpression" || followingNode.type === "ArrayExpression" || followingNode.type === "TemplateLiteral" || followingNode.type === "TaggedTemplateExpression")) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) { + if (!enclosingNode || enclosingNode.type !== "TSMappedType") { + return false; + } + + if (followingNode && followingNode.type === "TSTypeParameter" && followingNode.name) { + addLeadingComment$2(followingNode.name, comment); + return true; + } + + if (precedingNode && precedingNode.type === "TSTypeParameter" && precedingNode.constraint) { + addTrailingComment$2(precedingNode.constraint, comment); + return true; + } + + return false; +} + +function isBlockComment(comment) { + return comment.type === "Block" || comment.type === "CommentBlock"; +} + +var comments$3 = { + handleOwnLineComment, + handleEndOfLineComment, + handleRemainingComment, + isBlockComment +}; + +// Flow annotation comments cannot be split across lines. For example: +// +// (this /* +// : any */).foo = 5; +// +// is not picked up by Flow (see https://github.com/facebook/flow/issues/7050), so +// removing the newline would create a type annotation that the user did not intend +// to create. + +var NON_LINE_TERMINATING_WHITE_SPACE = "(?:(?=.)\\s)"; +var FLOW_SHORTHAND_ANNOTATION = new RegExp(`^${NON_LINE_TERMINATING_WHITE_SPACE}*:`); +var FLOW_ANNOTATION = new RegExp(`^${NON_LINE_TERMINATING_WHITE_SPACE}*::`); + +function hasFlowShorthandAnnotationComment$2(node) { + // https://flow.org/en/docs/types/comments/ + // Syntax example: const r = new (window.Request /*: Class */)(""); + return node.extra && node.extra.parenthesized && node.trailingComments && node.trailingComments[0].value.match(FLOW_SHORTHAND_ANNOTATION); +} + +function hasFlowAnnotationComment$1(comments) { + return comments && comments[0].value.match(FLOW_ANNOTATION); +} + +function hasNode$1(node, fn) { + if (!node || typeof node !== "object") { + return false; + } + + if (Array.isArray(node)) { + return node.some(function (value) { + return hasNode$1(value, fn); + }); + } + + var result = fn(node); + return typeof result === "boolean" ? result : Object.keys(node).some(function (key) { + return hasNode$1(node[key], fn); + }); +} + +var utils$4 = { + hasNode: hasNode$1, + hasFlowShorthandAnnotationComment: hasFlowShorthandAnnotationComment$2, + hasFlowAnnotationComment: hasFlowAnnotationComment$1 +}; + +var hasFlowShorthandAnnotationComment$1 = utils$4.hasFlowShorthandAnnotationComment; + +function hasClosureCompilerTypeCastComment(text, path$$1, locStart, locEnd) { + // https://github.com/google/closure-compiler/wiki/Annotating-Types#type-casts + // Syntax example: var x = /** @type {string} */ (fruit); + var n = path$$1.getValue(); + return util$1.getNextNonSpaceNonCommentCharacter(text, n, locEnd) === ")" && (hasTypeCastComment(n) || hasAncestorTypeCastComment(0)); // for sub-item: /** @type {array} */ (numberOrString).map(x => x); + + function hasAncestorTypeCastComment(index) { + var ancestor = path$$1.getParentNode(index); + return ancestor && util$1.getNextNonSpaceNonCommentCharacter(text, ancestor, locEnd) !== ")" && /^[\s(]*$/.test(text.slice(locStart(ancestor), locStart(n))) ? hasTypeCastComment(ancestor) || hasAncestorTypeCastComment(index + 1) : false; + } + + function hasTypeCastComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.leading && comments$3.isBlockComment(comment) && comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/) && util$1.getNextNonSpaceNonCommentCharacter(text, comment, locEnd) === "("; + }); + } +} + +function needsParens(path$$1, options) { + var parent = path$$1.getParentNode(); + + if (!parent) { + return false; + } + + var name = path$$1.getName(); + var node = path$$1.getNode(); // If the value of this path is some child of a Node and not a Node + // itself, then it doesn't need parentheses. Only Node objects (in + // fact, only Expression nodes) need parentheses. + + if (path$$1.getValue() !== node) { + return false; + } // Only statements don't need parentheses. + + + if (isStatement(node)) { + return false; + } // Closure compiler requires that type casted expressions to be surrounded by + // parentheses. + + + if (hasClosureCompilerTypeCastComment(options.originalText, path$$1, options.locStart, options.locEnd)) { + return true; + } + + if ( // Preserve parens if we have a Flow annotation comment, unless we're using the Flow + // parser. The Flow parser turns Flow comments into type annotation nodes in its + // AST, which we handle separately. + options.parser !== "flow" && hasFlowShorthandAnnotationComment$1(path$$1.getValue())) { + return true; + } // Identifiers never need parentheses. + + + if (node.type === "Identifier") { + return false; + } + + if (parent.type === "ParenthesizedExpression") { + return false; + } // Add parens around the extends clause of a class. It is needed for almost + // all expressions. + + + if ((parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node && (node.type === "ArrowFunctionExpression" || node.type === "AssignmentExpression" || node.type === "AwaitExpression" || node.type === "BinaryExpression" || node.type === "ConditionalExpression" || node.type === "LogicalExpression" || node.type === "NewExpression" || node.type === "ObjectExpression" || node.type === "ParenthesizedExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "UnaryExpression" || node.type === "UpdateExpression" || node.type === "YieldExpression")) { + return true; + } + + if (parent.type === "ArrowFunctionExpression" && parent.body === node && node.type !== "SequenceExpression" && // these have parens added anyway + util$1.startsWithNoLookaheadToken(node, + /* forbidFunctionClassAndDoExpr */ + false) || parent.type === "ExpressionStatement" && util$1.startsWithNoLookaheadToken(node, + /* forbidFunctionClassAndDoExpr */ + true)) { + return true; + } + + switch (node.type) { + case "CallExpression": + { + var firstParentNotMemberExpression = parent; + var i = 0; + + while (firstParentNotMemberExpression && firstParentNotMemberExpression.type === "MemberExpression") { + firstParentNotMemberExpression = path$$1.getParentNode(++i); + } + + if (firstParentNotMemberExpression.type === "NewExpression" && firstParentNotMemberExpression.callee === path$$1.getParentNode(i - 1)) { + return true; + } + + if (parent.type === "BindExpression" && parent.callee === node) { + return true; + } + + return false; + } + + case "SpreadElement": + case "SpreadProperty": + return parent.type === "MemberExpression" && name === "object" && parent.object === node; + + case "UpdateExpression": + if (parent.type === "UnaryExpression") { + return node.prefix && (node.operator === "++" && parent.operator === "+" || node.operator === "--" && parent.operator === "-"); + } + + // else fallthrough + + case "UnaryExpression": + switch (parent.type) { + case "UnaryExpression": + return node.operator === parent.operator && (node.operator === "+" || node.operator === "-"); + + case "BindExpression": + return true; + + case "MemberExpression": + return name === "object" && parent.object === node; + + case "TaggedTemplateExpression": + return true; + + case "NewExpression": + case "CallExpression": + return name === "callee" && parent.callee === node; + + case "BinaryExpression": + return parent.operator === "**" && name === "left"; + + case "TSNonNullExpression": + return true; + + default: + return false; + } + + case "BinaryExpression": + { + if (parent.type === "UpdateExpression") { + return true; + } + + var isLeftOfAForStatement = function isLeftOfAForStatement(node) { + var i = 0; + + while (node) { + var _parent = path$$1.getParentNode(i++); + + if (!_parent) { + return false; + } + + if (_parent.type === "ForStatement" && _parent.init === node) { + return true; + } + + node = _parent; + } + + return false; + }; + + if (node.operator === "in" && isLeftOfAForStatement(node)) { + return true; + } + } + // fallthrough + + case "TSTypeAssertionExpression": + case "TSAsExpression": + case "LogicalExpression": + switch (parent.type) { + case "ConditionalExpression": + return node.type === "TSAsExpression"; + + case "CallExpression": + case "NewExpression": + return name === "callee" && parent.callee === node; + + case "ClassExpression": + case "ClassDeclaration": + case "TSAbstractClassDeclaration": + return name === "superClass" && parent.superClass === node; + + case "TSTypeAssertionExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BindExpression": + case "AwaitExpression": + case "TSAsExpression": + case "TSNonNullExpression": + case "UpdateExpression": + return true; + + case "MemberExpression": + return name === "object" && parent.object === node; + + case "AssignmentExpression": + return parent.left === node && (node.type === "TSTypeAssertionExpression" || node.type === "TSAsExpression"); + + case "Decorator": + return parent.expression === node && (node.type === "TSTypeAssertionExpression" || node.type === "TSAsExpression"); + + case "BinaryExpression": + case "LogicalExpression": + { + if (!node.operator && node.type !== "TSTypeAssertionExpression") { + return true; + } + + var po = parent.operator; + var pp = util$1.getPrecedence(po); + var no = node.operator; + var np = util$1.getPrecedence(no); + + if (pp > np) { + return true; + } + + if ((po === "||" || po === "??") && no === "&&") { + return true; + } + + if (pp === np && name === "right") { + assert.strictEqual(parent.right, node); + return true; + } + + if (pp === np && !util$1.shouldFlatten(po, no)) { + return true; + } + + if (pp < np && no === "%") { + return po === "+" || po === "-"; + } // Add parenthesis when working with bitwise operators + // It's not stricly needed but helps with code understanding + + + if (util$1.isBitwiseOperator(po)) { + return true; + } + + return false; + } + + default: + return false; + } + + case "TSParenthesizedType": + { + var grandParent = path$$1.getParentNode(1); + + if ((parent.type === "TSTypeParameter" || parent.type === "TypeParameter" || parent.type === "VariableDeclarator" || parent.type === "TSTypeAnnotation" || parent.type === "GenericTypeAnnotation" || parent.type === "TSTypeReference") && node.typeAnnotation.type === "TSTypeAnnotation" && node.typeAnnotation.typeAnnotation.type !== "TSFunctionType" && grandParent.type !== "TSTypeOperator" && grandParent.type !== "TSOptionalType") { + return false; + } // Delegate to inner TSParenthesizedType + + + if (node.typeAnnotation.type === "TSParenthesizedType") { + return false; + } + + return true; + } + + case "SequenceExpression": + switch (parent.type) { + case "ReturnStatement": + return false; + + case "ForStatement": + // Although parentheses wouldn't hurt around sequence + // expressions in the head of for loops, traditional style + // dictates that e.g. i++, j++ should not be wrapped with + // parentheses. + return false; + + case "ExpressionStatement": + return name !== "expression"; + + case "ArrowFunctionExpression": + // We do need parentheses, but SequenceExpressions are handled + // specially when printing bodies of arrow functions. + return name !== "body"; + + default: + // Otherwise err on the side of overparenthesization, adding + // explicit exceptions above if this proves overzealous. + return true; + } + + case "YieldExpression": + if (parent.type === "UnaryExpression" || parent.type === "AwaitExpression" || parent.type === "TSAsExpression" || parent.type === "TSNonNullExpression") { + return true; + } + + // else fallthrough + + case "AwaitExpression": + switch (parent.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "BinaryExpression": + case "LogicalExpression": + case "SpreadElement": + case "SpreadProperty": + case "TSAsExpression": + case "TSNonNullExpression": + case "BindExpression": + return true; + + case "MemberExpression": + return parent.object === node; + + case "NewExpression": + case "CallExpression": + return parent.callee === node; + + case "ConditionalExpression": + return parent.test === node; + + default: + return false; + } + + case "ArrayTypeAnnotation": + return parent.type === "NullableTypeAnnotation"; + + case "IntersectionTypeAnnotation": + case "UnionTypeAnnotation": + return parent.type === "ArrayTypeAnnotation" || parent.type === "NullableTypeAnnotation" || parent.type === "IntersectionTypeAnnotation" || parent.type === "UnionTypeAnnotation"; + + case "NullableTypeAnnotation": + return parent.type === "ArrayTypeAnnotation"; + + case "FunctionTypeAnnotation": + { + var ancestor = parent.type === "NullableTypeAnnotation" ? path$$1.getParentNode(1) : parent; + return ancestor.type === "UnionTypeAnnotation" || ancestor.type === "IntersectionTypeAnnotation" || ancestor.type === "ArrayTypeAnnotation" || // We should check ancestor's parent to know whether the parentheses + // are really needed, but since ??T doesn't make sense this check + // will almost never be true. + ancestor.type === "NullableTypeAnnotation"; + } + + case "StringLiteral": + case "NumericLiteral": + case "Literal": + if (typeof node.value === "string" && parent.type === "ExpressionStatement" && ( // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2 + // See corresponding workaround in printer.js case: "Literal" + options.parser !== "typescript" && !parent.directive || options.parser === "typescript" && options.originalText.substr(options.locStart(node) - 1, 1) === "(")) { + // To avoid becoming a directive + var _grandParent = path$$1.getParentNode(1); + + return _grandParent.type === "Program" || _grandParent.type === "BlockStatement"; + } + + return parent.type === "MemberExpression" && typeof node.value === "number" && name === "object" && parent.object === node; + + case "AssignmentExpression": + { + var _grandParent2 = path$$1.getParentNode(1); + + if (parent.type === "ArrowFunctionExpression" && parent.body === node) { + return true; + } else if (parent.type === "ClassProperty" && parent.key === node && parent.computed) { + return false; + } else if (parent.type === "TSPropertySignature" && parent.name === node) { + return false; + } else if (parent.type === "ForStatement" && (parent.init === node || parent.update === node)) { + return false; + } else if (parent.type === "ExpressionStatement") { + return node.left.type === "ObjectPattern"; + } else if (parent.type === "TSPropertySignature" && parent.key === node) { + return false; + } else if (parent.type === "AssignmentExpression") { + return false; + } else if (parent.type === "SequenceExpression" && _grandParent2 && _grandParent2.type === "ForStatement" && (_grandParent2.init === parent || _grandParent2.update === parent)) { + return false; + } else if (parent.type === "Property" && parent.value === node) { + return false; + } else if (parent.type === "NGChainedExpression") { + return false; + } + + return true; + } + + case "ConditionalExpression": + switch (parent.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + case "ExportDefaultDeclaration": + case "AwaitExpression": + case "JSXSpreadAttribute": + case "TSTypeAssertionExpression": + case "TypeCastExpression": + case "TSAsExpression": + case "TSNonNullExpression": + case "OptionalMemberExpression": + return true; + + case "NewExpression": + case "CallExpression": + return name === "callee" && parent.callee === node; + + case "ConditionalExpression": + return name === "test" && parent.test === node; + + case "MemberExpression": + return name === "object" && parent.object === node; + + default: + return false; + } + + case "FunctionExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee"; + // Not strictly necessary, but it's clearer to the reader if IIFEs are wrapped in parentheses. + + case "TaggedTemplateExpression": + return true; + // This is basically a kind of IIFE. + + case "ExportDefaultDeclaration": + return true; + + default: + return false; + } + + case "ArrowFunctionExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee"; + + case "NewExpression": + return name === "callee"; + + case "MemberExpression": + return name === "object"; + + case "TSAsExpression": + case "BindExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "BinaryExpression": + case "AwaitExpression": + case "TSTypeAssertionExpression": + return true; + + case "ConditionalExpression": + return name === "test"; + + default: + return false; + } + + case "ClassExpression": + return parent.type === "ExportDefaultDeclaration"; + + case "OptionalMemberExpression": + return parent.type === "MemberExpression"; + + case "MemberExpression": + if (parent.type === "BindExpression" && name === "callee" && parent.callee === node) { + var object = node.object; + + while (object) { + if (object.type === "CallExpression") { + return true; + } + + if (object.type !== "MemberExpression" && object.type !== "BindExpression") { + break; + } + + object = object.object; + } + } + + return false; + + case "BindExpression": + if (parent.type === "BindExpression" && name === "callee" && parent.callee === node || parent.type === "MemberExpression") { + return true; + } + + return false; + + case "NGPipeExpression": + if (parent.type === "NGRoot" || parent.type === "ObjectProperty" || parent.type === "ArrayExpression" || (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && parent.arguments[name] === node || parent.type === "NGPipeExpression" && name === "right" || parent.type === "MemberExpression" && name === "property" || parent.type === "AssignmentExpression") { + return false; + } + + return true; + } + + return false; +} + +function isStatement(node) { + return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "ForAwaitStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || node.type === "FunctionDeclaration" || node.type === "IfStatement" || node.type === "ImportDeclaration" || node.type === "InterfaceDeclaration" || node.type === "LabeledStatement" || node.type === "MethodDefinition" || node.type === "ReturnStatement" || node.type === "SwitchStatement" || node.type === "ThrowStatement" || node.type === "TryStatement" || node.type === "TSAbstractClassDeclaration" || node.type === "TSEnumDeclaration" || node.type === "TSImportEqualsDeclaration" || node.type === "TSInterfaceDeclaration" || node.type === "TSModuleDeclaration" || node.type === "TSNamespaceExportDeclaration" || node.type === "TypeAlias" || node.type === "VariableDeclaration" || node.type === "WhileStatement" || node.type === "WithStatement"; +} + +var needsParens_1 = needsParens; + +var _require$$0$builders$2 = doc.builders; +var concat$6 = _require$$0$builders$2.concat; +var join$4 = _require$$0$builders$2.join; +var line$4 = _require$$0$builders$2.line; + +function printHtmlBinding$1(path$$1, options, print) { + var node = path$$1.getValue(); + + if (options.__onHtmlBindingRoot && path$$1.getName() === null) { + options.__onHtmlBindingRoot(node); + } + + if (node.type !== "File") { + return; + } + + if (options.__isVueForBindingLeft) { + return path$$1.call(function (functionDeclarationPath) { + var _functionDeclarationP = functionDeclarationPath.getValue(), + params = _functionDeclarationP.params; + + return concat$6([params.length > 1 ? "(" : "", join$4(concat$6([",", line$4]), functionDeclarationPath.map(print, "params")), params.length > 1 ? ")" : ""]); + }, "program", "body", 0); + } + + if (options.__isVueSlotScope) { + return path$$1.call(function (functionDeclarationPath) { + return join$4(concat$6([",", line$4]), functionDeclarationPath.map(print, "params")); + }, "program", "body", 0); + } +} + +var htmlBinding = { + printHtmlBinding: printHtmlBinding$1 +}; + +function preprocess(ast, options) { + switch (options.parser) { + case "json": + case "json5": + case "json-stringify": + case "__js_expression": + case "__vue_expression": + return Object.assign({}, ast, { + type: options.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot", + node: ast, + comments: [] + }); + + default: + return ast; + } +} + +var preprocess_1 = preprocess; + +var getParentExportDeclaration$1 = util$1.getParentExportDeclaration; +var isExportDeclaration$1 = util$1.isExportDeclaration; +var shouldFlatten$1 = util$1.shouldFlatten; +var getNextNonSpaceNonCommentCharacter$1 = util$1.getNextNonSpaceNonCommentCharacter; +var hasNewline$2 = util$1.hasNewline; +var hasNewlineInRange$1 = util$1.hasNewlineInRange; +var getLast$4 = util$1.getLast; +var getStringWidth$2 = util$1.getStringWidth; +var printString$1 = util$1.printString; +var printNumber$1 = util$1.printNumber; +var hasIgnoreComment$1 = util$1.hasIgnoreComment; +var skipWhitespace$1 = util$1.skipWhitespace; +var hasNodeIgnoreComment$1 = util$1.hasNodeIgnoreComment; +var getPenultimate$1 = util$1.getPenultimate; +var startsWithNoLookaheadToken$1 = util$1.startsWithNoLookaheadToken; +var getIndentSize$1 = util$1.getIndentSize; +var matchAncestorTypes$1 = util$1.matchAncestorTypes; +var getPreferredQuote$1 = util$1.getPreferredQuote; +var isNextLineEmpty$2 = utilShared.isNextLineEmpty; +var isNextLineEmptyAfterIndex$1 = utilShared.isNextLineEmptyAfterIndex; +var getNextNonSpaceNonCommentCharacterIndex$2 = utilShared.getNextNonSpaceNonCommentCharacterIndex; +var isIdentifierName = utils$2.keyword.isIdentifierNameES5; +var insertPragma = pragma.insertPragma; +var printHtmlBinding = htmlBinding.printHtmlBinding; +var hasNode = utils$4.hasNode; +var hasFlowAnnotationComment = utils$4.hasFlowAnnotationComment; +var hasFlowShorthandAnnotationComment = utils$4.hasFlowShorthandAnnotationComment; +var _require$$6$builders = doc.builders; +var concat$4 = _require$$6$builders.concat; +var join$2 = _require$$6$builders.join; +var line$3 = _require$$6$builders.line; +var hardline$3 = _require$$6$builders.hardline; +var softline$1 = _require$$6$builders.softline; +var literalline$1 = _require$$6$builders.literalline; +var group$1 = _require$$6$builders.group; +var indent$2 = _require$$6$builders.indent; +var align$1 = _require$$6$builders.align; +var conditionalGroup$1 = _require$$6$builders.conditionalGroup; +var fill$2 = _require$$6$builders.fill; +var ifBreak$1 = _require$$6$builders.ifBreak; +var breakParent$2 = _require$$6$builders.breakParent; +var lineSuffixBoundary$1 = _require$$6$builders.lineSuffixBoundary; +var addAlignmentToDoc$2 = _require$$6$builders.addAlignmentToDoc; +var dedent$2 = _require$$6$builders.dedent; +var _require$$6$utils = doc.utils; +var willBreak$1 = _require$$6$utils.willBreak; +var isLineNext$1 = _require$$6$utils.isLineNext; +var isEmpty$1 = _require$$6$utils.isEmpty; +var removeLines$1 = _require$$6$utils.removeLines; +var printDocToString$2 = doc.printer.printDocToString; +var uid = 0; + +function shouldPrintComma(options, level) { + level = level || "es5"; + + switch (options.trailingComma) { + case "all": + if (level === "all") { + return true; + } + + // fallthrough + + case "es5": + if (level === "es5") { + return true; + } + + // fallthrough + + case "none": + default: + return false; + } +} + +function genericPrint(path$$1, options, printPath, args) { + var node = path$$1.getValue(); + var needsParens = false; + var linesWithoutParens = printPathNoParens(path$$1, options, printPath, args); + + if (!node || isEmpty$1(linesWithoutParens)) { + return linesWithoutParens; + } + + var parentExportDecl = getParentExportDeclaration$1(path$$1); + var decorators = []; + + if (node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "TSAbstractClassProperty" || node.type === "ClassPrivateProperty") {// their decorators are handled themselves + } else if (node.decorators && node.decorators.length > 0 && // If the parent node is an export declaration and the decorator + // was written before the export, the export will be responsible + // for printing the decorators. + !(parentExportDecl && options.locStart(parentExportDecl, { + ignoreDecorators: true + }) > options.locStart(node.decorators[0]))) { + var shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators(node, options); + var separator = shouldBreak ? hardline$3 : line$3; + path$$1.each(function (decoratorPath) { + var decorator = decoratorPath.getValue(); + + if (decorator.expression) { + decorator = decorator.expression; + } else { + decorator = decorator.callee; + } + + decorators.push(printPath(decoratorPath), separator); + }, "decorators"); + + if (parentExportDecl) { + decorators.unshift(hardline$3); + } + } else if (isExportDeclaration$1(node) && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0 && // Only print decorators here if they were written before the export, + // otherwise they are printed by the node.declaration + options.locStart(node, { + ignoreDecorators: true + }) > options.locStart(node.declaration.decorators[0])) { + // Export declarations are responsible for printing any decorators + // that logically apply to node.declaration. + path$$1.each(function (decoratorPath) { + var decorator = decoratorPath.getValue(); + var prefix = decorator.type === "Decorator" ? "" : "@"; + decorators.push(prefix, printPath(decoratorPath), hardline$3); + }, "declaration", "decorators"); + } else { + // Nodes with decorators can't have parentheses, so we can avoid + // computing pathNeedsParens() except in this case. + needsParens = needsParens_1(path$$1, options); + } + + var parts = []; + + if (needsParens) { + parts.unshift("("); + } + + parts.push(linesWithoutParens); + + if (needsParens) { + var _node = path$$1.getValue(); + + if (hasFlowShorthandAnnotationComment(_node)) { + parts.push(" /*"); + parts.push(_node.trailingComments[0].value.trimLeft()); + parts.push("*/"); + _node.trailingComments[0].printed = true; + } + + parts.push(")"); + } + + if (decorators.length > 0) { + return group$1(concat$4(decorators.concat(parts))); + } + + return concat$4(parts); +} + +function hasNewlineBetweenOrAfterDecorators(node, options) { + return hasNewlineInRange$1(options.originalText, options.locStart(node.decorators[0]), options.locEnd(getLast$4(node.decorators))) || hasNewline$2(options.originalText, options.locEnd(getLast$4(node.decorators))); +} + +function printDecorators(path$$1, options, print) { + var node = path$$1.getValue(); + return group$1(concat$4([join$2(line$3, path$$1.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators(node, options) ? hardline$3 : line$3])); +} + +function hasPrettierIgnore(path$$1) { + return hasIgnoreComment$1(path$$1) || hasJsxIgnoreComment(path$$1); +} + +function hasJsxIgnoreComment(path$$1) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + + if (!parent || !node || !isJSXNode(node) || !isJSXNode(parent)) { + return false; + } // Lookup the previous sibling, ignoring any empty JSXText elements + + + var index = parent.children.indexOf(node); + var prevSibling = null; + + for (var i = index; i > 0; i--) { + var candidate = parent.children[i - 1]; + + if (candidate.type === "JSXText" && !isMeaningfulJSXText(candidate)) { + continue; + } + + prevSibling = candidate; + break; + } + + return prevSibling && prevSibling.type === "JSXExpressionContainer" && prevSibling.expression.type === "JSXEmptyExpression" && prevSibling.expression.comments && prevSibling.expression.comments.find(function (comment) { + return comment.value.trim() === "prettier-ignore"; + }); +} +/** + * The following is the shared logic for + * ternary operators, namely ConditionalExpression + * and TSConditionalType + * @typedef {Object} OperatorOptions + * @property {() => Array} beforeParts - Parts to print before the `?`. + * @property {(breakClosingParen: boolean) => Array} afterParts - Parts to print after the conditional expression. + * @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode. + * @property {string} conditionalNodeType - The type of the conditional expression node, ie "ConditionalExpression" or "TSConditionalType". + * @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg "consequent". + * @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg "alternate". + * @property {string} testNodePropertyName - The property at which the test node can be found on the main node, eg "test". + * @property {boolean} breakNested - Whether to break all nested ternaries when one breaks. + * @param {FastPath} path - The path to the ConditionalExpression/TSConditionalType node. + * @param {Options} options - Prettier options + * @param {Function} print - Print function to call recursively + * @param {OperatorOptions} operatorOptions + * @returns Doc + */ + + +function printTernaryOperator(path$$1, options, print, operatorOptions) { + var node = path$$1.getValue(); + var testNode = node[operatorOptions.testNodePropertyName]; + var consequentNode = node[operatorOptions.consequentNodePropertyName]; + var alternateNode = node[operatorOptions.alternateNodePropertyName]; + var parts = []; // We print a ConditionalExpression in either "JSX mode" or "normal mode". + // See tests/jsx/conditional-expression.js for more info. + + var jsxMode = false; + var parent = path$$1.getParentNode(); + var forceNoIndent = parent.type === operatorOptions.conditionalNodeType; // Find the outermost non-ConditionalExpression parent, and the outermost + // ConditionalExpression parent. We'll use these to determine if we should + // print in JSX mode. + + var currentParent; + var previousParent; + var i = 0; + + do { + previousParent = currentParent || node; + currentParent = path$$1.getParentNode(i); + i++; + } while (currentParent && currentParent.type === operatorOptions.conditionalNodeType); + + var firstNonConditionalParent = currentParent || parent; + var lastConditionalParent = previousParent; + + if (operatorOptions.shouldCheckJsx && (isJSXNode(testNode) || isJSXNode(consequentNode) || isJSXNode(alternateNode) || conditionalExpressionChainContainsJSX(lastConditionalParent))) { + jsxMode = true; + forceNoIndent = true; // Even though they don't need parens, we wrap (almost) everything in + // parens when using ?: within JSX, because the parens are analogous to + // curly braces in an if statement. + + var wrap = function wrap(doc$$2) { + return concat$4([ifBreak$1("(", ""), indent$2(concat$4([softline$1, doc$$2])), softline$1, ifBreak$1(")", "")]); + }; // The only things we don't wrap are: + // * Nested conditional expressions in alternates + // * null + + + var isNull = function isNull(node) { + return node.type === "NullLiteral" || node.type === "Literal" && node.value === null; + }; + + parts.push(" ? ", isNull(consequentNode) ? path$$1.call(print, operatorOptions.consequentNodePropertyName) : wrap(path$$1.call(print, operatorOptions.consequentNodePropertyName)), " : ", alternateNode.type === operatorOptions.conditionalNodeType || isNull(alternateNode) ? path$$1.call(print, operatorOptions.alternateNodePropertyName) : wrap(path$$1.call(print, operatorOptions.alternateNodePropertyName))); + } else { + // normal mode + var part = concat$4([line$3, "? ", consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$1("", "(") : "", align$1(2, path$$1.call(print, operatorOptions.consequentNodePropertyName)), consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$1("", ")") : "", line$3, ": ", alternateNode.type === operatorOptions.conditionalNodeType ? path$$1.call(print, operatorOptions.alternateNodePropertyName) : align$1(2, path$$1.call(print, operatorOptions.alternateNodePropertyName))]); + parts.push(parent.type !== operatorOptions.conditionalNodeType || parent[operatorOptions.alternateNodePropertyName] === node ? part : options.useTabs ? dedent$2(indent$2(part)) : align$1(Math.max(0, options.tabWidth - 2), part)); + } // We want a whole chain of ConditionalExpressions to all + // break if any of them break. That means we should only group around the + // outer-most ConditionalExpression. + + + var maybeGroup = function maybeGroup(doc$$2) { + return operatorOptions.breakNested ? parent === firstNonConditionalParent ? group$1(doc$$2) : doc$$2 : group$1(doc$$2); + }; // Break the closing paren to keep the chain right after it: + // (a + // ? b + // : c + // ).call() + + + var breakClosingParen = !jsxMode && (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && !parent.computed; + return maybeGroup(concat$4([].concat(function (testDoc) { + return ( + /** + * a + * ? b + * : multiline + * test + * node + * ^^ align(2) + * ? d + * : e + */ + parent.type === operatorOptions.conditionalNodeType && parent[operatorOptions.alternateNodePropertyName] === node ? align$1(2, testDoc) : testDoc + ); + }(concat$4(operatorOptions.beforeParts())), forceNoIndent ? concat$4(parts) : indent$2(concat$4(parts)), operatorOptions.afterParts(breakClosingParen)))); +} + +function getTypeScriptMappedTypeModifier(tokenNode, keyword) { + if (tokenNode.type === "TSPlusToken") { + return "+" + keyword; + } else if (tokenNode.type === "TSMinusToken") { + return "-" + keyword; + } + + return keyword; +} + +function printPathNoParens(path$$1, options, print, args) { + var n = path$$1.getValue(); + var semi = options.semi ? ";" : ""; + + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + var htmlBinding$$1 = printHtmlBinding(path$$1, options, print); + + if (htmlBinding$$1) { + return htmlBinding$$1; + } + + var parts = []; + + switch (n.type) { + case "JsExpressionRoot": + return path$$1.call(print, "node"); + + case "JsonRoot": + return concat$4([path$$1.call(print, "node"), hardline$3]); + + case "File": + // Print @babel/parser's InterpreterDirective here so that + // leading comments on the `Program` node get printed after the hashbang. + if (n.program && n.program.interpreter) { + parts.push(path$$1.call(function (programPath) { + return programPath.call(print, "interpreter"); + }, "program")); + } + + parts.push(path$$1.call(print, "program")); + return concat$4(parts); + + case "Program": + // Babel 6 + if (n.directives) { + path$$1.each(function (childPath) { + parts.push(print(childPath), semi, hardline$3); + + if (isNextLineEmpty$2(options.originalText, childPath.getValue(), options)) { + parts.push(hardline$3); + } + }, "directives"); + } + + parts.push(path$$1.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body")); + parts.push(comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true)); // Only force a trailing newline if there were any contents. + + if (n.body.length || n.comments) { + parts.push(hardline$3); + } + + return concat$4(parts); + // Babel extension. + + case "EmptyStatement": + return ""; + + case "ExpressionStatement": + // Detect Flow-parsed directives + if (n.directive) { + return concat$4([nodeStr(n.expression, options, true), semi]); + } // Do not append semicolon after the only JSX element in a program + + + return concat$4([path$$1.call(print, "expression"), isTheOnlyJSXElementInMarkdown(options, path$$1) ? "" : semi]); + // Babel extension. + + case "ParenthesizedExpression": + return concat$4(["(", path$$1.call(print, "expression"), ")"]); + + case "AssignmentExpression": + return printAssignment(n.left, path$$1.call(print, "left"), concat$4([" ", n.operator]), n.right, path$$1.call(print, "right"), options); + + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + { + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + var isInsideParenthesis = n !== parent.body && (parent.type === "IfStatement" || parent.type === "WhileStatement" || parent.type === "DoWhileStatement"); + + var _parts = printBinaryishExpressions(path$$1, print, options, + /* isNested */ + false, isInsideParenthesis); // if ( + // this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft + // ) { + // + // looks super weird, we want to break the children if the parent breaks + // + // if ( + // this.hasPlugin("dynamicImports") && + // this.lookahead().type === tt.parenLeft + // ) { + + + if (isInsideParenthesis) { + return concat$4(_parts); + } // Break between the parens in unaries or in a member expression, i.e. + // + // ( + // a && + // b && + // c + // ).call() + + + if (parent.type === "UnaryExpression" || (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && !parent.computed) { + return group$1(concat$4([indent$2(concat$4([softline$1, concat$4(_parts)])), softline$1])); + } // Avoid indenting sub-expressions in some cases where the first sub-expression is already + // indented accordingly. We should indent sub-expressions where the first case isn't indented. + + + var shouldNotIndent = parent.type === "ReturnStatement" || parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" || n.type !== "NGPipeExpression" && (parent.type === "NGRoot" && options.parser === "__ng_binding" || parent.type === "NGMicrosyntaxExpression" && parentParent.type === "NGMicrosyntax" && parentParent.body.length === 1) || n === parent.body && parent.type === "ArrowFunctionExpression" || n !== parent.body && parent.type === "ForStatement" || parent.type === "ConditionalExpression" && parentParent.type !== "ReturnStatement" && parentParent.type !== "CallExpression"; + var shouldIndentIfInlining = parent.type === "AssignmentExpression" || parent.type === "VariableDeclarator" || parent.type === "ClassProperty" || parent.type === "TSAbstractClassProperty" || parent.type === "ClassPrivateProperty" || parent.type === "ObjectProperty" || parent.type === "Property"; + var samePrecedenceSubExpression = isBinaryish(n.left) && shouldFlatten$1(n.operator, n.left.operator); + + if (shouldNotIndent || shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression || !shouldInlineLogicalExpression(n) && shouldIndentIfInlining) { + return group$1(concat$4(_parts)); + } + + if (_parts.length === 0) { + return ""; + } // If the right part is a JSX node, we include it in a separate group to + // prevent it breaking the whole chain, so we can print the expression like: + // + // foo && bar && ( + // + // + // + // ) + + + var hasJSX = isJSXNode(n.right); + var rest = concat$4(hasJSX ? _parts.slice(1, -1) : _parts.slice(1)); + var groupId = Symbol("logicalChain-" + ++uid); + var chain = group$1(concat$4([// Don't include the initial expression in the indentation + // level. The first item is guaranteed to be the first + // left-most expression. + _parts.length > 0 ? _parts[0] : "", indent$2(rest)]), { + id: groupId + }); + + if (!hasJSX) { + return chain; + } + + var jsxPart = getLast$4(_parts); + return group$1(concat$4([chain, ifBreak$1(indent$2(jsxPart), jsxPart, { + groupId + })])); + } + + case "AssignmentPattern": + return concat$4([path$$1.call(print, "left"), " = ", path$$1.call(print, "right")]); + + case "TSTypeAssertionExpression": + { + var shouldBreakAfterCast = !(n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression"); + var castGroup = group$1(concat$4(["<", indent$2(concat$4([softline$1, path$$1.call(print, "typeAnnotation")])), softline$1, ">"])); + var exprContents = concat$4([ifBreak$1("("), indent$2(concat$4([softline$1, path$$1.call(print, "expression")])), softline$1, ifBreak$1(")")]); + + if (shouldBreakAfterCast) { + return conditionalGroup$1([concat$4([castGroup, path$$1.call(print, "expression")]), concat$4([castGroup, group$1(exprContents, { + shouldBreak: true + })]), concat$4([castGroup, path$$1.call(print, "expression")])]); + } + + return group$1(concat$4([castGroup, path$$1.call(print, "expression")])); + } + + case "OptionalMemberExpression": + case "MemberExpression": + { + var _parent = path$$1.getParentNode(); + + var firstNonMemberParent; + var i = 0; + + do { + firstNonMemberParent = path$$1.getParentNode(i); + i++; + } while (firstNonMemberParent && (firstNonMemberParent.type === "MemberExpression" || firstNonMemberParent.type === "OptionalMemberExpression" || firstNonMemberParent.type === "TSNonNullExpression")); + + var shouldInline = firstNonMemberParent && (firstNonMemberParent.type === "NewExpression" || firstNonMemberParent.type === "BindExpression" || firstNonMemberParent.type === "VariableDeclarator" && firstNonMemberParent.id.type !== "Identifier" || firstNonMemberParent.type === "AssignmentExpression" && firstNonMemberParent.left.type !== "Identifier") || n.computed || n.object.type === "Identifier" && n.property.type === "Identifier" && _parent.type !== "MemberExpression" && _parent.type !== "OptionalMemberExpression"; + return concat$4([path$$1.call(print, "object"), shouldInline ? printMemberLookup(path$$1, options, print) : group$1(indent$2(concat$4([softline$1, printMemberLookup(path$$1, options, print)])))]); + } + + case "MetaProperty": + return concat$4([path$$1.call(print, "meta"), ".", path$$1.call(print, "property")]); + + case "BindExpression": + if (n.object) { + parts.push(path$$1.call(print, "object")); + } + + parts.push(group$1(indent$2(concat$4([softline$1, printBindExpressionCallee(path$$1, options, print)])))); + return concat$4(parts); + + case "Identifier": + { + return concat$4([n.name, printOptionalToken(path$$1), printTypeAnnotation(path$$1, options, print)]); + } + + case "SpreadElement": + case "SpreadElementPattern": + case "RestProperty": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + case "ObjectTypeSpreadProperty": + return concat$4(["...", path$$1.call(print, "argument"), printTypeAnnotation(path$$1, options, print)]); + + case "FunctionDeclaration": + case "FunctionExpression": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(printFunctionDeclaration(path$$1, print, options)); + + if (!n.body) { + parts.push(semi); + } + + return concat$4(parts); + + case "ArrowFunctionExpression": + { + if (n.async) { + parts.push("async "); + } + + if (shouldPrintParamsWithoutParens(path$$1, options)) { + parts.push(path$$1.call(print, "params", 0)); + } else { + parts.push(group$1(concat$4([printFunctionParams(path$$1, print, options, + /* expandLast */ + args && (args.expandLastArg || args.expandFirstArg), + /* printTypeParams */ + true), printReturnType(path$$1, print, options)]))); + } + + var dangling = comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true, function (comment) { + var nextCharacter = getNextNonSpaceNonCommentCharacterIndex$2(options.originalText, comment, options); + return options.originalText.substr(nextCharacter, 2) === "=>"; + }); + + if (dangling) { + parts.push(" ", dangling); + } + + parts.push(" =>"); + var body = path$$1.call(function (bodyPath) { + return print(bodyPath, args); + }, "body"); // We want to always keep these types of nodes on the same line + // as the arrow. + + if (!hasLeadingOwnLineComment(options.originalText, n.body, options) && (n.body.type === "ArrayExpression" || n.body.type === "ObjectExpression" || n.body.type === "BlockStatement" || isJSXNode(n.body) || isTemplateOnItsOwnLine(n.body, options.originalText, options) || n.body.type === "ArrowFunctionExpression" || n.body.type === "DoExpression")) { + return group$1(concat$4([concat$4(parts), " ", body])); + } // We handle sequence expressions as the body of arrows specially, + // so that the required parentheses end up on their own lines. + + + if (n.body.type === "SequenceExpression") { + return group$1(concat$4([concat$4(parts), group$1(concat$4([" (", indent$2(concat$4([softline$1, body])), softline$1, ")"]))])); + } // if the arrow function is expanded as last argument, we are adding a + // level of indentation and need to add a softline to align the closing ) + // with the opening (, or if it's inside a JSXExpression (e.g. an attribute) + // we should align the expression's closing } with the line with the opening {. + + + var shouldAddSoftLine = (args && args.expandLastArg || path$$1.getParentNode().type === "JSXExpressionContainer") && !(n.comments && n.comments.length); + var printTrailingComma = args && args.expandLastArg && shouldPrintComma(options, "all"); // In order to avoid confusion between + // a => a ? a : a + // a <= a ? a : a + + var shouldAddParens = n.body.type === "ConditionalExpression" && !startsWithNoLookaheadToken$1(n.body, + /* forbidFunctionAndClass */ + false); + return group$1(concat$4([concat$4(parts), group$1(concat$4([indent$2(concat$4([line$3, shouldAddParens ? ifBreak$1("", "(") : "", body, shouldAddParens ? ifBreak$1("", ")") : ""])), shouldAddSoftLine ? concat$4([ifBreak$1(printTrailingComma ? "," : ""), softline$1]) : ""]))])); + } + + case "MethodDefinition": + case "TSAbstractMethodDefinition": + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.type === "TSAbstractMethodDefinition") { + parts.push("abstract "); + } + + parts.push(printMethod(path$$1, options, print)); + return concat$4(parts); + + case "YieldExpression": + parts.push("yield"); + + if (n.delegate) { + parts.push("*"); + } + + if (n.argument) { + parts.push(" ", path$$1.call(print, "argument")); + } + + return concat$4(parts); + + case "AwaitExpression": + return concat$4(["await ", path$$1.call(print, "argument")]); + + case "ImportSpecifier": + if (n.importKind) { + parts.push(path$$1.call(print, "importKind"), " "); + } + + parts.push(path$$1.call(print, "imported")); + + if (n.local && n.local.name !== n.imported.name) { + parts.push(" as ", path$$1.call(print, "local")); + } + + return concat$4(parts); + + case "ExportSpecifier": + parts.push(path$$1.call(print, "local")); + + if (n.exported && n.exported.name !== n.local.name) { + parts.push(" as ", path$$1.call(print, "exported")); + } + + return concat$4(parts); + + case "ImportNamespaceSpecifier": + parts.push("* as "); + + if (n.local) { + parts.push(path$$1.call(print, "local")); + } else if (n.id) { + parts.push(path$$1.call(print, "id")); + } + + return concat$4(parts); + + case "ImportDefaultSpecifier": + if (n.local) { + return path$$1.call(print, "local"); + } + + return path$$1.call(print, "id"); + + case "TSExportAssignment": + return concat$4(["export = ", path$$1.call(print, "expression"), semi]); + + case "ExportDefaultDeclaration": + case "ExportNamedDeclaration": + return printExportDeclaration(path$$1, options, print); + + case "ExportAllDeclaration": + parts.push("export "); + + if (n.exportKind === "type") { + parts.push("type "); + } + + parts.push("* from ", path$$1.call(print, "source"), semi); + return concat$4(parts); + + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return path$$1.call(print, "exported"); + + case "ImportDeclaration": + { + parts.push("import "); + + if (n.importKind && n.importKind !== "value") { + parts.push(n.importKind + " "); + } + + var standalones = []; + var grouped = []; + + if (n.specifiers && n.specifiers.length > 0) { + path$$1.each(function (specifierPath) { + var value = specifierPath.getValue(); + + if (value.type === "ImportDefaultSpecifier" || value.type === "ImportNamespaceSpecifier") { + standalones.push(print(specifierPath)); + } else { + grouped.push(print(specifierPath)); + } + }, "specifiers"); + + if (standalones.length > 0) { + parts.push(join$2(", ", standalones)); + } + + if (standalones.length > 0 && grouped.length > 0) { + parts.push(", "); + } + + if (grouped.length === 1 && standalones.length === 0 && n.specifiers && !n.specifiers.some(function (node) { + return node.comments; + })) { + parts.push(concat$4(["{", options.bracketSpacing ? " " : "", concat$4(grouped), options.bracketSpacing ? " " : "", "}"])); + } else if (grouped.length >= 1) { + parts.push(group$1(concat$4(["{", indent$2(concat$4([options.bracketSpacing ? line$3 : softline$1, join$2(concat$4([",", line$3]), grouped)])), ifBreak$1(shouldPrintComma(options) ? "," : ""), options.bracketSpacing ? line$3 : softline$1, "}"]))); + } + + parts.push(" from "); + } else if (n.importKind && n.importKind === "type" || // import {} from 'x' + /{\s*}/.test(options.originalText.slice(options.locStart(n), options.locStart(n.source)))) { + parts.push("{} from "); + } + + parts.push(path$$1.call(print, "source"), semi); + return concat$4(parts); + } + + case "Import": + return "import"; + + case "BlockStatement": + { + var naked = path$$1.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); + var hasContent = n.body.find(function (node) { + return node.type !== "EmptyStatement"; + }); + var hasDirectives = n.directives && n.directives.length > 0; + + var _parent2 = path$$1.getParentNode(); + + var _parentParent = path$$1.getParentNode(1); + + if (!hasContent && !hasDirectives && !hasDanglingComments(n) && (_parent2.type === "ArrowFunctionExpression" || _parent2.type === "FunctionExpression" || _parent2.type === "FunctionDeclaration" || _parent2.type === "ObjectMethod" || _parent2.type === "ClassMethod" || _parent2.type === "ForStatement" || _parent2.type === "WhileStatement" || _parent2.type === "DoWhileStatement" || _parent2.type === "DoExpression" || _parent2.type === "CatchClause" && !_parentParent.finalizer)) { + return "{}"; + } + + parts.push("{"); // Babel 6 + + if (hasDirectives) { + path$$1.each(function (childPath) { + parts.push(indent$2(concat$4([hardline$3, print(childPath), semi]))); + + if (isNextLineEmpty$2(options.originalText, childPath.getValue(), options)) { + parts.push(hardline$3); + } + }, "directives"); + } + + if (hasContent) { + parts.push(indent$2(concat$4([hardline$3, naked]))); + } + + parts.push(comments.printDanglingComments(path$$1, options)); + parts.push(hardline$3, "}"); + return concat$4(parts); + } + + case "ReturnStatement": + parts.push("return"); + + if (n.argument) { + if (returnArgumentHasLeadingComment(options, n.argument)) { + parts.push(concat$4([" (", indent$2(concat$4([hardline$3, path$$1.call(print, "argument")])), hardline$3, ")"])); + } else if (n.argument.type === "LogicalExpression" || n.argument.type === "BinaryExpression" || n.argument.type === "SequenceExpression") { + parts.push(group$1(concat$4([ifBreak$1(" (", " "), indent$2(concat$4([softline$1, path$$1.call(print, "argument")])), softline$1, ifBreak$1(")")]))); + } else { + parts.push(" ", path$$1.call(print, "argument")); + } + } + + if (hasDanglingComments(n)) { + parts.push(" ", comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true)); + } + + parts.push(semi); + return concat$4(parts); + + case "NewExpression": + case "OptionalCallExpression": + case "CallExpression": + { + var isNew = n.type === "NewExpression"; + var optional = printOptionalToken(path$$1); + + if ( // We want to keep CommonJS- and AMD-style require calls, and AMD-style + // define calls, as a unit. + // e.g. `define(["some/lib", (lib) => {` + !isNew && n.callee.type === "Identifier" && (n.callee.name === "require" || n.callee.name === "define") || n.callee.type === "Import" || // Template literals as single arguments + n.arguments.length === 1 && isTemplateOnItsOwnLine(n.arguments[0], options.originalText, options) || // Keep test declarations on a single line + // e.g. `it('long name', () => {` + !isNew && isTestCall(n, path$$1.getParentNode())) { + return concat$4([isNew ? "new " : "", path$$1.call(print, "callee"), optional, printFunctionTypeParameters(path$$1, options, print), concat$4(["(", join$2(", ", path$$1.map(print, "arguments")), ")"])]); + } // Inline Flow annotation comments following Identifiers in Call nodes need to + // stay with the Identifier. For example: + // + // foo /*:: */(bar); + // + // Here, we ensure that such comments stay between the Identifier and the Callee. + + + var isIdentifierWithFlowAnnotation = n.callee.type === "Identifier" && hasFlowAnnotationComment(n.callee.trailingComments); + + if (isIdentifierWithFlowAnnotation) { + n.callee.trailingComments[0].printed = true; + } // We detect calls on member lookups and possibly print them in a + // special chain format. See `printMemberChain` for more info. + + + if (!isNew && isMemberish(n.callee)) { + return printMemberChain(path$$1, options, print); + } + + return concat$4([isNew ? "new " : "", path$$1.call(print, "callee"), optional, isIdentifierWithFlowAnnotation ? `/*:: ${n.callee.trailingComments[0].value.substring(2).trim()} */` : "", printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]); + } + + case "TSInterfaceDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(n.abstract ? "abstract " : "", printTypeScriptModifiers(path$$1, options, print), "interface ", path$$1.call(print, "id"), n.typeParameters ? path$$1.call(print, "typeParameters") : "", " "); + + if (n.heritage.length) { + parts.push(group$1(indent$2(concat$4([softline$1, "extends ", (n.heritage.length === 1 ? identity$1 : indent$2)(join$2(concat$4([",", line$3]), path$$1.map(print, "heritage"))), " "])))); + } + + parts.push(path$$1.call(print, "body")); + return concat$4(parts); + + case "ObjectTypeInternalSlot": + return concat$4([n.static ? "static " : "", "[[", path$$1.call(print, "id"), "]]", printOptionalToken(path$$1), n.method ? "" : ": ", path$$1.call(print, "value")]); + + case "ObjectExpression": + case "ObjectPattern": + case "ObjectTypeAnnotation": + case "TSInterfaceBody": + case "TSTypeLiteral": + { + var propertiesField; + + if (n.type === "TSTypeLiteral") { + propertiesField = "members"; + } else if (n.type === "TSInterfaceBody") { + propertiesField = "body"; + } else { + propertiesField = "properties"; + } + + var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; + var fields = []; + + if (isTypeAnnotation) { + fields.push("indexers", "callProperties", "internalSlots"); + } + + fields.push(propertiesField); + var firstProperty = fields.map(function (field) { + return n[field][0]; + }).sort(function (a, b) { + return options.locStart(a) - options.locStart(b); + })[0]; + + var _parent3 = path$$1.getParentNode(0); + + var isFlowInterfaceLikeBody = isTypeAnnotation && _parent3 && (_parent3.type === "InterfaceDeclaration" || _parent3.type === "DeclareInterface" || _parent3.type === "DeclareClass") && path$$1.getName() === "body"; + var shouldBreak = n.type === "TSInterfaceBody" || isFlowInterfaceLikeBody || n.type === "ObjectPattern" && _parent3.type !== "FunctionDeclaration" && _parent3.type !== "FunctionExpression" && _parent3.type !== "ArrowFunctionExpression" && _parent3.type !== "AssignmentPattern" && _parent3.type !== "CatchClause" && n.properties.some(function (property) { + return property.value && (property.value.type === "ObjectPattern" || property.value.type === "ArrayPattern"); + }) || n.type !== "ObjectPattern" && firstProperty && hasNewlineInRange$1(options.originalText, options.locStart(n), options.locStart(firstProperty)); + var separator = isFlowInterfaceLikeBody ? ";" : n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" ? ifBreak$1(semi, ";") : ","; + var leftBrace = n.exact ? "{|" : "{"; + var rightBrace = n.exact ? "|}" : "}"; // Unfortunately, things are grouped together in the ast can be + // interleaved in the source code. So we need to reorder them before + // printing them. + + var propsAndLoc = []; + fields.forEach(function (field) { + path$$1.each(function (childPath) { + var node = childPath.getValue(); + propsAndLoc.push({ + node: node, + printed: print(childPath), + loc: options.locStart(node) + }); + }, field); + }); + var separatorParts = []; + var props = propsAndLoc.sort(function (a, b) { + return a.loc - b.loc; + }).map(function (prop) { + var result = concat$4(separatorParts.concat(group$1(prop.printed))); + separatorParts = [separator, line$3]; + + if ((prop.node.type === "TSPropertySignature" || prop.node.type === "TSMethodSignature") && hasNodeIgnoreComment$1(prop.node)) { + separatorParts.shift(); + } + + if (isNextLineEmpty$2(options.originalText, prop.node, options)) { + separatorParts.push(hardline$3); + } + + return result; + }); + + if (n.inexact) { + props.push(concat$4(separatorParts.concat(group$1("...")))); + } + + var lastElem = getLast$4(n[propertiesField]); + var canHaveTrailingSeparator = !(lastElem && (lastElem.type === "RestProperty" || lastElem.type === "RestElement" || hasNodeIgnoreComment$1(lastElem) || n.inexact)); + var content; + + if (props.length === 0 && !n.typeAnnotation) { + if (!hasDanglingComments(n)) { + return concat$4([leftBrace, rightBrace]); + } + + content = group$1(concat$4([leftBrace, comments.printDanglingComments(path$$1, options), softline$1, rightBrace, printOptionalToken(path$$1)])); + } else { + content = concat$4([leftBrace, indent$2(concat$4([options.bracketSpacing ? line$3 : softline$1, concat$4(props)])), ifBreak$1(canHaveTrailingSeparator && (separator !== "," || shouldPrintComma(options)) ? separator : ""), concat$4([options.bracketSpacing ? line$3 : softline$1, rightBrace]), printOptionalToken(path$$1), printTypeAnnotation(path$$1, options, print)]); + } // If we inline the object as first argument of the parent, we don't want + // to create another group so that the object breaks before the return + // type + + + var parentParentParent = path$$1.getParentNode(2); + + if (n.type === "ObjectPattern" && _parent3 && shouldHugArguments(_parent3) && _parent3.params[0] === n || shouldHugType(n) && parentParentParent && shouldHugArguments(parentParentParent) && parentParentParent.params[0].typeAnnotation && parentParentParent.params[0].typeAnnotation.typeAnnotation === n) { + return content; + } + + return group$1(content, { + shouldBreak + }); + } + // Babel 6 + + case "ObjectProperty": // Non-standard AST node type. + + case "Property": + if (n.method || n.kind === "get" || n.kind === "set") { + return printMethod(path$$1, options, print); + } + + if (n.shorthand) { + parts.push(path$$1.call(print, "value")); + } else { + var printedLeft; + + if (n.computed) { + printedLeft = concat$4(["[", path$$1.call(print, "key"), "]"]); + } else { + printedLeft = printPropertyKey(path$$1, options, print); + } + + parts.push(printAssignment(n.key, printedLeft, ":", n.value, path$$1.call(print, "value"), options)); + } + + return concat$4(parts); + // Babel 6 + + case "ClassMethod": + if (n.decorators && n.decorators.length !== 0) { + parts.push(printDecorators(path$$1, options, print)); + } + + if (n.static) { + parts.push("static "); + } + + parts = parts.concat(printObjectMethod(path$$1, options, print)); + return concat$4(parts); + // Babel 6 + + case "ObjectMethod": + return printObjectMethod(path$$1, options, print); + + case "Decorator": + return concat$4(["@", path$$1.call(print, "expression"), path$$1.call(print, "callee")]); + + case "ArrayExpression": + case "ArrayPattern": + if (n.elements.length === 0) { + if (!hasDanglingComments(n)) { + parts.push("[]"); + } else { + parts.push(group$1(concat$4(["[", comments.printDanglingComments(path$$1, options), softline$1, "]"]))); + } + } else { + var _lastElem = getLast$4(n.elements); + + var canHaveTrailingComma = !(_lastElem && _lastElem.type === "RestElement"); // JavaScript allows you to have empty elements in an array which + // changes its length based on the number of commas. The algorithm + // is that if the last argument is null, we need to force insert + // a comma to ensure JavaScript recognizes it. + // [,].length === 1 + // [1,].length === 1 + // [1,,].length === 2 + // + // Note that getLast returns null if the array is empty, but + // we already check for an empty array just above so we are safe + + var needsForcedTrailingComma = canHaveTrailingComma && _lastElem === null; + parts.push(group$1(concat$4(["[", indent$2(concat$4([softline$1, printArrayItems(path$$1, options, "elements", print)])), needsForcedTrailingComma ? "," : "", ifBreak$1(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma(options) ? "," : ""), comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), softline$1, "]"]))); + } + + parts.push(printOptionalToken(path$$1), printTypeAnnotation(path$$1, options, print)); + return concat$4(parts); + + case "SequenceExpression": + { + var _parent4 = path$$1.getParentNode(0); + + if (_parent4.type === "ExpressionStatement" || _parent4.type === "ForStatement") { + // For ExpressionStatements and for-loop heads, which are among + // the few places a SequenceExpression appears unparenthesized, we want + // to indent expressions after the first. + var _parts2 = []; + path$$1.each(function (p) { + if (p.getName() === 0) { + _parts2.push(print(p)); + } else { + _parts2.push(",", indent$2(concat$4([line$3, print(p)]))); + } + }, "expressions"); + return group$1(concat$4(_parts2)); + } + + return group$1(concat$4([join$2(concat$4([",", line$3]), path$$1.map(print, "expressions"))])); + } + + case "ThisExpression": + return "this"; + + case "Super": + return "super"; + + case "NullLiteral": + // Babel 6 Literal split + return "null"; + + case "RegExpLiteral": + // Babel 6 Literal split + return printRegex(n); + + case "NumericLiteral": + // Babel 6 Literal split + return printNumber$1(n.extra.raw); + + case "BigIntLiteral": + return concat$4([printNumber$1(n.extra.rawValue), "n"]); + + case "BooleanLiteral": // Babel 6 Literal split + + case "StringLiteral": // Babel 6 Literal split + + case "Literal": + { + if (n.regex) { + return printRegex(n.regex); + } + + if (typeof n.value === "number") { + return printNumber$1(n.raw); + } + + if (typeof n.value !== "string") { + return "" + n.value; + } // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2 + // See corresponding workaround in needs-parens.js + + + var grandParent = path$$1.getParentNode(1); + var isTypeScriptDirective = options.parser === "typescript" && typeof n.value === "string" && grandParent && (grandParent.type === "Program" || grandParent.type === "BlockStatement"); + return nodeStr(n, options, isTypeScriptDirective); + } + + case "Directive": + return path$$1.call(print, "value"); + // Babel 6 + + case "DirectiveLiteral": + return nodeStr(n, options); + + case "UnaryExpression": + parts.push(n.operator); + + if (/[a-z]$/.test(n.operator)) { + parts.push(" "); + } + + parts.push(path$$1.call(print, "argument")); + return concat$4(parts); + + case "UpdateExpression": + parts.push(path$$1.call(print, "argument"), n.operator); + + if (n.prefix) { + parts.reverse(); + } + + return concat$4(parts); + + case "ConditionalExpression": + return printTernaryOperator(path$$1, options, print, { + beforeParts: function beforeParts() { + return [path$$1.call(print, "test")]; + }, + afterParts: function afterParts(breakClosingParen) { + return [breakClosingParen ? softline$1 : ""]; + }, + shouldCheckJsx: true, + conditionalNodeType: "ConditionalExpression", + consequentNodePropertyName: "consequent", + alternateNodePropertyName: "alternate", + testNodePropertyName: "test", + breakNested: true + }); + + case "VariableDeclaration": + { + var printed = path$$1.map(function (childPath) { + return print(childPath); + }, "declarations"); // We generally want to terminate all variable declarations with a + // semicolon, except when they in the () part of for loops. + + var parentNode = path$$1.getParentNode(); + var isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement" || parentNode.type === "ForAwaitStatement"; + var hasValue = n.declarations.some(function (decl) { + return decl.init; + }); + var firstVariable; + + if (printed.length === 1 && !n.declarations[0].comments) { + firstVariable = printed[0]; + } else if (printed.length > 0) { + // Indent first var to comply with eslint one-var rule + firstVariable = indent$2(printed[0]); + } + + parts = [isNodeStartingWithDeclare(n, options) ? "declare " : "", n.kind, firstVariable ? concat$4([" ", firstVariable]) : "", indent$2(concat$4(printed.slice(1).map(function (p) { + return concat$4([",", hasValue && !isParentForLoop ? hardline$3 : line$3, p]); + })))]; + + if (!(isParentForLoop && parentNode.body !== n)) { + parts.push(semi); + } + + return group$1(concat$4(parts)); + } + + case "VariableDeclarator": + return printAssignment(n.id, concat$4([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]), " =", n.init, n.init && path$$1.call(print, "init"), options); + + case "WithStatement": + return group$1(concat$4(["with (", path$$1.call(print, "object"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); + + case "IfStatement": + { + var con = adjustClause(n.consequent, path$$1.call(print, "consequent")); + var opening = group$1(concat$4(["if (", group$1(concat$4([indent$2(concat$4([softline$1, path$$1.call(print, "test")])), softline$1])), ")", con])); + parts.push(opening); + + if (n.alternate) { + var commentOnOwnLine = hasTrailingComment(n.consequent) && n.consequent.comments.some(function (comment) { + return comment.trailing && !comments$3.isBlockComment(comment); + }) || needsHardlineAfterDanglingComment(n); + var elseOnSameLine = n.consequent.type === "BlockStatement" && !commentOnOwnLine; + parts.push(elseOnSameLine ? " " : hardline$3); + + if (hasDanglingComments(n)) { + parts.push(comments.printDanglingComments(path$$1, options, true), commentOnOwnLine ? hardline$3 : " "); + } + + parts.push("else", group$1(adjustClause(n.alternate, path$$1.call(print, "alternate"), n.alternate.type === "IfStatement"))); + } + + return concat$4(parts); + } + + case "ForStatement": + { + var _body = adjustClause(n.body, path$$1.call(print, "body")); // We want to keep dangling comments above the loop to stay consistent. + // Any comment positioned between the for statement and the parentheses + // is going to be printed before the statement. + + + var _dangling = comments.printDanglingComments(path$$1, options, + /* sameLine */ + true); + + var printedComments = _dangling ? concat$4([_dangling, softline$1]) : ""; + + if (!n.init && !n.test && !n.update) { + return concat$4([printedComments, group$1(concat$4(["for (;;)", _body]))]); + } + + return concat$4([printedComments, group$1(concat$4(["for (", group$1(concat$4([indent$2(concat$4([softline$1, path$$1.call(print, "init"), ";", line$3, path$$1.call(print, "test"), ";", line$3, path$$1.call(print, "update")])), softline$1])), ")", _body]))]); + } + + case "WhileStatement": + return group$1(concat$4(["while (", group$1(concat$4([indent$2(concat$4([softline$1, path$$1.call(print, "test")])), softline$1])), ")", adjustClause(n.body, path$$1.call(print, "body"))])); + + case "ForInStatement": + // Note: esprima can't actually parse "for each (". + return group$1(concat$4([n.each ? "for each (" : "for (", path$$1.call(print, "left"), " in ", path$$1.call(print, "right"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); + + case "ForOfStatement": + case "ForAwaitStatement": + { + // Babylon 7 removed ForAwaitStatement in favor of ForOfStatement + // with `"await": true`: + // https://github.com/estree/estree/pull/138 + var isAwait = n.type === "ForAwaitStatement" || n.await; + return group$1(concat$4(["for", isAwait ? " await" : "", " (", path$$1.call(print, "left"), " of ", path$$1.call(print, "right"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); + } + + case "DoWhileStatement": + { + var clause = adjustClause(n.body, path$$1.call(print, "body")); + var doBody = group$1(concat$4(["do", clause])); + parts = [doBody]; + + if (n.body.type === "BlockStatement") { + parts.push(" "); + } else { + parts.push(hardline$3); + } + + parts.push("while ("); + parts.push(group$1(concat$4([indent$2(concat$4([softline$1, path$$1.call(print, "test")])), softline$1])), ")", semi); + return concat$4(parts); + } + + case "DoExpression": + return concat$4(["do ", path$$1.call(print, "body")]); + + case "BreakStatement": + parts.push("break"); + + if (n.label) { + parts.push(" ", path$$1.call(print, "label")); + } + + parts.push(semi); + return concat$4(parts); + + case "ContinueStatement": + parts.push("continue"); + + if (n.label) { + parts.push(" ", path$$1.call(print, "label")); + } + + parts.push(semi); + return concat$4(parts); + + case "LabeledStatement": + if (n.body.type === "EmptyStatement") { + return concat$4([path$$1.call(print, "label"), ":;"]); + } + + return concat$4([path$$1.call(print, "label"), ": ", path$$1.call(print, "body")]); + + case "TryStatement": + return concat$4(["try ", path$$1.call(print, "block"), n.handler ? concat$4([" ", path$$1.call(print, "handler")]) : "", n.finalizer ? concat$4([" finally ", path$$1.call(print, "finalizer")]) : ""]); + + case "CatchClause": + if (n.param) { + var hasComments = n.param.comments && n.param.comments.some(function (comment) { + return !comments$3.isBlockComment(comment) || comment.leading && hasNewline$2(options.originalText, options.locEnd(comment)) || comment.trailing && hasNewline$2(options.originalText, options.locStart(comment), { + backwards: true + }); + }); + var param = path$$1.call(print, "param"); + return concat$4(["catch ", hasComments ? concat$4(["(", indent$2(concat$4([softline$1, param])), softline$1, ") "]) : concat$4(["(", param, ") "]), path$$1.call(print, "body")]); + } + + return concat$4(["catch ", path$$1.call(print, "body")]); + + case "ThrowStatement": + return concat$4(["throw ", path$$1.call(print, "argument"), semi]); + // Note: ignoring n.lexical because it has no printing consequences. + + case "SwitchStatement": + return concat$4([group$1(concat$4(["switch (", indent$2(concat$4([softline$1, path$$1.call(print, "discriminant")])), softline$1, ")"])), " {", n.cases.length > 0 ? indent$2(concat$4([hardline$3, join$2(hardline$3, path$$1.map(function (casePath) { + var caseNode = casePath.getValue(); + return concat$4([casePath.call(print), n.cases.indexOf(caseNode) !== n.cases.length - 1 && isNextLineEmpty$2(options.originalText, caseNode, options) ? hardline$3 : ""]); + }, "cases"))])) : "", hardline$3, "}"]); + + case "SwitchCase": + { + if (n.test) { + parts.push("case ", path$$1.call(print, "test"), ":"); + } else { + parts.push("default:"); + } + + var consequent = n.consequent.filter(function (node) { + return node.type !== "EmptyStatement"; + }); + + if (consequent.length > 0) { + var cons = path$$1.call(function (consequentPath) { + return printStatementSequence(consequentPath, options, print); + }, "consequent"); + parts.push(consequent.length === 1 && consequent[0].type === "BlockStatement" ? concat$4([" ", cons]) : indent$2(concat$4([hardline$3, cons]))); + } + + return concat$4(parts); + } + // JSX extensions below. + + case "DebuggerStatement": + return concat$4(["debugger", semi]); + + case "JSXAttribute": + parts.push(path$$1.call(print, "name")); + + if (n.value) { + var res; + + if (isStringLiteral(n.value)) { + var raw = rawText(n.value); // Unescape all quotes so we get an accurate preferred quote + + var final = raw.replace(/'/g, "'").replace(/"/g, '"'); + var quote = getPreferredQuote$1(final, options.jsxSingleQuote ? "'" : '"'); + + var _escape = quote === "'" ? "'" : """; + + final = final.slice(1, -1).replace(new RegExp(quote, "g"), _escape); + res = concat$4([quote, final, quote]); + } else { + res = path$$1.call(print, "value"); + } + + parts.push("=", res); + } + + return concat$4(parts); + + case "JSXIdentifier": + return "" + n.name; + + case "JSXNamespacedName": + return join$2(":", [path$$1.call(print, "namespace"), path$$1.call(print, "name")]); + + case "JSXMemberExpression": + return join$2(".", [path$$1.call(print, "object"), path$$1.call(print, "property")]); + + case "TSQualifiedName": + return join$2(".", [path$$1.call(print, "left"), path$$1.call(print, "right")]); + + case "JSXSpreadAttribute": + case "JSXSpreadChild": + { + return concat$4(["{", path$$1.call(function (p) { + var printed = concat$4(["...", print(p)]); + var n = p.getValue(); + + if (!n.comments || !n.comments.length) { + return printed; + } + + return concat$4([indent$2(concat$4([softline$1, comments.printComments(p, function () { + return printed; + }, options)])), softline$1]); + }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"]); + } + + case "JSXExpressionContainer": + { + var _parent5 = path$$1.getParentNode(0); + + var preventInline = _parent5.type === "JSXAttribute" && n.expression.comments && n.expression.comments.length > 0; + + var _shouldInline = !preventInline && (n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "OptionalCallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "JSXEmptyExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode(_parent5) && (n.expression.type === "ConditionalExpression" || isBinaryish(n.expression))); + + if (_shouldInline) { + return group$1(concat$4(["{", path$$1.call(print, "expression"), lineSuffixBoundary$1, "}"])); + } + + return group$1(concat$4(["{", indent$2(concat$4([softline$1, path$$1.call(print, "expression")])), softline$1, lineSuffixBoundary$1, "}"])); + } + + case "JSXFragment": + case "TSJsxFragment": + case "JSXElement": + { + var elem = comments.printComments(path$$1, function () { + return printJSXElement(path$$1, options, print); + }, options); + return maybeWrapJSXElementInParens(path$$1, elem); + } + + case "JSXOpeningElement": + { + var _n = path$$1.getValue(); + + var nameHasComments = _n.name && _n.name.comments && _n.name.comments.length > 0; // Don't break self-closing elements with no attributes and no comments + + if (_n.selfClosing && !_n.attributes.length && !nameHasComments) { + return concat$4(["<", path$$1.call(print, "name"), path$$1.call(print, "typeParameters"), " />"]); + } // don't break up opening elements with a single long text attribute + + + if (_n.attributes && _n.attributes.length === 1 && _n.attributes[0].value && isStringLiteral(_n.attributes[0].value) && !_n.attributes[0].value.value.includes("\n") && // We should break for the following cases: + //
+ //
+ !nameHasComments && (!_n.attributes[0].comments || !_n.attributes[0].comments.length)) { + return group$1(concat$4(["<", path$$1.call(print, "name"), path$$1.call(print, "typeParameters"), " ", concat$4(path$$1.map(print, "attributes")), _n.selfClosing ? " />" : ">"])); + } + + var lastAttrHasTrailingComments = _n.attributes.length && hasTrailingComment(getLast$4(_n.attributes)); + var bracketSameLine = // Simple tags (no attributes and no comment in tag name) should be + // kept unbroken regardless of `jsxBracketSameLine` + !_n.attributes.length && !nameHasComments || options.jsxBracketSameLine && ( // We should print the bracket in a new line for the following cases: + //
+ //
+ !nameHasComments || _n.attributes.length) && !lastAttrHasTrailingComments; // We should print the opening element expanded if any prop value is a + // string literal with newlines + + var _shouldBreak = _n.attributes && _n.attributes.some(function (attr) { + return attr.value && isStringLiteral(attr.value) && attr.value.value.includes("\n"); + }); + + return group$1(concat$4(["<", path$$1.call(print, "name"), path$$1.call(print, "typeParameters"), concat$4([indent$2(concat$4(path$$1.map(function (attr) { + return concat$4([line$3, print(attr)]); + }, "attributes"))), _n.selfClosing ? line$3 : bracketSameLine ? ">" : softline$1]), _n.selfClosing ? "/>" : bracketSameLine ? "" : ">"]), { + shouldBreak: _shouldBreak + }); + } + + case "JSXClosingElement": + return concat$4([""]); + + case "JSXOpeningFragment": + case "JSXClosingFragment": + case "TSJsxOpeningFragment": + case "TSJsxClosingFragment": + { + var hasComment = n.comments && n.comments.length; + var hasOwnLineComment = hasComment && !n.comments.every(comments$3.isBlockComment); + var isOpeningFragment = n.type === "JSXOpeningFragment" || n.type === "TSJsxOpeningFragment"; + return concat$4([isOpeningFragment ? "<" : ""]); + } + + case "JSXText": + /* istanbul ignore next */ + throw new Error("JSXTest should be handled by JSXElement"); + + case "JSXEmptyExpression": + { + var requiresHardline = n.comments && !n.comments.every(comments$3.isBlockComment); + return concat$4([comments.printDanglingComments(path$$1, options, + /* sameIndent */ + !requiresHardline), requiresHardline ? hardline$3 : ""]); + } + + case "ClassBody": + if (!n.comments && n.body.length === 0) { + return "{}"; + } + + return concat$4(["{", n.body.length > 0 ? indent$2(concat$4([hardline$3, path$$1.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body")])) : comments.printDanglingComments(path$$1, options), hardline$3, "}"]); + + case "ClassProperty": + case "TSAbstractClassProperty": + case "ClassPrivateProperty": + { + if (n.decorators && n.decorators.length !== 0) { + parts.push(printDecorators(path$$1, options, print)); + } + + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.type === "TSAbstractClassProperty") { + parts.push("abstract "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + var variance = getFlowVariance(n); + + if (variance) { + parts.push(variance); + } + + if (n.computed) { + parts.push("[", path$$1.call(print, "key"), "]"); + } else { + parts.push(printPropertyKey(path$$1, options, print)); + } + + parts.push(printOptionalToken(path$$1)); + parts.push(printTypeAnnotation(path$$1, options, print)); + + if (n.value) { + parts.push(" =", printAssignmentRight(n.key, n.value, path$$1.call(print, "value"), options)); + } + + parts.push(semi); + return group$1(concat$4(parts)); + } + + case "ClassDeclaration": + case "ClassExpression": + case "TSAbstractClassDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(concat$4(printClass(path$$1, options, print))); + return concat$4(parts); + + case "TSInterfaceHeritage": + parts.push(path$$1.call(print, "id")); + + if (n.typeParameters) { + parts.push(path$$1.call(print, "typeParameters")); + } + + return concat$4(parts); + + case "TemplateElement": + return join$2(literalline$1, n.value.raw.split(/\r?\n/g)); + + case "TemplateLiteral": + { + var expressions = path$$1.map(print, "expressions"); + + var _parentNode = path$$1.getParentNode(); + /** + * describe.each`table`(name, fn) + * describe.only.each`table`(name, fn) + * describe.skip.each`table`(name, fn) + * test.each`table`(name, fn) + * test.only.each`table`(name, fn) + * test.skip.each`table`(name, fn) + * + * Ref: https://github.com/facebook/jest/pull/6102 + */ + + + var jestEachTriggerRegex = /^[xf]?(describe|it|test)$/; + + if (_parentNode.type === "TaggedTemplateExpression" && _parentNode.quasi === n && _parentNode.tag.type === "MemberExpression" && _parentNode.tag.property.type === "Identifier" && _parentNode.tag.property.name === "each" && (_parentNode.tag.object.type === "Identifier" && jestEachTriggerRegex.test(_parentNode.tag.object.name) || _parentNode.tag.object.type === "MemberExpression" && _parentNode.tag.object.property.type === "Identifier" && (_parentNode.tag.object.property.name === "only" || _parentNode.tag.object.property.name === "skip") && _parentNode.tag.object.object.type === "Identifier" && jestEachTriggerRegex.test(_parentNode.tag.object.object.name))) { + /** + * a | b | expected + * ${1} | ${1} | ${2} + * ${1} | ${2} | ${3} + * ${2} | ${1} | ${3} + */ + var headerNames = n.quasis[0].value.raw.trim().split(/\s*\|\s*/); + + if (headerNames.length > 1 || headerNames.some(function (headerName) { + return headerName.length !== 0; + })) { + var stringifiedExpressions = expressions.map(function (doc$$2) { + return "${" + printDocToString$2(doc$$2, Object.assign({}, options, { + printWidth: Infinity + })).formatted + "}"; + }); + var tableBody = [{ + hasLineBreak: false, + cells: [] + }]; + + for (var _i = 1; _i < n.quasis.length; _i++) { + var row = tableBody[tableBody.length - 1]; + var correspondingExpression = stringifiedExpressions[_i - 1]; + row.cells.push(correspondingExpression); + + if (correspondingExpression.indexOf("\n") !== -1) { + row.hasLineBreak = true; + } + + if (n.quasis[_i].value.raw.indexOf("\n") !== -1) { + tableBody.push({ + hasLineBreak: false, + cells: [] + }); + } + } + + var maxColumnCount = tableBody.reduce(function (maxColumnCount, row) { + return Math.max(maxColumnCount, row.cells.length); + }, headerNames.length); + var maxColumnWidths = Array.from(new Array(maxColumnCount), function () { + return 0; + }); + var table = [{ + cells: headerNames + }].concat(tableBody.filter(function (row) { + return row.cells.length !== 0; + })); + table.filter(function (row) { + return !row.hasLineBreak; + }).forEach(function (row) { + row.cells.forEach(function (cell, index) { + maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth$2(cell)); + }); + }); + parts.push("`", indent$2(concat$4([hardline$3, join$2(hardline$3, table.map(function (row) { + return join$2(" | ", row.cells.map(function (cell, index) { + return row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth$2(cell)); + })); + }))])), hardline$3, "`"); + return concat$4(parts); + } + } + + parts.push("`"); + path$$1.each(function (childPath) { + var i = childPath.getName(); + parts.push(print(childPath)); + + if (i < expressions.length) { + // For a template literal of the following form: + // `someQuery { + // ${call({ + // a, + // b, + // })} + // }` + // the expression is on its own line (there is a \n in the previous + // quasi literal), therefore we want to indent the JavaScript + // expression inside at the beginning of ${ instead of the beginning + // of the `. + var tabWidth = options.tabWidth; + var indentSize = getIndentSize$1(childPath.getValue().value.raw, tabWidth); + var _printed = expressions[i]; + + if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression") { + _printed = concat$4([indent$2(concat$4([softline$1, _printed])), softline$1]); + } + + var aligned = addAlignmentToDoc$2(_printed, indentSize, tabWidth); + parts.push(group$1(concat$4(["${", aligned, lineSuffixBoundary$1, "}"]))); + } + }, "quasis"); + parts.push("`"); + return concat$4(parts); + } + // These types are unprintable because they serve as abstract + // supertypes for other (printable) types. + + case "TaggedTemplateExpression": + return concat$4([path$$1.call(print, "tag"), path$$1.call(print, "typeParameters"), path$$1.call(print, "quasi")]); + + case "Node": + case "Printable": + case "SourceLocation": + case "Position": + case "Statement": + case "Function": + case "Pattern": + case "Expression": + case "Declaration": + case "Specifier": + case "NamedSpecifier": + case "Comment": + case "MemberTypeAnnotation": // Flow + + case "Type": + /* istanbul ignore next */ + throw new Error("unprintable type: " + JSON.stringify(n.type)); + // Type Annotations for Facebook Flow, typically stripped out or + // transformed away before printing. + + case "TypeAnnotation": + case "TSTypeAnnotation": + if (n.typeAnnotation) { + return path$$1.call(print, "typeAnnotation"); + } + /* istanbul ignore next */ + + + return ""; + + case "TSTupleType": + case "TupleTypeAnnotation": + { + var typesField = n.type === "TSTupleType" ? "elementTypes" : "types"; + return group$1(concat$4(["[", indent$2(concat$4([softline$1, printArrayItems(path$$1, options, typesField, print)])), // TypeScript doesn't support trailing commas in tuple types + n.type === "TSTupleType" ? "" : ifBreak$1(shouldPrintComma(options) ? "," : ""), comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), softline$1, "]"])); + } + + case "ExistsTypeAnnotation": + return "*"; + + case "EmptyTypeAnnotation": + return "empty"; + + case "AnyTypeAnnotation": + return "any"; + + case "MixedTypeAnnotation": + return "mixed"; + + case "ArrayTypeAnnotation": + return concat$4([path$$1.call(print, "elementType"), "[]"]); + + case "BooleanTypeAnnotation": + return "boolean"; + + case "BooleanLiteralTypeAnnotation": + return "" + n.value; + + case "DeclareClass": + return printFlowDeclaration(path$$1, printClass(path$$1, options, print)); + + case "DeclareFunction": + // For TypeScript the DeclareFunction node shares the AST + // structure with FunctionDeclaration + if (n.params) { + return concat$4(["declare ", printFunctionDeclaration(path$$1, print, options), semi]); + } + + return printFlowDeclaration(path$$1, ["function ", path$$1.call(print, "id"), n.predicate ? " " : "", path$$1.call(print, "predicate"), semi]); + + case "DeclareModule": + return printFlowDeclaration(path$$1, ["module ", path$$1.call(print, "id"), " ", path$$1.call(print, "body")]); + + case "DeclareModuleExports": + return printFlowDeclaration(path$$1, ["module.exports", ": ", path$$1.call(print, "typeAnnotation"), semi]); + + case "DeclareVariable": + return printFlowDeclaration(path$$1, ["var ", path$$1.call(print, "id"), semi]); + + case "DeclareExportAllDeclaration": + return concat$4(["declare export * from ", path$$1.call(print, "source")]); + + case "DeclareExportDeclaration": + return concat$4(["declare ", printExportDeclaration(path$$1, options, print)]); + + case "DeclareOpaqueType": + case "OpaqueType": + { + parts.push("opaque type ", path$$1.call(print, "id"), path$$1.call(print, "typeParameters")); + + if (n.supertype) { + parts.push(": ", path$$1.call(print, "supertype")); + } + + if (n.impltype) { + parts.push(" = ", path$$1.call(print, "impltype")); + } + + parts.push(semi); + + if (n.type === "DeclareOpaqueType") { + return printFlowDeclaration(path$$1, parts); + } + + return concat$4(parts); + } + + case "FunctionTypeAnnotation": + case "TSFunctionType": + { + // FunctionTypeAnnotation is ambiguous: + // declare function foo(a: B): void; OR + // var A: (a: B) => void; + var _parent6 = path$$1.getParentNode(0); + + var _parentParent2 = path$$1.getParentNode(1); + + var _parentParentParent = path$$1.getParentNode(2); + + var isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !((_parent6.type === "ObjectTypeProperty" || _parent6.type === "ObjectTypeInternalSlot") && !getFlowVariance(_parent6) && !_parent6.optional && options.locStart(_parent6) === options.locStart(n) || _parent6.type === "ObjectTypeCallProperty" || _parentParentParent && _parentParentParent.type === "DeclareFunction"); + var needsColon = isArrowFunctionTypeAnnotation && (_parent6.type === "TypeAnnotation" || _parent6.type === "TSTypeAnnotation"); // Sadly we can't put it inside of FastPath::needsColon because we are + // printing ":" as part of the expression and it would put parenthesis + // around :( + + var needsParens = needsColon && isArrowFunctionTypeAnnotation && (_parent6.type === "TypeAnnotation" || _parent6.type === "TSTypeAnnotation") && _parentParent2.type === "ArrowFunctionExpression"; + + if (isObjectTypePropertyAFunction(_parent6, options)) { + isArrowFunctionTypeAnnotation = true; + needsColon = true; + } + + if (needsParens) { + parts.push("("); + } + + parts.push(printFunctionParams(path$$1, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true)); // The returnType is not wrapped in a TypeAnnotation, so the colon + // needs to be added separately. + + if (n.returnType || n.predicate || n.typeAnnotation) { + parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path$$1.call(print, "returnType"), path$$1.call(print, "predicate"), path$$1.call(print, "typeAnnotation")); + } + + if (needsParens) { + parts.push(")"); + } + + return group$1(concat$4(parts)); + } + + case "TSRestType": + return concat$4(["...", path$$1.call(print, "typeAnnotation")]); + + case "TSOptionalType": + return concat$4([path$$1.call(print, "typeAnnotation"), "?"]); + + case "FunctionTypeParam": + return concat$4([path$$1.call(print, "name"), printOptionalToken(path$$1), n.name ? ": " : "", path$$1.call(print, "typeAnnotation")]); + + case "GenericTypeAnnotation": + return concat$4([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]); + + case "DeclareInterface": + case "InterfaceDeclaration": + case "InterfaceTypeAnnotation": + { + if (n.type === "DeclareInterface" || isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push("interface"); + + if (n.type === "DeclareInterface" || n.type === "InterfaceDeclaration") { + parts.push(" ", path$$1.call(print, "id"), path$$1.call(print, "typeParameters")); + } + + if (n["extends"].length > 0) { + parts.push(group$1(indent$2(concat$4([line$3, "extends ", (n.extends.length === 1 ? identity$1 : indent$2)(join$2(concat$4([",", line$3]), path$$1.map(print, "extends")))])))); + } + + parts.push(" ", path$$1.call(print, "body")); + return group$1(concat$4(parts)); + } + + case "ClassImplements": + case "InterfaceExtends": + return concat$4([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]); + + case "TSIntersectionType": + case "IntersectionTypeAnnotation": + { + var types = path$$1.map(print, "types"); + var result = []; + var wasIndented = false; + + for (var _i2 = 0; _i2 < types.length; ++_i2) { + if (_i2 === 0) { + result.push(types[_i2]); + } else if (isObjectType(n.types[_i2 - 1]) && isObjectType(n.types[_i2])) { + // If both are objects, don't indent + result.push(concat$4([" & ", wasIndented ? indent$2(types[_i2]) : types[_i2]])); + } else if (!isObjectType(n.types[_i2 - 1]) && !isObjectType(n.types[_i2])) { + // If no object is involved, go to the next line if it breaks + result.push(indent$2(concat$4([" &", line$3, types[_i2]]))); + } else { + // If you go from object to non-object or vis-versa, then inline it + if (_i2 > 1) { + wasIndented = true; + } + + result.push(" & ", _i2 > 1 ? indent$2(types[_i2]) : types[_i2]); + } + } + + return group$1(concat$4(result)); + } + + case "TSUnionType": + case "UnionTypeAnnotation": + { + // single-line variation + // A | B | C + // multi-line variation + // | A + // | B + // | C + var _parent7 = path$$1.getParentNode(); + + var _parentParent3 = path$$1.getParentNode(1); // If there's a leading comment, the parent is doing the indentation + + + var shouldIndent = _parent7.type !== "TypeParameterInstantiation" && _parent7.type !== "TSTypeParameterInstantiation" && _parent7.type !== "GenericTypeAnnotation" && _parent7.type !== "TSTypeReference" && !(_parent7.type === "FunctionTypeParam" && !_parent7.name) && _parentParent3.type !== "TSTypeAssertionExpression" && !((_parent7.type === "TypeAlias" || _parent7.type === "VariableDeclarator") && hasLeadingOwnLineComment(options.originalText, n, options)); // { + // a: string + // } | null | void + // should be inlined and not be printed in the multi-line variant + + var shouldHug = shouldHugType(n); // We want to align the children but without its comment, so it looks like + // | child1 + // // comment + // | child2 + + var _printed2 = path$$1.map(function (typePath) { + var printedType = typePath.call(print); + + if (!shouldHug) { + printedType = align$1(2, printedType); + } + + return comments.printComments(typePath, function () { + return printedType; + }, options); + }, "types"); + + if (shouldHug) { + return join$2(" | ", _printed2); + } + + var code = concat$4([ifBreak$1(concat$4([shouldIndent ? line$3 : "", "| "])), join$2(concat$4([line$3, "| "]), _printed2)]); + var hasParens; + + if (n.type === "TSUnionType") { + var greatGrandParent = path$$1.getParentNode(2); + var greatGreatGrandParent = path$$1.getParentNode(3); + hasParens = greatGrandParent && greatGrandParent.type === "TSParenthesizedType" && greatGreatGrandParent && (greatGreatGrandParent.type === "TSUnionType" || greatGreatGrandParent.type === "TSIntersectionType"); + } else { + hasParens = needsParens_1(path$$1, options); + } + + if (hasParens) { + return group$1(concat$4([indent$2(code), softline$1])); + } + + return group$1(shouldIndent ? indent$2(code) : code); + } + + case "NullableTypeAnnotation": + return concat$4(["?", path$$1.call(print, "typeAnnotation")]); + + case "TSNullKeyword": + case "NullLiteralTypeAnnotation": + return "null"; + + case "ThisTypeAnnotation": + return "this"; + + case "NumberTypeAnnotation": + return "number"; + + case "ObjectTypeCallProperty": + if (n.static) { + parts.push("static "); + } + + parts.push(path$$1.call(print, "value")); + return concat$4(parts); + + case "ObjectTypeIndexer": + { + var _variance = getFlowVariance(n); + + return concat$4([_variance || "", "[", path$$1.call(print, "id"), n.id ? ": " : "", path$$1.call(print, "key"), "]: ", path$$1.call(print, "value")]); + } + + case "ObjectTypeProperty": + { + var _variance2 = getFlowVariance(n); + + var modifier = ""; + + if (n.proto) { + modifier = "proto "; + } else if (n.static) { + modifier = "static "; + } + + return concat$4([modifier, isGetterOrSetter(n) ? n.kind + " " : "", _variance2 || "", printPropertyKey(path$$1, options, print), printOptionalToken(path$$1), isFunctionNotation(n, options) ? "" : ": ", path$$1.call(print, "value")]); + } + + case "QualifiedTypeIdentifier": + return concat$4([path$$1.call(print, "qualification"), ".", path$$1.call(print, "id")]); + + case "StringLiteralTypeAnnotation": + return nodeStr(n, options); + + case "NumberLiteralTypeAnnotation": + assert.strictEqual(typeof n.value, "number"); + + if (n.extra != null) { + return printNumber$1(n.extra.raw); + } + + return printNumber$1(n.raw); + + case "StringTypeAnnotation": + return "string"; + + case "DeclareTypeAlias": + case "TypeAlias": + { + if (n.type === "DeclareTypeAlias" || isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + var _printed3 = printAssignmentRight(n.id, n.right, path$$1.call(print, "right"), options); + + parts.push("type ", path$$1.call(print, "id"), path$$1.call(print, "typeParameters"), " =", _printed3, semi); + return group$1(concat$4(parts)); + } + + case "TypeCastExpression": + { + var value = path$$1.getValue(); // Flow supports a comment syntax for specifying type annotations: https://flow.org/en/docs/types/comments/. + // Unfortunately, its parser doesn't differentiate between comment annotations and regular + // annotations when producing an AST. So to preserve parentheses around type casts that use + // the comment syntax, we need to hackily read the source itself to see if the code contains + // a type annotation comment. + // + // Note that we're able to use the normal whitespace regex here because the Flow parser has + // already deemed this AST node to be a type cast. Only the Babylon parser needs the + // non-line-break whitespace regex, which is why hasFlowShorthandAnnotationComment() is + // implemented differently. + + var commentSyntax = value && value.typeAnnotation && value.typeAnnotation.range && options.originalText.substring(value.typeAnnotation.range[0]).match(/^\/\*\s*:/); + return concat$4(["(", path$$1.call(print, "expression"), commentSyntax ? " /*" : "", ": ", path$$1.call(print, "typeAnnotation"), commentSyntax ? " */" : "", ")"]); + } + + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": + { + var _value = path$$1.getValue(); + + var commentStart = _value.range ? options.originalText.substring(0, _value.range[0]).lastIndexOf("/*") : -1; // As noted in the TypeCastExpression comments above, we're able to use a normal whitespace regex here + // because we know for sure that this is a type definition. + + var _commentSyntax = commentStart >= 0 && options.originalText.substring(commentStart).match(/^\/\*\s*::/); + + if (_commentSyntax) { + return concat$4(["/*:: ", printTypeParameters(path$$1, options, print, "params"), " */"]); + } + + return printTypeParameters(path$$1, options, print, "params"); + } + + case "TSTypeParameterDeclaration": + case "TSTypeParameterInstantiation": + return printTypeParameters(path$$1, options, print, "params"); + + case "TSTypeParameter": + case "TypeParameter": + { + var _parent8 = path$$1.getParentNode(); + + if (_parent8.type === "TSMappedType") { + parts.push("[", path$$1.call(print, "name")); + + if (n.constraint) { + parts.push(" in ", path$$1.call(print, "constraint")); + } + + parts.push("]"); + return concat$4(parts); + } + + var _variance3 = getFlowVariance(n); + + if (_variance3) { + parts.push(_variance3); + } + + parts.push(path$$1.call(print, "name")); + + if (n.bound) { + parts.push(": "); + parts.push(path$$1.call(print, "bound")); + } + + if (n.constraint) { + parts.push(" extends ", path$$1.call(print, "constraint")); + } + + if (n["default"]) { + parts.push(" = ", path$$1.call(print, "default")); + } + + return concat$4(parts); + } + + case "TypeofTypeAnnotation": + return concat$4(["typeof ", path$$1.call(print, "argument")]); + + case "VoidTypeAnnotation": + return "void"; + + case "InferredPredicate": + return "%checks"; + // Unhandled types below. If encountered, nodes of these types should + // be either left alone or desugared into AST types that are fully + // supported by the pretty-printer. + + case "DeclaredPredicate": + return concat$4(["%checks(", path$$1.call(print, "value"), ")"]); + + case "TSAbstractKeyword": + return "abstract"; + + case "TSAnyKeyword": + return "any"; + + case "TSAsyncKeyword": + return "async"; + + case "TSBooleanKeyword": + return "boolean"; + + case "TSConstKeyword": + return "const"; + + case "TSDeclareKeyword": + return "declare"; + + case "TSExportKeyword": + return "export"; + + case "TSNeverKeyword": + return "never"; + + case "TSNumberKeyword": + return "number"; + + case "TSObjectKeyword": + return "object"; + + case "TSProtectedKeyword": + return "protected"; + + case "TSPrivateKeyword": + return "private"; + + case "TSPublicKeyword": + return "public"; + + case "TSReadonlyKeyword": + return "readonly"; + + case "TSSymbolKeyword": + return "symbol"; + + case "TSStaticKeyword": + return "static"; + + case "TSStringKeyword": + return "string"; + + case "TSUndefinedKeyword": + return "undefined"; + + case "TSUnknownKeyword": + return "unknown"; + + case "TSVoidKeyword": + return "void"; + + case "TSAsExpression": + return concat$4([path$$1.call(print, "expression"), " as ", path$$1.call(print, "typeAnnotation")]); + + case "TSArrayType": + return concat$4([path$$1.call(print, "elementType"), "[]"]); + + case "TSPropertySignature": + { + if (n.export) { + parts.push("export "); + } + + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + if (n.computed) { + parts.push("["); + } + + parts.push(printPropertyKey(path$$1, options, print)); + + if (n.computed) { + parts.push("]"); + } + + parts.push(printOptionalToken(path$$1)); + + if (n.typeAnnotation) { + parts.push(": "); + parts.push(path$$1.call(print, "typeAnnotation")); + } // This isn't valid semantically, but it's in the AST so we can print it. + + + if (n.initializer) { + parts.push(" = ", path$$1.call(print, "initializer")); + } + + return concat$4(parts); + } + + case "TSParameterProperty": + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.export) { + parts.push("export "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + parts.push(path$$1.call(print, "parameter")); + return concat$4(parts); + + case "TSTypeReference": + return concat$4([path$$1.call(print, "typeName"), printTypeParameters(path$$1, options, print, "typeParameters")]); + + case "TSTypeQuery": + return concat$4(["typeof ", path$$1.call(print, "exprName")]); + + case "TSParenthesizedType": + { + return path$$1.call(print, "typeAnnotation"); + } + + case "TSIndexSignature": + { + var _parent9 = path$$1.getParentNode(); + + return concat$4([n.export ? "export " : "", n.accessibility ? concat$4([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", path$$1.call(print, "index"), "]: ", path$$1.call(print, "typeAnnotation"), _parent9.type === "ClassBody" ? semi : ""]); + } + + case "TSTypePredicate": + return concat$4([path$$1.call(print, "parameterName"), " is ", path$$1.call(print, "typeAnnotation")]); + + case "TSNonNullExpression": + return concat$4([path$$1.call(print, "expression"), "!"]); + + case "TSThisType": + return "this"; + + case "TSImportType": + return concat$4([!n.isTypeOf ? "" : "typeof ", "import(", path$$1.call(print, "parameter"), ")", !n.qualifier ? "" : concat$4([".", path$$1.call(print, "qualifier")]), printTypeParameters(path$$1, options, print, "typeParameters")]); + + case "TSLiteralType": + return path$$1.call(print, "literal"); + + case "TSIndexedAccessType": + return concat$4([path$$1.call(print, "objectType"), "[", path$$1.call(print, "indexType"), "]"]); + + case "TSConstructSignature": + case "TSConstructorType": + case "TSCallSignature": + { + if (n.type !== "TSCallSignature") { + parts.push("new "); + } + + parts.push(group$1(printFunctionParams(path$$1, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true))); + + if (n.typeAnnotation) { + var isType = n.type === "TSConstructorType"; + parts.push(isType ? " => " : ": ", path$$1.call(print, "typeAnnotation")); + } + + return concat$4(parts); + } + + case "TSTypeOperator": + return concat$4([n.operator, " ", path$$1.call(print, "typeAnnotation")]); + + case "TSMappedType": + return group$1(concat$4(["{", indent$2(concat$4([options.bracketSpacing ? line$3 : softline$1, n.readonlyToken ? concat$4([getTypeScriptMappedTypeModifier(n.readonlyToken, "readonly"), " "]) : "", printTypeScriptModifiers(path$$1, options, print), path$$1.call(print, "typeParameter"), n.questionToken ? getTypeScriptMappedTypeModifier(n.questionToken, "?") : "", ": ", path$$1.call(print, "typeAnnotation")])), comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), options.bracketSpacing ? line$3 : softline$1, "}"])); + + case "TSMethodSignature": + parts.push(n.accessibility ? concat$4([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path$$1.call(print, "key"), n.computed ? "]" : "", printOptionalToken(path$$1), printFunctionParams(path$$1, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true)); + + if (n.typeAnnotation) { + parts.push(": ", path$$1.call(print, "typeAnnotation")); + } + + return group$1(concat$4(parts)); + + case "TSNamespaceExportDeclaration": + parts.push("export as namespace ", path$$1.call(print, "name")); + + if (options.semi) { + parts.push(";"); + } + + return group$1(concat$4(parts)); + + case "TSEnumDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + if (n.modifiers) { + parts.push(printTypeScriptModifiers(path$$1, options, print)); + } + + if (n.const) { + parts.push("const "); + } + + parts.push("enum ", path$$1.call(print, "id"), " "); + + if (n.members.length === 0) { + parts.push(group$1(concat$4(["{", comments.printDanglingComments(path$$1, options), softline$1, "}"]))); + } else { + parts.push(group$1(concat$4(["{", indent$2(concat$4([hardline$3, printArrayItems(path$$1, options, "members", print), shouldPrintComma(options, "es5") ? "," : ""])), comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), hardline$3, "}"]))); + } + + return concat$4(parts); + + case "TSEnumMember": + parts.push(path$$1.call(print, "id")); + + if (n.initializer) { + parts.push(" = ", path$$1.call(print, "initializer")); + } + + return concat$4(parts); + + case "TSImportEqualsDeclaration": + parts.push(printTypeScriptModifiers(path$$1, options, print), "import ", path$$1.call(print, "name"), " = ", path$$1.call(print, "moduleReference")); + + if (options.semi) { + parts.push(";"); + } + + return group$1(concat$4(parts)); + + case "TSExternalModuleReference": + return concat$4(["require(", path$$1.call(print, "expression"), ")"]); + + case "TSModuleDeclaration": + { + var _parent10 = path$$1.getParentNode(); + + var isExternalModule = isLiteral(n.id); + var parentIsDeclaration = _parent10.type === "TSModuleDeclaration"; + var bodyIsDeclaration = n.body && n.body.type === "TSModuleDeclaration"; + + if (parentIsDeclaration) { + parts.push("."); + } else { + if (n.declare === true) { + parts.push("declare "); + } + + parts.push(printTypeScriptModifiers(path$$1, options, print)); + var textBetweenNodeAndItsId = options.originalText.slice(options.locStart(n), options.locStart(n.id)); // Global declaration looks like this: + // (declare)? global { ... } + + var isGlobalDeclaration = n.id.type === "Identifier" && n.id.name === "global" && !/namespace|module/.test(textBetweenNodeAndItsId); + + if (!isGlobalDeclaration) { + parts.push(isExternalModule || /\smodule\s/.test(textBetweenNodeAndItsId) ? "module " : "namespace "); + } + } + + parts.push(path$$1.call(print, "id")); + + if (bodyIsDeclaration) { + parts.push(path$$1.call(print, "body")); + } else if (n.body) { + parts.push(" {", indent$2(concat$4([line$3, path$$1.call(function (bodyPath) { + return comments.printDanglingComments(bodyPath, options, true); + }, "body"), group$1(path$$1.call(print, "body"))])), line$3, "}"); + } else { + parts.push(semi); + } + + return concat$4(parts); + } + + case "TSModuleBlock": + return path$$1.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); + + case "PrivateName": + return concat$4(["#", path$$1.call(print, "id")]); + + case "TSConditionalType": + return printTernaryOperator(path$$1, options, print, { + beforeParts: function beforeParts() { + return [path$$1.call(print, "checkType"), " ", "extends", " ", path$$1.call(print, "extendsType")]; + }, + afterParts: function afterParts() { + return []; + }, + shouldCheckJsx: false, + conditionalNodeType: "TSConditionalType", + consequentNodePropertyName: "trueType", + alternateNodePropertyName: "falseType", + testNodePropertyName: "checkType", + breakNested: true + }); + + case "TSInferType": + return concat$4(["infer", " ", path$$1.call(print, "typeParameter")]); + + case "InterpreterDirective": + parts.push("#!", n.value, hardline$3); + + if (isNextLineEmpty$2(options.originalText, n, options)) { + parts.push(hardline$3); + } + + return concat$4(parts); + + case "NGRoot": + return concat$4([].concat(path$$1.call(print, "node"), !n.node.comments || n.node.comments.length === 0 ? [] : concat$4([" //", n.node.comments[0].value.trimRight()]))); + + case "NGChainedExpression": + return group$1(join$2(concat$4([";", line$3]), path$$1.map(function (childPath) { + return hasNgSideEffect(childPath) ? print(childPath) : concat$4(["(", print(childPath), ")"]); + }, "expressions"))); + + case "NGEmptyExpression": + return ""; + + case "NGQuotedExpression": + return concat$4([n.prefix, ":", n.value]); + + case "NGMicrosyntax": + return concat$4(path$$1.map(function (childPath, index) { + return concat$4([index === 0 ? "" : isNgForOf(childPath) ? " " : concat$4([";", line$3]), print(childPath)]); + }, "body")); + + case "NGMicrosyntaxKey": + return /^[a-z_$][a-z0-9_$]*(-[a-z_$][a-z0-9_$])*$/i.test(n.name) ? n.name : JSON.stringify(n.name); + + case "NGMicrosyntaxExpression": + return concat$4([path$$1.call(print, "expression"), n.alias === null ? "" : concat$4([" as ", path$$1.call(print, "alias")])]); + + case "NGMicrosyntaxKeyedExpression": + return concat$4([path$$1.call(print, "key"), isNgForOf(path$$1) ? " " : ": ", path$$1.call(print, "expression")]); + + case "NGMicrosyntaxLet": + return concat$4(["let ", path$$1.call(print, "key"), n.value === null ? "" : concat$4([" = ", path$$1.call(print, "value")])]); + + case "NGMicrosyntaxAs": + return concat$4([path$$1.call(print, "key"), " as ", path$$1.call(print, "alias")]); + + default: + /* istanbul ignore next */ + throw new Error("unknown type: " + JSON.stringify(n.type)); + } +} +/** prefer `let hero of heros` over `let hero; of: heros` */ + + +function isNgForOf(path$$1) { + var node = path$$1.getValue(); + var index = path$$1.getName(); + var parentNode = path$$1.getParentNode(); + return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null; +} +/** identify if an angular expression seems to have side effects */ + + +function hasNgSideEffect(path$$1) { + return hasNode(path$$1.getValue(), function (node) { + switch (node.type) { + case undefined: + return false; + + case "CallExpression": + case "OptionalCallExpression": + case "AssignmentExpression": + return true; + } + }); +} + +function printStatementSequence(path$$1, options, print) { + var printed = []; + var bodyNode = path$$1.getNode(); + var isClass = bodyNode.type === "ClassBody"; + path$$1.map(function (stmtPath, i) { + var stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy + // "statements," it's safer simply to skip them. + + /* istanbul ignore if */ + + if (!stmt) { + return; + } // Skip printing EmptyStatement nodes to avoid leaving stray + // semicolons lying around. + + + if (stmt.type === "EmptyStatement") { + return; + } + + var stmtPrinted = print(stmtPath); + var text = options.originalText; + var parts = []; // in no-semi mode, prepend statement with semicolon if it might break ASI + // don't prepend the only JSX element in a program with semicolon + + if (!options.semi && !isClass && !isTheOnlyJSXElementInMarkdown(options, stmtPath) && stmtNeedsASIProtection(stmtPath, options)) { + if (stmt.comments && stmt.comments.some(function (comment) { + return comment.leading; + })) { + parts.push(print(stmtPath, { + needsSemi: true + })); + } else { + parts.push(";", stmtPrinted); + } + } else { + parts.push(stmtPrinted); + } + + if (!options.semi && isClass) { + if (classPropMayCauseASIProblems(stmtPath)) { + parts.push(";"); + } else if (stmt.type === "ClassProperty") { + var nextChild = bodyNode.body[i + 1]; + + if (classChildNeedsASIProtection(nextChild)) { + parts.push(";"); + } + } + } + + if (isNextLineEmpty$2(text, stmt, options) && !isLastStatement(stmtPath)) { + parts.push(hardline$3); + } + + printed.push(concat$4(parts)); + }); + return join$2(hardline$3, printed); +} + +function printPropertyKey(path$$1, options, print) { + var node = path$$1.getNode(); + var key = node.key; + + if (key.type === "Identifier" && !node.computed && options.parser === "json") { + // a -> "a" + return path$$1.call(function (keyPath) { + return comments.printComments(keyPath, function () { + return JSON.stringify(key.name); + }, options); + }, "key"); + } + + if (isStringLiteral(key) && isIdentifierName(key.value) && !node.computed && options.parser !== "json" && !(options.parser === "typescript" && node.type === "ClassProperty")) { + // 'a' -> a + return path$$1.call(function (keyPath) { + return comments.printComments(keyPath, function () { + return key.value; + }, options); + }, "key"); + } + + return path$$1.call(print, "key"); +} + +function printMethod(path$$1, options, print) { + var node = path$$1.getNode(); + var semi = options.semi ? ";" : ""; + var kind = node.kind; + var parts = []; + + if (node.type === "ObjectMethod" || node.type === "ClassMethod") { + node.value = node; + } + + if (node.value.async) { + parts.push("async "); + } + + if (!kind || kind === "init" || kind === "method" || kind === "constructor") { + if (node.value.generator) { + parts.push("*"); + } + } else { + assert.ok(kind === "get" || kind === "set"); + parts.push(kind, " "); + } + + var key = printPropertyKey(path$$1, options, print); + + if (node.computed) { + key = concat$4(["[", key, "]"]); + } + + parts.push(key, concat$4(path$$1.call(function (valuePath) { + return [printFunctionTypeParameters(valuePath, options, print), group$1(concat$4([printFunctionParams(valuePath, print, options), printReturnType(valuePath, print, options)]))]; + }, "value"))); + + if (!node.value.body || node.value.body.length === 0) { + parts.push(semi); + } else { + parts.push(" ", path$$1.call(print, "value", "body")); + } + + return concat$4(parts); +} + +function couldGroupArg(arg) { + return arg.type === "ObjectExpression" && (arg.properties.length > 0 || arg.comments) || arg.type === "ArrayExpression" && (arg.elements.length > 0 || arg.comments) || arg.type === "TSTypeAssertionExpression" || arg.type === "TSAsExpression" || arg.type === "FunctionExpression" || arg.type === "ArrowFunctionExpression" && !arg.returnType && (arg.body.type === "BlockStatement" || arg.body.type === "ArrowFunctionExpression" || arg.body.type === "ObjectExpression" || arg.body.type === "ArrayExpression" || arg.body.type === "CallExpression" || arg.body.type === "OptionalCallExpression" || arg.body.type === "ConditionalExpression" || isJSXNode(arg.body)); +} + +function shouldGroupLastArg(args) { + var lastArg = getLast$4(args); + var penultimateArg = getPenultimate$1(args); + return !hasLeadingComment(lastArg) && !hasTrailingComment(lastArg) && couldGroupArg(lastArg) && ( // If the last two arguments are of the same type, + // disable last element expansion. + !penultimateArg || penultimateArg.type !== lastArg.type); +} + +function shouldGroupFirstArg(args) { + if (args.length !== 2) { + return false; + } + + var firstArg = args[0]; + var secondArg = args[1]; + return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === "FunctionExpression" || firstArg.type === "ArrowFunctionExpression" && firstArg.body.type === "BlockStatement") && secondArg.type !== "FunctionExpression" && secondArg.type !== "ArrowFunctionExpression" && secondArg.type !== "ConditionalExpression" && !couldGroupArg(secondArg); +} + +function isSimpleFlowType(node) { + var flowTypeAnnotations = ["AnyTypeAnnotation", "NullLiteralTypeAnnotation", "GenericTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation", "BooleanTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringTypeAnnotation"]; + return node && flowTypeAnnotations.indexOf(node.type) !== -1 && !(node.type === "GenericTypeAnnotation" && node.typeParameters); +} + +var functionCompositionFunctionNames = new Set(["pipe", // RxJS, Ramda +"pipeP", // Ramda +"pipeK", // Ramda +"compose", // Ramda, Redux +"composeFlipped", // Not from any library, but common in Haskell, so supported +"composeP", // Ramda +"composeK", // Ramda +"flow", // Lodash +"flowRight", // Lodash +"connect", // Redux +"createSelector" // Reselect +]); + +function isFunctionCompositionFunction(node) { + switch (node.type) { + case "OptionalMemberExpression": + case "MemberExpression": + { + return isFunctionCompositionFunction(node.property); + } + + case "Identifier": + { + return functionCompositionFunctionNames.has(node.name); + } + + case "StringLiteral": + case "Literal": + { + return functionCompositionFunctionNames.has(node.value); + } + } +} + +function printArgumentsList(path$$1, options, print) { + var node = path$$1.getValue(); + var args = node.arguments; + + if (args.length === 0) { + return concat$4(["(", comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true), ")"]); + } + + var anyArgEmptyLine = false; + var hasEmptyLineFollowingFirstArg = false; + var lastArgIndex = args.length - 1; + var printedArguments = path$$1.map(function (argPath, index) { + var arg = argPath.getNode(); + var parts = [print(argPath)]; + + if (index === lastArgIndex) {// do nothing + } else if (isNextLineEmpty$2(options.originalText, arg, options)) { + if (index === 0) { + hasEmptyLineFollowingFirstArg = true; + } + + anyArgEmptyLine = true; + parts.push(",", hardline$3, hardline$3); + } else { + parts.push(",", line$3); + } + + return concat$4(parts); + }, "arguments"); + var maybeTrailingComma = shouldPrintComma(options, "all") ? "," : ""; + + function allArgsBrokenOut() { + return group$1(concat$4(["(", indent$2(concat$4([line$3, concat$4(printedArguments)])), maybeTrailingComma, line$3, ")"]), { + shouldBreak: true + }); + } // We want to get + // pipe( + // x => x + 1, + // x => x - 1 + // ) + // here, but not + // process.stdout.pipe(socket) + + + if (isFunctionCompositionFunction(node.callee) && args.length > 1) { + return allArgsBrokenOut(); + } + + var shouldGroupFirst = shouldGroupFirstArg(args); + var shouldGroupLast = shouldGroupLastArg(args); + + if (shouldGroupFirst || shouldGroupLast) { + var shouldBreak = (shouldGroupFirst ? printedArguments.slice(1).some(willBreak$1) : printedArguments.slice(0, -1).some(willBreak$1)) || anyArgEmptyLine; // We want to print the last argument with a special flag + + var printedExpanded; + var i = 0; + path$$1.each(function (argPath) { + if (shouldGroupFirst && i === 0) { + printedExpanded = [concat$4([argPath.call(function (p) { + return print(p, { + expandFirstArg: true + }); + }), printedArguments.length > 1 ? "," : "", hasEmptyLineFollowingFirstArg ? hardline$3 : line$3, hasEmptyLineFollowingFirstArg ? hardline$3 : ""])].concat(printedArguments.slice(1)); + } + + if (shouldGroupLast && i === args.length - 1) { + printedExpanded = printedArguments.slice(0, -1).concat(argPath.call(function (p) { + return print(p, { + expandLastArg: true + }); + })); + } + + i++; + }, "arguments"); + var somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1); + return concat$4([somePrintedArgumentsWillBreak ? breakParent$2 : "", conditionalGroup$1([concat$4([ifBreak$1(indent$2(concat$4(["(", softline$1, concat$4(printedExpanded)])), concat$4(["(", concat$4(printedExpanded)])), somePrintedArgumentsWillBreak ? concat$4([ifBreak$1(maybeTrailingComma), softline$1]) : "", ")"]), shouldGroupFirst ? concat$4(["(", group$1(printedExpanded[0], { + shouldBreak: true + }), concat$4(printedExpanded.slice(1)), ")"]) : concat$4(["(", concat$4(printedArguments.slice(0, -1)), group$1(getLast$4(printedExpanded), { + shouldBreak: true + }), ")"]), allArgsBrokenOut()], { + shouldBreak + })]); + } + + return group$1(concat$4(["(", indent$2(concat$4([softline$1, concat$4(printedArguments)])), ifBreak$1(shouldPrintComma(options, "all") ? "," : ""), softline$1, ")"]), { + shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine + }); +} + +function printTypeAnnotation(path$$1, options, print) { + var node = path$$1.getValue(); + + if (!node.typeAnnotation) { + return ""; + } + + var parentNode = path$$1.getParentNode(); + var isDefinite = node.definite || parentNode && parentNode.type === "VariableDeclarator" && parentNode.definite; + var isFunctionDeclarationIdentifier = parentNode.type === "DeclareFunction" && parentNode.id === node; + + if (isFlowAnnotationComment(options.originalText, node.typeAnnotation, options)) { + return concat$4([" /*: ", path$$1.call(print, "typeAnnotation"), " */"]); + } + + return concat$4([isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", path$$1.call(print, "typeAnnotation")]); +} + +function printFunctionTypeParameters(path$$1, options, print) { + var fun = path$$1.getValue(); + + if (fun.typeArguments) { + return path$$1.call(print, "typeArguments"); + } + + if (fun.typeParameters) { + return path$$1.call(print, "typeParameters"); + } + + return ""; +} + +function printFunctionParams(path$$1, print, options, expandArg, printTypeParams) { + var fun = path$$1.getValue(); + var paramsField = fun.parameters ? "parameters" : "params"; + var typeParams = printTypeParams ? printFunctionTypeParameters(path$$1, options, print) : ""; + var printed = []; + + if (fun[paramsField]) { + printed = path$$1.map(print, paramsField); + } + + if (fun.rest) { + printed.push(concat$4(["...", path$$1.call(print, "rest")])); + } + + if (printed.length === 0) { + return concat$4([typeParams, "(", comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true, function (comment) { + return getNextNonSpaceNonCommentCharacter$1(options.originalText, comment, options.locEnd) === ")"; + }), ")"]); + } + + var lastParam = getLast$4(fun[paramsField]); // If the parent is a call with the first/last argument expansion and this is the + // params of the first/last argument, we dont want the arguments to break and instead + // want the whole expression to be on a new line. + // + // Good: Bad: + // verylongcall( verylongcall(( + // (a, b) => { a, + // } b, + // }) ) => { + // }) + + if (expandArg && !(fun[paramsField] && fun[paramsField].some(function (n) { + return n.comments; + }))) { + return group$1(concat$4([removeLines$1(typeParams), "(", join$2(", ", printed.map(removeLines$1)), ")"])); + } // Single object destructuring should hug + // + // function({ + // a, + // b, + // c + // }) {} + + + if (shouldHugArguments(fun)) { + return concat$4([typeParams, "(", join$2(", ", printed), ")"]); + } + + var parent = path$$1.getParentNode(); // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})` + + if (isTestCall(parent)) { + return concat$4([typeParams, "(", join$2(", ", printed), ")"]); + } + + var isFlowShorthandWithOneArg = (isObjectTypePropertyAFunction(parent, options) || isTypeAnnotationAFunction(parent, options) || parent.type === "TypeAlias" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || parent.type === "IntersectionTypeAnnotation" || parent.type === "FunctionTypeAnnotation" && parent.returnType === fun) && fun[paramsField].length === 1 && fun[paramsField][0].name === null && fun[paramsField][0].typeAnnotation && fun.typeParameters === null && isSimpleFlowType(fun[paramsField][0].typeAnnotation) && !fun.rest; + + if (isFlowShorthandWithOneArg) { + if (options.arrowParens === "always") { + return concat$4(["(", concat$4(printed), ")"]); + } + + return concat$4(printed); + } + + var canHaveTrailingComma = !(lastParam && lastParam.type === "RestElement") && !fun.rest; + return concat$4([typeParams, "(", indent$2(concat$4([softline$1, join$2(concat$4([",", line$3]), printed)])), ifBreak$1(canHaveTrailingComma && shouldPrintComma(options, "all") ? "," : ""), softline$1, ")"]); +} + +function shouldPrintParamsWithoutParens(path$$1, options) { + if (options.arrowParens === "always") { + return false; + } + + if (options.arrowParens === "avoid") { + var node = path$$1.getValue(); + return canPrintParamsWithoutParens(node); + } // Fallback default; should be unreachable + + + return false; +} + +function canPrintParamsWithoutParens(node) { + return node.params.length === 1 && !node.rest && !node.typeParameters && !hasDanglingComments(node) && node.params[0].type === "Identifier" && !node.params[0].typeAnnotation && !node.params[0].comments && !node.params[0].optional && !node.predicate && !node.returnType; +} + +function printFunctionDeclaration(path$$1, print, options) { + var n = path$$1.getValue(); + var parts = []; + + if (n.async) { + parts.push("async "); + } + + parts.push("function"); + + if (n.generator) { + parts.push("*"); + } + + if (n.id) { + parts.push(" ", path$$1.call(print, "id")); + } + + parts.push(printFunctionTypeParameters(path$$1, options, print), group$1(concat$4([printFunctionParams(path$$1, print, options), printReturnType(path$$1, print, options)])), n.body ? " " : "", path$$1.call(print, "body")); + return concat$4(parts); +} + +function printObjectMethod(path$$1, options, print) { + var objMethod = path$$1.getValue(); + var parts = []; + + if (objMethod.async) { + parts.push("async "); + } + + if (objMethod.generator) { + parts.push("*"); + } + + if (objMethod.method || objMethod.kind === "get" || objMethod.kind === "set") { + return printMethod(path$$1, options, print); + } + + var key = printPropertyKey(path$$1, options, print); + + if (objMethod.computed) { + parts.push("[", key, "]"); + } else { + parts.push(key); + } + + parts.push(printFunctionTypeParameters(path$$1, options, print), group$1(concat$4([printFunctionParams(path$$1, print, options), printReturnType(path$$1, print, options)])), " ", path$$1.call(print, "body")); + return concat$4(parts); +} + +function printReturnType(path$$1, print, options) { + var n = path$$1.getValue(); + var returnType = path$$1.call(print, "returnType"); + + if (n.returnType && isFlowAnnotationComment(options.originalText, n.returnType, options)) { + return concat$4([" /*: ", returnType, " */"]); + } + + var parts = [returnType]; // prepend colon to TypeScript type annotation + + if (n.returnType && n.returnType.typeAnnotation) { + parts.unshift(": "); + } + + if (n.predicate) { + // The return type will already add the colon, but otherwise we + // need to do it ourselves + parts.push(n.returnType ? " " : ": ", path$$1.call(print, "predicate")); + } + + return concat$4(parts); +} + +function printExportDeclaration(path$$1, options, print) { + var decl = path$$1.getValue(); + var semi = options.semi ? ";" : ""; + var parts = ["export "]; + var isDefault = decl["default"] || decl.type === "ExportDefaultDeclaration"; + + if (isDefault) { + parts.push("default "); + } + + parts.push(comments.printDanglingComments(path$$1, options, + /* sameIndent */ + true)); + + if (needsHardlineAfterDanglingComment(decl)) { + parts.push(hardline$3); + } + + if (decl.declaration) { + parts.push(path$$1.call(print, "declaration")); + + if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSAbstractClassDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction") { + parts.push(semi); + } + } else { + if (decl.specifiers && decl.specifiers.length > 0) { + var specifiers = []; + var defaultSpecifiers = []; + var namespaceSpecifiers = []; + path$$1.each(function (specifierPath) { + var specifierType = path$$1.getValue().type; + + if (specifierType === "ExportSpecifier") { + specifiers.push(print(specifierPath)); + } else if (specifierType === "ExportDefaultSpecifier") { + defaultSpecifiers.push(print(specifierPath)); + } else if (specifierType === "ExportNamespaceSpecifier") { + namespaceSpecifiers.push(concat$4(["* as ", print(specifierPath)])); + } + }, "specifiers"); + var isNamespaceFollowed = namespaceSpecifiers.length !== 0 && specifiers.length !== 0; + var isDefaultFollowed = defaultSpecifiers.length !== 0 && (namespaceSpecifiers.length !== 0 || specifiers.length !== 0); + parts.push(decl.exportKind === "type" ? "type " : "", concat$4(defaultSpecifiers), concat$4([isDefaultFollowed ? ", " : ""]), concat$4(namespaceSpecifiers), concat$4([isNamespaceFollowed ? ", " : ""]), specifiers.length !== 0 ? group$1(concat$4(["{", indent$2(concat$4([options.bracketSpacing ? line$3 : softline$1, join$2(concat$4([",", line$3]), specifiers)])), ifBreak$1(shouldPrintComma(options) ? "," : ""), options.bracketSpacing ? line$3 : softline$1, "}"])) : ""); + } else { + parts.push("{}"); + } + + if (decl.source) { + parts.push(" from ", path$$1.call(print, "source")); + } + + parts.push(semi); + } + + return concat$4(parts); +} + +function printFlowDeclaration(path$$1, parts) { + var parentExportDecl = getParentExportDeclaration$1(path$$1); + + if (parentExportDecl) { + assert.strictEqual(parentExportDecl.type, "DeclareExportDeclaration"); + } else { + // If the parent node has type DeclareExportDeclaration, then it + // will be responsible for printing the "declare" token. Otherwise + // it needs to be printed with this non-exported declaration node. + parts.unshift("declare "); + } + + return concat$4(parts); +} + +function getFlowVariance(path$$1) { + if (!path$$1.variance) { + return null; + } // Babylon 7.0 currently uses variance node type, and flow should + // follow suit soon: + // https://github.com/babel/babel/issues/4722 + + + var variance = path$$1.variance.kind || path$$1.variance; + + switch (variance) { + case "plus": + return "+"; + + case "minus": + return "-"; + + default: + /* istanbul ignore next */ + return variance; + } +} + +function printTypeScriptModifiers(path$$1, options, print) { + var n = path$$1.getValue(); + + if (!n.modifiers || !n.modifiers.length) { + return ""; + } + + return concat$4([join$2(" ", path$$1.map(print, "modifiers")), " "]); +} + +function printTypeParameters(path$$1, options, print, paramsKey) { + var n = path$$1.getValue(); + + if (!n[paramsKey]) { + return ""; + } // for TypeParameterDeclaration typeParameters is a single node + + + if (!Array.isArray(n[paramsKey])) { + return path$$1.call(print, paramsKey); + } + + var grandparent = path$$1.getNode(2); + var isParameterInTestCall = grandparent != null && isTestCall(grandparent); + var shouldInline = isParameterInTestCall || n[paramsKey].length === 0 || n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === "GenericTypeAnnotation" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === "TSTypeReference" && shouldHugType(n[paramsKey][0].typeName) || n[paramsKey][0].type === "NullableTypeAnnotation"); + + if (shouldInline) { + return concat$4(["<", join$2(", ", path$$1.map(print, paramsKey)), ">"]); + } + + return group$1(concat$4(["<", indent$2(concat$4([softline$1, join$2(concat$4([",", line$3]), path$$1.map(print, paramsKey))])), ifBreak$1(options.parser !== "typescript" && shouldPrintComma(options, "all") ? "," : ""), softline$1, ">"])); +} + +function printClass(path$$1, options, print) { + var n = path$$1.getValue(); + var parts = []; + + if (n.type === "TSAbstractClassDeclaration") { + parts.push("abstract "); + } + + parts.push("class"); + + if (n.id) { + parts.push(" ", path$$1.call(print, "id")); + } + + parts.push(path$$1.call(print, "typeParameters")); + var partsGroup = []; + + if (n.superClass) { + var printed = concat$4(["extends ", path$$1.call(print, "superClass"), path$$1.call(print, "superTypeParameters")]); // Keep old behaviour of extends in same line + // If there is only on extends and there are not comments + + if ((!n.implements || n.implements.length === 0) && (!n.superClass.comments || n.superClass.comments.length === 0)) { + parts.push(concat$4([" ", path$$1.call(function (superClass) { + return comments.printComments(superClass, function () { + return printed; + }, options); + }, "superClass")])); + } else { + partsGroup.push(group$1(concat$4([line$3, path$$1.call(function (superClass) { + return comments.printComments(superClass, function () { + return printed; + }, options); + }, "superClass")]))); + } + } else if (n.extends && n.extends.length > 0) { + parts.push(" extends ", join$2(", ", path$$1.map(print, "extends"))); + } + + if (n["mixins"] && n["mixins"].length > 0) { + partsGroup.push(line$3, "mixins ", group$1(indent$2(join$2(concat$4([",", line$3]), path$$1.map(print, "mixins"))))); + } + + if (n["implements"] && n["implements"].length > 0) { + partsGroup.push(line$3, "implements", group$1(indent$2(concat$4([line$3, join$2(concat$4([",", line$3]), path$$1.map(print, "implements"))])))); + } + + if (partsGroup.length > 0) { + parts.push(group$1(indent$2(concat$4(partsGroup)))); + } + + if (n.body && n.body.comments && hasLeadingOwnLineComment(options.originalText, n.body, options)) { + parts.push(hardline$3); + } else { + parts.push(" "); + } + + parts.push(path$$1.call(print, "body")); + return parts; +} + +function printOptionalToken(path$$1) { + var node = path$$1.getValue(); + + if (!node.optional) { + return ""; + } + + if (node.type === "OptionalCallExpression" || node.type === "OptionalMemberExpression" && node.computed) { + return "?."; + } + + return "?"; +} + +function printMemberLookup(path$$1, options, print) { + var property = path$$1.call(print, "property"); + var n = path$$1.getValue(); + var optional = printOptionalToken(path$$1); + + if (!n.computed) { + return concat$4([optional, ".", property]); + } + + if (!n.property || isNumericLiteral(n.property)) { + return concat$4([optional, "[", property, "]"]); + } + + return group$1(concat$4([optional, "[", indent$2(concat$4([softline$1, property])), softline$1, "]"])); +} + +function printBindExpressionCallee(path$$1, options, print) { + return concat$4(["::", path$$1.call(print, "callee")]); +} // We detect calls on member expressions specially to format a +// common pattern better. The pattern we are looking for is this: +// +// arr +// .map(x => x + 1) +// .filter(x => x > 10) +// .some(x => x % 2) +// +// The way it is structured in the AST is via a nested sequence of +// MemberExpression and CallExpression. We need to traverse the AST +// and make groups out of it to print it in the desired way. + + +function printMemberChain(path$$1, options, print) { + // The first phase is to linearize the AST by traversing it down. + // + // a().b() + // has the following AST structure: + // CallExpression(MemberExpression(CallExpression(Identifier))) + // and we transform it into + // [Identifier, CallExpression, MemberExpression, CallExpression] + var printedNodes = []; // Here we try to retain one typed empty line after each call expression or + // the first group whether it is in parentheses or not + + function shouldInsertEmptyLineAfter(node) { + var originalText = options.originalText; + var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$2(originalText, node, options); + var nextChar = originalText.charAt(nextCharIndex); // if it is cut off by a parenthesis, we only account for one typed empty + // line after that parenthesis + + if (nextChar == ")") { + return isNextLineEmptyAfterIndex$1(originalText, nextCharIndex + 1, options); + } + + return isNextLineEmpty$2(originalText, node, options); + } + + function rec(path$$1) { + var node = path$$1.getValue(); + + if ((node.type === "CallExpression" || node.type === "OptionalCallExpression") && (isMemberish(node.callee) || node.callee.type === "CallExpression" || node.callee.type === "OptionalCallExpression")) { + printedNodes.unshift({ + node: node, + printed: concat$4([comments.printComments(path$$1, function () { + return concat$4([printOptionalToken(path$$1), printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]); + }, options), shouldInsertEmptyLineAfter(node) ? hardline$3 : ""]) + }); + path$$1.call(function (callee) { + return rec(callee); + }, "callee"); + } else if (isMemberish(node)) { + printedNodes.unshift({ + node: node, + needsParens: needsParens_1(path$$1, options), + printed: comments.printComments(path$$1, function () { + return node.type === "OptionalMemberExpression" || node.type === "MemberExpression" ? printMemberLookup(path$$1, options, print) : printBindExpressionCallee(path$$1, options, print); + }, options) + }); + path$$1.call(function (object) { + return rec(object); + }, "object"); + } else if (node.type === "TSNonNullExpression") { + printedNodes.unshift({ + node: node, + printed: comments.printComments(path$$1, function () { + return "!"; + }, options) + }); + path$$1.call(function (expression) { + return rec(expression); + }, "expression"); + } else { + printedNodes.unshift({ + node: node, + printed: path$$1.call(print) + }); + } + } // Note: the comments of the root node have already been printed, so we + // need to extract this first call without printing them as they would + // if handled inside of the recursive call. + + + var node = path$$1.getValue(); + printedNodes.unshift({ + node, + printed: concat$4([printOptionalToken(path$$1), printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]) + }); + path$$1.call(function (callee) { + return rec(callee); + }, "callee"); // Once we have a linear list of printed nodes, we want to create groups out + // of it. + // + // a().b.c().d().e + // will be grouped as + // [ + // [Identifier, CallExpression], + // [MemberExpression, MemberExpression, CallExpression], + // [MemberExpression, CallExpression], + // [MemberExpression], + // ] + // so that we can print it as + // a() + // .b.c() + // .d() + // .e + // The first group is the first node followed by + // - as many CallExpression as possible + // < fn()()() >.something() + // - as many array acessors as possible + // < fn()[0][1][2] >.something() + // - then, as many MemberExpression as possible but the last one + // < this.items >.something() + + var groups = []; + var currentGroup = [printedNodes[0]]; + var i = 1; + + for (; i < printedNodes.length; ++i) { + if (printedNodes[i].node.type === "TSNonNullExpression" || printedNodes[i].node.type === "OptionalCallExpression" || printedNodes[i].node.type === "CallExpression" || (printedNodes[i].node.type === "MemberExpression" || printedNodes[i].node.type === "OptionalMemberExpression") && printedNodes[i].node.computed && isNumericLiteral(printedNodes[i].node.property)) { + currentGroup.push(printedNodes[i]); + } else { + break; + } + } + + if (printedNodes[0].node.type !== "CallExpression" && printedNodes[0].node.type !== "OptionalCallExpression") { + for (; i + 1 < printedNodes.length; ++i) { + if (isMemberish(printedNodes[i].node) && isMemberish(printedNodes[i + 1].node)) { + currentGroup.push(printedNodes[i]); + } else { + break; + } + } + } + + groups.push(currentGroup); + currentGroup = []; // Then, each following group is a sequence of MemberExpression followed by + // a sequence of CallExpression. To compute it, we keep adding things to the + // group until we has seen a CallExpression in the past and reach a + // MemberExpression + + var hasSeenCallExpression = false; + + for (; i < printedNodes.length; ++i) { + if (hasSeenCallExpression && isMemberish(printedNodes[i].node)) { + // [0] should be appended at the end of the group instead of the + // beginning of the next one + if (printedNodes[i].node.computed && isNumericLiteral(printedNodes[i].node.property)) { + currentGroup.push(printedNodes[i]); + continue; + } + + groups.push(currentGroup); + currentGroup = []; + hasSeenCallExpression = false; + } + + if (printedNodes[i].node.type === "CallExpression" || printedNodes[i].node.type === "OptionalCallExpression") { + hasSeenCallExpression = true; + } + + currentGroup.push(printedNodes[i]); + + if (printedNodes[i].node.comments && printedNodes[i].node.comments.some(function (comment) { + return comment.trailing; + })) { + groups.push(currentGroup); + currentGroup = []; + hasSeenCallExpression = false; + } + } + + if (currentGroup.length > 0) { + groups.push(currentGroup); + } // There are cases like Object.keys(), Observable.of(), _.values() where + // they are the subject of all the chained calls and therefore should + // be kept on the same line: + // + // Object.keys(items) + // .filter(x => x) + // .map(x => x) + // + // In order to detect those cases, we use an heuristic: if the first + // node is an identifier with the name starting with a capital + // letter or just a sequence of _$. The rationale is that they are + // likely to be factories. + + + function isFactory(name) { + return /^[A-Z]|^[_$]+$/.test(name); + } // In case the Identifier is shorter than tab width, we can keep the + // first call in a single line, if it's an ExpressionStatement. + // + // d3.scaleLinear() + // .domain([0, 100]) + // .range([0, width]); + // + + + function isShort(name) { + return name.length <= options.tabWidth; + } + + function shouldNotWrap(groups) { + var parent = path$$1.getParentNode(); + var isExpression = parent && parent.type === "ExpressionStatement"; + var hasComputed = groups[1].length && groups[1][0].node.computed; + + if (groups[0].length === 1) { + var firstNode = groups[0][0].node; + return firstNode.type === "ThisExpression" || firstNode.type === "Identifier" && (isFactory(firstNode.name) || isExpression && isShort(firstNode.name) || hasComputed); + } + + var lastNode = getLast$4(groups[0]).node; + return (lastNode.type === "MemberExpression" || lastNode.type === "OptionalMemberExpression") && lastNode.property.type === "Identifier" && (isFactory(lastNode.property.name) || hasComputed); + } + + var shouldMerge = groups.length >= 2 && !groups[1][0].node.comments && shouldNotWrap(groups); + + function printGroup(printedGroup) { + var result = []; + + for (var _i3 = 0; _i3 < printedGroup.length; _i3++) { + // Checks if the next node (i.e. the parent node) needs parens + // and print accordingly + if (printedGroup[_i3 + 1] && printedGroup[_i3 + 1].needsParens) { + result.push("(", printedGroup[_i3].printed, printedGroup[_i3 + 1].printed, ")"); + _i3++; + } else { + result.push(printedGroup[_i3].printed); + } + } + + return concat$4(result); + } + + function printIndentedGroup(groups) { + if (groups.length === 0) { + return ""; + } + + return indent$2(group$1(concat$4([hardline$3, join$2(hardline$3, groups.map(printGroup))]))); + } + + var printedGroups = groups.map(printGroup); + var oneLine = concat$4(printedGroups); + var cutoff = shouldMerge ? 3 : 2; + var flatGroups = groups.slice(0, cutoff).reduce(function (res, group) { + return res.concat(group); + }, []); + var hasComment = flatGroups.slice(1, -1).some(function (node) { + return hasLeadingComment(node.node); + }) || flatGroups.slice(0, -1).some(function (node) { + return hasTrailingComment(node.node); + }) || groups[cutoff] && hasLeadingComment(groups[cutoff][0].node); // If we only have a single `.`, we shouldn't do anything fancy and just + // render everything concatenated together. + + if (groups.length <= cutoff && !hasComment) { + return group$1(oneLine); + } // Find out the last node in the first group and check if it has an + // empty line after + + + var lastNodeBeforeIndent = getLast$4(shouldMerge ? groups.slice(1, 2)[0] : groups[0]).node; + var shouldHaveEmptyLineBeforeIndent = lastNodeBeforeIndent.type !== "CallExpression" && lastNodeBeforeIndent.type !== "OptionalCallExpression" && shouldInsertEmptyLineAfter(lastNodeBeforeIndent); + var expanded = concat$4([printGroup(groups[0]), shouldMerge ? concat$4(groups.slice(1, 2).map(printGroup)) : "", shouldHaveEmptyLineBeforeIndent ? hardline$3 : "", printIndentedGroup(groups.slice(shouldMerge ? 2 : 1))]); + var callExpressions = printedNodes.map(function (_ref) { + var node = _ref.node; + return node; + }).filter(isCallOrOptionalCallExpression); // We don't want to print in one line if there's: + // * A comment. + // * 3 or more chained calls. + // * Any group but the last one has a hard line. + // If the last group is a function it's okay to inline if it fits. + + if (hasComment || callExpressions.length >= 3 || printedGroups.slice(0, -1).some(willBreak$1) || + /** + * scopes.filter(scope => scope.value !== '').map((scope, i) => { + * // multi line content + * }) + */ + function (lastGroupDoc, lastGroupNode) { + return isCallOrOptionalCallExpression(lastGroupNode) && willBreak$1(lastGroupDoc); + }(getLast$4(printedGroups), getLast$4(getLast$4(groups)).node) && callExpressions.slice(0, -1).some(function (n) { + return n.arguments.some(isFunctionOrArrowExpression); + })) { + return group$1(expanded); + } + + return concat$4([// We only need to check `oneLine` because if `expanded` is chosen + // that means that the parent group has already been broken + // naturally + willBreak$1(oneLine) || shouldHaveEmptyLineBeforeIndent ? breakParent$2 : "", conditionalGroup$1([oneLine, expanded])]); +} + +function isCallOrOptionalCallExpression(node) { + return node.type === "CallExpression" || node.type === "OptionalCallExpression"; +} + +function isJSXNode(node) { + return node.type === "JSXElement" || node.type === "JSXFragment" || node.type === "TSJsxFragment"; +} + +function isEmptyJSXElement(node) { + if (node.children.length === 0) { + return true; + } + + if (node.children.length > 1) { + return false; + } // if there is one text child and does not contain any meaningful text + // we can treat the element as empty. + + + var child = node.children[0]; + return isLiteral(child) && !isMeaningfulJSXText(child); +} // Only space, newline, carriage return, and tab are treated as whitespace +// inside JSX. + + +var jsxWhitespaceChars = " \n\r\t"; +var containsNonJsxWhitespaceRegex = new RegExp("[^" + jsxWhitespaceChars + "]"); +var matchJsxWhitespaceRegex = new RegExp("([" + jsxWhitespaceChars + "]+)"); // Meaningful if it contains non-whitespace characters, +// or it contains whitespace without a new line. + +function isMeaningfulJSXText(node) { + return isLiteral(node) && (containsNonJsxWhitespaceRegex.test(rawText(node)) || !/\n/.test(rawText(node))); +} + +function conditionalExpressionChainContainsJSX(node) { + return Boolean(getConditionalChainContents(node).find(isJSXNode)); +} // If we have nested conditional expressions, we want to print them in JSX mode +// if there's at least one JSXElement somewhere in the tree. +// +// A conditional expression chain like this should be printed in normal mode, +// because there aren't JSXElements anywhere in it: +// +// isA ? "A" : isB ? "B" : isC ? "C" : "Unknown"; +// +// But a conditional expression chain like this should be printed in JSX mode, +// because there is a JSXElement in the last ConditionalExpression: +// +// isA ? "A" : isB ? "B" : isC ? "C" : Unknown; +// +// This type of ConditionalExpression chain is structured like this in the AST: +// +// ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ..., +// } +// } +// } +// +// We want to traverse over that shape and convert it into a flat structure so +// that we can find if there's a JSXElement somewhere inside. + + +function getConditionalChainContents(node) { + // Given this code: + // + // // Using a ConditionalExpression as the consequent is uncommon, but should + // // be handled. + // A ? B : C ? D : E ? F ? G : H : I + // + // which has this AST: + // + // ConditionalExpression { + // test: Identifier(A), + // consequent: Identifier(B), + // alternate: ConditionalExpression { + // test: Identifier(C), + // consequent: Identifier(D), + // alternate: ConditionalExpression { + // test: Identifier(E), + // consequent: ConditionalExpression { + // test: Identifier(F), + // consequent: Identifier(G), + // alternate: Identifier(H), + // }, + // alternate: Identifier(I), + // } + // } + // } + // + // we should return this Array: + // + // [ + // Identifier(A), + // Identifier(B), + // Identifier(C), + // Identifier(D), + // Identifier(E), + // Identifier(F), + // Identifier(G), + // Identifier(H), + // Identifier(I) + // ]; + // + // This loses the information about whether each node was the test, + // consequent, or alternate, but we don't care about that here- we are only + // flattening this structure to find if there's any JSXElements inside. + var nonConditionalExpressions = []; + + function recurse(node) { + if (node.type === "ConditionalExpression") { + recurse(node.test); + recurse(node.consequent); + recurse(node.alternate); + } else { + nonConditionalExpressions.push(node); + } + } + + recurse(node); + return nonConditionalExpressions; +} // Detect an expression node representing `{" "}` + + +function isJSXWhitespaceExpression(node) { + return node.type === "JSXExpressionContainer" && isLiteral(node.expression) && node.expression.value === " " && !node.expression.comments; +} + +function separatorNoWhitespace(isFacebookTranslationTag, child, childNode, nextNode) { + if (isFacebookTranslationTag) { + return ""; + } + + if (childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement) { + return child.length === 1 ? softline$1 : hardline$3; + } + + return softline$1; +} + +function separatorWithWhitespace(isFacebookTranslationTag, child, childNode, nextNode) { + if (isFacebookTranslationTag) { + return hardline$3; + } + + if (child.length === 1) { + return childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement ? hardline$3 : softline$1; + } + + return hardline$3; +} // JSX Children are strange, mostly for two reasons: +// 1. JSX reads newlines into string values, instead of skipping them like JS +// 2. up to one whitespace between elements within a line is significant, +// but not between lines. +// +// Leading, trailing, and lone whitespace all need to +// turn themselves into the rather ugly `{' '}` when breaking. +// +// We print JSX using the `fill` doc primitive. +// This requires that we give it an array of alternating +// content and whitespace elements. +// To ensure this we add dummy `""` content elements as needed. + + +function printJSXChildren(path$$1, options, print, jsxWhitespace, isFacebookTranslationTag) { + var n = path$$1.getValue(); + var children = []; // using `map` instead of `each` because it provides `i` + + path$$1.map(function (childPath, i) { + var child = childPath.getValue(); + + if (isLiteral(child)) { + var text = rawText(child); // Contains a non-whitespace character + + if (isMeaningfulJSXText(child)) { + var words = text.split(matchJsxWhitespaceRegex); // Starts with whitespace + + if (words[0] === "") { + children.push(""); + words.shift(); + + if (/\n/.test(words[0])) { + var next = n.children[i + 1]; + children.push(separatorWithWhitespace(isFacebookTranslationTag, words[1], child, next)); + } else { + children.push(jsxWhitespace); + } + + words.shift(); + } + + var endWhitespace; // Ends with whitespace + + if (getLast$4(words) === "") { + words.pop(); + endWhitespace = words.pop(); + } // This was whitespace only without a new line. + + + if (words.length === 0) { + return; + } + + words.forEach(function (word, i) { + if (i % 2 === 1) { + children.push(line$3); + } else { + children.push(word); + } + }); + + if (endWhitespace !== undefined) { + if (/\n/.test(endWhitespace)) { + var _next = n.children[i + 1]; + children.push(separatorWithWhitespace(isFacebookTranslationTag, getLast$4(children), child, _next)); + } else { + children.push(jsxWhitespace); + } + } else { + var _next2 = n.children[i + 1]; + children.push(separatorNoWhitespace(isFacebookTranslationTag, getLast$4(children), child, _next2)); + } + } else if (/\n/.test(text)) { + // Keep (up to one) blank line between tags/expressions/text. + // Note: We don't keep blank lines between text elements. + if (text.match(/\n/g).length > 1) { + children.push(""); + children.push(hardline$3); + } + } else { + children.push(""); + children.push(jsxWhitespace); + } + } else { + var printedChild = print(childPath); + children.push(printedChild); + var _next3 = n.children[i + 1]; + + var directlyFollowedByMeaningfulText = _next3 && isMeaningfulJSXText(_next3); + + if (directlyFollowedByMeaningfulText) { + var firstWord = rawText(_next3).trim().split(matchJsxWhitespaceRegex)[0]; + children.push(separatorNoWhitespace(isFacebookTranslationTag, firstWord, child, _next3)); + } else { + children.push(hardline$3); + } + } + }, "children"); + return children; +} // JSX expands children from the inside-out, instead of the outside-in. +// This is both to break children before attributes, +// and to ensure that when children break, their parents do as well. +// +// Any element that is written without any newlines and fits on a single line +// is left that way. +// Not only that, any user-written-line containing multiple JSX siblings +// should also be kept on one line if possible, +// so each user-written-line is wrapped in its own group. +// +// Elements that contain newlines or don't fit on a single line (recursively) +// are fully-split, using hardline and shouldBreak: true. +// +// To support that case properly, all leading and trailing spaces +// are stripped from the list of children, and replaced with a single hardline. + + +function printJSXElement(path$$1, options, print) { + var n = path$$1.getValue(); // Turn
into
+ + if (n.type === "JSXElement" && isEmptyJSXElement(n)) { + n.openingElement.selfClosing = true; + return path$$1.call(print, "openingElement"); + } + + var openingLines = n.type === "JSXElement" ? path$$1.call(print, "openingElement") : path$$1.call(print, "openingFragment"); + var closingLines = n.type === "JSXElement" ? path$$1.call(print, "closingElement") : path$$1.call(print, "closingFragment"); + + if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) { + return concat$4([openingLines, concat$4(path$$1.map(print, "children")), closingLines]); + } // Convert `{" "}` to text nodes containing a space. + // This makes it easy to turn them into `jsxWhitespace` which + // can then print as either a space or `{" "}` when breaking. + + + n.children = n.children.map(function (child) { + if (isJSXWhitespaceExpression(child)) { + return { + type: "JSXText", + value: " ", + raw: " " + }; + } + + return child; + }); + var containsTag = n.children.filter(isJSXNode).length > 0; + var containsMultipleExpressions = n.children.filter(function (child) { + return child.type === "JSXExpressionContainer"; + }).length > 1; + var containsMultipleAttributes = n.type === "JSXElement" && n.openingElement.attributes.length > 1; // Record any breaks. Should never go from true to false, only false to true. + + var forcedBreak = willBreak$1(openingLines) || containsTag || containsMultipleAttributes || containsMultipleExpressions; + var rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}'; + var jsxWhitespace = ifBreak$1(concat$4([rawJsxWhitespace, softline$1]), " "); + var isFacebookTranslationTag = n.openingElement && n.openingElement.name && n.openingElement.name.name === "fbt"; + var children = printJSXChildren(path$$1, options, print, jsxWhitespace, isFacebookTranslationTag); + var containsText = n.children.filter(function (child) { + return isMeaningfulJSXText(child); + }).length > 0; // We can end up we multiple whitespace elements with empty string + // content between them. + // We need to remove empty whitespace and softlines before JSX whitespace + // to get the correct output. + + for (var i = children.length - 2; i >= 0; i--) { + var isPairOfEmptyStrings = children[i] === "" && children[i + 1] === ""; + var isPairOfHardlines = children[i] === hardline$3 && children[i + 1] === "" && children[i + 2] === hardline$3; + var isLineFollowedByJSXWhitespace = (children[i] === softline$1 || children[i] === hardline$3) && children[i + 1] === "" && children[i + 2] === jsxWhitespace; + var isJSXWhitespaceFollowedByLine = children[i] === jsxWhitespace && children[i + 1] === "" && (children[i + 2] === softline$1 || children[i + 2] === hardline$3); + var isDoubleJSXWhitespace = children[i] === jsxWhitespace && children[i + 1] === "" && children[i + 2] === jsxWhitespace; + var isPairOfHardOrSoftLines = children[i] === softline$1 && children[i + 1] === "" && children[i + 2] === hardline$3 || children[i] === hardline$3 && children[i + 1] === "" && children[i + 2] === softline$1; + + if (isPairOfHardlines && containsText || isPairOfEmptyStrings || isLineFollowedByJSXWhitespace || isDoubleJSXWhitespace || isPairOfHardOrSoftLines) { + children.splice(i, 2); + } else if (isJSXWhitespaceFollowedByLine) { + children.splice(i + 1, 2); + } + } // Trim trailing lines (or empty strings) + + + while (children.length && (isLineNext$1(getLast$4(children)) || isEmpty$1(getLast$4(children)))) { + children.pop(); + } // Trim leading lines (or empty strings) + + + while (children.length && (isLineNext$1(children[0]) || isEmpty$1(children[0])) && (isLineNext$1(children[1]) || isEmpty$1(children[1]))) { + children.shift(); + children.shift(); + } // Tweak how we format children if outputting this element over multiple lines. + // Also detect whether we will force this element to output over multiple lines. + + + var multilineChildren = []; + children.forEach(function (child, i) { + // There are a number of situations where we need to ensure we display + // whitespace as `{" "}` when outputting this element over multiple lines. + if (child === jsxWhitespace) { + if (i === 1 && children[i - 1] === "") { + if (children.length === 2) { + // Solitary whitespace + multilineChildren.push(rawJsxWhitespace); + return; + } // Leading whitespace + + + multilineChildren.push(concat$4([rawJsxWhitespace, hardline$3])); + return; + } else if (i === children.length - 1) { + // Trailing whitespace + multilineChildren.push(rawJsxWhitespace); + return; + } else if (children[i - 1] === "" && children[i - 2] === hardline$3) { + // Whitespace after line break + multilineChildren.push(rawJsxWhitespace); + return; + } + } + + multilineChildren.push(child); + + if (willBreak$1(child)) { + forcedBreak = true; + } + }); // If there is text we use `fill` to fit as much onto each line as possible. + // When there is no text (just tags and expressions) we use `group` + // to output each on a separate line. + + var content = containsText ? fill$2(multilineChildren) : group$1(concat$4(multilineChildren), { + shouldBreak: true + }); + var multiLineElem = group$1(concat$4([openingLines, indent$2(concat$4([hardline$3, content])), hardline$3, closingLines])); + + if (forcedBreak) { + return multiLineElem; + } + + return conditionalGroup$1([group$1(concat$4([openingLines, concat$4(children), closingLines])), multiLineElem]); +} + +function maybeWrapJSXElementInParens(path$$1, elem) { + var parent = path$$1.getParentNode(); + + if (!parent) { + return elem; + } + + var NO_WRAP_PARENTS = { + ArrayExpression: true, + JSXAttribute: true, + JSXElement: true, + JSXExpressionContainer: true, + JSXFragment: true, + TSJsxFragment: true, + ExpressionStatement: true, + CallExpression: true, + OptionalCallExpression: true, + ConditionalExpression: true, + JsExpressionRoot: true + }; + + if (NO_WRAP_PARENTS[parent.type]) { + return elem; + } + + var shouldBreak = matchAncestorTypes$1(path$$1, ["ArrowFunctionExpression", "CallExpression", "JSXExpressionContainer"]); + return group$1(concat$4([ifBreak$1("("), indent$2(concat$4([softline$1, elem])), softline$1, ifBreak$1(")")]), { + shouldBreak + }); +} + +function isBinaryish(node) { + return node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression"; +} + +function isMemberish(node) { + return node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "BindExpression" && node.object; +} + +function shouldInlineLogicalExpression(node) { + if (node.type !== "LogicalExpression") { + return false; + } + + if (node.right.type === "ObjectExpression" && node.right.properties.length !== 0) { + return true; + } + + if (node.right.type === "ArrayExpression" && node.right.elements.length !== 0) { + return true; + } + + if (isJSXNode(node.right)) { + return true; + } + + return false; +} // For binary expressions to be consistent, we need to group +// subsequent operators with the same precedence level under a single +// group. Otherwise they will be nested such that some of them break +// onto new lines but not all. Operators with the same precedence +// level should either all break or not. Because we group them by +// precedence level and the AST is structured based on precedence +// level, things are naturally broken up correctly, i.e. `&&` is +// broken before `+`. + + +function printBinaryishExpressions(path$$1, print, options, isNested, isInsideParenthesis) { + var parts = []; + var node = path$$1.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same. + + if (isBinaryish(node)) { + // Put all operators with the same precedence level in the same + // group. The reason we only need to do this with the `left` + // expression is because given an expression like `1 + 2 - 3`, it + // is always parsed like `((1 + 2) - 3)`, meaning the `left` side + // is where the rest of the expression will exist. Binary + // expressions on the right side mean they have a difference + // precedence level and should be treated as a separate group, so + // print them normally. (This doesn't hold for the `**` operator, + // which is unique in that it is right-associative.) + if (shouldFlatten$1(node.operator, node.left.operator)) { + // Flatten them out by recursively calling this function. + parts = parts.concat(path$$1.call(function (left) { + return printBinaryishExpressions(left, print, options, + /* isNested */ + true, isInsideParenthesis); + }, "left")); + } else { + parts.push(path$$1.call(print, "left")); + } + + var shouldInline = shouldInlineLogicalExpression(node); + var lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options.parser === "__vue_expression") && !hasLeadingOwnLineComment(options.originalText, node.right, options); + var operator = node.type === "NGPipeExpression" ? "|" : node.operator; + var rightSuffix = node.type === "NGPipeExpression" && node.arguments.length !== 0 ? group$1(indent$2(concat$4([softline$1, ": ", join$2(concat$4([softline$1, ":", ifBreak$1(" ")]), path$$1.map(print, "arguments").map(function (arg) { + return align$1(2, group$1(arg)); + }))]))) : ""; + var right = shouldInline ? concat$4([operator, " ", path$$1.call(print, "right"), rightSuffix]) : concat$4([lineBeforeOperator ? softline$1 : "", operator, lineBeforeOperator ? " " : line$3, path$$1.call(print, "right"), rightSuffix]); // If there's only a single binary expression, we want to create a group + // in order to avoid having a small right part like -1 be on its own line. + + var parent = path$$1.getParentNode(); + var shouldGroup = !(isInsideParenthesis && node.type === "LogicalExpression") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type; + parts.push(" ", shouldGroup ? group$1(right) : right); // The root comments are already printed, but we need to manually print + // the other ones since we don't call the normal print on BinaryExpression, + // only for the left and right parts + + if (isNested && node.comments) { + parts = comments.printComments(path$$1, function () { + return concat$4(parts); + }, options); + } + } else { + // Our stopping case. Simply print the node normally. + parts.push(path$$1.call(print)); + } + + return parts; +} + +function printAssignmentRight(leftNode, rightNode, printedRight, options) { + if (hasLeadingOwnLineComment(options.originalText, rightNode, options)) { + return indent$2(concat$4([hardline$3, printedRight])); + } + + var canBreak = isBinaryish(rightNode) && !shouldInlineLogicalExpression(rightNode) || rightNode.type === "ConditionalExpression" && isBinaryish(rightNode.test) && !shouldInlineLogicalExpression(rightNode.test) || rightNode.type === "StringLiteralTypeAnnotation" || rightNode.type === "ClassExpression" && rightNode.decorators && rightNode.decorators.length || (leftNode.type === "Identifier" || isStringLiteral(leftNode) || leftNode.type === "MemberExpression") && (isStringLiteral(rightNode) || isMemberExpressionChain(rightNode)) && // do not put values on a separate line from the key in json + options.parser !== "json" && options.parser !== "json5"; + + if (canBreak) { + return group$1(indent$2(concat$4([line$3, printedRight]))); + } + + return concat$4([" ", printedRight]); +} + +function printAssignment(leftNode, printedLeft, operator, rightNode, printedRight, options) { + if (!rightNode) { + return printedLeft; + } + + var printed = printAssignmentRight(leftNode, rightNode, printedRight, options); + return group$1(concat$4([printedLeft, operator, printed])); +} + +function adjustClause(node, clause, forceSpace) { + if (node.type === "EmptyStatement") { + return ";"; + } + + if (node.type === "BlockStatement" || forceSpace) { + return concat$4([" ", clause]); + } + + return indent$2(concat$4([line$3, clause])); +} + +function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) { + var raw = rawText(node); + var isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral"; + return printString$1(raw, options, isDirectiveLiteral); +} + +function printRegex(node) { + var flags = node.flags.split("").sort().join(""); + return `/${node.pattern}/${flags}`; +} + +function isLastStatement(path$$1) { + var parent = path$$1.getParentNode(); + + if (!parent) { + return true; + } + + var node = path$$1.getValue(); + var body = (parent.body || parent.consequent).filter(function (stmt) { + return stmt.type !== "EmptyStatement"; + }); + return body && body[body.length - 1] === node; +} + +function hasLeadingComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.leading; + }); +} + +function hasTrailingComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.trailing; + }); +} + +function hasLeadingOwnLineComment(text, node, options) { + if (isJSXNode(node)) { + return hasNodeIgnoreComment$1(node); + } + + var res = node.comments && node.comments.some(function (comment) { + return comment.leading && hasNewline$2(text, options.locEnd(comment)); + }); + return res; +} + +function hasNakedLeftSide(node) { + return node.type === "AssignmentExpression" || node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression" || node.type === "ConditionalExpression" || node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "BindExpression" || node.type === "UpdateExpression" && !node.prefix || node.type === "TSNonNullExpression"; +} + +function isFlowAnnotationComment(text, typeAnnotation, options) { + var start = options.locStart(typeAnnotation); + var end = skipWhitespace$1(text, options.locEnd(typeAnnotation)); + return text.substr(start, 2) === "/*" && text.substr(end, 2) === "*/"; +} + +function getLeftSide(node) { + if (node.expressions) { + return node.expressions[0]; + } + + return node.left || node.test || node.callee || node.object || node.tag || node.argument || node.expression; +} + +function getLeftSidePathName(path$$1, node) { + if (node.expressions) { + return ["expressions", 0]; + } + + if (node.left) { + return ["left"]; + } + + if (node.test) { + return ["test"]; + } + + if (node.object) { + return ["object"]; + } + + if (node.callee) { + return ["callee"]; + } + + if (node.tag) { + return ["tag"]; + } + + if (node.argument) { + return ["argument"]; + } + + if (node.expression) { + return ["expression"]; + } + + throw new Error("Unexpected node has no left side", node); +} + +function exprNeedsASIProtection(path$$1, options) { + var node = path$$1.getValue(); + var maybeASIProblem = needsParens_1(path$$1, options) || node.type === "ParenthesizedExpression" || node.type === "TypeCastExpression" || node.type === "ArrowFunctionExpression" && !shouldPrintParamsWithoutParens(path$$1, options) || node.type === "ArrayExpression" || node.type === "ArrayPattern" || node.type === "UnaryExpression" && node.prefix && (node.operator === "+" || node.operator === "-") || node.type === "TemplateLiteral" || node.type === "TemplateElement" || isJSXNode(node) || node.type === "BindExpression" && !node.object || node.type === "RegExpLiteral" || node.type === "Literal" && node.pattern || node.type === "Literal" && node.regex; + + if (maybeASIProblem) { + return true; + } + + if (!hasNakedLeftSide(node)) { + return false; + } + + return path$$1.call.apply(path$$1, [function (childPath) { + return exprNeedsASIProtection(childPath, options); + }].concat(getLeftSidePathName(path$$1, node))); +} + +function stmtNeedsASIProtection(path$$1, options) { + var node = path$$1.getNode(); + + if (node.type !== "ExpressionStatement") { + return false; + } + + return path$$1.call(function (childPath) { + return exprNeedsASIProtection(childPath, options); + }, "expression"); +} + +function classPropMayCauseASIProblems(path$$1) { + var node = path$$1.getNode(); + + if (node.type !== "ClassProperty") { + return false; + } + + var name = node.key && node.key.name; // this isn't actually possible yet with most parsers available today + // so isn't properly tested yet. + + if ((name === "static" || name === "get" || name === "set") && !node.value && !node.typeAnnotation) { + return true; + } +} + +function classChildNeedsASIProtection(node) { + if (!node) { + return; + } + + if (node.static || node.accessibility // TypeScript + ) { + return false; + } + + if (!node.computed) { + var name = node.key && node.key.name; + + if (name === "in" || name === "instanceof") { + return true; + } + } + + switch (node.type) { + case "ClassProperty": + case "TSAbstractClassProperty": + return node.computed; + + case "MethodDefinition": // Flow + + case "TSAbstractMethodDefinition": // TypeScript + + case "ClassMethod": + { + // Babylon + var isAsync = node.value ? node.value.async : node.async; + var isGenerator = node.value ? node.value.generator : node.generator; + + if (isAsync || node.kind === "get" || node.kind === "set") { + return false; + } + + if (node.computed || isGenerator) { + return true; + } + + return false; + } + + default: + /* istanbul ignore next */ + return false; + } +} // This recurses the return argument, looking for the first token +// (the leftmost leaf node) and, if it (or its parents) has any +// leadingComments, returns true (so it can be wrapped in parens). + + +function returnArgumentHasLeadingComment(options, argument) { + if (hasLeadingOwnLineComment(options.originalText, argument, options)) { + return true; + } + + if (hasNakedLeftSide(argument)) { + var leftMost = argument; + var newLeftMost; + + while (newLeftMost = getLeftSide(leftMost)) { + leftMost = newLeftMost; + + if (hasLeadingOwnLineComment(options.originalText, leftMost, options)) { + return true; + } + } + } + + return false; +} + +function isMemberExpressionChain(node) { + if (node.type !== "MemberExpression" && node.type !== "OptionalMemberExpression") { + return false; + } + + if (node.object.type === "Identifier") { + return true; + } + + return isMemberExpressionChain(node.object); +} // Hack to differentiate between the following two which have the same ast +// type T = { method: () => void }; +// type T = { method(): void }; + + +function isObjectTypePropertyAFunction(node, options) { + return (node.type === "ObjectTypeProperty" || node.type === "ObjectTypeInternalSlot") && node.value.type === "FunctionTypeAnnotation" && !node.static && !isFunctionNotation(node, options); +} // TODO: This is a bad hack and we need a better way to distinguish between +// arrow functions and otherwise + + +function isFunctionNotation(node, options) { + return isGetterOrSetter(node) || sameLocStart(node, node.value, options); +} + +function isGetterOrSetter(node) { + return node.kind === "get" || node.kind === "set"; +} + +function sameLocStart(nodeA, nodeB, options) { + return options.locStart(nodeA) === options.locStart(nodeB); +} // Hack to differentiate between the following two which have the same ast +// declare function f(a): void; +// var f: (a) => void; + + +function isTypeAnnotationAFunction(node, options) { + return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options); +} + +function isNodeStartingWithDeclare(node, options) { + if (!(options.parser === "flow" || options.parser === "typescript")) { + return false; + } + + return options.originalText.slice(0, options.locStart(node)).match(/declare[ \t]*$/) || options.originalText.slice(node.range[0], node.range[1]).startsWith("declare "); +} + +function shouldHugType(node) { + if (isSimpleFlowType(node) || isObjectType(node)) { + return true; + } + + if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") { + var voidCount = node.types.filter(function (n) { + return n.type === "VoidTypeAnnotation" || n.type === "TSVoidKeyword" || n.type === "NullLiteralTypeAnnotation" || n.type === "TSNullKeyword"; + }).length; + var objectCount = node.types.filter(function (n) { + return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral" || // This is a bit aggressive but captures Array<{x}> + n.type === "GenericTypeAnnotation" || n.type === "TSTypeReference"; + }).length; + + if (node.types.length - 1 === voidCount && objectCount > 0) { + return true; + } + } + + return false; +} + +function shouldHugArguments(fun) { + return fun && fun.params && fun.params.length === 1 && !fun.params[0].comments && (fun.params[0].type === "ObjectPattern" || fun.params[0].type === "ArrayPattern" || fun.params[0].type === "Identifier" && fun.params[0].typeAnnotation && (fun.params[0].typeAnnotation.type === "TypeAnnotation" || fun.params[0].typeAnnotation.type === "TSTypeAnnotation") && isObjectType(fun.params[0].typeAnnotation.typeAnnotation) || fun.params[0].type === "FunctionTypeParam" && isObjectType(fun.params[0].typeAnnotation) || fun.params[0].type === "AssignmentPattern" && (fun.params[0].left.type === "ObjectPattern" || fun.params[0].left.type === "ArrayPattern") && (fun.params[0].right.type === "Identifier" || fun.params[0].right.type === "ObjectExpression" && fun.params[0].right.properties.length === 0 || fun.params[0].right.type === "ArrayExpression" && fun.params[0].right.elements.length === 0)) && !fun.rest; +} + +function templateLiteralHasNewLines(template) { + return template.quasis.some(function (quasi) { + return quasi.value.raw.includes("\n"); + }); +} + +function isTemplateOnItsOwnLine(n, text, options) { + return (n.type === "TemplateLiteral" && templateLiteralHasNewLines(n) || n.type === "TaggedTemplateExpression" && templateLiteralHasNewLines(n.quasi)) && !hasNewline$2(text, options.locStart(n), { + backwards: true + }); +} + +function printArrayItems(path$$1, options, printPath, print) { + var printedElements = []; + var separatorParts = []; + path$$1.each(function (childPath) { + printedElements.push(concat$4(separatorParts)); + printedElements.push(group$1(print(childPath))); + separatorParts = [",", line$3]; + + if (childPath.getValue() && isNextLineEmpty$2(options.originalText, childPath.getValue(), options)) { + separatorParts.push(softline$1); + } + }, printPath); + return concat$4(printedElements); +} + +function hasDanglingComments(node) { + return node.comments && node.comments.some(function (comment) { + return !comment.leading && !comment.trailing; + }); +} + +function needsHardlineAfterDanglingComment(node) { + if (!node.comments) { + return false; + } + + var lastDanglingComment = getLast$4(node.comments.filter(function (comment) { + return !comment.leading && !comment.trailing; + })); + return lastDanglingComment && !comments$3.isBlockComment(lastDanglingComment); +} + +function isLiteral(node) { + return node.type === "BooleanLiteral" || node.type === "DirectiveLiteral" || node.type === "Literal" || node.type === "NullLiteral" || node.type === "NumericLiteral" || node.type === "RegExpLiteral" || node.type === "StringLiteral" || node.type === "TemplateLiteral" || node.type === "TSTypeLiteral" || node.type === "JSXText"; +} + +function isNumericLiteral(node) { + return node.type === "NumericLiteral" || node.type === "Literal" && typeof node.value === "number"; +} + +function isStringLiteral(node) { + return node.type === "StringLiteral" || node.type === "Literal" && typeof node.value === "string"; +} + +function isObjectType(n) { + return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral"; +} + +var unitTestRe = /^(skip|[fx]?(it|describe|test))$/; // eg; `describe("some string", (done) => {})` + +function isTestCall(n, parent) { + if (n.type !== "CallExpression") { + return false; + } + + if (n.arguments.length === 1) { + if (isAngularTestWrapper(n) && parent && isTestCall(parent)) { + return isFunctionOrArrowExpression(n.arguments[0]); + } + + if (isUnitTestSetUp(n)) { + return isAngularTestWrapper(n.arguments[0]); + } + } else if (n.arguments.length === 2 || n.arguments.length === 3) { + if ((n.callee.type === "Identifier" && unitTestRe.test(n.callee.name) || isSkipOrOnlyBlock(n)) && (isTemplateLiteral(n.arguments[0]) || isStringLiteral(n.arguments[0]))) { + // it("name", () => { ... }, 2500) + if (n.arguments[2] && !isNumericLiteral(n.arguments[2])) { + return false; + } + + return (n.arguments.length === 2 ? isFunctionOrArrowExpression(n.arguments[1]) : isFunctionOrArrowExpressionWithBody(n.arguments[1]) && n.arguments[1].params.length <= 1) || isAngularTestWrapper(n.arguments[1]); + } + } + + return false; +} + +function isSkipOrOnlyBlock(node) { + return (node.callee.type === "MemberExpression" || node.callee.type === "OptionalMemberExpression") && node.callee.object.type === "Identifier" && node.callee.property.type === "Identifier" && unitTestRe.test(node.callee.object.name) && (node.callee.property.name === "only" || node.callee.property.name === "skip"); +} + +function isTemplateLiteral(node) { + return node.type === "TemplateLiteral"; +} // `inject` is used in AngularJS 1.x, `async` in Angular 2+ +// example: https://docs.angularjs.org/guide/unit-testing#using-beforeall- + + +function isAngularTestWrapper(node) { + return (node.type === "CallExpression" || node.type === "OptionalCallExpression") && node.callee.type === "Identifier" && (node.callee.name === "async" || node.callee.name === "inject" || node.callee.name === "fakeAsync"); +} + +function isFunctionOrArrowExpression(node) { + return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression"; +} + +function isFunctionOrArrowExpressionWithBody(node) { + return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression" && node.body.type === "BlockStatement"; +} + +function isUnitTestSetUp(n) { + var unitTestSetUpRe = /^(before|after)(Each|All)$/; + return n.callee.type === "Identifier" && unitTestSetUpRe.test(n.callee.name) && n.arguments.length === 1; +} + +function isTheOnlyJSXElementInMarkdown(options, path$$1) { + if (options.parentParser !== "markdown" && options.parentParser !== "mdx") { + return false; + } + + var node = path$$1.getNode(); + + if (!node.expression || !isJSXNode(node.expression)) { + return false; + } + + var parent = path$$1.getParentNode(); + return parent.type === "Program" && parent.body.length == 1; +} + +function willPrintOwnComments(path$$1) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(); + return (node && (isJSXNode(node) || hasFlowShorthandAnnotationComment(node) || parent && parent.type === "CallExpression" && (hasFlowAnnotationComment(node.leadingComments) || hasFlowAnnotationComment(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && !hasIgnoreComment$1(path$$1); +} + +function canAttachComment(node) { + return node.type && node.type !== "CommentBlock" && node.type !== "CommentLine" && node.type !== "Line" && node.type !== "Block" && node.type !== "EmptyStatement" && node.type !== "TemplateElement" && node.type !== "Import" && !(node.callee && node.callee.type === "Import"); +} + +function printComment$1(commentPath, options) { + var comment = commentPath.getValue(); + + switch (comment.type) { + case "CommentBlock": + case "Block": + { + if (isIndentableBlockComment(comment)) { + var printed = printIndentableBlockComment(comment); // We need to prevent an edge case of a previous trailing comment + // printed as a `lineSuffix` which causes the comments to be + // interleaved. See https://github.com/prettier/prettier/issues/4412 + + if (comment.trailing && !hasNewline$2(options.originalText, options.locStart(comment), { + backwards: true + })) { + return concat$4([hardline$3, printed]); + } + + return printed; + } + + var isInsideFlowComment = options.originalText.substr(options.locEnd(comment) - 3, 3) === "*-/"; + return "/*" + comment.value + (isInsideFlowComment ? "*-/" : "*/"); + } + + case "CommentLine": + case "Line": + // Print shebangs with the proper comment characters + if (options.originalText.slice(options.locStart(comment)).startsWith("#!")) { + return "#!" + comment.value.trimRight(); + } + + return "//" + comment.value.trimRight(); + + default: + throw new Error("Not a comment: " + JSON.stringify(comment)); + } +} + +function isIndentableBlockComment(comment) { + // If the comment has multiple lines and every line starts with a star + // we can fix the indentation of each line. The stars in the `/*` and + // `*/` delimiters are not included in the comment value, so add them + // back first. + var lines = `*${comment.value}*`.split("\n"); + return lines.length > 1 && lines.every(function (line) { + return line.trim()[0] === "*"; + }); +} + +function printIndentableBlockComment(comment) { + var lines = comment.value.split("\n"); + return concat$4(["/*", join$2(hardline$3, lines.map(function (line, index) { + return index === 0 ? line.trimRight() : " " + (index < lines.length - 1 ? line.trim() : line.trimLeft()); + })), "*/"]); +} + +function rawText(node) { + return node.extra ? node.extra.raw : node.raw; +} + +function identity$1(x) { + return x; +} + +var printerEstree = { + preprocess: preprocess_1, + print: genericPrint, + embed: embed_1, + insertPragma, + massageAstNode: clean_1, + hasPrettierIgnore, + willPrintOwnComments, + canAttachComment, + printComment: printComment$1, + isBlockComment: comments$3.isBlockComment, + handleComments: { + ownLine: comments$3.handleOwnLineComment, + endOfLine: comments$3.handleEndOfLineComment, + remaining: comments$3.handleRemainingComment + } +}; + +var _require$$0$builders$3 = doc.builders; +var concat$7 = _require$$0$builders$3.concat; +var hardline$5 = _require$$0$builders$3.hardline; +var indent$4 = _require$$0$builders$3.indent; +var join$5 = _require$$0$builders$3.join; + +function genericPrint$1(path$$1, options, print) { + var node = path$$1.getValue(); + + switch (node.type) { + case "JsonRoot": + return concat$7([path$$1.call(print, "node"), hardline$5]); + + case "ArrayExpression": + return node.elements.length === 0 ? "[]" : concat$7(["[", indent$4(concat$7([hardline$5, join$5(concat$7([",", hardline$5]), path$$1.map(print, "elements"))])), hardline$5, "]"]); + + case "ObjectExpression": + return node.properties.length === 0 ? "{}" : concat$7(["{", indent$4(concat$7([hardline$5, join$5(concat$7([",", hardline$5]), path$$1.map(print, "properties"))])), hardline$5, "}"]); + + case "ObjectProperty": + return concat$7([path$$1.call(print, "key"), ": ", path$$1.call(print, "value")]); + + case "UnaryExpression": + return concat$7([node.operator === "+" ? "" : node.operator, path$$1.call(print, "argument")]); + + case "NullLiteral": + return "null"; + + case "BooleanLiteral": + return node.value ? "true" : "false"; + + case "StringLiteral": + case "NumericLiteral": + return JSON.stringify(node.value); + + case "Identifier": + return JSON.stringify(node.name); + + default: + /* istanbul ignore next */ + throw new Error("unknown type: " + JSON.stringify(node.type)); + } +} + +function clean$2(node, newNode +/*, parent*/ +) { + delete newNode.start; + delete newNode.end; + delete newNode.extra; + delete newNode.loc; + delete newNode.comments; + + if (node.type === "Identifier") { + return { + type: "StringLiteral", + value: node.name + }; + } + + if (node.type === "UnaryExpression" && node.operator === "+") { + return newNode.argument; + } +} + +var printerEstreeJson = { + preprocess: preprocess_1, + print: genericPrint$1, + massageAstNode: clean$2 +}; + +var CATEGORY_COMMON = "Common"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var commonOptions = { + bracketSpacing: { + since: "0.0.0", + category: CATEGORY_COMMON, + type: "boolean", + default: true, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + singleQuote: { + since: "0.0.0", + category: CATEGORY_COMMON, + type: "boolean", + default: false, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + since: "1.8.2", + category: CATEGORY_COMMON, + type: "choice", + default: [{ + since: "1.8.2", + value: true + }, { + since: "1.9.0", + value: "preserve" + }], + description: "How to wrap prose.", + choices: [{ + since: "1.9.0", + value: "always", + description: "Wrap prose if it exceeds the print width." + }, { + since: "1.9.0", + value: "never", + description: "Do not wrap prose." + }, { + since: "1.9.0", + value: "preserve", + description: "Wrap prose as-is." + }, { + value: false, + deprecated: "1.9.0", + redirect: "never" + }, { + value: true, + deprecated: "1.9.0", + redirect: "always" + }] + } +}; + +var CATEGORY_JAVASCRIPT = "JavaScript"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var options$4 = { + arrowParens: { + since: "1.9.0", + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "avoid", + description: "Include parentheses around a sole arrow function parameter.", + choices: [{ + value: "avoid", + description: "Omit parens when possible. Example: `x => x`" + }, { + value: "always", + description: "Always include parens. Example: `(x) => x`" + }] + }, + bracketSpacing: commonOptions.bracketSpacing, + jsxBracketSameLine: { + since: "0.17.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Put > on the last line instead of at a new line." + }, + semi: { + since: "1.0.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: true, + description: "Print semicolons.", + oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." + }, + singleQuote: commonOptions.singleQuote, + jsxSingleQuote: { + since: "1.15.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use single quotes in JSX." + }, + trailingComma: { + since: "0.0.0", + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: [{ + since: "0.0.0", + value: false + }, { + since: "0.19.0", + value: "none" + }], + description: "Print trailing commas wherever possible when multi-line.", + choices: [{ + value: "none", + description: "No trailing commas." + }, { + value: "es5", + description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" + }, { + value: "all", + description: "Trailing commas wherever possible (including function arguments)." + }, { + value: true, + deprecated: "0.19.0", + redirect: "es5" + }, { + value: false, + deprecated: "0.19.0", + redirect: "none" + }] + } +}; + +var createLanguage = function createLanguage(linguistData, _ref) { + var extend = _ref.extend, + override = _ref.override; + var language = {}; + + for (var key in linguistData) { + var newKey = key === "languageId" ? "linguistLanguageId" : key; + language[newKey] = linguistData[key]; + } + + if (extend) { + for (var _key in extend) { + language[_key] = (language[_key] || []).concat(extend[_key]); + } + } + + for (var _key2 in override) { + language[_key2] = override[_key2]; + } + + return language; +}; + +var name$1 = "JavaScript"; +var type = "programming"; +var tmScope = "source.js"; +var aceMode = "javascript"; +var codemirrorMode = "javascript"; +var codemirrorMimeType = "text/javascript"; +var color = "#f1e05a"; +var aliases = ["js", "node"]; +var extensions = [".js", "._js", ".bones", ".es", ".es6", ".frag", ".gs", ".jake", ".jsb", ".jscad", ".jsfl", ".jsm", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib"]; +var filenames = ["Jakefile"]; +var interpreters = ["node"]; +var languageId = 183; +var javascript = { + name: name$1, + type: type, + tmScope: tmScope, + aceMode: aceMode, + codemirrorMode: codemirrorMode, + codemirrorMimeType: codemirrorMimeType, + color: color, + aliases: aliases, + extensions: extensions, + filenames: filenames, + interpreters: interpreters, + languageId: languageId +}; + +var javascript$1 = Object.freeze({ + name: name$1, + type: type, + tmScope: tmScope, + aceMode: aceMode, + codemirrorMode: codemirrorMode, + codemirrorMimeType: codemirrorMimeType, + color: color, + aliases: aliases, + extensions: extensions, + filenames: filenames, + interpreters: interpreters, + languageId: languageId, + default: javascript +}); + +var name$2 = "JSX"; +var type$1 = "programming"; +var group$3 = "JavaScript"; +var extensions$1 = [".jsx"]; +var tmScope$1 = "source.js.jsx"; +var aceMode$1 = "javascript"; +var codemirrorMode$1 = "jsx"; +var codemirrorMimeType$1 = "text/jsx"; +var languageId$1 = 178; +var jsx = { + name: name$2, + type: type$1, + group: group$3, + extensions: extensions$1, + tmScope: tmScope$1, + aceMode: aceMode$1, + codemirrorMode: codemirrorMode$1, + codemirrorMimeType: codemirrorMimeType$1, + languageId: languageId$1 +}; + +var jsx$1 = Object.freeze({ + name: name$2, + type: type$1, + group: group$3, + extensions: extensions$1, + tmScope: tmScope$1, + aceMode: aceMode$1, + codemirrorMode: codemirrorMode$1, + codemirrorMimeType: codemirrorMimeType$1, + languageId: languageId$1, + default: jsx +}); + +var name$3 = "TypeScript"; +var type$2 = "programming"; +var color$1 = "#2b7489"; +var aliases$1 = ["ts"]; +var extensions$2 = [".ts", ".tsx"]; +var tmScope$2 = "source.ts"; +var aceMode$2 = "typescript"; +var codemirrorMode$2 = "javascript"; +var codemirrorMimeType$2 = "application/typescript"; +var languageId$2 = 378; +var typescript = { + name: name$3, + type: type$2, + color: color$1, + aliases: aliases$1, + extensions: extensions$2, + tmScope: tmScope$2, + aceMode: aceMode$2, + codemirrorMode: codemirrorMode$2, + codemirrorMimeType: codemirrorMimeType$2, + languageId: languageId$2 +}; + +var typescript$1 = Object.freeze({ + name: name$3, + type: type$2, + color: color$1, + aliases: aliases$1, + extensions: extensions$2, + tmScope: tmScope$2, + aceMode: aceMode$2, + codemirrorMode: codemirrorMode$2, + codemirrorMimeType: codemirrorMimeType$2, + languageId: languageId$2, + default: typescript +}); + +var name$4 = "JSON"; +var type$3 = "data"; +var tmScope$3 = "source.json"; +var group$4 = "JavaScript"; +var aceMode$3 = "json"; +var codemirrorMode$3 = "javascript"; +var codemirrorMimeType$3 = "application/json"; +var searchable = false; +var extensions$3 = [".json", ".avsc", ".geojson", ".gltf", ".JSON-tmLanguage", ".jsonl", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest"]; +var filenames$1 = [".arcconfig", ".htmlhintrc", ".tern-config", ".tern-project", "composer.lock", "mcmod.info"]; +var languageId$3 = 174; +var json$2 = { + name: name$4, + type: type$3, + tmScope: tmScope$3, + group: group$4, + aceMode: aceMode$3, + codemirrorMode: codemirrorMode$3, + codemirrorMimeType: codemirrorMimeType$3, + searchable: searchable, + extensions: extensions$3, + filenames: filenames$1, + languageId: languageId$3 +}; + +var json$3 = Object.freeze({ + name: name$4, + type: type$3, + tmScope: tmScope$3, + group: group$4, + aceMode: aceMode$3, + codemirrorMode: codemirrorMode$3, + codemirrorMimeType: codemirrorMimeType$3, + searchable: searchable, + extensions: extensions$3, + filenames: filenames$1, + languageId: languageId$3, + default: json$2 +}); + +var name$5 = "JSON with Comments"; +var type$4 = "data"; +var group$5 = "JSON"; +var tmScope$4 = "source.js"; +var aceMode$4 = "javascript"; +var codemirrorMode$4 = "javascript"; +var codemirrorMimeType$4 = "text/javascript"; +var aliases$2 = ["jsonc"]; +var extensions$4 = [".sublime-build", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"]; +var filenames$2 = [".babelrc", ".eslintrc.json", ".jscsrc", ".jshintrc", ".jslintrc", "tsconfig.json"]; +var languageId$4 = 423; +var jsonWithComments = { + name: name$5, + type: type$4, + group: group$5, + tmScope: tmScope$4, + aceMode: aceMode$4, + codemirrorMode: codemirrorMode$4, + codemirrorMimeType: codemirrorMimeType$4, + aliases: aliases$2, + extensions: extensions$4, + filenames: filenames$2, + languageId: languageId$4 +}; + +var jsonWithComments$1 = Object.freeze({ + name: name$5, + type: type$4, + group: group$5, + tmScope: tmScope$4, + aceMode: aceMode$4, + codemirrorMode: codemirrorMode$4, + codemirrorMimeType: codemirrorMimeType$4, + aliases: aliases$2, + extensions: extensions$4, + filenames: filenames$2, + languageId: languageId$4, + default: jsonWithComments +}); + +var name$6 = "JSON5"; +var type$5 = "data"; +var extensions$5 = [".json5"]; +var tmScope$5 = "source.js"; +var aceMode$5 = "javascript"; +var codemirrorMode$5 = "javascript"; +var codemirrorMimeType$5 = "application/json"; +var languageId$5 = 175; +var json5 = { + name: name$6, + type: type$5, + extensions: extensions$5, + tmScope: tmScope$5, + aceMode: aceMode$5, + codemirrorMode: codemirrorMode$5, + codemirrorMimeType: codemirrorMimeType$5, + languageId: languageId$5 +}; + +var json5$1 = Object.freeze({ + name: name$6, + type: type$5, + extensions: extensions$5, + tmScope: tmScope$5, + aceMode: aceMode$5, + codemirrorMode: codemirrorMode$5, + codemirrorMimeType: codemirrorMimeType$5, + languageId: languageId$5, + default: json5 +}); + +var require$$0$20 = ( javascript$1 && javascript ) || javascript$1; + +var require$$1$10 = ( jsx$1 && jsx ) || jsx$1; + +var require$$2$10 = ( typescript$1 && typescript ) || typescript$1; + +var require$$3$3 = ( json$3 && json$2 ) || json$3; + +var require$$4$2 = ( jsonWithComments$1 && jsonWithComments ) || jsonWithComments$1; + +var require$$5$1 = ( json5$1 && json5 ) || json5$1; + +var languages = [createLanguage(require$$0$20, { + override: { + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascript"] + }, + extend: { + interpreters: ["nodejs"] + } +}), createLanguage(require$$0$20, { + override: { + name: "Flow", + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascript"], + aliases: [], + filenames: [], + extensions: [".js.flow"] + } +}), createLanguage(require$$1$10, { + override: { + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascriptreact"] + } +}), createLanguage(require$$2$10, { + override: { + since: "1.4.0", + parsers: ["typescript"], + vscodeLanguageIds: ["typescript", "typescriptreact"] + } +}), createLanguage(require$$3$3, { + override: { + name: "JSON.stringify", + since: "1.13.0", + parsers: ["json-stringify"], + vscodeLanguageIds: ["json"], + extensions: [], + // .json file defaults to json instead of json-stringify + filenames: ["package.json", "package-lock.json", "composer.json"] + } +}), createLanguage(require$$3$3, { + override: { + since: "1.5.0", + parsers: ["json"], + vscodeLanguageIds: ["json"] + }, + extend: { + filenames: [".prettierrc"] + } +}), createLanguage(require$$4$2, { + override: { + since: "1.5.0", + parsers: ["json"], + vscodeLanguageIds: ["jsonc"] + }, + extend: { + filenames: [".eslintrc"] + } +}), createLanguage(require$$5$1, { + override: { + since: "1.13.0", + parsers: ["json5"], + vscodeLanguageIds: ["json5"] + } +})]; +var printers = { + estree: printerEstree, + "estree-json": printerEstreeJson +}; +var languageJs = { + languages, + options: options$4, + printers +}; + +var index$12 = ["a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "listing", "main", "map", "mark", "marquee", "math", "menu", "menuitem", "meta", "meter", "multicol", "nav", "nextid", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "pre", "progress", "q", "rb", "rbc", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp"]; + +var htmlTagNames = Object.freeze({ + default: index$12 +}); + +var htmlTagNames$1 = ( htmlTagNames && index$12 ) || htmlTagNames; + +function clean$3(ast, newObj, parent) { + ["raw", // front-matter + "raws", "sourceIndex", "source", "before", "after", "trailingComma"].forEach(function (name) { + delete newObj[name]; + }); + + if (ast.type === "yaml") { + delete newObj.value; + } // --insert-pragma + + + if (ast.type === "css-comment" && parent.type === "css-root" && parent.nodes.length !== 0 && ( // first non-front-matter comment + parent.nodes[0] === ast || (parent.nodes[0].type === "yaml" || parent.nodes[0].type === "toml") && parent.nodes[1] === ast)) { + /** + * something + * + * @format + */ + delete newObj.text; // standalone pragma + + if (/^\*\s*@(format|prettier)\s*$/.test(ast.text)) { + return null; + } + } + + if (ast.type === "media-query" || ast.type === "media-query-list" || ast.type === "media-feature-expression") { + delete newObj.value; + } + + if (ast.type === "css-rule") { + delete newObj.params; + } + + if (ast.type === "selector-combinator") { + newObj.value = newObj.value.replace(/\s+/g, " "); + } + + if (ast.type === "media-feature") { + newObj.value = newObj.value.replace(/ /g, ""); + } + + if (ast.type === "value-word" && (ast.isColor && ast.isHex || ["initial", "inherit", "unset", "revert"].indexOf(newObj.value.replace().toLowerCase()) !== -1) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo") { + newObj.value = newObj.value.toLowerCase(); + } + + if (ast.type === "css-decl") { + newObj.prop = newObj.prop.toLowerCase(); + } + + if (ast.type === "css-atrule" || ast.type === "css-import") { + newObj.name = newObj.name.toLowerCase(); + } + + if (ast.type === "value-number") { + newObj.unit = newObj.unit.toLowerCase(); + } + + if ((ast.type === "media-feature" || ast.type === "media-keyword" || ast.type === "media-type" || ast.type === "media-unknown" || ast.type === "media-url" || ast.type === "media-value" || ast.type === "selector-attribute" || ast.type === "selector-string" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "value-string") && newObj.value) { + newObj.value = cleanCSSStrings(newObj.value); + } + + if (ast.type === "selector-attribute") { + newObj.attribute = newObj.attribute.trim(); + + if (newObj.namespace) { + if (typeof newObj.namespace === "string") { + newObj.namespace = newObj.namespace.trim(); + + if (newObj.namespace.length === 0) { + newObj.namespace = true; + } + } + } + + if (newObj.value) { + newObj.value = newObj.value.trim().replace(/^['"]|['"]$/g, ""); + delete newObj.quoted; + } + } + + if ((ast.type === "media-value" || ast.type === "media-type" || ast.type === "value-number" || ast.type === "selector-root-invalid" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "selector-tag") && newObj.value) { + newObj.value = newObj.value.replace(/([\d.eE+-]+)([a-zA-Z]*)/g, function (match, numStr, unit) { + var num = Number(numStr); + return isNaN(num) ? match : num + unit.toLowerCase(); + }); + } + + if (ast.type === "selector-tag") { + var lowercasedValue = ast.value.toLowerCase(); + + if (htmlTagNames$1.indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + + if (["from", "to"].indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + } // Workaround when `postcss-values-parser` parse `not`, `and` or `or` keywords as `value-func` + + + if (ast.type === "css-atrule" && ast.name.toLowerCase() === "supports") { + delete newObj.value; + } // Workaround for SCSS nested properties + + + if (ast.type === "selector-unknown") { + delete newObj.value; + } +} + +function cleanCSSStrings(value) { + return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1"); +} + +var clean_1$2 = clean$3; + +var _require$$0$builders$4 = doc.builders; +var hardline$7 = _require$$0$builders$4.hardline; +var literalline$3 = _require$$0$builders$4.literalline; +var concat$9 = _require$$0$builders$4.concat; +var markAsRoot$1 = _require$$0$builders$4.markAsRoot; +var mapDoc$3 = doc.utils.mapDoc; + +function embed$2(path$$1, print, textToDoc +/*, options */ +) { + var node = path$$1.getValue(); + + if (node.type === "yaml") { + return markAsRoot$1(concat$9(["---", hardline$7, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, { + parser: "yaml" + })) : "", "---", hardline$7])); + } + + return null; + + function replaceNewlinesWithLiterallines(doc$$2) { + return mapDoc$3(doc$$2, function (currentDoc) { + return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$9(currentDoc.split(/(\n)/g).map(function (v, i) { + return i % 2 === 0 ? v : literalline$3; + })) : currentDoc; + }); + } +} + +var embed_1$2 = embed$2; + +var DELIMITER_MAP = { + "---": "yaml", + "+++": "toml" +}; + +function parse$5(text) { + var delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp).join("|"); + var match = text.match( // trailing spaces after delimiters are allowed + new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`)); + + if (match === null) { + return { + frontMatter: null, + content: text + }; + } + + var raw = match[0].replace(/\n$/, ""); + var delimiter = match[1]; + var value = match[2]; + return { + frontMatter: { + type: DELIMITER_MAP[delimiter], + value, + raw + }, + content: match[0].replace(/[^\n]/g, " ") + text.slice(match[0].length) + }; +} + +var frontMatter = parse$5; + +function hasPragma$1(text) { + return pragma.hasPragma(frontMatter(text).content); +} + +function insertPragma$3(text) { + var _parseFrontMatter = frontMatter(text), + frontMatter$$1 = _parseFrontMatter.frontMatter, + content = _parseFrontMatter.content; + + return (frontMatter$$1 ? frontMatter$$1.raw + "\n\n" : "") + pragma.insertPragma(content); +} + +var pragma$2 = { + hasPragma: hasPragma$1, + insertPragma: insertPragma$3 +}; + +var colorAdjusterFunctions = ["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"]; + +function getAncestorCounter(path$$1, typeOrTypes) { + var types = [].concat(typeOrTypes); + var counter = -1; + var ancestorNode; + + while (ancestorNode = path$$1.getParentNode(++counter)) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode$1(path$$1, typeOrTypes) { + var counter = getAncestorCounter(path$$1, typeOrTypes); + return counter === -1 ? null : path$$1.getParentNode(counter); +} + +function getPropOfDeclNode$1(path$$1) { + var declAncestorNode = getAncestorNode$1(path$$1, "css-decl"); + return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase(); +} + +function isSCSS$1(parser, text) { + var hasExplicitParserChoice = parser === "less" || parser === "scss"; + var IS_POSSIBLY_SCSS = /(\w\s*: [^}:]+|#){|@import[^\n]+(url|,)/; + return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text); +} + +function isWideKeywords$1(value) { + return ["initial", "inherit", "unset", "revert"].indexOf(value.toLowerCase()) !== -1; +} + +function isKeyframeAtRuleKeywords$1(path$$1, value) { + var atRuleAncestorNode = getAncestorNode$1(path$$1, "css-atrule"); + return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].indexOf(value.toLowerCase()) !== -1; +} + +function maybeToLowerCase$1(value) { + return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase(); +} + +function insideValueFunctionNode$1(path$$1, functionName) { + var funcAncestorNode = getAncestorNode$1(path$$1, "value-func"); + return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName; +} + +function insideICSSRuleNode$1(path$$1) { + var ruleAncestorNode = getAncestorNode$1(path$$1, "css-rule"); + return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export")); +} + +function insideAtRuleNode$1(path$$1, atRuleNameOrAtRuleNames) { + var atRuleNames = [].concat(atRuleNameOrAtRuleNames); + var atRuleAncestorNode = getAncestorNode$1(path$$1, "css-atrule"); + return atRuleAncestorNode && atRuleNames.indexOf(atRuleAncestorNode.name.toLowerCase()) !== -1; +} + +function insideURLFunctionInImportAtRuleNode$1(path$$1) { + var node = path$$1.getValue(); + var atRuleAncestorNode = getAncestorNode$1(path$$1, "css-atrule"); + return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2; +} + +function isURLFunctionNode$1(node) { + return node.type === "value-func" && node.value.toLowerCase() === "url"; +} + +function isLastNode$1(path$$1, node) { + var parentNode = path$$1.getParentNode(); + + if (!parentNode) { + return false; + } + + var nodes = parentNode.nodes; + return nodes && nodes.indexOf(node) === nodes.length - 1; +} + +function isHTMLTag$1(value) { + return htmlTagNames$1.indexOf(value.toLowerCase()) !== -1; +} + +function isDetachedRulesetDeclarationNode$1(node) { + // If a Less file ends up being parsed with the SCSS parser, Less + // variable declarations will be parsed as atrules with names ending + // with a colon, so keep the original case then. + if (!node.selector) { + return false; + } + + return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value); +} + +function isForKeywordNode$1(node) { + return node.type === "value-word" && ["from", "through", "end"].indexOf(node.value) !== -1; +} + +function isIfElseKeywordNode$1(node) { + return node.type === "value-word" && ["and", "or", "not"].indexOf(node.value) !== -1; +} + +function isEachKeywordNode$1(node) { + return node.type === "value-word" && node.value === "in"; +} + +function isMultiplicationNode$1(node) { + return node.type === "value-operator" && node.value === "*"; +} + +function isDivisionNode$1(node) { + return node.type === "value-operator" && node.value === "/"; +} + +function isAdditionNode$1(node) { + return node.type === "value-operator" && node.value === "+"; +} + +function isSubtractionNode$1(node) { + return node.type === "value-operator" && node.value === "-"; +} + +function isModuloNode(node) { + return node.type === "value-operator" && node.value === "%"; +} + +function isMathOperatorNode$1(node) { + return isMultiplicationNode$1(node) || isDivisionNode$1(node) || isAdditionNode$1(node) || isSubtractionNode$1(node) || isModuloNode(node); +} + +function isEqualityOperatorNode$1(node) { + return node.type === "value-word" && ["==", "!="].indexOf(node.value) !== -1; +} + +function isRelationalOperatorNode$1(node) { + return node.type === "value-word" && ["<", ">", "<=", ">="].indexOf(node.value) !== -1; +} + +function isSCSSControlDirectiveNode$1(node) { + return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].indexOf(node.name) !== -1; +} + +function isSCSSNestedPropertyNode(node) { + if (!node.selector) { + return false; + } + + return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":"); +} + +function isDetachedRulesetCallNode$1(node) { + return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params); +} + +function isTemplatePlaceholderNode$1(node) { + return node.name.startsWith("prettier-placeholder"); +} + +function isTemplatePropNode$1(node) { + return node.prop.startsWith("@prettier-placeholder"); +} + +function isPostcssSimpleVarNode$1(currentNode, nextNode) { + return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before; +} + +function hasComposesNode$1(node) { + return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes"; +} + +function hasParensAroundNode$1(node) { + return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null; +} + +function hasEmptyRawBefore$1(node) { + return node.raws && node.raws.before === ""; +} + +function isKeyValuePairNode$1(node) { + return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon"; +} + +function isKeyValuePairInParenGroupNode(node) { + return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode$1(node.groups[0]); +} + +function isSCSSMapItemNode$1(path$$1) { + var node = path$$1.getValue(); // Ignore empty item (i.e. `$key: ()`) + + if (node.groups.length === 0) { + return false; + } + + var parentParentNode = path$$1.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`) + + if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) { + return false; + } + + var declNode = getAncestorNode$1(path$$1, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`) + + if (declNode && declNode.prop && declNode.prop.startsWith("$")) { + return true; + } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`) + + + if (isKeyValuePairInParenGroupNode(parentParentNode)) { + return true; + } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`) + + + if (parentParentNode.type === "value-func") { + return true; + } + + return false; +} + +function isInlineValueCommentNode$1(node) { + return node.type === "value-comment" && node.inline; +} + +function isHashNode$1(node) { + return node.type === "value-word" && node.value === "#"; +} + +function isLeftCurlyBraceNode$1(node) { + return node.type === "value-word" && node.value === "{"; +} + +function isRightCurlyBraceNode$1(node) { + return node.type === "value-word" && node.value === "}"; +} + +function isWordNode$1(node) { + return ["value-word", "value-atword"].indexOf(node.type) !== -1; +} + +function isColonNode$1(node) { + return node.type === "value-colon"; +} + +function isMediaAndSupportsKeywords$1(node) { + return node.value && ["not", "and", "or"].indexOf(node.value.toLowerCase()) !== -1; +} + +function isColorAdjusterFuncNode$1(node) { + if (node.type !== "value-func") { + return false; + } + + return colorAdjusterFunctions.indexOf(node.value.toLowerCase()) !== -1; +} + +var utils$6 = { + getAncestorCounter, + getAncestorNode: getAncestorNode$1, + getPropOfDeclNode: getPropOfDeclNode$1, + maybeToLowerCase: maybeToLowerCase$1, + insideValueFunctionNode: insideValueFunctionNode$1, + insideICSSRuleNode: insideICSSRuleNode$1, + insideAtRuleNode: insideAtRuleNode$1, + insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode$1, + isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords$1, + isHTMLTag: isHTMLTag$1, + isWideKeywords: isWideKeywords$1, + isSCSS: isSCSS$1, + isLastNode: isLastNode$1, + isSCSSControlDirectiveNode: isSCSSControlDirectiveNode$1, + isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode$1, + isRelationalOperatorNode: isRelationalOperatorNode$1, + isEqualityOperatorNode: isEqualityOperatorNode$1, + isMultiplicationNode: isMultiplicationNode$1, + isDivisionNode: isDivisionNode$1, + isAdditionNode: isAdditionNode$1, + isSubtractionNode: isSubtractionNode$1, + isModuloNode, + isMathOperatorNode: isMathOperatorNode$1, + isEachKeywordNode: isEachKeywordNode$1, + isForKeywordNode: isForKeywordNode$1, + isURLFunctionNode: isURLFunctionNode$1, + isIfElseKeywordNode: isIfElseKeywordNode$1, + hasComposesNode: hasComposesNode$1, + hasParensAroundNode: hasParensAroundNode$1, + hasEmptyRawBefore: hasEmptyRawBefore$1, + isSCSSNestedPropertyNode, + isDetachedRulesetCallNode: isDetachedRulesetCallNode$1, + isTemplatePlaceholderNode: isTemplatePlaceholderNode$1, + isTemplatePropNode: isTemplatePropNode$1, + isPostcssSimpleVarNode: isPostcssSimpleVarNode$1, + isKeyValuePairNode: isKeyValuePairNode$1, + isKeyValuePairInParenGroupNode, + isSCSSMapItemNode: isSCSSMapItemNode$1, + isInlineValueCommentNode: isInlineValueCommentNode$1, + isHashNode: isHashNode$1, + isLeftCurlyBraceNode: isLeftCurlyBraceNode$1, + isRightCurlyBraceNode: isRightCurlyBraceNode$1, + isWordNode: isWordNode$1, + isColonNode: isColonNode$1, + isMediaAndSupportsKeywords: isMediaAndSupportsKeywords$1, + isColorAdjusterFuncNode: isColorAdjusterFuncNode$1 +}; + +var insertPragma$2 = pragma$2.insertPragma; +var printNumber$2 = util$1.printNumber; +var printString$2 = util$1.printString; +var hasIgnoreComment$2 = util$1.hasIgnoreComment; +var hasNewline$3 = util$1.hasNewline; +var isNextLineEmpty$3 = utilShared.isNextLineEmpty; +var _require$$3$builders = doc.builders; +var concat$8 = _require$$3$builders.concat; +var join$6 = _require$$3$builders.join; +var line$5 = _require$$3$builders.line; +var hardline$6 = _require$$3$builders.hardline; +var softline$3 = _require$$3$builders.softline; +var group$6 = _require$$3$builders.group; +var fill$3 = _require$$3$builders.fill; +var indent$5 = _require$$3$builders.indent; +var dedent$3 = _require$$3$builders.dedent; +var ifBreak$2 = _require$$3$builders.ifBreak; +var removeLines$2 = doc.utils.removeLines; +var getAncestorNode = utils$6.getAncestorNode; +var getPropOfDeclNode = utils$6.getPropOfDeclNode; +var maybeToLowerCase = utils$6.maybeToLowerCase; +var insideValueFunctionNode = utils$6.insideValueFunctionNode; +var insideICSSRuleNode = utils$6.insideICSSRuleNode; +var insideAtRuleNode = utils$6.insideAtRuleNode; +var insideURLFunctionInImportAtRuleNode = utils$6.insideURLFunctionInImportAtRuleNode; +var isKeyframeAtRuleKeywords = utils$6.isKeyframeAtRuleKeywords; +var isHTMLTag = utils$6.isHTMLTag; +var isWideKeywords = utils$6.isWideKeywords; +var isSCSS = utils$6.isSCSS; +var isLastNode = utils$6.isLastNode; +var isSCSSControlDirectiveNode = utils$6.isSCSSControlDirectiveNode; +var isDetachedRulesetDeclarationNode = utils$6.isDetachedRulesetDeclarationNode; +var isRelationalOperatorNode = utils$6.isRelationalOperatorNode; +var isEqualityOperatorNode = utils$6.isEqualityOperatorNode; +var isMultiplicationNode = utils$6.isMultiplicationNode; +var isDivisionNode = utils$6.isDivisionNode; +var isAdditionNode = utils$6.isAdditionNode; +var isSubtractionNode = utils$6.isSubtractionNode; +var isMathOperatorNode = utils$6.isMathOperatorNode; +var isEachKeywordNode = utils$6.isEachKeywordNode; +var isForKeywordNode = utils$6.isForKeywordNode; +var isURLFunctionNode = utils$6.isURLFunctionNode; +var isIfElseKeywordNode = utils$6.isIfElseKeywordNode; +var hasComposesNode = utils$6.hasComposesNode; +var hasParensAroundNode = utils$6.hasParensAroundNode; +var hasEmptyRawBefore = utils$6.hasEmptyRawBefore; +var isKeyValuePairNode = utils$6.isKeyValuePairNode; +var isDetachedRulesetCallNode = utils$6.isDetachedRulesetCallNode; +var isTemplatePlaceholderNode = utils$6.isTemplatePlaceholderNode; +var isTemplatePropNode = utils$6.isTemplatePropNode; +var isPostcssSimpleVarNode = utils$6.isPostcssSimpleVarNode; +var isSCSSMapItemNode = utils$6.isSCSSMapItemNode; +var isInlineValueCommentNode = utils$6.isInlineValueCommentNode; +var isHashNode = utils$6.isHashNode; +var isLeftCurlyBraceNode = utils$6.isLeftCurlyBraceNode; +var isRightCurlyBraceNode = utils$6.isRightCurlyBraceNode; +var isWordNode = utils$6.isWordNode; +var isColonNode = utils$6.isColonNode; +var isMediaAndSupportsKeywords = utils$6.isMediaAndSupportsKeywords; +var isColorAdjusterFuncNode = utils$6.isColorAdjusterFuncNode; + +function shouldPrintComma$1(options) { + switch (options.trailingComma) { + case "all": + case "es5": + return true; + + case "none": + default: + return false; + } +} + +function genericPrint$2(path$$1, options, print) { + var node = path$$1.getValue(); + /* istanbul ignore if */ + + if (!node) { + return ""; + } + + if (typeof node === "string") { + return node; + } + + switch (node.type) { + case "yaml": + case "toml": + return concat$8([node.raw, hardline$6]); + + case "css-root": + { + var nodes = printNodeSequence(path$$1, options, print); + + if (nodes.parts.length) { + return concat$8([nodes, hardline$6]); + } + + return nodes; + } + + case "css-comment": + { + if (node.raws.content) { + return node.raws.content // there's a bug in the less parser that trailing `\r`s are included in inline comments + .replace(/^(\/\/[^]+)\r+$/, "$1"); + } + + var text = options.originalText.slice(options.locStart(node), options.locEnd(node)); + var rawText = node.raws.text || node.text; // Workaround a bug where the location is off. + // https://github.com/postcss/postcss-scss/issues/63 + + if (text.indexOf(rawText) === -1) { + if (node.raws.inline) { + return concat$8(["// ", rawText]); + } + + return concat$8(["/* ", rawText, " */"]); + } + + return text; + } + + case "css-rule": + { + return concat$8([path$$1.call(print, "selector"), node.important ? " !important" : "", node.nodes ? concat$8([" {", node.nodes.length > 0 ? indent$5(concat$8([hardline$6, printNodeSequence(path$$1, options, print)])) : "", hardline$6, "}", isDetachedRulesetDeclarationNode(node) ? ";" : ""]) : ";"]); + } + + case "css-decl": + { + var parentNode = path$$1.getParentNode(); + return concat$8([node.raws.before.replace(/[\s;]/g, ""), insideICSSRuleNode(path$$1) ? node.prop : maybeToLowerCase(node.prop), node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), node.extend ? "" : " ", hasComposesNode(node) ? removeLines$2(path$$1.call(print, "value")) : path$$1.call(print, "value"), node.raws.important ? node.raws.important.replace(/\s*!\s*important/i, " !important") : node.important ? " !important" : "", node.raws.scssDefault ? node.raws.scssDefault.replace(/\s*!default/i, " !default") : node.scssDefault ? " !default" : "", node.raws.scssGlobal ? node.raws.scssGlobal.replace(/\s*!global/i, " !global") : node.scssGlobal ? " !global" : "", node.nodes ? concat$8([" {", indent$5(concat$8([softline$3, printNodeSequence(path$$1, options, print)])), softline$3, "}"]) : isTemplatePropNode(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]); + } + + case "css-atrule": + { + var _parentNode = path$$1.getParentNode(); + + return concat$8(["@", // If a Less file ends up being parsed with the SCSS parser, Less + // variable declarations will be parsed as at-rules with names ending + // with a colon, so keep the original case then. + isDetachedRulesetCallNode(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase(node.name), node.params ? concat$8([isDetachedRulesetCallNode(node) ? "" : isTemplatePlaceholderNode(node) && /^\s*\n/.test(node.raws.afterName) ? /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$8([hardline$6, hardline$6]) : hardline$6 : " ", path$$1.call(print, "params")]) : "", node.selector ? indent$5(concat$8([" ", path$$1.call(print, "selector")])) : "", node.value ? group$6(concat$8([" ", path$$1.call(print, "value"), isSCSSControlDirectiveNode(node) ? hasParensAroundNode(node) ? " " : line$5 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$8([isSCSSControlDirectiveNode(node) ? "" : " ", "{", indent$5(concat$8([node.nodes.length > 0 ? softline$3 : "", printNodeSequence(path$$1, options, print)])), softline$3, "}"]) : isTemplatePlaceholderNode(node) && !_parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]); + } + // postcss-media-query-parser + + case "media-query-list": + { + var parts = []; + path$$1.each(function (childPath) { + var node = childPath.getValue(); + + if (node.type === "media-query" && node.value === "") { + return; + } + + parts.push(childPath.call(print)); + }, "nodes"); + return group$6(indent$5(join$6(line$5, parts))); + } + + case "media-query": + { + return concat$8([join$6(" ", path$$1.map(print, "nodes")), isLastNode(path$$1, node) ? "" : ","]); + } + + case "media-type": + { + return adjustNumbers(adjustStrings(node.value, options)); + } + + case "media-feature-expression": + { + if (!node.nodes) { + return node.value; + } + + return concat$8(["(", concat$8(path$$1.map(print, "nodes")), ")"]); + } + + case "media-feature": + { + return maybeToLowerCase(adjustStrings(node.value.replace(/ +/g, " "), options)); + } + + case "media-colon": + { + return concat$8([node.value, " "]); + } + + case "media-value": + { + return adjustNumbers(adjustStrings(node.value, options)); + } + + case "media-keyword": + { + return adjustStrings(node.value, options); + } + + case "media-url": + { + return adjustStrings(node.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/gi, ")"), options); + } + + case "media-unknown": + { + return node.value; + } + // postcss-selector-parser + + case "selector-root": + { + return group$6(concat$8([insideAtRuleNode(path$$1, "custom-selector") ? concat$8([getAncestorNode(path$$1, "css-atrule").customSelector, line$5]) : "", join$6(concat$8([",", insideAtRuleNode(path$$1, ["extend", "custom-selector", "nest"]) ? line$5 : hardline$6]), path$$1.map(print, "nodes"))])); + } + + case "selector-selector": + { + return group$6(indent$5(concat$8(path$$1.map(print, "nodes")))); + } + + case "selector-comment": + { + return node.value; + } + + case "selector-string": + { + return adjustStrings(node.value, options); + } + + case "selector-tag": + { + var _parentNode2 = path$$1.getParentNode(); + + var index = _parentNode2 && _parentNode2.nodes.indexOf(node); + + var prevNode = index && _parentNode2.nodes[index - 1]; + return concat$8([node.namespace ? concat$8([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isHTMLTag(node.value) || isKeyframeAtRuleKeywords(path$$1, node.value) ? node.value.toLowerCase() : node.value)]); + } + + case "selector-id": + { + return concat$8(["#", node.value]); + } + + case "selector-class": + { + return concat$8([".", adjustNumbers(adjustStrings(node.value, options))]); + } + + case "selector-attribute": + { + return concat$8(["[", node.namespace ? concat$8([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.attribute.trim(), node.operator ? node.operator : "", node.value ? quoteAttributeValue(adjustStrings(node.value.trim(), options), options) : "", node.insensitive ? " i" : "", "]"]); + } + + case "selector-combinator": + { + if (node.value === "+" || node.value === ">" || node.value === "~" || node.value === ">>>") { + var _parentNode3 = path$$1.getParentNode(); + + var _leading = _parentNode3.type === "selector-selector" && _parentNode3.nodes[0] === node ? "" : line$5; + + return concat$8([_leading, node.value, isLastNode(path$$1, node) ? "" : " "]); + } + + var leading = node.value.trim().startsWith("(") ? line$5 : ""; + var value = adjustNumbers(adjustStrings(node.value.trim(), options)) || line$5; + return concat$8([leading, value]); + } + + case "selector-universal": + { + return concat$8([node.namespace ? concat$8([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.value]); + } + + case "selector-pseudo": + { + return concat$8([maybeToLowerCase(node.value), node.nodes && node.nodes.length > 0 ? concat$8(["(", join$6(", ", path$$1.map(print, "nodes")), ")"]) : ""]); + } + + case "selector-nesting": + { + return node.value; + } + + case "selector-unknown": + { + var ruleAncestorNode = getAncestorNode(path$$1, "css-rule"); // Nested SCSS property + + if (ruleAncestorNode && ruleAncestorNode.isSCSSNesterProperty) { + return adjustNumbers(adjustStrings(maybeToLowerCase(node.value), options)); + } + + return node.value; + } + // postcss-values-parser + + case "value-value": + case "value-root": + { + return path$$1.call(print, "group"); + } + + case "value-comment": + { + return concat$8([node.inline ? "//" : "/*", node.value, node.inline ? "" : "*/"]); + } + + case "value-comma_group": + { + var _parentNode4 = path$$1.getParentNode(); + + var parentParentNode = path$$1.getParentNode(1); + var declAncestorProp = getPropOfDeclNode(path$$1); + var isGridValue = declAncestorProp && _parentNode4.type === "value-value" && (declAncestorProp === "grid" || declAncestorProp.startsWith("grid-template")); + var atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + var isControlDirective = atRuleAncestorNode && isSCSSControlDirectiveNode(atRuleAncestorNode); + var printed = path$$1.map(print, "groups"); + var _parts = []; + var insideURLFunction = insideValueFunctionNode(path$$1, "url"); + var insideSCSSInterpolationInString = false; + var didBreak = false; + + for (var i = 0; i < node.groups.length; ++i) { + _parts.push(printed[i]); // Ignore value inside `url()` + + + if (insideURLFunction) { + continue; + } + + var iPrevNode = node.groups[i - 1]; + var iNode = node.groups[i]; + var iNextNode = node.groups[i + 1]; + var iNextNextNode = node.groups[i + 2]; // Ignore after latest node (i.e. before semicolon) + + if (!iNextNode) { + continue; + } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`) + + + var isStartSCSSinterpolationInString = iNode.type === "value-string" && iNode.value.startsWith("#{"); + var isEndingSCSSinterpolationInString = insideSCSSInterpolationInString && iNextNode.type === "value-string" && iNextNode.value.endsWith("}"); + + if (isStartSCSSinterpolationInString || isEndingSCSSinterpolationInString) { + insideSCSSInterpolationInString = !insideSCSSInterpolationInString; + continue; + } + + if (insideSCSSInterpolationInString) { + continue; + } // Ignore colon (i.e. `:`) + + + if (isColonNode(iNode) || isColonNode(iNextNode)) { + continue; + } // Ignore `@` in Less (i.e. `@@var;`) + + + if (iNode.type === "value-atword" && iNode.value === "") { + continue; + } // Ignore `~` in Less (i.e. `content: ~"^//* some horrible but needed css hack";`) + + + if (iNode.value === "~") { + continue; + } // Ignore `\` (i.e. `$variable: \@small;`) + + + if (iNode.value === "\\") { + continue; + } // Ignore `$$` (i.e. `background-color: $$(style)Color;`) + + + if (isPostcssSimpleVarNode(iNode, iNextNode)) { + continue; + } // Ignore spaces after `#` and after `{` and before `}` in SCSS interpolation (i.e. `#{variable}`) + + + if (isHashNode(iNode) || isLeftCurlyBraceNode(iNode) || isRightCurlyBraceNode(iNextNode) || isLeftCurlyBraceNode(iNextNode) && hasEmptyRawBefore(iNextNode) || isRightCurlyBraceNode(iNode) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`) + + + if (iNode.value === "--" && isHashNode(iNextNode)) { + continue; + } // Formatting math operations + + + var isMathOperator = isMathOperatorNode(iNode); + var isNextMathOperator = isMathOperatorNode(iNextNode); // Print spaces before and after math operators beside SCSS interpolation as is + // (i.e. `#{$var}+5`, `#{$var} +5`, `#{$var}+ 5`, `#{$var} + 5`) + // (i.e. `5+#{$var}`, `5 +#{$var}`, `5+ #{$var}`, `5 + #{$var}`) + + if ((isMathOperator && isHashNode(iNextNode) || isNextMathOperator && isRightCurlyBraceNode(iNode)) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Print spaces before and after addition and subtraction math operators as is in `calc` function + // due to the fact that it is not valid syntax + // (i.e. `calc(1px+1px)`, `calc(1px+ 1px)`, `calc(1px +1px)`, `calc(1px + 1px)`) + + + if (insideValueFunctionNode(path$$1, "calc") && (isAdditionNode(iNode) || isAdditionNode(iNextNode) || isSubtractionNode(iNode) || isSubtractionNode(iNextNode)) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Print spaces after `+` and `-` in color adjuster functions as is (e.g. `color(red l(+ 20%))`) + // Adjusters with signed numbers (e.g. `color(red l(+20%))`) output as-is. + + + var isColorAdjusterNode = (isAdditionNode(iNode) || isSubtractionNode(iNode)) && i === 0 && (iNextNode.type === "value-number" || iNextNode.isHex) && parentParentNode && isColorAdjusterFuncNode(parentParentNode) && !hasEmptyRawBefore(iNextNode); + var requireSpaceBeforeOperator = iNextNextNode && iNextNextNode.type === "value-func" || iNextNextNode && isWordNode(iNextNextNode) || iNode.type === "value-func" || isWordNode(iNode); + var requireSpaceAfterOperator = iNextNode.type === "value-func" || isWordNode(iNextNode) || iPrevNode && iPrevNode.type === "value-func" || iPrevNode && isWordNode(iPrevNode); // Formatting `/`, `+`, `-` sign + + if (!(isMultiplicationNode(iNextNode) || isMultiplicationNode(iNode)) && !insideValueFunctionNode(path$$1, "calc") && !isColorAdjusterNode && (isDivisionNode(iNextNode) && !requireSpaceBeforeOperator || isDivisionNode(iNode) && !requireSpaceAfterOperator || isAdditionNode(iNextNode) && !requireSpaceBeforeOperator || isAdditionNode(iNode) && !requireSpaceAfterOperator || isSubtractionNode(iNextNode) || isSubtractionNode(iNode)) && (hasEmptyRawBefore(iNextNode) || isMathOperator && (!iPrevNode || iPrevNode && isMathOperatorNode(iPrevNode)))) { + continue; + } // Ignore inline comment, they already contain newline at end (i.e. `// Comment`) + // Add `hardline` after inline comment (i.e. `// comment\n foo: bar;`) + + + var isInlineComment = isInlineValueCommentNode(iNode); + + if (iPrevNode && isInlineValueCommentNode(iPrevNode) || isInlineComment || isInlineValueCommentNode(iNextNode)) { + if (isInlineComment) { + _parts.push(hardline$6); + } + + continue; + } // Handle keywords in SCSS control directive + + + if (isControlDirective && (isEqualityOperatorNode(iNextNode) || isRelationalOperatorNode(iNextNode) || isIfElseKeywordNode(iNextNode) || isEachKeywordNode(iNode) || isForKeywordNode(iNode))) { + _parts.push(" "); + + continue; + } // At-rule `namespace` should be in one line + + + if (atRuleAncestorNode && atRuleAncestorNode.name.toLowerCase() === "namespace") { + _parts.push(" "); + + continue; + } // Formatting `grid` property + + + if (isGridValue) { + if (iNode.source && iNextNode.source && iNode.source.start.line !== iNextNode.source.start.line) { + _parts.push(hardline$6); + + didBreak = true; + } else { + _parts.push(" "); + } + + continue; + } // Add `space` before next math operation + // Note: `grip` property have `/` delimiter and it is not math operation, so + // `grid` property handles above + + + if (isNextMathOperator) { + _parts.push(" "); + + continue; + } // Be default all values go through `line` + + + _parts.push(line$5); + } + + if (didBreak) { + _parts.unshift(hardline$6); + } + + if (isControlDirective) { + return group$6(indent$5(concat$8(_parts))); + } // Indent is not needed for import url when url is very long + // and node has two groups + // when type is value-comma_group + // example @import url("verylongurl") projection,tv + + + if (insideURLFunctionInImportAtRuleNode(path$$1)) { + return group$6(fill$3(_parts)); + } + + return group$6(indent$5(fill$3(_parts))); + } + + case "value-paren_group": + { + var _parentNode5 = path$$1.getParentNode(); + + if (_parentNode5 && isURLFunctionNode(_parentNode5) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) { + return concat$8([node.open ? path$$1.call(print, "open") : "", join$6(",", path$$1.map(print, "groups")), node.close ? path$$1.call(print, "close") : ""]); + } + + if (!node.open) { + var _printed = path$$1.map(print, "groups"); + + var res = []; + + for (var _i = 0; _i < _printed.length; _i++) { + if (_i !== 0) { + res.push(concat$8([",", line$5])); + } + + res.push(_printed[_i]); + } + + return group$6(indent$5(fill$3(res))); + } + + var isSCSSMapItem = isSCSSMapItemNode(path$$1); + return group$6(concat$8([node.open ? path$$1.call(print, "open") : "", indent$5(concat$8([softline$3, join$6(concat$8([",", line$5]), path$$1.map(function (childPath) { + var node = childPath.getValue(); + var printed = print(childPath); // Key/Value pair in open paren already indented + + if (isKeyValuePairNode(node) && node.type === "value-comma_group" && node.groups && node.groups[2] && node.groups[2].type === "value-paren_group") { + printed.contents.contents.parts[1] = group$6(printed.contents.contents.parts[1]); + return group$6(dedent$3(printed)); + } + + return printed; + }, "groups"))])), ifBreak$2(isSCSS(options.parser, options.originalText) && isSCSSMapItem && shouldPrintComma$1(options) ? "," : ""), softline$3, node.close ? path$$1.call(print, "close") : ""]), { + shouldBreak: isSCSSMapItem + }); + } + + case "value-func": + { + return concat$8([node.value, insideAtRuleNode(path$$1, "supports") && isMediaAndSupportsKeywords(node) ? " " : "", path$$1.call(print, "group")]); + } + + case "value-paren": + { + return node.value; + } + + case "value-number": + { + return concat$8([printCssNumber(node.value), maybeToLowerCase(node.unit)]); + } + + case "value-operator": + { + return node.value; + } + + case "value-word": + { + if (node.isColor && node.isHex || isWideKeywords(node.value)) { + return node.value.toLowerCase(); + } + + return node.value; + } + + case "value-colon": + { + return concat$8([node.value, // Don't add spaces on `:` in `url` function (i.e. `url(fbglyph: cross-outline, fig-white)`) + insideValueFunctionNode(path$$1, "url") ? "" : line$5]); + } + + case "value-comma": + { + return concat$8([node.value, " "]); + } + + case "value-string": + { + return printString$2(node.raws.quote + node.value + node.raws.quote, options); + } + + case "value-atword": + { + return concat$8(["@", node.value]); + } + + case "value-unicode-range": + { + return node.value; + } + + case "value-unknown": + { + return node.value; + } + + default: + /* istanbul ignore next */ + throw new Error(`Unknown postcss type ${JSON.stringify(node.type)}`); + } +} + +function printNodeSequence(path$$1, options, print) { + var node = path$$1.getValue(); + var parts = []; + var i = 0; + path$$1.map(function (pathChild) { + var prevNode = node.nodes[i - 1]; + + if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") { + var childNode = pathChild.getValue(); + parts.push(options.originalText.slice(options.locStart(childNode), options.locEnd(childNode))); + } else { + parts.push(pathChild.call(print)); + } + + if (i !== node.nodes.length - 1) { + if (node.nodes[i + 1].type === "css-comment" && !hasNewline$3(options.originalText, options.locStart(node.nodes[i + 1]), { + backwards: true + }) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml" || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else" && node.nodes[i].type !== "css-comment") { + parts.push(" "); + } else { + parts.push(hardline$6); + + if (isNextLineEmpty$3(options.originalText, pathChild.getValue(), options) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml") { + parts.push(hardline$6); + } + } + } + + i++; + }, "nodes"); + return concat$8(parts); +} + +var STRING_REGEX = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g; +var NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g; +var STANDARD_UNIT_REGEX = /[a-zA-Z]+/g; +var WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g; +var ADJUST_NUMBERS_REGEX = RegExp(STRING_REGEX.source + `|` + `(${WORD_PART_REGEX.source})?` + `(${NUMBER_REGEX.source})` + `(${STANDARD_UNIT_REGEX.source})?`, "g"); + +function adjustStrings(value, options) { + return value.replace(STRING_REGEX, function (match) { + return printString$2(match, options); + }); +} + +function quoteAttributeValue(value, options) { + var quote = options.singleQuote ? "'" : '"'; + return value.includes('"') || value.includes("'") ? value : quote + value + quote; +} + +function adjustNumbers(value) { + return value.replace(ADJUST_NUMBERS_REGEX, function (match, quote, wordPart, number, unit) { + return !wordPart && number ? (wordPart || "") + printCssNumber(number) + maybeToLowerCase(unit || "") : match; + }); +} + +function printCssNumber(rawNumber) { + return printNumber$2(rawNumber) // Remove trailing `.0`. + .replace(/\.0(?=$|e)/, ""); +} + +var printerPostcss = { + print: genericPrint$2, + embed: embed_1$2, + insertPragma: insertPragma$2, + hasPrettierIgnore: hasIgnoreComment$2, + massageAstNode: clean_1$2 +}; + +var options$7 = { + singleQuote: commonOptions.singleQuote +}; + +var name$7 = "CSS"; +var type$6 = "markup"; +var tmScope$6 = "source.css"; +var aceMode$6 = "css"; +var codemirrorMode$6 = "css"; +var codemirrorMimeType$6 = "text/css"; +var color$2 = "#563d7c"; +var extensions$6 = [".css"]; +var languageId$6 = 50; +var css$2 = { + name: name$7, + type: type$6, + tmScope: tmScope$6, + aceMode: aceMode$6, + codemirrorMode: codemirrorMode$6, + codemirrorMimeType: codemirrorMimeType$6, + color: color$2, + extensions: extensions$6, + languageId: languageId$6 +}; + +var css$3 = Object.freeze({ + name: name$7, + type: type$6, + tmScope: tmScope$6, + aceMode: aceMode$6, + codemirrorMode: codemirrorMode$6, + codemirrorMimeType: codemirrorMimeType$6, + color: color$2, + extensions: extensions$6, + languageId: languageId$6, + default: css$2 +}); + +var name$8 = "PostCSS"; +var type$7 = "markup"; +var tmScope$7 = "source.postcss"; +var group$7 = "CSS"; +var extensions$7 = [".pcss"]; +var aceMode$7 = "text"; +var languageId$7 = 262764437; +var postcss = { + name: name$8, + type: type$7, + tmScope: tmScope$7, + group: group$7, + extensions: extensions$7, + aceMode: aceMode$7, + languageId: languageId$7 +}; + +var postcss$1 = Object.freeze({ + name: name$8, + type: type$7, + tmScope: tmScope$7, + group: group$7, + extensions: extensions$7, + aceMode: aceMode$7, + languageId: languageId$7, + default: postcss +}); + +var name$9 = "Less"; +var type$8 = "markup"; +var group$8 = "CSS"; +var extensions$8 = [".less"]; +var tmScope$8 = "source.css.less"; +var aceMode$8 = "less"; +var codemirrorMode$7 = "css"; +var codemirrorMimeType$7 = "text/css"; +var languageId$8 = 198; +var less = { + name: name$9, + type: type$8, + group: group$8, + extensions: extensions$8, + tmScope: tmScope$8, + aceMode: aceMode$8, + codemirrorMode: codemirrorMode$7, + codemirrorMimeType: codemirrorMimeType$7, + languageId: languageId$8 +}; + +var less$1 = Object.freeze({ + name: name$9, + type: type$8, + group: group$8, + extensions: extensions$8, + tmScope: tmScope$8, + aceMode: aceMode$8, + codemirrorMode: codemirrorMode$7, + codemirrorMimeType: codemirrorMimeType$7, + languageId: languageId$8, + default: less +}); + +var name$10 = "SCSS"; +var type$9 = "markup"; +var tmScope$9 = "source.scss"; +var group$9 = "CSS"; +var aceMode$9 = "scss"; +var codemirrorMode$8 = "css"; +var codemirrorMimeType$8 = "text/x-scss"; +var extensions$9 = [".scss"]; +var languageId$9 = 329; +var scss = { + name: name$10, + type: type$9, + tmScope: tmScope$9, + group: group$9, + aceMode: aceMode$9, + codemirrorMode: codemirrorMode$8, + codemirrorMimeType: codemirrorMimeType$8, + extensions: extensions$9, + languageId: languageId$9 +}; + +var scss$1 = Object.freeze({ + name: name$10, + type: type$9, + tmScope: tmScope$9, + group: group$9, + aceMode: aceMode$9, + codemirrorMode: codemirrorMode$8, + codemirrorMimeType: codemirrorMimeType$8, + extensions: extensions$9, + languageId: languageId$9, + default: scss +}); + +var require$$0$22 = ( css$3 && css$2 ) || css$3; + +var require$$1$11 = ( postcss$1 && postcss ) || postcss$1; + +var require$$2$11 = ( less$1 && less ) || less$1; + +var require$$3$4 = ( scss$1 && scss ) || scss$1; + +var languages$1 = [createLanguage(require$$0$22, { + override: { + since: "1.4.0", + parsers: ["css"], + vscodeLanguageIds: ["css"] + } +}), createLanguage(require$$1$11, { + override: { + since: "1.4.0", + parsers: ["css"], + vscodeLanguageIds: ["postcss"] + }, + extend: { + extensions: [".postcss"] + } +}), createLanguage(require$$2$11, { + override: { + since: "1.4.0", + parsers: ["less"], + vscodeLanguageIds: ["less"] + } +}), createLanguage(require$$3$4, { + override: { + since: "1.4.0", + parsers: ["scss"], + vscodeLanguageIds: ["scss"] + } +})]; +var printers$1 = { + postcss: printerPostcss +}; +var languageCss = { + languages: languages$1, + options: options$7, + printers: printers$1 +}; + +var _require$$0$builders$5 = doc.builders; +var concat$10 = _require$$0$builders$5.concat; +var join$7 = _require$$0$builders$5.join; +var softline$4 = _require$$0$builders$5.softline; +var hardline$8 = _require$$0$builders$5.hardline; +var line$6 = _require$$0$builders$5.line; +var group$10 = _require$$0$builders$5.group; +var indent$6 = _require$$0$builders$5.indent; +var ifBreak$3 = _require$$0$builders$5.ifBreak; // http://w3c.github.io/html/single-page.html#void-elements + +var voidTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]; // Formatter based on @glimmerjs/syntax's built-in test formatter: +// https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/generation/print.ts + +function print(path$$1, options, print) { + var n = path$$1.getValue(); + /* istanbul ignore if*/ + + if (!n) { + return ""; + } + + switch (n.type) { + case "Program": + { + return group$10(join$7(softline$4, path$$1.map(print, "body").filter(function (text) { + return text !== ""; + }))); + } + + case "ElementNode": + { + var tagFirstChar = n.tag[0]; + var isLocal = n.tag.indexOf(".") !== -1; + var isGlimmerComponent = tagFirstChar.toUpperCase() === tagFirstChar || isLocal; + var hasChildren = n.children.length > 0; + var isVoid = isGlimmerComponent && !hasChildren || voidTags.indexOf(n.tag) !== -1; + var closeTag = isVoid ? concat$10([" />", softline$4]) : ">"; + + var _getParams = function _getParams(path$$1, print) { + return indent$6(concat$10([n.attributes.length ? line$6 : "", join$7(line$6, path$$1.map(print, "attributes")), n.modifiers.length ? line$6 : "", join$7(line$6, path$$1.map(print, "modifiers")), n.comments.length ? line$6 : "", join$7(line$6, path$$1.map(print, "comments"))])); + }; // The problem here is that I want to not break at all if the children + // would not break but I need to force an indent, so I use a hardline. + + /** + * What happens now: + *
+ * Hello + *
+ * ==> + *
Hello
+ * This is due to me using hasChildren to decide to put the hardline in. + * I would rather use a {DOES THE WHOLE THING NEED TO BREAK} + */ + + + return concat$10([group$10(concat$10(["<", n.tag, _getParams(path$$1, print), n.blockParams.length ? ` as |${n.blockParams.join(" ")}|` : "", ifBreak$3(softline$4, ""), closeTag])), group$10(concat$10([indent$6(join$7(softline$4, [""].concat(path$$1.map(print, "children")))), ifBreak$3(hasChildren ? hardline$8 : "", ""), !isVoid ? concat$10([""]) : ""]))]); + } + + case "BlockStatement": + { + var pp = path$$1.getParentNode(1); + var isElseIf = pp && pp.inverse && pp.inverse.body[0] === n && pp.inverse.body[0].path.parts[0] === "if"; + var hasElseIf = n.inverse && n.inverse.body[0] && n.inverse.body[0].type === "BlockStatement" && n.inverse.body[0].path.parts[0] === "if"; + var indentElse = hasElseIf ? function (a) { + return a; + } : indent$6; + + if (n.inverse) { + return concat$10([isElseIf ? concat$10(["{{else ", printPathParams(path$$1, print), "}}"]) : printOpenBlock(path$$1, print), indent$6(concat$10([hardline$8, path$$1.call(print, "program")])), n.inverse && !hasElseIf ? concat$10([hardline$8, "{{else}}"]) : "", n.inverse ? indentElse(concat$10([hardline$8, path$$1.call(print, "inverse")])) : "", isElseIf ? "" : concat$10([hardline$8, printCloseBlock(path$$1, print)])]); + } else if (isElseIf) { + return concat$10([concat$10(["{{else ", printPathParams(path$$1, print), "}}"]), indent$6(concat$10([hardline$8, path$$1.call(print, "program")]))]); + } + /** + * I want this boolean to be: if params are going to cause a break, + * not that it has params. + */ + + + var hasParams = n.params.length > 0 || n.hash.pairs.length > 0; + + var _hasChildren = n.program.body.length > 0; + + return concat$10([printOpenBlock(path$$1, print), group$10(concat$10([indent$6(concat$10([softline$4, path$$1.call(print, "program")])), hasParams && _hasChildren ? hardline$8 : softline$4, printCloseBlock(path$$1, print)]))]); + } + + case "ElementModifierStatement": + case "MustacheStatement": + { + var _pp = path$$1.getParentNode(1); + + var isConcat = _pp && _pp.type === "ConcatStatement"; + return group$10(concat$10([n.escaped === false ? "{{{" : "{{", printPathParams(path$$1, print), isConcat ? "" : softline$4, n.escaped === false ? "}}}" : "}}"])); + } + + case "SubExpression": + { + var params = getParams(path$$1, print); + var printedParams = params.length > 0 ? indent$6(concat$10([line$6, group$10(join$7(line$6, params))])) : ""; + return group$10(concat$10(["(", printPath(path$$1, print), printedParams, softline$4, ")"])); + } + + case "AttrNode": + { + var isText = n.value.type === "TextNode"; + + if (isText && n.value.loc.start.column === n.value.loc.end.column) { + return concat$10([n.name]); + } + + var quote = isText ? '"' : ""; + return concat$10([n.name, "=", quote, path$$1.call(print, "value"), quote]); + } + + case "ConcatStatement": + { + return concat$10(['"', group$10(indent$6(join$7(softline$4, path$$1.map(function (partPath) { + return print(partPath); + }, "parts").filter(function (a) { + return a !== ""; + })))), '"']); + } + + case "Hash": + { + return concat$10([join$7(line$6, path$$1.map(print, "pairs"))]); + } + + case "HashPair": + { + return concat$10([n.key, "=", path$$1.call(print, "value")]); + } + + case "TextNode": + { + var leadingSpace = ""; + var trailingSpace = ""; // preserve a space inside of an attribute node where whitespace present, when next to mustache statement. + + var inAttrNode = path$$1.stack.indexOf("attributes") >= 0; + + if (inAttrNode) { + var parentNode = path$$1.getParentNode(0); + + var _isConcat = parentNode.type === "ConcatStatement"; + + if (_isConcat) { + var parts = parentNode.parts; + var partIndex = parts.indexOf(n); + + if (partIndex > 0) { + var partType = parts[partIndex - 1].type; + var isMustache = partType === "MustacheStatement"; + + if (isMustache) { + leadingSpace = " "; + } + } + + if (partIndex < parts.length - 1) { + var _partType = parts[partIndex + 1].type; + + var _isMustache = _partType === "MustacheStatement"; + + if (_isMustache) { + trailingSpace = " "; + } + } + } + } + + return n.chars.replace(/^\s+/, leadingSpace).replace(/\s+$/, trailingSpace); + } + + case "MustacheCommentStatement": + { + var dashes = n.value.indexOf("}}") > -1 ? "--" : ""; + return concat$10(["{{!", dashes, n.value, dashes, "}}"]); + } + + case "PathExpression": + { + return n.original; + } + + case "BooleanLiteral": + { + return String(n.value); + } + + case "CommentStatement": + { + return concat$10([""]); + } + + case "StringLiteral": + { + return printStringLiteral(n.value, options); + } + + case "NumberLiteral": + { + return String(n.value); + } + + case "UndefinedLiteral": + { + return "undefined"; + } + + case "NullLiteral": + { + return "null"; + } + + /* istanbul ignore next */ + + default: + throw new Error("unknown glimmer type: " + JSON.stringify(n.type)); + } +} +/** + * Prints a string literal with the correct surrounding quotes based on + * `options.singleQuote` and the number of escaped quotes contained in + * the string literal. This function is the glimmer equivalent of `printString` + * in `common/util`, but has differences because of the way escaped characters + * are treated in hbs string literals. + * @param {string} stringLiteral - the string literal value + * @param {object} options - the prettier options object + */ + + +function printStringLiteral(stringLiteral, options) { + var double = { + quote: '"', + regex: /"/g + }; + var single = { + quote: "'", + regex: /'/g + }; + var preferred = options.singleQuote ? single : double; + var alternate = preferred === single ? double : single; + var shouldUseAlternateQuote = false; // If `stringLiteral` contains at least one of the quote preferred for + // enclosing the string, we might want to enclose with the alternate quote + // instead, to minimize the number of escaped quotes. + + if (stringLiteral.includes(preferred.quote) || stringLiteral.includes(alternate.quote)) { + var numPreferredQuotes = (stringLiteral.match(preferred.regex) || []).length; + var numAlternateQuotes = (stringLiteral.match(alternate.regex) || []).length; + shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes; + } + + var enclosingQuote = shouldUseAlternateQuote ? alternate : preferred; + var escapedStringLiteral = stringLiteral.replace(enclosingQuote.regex, `\\${enclosingQuote.quote}`); + return `${enclosingQuote.quote}${escapedStringLiteral}${enclosingQuote.quote}`; +} + +function printPath(path$$1, print) { + return path$$1.call(print, "path"); +} + +function getParams(path$$1, print) { + var node = path$$1.getValue(); + var parts = []; + + if (node.params.length > 0) { + parts = parts.concat(path$$1.map(print, "params")); + } + + if (node.hash && node.hash.pairs.length > 0) { + parts.push(path$$1.call(print, "hash")); + } + + return parts; +} + +function printPathParams(path$$1, print) { + var parts = []; + parts.push(printPath(path$$1, print)); + parts = parts.concat(getParams(path$$1, print)); + return indent$6(group$10(join$7(line$6, parts))); +} + +function printBlockParams(path$$1) { + var block = path$$1.getValue(); + + if (!block.program || !block.program.blockParams.length) { + return ""; + } + + return concat$10([" as |", block.program.blockParams.join(" "), "|"]); +} + +function printOpenBlock(path$$1, print) { + return group$10(concat$10(["{{#", printPathParams(path$$1, print), printBlockParams(path$$1), softline$4, "}}"])); +} + +function printCloseBlock(path$$1, print) { + return concat$10(["{{/", path$$1.call(print, "path"), "}}"]); +} + +function clean$5(ast, newObj) { + delete newObj.loc; // (Glimmer/HTML) ignore TextNode whitespace + + if (ast.type === "TextNode") { + if (ast.chars.replace(/\s+/, "") === "") { + return null; + } + + newObj.chars = ast.chars.replace(/^\s+/, "").replace(/\s+$/, ""); + } +} + +var printerGlimmer = { + print, + massageAstNode: clean$5 +}; + +var name$11 = "Handlebars"; +var type$10 = "markup"; +var group$11 = "HTML"; +var aliases$3 = ["hbs", "htmlbars"]; +var extensions$10 = [".handlebars", ".hbs"]; +var tmScope$10 = "text.html.handlebars"; +var aceMode$10 = "handlebars"; +var languageId$10 = 155; +var handlebars = { + name: name$11, + type: type$10, + group: group$11, + aliases: aliases$3, + extensions: extensions$10, + tmScope: tmScope$10, + aceMode: aceMode$10, + languageId: languageId$10 +}; + +var handlebars$1 = Object.freeze({ + name: name$11, + type: type$10, + group: group$11, + aliases: aliases$3, + extensions: extensions$10, + tmScope: tmScope$10, + aceMode: aceMode$10, + languageId: languageId$10, + default: handlebars +}); + +var require$$0$23 = ( handlebars$1 && handlebars ) || handlebars$1; + +var languages$2 = [createLanguage(require$$0$23, { + override: { + since: null, + // unreleased + parsers: ["glimmer"], + vscodeLanguageIds: ["handlebars"] + } +})]; +var printers$2 = { + glimmer: printerGlimmer +}; +var languageHandlebars = { + languages: languages$2, + printers: printers$2 +}; + +function hasPragma$2(text) { + return /^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(text); +} + +function insertPragma$5(text) { + return "# @format\n\n" + text; +} + +var pragma$4 = { + hasPragma: hasPragma$2, + insertPragma: insertPragma$5 +}; + +var _require$$0$builders$6 = doc.builders; +var concat$11 = _require$$0$builders$6.concat; +var join$8 = _require$$0$builders$6.join; +var hardline$9 = _require$$0$builders$6.hardline; +var line$7 = _require$$0$builders$6.line; +var softline$5 = _require$$0$builders$6.softline; +var group$12 = _require$$0$builders$6.group; +var indent$7 = _require$$0$builders$6.indent; +var ifBreak$4 = _require$$0$builders$6.ifBreak; +var hasIgnoreComment$3 = util$1.hasIgnoreComment; +var isNextLineEmpty$4 = utilShared.isNextLineEmpty; +var insertPragma$4 = pragma$4.insertPragma; + +function genericPrint$3(path$$1, options, print) { + var n = path$$1.getValue(); + + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + switch (n.kind) { + case "Document": + { + var parts = []; + path$$1.map(function (pathChild, index) { + parts.push(concat$11([pathChild.call(print)])); + + if (index !== n.definitions.length - 1) { + parts.push(hardline$9); + + if (isNextLineEmpty$4(options.originalText, pathChild.getValue(), options)) { + parts.push(hardline$9); + } + } + }, "definitions"); + return concat$11([concat$11(parts), hardline$9]); + } + + case "OperationDefinition": + { + var hasOperation = options.originalText[options.locStart(n)] !== "{"; + var hasName = !!n.name; + return concat$11([hasOperation ? n.operation : "", hasOperation && hasName ? concat$11([" ", path$$1.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.map(print, "variableDefinitions"))])), softline$5, ")"])) : "", printDirectives(path$$1, print, n), n.selectionSet ? !hasOperation && !hasName ? "" : " " : "", path$$1.call(print, "selectionSet")]); + } + + case "FragmentDefinition": + { + return concat$11(["fragment ", path$$1.call(print, "name"), " on ", path$$1.call(print, "typeCondition"), printDirectives(path$$1, print, n), " ", path$$1.call(print, "selectionSet")]); + } + + case "SelectionSet": + { + return concat$11(["{", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (selectionsPath) { + return printSequence(selectionsPath, options, print); + }, "selections"))])), hardline$9, "}"]); + } + + case "Field": + { + return group$12(concat$11([n.alias ? concat$11([path$$1.call(print, "alias"), ": "]) : "", path$$1.call(print, "name"), n.arguments.length > 0 ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$5, ")"])) : "", printDirectives(path$$1, print, n), n.selectionSet ? " " : "", path$$1.call(print, "selectionSet")])); + } + + case "Name": + { + return n.value; + } + + case "StringValue": + { + if (n.block) { + return concat$11(['"""', hardline$9, join$8(hardline$9, n.value.replace(/"""/g, "\\$&").split("\n")), hardline$9, '"""']); + } + + return concat$11(['"', n.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']); + } + + case "IntValue": + case "FloatValue": + case "EnumValue": + { + return n.value; + } + + case "BooleanValue": + { + return n.value ? "true" : "false"; + } + + case "NullValue": + { + return "null"; + } + + case "Variable": + { + return concat$11(["$", path$$1.call(print, "name")]); + } + + case "ListValue": + { + return group$12(concat$11(["[", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.map(print, "values"))])), softline$5, "]"])); + } + + case "ObjectValue": + { + return group$12(concat$11(["{", options.bracketSpacing && n.fields.length > 0 ? " " : "", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.map(print, "fields"))])), softline$5, ifBreak$4("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), "}"])); + } + + case "ObjectField": + case "Argument": + { + return concat$11([path$$1.call(print, "name"), ": ", path$$1.call(print, "value")]); + } + + case "Directive": + { + return concat$11(["@", path$$1.call(print, "name"), n.arguments.length > 0 ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$5, ")"])) : ""]); + } + + case "NamedType": + { + return path$$1.call(print, "name"); + } + + case "VariableDefinition": + { + return concat$11([path$$1.call(print, "variable"), ": ", path$$1.call(print, "type"), n.defaultValue ? concat$11([" = ", path$$1.call(print, "defaultValue")]) : ""]); + } + + case "TypeExtensionDefinition": + { + return concat$11(["extend ", path$$1.call(print, "definition")]); + } + + case "ObjectTypeExtension": + case "ObjectTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "ObjectTypeExtension" ? "extend " : "", "type ", path$$1.call(print, "name"), n.interfaces.length > 0 ? concat$11([" implements ", join$8(determineInterfaceSeparator(options.originalText.substr(options.locStart(n), options.locEnd(n))), path$$1.map(print, "interfaces"))]) : "", printDirectives(path$$1, print, n), n.fields.length > 0 ? concat$11([" {", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$9, "}"]) : ""]); + } + + case "FieldDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", path$$1.call(print, "name"), n.arguments.length > 0 ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$5, ")"])) : "", ": ", path$$1.call(print, "type"), printDirectives(path$$1, print, n)]); + } + + case "DirectiveDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", "directive ", "@", path$$1.call(print, "name"), n.arguments.length > 0 ? group$12(concat$11(["(", indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", ", "), softline$5]), path$$1.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$5, ")"])) : "", concat$11([" on ", join$8(" | ", path$$1.map(print, "locations"))])]); + } + + case "EnumTypeExtension": + case "EnumTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "EnumTypeExtension" ? "extend " : "", "enum ", path$$1.call(print, "name"), printDirectives(path$$1, print, n), n.values.length > 0 ? concat$11([" {", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (valuesPath) { + return printSequence(valuesPath, options, print); + }, "values"))])), hardline$9, "}"]) : ""]); + } + + case "EnumValueDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", path$$1.call(print, "name"), printDirectives(path$$1, print, n)]); + } + + case "InputValueDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? n.description.block ? hardline$9 : line$7 : "", path$$1.call(print, "name"), ": ", path$$1.call(print, "type"), n.defaultValue ? concat$11([" = ", path$$1.call(print, "defaultValue")]) : "", printDirectives(path$$1, print, n)]); + } + + case "InputObjectTypeExtension": + case "InputObjectTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", path$$1.call(print, "name"), printDirectives(path$$1, print, n), n.fields.length > 0 ? concat$11([" {", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$9, "}"]) : ""]); + } + + case "SchemaDefinition": + { + return concat$11(["schema", printDirectives(path$$1, print, n), " {", n.operationTypes.length > 0 ? indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (opsPath) { + return printSequence(opsPath, options, print); + }, "operationTypes"))])) : "", hardline$9, "}"]); + } + + case "OperationTypeDefinition": + { + return concat$11([path$$1.call(print, "operation"), ": ", path$$1.call(print, "type")]); + } + + case "InterfaceTypeExtension": + case "InterfaceTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", path$$1.call(print, "name"), printDirectives(path$$1, print, n), n.fields.length > 0 ? concat$11([" {", indent$7(concat$11([hardline$9, join$8(hardline$9, path$$1.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$9, "}"]) : ""]); + } + + case "FragmentSpread": + { + return concat$11(["...", path$$1.call(print, "name"), printDirectives(path$$1, print, n)]); + } + + case "InlineFragment": + { + return concat$11(["...", n.typeCondition ? concat$11([" on ", path$$1.call(print, "typeCondition")]) : "", printDirectives(path$$1, print, n), " ", path$$1.call(print, "selectionSet")]); + } + + case "UnionTypeExtension": + case "UnionTypeDefinition": + { + return group$12(concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", group$12(concat$11([n.kind === "UnionTypeExtension" ? "extend " : "", "union ", path$$1.call(print, "name"), printDirectives(path$$1, print, n), n.types.length > 0 ? concat$11([" =", ifBreak$4("", " "), indent$7(concat$11([ifBreak$4(concat$11([line$7, " "])), join$8(concat$11([line$7, "| "]), path$$1.map(print, "types"))]))]) : ""]))])); + } + + case "ScalarTypeExtension": + case "ScalarTypeDefinition": + { + return concat$11([path$$1.call(print, "description"), n.description ? hardline$9 : "", n.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", path$$1.call(print, "name"), printDirectives(path$$1, print, n)]); + } + + case "NonNullType": + { + return concat$11([path$$1.call(print, "type"), "!"]); + } + + case "ListType": + { + return concat$11(["[", path$$1.call(print, "type"), "]"]); + } + + default: + /* istanbul ignore next */ + throw new Error("unknown graphql type: " + JSON.stringify(n.kind)); + } +} + +function printDirectives(path$$1, print, n) { + if (n.directives.length === 0) { + return ""; + } + + return concat$11([" ", group$12(indent$7(concat$11([softline$5, join$8(concat$11([ifBreak$4("", " "), softline$5]), path$$1.map(print, "directives"))])))]); +} + +function printSequence(sequencePath, options, print) { + var count = sequencePath.getValue().length; + return sequencePath.map(function (path$$1, i) { + var printed = print(path$$1); + + if (isNextLineEmpty$4(options.originalText, path$$1.getValue(), options) && i < count - 1) { + return concat$11([printed, hardline$9]); + } + + return printed; + }); +} + +function canAttachComment$1(node) { + return node.kind && node.kind !== "Comment"; +} + +function printComment$2(commentPath) { + var comment = commentPath.getValue(); + + if (comment.kind === "Comment") { + return "#" + comment.value.trimRight(); + } + + throw new Error("Not a comment: " + JSON.stringify(comment)); +} + +function determineInterfaceSeparator(originalSource) { + var start = originalSource.indexOf("implements"); + + if (start === -1) { + throw new Error("Must implement interfaces: " + originalSource); + } + + var end = originalSource.indexOf("{"); + + if (end === -1) { + end = originalSource.length; + } + + return originalSource.substr(start, end).includes("&") ? " & " : ", "; +} + +function clean$6(node, newNode +/*, parent*/ +) { + delete newNode.loc; + delete newNode.comments; +} + +var printerGraphql = { + print: genericPrint$3, + massageAstNode: clean$6, + hasPrettierIgnore: hasIgnoreComment$3, + insertPragma: insertPragma$4, + printComment: printComment$2, + canAttachComment: canAttachComment$1 +}; + +var options$10 = { + bracketSpacing: commonOptions.bracketSpacing +}; + +var name$12 = "GraphQL"; +var type$11 = "data"; +var extensions$11 = [".graphql", ".gql"]; +var tmScope$11 = "source.graphql"; +var aceMode$11 = "text"; +var languageId$11 = 139; +var graphql = { + name: name$12, + type: type$11, + extensions: extensions$11, + tmScope: tmScope$11, + aceMode: aceMode$11, + languageId: languageId$11 +}; + +var graphql$1 = Object.freeze({ + name: name$12, + type: type$11, + extensions: extensions$11, + tmScope: tmScope$11, + aceMode: aceMode$11, + languageId: languageId$11, + default: graphql +}); + +var require$$0$24 = ( graphql$1 && graphql ) || graphql$1; + +var languages$3 = [createLanguage(require$$0$24, { + override: { + since: "1.5.0", + parsers: ["graphql"], + vscodeLanguageIds: ["graphql"] + } +})]; +var printers$3 = { + graphql: printerGraphql +}; +var languageGraphql = { + languages: languages$3, + options: options$10, + printers: printers$3 +}; + +const json$6 = {"cjkPattern":"[\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\u303f\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312e\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u32fe\\u3300-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fea\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]","kPattern":"[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]","punctuationPattern":"[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0af0\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166d-\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e49\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc9\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]"}; + +var cjkPattern = json$6.cjkPattern; +var kPattern = json$6.kPattern; +var punctuationPattern$1 = json$6.punctuationPattern; +var getLast$5 = util$1.getLast; +var kRegex = new RegExp(kPattern); +var punctuationRegex = new RegExp(punctuationPattern$1); +/** + * split text into whitespaces and words + * @param {string} text + * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>} + */ + +function splitText$1(text, options) { + var KIND_NON_CJK = "non-cjk"; + var KIND_CJ_LETTER = "cj-letter"; + var KIND_K_LETTER = "k-letter"; + var KIND_CJK_PUNCTUATION = "cjk-punctuation"; + var nodes = []; + (options.proseWrap === "preserve" ? text : text.replace(new RegExp(`(${cjkPattern})\n(${cjkPattern})`, "g"), "$1$2")).split(/([ \t\n]+)/).forEach(function (token, index, tokens) { + // whitespace + if (index % 2 === 1) { + nodes.push({ + type: "whitespace", + value: /\n/.test(token) ? "\n" : " " + }); + return; + } // word separated by whitespace + + + if ((index === 0 || index === tokens.length - 1) && token === "") { + return; + } + + token.split(new RegExp(`(${cjkPattern})`)).forEach(function (innerToken, innerIndex, innerTokens) { + if ((innerIndex === 0 || innerIndex === innerTokens.length - 1) && innerToken === "") { + return; + } // non-CJK word + + + if (innerIndex % 2 === 0) { + if (innerToken !== "") { + appendNode({ + type: "word", + value: innerToken, + kind: KIND_NON_CJK, + hasLeadingPunctuation: punctuationRegex.test(innerToken[0]), + hasTrailingPunctuation: punctuationRegex.test(getLast$5(innerToken)) + }); + } + + return; + } // CJK character + + + appendNode(punctuationRegex.test(innerToken) ? { + type: "word", + value: innerToken, + kind: KIND_CJK_PUNCTUATION, + hasLeadingPunctuation: true, + hasTrailingPunctuation: true + } : { + type: "word", + value: innerToken, + kind: kRegex.test(innerToken) ? KIND_K_LETTER : KIND_CJ_LETTER, + hasLeadingPunctuation: false, + hasTrailingPunctuation: false + }); + }); + }); + return nodes; + + function appendNode(node) { + var lastNode = getLast$5(nodes); + + if (lastNode && lastNode.type === "word") { + if (lastNode.kind === KIND_NON_CJK && node.kind === KIND_CJ_LETTER && !lastNode.hasTrailingPunctuation || lastNode.kind === KIND_CJ_LETTER && node.kind === KIND_NON_CJK && !node.hasLeadingPunctuation) { + nodes.push({ + type: "whitespace", + value: " " + }); + } else if (!isBetween(KIND_NON_CJK, KIND_CJK_PUNCTUATION) && // disallow leading/trailing full-width whitespace + ![lastNode.value, node.value].some(function (value) { + return /\u3000/.test(value); + })) { + nodes.push({ + type: "whitespace", + value: "" + }); + } + } + + nodes.push(node); + + function isBetween(kind1, kind2) { + return lastNode.kind === kind1 && node.kind === kind2 || lastNode.kind === kind2 && node.kind === kind1; + } + } +} + +function getOrderedListItemInfo$1(orderListItem, originalText) { + var _originalText$slice$m = originalText.slice(orderListItem.position.start.offset, orderListItem.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/), + _originalText$slice$m2 = _slicedToArray(_originalText$slice$m, 4), + numberText = _originalText$slice$m2[1], + marker = _originalText$slice$m2[2], + leadingSpaces = _originalText$slice$m2[3]; + + return { + numberText, + marker, + leadingSpaces + }; +} // workaround for https://github.com/remarkjs/remark/issues/351 +// leading and trailing newlines are stripped by remark + + +function getFencedCodeBlockValue$2(node, originalText) { + var text = originalText.slice(node.position.start.offset, node.position.end.offset); + var leadingSpaceCount = text.match(/^\s*/)[0].length; + var replaceRegex = new RegExp(`^\\s{0,${leadingSpaceCount}}`); + var lineContents = text.replace(/\r\n?/g, "\n").split("\n"); + var markerStyle = text[leadingSpaceCount]; // ` or ~ + + var marker = text.slice(leadingSpaceCount).match(new RegExp(`^[${markerStyle}]+`))[0]; // https://spec.commonmark.org/0.28/#example-104: Closing fences may be indented by 0-3 spaces + // https://spec.commonmark.org/0.28/#example-93: The closing code fence must be at least as long as the opening fence + + var hasEndMarker = new RegExp(`^\\s{0,3}${marker}`).test(lineContents[lineContents.length - 1].slice(getIndent(lineContents.length - 1))); + return lineContents.slice(1, hasEndMarker ? -1 : undefined).map(function (x, i) { + return x.slice(getIndent(i + 1)).replace(replaceRegex, ""); + }).join("\n"); + + function getIndent(lineIndex) { + return node.position.indent[lineIndex - 1] - 1; + } +} + +function mapAst(ast, handler) { + return function preorder(node, index, parentStack) { + parentStack = parentStack || []; + var newNode = Object.assign({}, handler(node, index, parentStack)); + + if (newNode.children) { + newNode.children = newNode.children.map(function (child, index) { + return preorder(child, index, [newNode].concat(parentStack)); + }); + } + + return newNode; + }(ast, null, null); +} + +var utils$8 = { + mapAst, + splitText: splitText$1, + punctuationPattern: punctuationPattern$1, + getFencedCodeBlockValue: getFencedCodeBlockValue$2, + getOrderedListItemInfo: getOrderedListItemInfo$1 +}; + +var _require$$0$builders$8 = doc.builders; +var hardline$11 = _require$$0$builders$8.hardline; +var literalline$5 = _require$$0$builders$8.literalline; +var concat$13 = _require$$0$builders$8.concat; +var markAsRoot$3 = _require$$0$builders$8.markAsRoot; +var mapDoc$5 = doc.utils.mapDoc; +var getFencedCodeBlockValue$1 = utils$8.getFencedCodeBlockValue; + +function embed$4(path$$1, print, textToDoc, options) { + var node = path$$1.getValue(); + + if (node.type === "code" && node.lang !== null) { + // only look for the first string so as to support [markdown-preview-enhanced](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk) + var langMatch = node.lang.match(/^[A-Za-z0-9_-]+/); + var lang = langMatch ? langMatch[0] : ""; + var parser = getParserName(lang); + + if (parser) { + var styleUnit = options.__inJsTemplate ? "~" : "`"; + var style = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1)); + var doc$$2 = textToDoc(getFencedCodeBlockValue$1(node, options.originalText), { + parser + }); + return markAsRoot$3(concat$13([style, node.lang, hardline$11, replaceNewlinesWithLiterallines(doc$$2), style])); + } + } + + if (node.type === "yaml") { + return markAsRoot$3(concat$13(["---", hardline$11, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, { + parser: "yaml" + })) : "", "---"])); + } // MDX + + + switch (node.type) { + case "importExport": + return textToDoc(node.value, { + parser: "babylon" + }); + + case "jsx": + return textToDoc(node.value, { + parser: "__js_expression" + }); + } + + return null; + + function getParserName(lang) { + var supportInfo = support.getSupportInfo(null, { + plugins: options.plugins + }); + var language = supportInfo.languages.find(function (language) { + return language.name.toLowerCase() === lang || language.aliases && language.aliases.indexOf(lang) !== -1 || language.extensions && language.extensions.find(function (ext) { + return ext.substring(1) === lang; + }); + }); + + if (language) { + return language.parsers[0]; + } + + return null; + } + + function replaceNewlinesWithLiterallines(doc$$2) { + return mapDoc$5(doc$$2, function (currentDoc) { + return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$13(currentDoc.split(/(\n)/g).map(function (v, i) { + return i % 2 === 0 ? v : literalline$5; + })) : currentDoc; + }); + } +} + +var embed_1$4 = embed$4; + +var pragma$6 = createCommonjsModule(function (module) { + "use strict"; + + var pragmas = ["format", "prettier"]; + + function startWithPragma(text) { + var pragma = `@(${pragmas.join("|")})`; + var regex = new RegExp([``, ``].join("|"), "m"); + var matched = text.match(regex); + return matched && matched.index === 0; + } + + module.exports = { + startWithPragma, + hasPragma: function hasPragma(text) { + return startWithPragma(frontMatter(text).content.trimLeft()); + }, + insertPragma: function insertPragma(text) { + var extracted = frontMatter(text); + var pragma = ``; + return extracted.frontMatter ? `${extracted.frontMatter.raw}\n\n${pragma}\n\n${extracted.content}` : `${pragma}\n\n${extracted.content}`; + } + }; +}); + +var getOrderedListItemInfo$2 = utils$8.getOrderedListItemInfo; +var mapAst$1 = utils$8.mapAst; +var splitText$2 = utils$8.splitText; // 0x0 ~ 0x10ffff + +var isSingleCharRegex = /^([\u0000-\uffff]|[\ud800-\udbff][\udc00-\udfff])$/; + +function preprocess$2(ast, options) { + ast = restoreUnescapedCharacter(ast, options); + ast = mergeContinuousTexts(ast); + ast = transformInlineCode(ast); + ast = transformIndentedCodeblockAndMarkItsParentList(ast, options); + ast = markAlignedList(ast, options); + ast = splitTextIntoSentences(ast, options); + ast = transformImportExport(ast); + ast = mergeContinuousImportExport(ast); + return ast; +} + +function transformImportExport(ast) { + return mapAst$1(ast, function (node) { + if (node.type !== "import" && node.type !== "export") { + return node; + } + + return Object.assign({}, node, { + type: "importExport" + }); + }); +} + +function transformInlineCode(ast) { + return mapAst$1(ast, function (node) { + if (node.type !== "inlineCode") { + return node; + } + + return Object.assign({}, node, { + value: node.value.replace(/\s+/g, " ") + }); + }); +} + +function restoreUnescapedCharacter(ast, options) { + return mapAst$1(ast, function (node) { + return node.type !== "text" ? node : Object.assign({}, node, { + value: node.value !== "*" && node.value !== "_" && node.value !== "$" && // handle these cases in printer + isSingleCharRegex.test(node.value) && node.position.end.offset - node.position.start.offset !== node.value.length ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : node.value + }); + }); +} + +function mergeContinuousImportExport(ast) { + return mergeChildren(ast, function (prevNode, node) { + return prevNode.type === "importExport" && node.type === "importExport"; + }, function (prevNode, node) { + return { + type: "importExport", + value: prevNode.value + "\n\n" + node.value, + position: { + start: prevNode.position.start, + end: node.position.end + } + }; + }); +} + +function mergeChildren(ast, shouldMerge, mergeNode) { + return mapAst$1(ast, function (node) { + if (!node.children) { + return node; + } + + var children = node.children.reduce(function (current, child) { + var lastChild = current[current.length - 1]; + + if (lastChild && shouldMerge(lastChild, child)) { + current.splice(-1, 1, mergeNode(lastChild, child)); + } else { + current.push(child); + } + + return current; + }, []); + return Object.assign({}, node, { + children + }); + }); +} + +function mergeContinuousTexts(ast) { + return mergeChildren(ast, function (prevNode, node) { + return prevNode.type === "text" && node.type === "text"; + }, function (prevNode, node) { + return { + type: "text", + value: prevNode.value + node.value, + position: { + start: prevNode.position.start, + end: node.position.end + } + }; + }); +} + +function splitTextIntoSentences(ast, options) { + return mapAst$1(ast, function (node, index, _ref) { + var _ref2 = _slicedToArray(_ref, 1), + parentNode = _ref2[0]; + + if (node.type !== "text") { + return node; + } + + var value = node.value; + + if (parentNode.type === "paragraph") { + if (index === 0) { + value = value.trimLeft(); + } + + if (index === parentNode.children.length - 1) { + value = value.trimRight(); + } + } + + return { + type: "sentence", + position: node.position, + children: splitText$2(value, options) + }; + }); +} + +function transformIndentedCodeblockAndMarkItsParentList(ast, options) { + return mapAst$1(ast, function (node, index, parentStack) { + if (node.type === "code") { + // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it + var isIndented = /^\n?( {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset)); + node.isIndented = isIndented; + + if (isIndented) { + for (var i = 0; i < parentStack.length; i++) { + var parent = parentStack[i]; // no need to check checked items + + if (parent.hasIndentedCodeblock) { + break; + } + + if (parent.type === "list") { + parent.hasIndentedCodeblock = true; + } + } + } + } + + return node; + }); +} + +function markAlignedList(ast, options) { + return mapAst$1(ast, function (node, index, parentStack) { + if (node.type === "list" && node.children.length !== 0) { + // if one of its parents is not aligned, it's not possible to be aligned in sub-lists + for (var i = 0; i < parentStack.length; i++) { + var parent = parentStack[i]; + + if (parent.type === "list" && !parent.isAligned) { + node.isAligned = false; + return node; + } + } + + node.isAligned = isAligned(node); + } + + return node; + }); + + function getListItemStart(listItem) { + return listItem.children.length === 0 ? -1 : listItem.children[0].position.start.column - 1; + } + + function isAligned(list) { + if (!list.ordered) { + /** + * - 123 + * - 123 + */ + return true; + } + + var _list$children = _slicedToArray(list.children, 2), + firstItem = _list$children[0], + secondItem = _list$children[1]; + + var firstInfo = getOrderedListItemInfo$2(firstItem, options.originalText); + + if (firstInfo.leadingSpaces.length > 1) { + /** + * 1. 123 + * + * 1. 123 + * 1. 123 + */ + return true; + } + + var firstStart = getListItemStart(firstItem); + + if (firstStart === -1) { + /** + * 1. + * + * 1. + * 1. + */ + return false; + } + + if (list.children.length === 1) { + /** + * aligned: + * + * 11. 123 + * + * not aligned: + * + * 1. 123 + */ + return firstStart % options.tabWidth === 0; + } + + var secondStart = getListItemStart(secondItem); + + if (firstStart !== secondStart) { + /** + * 11. 123 + * 1. 123 + * + * 1. 123 + * 11. 123 + */ + return false; + } + + if (firstStart % options.tabWidth === 0) { + /** + * 11. 123 + * 12. 123 + */ + return true; + } + /** + * aligned: + * + * 11. 123 + * 1. 123 + * + * not aligned: + * + * 1. 123 + * 2. 123 + */ + + + var secondInfo = getOrderedListItemInfo$2(secondItem, options.originalText); + return secondInfo.leadingSpaces.length > 1; + } +} + +var preprocess_1$2 = preprocess$2; + +var _require$$0$builders$7 = doc.builders; +var concat$12 = _require$$0$builders$7.concat; +var join$9 = _require$$0$builders$7.join; +var line$8 = _require$$0$builders$7.line; +var literalline$4 = _require$$0$builders$7.literalline; +var markAsRoot$2 = _require$$0$builders$7.markAsRoot; +var hardline$10 = _require$$0$builders$7.hardline; +var softline$6 = _require$$0$builders$7.softline; +var fill$4 = _require$$0$builders$7.fill; +var align$2 = _require$$0$builders$7.align; +var indent$8 = _require$$0$builders$7.indent; +var group$13 = _require$$0$builders$7.group; +var mapDoc$4 = doc.utils.mapDoc; +var printDocToString$3 = doc.printer.printDocToString; +var getFencedCodeBlockValue = utils$8.getFencedCodeBlockValue; +var getOrderedListItemInfo = utils$8.getOrderedListItemInfo; +var splitText = utils$8.splitText; +var punctuationPattern = utils$8.punctuationPattern; +var TRAILING_HARDLINE_NODES = ["importExport"]; +var SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"]; +var SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"]; +var INLINE_NODE_TYPES = ["liquidNode", "inlineCode", "emphasis", "strong", "delete", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"]; +var INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat(["tableCell", "paragraph", "heading"]); + +function genericPrint$4(path$$1, options, print) { + var node = path$$1.getValue(); + + if (shouldRemainTheSameContent(path$$1)) { + return concat$12(splitText(options.originalText.slice(node.position.start.offset, node.position.end.offset), options).map(function (node) { + return node.type === "word" ? node.value : node.value === "" ? "" : printLine(path$$1, node.value, options); + })); + } + + switch (node.type) { + case "root": + if (node.children.length === 0) { + return ""; + } + + return concat$12([normalizeDoc(printRoot(path$$1, options, print)), TRAILING_HARDLINE_NODES.indexOf(getLastDescendantNode(node).type) === -1 ? hardline$10 : ""]); + + case "paragraph": + return printChildren(path$$1, options, print, { + postprocessor: fill$4 + }); + + case "sentence": + return printChildren(path$$1, options, print); + + case "word": + return node.value.replace(/[*$]/g, "\\$&") // escape all `*` and `$` (math) + .replace(new RegExp([`(^|${punctuationPattern})(_+)`, `(_+)(${punctuationPattern}|$)`].join("|"), "g"), function (_, text1, underscore1, underscore2, text2) { + return (underscore1 ? `${text1}${underscore1}` : `${underscore2}${text2}`).replace(/_/g, "\\_"); + }); + // escape all `_` except concating with non-punctuation, e.g. `1_2_3` is not considered emphasis + + case "whitespace": + { + var parentNode = path$$1.getParentNode(); + var index = parentNode.children.indexOf(node); + var nextNode = parentNode.children[index + 1]; + var proseWrap = // leading char that may cause different syntax + nextNode && /^>|^([-+*]|#{1,6}|[0-9]+[.)])$/.test(nextNode.value) ? "never" : options.proseWrap; + return printLine(path$$1, node.value, { + proseWrap + }); + } + + case "emphasis": + { + var _parentNode = path$$1.getParentNode(); + + var _index = _parentNode.children.indexOf(node); + + var prevNode = _parentNode.children[_index - 1]; + var _nextNode = _parentNode.children[_index + 1]; + var hasPrevOrNextWord = // `1*2*3` is considered emphais but `1_2_3` is not + prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && util$1.getLast(prevNode.children).type === "word" && !util$1.getLast(prevNode.children).hasTrailingPunctuation || _nextNode && _nextNode.type === "sentence" && _nextNode.children.length > 0 && _nextNode.children[0].type === "word" && !_nextNode.children[0].hasLeadingPunctuation; + var style = hasPrevOrNextWord || getAncestorNode$2(path$$1, "emphasis") ? "*" : "_"; + return concat$12([style, printChildren(path$$1, options, print), style]); + } + + case "strong": + return concat$12(["**", printChildren(path$$1, options, print), "**"]); + + case "delete": + return concat$12(["~~", printChildren(path$$1, options, print), "~~"]); + + case "inlineCode": + { + var backtickCount = util$1.getMaxContinuousCount(node.value, "`"); + + var _style = backtickCount === 1 ? "``" : "`"; + + var gap = backtickCount ? " " : ""; + return concat$12([_style, gap, node.value, gap, _style]); + } + + case "link": + switch (options.originalText[node.position.start.offset]) { + case "<": + { + var mailto = "mailto:"; + var url = // is parsed as { url: "mailto:hello@example.com" } + node.url.startsWith(mailto) && options.originalText.slice(node.position.start.offset + 1, node.position.start.offset + 1 + mailto.length) !== mailto ? node.url.slice(mailto.length) : node.url; + return concat$12(["<", url, ">"]); + } + + case "[": + return concat$12(["[", printChildren(path$$1, options, print), "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]); + + default: + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + } + + case "image": + return concat$12(["![", node.alt || "", "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]); + + case "blockquote": + return concat$12(["> ", align$2("> ", printChildren(path$$1, options, print))]); + + case "heading": + return concat$12(["#".repeat(node.depth) + " ", printChildren(path$$1, options, print)]); + + case "code": + { + if (node.isIndented) { + // indented code block + var alignment = " ".repeat(4); + return align$2(alignment, concat$12([alignment, replaceNewlinesWith(node.value, hardline$10)])); + } // fenced code block + + + var styleUnit = options.__inJsTemplate ? "~" : "`"; + + var _style2 = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1)); + + return concat$12([_style2, node.lang || "", hardline$10, replaceNewlinesWith(getFencedCodeBlockValue(node, options.originalText), hardline$10), hardline$10, _style2]); + } + + case "yaml": + case "toml": + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + + case "html": + { + var _parentNode2 = path$$1.getParentNode(); + + var value = _parentNode2.type === "root" && util$1.getLast(_parentNode2.children) === node ? node.value.trimRight() : node.value; + var isHtmlComment = /^$/.test(value); + return replaceNewlinesWith(value, isHtmlComment ? hardline$10 : markAsRoot$2(literalline$4)); + } + + case "list": + { + var nthSiblingIndex = getNthListSiblingIndex(node, path$$1.getParentNode()); + var isGitDiffFriendlyOrderedList = node.ordered && node.children.length > 1 && +getOrderedListItemInfo(node.children[1], options.originalText).numberText === 1; + return printChildren(path$$1, options, print, { + processor: function processor(childPath, index) { + var prefix = getPrefix(); + return concat$12([prefix, align$2(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))]); + + function getPrefix() { + var rawPrefix = node.ordered ? (index === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* "; + return node.isAligned || + /* workaround for https://github.com/remarkjs/remark/issues/315 */ + node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix; + } + } + }); + } + + case "thematicBreak": + { + var counter = getAncestorCounter$1(path$$1, "list"); + + if (counter === -1) { + return "---"; + } + + var _nthSiblingIndex = getNthListSiblingIndex(path$$1.getParentNode(counter), path$$1.getParentNode(counter + 1)); + + return _nthSiblingIndex % 2 === 0 ? "***" : "---"; + } + + case "linkReference": + return concat$12(["[", printChildren(path$$1, options, print), "]", node.referenceType === "full" ? concat$12(["[", node.identifier, "]"]) : node.referenceType === "collapsed" ? "[]" : ""]); + + case "imageReference": + switch (node.referenceType) { + case "full": + return concat$12(["![", node.alt || "", "][", node.identifier, "]"]); + + default: + return concat$12(["![", node.alt, "]", node.referenceType === "collapsed" ? "[]" : ""]); + } + + case "definition": + { + var lineOrSpace = options.proseWrap === "always" ? line$8 : " "; + return group$13(concat$12([concat$12(["[", node.identifier, "]:"]), indent$8(concat$12([lineOrSpace, printUrl(node.url), node.title === null ? "" : concat$12([lineOrSpace, printTitle(node.title, options, false)])]))])); + } + + case "footnote": + return concat$12(["[^", printChildren(path$$1, options, print), "]"]); + + case "footnoteReference": + return concat$12(["[^", node.identifier, "]"]); + + case "footnoteDefinition": + { + var _nextNode2 = path$$1.getParentNode().children[path$$1.getName() + 1]; + var shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line); + return concat$12(["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren(path$$1, options, print) : group$13(concat$12([align$2(" ".repeat(options.tabWidth), printChildren(path$$1, options, print, { + processor: function processor(childPath, index) { + return index === 0 ? group$13(concat$12([softline$6, softline$6, childPath.call(print)])) : childPath.call(print); + } + })), _nextNode2 && _nextNode2.type === "footnoteDefinition" ? softline$6 : ""]))]); + } + + case "table": + return printTable(path$$1, options, print); + + case "tableCell": + return printChildren(path$$1, options, print); + + case "break": + return /\s/.test(options.originalText[node.position.start.offset]) ? concat$12([" ", markAsRoot$2(literalline$4)]) : concat$12(["\\", hardline$10]); + + case "liquidNode": + return replaceNewlinesWith(node.value, hardline$10); + // MDX + + case "importExport": + case "jsx": + return node.value; + // fallback to the original text if multiparser failed + + case "math": + return concat$12(["$$", hardline$10, node.value ? concat$12([replaceNewlinesWith(node.value, hardline$10), hardline$10]) : "", "$$"]); + + case "inlineMath": + { + // $$math$$ can be block math in some variants + // see https://github.com/Rokt33r/remark-math#double-dollars-in-inline + var _style3 = options.originalText[node.position.start.offset + 1] === "$" ? "$$" : "$"; + + return concat$12([_style3, node.value, _style3]); + } + + case "tableRow": // handled in "table" + + case "listItem": // handled in "list" + + default: + throw new Error(`Unknown markdown type ${JSON.stringify(node.type)}`); + } +} + +function printListItem(path$$1, options, print, listPrefix) { + var node = path$$1.getValue(); + var prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] "; + return concat$12([prefix, printChildren(path$$1, options, print, { + processor: function processor(childPath, index) { + if (index === 0 && childPath.getValue().type !== "list") { + return align$2(" ".repeat(prefix.length), childPath.call(print)); + } + + var alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block + ); + return concat$12([alignment, align$2(alignment, childPath.call(print))]); + } + })]); +} + +function alignListPrefix(prefix, options) { + var additionalSpaces = getAdditionalSpaces(); + return prefix + " ".repeat(additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block + ); + + function getAdditionalSpaces() { + var restSpaces = prefix.length % options.tabWidth; + return restSpaces === 0 ? 0 : options.tabWidth - restSpaces; + } +} + +function getNthListSiblingIndex(node, parentNode) { + return getNthSiblingIndex(node, parentNode, function (siblingNode) { + return siblingNode.ordered === node.ordered; + }); +} + +function replaceNewlinesWith(str, doc$$2) { + return join$9(doc$$2, str.replace(/\r\n?/g, "\n").split("\n")); +} + +function getNthSiblingIndex(node, parentNode, condition) { + condition = condition || function () { + return true; + }; + + var index = -1; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = parentNode.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var childNode = _step.value; + + if (childNode.type === node.type && condition(childNode)) { + index++; + } else { + index = -1; + } + + if (childNode === node) { + return index; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +} + +function getAncestorCounter$1(path$$1, typeOrTypes) { + var types = [].concat(typeOrTypes); + var counter = -1; + var ancestorNode; + + while (ancestorNode = path$$1.getParentNode(++counter)) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode$2(path$$1, typeOrTypes) { + var counter = getAncestorCounter$1(path$$1, typeOrTypes); + return counter === -1 ? null : path$$1.getParentNode(counter); +} + +function printLine(path$$1, value, options) { + if (options.proseWrap === "preserve" && value === "\n") { + return hardline$10; + } + + var isBreakable = options.proseWrap === "always" && !getAncestorNode$2(path$$1, SINGLE_LINE_NODE_TYPES); + return value !== "" ? isBreakable ? line$8 : " " : isBreakable ? softline$6 : ""; +} + +function printTable(path$$1, options, print) { + var node = path$$1.getValue(); + var contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } } + + path$$1.map(function (rowPath) { + var rowContents = []; + rowPath.map(function (cellPath) { + rowContents.push(printDocToString$3(cellPath.call(print), options).formatted); + }, "children"); + contents.push(rowContents); + }, "children"); + var columnMaxWidths = contents.reduce(function (currentWidths, rowContents) { + return currentWidths.map(function (width, columnIndex) { + return Math.max(width, util$1.getStringWidth(rowContents[columnIndex])); + }); + }, contents[0].map(function () { + return 3; + }) // minimum width = 3 (---, :--, :-:, --:) + ); + return join$9(hardline$10, [printRow(contents[0]), printSeparator(), join$9(hardline$10, contents.slice(1).map(printRow))]); + + function printSeparator() { + return concat$12(["| ", join$9(" | ", columnMaxWidths.map(function (width, index) { + switch (node.align[index]) { + case "left": + return ":" + "-".repeat(width - 1); + + case "right": + return "-".repeat(width - 1) + ":"; + + case "center": + return ":" + "-".repeat(width - 2) + ":"; + + default: + return "-".repeat(width); + } + })), " |"]); + } + + function printRow(rowContents) { + return concat$12(["| ", join$9(" | ", rowContents.map(function (rowContent, columnIndex) { + switch (node.align[columnIndex]) { + case "right": + return alignRight(rowContent, columnMaxWidths[columnIndex]); + + case "center": + return alignCenter(rowContent, columnMaxWidths[columnIndex]); + + default: + return alignLeft(rowContent, columnMaxWidths[columnIndex]); + } + })), " |"]); + } + + function alignLeft(text, width) { + return concat$12([text, " ".repeat(width - util$1.getStringWidth(text))]); + } + + function alignRight(text, width) { + return concat$12([" ".repeat(width - util$1.getStringWidth(text)), text]); + } + + function alignCenter(text, width) { + var spaces = width - util$1.getStringWidth(text); + var left = Math.floor(spaces / 2); + var right = spaces - left; + return concat$12([" ".repeat(left), text, " ".repeat(right)]); + } +} + +function printRoot(path$$1, options, print) { + /** @typedef {{ index: number, offset: number }} IgnorePosition */ + + /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */ + var ignoreRanges = []; + /** @type {IgnorePosition | null} */ + + var ignoreStart = null; + var children = path$$1.getValue().children; + children.forEach(function (childNode, index) { + switch (isPrettierIgnore(childNode)) { + case "start": + if (ignoreStart === null) { + ignoreStart = { + index, + offset: childNode.position.end.offset + }; + } + + break; + + case "end": + if (ignoreStart !== null) { + ignoreRanges.push({ + start: ignoreStart, + end: { + index, + offset: childNode.position.start.offset + } + }); + ignoreStart = null; + } + + break; + + default: + // do nothing + break; + } + }); + return printChildren(path$$1, options, print, { + processor: function processor(childPath, index) { + if (ignoreRanges.length !== 0) { + var ignoreRange = ignoreRanges[0]; + + if (index === ignoreRange.start.index) { + return concat$12([children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value]); + } + + if (ignoreRange.start.index < index && index < ignoreRange.end.index) { + return false; + } + + if (index === ignoreRange.end.index) { + ignoreRanges.shift(); + return false; + } + } + + return childPath.call(print); + } + }); +} + +function printChildren(path$$1, options, print, events$$1) { + events$$1 = events$$1 || {}; + var postprocessor = events$$1.postprocessor || concat$12; + + var processor = events$$1.processor || function (childPath) { + return childPath.call(print); + }; + + var node = path$$1.getValue(); + var parts = []; + var lastChildNode; + path$$1.map(function (childPath, index) { + var childNode = childPath.getValue(); + var result = processor(childPath, index); + + if (result !== false) { + var data = { + parts, + prevNode: lastChildNode, + parentNode: node, + options + }; + + if (!shouldNotPrePrintHardline(childNode, data)) { + parts.push(hardline$10); + + if (lastChildNode && TRAILING_HARDLINE_NODES.indexOf(lastChildNode.type) !== -1) { + if (shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$10); + } + } else { + if (shouldPrePrintDoubleHardline(childNode, data) || shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$10); + } + + if (shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$10); + } + } + } + + parts.push(result); + lastChildNode = childNode; + } + }, "children"); + return postprocessor(parts); +} + +function getLastDescendantNode(node) { + var current = node; + + while (current.children && current.children.length !== 0) { + current = current.children[current.children.length - 1]; + } + + return current; +} +/** @return {false | 'next' | 'start' | 'end'} */ + + +function isPrettierIgnore(node) { + if (node.type !== "html") { + return false; + } + + var match = node.value.match(/^$/); + return match === null ? false : match[1] ? match[1] : "next"; +} + +function shouldNotPrePrintHardline(node, data) { + var isFirstNode = data.parts.length === 0; + var isInlineNode = INLINE_NODE_TYPES.indexOf(node.type) !== -1; + var isInlineHTML = node.type === "html" && INLINE_NODE_WRAPPER_TYPES.indexOf(data.parentNode.type) !== -1; + return isFirstNode || isInlineNode || isInlineHTML; +} + +function shouldPrePrintDoubleHardline(node, data) { + var isSequence = (data.prevNode && data.prevNode.type) === node.type; + var isSiblingNode = isSequence && SIBLING_NODE_TYPES.indexOf(node.type) !== -1; + var isInTightListItem = data.parentNode.type === "listItem" && !data.parentNode.loose; + var isPrevNodeLooseListItem = data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose; + var isPrevNodePrettierIgnore = isPrettierIgnore(data.prevNode) === "next"; + var isBlockHtmlWithoutBlankLineBetweenPrevHtml = node.type === "html" && data.prevNode && data.prevNode.type === "html" && data.prevNode.position.end.line + 1 === node.position.start.line; + return isPrevNodeLooseListItem || !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || isBlockHtmlWithoutBlankLineBetweenPrevHtml); +} + +function shouldPrePrintTripleHardline(node, data) { + var isPrevNodeList = data.prevNode && data.prevNode.type === "list"; + var isIndentedCode = node.type === "code" && node.isIndented; + return isPrevNodeList && isIndentedCode; +} + +function shouldRemainTheSameContent(path$$1) { + var ancestorNode = getAncestorNode$2(path$$1, ["linkReference", "imageReference"]); + return ancestorNode && (ancestorNode.type !== "linkReference" || ancestorNode.referenceType !== "full"); +} + +function normalizeDoc(doc$$2) { + return mapDoc$4(doc$$2, function (currentDoc) { + if (!currentDoc.parts) { + return currentDoc; + } + + if (currentDoc.type === "concat" && currentDoc.parts.length === 1) { + return currentDoc.parts[0]; + } + + var parts = []; + currentDoc.parts.forEach(function (part) { + if (part.type === "concat") { + parts.push.apply(parts, part.parts); + } else if (part !== "") { + parts.push(part); + } + }); + return Object.assign({}, currentDoc, { + parts: normalizeParts(parts) + }); + }); +} + +function printUrl(url, dangerousCharOrChars) { + var dangerousChars = [" "].concat(dangerousCharOrChars || []); + return new RegExp(dangerousChars.map(function (x) { + return `\\${x}`; + }).join("|")).test(url) ? `<${url}>` : url; +} + +function printTitle(title, options, printSpace) { + if (printSpace == null) { + printSpace = true; + } + + if (!title) { + return ""; + } + + if (printSpace) { + return " " + printTitle(title, options, false); + } + + if (title.includes('"') && title.includes("'") && !title.includes(")")) { + return `(${title})`; // avoid escaped quotes + } // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split + + + var singleCount = title.split("'").length - 1; + var doubleCount = title.split('"').length - 1; + var quote = singleCount > doubleCount ? '"' : doubleCount > singleCount ? "'" : options.singleQuote ? "'" : '"'; + title = title.replace(new RegExp(`(${quote})`, "g"), "\\$1"); + return `${quote}${title}${quote}`; +} + +function normalizeParts(parts) { + return parts.reduce(function (current, part) { + var lastPart = util$1.getLast(current); + + if (typeof lastPart === "string" && typeof part === "string") { + current.splice(-1, 1, lastPart + part); + } else { + current.push(part); + } + + return current; + }, []); +} + +function clamp(value, min, max) { + return value < min ? min : value > max ? max : value; +} + +function clean$7(ast, newObj, parent) { + delete newObj.position; + delete newObj.raw; // front-matter + // for codeblock + + if (ast.type === "code" || ast.type === "yaml" || ast.type === "import" || ast.type === "export" || ast.type === "jsx") { + delete newObj.value; + } + + if (ast.type === "list") { + delete newObj.isAligned; + } // texts can be splitted or merged + + + if (ast.type === "text") { + return null; + } + + if (ast.type === "inlineCode") { + newObj.value = ast.value.replace(/[ \t\n]+/g, " "); + } // for insert pragma + + + if (parent && parent.type === "root" && parent.children.length > 0 && (parent.children[0] === ast || (parent.children[0].type === "yaml" || parent.children[0].type === "toml") && parent.children[1] === ast) && ast.type === "html" && pragma$6.startWithPragma(ast.value)) { + return null; + } +} + +function hasPrettierIgnore$1(path$$1) { + var index = +path$$1.getName(); + + if (index === 0) { + return false; + } + + var prevNode = path$$1.getParentNode().children[index - 1]; + return isPrettierIgnore(prevNode) === "next"; +} + +var printerMarkdown = { + preprocess: preprocess_1$2, + print: genericPrint$4, + embed: embed_1$4, + massageAstNode: clean$7, + hasPrettierIgnore: hasPrettierIgnore$1, + insertPragma: pragma$6.insertPragma +}; + +var options$13 = { + proseWrap: commonOptions.proseWrap, + singleQuote: commonOptions.singleQuote +}; + +var name$13 = "Markdown"; +var type$12 = "prose"; +var aliases$4 = ["pandoc"]; +var aceMode$12 = "markdown"; +var codemirrorMode$9 = "gfm"; +var codemirrorMimeType$9 = "text/x-gfm"; +var wrap = true; +var extensions$12 = [".md", ".markdown", ".mdown", ".mdwn", ".mkd", ".mkdn", ".mkdown", ".ronn", ".workbook"]; +var tmScope$12 = "source.gfm"; +var languageId$12 = 222; +var markdown = { + name: name$13, + type: type$12, + aliases: aliases$4, + aceMode: aceMode$12, + codemirrorMode: codemirrorMode$9, + codemirrorMimeType: codemirrorMimeType$9, + wrap: wrap, + extensions: extensions$12, + tmScope: tmScope$12, + languageId: languageId$12 +}; + +var markdown$1 = Object.freeze({ + name: name$13, + type: type$12, + aliases: aliases$4, + aceMode: aceMode$12, + codemirrorMode: codemirrorMode$9, + codemirrorMimeType: codemirrorMimeType$9, + wrap: wrap, + extensions: extensions$12, + tmScope: tmScope$12, + languageId: languageId$12, + default: markdown +}); + +var require$$0$27 = ( markdown$1 && markdown ) || markdown$1; + +var languages$4 = [createLanguage(require$$0$27, { + override: { + since: "1.8.0", + parsers: ["remark"], + vscodeLanguageIds: ["markdown"] + }, + extend: { + filenames: ["README"] + } +}), createLanguage({ + name: "MDX", + extensions: [".mdx"] +}, // TODO: use linguist data +{ + override: { + since: "1.15.0", + parsers: ["mdx"], + vscodeLanguageIds: ["mdx"] + } +})]; +var printers$4 = { + mdast: printerMarkdown +}; +var languageMarkdown = { + languages: languages$4, + options: options$13, + printers: printers$4 +}; + +var clean$8 = function clean(ast, newNode) { + delete newNode.sourceSpan; + delete newNode.startSourceSpan; + delete newNode.endSourceSpan; + delete newNode.nameSpan; + delete newNode.valueSpan; + + if (ast.type === "text" || ast.type === "comment") { + return null; + } // may be formatted by multiparser + + + if (ast.type === "yaml" || ast.type === "toml") { + return null; + } + + if (ast.type === "attribute") { + delete newNode.value; + } + + if (ast.type === "docType") { + delete newNode.value; + } +}; + +var a = ["accesskey", "charset", "coords", "download", "href", "hreflang", "name", "ping", "referrerpolicy", "rel", "rev", "shape", "tabindex", "target", "type"]; +var abbr = ["title"]; +var applet = ["align", "alt", "archive", "code", "codebase", "height", "hspace", "name", "object", "vspace", "width"]; +var area = ["accesskey", "alt", "coords", "download", "href", "hreflang", "nohref", "ping", "referrerpolicy", "rel", "shape", "tabindex", "target", "type"]; +var audio = ["autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src"]; +var base$2 = ["href", "target"]; +var basefont = ["color", "face", "size"]; +var bdo = ["dir"]; +var blockquote = ["cite"]; +var body = ["alink", "background", "bgcolor", "link", "text", "vlink"]; +var br = ["clear"]; +var button = ["accesskey", "autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "tabindex", "type", "value"]; +var canvas = ["height", "width"]; +var caption = ["align"]; +var col = ["align", "char", "charoff", "span", "valign", "width"]; +var colgroup = ["align", "char", "charoff", "span", "valign", "width"]; +var data$1 = ["value"]; +var del = ["cite", "datetime"]; +var details = ["open"]; +var dfn = ["title"]; +var dialog = ["open"]; +var dir = ["compact"]; +var div = ["align"]; +var dl = ["compact"]; +var embed$7 = ["height", "src", "type", "width"]; +var fieldset = ["disabled", "form", "name"]; +var font = ["color", "face", "size"]; +var form = ["accept", "accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"]; +var frame = ["frameborder", "longdesc", "marginheight", "marginwidth", "name", "noresize", "scrolling", "src"]; +var frameset = ["cols", "rows"]; +var h1 = ["align"]; +var h2 = ["align"]; +var h3 = ["align"]; +var h4 = ["align"]; +var h5 = ["align"]; +var h6 = ["align"]; +var head = ["profile"]; +var hr = ["align", "noshade", "size", "width"]; +var html = ["manifest", "version"]; +var iframe = ["align", "allowfullscreen", "allowpaymentrequest", "allowusermedia", "frameborder", "height", "longdesc", "marginheight", "marginwidth", "name", "referrerpolicy", "sandbox", "scrolling", "src", "srcdoc", "width"]; +var img = ["align", "alt", "border", "crossorigin", "decoding", "height", "hspace", "ismap", "longdesc", "name", "referrerpolicy", "sizes", "src", "srcset", "usemap", "vspace", "width"]; +var input = ["accept", "accesskey", "align", "alt", "autocomplete", "autofocus", "checked", "dirname", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "ismap", "list", "max", "maxlength", "min", "minlength", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "tabindex", "title", "type", "usemap", "value", "width"]; +var ins = ["cite", "datetime"]; +var isindex = ["prompt"]; +var label = ["accesskey", "for", "form"]; +var legend = ["accesskey", "align"]; +var li = ["type", "value"]; +var link$1 = ["as", "charset", "color", "crossorigin", "href", "hreflang", "integrity", "media", "nonce", "referrerpolicy", "rel", "rev", "sizes", "target", "title", "type"]; +var map = ["name"]; +var menu = ["compact"]; +var meta = ["charset", "content", "http-equiv", "name", "scheme"]; +var meter = ["high", "low", "max", "min", "optimum", "value"]; +var object = ["align", "archive", "border", "classid", "codebase", "codetype", "data", "declare", "form", "height", "hspace", "name", "standby", "tabindex", "type", "typemustmatch", "usemap", "vspace", "width"]; +var ol = ["compact", "reversed", "start", "type"]; +var optgroup = ["disabled", "label"]; +var option = ["disabled", "label", "selected", "value"]; +var output = ["for", "form", "name"]; +var p = ["align"]; +var param = ["name", "type", "value", "valuetype"]; +var pre = ["width"]; +var progress = ["max", "value"]; +var q = ["cite"]; +var script = ["async", "charset", "crossorigin", "defer", "integrity", "language", "nomodule", "nonce", "referrerpolicy", "src", "type"]; +var select = ["autocomplete", "autofocus", "disabled", "form", "multiple", "name", "required", "size", "tabindex"]; +var slot = ["name"]; +var source = ["media", "sizes", "src", "srcset", "type"]; +var style = ["media", "nonce", "title", "type"]; +var table = ["align", "bgcolor", "border", "cellpadding", "cellspacing", "frame", "rules", "summary", "width"]; +var tbody = ["align", "char", "charoff", "valign"]; +var td = ["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"]; +var textarea = ["accesskey", "autocomplete", "autofocus", "cols", "dirname", "disabled", "form", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows", "tabindex", "wrap"]; +var tfoot = ["align", "char", "charoff", "valign"]; +var th = ["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"]; +var thead = ["align", "char", "charoff", "valign"]; +var time = ["datetime"]; +var tr = ["align", "bgcolor", "char", "charoff", "valign"]; +var track = ["default", "kind", "label", "src", "srclang"]; +var ul = ["compact", "type"]; +var video = ["autoplay", "controls", "crossorigin", "height", "loop", "muted", "playsinline", "poster", "preload", "src", "width"]; +var index$13 = { + a: a, + abbr: abbr, + applet: applet, + area: area, + audio: audio, + base: base$2, + basefont: basefont, + bdo: bdo, + blockquote: blockquote, + body: body, + br: br, + button: button, + canvas: canvas, + caption: caption, + col: col, + colgroup: colgroup, + data: data$1, + del: del, + details: details, + dfn: dfn, + dialog: dialog, + dir: dir, + div: div, + dl: dl, + embed: embed$7, + fieldset: fieldset, + font: font, + form: form, + frame: frame, + frameset: frameset, + h1: h1, + h2: h2, + h3: h3, + h4: h4, + h5: h5, + h6: h6, + head: head, + hr: hr, + html: html, + iframe: iframe, + img: img, + input: input, + ins: ins, + isindex: isindex, + label: label, + legend: legend, + li: li, + link: link$1, + map: map, + menu: menu, + meta: meta, + meter: meter, + object: object, + ol: ol, + optgroup: optgroup, + option: option, + output: output, + p: p, + param: param, + pre: pre, + progress: progress, + q: q, + script: script, + select: select, + slot: slot, + source: source, + style: style, + table: table, + tbody: tbody, + td: td, + textarea: textarea, + tfoot: tfoot, + th: th, + thead: thead, + time: time, + tr: tr, + track: track, + ul: ul, + video: video, + "*": ["accesskey", "autocapitalize", "class", "contenteditable", "dir", "draggable", "hidden", "id", "inputmode", "is", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "nonce", "slot", "spellcheck", "style", "tabindex", "title", "translate"] +}; + +var htmlElementAttributes = Object.freeze({ + a: a, + abbr: abbr, + applet: applet, + area: area, + audio: audio, + base: base$2, + basefont: basefont, + bdo: bdo, + blockquote: blockquote, + body: body, + br: br, + button: button, + canvas: canvas, + caption: caption, + col: col, + colgroup: colgroup, + data: data$1, + del: del, + details: details, + dfn: dfn, + dialog: dialog, + dir: dir, + div: div, + dl: dl, + embed: embed$7, + fieldset: fieldset, + font: font, + form: form, + frame: frame, + frameset: frameset, + h1: h1, + h2: h2, + h3: h3, + h4: h4, + h5: h5, + h6: h6, + head: head, + hr: hr, + html: html, + iframe: iframe, + img: img, + input: input, + ins: ins, + isindex: isindex, + label: label, + legend: legend, + li: li, + link: link$1, + map: map, + menu: menu, + meta: meta, + meter: meter, + object: object, + ol: ol, + optgroup: optgroup, + option: option, + output: output, + p: p, + param: param, + pre: pre, + progress: progress, + q: q, + script: script, + select: select, + slot: slot, + source: source, + style: style, + table: table, + tbody: tbody, + td: td, + textarea: textarea, + tfoot: tfoot, + th: th, + thead: thead, + time: time, + tr: tr, + track: track, + ul: ul, + video: video, + default: index$13 +}); + +const json$9 = {"CSS_DISPLAY_TAGS":{"area":"none","base":"none","basefont":"none","datalist":"none","head":"none","link":"none","meta":"none","noembed":"none","noframes":"none","param":"none","rp":"none","script":"none","source":"block","style":"none","template":"inline","track":"block","title":"none","html":"block","body":"block","address":"block","blockquote":"block","center":"block","div":"block","figure":"block","figcaption":"block","footer":"block","form":"block","header":"block","hr":"block","legend":"block","listing":"block","main":"block","p":"block","plaintext":"block","pre":"block","xmp":"block","slot":"contents","ruby":"ruby","rt":"ruby-text","article":"block","aside":"block","h1":"block","h2":"block","h3":"block","h4":"block","h5":"block","h6":"block","hgroup":"block","nav":"block","section":"block","dir":"block","dd":"block","dl":"block","dt":"block","ol":"block","ul":"block","li":"list-item","table":"table","caption":"table-caption","colgroup":"table-column-group","col":"table-column","thead":"table-header-group","tbody":"table-row-group","tfoot":"table-footer-group","tr":"table-row","td":"table-cell","th":"table-cell","fieldset":"block","button":"inline-block","video":"inline-block","audio":"inline-block"},"CSS_DISPLAY_DEFAULT":"inline","CSS_WHITE_SPACE_TAGS":{"listing":"pre","plaintext":"pre","pre":"pre","xmp":"pre","nobr":"nowrap","table":"initial","textarea":"pre-wrap"},"CSS_WHITE_SPACE_DEFAULT":"normal"}; + +var htmlElementAttributes$1 = ( htmlElementAttributes && index$13 ) || htmlElementAttributes; + +var concat$15 = doc.builders.concat; +var mapDoc$7 = doc.utils.mapDoc; +var CSS_DISPLAY_TAGS = json$9.CSS_DISPLAY_TAGS; +var CSS_DISPLAY_DEFAULT = json$9.CSS_DISPLAY_DEFAULT; +var CSS_WHITE_SPACE_TAGS = json$9.CSS_WHITE_SPACE_TAGS; +var CSS_WHITE_SPACE_DEFAULT = json$9.CSS_WHITE_SPACE_DEFAULT; +var HTML_TAGS = arrayToMap(htmlTagNames$1); +var HTML_ELEMENT_ATTRIBUTES = mapObject(htmlElementAttributes$1, arrayToMap); + +function arrayToMap(array) { + var map = Object.create(null); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var value = _step.value; + map[value] = true; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return map; +} + +function mapObject(object, fn) { + var newObject = Object.create(null); + + var _arr = Object.keys(object); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + newObject[key] = fn(object[key], key); + } + + return newObject; +} + +function shouldPreserveContent$1(node) { + if (node.type === "element" && node.fullName === "template" && node.attrMap.lang && node.attrMap.lang !== "html") { + return true; + } // unterminated node in ie conditional comment + // e.g. + + + if (node.type === "ieConditionalComment" && node.lastChild && !node.lastChild.isSelfClosing && !node.lastChild.endSourceSpan) { + return true; + } // incomplete html in ie conditional comment + // e.g. + + + if (node.type === "ieConditionalComment" && !node.complete) { + return true; + } // TODO: handle non-text children in
+
+
+  if (isPreLikeNode$1(node) && node.children.some(function (child) {
+    return child.type !== "text" && child.type !== "interpolation";
+  })) {
+    return true;
+  }
+
+  return false;
+}
+
+function hasPrettierIgnore$3(node) {
+  if (node.type === "attribute" || node.type === "text") {
+    return false;
+  }
+
+  if (!node.parent) {
+    return false;
+  }
+
+  if (typeof node.index !== "number" || node.index === 0) {
+    return false;
+  }
+
+  var prevNode = node.parent.children[node.index - 1];
+  return isPrettierIgnore$1(prevNode);
+}
+
+function isPrettierIgnore$1(node) {
+  return node.type === "comment" && node.value.trim() === "prettier-ignore";
+}
+
+function getPrettierIgnoreAttributeCommentData$1(value) {
+  var match = value.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);
+
+  if (!match) {
+    return false;
+  }
+
+  if (!match[1]) {
+    return true;
+  }
+
+  return match[1].split(/\s+/);
+}
+
+function isScriptLikeTag$1(node) {
+  return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
+}
+
+function isFrontMatterNode(node) {
+  return node.type === "yaml" || node.type === "toml";
+}
+
+function canHaveInterpolation(node) {
+  return node.children && !isScriptLikeTag$1(node);
+}
+
+function isWhitespaceSensitiveNode(node) {
+  return isScriptLikeTag$1(node) || node.type === "interpolation" || isIndentationSensitiveNode(node);
+}
+
+function isIndentationSensitiveNode(node) {
+  return getNodeCssStyleWhiteSpace(node).startsWith("pre");
+}
+
+function isLeadingSpaceSensitiveNode(node) {
+  if (isFrontMatterNode(node)) {
+    return false;
+  }
+
+  if ((node.type === "text" || node.type === "interpolation") && node.prev && (node.prev.type === "text" || node.prev.type === "interpolation")) {
+    return true;
+  }
+
+  if (!node.parent || node.parent.cssDisplay === "none") {
+    return false;
+  }
+
+  if (!node.prev && node.parent.type === "element" && node.parent.tagDefinition.ignoreFirstLf) {
+    return false;
+  }
+
+  if (isPreLikeNode$1(node.parent)) {
+    return true;
+  }
+
+  if (!node.prev && (node.parent.type === "root" || isScriptLikeTag$1(node.parent) || !isFirstChildLeadingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
+    return false;
+  }
+
+  if (node.prev && !isNextLeadingSpaceSensitiveCssDisplay(node.prev.cssDisplay)) {
+    return false;
+  }
+
+  return true;
+}
+
+function isTrailingSpaceSensitiveNode(node) {
+  if (isFrontMatterNode(node)) {
+    return false;
+  }
+
+  if ((node.type === "text" || node.type === "interpolation") && node.next && (node.next.type === "text" || node.next.type === "interpolation")) {
+    return true;
+  }
+
+  if (!node.parent || node.parent.cssDisplay === "none") {
+    return false;
+  }
+
+  if (isPreLikeNode$1(node.parent)) {
+    return true;
+  }
+
+  if (!node.next && (node.parent.type === "root" || isScriptLikeTag$1(node.parent) || !isLastChildTrailingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
+    return false;
+  }
+
+  if (node.next && !isPrevTrailingSpaceSensitiveCssDisplay(node.next.cssDisplay)) {
+    return false;
+  }
+
+  return true;
+}
+
+function isDanglingSpaceSensitiveNode(node) {
+  return isDanglingSpaceSensitiveCssDisplay(node.cssDisplay) && !isScriptLikeTag$1(node);
+}
+
+function replaceNewlines$1(text, replacement) {
+  return text.split(/(\n)/g).map(function (data, index) {
+    return index % 2 === 1 ? replacement : data;
+  });
+}
+
+function replaceDocNewlines$1(doc$$2, replacement) {
+  return mapDoc$7(doc$$2, function (currentDoc) {
+    return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$15(replaceNewlines$1(currentDoc, replacement)) : currentDoc;
+  });
+}
+
+function forceNextEmptyLine$1(node) {
+  return isFrontMatterNode(node) || node.next && node.sourceSpan.end.line + 1 < node.next.sourceSpan.start.line;
+}
+/** firstChild leadingSpaces and lastChild trailingSpaces */
+
+
+function forceBreakContent$1(node) {
+  return forceBreakChildren$1(node) || node.type === "element" && node.children.length !== 0 && (["body", "template", "script", "style"].indexOf(node.name) !== -1 || node.children.some(function (child) {
+    return hasNonTextChild(child);
+  }));
+}
+/** spaces between children */
+
+
+function forceBreakChildren$1(node) {
+  return node.type === "element" && node.children.length !== 0 && (["html", "head", "ul", "ol", "select"].indexOf(node.name) !== -1 || node.cssDisplay.startsWith("table") && node.cssDisplay !== "table-cell");
+}
+
+function preferHardlineAsLeadingSpaces$1(node) {
+  return preferHardlineAsSurroundingSpaces(node) || node.prev && preferHardlineAsTrailingSpaces(node.prev) || isCustomElementWithSurroundingLineBreak(node);
+}
+
+function preferHardlineAsTrailingSpaces(node) {
+  return preferHardlineAsSurroundingSpaces(node) || node.type === "element" && node.fullName === "br" || isCustomElementWithSurroundingLineBreak(node);
+}
+
+function isCustomElementWithSurroundingLineBreak(node) {
+  return isCustomElement(node) && hasSurroundingLineBreak(node);
+}
+
+function isCustomElement(node) {
+  return node.type === "element" && !node.namespace && (node.name.includes("-") || /[A-Z]/.test(node.name[0]));
+}
+
+function hasSurroundingLineBreak(node) {
+  return hasLeadingLineBreak(node) && hasTrailingLineBreak(node);
+}
+
+function hasLeadingLineBreak(node) {
+  return node.hasLeadingSpaces && (node.prev ? node.prev.sourceSpan.end.line < node.sourceSpan.start.line : node.parent.type === "root" || node.parent.startSourceSpan.end.line < node.sourceSpan.start.line);
+}
+
+function hasTrailingLineBreak(node) {
+  return node.hasTrailingSpaces && (node.next ? node.next.sourceSpan.start.line > node.sourceSpan.end.line : node.parent.type === "root" || node.parent.endSourceSpan.start.line > node.sourceSpan.end.line);
+}
+
+function preferHardlineAsSurroundingSpaces(node) {
+  switch (node.type) {
+    case "ieConditionalComment":
+    case "comment":
+    case "directive":
+      return true;
+
+    case "element":
+      return ["script", "select"].indexOf(node.name) !== -1;
+  }
+
+  return false;
+}
+
+function getLastDescendant$1(node) {
+  return node.lastChild ? getLastDescendant$1(node.lastChild) : node;
+}
+
+function hasNonTextChild(node) {
+  return node.children && node.children.some(function (child) {
+    return child.type !== "text";
+  });
+}
+
+function inferScriptParser$1(node) {
+  if (node.name === "script" && !node.attrMap.src) {
+    if (!node.attrMap.lang && !node.attrMap.type || node.attrMap.type === "module" || node.attrMap.type === "text/javascript" || node.attrMap.type === "text/babel" || node.attrMap.type === "application/javascript") {
+      return "babylon";
+    }
+
+    if (node.attrMap.type === "application/x-typescript" || node.attrMap.lang === "ts" || node.attrMap.lang === "tsx") {
+      return "typescript";
+    }
+
+    if (node.attrMap.type === "text/markdown") {
+      return "markdown";
+    }
+  }
+
+  if (node.name === "style") {
+    if (!node.attrMap.lang || node.attrMap.lang === "postcss") {
+      return "css";
+    }
+
+    if (node.attrMap.lang === "scss") {
+      return "scss";
+    }
+
+    if (node.attrMap.lang === "less") {
+      return "less";
+    }
+  }
+
+  return null;
+}
+
+function isBlockLikeCssDisplay(cssDisplay) {
+  return cssDisplay === "block" || cssDisplay === "list-item" || cssDisplay.startsWith("table");
+}
+
+function isFirstChildLeadingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+}
+
+function isLastChildTrailingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+}
+
+function isPrevTrailingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay);
+}
+
+function isNextLeadingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay);
+}
+
+function isDanglingSpaceSensitiveCssDisplay(cssDisplay) {
+  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+}
+
+function isPreLikeNode$1(node) {
+  return getNodeCssStyleWhiteSpace(node).startsWith("pre");
+}
+
+function countParents$1(path$$1) {
+  var predicate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
+    return true;
+  };
+  var counter = 0;
+
+  for (var i = path$$1.stack.length - 1; i >= 0; i--) {
+    var value = path$$1.stack[i];
+
+    if (value && typeof value === "object" && !Array.isArray(value) && predicate(value)) {
+      counter++;
+    }
+  }
+
+  return counter;
+}
+
+function hasParent(node, fn) {
+  var current = node;
+
+  while (current) {
+    if (fn(current)) {
+      return true;
+    }
+
+    current = current.parent;
+  }
+
+  return false;
+}
+
+function getNodeCssStyleDisplay(node, options) {
+  if (node.prev && node.prev.type === "comment") {
+    // 
+    var match = node.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);
+
+    if (match) {
+      return match[1];
+    }
+  }
+
+  var isInSvgForeignObject = false;
+
+  if (node.type === "element" && node.namespace === "svg") {
+    if (hasParent(node, function (parent) {
+      return parent.fullName === "svg:foreignObject";
+    })) {
+      isInSvgForeignObject = true;
+    } else {
+      return node.name === "svg" ? "inline-block" : "block";
+    }
+  }
+
+  switch (options.htmlWhitespaceSensitivity) {
+    case "strict":
+      return "inline";
+
+    case "ignore":
+      return "block";
+
+    default:
+      return node.type === "element" && (!node.namespace || isInSvgForeignObject) && CSS_DISPLAY_TAGS[node.name] || CSS_DISPLAY_DEFAULT;
+  }
+}
+
+function getNodeCssStyleWhiteSpace(node) {
+  return node.type === "element" && !node.namespace && CSS_WHITE_SPACE_TAGS[node.name] || CSS_WHITE_SPACE_DEFAULT;
+}
+
+function getCommentData$1(node) {
+  var rightTrimmedValue = node.value.trimRight();
+  var hasLeadingEmptyLine = /^[^\S\n]*?\n/.test(node.value);
+
+  if (hasLeadingEmptyLine) {
+    /**
+     *     
+     */
+    return dedentString$1(rightTrimmedValue.replace(/^\s*\n/, ""));
+  }
+  /**
+   *     
+   *
+   *     
+   *
+   *     
+   */
+
+
+  if (!rightTrimmedValue.includes("\n")) {
+    return rightTrimmedValue.trimLeft();
+  }
+
+  var firstNewlineIndex = rightTrimmedValue.indexOf("\n");
+  var dataWithoutLeadingLine = rightTrimmedValue.slice(firstNewlineIndex + 1);
+  var minIndentationForDataWithoutLeadingLine = getMinIndentation(dataWithoutLeadingLine);
+  var leadingSpaces = rightTrimmedValue.match(/^[^\n\S]*/)[0].length;
+  var commentDataStartColumn = node.sourceSpan.start.col + "
+   */
+
+  if (minIndentationForDataWithoutLeadingLine >= commentDataStartColumn) {
+    return dedentString$1(" ".repeat(commentDataStartColumn) + rightTrimmedValue.slice(leadingSpaces));
+  }
+
+  var leadingLineValue = rightTrimmedValue.slice(0, firstNewlineIndex);
+  /**
+   *     
+   */
+
+  return leadingLineValue.trim() + "\n" + dedentString$1(dataWithoutLeadingLine, minIndentationForDataWithoutLeadingLine);
+}
+
+function getMinIndentation(text) {
+  var minIndentation = Infinity;
+  var _iteratorNormalCompletion2 = true;
+  var _didIteratorError2 = false;
+  var _iteratorError2 = undefined;
+
+  try {
+    for (var _iterator2 = text.split("\n")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+      var lineText = _step2.value;
+
+      if (lineText.length === 0) {
+        continue;
+      }
+
+      if (/\S/.test(lineText[0])) {
+        return 0;
+      }
+
+      var indentation = lineText.match(/^\s*/)[0].length;
+
+      if (lineText.length === indentation) {
+        continue;
+      }
+
+      if (indentation < minIndentation) {
+        minIndentation = indentation;
+      }
+    }
+  } catch (err) {
+    _didIteratorError2 = true;
+    _iteratorError2 = err;
+  } finally {
+    try {
+      if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+        _iterator2.return();
+      }
+    } finally {
+      if (_didIteratorError2) {
+        throw _iteratorError2;
+      }
+    }
+  }
+
+  return minIndentation === Infinity ? 0 : minIndentation;
+}
+
+function dedentString$1(text) {
+  var minIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMinIndentation(text);
+  return minIndent === 0 ? text : text.split("\n").map(function (lineText) {
+    return lineText.slice(minIndent);
+  }).join("\n");
+}
+
+function normalizeParts$2(parts) {
+  var newParts = [];
+  var restParts = parts.slice();
+
+  while (restParts.length !== 0) {
+    var part = restParts.shift();
+
+    if (!part) {
+      continue;
+    }
+
+    if (part.type === "concat") {
+      Array.prototype.unshift.apply(restParts, part.parts);
+      continue;
+    }
+
+    if (newParts.length !== 0 && typeof newParts[newParts.length - 1] === "string" && typeof part === "string") {
+      newParts.push(newParts.pop() + part);
+      continue;
+    }
+
+    newParts.push(part);
+  }
+
+  return newParts;
+}
+
+function identity$2(x) {
+  return x;
+}
+
+function shouldNotPrintClosingTag$1(node) {
+  return !node.isSelfClosing && !node.endSourceSpan && (hasPrettierIgnore$3(node) || shouldPreserveContent$1(node.parent));
+}
+
+var utils_1$3 = {
+  HTML_ELEMENT_ATTRIBUTES,
+  HTML_TAGS,
+  canHaveInterpolation,
+  countParents: countParents$1,
+  dedentString: dedentString$1,
+  forceBreakChildren: forceBreakChildren$1,
+  forceBreakContent: forceBreakContent$1,
+  forceNextEmptyLine: forceNextEmptyLine$1,
+  getCommentData: getCommentData$1,
+  getLastDescendant: getLastDescendant$1,
+  getNodeCssStyleDisplay,
+  getNodeCssStyleWhiteSpace,
+  getPrettierIgnoreAttributeCommentData: getPrettierIgnoreAttributeCommentData$1,
+  hasPrettierIgnore: hasPrettierIgnore$3,
+  identity: identity$2,
+  inferScriptParser: inferScriptParser$1,
+  isDanglingSpaceSensitiveNode,
+  isFrontMatterNode,
+  isIndentationSensitiveNode,
+  isLeadingSpaceSensitiveNode,
+  isPreLikeNode: isPreLikeNode$1,
+  isScriptLikeTag: isScriptLikeTag$1,
+  isTrailingSpaceSensitiveNode,
+  isWhitespaceSensitiveNode,
+  normalizeParts: normalizeParts$2,
+  preferHardlineAsLeadingSpaces: preferHardlineAsLeadingSpaces$1,
+  preferHardlineAsTrailingSpaces,
+  replaceDocNewlines: replaceDocNewlines$1,
+  replaceNewlines: replaceNewlines$1,
+  shouldNotPrintClosingTag: shouldNotPrintClosingTag$1,
+  shouldPreserveContent: shouldPreserveContent$1
+};
+
+var canHaveInterpolation$1 = utils_1$3.canHaveInterpolation;
+var getNodeCssStyleDisplay$1 = utils_1$3.getNodeCssStyleDisplay;
+var isDanglingSpaceSensitiveNode$1 = utils_1$3.isDanglingSpaceSensitiveNode;
+var isIndentationSensitiveNode$1 = utils_1$3.isIndentationSensitiveNode;
+var isLeadingSpaceSensitiveNode$1 = utils_1$3.isLeadingSpaceSensitiveNode;
+var isTrailingSpaceSensitiveNode$1 = utils_1$3.isTrailingSpaceSensitiveNode;
+var isWhitespaceSensitiveNode$1 = utils_1$3.isWhitespaceSensitiveNode;
+var PREPROCESS_PIPELINE = [removeIgnorableFirstLf, mergeCdataIntoText, extractInterpolation, extractWhitespaces, addCssDisplay, addIsSelfClosing, addIsSpaceSensitive, mergeSimpleElementIntoText];
+
+function preprocess$4(ast, options) {
+  for (var _i = 0; _i < PREPROCESS_PIPELINE.length; _i++) {
+    var fn = PREPROCESS_PIPELINE[_i];
+    ast = fn(ast, options);
+  }
+
+  return ast;
+}
+
+function removeIgnorableFirstLf(ast
+/*, options */
+) {
+  return ast.map(function (node) {
+    if (node.type === "element" && node.tagDefinition.ignoreFirstLf && node.children.length !== 0 && node.children[0].type === "text" && node.children[0].value[0] === "\n") {
+      var text = node.children[0];
+      return node.clone({
+        children: text.value.length === 1 ? node.children.slice(1) : [].concat(text.clone({
+          value: text.value.slice(1)
+        }), node.children.slice(1))
+      });
+    }
+
+    return node;
+  });
+}
+
+function mergeNodeIntoText(ast, shouldMerge, getValue) {
+  return ast.map(function (node) {
+    if (node.children) {
+      var shouldMergeResults = node.children.map(shouldMerge);
+
+      if (shouldMergeResults.some(Boolean)) {
+        var newChildren = [];
+
+        for (var i = 0; i < node.children.length; i++) {
+          var child = node.children[i];
+
+          if (child.type !== "text" && !shouldMergeResults[i]) {
+            newChildren.push(child);
+            continue;
+          }
+
+          var newChild = child.type === "text" ? child : child.clone({
+            type: "text",
+            value: getValue(child)
+          });
+
+          if (newChildren.length === 0 || newChildren[newChildren.length - 1].type !== "text") {
+            newChildren.push(newChild);
+            continue;
+          }
+
+          var lastChild = newChildren.pop();
+          var ParseSourceSpan = lastChild.sourceSpan.constructor;
+          newChildren.push(lastChild.clone({
+            value: lastChild.value + newChild.value,
+            sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, newChild.sourceSpan.end)
+          }));
+        }
+
+        return node.clone({
+          children: newChildren
+        });
+      }
+    }
+
+    return node;
+  });
+}
+
+function mergeCdataIntoText(ast
+/*, options */
+) {
+  return mergeNodeIntoText(ast, function (node) {
+    return node.type === "cdata";
+  }, function (node) {
+    return ``;
+  });
+}
+
+function mergeSimpleElementIntoText(ast
+/*, options */
+) {
+  var isSimpleElement = function isSimpleElement(node) {
+    return node.type === "element" && node.attrs.length === 0 && node.children.length === 1 && node.firstChild.type === "text" && // \xA0: non-breaking whitespace
+    !/[^\S\xA0]/.test(node.children[0].value) && !node.firstChild.hasLeadingSpaces && !node.firstChild.hasTrailingSpaces && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces && node.prev && node.prev.type === "text" && node.next && node.next.type === "text";
+  };
+
+  return ast.map(function (node) {
+    if (node.children) {
+      var isSimpleElementResults = node.children.map(isSimpleElement);
+
+      if (isSimpleElementResults.some(Boolean)) {
+        var newChildren = [];
+
+        for (var i = 0; i < node.children.length; i++) {
+          var child = node.children[i];
+
+          if (isSimpleElementResults[i]) {
+            var lastChild = newChildren.pop();
+            var nextChild = node.children[++i];
+            var ParseSourceSpan = node.sourceSpan.constructor;
+            var isTrailingSpaceSensitive = nextChild.isTrailingSpaceSensitive,
+                hasTrailingSpaces = nextChild.hasTrailingSpaces;
+            newChildren.push(lastChild.clone({
+              value: lastChild.value + `<${child.rawName}>` + child.firstChild.value + `` + nextChild.value,
+              sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, nextChild.sourceSpan.end),
+              isTrailingSpaceSensitive,
+              hasTrailingSpaces
+            }));
+          } else {
+            newChildren.push(child);
+          }
+        }
+
+        return node.clone({
+          children: newChildren
+        });
+      }
+    }
+
+    return node;
+  });
+}
+
+function extractInterpolation(ast, options) {
+  if (options.parser === "html") {
+    return ast;
+  }
+
+  var interpolationRegex = /\{\{([\s\S]+?)\}\}/g;
+  return ast.map(function (node) {
+    if (!canHaveInterpolation$1(node)) {
+      return node;
+    }
+
+    var newChildren = [];
+    var _iteratorNormalCompletion = true;
+    var _didIteratorError = false;
+    var _iteratorError = undefined;
+
+    try {
+      for (var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+        var child = _step.value;
+
+        if (child.type !== "text") {
+          newChildren.push(child);
+          continue;
+        }
+
+        var ParseSourceSpan = child.sourceSpan.constructor;
+        var startSourceSpan = child.sourceSpan.start;
+        var endSourceSpan = null;
+        var components = child.value.split(interpolationRegex);
+
+        for (var i = 0; i < components.length; i++, startSourceSpan = endSourceSpan) {
+          var value = components[i];
+
+          if (i % 2 === 0) {
+            endSourceSpan = startSourceSpan.moveBy(value.length);
+
+            if (value.length !== 0) {
+              newChildren.push({
+                type: "text",
+                value,
+                sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan)
+              });
+            }
+
+            continue;
+          }
+
+          endSourceSpan = startSourceSpan.moveBy(value.length + 4); // `{{` + `}}`
+
+          newChildren.push({
+            type: "interpolation",
+            sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan),
+            children: value.length === 0 ? [] : [{
+              type: "text",
+              value,
+              sourceSpan: new ParseSourceSpan(startSourceSpan.moveBy(2), endSourceSpan.moveBy(-2))
+            }]
+          });
+        }
+      }
+    } catch (err) {
+      _didIteratorError = true;
+      _iteratorError = err;
+    } finally {
+      try {
+        if (!_iteratorNormalCompletion && _iterator.return != null) {
+          _iterator.return();
+        }
+      } finally {
+        if (_didIteratorError) {
+          throw _iteratorError;
+        }
+      }
+    }
+
+    return node.clone({
+      children: newChildren
+    });
+  });
+}
+/**
+ * - add `hasLeadingSpaces` field
+ * - add `hasTrailingSpaces` field
+ * - add `hasDanglingSpaces` field for parent nodes
+ * - add `isWhitespaceSensitive`, `isIndentationSensitive` field for text nodes
+ * - remove insensitive whitespaces
+ */
+
+
+function extractWhitespaces(ast
+/*, options*/
+) {
+  var TYPE_WHITESPACE = "whitespace";
+  return ast.map(function (node) {
+    if (!node.children) {
+      return node;
+    }
+
+    if (node.children.length === 0 || node.children.length === 1 && node.children[0].type === "text" && node.children[0].value.trim().length === 0) {
+      return node.clone({
+        children: [],
+        hasDanglingSpaces: node.children.length !== 0
+      });
+    }
+
+    var isWhitespaceSensitive = isWhitespaceSensitiveNode$1(node);
+    var isIndentationSensitive = isIndentationSensitiveNode$1(node);
+    return node.clone({
+      children: node.children // extract whitespace nodes
+      .reduce(function (newChildren, child) {
+        if (child.type !== "text") {
+          return newChildren.concat(child);
+        }
+
+        if (isWhitespaceSensitive) {
+          return newChildren.concat(Object.assign({}, child, {
+            isWhitespaceSensitive,
+            isIndentationSensitive
+          }));
+        }
+
+        var localChildren = [];
+
+        var _child$value$match = child.value.match(/^(\s*)([\s\S]*?)(\s*)$/),
+            _child$value$match2 = _slicedToArray(_child$value$match, 4),
+            leadingSpaces = _child$value$match2[1],
+            text = _child$value$match2[2],
+            trailingSpaces = _child$value$match2[3];
+
+        if (leadingSpaces) {
+          localChildren.push({
+            type: TYPE_WHITESPACE
+          });
+        }
+
+        var ParseSourceSpan = child.sourceSpan.constructor;
+
+        if (text) {
+          localChildren.push({
+            type: "text",
+            value: text,
+            sourceSpan: new ParseSourceSpan(child.sourceSpan.start.moveBy(leadingSpaces.length), child.sourceSpan.end.moveBy(-trailingSpaces.length))
+          });
+        }
+
+        if (trailingSpaces) {
+          localChildren.push({
+            type: TYPE_WHITESPACE
+          });
+        }
+
+        return newChildren.concat(localChildren);
+      }, []) // set hasLeadingSpaces/hasTrailingSpaces and filter whitespace nodes
+      .reduce(function (newChildren, child, i, children) {
+        if (child.type === TYPE_WHITESPACE) {
+          return newChildren;
+        }
+
+        var hasLeadingSpaces = i !== 0 && children[i - 1].type === TYPE_WHITESPACE;
+        var hasTrailingSpaces = i !== children.length - 1 && children[i + 1].type === TYPE_WHITESPACE;
+        return newChildren.concat(Object.assign({}, child, {
+          hasLeadingSpaces,
+          hasTrailingSpaces
+        }));
+      }, [])
+    });
+  });
+}
+
+function addIsSelfClosing(ast
+/*, options */
+) {
+  return ast.map(function (node) {
+    return Object.assign(node, {
+      isSelfClosing: !node.children || node.type === "element" && (node.tagDefinition.isVoid || // self-closing
+      node.startSourceSpan === node.endSourceSpan)
+    });
+  });
+}
+
+function addCssDisplay(ast, options) {
+  return ast.map(function (node) {
+    return Object.assign(node, {
+      cssDisplay: getNodeCssStyleDisplay$1(node, options)
+    });
+  });
+}
+/**
+ * - add `isLeadingSpaceSensitive` field
+ * - add `isTrailingSpaceSensitive` field
+ * - add `isDanglingSpaceSensitive` field for parent nodes
+ */
+
+
+function addIsSpaceSensitive(ast
+/*, options */
+) {
+  return ast.map(function (node) {
+    if (!node.children) {
+      return node;
+    }
+
+    if (node.children.length === 0) {
+      return node.clone({
+        isDanglingSpaceSensitive: isDanglingSpaceSensitiveNode$1(node)
+      });
+    }
+
+    return node.clone({
+      children: node.children.map(function (child) {
+        return Object.assign({}, child, {
+          isLeadingSpaceSensitive: isLeadingSpaceSensitiveNode$1(child),
+          isTrailingSpaceSensitive: isTrailingSpaceSensitiveNode$1(child)
+        });
+      }).map(function (child, index, children) {
+        return Object.assign({}, child, {
+          isLeadingSpaceSensitive: index === 0 ? child.isLeadingSpaceSensitive : children[index - 1].isTrailingSpaceSensitive && child.isLeadingSpaceSensitive,
+          isTrailingSpaceSensitive: index === children.length - 1 ? child.isTrailingSpaceSensitive : children[index + 1].isLeadingSpaceSensitive && child.isTrailingSpaceSensitive
+        });
+      })
+    });
+  });
+}
+
+var preprocess_1$4 = preprocess$4;
+
+function hasPragma$3(text) {
+  return /^\s*/.test(text);
+}
+
+function insertPragma$7(text) {
+  return "\n\n" + text.replace(/^\s*\n/, "");
+}
+
+var pragma$9 = {
+  hasPragma: hasPragma$3,
+  insertPragma: insertPragma$7
+};
+
+var _require$$0$builders$9 = doc.builders;
+var concat$16 = _require$$0$builders$9.concat;
+var group$15 = _require$$0$builders$9.group;
+/**
+ *     v-for="... in ..."
+ *     v-for="... of ..."
+ *     v-for="(..., ...) in ..."
+ *     v-for="(..., ...) of ..."
+ */
+
+function printVueFor$1(value, textToDoc) {
+  var _parseVueFor = parseVueFor(value),
+      left = _parseVueFor.left,
+      operator = _parseVueFor.operator,
+      right = _parseVueFor.right;
+
+  return concat$16([group$15(textToDoc(`function _(${left}) {}`, {
+    parser: "babylon",
+    __isVueForBindingLeft: true
+  })), " ", operator, " ", textToDoc(right, {
+    parser: "__js_expression"
+  })]);
+} // modified from https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/parser/index.js#L370-L387
+
+
+function parseVueFor(value) {
+  var forAliasRE = /([^]*?)\s+(in|of)\s+([^]*)/;
+  var forIteratorRE = /,([^,}\]]*)(?:,([^,}\]]*))?$/;
+  var stripParensRE = /^\(|\)$/g;
+  var inMatch = value.match(forAliasRE);
+
+  if (!inMatch) {
+    return;
+  }
+
+  var res = {};
+  res.for = inMatch[3].trim();
+  var alias = inMatch[1].trim().replace(stripParensRE, "");
+  var iteratorMatch = alias.match(forIteratorRE);
+
+  if (iteratorMatch) {
+    res.alias = alias.replace(forIteratorRE, "");
+    res.iterator1 = iteratorMatch[1].trim();
+
+    if (iteratorMatch[2]) {
+      res.iterator2 = iteratorMatch[2].trim();
+    }
+  } else {
+    res.alias = alias;
+  }
+
+  return {
+    left: `${[res.alias, res.iterator1, res.iterator2].filter(Boolean).join(",")}`,
+    operator: inMatch[2],
+    right: res.for
+  };
+}
+
+function printVueSlotScope$1(value, textToDoc) {
+  return textToDoc(`function _(${value}) {}`, {
+    parser: "babylon",
+    __isVueSlotScope: true
+  });
+}
+
+var syntaxVue = {
+  printVueFor: printVueFor$1,
+  printVueSlotScope: printVueSlotScope$1
+};
+
+var parseSrcset = createCommonjsModule(function (module) {
+  /**
+   * Srcset Parser
+   *
+   * By Alex Bell |  MIT License
+   *
+   * JS Parser for the string value that appears in markup 
+   *
+   * @returns Array [{url: _, d: _, w: _, h:_}, ...]
+   *
+   * Based super duper closely on the reference algorithm at:
+   * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute
+   *
+   * Most comments are copied in directly from the spec
+   * (except for comments in parens).
+   */
+  (function (root, factory) {
+    if (typeof undefined === 'function' && undefined.amd) {
+      // AMD. Register as an anonymous module.
+      undefined([], factory);
+    } else if ('object' === 'object' && module.exports) {
+      // Node. Does not work with strict CommonJS, but
+      // only CommonJS-like environments that support module.exports,
+      // like Node.
+      module.exports = factory();
+    } else {
+      // Browser globals (root is window)
+      root.parseSrcset = factory();
+    }
+  })(commonjsGlobal, function () {
+    // 1. Let input be the value passed to this algorithm.
+    return function (input, options) {
+      var logger = options && options.logger || console; // UTILITY FUNCTIONS
+      // Manual is faster than RegEx
+      // http://bjorn.tipling.com/state-and-regular-expressions-in-javascript
+      // http://jsperf.com/whitespace-character/5
+
+      function isSpace(c) {
+        return c === "\u0020" || // space
+        c === "\u0009" || // horizontal tab
+        c === "\u000A" || // new line
+        c === "\u000C" || // form feed
+        c === "\u000D"; // carriage return
+      }
+
+      function collectCharacters(regEx) {
+        var chars,
+            match = regEx.exec(input.substring(pos));
+
+        if (match) {
+          chars = match[0];
+          pos += chars.length;
+          return chars;
+        }
+      }
+
+      var inputLength = input.length,
+          // (Don't use \s, to avoid matching non-breaking space)
+      regexLeadingSpaces = /^[ \t\n\r\u000c]+/,
+          regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/,
+          regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/,
+          regexTrailingCommas = /[,]+$/,
+          regexNonNegativeInteger = /^\d+$/,
+          // ( Positive or negative or unsigned integers or decimals, without or without exponents.
+      // Must include at least one digit.
+      // According to spec tests any decimal point must be followed by a digit.
+      // No leading plus sign is allowed.)
+      // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number
+      regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,
+          url,
+          descriptors,
+          currentDescriptor,
+          state,
+          c,
+          // 2. Let position be a pointer into input, initially pointing at the start
+      //    of the string.
+      pos = 0,
+          // 3. Let candidates be an initially empty source set.
+      candidates = []; // 4. Splitting loop: Collect a sequence of characters that are space
+      //    characters or U+002C COMMA characters. If any U+002C COMMA characters
+      //    were collected, that is a parse error.
+
+      while (true) {
+        collectCharacters(regexLeadingCommasOrSpaces); // 5. If position is past the end of input, return candidates and abort these steps.
+
+        if (pos >= inputLength) {
+          return candidates; // (we're done, this is the sole return path)
+        } // 6. Collect a sequence of characters that are not space characters,
+        //    and let that be url.
+
+
+        url = collectCharacters(regexLeadingNotSpaces); // 7. Let descriptors be a new empty list.
+
+        descriptors = []; // 8. If url ends with a U+002C COMMA character (,), follow these substeps:
+        //		(1). Remove all trailing U+002C COMMA characters from url. If this removed
+        //         more than one character, that is a parse error.
+
+        if (url.slice(-1) === ",") {
+          url = url.replace(regexTrailingCommas, ""); // (Jump ahead to step 9 to skip tokenization and just push the candidate).
+
+          parseDescriptors(); //	Otherwise, follow these substeps:
+        } else {
+          tokenize();
+        } // (close else of step 8)
+        // 16. Return to the step labeled splitting loop.
+
+      } // (Close of big while loop.)
+
+      /**
+       * Tokenizes descriptor properties prior to parsing
+       * Returns undefined.
+       */
+
+
+      function tokenize() {
+        // 8.1. Descriptor tokeniser: Skip whitespace
+        collectCharacters(regexLeadingSpaces); // 8.2. Let current descriptor be the empty string.
+
+        currentDescriptor = ""; // 8.3. Let state be in descriptor.
+
+        state = "in descriptor";
+
+        while (true) {
+          // 8.4. Let c be the character at position.
+          c = input.charAt(pos); //  Do the following depending on the value of state.
+          //  For the purpose of this step, "EOF" is a special character representing
+          //  that position is past the end of input.
+          // In descriptor
+
+          if (state === "in descriptor") {
+            // Do the following, depending on the value of c:
+            // Space character
+            // If current descriptor is not empty, append current descriptor to
+            // descriptors and let current descriptor be the empty string.
+            // Set state to after descriptor.
+            if (isSpace(c)) {
+              if (currentDescriptor) {
+                descriptors.push(currentDescriptor);
+                currentDescriptor = "";
+                state = "after descriptor";
+              } // U+002C COMMA (,)
+              // Advance position to the next character in input. If current descriptor
+              // is not empty, append current descriptor to descriptors. Jump to the step
+              // labeled descriptor parser.
+
+            } else if (c === ",") {
+              pos += 1;
+
+              if (currentDescriptor) {
+                descriptors.push(currentDescriptor);
+              }
+
+              parseDescriptors();
+              return; // U+0028 LEFT PARENTHESIS (()
+              // Append c to current descriptor. Set state to in parens.
+            } else if (c === "\u0028") {
+              currentDescriptor = currentDescriptor + c;
+              state = "in parens"; // EOF
+              // If current descriptor is not empty, append current descriptor to
+              // descriptors. Jump to the step labeled descriptor parser.
+            } else if (c === "") {
+              if (currentDescriptor) {
+                descriptors.push(currentDescriptor);
+              }
+
+              parseDescriptors();
+              return; // Anything else
+              // Append c to current descriptor.
+            } else {
+              currentDescriptor = currentDescriptor + c;
+            } // (end "in descriptor"
+            // In parens
+
+          } else if (state === "in parens") {
+            // U+0029 RIGHT PARENTHESIS ())
+            // Append c to current descriptor. Set state to in descriptor.
+            if (c === ")") {
+              currentDescriptor = currentDescriptor + c;
+              state = "in descriptor"; // EOF
+              // Append current descriptor to descriptors. Jump to the step labeled
+              // descriptor parser.
+            } else if (c === "") {
+              descriptors.push(currentDescriptor);
+              parseDescriptors();
+              return; // Anything else
+              // Append c to current descriptor.
+            } else {
+              currentDescriptor = currentDescriptor + c;
+            } // After descriptor
+
+          } else if (state === "after descriptor") {
+            // Do the following, depending on the value of c:
+            // Space character: Stay in this state.
+            if (isSpace(c)) {// EOF: Jump to the step labeled descriptor parser.
+            } else if (c === "") {
+              parseDescriptors();
+              return; // Anything else
+              // Set state to in descriptor. Set position to the previous character in input.
+            } else {
+              state = "in descriptor";
+              pos -= 1;
+            }
+          } // Advance position to the next character in input.
+
+
+          pos += 1; // Repeat this step.
+        } // (close while true loop)
+
+      }
+      /**
+       * Adds descriptor properties to a candidate, pushes to the candidates array
+       * @return undefined
+       */
+      // Declared outside of the while loop so that it's only created once.
+
+
+      function parseDescriptors() {
+        // 9. Descriptor parser: Let error be no.
+        var pError = false,
+            // 10. Let width be absent.
+        // 11. Let density be absent.
+        // 12. Let future-compat-h be absent. (We're implementing it now as h)
+        w,
+            d,
+            h,
+            i,
+            candidate = {},
+            desc,
+            lastChar,
+            value,
+            intVal,
+            floatVal; // 13. For each descriptor in descriptors, run the appropriate set of steps
+        // from the following list:
+
+        for (i = 0; i < descriptors.length; i++) {
+          desc = descriptors[i];
+          lastChar = desc[desc.length - 1];
+          value = desc.substring(0, desc.length - 1);
+          intVal = parseInt(value, 10);
+          floatVal = parseFloat(value); // If the descriptor consists of a valid non-negative integer followed by
+          // a U+0077 LATIN SMALL LETTER W character
+
+          if (regexNonNegativeInteger.test(value) && lastChar === "w") {
+            // If width and density are not both absent, then let error be yes.
+            if (w || d) {
+              pError = true;
+            } // Apply the rules for parsing non-negative integers to the descriptor.
+            // If the result is zero, let error be yes.
+            // Otherwise, let width be the result.
+
+
+            if (intVal === 0) {
+              pError = true;
+            } else {
+              w = intVal;
+            } // If the descriptor consists of a valid floating-point number followed by
+            // a U+0078 LATIN SMALL LETTER X character
+
+          } else if (regexFloatingPoint.test(value) && lastChar === "x") {
+            // If width, density and future-compat-h are not all absent, then let error
+            // be yes.
+            if (w || d || h) {
+              pError = true;
+            } // Apply the rules for parsing floating-point number values to the descriptor.
+            // If the result is less than zero, let error be yes. Otherwise, let density
+            // be the result.
+
+
+            if (floatVal < 0) {
+              pError = true;
+            } else {
+              d = floatVal;
+            } // If the descriptor consists of a valid non-negative integer followed by
+            // a U+0068 LATIN SMALL LETTER H character
+
+          } else if (regexNonNegativeInteger.test(value) && lastChar === "h") {
+            // If height and density are not both absent, then let error be yes.
+            if (h || d) {
+              pError = true;
+            } // Apply the rules for parsing non-negative integers to the descriptor.
+            // If the result is zero, let error be yes. Otherwise, let future-compat-h
+            // be the result.
+
+
+            if (intVal === 0) {
+              pError = true;
+            } else {
+              h = intVal;
+            } // Anything else, Let error be yes.
+
+          } else {
+            pError = true;
+          }
+        } // (close step 13 for loop)
+        // 15. If error is still no, then append a new image source to candidates whose
+        // URL is url, associated with a width width if not absent and a pixel
+        // density density if not absent. Otherwise, there is a parse error.
+
+
+        if (!pError) {
+          candidate.url = url;
+
+          if (w) {
+            candidate.w = w;
+          }
+
+          if (d) {
+            candidate.d = d;
+          }
+
+          if (h) {
+            candidate.h = h;
+          }
+
+          candidates.push(candidate);
+        } else if (logger && logger.error) {
+          logger.error("Invalid srcset descriptor found in '" + input + "' at '" + desc + "'.");
+        }
+      } // (close parseDescriptors fn)
+
+    };
+  });
+});
+
+var _require$$0$builders$10 = doc.builders;
+var concat$17 = _require$$0$builders$10.concat;
+var ifBreak$6 = _require$$0$builders$10.ifBreak;
+var join$11 = _require$$0$builders$10.join;
+var line$10 = _require$$0$builders$10.line;
+
+function printImgSrcset$1(value) {
+  var srcset = parseSrcset(value, {
+    logger: {
+      error(message) {
+        throw new Error(message);
+      }
+
+    }
+  });
+  var hasW = srcset.some(function (src) {
+    return src.w;
+  });
+  var hasH = srcset.some(function (src) {
+    return src.h;
+  });
+  var hasX = srcset.some(function (src) {
+    return src.d;
+  });
+
+  if (hasW + hasH + hasX !== 1) {
+    throw new Error(`Mixed descriptor in srcset is not supported`);
+  }
+
+  var key = hasW ? "w" : hasH ? "h" : "d";
+  var unit = hasW ? "w" : hasH ? "h" : "x";
+
+  var getMax = function getMax(values) {
+    return Math.max.apply(Math, values);
+  };
+
+  var urls = srcset.map(function (src) {
+    return src.url;
+  });
+  var maxUrlLength = getMax(urls.map(function (url) {
+    return url.length;
+  }));
+  var descriptors = srcset.map(function (src) {
+    return src[key];
+  }).map(function (descriptor) {
+    return descriptor ? descriptor.toString() : "";
+  });
+  var descriptorLeftLengths = descriptors.map(function (descriptor) {
+    var index = descriptor.indexOf(".");
+    return index === -1 ? descriptor.length : index;
+  });
+  var maxDescriptorLeftLength = getMax(descriptorLeftLengths);
+  return join$11(concat$17([",", line$10]), urls.map(function (url, index) {
+    var parts = [url];
+    var descriptor = descriptors[index];
+
+    if (descriptor) {
+      var urlPadding = maxUrlLength - url.length + 1;
+      var descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[index];
+      var alignment = " ".repeat(urlPadding + descriptorPadding);
+      parts.push(ifBreak$6(alignment, " "), descriptor + unit);
+    }
+
+    return concat$17(parts);
+  }));
+}
+
+var syntaxAttribute = {
+  printImgSrcset: printImgSrcset$1
+};
+
+var builders = doc.builders;
+var _require$$0$utils$1 = doc.utils;
+var stripTrailingHardline$2 = _require$$0$utils$1.stripTrailingHardline;
+var mapDoc$6 = _require$$0$utils$1.mapDoc;
+var breakParent$3 = builders.breakParent;
+var fill$5 = builders.fill;
+var group$14 = builders.group;
+var hardline$12 = builders.hardline;
+var ifBreak$5 = builders.ifBreak;
+var indent$9 = builders.indent;
+var join$10 = builders.join;
+var line$9 = builders.line;
+var literalline$6 = builders.literalline;
+var markAsRoot$4 = builders.markAsRoot;
+var softline$7 = builders.softline;
+var countParents = utils_1$3.countParents;
+var dedentString = utils_1$3.dedentString;
+var forceBreakChildren = utils_1$3.forceBreakChildren;
+var forceBreakContent = utils_1$3.forceBreakContent;
+var forceNextEmptyLine = utils_1$3.forceNextEmptyLine;
+var getCommentData = utils_1$3.getCommentData;
+var getLastDescendant = utils_1$3.getLastDescendant;
+var getPrettierIgnoreAttributeCommentData = utils_1$3.getPrettierIgnoreAttributeCommentData;
+var hasPrettierIgnore$2 = utils_1$3.hasPrettierIgnore;
+var inferScriptParser = utils_1$3.inferScriptParser;
+var isPreLikeNode = utils_1$3.isPreLikeNode;
+var isScriptLikeTag = utils_1$3.isScriptLikeTag;
+var normalizeParts$1 = utils_1$3.normalizeParts;
+var preferHardlineAsLeadingSpaces = utils_1$3.preferHardlineAsLeadingSpaces;
+var replaceDocNewlines = utils_1$3.replaceDocNewlines;
+var replaceNewlines = utils_1$3.replaceNewlines;
+var shouldNotPrintClosingTag = utils_1$3.shouldNotPrintClosingTag;
+var shouldPreserveContent = utils_1$3.shouldPreserveContent;
+var insertPragma$6 = pragma$9.insertPragma;
+var printVueFor = syntaxVue.printVueFor;
+var printVueSlotScope = syntaxVue.printVueSlotScope;
+var printImgSrcset = syntaxAttribute.printImgSrcset;
+
+function concat$14(parts) {
+  var newParts = normalizeParts$1(parts);
+  return newParts.length === 0 ? "" : newParts.length === 1 ? newParts[0] : builders.concat(newParts);
+}
+
+function embed$6(path$$1, print, textToDoc, options) {
+  var node = path$$1.getValue();
+
+  switch (node.type) {
+    case "text":
+      {
+        if (isScriptLikeTag(node.parent)) {
+          var parser = inferScriptParser(node.parent);
+
+          if (parser) {
+            var value = parser === "markdown" ? dedentString(node.value.replace(/^[^\S\n]*?\n/, "")) : node.value;
+            return builders.concat([concat$14([breakParent$3, printOpeningTagPrefix(node), markAsRoot$4(stripTrailingHardline$2(textToDoc(value, {
+              parser
+            }))), printClosingTagSuffix(node)])]);
+          }
+        } else if (node.parent.type === "interpolation") {
+          return concat$14([indent$9(concat$14([line$9, textToDoc(node.value, options.parser === "angular" ? {
+            parser: "__ng_interpolation",
+            trailingComma: "none"
+          } : options.parser === "vue" ? {
+            parser: "__vue_expression"
+          } : {
+            parser: "__js_expression"
+          })])), node.parent.next && needsToBorrowPrevClosingTagEndMarker(node.parent.next) ? " " : line$9]);
+        }
+
+        break;
+      }
+
+    case "attribute":
+      {
+        if (!node.value) {
+          break;
+        }
+
+        var embeddedAttributeValueDoc = printEmbeddedAttributeValue(node, function (code, opts) {
+          return (// strictly prefer single quote to avoid unnecessary html entity escape
+            textToDoc(code, Object.assign({
+              __isInHtmlAttribute: true
+            }, opts))
+          );
+        }, options);
+
+        if (embeddedAttributeValueDoc) {
+          return concat$14([node.rawName, '="', mapDoc$6(embeddedAttributeValueDoc, function (doc$$2) {
+            return typeof doc$$2 === "string" ? doc$$2.replace(/"/g, """) : doc$$2;
+          }), '"']);
+        }
+
+        break;
+      }
+
+    case "yaml":
+      return markAsRoot$4(concat$14(["---", hardline$12, node.value.trim().length === 0 ? "" : replaceDocNewlines(textToDoc(node.value, {
+        parser: "yaml"
+      }), literalline$6), "---"]));
+  }
+}
+
+function genericPrint$5(path$$1, options, print) {
+  var node = path$$1.getValue();
+
+  switch (node.type) {
+    case "root":
+      // use original concat to not break stripTrailingHardline
+      return builders.concat([group$14(printChildren$1(path$$1, options, print)), hardline$12]);
+
+    case "element":
+    case "ieConditionalComment":
+      {
+        /**
+         * do not break:
+         *
+         *     
{{ + * ~ + * interpolation + * }}
+ * ~ + * + * exception: break if the opening tag breaks + * + *
{{ + * interpolation + * }}
+ */ + var shouldHugContent = node.children.length === 1 && node.firstChild.type === "interpolation" && node.firstChild.isLeadingSpaceSensitive && !node.firstChild.hasLeadingSpaces && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces; + var attrGroupId = Symbol("element-attr-group-id"); + return concat$14([group$14(concat$14([group$14(printOpeningTag(path$$1, options, print), { + id: attrGroupId + }), node.children.length === 0 ? node.hasDanglingSpaces && node.isDanglingSpaceSensitive ? line$9 : "" : concat$14([forceBreakContent(node) ? breakParent$3 : "", function (childrenDoc) { + return shouldHugContent ? ifBreak$5(indent$9(childrenDoc), childrenDoc, { + groupId: attrGroupId + }) : isScriptLikeTag(node) && node.parent.type === "root" && options.parser === "vue" ? childrenDoc : indent$9(childrenDoc); + }(concat$14([shouldHugContent ? ifBreak$5(softline$7, "", { + groupId: attrGroupId + }) : node.firstChild.type === "text" && node.firstChild.isWhitespaceSensitive && node.firstChild.isIndentationSensitive ? node.children.length === 1 && node.firstChild.type === "text" && node.firstChild.value.indexOf("\n") === -1 || node.firstChild.sourceSpan.start.line === node.lastChild.sourceSpan.end.line ? "" : literalline$6 : node.firstChild.hasLeadingSpaces && node.firstChild.isLeadingSpaceSensitive ? line$9 : softline$7, printChildren$1(path$$1, options, print)])), (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? " " : "" : shouldHugContent ? ifBreak$5(softline$7, "", { + groupId: attrGroupId + }) : node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? line$9 : node.type === "element" && isPreLikeNode(node) && node.lastChild.type === "text" && (node.lastChild.value.indexOf("\n") === -1 || new RegExp(`\\n\\s{${options.tabWidth * countParents(path$$1, function (n) { + return n.parent && n.parent.type !== "root"; + })}}$`).test(node.lastChild.value)) ? + /** + *
+ *
+         *         something
+         *       
+ * ~ + *
+ */ + "" : softline$7])])), printClosingTag(node)]); + } + + case "interpolation": + return concat$14([printOpeningTagStart(node), concat$14(path$$1.map(print, "children")), printClosingTagEnd(node)]); + + case "text": + { + if (node.parent.type === "interpolation") { + // replace the trailing literalline with hardline for better readability + var trailingNewlineRegex = /\n[^\S\n]*?$/; + var hasTrailingNewline = trailingNewlineRegex.test(node.value); + var value = hasTrailingNewline ? node.value.replace(trailingNewlineRegex, "") : node.value; + return concat$14([concat$14(replaceNewlines(value, literalline$6)), hasTrailingNewline ? hardline$12 : ""]); + } + + return fill$5(normalizeParts$1([].concat(printOpeningTagPrefix(node), getTextValueParts(node), printClosingTagSuffix(node)))); + } + + case "docType": + return concat$14([group$14(concat$14([printOpeningTagStart(node), " ", node.value.replace(/^html\b/i, "html").replace(/\s+/g, " ")])), printClosingTagEnd(node)]); + + case "comment": + { + var _value = getCommentData(node); + + return concat$14([group$14(concat$14([printOpeningTagStart(node), _value.trim().length === 0 ? "" : concat$14([indent$9(concat$14([node.prev && needsToBorrowNextOpeningTagStartMarker(node.prev) ? breakParent$3 : "", line$9, concat$14(replaceNewlines(_value, hardline$12))])), (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? " " : line$9])])), printClosingTagEnd(node)]); + } + + case "attribute": + return concat$14([node.rawName, node.value === null ? "" : concat$14(['="', concat$14(replaceNewlines(node.value.replace(/"/g, """), literalline$6)), '"'])]); + + case "yaml": + case "toml": + return node.raw; + + default: + throw new Error(`Unexpected node type ${node.type}`); + } +} + +function printChildren$1(path$$1, options, print) { + var node = path$$1.getValue(); + + if (forceBreakChildren(node)) { + return concat$14([breakParent$3, concat$14(path$$1.map(function (childPath) { + var childNode = childPath.getValue(); + var prevBetweenLine = !childNode.prev ? "" : printBetweenLine(childNode.prev, childNode); + return concat$14([!prevBetweenLine ? "" : concat$14([prevBetweenLine, forceNextEmptyLine(childNode.prev) ? hardline$12 : ""]), printChild(childPath)]); + }, "children"))]); + } + + var groupIds = node.children.map(function () { + return Symbol(""); + }); + return concat$14(path$$1.map(function (childPath, childIndex) { + var childNode = childPath.getValue(); + + if (childNode.type === "text") { + return printChild(childPath); + } + + var prevParts = []; + var leadingParts = []; + var trailingParts = []; + var nextParts = []; + var prevBetweenLine = childNode.prev ? printBetweenLine(childNode.prev, childNode) : ""; + var nextBetweenLine = childNode.next ? printBetweenLine(childNode, childNode.next) : ""; + + if (prevBetweenLine) { + if (forceNextEmptyLine(childNode.prev)) { + prevParts.push(hardline$12, hardline$12); + } else if (prevBetweenLine === hardline$12) { + prevParts.push(hardline$12); + } else { + if (childNode.prev.type === "text") { + leadingParts.push(prevBetweenLine); + } else { + leadingParts.push(ifBreak$5("", softline$7, { + groupId: groupIds[childIndex - 1] + })); + } + } + } + + if (nextBetweenLine) { + if (forceNextEmptyLine(childNode)) { + if (childNode.next.type === "text") { + nextParts.push(hardline$12, hardline$12); + } + } else if (nextBetweenLine === hardline$12) { + if (childNode.next.type === "text") { + nextParts.push(hardline$12); + } + } else { + trailingParts.push(nextBetweenLine); + } + } + + return concat$14([].concat(prevParts, group$14(concat$14([concat$14(leadingParts), group$14(concat$14([printChild(childPath), concat$14(trailingParts)]), { + id: groupIds[childIndex] + })])), nextParts)); + }, "children")); + + function printChild(childPath) { + var child = childPath.getValue(); + + if (hasPrettierIgnore$2(child)) { + return concat$14([].concat(printOpeningTagPrefix(child), replaceNewlines(options.originalText.slice(options.locStart(child) + (child.prev && needsToBorrowNextOpeningTagStartMarker(child.prev) ? printOpeningTagStartMarker(child).length : 0), options.locEnd(child) - (child.next && needsToBorrowPrevClosingTagEndMarker(child.next) ? printClosingTagEndMarker(child).length : 0)), literalline$6), printClosingTagSuffix(child))); + } + + if (shouldPreserveContent(child)) { + return concat$14([].concat(printOpeningTagPrefix(child), group$14(printOpeningTag(childPath, options, print)), replaceNewlines(options.originalText.slice(child.startSourceSpan.end.offset - (child.firstChild && needsToBorrowParentOpeningTagEndMarker(child.firstChild) ? printOpeningTagEndMarker(child).length : 0), child.endSourceSpan.start.offset + (child.lastChild && needsToBorrowParentClosingTagStartMarker(child.lastChild) ? printClosingTagStartMarker(child).length : 0)), literalline$6), printClosingTag(child), printClosingTagSuffix(child))); + } + + return print(childPath); + } + + function printBetweenLine(prevNode, nextNode) { + return needsToBorrowNextOpeningTagStartMarker(prevNode) && ( + /** + * 123 + */ + nextNode.firstChild || + /** + * 123 + */ + nextNode.isSelfClosing || + /** + * 123123 + */ + prevNode.type === "element" && prevNode.isSelfClosing && needsToBorrowPrevClosingTagEndMarker(nextNode) ? "" : !nextNode.isLeadingSpaceSensitive || preferHardlineAsLeadingSpaces(nextNode) || + /** + * Want to write us a letter? Use ourmailing address. + */ + needsToBorrowPrevClosingTagEndMarker(nextNode) && prevNode.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild) && prevNode.lastChild.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild.lastChild) ? hardline$12 : nextNode.hasLeadingSpaces ? line$9 : softline$7; + } +} + +function printOpeningTag(path$$1, options, print) { + var node = path$$1.getValue(); + var forceNotToBreakAttrContent = node.type === "element" && node.fullName === "script" && node.attrs.length === 1 && node.attrs[0].fullName === "src" && node.children.length === 0; + return concat$14([printOpeningTagStart(node), !node.attrs || node.attrs.length === 0 ? node.isSelfClosing ? + /** + *
+ * ^ + */ + " " : "" : concat$14([indent$9(concat$14([forceNotToBreakAttrContent ? " " : line$9, join$10(line$9, function (ignoreAttributeData) { + var hasPrettierIgnoreAttribute = typeof ignoreAttributeData === "boolean" ? function () { + return ignoreAttributeData; + } : Array.isArray(ignoreAttributeData) ? function (attr) { + return ignoreAttributeData.indexOf(attr.rawName) !== -1; + } : function () { + return false; + }; + return path$$1.map(function (attrPath) { + var attr = attrPath.getValue(); + return hasPrettierIgnoreAttribute(attr) ? concat$14(replaceNewlines(options.originalText.slice(options.locStart(attr), options.locEnd(attr)), literalline$6)) : print(attrPath); + }, "attrs"); + }(node.prev && node.prev.type === "comment" && getPrettierIgnoreAttributeCommentData(node.prev.value)))])), + /** + * 123456 + */ + node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) || + /** + * 123 + */ + node.isSelfClosing && needsToBorrowLastChildClosingTagEndMarker(node.parent) ? "" : node.isSelfClosing ? forceNotToBreakAttrContent ? " " : line$9 : forceNotToBreakAttrContent ? "" : softline$7]), node.isSelfClosing ? "" : printOpeningTagEnd(node)]); +} + +function printOpeningTagStart(node) { + return node.prev && needsToBorrowNextOpeningTagStartMarker(node.prev) ? "" : concat$14([printOpeningTagPrefix(node), printOpeningTagStartMarker(node)]); +} + +function printOpeningTagEnd(node) { + return node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) ? "" : printOpeningTagEndMarker(node); +} + +function printClosingTag(node) { + return concat$14([node.isSelfClosing ? "" : printClosingTagStart(node), printClosingTagEnd(node)]); +} + +function printClosingTagStart(node) { + return node.lastChild && needsToBorrowParentClosingTagStartMarker(node.lastChild) ? "" : concat$14([printClosingTagPrefix(node), printClosingTagStartMarker(node)]); +} + +function printClosingTagEnd(node) { + return (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? "" : concat$14([printClosingTagEndMarker(node), printClosingTagSuffix(node)]); +} + +function needsToBorrowNextOpeningTagStartMarker(node) { + /** + * 123

+ */ + return node.next && node.type === "text" && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces; +} + +function needsToBorrowParentOpeningTagEndMarker(node) { + /** + *

123 + * ^ + * + *

123 + * ^ + * + *

+ */ + return node.lastChild && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces && getLastDescendant(node.lastChild).type !== "text"; +} + +function needsToBorrowParentClosingTagStartMarker(node) { + /** + *

+ * 123

+ * + * 123
+ */ + return !node.next && !node.hasTrailingSpaces && node.isTrailingSpaceSensitive && getLastDescendant(node).type === "text"; +} + +function printOpeningTagPrefix(node) { + return needsToBorrowParentOpeningTagEndMarker(node) ? printOpeningTagEndMarker(node.parent) : needsToBorrowPrevClosingTagEndMarker(node) ? printClosingTagEndMarker(node.prev) : ""; +} + +function printClosingTagPrefix(node) { + return needsToBorrowLastChildClosingTagEndMarker(node) ? printClosingTagEndMarker(node.lastChild) : ""; +} + +function printClosingTagSuffix(node) { + return needsToBorrowParentClosingTagStartMarker(node) ? printClosingTagStartMarker(node.parent) : needsToBorrowNextOpeningTagStartMarker(node) ? printOpeningTagStartMarker(node.next) : ""; +} + +function printOpeningTagStartMarker(node) { + switch (node.type) { + case "comment": + return ""; + + case "ieConditionalComment": + return `[endif]-->`; + + case "interpolation": + return "}}"; + + case "element": + if (node.isSelfClosing) { + return "/>"; + } + + // fall through + + default: + return ">"; + } +} + +function getTextValueParts(node) { + var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.value; + return node.isWhitespaceSensitive ? node.isIndentationSensitive ? replaceNewlines(value, literalline$6) : replaceNewlines(dedentString(value.replace(/^\s*?\n|\n\s*?$/g, "")), hardline$12) : // non-breaking whitespace: 0xA0 + join$10(line$9, value.split(/[^\S\xA0]+/)).parts; +} + +function printEmbeddedAttributeValue(node, originalTextToDoc, options) { + var isKeyMatched = function isKeyMatched(patterns) { + return new RegExp(patterns.join("|")).test(node.fullName); + }; + + var getValue = function getValue() { + return node.value.replace(/"/g, '"').replace(/'/g, "'"); + }; + + var shouldHug = false; + + var __onHtmlBindingRoot = function __onHtmlBindingRoot(root) { + var rootNode = root.type === "NGRoot" ? root.node.type === "NGMicrosyntax" && root.node.body.length === 1 && root.node.body[0].type === "NGMicrosyntaxExpression" ? root.node.body[0].expression : root.node : root.type === "JsExpressionRoot" ? root.node : root; + + if (rootNode && (rootNode.type === "ObjectExpression" || rootNode.type === "ArrayExpression")) { + shouldHug = true; + } + }; + + var printHug = function printHug(doc$$2) { + return group$14(doc$$2); + }; + + var printExpand = function printExpand(doc$$2) { + return group$14(concat$14([indent$9(concat$14([softline$7, doc$$2])), softline$7])); + }; + + var printMaybeHug = function printMaybeHug(doc$$2) { + return shouldHug ? printHug(doc$$2) : printExpand(doc$$2); + }; + + var textToDoc = function textToDoc(code, opts) { + return originalTextToDoc(code, Object.assign({ + __onHtmlBindingRoot + }, opts)); + }; + + if (node.fullName === "srcset" && (node.parent.fullName === "img" || node.parent.fullName === "source")) { + return printExpand(printImgSrcset(getValue())); + } + + if (options.parser === "vue") { + if (node.fullName === "v-for") { + return printVueFor(getValue(), textToDoc); + } + + if (node.fullName === "slot-scope") { + return printVueSlotScope(getValue(), textToDoc); + } + /** + * @click="jsStatement" + * @click="jsExpression" + * v-on:click="jsStatement" + * v-on:click="jsExpression" + */ + + + var vueEventBindingPatterns = ["^@", "^v-on:"]; + /** + * :class="vueExpression" + * v-bind:id="vueExpression" + */ + + var vueExpressionBindingPatterns = ["^:", "^v-bind:"]; + /** + * v-if="jsExpression" + */ + + var jsExpressionBindingPatterns = ["^v-"]; + + if (isKeyMatched(vueEventBindingPatterns)) { + // copied from https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/codegen/events.js#L3-L4 + var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/; + var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; + var value = getValue() // https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/helpers.js#L104 + .trim(); + return printMaybeHug(simplePathRE.test(value) || fnExpRE.test(value) ? textToDoc(value, { + parser: "__js_expression" + }) : stripTrailingHardline$2(textToDoc(value, { + parser: "babylon" + }))); + } + + if (isKeyMatched(vueExpressionBindingPatterns)) { + return printMaybeHug(textToDoc(getValue(), { + parser: "__vue_expression" + })); + } + + if (isKeyMatched(jsExpressionBindingPatterns)) { + return printMaybeHug(textToDoc(getValue(), { + parser: "__js_expression" + })); + } + } + + if (options.parser === "angular") { + var ngTextToDoc = function ngTextToDoc(code, opts) { + return (// angular does not allow trailing comma + textToDoc(code, Object.assign({ + trailingComma: "none" + }, opts)) + ); + }; + /** + * *directive="angularDirective" + */ + + + var ngDirectiveBindingPatterns = ["^\\*"]; + /** + * (click)="angularStatement" + * on-click="angularStatement" + */ + + var ngStatementBindingPatterns = ["^\\(.+\\)$", "^on-"]; + /** + * [target]="angularExpression" + * bind-target="angularExpression" + * [(target)]="angularExpression" + * bindon-target="angularExpression" + */ + + var ngExpressionBindingPatterns = ["^\\[.+\\]$", "^bind(on)?-"]; + + if (isKeyMatched(ngStatementBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_action" + })); + } + + if (isKeyMatched(ngExpressionBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_binding" + })); + } + + if (isKeyMatched(ngDirectiveBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_directive" + })); + } + } + + return null; +} + +var printerHtml = { + preprocess: preprocess_1$4, + print: genericPrint$5, + insertPragma: insertPragma$6, + massageAstNode: clean$8, + embed: embed$6 +}; + +var CATEGORY_HTML = "HTML"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var options$16 = { + htmlWhitespaceSensitivity: { + since: "1.15.0", + category: CATEGORY_HTML, + type: "choice", + default: "css", + description: "How to handle whitespaces in HTML.", + choices: [{ + value: "css", + description: "Respect the default value of CSS display property." + }, { + value: "strict", + description: "Whitespaces are considered sensitive." + }, { + value: "ignore", + description: "Whitespaces are considered insensitive." + }] + } +}; + +var name$14 = "HTML"; +var type$13 = "markup"; +var tmScope$13 = "text.html.basic"; +var aceMode$13 = "html"; +var codemirrorMode$10 = "htmlmixed"; +var codemirrorMimeType$10 = "text/html"; +var color$3 = "#e34c26"; +var aliases$5 = ["xhtml"]; +var extensions$13 = [".html", ".htm", ".html.hl", ".inc", ".st", ".xht", ".xhtml"]; +var languageId$13 = 146; +var html$1 = { + name: name$14, + type: type$13, + tmScope: tmScope$13, + aceMode: aceMode$13, + codemirrorMode: codemirrorMode$10, + codemirrorMimeType: codemirrorMimeType$10, + color: color$3, + aliases: aliases$5, + extensions: extensions$13, + languageId: languageId$13 +}; + +var html$2 = Object.freeze({ + name: name$14, + type: type$13, + tmScope: tmScope$13, + aceMode: aceMode$13, + codemirrorMode: codemirrorMode$10, + codemirrorMimeType: codemirrorMimeType$10, + color: color$3, + aliases: aliases$5, + extensions: extensions$13, + languageId: languageId$13, + default: html$1 +}); + +var name$15 = "Vue"; +var type$14 = "markup"; +var color$4 = "#2c3e50"; +var extensions$14 = [".vue"]; +var tmScope$14 = "text.html.vue"; +var aceMode$14 = "html"; +var languageId$14 = 391; +var vue = { + name: name$15, + type: type$14, + color: color$4, + extensions: extensions$14, + tmScope: tmScope$14, + aceMode: aceMode$14, + languageId: languageId$14 +}; + +var vue$1 = Object.freeze({ + name: name$15, + type: type$14, + color: color$4, + extensions: extensions$14, + tmScope: tmScope$14, + aceMode: aceMode$14, + languageId: languageId$14, + default: vue +}); + +var require$$0$29 = ( html$2 && html$1 ) || html$2; + +var require$$1$13 = ( vue$1 && vue ) || vue$1; + +var languages$5 = [createLanguage(require$$0$29, { + override: { + name: "Angular", + since: "1.15.0", + parsers: ["angular"], + vscodeLanguageIds: ["html"], + extensions: [".component.html"], + filenames: [] + } +}), createLanguage(require$$0$29, { + override: { + since: "1.15.0", + parsers: ["html"], + vscodeLanguageIds: ["html"] + } +}), createLanguage(require$$1$13, { + override: { + since: "1.10.0", + parsers: ["vue"], + vscodeLanguageIds: ["vue"] + } +})]; +var printers$5 = { + html: printerHtml +}; +var languageHtml = { + languages: languages$5, + printers: printers$5, + options: options$16 +}; + +function isPragma$1(text) { + return /^\s*@(prettier|format)\s*$/.test(text); +} + +function hasPragma$4(text) { + return /^\s*#[^\n\S]*@(prettier|format)\s*?(\n|$)/.test(text); +} + +function insertPragma$9(text) { + return `# @format\n\n${text}`; +} + +var pragma$11 = { + isPragma: isPragma$1, + hasPragma: hasPragma$4, + insertPragma: insertPragma$9 +}; + +function getLast$7(array) { + return array[array.length - 1]; +} + +function getAncestorCount$1(path$$1, filter) { + var counter = 0; + var pathStackLength = path$$1.stack.length - 1; + + for (var i = 0; i < pathStackLength; i++) { + var value = path$$1.stack[i]; + + if (isNode$2(value) && filter(value)) { + counter++; + } + } + + return counter; +} +/** + * @param {any} value + * @param {string[]=} types + */ + + +function isNode$2(value, types) { + return value && typeof value.type === "string" && (!types || types.indexOf(value.type) !== -1); +} + +function mapNode$1(node, callback, parent) { + return callback("children" in node ? Object.assign({}, node, { + children: node.children.map(function (childNode) { + return mapNode$1(childNode, callback, node); + }) + }) : node, parent); +} + +function defineShortcut$1(x, key, getter) { + Object.defineProperty(x, key, { + get: getter, + enumerable: false + }); +} + +function isNextLineEmpty$6(node, text) { + var newlineCount = 0; + var textLength = text.length; + + for (var i = node.position.end.offset - 1; i < textLength; i++) { + var char = text[i]; + + if (char === "\n") { + newlineCount++; + } + + if (newlineCount === 1 && /\S/.test(char)) { + return false; + } + + if (newlineCount === 2) { + return true; + } + } + + return false; +} + +function isLastDescendantNode$1(path$$1) { + var node = path$$1.getValue(); + + switch (node.type) { + case "tag": + case "anchor": + case "comment": + return false; + } + + var pathStackLength = path$$1.stack.length; + + for (var i = 1; i < pathStackLength; i++) { + var item = path$$1.stack[i]; + var parentItem = path$$1.stack[i - 1]; + + if (Array.isArray(parentItem) && typeof item === "number" && item !== parentItem.length - 1) { + return false; + } + } + + return true; +} + +function getLastDescendantNode$2(node) { + return "children" in node && node.children.length !== 0 ? getLastDescendantNode$2(getLast$7(node.children)) : node; +} + +function isPrettierIgnore$2(comment) { + return comment.value.trim() === "prettier-ignore"; +} + +function hasPrettierIgnore$5(path$$1) { + var node = path$$1.getValue(); + + if (node.type === "documentBody") { + var document = path$$1.getParentNode(); + return hasEndComments$1(document.head) && isPrettierIgnore$2(getLast$7(document.head.endComments)); + } + + return hasLeadingComments$1(node) && isPrettierIgnore$2(getLast$7(node.leadingComments)); +} + +function isEmptyNode$1(node) { + return (!node.children || node.children.length === 0) && !hasComments(node); +} + +function hasComments(node) { + return hasLeadingComments$1(node) || hasMiddleComments$1(node) || hasIndicatorComment$1(node) || hasTrailingComment$2(node) || hasEndComments$1(node); +} + +function hasLeadingComments$1(node) { + return node && node.leadingComments && node.leadingComments.length !== 0; +} + +function hasMiddleComments$1(node) { + return node && node.middleComments && node.middleComments.length !== 0; +} + +function hasIndicatorComment$1(node) { + return node && node.indicatorComment; +} + +function hasTrailingComment$2(node) { + return node && node.trailingComment; +} + +function hasEndComments$1(node) { + return node && node.endComments && node.endComments.length !== 0; +} +/** + * " a b c d e f " -> [" a b", "c d", "e f "] + */ + + +function splitWithSingleSpace(text) { + var parts = []; + var lastPart = undefined; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = text.split(/( +)/g)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var part = _step.value; + + if (part !== " ") { + if (lastPart === " ") { + parts.push(part); + } else { + parts.push((parts.pop() || "") + part); + } + } else if (lastPart === undefined) { + parts.unshift(""); + } + + lastPart = part; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + if (lastPart === " ") { + parts.push((parts.pop() || "") + " "); + } + + if (parts[0] === "") { + parts.shift(); + parts.unshift(" " + (parts.shift() || "")); + } + + return parts; +} + +function getFlowScalarLineContents$1(nodeType, content, options) { + var rawLineContents = content.split("\n").map(function (lineContent, index, lineContents) { + return index === 0 && index === lineContents.length - 1 ? lineContent : index !== 0 && index !== lineContents.length - 1 ? lineContent.trim() : index === 0 ? lineContent.trimRight() : lineContent.trimLeft(); + }); + + if (options.proseWrap === "preserve") { + return rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : [lineContent]; + }); + } + + return rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent); + }).reduce(function (reduced, lineContentWords, index) { + return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !( // trailing backslash in quoteDouble should be preserved + nodeType === "quoteDouble" && getLast$7(getLast$7(reduced)).endsWith("\\")) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]); + }, []).map(function (lineContentWords) { + return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords; + }); +} + +function getBlockValueLineContents$1(node, _ref) { + var parentIndent = _ref.parentIndent, + isLastDescendant = _ref.isLastDescendant, + options = _ref.options; + var content = node.position.start.line === node.position.end.line ? "" : options.originalText.slice(node.position.start.offset, node.position.end.offset) // exclude open line `>` or `|` + .match(/^[^\n]*?\n([\s\S]*)$/)[1]; + var leadingSpaceCount = node.indent === null ? function (match) { + return match ? match[1].length : Infinity; + }(content.match(/^( *)\S/m)) : node.indent - 1 + parentIndent; + var rawLineContents = content.split("\n").map(function (lineContent) { + return lineContent.slice(leadingSpaceCount); + }); + + if (options.proseWrap === "preserve" || node.type === "blockLiteral") { + return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : [lineContent]; + })); + } + + return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent); + }).reduce(function (reduced, lineContentWords, index) { + return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !/^\s/.test(lineContentWords[0]) && !/^\s|\s$/.test(getLast$7(reduced)) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]); + }, []).map(function (lineContentWords) { + return lineContentWords.reduce(function (reduced, word) { + return (// disallow trailing spaces + reduced.length !== 0 && /\s$/.test(getLast$7(reduced)) ? reduced.concat(reduced.pop() + " " + word) : reduced.concat(word) + ); + }, []); + }).map(function (lineContentWords) { + return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords; + })); + + function removeUnnecessaryTrailingNewlines(lineContents) { + if (node.chomping === "keep") { + return getLast$7(lineContents).length === 0 ? lineContents.slice(0, -1) : lineContents; + } + + var trailingNewlineCount = 0; + + for (var i = lineContents.length - 1; i >= 0; i--) { + if (lineContents[i].length === 0) { + trailingNewlineCount++; + } else { + break; + } + } + + return trailingNewlineCount === 0 ? lineContents : trailingNewlineCount >= 2 && !isLastDescendant ? // next empty line + lineContents.slice(0, -(trailingNewlineCount - 1)) : lineContents.slice(0, -trailingNewlineCount); + } +} + +var utils$10 = { + getLast: getLast$7, + getAncestorCount: getAncestorCount$1, + isNode: isNode$2, + isEmptyNode: isEmptyNode$1, + mapNode: mapNode$1, + defineShortcut: defineShortcut$1, + isNextLineEmpty: isNextLineEmpty$6, + isLastDescendantNode: isLastDescendantNode$1, + getBlockValueLineContents: getBlockValueLineContents$1, + getFlowScalarLineContents: getFlowScalarLineContents$1, + getLastDescendantNode: getLastDescendantNode$2, + hasPrettierIgnore: hasPrettierIgnore$5, + hasLeadingComments: hasLeadingComments$1, + hasMiddleComments: hasMiddleComments$1, + hasIndicatorComment: hasIndicatorComment$1, + hasTrailingComment: hasTrailingComment$2, + hasEndComments: hasEndComments$1 +}; + +var insertPragma$8 = pragma$11.insertPragma; +var isPragma = pragma$11.isPragma; +var getAncestorCount = utils$10.getAncestorCount; +var getBlockValueLineContents = utils$10.getBlockValueLineContents; +var getFlowScalarLineContents = utils$10.getFlowScalarLineContents; +var getLast$6 = utils$10.getLast; +var getLastDescendantNode$1 = utils$10.getLastDescendantNode; +var hasLeadingComments = utils$10.hasLeadingComments; +var hasMiddleComments = utils$10.hasMiddleComments; +var hasIndicatorComment = utils$10.hasIndicatorComment; +var hasTrailingComment$1 = utils$10.hasTrailingComment; +var hasEndComments = utils$10.hasEndComments; +var hasPrettierIgnore$4 = utils$10.hasPrettierIgnore; +var isLastDescendantNode = utils$10.isLastDescendantNode; +var isNextLineEmpty$5 = utils$10.isNextLineEmpty; +var isNode$1 = utils$10.isNode; +var isEmptyNode = utils$10.isEmptyNode; +var defineShortcut = utils$10.defineShortcut; +var mapNode = utils$10.mapNode; +var docBuilders$3 = doc.builders; +var conditionalGroup$2 = docBuilders$3.conditionalGroup; +var breakParent$4 = docBuilders$3.breakParent; +var concat$18 = docBuilders$3.concat; +var dedent$4 = docBuilders$3.dedent; +var dedentToRoot$2 = docBuilders$3.dedentToRoot; +var fill$6 = docBuilders$3.fill; +var group$16 = docBuilders$3.group; +var hardline$13 = docBuilders$3.hardline; +var ifBreak$7 = docBuilders$3.ifBreak; +var join$12 = docBuilders$3.join; +var line$11 = docBuilders$3.line; +var lineSuffix$2 = docBuilders$3.lineSuffix; +var literalline$7 = docBuilders$3.literalline; +var markAsRoot$5 = docBuilders$3.markAsRoot; +var softline$8 = docBuilders$3.softline; + +function preprocess$6(ast) { + return mapNode(ast, defineShortcuts); +} + +function defineShortcuts(node) { + switch (node.type) { + case "document": + defineShortcut(node, "head", function () { + return node.children[0]; + }); + defineShortcut(node, "body", function () { + return node.children[1]; + }); + break; + + case "documentBody": + case "sequenceItem": + case "flowSequenceItem": + case "mappingKey": + case "mappingValue": + defineShortcut(node, "content", function () { + return node.children[0]; + }); + break; + + case "mappingItem": + case "flowMappingItem": + defineShortcut(node, "key", function () { + return node.children[0]; + }); + defineShortcut(node, "value", function () { + return node.children[1]; + }); + break; + } + + return node; +} + +function genericPrint$6(path$$1, options, print) { + var node = path$$1.getValue(); + var parentNode = path$$1.getParentNode(); + var tag = !node.tag ? "" : path$$1.call(print, "tag"); + var anchor = !node.anchor ? "" : path$$1.call(print, "anchor"); + var nextEmptyLine = isNode$1(node, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !isLastDescendantNode(path$$1) ? printNextEmptyLine(path$$1, options.originalText) : ""; + return concat$18([node.type !== "mappingValue" && hasLeadingComments(node) ? concat$18([join$12(hardline$13, path$$1.map(print, "leadingComments")), hardline$13]) : "", tag, tag && anchor ? " " : "", anchor, tag || anchor ? isNode$1(node, ["sequence", "mapping"]) && !hasMiddleComments(node) ? hardline$13 : " " : "", hasMiddleComments(node) ? concat$18([node.middleComments.length === 1 ? "" : hardline$13, join$12(hardline$13, path$$1.map(print, "middleComments")), hardline$13]) : "", hasPrettierIgnore$4(path$$1) ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : group$16(_print(node, parentNode, path$$1, options, print)), hasTrailingComment$1(node) && !isNode$1(node, ["document", "documentHead"]) ? lineSuffix$2(concat$18([node.type === "mappingValue" && !node.content ? "" : " ", parentNode.type === "mappingKey" && path$$1.getParentNode(2).type === "mapping" && isInlineNode(node) ? "" : breakParent$4, path$$1.call(print, "trailingComment")])) : "", nextEmptyLine, hasEndComments(node) && !isNode$1(node, ["documentHead", "documentBody"]) ? align$3(node.type === "sequenceItem" ? 2 : 0, concat$18([hardline$13, join$12(hardline$13, path$$1.map(print, "endComments"))])) : ""]); +} + +function _print(node, parentNode, path$$1, options, print) { + switch (node.type) { + case "root": + return concat$18([join$12(hardline$13, path$$1.map(function (childPath, index) { + var document = node.children[index]; + var nextDocument = node.children[index + 1]; + return concat$18([print(childPath), shouldPrintDocumentEndMarker(document, nextDocument) ? concat$18([hardline$13, "...", hasTrailingComment$1(document) ? concat$18([" ", path$$1.call(print, "trailingComment")]) : ""]) : !nextDocument || hasTrailingComment$1(nextDocument.head) ? "" : concat$18([hardline$13, "---"])]); + }, "children")), node.children.length === 0 || function (lastDescendantNode) { + return isNode$1(lastDescendantNode, ["blockLiteral", "blockFolded"]) && lastDescendantNode.chomping === "keep"; + }(getLastDescendantNode$1(node)) ? "" : hardline$13]); + + case "document": + { + var nextDocument = parentNode.children[path$$1.getName() + 1]; + return join$12(hardline$13, [shouldPrintDocumentHeadEndMarker(node, nextDocument) === "head" ? join$12(hardline$13, [node.head.children.length === 0 && node.head.endComments.length === 0 ? "" : path$$1.call(print, "head"), concat$18(["---", hasTrailingComment$1(node.head) ? concat$18([" ", path$$1.call(print, "head", "trailingComment")]) : ""])].filter(Boolean)) : "", shouldPrintDocumentBody(node) ? path$$1.call(print, "body") : ""].filter(Boolean)); + } + + case "documentHead": + return join$12(hardline$13, [].concat(path$$1.map(print, "children"), path$$1.map(print, "endComments"))); + + case "documentBody": + { + var children = join$12(hardline$13, path$$1.map(print, "children")).parts; + var endComments = join$12(hardline$13, path$$1.map(print, "endComments")).parts; + var separator = children.length === 0 || endComments.length === 0 ? "" : function (lastDescendantNode) { + return isNode$1(lastDescendantNode, ["blockFolded", "blockLiteral"]) ? lastDescendantNode.chomping === "keep" ? // there's already a newline printed at the end of blockValue (chomping=keep, lastDescendant=true) + "" : // an extra newline for better readability + concat$18([hardline$13, hardline$13]) : hardline$13; + }(getLastDescendantNode$1(node)); + return concat$18([].concat(children, separator, endComments)); + } + + case "directive": + return concat$18(["%", join$12(" ", [node.name].concat(node.parameters))]); + + case "comment": + return concat$18(["#", node.value]); + + case "alias": + return concat$18(["*", node.value]); + + case "tag": + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + + case "anchor": + return concat$18(["&", node.value]); + + case "plain": + return printFlowScalarContent(node.type, options.originalText.slice(node.position.start.offset, node.position.end.offset), options); + + case "quoteDouble": + case "quoteSingle": + { + var singleQuote = "'"; + var doubleQuote = '"'; + var raw = options.originalText.slice(node.position.start.offset + 1, node.position.end.offset - 1); + + if (node.type === "quoteSingle" && raw.includes("\\") || node.type === "quoteDouble" && /\\[^"]/.test(raw)) { + // only quoteDouble can use escape chars + // and quoteSingle do not need to escape backslashes + var originalQuote = node.type === "quoteDouble" ? doubleQuote : singleQuote; + return concat$18([originalQuote, printFlowScalarContent(node.type, raw, options), originalQuote]); + } else if (raw.includes(doubleQuote)) { + return concat$18([singleQuote, printFlowScalarContent(node.type, node.type === "quoteDouble" ? raw // double quote needs to be escaped by backslash in quoteDouble + .replace(/\\"/g, doubleQuote).replace(/'/g, singleQuote.repeat(2)) : raw, options), singleQuote]); + } + + if (raw.includes(singleQuote)) { + return concat$18([doubleQuote, printFlowScalarContent(node.type, node.type === "quoteSingle" ? // single quote needs to be escaped by 2 single quotes in quoteSingle + raw.replace(/''/g, singleQuote) : raw, options), doubleQuote]); + } + + var quote = options.singleQuote ? singleQuote : doubleQuote; + return concat$18([quote, printFlowScalarContent(node.type, raw, options), quote]); + } + + case "blockFolded": + case "blockLiteral": + { + var parentIndent = getAncestorCount(path$$1, function (ancestorNode) { + return isNode$1(ancestorNode, ["sequence", "mapping"]); + }); + var isLastDescendant = isLastDescendantNode(path$$1); + return concat$18([node.type === "blockFolded" ? ">" : "|", node.indent === null ? "" : node.indent.toString(), node.chomping === "clip" ? "" : node.chomping === "keep" ? "+" : "-", hasIndicatorComment(node) ? concat$18([" ", path$$1.call(print, "indicatorComment")]) : "", (node.indent === null ? dedent$4 : dedentToRoot$2)(align$3(node.indent === null ? options.tabWidth : node.indent - 1 + parentIndent, concat$18(getBlockValueLineContents(node, { + parentIndent, + isLastDescendant, + options + }).reduce(function (reduced, lineWords, index, lineContents) { + return reduced.concat(index === 0 ? hardline$13 : "", fill$6(join$12(line$11, lineWords).parts), index !== lineContents.length - 1 ? lineWords.length === 0 ? hardline$13 : markAsRoot$5(literalline$7) : node.chomping === "keep" && isLastDescendant ? lineWords.length === 0 ? dedentToRoot$2(hardline$13) : dedentToRoot$2(literalline$7) : ""); + }, []))))]); + } + + case "sequence": + return join$12(hardline$13, path$$1.map(print, "children")); + + case "sequenceItem": + return concat$18(["- ", align$3(2, !node.content ? "" : path$$1.call(print, "content"))]); + + case "mappingKey": + return !node.content ? "" : path$$1.call(print, "content"); + + case "mappingValue": + return !node.content ? "" : path$$1.call(print, "content"); + + case "mapping": + return join$12(hardline$13, path$$1.map(print, "children")); + + case "mappingItem": + case "flowMappingItem": + { + var isEmptyMappingKey = isEmptyNode(node.key); + var isEmptyMappingValue = isEmptyNode(node.value); + + if (isEmptyMappingKey && isEmptyMappingValue) { + return concat$18([": "]); + } + + var key = path$$1.call(print, "key"); + var value = path$$1.call(print, "value"); + + if (isEmptyMappingValue) { + return node.type === "flowMappingItem" && parentNode.type === "flowMapping" ? key : node.type === "mappingItem" && isAbsolutelyPrintedAsSingleLineNode(node.key.content, options) && !hasTrailingComment$1(node.key.content) && (!parentNode.tag || parentNode.tag.value !== "tag:yaml.org,2002:set") ? concat$18([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ":"]) : concat$18(["? ", align$3(2, key)]); + } + + if (isEmptyMappingKey) { + return concat$18([": ", align$3(2, value)]); + } + + var groupId = Symbol("mappingKey"); + var forceExplicitKey = hasLeadingComments(node.value) || !isInlineNode(node.key.content); + return forceExplicitKey ? concat$18(["? ", align$3(2, key), hardline$13, join$12("", path$$1.map(print, "value", "leadingComments").map(function (comment) { + return concat$18([comment, hardline$13]); + })), ": ", align$3(2, value)]) : // force singleline + isSingleLineNode(node.key.content) && !hasLeadingComments(node.key.content) && !hasMiddleComments(node.key.content) && !hasTrailingComment$1(node.key.content) && !hasEndComments(node.key) && !hasLeadingComments(node.value.content) && !hasMiddleComments(node.value.content) && !hasEndComments(node.value) && isAbsolutelyPrintedAsSingleLineNode(node.value.content, options) ? concat$18([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ": ", value]) : conditionalGroup$2([concat$18([group$16(concat$18([ifBreak$7("? "), group$16(align$3(2, key), { + id: groupId + })])), ifBreak$7(concat$18([hardline$13, ": ", align$3(2, value)]), indent(concat$18([needsSpaceInFrontOfMappingValue(node) ? " " : "", ":", hasLeadingComments(node.value.content) || hasEndComments(node.value) && node.value.content && !isNode$1(node.value.content, ["mapping", "sequence"]) || parentNode.type === "mapping" && hasTrailingComment$1(node.key.content) && isInlineNode(node.value.content) || isNode$1(node.value.content, ["mapping", "sequence"]) && node.value.content.tag === null && node.value.content.anchor === null ? hardline$13 : !node.value.content ? "" : line$11, value])), { + groupId + })])]); + } + + case "flowMapping": + case "flowSequence": + { + var openMarker = node.type === "flowMapping" ? "{" : "["; + var closeMarker = node.type === "flowMapping" ? "}" : "]"; + var bracketSpacing = node.type === "flowMapping" && node.children.length !== 0 && options.bracketSpacing ? line$11 : softline$8; + + var isLastItemEmptyMappingItem = node.children.length !== 0 && function (lastItem) { + return lastItem.type === "flowMappingItem" && isEmptyNode(lastItem.key) && isEmptyNode(lastItem.value); + }(getLast$6(node.children)); + + return concat$18([openMarker, indent(concat$18([bracketSpacing, concat$18(path$$1.map(function (childPath, index) { + return concat$18([print(childPath), index === node.children.length - 1 ? "" : concat$18([",", line$11, node.children[index].position.start.line !== node.children[index + 1].position.start.line ? printNextEmptyLine(childPath, options.originalText) : ""])]); + }, "children")), ifBreak$7(",", "")])), isLastItemEmptyMappingItem ? "" : bracketSpacing, closeMarker]); + } + + case "flowSequenceItem": + return path$$1.call(print, "content"); + // istanbul ignore next + + default: + throw new Error(`Unexpected node type ${node.type}`); + } + + function indent(doc$$2) { + return docBuilders$3.align(" ".repeat(options.tabWidth), doc$$2); + } +} + +function align$3(n, doc$$2) { + return typeof n === "number" && n > 0 ? docBuilders$3.align(" ".repeat(n), doc$$2) : docBuilders$3.align(n, doc$$2); +} + +function isInlineNode(node) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + case "alias": + case "flowMapping": + case "flowSequence": + return true; + + default: + return false; + } +} + +function isSingleLineNode(node) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + return node.position.start.line === node.position.end.line; + + case "alias": + return true; + + default: + return false; + } +} + +function shouldPrintDocumentBody(document) { + return document.body.children.length !== 0 || hasEndComments(document.body); +} + +function shouldPrintDocumentEndMarker(document, nextDocument) { + return ( + /** + *... # trailingComment + */ + hasTrailingComment$1(document) || nextDocument && ( + /** + * ... + * %DIRECTIVE + * --- + */ + nextDocument.head.children.length !== 0 || + /** + * ... + * # endComment + * --- + */ + hasEndComments(nextDocument.head)) + ); +} + +function shouldPrintDocumentHeadEndMarker(document, nextDocument) { + if ( + /** + * %DIRECTIVE + * --- + */ + document.head.children.length !== 0 || + /** + * # end comment + * --- + */ + hasEndComments(document.head) || + /** + * --- # trailing comment + */ + hasTrailingComment$1(document.head)) { + return "head"; + } + + if (shouldPrintDocumentEndMarker(document, nextDocument)) { + return false; + } + + return nextDocument ? "root" : false; +} + +function isAbsolutelyPrintedAsSingleLineNode(node, options) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteSingle": + case "quoteDouble": + break; + + case "alias": + return true; + + default: + return false; + } + + if (options.proseWrap === "preserve") { + return node.position.start.line === node.position.end.line; + } + + if ( // backslash-newline + /\\$/m.test(options.originalText.slice(node.position.start.offset, node.position.end.offset))) { + return false; + } + + switch (options.proseWrap) { + case "never": + return node.value.indexOf("\n") === -1; + + case "always": + return !/[\n ]/.test(node.value); + // istanbul ignore next + + default: + return false; + } +} + +function needsSpaceInFrontOfMappingValue(node) { + return node.key.content && node.key.content.type === "alias"; +} + +function printNextEmptyLine(path$$1, originalText) { + var node = path$$1.getValue(); + var root = path$$1.stack[0]; + root.isNextEmptyLinePrintedChecklist = root.isNextEmptyLinePrintedChecklist || []; + + if (!root.isNextEmptyLinePrintedChecklist[node.position.end.line]) { + if (isNextLineEmpty$5(node, originalText)) { + root.isNextEmptyLinePrintedChecklist[node.position.end.line] = true; + return softline$8; + } + } + + return ""; +} + +function printFlowScalarContent(nodeType, content, options) { + var lineContents = getFlowScalarLineContents(nodeType, content, options); + return join$12(hardline$13, lineContents.map(function (lineContentWords) { + return fill$6(join$12(line$11, lineContentWords).parts); + })); +} + +function clean$11(node, newNode +/*, parent */ +) { + if (isNode$1(newNode)) { + delete newNode.position; + + switch (newNode.type) { + case "comment": + // insert pragma + if (isPragma(newNode.value)) { + return null; + } + + break; + + case "quoteDouble": + case "quoteSingle": + newNode.type = "quote"; + break; + } + } +} + +var printerYaml = { + preprocess: preprocess$6, + print: genericPrint$6, + massageAstNode: clean$11, + insertPragma: insertPragma$8 +}; + +var options$19 = { + bracketSpacing: commonOptions.bracketSpacing, + singleQuote: commonOptions.singleQuote, + proseWrap: commonOptions.proseWrap +}; + +var name$16 = "YAML"; +var type$15 = "data"; +var tmScope$15 = "source.yaml"; +var aliases$6 = ["yml"]; +var extensions$15 = [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yml.mysql"]; +var filenames$3 = [".clang-format", ".clang-tidy", ".gemrc", "glide.lock"]; +var aceMode$15 = "yaml"; +var codemirrorMode$11 = "yaml"; +var codemirrorMimeType$11 = "text/x-yaml"; +var languageId$15 = 407; +var yaml = { + name: name$16, + type: type$15, + tmScope: tmScope$15, + aliases: aliases$6, + extensions: extensions$15, + filenames: filenames$3, + aceMode: aceMode$15, + codemirrorMode: codemirrorMode$11, + codemirrorMimeType: codemirrorMimeType$11, + languageId: languageId$15 +}; + +var yaml$1 = Object.freeze({ + name: name$16, + type: type$15, + tmScope: tmScope$15, + aliases: aliases$6, + extensions: extensions$15, + filenames: filenames$3, + aceMode: aceMode$15, + codemirrorMode: codemirrorMode$11, + codemirrorMimeType: codemirrorMimeType$11, + languageId: languageId$15, + default: yaml +}); + +var require$$0$31 = ( yaml$1 && yaml ) || yaml$1; + +var languages$6 = [createLanguage(require$$0$31, { + override: { + since: "1.14.0", + parsers: ["yaml"], + vscodeLanguageIds: ["yaml"] + } +})]; +var languageYaml = { + languages: languages$6, + printers: { + yaml: printerYaml + }, + options: options$19 +}; + +// plugin will look for `eval("require")()` and transform to `require()` in the bundle, +// and rewrite the paths to require from the top-level. +// We need to list the parsers and getters so we can load them only when necessary. + + +var internalPlugins = [// JS +languageJs, { + parsers: { + // JS - Babylon + get babylon() { + return require("./parser-babylon").parsers.babylon; + }, + + get json() { + return require("./parser-babylon").parsers.json; + }, + + get json5() { + return require("./parser-babylon").parsers.json5; + }, + + get "json-stringify"() { + return require("./parser-babylon").parsers["json-stringify"]; + }, + + get __js_expression() { + return require("./parser-babylon").parsers.__js_expression; + }, + + get __vue_expression() { + return require("./parser-babylon").parsers.__vue_expression; + }, + + // JS - Flow + get flow() { + return require("./parser-flow").parsers.flow; + }, + + // JS - TypeScript + get typescript() { + return require("./parser-typescript").parsers.typescript; + }, + + /** + * TODO: Remove this old alias in a major version + */ + get "typescript-eslint"() { + return require("./parser-typescript").parsers.typescript; + }, + + // JS - Angular Action + get __ng_action() { + return require("./parser-angular").parsers.__ng_action; + }, + + // JS - Angular Binding + get __ng_binding() { + return require("./parser-angular").parsers.__ng_binding; + }, + + // JS - Angular Interpolation + get __ng_interpolation() { + return require("./parser-angular").parsers.__ng_interpolation; + }, + + // JS - Angular Directive + get __ng_directive() { + return require("./parser-angular").parsers.__ng_directive; + } + + } +}, // CSS +languageCss, { + parsers: { + // TODO: switch these to just `postcss` and use `language` instead. + get css() { + return require("./parser-postcss").parsers.css; + }, + + get less() { + return require("./parser-postcss").parsers.css; + }, + + get scss() { + return require("./parser-postcss").parsers.css; + } + + } +}, // Handlebars +languageHandlebars, { + parsers: { + get glimmer() { + return require("./parser-glimmer").parsers.glimmer; + } + + } +}, // GraphQL +languageGraphql, { + parsers: { + get graphql() { + return require("./parser-graphql").parsers.graphql; + } + + } +}, // Markdown +languageMarkdown, { + parsers: { + get remark() { + return require("./parser-markdown").parsers.remark; + }, + + // TODO: Delete this in 2.0 + get markdown() { + return require("./parser-markdown").parsers.remark; + }, + + get mdx() { + return require("./parser-markdown").parsers.mdx; + } + + } +}, languageHtml, { + parsers: { + // HTML + get html() { + return require("./parser-html").parsers.html; + }, + + // Vue + get vue() { + return require("./parser-html").parsers.vue; + }, + + // Angular + get angular() { + return require("./parser-html").parsers.angular; + } + + } +}, // YAML +languageYaml, { + parsers: { + get yaml() { + return require("./parser-yaml").parsers.yaml; + } + + } +}]; + +var thirdParty$1 = ( thirdParty && thirdParty__default ) || thirdParty; + +function loadPlugins(plugins, pluginSearchDirs) { + if (!plugins) { + plugins = []; + } + + if (!pluginSearchDirs) { + pluginSearchDirs = []; + } // unless pluginSearchDirs are provided, auto-load plugins from node_modules that are parent to Prettier + + + if (!pluginSearchDirs.length) { + var autoLoadDir = thirdParty$1.findParentDir(__dirname, "node_modules"); + + if (autoLoadDir) { + pluginSearchDirs = [autoLoadDir]; + } + } + + var externalManualLoadPluginInfos = plugins.map(function (pluginName) { + var requirePath; + + try { + // try local files + requirePath = resolve$1.sync(path.resolve(process.cwd(), pluginName)); + } catch (e) { + // try node modules + requirePath = resolve$1.sync(pluginName, { + basedir: process.cwd() + }); + } + + return { + name: pluginName, + requirePath + }; + }); + var externalAutoLoadPluginInfos = pluginSearchDirs.map(function (pluginSearchDir) { + var resolvedPluginSearchDir = path.resolve(process.cwd(), pluginSearchDir); + + if (!isDirectory(resolvedPluginSearchDir)) { + throw new Error(`${pluginSearchDir} does not exist or is not a directory`); + } + + var nodeModulesDir = path.resolve(resolvedPluginSearchDir, "node_modules"); + return findPluginsInNodeModules(nodeModulesDir).map(function (pluginName) { + return { + name: pluginName, + requirePath: resolve$1.sync(pluginName, { + basedir: resolvedPluginSearchDir + }) + }; + }); + }).reduce(function (a, b) { + return a.concat(b); + }, []); + var externalPlugins = lodash_uniqby(externalManualLoadPluginInfos.concat(externalAutoLoadPluginInfos), "requirePath").map(function (externalPluginInfo) { + return Object.assign({ + name: externalPluginInfo.name + }, require(externalPluginInfo.requirePath)); + }); + return internalPlugins.concat(externalPlugins); +} + +function findPluginsInNodeModules(nodeModulesDir) { + var pluginPackageJsonPaths = globby.sync(["prettier-plugin-*/package.json", "@prettier/plugin-*/package.json"], { + cwd: nodeModulesDir + }); + return pluginPackageJsonPaths.map(path.dirname); +} + +function isDirectory(dir) { + try { + return fs.statSync(dir).isDirectory(); + } catch (e) { + return false; + } +} + +var loadPlugins_1 = loadPlugins; + +var mimicFn = function mimicFn(to, from) { + // TODO: use `Reflect.ownKeys()` when targeting Node.js 6 + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var prop = _step.value; + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +}; + +var mem = createCommonjsModule(function (module) { + 'use strict'; + + var cacheStore = new WeakMap(); + + var defaultCacheKey = function defaultCacheKey(x) { + if (arguments.length === 1 && (x === null || x === undefined || typeof x !== 'function' && typeof x !== 'object')) { + return x; + } + + return JSON.stringify(arguments); + }; + + module.exports = function (fn, opts) { + opts = Object.assign({ + cacheKey: defaultCacheKey, + cache: new Map() + }, opts); + + var memoized = function memoized() { + var cache = cacheStore.get(memoized); + var key = opts.cacheKey.apply(null, arguments); + + if (cache.has(key)) { + var c = cache.get(key); + + if (typeof opts.maxAge !== 'number' || Date.now() < c.maxAge) { + return c.data; + } + } + + var ret = fn.apply(null, arguments); + cache.set(key, { + data: ret, + maxAge: Date.now() + (opts.maxAge || 0) + }); + return ret; + }; + + mimicFn(memoized, fn); + cacheStore.set(memoized, opts.cache); + return memoized; + }; + + module.exports.clear = function (fn) { + var cache = cacheStore.get(fn); + + if (cache && typeof cache.clear === 'function') { + cache.clear(); + } + }; +}); + +var semver$3 = createCommonjsModule(function (module, exports) { + exports = module.exports = SemVer; // The debug function is excluded entirely from the minified version. + + /* nomin */ + + var debug; + /* nomin */ + + if (typeof process === 'object' && + /* nomin */ + process.env && + /* nomin */ + process.env.NODE_DEBUG && + /* nomin */ + /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ + debug = function debug() { + /* nomin */ + var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ + + args.unshift('SEMVER'); + /* nomin */ + + console.log.apply(console, args); + /* nomin */ + }; + /* nomin */ + else + /* nomin */ + debug = function debug() {}; // Note: this is the semver.org version of the spec that it implements + // Not necessarily the package version of this code. + + exports.SEMVER_SPEC_VERSION = '2.0.0'; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; // Max safe segment length for coercion. + + var MAX_SAFE_COMPONENT_LENGTH = 16; // The actual regexps go on exports.re + + var re = exports.re = []; + var src = exports.src = []; + var R = 0; // The following Regular Expressions can be used for tokenizing, + // validating, and parsing SemVer version strings. + // ## Numeric Identifier + // A single `0`, or a non-zero digit followed by zero or more digits. + + var NUMERICIDENTIFIER = R++; + src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; + var NUMERICIDENTIFIERLOOSE = R++; + src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; // ## Non-numeric Identifier + // Zero or more digits, followed by a letter or hyphen, and then zero or + // more letters, digits, or hyphens. + + var NONNUMERICIDENTIFIER = R++; + src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; // ## Main Version + // Three dot-separated numeric identifiers. + + var MAINVERSION = R++; + src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')'; + var MAINVERSIONLOOSE = R++; + src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; // ## Pre-release Version Identifier + // A numeric identifier, or a non-numeric identifier. + + var PRERELEASEIDENTIFIER = R++; + src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')'; + var PRERELEASEIDENTIFIERLOOSE = R++; + src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')'; // ## Pre-release Version + // Hyphen, followed by one or more dot-separated pre-release version + // identifiers. + + var PRERELEASE = R++; + src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + var PRERELEASELOOSE = R++; + src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; // ## Build Metadata Identifier + // Any combination of digits, letters, or hyphens. + + var BUILDIDENTIFIER = R++; + src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; // ## Build Metadata + // Plus sign, followed by one or more period-separated build metadata + // identifiers. + + var BUILD = R++; + src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; // ## Full Version String + // A main version, followed optionally by a pre-release version and + // build metadata. + // Note that the only major, minor, patch, and pre-release sections of + // the version string are capturing groups. The build metadata is not a + // capturing group, because it should not ever be used in version + // comparison. + + var FULL = R++; + var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?'; + src[FULL] = '^' + FULLPLAIN + '$'; // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. + // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty + // common in the npm registry. + + var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?'; + var LOOSE = R++; + src[LOOSE] = '^' + LOOSEPLAIN + '$'; + var GTLT = R++; + src[GTLT] = '((?:<|>)?=?)'; // Something like "2.*" or "1.2.x". + // Note that "x.x" is a valid xRange identifer, meaning "any version" + // Only the first item is strictly required. + + var XRANGEIDENTIFIERLOOSE = R++; + src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; + var XRANGEIDENTIFIER = R++; + src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + var XRANGEPLAIN = R++; + src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGEPLAINLOOSE = R++; + src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGE = R++; + src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; + var XRANGELOOSE = R++; + src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; // Coercion. + // Extract anything that could conceivably be a part of a valid semver + + var COERCE = R++; + src[COERCE] = '(?:^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])'; // Tilde ranges. + // Meaning is "reasonably at or greater than" + + var LONETILDE = R++; + src[LONETILDE] = '(?:~>?)'; + var TILDETRIM = R++; + src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; + re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); + var tildeTrimReplace = '$1~'; + var TILDE = R++; + src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; + var TILDELOOSE = R++; + src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; // Caret ranges. + // Meaning is "at least and backwards compatible with" + + var LONECARET = R++; + src[LONECARET] = '(?:\\^)'; + var CARETTRIM = R++; + src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; + re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); + var caretTrimReplace = '$1^'; + var CARET = R++; + src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; + var CARETLOOSE = R++; + src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; // A simple gt/lt/eq thing, or just "" to indicate "any version" + + var COMPARATORLOOSE = R++; + src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; + var COMPARATOR = R++; + src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; // An expression to strip any whitespace between the gtlt and the thing + // it modifies, so that `> 1.2.3` ==> `>1.2.3` + + var COMPARATORTRIM = R++; + src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; // this one has to use the /g flag + + re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); + var comparatorTrimReplace = '$1$2$3'; // Something like `1.2.3 - 1.2.4` + // Note that these all use the loose form, because they'll be + // checked against either the strict or loose comparator form + // later. + + var HYPHENRANGE = R++; + src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$'; + var HYPHENRANGELOOSE = R++; + src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$'; // Star ranges basically just allow anything at all. + + var STAR = R++; + src[STAR] = '(<|>)?=?\\s*\\*'; // Compile to actual regexp objects. + // All are flag-free, unless they were created above with a flag. + + for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) re[i] = new RegExp(src[i]); + } + + exports.parse = parse; + + function parse(version, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + if (version.length > MAX_LENGTH) return null; + var r = options.loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) return null; + + try { + return new SemVer(version, options); + } catch (er) { + return null; + } + } + + exports.valid = valid; + + function valid(version, options) { + var v = parse(version, options); + return v ? v.version : null; + } + + exports.clean = clean; + + function clean(version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options); + return s ? s.version : null; + } + + exports.SemVer = SemVer; + + function SemVer(version, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (version instanceof SemVer) { + if (version.loose === options.loose) return version;else version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters'); + if (!(this instanceof SemVer)) return new SemVer(version, options); + debug('SemVer', version, options); + this.options = options; + this.loose = !!options.loose; + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]); + if (!m) throw new TypeError('Invalid Version: ' + version); + this.raw = version; // these are actually numbers + + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError('Invalid major version'); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError('Invalid minor version'); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError('Invalid patch version'); // numberify any prerelease numeric ids + + if (!m[4]) this.prerelease = [];else this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + + return id; + }); + this.build = m[5] ? m[5].split('.') : []; + this.format(); + } + + SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) this.version += '-' + this.prerelease.join('.'); + return this.version; + }; + + SemVer.prototype.toString = function () { + return this.version; + }; + + SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other); + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return this.compareMain(other) || this.comparePre(other); + }; + + SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + + SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); // NOT having a prerelease is > having one + + if (this.prerelease.length && !other.prerelease.length) return -1;else if (!this.prerelease.length && other.prerelease.length) return 1;else if (!this.prerelease.length && !other.prerelease.length) return 0; + var i = 0; + + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) return 0;else if (b === undefined) return 1;else if (a === undefined) return -1;else if (a === b) continue;else return compareIdentifiers(a, b); + } while (++i); + }; // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + + + SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + + case 'prerelease': + if (this.prerelease.length === 0) this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + + case 'pre': + if (this.prerelease.length === 0) this.prerelease = [0];else { + var i = this.prerelease.length; + + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; + } else this.prerelease = [identifier, 0]; + } + + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + + this.format(); + this.raw = this.version; + return this; + }; + + exports.inc = inc; + + function inc(version, release, loose, identifier) { + if (typeof loose === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + + exports.diff = diff; + + function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre' + key; + } + } + } + + return 'prerelease'; + } + + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } + } + + exports.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : a > b ? 1 : 0; + } + + exports.rcompareIdentifiers = rcompareIdentifiers; + + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + + exports.major = major; + + function major(a, loose) { + return new SemVer(a, loose).major; + } + + exports.minor = minor; + + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + + exports.patch = patch; + + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + + exports.compare = compare; + + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + + exports.compareLoose = compareLoose; + + function compareLoose(a, b) { + return compare(a, b, true); + } + + exports.rcompare = rcompare; + + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + + exports.sort = sort; + + function sort(list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose); + }); + } + + exports.rsort = rsort; + + function rsort(list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose); + }); + } + + exports.gt = gt; + + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + + exports.lt = lt; + + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + + exports.eq = eq; + + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + + exports.neq = neq; + + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + + exports.gte = gte; + + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + + exports.lte = lte; + + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + + exports.cmp = cmp; + + function cmp(a, op, b, loose) { + var ret; + + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + + case '': + case '=': + case '==': + ret = eq(a, b, loose); + break; + + case '!=': + ret = neq(a, b, loose); + break; + + case '>': + ret = gt(a, b, loose); + break; + + case '>=': + ret = gte(a, b, loose); + break; + + case '<': + ret = lt(a, b, loose); + break; + + case '<=': + ret = lte(a, b, loose); + break; + + default: + throw new TypeError('Invalid operator: ' + op); + } + + return ret; + } + + exports.Comparator = Comparator; + + function Comparator(comp, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) return comp;else comp = comp.value; + } + + if (!(this instanceof Comparator)) return new Comparator(comp, options); + debug('comparator', comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) this.value = '';else this.value = this.operator + this.semver.version; + debug('comp', this); + } + + var ANY = {}; + + Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + if (!m) throw new TypeError('Invalid comparator: ' + comp); + this.operator = m[1]; + if (this.operator === '=') this.operator = ''; // if it literally is just '>' or '' then allow anything. + + if (!m[2]) this.semver = ANY;else this.semver = new SemVer(m[2], this.options.loose); + }; + + Comparator.prototype.toString = function () { + return this.value; + }; + + Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose); + if (this.semver === ANY) return true; + if (typeof version === 'string') version = new SemVer(version, this.options); + return cmp(version, this.operator, this.semver, this.options); + }; + + Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + + var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<'); + var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>'); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + + exports.Range = Range; + + function Range(range, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options); + } + + if (!(this instanceof Range)) return new Range(range, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; // First, split based on boolean or || + + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()); + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); + } + + Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; + }; + + Range.prototype.toString = function () { + return this.range; + }; + + Range.prototype.parseRange = function (range) { + var loose = this.options.loose; + range = range.trim(); // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); // `~ 1.2.3` => `~1.2.3` + + range = range.replace(re[TILDETRIM], tildeTrimReplace); // `^ 1.2.3` => `^1.2.3` + + range = range.replace(re[CARETTRIM], caretTrimReplace); // normalize spaces + + range = range.split(/\s+/).join(' '); // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options); + }, this).join(' ').split(/\s+/); + + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe); + }); + } + + set = set.map(function (comp) { + return new Comparator(comp, this.options); + }, this); + return set; + }; + + Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + }; // Mostly just for testing and legacy API reasons + + + exports.toComparators = toComparators; + + function toComparators(range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value; + }).join(' ').trim().split(' '); + }); + } // comprised of xranges, tildes, stars, and gtlt's at this point. + // already replaced the hyphen ranges + // turn into a set of JUST comparators. + + + function parseComparator(comp, options) { + debug('comp', comp, options); + comp = replaceCarets(comp, options); + debug('caret', comp); + comp = replaceTildes(comp, options); + debug('tildes', comp); + comp = replaceXRanges(comp, options); + debug('xrange', comp); + comp = replaceStars(comp, options); + debug('stars', comp); + return comp; + } + + function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; + } // ~, ~> --> * (any, kinda silly) + // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 + // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 + // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 + // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 + // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 + + + function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options); + }).join(' '); + } + + function replaceTilde(comp, options) { + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + debug('tilde return', ret); + return ret; + }); + } // ^ --> * (any, kinda silly) + // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 + // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 + // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 + // ^1.2.3 --> >=1.2.3 <2.0.0 + // ^1.2.0 --> >=1.2.0 <2.0.0 + + + function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options); + }).join(' '); + } + + function replaceCaret(comp, options) { + debug('caret', comp, options); + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) { + if (M === '0') ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0'; + } + debug('caret return', ret); + return ret; + }); + } + + function replaceXRanges(comp, options) { + debug('replaceXRanges', comp, options); + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options); + }).join(' '); + } + + function replaceXRange(comp, options) { + comp = comp.trim(); + if (!options || typeof options !== 'object') options = { + loose: !!options, + includePrerelease: false + }; + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === '=' && anyX) gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) m = 0; + if (xp) p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) M = +M + 1;else m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + return ret; + }); + } // Because * is AND-ed with everything else in the comparator, + // and '' means "any version", just remove the *s entirely. + + + function replaceStars(comp, options) { + debug('replaceStars', comp, options); // Looseness is ignored here. star is always as loose as it gets! + + return comp.trim().replace(re[STAR], ''); + } // This function is passed to string.replace(re[HYPHENRANGE]) + // M, m, patch, prerelease, build + // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 + // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do + // 1.2 - 3.4 => >=1.2.0 <3.5.0 + + + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) from = '';else if (isX(fm)) from = '>=' + fM + '.0.0';else if (isX(fp)) from = '>=' + fM + '.' + fm + '.0';else from = '>=' + from; + if (isX(tM)) to = '';else if (isX(tm)) to = '<' + (+tM + 1) + '.0.0';else if (isX(tp)) to = '<' + tM + '.' + (+tm + 1) + '.0';else if (tpr) to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;else to = '<=' + to; + return (from + ' ' + to).trim(); + } // if ANY of the sets match ALL of its comparators, then pass + + + Range.prototype.test = function (version) { + if (!version) return false; + if (typeof version === 'string') version = new SemVer(version, this.options); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) return true; + } + + return false; + }; + + function testSet(set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) return false; + } + + if (!options) options = {}; + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } // Version has a -pre, but it's not one of the ones we like. + + + return false; + } + + return true; + } + + exports.satisfies = satisfies; + + function satisfies(version, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + + return range.test(version); + } + + exports.maxSatisfying = maxSatisfying; + + function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + } + + exports.minSatisfying = minSatisfying; + + function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + } + + exports.validRange = validRange; + + function validRange(range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*'; + } catch (er) { + return null; + } + } // Determine if version is less than all the versions possible in the range + + + exports.ltr = ltr; + + function ltr(version, range, options) { + return outside(version, range, '<', options); + } // Determine if version is greater than all the versions possible in the range. + + + exports.gtr = gtr; + + function gtr(version, range, options) { + return outside(version, range, '>', options); + } + + exports.outside = outside; + + function outside(version, range, hilo, options) { + version = new SemVer(version, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } // If it satisifes the range it is not outside + + + if (satisfies(version, range, options)) { + return false; + } // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + var high = null; + var low = null; + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0'); + } + + high = high || comparator; + low = low || comparator; + + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); // If the edge version comparator has a operator then our version + // isn't outside it + + if (high.operator === comp || high.operator === ecomp) { + return false; + } // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + + + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + + return true; + } + + exports.prerelease = prerelease; + + function prerelease(version, options) { + var parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + + exports.intersects = intersects; + + function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + } + + exports.coerce = coerce; + + function coerce(version) { + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + var match = version.match(re[COERCE]); + if (match == null) return null; + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); + } +}); + +var hasOwnProperty$1 = Object.prototype.hasOwnProperty; +var pseudomap = PseudoMap; + +function PseudoMap(set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'"); + this.clear(); + + if (set) { + if (set instanceof PseudoMap || typeof Map === 'function' && set instanceof Map) set.forEach(function (value, key) { + this.set(key, value); + }, this);else if (Array.isArray(set)) set.forEach(function (kv) { + this.set(kv[0], kv[1]); + }, this);else throw new TypeError('invalid argument'); + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this; + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') fn.call(thisp, this._data[k].value, this._data[k].key); + }, this); +}; + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k); +}; + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k); + return res && res.value; +}; + +PseudoMap.prototype.set = function (k, v) { + set$1(this._data, k, v); +}; + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k); + + if (res) { + delete this._data[res._index]; + this._data.size--; + } +}; + +PseudoMap.prototype.clear = function () { + var data = Object.create(null); + data.size = 0; + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }); +}; + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function get() { + return this._data.size; + }, + set: function set(n) {}, + enumerable: true, + configurable: true +}); + +PseudoMap.prototype.values = PseudoMap.prototype.keys = PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version'); +}; // Either identical, or both NaN + + +function same(a, b) { + return a === b || a !== a && b !== b; +} + +function Entry$1(k, v, i) { + this.key = k; + this.value = v; + this._index = i; +} + +function find(data, k) { + for (var i = 0, s = '_' + k, key = s; hasOwnProperty$1.call(data, key); key = s + i++) { + if (same(data[key].key, k)) return data[key]; + } +} + +function set$1(data, k, v) { + for (var i = 0, s = '_' + k, key = s; hasOwnProperty$1.call(data, key); key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v; + return; + } + } + + data.size++; + data[key] = new Entry$1(k, v, key); +} + +var map$1 = createCommonjsModule(function (module) { + if (process.env.npm_package_name === 'pseudomap' && process.env.npm_lifecycle_script === 'test') process.env.TEST_PSEUDOMAP = 'true'; + + if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map; + } else { + module.exports = pseudomap; + } +}); + +var yallist = Yallist; +Yallist.Node = Node; +Yallist.create = Yallist; + +function Yallist(list) { + var self = this; + + if (!(self instanceof Yallist)) { + self = new Yallist(); + } + + self.tail = null; + self.head = null; + self.length = 0; + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item); + }); + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]); + } + } + + return self; +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list'); + } + + var next = node.next; + var prev = node.prev; + + if (next) { + next.prev = prev; + } + + if (prev) { + prev.next = next; + } + + if (node === this.head) { + this.head = next; + } + + if (node === this.tail) { + this.tail = prev; + } + + node.list.length--; + node.next = null; + node.prev = null; + node.list = null; +}; + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return; + } + + if (node.list) { + node.list.removeNode(node); + } + + var head = this.head; + node.list = this; + node.next = head; + + if (head) { + head.prev = node; + } + + this.head = node; + + if (!this.tail) { + this.tail = node; + } + + this.length++; +}; + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return; + } + + if (node.list) { + node.list.removeNode(node); + } + + var tail = this.tail; + node.list = this; + node.prev = tail; + + if (tail) { + tail.next = node; + } + + this.tail = node; + + if (!this.head) { + this.head = node; + } + + this.length++; +}; + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]); + } + + return this.length; +}; + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]); + } + + return this.length; +}; + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined; + } + + var res = this.tail.value; + this.tail = this.tail.prev; + + if (this.tail) { + this.tail.next = null; + } else { + this.head = null; + } + + this.length--; + return res; +}; + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined; + } + + var res = this.head.value; + this.head = this.head.next; + + if (this.head) { + this.head.prev = null; + } else { + this.tail = null; + } + + this.length--; + return res; +}; + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this; + + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this); + walker = walker.next; + } +}; + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this; + + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this); + walker = walker.prev; + } +}; + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next; + } + + if (i === n && walker !== null) { + return walker.value; + } +}; + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev; + } + + if (i === n && walker !== null) { + return walker.value; + } +}; + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.next; + } + + return res; +}; + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.prev; + } + + return res; +}; + +Yallist.prototype.reduce = function (fn, initial) { + var acc; + var walker = this.head; + + if (arguments.length > 1) { + acc = initial; + } else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } else { + throw new TypeError('Reduce of empty list with no initial value'); + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i); + walker = walker.next; + } + + return acc; +}; + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc; + var walker = this.tail; + + if (arguments.length > 1) { + acc = initial; + } else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else { + throw new TypeError('Reduce of empty list with no initial value'); + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i); + walker = walker.prev; + } + + return acc; +}; + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length); + + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.next; + } + + return arr; +}; + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length); + + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + + return arr; +}; + +Yallist.prototype.slice = function (from, to) { + to = to || this.length; + + if (to < 0) { + to += this.length; + } + + from = from || 0; + + if (from < 0) { + from += this.length; + } + + var ret = new Yallist(); + + if (to < from || to < 0) { + return ret; + } + + if (from < 0) { + from = 0; + } + + if (to > this.length) { + to = this.length; + } + + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next; + } + + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value); + } + + return ret; +}; + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length; + + if (to < 0) { + to += this.length; + } + + from = from || 0; + + if (from < 0) { + from += this.length; + } + + var ret = new Yallist(); + + if (to < from || to < 0) { + return ret; + } + + if (from < 0) { + from = 0; + } + + if (to > this.length) { + to = this.length; + } + + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev; + } + + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value); + } + + return ret; +}; + +Yallist.prototype.reverse = function () { + var head = this.head; + var tail = this.tail; + + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + + this.head = tail; + this.tail = head; + return this; +}; + +function push(self, item) { + self.tail = new Node(item, self.tail, null, self); + + if (!self.head) { + self.head = self.tail; + } + + self.length++; +} + +function unshift(self, item) { + self.head = new Node(item, null, self.head, self); + + if (!self.tail) { + self.tail = self.head; + } + + self.length++; +} + +function Node(value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list); + } + + this.list = list; + this.value = value; + + if (prev) { + prev.next = this; + this.prev = prev; + } else { + this.prev = null; + } + + if (next) { + next.prev = this; + this.next = next; + } else { + this.next = null; + } +} + +var lruCache = LRUCache; // This will be a proper iterable 'Map' in engines that support it, +// or a fakey-fake PseudoMap in older versions. +// A linked list to keep track of recently-used-ness +// use symbols if possible, otherwise just _props + +var hasSymbol = typeof Symbol === 'function'; +var makeSymbol; + +if (hasSymbol) { + makeSymbol = function makeSymbol(key) { + return Symbol(key); + }; +} else { + makeSymbol = function makeSymbol(key) { + return '_' + key; + }; +} + +var MAX = makeSymbol('max'); +var LENGTH = makeSymbol('length'); +var LENGTH_CALCULATOR = makeSymbol('lengthCalculator'); +var ALLOW_STALE = makeSymbol('allowStale'); +var MAX_AGE = makeSymbol('maxAge'); +var DISPOSE = makeSymbol('dispose'); +var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet'); +var LRU_LIST = makeSymbol('lruList'); +var CACHE = makeSymbol('cache'); + +function naiveLength() { + return 1; +} // lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. + + +function LRUCache(options) { + if (!(this instanceof LRUCache)) { + return new LRUCache(options); + } + + if (typeof options === 'number') { + options = { + max: options + }; + } + + if (!options) { + options = {}; + } + + var max = this[MAX] = options.max; // Kind of weird to have a default max of Infinity, but oh well. + + if (!max || !(typeof max === 'number') || max <= 0) { + this[MAX] = Infinity; + } + + var lc = options.length || naiveLength; + + if (typeof lc !== 'function') { + lc = naiveLength; + } + + this[LENGTH_CALCULATOR] = lc; + this[ALLOW_STALE] = options.stale || false; + this[MAX_AGE] = options.maxAge || 0; + this[DISPOSE] = options.dispose; + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; + this.reset(); +} // resize the cache when the max changes. + + +Object.defineProperty(LRUCache.prototype, 'max', { + set: function set(mL) { + if (!mL || !(typeof mL === 'number') || mL <= 0) { + mL = Infinity; + } + + this[MAX] = mL; + trim$2(this); + }, + get: function get() { + return this[MAX]; + }, + enumerable: true +}); +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function set(allowStale) { + this[ALLOW_STALE] = !!allowStale; + }, + get: function get() { + return this[ALLOW_STALE]; + }, + enumerable: true +}); +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function set(mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0; + } + + this[MAX_AGE] = mA; + trim$2(this); + }, + get: function get() { + return this[MAX_AGE]; + }, + enumerable: true +}); // resize the cache when the lengthCalculator changes. + +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function set(lC) { + if (typeof lC !== 'function') { + lC = naiveLength; + } + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC; + this[LENGTH] = 0; + this[LRU_LIST].forEach(function (hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); + this[LENGTH] += hit.length; + }, this); + } + + trim$2(this); + }, + get: function get() { + return this[LENGTH_CALCULATOR]; + }, + enumerable: true +}); +Object.defineProperty(LRUCache.prototype, 'length', { + get: function get() { + return this[LENGTH]; + }, + enumerable: true +}); +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function get() { + return this[LRU_LIST].length; + }, + enumerable: true +}); + +LRUCache.prototype.rforEach = function (fn, thisp) { + thisp = thisp || this; + + for (var walker = this[LRU_LIST].tail; walker !== null;) { + var prev = walker.prev; + forEachStep(this, fn, walker, thisp); + walker = prev; + } +}; + +function forEachStep(self, fn, node, thisp) { + var hit = node.value; + + if (isStale(self, hit)) { + del$1(self, node); + + if (!self[ALLOW_STALE]) { + hit = undefined; + } + } + + if (hit) { + fn.call(thisp, hit.value, hit.key, self); + } +} + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this; + + for (var walker = this[LRU_LIST].head; walker !== null;) { + var next = walker.next; + forEachStep(this, fn, walker, thisp); + walker = next; + } +}; + +LRUCache.prototype.keys = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.key; + }, this); +}; + +LRUCache.prototype.values = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.value; + }, this); +}; + +LRUCache.prototype.reset = function () { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { + this[LRU_LIST].forEach(function (hit) { + this[DISPOSE](hit.key, hit.value); + }, this); + } + + this[CACHE] = new map$1(); // hash of items by key + + this[LRU_LIST] = new yallist(); // list of items in order of use recency + + this[LENGTH] = 0; // length of items in the list +}; + +LRUCache.prototype.dump = function () { + return this[LRU_LIST].map(function (hit) { + if (!isStale(this, hit)) { + return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }; + } + }, this).toArray().filter(function (h) { + return h; + }); +}; + +LRUCache.prototype.dumpLru = function () { + return this[LRU_LIST]; +}; + +LRUCache.prototype.inspect = function (n, opts) { + var str = 'LRUCache {'; + var extras = false; + var as = this[ALLOW_STALE]; + + if (as) { + str += '\n allowStale: true'; + extras = true; + } + + var max = this[MAX]; + + if (max && max !== Infinity) { + if (extras) { + str += ','; + } + + str += '\n max: ' + util.inspect(max, opts); + extras = true; + } + + var maxAge = this[MAX_AGE]; + + if (maxAge) { + if (extras) { + str += ','; + } + + str += '\n maxAge: ' + util.inspect(maxAge, opts); + extras = true; + } + + var lc = this[LENGTH_CALCULATOR]; + + if (lc && lc !== naiveLength) { + if (extras) { + str += ','; + } + + str += '\n length: ' + util.inspect(this[LENGTH], opts); + extras = true; + } + + var didFirst = false; + this[LRU_LIST].forEach(function (item) { + if (didFirst) { + str += ',\n '; + } else { + if (extras) { + str += ',\n'; + } + + didFirst = true; + str += '\n '; + } + + var key = util.inspect(item.key).split('\n').join('\n '); + var val = { + value: item.value + }; + + if (item.maxAge !== maxAge) { + val.maxAge = item.maxAge; + } + + if (lc !== naiveLength) { + val.length = item.length; + } + + if (isStale(this, item)) { + val.stale = true; + } + + val = util.inspect(val, opts).split('\n').join('\n '); + str += key + ' => ' + val; + }); + + if (didFirst || extras) { + str += '\n'; + } + + str += '}'; + return str; +}; + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE]; + var now = maxAge ? Date.now() : 0; + var len = this[LENGTH_CALCULATOR](value, key); + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del$1(this, this[CACHE].get(key)); + return false; + } + + var node = this[CACHE].get(key); + var item = node.value; // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key, item.value); + } + } + + item.now = now; + item.maxAge = maxAge; + item.value = value; + this[LENGTH] += len - item.length; + item.length = len; + this.get(key); + trim$2(this); + return true; + } + + var hit = new Entry(key, value, len, now, maxAge); // oversized objects fall out of cache automatically. + + if (hit.length > this[MAX]) { + if (this[DISPOSE]) { + this[DISPOSE](key, value); + } + + return false; + } + + this[LENGTH] += hit.length; + this[LRU_LIST].unshift(hit); + this[CACHE].set(key, this[LRU_LIST].head); + trim$2(this); + return true; +}; + +LRUCache.prototype.has = function (key) { + if (!this[CACHE].has(key)) return false; + var hit = this[CACHE].get(key).value; + + if (isStale(this, hit)) { + return false; + } + + return true; +}; + +LRUCache.prototype.get = function (key) { + return get(this, key, true); +}; + +LRUCache.prototype.peek = function (key) { + return get(this, key, false); +}; + +LRUCache.prototype.pop = function () { + var node = this[LRU_LIST].tail; + if (!node) return null; + del$1(this, node); + return node.value; +}; + +LRUCache.prototype.del = function (key) { + del$1(this, this[CACHE].get(key)); +}; + +LRUCache.prototype.load = function (arr) { + // reset the cache + this.reset(); + var now = Date.now(); // A previous serialized cache has the most recent items first + + for (var l = arr.length - 1; l >= 0; l--) { + var hit = arr[l]; + var expiresAt = hit.e || 0; + + if (expiresAt === 0) { + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v); + } else { + var maxAge = expiresAt - now; // dont add already expired items + + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge); + } + } + } +}; + +LRUCache.prototype.prune = function () { + var self = this; + this[CACHE].forEach(function (value, key) { + get(self, key, false); + }); +}; + +function get(self, key, doUse) { + var node = self[CACHE].get(key); + + if (node) { + var hit = node.value; + + if (isStale(self, hit)) { + del$1(self, node); + if (!self[ALLOW_STALE]) hit = undefined; + } else { + if (doUse) { + self[LRU_LIST].unshiftNode(node); + } + } + + if (hit) hit = hit.value; + } + + return hit; +} + +function isStale(self, hit) { + if (!hit || !hit.maxAge && !self[MAX_AGE]) { + return false; + } + + var stale = false; + var diff = Date.now() - hit.now; + + if (hit.maxAge) { + stale = diff > hit.maxAge; + } else { + stale = self[MAX_AGE] && diff > self[MAX_AGE]; + } + + return stale; +} + +function trim$2(self) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + var prev = walker.prev; + del$1(self, walker); + walker = prev; + } + } +} + +function del$1(self, node) { + if (node) { + var hit = node.value; + + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value); + } + + self[LENGTH] -= hit.length; + self[CACHE].delete(hit.key); + self[LRU_LIST].removeNode(node); + } +} // classy, since V8 prefers predictable objects. + + +function Entry(key, value, length, now, maxAge) { + this.key = key; + this.value = value; + this.length = length; + this.now = now; + this.maxAge = maxAge || 0; +} + +var sigmund_1 = sigmund; + +function sigmund(subject, maxSessions) { + maxSessions = maxSessions || 10; + var notes = []; + var analysis = ''; + var RE = RegExp; + + function psychoAnalyze(subject, session) { + if (session > maxSessions) return; + + if (typeof subject === 'function' || typeof subject === 'undefined') { + return; + } + + if (typeof subject !== 'object' || !subject || subject instanceof RE) { + analysis += subject; + return; + } + + if (notes.indexOf(subject) !== -1 || session === maxSessions) return; + notes.push(subject); + analysis += '{'; + Object.keys(subject).forEach(function (issue, _, __) { + // pseudo-private values. skip those. + if (issue.charAt(0) === '_') return; + var to = typeof subject[issue]; + if (to === 'function' || to === 'undefined') return; + analysis += issue; + psychoAnalyze(subject[issue], session + 1); + }); + } + + psychoAnalyze(subject, 0); + return analysis; +} // vim: set softtabstop=4 shiftwidth=4: + +var fnmatch = createCommonjsModule(function (module, exports) { + // Based on minimatch.js by isaacs + var platform = typeof process === "object" ? process.platform : "win32"; + if (module) module.exports = minimatch;else exports.minimatch = minimatch; + minimatch.Minimatch = Minimatch; + var cache = minimatch.cache = new lruCache({ + max: 100 + }), + GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var qmark = "[^/]" // * => any number of characters + , + star = qmark + "*?" // ** when dots are allowed. Anything goes, except .. and . + // not (^ or / followed by one or two dots followed by $ or /), + // followed by anything, any number of times. + , + twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" // not a ^ or / followed by a dot, + // followed by anything, any number of times. + , + twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" // characters that need to be escaped in RegExp. + , + reSpecials = charSet("().*{}+?[]^$\\!"); // "abc" -> { a:true, b:true, c:true } + + function charSet(s) { + return s.split("").reduce(function (set, c) { + set[c] = true; + return set; + }, {}); + } // normalizes slashes. + + + var slashSplit = /\/+/; + minimatch.monkeyPatch = monkeyPatch; + + function monkeyPatch() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "match"); + var orig = desc.value; + + desc.value = function (p) { + if (p instanceof Minimatch) return p.match(this); + return orig.call(this, p); + }; + + Object.defineProperty(String.prototype, desc); + } + + minimatch.filter = filter; + + function filter(pattern, options) { + options = options || {}; + return function (p, i, list) { + return minimatch(p, pattern, options); + }; + } + + function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function (k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function (k) { + t[k] = a[k]; + }); + return t; + } + + minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch; + var orig = minimatch; + + var m = function minimatch(p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)); + }; + + m.Minimatch = function Minimatch(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + + return m; + }; + + Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch; + return minimatch.defaults(def).Minimatch; + }; + + function minimatch(p, pattern, options) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + + if (!options) options = {}; // shortcut: comments match nothing. + + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } // "" only matches "" + + + if (pattern.trim() === "") return p === ""; + return new Minimatch(pattern, options).match(p); + } + + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options, cache); + } + + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + + if (!options) options = {}; // windows: need to use /, not \ + // On other platforms, \ is a valid (albeit bad) filename char. + + if (platform === "win32") { + pattern = pattern.split("\\").join("/"); + } // lru storage. + // these things aren't particularly big, but walking down the string + // and turning it into a regexp can get pretty costly. + + + var cacheKey = pattern + "\n" + sigmund_1(options); + var cached = minimatch.cache.get(cacheKey); + if (cached) return cached; + minimatch.cache.set(cacheKey, this); + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; // make the set of regexps etc. + + this.make(); + } + + Minimatch.prototype.make = make; + + function make() { + // don't do it more than once. + if (this._made) return; + var pattern = this.pattern; + var options = this.options; // empty patterns and comments match nothing. + + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + + if (!pattern) { + this.empty = true; + return; + } // step 1: figure out negation, etc. + + + this.parseNegate(); // step 2: expand braces + + var set = this.globSet = this.braceExpand(); + if (options.debug) console.error(this.pattern, set); // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + + set = this.globParts = set.map(function (s) { + return s.split(slashSplit); + }); + if (options.debug) console.error(this.pattern, set); // glob --> regexps + + set = set.map(function (s, si, set) { + return s.map(this.parse, this); + }, this); + if (options.debug) console.error(this.pattern, set); // filter out everything that didn't compile properly. + + set = set.filter(function (s) { + return -1 === s.indexOf(false); + }); + if (options.debug) console.error(this.pattern, set); + this.set = set; + } + + Minimatch.prototype.parseNegate = parseNegate; + + function parseNegate() { + var pattern = this.pattern, + negate = false, + options = this.options, + negateOffset = 0; + if (options.nonegate) return; + + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } // Brace expansion: + // a{b,c}d -> abd acd + // a{b,}c -> abc ac + // a{0..3}d -> a0d a1d a2d a3d + // a{b,c{d,e}f}g -> abg acdfg acefg + // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg + // + // Invalid sets are not expanded. + // a{2..}b -> a{2..}b + // a{b}c -> a{b}c + + + minimatch.braceExpand = function (pattern, options) { + return new Minimatch(pattern, options).braceExpand(); + }; + + Minimatch.prototype.braceExpand = braceExpand; + + function braceExpand(pattern, options) { + options = options || this.options; + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + + if (typeof pattern === "undefined") { + throw new Error("undefined pattern"); + } + + if (options.nobrace || !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern]; + } + + var escaping = false; // examples and comments refer to this crazy pattern: + // a{b,c{d,e},{f,g}h}x{y,z} + // expected: + // abxy + // abxz + // acdxy + // acdxz + // acexy + // acexz + // afhxy + // afhxz + // aghxy + // aghxz + // everything before the first \{ is just a prefix. + // So, we pluck that off, and work with the rest, + // and then prepend it to everything we find. + + if (pattern.charAt(0) !== "{") { + // console.error(pattern) + var prefix = null; + + for (var i = 0, l = pattern.length; i < l; i++) { + var c = pattern.charAt(i); // console.error(i, c) + + if (c === "\\") { + escaping = !escaping; + } else if (c === "{" && !escaping) { + prefix = pattern.substr(0, i); + break; + } + } // actually no sets, all { were escaped. + + + if (prefix === null) { + // console.error("no sets") + return [pattern]; + } + + var tail = braceExpand(pattern.substr(i), options); + return tail.map(function (t) { + return prefix + t; + }); + } // now we have something like: + // {b,c{d,e},{f,g}h}x{y,z} + // walk through the set, expanding each part, until + // the set ends. then, we'll expand the suffix. + // If the set only has a single member, then'll put the {} back + // first, handle numeric sets, since they're easier + + + var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/); + + if (numset) { + // console.error("numset", numset[1], numset[2]) + var suf = braceExpand(pattern.substr(numset[0].length), options), + start = +numset[1], + end = +numset[2], + inc = start > end ? -1 : 1, + set = []; + + for (var i = start; i != end + inc; i += inc) { + // append all the suffixes + for (var ii = 0, ll = suf.length; ii < ll; ii++) { + set.push(i + suf[ii]); + } + } + + return set; + } // ok, walk through the set + // We hope, somewhat optimistically, that there + // will be a } at the end. + // If the closing brace isn't found, then the pattern is + // interpreted as braceExpand("\\" + pattern) so that + // the leading \{ will be interpreted literally. + + + var i = 1 // skip the \{ + , + depth = 1, + set = [], + member = "", + sawEnd = false, + escaping = false; + + function addMember() { + set.push(member); + member = ""; + } // console.error("Entering for") + + + FOR: for (i = 1, l = pattern.length; i < l; i++) { + var c = pattern.charAt(i); // console.error("", i, c) + + if (escaping) { + escaping = false; + member += "\\" + c; + } else { + switch (c) { + case "\\": + escaping = true; + continue; + + case "{": + depth++; + member += "{"; + continue; + + case "}": + depth--; // if this closes the actual set, then we're done + + if (depth === 0) { + addMember(); // pluck off the close-brace + + i++; + break FOR; + } else { + member += c; + continue; + } + + case ",": + if (depth === 1) { + addMember(); + } else { + member += c; + } + + continue; + + default: + member += c; + continue; + } // switch + + } // else + + } // for + // now we've either finished the set, and the suffix is + // pattern.substr(i), or we have *not* closed the set, + // and need to escape the leading brace + + + if (depth !== 0) { + // console.error("didn't close", pattern) + return braceExpand("\\" + pattern, options); + } // x{y,z} -> ["xy", "xz"] + // console.error("set", set) + // console.error("suffix", pattern.substr(i)) + + + var suf = braceExpand(pattern.substr(i), options); // ["b", "c{d,e}","{f,g}h"] -> + // [["b"], ["cd", "ce"], ["fh", "gh"]] + + var addBraces = set.length === 1; // console.error("set pre-expanded", set) + + set = set.map(function (p) { + return braceExpand(p, options); + }); // console.error("set expanded", set) + // [["b"], ["cd", "ce"], ["fh", "gh"]] -> + // ["b", "cd", "ce", "fh", "gh"] + + set = set.reduce(function (l, r) { + return l.concat(r); + }); + + if (addBraces) { + set = set.map(function (s) { + return "{" + s + "}"; + }); + } // now attach the suffixes. + + + var ret = []; + + for (var i = 0, l = set.length; i < l; i++) { + for (var ii = 0, ll = suf.length; ii < ll; ii++) { + ret.push(set[i] + suf[ii]); + } + } + + return ret; + } // parse a component of the expanded set. + // At this point, no pattern may contain "/" in it + // so we're going to return a 2d array, where each entry is the full + // pattern, split on '/', and then turned into a regular expression. + // A regexp is made at the end which joins each array with an + // escaped /, and another full one which joins each regexp with |. + // + // Following the lead of Bash 4.1, note that "**" only has special meaning + // when it is the *only* thing in a path portion. Otherwise, any series + // of * is equivalent to a single *. Globstar behavior is enabled by + // default, and can be disabled by setting options.noglobstar. + + + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + + function parse(pattern, isSub) { + var options = this.options; // shortcuts + + if (!options.noglobstar && pattern === "**") return GLOBSTAR; + if (pattern === "") return ""; + var re = "", + hasMagic = !!options.nocase, + escaping = false // ? => one single character + , + patternListStack = [], + plType, + stateChar, + inClass = false, + reClassStart = -1, + classStart = -1 // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + , + patternStart = pattern.charAt(0) === "." ? "" // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" : "(?!\\.)"; + + function clearStateChar() { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + + case "?": + re += qmark; + hasMagic = true; + break; + + default: + re += "\\" + stateChar; + break; + } + + stateChar = false; + } + } + + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + if (options.debug) { + console.error("%s\t%s %s %j", pattern, i, re, c); + } // skip over any that are escaped. + + + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + + SWITCH: switch (c) { + case "/": + // completely not allowed, even escaped. + // Should already be path-split by now. + return false; + + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + + case "?": + case "*": + case "+": + case "@": + case "!": + if (options.debug) { + console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c); + } // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + + + if (inClass) { + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + + + clearStateChar(); + stateChar = c; // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + + if (options.noext) clearStateChar(); + continue; + + case "(": + if (inClass) { + re += "("; + continue; + } + + if (!stateChar) { + re += "\\("; + continue; + } + + plType = stateChar; + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }); // negation is (?:(?!js)[^/]*) + + re += stateChar === "!" ? "(?:(?!" : "(?:"; + stateChar = false; + continue; + + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + + hasMagic = true; + re += ")"; + plType = patternListStack.pop().type; // negation is (?:(?!js)[^/]*) + // The others are (?:) + + switch (plType) { + case "!": + re += "[^/]*?)"; + break; + + case "?": + case "+": + case "*": + re += plType; + + case "@": + break; + // the default anyway + } + + continue; + + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + + re += "|"; + continue; + // these are mostly the same in regexp and glob + + case "[": + // swallow any state-tracking char before the [ + clearStateChar(); + + if (inClass) { + re += "\\" + c; + continue; + } + + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + + case "]": + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } // finish up the class. + + + hasMagic = true; + inClass = false; + re += c; + continue; + + default: + // swallow any state char that wasn't consumed + clearStateChar(); + + if (escaping) { + // no need + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + + re += c; + } // switch + + } // for + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + + + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + var cs = pattern.substr(classStart + 1), + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + + + var pl; + + while (pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3); // maybe some even number of \, then maybe 1 \, followed by a | + + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = "\\"; + } // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + + + return $1 + $1 + $2 + "|"; + }); // console.error("tail=%j\n %s", tail, tail) + + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } // handle trailing things that only matter at the very end. + + + clearStateChar(); + + if (escaping) { + // trailing \\ + re += "\\\\"; + } // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + + + var addPatternStart = false; + + switch (re.charAt(0)) { + case ".": + case "[": + case "(": + addPatternStart = true; + } // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + + + if (re !== "" && hasMagic) re = "(?=.)" + re; + if (addPatternStart) re = patternStart + re; // parsing just a piece of a larger pattern. + + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + + + if (!hasMagic) { + return globUnescape(pattern); + } + + var flags = options.nocase ? "i" : "", + regExp = new RegExp("^" + re + "$", flags); + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + + minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + + Minimatch.prototype.makeRe = makeRe; + + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + + var set = this.set; + if (!set.length) return this.regexp = false; + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot, + flags = options.nocase ? "i" : ""; + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\\/"); + }).join("|"); // must match entire pattern + // ending in a * or ** will make it less strict. + + re = "^(?:" + re + ")$"; // can match anything, as long as it's not this. + + if (this.negate) re = "^(?!" + re + ").*$"; + + try { + return this.regexp = new RegExp(re, flags); + } catch (ex) { + return this.regexp = false; + } + } + + minimatch.match = function (list, pattern, options) { + var mm = new Minimatch(pattern, options); + list = list.filter(function (f) { + return mm.match(f); + }); + + if (options.nonull && !list.length) { + list.push(pattern); + } + + return list; + }; + + Minimatch.prototype.match = match; + + function match(f, partial) { + // console.error("match", f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; // windows: need to use /, not \ + // On other platforms, \ is a valid (albeit bad) filename char. + + if (platform === "win32") { + f = f.split("\\").join("/"); + } // treat the test path as a set of pathparts. + + + f = f.split(slashSplit); + + if (options.debug) { + console.error(this.pattern, "split", f); + } // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + + var set = this.set; // console.error(this.pattern, "set", set) + + for (var i = 0, l = set.length; i < l; i++) { + var pattern = set[i]; + var hit = this.matchOne(f, pattern, partial); + + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + + + if (options.flipNegate) return false; + return this.negate; + } // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + + + Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options; + + if (options.debug) { + console.error("matchOne", { + "this": this, + file: file, + pattern: pattern + }); + } + + if (options.matchBase && pattern.length === 1) { + file = path.basename(file.join("/")).split("/"); + } + + if (options.debug) { + console.error("matchOne", file.length, pattern.length); + } + + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + if (options.debug) { + console.error("matchOne loop"); + } + + var p = pattern[pi], + f = file[fi]; + + if (options.debug) { + console.error(pattern, p, f); + } // should be impossible. + // some invalid regexp stuff in the set. + + + if (p === false) return false; + + if (p === GLOBSTAR) { + if (options.debug) console.error('GLOBSTAR', [pattern, p, f]); // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + + var fr = fi, + pr = pi + 1; + + if (pr === pl) { + if (options.debug) console.error('** at the end'); // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + + return true; + } // ok, let's see if we can swallow whatever we can. + + + WHILE: while (fr < fl) { + var swallowee = file[fr]; + + if (options.debug) { + console.error('\nglobstar while', file, fr, pattern, pr, swallowee); + } // XXX remove this slice. Just pass the start index. + + + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + if (options.debug) console.error('globstar found match!', fr, fl, swallowee); // found a match. + + return true; + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + if (options.debug) console.error("dot detected!", file, fr, pattern, pr); + break WHILE; + } // ** swallows a segment, and continue. + + + if (options.debug) console.error('globstar swallow a segment, and continue'); + fr++; + } + } // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + + + if (partial) { + // ran out of file + // console.error("\n>>> no match, partial?", file, fr, pattern, pr) + if (fr === fl) return true; + } + + return false; + } // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + + + var hit; + + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + + if (options.debug) { + console.error("string match", p, f, hit); + } + } else { + hit = f.match(p); + + if (options.debug) { + console.error("pattern match", p, f, hit); + } + } + + if (!hit) return false; + } // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + // now either we fell off the end of the pattern, or we're done. + + + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true; + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial; + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = fi === fl - 1 && file[fi] === ""; + return emptyFileEnd; + } // should be unreachable. + + + throw new Error("wtf?"); + }; // replace stuff like \* with * + + + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } +}); + +var ini = createCommonjsModule(function (module, exports) { + "use strict"; // Based on iniparser by shockie + + var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + var __generator = commonjsGlobal && commonjsGlobal.__generator || function (thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } + }; + + var __importStar = commonjsGlobal && commonjsGlobal.__importStar || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) { + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var fs$$2 = __importStar(fs); + /** + * define the possible values: + * section: [section] + * param: key=value + * comment: ;this is a comment + */ + + + var regex = { + section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/, + param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/, + comment: /^\s*[#;].*$/ + }; + /** + * Parses an .ini file + * @param file The location of the .ini file + */ + + function parse(file) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , new Promise(function (resolve, reject) { + fs$$2.readFile(file, 'utf8', function (err, data) { + if (err) { + reject(err); + return; + } + + resolve(parseString(data)); + }); + })]; + }); + }); + } + + exports.parse = parse; + + function parseSync(file) { + return parseString(fs$$2.readFileSync(file, 'utf8')); + } + + exports.parseSync = parseSync; + + function parseString(data) { + var sectionBody = {}; + var sectionName = null; + var value = [[sectionName, sectionBody]]; + var lines = data.split(/\r\n|\r|\n/); + lines.forEach(function (line) { + var match; + + if (regex.comment.test(line)) { + return; + } + + if (regex.param.test(line)) { + match = line.match(regex.param); + sectionBody[match[1]] = match[2]; + } else if (regex.section.test(line)) { + match = line.match(regex.section); + sectionName = match[1]; + sectionBody = {}; + value.push([sectionName, sectionBody]); + } + }); + return value; + } + + exports.parseString = parseString; +}); +unwrapExports(ini); + +var name$17 = "editorconfig"; +var version$3 = "0.15.2"; +var description$1 = "EditorConfig File Locator and Interpreter for Node.js"; +var keywords = ["editorconfig", "core"]; +var main$1 = "src/index.js"; +var contributors = ["Hong Xu (topbug.net)", "Jed Mao (https://github.com/jedmao/)", "Trey Hunner (http://treyhunner.com)"]; +var directories = { + "bin": "./bin", + "lib": "./lib" +}; +var scripts$1 = { + "clean": "rimraf dist", + "prebuild": "npm run clean", + "build": "tsc", + "pretest": "npm run lint && npm run build && npm run copy && cmake .", + "test": "ctest .", + "pretest:ci": "npm run pretest", + "test:ci": "ctest -VV --output-on-failure .", + "lint": "npm run eclint && npm run tslint", + "eclint": "eclint check --indent_size ignore \"src/**\"", + "tslint": "tslint --project tsconfig.json --exclude package.json", + "copy": "cpy .npmignore LICENSE README.md CHANGELOG.md dist && cpy bin/* dist/bin && cpy src/lib/fnmatch*.* dist/src/lib", + "prepub": "npm run lint && npm run build && npm run copy", + "pub": "npm publish ./dist" +}; +var repository$1 = { + "type": "git", + "url": "git://github.com/editorconfig/editorconfig-core-js.git" +}; +var bugs = "https://github.com/editorconfig/editorconfig-core-js/issues"; +var author$1 = "EditorConfig Team"; +var license$1 = "MIT"; +var dependencies$1 = { + "@types/node": "^10.11.7", + "@types/semver": "^5.5.0", + "commander": "^2.19.0", + "lru-cache": "^4.1.3", + "semver": "^5.6.0", + "sigmund": "^1.0.1" +}; +var devDependencies$1 = { + "@types/mocha": "^5.2.5", + "cpy-cli": "^2.0.0", + "eclint": "^2.8.0", + "mocha": "^5.2.0", + "rimraf": "^2.6.2", + "should": "^13.2.3", + "tslint": "^5.11.0", + "typescript": "^3.1.3" +}; +var _package$2 = { + name: name$17, + version: version$3, + description: description$1, + keywords: keywords, + main: main$1, + contributors: contributors, + directories: directories, + scripts: scripts$1, + repository: repository$1, + bugs: bugs, + author: author$1, + license: license$1, + dependencies: dependencies$1, + devDependencies: devDependencies$1 +}; + +var _package$3 = Object.freeze({ + name: name$17, + version: version$3, + description: description$1, + keywords: keywords, + main: main$1, + contributors: contributors, + directories: directories, + scripts: scripts$1, + repository: repository$1, + bugs: bugs, + author: author$1, + license: license$1, + dependencies: dependencies$1, + devDependencies: devDependencies$1, + default: _package$2 +}); + +var require$$4$6 = ( _package$3 && _package$2 ) || _package$3; + +var src$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + var __generator = commonjsGlobal && commonjsGlobal.__generator || function (thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } + }; + + var __importStar = commonjsGlobal && commonjsGlobal.__importStar || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) { + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + + var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod + }; + }; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var fs$$2 = __importStar(fs); + + var path$$2 = __importStar(path); + + var semver = __importStar(semver$3); + + var fnmatch_1 = __importDefault(fnmatch); + + exports.parseString = ini.parseString; + + var package_json_1 = __importDefault(require$$4$6); + + var knownProps = { + end_of_line: true, + indent_style: true, + indent_size: true, + insert_final_newline: true, + trim_trailing_whitespace: true, + charset: true + }; + + function fnmatch$$1(filepath, glob) { + var matchOptions = { + matchBase: true, + dot: true, + noext: true + }; + glob = glob.replace(/\*\*/g, '{*,**/**/**}'); + return fnmatch_1.default(filepath, glob, matchOptions); + } + + function getConfigFileNames(filepath, options) { + var paths = []; + + do { + filepath = path$$2.dirname(filepath); + paths.push(path$$2.join(filepath, options.config)); + } while (filepath !== options.root); + + return paths; + } + + function processMatches(matches, version) { + // Set indent_size to 'tab' if indent_size is unspecified and + // indent_style is set to 'tab'. + if ('indent_style' in matches && matches.indent_style === 'tab' && !('indent_size' in matches) && semver.gte(version, '0.10.0')) { + matches.indent_size = 'tab'; + } // Set tab_width to indent_size if indent_size is specified and + // tab_width is unspecified + + + if ('indent_size' in matches && !('tab_width' in matches) && matches.indent_size !== 'tab') { + matches.tab_width = matches.indent_size; + } // Set indent_size to tab_width if indent_size is 'tab' + + + if ('indent_size' in matches && 'tab_width' in matches && matches.indent_size === 'tab') { + matches.indent_size = matches.tab_width; + } + + return matches; + } + + function processOptions(options, filepath) { + if (options === void 0) { + options = {}; + } + + return { + config: options.config || '.editorconfig', + version: options.version || package_json_1.default.version, + root: path$$2.resolve(options.root || path$$2.parse(filepath).root) + }; + } + + function buildFullGlob(pathPrefix, glob) { + switch (glob.indexOf('/')) { + case -1: + glob = '**/' + glob; + break; + + case 0: + glob = glob.substring(1); + break; + + default: + break; + } + + return path$$2.join(pathPrefix, glob); + } + + function extendProps(props, options) { + if (props === void 0) { + props = {}; + } + + if (options === void 0) { + options = {}; + } + + for (var key in options) { + if (options.hasOwnProperty(key)) { + var value = options[key]; + var key2 = key.toLowerCase(); + var value2 = value; + + if (knownProps[key2]) { + value2 = value.toLowerCase(); + } + + try { + value2 = JSON.parse(value); + } catch (e) {} + + if (typeof value === 'undefined' || value === null) { + // null and undefined are values specific to JSON (no special meaning + // in editorconfig) & should just be returned as regular strings. + value2 = String(value); + } + + props[key2] = value2; + } + } + + return props; + } + + function parseFromConfigs(configs, filepath, options) { + return processMatches(configs.reverse().reduce(function (matches, file) { + var pathPrefix = path$$2.dirname(file.name); + file.contents.forEach(function (section) { + var glob = section[0]; + var options2 = section[1]; + + if (!glob) { + return; + } + + var fullGlob = buildFullGlob(pathPrefix, glob); + + if (!fnmatch$$1(filepath, fullGlob)) { + return; + } + + matches = extendProps(matches, options2); + }); + return matches; + }, {}), options.version); + } + + function getConfigsForFiles(files) { + var configs = []; + + for (var i in files) { + if (files.hasOwnProperty(i)) { + var file = files[i]; + var contents = ini.parseString(file.contents); + configs.push({ + name: file.name, + contents: contents + }); + + if ((contents[0][1].root || '').toLowerCase() === 'true') { + break; + } + } + } + + return configs; + } + + function readConfigFiles(filepaths) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , Promise.all(filepaths.map(function (name) { + return new Promise(function (resolve) { + fs$$2.readFile(name, 'utf8', function (err, data) { + resolve({ + name: name, + contents: err ? '' : data + }); + }); + }); + }))]; + }); + }); + } + + function readConfigFilesSync(filepaths) { + var files = []; + var file; + filepaths.forEach(function (filepath) { + try { + file = fs$$2.readFileSync(filepath, 'utf8'); + } catch (e) { + file = ''; + } + + files.push({ + name: filepath, + contents: file + }); + }); + return files; + } + + function opts(filepath, options) { + if (options === void 0) { + options = {}; + } + + var resolvedFilePath = path$$2.resolve(filepath); + return [resolvedFilePath, processOptions(options, resolvedFilePath)]; + } + + function parseFromFiles(filepath, files, options) { + if (options === void 0) { + options = {}; + } + + return __awaiter(this, void 0, void 0, function () { + var _a, resolvedFilePath, processedOptions; + + return __generator(this, function (_b) { + _a = opts(filepath, options), resolvedFilePath = _a[0], processedOptions = _a[1]; + return [2 + /*return*/ + , files.then(getConfigsForFiles).then(function (configs) { + return parseFromConfigs(configs, resolvedFilePath, processedOptions); + })]; + }); + }); + } + + exports.parseFromFiles = parseFromFiles; + + function parseFromFilesSync(filepath, files, options) { + if (options === void 0) { + options = {}; + } + + var _a = opts(filepath, options), + resolvedFilePath = _a[0], + processedOptions = _a[1]; + + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); + } + + exports.parseFromFilesSync = parseFromFilesSync; + + function parse(_filepath, _options) { + if (_options === void 0) { + _options = {}; + } + + return __awaiter(this, void 0, void 0, function () { + var _a, resolvedFilePath, processedOptions, filepaths; + + return __generator(this, function (_b) { + _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; + filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + return [2 + /*return*/ + , readConfigFiles(filepaths).then(getConfigsForFiles).then(function (configs) { + return parseFromConfigs(configs, resolvedFilePath, processedOptions); + })]; + }); + }); + } + + exports.parse = parse; + + function parseSync(_filepath, _options) { + if (_options === void 0) { + _options = {}; + } + + var _a = opts(_filepath, _options), + resolvedFilePath = _a[0], + processedOptions = _a[1]; + + var filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + var files = readConfigFilesSync(filepaths); + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); + } + + exports.parseSync = parseSync; +}); +unwrapExports(src$2); + +var editorconfigToPrettier = editorConfigToPrettier; + +function editorConfigToPrettier(editorConfig) { + if (!editorConfig || Object.keys(editorConfig).length === 0) { + return null; + } + + var result = {}; + + if (editorConfig.indent_style) { + result.useTabs = editorConfig.indent_style === "tab"; + } + + if (editorConfig.indent_size === "tab") { + result.useTabs = true; + } + + if (result.useTabs && editorConfig.tab_width) { + result.tabWidth = editorConfig.tab_width; + } else if (editorConfig.indent_style === "space" && editorConfig.indent_size && editorConfig.indent_size !== "tab") { + result.tabWidth = editorConfig.indent_size; + } else if (editorConfig.tab_width !== undefined) { + result.tabWidth = editorConfig.tab_width; + } + + if (editorConfig.max_line_length && editorConfig.max_line_length !== "off") { + result.printWidth = editorConfig.max_line_length; + } + + if (editorConfig.quote_type === "single") { + result.singleQuote = true; + } else if (editorConfig.quote_type === "double") { + result.singleQuote = false; + } + + if (["cr", "crlf", "lf"].indexOf(editorConfig.end_of_line) !== -1) { + result.endOfLine = editorConfig.end_of_line; + } + + return result; +} + +function markerExists(files, markers) { + return markers.some(function (marker) { + return files.some(function (file) { + return file === marker; + }); + }); +} + +function traverseFolder(directory, levels, markers) { + var files = fs.readdirSync(directory); + + if (levels === 0) { + return null; + } else if (markerExists(files, markers)) { + return directory; + } else { + return traverseFolder(path.resolve(directory, '..'), levels - 1, markers); + } +} + +var findProjectRoot = function findRoot(dir, opts) { + if (!dir) throw new Error("Directory not defined"); + opts = opts || {}; + var levels = opts.maxDepth || findRoot.MAX_DEPTH; + var markers = opts.markers || findRoot.MARKERS; + return traverseFolder(dir, levels, markers); +}; + +var MAX_DEPTH = 9; +var MARKERS = ['.git', '.hg']; +findProjectRoot.MAX_DEPTH = MAX_DEPTH; +findProjectRoot.MARKERS = MARKERS; + +var resolveConfigEditorconfig = createCommonjsModule(function (module) { + "use strict"; + + var maybeParse = function maybeParse(filePath, config, parse) { + var root = findProjectRoot(path.dirname(path.resolve(filePath))); + return filePath && parse(filePath, { + root + }); + }; + + var editorconfigAsyncNoCache = function editorconfigAsyncNoCache(filePath, config) { + return Promise.resolve(maybeParse(filePath, config, src$2.parse)).then(editorconfigToPrettier); + }; + + var editorconfigAsyncWithCache = mem(editorconfigAsyncNoCache); + + var editorconfigSyncNoCache = function editorconfigSyncNoCache(filePath, config) { + return editorconfigToPrettier(maybeParse(filePath, config, src$2.parseSync)); + }; + + var editorconfigSyncWithCache = mem(editorconfigSyncNoCache); + + function getLoadFunction(opts) { + if (!opts.editorconfig) { + return function () { + return null; + }; + } + + if (opts.sync) { + return opts.cache ? editorconfigSyncWithCache : editorconfigSyncNoCache; + } + + return opts.cache ? editorconfigAsyncWithCache : editorconfigAsyncNoCache; + } + + function clearCache() { + mem.clear(editorconfigSyncWithCache); + mem.clear(editorconfigAsyncWithCache); + } + + module.exports = { + getLoadFunction, + clearCache + }; +}); + +var ParserEND = 0x110000; + +var ParserError = +/*#__PURE__*/ +function (_Error) { + _inherits(ParserError, _Error); + + /* istanbul ignore next */ + function ParserError(msg, filename, linenumber) { + var _this; + + _classCallCheck(this, ParserError); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ParserError).call(this, '[ParserError] ' + msg, filename, linenumber)); + _this.code = 'ParserError'; + if (Error.captureStackTrace) Error.captureStackTrace(_assertThisInitialized(_assertThisInitialized(_this)), ParserError); + return _this; + } + + return ParserError; +}(_wrapNativeSuper(Error)); + +var State = function State(parser) { + _classCallCheck(this, State); + + this.parser = parser; + this.buf = ''; + this.returned = null; + this.result = null; + this.resultTable = null; + this.resultArr = null; +}; + +var Parser = +/*#__PURE__*/ +function () { + function Parser() { + _classCallCheck(this, Parser); + + this.pos = 0; + this.col = 0; + this.line = 0; + this.obj = {}; + this.ctx = this.obj; + this.stack = []; + this._buf = ''; + this.char = null; + this.ii = 0; + this.state = new State(this.parseStart); + } + + _createClass(Parser, [{ + key: "parse", + value: function parse(str) { + /* istanbul ignore next */ + if (str.length === 0 || str.length == null) return; + this._buf = String(str); + this.ii = -1; + this.char = -1; + var getNext; + + while (getNext === false || this.nextChar()) { + getNext = this.runOne(); + } + + this._buf = null; + } + }, { + key: "nextChar", + value: function nextChar() { + if (this.char === 0x0A) { + ++this.line; + this.col = -1; + } + + ++this.ii; + this.char = this._buf.codePointAt(this.ii); + ++this.pos; + ++this.col; + return this.haveBuffer(); + } + }, { + key: "haveBuffer", + value: function haveBuffer() { + return this.ii < this._buf.length; + } + }, { + key: "runOne", + value: function runOne() { + return this.state.parser.call(this, this.state.returned); + } + }, { + key: "finish", + value: function finish() { + this.char = ParserEND; + var last; + + do { + last = this.state.parser; + this.runOne(); + } while (this.state.parser !== last); + + this.ctx = null; + this.state = null; + this._buf = null; + return this.obj; + } + }, { + key: "next", + value: function next(fn) { + /* istanbul ignore next */ + if (typeof fn !== 'function') throw new ParserError('Tried to set state to non-existent state: ' + JSON.stringify(fn)); + this.state.parser = fn; + } + }, { + key: "goto", + value: function goto(fn) { + this.next(fn); + return this.runOne(); + } + }, { + key: "call", + value: function call(fn, returnWith) { + if (returnWith) this.next(returnWith); + this.stack.push(this.state); + this.state = new State(fn); + } + }, { + key: "callNow", + value: function callNow(fn, returnWith) { + this.call(fn, returnWith); + return this.runOne(); + } + }, { + key: "return", + value: function _return(value) { + /* istanbul ignore next */ + if (!this.stack.length) throw this.error(new ParserError('Stack underflow')); + if (value === undefined) value = this.state.buf; + this.state = this.stack.pop(); + this.state.returned = value; + } + }, { + key: "returnNow", + value: function returnNow(value) { + this.return(value); + return this.runOne(); + } + }, { + key: "consume", + value: function consume() { + /* istanbul ignore next */ + if (this.char === ParserEND) throw this.error(new ParserError('Unexpected end-of-buffer')); + this.state.buf += this._buf[this.ii]; + } + }, { + key: "error", + value: function error(err) { + err.line = this.line; + err.col = this.col; + err.pos = this.pos; + return err; + } + /* istanbul ignore next */ + + }, { + key: "parseStart", + value: function parseStart() { + throw new ParserError('Must declare a parseStart method'); + } + }]); + + return Parser; +}(); + +Parser.END = ParserEND; +Parser.Error = ParserError; +var parser$2 = Parser; + +var createDatetime = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (value) { + var date = new Date(value); + /* istanbul ignore if */ + + if (isNaN(date)) { + throw new TypeError('Invalid Datetime'); + } else { + return date; + } + }; +}); + +var formatNum = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (d, num) { + num = String(num); + + while (num.length < d) { + num = '0' + num; + } + + return num; + }; +}); + +var createDatetimeFloat = createCommonjsModule(function (module) { + 'use strict'; + + var FloatingDateTime = + /*#__PURE__*/ + function (_Date) { + _inherits(FloatingDateTime, _Date); + + function FloatingDateTime(value) { + var _this; + + _classCallCheck(this, FloatingDateTime); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(FloatingDateTime).call(this, value + 'Z')); + _this.isFloating = true; + return _this; + } + + _createClass(FloatingDateTime, [{ + key: "toISOString", + value: function toISOString() { + var date = `${this.getUTCFullYear()}-${formatNum(2, this.getUTCMonth() + 1)}-${formatNum(2, this.getUTCDate())}`; + var time = `${formatNum(2, this.getUTCHours())}:${formatNum(2, this.getUTCMinutes())}:${formatNum(2, this.getUTCSeconds())}.${formatNum(3, this.getUTCMilliseconds())}`; + return `${date}T${time}`; + } + }]); + + return FloatingDateTime; + }(_wrapNativeSuper(Date)); + + module.exports = function (value) { + var date = new FloatingDateTime(value); + /* istanbul ignore if */ + + if (isNaN(date)) { + throw new TypeError('Invalid Datetime'); + } else { + return date; + } + }; +}); + +var createDate = createCommonjsModule(function (module) { + 'use strict'; + + var DateTime = commonjsGlobal.Date; + + var Date = + /*#__PURE__*/ + function (_DateTime) { + _inherits(Date, _DateTime); + + function Date(value) { + var _this; + + _classCallCheck(this, Date); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Date).call(this, value)); + _this.isDate = true; + return _this; + } + + _createClass(Date, [{ + key: "toISOString", + value: function toISOString() { + return `${this.getUTCFullYear()}-${formatNum(2, this.getUTCMonth() + 1)}-${formatNum(2, this.getUTCDate())}`; + } + }]); + + return Date; + }(DateTime); + + module.exports = function (value) { + var date = new Date(value); + /* istanbul ignore if */ + + if (isNaN(date)) { + throw new TypeError('Invalid Datetime'); + } else { + return date; + } + }; +}); + +var createTime = createCommonjsModule(function (module) { + 'use strict'; + + var Time = + /*#__PURE__*/ + function (_Date) { + _inherits(Time, _Date); + + function Time(value) { + var _this; + + _classCallCheck(this, Time); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Time).call(this, `0000-01-01T${value}Z`)); + _this.isTime = true; + return _this; + } + + _createClass(Time, [{ + key: "toISOString", + value: function toISOString() { + return `${formatNum(2, this.getUTCHours())}:${formatNum(2, this.getUTCMinutes())}:${formatNum(2, this.getUTCSeconds())}.${formatNum(3, this.getUTCMilliseconds())}`; + } + }]); + + return Time; + }(_wrapNativeSuper(Date)); + + module.exports = function (value) { + var date = new Time(value); + /* istanbul ignore if */ + + if (isNaN(date)) { + throw new TypeError('Invalid Datetime'); + } else { + return date; + } + }; +}); + +var tomlParser = createCommonjsModule(function (module) { + 'use strict'; + /* eslint-disable no-new-wrappers, no-eval, camelcase, operator-linebreak */ + + module.exports = makeParserClass(parser$2); + module.exports.makeParserClass = makeParserClass; + + var TomlError = + /*#__PURE__*/ + function (_Error) { + _inherits(TomlError, _Error); + + function TomlError(msg) { + var _this; + + _classCallCheck(this, TomlError); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(TomlError).call(this, msg)); + /* istanbul ignore next */ + + if (Error.captureStackTrace) Error.captureStackTrace(_assertThisInitialized(_assertThisInitialized(_this)), TomlError); + _this.fromTOML = true; + _this.wrapped = null; + return _this; + } + + return TomlError; + }(_wrapNativeSuper(Error)); + + TomlError.wrap = function (err) { + var terr = new TomlError(err.message); + terr.code = err.code; + terr.wrapped = err; + return terr; + }; + + module.exports.TomlError = TomlError; + var CTRL_I = 0x09; + var CTRL_J = 0x0A; + var CTRL_M = 0x0D; + var CTRL_CHAR_BOUNDARY = 0x1F; // the last non-character in the latin1 region of unicode, except DEL + + var CHAR_SP = 0x20; + var CHAR_QUOT = 0x22; + var CHAR_NUM = 0x23; + var CHAR_APOS = 0x27; + var CHAR_PLUS = 0x2B; + var CHAR_COMMA = 0x2C; + var CHAR_HYPHEN = 0x2D; + var CHAR_PERIOD = 0x2E; + var CHAR_0 = 0x30; + var CHAR_1 = 0x31; + var CHAR_7 = 0x37; + var CHAR_9 = 0x39; + var CHAR_COLON = 0x3A; + var CHAR_EQUALS = 0x3D; + var CHAR_A = 0x41; + var CHAR_E = 0x45; + var CHAR_F = 0x46; + var CHAR_T = 0x54; + var CHAR_U = 0x55; + var CHAR_Z = 0x5A; + var CHAR_LOWBAR = 0x5F; + var CHAR_a = 0x61; + var CHAR_b = 0x62; + var CHAR_e = 0x65; + var CHAR_f = 0x66; + var CHAR_i = 0x69; + var CHAR_l = 0x6C; + var CHAR_n = 0x6E; + var CHAR_o = 0x6F; + var CHAR_r = 0x72; + var CHAR_s = 0x73; + var CHAR_t = 0x74; + var CHAR_u = 0x75; + var CHAR_x = 0x78; + var CHAR_z = 0x7A; + var CHAR_LCUB = 0x7B; + var CHAR_RCUB = 0x7D; + var CHAR_LSQB = 0x5B; + var CHAR_BSOL = 0x5C; + var CHAR_RSQB = 0x5D; + var CHAR_DEL = 0x7F; + var SURROGATE_FIRST = 0xD800; + var SURROGATE_LAST = 0xDFFF; + var escapes = { + [CHAR_b]: '\x08', + [CHAR_t]: '\x09', + [CHAR_n]: '\x0a', + [CHAR_f]: '\x0c', + [CHAR_r]: '\x0d', + [CHAR_QUOT]: '\x22', + [CHAR_BSOL]: '\x5c' + }; + + function isDigit(cp) { + return cp >= CHAR_0 && cp <= CHAR_9; + } + + function isHexit(cp) { + return cp >= CHAR_A && cp <= CHAR_F || cp >= CHAR_a && cp <= CHAR_f || cp >= CHAR_0 && cp <= CHAR_9; + } + + function isBit(cp) { + return cp === CHAR_1 || cp === CHAR_0; + } + + function isOctit(cp) { + return cp >= CHAR_0 && cp <= CHAR_7; + } + + function isAlphaNumQuoteHyphen(cp) { + return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_APOS || cp === CHAR_QUOT || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN; + } + + function isAlphaNumHyphen(cp) { + return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN; + } + + var _type = Symbol('type'); + + var _declared = Symbol('declared'); + + var INLINE_TABLE = Symbol('inline-table'); + + function InlineTable() { + return Object.defineProperties({}, { + [_type]: { + value: INLINE_TABLE + } + }); + } + + function isInlineTable(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === INLINE_TABLE; + } + + var TABLE = Symbol('table'); + + function Table() { + return Object.defineProperties({}, { + [_type]: { + value: TABLE + }, + [_declared]: { + value: false, + writable: true + } + }); + } + + function isTable(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === TABLE; + } + + var _contentType = Symbol('content-type'); + + var INLINE_LIST = Symbol('inline-list'); + + function InlineList(type) { + return Object.defineProperties([], { + [_type]: { + value: INLINE_LIST + }, + [_contentType]: { + value: type + } + }); + } + + function isInlineList(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === INLINE_LIST; + } + + var LIST = Symbol('list'); + + function List() { + return Object.defineProperties([], { + [_type]: { + value: LIST + } + }); + } + + function isList(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === LIST; + } // in an eval, to let bundlers not slurp in a util proxy + + + var utilInspect = eval(`require('util').inspect`); + /* istanbul ignore next */ + + var _inspect = utilInspect && utilInspect.custom || 'inspect'; + + var BoxedBigInt = + /*#__PURE__*/ + function () { + function BoxedBigInt(value) { + _classCallCheck(this, BoxedBigInt); + + try { + this.value = commonjsGlobal.BigInt(value); + } catch (_) { + /* istanbul ignore next */ + this.value = null; + } + + Object.defineProperty(this, _type, { + value: INTEGER + }); + } + + _createClass(BoxedBigInt, [{ + key: "isNaN", + value: function isNaN() { + return this.value === null; + } + /* istanbul ignore next */ + + }, { + key: "toString", + value: function toString() { + return String(this.value); + } + /* istanbul ignore next */ + + }, { + key: _inspect, + value: function value() { + return `[BigInt: ${this.toString()}]}`; + } + }, { + key: "valueOf", + value: function valueOf() { + return this.value; + } + }]); + + return BoxedBigInt; + }(); + + var INTEGER = Symbol('integer'); + + function Integer(_value) { + var num = Number(_value); // -0 is a float thing, not an int thing + + if (Object.is(num, -0)) num = 0; + /* istanbul ignore else */ + + if (commonjsGlobal.BigInt && !Number.isSafeInteger(num)) { + return new BoxedBigInt(_value); + } else { + /* istanbul ignore next */ + return Object.defineProperties(new Number(num), { + isNaN: { + value: function value() { + return isNaN(this); + } + }, + [_type]: { + value: INTEGER + }, + [_inspect]: { + value: function value() { + return `[Integer: ${_value}]`; + } + } + }); + } + } + + function isInteger(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === INTEGER; + } + + var FLOAT = Symbol('float'); + + function Float(_value2) { + /* istanbul ignore next */ + return Object.defineProperties(new Number(_value2), { + [_type]: { + value: FLOAT + }, + [_inspect]: { + value: function value() { + return `[Float: ${_value2}]`; + } + } + }); + } + + function isFloat(obj) { + if (obj === null || typeof obj !== 'object') return false; + return obj[_type] === FLOAT; + } + + function tomlType(value) { + var type = typeof value; + + if (type === 'object') { + /* istanbul ignore if */ + if (value === null) return 'null'; + if (value instanceof Date) return 'datetime'; + /* istanbul ignore else */ + + if (_type in value) { + switch (value[_type]) { + case INLINE_TABLE: + return 'inline-table'; + + case INLINE_LIST: + return 'inline-list'; + + /* istanbul ignore next */ + + case TABLE: + return 'table'; + + /* istanbul ignore next */ + + case LIST: + return 'list'; + + case FLOAT: + return 'float'; + + case INTEGER: + return 'integer'; + } + } + } + + return type; + } + + function makeParserClass(Parser) { + var TOMLParser = + /*#__PURE__*/ + function (_Parser) { + _inherits(TOMLParser, _Parser); + + function TOMLParser() { + var _this2; + + _classCallCheck(this, TOMLParser); + + _this2 = _possibleConstructorReturn(this, _getPrototypeOf(TOMLParser).call(this)); + _this2.ctx = _this2.obj = Table(); + return _this2; + } + /* MATCH HELPER */ + + + _createClass(TOMLParser, [{ + key: "atEndOfWord", + value: function atEndOfWord() { + return this.char === CHAR_NUM || this.char === CTRL_I || this.char === CHAR_SP || this.atEndOfLine(); + } + }, { + key: "atEndOfLine", + value: function atEndOfLine() { + return this.char === Parser.END || this.char === CTRL_J || this.char === CTRL_M; + } + }, { + key: "parseStart", + value: function parseStart() { + if (this.char === Parser.END) { + return null; + } else if (this.char === CHAR_LSQB) { + return this.call(this.parseTableOrList); + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + return null; + } else if (isAlphaNumQuoteHyphen(this.char)) { + return this.callNow(this.parseAssignStatement); + } else { + throw this.error(new TomlError(`Unknown character "${this.char}"`)); + } + } // HELPER, this strips any whitespace and comments to the end of the line + // then RETURNS. Last state in a production. + + }, { + key: "parseWhitespaceToEOL", + value: function parseWhitespaceToEOL() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + return null; + } else if (this.char === CHAR_NUM) { + return this.goto(this.parseComment); + } else if (this.char === Parser.END || this.char === CTRL_J) { + return this.return(); + } else { + throw this.error(new TomlError('Unexpected character, expected only whitespace or comments till end of line')); + } + } + /* ASSIGNMENT: key = value */ + + }, { + key: "parseAssignStatement", + value: function parseAssignStatement() { + return this.callNow(this.parseAssign, this.recordAssignStatement); + } + }, { + key: "recordAssignStatement", + value: function recordAssignStatement(kv) { + var target = this.ctx; + var finalKey = kv.key.pop(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = kv.key[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var kw = _step.value; + + if (kw in target && (!isTable(target[kw]) || target[kw][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); + } + + target = target[kw] = target[kw] || Table(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + if (finalKey in target) { + throw this.error(new TomlError("Can't redefine existing key")); + } // unbox our numbers + + + if (isInteger(kv.value) || isFloat(kv.value)) { + target[finalKey] = kv.value.valueOf(); + } else { + target[finalKey] = kv.value; + } + + return this.goto(this.parseWhitespaceToEOL); + } + /* ASSSIGNMENT expression, key = value possibly inside an inline table */ + + }, { + key: "parseAssign", + value: function parseAssign() { + return this.callNow(this.parseKeyword, this.recordAssignKeyword); + } + }, { + key: "recordAssignKeyword", + value: function recordAssignKeyword(key) { + if (this.state.resultTable) { + this.state.resultTable.push(key); + } else { + this.state.resultTable = [key]; + } + + return this.goto(this.parseAssignKeywordPreDot); + } + }, { + key: "parseAssignKeywordPreDot", + value: function parseAssignKeywordPreDot() { + if (this.char === CHAR_PERIOD) { + return this.next(this.parseAssignKeywordPostDot); + } else if (this.char !== CHAR_SP && this.char !== CTRL_I) { + return this.goto(this.parseAssignEqual); + } + } + }, { + key: "parseAssignKeywordPostDot", + value: function parseAssignKeywordPostDot() { + if (this.char !== CHAR_SP && this.char !== CTRL_I) { + return this.callNow(this.parseKeyword, this.recordAssignKeyword); + } + } + }, { + key: "parseAssignEqual", + value: function parseAssignEqual() { + if (this.char === CHAR_EQUALS) { + return this.next(this.parseAssignPreValue); + } else { + throw this.error(new TomlError('Invalid character, expected "="')); + } + } + }, { + key: "parseAssignPreValue", + value: function parseAssignPreValue() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseValue, this.recordAssignValue); + } + } + }, { + key: "recordAssignValue", + value: function recordAssignValue(value) { + return this.returnNow({ + key: this.state.resultTable, + value: value + }); + } + /* COMMENTS: #...eol */ + + }, { + key: "parseComment", + value: function parseComment() { + do { + if (this.char === Parser.END || this.char === CTRL_J) { + return this.return(); + } + } while (this.nextChar()); + } + /* TABLES AND LISTS, [foo] and [[foo]] */ + + }, { + key: "parseTableOrList", + value: function parseTableOrList() { + if (this.char === CHAR_LSQB) { + this.next(this.parseList); + } else { + return this.goto(this.parseTable); + } + } + /* TABLE [foo.bar.baz] */ + + }, { + key: "parseTable", + value: function parseTable() { + this.ctx = this.obj; + return this.goto(this.parseTableNext); + } + }, { + key: "parseTableNext", + value: function parseTableNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseKeyword, this.parseTableMore); + } + } + }, { + key: "parseTableMore", + value: function parseTableMore(keyword) { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === CHAR_RSQB) { + if (keyword in this.ctx && (!isTable(this.ctx[keyword]) || this.ctx[keyword][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); + } else { + this.ctx = this.ctx[keyword] = this.ctx[keyword] || Table(); + this.ctx[_declared] = true; + } + + return this.next(this.parseWhitespaceToEOL); + } else if (this.char === CHAR_PERIOD) { + if (!(keyword in this.ctx)) { + this.ctx = this.ctx[keyword] = Table(); + } else if (isTable(this.ctx[keyword])) { + this.ctx = this.ctx[keyword]; + } else if (isList(this.ctx[keyword])) { + this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1]; + } else { + throw this.error(new TomlError("Can't redefine existing key")); + } + + return this.next(this.parseTableNext); + } else { + throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')); + } + } + /* LIST [[a.b.c]] */ + + }, { + key: "parseList", + value: function parseList() { + this.ctx = this.obj; + return this.goto(this.parseListNext); + } + }, { + key: "parseListNext", + value: function parseListNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseKeyword, this.parseListMore); + } + } + }, { + key: "parseListMore", + value: function parseListMore(keyword) { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === CHAR_RSQB) { + if (!(keyword in this.ctx)) { + this.ctx[keyword] = List(); + } + + if (isInlineList(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline array")); + } else if (isList(this.ctx[keyword])) { + var next = Table(); + this.ctx[keyword].push(next); + this.ctx = next; + } else { + throw this.error(new TomlError("Can't redefine an existing key")); + } + + return this.next(this.parseListEnd); + } else if (this.char === CHAR_PERIOD) { + if (!(keyword in this.ctx)) { + this.ctx = this.ctx[keyword] = Table(); + } else if (isInlineList(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline array")); + } else if (isInlineTable(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline table")); + } else if (isList(this.ctx[keyword])) { + this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1]; + } else if (isTable(this.ctx[keyword])) { + this.ctx = this.ctx[keyword]; + } else { + throw this.error(new TomlError("Can't redefine an existing key")); + } + + return this.next(this.parseListNext); + } else { + throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')); + } + } + }, { + key: "parseListEnd", + value: function parseListEnd(keyword) { + if (this.char === CHAR_RSQB) { + return this.next(this.parseWhitespaceToEOL); + } else { + throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')); + } + } + /* VALUE string, number, boolean, inline list, inline object */ + + }, { + key: "parseValue", + value: function parseValue() { + if (this.char === Parser.END) { + throw this.error(new TomlError('Key without value')); + } else if (this.char === CHAR_QUOT) { + return this.next(this.parseDoubleString); + } + + if (this.char === CHAR_APOS) { + return this.next(this.parseSingleString); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + return this.goto(this.parseNumberSign); + } else if (this.char === CHAR_i) { + return this.next(this.parseInf); + } else if (this.char === CHAR_n) { + return this.next(this.parseNan); + } else if (isDigit(this.char)) { + return this.goto(this.parseNumberOrDateTime); + } else if (this.char === CHAR_t || this.char === CHAR_f) { + return this.goto(this.parseBoolean); + } else if (this.char === CHAR_LSQB) { + return this.call(this.parseInlineList, this.recordValue); + } else if (this.char === CHAR_LCUB) { + return this.call(this.parseInlineTable, this.recordValue); + } else { + throw this.error(new TomlError('Unexpected character, expecting string, number, datetime, boolean, inline array or inline table')); + } + } + }, { + key: "recordValue", + value: function recordValue(value) { + return this.returnNow(value); + } + }, { + key: "parseInf", + value: function parseInf() { + if (this.char === CHAR_n) { + return this.next(this.parseInf2); + } else { + throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')); + } + } + }, { + key: "parseInf2", + value: function parseInf2() { + if (this.char === CHAR_f) { + if (this.state.buf === '-') { + return this.return(-Infinity); + } else { + return this.return(Infinity); + } + } else { + throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')); + } + } + }, { + key: "parseNan", + value: function parseNan() { + if (this.char === CHAR_a) { + return this.next(this.parseNan2); + } else { + throw this.error(new TomlError('Unexpected character, expected "nan"')); + } + } + }, { + key: "parseNan2", + value: function parseNan2() { + if (this.char === CHAR_n) { + return this.return(NaN); + } else { + throw this.error(new TomlError('Unexpected character, expected "nan"')); + } + } + /* KEYS, barewords or basic, literal, or dotted */ + + }, { + key: "parseKeyword", + value: function parseKeyword() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseBasicString); + } else if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralString); + } else { + return this.goto(this.parseBareKey); + } + } + /* KEYS: barewords */ + + }, { + key: "parseBareKey", + value: function parseBareKey() { + do { + if (this.char === Parser.END) { + throw this.error(new TomlError('Key ended without value')); + } else if (isAlphaNumHyphen(this.char)) { + this.consume(); + } else if (this.state.buf.length === 0) { + throw this.error(new TomlError('Empty bare keys are not allowed')); + } else { + return this.returnNow(); + } + } while (this.nextChar()); + } + /* STRINGS, single quoted (literal) */ + + }, { + key: "parseSingleString", + value: function parseSingleString() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiStringMaybe); + } else { + return this.goto(this.parseLiteralString); + } + } + }, { + key: "parseLiteralString", + value: function parseLiteralString() { + do { + if (this.char === CHAR_APOS) { + return this.return(); + } else if (this.atEndOfLine()) { + throw this.error(new TomlError('Unterminated string')); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + }, { + key: "parseLiteralMultiStringMaybe", + value: function parseLiteralMultiStringMaybe() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiString); + } else { + return this.returnNow(); + } + } + }, { + key: "parseLiteralMultiString", + value: function parseLiteralMultiString() { + if (this.char === CTRL_M) { + return null; + } else if (this.char === CTRL_J) { + return this.next(this.parseLiteralMultiStringContent); + } else { + return this.goto(this.parseLiteralMultiStringContent); + } + } + }, { + key: "parseLiteralMultiStringContent", + value: function parseLiteralMultiStringContent() { + do { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiEnd); + } else if (this.char === Parser.END) { + throw this.error(new TomlError('Unterminated multi-line string')); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + }, { + key: "parseLiteralMultiEnd", + value: function parseLiteralMultiEnd() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiEnd2); + } else { + this.state.buf += "'"; + return this.goto(this.parseLiteralMultiStringContent); + } + } + }, { + key: "parseLiteralMultiEnd2", + value: function parseLiteralMultiEnd2() { + if (this.char === CHAR_APOS) { + return this.return(); + } else { + this.state.buf += "''"; + return this.goto(this.parseLiteralMultiStringContent); + } + } + /* STRINGS double quoted */ + + }, { + key: "parseDoubleString", + value: function parseDoubleString() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiStringMaybe); + } else { + return this.goto(this.parseBasicString); + } + } + }, { + key: "parseBasicString", + value: function parseBasicString() { + do { + if (this.char === CHAR_BSOL) { + return this.call(this.parseEscape, this.recordEscapeReplacement); + } else if (this.char === CHAR_QUOT) { + return this.return(); + } else if (this.atEndOfLine()) { + throw this.error(new TomlError('Unterminated string')); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + }, { + key: "recordEscapeReplacement", + value: function recordEscapeReplacement(replacement) { + this.state.buf += replacement; + return this.goto(this.parseBasicString); + } + }, { + key: "parseMultiStringMaybe", + value: function parseMultiStringMaybe() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiString); + } else { + return this.returnNow(); + } + } + }, { + key: "parseMultiString", + value: function parseMultiString() { + if (this.char === CTRL_M) { + return null; + } else if (this.char === CTRL_J) { + return this.next(this.parseMultiStringContent); + } else { + return this.goto(this.parseMultiStringContent); + } + } + }, { + key: "parseMultiStringContent", + value: function parseMultiStringContent() { + do { + if (this.char === CHAR_BSOL) { + return this.call(this.parseMultiEscape, this.recordMultiEscapeReplacement); + } else if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiEnd); + } else if (this.char === Parser.END) { + throw this.error(new TomlError('Unterminated multi-line string')); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + }, { + key: "errorControlCharInString", + value: function errorControlCharInString() { + var displayCode = '\\u00'; + + if (this.char < 16) { + displayCode += '0'; + } + + displayCode += this.char.toString(16); + return this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${displayCode} instead`)); + } + }, { + key: "recordMultiEscapeReplacement", + value: function recordMultiEscapeReplacement(replacement) { + this.state.buf += replacement; + return this.goto(this.parseMultiStringContent); + } + }, { + key: "parseMultiEnd", + value: function parseMultiEnd() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiEnd2); + } else { + this.state.buf += '"'; + return this.goto(this.parseMultiStringContent); + } + } + }, { + key: "parseMultiEnd2", + value: function parseMultiEnd2() { + if (this.char === CHAR_QUOT) { + return this.return(); + } else { + this.state.buf += '""'; + return this.goto(this.parseMultiStringContent); + } + } + }, { + key: "parseMultiEscape", + value: function parseMultiEscape() { + if (this.char === CTRL_M || this.char === CTRL_J) { + return this.next(this.parseMultiTrim); + } else if (this.char === CHAR_SP || this.char === CTRL_I) { + return this.next(this.parsePreMultiTrim); + } else { + return this.goto(this.parseEscape); + } + } + }, { + key: "parsePreMultiTrim", + value: function parsePreMultiTrim() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === CTRL_M || this.char === CTRL_J) { + return this.next(this.parseMultiTrim); + } else { + throw this.error(new TomlError("Can't escape whitespace")); + } + } + }, { + key: "parseMultiTrim", + value: function parseMultiTrim() { + // explicitly whitespace here, END should follow the same path as chars + if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + return null; + } else { + return this.returnNow(); + } + } + }, { + key: "parseEscape", + value: function parseEscape() { + if (this.char in escapes) { + return this.return(escapes[this.char]); + } else if (this.char === CHAR_u) { + return this.call(this.parseSmallUnicode, this.parseUnicodeReturn); + } else if (this.char === CHAR_U) { + return this.call(this.parseLargeUnicode, this.parseUnicodeReturn); + } else { + throw this.error(new TomlError('Unknown escape character: ' + this.char)); + } + } + }, { + key: "parseUnicodeReturn", + value: function parseUnicodeReturn(char) { + try { + var codePoint = parseInt(char, 16); + + if (codePoint >= SURROGATE_FIRST && codePoint <= SURROGATE_LAST) { + throw this.error(new TomlError('Invalid unicode, character in range 0xD800 - 0xDFFF is reserved')); + } + + return this.returnNow(String.fromCodePoint(codePoint)); + } catch (ex) { + throw this.error(TomlError.wrap(ex)); + } + } + }, { + key: "parseSmallUnicode", + value: function parseSmallUnicode() { + if (!isHexit(this.char)) { + throw this.error(new TomlError('Invalid character in unicode sequence, expected hex')); + } else { + this.consume(); + if (this.state.buf.length >= 4) return this.return(); + } + } + }, { + key: "parseLargeUnicode", + value: function parseLargeUnicode() { + if (!isHexit(this.char)) { + throw this.error(new TomlError('Invalid character in unicode sequence, expected hex')); + } else { + this.consume(); + if (this.state.buf.length >= 8) return this.return(); + } + } + /* NUMBERS */ + + }, { + key: "parseNumberSign", + value: function parseNumberSign() { + this.consume(); + return this.next(this.parseMaybeSignedInfOrNan); + } + }, { + key: "parseMaybeSignedInfOrNan", + value: function parseMaybeSignedInfOrNan() { + if (this.char === CHAR_i) { + return this.next(this.parseInf); + } else if (this.char === CHAR_n) { + return this.next(this.parseNan); + } else { + return this.callNow(this.parseNoUnder, this.parseNumberInteger); + } + } + }, { + key: "parseNumberInteger", + value: function parseNumberInteger() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); + } else if (this.char === CHAR_PERIOD) { + this.consume(); + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else { + var result = Integer(this.state.buf); + /* istanbul ignore if */ + + if (result.isNaN()) { + throw this.error(new TomlError('Invalid number')); + } else { + return this.returnNow(result); + } + } + } + }, { + key: "parseNoUnder", + value: function parseNoUnder() { + if (this.char === CHAR_LOWBAR) { + throw this.error(new TomlError('Unexpected character, expected digit, exponent marker(e) or whitespace')); + } else if (this.atEndOfWord() || this.char === CHAR_E || this.char === CHAR_e) { + throw this.error(new TomlError('Incomplete number')); + } + + return this.returnNow(); + } + }, { + key: "parseNumberFloat", + value: function parseNumberFloat() { + if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); + } else { + return this.returnNow(Float(this.state.buf)); + } + } + }, { + key: "parseNumberExponentSign", + value: function parseNumberExponentSign() { + if (isDigit(this.char)) { + return this.goto(this.parseNumberExponent); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.call(this.parseNoUnder, this.parseNumberExponent); + } else { + throw this.error(new TomlError('Unexpected character, expected -, + or digit')); + } + } + }, { + key: "parseNumberExponent", + value: function parseNumberExponent() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else { + return this.returnNow(Float(this.state.buf)); + } + } + /* NUMBERS or DATETIMES */ + + }, { + key: "parseNumberOrDateTime", + value: function parseNumberOrDateTime() { + if (this.char === CHAR_0) { + this.consume(); + return this.next(this.parseNumberBaseOrDateTime); + } else { + return this.goto(this.parseNumberOrDateTimeOnly); + } + } + }, { + key: "parseNumberOrDateTimeOnly", + value: function parseNumberOrDateTimeOnly() { + // note, if two zeros are in a row then it MUST be a date + if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder, this.parseNumberInteger); + } else if (isDigit(this.char)) { + this.consume(); + if (this.state.buf.length > 4) this.next(this.parseNumberInteger); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); + } else if (this.char === CHAR_PERIOD) { + this.consume(); + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else if (this.char === CHAR_HYPHEN) { + return this.goto(this.parseDateTime); + } else if (this.char === CHAR_COLON) { + return this.goto(this.parseOnlyTimeHour); + } else { + return this.returnNow(Integer(this.state.buf)); + } + } + }, { + key: "parseDateTimeOnly", + value: function parseDateTimeOnly() { + if (this.state.buf.length < 4) { + if (isDigit(this.char)) { + return this.consume(); + } else if (this.char === CHAR_COLON) { + return this.goto(this.parseOnlyTimeHour); + } else { + throw this.error(new TomlError('Expected digit while parsing year part of a date')); + } + } else { + if (this.char === CHAR_HYPHEN) { + return this.goto(this.parseDateTime); + } else { + throw this.error(new TomlError('Expected hyphen (-) while parsing year part of date')); + } + } + } + }, { + key: "parseNumberBaseOrDateTime", + value: function parseNumberBaseOrDateTime() { + if (this.char === CHAR_b) { + this.consume(); + return this.call(this.parseNoUnder, this.parseIntegerBin); + } else if (this.char === CHAR_o) { + this.consume(); + return this.call(this.parseNoUnder, this.parseIntegerOct); + } else if (this.char === CHAR_x) { + this.consume(); + return this.call(this.parseNoUnder, this.parseIntegerHex); + } else if (this.char === CHAR_PERIOD) { + return this.goto(this.parseNumberInteger); + } else if (isDigit(this.char)) { + return this.goto(this.parseDateTimeOnly); + } else { + return this.returnNow(Integer(this.state.buf)); + } + } + }, { + key: "parseIntegerHex", + value: function parseIntegerHex() { + if (isHexit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else { + var result = Integer(this.state.buf); + /* istanbul ignore if */ + + if (result.isNaN()) { + throw this.error(new TomlError('Invalid number')); + } else { + return this.returnNow(result); + } + } + } + }, { + key: "parseIntegerOct", + value: function parseIntegerOct() { + if (isOctit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else { + var result = Integer(this.state.buf); + /* istanbul ignore if */ + + if (result.isNaN()) { + throw this.error(new TomlError('Invalid number')); + } else { + return this.returnNow(result); + } + } + } + }, { + key: "parseIntegerBin", + value: function parseIntegerBin() { + if (isBit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else { + var result = Integer(this.state.buf); + /* istanbul ignore if */ + + if (result.isNaN()) { + throw this.error(new TomlError('Invalid number')); + } else { + return this.returnNow(result); + } + } + } + /* DATETIME */ + + }, { + key: "parseDateTime", + value: function parseDateTime() { + // we enter here having just consumed the year and about to consume the hyphen + if (this.state.buf.length < 4) { + throw this.error(new TomlError('Years less than 1000 must be zero padded to four characters')); + } + + this.state.result = this.state.buf; + this.state.buf = ''; + return this.next(this.parseDateMonth); + } + }, { + key: "parseDateMonth", + value: function parseDateMonth() { + if (this.char === CHAR_HYPHEN) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError('Months less than 10 must be zero padded to two characters')); + } + + this.state.result += '-' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseDateDay); + } else if (isDigit(this.char)) { + this.consume(); + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseDateDay", + value: function parseDateDay() { + if (this.char === CHAR_T || this.char === CHAR_SP) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError('Days less than 10 must be zero padded to two characters')); + } + + this.state.result += '-' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseStartTimeHour); + } else if (this.atEndOfWord()) { + return this.return(createDate(this.state.result + '-' + this.state.buf)); + } else if (isDigit(this.char)) { + this.consume(); + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseStartTimeHour", + value: function parseStartTimeHour() { + if (this.atEndOfWord()) { + return this.returnNow(createDate(this.state.result)); + } else { + return this.goto(this.parseTimeHour); + } + } + }, { + key: "parseTimeHour", + value: function parseTimeHour() { + if (this.char === CHAR_COLON) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError('Hours less than 10 must be zero padded to two characters')); + } + + this.state.result += 'T' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseTimeMin); + } else if (isDigit(this.char)) { + this.consume(); + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseTimeMin", + value: function parseTimeMin() { + if (this.state.buf.length < 2 && isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { + this.state.result += ':' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseTimeSec); + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseTimeSec", + value: function parseTimeSec() { + if (isDigit(this.char)) { + this.consume(); + + if (this.state.buf.length === 2) { + this.state.result += ':' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseTimeZoneOrFraction); + } + } else { + throw this.error(new TomlError('Incomplete datetime')); + } + } + }, { + key: "parseOnlyTimeHour", + value: function parseOnlyTimeHour() { + /* istanbul ignore else */ + if (this.char === CHAR_COLON) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError('Hours less than 10 must be zero padded to two characters')); + } + + this.state.result = this.state.buf; + this.state.buf = ''; + return this.next(this.parseOnlyTimeMin); + } else { + throw this.error(new TomlError('Incomplete time')); + } + } + }, { + key: "parseOnlyTimeMin", + value: function parseOnlyTimeMin() { + if (this.state.buf.length < 2 && isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { + this.state.result += ':' + this.state.buf; + this.state.buf = ''; + return this.next(this.parseOnlyTimeSec); + } else { + throw this.error(new TomlError('Incomplete time')); + } + } + }, { + key: "parseOnlyTimeSec", + value: function parseOnlyTimeSec() { + if (isDigit(this.char)) { + this.consume(); + + if (this.state.buf.length === 2) { + return this.next(this.parseOnlyTimeFractionMaybe); + } + } else { + throw this.error(new TomlError('Incomplete time')); + } + } + }, { + key: "parseOnlyTimeFractionMaybe", + value: function parseOnlyTimeFractionMaybe() { + this.state.result += ':' + this.state.buf; + + if (this.char === CHAR_PERIOD) { + this.state.buf = ''; + this.next(this.parseOnlyTimeFraction); + } else { + return this.return(createTime(this.state.result)); + } + } + }, { + key: "parseOnlyTimeFraction", + value: function parseOnlyTimeFraction() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.atEndOfWord()) { + if (this.state.buf.length === 0) throw this.error(new TomlError('Expected digit in milliseconds')); + return this.returnNow(createTime(this.state.result + '.' + this.state.buf)); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')); + } + } + }, { + key: "parseTimeZoneOrFraction", + value: function parseTimeZoneOrFraction() { + if (this.char === CHAR_PERIOD) { + this.consume(); + this.next(this.parseDateTimeFraction); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.next(this.parseTimeZoneHour); + } else if (this.char === CHAR_Z) { + this.consume(); + return this.return(createDatetime(this.state.result + this.state.buf)); + } else if (this.atEndOfWord()) { + return this.returnNow(createDatetimeFloat(this.state.result + this.state.buf)); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')); + } + } + }, { + key: "parseDateTimeFraction", + value: function parseDateTimeFraction() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 1) { + throw this.error(new TomlError('Expected digit in milliseconds')); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.next(this.parseTimeZoneHour); + } else if (this.char === CHAR_Z) { + this.consume(); + return this.return(createDatetime(this.state.result + this.state.buf)); + } else if (this.atEndOfWord()) { + return this.returnNow(createDatetimeFloat(this.state.result + this.state.buf)); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')); + } + } + }, { + key: "parseTimeZoneHour", + value: function parseTimeZoneHour() { + if (isDigit(this.char)) { + this.consume(); // FIXME: No more regexps + + if (/\d\d$/.test(this.state.buf)) return this.next(this.parseTimeZoneSep); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected digit')); + } + } + }, { + key: "parseTimeZoneSep", + value: function parseTimeZoneSep() { + if (this.char === CHAR_COLON) { + this.consume(); + this.next(this.parseTimeZoneMin); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected colon')); + } + } + }, { + key: "parseTimeZoneMin", + value: function parseTimeZoneMin() { + if (isDigit(this.char)) { + this.consume(); + if (/\d\d$/.test(this.state.buf)) return this.return(createDatetime(this.state.result + this.state.buf)); + } else { + throw this.error(new TomlError('Unexpected character in datetime, expected digit')); + } + } + /* BOOLEAN */ + + }, { + key: "parseBoolean", + value: function parseBoolean() { + /* istanbul ignore else */ + if (this.char === CHAR_t) { + this.consume(); + return this.next(this.parseTrue_r); + } else if (this.char === CHAR_f) { + this.consume(); + return this.next(this.parseFalse_a); + } + } + }, { + key: "parseTrue_r", + value: function parseTrue_r() { + if (this.char === CHAR_r) { + this.consume(); + return this.next(this.parseTrue_u); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseTrue_u", + value: function parseTrue_u() { + if (this.char === CHAR_u) { + this.consume(); + return this.next(this.parseTrue_e); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseTrue_e", + value: function parseTrue_e() { + if (this.char === CHAR_e) { + return this.return(true); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseFalse_a", + value: function parseFalse_a() { + if (this.char === CHAR_a) { + this.consume(); + return this.next(this.parseFalse_l); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseFalse_l", + value: function parseFalse_l() { + if (this.char === CHAR_l) { + this.consume(); + return this.next(this.parseFalse_s); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseFalse_s", + value: function parseFalse_s() { + if (this.char === CHAR_s) { + this.consume(); + return this.next(this.parseFalse_e); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + }, { + key: "parseFalse_e", + value: function parseFalse_e() { + if (this.char === CHAR_e) { + return this.return(false); + } else { + throw this.error(new TomlError('Invalid boolean, expected true or false')); + } + } + /* INLINE LISTS */ + + }, { + key: "parseInlineList", + value: function parseInlineList() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { + return null; + } else if (this.char === Parser.END) { + throw this.error(new TomlError('Unterminated inline array')); + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CHAR_RSQB) { + return this.return(this.state.resultArr || InlineList()); + } else { + return this.callNow(this.parseValue, this.recordInlineListValue); + } + } + }, { + key: "recordInlineListValue", + value: function recordInlineListValue(value) { + if (this.state.resultArr) { + var listType = this.state.resultArr[_contentType]; + var valueType = tomlType(value); + + if (listType !== valueType) { + throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${listType} and ${valueType}`)); + } + } else { + this.state.resultArr = InlineList(tomlType(value)); + } + + if (isFloat(value) || isInteger(value)) { + // unbox now that we've verified they're ok + this.state.resultArr.push(value.valueOf()); + } else { + this.state.resultArr.push(value); + } + + return this.goto(this.parseInlineListNext); + } + }, { + key: "parseInlineListNext", + value: function parseInlineListNext() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { + return null; + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CHAR_COMMA) { + return this.next(this.parseInlineList); + } else if (this.char === CHAR_RSQB) { + return this.goto(this.parseInlineList); + } else { + throw this.error(new TomlError('Invalid character, expected whitespace, comma (,) or close bracket (])')); + } + } + /* INLINE TABLE */ + + }, { + key: "parseInlineTable", + value: function parseInlineTable() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { + throw this.error(new TomlError('Unterminated inline array')); + } else if (this.char === CHAR_RCUB) { + return this.return(this.state.resultTable || InlineTable()); + } else { + if (!this.state.resultTable) this.state.resultTable = InlineTable(); + return this.callNow(this.parseAssign, this.recordInlineTableValue); + } + } + }, { + key: "recordInlineTableValue", + value: function recordInlineTableValue(kv) { + var target = this.state.resultTable; + var finalKey = kv.key.pop(); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = kv.key[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var kw = _step2.value; + + if (kw in target && (!isTable(target[kw]) || target[kw][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); + } + + target = target[kw] = target[kw] || Table(); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + if (finalKey in target) { + throw this.error(new TomlError("Can't redefine existing key")); + } + + if (isInteger(kv.value) || isFloat(kv.value)) { + target[finalKey] = kv.value.valueOf(); + } else { + target[finalKey] = kv.value; + } + + return this.goto(this.parseInlineTableNext); + } + }, { + key: "parseInlineTableNext", + value: function parseInlineTableNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { + throw this.error(new TomlError('Unterminated inline array')); + } else if (this.char === CHAR_COMMA) { + return this.next(this.parseInlineTable); + } else if (this.char === CHAR_RCUB) { + return this.goto(this.parseInlineTable); + } else { + throw this.error(new TomlError('Invalid character, expected whitespace, comma (,) or close bracket (])')); + } + } + }]); + + return TOMLParser; + }(Parser); + + return TOMLParser; + } +}); + +var parsePrettyError = prettyError; + +function prettyError(err, buf) { + /* istanbul ignore if */ + if (err.pos == null || err.line == null) return err; + var msg = err.message; + msg += ` at row ${err.line + 1}, col ${err.col + 1}, pos ${err.pos}:\n`; + /* istanbul ignore else */ + + if (buf && buf.split) { + var lines = buf.split(/\n/); + var lineNumWidth = String(Math.min(lines.length, err.line + 3)).length; + var linePadding = ' '; + + while (linePadding.length < lineNumWidth) { + linePadding += ' '; + } + + for (var ii = Math.max(0, err.line - 1); ii < Math.min(lines.length, err.line + 2); ++ii) { + var lineNum = String(ii + 1); + if (lineNum.length < lineNumWidth) lineNum = ' ' + lineNum; + + if (err.line === ii) { + msg += lineNum + '> ' + lines[ii] + '\n'; + msg += linePadding + ' '; + + for (var hh = 0; hh < err.col; ++hh) { + msg += ' '; + } + + msg += '^\n'; + } else { + msg += lineNum + ': ' + lines[ii] + '\n'; + } + } + } + + err.message = msg + '\n'; + return err; +} + +var parseString_1 = parseString; + +function parseString(str) { + if (commonjsGlobal.Buffer && commonjsGlobal.Buffer.isBuffer(str)) { + str = str.toString('utf8'); + } + + var parser = new tomlParser(); + + try { + parser.parse(str); + return parser.finish(); + } catch (ex) { + throw parsePrettyError(ex, str); + } +} + +var loadToml = function loadToml(filePath, content) { + try { + return parseString_1(content); + } catch (error) { + error.message = `TOML Error in ${filePath}:\n${error.message}`; + throw error; + } +}; + +var resolveConfig_1 = createCommonjsModule(function (module) { + "use strict"; + + var getExplorerMemoized = mem(function (opts) { + var explorer = thirdParty$1.cosmiconfig("prettier", { + cache: opts.cache, + transform: function transform(result) { + if (result && result.config) { + if (typeof result.config !== "object") { + throw new Error(`Config is only allowed to be an object, ` + `but received ${typeof result.config} in "${result.filepath}"`); + } + + delete result.config.$schema; + } + + return result; + }, + searchPlaces: ["package.json", ".prettierrc", ".prettierrc.json", ".prettierrc.yaml", ".prettierrc.yml", ".prettierrc.js", "prettier.config.js", ".prettierrc.toml"], + loaders: { + ".toml": loadToml + } + }); + + var _load = opts.sync ? explorer.loadSync : explorer.load; + + var search = opts.sync ? explorer.searchSync : explorer.search; + return { + // cosmiconfig v4 interface + load: function load(searchPath, configPath) { + return configPath ? _load(configPath) : search(searchPath); + } + }; + }); + /** @param {{ cache: boolean, sync: boolean }} opts */ + + function getLoadFunction(opts) { + // Normalize opts before passing to a memoized function + opts = Object.assign({ + sync: false, + cache: false + }, opts); + return getExplorerMemoized(opts).load; + } + + function _resolveConfig(filePath, opts, sync) { + opts = Object.assign({ + useCache: true + }, opts); + var loadOpts = { + cache: !!opts.useCache, + sync: !!sync, + editorconfig: !!opts.editorconfig + }; + var load = getLoadFunction(loadOpts); + var loadEditorConfig = resolveConfigEditorconfig.getLoadFunction(loadOpts); + var arr = [load, loadEditorConfig].map(function (l) { + return l(filePath, opts.config); + }); + + var unwrapAndMerge = function unwrapAndMerge(arr) { + var result = arr[0]; + var editorConfigured = arr[1]; + var merged = Object.assign({}, editorConfigured, mergeOverrides(Object.assign({}, result), filePath)); + ["plugins", "pluginSearchDirs"].forEach(function (optionName) { + if (Array.isArray(merged[optionName])) { + merged[optionName] = merged[optionName].map(function (value) { + return typeof value === "string" && value.startsWith(".") // relative path + ? path.resolve(path.dirname(result.filepath), value) : value; + }); + } + }); + + if (!result && !editorConfigured) { + return null; + } + + return merged; + }; + + if (loadOpts.sync) { + return unwrapAndMerge(arr); + } + + return Promise.all(arr).then(unwrapAndMerge); + } + + var resolveConfig = function resolveConfig(filePath, opts) { + return _resolveConfig(filePath, opts, false); + }; + + resolveConfig.sync = function (filePath, opts) { + return _resolveConfig(filePath, opts, true); + }; + + function clearCache() { + mem.clear(getExplorerMemoized); + resolveConfigEditorconfig.clearCache(); + } + + function resolveConfigFile(filePath) { + var load = getLoadFunction({ + sync: false + }); + return load(filePath).then(function (result) { + return result ? result.filepath : null; + }); + } + + resolveConfigFile.sync = function (filePath) { + var load = getLoadFunction({ + sync: true + }); + var result = load(filePath); + return result ? result.filepath : null; + }; + + function mergeOverrides(configResult, filePath) { + var options = Object.assign({}, configResult.config); + + if (filePath && options.overrides) { + var relativeFilePath = path.relative(path.dirname(configResult.filepath), filePath); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = options.overrides[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var override = _step.value; + + if (pathMatchesGlobs(relativeFilePath, override.files, override.excludeFiles)) { + Object.assign(options, override.options); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + + delete options.overrides; + return options; + } // Based on eslint: https://github.com/eslint/eslint/blob/master/lib/config/config-ops.js + + + function pathMatchesGlobs(filePath, patterns, excludedPatterns) { + var patternList = [].concat(patterns); + var excludedPatternList = [].concat(excludedPatterns || []); + var opts = { + matchBase: true + }; + return patternList.some(function (pattern) { + return minimatch_1(filePath, pattern, opts); + }) && !excludedPatternList.some(function (excludedPattern) { + return minimatch_1(filePath, excludedPattern, opts); + }); + } + + module.exports = { + resolveConfig, + resolveConfigFile, + clearCache + }; +}); + +var version = require$$0.version; +var getSupportInfo = support.getSupportInfo; // Luckily `opts` is always the 2nd argument + +function _withPlugins(fn) { + return function () { + var args = Array.from(arguments); + var opts = args[1] || {}; + args[1] = Object.assign({}, opts, { + plugins: loadPlugins_1(opts.plugins, opts.pluginSearchDirs) + }); + return fn.apply(null, args); + }; +} + +function withPlugins(fn) { + var resultingFn = _withPlugins(fn); + + if (fn.sync) { + resultingFn.sync = _withPlugins(fn.sync); + } + + return resultingFn; +} + +var formatWithCursor = withPlugins(core.formatWithCursor); +var src = { + formatWithCursor, + + format(text, opts) { + return formatWithCursor(text, opts).formatted; + }, + + check: function check(text, opts) { + var formatted = formatWithCursor(text, opts).formatted; + return formatted === text; + }, + doc, + resolveConfig: resolveConfig_1.resolveConfig, + resolveConfigFile: resolveConfig_1.resolveConfigFile, + clearConfigCache: resolveConfig_1.clearCache, + getFileInfo: withPlugins(getFileInfo_1), + getSupportInfo: withPlugins(getSupportInfo), + version, + util: utilShared, + + /* istanbul ignore next */ + __debug: { + parse: withPlugins(core.parse), + formatAST: withPlugins(core.formatAST), + formatDoc: withPlugins(core.formatDoc), + printToDoc: withPlugins(core.printToDoc), + printDocToString: withPlugins(core.printDocToString) + } +}; + +var prettier = src; + +module.exports = prettier; diff --git a/node_modules/prettier/package.json b/node_modules/prettier/package.json new file mode 100644 index 0000000..b4839c1 --- /dev/null +++ b/node_modules/prettier/package.json @@ -0,0 +1,59 @@ +{ + "_from": "prettier", + "_id": "prettier@1.15.2", + "_inBundle": false, + "_integrity": "sha512-YgPLFFA0CdKL4Eg2IHtUSjzj/BWgszDHiNQAe0VAIBse34148whfdzLagRL+QiKS+YfK5ftB6X4v/MBw8yCoug==", + "_location": "/prettier", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "prettier", + "name": "prettier", + "escapedName": "prettier", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#DEV:/", + "#USER" + ], + "_resolved": "https://registry.npmjs.org/prettier/-/prettier-1.15.2.tgz", + "_shasum": "d31abe22afa4351efa14c7f8b94b58bb7452205e", + "_spec": "prettier", + "_where": "C:\\DEV\\opex", + "author": { + "name": "James Long" + }, + "bin": { + "prettier": "./bin-prettier.js" + }, + "bugs": { + "url": "https://github.com/prettier/prettier/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Prettier is an opinionated code formatter", + "engines": { + "node": ">=4" + }, + "files": [ + "*.js" + ], + "homepage": "https://prettier.io", + "license": "MIT", + "main": "./index.js", + "name": "prettier", + "repository": { + "type": "git", + "url": "git+https://github.com/prettier/prettier.git" + }, + "resolutions": { + "@babel/code-frame": "7.0.0-beta.46" + }, + "scripts": { + "prepublishOnly": "node -e \"assert.equal(require('.').version, require('..').version)\"" + }, + "version": "1.15.2" +} diff --git a/node_modules/prettier/parser-angular.js b/node_modules/prettier/parser-angular.js new file mode 100644 index 0000000..39d5f55 --- /dev/null +++ b/node_modules/prettier/parser-angular.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.angular=t())}(this,function(){"use strict";var e=function(e){return e.length>0?e[e.length-1]:null};var t={locStart:function e(t,n){return!(n=n||{}).ignoreDecorators&&t.declaration&&t.declaration.decorators&&t.declaration.decorators.length>0?e(t.declaration.decorators[0]):!n.ignoreDecorators&&t.decorators&&t.decorators.length>0?e(t.decorators[0]):t.__location?t.__location.startOffset:t.range?t.range[0]:"number"==typeof t.start?t.start:t.loc?t.loc.start:null},locEnd:function t(n){var i=n.nodes&&e(n.nodes);if(i&&n.source&&!n.source.end&&(n=i),n.__location)return n.__location.endOffset;var r=n.range?n.range[1]:"number"==typeof n.end?n.end:null;return n.typeAnnotation?Math.max(r,t(n.typeAnnotation)):n.loc&&!r?n.loc.end:r}};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e,t){return e(t={exports:{}},t.exports),t.exports}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;nthis.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length?null:n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();t.__esModule=!0,t.default=r});n(d);var y=i(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.Context=function e(t){s(this,e),this.text=t,this.locator=new n(this.text)};var n=function(){function e(t){s(this,e),this._lineAndColumn=new d.default(t)}return o(e,[{key:"locationForIndex",value:function(e){var t=this._lineAndColumn.locationForIndex(e);return{line:t.line+1,column:t.column}}}]),e}()});n(y);var x=function e(t,n,i,r){s(this,e),this.input=n,this.errLocation=i,this.ctxLocation=r,this.message="Parser Error: ".concat(t," ").concat(i," [").concat(n,"] in ").concat(r)},g=function e(t,n){s(this,e),this.start=t,this.end=n},k=function(){function e(t){s(this,e),this.span=t}return o(e,[{key:"visit",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return null}},{key:"toString",value:function(){return"AST"}}]),e}(),m=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,e))).prefix=n,a.uninterpretedExpression=i,a.location=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitQuote(this,t)}},{key:"toString",value:function(){return"Quote"}}]),t}(),w=function(e){function t(){return s(this,t),h(this,l(t).apply(this,arguments))}return u(t,k),o(t,[{key:"visit",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]}}]),t}(),C=function(e){function t(){return s(this,t),h(this,l(t).apply(this,arguments))}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitImplicitReceiver(this,t)}}]),t}(),P=function(e){function t(e,n){var i;return s(this,t),(i=h(this,l(t).call(this,e))).expressions=n,i}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitChain(this,t)}}]),t}(),b=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,e))).condition=n,a.trueExp=i,a.falseExp=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitConditional(this,t)}}]),t}(),E=function(e){function t(e,n,i){var r;return s(this,t),(r=h(this,l(t).call(this,e))).receiver=n,r.name=i,r}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitPropertyRead(this,t)}}]),t}(),A=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,e))).receiver=n,a.name=i,a.value=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitPropertyWrite(this,t)}}]),t}(),S=function(e){function t(e,n,i){var r;return s(this,t),(r=h(this,l(t).call(this,e))).receiver=n,r.name=i,r}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitSafePropertyRead(this,t)}}]),t}(),N=function(e){function t(e,n,i){var r;return s(this,t),(r=h(this,l(t).call(this,e))).obj=n,r.key=i,r}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitKeyedRead(this,t)}}]),t}(),O=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,e))).obj=n,a.key=i,a.value=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitKeyedWrite(this,t)}}]),t}(),I=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,e))).exp=n,a.name=i,a.args=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitPipe(this,t)}}]),t}(),L=function(e){function t(e,n){var i;return s(this,t),(i=h(this,l(t).call(this,e))).value=n,i}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitLiteralPrimitive(this,t)}}]),t}(),M=function(e){function t(e,n){var i;return s(this,t),(i=h(this,l(t).call(this,e))).expressions=n,i}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitLiteralArray(this,t)}}]),t}(),_=function(e){function t(e,n,i){var r;return s(this,t),(r=h(this,l(t).call(this,e))).keys=n,r.values=i,r}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitLiteralMap(this,t)}}]),t}(),K=function(e){function t(e,n,i){var r;return s(this,t),(r=h(this,l(t).call(this,e))).strings=n,r.expressions=i,r}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitInterpolation(this,t)}}]),t}(),T=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,e))).operation=n,a.left=i,a.right=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitBinary(this,t)}}]),t}(),B=function(e){function t(e,n){var i;return s(this,t),(i=h(this,l(t).call(this,e))).expression=n,i}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitPrefixNot(this,t)}}]),t}(),R=function(e){function t(e,n){var i;return s(this,t),(i=h(this,l(t).call(this,e))).expression=n,i}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitNonNullAssert(this,t)}}]),t}(),j=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,e))).receiver=n,a.name=i,a.args=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitMethodCall(this,t)}}]),t}(),F=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,e))).receiver=n,a.name=i,a.args=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitSafeMethodCall(this,t)}}]),t}(),V=function(e){function t(e,n,i){var r;return s(this,t),(r=h(this,l(t).call(this,e))).target=n,r.args=i,r}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.visitFunctionCall(this,t)}}]),t}(),G=function(e){function t(e,n,i,r){var a;return s(this,t),(a=h(this,l(t).call(this,new g(0,null==n?0:n.length)))).ast=e,a.source=n,a.location=i,a.errors=r,a}return u(t,k),o(t,[{key:"visit",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.ast.visit(e,t)}},{key:"toString",value:function(){return"".concat(this.source," in ").concat(this.location)}}]),t}(),W=function e(t,n,i,r,a){s(this,e),this.span=t,this.key=n,this.keyIsVar=i,this.name=r,this.expression=a},U=function(){function e(){s(this,e)}return o(e,[{key:"visitBinary",value:function(e,t){}},{key:"visitChain",value:function(e,t){}},{key:"visitConditional",value:function(e,t){}},{key:"visitFunctionCall",value:function(e,t){}},{key:"visitImplicitReceiver",value:function(e,t){}},{key:"visitInterpolation",value:function(e,t){}},{key:"visitKeyedRead",value:function(e,t){}},{key:"visitKeyedWrite",value:function(e,t){}},{key:"visitLiteralArray",value:function(e,t){}},{key:"visitLiteralMap",value:function(e,t){}},{key:"visitLiteralPrimitive",value:function(e,t){}},{key:"visitMethodCall",value:function(e,t){}},{key:"visitPipe",value:function(e,t){}},{key:"visitPrefixNot",value:function(e,t){}},{key:"visitNonNullAssert",value:function(e,t){}},{key:"visitPropertyRead",value:function(e,t){}},{key:"visitPropertyWrite",value:function(e,t){}},{key:"visitQuote",value:function(e,t){}},{key:"visitSafeMethodCall",value:function(e,t){}},{key:"visitSafePropertyRead",value:function(e,t){}}]),e}(),Q=function(){function e(){s(this,e)}return o(e,[{key:"visitBinary",value:function(e,t){return e.left.visit(this),e.right.visit(this),null}},{key:"visitChain",value:function(e,t){return this.visitAll(e.expressions,t)}},{key:"visitConditional",value:function(e,t){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null}},{key:"visitPipe",value:function(e,t){return e.exp.visit(this),this.visitAll(e.args,t),null}},{key:"visitFunctionCall",value:function(e,t){return e.target.visit(this),this.visitAll(e.args,t),null}},{key:"visitImplicitReceiver",value:function(e,t){return null}},{key:"visitInterpolation",value:function(e,t){return this.visitAll(e.expressions,t)}},{key:"visitKeyedRead",value:function(e,t){return e.obj.visit(this),e.key.visit(this),null}},{key:"visitKeyedWrite",value:function(e,t){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null}},{key:"visitLiteralArray",value:function(e,t){return this.visitAll(e.expressions,t)}},{key:"visitLiteralMap",value:function(e,t){return this.visitAll(e.values,t)}},{key:"visitLiteralPrimitive",value:function(e,t){return null}},{key:"visitMethodCall",value:function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)}},{key:"visitPrefixNot",value:function(e,t){return e.expression.visit(this),null}},{key:"visitNonNullAssert",value:function(e,t){return e.expression.visit(this),null}},{key:"visitPropertyRead",value:function(e,t){return e.receiver.visit(this),null}},{key:"visitPropertyWrite",value:function(e,t){return e.receiver.visit(this),e.value.visit(this),null}},{key:"visitSafePropertyRead",value:function(e,t){return e.receiver.visit(this),null}},{key:"visitSafeMethodCall",value:function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)}},{key:"visitAll",value:function(e,t){var n=this;return e.forEach(function(e){return e.visit(n,t)}),null}},{key:"visitQuote",value:function(e,t){return null}}]),e}(),z=function(){function e(){s(this,e)}return o(e,[{key:"visitImplicitReceiver",value:function(e,t){return e}},{key:"visitInterpolation",value:function(e,t){return new K(e.span,e.strings,this.visitAll(e.expressions))}},{key:"visitLiteralPrimitive",value:function(e,t){return new L(e.span,e.value)}},{key:"visitPropertyRead",value:function(e,t){return new E(e.span,e.receiver.visit(this),e.name)}},{key:"visitPropertyWrite",value:function(e,t){return new A(e.span,e.receiver.visit(this),e.name,e.value.visit(this))}},{key:"visitSafePropertyRead",value:function(e,t){return new S(e.span,e.receiver.visit(this),e.name)}},{key:"visitMethodCall",value:function(e,t){return new j(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))}},{key:"visitSafeMethodCall",value:function(e,t){return new F(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))}},{key:"visitFunctionCall",value:function(e,t){return new V(e.span,e.target.visit(this),this.visitAll(e.args))}},{key:"visitLiteralArray",value:function(e,t){return new M(e.span,this.visitAll(e.expressions))}},{key:"visitLiteralMap",value:function(e,t){return new _(e.span,e.keys,this.visitAll(e.values))}},{key:"visitBinary",value:function(e,t){return new T(e.span,e.operation,e.left.visit(this),e.right.visit(this))}},{key:"visitPrefixNot",value:function(e,t){return new B(e.span,e.expression.visit(this))}},{key:"visitNonNullAssert",value:function(e,t){return new R(e.span,e.expression.visit(this))}},{key:"visitConditional",value:function(e,t){return new b(e.span,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}},{key:"visitPipe",value:function(e,t){return new I(e.span,e.exp.visit(this),e.name,this.visitAll(e.args))}},{key:"visitKeyedRead",value:function(e,t){return new N(e.span,e.obj.visit(this),e.key.visit(this))}},{key:"visitKeyedWrite",value:function(e,t){return new O(e.span,e.obj.visit(this),e.key.visit(this),e.value.visit(this))}},{key:"visitAll",value:function(e){for(var t=new Array(e.length),n=0;n=this.length?J:this.input.charCodeAt(this.index)}},{key:"scanToken",value:function(){for(var e=this.input,t=this.length,n=this.peek,i=this.index;n<=ne;){if(++i>=t){n=J;break}n=e.charCodeAt(i)}if(this.peek=n,this.index=i,i>=t)return null;if(Me(n))return this.scanIdentifier();if(be(n))return this.scanNumber(i);var r,s=i;switch(n){case 46:return this.advance(),be(this.peek)?this.scanNumber(s):Ne(s,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(s,n);case se:case ie:return this.scanString();case 35:case ae:case oe:case 42:case 47:case 37:case 94:return this.scanOperator(s,String.fromCharCode(n));case 63:return this.scanComplexOperator(s,"?",46,".");case 60:case 62:return this.scanComplexOperator(s,String.fromCharCode(n),61,"=");case 33:case 61:return this.scanComplexOperator(s,String.fromCharCode(n),61,"=",61,"=");case 38:return this.scanComplexOperator(s,"&",38,"&");case 124:return this.scanComplexOperator(s,"|",124,"|");case Ce:for(;(r=this.peek)>=X&&r<=ne||r==Ce;)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character [".concat(String.fromCharCode(n),"]"),0)}},{key:"scanCharacter",value:function(e,t){return this.advance(),Ne(e,t)}},{key:"scanOperator",value:function(e,t){return this.advance(),Oe(e,t)}},{key:"scanComplexOperator",value:function(e,t,n,i,r,s){this.advance();var a=t;return this.peek==n&&(this.advance(),a+=i),null!=r&&this.peek==r&&(this.advance(),a+=s),Oe(e,a)}},{key:"scanIdentifier",value:function(){var e=this.index;for(this.advance();Ke(this.peek);)this.advance();var t,n=this.input.substring(e,this.index);return Ee.indexOf(n)>-1?(t=n,new Se(e,D.Keyword,0,t)):function(e,t){return new Se(e,D.Identifier,0,t)}(e,n)}},{key:"scanNumber",value:function(e){var t,n=this.index===e;for(this.advance();;){if(be(this.peek));else if(46==this.peek)n=!1;else{if((t=this.peek)!=de&&t!=he)break;if(this.advance(),Te(this.peek)&&this.advance(),!be(this.peek))return this.error("Invalid exponent",-1);n=!1}this.advance()}var i,r=this.input.substring(e,this.index),s=n?function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}(r):parseFloat(r);return i=s,new Se(e,D.Number,i,"")}},{key:"scanString",value:function(){var e=this.index,t=this.peek;this.advance();for(var n="",i=this.index,r=this.input;this.peek!=t;)if(92==this.peek){n+=r.substring(i,this.index),this.advance();var s=void 0;if(this.peek=this.peek,117==this.peek){var a=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(a))return this.error("Invalid unicode escape [\\u".concat(a,"]"),0);s=parseInt(a,16);for(var o=0;o<5;o++)this.advance()}else s=Re(this.peek),this.advance();n+=String.fromCharCode(s),i=this.index}else{if(this.peek==J)return this.error("Unterminated quote",0);this.advance()}var u,l=r.substring(i,this.index);return this.advance(),u=n+l,new Se(e,D.String,0,u)}},{key:"error",value:function(e,t){var n=this.index+t;return function(e,t){return new Se(e,D.Error,0,t)}(n,"Lexer Error: ".concat(e," at column ").concat(n," in expression [").concat(this.input,"]"))}}]),e}();function Me(e){return fe<=e&&e<=we||ce<=e&&e<=pe||e==ve||e==re}function _e(e){if(0==e.length)return!1;var t=new Le(e);if(!Me(t.peek))return!1;for(t.advance();t.peek!==J;){if(!Ke(t.peek))return!1;t.advance()}return!0}function Ke(e){return function(e){return e>=fe&&e<=we||e>=ce&&e<=pe}(e)||be(e)||e==ve||e==re}function Te(e){return e==oe||e==ae}function Be(e){return e===se||e===ie||e===Pe}function Re(e){switch(e){case xe:return Y;case ye:return ee;case ge:return te;case ke:return X;case me:return Z;default:return e}}var je=Object.freeze({get TokenType(){return D},Lexer:Ae,Token:Se,EOF:Ie,isIdentifier:_e,isQuote:Be}),Fe=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];var Ve=new(function(){function e(t,n){s(this,e),this.start=t,this.end=n}return o(e,null,[{key:"fromArray",value:function(t){return t?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){var n=t[0],i=t[1];Fe.forEach(function(e){if(e.test(n)||e.test(i))throw new Error("['".concat(n,"', '").concat(i,"'] contains unusable interpolation symbol."))})}}("interpolation",t),new e(t[0],t[1])):Ve}}]),e}())("{{","}}");function Ge(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}Object.getPrototypeOf({});var We=function e(t,n,i){s(this,e),this.strings=t,this.expressions=n,this.offsets=i},Ue=function e(t,n,i){s(this,e),this.templateBindings=t,this.warnings=n,this.errors=i};function Qe(e){var t=Ge(e.start)+"([\\s\\S]*?)"+Ge(e.end);return new RegExp(t,"g")}var ze=function(){function e(t){s(this,e),this._lexer=t,this.errors=[]}return o(e,[{key:"parseAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve;this._checkNoInterpolation(e,t,n);var i=this._stripComments(e),r=this._lexer.tokenize(this._stripComments(e)),s=new $e(e,t,r,i.length,!0,this.errors,e.length-i.length).parseChain();return new G(s,e,t,this.errors)}},{key:"parseBinding",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve,i=this._parseBindingAst(e,t,n);return new G(i,e,t,this.errors)}},{key:"parseSimpleBinding",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve,i=this._parseBindingAst(e,t,n),r=qe.check(i);return r.length>0&&this._reportError("Host binding expression cannot contain ".concat(r.join(" ")),e,t),new G(i,e,t,this.errors)}},{key:"_reportError",value:function(e,t,n,i){this.errors.push(new x(e,t,n,i))}},{key:"_parseBindingAst",value:function(e,t,n){var i=this._parseQuote(e,t);if(null!=i)return i;this._checkNoInterpolation(e,t,n);var r=this._stripComments(e),s=this._lexer.tokenize(r);return new $e(e,t,s,r.length,!1,this.errors,e.length-r.length).parseChain()}},{key:"_parseQuote",value:function(e,t){if(null==e)return null;var n=e.indexOf(":");if(-1==n)return null;var i=e.substring(0,n).trim();if(!_e(i))return null;var r=e.substring(n+1);return new m(new g(0,e.length),i,r,t)}},{key:"parseTemplateBindings",value:function(e,t,n){var i=this._lexer.tokenize(t);return new $e(t,n,i,t.length,!1,this.errors,0).parseTemplateBindings(e)}},{key:"parseInterpolation",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve,i=this.splitInterpolation(e,t,n);if(null==i)return null;for(var r=[],s=0;s2&&void 0!==arguments[2]?arguments[2]:Ve,i=Qe(n),r=e.split(i);if(r.length<=1)return null;for(var s=[],a=[],o=[],u=0,l=0;l0?(u+=n.start.length,a.push(c),o.push(u),u+=c.length+n.end.length):(this._reportError("Blank expressions are not allowed in interpolated strings",e,"at column ".concat(this._findInterpolationErrorColumn(r,l,n)," in"),t),a.push("$implict"),o.push(u))}return new We(s,a,o)}},{key:"wrapLiteralPrimitive",value:function(e,t){return new G(new L(new g(0,null==e?0:e.length),e),e,t,this.errors)}},{key:"_stripComments",value:function(e){var t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}},{key:"_commentStart",value:function(e){for(var t=null,n=0;n1&&this._reportError("Got interpolation (".concat(n.start).concat(n.end,") where expression was expected"),e,"at column ".concat(this._findInterpolationErrorColumn(r,1,n)," in"),t)}},{key:"_findInterpolationErrorColumn",value:function(e,t,n){for(var i="",r=0;r":case"<=":case">=":this.advance();var n=this.parseAdditive();e=new T(this.span(e.span.start),t,e,n);continue}break}return e}},{key:"parseAdditive",value:function(){for(var e=this.parseMultiplicative();this.next.type==D.Operator;){var t=this.next.strValue;switch(t){case"+":case"-":this.advance();var n=this.parseMultiplicative();e=new T(this.span(e.span.start),t,e,n);continue}break}return e}},{key:"parseMultiplicative",value:function(){for(var e=this.parsePrefix();this.next.type==D.Operator;){var t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();var n=this.parsePrefix();e=new T(this.span(e.span.start),t,e,n);continue}break}return e}},{key:"parsePrefix",value:function(){if(this.next.type==D.Operator){var e,t=this.inputIndex,n=this.next.strValue;switch(n){case"+":return this.advance(),e=this.parsePrefix(),new T(this.span(t),"-",e,new L(new g(t,t),0));case"-":return this.advance(),e=this.parsePrefix(),new T(this.span(t),n,new L(new g(t,t),0),e);case"!":return this.advance(),e=this.parsePrefix(),new B(this.span(t),e)}}return this.parseCallChain()}},{key:"parseCallChain",value:function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(91)){this.rbracketsExpected++;var t=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(93),this.optionalOperator("=")){var n=this.parseConditional();e=new O(this.span(e.span.start),e,t,n)}else e=new N(this.span(e.span.start),e,t)}else if(this.optionalCharacter(40)){this.rparensExpected++;var i=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new V(this.span(e.span.start),e,i)}else{if(!this.optionalOperator("!"))return e;e=new R(this.span(e.span.start),e)}}},{key:"parsePrimary",value:function(){var e=this.inputIndex;if(this.optionalCharacter(40)){this.rparensExpected++;var t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}if(this.next.isKeywordNull())return this.advance(),new L(this.span(e),null);if(this.next.isKeywordUndefined())return this.advance(),new L(this.span(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new L(this.span(e),!0);if(this.next.isKeywordFalse())return this.advance(),new L(this.span(e),!1);if(this.next.isKeywordThis())return this.advance(),new C(this.span(e));if(this.optionalCharacter(91)){this.rbracketsExpected++;var n=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new M(this.span(e),n)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new C(this.span(e)),!1);if(this.next.isNumber()){var i=this.next.toNumber();return this.advance(),new L(this.span(e),i)}if(this.next.isString()){var r=this.next.toString();return this.advance(),new L(this.span(e),r)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: ".concat(this.input)),new w(this.span(e))):(this.error("Unexpected token ".concat(this.next)),new w(this.span(e)))}},{key:"parseExpressionList",value:function(e){var t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.optionalCharacter(44));return t}},{key:"parseLiteralMap",value:function(){var e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.optionalCharacter(125)){this.rbracesExpected++;do{var i=this.next.isString(),r=this.expectIdentifierOrKeywordOrString();e.push({key:r,quoted:i}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.optionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new _(this.span(n),e,t)}},{key:"parseAccessMemberOrMethodCall",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.span.start,i=this.expectIdentifierOrKeyword();if(this.optionalCharacter(40)){this.rparensExpected++;var r=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;var s=this.span(n);return t?new F(s,e,i,r):new j(s,e,i,r)}if(t)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new w(this.span(n))):new S(this.span(n),e,i);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new w(this.span(n));var a=this.parseConditional();return new A(this.span(n),e,i,a)}return new E(this.span(n),e,i)}},{key:"parseCallArguments",value:function(){if(this.next.isCharacter(41))return[];var e=[];do{e.push(this.parsePipe())}while(this.optionalCharacter(44));return e}},{key:"expectTemplateBindingKey",value:function(){var e="",t=!1;do{e+=this.expectIdentifierOrKeywordOrString(),(t=this.optionalOperator("-"))&&(e+="-")}while(t);return e.toString()}},{key:"parseTemplateBindings",value:function(e){var t=!0,n=[];do{var i=this.inputIndex,r=void 0,s=void 0,a=!1;t?(r=s=e,t=!1):((a=this.peekKeywordLet())&&this.advance(),r=this.expectTemplateBindingKey(),s=a?r:e+r[0].toUpperCase()+r.substring(1),this.optionalCharacter(58));var o=null,u=null;if(a)o=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.peekKeywordAs())this.advance(),o=r,s=this.expectTemplateBindingKey(),a=!0;else if(this.next!==Ie&&!this.peekKeywordLet()){var l=this.inputIndex,c=this.parsePipe(),h=this.input.substring(l-this.offset,this.inputIndex-this.offset);u=new G(c,h,this.location,this.errors)}if(n.push(new W(this.span(i),s,a,o,u)),this.peekKeywordAs()&&!a){var p=this.inputIndex;this.advance();var v=this.expectTemplateBindingKey();n.push(new W(this.span(p),v,!0,s,null))}this.optionalCharacter(59)||this.optionalCharacter(44)}while(this.index1&&void 0!==arguments[1]?arguments[1]:null;this.errors.push(new x(e,this.input,this.locationText(t),this.location)),this.skip()}},{key:"locationText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null==e&&(e=this.index),e2&&void 0!==arguments[2]&&arguments[2],a=He.getNgType(e);switch(a){case"Binary":var o=e.left,u=e.operation,l=e.right,c=l.span.start===l.span.end,h=o.span.start===o.span.end;if(c||h){var p=o.span.start===o.span.end?le(l):le(o);return he("UnaryExpression",{prefix:!0,argument:p,operator:c?"+":"-"},{start:e.span.start,end:ge(p)},{hasParentParens:s})}var v=le(o),f=le(l);return he("&&"===u||"||"===u?"LogicalExpression":"BinaryExpression",{left:v,right:f,operator:u},{start:xe(v),end:ge(f)},{hasParentParens:s});case"BindingPipe":var d=e.exp,y=e.name,x=e.args,g=le(d),k=fe(/\S/,fe(/\|/,ge(g))+1),m=he("Identifier",{name:y},{start:k,end:k+y.length}),w=x.map(le);return he("NGPipeExpression",{left:g,right:m,arguments:w},{start:xe(g),end:ge(0===w.length?m:He.getLast(w))},{hasParentParens:s});case"Chain":return he("NGChainedExpression",{expressions:e.expressions.map(le)},e.span,{hasParentParens:s});case"Comment":return he("CommentLine",{value:e.value},e.span,{processSpan:!1});case"Conditional":var C=e.condition,P=e.trueExp,b=e.falseExp,E=le(C),A=le(P),S=le(b);return he("ConditionalExpression",{test:E,consequent:A,alternate:S},{start:xe(E),end:ge(S)},{hasParentParens:s});case"EmptyExpr":return he("NGEmptyExpression",{},e.span,{hasParentParens:s});case"FunctionCall":var N=e.target,O=e.args,I=1===O.length?[ce(O[0])]:O.map(le),L=le(N);return he("CallExpression",{callee:L,arguments:I},{start:xe(L),end:e.span.end},{hasParentParens:s});case"KeyedRead":var M=e.obj,_=e.key,K=le(M);return he("MemberExpression",{computed:!0,object:K,property:le(_)},{start:xe(K),end:e.span.end},{hasParentParens:s});case"LiteralArray":return he("ArrayExpression",{elements:e.expressions.map(le)},e.span,{hasParentParens:s});case"LiteralMap":var T=e.keys,B=e.values.map(function(e){return le(e)});return he("ObjectExpression",{properties:T.map(function(t,n){var i=t.key,r=t.quoted,s=B[n],a={start:fe(/\S/,0===n?e.span.start+1:fe(/,/,ge(B[n-1]))+1),end:ve(/\S/,ve(/:/,xe(s)-1)-1)+1},o=r?he("StringLiteral",{value:i},a):he("Identifier",{name:i},a);return he("ObjectProperty",{key:o,value:s,method:!1,shorthand:!1,computed:!1},{start:xe(o),end:ge(s)})})},e.span,{hasParentParens:s});case"LiteralPrimitive":var R=e.value;switch(r(R)){case"boolean":return he("BooleanLiteral",{value:R},e.span,{hasParentParens:s});case"number":return he("NumericLiteral",{value:R},e.span,{hasParentParens:s});case"object":return he("NullLiteral",{},e.span,{hasParentParens:s});case"string":return he("StringLiteral",{value:R},e.span,{hasParentParens:s});case"undefined":return he("Identifier",{name:"undefined"},e.span,{hasParentParens:s});default:throw new Error("Unexpected LiteralPrimitive value type ".concat(r(R)))}case"MethodCall":case"SafeMethodCall":var j="SafeMethodCall"===a,F=e.receiver,V=e.name,G=e.args,W=1===G.length?[ce(G[0])]:G.map(le),U=ve(/\S/,ve(/\(/,(0===W.length?ve(/\)/,e.span.end-1):xe(W[0]))-1)-1)+1,Q=pe(F,he("Identifier",{name:V},{start:U-V.length,end:U}),{computed:!1,optional:j}),z=de(Q);return he(j||z?"OptionalCallExpression":"CallExpression",{callee:Q,arguments:W},{start:xe(Q),end:e.span.end},{hasParentParens:s});case"NonNullAssert":var $=le(e.expression);return he("TSNonNullExpression",{expression:$},{start:xe($),end:e.span.end},{hasParentParens:s});case"PrefixNot":var q=le(e.expression);return he("UnaryExpression",{prefix:!0,operator:"!",argument:q},{start:e.span.start,end:ge(q)},{hasParentParens:s});case"PropertyRead":case"SafePropertyRead":var D="SafePropertyRead"===a,H=e.receiver,J=e.name,X=ve(/\S/,e.span.end-1)+1;return pe(H,he("Identifier",{name:J},{start:X-J.length,end:X},H.span.start===H.span.end?{hasParentParens:s}:{}),{computed:!1,optional:D},{hasParentParens:s});case"KeyedWrite":var Y=e.obj,Z=e.key,ee=e.value,te=le(Z),ne=le(ee),ie=pe(Y,te,{computed:!0,optional:!1},{end:fe(/\]/,ge(te))+1});return he("AssignmentExpression",{left:ie,operator:"=",right:ne},{start:xe(ie),end:ge(ne)},{hasParentParens:s});case"PropertyWrite":var re=e.receiver,se=e.name,ae=le(e.value),oe=ve(/\S/,ve(/=/,xe(ae)-1)-1)+1,ue=pe(re,he("Identifier",{name:se},{start:oe-se.length,end:oe}),{computed:!1,optional:!1});return he("AssignmentExpression",{left:ue,operator:"=",right:ae},{start:xe(ue),end:ge(ae)},{hasParentParens:s});case"Quote":return he("NGQuotedExpression",{prefix:e.prefix,value:e.uninterpretedExpression},e.span,{hasParentParens:s});default:throw new Error("Unexpected node ".concat(a))}function le(e){return t.transform(e,i)}function ce(e){return t.transform(e,i,!0)}function he(e,t,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=s.processSpan,o=void 0===a||a,u=s.hasParentParens,l=void 0!==u&&u,c=Object.assign({type:e},n(r,i,o,l),t);switch(e){case"Identifier":var h=c;h.loc.identifierName=h.name;break;case"NumericLiteral":var p=c;p.extra=Object.assign({},p.extra,{raw:i.text.slice(p.start,p.end),rawValue:p.value});break;case"StringLiteral":var v=c;v.extra=Object.assign({},v.extra,{raw:i.text.slice(v.start,v.end),rawValue:v.value})}return c}function pe(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.end,s=void 0===r?ge(t):r,a=i.hasParentParens,o=void 0!==a&&a;if(e.span.start===e.span.end)return t;var u="ImplicitReceiver"===He.getNgType(e)?he("ThisExpression",{},e.span):le(e),l=de(u);return he(n.optional||l?"OptionalMemberExpression":"MemberExpression",Object.assign({object:u,property:t,computed:n.computed},n.optional?{optional:!0}:l?{optional:!1}:null),{start:xe(u),end:s},{hasParentParens:o})}function ve(e,t){return He.findFrontChar(e,t,i.text)}function fe(e,t){return He.findBackChar(e,t,i.text)}function de(e){return("OptionalCallExpression"===e.type||"OptionalMemberExpression"===e.type)&&!ye(e)}function ye(e){return e.extra&&e.extra.parenthesized}function xe(e){return ye(e)?e.extra.parenStart:e.start}function ge(e){return ye(e)?e.extra.parenEnd:e.end}},t.transformSpan=n});n(Je);var Xe=i(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.transformTemplateBindings=function(e,t){for(var n=p(e,1)[0],i=n.key,r=0===t.text.slice(n.span.start,n.span.end).trim().length?e.slice(1):e,s=[],a=null,o=0;o3&&void 0!==arguments[3])||arguments[3];return Object.assign({type:e},Je.transformSpan(i,t,r,!1),n)}function x(e,n){if("'"!==t.text[e]&&'"'!==t.text[e])return{start:e,end:e+n.length};for(var i=t.text[e],r=0,s=e+1;;){var a=t.text[s];if(a===i&&r%2==0)return{start:e,end:s+1};"\\"===a?r++:r=0,s++}}function g(e){return He.toLowerCamelCase(e.slice(i.length))}}});n(Xe);var Ye=i(function(e,t){function n(e,t){var n=t(e),i=n.ast,r=n.comments,s=new y.Context(e),a=function(e){return Je.transform(e,s)},o=a(i);return o.comments=r.map(a),o}Object.defineProperty(t,"__esModule",{value:!0}),t.parseBinding=function(e){return n(e,He.parseNgBinding)},t.parseSimpleBinding=function(e){return n(e,He.parseNgSimpleBinding)},t.parseInterpolation=function(e){return n(e,He.parseNgInterpolation)},t.parseAction=function(e){return n(e,He.parseNgAction)},t.parseTemplateBindings=function(e){return Xe.transformTemplateBindings(He.parseNgTemplateBindings(e),new y.Context(e))}});function Ze(e){return Object.assign({astFormat:"estree",parse:function(t,n,i){var r=e(t,Ye);return{type:"NGRoot",node:"__ng_action"===i.parser&&"NGChainedExpression"!==r.type?Object.assign({},r,{type:"NGChainedExpression",expressions:[r]}):r}}},t)}return n(Ye),{parsers:{__ng_action:Ze(function(e,t){return t.parseAction(e)}),__ng_binding:Ze(function(e,t){return t.parseBinding(e)}),__ng_interpolation:Ze(function(e,t){return t.parseInterpolation(e)}),__ng_directive:Ze(function(e,t){return t.parseTemplateBindings(e)})}}}); diff --git a/node_modules/prettier/parser-babylon.js b/node_modules/prettier/parser-babylon.js new file mode 100644 index 0000000..a5e456f --- /dev/null +++ b/node_modules/prettier/parser-babylon.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babylon=e())}(this,function(){"use strict";var t=function(t,e){var s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s(t,e){return t(e={exports:{}},e.exports),e.exports}var i=s(function(t){t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");var e=t.match(/(?:\r?\n)/g)||[];if(0===e.length)return null;var s=e.filter(function(t){return"\r\n"===t}).length;return s>e.length-s?"\r\n":"\n"},t.exports.graceful=function(e){return t.exports(e)||"\n"}}),r={EOL:"\n"},a=Object.freeze({default:r}),n=a&&r||a,o=s(function(t,e){var s,r;function a(){return s=(t=i)&&t.__esModule?t:{default:t};var t}function o(){return r=n}Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(t){var e=t.match(c);return e?e[0].trimLeft():""},e.strip=function(t){var e=t.match(c);return e&&e[0]?t.substring(e[0].length):t},e.parse=function(t){return y(t).pragmas},e.parseWithComments=y,e.print=function(t){var e=t.comments,i=void 0===e?"":e,n=t.pragmas,h=void 0===n?{}:n,p=(0,(s||a()).default)(i)||(r||o()).EOL,c=Object.keys(h),l=c.map(function(t){return x(t,h[t])}).reduce(function(t,e){return t.concat(e)},[]).map(function(t){return" * "+t+p}).join("");if(!i){if(0===c.length)return"";if(1===c.length&&!Array.isArray(h[c[0]])){var u=h[c[0]];return"".concat("/**"," ").concat(x(c[0],u)[0]).concat(" */")}}var d=i.split(p).map(function(t){return"".concat(" *"," ").concat(t)}).join(p)+p;return"/**"+p+(i?d:"")+(i&&c.length?" *"+p:"")+l+" */"};var h=/\*\/$/,p=/^\/\*\*/,c=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,l=/(^|\s+)\/\/([^\r\n]*)/g,u=/^(\r?\n)+/,d=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,f=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,m=/(\r?\n|^) *\* ?/g;function y(t){var e=(0,(s||a()).default)(t)||(r||o()).EOL;t=t.replace(p,"").replace(h,"").replace(m,"$1");for(var i="";i!==t;)i=t,t=t.replace(d,"".concat(e,"$1 $2").concat(e));t=t.replace(u,"").trimRight();for(var n,c=Object.create(null),y=t.replace(f,"").replace(u,"").trimRight();n=f.exec(t);){var x=n[2].replace(l,"");"string"==typeof c[n[1]]||Array.isArray(c[n[1]])?c[n[1]]=[].concat(c[n[1]],x):c[n[1]]=x}return{comments:y,pragmas:c}}function x(t,e){return[].concat(e).map(function(e){return"@".concat(t," ").concat(e).trim()})}});e(o);var h=function(t){var e=Object.keys(o.parse(o.extract(t)));return-1!==e.indexOf("prettier")||-1!==e.indexOf("format")},p=function(t){return t.length>0?t[t.length-1]:null};var c={locStart:function t(e,s){return!(s=s||{}).ignoreDecorators&&e.declaration&&e.declaration.decorators&&e.declaration.decorators.length>0?t(e.declaration.decorators[0]):!s.ignoreDecorators&&e.decorators&&e.decorators.length>0?t(e.decorators[0]):e.__location?e.__location.startOffset:e.range?e.range[0]:"number"==typeof e.start?e.start:e.loc?e.loc.start:null},locEnd:function t(e){var s=e.nodes&&p(e.nodes);if(s&&e.source&&!e.source.end&&(e=s),e.__location)return e.__location.endOffset;var i=e.range?e.range[1]:"number"==typeof e.end?e.end:null;return e.typeAnnotation?Math.max(i,t(e.typeAnnotation)):e.loc&&!i?e.loc.end:i}};function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var u=s(function(t){t.exports=function(){var t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(t,"g")}}),d=s(function(t){t.exports=function(t){return!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141))}});s(function(t){t.exports=function(t){if("string"!=typeof t||0===t.length)return 0;var e;t="string"==typeof(e=t)?e.replace(u(),""):e;for(var s=0,i=0;i=127&&r<=159||(r>=768&&r<=879||(r>65535&&i++,s+=d(r)?2:1))}return s}});function f(t){return function(e,s,i){var r=i&&i.backwards;if(!1===s)return!1;for(var a=e.length,n=s;n>=0&&n"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(t,e){t.forEach(function(t){m[t]=e})});var y=function(t){return t.length>0?t[t.length-1]:null};var x=function(t,e){return function t(e,s){if(e&&"object"===l(e))if(Array.isArray(e)){var i=!0,r=!1,a=void 0;try{for(var n,o=e[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var h=n.value;t(h,s)}}catch(t){r=!0,a=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}}else if("string"==typeof e.type){for(var p=Object.keys(e),c=0;c",{beforeExpr:r}),template:new a("template"),ellipsis:new a("...",{beforeExpr:r}),backQuote:new a("`",{startsExpr:!0}),dollarBraceL:new a("${",{beforeExpr:r,startsExpr:!0}),at:new a("@"),hash:new a("#"),interpreterDirective:new a("#!..."),eq:new a("=",{beforeExpr:r,isAssign:!0}),assign:new a("_=",{beforeExpr:r,isAssign:!0}),incDec:new a("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new a("!",{beforeExpr:r,prefix:!0,startsExpr:!0}),tilde:new a("~",{beforeExpr:r,prefix:!0,startsExpr:!0}),pipeline:new o("|>",0),nullishCoalescing:new o("??",1),logicalOR:new o("||",1),logicalAND:new o("&&",2),bitwiseOR:new o("|",3),bitwiseXOR:new o("^",4),bitwiseAND:new o("&",5),equality:new o("==/!=",6),relational:new o("",7),bitShift:new o("<>",8),plusMin:new a("+/-",{beforeExpr:r,binop:9,prefix:!0,startsExpr:!0}),modulo:new o("%",10),star:new o("*",10),slash:new o("/",10),exponent:new a("**",{beforeExpr:r,binop:11,rightAssociative:!0})},p={break:new n("break"),case:new n("case",{beforeExpr:r}),catch:new n("catch"),continue:new n("continue"),debugger:new n("debugger"),default:new n("default",{beforeExpr:r}),do:new n("do",{isLoop:!0,beforeExpr:r}),else:new n("else",{beforeExpr:r}),finally:new n("finally"),for:new n("for",{isLoop:!0}),function:new n("function",{startsExpr:!0}),if:new n("if"),return:new n("return",{beforeExpr:r}),switch:new n("switch"),throw:new n("throw",{beforeExpr:r,prefix:!0,startsExpr:!0}),try:new n("try"),var:new n("var"),let:new n("let"),const:new n("const"),while:new n("while",{isLoop:!0}),with:new n("with"),new:new n("new",{beforeExpr:r,startsExpr:!0}),this:new n("this",{startsExpr:!0}),super:new n("super",{startsExpr:!0}),class:new n("class"),extends:new n("extends",{beforeExpr:r}),export:new n("export"),import:new n("import",{startsExpr:!0}),yield:new n("yield",{beforeExpr:r,startsExpr:!0}),null:new n("null",{startsExpr:!0}),true:new n("true",{startsExpr:!0}),false:new n("false",{startsExpr:!0}),in:new n("in",{beforeExpr:r,binop:7}),instanceof:new n("instanceof",{beforeExpr:r,binop:7}),typeof:new n("typeof",{beforeExpr:r,prefix:!0,startsExpr:!0}),void:new n("void",{beforeExpr:r,prefix:!0,startsExpr:!0}),delete:new n("delete",{beforeExpr:r,prefix:!0,startsExpr:!0})};function c(t){return null!=t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}Object.keys(p).forEach(function(t){h["_"+t]=p[t]});function l(t){var e=t.split(" ");return function(t){return e.indexOf(t)>=0}}var u={6:l("enum await"),strict:l("implements interface let package private protected public static yield"),strictBind:l("eval arguments")},d=l("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),f="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",m="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",y=new RegExp("["+f+"]"),x=new RegExp("["+f+m+"]");f=m=null;var v=[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,190,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,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,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,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,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,4149,196,60,67,1213,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],P=[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,280,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,1016,45,17,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,2214,6,110,6,6,9,792487,239];function g(t,e){for(var s=65536,i=0;it)return!1;if((s+=e[i+1])>=t)return!0}return!1}function b(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&y.test(String.fromCharCode(t)):g(t,v)))}function w(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&x.test(String.fromCharCode(t)):g(t,v)||g(t,P))))}var T=["any","bool","boolean","empty","false","mixed","null","number","static","string","true","typeof","void","interface","extends","_"];function A(t){return"type"===t.importKind||"typeof"===t.importKind}function E(t){return(t.type===h.name||!!t.type.keyword)&&"from"!==t.value}var N={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var C=/\*?\s*@((?:no)?flow)\b/,k={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:"♦"},S=/\r\n?|\n|\u2028|\u2029/,I=new RegExp(S.source,"g");function L(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function M(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}}var D=function(t,e,s,i){this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=i},_={braceStatement:new D("{",!1),braceExpression:new D("{",!0),templateQuasi:new D("${",!0),parenStatement:new D("(",!1),parenExpression:new D("(",!0),template:new D("`",!0,!0,function(t){return t.readTmplToken()}),functionExpression:new D("function",!0)};h.parenR.updateContext=h.braceR.updateContext=function(){if(1!==this.state.context.length){var t=this.state.context.pop();t===_.braceStatement&&this.curContext()===_.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):t===_.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!t.isExpr}else this.state.exprAllowed=!0},h.name.updateContext=function(t){"of"!==this.state.value||this.curContext()!==_.parenStatement?(this.state.exprAllowed=!1,t!==h._let&&t!==h._const&&t!==h._var||S.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0),this.state.isIterator&&(this.state.isIterator=!1)):this.state.exprAllowed=!t.beforeExpr},h.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?_.braceStatement:_.braceExpression),this.state.exprAllowed=!0},h.dollarBraceL.updateContext=function(){this.state.context.push(_.templateQuasi),this.state.exprAllowed=!0},h.parenL.updateContext=function(t){var e=t===h._if||t===h._for||t===h._with||t===h._while;this.state.context.push(e?_.parenStatement:_.parenExpression),this.state.exprAllowed=!0},h.incDec.updateContext=function(){},h._function.updateContext=h._class.updateContext=function(t){this.state.exprAllowed&&!this.braceIsBlock(t)&&this.state.context.push(_.functionExpression),this.state.exprAllowed=!1},h.backQuote.updateContext=function(){this.curContext()===_.template?this.state.context.pop():this.state.context.push(_.template),this.state.exprAllowed=!1};var R=/^[\da-fA-F]+$/,j=/^\d+$/;function F(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function B(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return B(t.object)+"."+B(t.property);throw new Error("Node had unexpected type: "+t.type)}_.j_oTag=new D("...",!0,!0),h.jsxName=new a("jsxName"),h.jsxText=new a("jsxText",{beforeExpr:!0}),h.jsxTagStart=new a("jsxTagStart",{startsExpr:!0}),h.jsxTagEnd=new a("jsxTagEnd"),h.jsxTagStart.updateContext=function(){this.state.context.push(_.j_expr),this.state.context.push(_.j_oTag),this.state.exprAllowed=!1},h.jsxTagEnd.updateContext=function(t){var e=this.state.context.pop();e===_.j_oTag&&t===h.slash||e===_.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===_.j_expr):this.state.exprAllowed=!0};var q={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1};var U=function(t,e){this.line=t,this.column=e},V=function(t,e){this.start=t,this.end=e};function K(t){return t[t.length-1]}var W=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.raise=function(t,e,s){var i=void 0===s?{}:s,r=i.missingPluginNames,a=i.code,n=function(t,e){var s,i=1,r=0;for(I.lastIndex=0;(s=I.exec(t))&&s.index0)){var e,s,i,r,a,n=this.state.commentStack;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(n.length>0){var o=K(n);o.trailingComments&&o.trailingComments[0].start>=t.end&&(i=o.trailingComments,delete o.trailingComments)}for(n.length>0&&K(n).start>=t.start&&(e=n.pop());n.length>0&&K(n).start>=t.start;)s=n.pop();if(!s&&e&&(s=e),e&&this.state.leadingComments.length>0){var h=K(this.state.leadingComments);if("ObjectProperty"===e.type){if(h.start>=t.start&&this.state.commentPreviousNode){for(a=0;a0&&(e.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===t.type&&t.arguments&&t.arguments.length){var p=K(t.arguments);if(p&&h.start>=p.start&&h.end<=t.end&&this.state.commentPreviousNode){for(a=0;a0&&(p.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}}if(s){if(s.leadingComments)if(s!==t&&s.leadingComments.length>0&&K(s.leadingComments).end<=t.start)t.leadingComments=s.leadingComments,delete s.leadingComments;else for(r=s.leadingComments.length-2;r>=0;--r)if(s.leadingComments[r].end<=t.start){t.leadingComments=s.leadingComments.splice(0,r+1);break}}else if(this.state.leadingComments.length>0)if(K(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(a=0;a0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(r=0;rt.start);r++);var c=this.state.leadingComments.slice(0,r);c.length&&(t.leadingComments=c),0===(i=this.state.leadingComments.slice(r)).length&&(i=null)}this.state.commentPreviousNode=t,i&&(i.length&&i[0].start>=t.start&&K(i).end<=t.end?t.innerComments=i:t.trailingComments=i),n.push(t)}},e}(function(){function t(){this.sawUnambiguousESM=!1}var e=t.prototype;return e.isReservedWord=function(t){return"await"===t?this.inModule:u[6](t)},e.hasPlugin=function(t){return Object.hasOwnProperty.call(this.plugins,t)},e.getPluginOption=function(t,e){if(this.hasPlugin(t))return this.plugins[t][e]},t}())),X=function(){function t(){}var e=t.prototype;return e.init=function(t,e){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.input=e,this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inMethod=!1,this.inFunction=!1,this.inParameters=!1,this.maybeInArrowParameters=!1,this.inGenerator=!1,this.inAsync=!1,this.inPropertyName=!1,this.inType=!1,this.inClassProperty=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isIterator=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldOrAwaitInPossibleArrowParameters=null,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=this.lineStart=0,this.curLine=t.startLine,this.type=h.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[_.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[]},e.curPosition=function(){return new U(this.curLine,this.pos-this.lineStart)},e.clone=function(e){var s=this,i=new t;return Object.keys(this).forEach(function(t){var r=s[t];e&&"context"!==t||!Array.isArray(r)||(r=r.slice()),i[t]=r}),i},t}(),J=function(t){return t>=48&&t<=57},G={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},H={bin:[48,49]};H.oct=H.bin.concat([50,51,52,53,54,55]),H.dec=H.oct.concat([56,57]),H.hex=H.dec.concat([65,66,67,68,69,70,97,98,99,100,101,102]);var z=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.addExtra=function(t,e,s){t&&((t.extra=t.extra||{})[e]=s)},s.isRelational=function(t){return this.match(h.relational)&&this.state.value===t},s.isLookaheadRelational=function(t){var e=this.lookahead();return e.type==h.relational&&e.value==t},s.expectRelational=function(t){this.isRelational(t)?this.next():this.unexpected(null,h.relational)},s.eatRelational=function(t){return!!this.isRelational(t)&&(this.next(),!0)},s.isContextual=function(t){return this.match(h.name)&&this.state.value===t&&!this.state.containsEsc},s.isLookaheadContextual=function(t){var e=this.lookahead();return e.type===h.name&&e.value===t},s.eatContextual=function(t){return this.isContextual(t)&&this.eat(h.name)},s.expectContextual=function(t,e){this.eatContextual(t)||this.unexpected(null,e)},s.canInsertSemicolon=function(){return this.match(h.eof)||this.match(h.braceR)||this.hasPrecedingLineBreak()},s.hasPrecedingLineBreak=function(){return S.test(this.input.slice(this.state.lastTokEnd,this.state.start))},s.isLineTerminator=function(){return this.eat(h.semi)||this.canInsertSemicolon()},s.semicolon=function(){this.isLineTerminator()||this.unexpected(null,h.semi)},s.expect=function(t,e){this.eat(t)||this.unexpected(e,t)},s.unexpected=function(t,e){throw void 0===e&&(e="Unexpected token"),"string"!=typeof e&&(e='Unexpected token, expected "'+e.label+'"'),this.raise(null!=t?t:this.state.start,e)},s.expectPlugin=function(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},s.expectOnePlugin=function(t,e){var s=this;if(!t.some(function(t){return s.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})},e}(function(t){function e(e,s){var i;return(i=t.call(this)||this).state=new X,i.state.init(e,s),i.isLookahead=!1,i}i(e,t);var s=e.prototype;return s.next=function(){this.options.tokens&&!this.isLookahead&&this.state.tokens.push(new function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new V(t.startLoc,t.endLoc)}(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()},s.eat=function(t){return!!this.match(t)&&(this.next(),!0)},s.match=function(t){return this.state.type===t},s.isKeyword=function(t){return d(t)},s.lookahead=function(){var t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var e=this.state;return this.state=t,e},s.setStrict=function(t){if(this.state.strict=t,this.match(h.num)||this.match(h.string)){for(this.state.pos=this.state.start;this.state.pos=this.input.length?this.finishToken(h.eof):t.override?t.override(this):this.readToken(this.input.codePointAt(this.state.pos))},s.readToken=function(t){b(t)||92===t?this.readWord():this.getTokenFromCode(t)},s.pushComment=function(t,e,s,i,r,a){var n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new V(r,a)};this.isLookahead||(this.options.tokens&&this.state.tokens.push(n),this.state.comments.push(n),this.addComment(n))},s.skipBlockComment=function(){var t,e=this.state.curPosition(),s=this.state.pos,i=this.input.indexOf("*/",this.state.pos+=2);for(-1===i&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=i+2,I.lastIndex=s;(t=I.exec(this.input))&&t.index=48&&t<=57)this.readNumber(!0);else{var e=this.input.charCodeAt(this.state.pos+2);46===t&&46===e?(this.state.pos+=3,this.finishToken(h.ellipsis)):(++this.state.pos,this.finishToken(h.dot))}},s.readToken_slash=function(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(h.assign,2):this.finishOp(h.slash,1)},s.readToken_interpreter=function(){if(0!==this.state.pos||this.state.input.length<2)return!1;var t=this.state.pos;this.state.pos+=1;var e=this.input.charCodeAt(this.state.pos);if(33!==e)return!1;for(;10!==e&&13!==e&&8232!==e&&8233!==e&&++this.state.pos=48&&e<=57?(++this.state.pos,this.finishToken(h.question)):(this.state.pos+=2,this.finishToken(h.questionDot)):61===e?this.finishOp(h.assign,3):this.finishOp(h.nullishCoalescing,2)},s.getTokenFromCode=function(t){switch(t){case 35:if(0===this.state.pos&&this.readToken_interpreter())return;if((this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(h.hash);this.raise(this.state.pos,"Unexpected character '"+String.fromCodePoint(t)+"'");case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(h.parenL);case 41:return++this.state.pos,void this.finishToken(h.parenR);case 59:return++this.state.pos,void this.finishToken(h.semi);case 44:return++this.state.pos,void this.finishToken(h.comma);case 91:return++this.state.pos,void this.finishToken(h.bracketL);case 93:return++this.state.pos,void this.finishToken(h.bracketR);case 123:return void(this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(h.braceBarL,2):(++this.state.pos,this.finishToken(h.braceL)));case 125:return++this.state.pos,void this.finishToken(h.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(h.doubleColon,2):(++this.state.pos,this.finishToken(h.colon)));case 63:return void this.readToken_question();case 64:return++this.state.pos,void this.finishToken(h.at);case 96:return++this.state.pos,void this.finishToken(h.backQuote);case 48:var e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)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(h.tilde,1)}this.raise(this.state.pos,"Unexpected character '"+String.fromCodePoint(t)+"'")},s.finishOp=function(t,e){var s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)},s.readRegexp=function(){for(var t,e,s=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.state.pos);if(S.test(i)&&this.raise(s,"Unterminated regular expression"),t)t=!1;else{if("["===i)e=!0;else if("]"===i&&e)e=!1;else if("/"===i&&!e)break;t="\\"===i}++this.state.pos}var r=this.input.slice(s,this.state.pos);++this.state.pos;for(var a="";this.state.pos-1)a.indexOf(n)>-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag"),++this.state.pos,a+=n;else{if(!w(o)&&92!==o)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}}this.finishToken(h.regexp,{pattern:r,flags:a})},s.readInt=function(t,e){for(var s=this.state.pos,i=16===t?G.hex:G.decBinOct,r=16===t?H.hex:10===t?H.dec:8===t?H.oct:H.bin,a=0,n=0,o=null==e?1/0:e;n-1||i.indexOf(l)>-1||Number.isNaN(l))&&this.raise(this.state.pos,"Invalid or unexpected token"),++this.state.pos;continue}}if((p=h>=97?h-97+10:h>=65?h-65+10:J(h)?h-48:1/0)>=t)break;++this.state.pos,a=a*t+p}return this.state.pos===s||null!=e&&this.state.pos-s!==e?null:a},s.readRadixNumber=function(t){var e=this.state.pos,s=!1;this.state.pos+=2;var i=this.readInt(t);if(null==i&&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),b(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number"),s){var r=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(h.bigint,r)}else this.finishToken(h.num,i)},s.readNumber=function(t){var e=this.state.pos,s=48===this.input.charCodeAt(e),i=!1,r=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid number"),s&&this.state.pos==e+1&&(s=!1);var a=this.input.charCodeAt(this.state.pos);46!==a||s||(++this.state.pos,this.readInt(10),i=!0,a=this.input.charCodeAt(this.state.pos)),69!==a&&101!==a||s||(43!==(a=this.input.charCodeAt(++this.state.pos))&&45!==a||++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),i=!0,a=this.input.charCodeAt(this.state.pos)),this.hasPlugin("bigInt")&&110===a&&((i||s)&&this.raise(e,"Invalid BigIntLiteral"),++this.state.pos,r=!0),b(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number");var n,o=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");r?this.finishToken(h.bigint,o):(i?n=parseFloat(o):s&&1!==o.length?this.state.strict?this.raise(e,"Invalid number"):n=/[89]/.test(o)?parseInt(o,10):parseInt(o,8):n=parseInt(o,10),this.finishToken(h.num,n))},s.readCodePoint=function(t){var e;if(123===this.input.charCodeAt(this.state.pos)){var 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},s.readString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;92===i?(e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos):8232===i||8233===i?(++this.state.pos,++this.state.curLine):L(i)?this.raise(this.state.start,"Unterminated string constant"):++this.state.pos}e+=this.input.slice(s,this.state.pos++),this.finishToken(h.string,e)},s.readTmplToken=function(){for(var t="",e=this.state.pos,s=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(h.template)?36===i?(this.state.pos+=2,void this.finishToken(h.dollarBraceL)):(++this.state.pos,void this.finishToken(h.backQuote)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(h.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);var r=this.readEscapedChar(!0);null===r?s=!0:t+=r,e=this.state.pos}else if(L(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}},s.readEscapedChar=function(t){var e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:var i=this.readHexChar(2,e);return null===i?null:String.fromCharCode(i);case 117:var r=this.readCodePoint(e);return null===r?null:String.fromCodePoint(r);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:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(s>=48&&s<=55){var a=this.state.pos-1,n=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(n,8);if(o>255&&(n=n.slice(0,-1),o=parseInt(n,8)),o>0){if(t)return this.state.invalidTemplateEscapePosition=a,null;this.state.strict?this.raise(a,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=a)}return this.state.pos+=n.length-1,String.fromCharCode(o)}return String.fromCharCode(s)}},s.readHexChar=function(t,e){var s=this.state.pos,i=this.readInt(16,t);return null===i&&(e?this.raise(s,"Bad character escape sequence"):(this.state.pos=s-1,this.state.invalidTemplateEscapePosition=s-1)),i},s.readWord1=function(){this.state.containsEsc=!1;for(var t="",e=!0,s=this.state.pos;this.state.pos=0;n--){var o=this.state.labels[n];if(o.statementStart!==t.start)break;o.statementStart=this.state.start,o.kind=a}return this.state.labels.push({name:e,kind:a,statementStart:this.state.start}),t.body=this.parseStatement(!0),("ClassDeclaration"==t.body.type||"VariableDeclaration"==t.body.type&&"var"!==t.body.kind||"FunctionDeclaration"==t.body.type&&(this.state.strict||t.body.generator||t.body.async))&&this.raise(t.body.start,"Invalid labeled declaration"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")},s.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},s.parseBlock=function(t){var e=this.startNode();return this.expect(h.braceL),this.parseBlockBody(e,t,!1,h.braceR),this.finishNode(e,"BlockStatement")},s.isValidDirective=function(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized},s.parseBlockBody=function(t,e,s,i){var r=t.body=[],a=t.directives=[];this.parseBlockOrModuleBlockBody(r,e?a:void 0,s,i)},s.parseBlockOrModuleBlockBody=function(t,e,s,i){for(var r,a,n=!1;!this.eat(i);){n||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,s);if(e&&!n&&this.isValidDirective(o)){var h=this.stmtToDirective(o);e.push(h),void 0===r&&"use strict"===h.value.value&&(r=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else n=!0,t.push(o)}!1===r&&this.setStrict(!1)},s.parseFor=function(t,e){return t.init=e,this.expect(h.semi),t.test=this.match(h.semi)?null:this.parseExpression(),this.expect(h.semi),t.update=this.match(h.parenR)?null:this.parseExpression(),this.expect(h.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"ForStatement")},s.parseForIn=function(t,e,s){var i=this.match(h._in)?"ForInStatement":"ForOfStatement";return s?this.eatContextual("of"):this.next(),"ForOfStatement"===i&&(t.await=!!s),t.left=e,t.right=this.parseExpression(),this.expect(h.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,i)},s.parseVar=function(t,e,s){var i=t.declarations=[];for(t.kind=s.keyword;;){var r=this.startNode();if(this.parseVarHead(r),this.eat(h.eq)?r.init=this.parseMaybeAssign(e):(s!==h._const||this.match(h._in)||this.isContextual("of")?"Identifier"===r.id.type||e&&(this.match(h._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.hasPlugin("typescript")||this.unexpected(),r.init=null),i.push(this.finishNode(r,"VariableDeclarator")),!this.eat(h.comma))break}return t},s.parseVarHead=function(t){t.id=this.parseBindingAtom(),this.checkLVal(t.id,!0,void 0,"variable declaration")},s.parseFunction=function(t,e,s,i,r){var a=this.state.inFunction,n=this.state.inMethod,o=this.state.inAsync,p=this.state.inGenerator,c=this.state.inClassProperty;return this.state.inFunction=!0,this.state.inMethod=!1,this.state.inClassProperty=!1,this.initFunction(t,i),this.match(h.star)&&(t.generator=!0,this.next()),!e||r||this.match(h.name)||this.match(h._yield)||this.unexpected(),e||(this.state.inAsync=i,this.state.inGenerator=t.generator),(this.match(h.name)||this.match(h._yield))&&(t.id=this.parseBindingIdentifier()),e&&(this.state.inAsync=i,this.state.inGenerator=t.generator),this.parseFunctionParams(t),this.parseFunctionBodyAndFinish(t,e?"FunctionDeclaration":"FunctionExpression",s),this.state.inFunction=a,this.state.inMethod=n,this.state.inAsync=o,this.state.inGenerator=p,this.state.inClassProperty=c,t},s.parseFunctionParams=function(t,e){var s=this.state.inParameters;this.state.inParameters=!0,this.expect(h.parenL),t.params=this.parseBindingList(h.parenR,!1,e),this.state.inParameters=s},s.parseClass=function(t,e,s){return this.next(),this.takeDecorators(t),this.parseClassId(t,e,s),this.parseClassSuper(t),this.parseClassBody(t),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},s.isClassProperty=function(){return this.match(h.eq)||this.match(h.semi)||this.match(h.braceR)},s.isClassMethod=function(){return this.match(h.parenL)},s.isNonstaticConstructor=function(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)},s.parseClassBody=function(t){var e=this.state.strict;this.state.strict=!0,this.state.classLevel++;var s={hadConstructor:!1},i=[],r=this.startNode();for(r.body=[],this.expect(h.braceL);!this.eat(h.braceR);)if(this.eat(h.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(h.at))i.push(this.parseDecorator());else{var a=this.startNode();i.length&&(a.decorators=i,this.resetStartLocationFromNode(a,i[0]),i=[]),this.parseClassMember(r,a,s),"constructor"===a.kind&&a.decorators&&a.decorators.length>0&&this.raise(a.start,"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),t.body=this.finishNode(r,"ClassBody"),this.state.classLevel--,this.state.strict=e},s.parseClassMember=function(t,e,s){var i=!1,r=this.state.containsEsc;if(this.match(h.name)&&"static"===this.state.value){var a=this.parseIdentifier(!0);if(this.isClassMethod()){var n=e;return n.kind="method",n.computed=!1,n.key=a,n.static=!1,void this.pushClassMethod(t,n,!1,!1,!1)}if(this.isClassProperty()){var o=e;return o.computed=!1,o.key=a,o.static=!1,void t.body.push(this.parseClassProperty(o))}if(r)throw this.unexpected();i=!0}this.parseClassMemberWithIsStatic(t,e,s,i)},s.parseClassMemberWithIsStatic=function(t,e,s,i){var r=e,a=e,n=e,o=e,p=r,c=r;if(e.static=i,this.eat(h.star))return p.kind="method",this.parseClassPropertyName(p),"PrivateName"===p.key.type?void this.pushClassPrivateMethod(t,a,!0,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't be a generator"),void this.pushClassMethod(t,r,!0,!1,!1));var l=this.parseClassPropertyName(e),u="PrivateName"===l.type,d="Identifier"===l.type;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(p.kind="method",u)return void this.pushClassPrivateMethod(t,a,!1,!1);var f=this.isNonstaticConstructor(r);f&&(r.kind="constructor",r.decorators&&this.raise(r.start,"You can't attach decorators to a class constructor"),s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(l.start,"Duplicate constructor in the same class"),s.hadConstructor=!0),this.pushClassMethod(t,r,!1,!1,f)}else if(this.isClassProperty())u?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n);else if(d&&"async"===l.name&&!this.isLineTerminator()){var m=this.eat(h.star);p.kind="method",this.parseClassPropertyName(p),"PrivateName"===p.key.type?this.pushClassPrivateMethod(t,a,m,!0):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't be an async function"),this.pushClassMethod(t,r,m,!0,!1))}else!d||"get"!==l.name&&"set"!==l.name||this.isLineTerminator()&&this.match(h.star)?this.isLineTerminator()?u?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n):this.unexpected():(p.kind=l.name,this.parseClassPropertyName(r),"PrivateName"===p.key.type?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(t,r,!1,!1,!1)),this.checkGetterSetterParams(r))},s.parseClassPropertyName=function(t){var 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},s.pushClassProperty=function(t,e){this.isNonstaticConstructor(e)&&this.raise(e.key.start,"Classes may not have a non-static field named 'constructor'"),t.body.push(this.parseClassProperty(e))},s.pushClassPrivateProperty=function(t,e){this.expectPlugin("classPrivateProperties",e.key.start),t.body.push(this.parseClassPrivateProperty(e))},s.pushClassMethod=function(t,e,s,i,r){t.body.push(this.parseMethod(e,s,i,r,"ClassMethod"))},s.pushClassPrivateMethod=function(t,e,s,i){this.expectPlugin("classPrivateMethods",e.key.start),t.body.push(this.parseMethod(e,s,i,!1,"ClassPrivateMethod"))},s.parsePostMemberNameModifiers=function(t){},s.parseAccessModifier=function(){},s.parseClassPrivateProperty=function(t){var e=this.state.inMethod;return this.state.inMethod=!1,this.state.inClassProperty=!0,t.value=this.eat(h.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.state.inMethod=e,this.finishNode(t,"ClassPrivateProperty")},s.parseClassProperty=function(t){t.typeAnnotation||this.expectPlugin("classProperties");var e=this.state.inMethod;return this.state.inMethod=!1,this.state.inClassProperty=!0,this.match(h.eq)?(this.expectPlugin("classProperties"),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.state.inMethod=e,this.finishNode(t,"ClassProperty")},s.parseClassId=function(t,e,s){this.match(h.name)?t.id=this.parseIdentifier():s||!e?t.id=null:this.unexpected(null,"A class name is required")},s.parseClassSuper=function(t){t.superClass=this.eat(h._extends)?this.parseExprSubscripts():null},s.parseExport=function(t){if(this.shouldParseExportStar()){if(this.parseExportStar(t),"ExportAllDeclaration"===t.type)return t}else if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");var e=this.startNode();e.exported=this.parseIdentifier(!0);var s=[this.finishNode(e,"ExportDefaultSpecifier")];if(t.specifiers=s,this.match(h.comma)&&this.lookahead().type===h.star){this.expect(h.comma);var i=this.startNode();this.expect(h.star),this.expectContextual("as"),i.exported=this.parseIdentifier(),s.push(this.finishNode(i,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(t);this.parseExportFrom(t,!0)}else{if(this.eat(h._default))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){var r=this.lookahead();r.type!==h._function&&this.unexpected(r.start,'Unexpected token, expected "function"')}t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t)}else t.declaration=null,t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t)}return this.checkExport(t,!0),this.finishNode(t,"ExportNamedDeclaration")},s.isAsyncFunction=function(){if(!this.isContextual("async"))return!1;var t=this.state,e=t.input,s=t.pos;O.lastIndex=s;var i=O.exec(e);if(!i||!i.length)return!1;var r=s+i[0].length;return!(S.test(e.slice(s,r))||"function"!==e.slice(r,r+8)||r+8!==e.length&&w(e.charAt(r+8)))},s.parseExportDefaultExpression=function(){var t=this.startNode(),e=this.isAsyncFunction();if(this.eat(h._function)||e)return e&&(this.eatContextual("async"),this.expect(h._function)),this.parseFunction(t,!0,!1,e,!0);if(this.match(h._class))return this.parseClass(t,!0,!0);if(this.match(h.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(h._let)||this.match(h._const)||this.match(h._var))return this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");var s=this.parseMaybeAssign();return this.semicolon(),s},s.parseExportDeclaration=function(t){return this.parseStatement(!0)},s.isExportDefaultSpecifier=function(){if(this.match(h.name))return"async"!==this.state.value;if(!this.match(h._default))return!1;var t=this.lookahead();return t.type===h.comma||t.type===h.name&&"from"===t.value},s.parseExportSpecifiersMaybe=function(t){this.eat(h.comma)&&(t.specifiers=t.specifiers.concat(this.parseExportSpecifiers()))},s.parseExportFrom=function(t,e){this.eatContextual("from")?(t.source=this.match(h.string)?this.parseExprAtom():this.unexpected(),this.checkExport(t)):e?this.unexpected():t.source=null,this.semicolon()},s.shouldParseExportStar=function(){return this.match(h.star)},s.parseExportStar=function(t){this.expect(h.star),this.isContextual("as")?this.parseExportNamespace(t):(this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration"))},s.parseExportNamespace=function(t){this.expectPlugin("exportNamespaceFrom");var e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);this.next(),e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(t),this.parseExportFrom(t,!0)},s.shouldParseExportDeclaration=function(){if(this.match(h.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||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isAsyncFunction()},s.checkExport=function(t,e,s){if(e)if(s)this.checkDuplicateExports(t,"default");else if(t.specifiers&&t.specifiers.length)for(var i=0,r=t.specifiers;i-1&&this.raiseDuplicateExportError(t,e),this.state.exportedIdentifiers.push(e)},s.raiseDuplicateExportError=function(t,e){throw this.raise(t.start,"default"===e?"Only one default export allowed per module.":"`"+e+"` has already been exported. Exported identifiers must be unique.")},s.parseExportSpecifiers=function(){var t,e=[],s=!0;for(this.expect(h.braceL);!this.eat(h.braceR);){if(s)s=!1;else if(this.expect(h.comma),this.eat(h.braceR))break;var i=this.match(h._default);i&&!t&&(t=!0);var r=this.startNode();r.local=this.parseIdentifier(i),r.exported=this.eatContextual("as")?this.parseIdentifier(!0):r.local.__clone(),e.push(this.finishNode(r,"ExportSpecifier"))}return t&&!this.isContextual("from")&&this.unexpected(),e},s.parseImport=function(t){return this.match(h.string)?(t.specifiers=[],t.source=this.parseExprAtom()):(t.specifiers=[],this.parseImportSpecifiers(t),this.expectContextual("from"),t.source=this.match(h.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},s.shouldParseDefaultImport=function(t){return this.match(h.name)},s.parseImportSpecifierLocal=function(t,e,s,i){e.local=this.parseIdentifier(),this.checkLVal(e.local,!0,void 0,i),t.specifiers.push(this.finishNode(e,s))},s.parseImportSpecifiers=function(t){var e=!0;if(!this.shouldParseDefaultImport(t)||(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),this.eat(h.comma))){if(this.match(h.star)){var s=this.startNode();return this.next(),this.expectContextual("as"),void this.parseImportSpecifierLocal(t,s,"ImportNamespaceSpecifier","import namespace specifier")}for(this.expect(h.braceL);!this.eat(h.braceR);){if(e)e=!1;else if(this.eat(h.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(h.comma),this.eat(h.braceR))break;this.parseImportSpecifier(t)}}},s.parseImportSpecifier=function(t){var 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,!0,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))},e}(function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.checkPropClash=function(t,e){if(!t.computed&&!t.kind){var 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)}},s.getExpression=function(){this.nextToken();var t=this.parseExpression();return this.match(h.eof)||this.unexpected(),t.comments=this.state.comments,t},s.parseExpression=function(t,e){var s=this.state.start,i=this.state.startLoc,r=this.parseMaybeAssign(t,e);if(this.match(h.comma)){var a=this.startNodeAt(s,i);for(a.expressions=[r];this.eat(h.comma);)a.expressions.push(this.parseMaybeAssign(t,e));return this.toReferencedList(a.expressions),this.finishNode(a,"SequenceExpression")}return r},s.parseMaybeAssign=function(t,e,s,i){var r,a=this.state.start,n=this.state.startLoc;if(this.match(h._yield)&&this.state.inGenerator){var o=this.parseYield();return s&&(o=s.call(this,o,a,n)),o}e?r=!1:(e={start:0},r=!0),(this.match(h.parenL)||this.match(h.name)||this.match(h._yield))&&(this.state.potentialArrowAt=this.state.start);var p=this.parseMaybeConditional(t,e,i);if(s&&(p=s.call(this,p,a,n)),this.state.type.isAssign){var c,l=this.startNodeAt(a,n),u=this.state.value;if(l.operator=u,"??="===u&&(this.expectPlugin("nullishCoalescingOperator"),this.expectPlugin("logicalAssignment")),"||="!==u&&"&&="!==u||this.expectPlugin("logicalAssignment"),l.left=this.match(h.eq)?this.toAssignable(p,void 0,"assignment expression"):p,e.start=0,this.checkLVal(p,void 0,void 0,"assignment expression"),p.extra&&p.extra.parenthesized)"ObjectPattern"===p.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===p.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(p.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c);return this.next(),l.right=this.parseMaybeAssign(t),this.finishNode(l,"AssignmentExpression")}return r&&e.start&&this.unexpected(e.start),p},s.parseMaybeConditional=function(t,e,s){var i=this.state.start,r=this.state.startLoc,a=this.state.potentialArrowAt,n=this.parseExprOps(t,e);return"ArrowFunctionExpression"===n.type&&n.start===a?n:e&&e.start?n:this.parseConditional(n,t,i,r,s)},s.parseConditional=function(t,e,s,i,r){if(this.eat(h.question)){var a=this.startNodeAt(s,i);return a.test=t,a.consequent=this.parseMaybeAssign(),this.expect(h.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return t},s.parseExprOps=function(t,e){var s=this.state.start,i=this.state.startLoc,r=this.state.potentialArrowAt,a=this.parseMaybeUnary(e);return"ArrowFunctionExpression"===a.type&&a.start===r?a:e&&e.start?a:this.parseExprOp(a,s,i,-1,t)},s.parseExprOp=function(t,e,s,i,r){var a=this.state.type.binop;if(!(null==a||r&&this.match(h._in))&&a>i){var n=this.startNodeAt(e,s),o=this.state.value;n.left=t,n.operator=o,"**"!==o||"UnaryExpression"!==t.type||t.extra&&t.extra.parenthesized||this.raise(t.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var p=this.state.type;p===h.nullishCoalescing?this.expectPlugin("nullishCoalescingOperator"):p===h.pipeline&&this.expectPlugin("pipelineOperator"),this.next();var c=this.state.start,l=this.state.startLoc;if(p===h.pipeline&&this.match(h.name)&&"await"===this.state.value&&this.state.inAsync)throw this.raise(this.state.start,'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal');return n.right=this.parseExprOp(this.parseMaybeUnary(),c,l,p.rightAssociative?a-1:a,r),this.finishNode(n,p===h.logicalOR||p===h.logicalAND||p===h.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(n,e,s,i,r)}return t},s.parseMaybeUnary=function(t){if(this.state.type.prefix){var e=this.startNode(),s=this.match(h.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){var i=e.argument;"Identifier"===i.type?this.raise(e.start,"Deleting local variable in strict mode"):"MemberExpression"===i.type&&"PrivateName"===i.property.type&&this.raise(e.start,"Deleting a private field is not allowed")}return this.finishNode(e,s?"UpdateExpression":"UnaryExpression")}var r=this.state.start,a=this.state.startLoc,n=this.parseExprSubscripts(t);if(t&&t.start)return n;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(r,a);o.operator=this.state.value,o.prefix=!1,o.argument=n,this.checkLVal(n,void 0,void 0,"postfix operation"),this.next(),n=this.finishNode(o,"UpdateExpression")}return n},s.parseExprSubscripts=function(t){var e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseExprAtom(t);return"ArrowFunctionExpression"===r.type&&r.start===i?r:t&&t.start?r:this.parseSubscripts(r,e,s)},s.parseSubscripts=function(t,e,s,i){var r={optionalChainMember:!1,stop:!1};do{t=this.parseSubscript(t,e,s,i,r)}while(!r.stop);return t},s.parseSubscript=function(t,e,s,i,r){if(!i&&this.eat(h.doubleColon)){var a=this.startNodeAt(e,s);return a.object=t,a.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),e,s,i)}if(this.match(h.questionDot)){if(this.expectPlugin("optionalChaining"),r.optionalChainMember=!0,i&&this.lookahead().type==h.parenL)return r.stop=!0,t;this.next();var n=this.startNodeAt(e,s);if(this.eat(h.bracketL))return n.object=t,n.property=this.parseExpression(),n.computed=!0,n.optional=!0,this.expect(h.bracketR),this.finishNode(n,"OptionalMemberExpression");if(this.eat(h.parenL)){var o=this.atPossibleAsync(t);return n.callee=t,n.arguments=this.parseCallExpressionArguments(h.parenR,o),n.optional=!0,this.finishNode(n,"OptionalCallExpression")}return n.object=t,n.property=this.parseIdentifier(!0),n.computed=!1,n.optional=!0,this.finishNode(n,"OptionalMemberExpression")}if(this.eat(h.dot)){var p=this.startNodeAt(e,s);return p.object=t,p.property=this.parseMaybePrivateName(),p.computed=!1,r.optionalChainMember?(p.optional=!1,this.finishNode(p,"OptionalMemberExpression")):this.finishNode(p,"MemberExpression")}if(this.eat(h.bracketL)){var c=this.startNodeAt(e,s);return c.object=t,c.property=this.parseExpression(),c.computed=!0,this.expect(h.bracketR),r.optionalChainMember?(c.optional=!1,this.finishNode(c,"OptionalMemberExpression")):this.finishNode(c,"MemberExpression")}if(!i&&this.match(h.parenL)){var l=this.state.maybeInArrowParameters,u=this.state.yieldOrAwaitInPossibleArrowParameters;this.state.maybeInArrowParameters=!0,this.state.yieldOrAwaitInPossibleArrowParameters=null;var d=this.atPossibleAsync(t);this.next();var f=this.startNodeAt(e,s);f.callee=t;var m={start:-1};return f.arguments=this.parseCallExpressionArguments(h.parenR,d,m),r.optionalChainMember?this.finishOptionalCallExpression(f):this.finishCallExpression(f),d&&this.shouldParseAsyncArrow()?(r.stop=!0,m.start>-1&&this.raise(m.start,"A trailing comma is not permitted after the rest element"),f=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),f),this.state.yieldOrAwaitInPossibleArrowParameters=u):(this.toReferencedList(f.arguments),this.state.yieldOrAwaitInPossibleArrowParameters=this.state.yieldOrAwaitInPossibleArrowParameters||u),this.state.maybeInArrowParameters=l,f}return this.match(h.backQuote)?this.parseTaggedTemplateExpression(e,s,t,r):(r.stop=!0,t)},s.parseTaggedTemplateExpression=function(t,e,s,i,r){var a=this.startNodeAt(t,e);return a.tag=s,a.quasi=this.parseTemplate(!0),r&&(a.typeParameters=r),i.optionalChainMember&&this.raise(t,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(a,"TaggedTemplateExpression")},s.atPossibleAsync=function(t){return!this.state.containsEsc&&this.state.potentialArrowAt===t.start&&"Identifier"===t.type&&"async"===t.name&&!this.canInsertSemicolon()},s.finishCallExpression=function(t){if("Import"===t.callee.type){1!==t.arguments.length&&this.raise(t.start,"import() requires exactly one argument");var e=t.arguments[0];e&&"SpreadElement"===e.type&&this.raise(e.start,"... is not allowed in import()")}return this.finishNode(t,"CallExpression")},s.finishOptionalCallExpression=function(t){if("Import"===t.callee.type){1!==t.arguments.length&&this.raise(t.start,"import() requires exactly one argument");var e=t.arguments[0];e&&"SpreadElement"===e.type&&this.raise(e.start,"... is not allowed in import()")}return this.finishNode(t,"OptionalCallExpression")},s.parseCallExpressionArguments=function(t,e,s){for(var i,r=[],a=!0;!this.eat(t);){if(a)a=!1;else if(this.expect(h.comma),this.eat(t))break;this.match(h.parenL)&&!i&&(i=this.state.start),r.push(this.parseExprListItem(!1,e?{start:0}:void 0,e?{start:0}:void 0,e?s:void 0))}return e&&i&&this.shouldParseAsyncArrow()&&this.unexpected(),r},s.shouldParseAsyncArrow=function(){return this.match(h.arrow)},s.parseAsyncArrowFromCallExpression=function(t,e){return this.expect(h.arrow),this.parseArrowExpression(t,e.arguments,!0),t},s.parseNoCallExpr=function(){var t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)},s.parseExprAtom=function(t){var e,s=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case h._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"super is only allowed in object methods and classes"),e=this.startNode(),this.next(),this.match(h.parenL)||this.match(h.bracketL)||this.match(h.dot)||this.unexpected(),this.match(h.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(e.start,"super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'."),this.finishNode(e,"Super");case h._import:return this.lookahead().type===h.dot?this.parseImportMetaProperty():(this.expectPlugin("dynamicImport"),e=this.startNode(),this.next(),this.match(h.parenL)||this.unexpected(null,h.parenL),this.finishNode(e,"Import"));case h._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case h._yield:this.state.inGenerator&&this.unexpected();case h.name:e=this.startNode();var i="await"===this.state.value&&(this.state.inAsync||!this.state.inFunction&&this.options.allowAwaitOutsideFunction),r=this.state.containsEsc,a=this.shouldAllowYieldIdentifier(),n=this.parseIdentifier(i||a);if("await"===n.name){if(this.state.inAsync||this.inModule||!this.state.inFunction&&this.options.allowAwaitOutsideFunction)return this.parseAwait(e)}else{if(!r&&"async"===n.name&&this.match(h._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(e,!1,!1,!0);if(s&&!this.canInsertSemicolon()&&"async"===n.name&&this.match(h.name)){var o=this.state.yieldOrAwaitInPossibleArrowParameters,p=this.state.inAsync;this.state.yieldOrAwaitInPossibleArrowParameters=null,this.state.inAsync=!0;var c=[this.parseIdentifier()];return this.expect(h.arrow),this.parseArrowExpression(e,c,!0),this.state.yieldOrAwaitInPossibleArrowParameters=o,this.state.inAsync=p,e}}if(s&&!this.canInsertSemicolon()&&this.eat(h.arrow)){var l=this.state.yieldOrAwaitInPossibleArrowParameters;return this.state.yieldOrAwaitInPossibleArrowParameters=null,this.parseArrowExpression(e,[n]),this.state.yieldOrAwaitInPossibleArrowParameters=l,e}return n;case h._do:this.expectPlugin("doExpressions");var u=this.startNode();this.next();var d=this.state.inFunction,f=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,u.body=this.parseBlock(!1),this.state.inFunction=d,this.state.labels=f,this.finishNode(u,"DoExpression");case h.regexp:var m=this.state.value;return(e=this.parseLiteral(m.value,"RegExpLiteral")).pattern=m.pattern,e.flags=m.flags,e;case h.num:return this.parseLiteral(this.state.value,"NumericLiteral");case h.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case h.string:return this.parseLiteral(this.state.value,"StringLiteral");case h._null:return e=this.startNode(),this.next(),this.finishNode(e,"NullLiteral");case h._true:case h._false:return this.parseBooleanLiteral();case h.parenL:return this.parseParenAndDistinguishExpression(s);case h.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(h.bracketR,!0,t),this.toReferencedList(e.elements),this.finishNode(e,"ArrayExpression");case h.braceL:return this.parseObj(!1,t);case h._function:return this.parseFunctionExpression();case h.at:this.parseDecorators();case h._class:return e=this.startNode(),this.takeDecorators(e),this.parseClass(e,!1);case h._new:return this.parseNew();case h.backQuote:return this.parseTemplate(!1);case h.doubleColon:e=this.startNode(),this.next(),e.object=null;var y=e.callee=this.parseNoCallExpr();if("MemberExpression"===y.type)return this.finishNode(e,"BindExpression");throw this.raise(y.start,"Binding should be performed on object property.");default:throw this.unexpected()}},s.parseBooleanLiteral=function(){var t=this.startNode();return t.value=this.match(h._true),this.next(),this.finishNode(t,"BooleanLiteral")},s.parseMaybePrivateName=function(){if(this.match(h.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);var t=this.startNode(),e=this.state.end;this.next();var s=this.state.start;return 0!=s-e&&this.raise(s,"Unexpected space between # and identifier"),t.id=this.parseIdentifier(!0),this.finishNode(t,"PrivateName")}return this.parseIdentifier(!0)},s.parseFunctionExpression=function(){var t=this.startNode(),e=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(h.dot)?this.parseMetaProperty(t,e,"sent"):this.parseFunction(t,!1)},s.parseMetaProperty=function(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());var i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(t.property.start,"The only valid meta property for "+e.name+" is "+e.name+"."+s),this.finishNode(t,"MetaProperty")},s.parseImportMetaProperty=function(){var t=this.startNode(),e=this.parseIdentifier(!0);return this.expect(h.dot),"import"===e.name&&(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")},s.parseLiteral=function(t,e,s,i){s=s||this.state.start,i=i||this.state.startLoc;var r=this.startNodeAt(s,i);return this.addExtra(r,"rawValue",t),this.addExtra(r,"raw",this.input.slice(s,this.state.end)),r.value=t,this.next(),this.finishNode(r,e)},s.parseParenExpression=function(){this.expect(h.parenL);var t=this.parseExpression();return this.expect(h.parenR),t},s.parseParenAndDistinguishExpression=function(t){var e,s=this.state.start,i=this.state.startLoc;this.expect(h.parenL);var r=this.state.maybeInArrowParameters,a=this.state.yieldOrAwaitInPossibleArrowParameters;this.state.maybeInArrowParameters=!0,this.state.yieldOrAwaitInPossibleArrowParameters=null;for(var n,o,p=this.state.start,c=this.state.startLoc,l=[],u={start:0},d={start:0},f=!0;!this.match(h.parenR);){if(f)f=!1;else if(this.expect(h.comma,d.start||null),this.match(h.parenR)){o=this.state.start;break}if(this.match(h.ellipsis)){var m=this.state.start,y=this.state.startLoc;n=this.state.start,l.push(this.parseParenItem(this.parseRest(),m,y)),this.match(h.comma)&&this.lookahead().type===h.parenR&&this.raise(this.state.start,"A trailing comma is not permitted after the rest element");break}l.push(this.parseMaybeAssign(!1,u,this.parseParenItem,d))}var x=this.state.start,v=this.state.startLoc;this.expect(h.parenR),this.state.maybeInArrowParameters=r;var P=this.startNodeAt(s,i);if(t&&this.shouldParseArrow()&&(P=this.parseArrow(P))){for(var g=0;g1?((e=this.startNodeAt(p,c)).expressions=l,this.toReferencedList(e.expressions),this.finishNodeAt(e,"SequenceExpression",x,v)):e=l[0],this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",s),e},s.shouldParseArrow=function(){return!this.canInsertSemicolon()},s.parseArrow=function(t){if(this.eat(h.arrow))return t},s.parseParenItem=function(t,e,s){return t},s.parseNew=function(){var t=this.startNode(),e=this.parseIdentifier(!0);if(this.eat(h.dot)){var s=this.parseMetaProperty(t,e,"target");if(!this.state.inFunction&&!this.state.inClassProperty){var i="new.target can only be used in functions";this.hasPlugin("classProperties")&&(i+=" or class properties"),this.raise(s.start,i)}return s}return t.callee=this.parseNoCallExpr(),"OptionalMemberExpression"!==t.callee.type&&"OptionalCallExpression"!==t.callee.type||this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"),this.eat(h.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(t),this.finishNode(t,"NewExpression")},s.parseNewArguments=function(t){if(this.eat(h.parenL)){var e=this.parseExprList(h.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]},s.parseTemplateElement=function(t){var 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(h.backQuote),this.finishNode(e,"TemplateElement")},s.parseTemplate=function(t){var e=this.startNode();this.next(),e.expressions=[];var s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(h.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(h.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")},s.parseObj=function(t,e){var s=[],i=Object.create(null),r=!0,a=this.startNode();a.properties=[],this.next();for(var n=null;!this.eat(h.braceR);){if(r)r=!1;else if(this.expect(h.comma),this.eat(h.braceR))break;if(this.match(h.at))if(this.hasPlugin("decorators"))this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");else for(;this.match(h.at);)s.push(this.parseDecorator());var o=this.startNode(),p=!1,c=!1,l=void 0,u=void 0;if(s.length&&(o.decorators=s,s=[]),this.match(h.ellipsis)){if(o=this.parseSpread(t?{start:0}:void 0),t&&this.toAssignable(o,!0,"object pattern"),a.properties.push(o),!t)continue;var d=this.state.start;if(null!==n)this.unexpected(n,"Cannot have multiple rest elements when destructuring");else{if(this.eat(h.braceR))break;if(!this.match(h.comma)||this.lookahead().type!==h.braceR){n=d;continue}this.unexpected(d,"A trailing comma is not permitted after the rest element")}}o.method=!1,(t||e)&&(l=this.state.start,u=this.state.startLoc),t||(p=this.eat(h.star));var f=this.state.containsEsc;if(!t&&this.isContextual("async")){p&&this.unexpected();var m=this.parseIdentifier();this.match(h.colon)||this.match(h.parenL)||this.match(h.braceR)||this.match(h.eq)||this.match(h.comma)?(o.key=m,o.computed=!1):(c=!0,p=this.eat(h.star),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,l,u,p,c,t,e,f),this.checkPropClash(o,i),o.shorthand&&this.addExtra(o,"shorthand",!0),a.properties.push(o)}return null!==n&&this.unexpected(n,"The rest element has to be the last element when destructuring"),s.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(a,t?"ObjectPattern":"ObjectExpression")},s.isGetterOrSetterMethod=function(t,e){return!e&&!t.computed&&"Identifier"===t.key.type&&("get"===t.key.name||"set"===t.key.name)&&(this.match(h.string)||this.match(h.num)||this.match(h.bracketL)||this.match(h.name)||!!this.state.type.keyword)},s.checkGetterSetterParams=function(t){var e="get"===t.kind?0:1,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[0].type&&this.raise(s,"setter function argument must not be a rest parameter")},s.parseObjectMethod=function(t,e,s,i,r){return s||e||this.match(h.parenL)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,"ObjectMethod")):!r&&this.isGetterOrSetterMethod(t,i)?((e||s)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),this.parseMethod(t,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):void 0},s.parseObjectProperty=function(t,e,s,i,r){return t.shorthand=!1,this.eat(h.colon)?(t.value=i?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,r),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!0),i?t.value=this.parseMaybeDefault(e,s,t.key.__clone()):this.match(h.eq)&&r?(r.start||(r.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"))},s.parseObjPropValue=function(t,e,s,i,r,a,n,o){var h=this.parseObjectMethod(t,i,r,a,o)||this.parseObjectProperty(t,e,s,a,n);return h||this.unexpected(),h},s.parsePropertyName=function(t){if(this.eat(h.bracketL))t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(h.bracketR);else{var e=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(h.num)||this.match(h.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==t.key.type&&(t.computed=!1),this.state.inPropertyName=e}return t.key},s.initFunction=function(t,e){t.id=null,t.generator=!1,t.async=!!e},s.parseMethod=function(t,e,s,i,r){var a=this.state.inFunction,n=this.state.inMethod,o=this.state.inAsync,h=this.state.inGenerator;this.state.inFunction=!0,this.state.inMethod=t.kind||!0,this.state.inAsync=s,this.state.inGenerator=e,this.initFunction(t,s),t.generator=!!e;var p=i;return this.parseFunctionParams(t,p),this.parseFunctionBodyAndFinish(t,r),this.state.inFunction=a,this.state.inMethod=n,this.state.inAsync=o,this.state.inGenerator=h,t},s.parseArrowExpression=function(t,e,s){var i=this.state.yieldOrAwaitInPossibleArrowParameters;i&&("YieldExpression"===i.type?this.raise(i.start,"yield is not allowed in the parameters of an arrow function inside a generator"):this.raise(i.start,"await is not allowed in the parameters of an arrow function inside an async function"));var r=this.state.inFunction;this.state.inFunction=!0,this.initFunction(t,s),e&&this.setArrowFunctionParameters(t,e);var a=this.state.inAsync,n=this.state.inGenerator,o=this.state.maybeInArrowParameters;return this.state.inAsync=!0,this.state.inGenerator=!1,this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.state.inAsync=a,this.state.inGenerator=n,this.state.inFunction=r,this.state.maybeInArrowParameters=o,this.finishNode(t,"ArrowFunctionExpression")},s.setArrowFunctionParameters=function(t,e){t.params=this.toAssignableList(e,!0,"arrow function parameters")},s.isStrictBody=function(t){if("BlockStatement"===t.body.type&&t.body.directives.length)for(var e=0,s=t.body.directives;e0)for(var e=0,s=t.body.body;e=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var 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(h.jsxTagStart)):this.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(h.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:L(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}},s.jsxReadNewLine=function(t){var e,s=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===s&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,e=t?"\n":"\r\n"):e=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,e},s.jsxReadString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):L(i)?(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(h.string,e)},s.jsxReadEntity=function(){for(var t,e="",s=0,i=this.input[this.state.pos],r=++this.state.pos;this.state.pos"):!F(r)&&F(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <"+B(r.name)+">"):F(r)||F(a)||B(a.name)!==B(r.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+B(r.name)+">")}return F(r)?(s.openingFragment=r,s.closingFragment=a):(s.openingElement=r,s.closingElement=a),s.children=i,this.match(h.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 <>...?"),F(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")},s.jsxParseElement=function(){var t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)},s.parseExprAtom=function(e){return this.match(h.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(h.jsxTagStart)?this.jsxParseElement():t.prototype.parseExprAtom.call(this,e)},s.readToken=function(e){if(this.state.inPropertyName)return t.prototype.readToken.call(this,e);var s=this.curContext();if(s===_.j_expr)return this.jsxReadToken();if(s===_.j_oTag||s===_.j_cTag){if(b(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(h.jsxTagEnd);if((34===e||39===e)&&s===_.j_oTag)return this.jsxReadString(e)}return 60===e&&this.state.exprAllowed?(++this.state.pos,this.finishToken(h.jsxTagStart)):t.prototype.readToken.call(this,e)},s.updateContext=function(e){if(this.match(h.braceL)){var s=this.curContext();s===_.j_oTag?this.state.context.push(_.braceExpression):s===_.j_expr?this.state.context.push(_.templateQuasi):t.prototype.updateContext.call(this,e),this.state.exprAllowed=!0}else{if(!this.match(h.slash)||e!==h.jsxTagStart)return t.prototype.updateContext.call(this,e);this.state.context.length-=2,this.state.context.push(_.j_cTag),this.state.exprAllowed=!1}},e}(t)},flow:function(t){return function(t){function e(e,s){var i;return(i=t.call(this,e,s)||this).flowPragma=void 0,i}i(e,t);var s=e.prototype;return s.shouldParseTypes=function(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma},s.addComment=function(e){if(void 0===this.flowPragma){var s=C.exec(e.value);if(s)if("flow"===s[1])this.flowPragma="flow";else{if("noflow"!==s[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else this.flowPragma=null}return t.prototype.addComment.call(this,e)},s.flowParseTypeInitialiser=function(t){var e=this.state.inType;this.state.inType=!0,this.expect(t||h.colon);var s=this.flowParseType();return this.state.inType=e,s},s.flowParsePredicate=function(){var t=this.startNode(),e=this.state.startLoc,s=this.state.start;this.expect(h.modulo);var i=this.state.startLoc;return this.expectContextual("checks"),e.line===i.line&&e.column===i.column-1||this.raise(s,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(h.parenL)?(t.value=this.parseExpression(),this.expect(h.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")},s.flowParseTypeAndPredicateInitialiser=function(){var t=this.state.inType;this.state.inType=!0,this.expect(h.colon);var e=null,s=null;return this.match(h.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(h.modulo)&&(s=this.flowParsePredicate())),[e,s]},s.flowParseDeclareClass=function(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")},s.flowParseDeclareFunction=function(t){this.next();var e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(h.parenL);var r=this.flowParseFunctionTypeParams();s.params=r.params,s.rest=r.rest,this.expect(h.parenR);var a=this.flowParseTypeAndPredicateInitialiser();return s.returnType=a[0],t.predicate=a[1],i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.finishNode(e,e.type),this.semicolon(),this.finishNode(t,"DeclareFunction")},s.flowParseDeclare=function(t,e){if(this.match(h._class))return this.flowParseDeclareClass(t);if(this.match(h._function))return this.flowParseDeclareFunction(t);if(this.match(h._var))return this.flowParseDeclareVariable(t);if(this.isContextual("module"))return this.lookahead().type===h.dot?this.flowParseDeclareModuleExports(t):(e&&this.unexpected(null,"`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(h._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()},s.flowParseDeclareVariable=function(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.semicolon(),this.finishNode(t,"DeclareVariable")},s.flowParseDeclareModule=function(t){var e=this;this.next(),this.match(h.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();var s=t.body=this.startNode(),i=s.body=[];for(this.expect(h.braceL);!this.match(h.braceR);){var r=this.startNode();if(this.match(h._import)){var a=this.lookahead();"type"!==a.value&&"typeof"!==a.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.next(),this.parseImport(r)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),r=this.flowParseDeclare(r,!0);i.push(r)}this.expect(h.braceR),this.finishNode(s,"BlockStatement");var n=null,o=!1,p="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";return i.forEach(function(t){!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(o&&e.unexpected(t.start,"Duplicate `declare module.exports` statement"),"ES"===n&&e.unexpected(t.start,p),n="CommonJS",o=!0):("CommonJS"===n&&e.unexpected(t.start,p),n="ES")}),t.kind=n||"CommonJS",this.finishNode(t,"DeclareModule")},s.flowParseDeclareExportDeclaration=function(t,e){if(this.expect(h._export),this.eat(h._default))return this.match(h._function)||this.match(h._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(h._const)||this.match(h._let)||(this.isContextual("type")||this.isContextual("interface"))&&!e){var s=this.state.value,i=N[s];this.unexpected(this.state.start,"`declare export "+s+"` is not supported. Use `"+i+"` instead")}if(this.match(h._var)||this.match(h._function)||this.match(h._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(h.star)||this.match(h.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()},s.flowParseDeclareModuleExports=function(t){return this.expectContextual("module"),this.expect(h.dot),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")},s.flowParseDeclareTypeAlias=function(t){return this.next(),this.flowParseTypeAlias(t),this.finishNode(t,"DeclareTypeAlias")},s.flowParseDeclareOpaqueType=function(t){return this.next(),this.flowParseOpaqueType(t,!0),this.finishNode(t,"DeclareOpaqueType")},s.flowParseDeclareInterface=function(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")},s.flowParseInterfaceish=function(t,e){if(void 0===e&&(e=!1),t.id=this.flowParseRestrictedIdentifier(!e),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(h._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(h.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(h.comma))}if(this.isContextual("implements")){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(h.comma))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})},s.flowParseInterfaceExtends=function(){var t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")},s.flowParseInterface=function(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")},s.checkNotUnderscore=function(t){if("_"===t)throw this.unexpected(null,"`_` is only allowed as a type argument to call or new")},s.checkReservedType=function(t,e){T.indexOf(t)>-1&&this.raise(e,"Cannot overwrite primitive type "+t)},s.flowParseRestrictedIdentifier=function(t){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(t)},s.flowParseTypeAlias=function(t){return t.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(h.eq),this.semicolon(),this.finishNode(t,"TypeAlias")},s.flowParseOpaqueType=function(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(h.colon)&&(t.supertype=this.flowParseTypeInitialiser(h.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(h.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")},s.flowParseTypeParameter=function(t,e){if(void 0===t&&(t=!0),void 0===e&&(e=!1),!t&&e)throw new Error("Cannot disallow a default value (`allowDefault`) while also requiring it (`requireDefault`).");var s=this.state.start,i=this.startNode(),r=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return i.name=a.name,i.variance=r,i.bound=a.typeAnnotation,this.match(h.eq)?t?(this.eat(h.eq),i.default=this.flowParseType()):this.unexpected():e&&this.unexpected(s,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(i,"TypeParameter")},s.flowParseTypeParameterDeclaration=function(t){void 0===t&&(t=!0);var e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.isRelational("<")||this.match(h.jsxTagStart)?this.next():this.unexpected();var i=!1;do{var r=this.flowParseTypeParameter(t,i);s.params.push(r),r.default&&(i=!0),this.isRelational(">")||this.expect(h.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")},s.flowParseTypeParameterInstantiation=function(){var t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expectRelational("<");var s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(h.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")},s.flowParseTypeParameterInstantiationCallOrNew=function(){var 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(h.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")},s.flowParseInterfaceType=function(){var t=this.startNode();if(this.expectContextual("interface"),t.extends=[],this.eat(h._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(h.comma));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")},s.flowParseObjectPropertyKey=function(){return this.match(h.num)||this.match(h.string)?this.parseExprAtom():this.parseIdentifier(!0)},s.flowParseObjectTypeIndexer=function(t,e,s){return t.static=e,this.lookahead().type===h.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(h.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")},s.flowParseObjectTypeInternalSlot=function(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(h.bracketR),this.expect(h.bracketR),this.isRelational("<")||this.match(h.parenL)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start))):(t.method=!1,this.eat(h.question)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")},s.flowParseObjectTypeMethodish=function(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration(!1)),this.expect(h.parenL);!this.match(h.parenR)&&!this.match(h.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(h.parenR)||this.expect(h.comma);return this.eat(h.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(h.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")},s.flowParseObjectTypeCallProperty=function(t,e){var s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")},s.flowParseObjectType=function(t){var e=t.allowStatic,s=t.allowExact,i=t.allowSpread,r=t.allowProto,a=t.allowInexact,n=this.state.inType;this.state.inType=!0;var o,p,c=this.startNode();c.callProperties=[],c.properties=[],c.indexers=[],c.internalSlots=[];var l=!1;for(s&&this.match(h.braceBarL)?(this.expect(h.braceBarL),o=h.braceBarR,p=!0):(this.expect(h.braceL),o=h.braceR,p=!1),c.exact=p;!this.match(o);){var u=!1,d=null,f=this.startNode();if(r&&this.isContextual("proto")){var m=this.lookahead();m.type!==h.colon&&m.type!==h.question&&(this.next(),d=this.state.start,e=!1)}if(e&&this.isContextual("static")){var y=this.lookahead();y.type!==h.colon&&y.type!==h.question&&(this.next(),u=!0)}var x=this.flowParseVariance();if(this.eat(h.bracketL))null!=d&&this.unexpected(d),this.eat(h.bracketL)?(x&&this.unexpected(x.start),c.internalSlots.push(this.flowParseObjectTypeInternalSlot(f,u))):c.indexers.push(this.flowParseObjectTypeIndexer(f,u,x));else if(this.match(h.parenL)||this.isRelational("<"))null!=d&&this.unexpected(d),x&&this.unexpected(x.start),c.callProperties.push(this.flowParseObjectTypeCallProperty(f,u));else{var v="init";if(this.isContextual("get")||this.isContextual("set")){var P=this.lookahead();P.type!==h.name&&P.type!==h.string&&P.type!==h.num||(v=this.state.value,this.next())}var g=this.flowParseObjectTypeProperty(f,u,d,x,v,i,a);null===g?l=!0:c.properties.push(g)}this.flowObjectTypeSemicolon()}this.expect(o),i&&(c.inexact=l);var b=this.finishNode(c,"ObjectTypeAnnotation");return this.state.inType=n,b},s.flowParseObjectTypeProperty=function(t,e,s,i,r,a,n){if(this.match(h.ellipsis)){a||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),null!=s&&this.unexpected(s),i&&this.unexpected(i.start,"Spread properties cannot have variance"),this.expect(h.ellipsis);var o=this.eat(h.comma)||this.eat(h.semi);if(this.match(h.braceR)){if(n)return null;this.unexpected(null,"Explicit inexact syntax is only allowed inside inexact objects")}return this.match(h.braceBarR)&&this.unexpected(null,"Explicit inexact syntax cannot appear inside an explicit exact object type"),o&&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=r;var p=!1;return this.isRelational("<")||this.match(h.parenL)?(t.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==r&&"set"!==r||this.flowCheckGetterSetterParams(t)):("init"!==r&&this.unexpected(),t.method=!1,this.eat(h.question)&&(p=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=p,this.finishNode(t,"ObjectTypeProperty")},s.flowCheckGetterSetterParams=function(t){var 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")},s.flowObjectTypeSemicolon=function(){this.eat(h.semi)||this.eat(h.comma)||this.match(h.braceR)||this.match(h.braceBarR)||this.unexpected()},s.flowParseQualifiedTypeIdentifier=function(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;for(var i=s||this.parseIdentifier();this.eat(h.dot);){var r=this.startNodeAt(t,e);r.qualification=i,r.id=this.parseIdentifier(),i=this.finishNode(r,"QualifiedTypeIdentifier")}return i},s.flowParseGenericType=function(t,e,s){var i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},s.flowParseTypeofType=function(){var t=this.startNode();return this.expect(h._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")},s.flowParseTupleType=function(){var t=this.startNode();for(t.types=[],this.expect(h.bracketL);this.state.pos0){var v=c.concat();if(x.length>0){this.state=p,this.state.noArrowAt=v;for(var P=0;P1&&this.raise(p.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),f&&1===y.length){this.state=p,this.state.noArrowAt=v.concat(y[0].start);var w=this.tryParseConditionalConsequent();d=w.consequent,f=w.failed}this.getArrowLikeExpressions(d,!0)}return this.state.noArrowAt=c,this.expect(h.colon),l.test=e,l.consequent=d,l.alternate=this.forwardNoArrowParamsConversionAt(l,function(){return n.parseMaybeAssign(s,void 0,void 0,void 0)}),this.finishNode(l,"ConditionalExpression")},s.tryParseConditionalConsequent=function(){this.state.noArrowParamsConversionAt.push(this.state.start);var t=this.parseMaybeAssign(),e=!this.match(h.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}},s.getArrowLikeExpressions=function(e,s){for(var i=this,r=[e],a=[];0!==r.length;){var n=r.pop();"ArrowFunctionExpression"===n.type?(n.typeParameters||!n.returnType?(this.toAssignableList(n.params,!0,"arrow function parameters"),t.prototype.checkFunctionNameAndParams.call(this,n,!0)):a.push(n),r.push(n.body)):"ConditionalExpression"===n.type&&(r.push(n.consequent),r.push(n.alternate))}if(s){for(var o=0;o1)&&e||this.raise(i.typeAnnotation.start,"The type cast expression is expected to be wrapped with parenthesis")}return t},s.checkLVal=function(e,s,i,r){if("TypeCastExpression"!==e.type)return t.prototype.checkLVal.call(this,e,s,i,r)},s.parseClassProperty=function(e){return this.match(h.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),t.prototype.parseClassProperty.call(this,e)},s.parseClassPrivateProperty=function(e){return this.match(h.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),t.prototype.parseClassPrivateProperty.call(this,e)},s.isClassMethod=function(){return this.isRelational("<")||t.prototype.isClassMethod.call(this)},s.isClassProperty=function(){return this.match(h.colon)||t.prototype.isClassProperty.call(this)},s.isNonstaticConstructor=function(e){return!this.match(h.colon)&&t.prototype.isNonstaticConstructor.call(this,e)},s.pushClassMethod=function(e,s,i,r,a){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration(!1)),t.prototype.pushClassMethod.call(this,e,s,i,r,a)},s.pushClassPrivateMethod=function(e,s,i,r){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.pushClassPrivateMethod.call(this,e,s,i,r)},s.parseClassSuper=function(e){if(t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var s=e.implements=[];do{var i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(h.comma))}},s.parsePropertyName=function(e){var s=this.flowParseVariance(),i=t.prototype.parsePropertyName.call(this,e);return e.variance=s,i},s.parseObjPropValue=function(e,s,i,r,a,n,o,p){var c;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(c=this.flowParseTypeParameterDeclaration(!1),this.match(h.parenL)||this.unexpected()),t.prototype.parseObjPropValue.call(this,e,s,i,r,a,n,o,p),c&&((e.value||e).typeParameters=c)},s.parseAssignableListItemTypes=function(t){if(this.eat(h.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(h.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(t,t.type),t},s.parseMaybeDefault=function(e,s,i){var r=t.prototype.parseMaybeDefault.call(this,e,s,i);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start")}throw new Error("Unreachable")},s.tsParseList=function(t,e){for(var s=[];!this.tsIsListTerminator(t);)s.push(e());return s},s.tsParseDelimitedList=function(t,e){return st(this.tsParseDelimitedListWorker(t,e,!0))},s.tsTryParseDelimitedList=function(t,e){return this.tsParseDelimitedListWorker(t,e,!1)},s.tsParseDelimitedListWorker=function(t,e,s){for(var i=[];!this.tsIsListTerminator(t);){var r=e();if(null==r)return;if(i.push(r),!this.eat(h.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(h.comma))}}return i},s.tsParseBracketedList=function(t,e,s,i){i||(s?this.expect(h.bracketL):this.expectRelational("<"));var r=this.tsParseDelimitedList(t,e);return s?this.expect(h.bracketR):this.expectRelational(">"),r},s.tsParseEntityName=function(t){for(var e=this.parseIdentifier();this.eat(h.dot);){var s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e},s.tsParseTypeReference=function(){var t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")},s.tsParseThisTypePredicate=function(t){this.next();var e=this.startNode();return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")},s.tsParseThisTypeNode=function(){var t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")},s.tsParseTypeQuery=function(){var t=this.startNode();return this.expect(h._typeof),t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")},s.tsParseTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsEatThenParseType(h._extends),t.default=this.tsEatThenParseType(h.eq),this.finishNode(t,"TSTypeParameter")},s.tsTryParseTypeParameters=function(){if(this.isRelational("<"))return this.tsParseTypeParameters()},s.tsParseTypeParameters=function(){var t=this.startNode();return this.isRelational("<")||this.match(h.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(t,"TSTypeParameterDeclaration")},s.tsFillSignature=function(t,e){var s=t===h.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(h.parenL),e.parameters=this.tsParseBindingListForSignature(),s?e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))},s.tsParseBindingListForSignature=function(){var t=this;return this.parseBindingList(h.parenR).map(function(e){if("Identifier"!==e.type&&"RestElement"!==e.type)throw t.unexpected(e.start,"Name in a signature must be an Identifier.");return e})},s.tsParseTypeMemberSemicolon=function(){this.eat(h.comma)||this.semicolon()},s.tsParseSignatureMember=function(t){var e=this.startNode();return"TSConstructSignatureDeclaration"===t&&this.expect(h._new),this.tsFillSignature(h.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)},s.tsIsUnambiguouslyIndexSignature=function(){return this.next(),this.eat(h.name)&&this.match(h.colon)},s.tsTryParseIndexSignature=function(t){if(this.match(h.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(h.bracketL);var e=this.parseIdentifier();this.expect(h.colon),e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.expect(h.bracketR),t.parameters=[e];var s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}},s.tsParsePropertyOrMethodSignature=function(t,e){this.parsePropertyName(t),this.eat(h.question)&&(t.optional=!0);var s=t;if(e||!this.match(h.parenL)&&!this.isRelational("<")){var i=s;e&&(i.readonly=!0);var r=this.tsTryParseTypeAnnotation();return r&&(i.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}var a=s;return this.tsFillSignature(h.colon,a),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSMethodSignature")},s.tsParseTypeMember=function(){if(this.match(h.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration");if(this.match(h._new)&&this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this)))return this.tsParseSignatureMember("TSConstructSignatureDeclaration");var t=this.startNode(),e=!!this.tsParseModifier(["readonly"]),s=this.tsTryParseIndexSignature(t);return s?(e&&(t.readonly=!0),s):this.tsParsePropertyOrMethodSignature(t,e)},s.tsIsStartOfConstructSignature=function(){return this.next(),this.match(h.parenL)||this.isRelational("<")},s.tsParseTypeLiteral=function(){var t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")},s.tsParseObjectTypeMembers=function(){this.expect(h.braceL);var t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(h.braceR),t},s.tsIsStartOfMappedType=function(){return this.next(),this.eat(h.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(h.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(h._in))))},s.tsParseMappedTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsExpectThenParseType(h._in),this.finishNode(t,"TSTypeParameter")},s.tsParseMappedType=function(){var t=this.startNode();return this.expect(h.braceL),this.match(h.plusMin)?(t.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(t.readonly=!0),this.expect(h.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(h.bracketR),this.match(h.plusMin)?(t.optional=this.state.value,this.next(),this.expect(h.question)):this.eat(h.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(h.braceR),this.finishNode(t,"TSMappedType")},s.tsParseTupleType=function(){var t=this,e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);var s=!1;return e.elementTypes.forEach(function(i,r){"TSRestType"===i.type?r!==e.elementTypes.length-1&&t.raise(i.start,"A rest element must be last in a tuple type."):"TSOptionalType"===i.type?s=!0:s&&t.raise(i.start,"A required element cannot follow an optional element.")}),this.finishNode(e,"TSTupleType")},s.tsParseTupleElementType=function(){if(this.match(h.ellipsis)){var t=this.startNode();return this.next(),t.typeAnnotation=this.tsParseType(),this.finishNode(t,"TSRestType")}var e=this.tsParseType();if(this.eat(h.question)){var s=this.startNodeAtNode(e);return s.typeAnnotation=e,this.finishNode(s,"TSOptionalType")}return e},s.tsParseParenthesizedType=function(){var t=this.startNode();return this.expect(h.parenL),t.typeAnnotation=this.tsParseType(),this.expect(h.parenR),this.finishNode(t,"TSParenthesizedType")},s.tsParseFunctionOrConstructorType=function(t){var e=this.startNode();return"TSConstructorType"===t&&this.expect(h._new),this.tsFillSignature(h.arrow,e),this.finishNode(e,t)},s.tsParseLiteralTypeNode=function(){var t=this,e=this.startNode();return e.literal=function(){switch(t.state.type){case h.num:return t.parseLiteral(t.state.value,"NumericLiteral");case h.string:return t.parseLiteral(t.state.value,"StringLiteral");case h._true:case h._false:return t.parseBooleanLiteral();default:throw t.unexpected()}}(),this.finishNode(e,"TSLiteralType")},s.tsParseNonArrayType=function(){switch(this.state.type){case h.name:case h._void:case h._null:var t=this.match(h._void)?"TSVoidKeyword":this.match(h._null)?"TSNullKeyword":function(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";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&&this.lookahead().type!==h.dot){var e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference();case h.string:case h.num:case h._true:case h._false:return this.tsParseLiteralTypeNode();case h.plusMin:if("-"===this.state.value){var s=this.startNode();if(this.next(),!this.match(h.num))throw this.unexpected();return s.literal=this.parseLiteral(-this.state.value,"NumericLiteral",s.start,s.loc.start),this.finishNode(s,"TSLiteralType")}break;case h._this:var i=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(i):i;case h._typeof:return this.tsParseTypeQuery();case h.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case h.bracketL:return this.tsParseTupleType();case h.parenL:return this.tsParseParenthesizedType()}throw this.unexpected()},s.tsParseArrayTypeOrHigher=function(){for(var t=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(h.bracketL);)if(this.match(h.bracketR)){var e=this.startNodeAtNode(t);e.elementType=t,this.expect(h.bracketR),t=this.finishNode(e,"TSArrayType")}else{var s=this.startNodeAtNode(t);s.objectType=t,s.indexType=this.tsParseType(),this.expect(h.bracketR),t=this.finishNode(s,"TSIndexedAccessType")}return t},s.tsParseTypeOperator=function(t){var e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),this.finishNode(e,"TSTypeOperator")},s.tsParseInferType=function(){var t=this.startNode();this.expectContextual("infer");var e=this.startNode();return e.name=this.parseIdentifierName(e.start),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")},s.tsParseTypeOperatorOrHigher=function(){var t=this,e=["keyof","unique"].find(function(e){return t.isContextual(e)});return e?this.tsParseTypeOperator(e):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()},s.tsParseUnionOrIntersectionType=function(t,e,s){this.eat(s);var i=e();if(this.match(s)){for(var r=[i];this.eat(s);)r.push(e());var a=this.startNodeAtNode(i);a.types=r,i=this.finishNode(a,t)}return i},s.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),h.bitwiseAND)},s.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),h.bitwiseOR)},s.tsIsStartOfFunctionType=function(){return!!this.isRelational("<")||this.match(h.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},s.tsSkipParameterStart=function(){return!(!this.match(h.name)&&!this.match(h._this)||(this.next(),0))},s.tsIsUnambiguouslyStartOfFunctionType=function(){if(this.next(),this.match(h.parenR)||this.match(h.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(h.colon)||this.match(h.comma)||this.match(h.question)||this.match(h.eq))return!0;if(this.match(h.parenR)&&(this.next(),this.match(h.arrow)))return!0}return!1},s.tsParseTypeOrTypePredicateAnnotation=function(t){var e=this;return this.tsInType(function(){var s=e.startNode();e.expect(t);var i=e.tsIsIdentifier()&&e.tsTryParse(e.tsParseTypePredicatePrefix.bind(e));if(!i)return e.tsParseTypeAnnotation(!1,s);var r=e.tsParseTypeAnnotation(!1),a=e.startNodeAtNode(i);return a.parameterName=i,a.typeAnnotation=r,s.typeAnnotation=e.finishNode(a,"TSTypePredicate"),e.finishNode(s,"TSTypeAnnotation")})},s.tsTryParseTypeOrTypePredicateAnnotation=function(){return this.match(h.colon)?this.tsParseTypeOrTypePredicateAnnotation(h.colon):void 0},s.tsTryParseTypeAnnotation=function(){return this.match(h.colon)?this.tsParseTypeAnnotation():void 0},s.tsTryParseType=function(){return this.tsEatThenParseType(h.colon)},s.tsParseTypePredicatePrefix=function(){var t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t},s.tsParseTypeAnnotation=function(t,e){var s=this;return void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),this.tsInType(function(){t&&s.expect(h.colon),e.typeAnnotation=s.tsParseType()}),this.finishNode(e,"TSTypeAnnotation")},s.tsParseType=function(){it(this.state.inType);var t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(h._extends))return t;var e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(h.question),e.trueType=this.tsParseType(),this.expect(h.colon),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")},s.tsParseNonConditionalType=function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(h._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()},s.tsParseTypeAssertion=function(){var t=this,e=this.startNode();return e.typeAnnotation=this.tsInType(function(){return t.tsParseType()}),this.expectRelational(">"),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")},s.tsParseHeritageClause=function(){return this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this))},s.tsParseExpressionWithTypeArguments=function(){var t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")},s.tsParseInterfaceDeclaration=function(t){t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(h._extends)&&(t.extends=this.tsParseHeritageClause());var e=this.startNode();return e.body=this.tsParseObjectTypeMembers(),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")},s.tsParseTypeAliasDeclaration=function(t){return t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsExpectThenParseType(h.eq),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")},s.tsInNoContext=function(t){var e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}},s.tsInType=function(t){var e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}},s.tsEatThenParseType=function(t){return this.match(t)?this.tsNextThenParseType():void 0},s.tsExpectThenParseType=function(t){var e=this;return this.tsDoThenParseType(function(){return e.expect(t)})},s.tsNextThenParseType=function(){var t=this;return this.tsDoThenParseType(function(){return t.next()})},s.tsDoThenParseType=function(t){var e=this;return this.tsInType(function(){return t(),e.tsParseType()})},s.tsParseEnumMember=function(){var t=this.startNode();return t.id=this.match(h.string)?this.parseLiteral(this.state.value,"StringLiteral"):this.parseIdentifier(!0),this.eat(h.eq)&&(t.initializer=this.parseMaybeAssign()),this.finishNode(t,"TSEnumMember")},s.tsParseEnumDeclaration=function(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.expect(h.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(h.braceR),this.finishNode(t,"TSEnumDeclaration")},s.tsParseModuleBlock=function(){var t=this.startNode();return this.expect(h.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,h.braceR),this.finishNode(t,"TSModuleBlock")},s.tsParseModuleOrNamespaceDeclaration=function(t){if(t.id=this.parseIdentifier(),this.eat(h.dot)){var e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e),t.body=e}else t.body=this.tsParseModuleBlock();return this.finishNode(t,"TSModuleDeclaration")},s.tsParseAmbientExternalModuleDeclaration=function(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(h.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(h.braceL)?t.body=this.tsParseModuleBlock():this.semicolon(),this.finishNode(t,"TSModuleDeclaration")},s.tsParseImportEqualsDeclaration=function(t,e){return t.isExport=e||!1,t.id=this.parseIdentifier(),this.expect(h.eq),t.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")},s.tsIsExternalModuleReference=function(){return this.isContextual("require")&&this.lookahead().type===h.parenL},s.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},s.tsParseExternalModuleReference=function(){var t=this.startNode();if(this.expectContextual("require"),this.expect(h.parenL),!this.match(h.string))throw this.unexpected();return t.expression=this.parseLiteral(this.state.value,"StringLiteral"),this.expect(h.parenR),this.finishNode(t,"TSExternalModuleReference")},s.tsLookAhead=function(t){var e=this.state.clone(),s=t();return this.state=e,s},s.tsTryParseAndCatch=function(t){var e=this.state.clone();try{return t()}catch(t){if(t instanceof SyntaxError)return void(this.state=e);throw t}},s.tsTryParse=function(t){var e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)},s.nodeWithSamePosition=function(t,e){var s=this.startNodeAtNode(t);return s.type=e,s.end=t.end,s.loc.end=t.loc.end,t.leadingComments&&(s.leadingComments=t.leadingComments),t.trailingComments&&(s.trailingComments=t.trailingComments),t.innerComments&&(s.innerComments=t.innerComments),s},s.tsTryParseDeclare=function(t){switch(this.state.type){case h._function:return this.next(),this.parseFunction(t,!0);case h._class:return this.parseClass(t,!0,!1);case h._const:if(this.match(h._const)&&this.isLookaheadContextual("enum"))return this.expect(h._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case h._var:case h._let:return this.parseVarStatement(t,this.state.type);case h.name:var e=this.state.value;return"global"===e?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,e,!0)}},s.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)},s.tsParseExpressionStatement=function(t,e){switch(e.name){case"declare":var s=this.tsTryParseDeclare(t);if(s)return s.declare=!0,s;break;case"global":if(this.match(h.braceL)){var i=t;return i.global=!0,i.id=e,i.body=this.tsParseModuleBlock(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}},s.tsParseDeclaration=function(t,e,s){switch(e){case"abstract":if(s||this.match(h._class)){var i=t;return i.abstract=!0,s&&this.next(),this.parseClass(i,!0,!1)}break;case"enum":if(s||this.match(h.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(s||this.match(h.name))return s&&this.next(),this.tsParseInterfaceDeclaration(t);break;case"module":if(s&&this.next(),this.match(h.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(s||this.match(h.name))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"namespace":if(s||this.match(h.name))return s&&this.next(),this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(s||this.match(h.name))return s&&this.next(),this.tsParseTypeAliasDeclaration(t)}},s.tsTryParseGenericAsyncArrowFunction=function(e,s){var i=this,r=this.tsTryParseAndCatch(function(){var r=i.startNodeAt(e,s);return r.typeParameters=i.tsParseTypeParameters(),t.prototype.parseFunctionParams.call(i,r),r.returnType=i.tsTryParseTypeOrTypePredicateAnnotation(),i.expect(h.arrow),r});if(r)return r.id=null,r.generator=!1,r.expression=!0,r.async=!0,this.parseFunctionBody(r,!0),this.finishNode(r,"ArrowFunctionExpression")},s.tsParseTypeArguments=function(){var t=this,e=this.startNode();return e.params=this.tsInType(function(){return t.tsInNoContext(function(){return t.expectRelational("<"),t.tsParseDelimitedList("TypeParametersOrArguments",t.tsParseType.bind(t))})}),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(e,"TSTypeParameterInstantiation")},s.tsIsDeclarationStart=function(){if(this.match(h.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1},s.isExportDefaultSpecifier=function(){return!this.tsIsDeclarationStart()&&t.prototype.isExportDefaultSpecifier.call(this)},s.parseAssignableListItem=function(t,e){var s,i=!1;t&&(s=this.parseAccessModifier(),i=!!this.tsParseModifier(["readonly"]));var r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r);var a=this.parseMaybeDefault(r.start,r.loc.start,r);if(s||i){var n=this.startNodeAtNode(a);if(e.length&&(n.decorators=e),s&&(n.accessibility=s),i&&(n.readonly=i),"Identifier"!==a.type&&"AssignmentPattern"!==a.type)throw this.raise(n.start,"A parameter property may not be declared using a binding pattern.");return n.parameter=a,this.finishNode(n,"TSParameterProperty")}return e.length&&(r.decorators=e),a},s.parseFunctionBodyAndFinish=function(e,s,i){!i&&this.match(h.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(h.colon));var r="FunctionDeclaration"===s?"TSDeclareFunction":"ClassMethod"===s?"TSDeclareMethod":void 0;r&&!this.match(h.braceL)&&this.isLineTerminator()?this.finishNode(e,r):t.prototype.parseFunctionBodyAndFinish.call(this,e,s,i)},s.parseSubscript=function(e,s,i,r,a){var n=this;if(!this.hasPrecedingLineBreak()&&this.match(h.bang)){this.state.exprAllowed=!1,this.next();var o=this.startNodeAt(s,i);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}if(this.isRelational("<")){var p=this.tsTryParseAndCatch(function(){if(!r&&n.atPossibleAsync(e)){var t=n.tsTryParseGenericAsyncArrowFunction(s,i);if(t)return t}var o=n.startNodeAt(s,i);o.callee=e;var p=n.tsParseTypeArguments();if(p){if(!r&&n.eat(h.parenL))return o.arguments=n.parseCallExpressionArguments(h.parenR,!1),o.typeParameters=p,n.finishCallExpression(o);if(n.match(h.backQuote))return n.parseTaggedTemplateExpression(s,i,e,a,p)}n.unexpected()});if(p)return p}return t.prototype.parseSubscript.call(this,e,s,i,r,a)},s.parseNewArguments=function(e){var s=this;if(this.isRelational("<")){var i=this.tsTryParseAndCatch(function(){var t=s.tsParseTypeArguments();return s.match(h.parenL)||s.unexpected(),t});i&&(e.typeParameters=i)}t.prototype.parseNewArguments.call(this,e)},s.parseExprOp=function(e,s,i,r,a){if(st(h._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){var n=this.startNodeAt(s,i);return n.expression=e,n.typeAnnotation=this.tsNextThenParseType(),this.finishNode(n,"TSAsExpression"),this.parseExprOp(n,s,i,r,a)}return t.prototype.parseExprOp.call(this,e,s,i,r,a)},s.checkReservedWord=function(t,e,s,i){},s.checkDuplicateExports=function(){},s.parseImport=function(e){return this.match(h.name)&&this.lookahead().type===h.eq?this.tsParseImportEqualsDeclaration(e):t.prototype.parseImport.call(this,e)},s.parseExport=function(e){if(this.match(h._import))return this.expect(h._import),this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(h.eq)){var s=e;return s.expression=this.parseExpression(),this.semicolon(),this.finishNode(s,"TSExportAssignment")}if(this.eatContextual("as")){var i=e;return this.expectContextual("namespace"),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}return t.prototype.parseExport.call(this,e)},s.isAbstractClass=function(){return this.isContextual("abstract")&&this.lookahead().type===h._class},s.parseExportDefaultExpression=function(){if(this.isAbstractClass()){var e=this.startNode();return this.next(),this.parseClass(e,!0,!0),e.abstract=!0,e}if("interface"===this.state.value){var s=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(s)return s}return t.prototype.parseExportDefaultExpression.call(this)},s.parseStatementContent=function(e,s){if(this.state.type===h._const){var i=this.lookahead();if(i.type===h.name&&"enum"===i.value){var r=this.startNode();return this.expect(h._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(r,!0)}}return t.prototype.parseStatementContent.call(this,e,s)},s.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},s.parseClassMember=function(e,s,i){var r=this.parseAccessModifier();r&&(s.accessibility=r),t.prototype.parseClassMember.call(this,e,s,i)},s.parseClassMemberWithIsStatic=function(e,s,i,r){var a=s,n=s,o=s,h=!1,p=!1;switch(this.tsParseModifier(["abstract","readonly"])){case"readonly":p=!0,h=!!this.tsParseModifier(["abstract"]);break;case"abstract":h=!0,p=!!this.tsParseModifier(["readonly"])}if(h&&(a.abstract=!0),p&&(o.readonly=!0),!h&&!r&&!a.accessibility){var c=this.tsTryParseIndexSignature(s);if(c)return void e.body.push(c)}if(p)return a.static=r,this.parseClassPropertyName(n),this.parsePostMemberNameModifiers(a),void this.pushClassProperty(e,n);t.prototype.parseClassMemberWithIsStatic.call(this,e,s,i,r)},s.parsePostMemberNameModifiers=function(t){this.eat(h.question)&&(t.optional=!0)},s.parseExpressionStatement=function(e,s){return("Identifier"===s.type?this.tsParseExpressionStatement(e,s):void 0)||t.prototype.parseExpressionStatement.call(this,e,s)},s.shouldParseExportDeclaration=function(){return!!this.tsIsDeclarationStart()||t.prototype.shouldParseExportDeclaration.call(this)},s.parseConditional=function(e,s,i,r,a){if(!a||!this.match(h.question))return t.prototype.parseConditional.call(this,e,s,i,r,a);var n=this.state.clone();try{return t.prototype.parseConditional.call(this,e,s,i,r)}catch(t){if(!(t instanceof SyntaxError))throw t;return this.state=n,a.start=t.pos||this.state.start,e}},s.parseParenItem=function(e,s,i){if(e=t.prototype.parseParenItem.call(this,e,s,i),this.eat(h.question)&&(e.optional=!0),this.match(h.colon)){var r=this.startNodeAt(s,i);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e},s.parseExportDeclaration=function(e){var s,i=this.eatContextual("declare");return this.match(h.name)&&(s=this.tsTryParseExportDeclaration()),s||(s=t.prototype.parseExportDeclaration.call(this,e)),s&&i&&(s.declare=!0),s},s.parseClassId=function(e,s,i){if(s&&!i||!this.isContextual("implements")){t.prototype.parseClassId.apply(this,arguments);var r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r)}},s.parseClassProperty=function(e){!e.optional&&this.eat(h.bang)&&(e.definite=!0);var s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),t.prototype.parseClassProperty.call(this,e)},s.pushClassMethod=function(e,s,i,r,a){var n=this.tsTryParseTypeParameters();n&&(s.typeParameters=n),t.prototype.pushClassMethod.call(this,e,s,i,r,a)},s.pushClassPrivateMethod=function(e,s,i,r){var a=this.tsTryParseTypeParameters();a&&(s.typeParameters=a),t.prototype.pushClassPrivateMethod.call(this,e,s,i,r)},s.parseClassSuper=function(e){t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause())},s.parseObjPropValue=function(e){var s,i=this.tsTryParseTypeParameters();i&&(e.typeParameters=i);for(var r=arguments.length,a=new Array(r>1?r-1:0),n=1;nr.length-e?"\r\n":"\n"},t.exports.graceful=function(r){return t.exports(r)||"\n"}}),u={EOL:"\n"},i=Object.freeze({default:u}),c=i&&u||i,f=e(function(t,r){"use strict";var e,n;function u(){return e=(t=a)&&t.__esModule?t:{default:t};var t}function i(){return n=c}Object.defineProperty(r,"__esModule",{value:!0}),r.extract=function(t){var r=t.match(o);return r?r[0].trimLeft():""},r.strip=function(t){var r=t.match(o);return r&&r[0]?t.substring(r[0].length):t},r.parse=function(t){return w(t).pragmas},r.parseWithComments=w,r.print=function(t){var r=t.comments,a=void 0===r?"":r,c=t.pragmas,f=void 0===c?{}:c,s=(0,(e||u()).default)(a)||(n||i()).EOL,o=Object.keys(f),v=o.map(function(t){return d(t,f[t])}).reduce(function(t,r){return t.concat(r)},[]).map(function(t){return" * "+t+s}).join("");if(!a){if(0===o.length)return"";if(1===o.length&&!Array.isArray(f[o[0]])){var l=f[o[0]];return"".concat("/**"," ").concat(d(o[0],l)[0]).concat(" */")}}var b=a.split(s).map(function(t){return"".concat(" *"," ").concat(t)}).join(s)+s;return"/**"+s+(a?b:"")+(a&&o.length?" *"+s:"")+v+" */"};var f=/\*\/$/,s=/^\/\*\*/,o=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,v=/(^|\s+)\/\/([^\r\n]*)/g,l=/^(\r?\n)+/,b=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,p=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,k=/(\r?\n|^) *\* ?/g;function w(t){var r=(0,(e||u()).default)(t)||(n||i()).EOL;t=t.replace(s,"").replace(f,"").replace(k,"$1");for(var a="";a!==t;)a=t,t=t.replace(b,"".concat(r,"$1 $2").concat(r));t=t.replace(l,"").trimRight();for(var c,o=Object.create(null),w=t.replace(p,"").replace(l,"").trimRight();c=p.exec(t);){var d=c[2].replace(v,"");"string"==typeof o[c[1]]||Array.isArray(o[c[1]])?o[c[1]]=[].concat(o[c[1]],d):o[c[1]]=d}return{comments:w,pragmas:o}}function d(t,r){return[].concat(r).map(function(r){return"@".concat(t," ").concat(r).trim()})}});(n=f)&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")&&n.default;var s=function(t){var r=Object.keys(f.parse(f.extract(t)));return-1!==r.indexOf("prettier")||-1!==r.indexOf("format")},o=function(t){return t.length>0?t[t.length-1]:null};var v={locStart:function t(r,e){return!(e=e||{}).ignoreDecorators&&r.declaration&&r.declaration.decorators&&r.declaration.decorators.length>0?t(r.declaration.decorators[0]):!e.ignoreDecorators&&r.decorators&&r.decorators.length>0?t(r.decorators[0]):r.__location?r.__location.startOffset:r.range?r.range[0]:"number"==typeof r.start?r.start:r.loc?r.loc.start:null},locEnd:function t(r){var e=r.nodes&&o(r.nodes);if(e&&r.source&&!r.source.end&&(r=e),r.__location)return r.__location.endOffset;var n=r.range?r.range[1]:"number"==typeof r.end?r.end:null;return r.typeAnnotation?Math.max(n,t(r.typeAnnotation)):r.loc&&!n?r.loc.end:n}};function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var b=e(function(t){"use strict";t.exports=function(){var t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(t,"g")}}),p=e(function(t){"use strict";t.exports=function(t){return!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141))}});e(function(t){"use strict";t.exports=function(t){if("string"!=typeof t||0===t.length)return 0;var r;t="string"==typeof(r=t)?r.replace(b(),""):r;for(var e=0,n=0;n=127&&a<=159||(a>=768&&a<=879||(a>65535&&n++,e+=p(a)?2:1))}return e}});function k(t){return function(r,e,n){var a=n&&n.backwards;if(!1===e)return!1;for(var u=r.length,i=e;i>=0&&i"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(t,r){t.forEach(function(t){w[t]=r})});var d=function(t){return t.length>0?t[t.length-1]:null};var h=function(t,r){return function t(r,e){if(r&&"object"===l(r))if(Array.isArray(r)){var n=!0,a=!1,u=void 0;try{for(var i,c=r[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var f=i.value;t(f,e)}}catch(t){a=!0,u=t}finally{try{n||null==c.return||c.return()}finally{if(a)throw u}}}else if("string"==typeof r.type){for(var s=Object.keys(r),o=0;o[",D=128,C=8488,N=68102,L=42999,R=-43,M=12589,U="constructor",j=126503,B="yield",X=68096,J=-53,G="fd ",q=120744,Y=126560,V="start",W="target",H="_method",z=177972,K=44015,Q="var",$=65855,Z="impltype",tt=43776,rt="0o",et=43215,nt=12592,at=12336,ut=42124,it=120512,ct="decorators",ft=8489,st=66334,ot=68115,vt=64324,lt=67592,bt=126529,pt="%B",kt=43784,wt=119807,dt=8304,ht=120137,mt=69807,yt="method",_t=69926,Ft="throw",Et=65595,St=126578,gt=64322,xt=11735,Tt=178205,At=8487,Ot="Popping lex mode from empty stack",It=43249,Pt=120771,Dt=67589,Ct=-80,Nt=119972,Lt="e",Rt="([^/]*)",Mt="tparams",Ut="src/parser/statement_parser.ml",jt=8239,Bt=65598,Xt=69687,Jt=94031,Gt=67669,qt=43583,Yt=8348,Vt="Invalid binary/octal ",Wt=43019,Ht=42239,zt="Out_of_memory",Kt=78894,Qt=11687,$t=43798,Zt=101,tr=40959,rr=42922,er=8454,nr="index out of bounds",ar="package",ur=126589,ir="))",cr="supertype",fr=12438,sr=12442,or="this",vr=120654,lr=119361,br=67637,pr=69743,kr="type",wr=11679,dr=119892,hr=42894,mr=11311,yr=126521,_r=1024,Fr=119993,Er=11710,Sr=8543,gr=8484,xr=43135,Tr=126634,Ar="typeArguments",Or=43334,Ir="@])",Pr=43263,Dr=67593,Cr="infinity",Nr=120144,Lr="switch",Rr="private",Mr=70105,Ur=119364,jr=11359,Br=8516,Xr=8254,Jr=11559,Gr=126551,qr=68151,Yr="Property",Vr=42888,Wr=55296,Hr="implements",zr=43255,Kr=8399,Qr="src/parser/type_parser.ml",$r=103,Zr="raw",te=-744106340,re=8468,ee=65470,ne="alternate",ae=11686,ue=43712,ie=43009,ce=43470,fe="export",se=".",oe=65535,ve=8469,le="kind",be=8521,pe=69631,ke=120085,we=11743,de=126559,he=120655,me=69890,ye="declare",_e=65023,Fe=66256,Ee=65479,Se=42622,ge=11310,xe=11711,Te=8305,Ae=119967,Oe=68159,Ie="mixins",Pe="expected *",De="boolean",Ce=64433,Ne=256,Le=42774,Re=11564,Me=68437,Ue=67871,je=126496,Be=120145,Xe="expression",Je="column",Ge=66045,qe="value",Ye=12348,Ve=56320,We=119964,He=126554,ze=119140,Ke=43792,Qe=68405,$e=126557,Ze="Assert_failure",tn=119162,rn=67861,en=114,nn=43807,an=19967,un=65663,cn="closingElement",fn=65574,sn="null",on=64111,vn=66378,ln=123,bn="filter",pn="expressions",kn="(@[",wn=11703,dn="get",hn=69762,mn="exported",yn=68447,_n=11630,Fn=11519,En=44031,Sn=69839,gn="return",xn=8286,Tn=64310,An=120084,On=120126,In=8335,Pn=126519,Dn="src/parser/expression_parser.ml",Cn="(global)",Nn=11502,Ln=69941,Rn=42511,Mn=44025,Un=126534,jn=120,Bn=94032,Xn=126555,Jn=67646,Gn=65629,qn=65076,Yn=126535,Vn=69881,Wn="empty",Hn=120134,zn=12343,Kn=70084,Qn=69864,$n=12703,Zn=68107,ta=126520,ra=126468,ea=43519,na=65342,aa=43615,ua="@[<2>{ ",ia=120831,ca=42654,fa=42899,sa=43359,oa="Division_by_zero",va=119981,la=43738,ba=65140,pa=67638,ka=68351,wa=68119,da="immediately within another function.",ha=43388,ma=126538,ya=70015,_a=8449,Fa=120779,Ea=12686,Sa=126504,ga="@,))@]",xa="%d",Ta=68191,Aa="@ }@]",Oa=70018,Ia=57343,Pa=67591,Da=55291,Ca=11727,Na=11557,La="handler",Ra=119980,Ma=43014,Ua=8188,ja=43599,Ba=67967,Xa=8319,Ja="from",Ga=42785,qa=11775,Ya=126502,Va=65279,Wa=-48,Ha=";@ ",za="set",Ka=63743,Qa=2048,$a=64286,Za="right",tu=120093,ru=8486,eu="body",nu=43743,au=12799,uu=119965,iu="Invalid number ",cu=126563,fu=64296,su=43766,ou=8275,vu="Lookahead.peek failed",lu=2147483647,bu=11670,pu=43815,ku="else",wu=65536,du="properties",hu=120004,mu=8238,yu=8417,_u=126591,Fu="arguments",Eu=11719,Su=66517,gu=126500,xu=126571,Tu="line",Au=246,Ou=65497,Iu=120571,Pu="declaration",Du="static",Cu=12730,Nu=120597,Lu=64262,Ru=8420,Mu=77823,Uu="Unix.Unix_error",ju="init",Bu=66044,Xu="annot",Ju=74751,Gu=195101,qu=66207,Yu="proto",Vu=122,Wu=126602,Hu=69818,zu=8276,Ku="Stack_overflow",Qu=11742,$u=126539,Zu=8432,ti=120132,ri="@ ",ei=120687,ni=64311,ai=43713,ui=119148,ii=126564,ci=120745,fi="Not_found",si=126590,oi=44010,vi=131071,li=-46,bi=8467,pi=43759,ki="CallExpression",wi=126583,di=74850,hi=43047,mi=126530,yi=40908,_i=12543,Fi="rest",Ei=69951,Si=42655,gi=65489,xi=66503,Ti=11695,Ai=13311,Oi=106,Ii="f",Pi=64321,Di=11567,Ci=43638,Ni="const",Li="typeParameters",Ri="delete",Mi=124,Ui=65615,ji="false",Bi=11718,Xi=126556,Ji=11623,Gi="test",qi=64847,Yi="string",Vi=43456,Wi=110593,Hi=12538,zi=8507,Ki=-36,Qi=55238,$i=12292,Zi=192,tc=120487,rc=64967,ec=173782,nc=65074,ac=43741,uc=120074,ic="minus",cc=12548,fc=245,sc=8191,oc=71359,vc=43643,lc=42537,bc="computed",pc=126579,kc=43391,wc=11558,dc=126523,hc=64217,mc="id",yc="as",_c="delegate",Fc="true",Ec=65381,Sc=194559,gc=104,xc=119996,Tc=66559,Ac="Invalid_argument",Oc=64913,Ic=12448,Pc=126552,Dc=70066,Cc=55242,Nc=120781,Lc=12352,Rc=12295,Mc=43714,Uc="import",jc="prototype",Bc=65908,Xc="debugger",Jc="Internal Error: Found private field in object props",Gc=43560,qc=120485,Yc=65575,Vc="attributes",Wc="label",Hc=65495,zc=64466,Kc=43204,Qc=64285,$c=67644,Zc="shorthand",tf=68147,rf=67897,ef=8526,nf=12539,af="0",uf=120712,cf=43641,ff=126522,sf=248,of=8450,vf=119974,lf=119170,bf="Sys_blocked_io",pf=67643,kf=43187,wf=12440,df=8471,hf=65473,mf=68095,yf=43013,_f=126553,Ff="@,]@]",Ef="catch",Sf=107,gf=65305,xf=43754,Tf=110591,Af=67640,Of=64284,If=64317,Pf="protected",Df=126515,Cf=1114111,Nf=-97,Lf=43018,Rf=11631,Mf=44002,Uf=105,jf="object",Bf="break",Xf=110,Jf=66499,Gf=65312,qf="%S",Yf=126633,Vf=120003,Wf=65786,Hf=66719,zf=8511,Kf=8233,Qf=57344,$f=11492,Zf=65487,ts=119145,rs=71351,es=11726,ns=253,as="returnType",us=126540,is=-24,cs="-",fs="await",ss=8205,os="async",vs=126543,ls=126550,bs=" : file already exists",ps="left",ks=120596,ws=8231,ds=11646,hs=64325,ms="case",ys=66511,_s=120121,Fs=43137,Es="Invalid legacy octal ",Ss=12288,gs="typeof",xs="targs",Ts=43697,As=66175,Os=126628,Is=224,Ps="public",Ds=69702,Cs=94078,Ns="enum",Ls=42895,Rs=8416,Ms=917999,Us=42911,js=250,Bs=120770,Xs="super",Js=127343600,Gs=126463,qs=43309,Ys=42559,Vs=119179,Ws="interface",Hs=66512,zs=126588,Ks=68415,Qs=102,$s=43010,Zs=69871,to=55203,ro=11507,eo=55215,no=120629,ao=44013,uo=870530776,io="bool",co="default",fo=119976,so="",oo="exportKind",vo="instanceof",lo=43586,bo=100,po="argument",ko=126566,wo=126558,ho=119995,mo=-17,yo=68100,_o=126537,Fo="Match_failure",Eo=43790,So="src/parser/flow_ast.ml",go=68111,xo=8505,To=120686,Ao="+",Oo=42735,Io=120127,Po=65613,Do="{ ",Co=65100,No="@,",Lo=69759,Ro=43609,Mo=65500,Uo="inexact",jo=42527,Bo=65548,Xo=71338,Jo=42611,Go=120713,qo=127,Yo=11694,Vo=69940,Wo=64318,Ho="void",zo=")",Ko=8584,Qo="let",$o=120538,Zo=120070,tv="nan",rv=126601,ev=43597,nv="@[%s =@ ",av=68220,uv=8412,iv=42191,cv=94020,fv=177983,sv=126547,ov=11565,vv="/",lv=126619,bv=65019,pv=42621,kv=120092,wv="property",dv=67839,hv=120122,mv=42890,yv=43761,_v=8256,Fv="TypeParameterInstantiation",Ev="Literal",Sv="number",gv=43231,xv=44011,Tv=11498,Av=65103,Ov=65039,Iv=64274,Pv=11647,Dv=43273,Cv=70095,Nv="function",Lv=43258,Rv=-82,Mv=126562,Uv=6158,jv="jsError",Bv=71295,Xv=65344,Jv=43642,Gv=42606,qv=126544,Yv=64109,Vv="unreachable",Wv="@]}",Hv=64829,zv="(Some ",Kv="End_of_file",Qv=11702,$v=73727,Zv=68466,tl="new",rl="Failure",el=43764,nl="local",al="with",ul=12783,il=11358,cl=65141,fl=65481,sl=68154,ol=12341,vl=65278,ll=19893,bl=119172,pl="finalizer",kl=68031,wl=43574,dl=43259,hl="while",ml="camlinternalFormat.ml",yl="elements",_l=43711,Fl=-34,El="each",Sl="Sys_error",gl=43301,xl=43442,Tl=68158,Al=126584,Ol=1073741823,Il=126570,Pl=65295,Dl=12329,Cl=11263,Nl="None",Ll="int_of_string",Rl=43702,Ml=43704,Ul=43822,jl="operator",Bl="name",Xl=119970,Jl=65547,Gl=126514,ql=65276,Yl=126498,Vl="callee",Wl=120076,Hl=43395,zl=119893,Kl=917759,Ql=66431,$l=43709,Zl=94098,tb=126546,rb="predicate",eb=64911,nb="types",ab=11505,ub=43481,ib=119154,cb=240,fb=8203,sb=42737,ob=126624,vb=8525,lb="0x",bb=68116,pb="optional",kb=69887,wb=68029,db="@]",hb=70080,mb=126499,yb=92728,_b="finally",Fb=43311,Eb=125,Sb=255,gb=120069,xb=126627,Tb=8457,Ab=68099,Ob=119994,Ib=93951,Pb=69634,Db=64319,Cb="source",Nb=65055,Lb=65062,Rb=65135,Mb=66303,Ub=12447,jb=126536,Bb=119209,Xb="generator",Jb=120133,Gb=8287,qb=74606,Yb=67583,Vb=66351,Wb=66717,Hb="mixed",zb="selfClosing",Kb=64255,Qb=8477,$b=-79,Zb=119213,tp=8318,rp=43587,ep=65597,np=68023,ap=68680,up=" =",ip=65594,cp="<2>",fp=43814,sp=43042,op=",@ ",vp=120628,lp="%a",bp=43696,pp=12320,kp=66463,wp="static/",dp=42783,hp=43700,mp=43225,yp=42508,_p=64316,Fp="prefix",Ep=43967,Sp=120570,gp=66729,xp=42539,Tp="Internal Error: Found object private prop",Ap=8483,Op=126548,Ip=69733,Pp=8455,Dp="class",Cp=68607,Np="continue",Lp=65343,Rp=252,Mp=126495,Up="key",jp=" ",Bp=43695,Xp="RestElement",Jp="Undefined_recursive_module",Gp=43471,qp=11734,Yp=68120,Vp=43647,Wp=94094,Hp=116,zp=92159,Kp=42607,Qp="typeAnnotation",$p=66461,Zp=173823,tk=42647,rk=120513,ek="specifiers",nk="Set.bal",ak=126651,uk=71369,ik=94111,ck=43782,fk="importKind",sk="extends",ok=65338;function vk(t,r){throw[0,t,r]}var lk=[0];function bk(t,r){if("function"==typeof r)return t.fun=r,0;if(r.fun)return t.fun=r.fun,0;for(var e=r.length;e--;)t[e]=r[e];return 0}function pk(t,r,e){for(var n=new Array(e),a=0;a=e.l||2==e.t&&a>=e.c.length))e.c=4==t.t?kk(t.c,r,a):0==r&&t.c.length==a?t.c:t.c.substr(r,a),e.t=e.c.length==e.l?0:2;else if(2==e.t&&n==e.c.length)e.c+=4==t.t?kk(t.c,r,a):0==r&&t.c.length==a?t.c:t.c.substr(r,a),e.t=e.c.length==e.l?0:2;else{4!=e.t&&wk(e);var u=t.c,i=e.c;if(4==t.t)if(n<=r)for(var c=0;c=0;c--)i[n+c]=u[r+c];else{var f=Math.min(a,u.length-r);for(c=0;c>=1))return e;r+=r,9==++n&&r.slice(0,1)}}function yk(t){2==t.t?t.c+=mk(t.l-t.c.length,"\0"):t.c=kk(t.c,0,t.c.length),t.t=0}function _k(t){if(t.length<24){for(var r=0;rqo)return!1;return!0}return!/[^\x00-\x7f]/.test(t)}function Fk(t){switch(t.t){case 9:return t.c;default:yk(t);case 0:if(_k(t.c))return t.t=9,t.c;t.t=8;case 8:return function(t){for(var r,e,n,a,u=so,i=so,c=0,f=t.length;cF?(i.substr(0,1),u+=i,i=so,u+=t.slice(c,s)):i+=t.slice(c,s),s==f)break;c=s}a=1,++c=55295&&aCf)&&(a=3))))),a<4?(c-=a,i+="�"):i+=a>oe?String.fromCharCode(55232+(a>>10),Ve+(1023&a)):String.fromCharCode(a),i.length>_r&&(i.substr(0,1),u+=i,i=so)}return u+i}(t.c)}}function Ek(t,r,e){this.t=t,this.c=r,this.l=e}function Sk(t){return new Ek(0,t,t.length)}function gk(t,r){vk(t,Sk(r))}function xk(t){gk(lk.Invalid_argument,t)}function Tk(){xk(nr)}function Ak(t,r,e){if(e&=Sb,4!=t.t){if(r==t.c.length)return t.c+=String.fromCharCode(e),r+1==t.l&&(t.t=0),0;wk(t)}return t.c[r]=e,0}function Ok(t,r,e){return r>>>0>=t.l&&Tk(),Ak(t,r,e)}function Ik(t,r){switch(6&t.t){default:if(r>=t.c.length)return 0;case 0:return t.c.charCodeAt(r);case 4:return t.c[r]}}function Pk(t,r){if(t.fun)return Pk(t.fun,r);var e=t.length,n=r.length,a=e-n;return 0==a?t.apply(null,r):a<0?Pk(t.apply(null,pk(r,0,e)),pk(r,e,n-e)):function(e){return Pk(t,function(t,r){for(var e=t.length,n=new Array(e+1),a=0;a>>0>=t.length-1&&xk(nr),t}function Ck(t,r){var e=t[3]<<16,n=r[3]<<16;return e>n?1:er[2]?1:t[2]r[1]?1:t[1]r.c?1:0}function Rk(t,r,n){for(var a=[];;){if(!n||t!==r)if(t instanceof Ek){if(!(r instanceof Ek))return 1;if(t!==r&&0!=(c=Lk(t,r)))return c}else if(t instanceof Array&&t[0]===(0|t[0])){var u=t[0];if(u===e&&(u=0),u===js){t=t[1];continue}if(!(r instanceof Array&&r[0]===(0|r[0])))return 1;var i=r[0];if(i===e&&(i=0),i===js){r=r[1];continue}if(u!=i)return u1&&a.push(t,r,1)}}else{if(r instanceof Ek||r instanceof Array&&r[0]===(0|r[0]))return-1;if("number"!=typeof t&&t&&t.compare){var f=t.compare(r,n);if(0!=f)return f}else if("function"==typeof t)xk("compare: functional value");else{if(tr)return 1;if(t!=r){if(!n)return NaN;if(t==t)return 1;if(r==r)return-1}}}if(0==a.length)return 0;var s=a.pop();r=a.pop(),s+1<(t=a.pop()).length&&a.push(t,r,s+1),t=t[s],r=r[s]}}function Mk(t,r){return Rk(t,r,!0)}function Uk(t){return t<0&&xk("Bytes.create"),new Ek(t?2:9,so,t)}function jk(t,r){return+(0==Rk(t,r,!1))}function Bk(t){gk(lk.Failure,t)}function Xk(t){return 0!=(6&t.t)&&yk(t),t.c}function Jk(t){var r;if(r=+(t=Xk(t)),t.length>0&&r==r)return r;if(r=+(t=t.replace(/_/g,so)),t.length>0&&r==r||/^[+-]?nan$/i.test(t))return r;var e=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)p([+-]?[0-9]+)/i.exec(t);if(e){var n=e[3].replace(/0+$/,so),a=parseInt(e[1]+e[2]+n,16),u=(0|e[4])-4*n.length;return r=a*Math.pow(2,u)}return/^\+?inf(inity)?$/i.test(t)?1/0:/^-inf(inity)?$/i.test(t)?-1/0:void Bk("float_of_string")}function Gk(t){var r=(t=Xk(t)).length;r>31&&xk("format_int: format too long");for(var e={justify:Ao,signstyle:cs,filler:jp,alternate:!1,base:0,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:Ii},n=0;n=0&&a<=9;)e.width=10*e.width+a,n++;n--;break;case".":for(e.prec=0,n++;(a=t.charCodeAt(n)-48)>=0&&a<=9;)e.prec=10*e.prec+a,n++;n--;case"d":case"i":e.signedconv=!0;case"u":e.base=10;break;case"x":e.base=16;break;case"X":e.base=16,e.uppercase=!0;break;case"o":e.base=8;break;case"e":case"f":case"g":e.signedconv=!0,e.conv=a;break;case"E":case"F":case"G":e.signedconv=!0,e.uppercase=!0,e.conv=a.toLowerCase()}}return e}function qk(t,r){t.uppercase&&(r=r.toUpperCase());var e=r.length;t.signedconv&&(t.sign<0||t.signstyle!=cs)&&e++,t.alternate&&(8==t.base&&(e+=1),16==t.base&&(e+=2));var n=so;if(t.justify==Ao&&t.filler==jp)for(var a=e;a=1e21||r.toFixed(0).length>n){for(u=i-1;a.charAt(u)==af;)u--;a.charAt(u)==se&&u--,u=(a=a.slice(0,u+1)+a.slice(i)).length,a.charAt(u-3)==Lt&&(a=a.slice(0,u-1)+af+a.slice(u-1));break}var f=n;if(c<0)f-=c+1,a=r.toFixed(f);else for(;(a=r.toFixed(f)).length>n+1;)f--;if(f){for(u=a.length-1;a.charAt(u)==af;)u--;a.charAt(u)==se&&u--,a=a.slice(0,u+1)}}else a="inf",e.filler=jp;return qk(e,a)}function Vk(t,r){if(Xk(t)==xa)return Sk(so+r);var e=Gk(t);r<0&&(e.signedconv?(e.sign=-1,r=-r):r>>>=0);var n=r.toString(e.base);if(e.prec>=0){e.filler=jp;var a=e.prec-n.length;a>0&&(n=mk(a,af)+n)}return qk(e,n)}Ek.prototype.toString=function(){return Fk(this)};var Wk=0;function Hk(){return Wk++}function zk(t,r){return+(Rk(t,r,!1)>=0)}function Kk(t){var r=9;return _k(t)||(r=8,t=function(t){for(var r,e,n=so,a=n,u=0,i=t.length;uF?(a.substr(0,1),n+=a,a=so,n+=t.slice(u,c)):a+=t.slice(u,c),c==i)break;u=c}r>6),a+=String.fromCharCode(D|63&r)):r=Ia?a+=String.fromCharCode(Is|r>>12,D|r>>6&63,D|63&r):r>=56319||u+1==i||(e=t.charCodeAt(u+1))Ia?a+="�":(u++,r=(r<<10)+e-56613888,a+=String.fromCharCode(cb|r>>18,D|r>>12&63,D|r>>6&63,D|63&r)),a.length>_r&&(a.substr(0,1),n+=a,a=so)}return n+a}(t)),new Ek(r,t,t.length)}function Qk(t){return 0==(t[3]|t[2]|t[1])}function $k(t){return[Sb,t&f,t>>24&f,t>>31&oe]}function Zk(t){for(var r=t.length,e=new Array(r),n=0;n>24),a=t[3]-r[3]+(n>>24);return[Sb,e&f,n&f,a&oe]}function rw(t,r){return t[3]>r[3]?1:t[3]r[2]?1:t[2]r[1]?1:t[1]>23,t[2]=(t[2]<<1|t[1]>>23)&f,t[1]=t[1]<<1&f}function nw(t){t[1]=(t[1]>>>1|t[2]<<23)&f,t[2]=(t[2]>>>1|t[3]<<23)&f,t[3]=t[3]>>>1}function aw(t,r){for(var e=0,n=Zk(t),a=Zk(r),u=[Sb,0,0,0];rw(n,a)>0;)e++,ew(a);for(;e>=0;)e--,ew(u),rw(n,a)>=0&&(u[1]++,n=tw(n,a)),nw(a);return[0,u,n]}function uw(t){return t[1]|t[2]<<24}function iw(t){var r=-t[1],e=-t[2]+(r>>24),n=-t[3]+(e>>24);return[Sb,r&f,e&f,n&oe]}function cw(t){return t.l}function fw(t,r){switch(6&t.t){default:if(r>=t.c.length)return 0;case 0:return t.c.charCodeAt(r);case 4:return t.c[r]}}function sw(t,r){var e=t[1]+r[1],n=t[2]+r[2]+(e>>24),a=t[3]+r[3]+(n>>24);return[Sb,e&f,n&f,a&oe]}var ow=Math.pow(2,-24);function vw(t,r){var e=t[1]*r[1],n=(e*ow|0)+t[2]*r[1]+t[1]*r[2],a=(n*ow|0)+t[3]*r[1]+t[2]*r[2]+t[1]*r[3];return[Sb,e&f,n&f,a&oe]}function lw(t,r){return rw(t,r)<0}function bw(t){var r=0,e=cw(t),n=10,a=1;if(e>0)switch(fw(t,r)){case 45:r++,a=-1;break;case 43:r++,a=1}if(r+1=48&&t<=57?t-48:t>=65&&t<=90?t-55:t>=97&&t<=Vu?t-87:-1}function kw(t){var r=bw(t),e=r[0],n=r[1],a=r[2],u=$k(a),i=aw([Sb,f,268435455,oe],u)[1],c=fw(t,e),s=pw(c);(s<0||s>=a)&&Bk(Ll);for(var o=$k(s);;)if(95!=(c=fw(t,++e))){if((s=pw(c))<0||s>=a)break;lw(i,o)&&Bk(Ll),s=$k(s),lw(o=sw(vw(u,o),s),s)&&Bk(Ll)}return e!=cw(t)&&Bk(Ll),10==r[2]&&lw([Sb,0,0,32768],o)&&Bk(Ll),n<0&&(o=iw(o)),o}function ww(t){return(t[3]<<16)*Math.pow(2,32)+t[2]*Math.pow(2,24)+t[1]}function dw(t){var r=bw(t),e=r[0],n=r[1],a=r[2],u=cw(t),i=e=a)&&Bk(Ll);var f=c;for(e++;e=a)break;(f=a*f+c)>-1>>>0&&Bk(Ll)}return e!=u&&Bk(Ll),f*=n,10==a&&(0|f)!=f&&Bk(Ll),0|f}function hw(t){return pk(t,1,t.length-1)}function mw(t){return!!t}function yw(t){return t.toString()}function _w(t){for(var r={},e=1;e>>32-u,n)}function e(t,e,n,a,u,i,c){return r(e&n|~e&a,t,e,u,i,c)}function n(t,e,n,a,u,i,c){return r(e&a|n&~a,t,e,u,i,c)}function a(t,e,n,a,u,i,c){return r(e^n^a,t,e,u,i,c)}function u(t,e,n,a,u,i,c){return r(n^(e|~a),t,e,u,i,c)}function i(r,i){for(r[(b=i)>>2]|=D<<8*(3&b),b=8+(-4&b);(63&b)<60;b+=4)r[(b>>2)-1]=0;r[(b>>2)-1]=i<<3,r[b>>2]=i>>29&536870911;var c=[1732584193,4023233417,2562383102,271733878];for(b=0;b>8*p&Sb;return l}return function(t,r,e){var n=[];switch(6&t.t){default:yk(t);case 0:for(var a=t.c,u=0;u>2]=a.charCodeAt(c)|a.charCodeAt(c+1)<<8|a.charCodeAt(c+2)<<16|a.charCodeAt(c+3)<<24}for(;u>2]|=a.charCodeAt(u+r)<<8*(3&u);break;case 4:var f=t.c;for(u=0;u>2]=f[c]|f[c+1]<<8|f[c+2]<<16|f[c+3]<<24}for(;u>2]|=f[u+r]<<8*(3&u)}return Ew(i(n,e))}}();function gw(t){return t.l}function xw(t){gk(lk.Sys_error,t)}var Tw=new Array;function Aw(t){var r=Tw[t];if(r.opened||xw("Cannot flush a closed channel"),!r.buffer||r.buffer==so)return 0;if(r.fd&&lk.fds[r.fd]&&lk.fds[r.fd].output){var e=lk.fds[r.fd].output;switch(e.length){case 2:e(t,r.buffer);break;default:e(r.buffer)}}return r.buffer=so,0}if(t.process&&t.process.cwd)var Ow=t.process.cwd().replace(/\\/g,vv);else Ow="/static";function Iw(){}function Pw(t){this.data=t}function Dw(t,r){this.content={},this.root=t,this.lookupFun=r}function Cw(t){return 4!=t.t&&wk(t),t.c}Ow.slice(-1)!==vv&&(Ow+=vv),Pw.prototype=new Iw,Pw.prototype.truncate=function(t){var r=this.data;this.data=Uk(0|t),dk(r,0,this.data,0,t)},Pw.prototype.length=function(){return gw(this.data)},Pw.prototype.write=function(t,r,e,n){var a=this.length();if(t+n>=a){var u=Uk(t+n),i=this.data;this.data=u,dk(i,0,this.data,0,a)}return dk(r,e,this.data,t,n),0},Pw.prototype.read=function(t,r,e,n){this.length();return dk(this.data,t,r,e,n),0},Pw.prototype.read_one=function(t){return function(t,r){return r>>>0>=t.l&&Tk(),Ik(t,r)}(this.data,t)},Pw.prototype.close=function(){},Pw.prototype.constructor=Pw,Dw.prototype.nm=function(t){return this.root+t},Dw.prototype.lookup=function(t){if(!this.content[t]&&this.lookupFun){var r=this.lookupFun(Sk(this.root),Sk(t));0!=r&&(this.content[t]=new Pw(r[1]))}},Dw.prototype.exists=function(t){if(t==so)return 1;var r=new RegExp("^"+(t+vv));for(var e in this.content)if(e.match(r))return 1;return this.lookup(t),this.content[t]?1:0},Dw.prototype.readdir=function(t){var r=new RegExp("^"+(t==so?so:t+vv)+Rt),e={},n=[];for(var a in this.content){var u=a.match(r);u&&!e[u[1]]&&(e[u[1]]=!0,n.push(u[1]))}return n},Dw.prototype.is_dir=function(t){var r=new RegExp("^"+(t==so?so:t+vv)+Rt);for(var e in this.content){if(e.match(r))return 1}return 0},Dw.prototype.unlink=function(t){var r=!!this.content[t];return delete this.content[t],r},Dw.prototype.open=function(t,r){if(r.rdonly&&r.wronly&&xw(this.nm(t)+" : flags Open_rdonly and Open_wronly are not compatible"),r.text&&r.binary&&xw(this.nm(t)+" : flags Open_text and Open_binary are not compatible"),this.lookup(t),this.content[t]){this.is_dir(t)&&xw(this.nm(t)+" : is a directory"),r.create&&r.excl&&xw(this.nm(t)+bs);var e=this.content[t];return r.truncate&&e.truncate(),e}if(r.create)return this.content[t]=new Pw(Uk(0)),this.content[t];!function(t){xw((t=t instanceof Ek?t.toString():t)+": No such file or directory")}(this.nm(t))},Dw.prototype.register=function(t,r){if(this.content[t]&&xw(this.nm(t)+bs),r instanceof Ek)this.content[t]=new Pw(r);else if(r instanceof Array)this.content[t]=new Pw(Ew(r));else if(r.toString){var e=Sk(r.toString());this.content[t]=new Pw(e)}},Dw.prototype.constructor=Dw;var Nw=t.Buffer;function Lw(t){this.fs=E,this.fd=t}function Rw(t){this.fs=E,this.root=t}Lw.prototype=new Iw,Lw.prototype.truncate=function(t){this.fs.ftruncateSync(this.fd,0|t)},Lw.prototype.length=function(){return this.fs.fstatSync(this.fd).size},Lw.prototype.write=function(r,e,n,a){var u=Cw(e);u instanceof t.Uint8Array||(u=new t.Uint8Array(u));var i=new Nw(u);return this.fs.writeSync(this.fd,i,n,a,r),0},Lw.prototype.read=function(r,e,n,a){var u=Cw(e);u instanceof t.Uint8Array||(u=new t.Uint8Array(u));var i=new Nw(u);this.fs.readSync(this.fd,i,n,a,r);for(var c=0;clk.fd_last_idx)&&(lk.fd_last_idx=t),t}function Bw(t){var r=lk.fds[t];r.flags.rdonly&&xw(G+t+" is readonly");var e={file:r.file,offset:r.offset,fd:t,opened:!0,out:!0,buffer:so};return Tw[e.fd]=e,e.fd}function Xw(t,r,e,n){return function(t,r,e,n){var a,u=Tw[t];u.opened||xw("Cannot output to a closed channel"),0==e&&gw(r)==n?a=r:dk(r,e,a=Uk(n),0,n);var i=Xk(a),c=i.lastIndexOf("\n");return c<0?u.buffer+=i:(u.buffer+=i.substr(0,c+1),Aw(t),u.buffer+=i.substr(c+1)),0}(t,r,e,n)}function Jw(t){throw t}function Gw(t,r){return 0==r&&Jw(lk.Division_by_zero),t%r}function qw(t,r){return+(0!=Rk(t,r,!1))}function Yw(t){return t instanceof Array?t[0]:t instanceof Ek?Rp:1e3}function Vw(t,r,e){lk[t+1]=r,e&&(lk[e]=r)}void 0!==t.process&&void 0!==t.process.versions&&void 0!==t.process.versions.node?Uw.push({path:Mw,device:new Rw(Mw)}):Uw.push({path:Mw,device:new Dw(Mw)}),Uw.push({path:Mw+wp,device:new Dw(Mw+wp)}),jw(0,function(t,r){var e=Tw[t],n=Sk(r),a=cw(n);return e.file.write(e.offset,n,0,a),e.offset+=a,0},new Pw(Uk(0))),jw(1,function(r){var e=t;if(e.process&&e.process.stdout&&e.process.stdout.write)e.process.stdout.write(r);else{10==r.charCodeAt(r.length-1)&&(r=r.substr(0,r.length-1));var n=e.console;n&&n.log&&n.log(r)}},new Pw(Uk(0))),jw(2,function(r){var e=t;if(e.process&&e.process.stdout&&e.process.stdout.write)e.process.stderr.write(r);else{10==r.charCodeAt(r.length-1)&&(r=r.substr(0,r.length-1));var n=e.console;n&&n.error&&n.error(r)}},new Pw(Uk(0)));var Ww={};function Hw(t,r){return t===r?1:(6&t.t&&yk(t),6&r.t&&yk(r),t.c==r.c?1:0)}function zw(t,r){return r>>>0>=t.l&&Tk(),fw(t,r)}function Kw(t,r){return 1-Hw(t,r)}function Qw(r){var e=t,n=r.toString();if(e.process&&e.process.env&&void 0!=e.process.env[n])return Kk(e.process.env[n]);Jw(lk.Not_found)}function $w(t){for(;t&&t.joo_tramp;)t=t.joo_tramp.apply(null,t.joo_args),0;return t}function Zw(t,r){return{joo_tramp:t,joo_args:r}}function td(t){return t}function rd(t){return Ww[t]}function ed(r){return r instanceof Array?r:t.RangeError&&r instanceof t.RangeError&&r.message&&r.message.match(/maximum call stack/i)?td(lk.Stack_overflow):t.InternalError&&r instanceof t.InternalError&&r.message&&r.message.match(/too much recursion/i)?td(lk.Stack_overflow):r instanceof t.Error&&rd(jv)?[0,rd(jv),r]:[0,lk.Failure,Kk(String(r))]}function nd(t,r){return 1==t.length?t(r):Pk(t,[r])}function ad(t,r,e){return 2==t.length?t(r,e):Pk(t,[r,e])}function ud(t,r,e,n){return 3==t.length?t(r,e,n):Pk(t,[r,e,n])}function id(t,r,e,n,a){return 4==t.length?t(r,e,n,a):Pk(t,[r,e,n,a])}function cd(t,r,e,n,a,u){return 5==t.length?t(r,e,n,a,u):Pk(t,[r,e,n,a,u])}var fd=[sf,Sk(zt),-1],sd=[sf,Sk(rl),-3],od=[sf,Sk(Ac),-4],vd=[sf,Sk(fi),-7],ld=[sf,Sk(Fo),-8],bd=[sf,Sk(Ku),-9],pd=[sf,Sk(Ze),-11],kd=[sf,Sk(Jp),-12],wd=[0,[11,Sk('File "'),[2,0,[11,Sk('", line '),[4,0,0,0,[11,Sk(", characters "),[4,0,0,0,[12,45,[4,0,0,0,[11,Sk(": "),[2,0,0]]]]]]]]]],Sk('File "%s", line %d, characters %d-%d: %s')],dd=[0,0,[0,0,0,0],[0,0,0,0]],hd=[0,0],md=Sk(""),yd=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),_d=[0,0,0,0,0,0,0,1,0],Fd=[0,0,0],Ed=[0,0];Vw(11,kd,Jp),Vw(10,pd,Ze),Vw(9,[sf,Sk(bf),-10],bf),Vw(8,bd,Ku),Vw(7,ld,Fo),Vw(6,vd,fi),Vw(5,[sf,Sk(oa),-6],oa),Vw(4,[sf,Sk(Kv),-5],Kv),Vw(3,od,Ac),Vw(2,sd,rl),Vw(1,[sf,Sk(Sl),-2],Sl),Vw(0,fd,zt);var Sd=Sk("output_substring"),gd=Sk("%.12g"),xd=Sk(se),Td=Sk(Fc),Ad=Sk(ji),Od=[0,Sk("list.ml"),247,11],Id=Sk("tl"),Pd=Sk("hd"),Dd=Sk("\\\\"),Cd=Sk("\\'"),Nd=Sk("\\b"),Ld=Sk("\\t"),Rd=Sk("\\n"),Md=Sk("\\r"),Ud=Sk("Char.chr"),jd=Sk("String.blit / Bytes.blit_string"),Bd=Sk("Bytes.blit"),Xd=Sk("String.sub / Bytes.sub"),Jd=Sk("String.contains_from / Bytes.contains_from"),Gd=(Sk(so),Sk("String.concat"),Sk("Array.blit")),qd=Sk("Array.sub"),Yd=Sk("Array.init"),Vd=Sk("Set.remove_min_elt"),Wd=[0,0,0,0],Hd=[0,0,0],zd=[0,Sk("set.ml"),508,18],Kd=Sk(nk),Qd=Sk(nk),$d=Sk(nk),Zd=Sk(nk),th=Sk("CamlinternalLazy.Undefined"),rh=Sk("Buffer.add_substring/add_subbytes"),eh=Sk("Buffer.add: cannot grow buffer"),nh=Sk("Buffer.sub"),ah=Sk("%c"),uh=Sk("%s"),ih=Sk("%i"),ch=Sk("%li"),fh=Sk("%ni"),sh=Sk("%Li"),oh=Sk("%f"),vh=Sk(pt),lh=Sk("%{"),bh=Sk("%}"),ph=Sk("%("),kh=Sk("%)"),wh=Sk(lp),dh=Sk("%t"),hh=Sk("%?"),mh=Sk("%r"),yh=Sk("%_r"),_h=[0,Sk(ml),845,23],Fh=[0,Sk(ml),809,21],Eh=[0,Sk(ml),810,21],Sh=[0,Sk(ml),813,21],gh=[0,Sk(ml),814,21],xh=[0,Sk(ml),817,19],Th=[0,Sk(ml),818,19],Ah=[0,Sk(ml),821,22],Oh=[0,Sk(ml),822,22],Ih=[0,Sk(ml),826,30],Ph=[0,Sk(ml),827,30],Dh=[0,Sk(ml),831,26],Ch=[0,Sk(ml),832,26],Nh=[0,Sk(ml),841,28],Lh=[0,Sk(ml),842,28],Rh=[0,Sk(ml),846,23],Mh=Sk("%u"),Uh=[0,Sk(ml),1520,4],jh=Sk("Printf: bad conversion %["),Bh=[0,Sk(ml),1588,39],Xh=[0,Sk(ml),1611,31],Jh=[0,Sk(ml),1612,31],Gh=Sk("Printf: bad conversion %_"),qh=Sk("@{"),Yh=Sk("@["),Vh=[0,[11,Sk("invalid box description "),[3,0,0]],Sk("invalid box description %S")],Wh=Sk(so),Hh=[0,0,4],zh=Sk(so),Kh=Sk("b"),Qh=Sk("h"),$h=Sk("hov"),Zh=Sk("hv"),tm=Sk("v"),rm=Sk(tv),em=Sk(se),nm=Sk("neg_infinity"),am=Sk(Cr),um=Sk("%.12g"),im=Sk("%nd"),cm=Sk("%+nd"),fm=Sk("% nd"),sm=Sk("%ni"),om=Sk("%+ni"),vm=Sk("% ni"),lm=Sk("%nx"),bm=Sk("%#nx"),pm=Sk("%nX"),km=Sk("%#nX"),wm=Sk("%no"),dm=Sk("%#no"),hm=Sk("%nu"),mm=Sk("%ld"),ym=Sk("%+ld"),_m=Sk("% ld"),Fm=Sk("%li"),Em=Sk("%+li"),Sm=Sk("% li"),gm=Sk("%lx"),xm=Sk("%#lx"),Tm=Sk("%lX"),Am=Sk("%#lX"),Om=Sk("%lo"),Im=Sk("%#lo"),Pm=Sk("%lu"),Dm=Sk("%Ld"),Cm=Sk("%+Ld"),Nm=Sk("% Ld"),Lm=Sk("%Li"),Rm=Sk("%+Li"),Mm=Sk("% Li"),Um=Sk("%Lx"),jm=Sk("%#Lx"),Bm=Sk("%LX"),Xm=Sk("%#LX"),Jm=Sk("%Lo"),Gm=Sk("%#Lo"),qm=Sk("%Lu"),Ym=Sk(xa),Vm=Sk("%+d"),Wm=Sk("% d"),Hm=Sk("%i"),zm=Sk("%+i"),Km=Sk("% i"),Qm=Sk("%x"),$m=Sk("%#x"),Zm=Sk("%X"),ty=Sk("%#X"),ry=Sk("%o"),ey=Sk("%#o"),ny=Sk("%u"),ay=Sk(db),uy=Sk("@}"),iy=Sk("@?"),cy=Sk("@\n"),fy=Sk("@."),sy=Sk("@@"),oy=Sk("@%"),vy=Sk("@"),ly=Sk("CamlinternalFormat.Type_mismatch"),by=Sk(so),py=[0,[11,Sk(", "),[2,0,[2,0,0]]],Sk(", %s%s")],ky=Sk("Out of memory"),wy=Sk("Stack overflow"),dy=Sk("Pattern matching failed"),hy=Sk("Assertion failed"),my=Sk("Undefined recursive module"),yy=[0,[12,40,[2,0,[2,0,[12,41,0]]]],Sk("(%s%s)")],_y=Sk(so),Fy=Sk(so),Ey=[0,[12,40,[2,0,[12,41,0]]],Sk("(%s)")],Sy=[0,[4,0,0,0,0],Sk(xa)],gy=[0,[3,0,0],Sk(qf)],xy=Sk("_"),Ty=Sk("x"),Ay=Sk("OCAMLRUNPARAM"),Oy=Sk("CAMLRUNPARAM"),Iy=Sk(so),Py=[3,0,3],Dy=Sk(se),Cy=Sk(">"),Ny=Sk(""),Ry=Sk("<"),My=Sk("\n"),Uy=Sk("Format.Empty_queue"),jy=[0,Sk(so)],By=Sk("TMPDIR"),Xy=Sk("TEMP"),Jy=Sk("Cygwin"),Gy=Sk("Win32"),qy=Sk("E2BIG"),Yy=Sk("EACCES"),Vy=Sk("EAGAIN"),Wy=Sk("EBADF"),Hy=Sk("EBUSY"),zy=Sk("ECHILD"),Ky=Sk("EDEADLK"),Qy=Sk("EDOM"),$y=Sk("EEXIST"),Zy=Sk("EFAULT"),t_=Sk("EFBIG"),r_=Sk("EINTR"),e_=Sk("EINVAL"),n_=Sk("EIO"),a_=Sk("EISDIR"),u_=Sk("EMFILE"),i_=Sk("EMLINK"),c_=Sk("ENAMETOOLONG"),f_=Sk("ENFILE"),s_=Sk("ENODEV"),o_=Sk("ENOENT"),v_=Sk("ENOEXEC"),l_=Sk("ENOLCK"),b_=Sk("ENOMEM"),p_=Sk("ENOSPC"),k_=Sk("ENOSYS"),w_=Sk("ENOTDIR"),d_=Sk("ENOTEMPTY"),h_=Sk("ENOTTY"),m_=Sk("ENXIO"),y_=Sk("EPERM"),__=Sk("EPIPE"),F_=Sk("ERANGE"),E_=Sk("EROFS"),S_=Sk("ESPIPE"),g_=Sk("ESRCH"),x_=Sk("EXDEV"),T_=Sk("EWOULDBLOCK"),A_=Sk("EINPROGRESS"),O_=Sk("EALREADY"),I_=Sk("ENOTSOCK"),P_=Sk("EDESTADDRREQ"),D_=Sk("EMSGSIZE"),C_=Sk("EPROTOTYPE"),N_=Sk("ENOPROTOOPT"),L_=Sk("EPROTONOSUPPORT"),R_=Sk("ESOCKTNOSUPPORT"),M_=Sk("EOPNOTSUPP"),U_=Sk("EPFNOSUPPORT"),j_=Sk("EAFNOSUPPORT"),B_=Sk("EADDRINUSE"),X_=Sk("EADDRNOTAVAIL"),J_=Sk("ENETDOWN"),G_=Sk("ENETUNREACH"),q_=Sk("ENETRESET"),Y_=Sk("ECONNABORTED"),V_=Sk("ECONNRESET"),W_=Sk("ENOBUFS"),H_=Sk("EISCONN"),z_=Sk("ENOTCONN"),K_=Sk("ESHUTDOWN"),Q_=Sk("ETOOMANYREFS"),$_=Sk("ETIMEDOUT"),Z_=Sk("ECONNREFUSED"),tF=Sk("EHOSTDOWN"),rF=Sk("EHOSTUNREACH"),eF=Sk("ELOOP"),nF=Sk("EOVERFLOW"),aF=[0,[11,Sk("EUNKNOWNERR "),[4,0,0,0,0]],Sk("EUNKNOWNERR %d")],uF=[0,[11,Sk("Unix.Unix_error(Unix."),[2,0,[11,Sk(", "),[3,0,[11,Sk(", "),[3,0,[12,41,0]]]]]]],Sk("Unix.Unix_error(Unix.%s, %S, %S)")],iF=Sk(Uu),cF=Sk(so),fF=Sk(so),sF=Sk(Uu),oF=(Sk("0.0.0.0"),Sk("127.0.0.1"),Sk("::"),Sk("::1"),[0,Sk("sedlexing.ml"),51,25]),vF=Sk("Sedlexing.MalFormed"),lF=Sk("Js.Error"),bF=Sk(jv),pF=[0,[15,0],Sk(lp)],kF=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],wF=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],dF=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],hF=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],mF=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],yF=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],_F=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],FF=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],EF=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],SF=[0,[17,0,[12,41,0]],Sk(Ir)],gF=[0,[15,0],Sk(lp)],xF=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Function.BodyBlock"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Function.BodyBlock@ ")],TF=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],AF=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],OF=[0,[17,0,[12,41,0]],Sk(Ir)],IF=[0,[17,0,[12,41,0]],Sk(Ir)],PF=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Function.BodyExpression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Function.BodyExpression@ ")],DF=[0,[17,0,[12,41,0]],Sk(Ir)],CF=[0,[15,0],Sk(lp)],NF=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],LF=Sk("Flow_ast.Function.id"),RF=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],MF=Sk(zv),UF=Sk(zo),jF=Sk(Nl),BF=[0,[17,0,0],Sk(db)],XF=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],JF=Sk(I),GF=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],qF=[0,[17,0,0],Sk(db)],YF=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],VF=Sk(eu),WF=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],HF=[0,[17,0,0],Sk(db)],zF=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],KF=Sk(os),QF=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],$F=[0,[9,0],Sk(pt)],ZF=[0,[17,0,0],Sk(db)],tE=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],rE=Sk(Xb),eE=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],nE=[0,[9,0],Sk(pt)],aE=[0,[17,0,0],Sk(db)],uE=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],iE=Sk(rb),cE=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],fE=Sk(zv),sE=Sk(zo),oE=Sk(Nl),vE=[0,[17,0,0],Sk(db)],lE=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],bE=Sk(Xe),pE=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],kE=[0,[9,0],Sk(pt)],wE=[0,[17,0,0],Sk(db)],dE=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],hE=Sk(gn),mE=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],yE=[0,[17,0,0],Sk(db)],_E=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],FE=Sk(Mt),EE=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],SE=Sk(zv),gE=Sk(zo),xE=Sk(Nl),TE=[0,[17,0,0],Sk(db)],AE=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],OE=[0,[15,0],Sk(lp)],IE=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],PE=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],DE=Sk("Flow_ast.Function.Params.params"),CE=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],NE=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],LE=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],RE=[0,[17,0,0],Sk(db)],ME=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],UE=Sk(Fi),jE=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],BE=Sk(zv),XE=Sk(zo),JE=Sk(Nl),GE=[0,[17,0,0],Sk(db)],qE=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],YE=[0,[15,0],Sk(lp)],VE=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],WE=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],HE=[0,[17,0,[12,41,0]],Sk(Ir)],zE=[0,[15,0],Sk(lp)],KE=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],QE=Sk("Flow_ast.Function.RestElement.argument"),$E=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ZE=[0,[17,0,0],Sk(db)],tS=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],rS=[0,[15,0],Sk(lp)],eS=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],nS=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],aS=[0,[17,0,[12,41,0]],Sk(Ir)],uS=[0,[15,0],Sk(lp)],iS=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],cS=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],fS=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],sS=Sk("Flow_ast.Class.id"),oS=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],vS=Sk(zv),lS=Sk(zo),bS=Sk(Nl),pS=[0,[17,0,0],Sk(db)],kS=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],wS=Sk(eu),dS=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],hS=[0,[17,0,0],Sk(db)],mS=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],yS=Sk(Mt),_S=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],FS=Sk(zv),ES=Sk(zo),SS=Sk(Nl),gS=[0,[17,0,0],Sk(db)],xS=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],TS=Sk(sk),AS=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],OS=Sk(zv),IS=Sk(zo),PS=Sk(Nl),DS=[0,[17,0,0],Sk(db)],CS=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],NS=Sk(Hr),LS=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],RS=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],MS=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],US=[0,[17,0,0],Sk(db)],jS=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],BS=Sk("classDecorators"),XS=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],JS=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],GS=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],qS=[0,[17,0,0],Sk(db)],YS=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],VS=[0,[15,0],Sk(lp)],WS=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],HS=Sk("Flow_ast.Class.Decorator.expression"),zS=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],KS=[0,[17,0,0],Sk(db)],QS=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],$S=[0,[15,0],Sk(lp)],ZS=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],tg=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],rg=[0,[17,0,[12,41,0]],Sk(Ir)],eg=[0,[15,0],Sk(lp)],ng=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Class.Body.Method"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Class.Body.Method@ ")],ag=[0,[17,0,[12,41,0]],Sk(Ir)],ug=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Class.Body.Property"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Class.Body.Property@ ")],ig=[0,[17,0,[12,41,0]],Sk(Ir)],cg=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Class.Body.PrivateField"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Class.Body.PrivateField@ ")],fg=[0,[17,0,[12,41,0]],Sk(Ir)],sg=[0,[15,0],Sk(lp)],og=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],vg=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],lg=Sk("Flow_ast.Class.Body.body"),bg=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],pg=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],kg=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],wg=[0,[17,0,0],Sk(db)],dg=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],hg=[0,[15,0],Sk(lp)],mg=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],yg=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],_g=[0,[17,0,[12,41,0]],Sk(Ir)],Fg=[0,[15,0],Sk(lp)],Eg=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Sg=Sk("Flow_ast.Class.Implements.id"),gg=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],xg=[0,[17,0,0],Sk(db)],Tg=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Ag=Sk(xs),Og=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Ig=Sk(zv),Pg=Sk(zo),Dg=Sk(Nl),Cg=[0,[17,0,0],Sk(db)],Ng=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Lg=[0,[15,0],Sk(lp)],Rg=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],Mg=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Ug=[0,[17,0,[12,41,0]],Sk(Ir)],jg=[0,[15,0],Sk(lp)],Bg=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Xg=Sk("Flow_ast.Class.Extends.expr"),Jg=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Gg=[0,[17,0,0],Sk(db)],qg=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Yg=Sk(xs),Vg=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Wg=Sk(zv),Hg=Sk(zo),zg=Sk(Nl),Kg=[0,[17,0,0],Sk(db)],Qg=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],$g=[0,[15,0],Sk(lp)],Zg=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],tx=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],rx=[0,[17,0,[12,41,0]],Sk(Ir)],ex=[0,[15,0],Sk(lp)],nx=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],ax=Sk("Flow_ast.Class.PrivateField.key"),ux=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ix=[0,[17,0,0],Sk(db)],cx=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],fx=Sk(qe),sx=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ox=Sk(zv),vx=Sk(zo),lx=Sk(Nl),bx=[0,[17,0,0],Sk(db)],px=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],kx=Sk(Xu),wx=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],dx=[0,[17,0,0],Sk(db)],hx=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],mx=Sk(Du),yx=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],_x=[0,[9,0],Sk(pt)],Fx=[0,[17,0,0],Sk(db)],Ex=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Sx=Sk(l),gx=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],xx=Sk(zv),Tx=Sk(zo),Ax=Sk(Nl),Ox=[0,[17,0,0],Sk(db)],Ix=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Px=[0,[15,0],Sk(lp)],Dx=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],Cx=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Nx=[0,[17,0,[12,41,0]],Sk(Ir)],Lx=[0,[15,0],Sk(lp)],Rx=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Mx=Sk("Flow_ast.Class.Property.key"),Ux=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],jx=[0,[17,0,0],Sk(db)],Bx=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Xx=Sk(qe),Jx=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Gx=Sk(zv),qx=Sk(zo),Yx=Sk(Nl),Vx=[0,[17,0,0],Sk(db)],Wx=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Hx=Sk(Xu),zx=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Kx=[0,[17,0,0],Sk(db)],Qx=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],$x=Sk(Du),Zx=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],tT=[0,[9,0],Sk(pt)],rT=[0,[17,0,0],Sk(db)],eT=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],nT=Sk(l),aT=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],uT=Sk(zv),iT=Sk(zo),cT=Sk(Nl),fT=[0,[17,0,0],Sk(db)],sT=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],oT=[0,[15,0],Sk(lp)],vT=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],lT=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],bT=[0,[17,0,[12,41,0]],Sk(Ir)],pT=[0,[15,0],Sk(lp)],kT=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],wT=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],dT=Sk("Flow_ast.Class.Method.kind"),hT=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],mT=[0,[17,0,0],Sk(db)],yT=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],_T=Sk(Up),FT=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ET=[0,[17,0,0],Sk(db)],ST=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],gT=Sk(qe),xT=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],TT=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],AT=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],OT=[0,[17,0,[12,41,0]],Sk(Ir)],IT=[0,[17,0,0],Sk(db)],PT=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],DT=Sk(Du),CT=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],NT=[0,[9,0],Sk(pt)],LT=[0,[17,0,0],Sk(db)],RT=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],MT=Sk(ct),UT=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],jT=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],BT=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],XT=[0,[17,0,0],Sk(db)],JT=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],GT=[0,[15,0],Sk(lp)],qT=Sk("Flow_ast.Class.Method.Constructor"),YT=Sk("Flow_ast.Class.Method.Method"),VT=Sk("Flow_ast.Class.Method.Get"),WT=Sk("Flow_ast.Class.Method.Set"),HT=[0,[15,0],Sk(lp)],zT=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],KT=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],QT=[0,[17,0,[12,41,0]],Sk(Ir)],$T=[0,[15,0],Sk(lp)],ZT=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Comment.Block"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Comment.Block@ ")],tA=[0,[3,0,0],Sk(qf)],rA=[0,[17,0,[12,41,0]],Sk(Ir)],eA=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Comment.Line"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Comment.Line@ ")],nA=[0,[3,0,0],Sk(qf)],aA=[0,[17,0,[12,41,0]],Sk(Ir)],uA=[0,[15,0],Sk(lp)],iA=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],cA=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],fA=[0,[17,0,[12,41,0]],Sk(Ir)],sA=[0,[15,0],Sk(lp)],oA=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Object"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Object@ ")],vA=[0,[17,0,[12,41,0]],Sk(Ir)],lA=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Array"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Array@ ")],bA=[0,[17,0,[12,41,0]],Sk(Ir)],pA=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Assignment"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Assignment@ ")],kA=[0,[17,0,[12,41,0]],Sk(Ir)],wA=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Identifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Identifier@ ")],dA=[0,[17,0,[12,41,0]],Sk(Ir)],hA=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Expression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Expression@ ")],mA=[0,[17,0,[12,41,0]],Sk(Ir)],yA=[0,[15,0],Sk(lp)],_A=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],FA=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],EA=[0,[17,0,[12,41,0]],Sk(Ir)],SA=[0,[15,0],Sk(lp)],gA=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],xA=Sk("Flow_ast.Pattern.Identifier.name"),TA=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],AA=[0,[17,0,0],Sk(db)],OA=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],IA=Sk(Xu),PA=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],DA=[0,[17,0,0],Sk(db)],CA=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],NA=Sk(pb),LA=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],RA=[0,[9,0],Sk(pt)],MA=[0,[17,0,0],Sk(db)],UA=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],jA=[0,[15,0],Sk(lp)],BA=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],XA=Sk("Flow_ast.Pattern.Assignment.left"),JA=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],GA=[0,[17,0,0],Sk(db)],qA=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],YA=Sk(Za),VA=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],WA=[0,[17,0,0],Sk(db)],HA=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],zA=[0,[15,0],Sk(lp)],KA=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],QA=Sk(zv),$A=Sk(zo),ZA=Sk(Nl),tO=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],rO=Sk("Flow_ast.Pattern.Array.elements"),eO=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],nO=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],aO=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],uO=[0,[17,0,0],Sk(db)],iO=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],cO=Sk(Xu),fO=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],sO=[0,[17,0,0],Sk(db)],oO=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],vO=[0,[15,0],Sk(lp)],lO=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Array.Element"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Array.Element@ ")],bO=[0,[17,0,[12,41,0]],Sk(Ir)],pO=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Array.RestElement"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Array.RestElement@ ")],kO=[0,[17,0,[12,41,0]],Sk(Ir)],wO=[0,[15,0],Sk(lp)],dO=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],hO=Sk("Flow_ast.Pattern.Array.RestElement.argument"),mO=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],yO=[0,[17,0,0],Sk(db)],_O=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],FO=[0,[15,0],Sk(lp)],EO=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],SO=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],gO=[0,[17,0,[12,41,0]],Sk(Ir)],xO=[0,[15,0],Sk(lp)],TO=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],AO=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],OO=Sk("Flow_ast.Pattern.Object.properties"),IO=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],PO=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],DO=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],CO=[0,[17,0,0],Sk(db)],NO=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],LO=Sk(Xu),RO=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],MO=[0,[17,0,0],Sk(db)],UO=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],jO=[0,[15,0],Sk(lp)],BO=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Object.Property"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Object.Property@ ")],XO=[0,[17,0,[12,41,0]],Sk(Ir)],JO=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Object.RestProperty"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Object.RestProperty@ ")],GO=[0,[17,0,[12,41,0]],Sk(Ir)],qO=[0,[15,0],Sk(lp)],YO=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],VO=Sk("Flow_ast.Pattern.Object.RestProperty.argument"),WO=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],HO=[0,[17,0,0],Sk(db)],zO=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],KO=[0,[15,0],Sk(lp)],QO=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],$O=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],ZO=[0,[17,0,[12,41,0]],Sk(Ir)],tI=[0,[15,0],Sk(lp)],rI=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],eI=Sk("Flow_ast.Pattern.Object.Property.key"),nI=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],aI=[0,[17,0,0],Sk(db)],uI=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],iI=Sk(k),cI=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],fI=[0,[17,0,0],Sk(db)],sI=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],oI=Sk(Zc),vI=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],lI=[0,[9,0],Sk(pt)],bI=[0,[17,0,0],Sk(db)],pI=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],kI=[0,[15,0],Sk(lp)],wI=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],dI=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],hI=[0,[17,0,[12,41,0]],Sk(Ir)],mI=[0,[15,0],Sk(lp)],yI=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Object.Property.Literal"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Object.Property.Literal@ ")],_I=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],FI=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],EI=[0,[17,0,[12,41,0]],Sk(Ir)],SI=[0,[17,0,[12,41,0]],Sk(Ir)],gI=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Object.Property.Identifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Object.Property.Identifier@ ")],xI=[0,[17,0,[12,41,0]],Sk(Ir)],TI=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Pattern.Object.Property.Computed"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Pattern.Object.Property.Computed@ ")],AI=[0,[17,0,[12,41,0]],Sk(Ir)],OI=[0,[15,0],Sk(lp)],II=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],PI=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],DI=Sk("Flow_ast.JSX.frag_openingElement"),CI=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],NI=[0,[17,0,0],Sk(db)],LI=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],RI=Sk("frag_closingElement"),MI=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],UI=Sk(zv),jI=Sk(zo),BI=Sk(Nl),XI=[0,[17,0,0],Sk(db)],JI=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],GI=Sk("frag_children"),qI=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],YI=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],VI=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],WI=[0,[17,0,0],Sk(db)],HI=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],zI=[0,[15,0],Sk(lp)],KI=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],QI=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],$I=Sk("Flow_ast.JSX.openingElement"),ZI=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],tP=[0,[17,0,0],Sk(db)],rP=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],eP=Sk(cn),nP=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],aP=Sk(zv),uP=Sk(zo),iP=Sk(Nl),cP=[0,[17,0,0],Sk(db)],fP=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],sP=Sk(i),oP=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],vP=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],lP=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],bP=[0,[17,0,0],Sk(db)],pP=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],kP=[0,[15,0],Sk(lp)],wP=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Element"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Element@ ")],dP=[0,[17,0,[12,41,0]],Sk(Ir)],hP=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Fragment"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Fragment@ ")],mP=[0,[17,0,[12,41,0]],Sk(Ir)],yP=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.ExpressionContainer"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.ExpressionContainer@ ")],_P=[0,[17,0,[12,41,0]],Sk(Ir)],FP=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.SpreadChild"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.SpreadChild@ ")],EP=[0,[17,0,[12,41,0]],Sk(Ir)],SP=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Text"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Text@ ")],gP=[0,[17,0,[12,41,0]],Sk(Ir)],xP=[0,[15,0],Sk(lp)],TP=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],AP=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],OP=[0,[17,0,[12,41,0]],Sk(Ir)],IP=[0,[15,0],Sk(lp)],PP=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],DP=Sk("Flow_ast.JSX.Closing.name"),CP=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],NP=[0,[17,0,0],Sk(db)],LP=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],RP=[0,[15,0],Sk(lp)],MP=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],UP=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],jP=[0,[17,0,[12,41,0]],Sk(Ir)],BP=[0,[15,0],Sk(lp)],XP=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],JP=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],GP=Sk("Flow_ast.JSX.Opening.name"),qP=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],YP=[0,[17,0,0],Sk(db)],VP=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],WP=Sk(zb),HP=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],zP=[0,[9,0],Sk(pt)],KP=[0,[17,0,0],Sk(db)],QP=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],$P=Sk(Vc),ZP=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],tD=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],rD=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],eD=[0,[17,0,0],Sk(db)],nD=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],aD=[0,[15,0],Sk(lp)],uD=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Opening.Attribute"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Opening.Attribute@ ")],iD=[0,[17,0,[12,41,0]],Sk(Ir)],cD=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Opening.SpreadAttribute"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Opening.SpreadAttribute@ ")],fD=[0,[17,0,[12,41,0]],Sk(Ir)],sD=[0,[15,0],Sk(lp)],oD=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],vD=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],lD=[0,[17,0,[12,41,0]],Sk(Ir)],bD=[0,[15,0],Sk(lp)],pD=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Identifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Identifier@ ")],kD=[0,[17,0,[12,41,0]],Sk(Ir)],wD=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.NamespacedName"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.NamespacedName@ ")],dD=[0,[17,0,[12,41,0]],Sk(Ir)],hD=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.MemberExpression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.MemberExpression@ ")],mD=[0,[17,0,[12,41,0]],Sk(Ir)],yD=[0,[15,0],Sk(lp)],_D=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],FD=Sk("Flow_ast.JSX.MemberExpression._object"),ED=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],SD=[0,[17,0,0],Sk(db)],gD=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],xD=Sk(wv),TD=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],AD=[0,[17,0,0],Sk(db)],OD=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],ID=[0,[15,0],Sk(lp)],PD=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.MemberExpression.Identifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.MemberExpression.Identifier@ ")],DD=[0,[17,0,[12,41,0]],Sk(Ir)],CD=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.MemberExpression.MemberExpression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.MemberExpression.MemberExpression@ ")],ND=[0,[17,0,[12,41,0]],Sk(Ir)],LD=[0,[15,0],Sk(lp)],RD=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],MD=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],UD=[0,[17,0,[12,41,0]],Sk(Ir)],jD=[0,[15,0],Sk(lp)],BD=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],XD=Sk("Flow_ast.JSX.SpreadAttribute.argument"),JD=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],GD=[0,[17,0,0],Sk(db)],qD=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],YD=[0,[15,0],Sk(lp)],VD=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],WD=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],HD=[0,[17,0,[12,41,0]],Sk(Ir)],zD=[0,[15,0],Sk(lp)],KD=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],QD=Sk("Flow_ast.JSX.Attribute.name"),$D=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ZD=[0,[17,0,0],Sk(db)],tC=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],rC=Sk(qe),eC=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],nC=Sk(zv),aC=Sk(zo),uC=Sk(Nl),iC=[0,[17,0,0],Sk(db)],cC=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],fC=[0,[15,0],Sk(lp)],sC=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Attribute.Literal ("),[17,[0,Sk(No),0,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Attribute.Literal (@,")],oC=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],vC=[0,[17,[0,Sk(No),0,0],[11,Sk(ir),[17,0,0]]],Sk(ga)],lC=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Attribute.ExpressionContainer ("),[17,[0,Sk(No),0,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Attribute.ExpressionContainer (@,")],bC=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],pC=[0,[17,[0,Sk(No),0,0],[11,Sk(ir),[17,0,0]]],Sk(ga)],kC=[0,[15,0],Sk(lp)],wC=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Attribute.Identifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Attribute.Identifier@ ")],dC=[0,[17,0,[12,41,0]],Sk(Ir)],hC=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.Attribute.NamespacedName"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.Attribute.NamespacedName@ ")],mC=[0,[17,0,[12,41,0]],Sk(Ir)],yC=[0,[15,0],Sk(lp)],_C=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],FC=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],EC=[0,[17,0,[12,41,0]],Sk(Ir)],SC=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],gC=Sk("Flow_ast.JSX.Text.value"),xC=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],TC=[0,[3,0,0],Sk(qf)],AC=[0,[17,0,0],Sk(db)],OC=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],IC=Sk(Zr),PC=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],DC=[0,[3,0,0],Sk(qf)],CC=[0,[17,0,0],Sk(db)],NC=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],LC=[0,[15,0],Sk(lp)],RC=[0,[15,0],Sk(lp)],MC=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.ExpressionContainer.Expression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.ExpressionContainer.Expression@ ")],UC=[0,[17,0,[12,41,0]],Sk(Ir)],jC=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.JSX.ExpressionContainer.EmptyExpression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.JSX.ExpressionContainer.EmptyExpression@ ")],BC=[0,[17,0,[12,41,0]],Sk(Ir)],XC=[0,[15,0],Sk(lp)],JC=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],GC=Sk("Flow_ast.JSX.ExpressionContainer.expression"),qC=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],YC=[0,[17,0,0],Sk(db)],VC=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],WC=[0,[15,0],Sk(lp)],HC=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],zC=Sk("Flow_ast.JSX.NamespacedName.namespace"),KC=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],QC=[0,[17,0,0],Sk(db)],$C=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],ZC=Sk(Bl),tN=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],rN=[0,[17,0,0],Sk(db)],eN=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],nN=[0,[15,0],Sk(lp)],aN=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],uN=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],iN=[0,[17,0,[12,41,0]],Sk(Ir)],cN=[0,[15,0],Sk(lp)],fN=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],sN=Sk("Flow_ast.JSX.Identifier.name"),oN=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],vN=[0,[3,0,0],Sk(qf)],lN=[0,[17,0,0],Sk(db)],bN=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],pN=[0,[15,0],Sk(lp)],kN=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],wN=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],dN=[0,[17,0,[12,41,0]],Sk(Ir)],hN=[0,[15,0],Sk(lp)],mN=Sk("Flow_ast.Expression.Super"),yN=Sk("Flow_ast.Expression.This"),_N=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Array"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Array@ ")],FN=[0,[17,0,[12,41,0]],Sk(Ir)],EN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.ArrowFunction"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.ArrowFunction@ ")],SN=[0,[17,0,[12,41,0]],Sk(Ir)],gN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Assignment"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Assignment@ ")],xN=[0,[17,0,[12,41,0]],Sk(Ir)],TN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Binary"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Binary@ ")],AN=[0,[17,0,[12,41,0]],Sk(Ir)],ON=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Call"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Call@ ")],IN=[0,[17,0,[12,41,0]],Sk(Ir)],PN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Class"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Class@ ")],DN=[0,[17,0,[12,41,0]],Sk(Ir)],CN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Comprehension"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Comprehension@ ")],NN=[0,[17,0,[12,41,0]],Sk(Ir)],LN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Conditional"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Conditional@ ")],RN=[0,[17,0,[12,41,0]],Sk(Ir)],MN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Function"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Function@ ")],UN=[0,[17,0,[12,41,0]],Sk(Ir)],jN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Generator"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Generator@ ")],BN=[0,[17,0,[12,41,0]],Sk(Ir)],XN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Identifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Identifier@ ")],JN=[0,[17,0,[12,41,0]],Sk(Ir)],GN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Import"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Import@ ")],qN=[0,[17,0,[12,41,0]],Sk(Ir)],YN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.JSXElement"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.JSXElement@ ")],VN=[0,[17,0,[12,41,0]],Sk(Ir)],WN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.JSXFragment"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.JSXFragment@ ")],HN=[0,[17,0,[12,41,0]],Sk(Ir)],zN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Literal"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Literal@ ")],KN=[0,[17,0,[12,41,0]],Sk(Ir)],QN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Logical"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Logical@ ")],$N=[0,[17,0,[12,41,0]],Sk(Ir)],ZN=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Member"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Member@ ")],tL=[0,[17,0,[12,41,0]],Sk(Ir)],rL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.MetaProperty"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.MetaProperty@ ")],eL=[0,[17,0,[12,41,0]],Sk(Ir)],nL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.New"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.New@ ")],aL=[0,[17,0,[12,41,0]],Sk(Ir)],uL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Object@ ")],iL=[0,[17,0,[12,41,0]],Sk(Ir)],cL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.OptionalCall"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.OptionalCall@ ")],fL=[0,[17,0,[12,41,0]],Sk(Ir)],sL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.OptionalMember"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.OptionalMember@ ")],oL=[0,[17,0,[12,41,0]],Sk(Ir)],vL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Sequence"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Sequence@ ")],lL=[0,[17,0,[12,41,0]],Sk(Ir)],bL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.TaggedTemplate"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.TaggedTemplate@ ")],pL=[0,[17,0,[12,41,0]],Sk(Ir)],kL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.TemplateLiteral"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.TemplateLiteral@ ")],wL=[0,[17,0,[12,41,0]],Sk(Ir)],dL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.TypeCast"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.TypeCast@ ")],hL=[0,[17,0,[12,41,0]],Sk(Ir)],mL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Unary"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Unary@ ")],yL=[0,[17,0,[12,41,0]],Sk(Ir)],_L=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Update"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Update@ ")],FL=[0,[17,0,[12,41,0]],Sk(Ir)],EL=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Yield"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Yield@ ")],SL=[0,[17,0,[12,41,0]],Sk(Ir)],gL=[0,[15,0],Sk(lp)],xL=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],TL=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],AL=[0,[17,0,[12,41,0]],Sk(Ir)],OL=[0,[15,0],Sk(lp)],IL=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],PL=Sk("Flow_ast.Expression.MetaProperty.meta"),DL=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],CL=[0,[17,0,0],Sk(db)],NL=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],LL=Sk(wv),RL=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ML=[0,[17,0,0],Sk(db)],UL=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],jL=[0,[15,0],Sk(lp)],BL=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],XL=Sk("Flow_ast.Expression.TypeCast.expression"),JL=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],GL=[0,[17,0,0],Sk(db)],qL=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],YL=Sk(Xu),VL=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],WL=[0,[17,0,0],Sk(db)],HL=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],zL=[0,[15,0],Sk(lp)],KL=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],QL=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],$L=Sk("Flow_ast.Expression.Generator.blocks"),ZL=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],tR=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],rR=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],eR=[0,[17,0,0],Sk(db)],nR=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],aR=Sk(bn),uR=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],iR=Sk(zv),cR=Sk(zo),fR=Sk(Nl),sR=[0,[17,0,0],Sk(db)],oR=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],vR=[0,[15,0],Sk(lp)],lR=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],bR=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],pR=Sk("Flow_ast.Expression.Comprehension.blocks"),kR=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],wR=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],dR=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],hR=[0,[17,0,0],Sk(db)],mR=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],yR=Sk(bn),_R=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],FR=Sk(zv),ER=Sk(zo),SR=Sk(Nl),gR=[0,[17,0,0],Sk(db)],xR=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],TR=[0,[15,0],Sk(lp)],AR=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],OR=Sk("Flow_ast.Expression.Comprehension.Block.left"),IR=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],PR=[0,[17,0,0],Sk(db)],DR=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],CR=Sk(Za),NR=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],LR=[0,[17,0,0],Sk(db)],RR=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],MR=Sk(El),UR=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],jR=[0,[9,0],Sk(pt)],BR=[0,[17,0,0],Sk(db)],XR=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],JR=[0,[15,0],Sk(lp)],GR=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],qR=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],YR=[0,[17,0,[12,41,0]],Sk(Ir)],VR=[0,[15,0],Sk(lp)],WR=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],HR=Sk("Flow_ast.Expression.Yield.argument"),zR=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],KR=Sk(zv),QR=Sk(zo),$R=Sk(Nl),ZR=[0,[17,0,0],Sk(db)],tM=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],rM=Sk(_c),eM=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],nM=[0,[9,0],Sk(pt)],aM=[0,[17,0,0],Sk(db)],uM=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],iM=[0,[15,0],Sk(lp)],cM=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],fM=Sk("Flow_ast.Expression.OptionalMember.member"),sM=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],oM=[0,[17,0,0],Sk(db)],vM=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],lM=Sk(pb),bM=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],pM=[0,[9,0],Sk(pt)],kM=[0,[17,0,0],Sk(db)],wM=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],dM=[0,[15,0],Sk(lp)],hM=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],mM=Sk("Flow_ast.Expression.Member._object"),yM=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],_M=[0,[17,0,0],Sk(db)],FM=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],EM=Sk(wv),SM=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],gM=[0,[17,0,0],Sk(db)],xM=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],TM=Sk(bc),AM=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],OM=[0,[9,0],Sk(pt)],IM=[0,[17,0,0],Sk(db)],PM=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],DM=[0,[15,0],Sk(lp)],CM=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Member.PropertyIdentifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Member.PropertyIdentifier@ ")],NM=[0,[17,0,[12,41,0]],Sk(Ir)],LM=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Member.PropertyPrivateName"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Member.PropertyPrivateName@ ")],RM=[0,[17,0,[12,41,0]],Sk(Ir)],MM=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Member.PropertyExpression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Member.PropertyExpression@ ")],UM=[0,[17,0,[12,41,0]],Sk(Ir)],jM=[0,[15,0],Sk(lp)],BM=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],XM=Sk("Flow_ast.Expression.OptionalCall.call"),JM=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],GM=[0,[17,0,0],Sk(db)],qM=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],YM=Sk(pb),VM=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],WM=[0,[9,0],Sk(pt)],HM=[0,[17,0,0],Sk(db)],zM=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],KM=[0,[15,0],Sk(lp)],QM=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],$M=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],ZM=Sk("Flow_ast.Expression.Call.callee"),tU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],rU=[0,[17,0,0],Sk(db)],eU=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],nU=Sk(xs),aU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],uU=Sk(zv),iU=Sk(zo),cU=Sk(Nl),fU=[0,[17,0,0],Sk(db)],sU=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],oU=Sk(Fu),vU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],lU=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],bU=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],pU=[0,[17,0,0],Sk(db)],kU=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],wU=[0,[15,0],Sk(lp)],dU=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],hU=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],mU=Sk("Flow_ast.Expression.New.callee"),yU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],_U=[0,[17,0,0],Sk(db)],FU=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],EU=Sk(xs),SU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],gU=Sk(zv),xU=Sk(zo),TU=Sk(Nl),AU=[0,[17,0,0],Sk(db)],OU=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],IU=Sk(Fu),PU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],DU=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],CU=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],NU=[0,[17,0,0],Sk(db)],LU=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],RU=[0,[15,0],Sk(lp)],MU=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],UU=Sk("Flow_ast.Expression.Conditional.test"),jU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],BU=[0,[17,0,0],Sk(db)],XU=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],JU=Sk(_),GU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],qU=[0,[17,0,0],Sk(db)],YU=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],VU=Sk(ne),WU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],HU=[0,[17,0,0],Sk(db)],zU=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],KU=[0,[15,0],Sk(lp)],QU=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],$U=Sk("Flow_ast.Expression.Logical.operator"),ZU=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],tj=[0,[17,0,0],Sk(db)],rj=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],ej=Sk(ps),nj=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],aj=[0,[17,0,0],Sk(db)],uj=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],ij=Sk(Za),cj=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],fj=[0,[17,0,0],Sk(db)],sj=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],oj=[0,[15,0],Sk(lp)],vj=Sk("Flow_ast.Expression.Logical.Or"),lj=Sk("Flow_ast.Expression.Logical.And"),bj=Sk("Flow_ast.Expression.Logical.NullishCoalesce"),pj=[0,[15,0],Sk(lp)],kj=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],wj=Sk("Flow_ast.Expression.Update.operator"),dj=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],hj=[0,[17,0,0],Sk(db)],mj=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],yj=Sk(po),_j=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Fj=[0,[17,0,0],Sk(db)],Ej=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Sj=Sk(Fp),gj=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],xj=[0,[9,0],Sk(pt)],Tj=[0,[17,0,0],Sk(db)],Aj=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Oj=[0,[15,0],Sk(lp)],Ij=Sk("Flow_ast.Expression.Update.Decrement"),Pj=Sk("Flow_ast.Expression.Update.Increment"),Dj=[0,[15,0],Sk(lp)],Cj=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Nj=Sk("Flow_ast.Expression.Assignment.operator"),Lj=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Rj=[0,[17,0,0],Sk(db)],Mj=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Uj=Sk(ps),jj=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Bj=[0,[17,0,0],Sk(db)],Xj=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Jj=Sk(Za),Gj=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],qj=[0,[17,0,0],Sk(db)],Yj=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Vj=[0,[15,0],Sk(lp)],Wj=Sk("Flow_ast.Expression.Assignment.Assign"),Hj=Sk("Flow_ast.Expression.Assignment.PlusAssign"),zj=Sk("Flow_ast.Expression.Assignment.MinusAssign"),Kj=Sk("Flow_ast.Expression.Assignment.MultAssign"),Qj=Sk("Flow_ast.Expression.Assignment.ExpAssign"),$j=Sk("Flow_ast.Expression.Assignment.DivAssign"),Zj=Sk("Flow_ast.Expression.Assignment.ModAssign"),tB=Sk("Flow_ast.Expression.Assignment.LShiftAssign"),rB=Sk("Flow_ast.Expression.Assignment.RShiftAssign"),eB=Sk("Flow_ast.Expression.Assignment.RShift3Assign"),nB=Sk("Flow_ast.Expression.Assignment.BitOrAssign"),aB=Sk("Flow_ast.Expression.Assignment.BitXorAssign"),uB=Sk("Flow_ast.Expression.Assignment.BitAndAssign"),iB=[0,[15,0],Sk(lp)],cB=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],fB=Sk("Flow_ast.Expression.Binary.operator"),sB=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],oB=[0,[17,0,0],Sk(db)],vB=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],lB=Sk(ps),bB=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],pB=[0,[17,0,0],Sk(db)],kB=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],wB=Sk(Za),dB=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],hB=[0,[17,0,0],Sk(db)],mB=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],yB=[0,[15,0],Sk(lp)],_B=Sk("Flow_ast.Expression.Binary.Equal"),FB=Sk("Flow_ast.Expression.Binary.NotEqual"),EB=Sk("Flow_ast.Expression.Binary.StrictEqual"),SB=Sk("Flow_ast.Expression.Binary.StrictNotEqual"),gB=Sk("Flow_ast.Expression.Binary.LessThan"),xB=Sk("Flow_ast.Expression.Binary.LessThanEqual"),TB=Sk("Flow_ast.Expression.Binary.GreaterThan"),AB=Sk("Flow_ast.Expression.Binary.GreaterThanEqual"),OB=Sk("Flow_ast.Expression.Binary.LShift"),IB=Sk("Flow_ast.Expression.Binary.RShift"),PB=Sk("Flow_ast.Expression.Binary.RShift3"),DB=Sk("Flow_ast.Expression.Binary.Plus"),CB=Sk("Flow_ast.Expression.Binary.Minus"),NB=Sk("Flow_ast.Expression.Binary.Mult"),LB=Sk("Flow_ast.Expression.Binary.Exp"),RB=Sk("Flow_ast.Expression.Binary.Div"),MB=Sk("Flow_ast.Expression.Binary.Mod"),UB=Sk("Flow_ast.Expression.Binary.BitOr"),jB=Sk("Flow_ast.Expression.Binary.Xor"),BB=Sk("Flow_ast.Expression.Binary.BitAnd"),XB=Sk("Flow_ast.Expression.Binary.In"),JB=Sk("Flow_ast.Expression.Binary.Instanceof"),GB=[0,[15,0],Sk(lp)],qB=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],YB=Sk("Flow_ast.Expression.Unary.operator"),VB=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],WB=[0,[17,0,0],Sk(db)],HB=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],zB=Sk(po),KB=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],QB=[0,[17,0,0],Sk(db)],$B=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],ZB=[0,[15,0],Sk(lp)],tX=Sk("Flow_ast.Expression.Unary.Minus"),rX=Sk("Flow_ast.Expression.Unary.Plus"),eX=Sk("Flow_ast.Expression.Unary.Not"),nX=Sk("Flow_ast.Expression.Unary.BitNot"),aX=Sk("Flow_ast.Expression.Unary.Typeof"),uX=Sk("Flow_ast.Expression.Unary.Void"),iX=Sk("Flow_ast.Expression.Unary.Delete"),cX=Sk("Flow_ast.Expression.Unary.Await"),fX=[0,[15,0],Sk(lp)],sX=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],oX=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],vX=Sk("Flow_ast.Expression.Sequence.expressions"),lX=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],bX=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],pX=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],kX=[0,[17,0,0],Sk(db)],wX=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],dX=[0,[15,0],Sk(lp)],hX=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],mX=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],yX=Sk("Flow_ast.Expression.Object.properties"),_X=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],FX=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],EX=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],SX=[0,[17,0,0],Sk(db)],gX=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],xX=[0,[15,0],Sk(lp)],TX=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Object.Property@ ")],AX=[0,[17,0,[12,41,0]],Sk(Ir)],OX=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.SpreadProperty"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Object.SpreadProperty@ ")],IX=[0,[17,0,[12,41,0]],Sk(Ir)],PX=[0,[15,0],Sk(lp)],DX=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],CX=Sk("Flow_ast.Expression.Object.SpreadProperty.argument"),NX=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],LX=[0,[17,0,0],Sk(db)],RX=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],MX=[0,[15,0],Sk(lp)],UX=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],jX=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],BX=[0,[17,0,[12,41,0]],Sk(Ir)],XX=[0,[15,0],Sk(lp)],JX=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property.Init {"),[17,[0,Sk(No),0,0],0]]],Sk("@[<2>Flow_ast.Expression.Object.Property.Init {@,")],GX=Sk(Up),qX=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],YX=[0,[17,0,0],Sk(db)],VX=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],WX=Sk(qe),HX=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],zX=[0,[17,0,0],Sk(db)],KX=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],QX=Sk(Zc),$X=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ZX=[0,[9,0],Sk(pt)],tJ=[0,[17,0,0],Sk(db)],rJ=[0,[17,0,[12,Eb,0]],Sk(Wv)],eJ=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property.Method {"),[17,[0,Sk(No),0,0],0]]],Sk("@[<2>Flow_ast.Expression.Object.Property.Method {@,")],nJ=Sk(Up),aJ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],uJ=[0,[17,0,0],Sk(db)],iJ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],cJ=Sk(qe),fJ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],sJ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],oJ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],vJ=[0,[17,0,[12,41,0]],Sk(Ir)],lJ=[0,[17,0,0],Sk(db)],bJ=[0,[17,0,[12,Eb,0]],Sk(Wv)],pJ=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property.Get {"),[17,[0,Sk(No),0,0],0]]],Sk("@[<2>Flow_ast.Expression.Object.Property.Get {@,")],kJ=Sk(Up),wJ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],dJ=[0,[17,0,0],Sk(db)],hJ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],mJ=Sk(qe),yJ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],_J=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],FJ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],EJ=[0,[17,0,[12,41,0]],Sk(Ir)],SJ=[0,[17,0,0],Sk(db)],gJ=[0,[17,0,[12,Eb,0]],Sk(Wv)],xJ=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property.Set {"),[17,[0,Sk(No),0,0],0]]],Sk("@[<2>Flow_ast.Expression.Object.Property.Set {@,")],TJ=Sk(Up),AJ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],OJ=[0,[17,0,0],Sk(db)],IJ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],PJ=Sk(qe),DJ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],CJ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],NJ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],LJ=[0,[17,0,[12,41,0]],Sk(Ir)],RJ=[0,[17,0,0],Sk(db)],MJ=[0,[17,0,[12,Eb,0]],Sk(Wv)],UJ=[0,[15,0],Sk(lp)],jJ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],BJ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],XJ=[0,[17,0,[12,41,0]],Sk(Ir)],JJ=[0,[15,0],Sk(lp)],GJ=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property.Literal"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Object.Property.Literal@ ")],qJ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],YJ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],VJ=[0,[17,0,[12,41,0]],Sk(Ir)],WJ=[0,[17,0,[12,41,0]],Sk(Ir)],HJ=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property.Identifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Object.Property.Identifier@ ")],zJ=[0,[17,0,[12,41,0]],Sk(Ir)],KJ=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property.PrivateName"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Object.Property.PrivateName@ ")],QJ=[0,[17,0,[12,41,0]],Sk(Ir)],$J=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Object.Property.Computed"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Object.Property.Computed@ ")],ZJ=[0,[17,0,[12,41,0]],Sk(Ir)],tG=[0,[15,0],Sk(lp)],rG=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],eG=Sk("Flow_ast.Expression.TaggedTemplate.tag"),nG=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],aG=[0,[17,0,0],Sk(db)],uG=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],iG=Sk("quasi"),cG=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],fG=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],sG=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],oG=[0,[17,0,[12,41,0]],Sk(Ir)],vG=[0,[17,0,0],Sk(db)],lG=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],bG=[0,[15,0],Sk(lp)],pG=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],kG=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],wG=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],dG=Sk("Flow_ast.Expression.TemplateLiteral.quasis"),hG=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],mG=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],yG=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],_G=[0,[17,0,0],Sk(db)],FG=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],EG=Sk(pn),SG=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],gG=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],xG=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],TG=[0,[17,0,0],Sk(db)],AG=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],OG=[0,[15,0],Sk(lp)],IG=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],PG=Sk("Flow_ast.Expression.TemplateLiteral.Element.value"),DG=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],CG=[0,[17,0,0],Sk(db)],NG=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],LG=Sk("tail"),RG=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],MG=[0,[9,0],Sk(pt)],UG=[0,[17,0,0],Sk(db)],jG=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],BG=[0,[15,0],Sk(lp)],XG=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],JG=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],GG=[0,[17,0,[12,41,0]],Sk(Ir)],qG=[0,[15,0],Sk(lp)],YG=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],VG=Sk("Flow_ast.Expression.TemplateLiteral.Element.raw"),WG=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],HG=[0,[3,0,0],Sk(qf)],zG=[0,[17,0,0],Sk(db)],KG=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],QG=Sk("cooked"),$G=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ZG=[0,[3,0,0],Sk(qf)],tq=[0,[17,0,0],Sk(db)],rq=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],eq=[0,[15,0],Sk(lp)],nq=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],aq=Sk(zv),uq=Sk(zo),iq=Sk(Nl),cq=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],fq=Sk("Flow_ast.Expression.Array.elements"),sq=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],oq=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],vq=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],lq=[0,[17,0,0],Sk(db)],bq=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],pq=[0,[15,0],Sk(lp)],kq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Expression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Expression@ ")],wq=[0,[17,0,[12,41,0]],Sk(Ir)],dq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.Spread"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.Spread@ ")],hq=[0,[17,0,[12,41,0]],Sk(Ir)],mq=[0,[15,0],Sk(lp)],yq=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],_q=Sk("Flow_ast.Expression.SpreadElement.argument"),Fq=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Eq=[0,[17,0,0],Sk(db)],Sq=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],gq=[0,[15,0],Sk(lp)],xq=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],Tq=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Aq=[0,[17,0,[12,41,0]],Sk(Ir)],Oq=[0,[15,0],Sk(lp)],Iq=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Pq=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],Dq=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],Cq=[0,[15,0],Sk(lp)],Nq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.TypeParameterInstantiation.Explicit"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.TypeParameterInstantiation.Explicit@ ")],Lq=[0,[17,0,[12,41,0]],Sk(Ir)],Rq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Expression.TypeParameterInstantiation.Implicit"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Expression.TypeParameterInstantiation.Implicit@ ")],Mq=[0,[17,0,[12,41,0]],Sk(Ir)],Uq=[0,[15,0],Sk(lp)],jq=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],Bq=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Xq=[0,[17,0,[12,41,0]],Sk(Ir)],Jq=[0,[15,0],Sk(lp)],Gq=Sk("Flow_ast.Statement.Debugger"),qq=Sk("Flow_ast.Statement.Empty"),Yq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Block"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Block@ ")],Vq=[0,[17,0,[12,41,0]],Sk(Ir)],Wq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Break"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Break@ ")],Hq=[0,[17,0,[12,41,0]],Sk(Ir)],zq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ClassDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ClassDeclaration@ ")],Kq=[0,[17,0,[12,41,0]],Sk(Ir)],Qq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Continue"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Continue@ ")],$q=[0,[17,0,[12,41,0]],Sk(Ir)],Zq=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareClass"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareClass@ ")],tY=[0,[17,0,[12,41,0]],Sk(Ir)],rY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareExportDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareExportDeclaration@ ")],eY=[0,[17,0,[12,41,0]],Sk(Ir)],nY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareFunction"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareFunction@ ")],aY=[0,[17,0,[12,41,0]],Sk(Ir)],uY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareInterface"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareInterface@ ")],iY=[0,[17,0,[12,41,0]],Sk(Ir)],cY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareModule"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareModule@ ")],fY=[0,[17,0,[12,41,0]],Sk(Ir)],sY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareModuleExports"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareModuleExports@ ")],oY=[0,[17,0,[12,41,0]],Sk(Ir)],vY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareTypeAlias"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareTypeAlias@ ")],lY=[0,[17,0,[12,41,0]],Sk(Ir)],bY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareOpaqueType"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareOpaqueType@ ")],pY=[0,[17,0,[12,41,0]],Sk(Ir)],kY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareVariable"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareVariable@ ")],wY=[0,[17,0,[12,41,0]],Sk(Ir)],dY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DoWhile"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DoWhile@ ")],hY=[0,[17,0,[12,41,0]],Sk(Ir)],mY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ExportDefaultDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ExportDefaultDeclaration@ ")],yY=[0,[17,0,[12,41,0]],Sk(Ir)],_Y=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ExportNamedDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ExportNamedDeclaration@ ")],FY=[0,[17,0,[12,41,0]],Sk(Ir)],EY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Expression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Expression@ ")],SY=[0,[17,0,[12,41,0]],Sk(Ir)],gY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.For"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.For@ ")],xY=[0,[17,0,[12,41,0]],Sk(Ir)],TY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ForIn"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ForIn@ ")],AY=[0,[17,0,[12,41,0]],Sk(Ir)],OY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ForOf"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ForOf@ ")],IY=[0,[17,0,[12,41,0]],Sk(Ir)],PY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.FunctionDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.FunctionDeclaration@ ")],DY=[0,[17,0,[12,41,0]],Sk(Ir)],CY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.If"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.If@ ")],NY=[0,[17,0,[12,41,0]],Sk(Ir)],LY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ImportDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ImportDeclaration@ ")],RY=[0,[17,0,[12,41,0]],Sk(Ir)],MY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.InterfaceDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.InterfaceDeclaration@ ")],UY=[0,[17,0,[12,41,0]],Sk(Ir)],jY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Labeled"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Labeled@ ")],BY=[0,[17,0,[12,41,0]],Sk(Ir)],XY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Return"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Return@ ")],JY=[0,[17,0,[12,41,0]],Sk(Ir)],GY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Switch"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Switch@ ")],qY=[0,[17,0,[12,41,0]],Sk(Ir)],YY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Throw"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Throw@ ")],VY=[0,[17,0,[12,41,0]],Sk(Ir)],WY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.Try"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.Try@ ")],HY=[0,[17,0,[12,41,0]],Sk(Ir)],zY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.TypeAlias"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.TypeAlias@ ")],KY=[0,[17,0,[12,41,0]],Sk(Ir)],QY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.OpaqueType"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.OpaqueType@ ")],$Y=[0,[17,0,[12,41,0]],Sk(Ir)],ZY=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.VariableDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.VariableDeclaration@ ")],tV=[0,[17,0,[12,41,0]],Sk(Ir)],rV=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.While"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.While@ ")],eV=[0,[17,0,[12,41,0]],Sk(Ir)],nV=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.With"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.With@ ")],aV=[0,[17,0,[12,41,0]],Sk(Ir)],uV=[0,[15,0],Sk(lp)],iV=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],cV=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],fV=[0,[17,0,[12,41,0]],Sk(Ir)],sV=[0,[15,0],Sk(lp)],oV=Sk("Flow_ast.Statement.ExportValue"),vV=Sk("Flow_ast.Statement.ExportType"),lV=[0,[15,0],Sk(lp)],bV=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],pV=Sk("Flow_ast.Statement.Expression.expression"),kV=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],wV=[0,[17,0,0],Sk(db)],dV=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],hV=Sk(y),mV=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],yV=Sk(zv),_V=[0,[3,0,0],Sk(qf)],FV=Sk(zo),EV=Sk(Nl),SV=[0,[17,0,0],Sk(db)],gV=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],xV=[0,[15,0],Sk(lp)],TV=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],AV=Sk("Flow_ast.Statement.ImportDeclaration.importKind"),OV=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],IV=[0,[17,0,0],Sk(db)],PV=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],DV=Sk(Cb),CV=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],NV=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],LV=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],RV=[0,[17,0,[12,41,0]],Sk(Ir)],MV=[0,[17,0,0],Sk(db)],UV=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],jV=Sk(co),BV=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],XV=Sk(zv),JV=Sk(zo),GV=Sk(Nl),qV=[0,[17,0,0],Sk(db)],YV=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],VV=Sk(ek),WV=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],HV=Sk(zv),zV=Sk(zo),KV=Sk(Nl),QV=[0,[17,0,0],Sk(db)],$V=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],ZV=[0,[15,0],Sk(lp)],tW=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],rW=Sk("Flow_ast.Statement.ImportDeclaration.kind"),eW=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],nW=Sk(zv),aW=Sk(zo),uW=Sk(Nl),iW=[0,[17,0,0],Sk(db)],cW=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],fW=Sk(nl),sW=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],oW=Sk(zv),vW=Sk(zo),lW=Sk(Nl),bW=[0,[17,0,0],Sk(db)],pW=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],kW=Sk("remote"),wW=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],dW=[0,[17,0,0],Sk(db)],hW=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],mW=[0,[15,0],Sk(lp)],yW=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],_W=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ImportDeclaration.ImportNamedSpecifiers"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ImportDeclaration.ImportNamedSpecifiers@ ")],FW=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],EW=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],SW=[0,[17,0,[12,41,0]],Sk(Ir)],gW=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ImportDeclaration.ImportNamespaceSpecifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ImportDeclaration.ImportNamespaceSpecifier@ ")],xW=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],TW=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],AW=[0,[17,0,[12,41,0]],Sk(Ir)],OW=[0,[17,0,[12,41,0]],Sk(Ir)],IW=[0,[15,0],Sk(lp)],PW=Sk("Flow_ast.Statement.ImportDeclaration.ImportType"),DW=Sk("Flow_ast.Statement.ImportDeclaration.ImportTypeof"),CW=Sk("Flow_ast.Statement.ImportDeclaration.ImportValue"),NW=[0,[15,0],Sk(lp)],LW=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],RW=Sk("Flow_ast.Statement.DeclareExportDeclaration.default"),MW=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],UW=Sk(zv),jW=Sk(zo),BW=Sk(Nl),XW=[0,[17,0,0],Sk(db)],JW=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],GW=Sk(Pu),qW=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],YW=Sk(zv),VW=Sk(zo),WW=Sk(Nl),HW=[0,[17,0,0],Sk(db)],zW=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],KW=Sk(ek),QW=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],$W=Sk(zv),ZW=Sk(zo),tH=Sk(Nl),rH=[0,[17,0,0],Sk(db)],eH=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],nH=Sk(Cb),aH=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],uH=Sk(zv),iH=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],cH=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],fH=[0,[17,0,[12,41,0]],Sk(Ir)],sH=Sk(zo),oH=Sk(Nl),vH=[0,[17,0,0],Sk(db)],lH=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],bH=[0,[15,0],Sk(lp)],pH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareExportDeclaration.Variable"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareExportDeclaration.Variable@ ")],kH=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],wH=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],dH=[0,[17,0,[12,41,0]],Sk(Ir)],hH=[0,[17,0,[12,41,0]],Sk(Ir)],mH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareExportDeclaration.Function"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareExportDeclaration.Function@ ")],yH=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],_H=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],FH=[0,[17,0,[12,41,0]],Sk(Ir)],EH=[0,[17,0,[12,41,0]],Sk(Ir)],SH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareExportDeclaration.Class"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareExportDeclaration.Class@ ")],gH=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],xH=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],TH=[0,[17,0,[12,41,0]],Sk(Ir)],AH=[0,[17,0,[12,41,0]],Sk(Ir)],OH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareExportDeclaration.DefaultType"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareExportDeclaration.DefaultType@ ")],IH=[0,[17,0,[12,41,0]],Sk(Ir)],PH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareExportDeclaration.NamedType"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareExportDeclaration.NamedType@ ")],DH=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],CH=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],NH=[0,[17,0,[12,41,0]],Sk(Ir)],LH=[0,[17,0,[12,41,0]],Sk(Ir)],RH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareExportDeclaration.NamedOpaqueType"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareExportDeclaration.NamedOpaqueType@ ")],MH=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],UH=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],jH=[0,[17,0,[12,41,0]],Sk(Ir)],BH=[0,[17,0,[12,41,0]],Sk(Ir)],XH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareExportDeclaration.Interface"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareExportDeclaration.Interface@ ")],JH=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],GH=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],qH=[0,[17,0,[12,41,0]],Sk(Ir)],YH=[0,[17,0,[12,41,0]],Sk(Ir)],VH=[0,[15,0],Sk(lp)],WH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ExportDefaultDeclaration.Declaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ExportDefaultDeclaration.Declaration@ ")],HH=[0,[17,0,[12,41,0]],Sk(Ir)],zH=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ExportDefaultDeclaration.Expression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ExportDefaultDeclaration.Expression@ ")],KH=[0,[17,0,[12,41,0]],Sk(Ir)],QH=[0,[15,0],Sk(lp)],$H=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],ZH=Sk("Flow_ast.Statement.ExportDefaultDeclaration.default"),tz=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],rz=[0,[17,0,0],Sk(db)],ez=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],nz=Sk(Pu),az=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],uz=[0,[17,0,0],Sk(db)],iz=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],cz=[0,[15,0],Sk(lp)],fz=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],sz=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ExportNamedDeclaration.ExportSpecifiers"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ExportNamedDeclaration.ExportSpecifiers@ ")],oz=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],vz=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],lz=[0,[17,0,[12,41,0]],Sk(Ir)],bz=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ExportNamedDeclaration.ExportBatchSpecifier ("),[17,[0,Sk(No),0,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ExportNamedDeclaration.ExportBatchSpecifier (@,")],pz=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],kz=Sk(zv),wz=Sk(zo),dz=Sk(Nl),hz=[0,[17,[0,Sk(No),0,0],[11,Sk(ir),[17,0,0]]],Sk(ga)],mz=[0,[15,0],Sk(lp)],yz=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],_z=Sk("Flow_ast.Statement.ExportNamedDeclaration.declaration"),Fz=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Ez=Sk(zv),Sz=Sk(zo),gz=Sk(Nl),xz=[0,[17,0,0],Sk(db)],Tz=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Az=Sk(ek),Oz=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Iz=Sk(zv),Pz=Sk(zo),Dz=Sk(Nl),Cz=[0,[17,0,0],Sk(db)],Nz=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Lz=Sk(Cb),Rz=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Mz=Sk(zv),Uz=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],jz=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Bz=[0,[17,0,[12,41,0]],Sk(Ir)],Xz=Sk(zo),Jz=Sk(Nl),Gz=[0,[17,0,0],Sk(db)],qz=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Yz=Sk(oo),Vz=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Wz=[0,[17,0,0],Sk(db)],Hz=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],zz=[0,[15,0],Sk(lp)],Kz=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Qz=Sk("Flow_ast.Statement.ExportNamedDeclaration.ExportSpecifier.local"),$z=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Zz=[0,[17,0,0],Sk(db)],tK=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],rK=Sk(mn),eK=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],nK=Sk(zv),aK=Sk(zo),uK=Sk(Nl),iK=[0,[17,0,0],Sk(db)],cK=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],fK=[0,[15,0],Sk(lp)],sK=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],oK=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],vK=[0,[17,0,[12,41,0]],Sk(Ir)],lK=[0,[15,0],Sk(lp)],bK=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],pK=Sk("Flow_ast.Statement.DeclareModule.id"),kK=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],wK=[0,[17,0,0],Sk(db)],dK=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],hK=Sk(eu),mK=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],yK=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],_K=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],FK=[0,[17,0,[12,41,0]],Sk(Ir)],EK=[0,[17,0,0],Sk(db)],SK=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],gK=Sk(le),xK=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],TK=[0,[17,0,0],Sk(db)],AK=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],OK=[0,[15,0],Sk(lp)],IK=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareModule.CommonJS"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareModule.CommonJS@ ")],PK=[0,[17,0,[12,41,0]],Sk(Ir)],DK=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareModule.ES"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareModule.ES@ ")],CK=[0,[17,0,[12,41,0]],Sk(Ir)],NK=[0,[15,0],Sk(lp)],LK=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareModule.Identifier"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareModule.Identifier@ ")],RK=[0,[17,0,[12,41,0]],Sk(Ir)],MK=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.DeclareModule.Literal"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.DeclareModule.Literal@ ")],UK=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],jK=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],BK=[0,[17,0,[12,41,0]],Sk(Ir)],XK=[0,[17,0,[12,41,0]],Sk(Ir)],JK=[0,[15,0],Sk(lp)],GK=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],qK=Sk("Flow_ast.Statement.DeclareFunction.id"),YK=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],VK=[0,[17,0,0],Sk(db)],WK=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],HK=Sk(Xu),zK=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],KK=[0,[17,0,0],Sk(db)],QK=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],$K=Sk(rb),ZK=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],tQ=Sk(zv),rQ=Sk(zo),eQ=Sk(Nl),nQ=[0,[17,0,0],Sk(db)],aQ=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],uQ=[0,[15,0],Sk(lp)],iQ=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],cQ=Sk("Flow_ast.Statement.DeclareVariable.id"),fQ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],sQ=[0,[17,0,0],Sk(db)],oQ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],vQ=Sk(Xu),lQ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],bQ=[0,[17,0,0],Sk(db)],pQ=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],kQ=[0,[15,0],Sk(lp)],wQ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],dQ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],hQ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],mQ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],yQ=[0,[17,0,[12,41,0]],Sk(Ir)],_Q=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],FQ=Sk("Flow_ast.Statement.DeclareClass.id"),EQ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],SQ=[0,[17,0,0],Sk(db)],gQ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],xQ=Sk(Mt),TQ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],AQ=Sk(zv),OQ=Sk(zo),IQ=Sk(Nl),PQ=[0,[17,0,0],Sk(db)],DQ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],CQ=Sk(eu),NQ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],LQ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],RQ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],MQ=[0,[17,0,[12,41,0]],Sk(Ir)],UQ=[0,[17,0,0],Sk(db)],jQ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],BQ=Sk(sk),XQ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],JQ=Sk(zv),GQ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],qQ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],YQ=[0,[17,0,[12,41,0]],Sk(Ir)],VQ=Sk(zo),WQ=Sk(Nl),HQ=[0,[17,0,0],Sk(db)],zQ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],KQ=Sk(Ie),QQ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],$Q=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],ZQ=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],t$=[0,[17,0,0],Sk(db)],r$=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],e$=Sk(Hr),n$=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],a$=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],u$=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],i$=[0,[17,0,0],Sk(db)],c$=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],f$=[0,[15,0],Sk(lp)],s$=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],o$=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],v$=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],l$=[0,[17,0,[12,41,0]],Sk(Ir)],b$=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],p$=Sk("Flow_ast.Statement.Interface.id"),k$=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],w$=[0,[17,0,0],Sk(db)],d$=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],h$=Sk(Mt),m$=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],y$=Sk(zv),_$=Sk(zo),F$=Sk(Nl),E$=[0,[17,0,0],Sk(db)],S$=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],g$=Sk(sk),x$=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],T$=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],A$=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],O$=[0,[17,0,0],Sk(db)],I$=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],P$=Sk(eu),D$=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],C$=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],N$=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],L$=[0,[17,0,[12,41,0]],Sk(Ir)],R$=[0,[17,0,0],Sk(db)],M$=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],U$=[0,[15,0],Sk(lp)],j$=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ForOf.LeftDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ForOf.LeftDeclaration@ ")],B$=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],X$=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],J$=[0,[17,0,[12,41,0]],Sk(Ir)],G$=[0,[17,0,[12,41,0]],Sk(Ir)],q$=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ForOf.LeftPattern"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ForOf.LeftPattern@ ")],Y$=[0,[17,0,[12,41,0]],Sk(Ir)],V$=[0,[15,0],Sk(lp)],W$=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],H$=Sk("Flow_ast.Statement.ForOf.left"),z$=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],K$=[0,[17,0,0],Sk(db)],Q$=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],$$=Sk(Za),Z$=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],tZ=[0,[17,0,0],Sk(db)],rZ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],eZ=Sk(eu),nZ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],aZ=[0,[17,0,0],Sk(db)],uZ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],iZ=Sk(os),cZ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],fZ=[0,[9,0],Sk(pt)],sZ=[0,[17,0,0],Sk(db)],oZ=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],vZ=[0,[15,0],Sk(lp)],lZ=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ForIn.LeftDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ForIn.LeftDeclaration@ ")],bZ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],pZ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],kZ=[0,[17,0,[12,41,0]],Sk(Ir)],wZ=[0,[17,0,[12,41,0]],Sk(Ir)],dZ=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.ForIn.LeftPattern"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.ForIn.LeftPattern@ ")],hZ=[0,[17,0,[12,41,0]],Sk(Ir)],mZ=[0,[15,0],Sk(lp)],yZ=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],_Z=Sk("Flow_ast.Statement.ForIn.left"),FZ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],EZ=[0,[17,0,0],Sk(db)],SZ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],gZ=Sk(Za),xZ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],TZ=[0,[17,0,0],Sk(db)],AZ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],OZ=Sk(eu),IZ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],PZ=[0,[17,0,0],Sk(db)],DZ=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],CZ=Sk(El),NZ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],LZ=[0,[9,0],Sk(pt)],RZ=[0,[17,0,0],Sk(db)],MZ=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],UZ=[0,[15,0],Sk(lp)],jZ=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.For.InitDeclaration"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.For.InitDeclaration@ ")],BZ=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],XZ=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],JZ=[0,[17,0,[12,41,0]],Sk(Ir)],GZ=[0,[17,0,[12,41,0]],Sk(Ir)],qZ=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Statement.For.InitExpression"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Statement.For.InitExpression@ ")],YZ=[0,[17,0,[12,41,0]],Sk(Ir)],VZ=[0,[15,0],Sk(lp)],WZ=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],HZ=Sk("Flow_ast.Statement.For.init"),zZ=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],KZ=Sk(zv),QZ=Sk(zo),$Z=Sk(Nl),ZZ=[0,[17,0,0],Sk(db)],t0=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],r0=Sk(Gi),e0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],n0=Sk(zv),a0=Sk(zo),u0=Sk(Nl),i0=[0,[17,0,0],Sk(db)],c0=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],f0=Sk("update"),s0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],o0=Sk(zv),v0=Sk(zo),l0=Sk(Nl),b0=[0,[17,0,0],Sk(db)],p0=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],k0=Sk(eu),w0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],d0=[0,[17,0,0],Sk(db)],h0=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],m0=[0,[15,0],Sk(lp)],y0=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],_0=Sk("Flow_ast.Statement.DoWhile.body"),F0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],E0=[0,[17,0,0],Sk(db)],S0=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],g0=Sk(Gi),x0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],T0=[0,[17,0,0],Sk(db)],A0=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],O0=[0,[15,0],Sk(lp)],I0=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],P0=Sk("Flow_ast.Statement.While.test"),D0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],C0=[0,[17,0,0],Sk(db)],N0=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],L0=Sk(eu),R0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],M0=[0,[17,0,0],Sk(db)],U0=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],j0=[0,[15,0],Sk(lp)],B0=Sk("Flow_ast.Statement.VariableDeclaration.Var"),X0=Sk("Flow_ast.Statement.VariableDeclaration.Let"),J0=Sk("Flow_ast.Statement.VariableDeclaration.Const"),G0=[0,[15,0],Sk(lp)],q0=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Y0=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],V0=Sk("Flow_ast.Statement.VariableDeclaration.declarations"),W0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],H0=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],z0=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],K0=[0,[17,0,0],Sk(db)],Q0=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],$0=Sk(le),Z0=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],t1=[0,[17,0,0],Sk(db)],r1=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],e1=[0,[15,0],Sk(lp)],n1=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],a1=Sk("Flow_ast.Statement.VariableDeclaration.Declarator.id"),u1=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],i1=[0,[17,0,0],Sk(db)],c1=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],f1=Sk(ju),s1=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],o1=Sk(zv),v1=Sk(zo),l1=Sk(Nl),b1=[0,[17,0,0],Sk(db)],p1=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],k1=[0,[15,0],Sk(lp)],w1=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],d1=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],h1=[0,[17,0,[12,41,0]],Sk(Ir)],m1=[0,[15,0],Sk(lp)],y1=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],_1=Sk("Flow_ast.Statement.Try.block"),F1=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],E1=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],S1=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],g1=[0,[17,0,[12,41,0]],Sk(Ir)],x1=[0,[17,0,0],Sk(db)],T1=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],A1=Sk(La),O1=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],I1=Sk(zv),P1=Sk(zo),D1=Sk(Nl),C1=[0,[17,0,0],Sk(db)],N1=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],L1=Sk(pl),R1=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],M1=Sk(zv),U1=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],j1=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],B1=[0,[17,0,[12,41,0]],Sk(Ir)],X1=Sk(zo),J1=Sk(Nl),G1=[0,[17,0,0],Sk(db)],q1=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Y1=[0,[15,0],Sk(lp)],V1=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],W1=Sk("Flow_ast.Statement.Try.CatchClause.param"),H1=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],z1=Sk(zv),K1=Sk(zo),Q1=Sk(Nl),$1=[0,[17,0,0],Sk(db)],Z1=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],t2=Sk(eu),r2=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],e2=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],n2=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],a2=[0,[17,0,[12,41,0]],Sk(Ir)],u2=[0,[17,0,0],Sk(db)],i2=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],c2=[0,[15,0],Sk(lp)],f2=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],s2=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],o2=[0,[17,0,[12,41,0]],Sk(Ir)],v2=[0,[15,0],Sk(lp)],l2=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],b2=Sk("Flow_ast.Statement.Throw.argument"),p2=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],k2=[0,[17,0,0],Sk(db)],w2=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],d2=[0,[15,0],Sk(lp)],h2=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],m2=Sk("Flow_ast.Statement.Return.argument"),y2=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],_2=Sk(zv),F2=Sk(zo),E2=Sk(Nl),S2=[0,[17,0,0],Sk(db)],g2=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],x2=[0,[15,0],Sk(lp)],T2=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],A2=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],O2=Sk("Flow_ast.Statement.Switch.discriminant"),I2=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],P2=[0,[17,0,0],Sk(db)],D2=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],C2=Sk("cases"),N2=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],L2=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],R2=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],M2=[0,[17,0,0],Sk(db)],U2=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],j2=[0,[15,0],Sk(lp)],B2=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],X2=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],J2=Sk("Flow_ast.Statement.Switch.Case.test"),G2=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],q2=Sk(zv),Y2=Sk(zo),V2=Sk(Nl),W2=[0,[17,0,0],Sk(db)],H2=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],z2=Sk(_),K2=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Q2=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],$2=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],Z2=[0,[17,0,0],Sk(db)],t7=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],r7=[0,[15,0],Sk(lp)],e7=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],n7=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],a7=[0,[17,0,[12,41,0]],Sk(Ir)],u7=[0,[15,0],Sk(lp)],i7=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],c7=Sk("Flow_ast.Statement.OpaqueType.id"),f7=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],s7=[0,[17,0,0],Sk(db)],o7=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],v7=Sk(Mt),l7=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],b7=Sk(zv),p7=Sk(zo),k7=Sk(Nl),w7=[0,[17,0,0],Sk(db)],d7=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],h7=Sk(Z),m7=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],y7=Sk(zv),_7=Sk(zo),F7=Sk(Nl),E7=[0,[17,0,0],Sk(db)],S7=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],g7=Sk(cr),x7=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],T7=Sk(zv),A7=Sk(zo),O7=Sk(Nl),I7=[0,[17,0,0],Sk(db)],P7=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],D7=[0,[15,0],Sk(lp)],C7=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],N7=Sk("Flow_ast.Statement.TypeAlias.id"),L7=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],R7=[0,[17,0,0],Sk(db)],M7=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],U7=Sk(Mt),j7=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],B7=Sk(zv),X7=Sk(zo),J7=Sk(Nl),G7=[0,[17,0,0],Sk(db)],q7=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Y7=Sk(Za),V7=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],W7=[0,[17,0,0],Sk(db)],H7=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],z7=[0,[15,0],Sk(lp)],K7=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Q7=Sk("Flow_ast.Statement.With._object"),$7=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Z7=[0,[17,0,0],Sk(db)],t4=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],r4=Sk(eu),e4=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],n4=[0,[17,0,0],Sk(db)],a4=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],u4=[0,[15,0],Sk(lp)],i4=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],c4=Sk("Flow_ast.Statement.Continue.label"),f4=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],s4=Sk(zv),o4=Sk(zo),v4=Sk(Nl),l4=[0,[17,0,0],Sk(db)],b4=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],p4=[0,[15,0],Sk(lp)],k4=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],w4=Sk("Flow_ast.Statement.Break.label"),d4=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],h4=Sk(zv),m4=Sk(zo),y4=Sk(Nl),_4=[0,[17,0,0],Sk(db)],F4=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],E4=[0,[15,0],Sk(lp)],S4=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],g4=Sk("Flow_ast.Statement.Labeled.label"),x4=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],T4=[0,[17,0,0],Sk(db)],A4=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],O4=Sk(eu),I4=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],P4=[0,[17,0,0],Sk(db)],D4=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],C4=[0,[15,0],Sk(lp)],N4=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],L4=Sk("Flow_ast.Statement.If.test"),R4=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],M4=[0,[17,0,0],Sk(db)],U4=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],j4=Sk(_),B4=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],X4=[0,[17,0,0],Sk(db)],J4=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],G4=Sk(ne),q4=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Y4=Sk(zv),V4=Sk(zo),W4=Sk(Nl),H4=[0,[17,0,0],Sk(db)],z4=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],K4=[0,[15,0],Sk(lp)],Q4=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],$4=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Z4=Sk("Flow_ast.Statement.Block.body"),t3=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],r3=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],e3=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],n3=[0,[17,0,0],Sk(db)],a3=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],u3=[0,[15,0],Sk(lp)],i3=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Predicate.Declared"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Predicate.Declared@ ")],c3=[0,[17,0,[12,41,0]],Sk(Ir)],f3=Sk("Flow_ast.Type.Predicate.Inferred"),s3=[0,[15,0],Sk(lp)],o3=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],v3=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],l3=[0,[17,0,[12,41,0]],Sk(Ir)],b3=[0,[15,0],Sk(lp)],p3=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],k3=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],w3=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],d3=[0,[15,0],Sk(lp)],h3=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],m3=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],y3=[0,[17,0,[12,41,0]],Sk(Ir)],_3=[0,[15,0],Sk(lp)],F3=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],E3=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],S3=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],g3=[0,[15,0],Sk(lp)],x3=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],T3=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],A3=[0,[17,0,[12,41,0]],Sk(Ir)],O3=[0,[15,0],Sk(lp)],I3=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],P3=Sk("Flow_ast.Type.ParameterDeclaration.TypeParam.name"),D3=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],C3=[0,[17,0,0],Sk(db)],N3=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],L3=Sk("bound"),R3=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],M3=[0,[17,0,0],Sk(db)],U3=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],j3=Sk(l),B3=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],X3=Sk(zv),J3=Sk(zo),G3=Sk(Nl),q3=[0,[17,0,0],Sk(db)],Y3=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],V3=Sk(co),W3=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],H3=Sk(zv),z3=Sk(zo),K3=Sk(Nl),Q3=[0,[17,0,0],Sk(db)],$3=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Z3=[0,[15,0],Sk(lp)],t8=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],r8=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],e8=[0,[17,0,[12,41,0]],Sk(Ir)],n8=[0,[15,0],Sk(lp)],a8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Missing"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Missing@ ")],u8=[0,[17,0,[12,41,0]],Sk(Ir)],i8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Available"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Available@ ")],c8=[0,[17,0,[12,41,0]],Sk(Ir)],f8=[0,[15,0],Sk(lp)],s8=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],o8=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],v8=[0,[17,0,[12,41,0]],Sk(Ir)],l8=[0,[15,0],Sk(lp)],b8=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],p8=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],k8=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],w8=Sk("Flow_ast.Type.Any"),d8=Sk("Flow_ast.Type.Mixed"),h8=Sk("Flow_ast.Type.Empty"),m8=Sk("Flow_ast.Type.Void"),y8=Sk("Flow_ast.Type.Null"),_8=Sk("Flow_ast.Type.Number"),F8=Sk("Flow_ast.Type.String"),E8=Sk("Flow_ast.Type.Boolean"),S8=Sk("Flow_ast.Type.Exists"),g8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Nullable"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Nullable@ ")],x8=[0,[17,0,[12,41,0]],Sk(Ir)],T8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Function"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Function@ ")],A8=[0,[17,0,[12,41,0]],Sk(Ir)],O8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object@ ")],I8=[0,[17,0,[12,41,0]],Sk(Ir)],P8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Interface"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Interface@ ")],D8=[0,[17,0,[12,41,0]],Sk(Ir)],C8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Array"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Array@ ")],N8=[0,[17,0,[12,41,0]],Sk(Ir)],L8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Generic"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Generic@ ")],R8=[0,[17,0,[12,41,0]],Sk(Ir)],M8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Union ("),[17,[0,Sk(No),0,0],0]]]],Sk("(@[<2>Flow_ast.Type.Union (@,")],U8=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],j8=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],B8=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],X8=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],J8=[0,[17,[0,Sk(No),0,0],[11,Sk(ir),[17,0,0]]],Sk(ga)],G8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Intersection ("),[17,[0,Sk(No),0,0],0]]]],Sk("(@[<2>Flow_ast.Type.Intersection (@,")],q8=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Y8=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],V8=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],W8=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],H8=[0,[17,[0,Sk(No),0,0],[11,Sk(ir),[17,0,0]]],Sk(ga)],z8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Typeof"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Typeof@ ")],K8=[0,[17,0,[12,41,0]],Sk(Ir)],Q8=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Tuple"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Tuple@ ")],$8=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],Z8=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],t6=[0,[17,0,[12,41,0]],Sk(Ir)],r6=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.StringLiteral"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.StringLiteral@ ")],e6=[0,[17,0,[12,41,0]],Sk(Ir)],n6=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.NumberLiteral"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.NumberLiteral@ ")],a6=[0,[17,0,[12,41,0]],Sk(Ir)],u6=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.BooleanLiteral"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.BooleanLiteral@ ")],i6=[0,[9,0],Sk(pt)],c6=[0,[17,0,[12,41,0]],Sk(Ir)],f6=[0,[15,0],Sk(lp)],s6=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],o6=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],v6=[0,[17,0,[12,41,0]],Sk(Ir)],l6=[0,[15,0],Sk(lp)],b6=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],p6=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],k6=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],w6=[0,[17,0,[12,41,0]],Sk(Ir)],d6=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],h6=Sk("Flow_ast.Type.Interface.body"),m6=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],y6=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],_6=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],F6=[0,[17,0,[12,41,0]],Sk(Ir)],E6=[0,[17,0,0],Sk(db)],S6=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],g6=Sk(sk),x6=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],T6=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],A6=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],O6=[0,[17,0,0],Sk(db)],I6=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],P6=[0,[15,0],Sk(lp)],D6=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object.Property"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object.Property@ ")],C6=[0,[17,0,[12,41,0]],Sk(Ir)],N6=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object.SpreadProperty"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object.SpreadProperty@ ")],L6=[0,[17,0,[12,41,0]],Sk(Ir)],R6=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object.Indexer"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object.Indexer@ ")],M6=[0,[17,0,[12,41,0]],Sk(Ir)],U6=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object.CallProperty"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object.CallProperty@ ")],j6=[0,[17,0,[12,41,0]],Sk(Ir)],B6=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object.InternalSlot"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object.InternalSlot@ ")],X6=[0,[17,0,[12,41,0]],Sk(Ir)],J6=[0,[15,0],Sk(lp)],G6=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],q6=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Y6=Sk("Flow_ast.Type.Object.exact"),V6=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],W6=[0,[9,0],Sk(pt)],H6=[0,[17,0,0],Sk(db)],z6=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],K6=Sk(Uo),Q6=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],$6=[0,[9,0],Sk(pt)],Z6=[0,[17,0,0],Sk(db)],t5=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],r5=Sk(du),e5=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],n5=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],a5=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],u5=[0,[17,0,0],Sk(db)],i5=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],c5=[0,[15,0],Sk(lp)],f5=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],s5=Sk("Flow_ast.Type.Object.InternalSlot.id"),o5=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],v5=[0,[17,0,0],Sk(db)],l5=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],b5=Sk(qe),p5=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],k5=[0,[17,0,0],Sk(db)],w5=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],d5=Sk(pb),h5=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],m5=[0,[9,0],Sk(pt)],y5=[0,[17,0,0],Sk(db)],_5=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],F5=Sk(Du),E5=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],S5=[0,[9,0],Sk(pt)],g5=[0,[17,0,0],Sk(db)],x5=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],T5=Sk(H),A5=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],O5=[0,[9,0],Sk(pt)],I5=[0,[17,0,0],Sk(db)],P5=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],D5=[0,[15,0],Sk(lp)],C5=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],N5=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],L5=[0,[17,0,[12,41,0]],Sk(Ir)],R5=[0,[15,0],Sk(lp)],M5=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],U5=Sk("Flow_ast.Type.Object.CallProperty.value"),j5=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],B5=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],X5=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],J5=[0,[17,0,[12,41,0]],Sk(Ir)],G5=[0,[17,0,0],Sk(db)],q5=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Y5=Sk(Du),V5=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],W5=[0,[9,0],Sk(pt)],H5=[0,[17,0,0],Sk(db)],z5=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],K5=[0,[15,0],Sk(lp)],Q5=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],$5=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Z5=[0,[17,0,[12,41,0]],Sk(Ir)],t9=[0,[15,0],Sk(lp)],r9=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],e9=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],n9=[0,[17,0,[12,41,0]],Sk(Ir)],a9=[0,[15,0],Sk(lp)],u9=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],i9=Sk("Flow_ast.Type.Object.Indexer.id"),c9=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],f9=Sk(zv),s9=Sk(zo),o9=Sk(Nl),v9=[0,[17,0,0],Sk(db)],l9=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],b9=Sk(Up),p9=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],k9=[0,[17,0,0],Sk(db)],w9=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],d9=Sk(qe),h9=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],m9=[0,[17,0,0],Sk(db)],y9=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],_9=Sk(Du),F9=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],E9=[0,[9,0],Sk(pt)],S9=[0,[17,0,0],Sk(db)],g9=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],x9=Sk(l),T9=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],A9=Sk(zv),O9=Sk(zo),I9=Sk(Nl),P9=[0,[17,0,0],Sk(db)],D9=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],C9=[0,[15,0],Sk(lp)],N9=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],L9=Sk("Flow_ast.Type.Object.SpreadProperty.argument"),R9=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],M9=[0,[17,0,0],Sk(db)],U9=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],j9=[0,[15,0],Sk(lp)],B9=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],X9=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],J9=[0,[17,0,[12,41,0]],Sk(Ir)],G9=[0,[15,0],Sk(lp)],q9=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object.Property.Init"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object.Property.Init@ ")],Y9=[0,[17,0,[12,41,0]],Sk(Ir)],V9=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object.Property.Get"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object.Property.Get@ ")],W9=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],H9=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],z9=[0,[17,0,[12,41,0]],Sk(Ir)],K9=[0,[17,0,[12,41,0]],Sk(Ir)],Q9=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Object.Property.Set"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Object.Property.Set@ ")],$9=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],Z9=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],ttt=[0,[17,0,[12,41,0]],Sk(Ir)],rtt=[0,[17,0,[12,41,0]],Sk(Ir)],ett=[0,[15,0],Sk(lp)],ntt=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],att=Sk("Flow_ast.Type.Object.Property.key"),utt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],itt=[0,[17,0,0],Sk(db)],ctt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],ftt=Sk(qe),stt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ott=[0,[17,0,0],Sk(db)],vtt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],ltt=Sk(pb),btt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ptt=[0,[9,0],Sk(pt)],ktt=[0,[17,0,0],Sk(db)],wtt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],dtt=Sk(Du),htt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],mtt=[0,[9,0],Sk(pt)],ytt=[0,[17,0,0],Sk(db)],_tt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Ftt=Sk(Yu),Ett=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Stt=[0,[9,0],Sk(pt)],gtt=[0,[17,0,0],Sk(db)],xtt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Ttt=Sk(H),Att=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Ott=[0,[9,0],Sk(pt)],Itt=[0,[17,0,0],Sk(db)],Ptt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Dtt=Sk(l),Ctt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Ntt=Sk(zv),Ltt=Sk(zo),Rtt=Sk(Nl),Mtt=[0,[17,0,0],Sk(db)],Utt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],jtt=[0,[15,0],Sk(lp)],Btt=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],Xtt=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Jtt=[0,[17,0,[12,41,0]],Sk(Ir)],Gtt=[0,[15,0],Sk(lp)],qtt=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Ytt=Sk("Flow_ast.Type.Generic.id"),Vtt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Wtt=[0,[17,0,0],Sk(db)],Htt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],ztt=Sk(xs),Ktt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Qtt=Sk(zv),$tt=Sk(zo),Ztt=Sk(Nl),trt=[0,[17,0,0],Sk(db)],rrt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],ert=[0,[15,0],Sk(lp)],nrt=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],art=Sk("Flow_ast.Type.Generic.Identifier.qualification"),urt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],irt=[0,[17,0,0],Sk(db)],crt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],frt=Sk(mc),srt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ort=[0,[17,0,0],Sk(db)],vrt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],lrt=[0,[15,0],Sk(lp)],brt=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],prt=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],krt=[0,[17,0,[12,41,0]],Sk(Ir)],wrt=[0,[15,0],Sk(lp)],drt=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Generic.Identifier.Unqualified"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Generic.Identifier.Unqualified@ ")],hrt=[0,[17,0,[12,41,0]],Sk(Ir)],mrt=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Type.Generic.Identifier.Qualified"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Type.Generic.Identifier.Qualified@ ")],yrt=[0,[17,0,[12,41,0]],Sk(Ir)],_rt=[0,[15,0],Sk(lp)],Frt=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Ert=Sk("Flow_ast.Type.Function.tparams"),Srt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],grt=Sk(zv),xrt=Sk(zo),Trt=Sk(Nl),Art=[0,[17,0,0],Sk(db)],Ort=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Irt=Sk(I),Prt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Drt=[0,[17,0,0],Sk(db)],Crt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Nrt=Sk(gn),Lrt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Rrt=[0,[17,0,0],Sk(db)],Mrt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Urt=[0,[15,0],Sk(lp)],jrt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Brt=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Xrt=Sk("Flow_ast.Type.Function.Params.params"),Jrt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Grt=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[12,91,0]],Sk(P)],qrt=[0,[17,[0,Sk(No),0,0],[12,93,[17,0,0]]],Sk(Ff)],Yrt=[0,[17,0,0],Sk(db)],Vrt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Wrt=Sk(Fi),Hrt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],zrt=Sk(zv),Krt=Sk(zo),Qrt=Sk(Nl),$rt=[0,[17,0,0],Sk(db)],Zrt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],tet=[0,[15,0],Sk(lp)],ret=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],eet=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],net=[0,[17,0,[12,41,0]],Sk(Ir)],aet=[0,[15,0],Sk(lp)],uet=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],iet=Sk("Flow_ast.Type.Function.RestParam.argument"),cet=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],fet=[0,[17,0,0],Sk(db)],set=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],oet=[0,[15,0],Sk(lp)],vet=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],bet=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],pet=[0,[17,0,[12,41,0]],Sk(Ir)],ket=[0,[15,0],Sk(lp)],wet=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],det=Sk("Flow_ast.Type.Function.Param.name"),het=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],met=Sk(zv),yet=Sk(zo),_et=Sk(Nl),Fet=[0,[17,0,0],Sk(db)],Eet=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Set=Sk(Xu),get=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],xet=[0,[17,0,0],Sk(db)],Tet=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Aet=Sk(pb),Oet=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Iet=[0,[9,0],Sk(pt)],Pet=[0,[17,0,0],Sk(db)],Det=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Cet=[0,[15,0],Sk(lp)],Net=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],Let=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Ret=[0,[17,0,[12,41,0]],Sk(Ir)],Met=[0,[15,0],Sk(lp)],Uet=Sk("Flow_ast.Variance.Minus"),jet=Sk("Flow_ast.Variance.Plus"),Bet=[0,[15,0],Sk(lp)],Xet=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],Jet=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Get=[0,[17,0,[12,41,0]],Sk(Ir)],qet=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Yet=Sk("Flow_ast.NumberLiteral.value"),Vet=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Wet=[0,[8,15,0,0,0],Sk("%F")],Het=[0,[17,0,0],Sk(db)],zet=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Ket=Sk(Zr),Qet=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],$et=[0,[3,0,0],Sk(qf)],Zet=[0,[17,0,0],Sk(db)],tnt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],rnt=[0,[15,0],Sk(lp)],ent=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],nnt=Sk("Flow_ast.StringLiteral.value"),ant=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],unt=[0,[3,0,0],Sk(qf)],int=[0,[17,0,0],Sk(db)],cnt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],fnt=Sk(Zr),snt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],ont=[0,[3,0,0],Sk(qf)],vnt=[0,[17,0,0],Sk(db)],lnt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],bnt=[0,[15,0],Sk(lp)],pnt=[0,[15,0],Sk(lp)],knt=Sk("Flow_ast.Literal.Null"),wnt=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Literal.String"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Literal.String@ ")],dnt=[0,[3,0,0],Sk(qf)],hnt=[0,[17,0,[12,41,0]],Sk(Ir)],mnt=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Literal.Boolean"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Literal.Boolean@ ")],ynt=[0,[9,0],Sk(pt)],_nt=[0,[17,0,[12,41,0]],Sk(Ir)],Fnt=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Literal.Number"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Literal.Number@ ")],Ent=[0,[8,15,0,0,0],Sk("%F")],Snt=[0,[17,0,[12,41,0]],Sk(Ir)],gnt=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("Flow_ast.Literal.RegExp"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>Flow_ast.Literal.RegExp@ ")],xnt=[0,[17,0,[12,41,0]],Sk(Ir)],Tnt=[0,[15,0],Sk(lp)],Ant=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],Ont=Sk("Flow_ast.Literal.value"),Int=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Pnt=[0,[17,0,0],Sk(db)],Dnt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Cnt=Sk(Zr),Nnt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Lnt=[0,[3,0,0],Sk(qf)],Rnt=[0,[17,0,0],Sk(db)],Mnt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Unt=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],jnt=Sk("Flow_ast.Literal.RegExp.pattern"),Bnt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Xnt=[0,[3,0,0],Sk(qf)],Jnt=[0,[17,0,0],Sk(db)],Gnt=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],qnt=Sk("flags"),Ynt=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Vnt=[0,[3,0,0],Sk(qf)],Wnt=[0,[17,0,0],Sk(db)],Hnt=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],znt=[0,[15,0],Sk(lp)],Knt=[0,[15,0],Sk(lp)],Qnt=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],$nt=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],Znt=[0,[17,0,[12,41,0]],Sk(Ir)],tat=[0,[12,40,[18,[1,[0,0,Sk(so)]],0]],Sk(kn)],rat=[0,[12,44,[17,[0,Sk(ri),1,0],0]],Sk(op)],eat=[0,[3,0,0],Sk(qf)],nat=[0,[17,0,[12,41,0]],Sk(Ir)],aat=[0,[15,0],Sk(lp)],uat=[0,[0,0,0]],iat=[0,Sk(So),16,6],cat=[0,[0,0,0]],fat=[0,Sk(So),21,6],sat=[0,[0,[0,[0,0,0]],0,0,0,0]],oat=[0,Sk(So),44,6],vat=[0,[0,0,0]],lat=[0,Sk(So),52,6],bat=[0,[0,0,0]],pat=[0,Sk(So),60,6],kat=[0,[0,0,0,0,0]],wat=[0,Sk(So),66,6],dat=[0,[0,[0,[0,[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],0,0]],[0,[0,[0,[0,0,0,0,0,0,0]],0,0]],[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0]],0,0,0,0,0,0,0,0,[0,[0,[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]]]],hat=[0,Sk(So),275,6],mat=[0,[0,[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0]],[0,[0,[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0,0,0,0,0]],[0,[0,0,0]],0,0,0,0,0,0]],yat=[0,Sk(So),636,6],_at=[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0,0,0]],0,0]],[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],0,0,0,0]],Fat=[0,Sk(So),979,6],Eat=[0,[0,[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0,0,0]],0,0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0,0,0,0,0]],Sat=[0,Sk(So),1112,6],gat=[0,[0,[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],0,0,0,0]],xat=[0,Sk(So),1185,6],Tat=[0,[0,0,0,0,0]],Aat=[0,Sk(So),1193,6],Oat=[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0]],Iat=[0,Sk(So),1278,6],Pat=[0,[0,[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0]],Dat=[0,Sk(So),1315,6],Cat=[0,[0,0,0]],Nat=[0,[0,0,0]],Lat=[0,[0,[0,[0,0,0]],0,0,0,0]],Rat=[0,[0,0,0]],Mat=[0,[0,0,0]],Uat=[0,[0,0,0,0,0]],jat=[0,[0,[0,[0,[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],0,0]],[0,[0,[0,[0,0,0,0,0,0,0]],0,0]],[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0]],0,0,0,0,0,0,0,0,[0,[0,[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]]]],Bat=[0,[0,[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0]],[0,[0,[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0,0,0,0,0]],[0,[0,0,0]],0,0,0,0,0,0]],Xat=[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0,0,0]],0,0]],[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0]],[0,[0,0,0]],[0,[0,0,0]],[0,[0,0,0]],0,0,0,0]],Jat=[0,[0,[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0]],[0,[0,0,0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0,0,0]],0,0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0,0,0,0,0]],Gat=[0,[0,[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,[0,[0,0,0,0,0]],0,0,0,0]],[0,[0,0,0]],[0,[0,0,0]],0,0,0,0]],qat=[0,[0,0,0,0,0]],Yat=[0,[0,[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],[0,[0,0,0,0,0,0,0]],[0,[0,0,0,0,0]],0,0]],Vat=[0,[0,[0,[0,0,0,0,0]],[0,[0,0,0,0,0]],0,0,0,0]],Wat=Sk("File_key.Builtins"),Hat=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("File_key.LibFile"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>File_key.LibFile@ ")],zat=[0,[3,0,0],Sk(qf)],Kat=[0,[17,0,[12,41,0]],Sk(Ir)],Qat=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("File_key.SourceFile"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>File_key.SourceFile@ ")],$at=[0,[3,0,0],Sk(qf)],Zat=[0,[17,0,[12,41,0]],Sk(Ir)],tut=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("File_key.JsonFile"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>File_key.JsonFile@ ")],rut=[0,[3,0,0],Sk(qf)],eut=[0,[17,0,[12,41,0]],Sk(Ir)],nut=[0,[12,40,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk("File_key.ResourceFile"),[17,[0,Sk(ri),1,0],0]]]],Sk("(@[<2>File_key.ResourceFile@ ")],aut=[0,[3,0,0],Sk(qf)],uut=[0,[17,0,[12,41,0]],Sk(Ir)],iut=Sk(Cn),cut=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],fut=Sk("Loc.line"),sut=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],out=[0,[4,0,0,0,0],Sk(xa)],vut=[0,[17,0,0],Sk(db)],lut=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],but=Sk(Je),put=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],kut=[0,[4,0,0,0,0],Sk(xa)],wut=[0,[17,0,0],Sk(db)],dut=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],hut=Sk("offset"),mut=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],yut=[0,[4,0,0,0,0],Sk(xa)],_ut=[0,[17,0,0],Sk(db)],Fut=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],Eut=[0,[15,0],Sk(lp)],Sut=[0,[18,[1,[0,[11,Sk(cp),0],Sk(cp)]],[11,Sk(Do),0]],Sk(ua)],gut=Sk("Loc.source"),xut=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Tut=Sk(zv),Aut=Sk(zo),Out=Sk(Nl),Iut=[0,[17,0,0],Sk(db)],Put=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Dut=Sk(V),Cut=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Nut=[0,[17,0,0],Sk(db)],Lut=[0,[12,59,[17,[0,Sk(ri),1,0],0]],Sk(Ha)],Rut=Sk("_end"),Mut=[0,[18,[1,[0,0,Sk(so)]],[2,0,[11,Sk(up),[17,[0,Sk(ri),1,0],0]]]],Sk(nv)],Uut=[0,[17,0,0],Sk(db)],jut=[0,[17,[0,Sk(ri),1,0],[12,Eb,[17,0,0]]],Sk(Aa)],But=Sk("=="),Xut=Sk("!="),Jut=Sk("==="),Gut=Sk("!=="),qut=Sk("<"),Yut=Sk("<="),Vut=Sk(">"),Wut=Sk(">="),Hut=Sk("<<"),zut=Sk(">>"),Kut=Sk(">>>"),Qut=Sk(Ao),$ut=Sk(cs),Zut=Sk("*"),tit=Sk("**"),rit=Sk(vv),eit=Sk("%"),nit=Sk("|"),ait=Sk("^"),uit=Sk("&"),iit=Sk("in"),cit=Sk(vo),fit=Sk("expression pattern"),sit=Sk("Unexpected number"),oit=Sk("Unexpected string"),vit=Sk("Unexpected identifier"),lit=Sk("Unexpected reserved word"),bit=Sk("Unexpected reserved type"),pit=Sk("Unexpected `super` outside of a class method"),kit=Sk("`super()` is only valid in a class constructor"),wit=Sk("Unexpected end of input"),dit=Sk("Unexpected variance sigil"),hit=Sk("Unexpected static modifier"),mit=Sk("Unexpected proto modifier"),yit=Sk("Type aliases are not allowed in untyped mode"),_it=Sk("Opaque type aliases are not allowed in untyped mode"),Fit=Sk("Type annotations are not allowed in untyped mode"),Eit=Sk("Type declarations are not allowed in untyped mode"),Sit=Sk("Type imports are not allowed in untyped mode"),git=Sk("Type exports are not allowed in untyped mode"),xit=Sk("Interfaces are not allowed in untyped mode"),Tit=Sk("Spreading a type is only allowed inside an object type"),Ait=Sk("Explicit inexact syntax must come at the end of an object type"),Oit=Sk("Explicit inexact syntax cannot appear inside an explicit exact object type"),Iit=Sk("Explicit inexact syntax can only appear inside an object type"),Pit=Sk("Illegal newline after throw"),Dit=Sk("Invalid regular expression"),Cit=Sk("Invalid regular expression: missing /"),Nit=Sk("Invalid left-hand side in assignment"),Lit=Sk("Invalid left-hand side in exponentiation expression"),Rit=Sk("Invalid left-hand side in for-in"),Mit=Sk("Invalid left-hand side in for-of"),Uit=Sk("found an expression instead"),jit=Sk("Expected an object pattern, array pattern, or an identifier but "),Bit=Sk("More than one default clause in switch statement"),Xit=Sk("Missing catch or finally after try"),Jit=Sk("Illegal continue statement"),Git=Sk("Illegal break statement"),qit=Sk("Illegal return statement"),Yit=Sk("Illegal Unicode escape"),Vit=Sk("Strict mode code may not include a with statement"),Wit=Sk("Catch variable may not be eval or arguments in strict mode"),Hit=Sk("Variable name may not be eval or arguments in strict mode"),zit=Sk("Parameter name eval or arguments is not allowed in strict mode"),Kit=Sk("Strict mode function may not have duplicate parameter names"),Qit=Sk("Function name may not be eval or arguments in strict mode"),$it=Sk("Octal literals are not allowed in strict mode."),Zit=Sk("Delete of an unqualified identifier in strict mode."),tct=Sk("Duplicate data property in object literal not allowed in strict mode"),rct=Sk("Object literal may not have data and accessor property with the same name"),ect=Sk("Object literal may not have multiple get/set accessors with the same name"),nct=Sk("Assignment to eval or arguments is not allowed in strict mode"),act=Sk("Postfix increment/decrement may not have eval or arguments operand in strict mode"),uct=Sk("Prefix increment/decrement may not have eval or arguments operand in strict mode"),ict=Sk("Use of future reserved word in strict mode"),cct=Sk("JSX attributes must only be assigned a non-empty expression"),fct=Sk("JSX value should be either an expression or a quoted JSX text"),sct=Sk("Const must be initialized"),oct=Sk("Destructuring assignment must be initialized"),vct=Sk("Illegal newline before arrow"),lct=Sk(da),bct=Sk("Async functions can only be declared at top level or "),pct=Sk(da),kct=Sk("Generators can only be declared at top level or "),wct=Sk("elements must be wrapped in an enclosing parent tag"),dct=Sk("Unexpected token <. Remember, adjacent JSX "),hct=Sk("Rest parameter must be final parameter of an argument list"),mct=Sk("Rest element must be final element of an array pattern"),yct=Sk("Rest property must be final property of an object pattern"),_ct=Sk("async is an implementation detail and isn't necessary for your declare function statement. It is sufficient for your declare function to just have a Promise return type."),Fct=Sk("`declare export let` is not supported. Use `declare export var` instead."),Ect=Sk("`declare export const` is not supported. Use `declare export var` instead."),Sct=Sk("`declare export type` is not supported. Use `export type` instead."),gct=Sk("`declare export interface` is not supported. Use `export interface` instead."),xct=Sk("`export * as` is an early-stage proposal and is not enabled by default. To enable support in the parser, use the `esproposal_export_star_as` option"),Tct=Sk("When exporting a class as a named export, you must specify a class name. Did you mean `export default class ...`?"),Act=Sk("When exporting a function as a named export, you must specify a function name. Did you mean `export default function ...`?"),Oct=Sk("Found a decorator in an unsupported position."),Ict=Sk("Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),Pct=Sk("The Windows version of OCaml has a bug in how it parses hexadecimal numbers. It is fixed in OCaml 4.03.0. Until we can switch to 4.03.0, please avoid either hexadecimal notation or Windows."),Dct=Sk("Duplicate `declare module.exports` statement!"),Cct=Sk("Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module xor they are a CommonJS module."),Nct=Sk("Getter should have zero parameters"),Lct=Sk("Setter should have exactly one parameter"),Rct=Sk("`import type` or `import typeof`!"),Mct=Sk("Imports within a `declare module` body must always be "),Uct=Sk("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"),jct=Sk("Missing comma between import specifiers"),Bct=Sk("Missing comma between export specifiers"),Xct=Sk("Malformed unicode"),Jct=Sk("Classes may only have one constructor"),Gct=Sk("Classes may not have private methods."),qct=Sk("Private fields may not be deleted."),Yct=Sk("Private fields can only be referenced from within a class."),Vct=Sk("You may not access a private field through the `super` keyword."),Wct=Sk("Yield expression not allowed in formal parameter"),Hct=Sk("`await` is an invalid identifier in async functions"),zct=Sk("`yield` is an invalid identifier in generators"),Kct=Sk("either a `let` binding pattern, or a member expression."),Qct=Sk("`let [` is ambiguous in this position because it is "),$ct=Sk("Literals cannot be used as shorthand properties."),Zct=Sk("Computed properties must have a value."),tft=Sk("Object pattern can't contain methods"),rft=Sk("A trailing comma is not permitted after the rest element"),eft=Sk("The optional chaining plugin must be enabled in order to use the optional chaining operator (`?.`). Optional chaining is an active early-stage feature proposal which may change and is not enabled by default. To enable support in the parser, use the `esproposal_optional_chaining` option."),nft=Sk("An optional chain may not be used in a `new` expression."),aft=Sk("Template literals may not be used in an optional chain."),uft=Sk("The nullish coalescing plugin must be enabled in order to use the nullish coalescing operator (`??`). Nullish coalescing is an active early-stage feature proposal which may change and is not enabled by default. To enable support in the parser, use the `esproposal_nullish_coalescing` option."),ift=Sk("Unexpected parser state: "),cft=Sk("Unexpected token "),fft=[0,[11,Sk("Unexpected token `"),[2,0,[11,Sk("`. Did you mean `"),[2,0,[11,Sk("`?"),0]]]]],Sk("Unexpected token `%s`. Did you mean `%s`?")],sft=Sk("'"),oft=Sk("Invalid flags supplied to RegExp constructor '"),vft=Sk("'"),lft=Sk("Undefined label '"),bft=Sk("' has already been declared"),pft=Sk(" '"),kft=Sk("Expected corresponding JSX closing tag for "),wft=Sk(da),dft=Sk("In strict mode code, functions can only be declared at top level or "),hft=Sk("inside a block, or as the body of an if statement."),mft=Sk("In non-strict mode code, functions can only be declared at top level, "),yft=[0,[11,Sk("Duplicate export for `"),[2,0,[12,96,0]]],Sk("Duplicate export for `%s`")],_ft=Sk("` is declared more than once."),Fft=Sk("Private fields may only be declared once. `#"),Eft=Sk("static "),Sft=Sk(so),gft=Sk("#"),xft=Sk("`."),Tft=Sk("fields named `"),Aft=Sk("Classes may not have "),Oft=Sk("` has not been declared."),Ift=Sk("Private fields must be declared before they can be referenced. `#"),Pft=Sk("Parse_error.Error"),Dft=Sk("comments"),Cft=Sk(eu),Nft=Sk(eu),Lft=Sk("Program"),Rft=Sk("DebuggerStatement"),Mft=Sk("EmptyStatement"),Uft=Sk(Wc),jft=Sk("BreakStatement"),Bft=Sk(Wc),Xft=Sk("ContinueStatement"),Jft=Sk(Cb),Gft=Sk("DeclareExportAllDeclaration"),qft=Sk(Cb),Yft=Sk(ek),Vft=Sk(Pu),Wft=Sk(co),Hft=Sk("DeclareExportDeclaration"),zft=Sk(le),Kft=Sk(eu),Qft=Sk(mc),$ft=Sk("DeclareModule"),Zft=Sk(Qp),tst=Sk("DeclareModuleExports"),rst=Sk(Gi),est=Sk(eu),nst=Sk("DoWhileStatement"),ast=Sk(oo),ust=Sk(Pu),ist=Sk("ExportDefaultDeclaration"),cst=Sk(oo),fst=Sk(Cb),sst=Sk("ExportAllDeclaration"),ost=Sk(oo),vst=Sk(Cb),lst=Sk(ek),bst=Sk(Pu),pst=Sk("ExportNamedDeclaration"),kst=Sk(y),wst=Sk(Xe),dst=Sk("ExpressionStatement"),hst=Sk(eu),mst=Sk("update"),yst=Sk(Gi),_st=Sk(ju),Fst=Sk("ForStatement"),Est=Sk(El),Sst=Sk(eu),gst=Sk(Za),xst=Sk(ps),Tst=Sk("ForInStatement"),Ast=Sk("ForAwaitStatement"),Ost=Sk("ForOfStatement"),Ist=Sk(eu),Pst=Sk(Za),Dst=Sk(ps),Cst=Sk(ne),Nst=Sk(_),Lst=Sk(Gi),Rst=Sk("IfStatement"),Mst=Sk(kr),Ust=Sk(gs),jst=Sk(qe),Bst=Sk(fk),Xst=Sk(Cb),Jst=Sk(ek),Gst=Sk("ImportDeclaration"),qst=Sk(eu),Yst=Sk(Wc),Vst=Sk("LabeledStatement"),Wst=Sk(po),Hst=Sk("ReturnStatement"),zst=Sk("cases"),Kst=Sk("discriminant"),Qst=Sk("SwitchStatement"),$st=Sk(po),Zst=Sk("ThrowStatement"),tot=Sk(pl),rot=Sk(La),eot=Sk("block"),not=Sk("TryStatement"),aot=Sk(eu),uot=Sk(Gi),iot=Sk("WhileStatement"),cot=Sk(eu),fot=Sk(jf),sot=Sk("WithStatement"),oot=Sk("Super"),vot=Sk("ThisExpression"),lot=Sk(yl),bot=Sk("ArrayExpression"),pot=Sk(Li),kot=Sk(as),wot=Sk(Xe),dot=Sk(rb),hot=Sk(Xb),mot=Sk(os),yot=Sk(eu),_ot=Sk(I),Fot=Sk(mc),Eot=Sk("ArrowFunctionExpression"),Sot=Sk("="),got=Sk("+="),xot=Sk("-="),Tot=Sk("*="),Aot=Sk("**="),Oot=Sk("/="),Iot=Sk("%="),Pot=Sk("<<="),Dot=Sk(">>="),Cot=Sk(">>>="),Not=Sk("|="),Lot=Sk("^="),Rot=Sk("&="),Mot=Sk(Za),Uot=Sk(ps),jot=Sk(jl),Bot=Sk("AssignmentExpression"),Xot=Sk(Za),Jot=Sk(ps),Got=Sk(jl),qot=Sk("BinaryExpression"),Yot=Sk(ki),Vot=Sk(bn),Wot=Sk("blocks"),Hot=Sk("ComprehensionExpression"),zot=Sk(ne),Kot=Sk(_),Qot=Sk(Gi),$ot=Sk("ConditionalExpression"),Zot=Sk(bn),tvt=Sk("blocks"),rvt=Sk("GeneratorExpression"),evt=Sk(Fu),nvt=Sk("Import"),avt=Sk(Vl),uvt=Sk(ki),ivt=Sk("||"),cvt=Sk("&&"),fvt=Sk("??"),svt=Sk(Za),ovt=Sk(ps),vvt=Sk(jl),lvt=Sk("LogicalExpression"),bvt=Sk("MemberExpression"),pvt=Sk(wv),kvt=Sk("meta"),wvt=Sk("MetaProperty"),dvt=Sk(Fu),hvt=Sk(Ar),mvt=Sk(Vl),yvt=Sk("NewExpression"),_vt=Sk(du),Fvt=Sk("ObjectExpression"),Evt=Sk(pb),Svt=Sk("OptionalCallExpression"),gvt=Sk(pb),xvt=Sk("OptionalMemberExpression"),Tvt=Sk(pn),Avt=Sk("SequenceExpression"),Ovt=Sk(Qp),Ivt=Sk(Xe),Pvt=Sk("TypeCastExpression"),Dvt=Sk(po),Cvt=Sk("AwaitExpression"),Nvt=Sk(cs),Lvt=Sk(Ao),Rvt=Sk("!"),Mvt=Sk("~"),Uvt=Sk(gs),jvt=Sk(Ho),Bvt=Sk(Ri),Xvt=Sk("matched above"),Jvt=Sk(po),Gvt=Sk(Fp),qvt=Sk(jl),Yvt=Sk("UnaryExpression"),Vvt=Sk("--"),Wvt=Sk("++"),Hvt=Sk(Fp),zvt=Sk(po),Kvt=Sk(jl),Qvt=Sk("UpdateExpression"),$vt=Sk(_c),Zvt=Sk(po),tlt=Sk("YieldExpression"),rlt=Sk(Li),elt=Sk(as),nlt=Sk(Xe),alt=Sk(rb),ult=Sk(Xb),ilt=Sk(os),clt=Sk(eu),flt=Sk(I),slt=Sk(mc),olt=Sk("FunctionDeclaration"),vlt=Sk(Li),llt=Sk(as),blt=Sk(Xe),plt=Sk(rb),klt=Sk(Xb),wlt=Sk(os),dlt=Sk(eu),hlt=Sk(I),mlt=Sk(mc),ylt=Sk("FunctionExpression"),_lt=Sk(pb),Flt=Sk(Qp),Elt=Sk(Bl),Slt=Sk(c),glt=Sk(mc),xlt=Sk("PrivateName"),Tlt=Sk(pb),Alt=Sk(Qp),Olt=Sk(Bl),Ilt=Sk(c),Plt=Sk(_),Dlt=Sk(Gi),Clt=Sk("SwitchCase"),Nlt=Sk(eu),Llt=Sk("param"),Rlt=Sk("CatchClause"),Mlt=Sk(eu),Ult=Sk("BlockStatement"),jlt=Sk(mc),Blt=Sk("DeclareVariable"),Xlt=Sk(rb),Jlt=Sk(mc),Glt=Sk("DeclareFunction"),qlt=Sk(Ie),Ylt=Sk(Hr),Vlt=Sk(sk),Wlt=Sk(eu),Hlt=Sk(Li),zlt=Sk(mc),Klt=Sk("DeclareClass"),Qlt=Sk(sk),$lt=Sk(eu),Zlt=Sk(Li),tbt=Sk(mc),rbt=Sk("DeclareInterface"),ebt=Sk(qe),nbt=Sk(kr),abt=Sk(mn),ubt=Sk("ExportNamespaceSpecifier"),ibt=Sk(Za),cbt=Sk(Li),fbt=Sk(mc),sbt=Sk("DeclareTypeAlias"),obt=Sk(Za),vbt=Sk(Li),lbt=Sk(mc),bbt=Sk("TypeAlias"),pbt=Sk("DeclareOpaqueType"),kbt=Sk("OpaqueType"),wbt=Sk(cr),dbt=Sk(Z),hbt=Sk(Li),mbt=Sk(mc),ybt=Sk("ClassDeclaration"),_bt=Sk("ClassExpression"),Fbt=Sk(ct),Ebt=Sk(Hr),Sbt=Sk("superTypeParameters"),gbt=Sk("superClass"),xbt=Sk(Li),Tbt=Sk(eu),Abt=Sk(mc),Obt=Sk(Xe),Ibt=Sk("Decorator"),Pbt=Sk(Li),Dbt=Sk(mc),Cbt=Sk("ClassImplements"),Nbt=Sk(eu),Lbt=Sk("ClassBody"),Rbt=Sk(U),Mbt=Sk(yt),Ubt=Sk(dn),jbt=Sk(za),Bbt=Sk(ct),Xbt=Sk(bc),Jbt=Sk(Du),Gbt=Sk(le),qbt=Sk(qe),Ybt=Sk(Up),Vbt=Sk("MethodDefinition"),Wbt=Sk(l),Hbt=Sk(Du),zbt=Sk(Qp),Kbt=Sk(qe),Qbt=Sk(Up),$bt=Sk("ClassPrivateProperty"),Zbt=Sk("Internal Error: Private name found in class prop"),tpt=Sk(l),rpt=Sk(Du),ept=Sk(bc),npt=Sk(Qp),apt=Sk(qe),upt=Sk(Up),ipt=Sk("ClassProperty"),cpt=Sk(sk),fpt=Sk(eu),spt=Sk(Li),opt=Sk(mc),vpt=Sk("InterfaceDeclaration"),lpt=Sk(Li),bpt=Sk(mc),ppt=Sk("InterfaceExtends"),kpt=Sk(Qp),wpt=Sk(du),dpt=Sk("ObjectPattern"),hpt=Sk(Qp),mpt=Sk(yl),ypt=Sk("ArrayPattern"),_pt=Sk(Za),Fpt=Sk(ps),Ept=Sk("AssignmentPattern"),Spt=Sk(po),gpt=Sk(Xp),xpt=Sk(po),Tpt=Sk(Xp),Apt=Sk(ju),Opt=Sk(ju),Ipt=Sk(dn),Ppt=Sk(za),Dpt=Sk(Jc),Cpt=Sk(bc),Npt=Sk(Zc),Lpt=Sk(yt),Rpt=Sk(le),Mpt=Sk(qe),Upt=Sk(Up),jpt=Sk(Yr),Bpt=Sk(po),Xpt=Sk("SpreadProperty"),Jpt=Sk(bc),Gpt=Sk(Zc),qpt=Sk(yt),Ypt=Sk(le),Vpt=Sk(qe),Wpt=Sk(Up),Hpt=Sk(Yr),zpt=Sk(po),Kpt=Sk("RestProperty"),Qpt=Sk(po),$pt=Sk("SpreadElement"),Zpt=Sk(El),tkt=Sk(Za),rkt=Sk(ps),ekt=Sk("ComprehensionBlock"),nkt=Sk("flags"),akt=Sk(k),ukt=Sk("regex"),ikt=Sk(Zr),ckt=Sk(qe),fkt=Sk(Zr),skt=Sk(qe),okt=Sk(Ev),vkt=Sk(Zr),lkt=Sk(qe),bkt=Sk(Ev),pkt=Sk(pn),kkt=Sk("quasis"),wkt=Sk("TemplateLiteral"),dkt=Sk("cooked"),hkt=Sk(Zr),mkt=Sk("tail"),ykt=Sk(qe),_kt=Sk("TemplateElement"),Fkt=Sk("quasi"),Ekt=Sk("tag"),Skt=Sk("TaggedTemplateExpression"),gkt=Sk(Q),xkt=Sk(Qo),Tkt=Sk(Ni),Akt=Sk(le),Okt=Sk("declarations"),Ikt=Sk("VariableDeclaration"),Pkt=Sk(ju),Dkt=Sk(mc),Ckt=Sk("VariableDeclarator"),Nkt=Sk(le),Lkt=Sk("Variance"),Rkt=Sk("_"),Mkt=Sk("AnyTypeAnnotation"),Ukt=Sk("MixedTypeAnnotation"),jkt=Sk("EmptyTypeAnnotation"),Bkt=Sk("VoidTypeAnnotation"),Xkt=Sk("NullLiteralTypeAnnotation"),Jkt=Sk("NumberTypeAnnotation"),Gkt=Sk("StringTypeAnnotation"),qkt=Sk("BooleanTypeAnnotation"),Ykt=Sk(Qp),Vkt=Sk("NullableTypeAnnotation"),Wkt=Sk(Li),Hkt=Sk(Fi),zkt=Sk(as),Kkt=Sk(I),Qkt=Sk("FunctionTypeAnnotation"),$kt=Sk(pb),Zkt=Sk(Qp),twt=Sk(Bl),rwt=Sk("FunctionTypeParam"),ewt=[0,0,0,0,0],nwt=Sk("internalSlots"),awt=Sk("callProperties"),uwt=Sk("indexers"),iwt=Sk(du),cwt=Sk("exact"),fwt=Sk(Uo),swt=Sk("ObjectTypeAnnotation"),owt=Sk(Jc),vwt=Sk("There should not be computed object type property keys"),lwt=Sk(ju),bwt=Sk(dn),pwt=Sk(za),kwt=Sk(le),wwt=Sk(l),dwt=Sk(Yu),hwt=Sk(Du),mwt=Sk(pb),ywt=Sk(yt),_wt=Sk(qe),Fwt=Sk(Up),Ewt=Sk("ObjectTypeProperty"),Swt=Sk(po),gwt=Sk("ObjectTypeSpreadProperty"),xwt=Sk(l),Twt=Sk(Du),Awt=Sk(qe),Owt=Sk(Up),Iwt=Sk(mc),Pwt=Sk("ObjectTypeIndexer"),Dwt=Sk(Du),Cwt=Sk(qe),Nwt=Sk("ObjectTypeCallProperty"),Lwt=Sk(qe),Rwt=Sk(yt),Mwt=Sk(Du),Uwt=Sk(pb),jwt=Sk(mc),Bwt=Sk("ObjectTypeInternalSlot"),Xwt=Sk(eu),Jwt=Sk(sk),Gwt=Sk("InterfaceTypeAnnotation"),qwt=Sk("elementType"),Ywt=Sk("ArrayTypeAnnotation"),Vwt=Sk(mc),Wwt=Sk("qualification"),Hwt=Sk("QualifiedTypeIdentifier"),zwt=Sk(Li),Kwt=Sk(mc),Qwt=Sk("GenericTypeAnnotation"),$wt=Sk(nb),Zwt=Sk("UnionTypeAnnotation"),tdt=Sk(nb),rdt=Sk("IntersectionTypeAnnotation"),edt=Sk(po),ndt=Sk("TypeofTypeAnnotation"),adt=Sk(nb),udt=Sk("TupleTypeAnnotation"),idt=Sk(Zr),cdt=Sk(qe),fdt=Sk("StringLiteralTypeAnnotation"),sdt=Sk(Zr),odt=Sk(qe),vdt=Sk("NumberLiteralTypeAnnotation"),ldt=Sk(Fc),bdt=Sk(ji),pdt=Sk(Zr),kdt=Sk(qe),wdt=Sk("BooleanLiteralTypeAnnotation"),ddt=Sk("ExistsTypeAnnotation"),hdt=Sk(Qp),mdt=Sk("TypeAnnotation"),ydt=Sk(I),_dt=Sk("TypeParameterDeclaration"),Fdt=Sk(co),Edt=Sk(l),Sdt=Sk("bound"),gdt=Sk(Bl),xdt=Sk("TypeParameter"),Tdt=Sk(I),Adt=Sk(Fv),Odt=Sk(I),Idt=Sk(Fv),Pdt=Sk(i),Ddt=Sk(cn),Cdt=Sk("openingElement"),Ndt=Sk("JSXElement"),Ldt=Sk("closingFragment"),Rdt=Sk(i),Mdt=Sk("openingFragment"),Udt=Sk("JSXFragment"),jdt=Sk(zb),Bdt=Sk(Vc),Xdt=Sk(Bl),Jdt=Sk("JSXOpeningElement"),Gdt=Sk("JSXOpeningFragment"),qdt=Sk(Bl),Ydt=Sk("JSXClosingElement"),Vdt=Sk("JSXClosingFragment"),Wdt=Sk(Xe),Hdt=Sk("JSXSpreadChild"),zdt=Sk(qe),Kdt=Sk(Bl),Qdt=Sk("JSXAttribute"),$dt=Sk(po),Zdt=Sk("JSXSpreadAttribute"),tht=Sk("JSXEmptyExpression"),rht=Sk(Xe),eht=Sk("JSXExpressionContainer"),nht=Sk(Zr),aht=Sk(qe),uht=Sk("JSXText"),iht=Sk(wv),cht=Sk(jf),fht=Sk("JSXMemberExpression"),sht=Sk(Bl),oht=Sk("namespace"),vht=Sk("JSXNamespacedName"),lht=Sk(Bl),bht=Sk("JSXIdentifier"),pht=Sk(mn),kht=Sk(nl),wht=Sk("ExportSpecifier"),dht=Sk(nl),hht=Sk("ImportDefaultSpecifier"),mht=Sk(nl),yht=Sk("ImportNamespaceSpecifier"),_ht=Sk(fk),Fht=Sk(nl),Eht=Sk("imported"),Sht=Sk("ImportSpecifier"),ght=Sk("Block"),xht=Sk("Line"),Tht=Sk(qe),Aht=Sk(qe),Oht=Sk("DeclaredPredicate"),Iht=Sk("InferredPredicate"),Pht=Sk(Fu),Dht=Sk(Ar),Cht=Sk(Vl),Nht=Sk(bc),Lht=Sk(wv),Rht=Sk(jf),Mht=Sk("message"),Uht=Sk("loc"),jht=Sk(kr),Bht=Sk("loc"),Xht=Sk("range"),Jht=Sk(kr),Ght=Sk("end"),qht=Sk(V),Yht=Sk(Cb),Vht=Sk(Je),Wht=Sk(Tu),Hht=[0,1,0],zht=Sk("{"),Kht=Sk("}"),Qht=Sk("{|"),$ht=Sk("|}"),Zht=Sk("("),tmt=Sk(zo),rmt=Sk("["),emt=Sk("]"),nmt=Sk(";"),amt=Sk(","),umt=Sk(se),imt=Sk("=>"),cmt=Sk("..."),fmt=Sk("@"),smt=Sk("#"),omt=Sk(Nv),vmt=Sk("if"),lmt=Sk("in"),bmt=Sk(vo),pmt=Sk(gn),kmt=Sk(Lr),wmt=Sk(or),dmt=Sk(Ft),hmt=Sk("try"),mmt=Sk(Q),ymt=Sk(hl),_mt=Sk(al),Fmt=Sk(Ni),Emt=Sk(Qo),Smt=Sk(sn),gmt=Sk(ji),xmt=Sk(Fc),Tmt=Sk(Bf),Amt=Sk(ms),Omt=Sk(Ef),Imt=Sk(Np),Pmt=Sk(co),Dmt=Sk("do"),Cmt=Sk(_b),Nmt=Sk("for"),Lmt=Sk(Dp),Rmt=Sk(sk),Mmt=Sk(Du),Umt=Sk(ku),jmt=Sk(tl),Bmt=Sk(Ri),Xmt=Sk(gs),Jmt=Sk(Ho),Gmt=Sk(Ns),qmt=Sk(fe),Ymt=Sk(Uc),Vmt=Sk(Xs),Wmt=Sk(Hr),Hmt=Sk(Ws),zmt=Sk(ar),Kmt=Sk(Rr),Qmt=Sk(Pf),$mt=Sk(Ps),Zmt=Sk(B),tyt=Sk(Xc),ryt=Sk(ye),eyt=Sk(kr),nyt=Sk("opaque"),ayt=Sk("of"),uyt=Sk(os),iyt=Sk(fs),cyt=Sk("%checks"),fyt=Sk(">>>="),syt=Sk(">>="),oyt=Sk("<<="),vyt=Sk("^="),lyt=Sk("|="),byt=Sk("&="),pyt=Sk("%="),kyt=Sk("/="),wyt=Sk("*="),dyt=Sk("**="),hyt=Sk("-="),myt=Sk("+="),yyt=Sk("="),_yt=Sk("?."),Fyt=Sk("??"),Eyt=Sk("?"),Syt=Sk(":"),gyt=Sk("||"),xyt=Sk("&&"),Tyt=Sk("|"),Ayt=Sk("^"),Oyt=Sk("&"),Iyt=Sk("=="),Pyt=Sk("!="),Dyt=Sk("==="),Cyt=Sk("!=="),Nyt=Sk("<="),Lyt=Sk(">="),Ryt=Sk("<"),Myt=Sk(">"),Uyt=Sk("<<"),jyt=Sk(">>"),Byt=Sk(">>>"),Xyt=Sk(Ao),Jyt=Sk(cs),Gyt=Sk(vv),qyt=Sk("*"),Yyt=Sk("**"),Vyt=Sk("%"),Wyt=Sk("!"),Hyt=Sk("~"),zyt=Sk("++"),Kyt=Sk("--"),Qyt=Sk(so),$yt=Sk("any"),Zyt=Sk(Hb),t_t=Sk(Wn),r_t=Sk(Sv),e_t=Sk(Yi),n_t=Sk(Ho),a_t=Sk(vv),u_t=Sk(vv),i_t=Sk(De),c_t=Sk(io),f_t=Sk("T_LCURLY"),s_t=Sk("T_RCURLY"),o_t=Sk("T_LCURLYBAR"),v_t=Sk("T_RCURLYBAR"),l_t=Sk("T_LPAREN"),b_t=Sk("T_RPAREN"),p_t=Sk("T_LBRACKET"),k_t=Sk("T_RBRACKET"),w_t=Sk("T_SEMICOLON"),d_t=Sk("T_COMMA"),h_t=Sk("T_PERIOD"),m_t=Sk("T_ARROW"),y_t=Sk("T_ELLIPSIS"),__t=Sk("T_AT"),F_t=Sk("T_POUND"),E_t=Sk("T_FUNCTION"),S_t=Sk("T_IF"),g_t=Sk("T_IN"),x_t=Sk("T_INSTANCEOF"),T_t=Sk("T_RETURN"),A_t=Sk("T_SWITCH"),O_t=Sk("T_THIS"),I_t=Sk("T_THROW"),P_t=Sk("T_TRY"),D_t=Sk("T_VAR"),C_t=Sk("T_WHILE"),N_t=Sk("T_WITH"),L_t=Sk("T_CONST"),R_t=Sk("T_LET"),M_t=Sk("T_NULL"),U_t=Sk("T_FALSE"),j_t=Sk("T_TRUE"),B_t=Sk("T_BREAK"),X_t=Sk("T_CASE"),J_t=Sk("T_CATCH"),G_t=Sk("T_CONTINUE"),q_t=Sk("T_DEFAULT"),Y_t=Sk("T_DO"),V_t=Sk("T_FINALLY"),W_t=Sk("T_FOR"),H_t=Sk("T_CLASS"),z_t=Sk("T_EXTENDS"),K_t=Sk("T_STATIC"),Q_t=Sk("T_ELSE"),$_t=Sk("T_NEW"),Z_t=Sk("T_DELETE"),tFt=Sk("T_TYPEOF"),rFt=Sk("T_VOID"),eFt=Sk("T_ENUM"),nFt=Sk("T_EXPORT"),aFt=Sk("T_IMPORT"),uFt=Sk("T_SUPER"),iFt=Sk("T_IMPLEMENTS"),cFt=Sk("T_INTERFACE"),fFt=Sk("T_PACKAGE"),sFt=Sk("T_PRIVATE"),oFt=Sk("T_PROTECTED"),vFt=Sk("T_PUBLIC"),lFt=Sk("T_YIELD"),bFt=Sk("T_DEBUGGER"),pFt=Sk("T_DECLARE"),kFt=Sk("T_TYPE"),wFt=Sk("T_OPAQUE"),dFt=Sk("T_OF"),hFt=Sk("T_ASYNC"),mFt=Sk("T_AWAIT"),yFt=Sk("T_CHECKS"),_Ft=Sk("T_RSHIFT3_ASSIGN"),FFt=Sk("T_RSHIFT_ASSIGN"),EFt=Sk("T_LSHIFT_ASSIGN"),SFt=Sk("T_BIT_XOR_ASSIGN"),gFt=Sk("T_BIT_OR_ASSIGN"),xFt=Sk("T_BIT_AND_ASSIGN"),TFt=Sk("T_MOD_ASSIGN"),AFt=Sk("T_DIV_ASSIGN"),OFt=Sk("T_MULT_ASSIGN"),IFt=Sk("T_EXP_ASSIGN"),PFt=Sk("T_MINUS_ASSIGN"),DFt=Sk("T_PLUS_ASSIGN"),CFt=Sk("T_ASSIGN"),NFt=Sk("T_PLING_PERIOD"),LFt=Sk("T_PLING_PLING"),RFt=Sk("T_PLING"),MFt=Sk("T_COLON"),UFt=Sk("T_OR"),jFt=Sk("T_AND"),BFt=Sk("T_BIT_OR"),XFt=Sk("T_BIT_XOR"),JFt=Sk("T_BIT_AND"),GFt=Sk("T_EQUAL"),qFt=Sk("T_NOT_EQUAL"),YFt=Sk("T_STRICT_EQUAL"),VFt=Sk("T_STRICT_NOT_EQUAL"),WFt=Sk("T_LESS_THAN_EQUAL"),HFt=Sk("T_GREATER_THAN_EQUAL"),zFt=Sk("T_LESS_THAN"),KFt=Sk("T_GREATER_THAN"),QFt=Sk("T_LSHIFT"),$Ft=Sk("T_RSHIFT"),ZFt=Sk("T_RSHIFT3"),tEt=Sk("T_PLUS"),rEt=Sk("T_MINUS"),eEt=Sk("T_DIV"),nEt=Sk("T_MULT"),aEt=Sk("T_EXP"),uEt=Sk("T_MOD"),iEt=Sk("T_NOT"),cEt=Sk("T_BIT_NOT"),fEt=Sk("T_INCR"),sEt=Sk("T_DECR"),oEt=Sk("T_EOF"),vEt=Sk("T_ANY_TYPE"),lEt=Sk("T_MIXED_TYPE"),bEt=Sk("T_EMPTY_TYPE"),pEt=Sk("T_NUMBER_TYPE"),kEt=Sk("T_STRING_TYPE"),wEt=Sk("T_VOID_TYPE"),dEt=Sk("T_NUMBER"),hEt=Sk("T_STRING"),mEt=Sk("T_TEMPLATE_PART"),yEt=Sk("T_IDENTIFIER"),_Et=Sk("T_REGEXP"),FEt=Sk("T_ERROR"),EEt=Sk("T_JSX_IDENTIFIER"),SEt=Sk("T_JSX_TEXT"),gEt=Sk("T_BOOLEAN_TYPE"),xEt=Sk("T_NUMBER_SINGLETON_TYPE"),TEt=Sk("*-/"),AEt=Sk("*/"),OEt=Sk("*-/"),IEt=Sk(Vv),PEt=Sk(Vv),DEt=Sk("\\"),CEt=Sk(Vv),NEt=Sk("${"),LEt=Sk("\r\n"),REt=Sk("\r\n"),MEt=Sk("\n"),UEt=Sk(Vv),jEt=Sk("\\\\"),BEt=Sk(Vv),XEt=Sk(so),JEt=Sk(so),GEt=Sk(so),qEt=Sk(so),YEt=Sk(Vv),VEt=Sk("'"),WEt=Sk('"'),HEt=Sk("<"),zEt=Sk("{"),KEt=Sk(lb),QEt=Sk("iexcl"),$Et=Sk("aelig"),ZEt=Sk("Nu"),tSt=Sk("Eacute"),rSt=Sk("Atilde"),eSt=Sk("'int'"),nSt=Sk("AElig"),aSt=Sk("Aacute"),uSt=Sk("Acirc"),iSt=Sk("Agrave"),cSt=Sk("Alpha"),fSt=Sk("Aring"),sSt=[0,197],oSt=[0,913],vSt=[0,Zi],lSt=[0,194],bSt=[0,193],pSt=[0,198],kSt=[0,8747],wSt=Sk("Auml"),dSt=Sk("Beta"),hSt=Sk("Ccedil"),mSt=Sk("Chi"),ySt=Sk("Dagger"),_St=Sk("Delta"),FSt=Sk("ETH"),ESt=[0,208],SSt=[0,916],gSt=[0,8225],xSt=[0,935],TSt=[0,199],ASt=[0,914],OSt=[0,196],ISt=[0,195],PSt=Sk("Icirc"),DSt=Sk("Ecirc"),CSt=Sk("Egrave"),NSt=Sk("Epsilon"),LSt=Sk("Eta"),RSt=Sk("Euml"),MSt=Sk("Gamma"),USt=Sk("Iacute"),jSt=[0,205],BSt=[0,915],XSt=[0,203],JSt=[0,919],GSt=[0,917],qSt=[0,200],YSt=[0,202],VSt=Sk("Igrave"),WSt=Sk("Iota"),HSt=Sk("Iuml"),zSt=Sk("Kappa"),KSt=Sk("Lambda"),QSt=Sk("Mu"),$St=Sk("Ntilde"),ZSt=[0,209],tgt=[0,924],rgt=[0,923],egt=[0,922],ngt=[0,207],agt=[0,921],ugt=[0,204],igt=[0,206],cgt=[0,201],fgt=Sk("Sigma"),sgt=Sk("Otilde"),ogt=Sk("OElig"),vgt=Sk("Oacute"),lgt=Sk("Ocirc"),bgt=Sk("Ograve"),pgt=Sk("Omega"),kgt=Sk("Omicron"),wgt=Sk("Oslash"),dgt=[0,216],hgt=[0,927],mgt=[0,937],ygt=[0,210],_gt=[0,212],Fgt=[0,211],Egt=[0,338],Sgt=Sk("Ouml"),ggt=Sk("Phi"),xgt=Sk("Pi"),Tgt=Sk("Prime"),Agt=Sk("Psi"),Ogt=Sk("Rho"),Igt=Sk("Scaron"),Pgt=[0,352],Dgt=[0,929],Cgt=[0,936],Ngt=[0,8243],Lgt=[0,928],Rgt=[0,934],Mgt=[0,214],Ugt=[0,213],jgt=Sk("Uuml"),Bgt=Sk("THORN"),Xgt=Sk("Tau"),Jgt=Sk("Theta"),Ggt=Sk("Uacute"),qgt=Sk("Ucirc"),Ygt=Sk("Ugrave"),Vgt=Sk("Upsilon"),Wgt=[0,933],Hgt=[0,217],zgt=[0,219],Kgt=[0,218],Qgt=[0,920],$gt=[0,932],Zgt=[0,222],txt=Sk("Xi"),rxt=Sk("Yacute"),ext=Sk("Yuml"),nxt=Sk("Zeta"),axt=Sk("aacute"),uxt=Sk("acirc"),ixt=Sk("acute"),cxt=[0,180],fxt=[0,226],sxt=[0,225],oxt=[0,918],vxt=[0,376],lxt=[0,221],bxt=[0,926],pxt=[0,220],kxt=[0,931],wxt=[0,925],dxt=Sk("delta"),hxt=Sk("cap"),mxt=Sk("aring"),yxt=Sk("agrave"),_xt=Sk("alefsym"),Fxt=Sk("alpha"),Ext=Sk("amp"),Sxt=Sk("and"),gxt=Sk("ang"),xxt=Sk("apos"),Txt=[0,39],Axt=[0,8736],Oxt=[0,8743],Ixt=[0,38],Pxt=[0,945],Dxt=[0,8501],Cxt=[0,Is],Nxt=Sk("asymp"),Lxt=Sk("atilde"),Rxt=Sk("auml"),Mxt=Sk("bdquo"),Uxt=Sk("beta"),jxt=Sk("brvbar"),Bxt=Sk("bull"),Xxt=[0,8226],Jxt=[0,166],Gxt=[0,946],qxt=[0,8222],Yxt=[0,228],Vxt=[0,227],Wxt=[0,8776],Hxt=[0,229],zxt=Sk("copy"),Kxt=Sk("ccedil"),Qxt=Sk("cedil"),$xt=Sk("cent"),Zxt=Sk("chi"),tTt=Sk("circ"),rTt=Sk("clubs"),eTt=Sk("cong"),nTt=[0,8773],aTt=[0,9827],uTt=[0,710],iTt=[0,967],cTt=[0,162],fTt=[0,184],sTt=[0,231],oTt=Sk("crarr"),vTt=Sk("cup"),lTt=Sk("curren"),bTt=Sk("dArr"),pTt=Sk("dagger"),kTt=Sk("darr"),wTt=Sk("deg"),dTt=[0,176],hTt=[0,8595],mTt=[0,8224],yTt=[0,8659],_Tt=[0,164],FTt=[0,8746],ETt=[0,8629],STt=[0,169],gTt=[0,8745],xTt=Sk("fnof"),TTt=Sk("ensp"),ATt=Sk("diams"),OTt=Sk("divide"),ITt=Sk("eacute"),PTt=Sk("ecirc"),DTt=Sk("egrave"),CTt=Sk(Wn),NTt=Sk("emsp"),LTt=[0,8195],RTt=[0,8709],MTt=[0,232],UTt=[0,234],jTt=[0,233],BTt=[0,247],XTt=[0,9830],JTt=Sk("epsilon"),GTt=Sk("equiv"),qTt=Sk("eta"),YTt=Sk("eth"),VTt=Sk("euml"),WTt=Sk("euro"),HTt=Sk("exist"),zTt=[0,8707],KTt=[0,8364],QTt=[0,235],$Tt=[0,cb],ZTt=[0,951],tAt=[0,8801],rAt=[0,949],eAt=[0,8194],nAt=Sk("gt"),aAt=Sk("forall"),uAt=Sk("frac12"),iAt=Sk("frac14"),cAt=Sk("frac34"),fAt=Sk("frasl"),sAt=Sk("gamma"),oAt=Sk("ge"),vAt=[0,8805],lAt=[0,947],bAt=[0,8260],pAt=[0,190],kAt=[0,188],wAt=[0,189],dAt=[0,8704],hAt=Sk("hArr"),mAt=Sk("harr"),yAt=Sk("hearts"),_At=Sk("hellip"),FAt=Sk("iacute"),EAt=Sk("icirc"),SAt=[0,238],gAt=[0,237],xAt=[0,8230],TAt=[0,9829],AAt=[0,8596],OAt=[0,8660],IAt=[0,62],PAt=[0,402],DAt=[0,948],CAt=[0,230],NAt=Sk("prime"),LAt=Sk("ndash"),RAt=Sk("le"),MAt=Sk("kappa"),UAt=Sk("igrave"),jAt=Sk("image"),BAt=Sk("infin"),XAt=Sk("iota"),JAt=Sk("iquest"),GAt=Sk("isin"),qAt=Sk("iuml"),YAt=[0,239],VAt=[0,8712],WAt=[0,191],HAt=[0,953],zAt=[0,8734],KAt=[0,8465],QAt=[0,236],$At=Sk("lArr"),ZAt=Sk("lambda"),tOt=Sk("lang"),rOt=Sk("laquo"),eOt=Sk("larr"),nOt=Sk("lceil"),aOt=Sk("ldquo"),uOt=[0,8220],iOt=[0,8968],cOt=[0,8592],fOt=[0,171],sOt=[0,10216],oOt=[0,955],vOt=[0,8656],lOt=[0,954],bOt=Sk("macr"),pOt=Sk("lfloor"),kOt=Sk("lowast"),wOt=Sk("loz"),dOt=Sk("lrm"),hOt=Sk("lsaquo"),mOt=Sk("lsquo"),yOt=Sk("lt"),_Ot=[0,60],FOt=[0,8216],EOt=[0,8249],SOt=[0,8206],gOt=[0,9674],xOt=[0,8727],TOt=[0,8970],AOt=Sk("mdash"),OOt=Sk("micro"),IOt=Sk("middot"),POt=Sk(ic),DOt=Sk("mu"),COt=Sk("nabla"),NOt=Sk("nbsp"),LOt=[0,160],ROt=[0,8711],MOt=[0,956],UOt=[0,8722],jOt=[0,183],BOt=[0,181],XOt=[0,8212],JOt=[0,175],GOt=[0,8804],qOt=Sk("or"),YOt=Sk("oacute"),VOt=Sk("ne"),WOt=Sk("ni"),HOt=Sk("not"),zOt=Sk("notin"),KOt=Sk("nsub"),QOt=Sk("ntilde"),$Ot=Sk("nu"),ZOt=[0,957],tIt=[0,241],rIt=[0,8836],eIt=[0,8713],nIt=[0,172],aIt=[0,8715],uIt=[0,8800],iIt=Sk("ocirc"),cIt=Sk("oelig"),fIt=Sk("ograve"),sIt=Sk("oline"),oIt=Sk("omega"),vIt=Sk("omicron"),lIt=Sk("oplus"),bIt=[0,8853],pIt=[0,959],kIt=[0,969],wIt=[0,Xr],dIt=[0,242],hIt=[0,339],mIt=[0,244],yIt=[0,243],_It=Sk("part"),FIt=Sk("ordf"),EIt=Sk("ordm"),SIt=Sk("oslash"),gIt=Sk("otilde"),xIt=Sk("otimes"),TIt=Sk("ouml"),AIt=Sk("para"),OIt=[0,182],IIt=[0,Au],PIt=[0,8855],DIt=[0,fc],CIt=[0,sf],NIt=[0,186],LIt=[0,170],RIt=Sk("permil"),MIt=Sk("perp"),UIt=Sk("phi"),jIt=Sk("pi"),BIt=Sk("piv"),XIt=Sk("plusmn"),JIt=Sk("pound"),GIt=[0,163],qIt=[0,177],YIt=[0,982],VIt=[0,960],WIt=[0,966],HIt=[0,8869],zIt=[0,8240],KIt=[0,8706],QIt=[0,8744],$It=[0,8211],ZIt=Sk("sup1"),tPt=Sk("rlm"),rPt=Sk("raquo"),ePt=Sk("prod"),nPt=Sk("prop"),aPt=Sk("psi"),uPt=Sk("quot"),iPt=Sk("rArr"),cPt=Sk("radic"),fPt=Sk("rang"),sPt=[0,10217],oPt=[0,8730],vPt=[0,8658],lPt=[0,34],bPt=[0,968],pPt=[0,8733],kPt=[0,8719],wPt=Sk("rarr"),dPt=Sk("rceil"),hPt=Sk("rdquo"),mPt=Sk("real"),yPt=Sk("reg"),_Pt=Sk("rfloor"),FPt=Sk("rho"),EPt=[0,961],SPt=[0,8971],gPt=[0,174],xPt=[0,8476],TPt=[0,8221],APt=[0,8969],OPt=[0,8594],IPt=[0,187],PPt=Sk("sigma"),DPt=Sk("rsaquo"),CPt=Sk("rsquo"),NPt=Sk("sbquo"),LPt=Sk("scaron"),RPt=Sk("sdot"),MPt=Sk("sect"),UPt=Sk("shy"),jPt=[0,173],BPt=[0,167],XPt=[0,8901],JPt=[0,353],GPt=[0,8218],qPt=[0,8217],YPt=[0,8250],VPt=Sk("sigmaf"),WPt=Sk("sim"),HPt=Sk("spades"),zPt=Sk("sub"),KPt=Sk("sube"),QPt=Sk("sum"),$Pt=Sk("sup"),ZPt=[0,8835],tDt=[0,8721],rDt=[0,8838],eDt=[0,8834],nDt=[0,9824],aDt=[0,8764],uDt=[0,962],iDt=[0,963],cDt=[0,8207],fDt=Sk("uarr"),sDt=Sk("thetasym"),oDt=Sk("sup2"),vDt=Sk("sup3"),lDt=Sk("supe"),bDt=Sk("szlig"),pDt=Sk("tau"),kDt=Sk("there4"),wDt=Sk("theta"),dDt=[0,952],hDt=[0,8756],mDt=[0,964],yDt=[0,223],_Dt=[0,8839],FDt=[0,179],EDt=[0,178],SDt=Sk("thinsp"),gDt=Sk("thorn"),xDt=Sk("tilde"),TDt=Sk("times"),ADt=Sk("trade"),ODt=Sk("uArr"),IDt=Sk("uacute"),PDt=[0,js],DDt=[0,8657],CDt=[0,8482],NDt=[0,215],LDt=[0,732],RDt=[0,e],MDt=[0,8201],UDt=[0,977],jDt=Sk("xi"),BDt=Sk("ucirc"),XDt=Sk("ugrave"),JDt=Sk("uml"),GDt=Sk("upsih"),qDt=Sk("upsilon"),YDt=Sk("uuml"),VDt=Sk("weierp"),WDt=[0,8472],HDt=[0,Rp],zDt=[0,965],KDt=[0,978],QDt=[0,168],$Dt=[0,249],ZDt=[0,251],tCt=Sk("yacute"),rCt=Sk("yen"),eCt=Sk("yuml"),nCt=Sk("zeta"),aCt=Sk("zwj"),uCt=Sk("zwnj"),iCt=[0,8204],cCt=[0,ss],fCt=[0,950],sCt=[0,Sb],oCt=[0,165],vCt=[0,ns],lCt=[0,958],bCt=[0,8593],pCt=[0,185],kCt=[0,8242],wCt=[0,161],dCt=Sk(";"),hCt=Sk("&"),mCt=Sk(Vv),yCt=Sk(Vv),_Ct=Sk(Vv),FCt=(Sk("789"),Sk(Vv)),ECt=Sk(Vv),SCt=Sk(Vv),gCt=Sk(Vv),xCt=Sk(":"),TCt=Sk(":"),ACt=Sk(Pe),OCt=(Sk("789"),[8,0]),ICt=[8,1],PCt=Sk(Vv),DCt=Sk("}"),CCt=[0,Sk(so),Sk(so),Sk(so)],NCt=Sk(Vv),LCt=Sk(Vv),RCt=Sk("'"),MCt=Sk(Vv),UCt=Sk(Vv),jCt=Sk(Vv),BCt=Sk(Vv),XCt=Sk(Vv),JCt=Sk(Vv),GCt=Sk(Vv),qCt=Sk(Vv),YCt=Sk(":"),VCt=Sk(":"),WCt=Sk(Pe),HCt=[5,Sk("#!")],zCt=Sk("expected ?"),KCt=Sk(Vv),QCt=Sk(af),$Ct=Sk(rt),ZCt=Sk(rt),tNt=Sk(af),rNt=Sk("b"),eNt=Sk(Ii),nNt=Sk("n"),aNt=Sk("r"),uNt=Sk("t"),iNt=Sk("v"),cNt=Sk(rt),fNt=Sk(lb),sNt=Sk(lb),oNt=Sk(Vv),vNt=Sk(lb),lNt=Sk(lb),bNt=Sk(Vv),pNt=Sk(rt),kNt=Sk(Es),wNt=Sk(iu),dNt=Sk(Vt),hNt=(Sk("src/parser/lexer.ml"),Sk(so),[1,Sk("ILLEGAL")]),mNt=Sk("\0"),yNt=Sk("\0\0\0\0"),_Nt=Sk("\0\0\0"),FNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ENt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),SNt=Sk(""),gNt=Sk("\0"),xNt=Sk("\0\0\0\0\0\0"),TNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ANt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ONt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),INt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),PNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),DNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\b\0\0\0\0\0\0\b"),CNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),NNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),LNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),RNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),MNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),UNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),jNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),BNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),XNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),JNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),GNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),qNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),YNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),VNt=Sk("\0\0"),WNt=Sk(""),HNt=Sk(""),zNt=Sk(""),KNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),QNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),$Nt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ZNt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),tLt=Sk("\0\0"),rLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),eLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),nLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),aLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),uLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),iLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),cLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),fLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),sLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),oLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),vLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),lLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),bLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),pLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),kLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),wLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),dLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),hLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),mLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),yLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),_Lt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),FLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ELt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),SLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),gLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),xLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),TLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ALt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),OLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ILt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),PLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),DLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),CLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),NLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),LLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),RLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),MLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ULt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),jLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),BLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),XLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),JLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),GLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),qLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),YLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),VLt=Sk("\0"),WLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),HLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),zLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),KLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),QLt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),$Lt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ZLt=Sk("\0\0\0"),tRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),rRt=Sk(""),eRt=Sk(""),nRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),aRt=Sk("\0"),uRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),iRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),cRt=Sk(""),fRt=Sk("\b\t\n\v\f\r"),sRt=Sk("\0\0\0"),oRt=Sk(""),vRt=Sk(""),lRt=Sk("\b\t\n\v\f\r !\"#$%&'()"),bRt=Sk("\b\t\n\v\f\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t!\"#$%&'\t\t(\t\t)\t*+,\t-./\t01\t2\t3456\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),pRt=Sk(""),kRt=Sk(""),wRt=Sk("\0\0\0\0"),dRt=Sk("\b\t\n\v\f\r"),hRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),mRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),yRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),_Rt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),FRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),ERt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),SRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),gRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),xRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),TRt=Sk("\0\0\0\0\0\0\0"),ARt=Sk(""),ORt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),IRt=Sk("\0"),PRt=Sk("\0"),DRt=Sk(""),CRt=Sk(""),NRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),LRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),RRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),MRt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),URt=Sk("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),jRt=Sk("Lexer.FloatOfString.No_good"),BRt=Sk(Ot),XRt=Sk(Ot),JRt=Sk("Peeking current location when not available"),GRt=Sk(Hb),qRt=Sk("_"),YRt=Sk("any"),VRt=Sk(io),WRt=Sk(De),HRt=Sk(Wn),zRt=Sk(sk),KRt=Sk(ji),QRt=Sk(Ws),$Rt=Sk(sn),ZRt=Sk(Sv),tMt=Sk(Du),rMt=Sk(Yi),eMt=Sk(Fc),nMt=Sk(gs),aMt=Sk(Ho),uMt=Sk(ji),iMt=Sk(sn),cMt=Sk(Fc),fMt=Sk(Fu),sMt=Sk("eval"),oMt=Sk(Hr),vMt=Sk(Ws),lMt=Sk(ar),bMt=Sk(Rr),pMt=Sk(Pf),kMt=Sk(Ps),wMt=Sk(Du),dMt=Sk(B),hMt=Sk(Ns),mMt=Sk("if"),yMt=Sk(co),_Mt=Sk(fs),FMt=Sk(Bf),EMt=Sk(ms),SMt=Sk(Ef),gMt=Sk(Dp),xMt=Sk(Ni),TMt=Sk(Np),AMt=Sk(Xc),OMt=Sk(Ri),IMt=Sk("do"),PMt=Sk(ku),DMt=Sk(fe),CMt=Sk(sk),NMt=Sk(_b),LMt=Sk("for"),RMt=Sk(Nv),MMt=Sk(Ft),UMt=Sk(Uc),jMt=Sk("in"),BMt=Sk(vo),XMt=Sk(tl),JMt=Sk(gn),GMt=Sk(Xs),qMt=Sk(Lr),YMt=Sk(or),VMt=Sk("try"),WMt=Sk(gs),HMt=Sk(Q),zMt=Sk(Ho),KMt=Sk(hl),QMt=Sk(al),$Mt=Sk(B),ZMt=[0,Sk("src/parser/parser_env.ml"),328,2],tUt=Sk("Internal Error: Tried to add_declared_private with outside of class scope."),rUt=Sk("Internal Error: `exit_class` called before a matching `enter_class`"),eUt=Sk(so),nUt=Sk(so),aUt=[0,0,0],uUt=Sk(vu),iUt=Sk(vu),cUt=Sk("Parser_env.Try.Rollback"),fUt=Sk(Nv),sUt=Sk("if"),oUt=Sk("in"),vUt=Sk(vo),lUt=Sk(gn),bUt=Sk(Lr),pUt=Sk(or),kUt=Sk(Ft),wUt=Sk("try"),dUt=Sk(Q),hUt=Sk(hl),mUt=Sk(al),yUt=Sk(Ni),_Ut=Sk(Qo),FUt=Sk(sn),EUt=Sk(ji),SUt=Sk(Fc),gUt=Sk(Bf),xUt=Sk(ms),TUt=Sk(Ef),AUt=Sk(Np),OUt=Sk(co),IUt=Sk("do"),PUt=Sk(_b),DUt=Sk("for"),CUt=Sk(Dp),NUt=Sk(sk),LUt=Sk(Du),RUt=Sk(ku),MUt=Sk(tl),UUt=Sk(Ri),jUt=Sk(gs),BUt=Sk(Ho),XUt=Sk(Ns),JUt=Sk(fe),GUt=Sk(Uc),qUt=Sk(Xs),YUt=Sk(Hr),VUt=Sk(Ws),WUt=Sk(ar),HUt=Sk(Rr),zUt=Sk(Pf),KUt=Sk(Ps),QUt=Sk(B),$Ut=Sk(Xc),ZUt=Sk(ye),tjt=Sk(kr),rjt=Sk("opaque"),ejt=Sk("of"),njt=Sk(os),ajt=Sk(fs),ujt=Sk("any"),ijt=Sk(Hb),cjt=Sk(Wn),fjt=Sk(Sv),sjt=Sk(Yi),ojt=Sk(Ho),vjt=Sk(De),ljt=Sk(io),bjt=Sk(so),pjt=[0,Sk(Qr),559,6],kjt=[0,Sk(Qr),560,6],wjt=[0,Sk(Qr),628,8],djt=Sk(Yu),hjt=[0,Sk(Qr),634,8],mjt=Sk("Can not have both `static` and `proto`"),yjt=Sk(Du),_jt=Sk(Yu),Fjt=Sk(dn),Ejt=Sk(za),Sjt=Sk(dn),gjt=[0,0,0],xjt=Sk(U),Tjt=Sk(jc),Ajt=[0,[0,0,0]],Ojt=[0,4],Ijt=[0,0],Pjt=[0,1],Djt=[0,2],Cjt=[0,5],Njt=[0,6],Ljt=[0,3],Rjt=[0,7],Mjt=[0,Sk(Qr),93,17],Ujt=[0,Sk(Qr),73,17],jjt=[0,41],Bjt=[0,41],Xjt=[0,0,0],Jjt=[0,39],Gjt=Sk(vv),qjt=Sk(vv),Yjt=[0,Sk(Dn),1056,13],Vjt=[0,Sk(Dn),937,17],Wjt=[0,[0,Sk(so),Sk(so)],1],Hjt=Sk(sn),zjt=Sk(sn),Kjt=Sk(Fc),Qjt=Sk(ji),$jt=Sk(rt),Zjt=Sk(Es),tBt=Sk(iu),rBt=Sk(Vt),eBt=[0,41],nBt=[0,1],aBt=[0,1],uBt=[0,1],iBt=[0,1],cBt=[0,0],fBt=Sk("_"),sBt=Sk("_"),oBt=Sk(tl),vBt=Sk(W),lBt=[0,0],bBt=[0,80],pBt=[0,0,0],kBt=[0,1,0],wBt=[0,1,1],dBt=Sk(Xs),hBt=[0,0],mBt=Sk(Xs),yBt=[0,0],_Bt=[0,1],FBt=[0,0],EBt=[0,1],SBt=[0,0],gBt=[0,1],xBt=[0,0],TBt=[0,2],ABt=[0,3],OBt=[0,7],IBt=[0,6],PBt=[0,4],DBt=[0,5],CBt=[0,[0,17,[0,2]]],NBt=[0,[0,18,[0,3]]],LBt=[0,[0,19,[0,4]]],RBt=[0,[0,0,[0,5]]],MBt=[0,[0,1,[0,5]]],UBt=[0,[0,2,[0,5]]],jBt=[0,[0,3,[0,5]]],BBt=[0,[0,5,[0,6]]],XBt=[0,[0,7,[0,6]]],JBt=[0,[0,4,[0,6]]],GBt=[0,[0,6,[0,6]]],qBt=[0,[0,8,[0,7]]],YBt=[0,[0,9,[0,7]]],VBt=[0,[0,10,[0,7]]],WBt=[0,[0,11,[0,8]]],HBt=[0,[0,12,[0,8]]],zBt=[0,[0,15,[0,9]]],KBt=[0,[0,13,[0,9]]],QBt=[0,[0,14,[1,10]]],$Bt=[0,[0,16,[0,9]]],ZBt=[0,[0,21,[0,6]]],tXt=[0,[0,20,[0,6]]],rXt=[0,9],eXt=[0,8],nXt=[0,7],aXt=[0,11],uXt=[0,10],iXt=[0,12],cXt=[0,6],fXt=[0,5],sXt=[0,3],oXt=[0,4],vXt=[0,2],lXt=[0,1],bXt=[0,0],pXt=Sk(tl),kXt=Sk(W),wXt=[0,5],dXt=Sk(os),hXt=Sk(tl),mXt=Sk(W),yXt=Sk(":"),_Xt=Sk(se),FXt=[6,Sk("JSX fragment")],EXt=Sk(so),SXt=[0,Sk(so)],gXt=Sk(so),xXt=Sk(U),TXt=Sk(U),AXt=Sk(dn),OXt=Sk(za),IXt=[0,1],PXt=[0,1],DXt=[0,1],CXt=Sk(U),NXt=Sk(jc),LXt=Sk(jc),RXt=Sk("#constructor"),MXt=[1,Sk("=")],UXt=Sk(B),jXt=Sk(fs),BXt=Sk("Internal Error: private name found in object props"),XXt=Sk(dn),JXt=Sk(za),GXt=Sk(Tp),qXt=Sk(B),YXt=Sk(fs),VXt=Sk(B),WXt=Sk(fs),HXt=Sk(Tp),zXt=[0,1],KXt=Sk(yc),QXt=Sk(Ja),$Xt=[0,Sk(Ut),1192,15],ZXt=Sk(yc),tJt=Sk(co),rJt=Sk("other than an interface declaration!"),eJt=Sk("Internal Flow Error! Parsed `export interface` into something "),nJt=Sk(Ja),aJt=Sk("Internal Flow Error! Unexpected export statement declaration!"),uJt=[0,38],iJt=Sk(yc),cJt=Sk(Ja),fJt=[0,Sk(so),Sk(so)],sJt=Sk("module"),oJt=Sk("exports"),vJt=[0,1],lJt=Sk("module"),bJt=[0,1],pJt=Sk(Ie),kJt=[0,0],wJt=[0,1],dJt=Sk(Ja),hJt=Sk(yc),mJt=[0,78],yJt=[0,78],_Jt=[0,0],FJt=[0,1],EJt=Sk(yc),SJt=Sk(yc),gJt=Sk(yc),xJt=Sk(Ja),TJt=[0,Sk(so),Sk(so)],AJt=Sk("Parser error: No such thing as an expression pattern!"),OJt=Sk("Label"),IJt=[0,0,0],PJt=[0,28],DJt=[0,Sk(Ut),212,20],CJt=[0,27],NJt=[0,Sk(Ut),234,20],LJt=Sk(fs),RJt=Sk(Qo),MJt=Sk(B),UJt=Sk("use strict"),jJt=[0,0,0],BJt=Sk("\n"),XJt=Sk("Nooo: "),JJt=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],GJt=[0,Sk("src/parser/parser_flow.ml"),36,28],qJt=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],YJt=Sk(qe),VJt=Sk("range"),WJt=Sk(Je),HJt=Sk(Tu),zJt=Sk("end"),KJt=Sk(Je),QJt=Sk(Tu),$Jt=Sk(V),ZJt=Sk("loc"),tGt=Sk("normal"),rGt=Sk(kr),eGt=Sk("jsxTag"),nGt=Sk("jsxChild"),aGt=Sk("template"),uGt=Sk("regexp"),iGt=Sk("context"),cGt=Sk(kr),fGt=Sk("Internal error: ");function sGt(t){if("number"==typeof t)return 0;switch(t[0]){case 0:return[0,sGt(t[1])];case 1:return[1,sGt(t[1])];case 2:return[2,sGt(t[1])];case 3:return[3,sGt(t[1])];case 4:return[4,sGt(t[1])];case 5:return[5,sGt(t[1])];case 6:return[6,sGt(t[1])];case 7:return[7,sGt(t[1])];case 8:return[8,t[1],sGt(t[2])];case 9:var r=t[1];return[9,r,r,sGt(t[3])];case 10:return[10,sGt(t[1])];case 11:return[11,sGt(t[1])];case 12:return[12,sGt(t[1])];case 13:return[13,sGt(t[1])];default:return[14,sGt(t[1])]}}function oGt(t,r){if("number"==typeof t)return r;switch(t[0]){case 0:return[0,oGt(t[1],r)];case 1:return[1,oGt(t[1],r)];case 2:return[2,t[1],oGt(t[2],r)];case 3:return[3,t[1],oGt(t[2],r)];case 4:var e=t[3],n=t[2];return[4,t[1],n,e,oGt(t[4],r)];case 5:var a=t[3],u=t[2];return[5,t[1],u,a,oGt(t[4],r)];case 6:var i=t[3],c=t[2];return[6,t[1],c,i,oGt(t[4],r)];case 7:var f=t[3],s=t[2];return[7,t[1],s,f,oGt(t[4],r)];case 8:var o=t[3],v=t[2];return[8,t[1],v,o,oGt(t[4],r)];case 9:return[9,oGt(t[1],r)];case 10:return[10,oGt(t[1],r)];case 11:return[11,t[1],oGt(t[2],r)];case 12:return[12,t[1],oGt(t[2],r)];case 13:var l=t[2];return[13,t[1],l,oGt(t[3],r)];case 14:var b=t[2];return[14,t[1],b,oGt(t[3],r)];case 15:return[15,oGt(t[1],r)];case 16:return[16,oGt(t[1],r)];case 17:return[17,t[1],oGt(t[2],r)];case 18:return[18,t[1],oGt(t[2],r)];case 19:return[19,oGt(t[1],r)];case 20:var p=t[2];return[20,t[1],p,oGt(t[3],r)];case 21:return[21,t[1],oGt(t[2],r)];case 22:return[22,oGt(t[1],r)];case 23:return[23,t[1],oGt(t[2],r)];default:var k=t[2];return[24,t[1],k,oGt(t[3],r)]}}function vGt(t){throw[0,sd,t]}function lGt(t){throw[0,od,t]}function bGt(t,r){return zk(t,r)?t:r}function pGt(t){return 0<=t?t:0|-t}Hk();var kGt=lu;function wGt(t,r){var e=cw(t),n=cw(r),a=Uk(e+n|0);return hk(t,0,a,0,e),hk(r,0,a,e,n),a}function dGt(t,r){return t?[0,t[1],dGt(t[2],r)]:r}!function(t){var r=lk.fds[t];r.flags.wronly&&xw(G+t+" is writeonly");var e={file:r.file,offset:r.offset,fd:t,opened:!0,out:!1,refill:null};Tw[e.fd]=e}(0);var hGt=Bw(1),mGt=Bw(2),yGt=[0,function(t){return function(t){for(var r=t;;){if(!r)return 0;var e=r[2],n=r[1];try{Aw(n)}catch(r){}r=e}}(function(){for(var t=0,r=0;r0)if(0==r&&(e>=t.l||2==t.t&&e>=t.c.length))0==n?(t.c=so,t.t=2):(t.c=mk(e,String.fromCharCode(n)),t.t=e==t.l?0:2);else for(4!=t.t&&wk(t),e+=r;r=1;u--)e[n+u]=t[r+u];return 0}(t,r,e,n,a):lGt(Gd)}function WGt(t,r){var e=r.length-1-1|0;if(!(e<0))for(var n=0;;){if(nd(t,r[n+1]),e===n)break;n=n+1|0}return 0}function HGt(t){if(t)for(var r=0,e=t,n=t[2],a=t[1];;)if(e)r=r+1|0,e=e[2];else for(var u=Fw(r,a),i=1,c=n;;){if(!c)return u;var f=c[2];u[i+1]=c[1];i=i+1|0,c=f}return[0]}function zGt(t){function r(t){return t?t[4]:0}function e(t,r,e){var n=t?t[4]:0,a=e?e[4]:0;return[0,t,r,e,a<=n?n+1|0:a+1|0]}function n(t,n,a){var u=t?t[4]:0,i=a?a[4]:0;if((i+2|0)>1,y=OGt(m,r),_=k(m,r),F=k(t-m|0,y),E=0;;){if(_){if(F){var S=F[2],g=F[1],x=_[2],T=_[1],A=ad(b,T,g);if(0===A){_=x,F=S,E=[0,T,E];continue}if(0>1,y=OGt(m,r),_=p(m,r),F=p(t-m|0,y),E=0;;){if(_){if(F){var S=F[2],g=F[1],x=_[2],T=_[1],A=ad(b,T,g);if(0===A){_=x,F=S,E=[0,T,E];continue}if(0<=A){F=S,E=[0,g,E];continue}_=x,E=[0,T,E];continue}return EGt(_,E)}return EGt(F,E)}},w=_Gt(r),d=2<=w?p(w,r):r;return function t(r,n){if(!(3>>0))switch(r){case 0:return[0,0,n];case 1:if(n)return[0,[0,0,n[1],0,1],n[2]];break;case 2:if(n){var a=n[2];if(a)return[0,[0,[0,0,n[1],0,1],a[1],0,2],a[2]]}break;default:if(n){var u=n[2];if(u){var i=u[2];if(i)return[0,[0,[0,0,n[1],0,1],u[1],[0,0,i[1],0,1],2],i[2]]}}}var c=r/2|0,f=t(c,n),s=f[2],o=f[1];if(s){var v=s[1],l=t((r-c|0)-1|0,s[2]),b=l[2];return[0,e(o,v,l[1]),b]}throw[0,pd,zd]}(_Gt(d),d)[1]}return a(v[1],a(l,a(o,a(f,u(i)))))}return a(l,a(o,a(f,u(i))))}return a(o,a(f,u(i)))}return a(f,u(i))}return u(i)}return 0}]}Hk(),Hk(),Hk(),Hk();var KGt=[sf,th,Hk()];function QGt(t){throw KGt}function $Gt(t){var r=t[1];t[1]=QGt;try{var e=nd(r,0);return t[1]=e,function(t,r){t[0]=r}(t,js),e}catch(r){throw r=ed(r),t[1]=function(t){throw r},r}}function ZGt(t){var r=1<=t?t:1,e=qGt>>0?1:0:65<=a?0:1;else{if(32===a)var i=1;else if(43<=a)switch(a+R|0){case 5:if(n<(e+2|0)&&1>>0)if(93<=a)var u=0;else u=1;else if(56<(a-1|0)>>>0)u=0;else u=1;if(u){r=r+1|0;continue}}else;e=1}if(e){var i=[0,0],c=gw(t)-1|0;if(!(c<0))for(var f=0;;){var s=Ik(t,f);if(32<=s){var o=s+Fl|0;if(58>>0)if(93<=o)var v=0,l=0;else l=1;else if(56<(o-1|0)>>>0)v=1,l=0;else l=1;if(l){var b=1;v=2}}else v=11<=s?13===s?1:0:8<=s?1:0;switch(v){case 0:b=4;break;case 1:b=2}if(i[1]=i[1]+b|0,c===f)break;f=f+1|0}if(i[1]===gw(t)){var p=gw(t),k=Uk(p);dk(t,0,k,0,p);var w=k}else{var d=Uk(i[1]);i[1]=0;var h=gw(t)-1|0;if(!(h<0))for(var m=0;;){var y=Ik(t,m);if(35<=y)var _=92===y?1:qo<=y?0:2;else if(32<=y)_=34<=y?1:2;else if(14<=y)_=0;else switch(y){case 8:Ak(d,i[1],92),i[1]++,Ak(d,i[1],98);_=3;break;case 9:Ak(d,i[1],92),i[1]++,Ak(d,i[1],Hp);_=3;break;case 10:Ak(d,i[1],92),i[1]++,Ak(d,i[1],Xf);_=3;break;case 13:Ak(d,i[1],92),i[1]++,Ak(d,i[1],en);_=3;break;default:_=0}switch(_){case 0:Ak(d,i[1],92),i[1]++,Ak(d,i[1],48+(y/bo|0)|0),i[1]++,Ak(d,i[1],48+((y/10|0)%10|0)|0),i[1]++,Ak(d,i[1],48+(y%10|0)|0);break;case 1:Ak(d,i[1],92),i[1]++,Ak(d,i[1],y);break;case 2:Ak(d,i[1],y)}if(i[1]++,h===m)break;m=m+1|0}w=d}}else w=t;var F=cw(w),E=DGt(F+2|0,34);return hk(w,0,E,1,F),E}}function Eqt(t,r){switch(t){case 0:var e=Ym;break;case 1:e=Vm;break;case 2:e=Wm;break;case 3:e=Hm;break;case 4:e=zm;break;case 5:e=Km;break;case 6:e=Qm;break;case 7:e=$m;break;case 8:e=Zm;break;case 9:e=ty;break;case 10:e=ry;break;case 11:e=ey;break;default:e=ny}return Vk(e,r)}function Sqt(t,r){switch(t){case 0:var e=mm;break;case 1:e=ym;break;case 2:e=_m;break;case 3:e=Fm;break;case 4:e=Em;break;case 5:e=Sm;break;case 6:e=gm;break;case 7:e=xm;break;case 8:e=Tm;break;case 9:e=Am;break;case 10:e=Om;break;case 11:e=Im;break;default:e=Pm}return Vk(e,r)}function gqt(t,r){switch(t){case 0:var e=im;break;case 1:e=cm;break;case 2:e=fm;break;case 3:e=sm;break;case 4:e=om;break;case 5:e=vm;break;case 6:e=lm;break;case 7:e=bm;break;case 8:e=pm;break;case 9:e=km;break;case 10:e=wm;break;case 11:e=dm;break;default:e=hm}return Vk(e,r)}function xqt(t,r){switch(t){case 0:var e=Dm;break;case 1:e=Cm;break;case 2:e=Nm;break;case 3:e=Lm;break;case 4:e=Rm;break;case 5:e=Mm;break;case 6:e=Um;break;case 7:e=jm;break;case 8:e=Bm;break;case 9:e=Xm;break;case 10:e=Jm;break;case 11:e=Gm;break;default:e=qm}return function(t,r){var e=Gk(t);e.signedconv&&function(t){return t[3]<<16<0}(r)&&(e.sign=-1,r=iw(r));var n=so,a=$k(e.base);do{var u=aw(r,a);r=u[1],n="0123456789abcdef".charAt(uw(u[2]))+n}while(!Qk(r));if(e.prec>=0){e.filler=jp;var i=e.prec-n.length;i>0&&(n=mk(i,af)+n)}return qk(e,n)}(e,r)}function Tqt(t,r,e){if(16<=t){if(17<=t)switch(t+mo|0){case 2:var n=0;break;case 0:case 3:var a=43;n=1;break;default:a=32,n=1}else n=0;if(!n)a=45;var u=function(t,r,e){if(!isFinite(t))return isNaN(t)?Kk(tv):Kk(t>0?Cr:"-infinity");var n=0==t&&1/t==-1/0?1:t>=0?0:1;n&&(t=-t);var a=0;if(0==t);else if(t<1)for(;t<1&&a>-1022;)t*=2,a--;else for(;t>=2;)t/=2,a++;var u=a<0?so:Ao,i=so;if(n)i=cs;else switch(e){case 43:i=Ao;break;case 32:i=jp}if(r>=0&&r<13){var c=Math.pow(2,4*r);t=Math.round(t*c)/c}var f=t.toString(16);if(r>=0){var s=f.indexOf(se);if(s<0)f+=se+mk(r,af);else{var o=s+1+r;f.length=2.2250738585072014e-308?0:0!=t?1:2:isNaN(t)?4:3}(e),m=cw(d);if(3===h)return e<0?nm:am;if(4<=h)return rm;for(var y=0;;){if(y===m)var _=0;else{var F=zw(d,y)+li|0;if(!(23>>0?55===F?1:0:21<(F-1|0)>>>0?1:0)){y=y+1|0;continue}_=1}return _?d:wGt(d,em)}}return d}function Aqt(t,r,e,n,a,u,i,c){if("number"==typeof a){if("number"==typeof u)return 0===u?function(a){return Nqt(t,r,[4,e,ad(i,c,a)],n)}:function(a,u){return Nqt(t,r,[4,e,_qt(a,ad(i,c,u))],n)};var f=u[1];return function(a){return Nqt(t,r,[4,e,_qt(f,ad(i,c,a))],n)}}if(0===a[0]){var s=a[2],o=a[1];if("number"==typeof u)return 0===u?function(a){return Nqt(t,r,[4,e,yqt(o,s,ad(i,c,a))],n)}:function(a,u){return Nqt(t,r,[4,e,yqt(o,s,_qt(a,ad(i,c,u)))],n)};var v=u[1];return function(a){return Nqt(t,r,[4,e,yqt(o,s,_qt(v,ad(i,c,a)))],n)}}var l=a[1];if("number"==typeof u)return 0===u?function(a,u){return Nqt(t,r,[4,e,yqt(l,a,ad(i,c,u))],n)}:function(a,u,f){return Nqt(t,r,[4,e,yqt(l,a,_qt(u,ad(i,c,f)))],n)};var b=u[1];return function(a,u){return Nqt(t,r,[4,e,yqt(l,a,_qt(b,ad(i,c,u)))],n)}}function Oqt(t,r,e,n,a,u){if("number"==typeof a)return function(a){return Nqt(t,r,[4,e,nd(u,a)],n)};if(0===a[0]){var i=a[2],c=a[1];return function(a){return Nqt(t,r,[4,e,yqt(c,i,nd(u,a))],n)}}var f=a[1];return function(a,i){return Nqt(t,r,[4,e,yqt(f,a,nd(u,i))],n)}}function Iqt(t,r,e,n,a){for(var u=r,i=n,c=a;;){if("number"==typeof c)return ad(u,e,i);switch(c[0]){case 0:var f=c[1];return function(t){return Nqt(u,e,[5,i,t],f)};case 1:var s=c[1];return function(t){var r=PGt(t),n=cw(r),a=DGt(n+2|0,39);return hk(r,0,a,1,n),Nqt(u,e,[4,i,a],s)};case 2:var o=c[2],v=c[1];return Oqt(u,e,i,o,v,function(t){return t});case 3:return Oqt(u,e,i,c[2],c[1],Fqt);case 4:return Aqt(u,e,i,c[4],c[2],c[3],Eqt,c[1]);case 5:return Aqt(u,e,i,c[4],c[2],c[3],Sqt,c[1]);case 6:return Aqt(u,e,i,c[4],c[2],c[3],gqt,c[1]);case 7:return Aqt(u,e,i,c[4],c[2],c[3],xqt,c[1]);case 8:var l=c[4],b=c[3],p=c[2],k=c[1];if("number"==typeof p){if("number"==typeof b)return 0===b?function(t){return Nqt(u,e,[4,i,Tqt(k,aqt,t)],l)}:function(t,r){return Nqt(u,e,[4,i,Tqt(k,t,r)],l)};var w=b[1];return function(t){return Nqt(u,e,[4,i,Tqt(k,w,t)],l)}}if(0===p[0]){var d=p[2],h=p[1];if("number"==typeof b)return 0===b?function(t){return Nqt(u,e,[4,i,yqt(h,d,Tqt(k,aqt,t))],l)}:function(t,r){return Nqt(u,e,[4,i,yqt(h,d,Tqt(k,t,r))],l)};var m=b[1];return function(t){return Nqt(u,e,[4,i,yqt(h,d,Tqt(k,m,t))],l)}}var y=p[1];if("number"==typeof b)return 0===b?function(t,r){return Nqt(u,e,[4,i,yqt(y,t,Tqt(k,aqt,r))],l)}:function(t,r,n){return Nqt(u,e,[4,i,yqt(y,t,Tqt(k,r,n))],l)};var _=b[1];return function(t,r){return Nqt(u,e,[4,i,yqt(y,t,Tqt(k,_,r))],l)};case 9:var F=c[1];return function(t){return Nqt(u,e,[4,i,t?Td:Ad],F)};case 10:i=[7,i],c=c[1];continue;case 11:i=[2,i,c[1]],c=c[2];continue;case 12:i=[3,i,c[1]],c=c[2];continue;case 13:var E=c[3],S=c[2],g=uqt(16);oqt(g,S);var x=sqt(g);return function(t){return Nqt(u,e,[4,i,x],E)};case 14:var T=c[3],A=c[2];return function(t){var r=hqt(t[1],sGt(vqt(A)));if("number"==typeof r[2])return Nqt(u,e,i,oGt(r[1],T));throw pqt};case 15:var O=c[1];return function(t,r){return Nqt(u,e,[6,i,function(e){return ad(t,e,r)}],O)};case 16:var I=c[1];return function(t){return Nqt(u,e,[6,i,t],I)};case 17:i=[0,i,c[1]],c=c[2];continue;case 18:var P=c[1];if(0===P[0]){var D=c[2],C=P[1][1];u=function(t,r,e){return function(n,a){return Nqt(r,n,[1,t,[0,a]],e)}}(i,u,D),i=0,c=C;continue}var N=c[2],L=P[1][1];u=function(t,r,e){return function(n,a){return Nqt(r,n,[1,t,[1,a]],e)}}(i,u,N),i=0,c=L;continue;case 19:throw[0,pd,Uh];case 20:var R=c[3],M=[8,i,jh];return function(t){return Nqt(u,e,M,R)};case 21:var U=c[2];return function(t){return Nqt(u,e,[4,i,Vk(Mh,t)],U)};case 22:var j=c[1];return function(t){return Nqt(u,e,[5,i,t],j)};case 23:var B=c[2],X=c[1];if("number"==typeof X)switch(X){case 0:case 1:case 2:return t<50?Dqt(t+1|0,u,e,i,B):Zw(Dqt,[0,u,e,i,B]);case 3:throw[0,pd,Bh];default:return t<50?Dqt(t+1|0,u,e,i,B):Zw(Dqt,[0,u,e,i,B])}else switch(X[0]){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:return t<50?Dqt(t+1|0,u,e,i,B):Zw(Dqt,[0,u,e,i,B]);case 8:var J=X[2];return t<50?Pqt(t+1|0,u,e,i,J,B):Zw(Pqt,[0,u,e,i,J,B]);case 9:default:return t<50?Dqt(t+1|0,u,e,i,B):Zw(Dqt,[0,u,e,i,B])}default:var G=c[3],q=c[1],Y=nd(c[2],0);return t<50?Cqt(t+1|0,u,e,i,G,q,Y):Zw(Cqt,[0,u,e,i,G,q,Y])}}}function Pqt(t,r,e,n,a,u){if("number"==typeof a)return t<50?Dqt(t+1|0,r,e,n,u):Zw(Dqt,[0,r,e,n,u]);switch(a[0]){case 0:var i=a[1];return function(t){return Lqt(r,e,n,i,u)};case 1:var c=a[1];return function(t){return Lqt(r,e,n,c,u)};case 2:var f=a[1];return function(t){return Lqt(r,e,n,f,u)};case 3:var s=a[1];return function(t){return Lqt(r,e,n,s,u)};case 4:var o=a[1];return function(t){return Lqt(r,e,n,o,u)};case 5:var v=a[1];return function(t){return Lqt(r,e,n,v,u)};case 6:var l=a[1];return function(t){return Lqt(r,e,n,l,u)};case 7:var b=a[1];return function(t){return Lqt(r,e,n,b,u)};case 8:var p=a[2];return function(t){return Lqt(r,e,n,p,u)};case 9:var k=a[3],w=a[2],d=bqt(vqt(a[1]),w);return function(t){return Lqt(r,e,n,function t(r,e){if("number"==typeof r)return e;switch(r[0]){case 0:return[0,t(r[1],e)];case 1:return[1,t(r[1],e)];case 2:return[2,t(r[1],e)];case 3:return[3,t(r[1],e)];case 4:return[4,t(r[1],e)];case 5:return[5,t(r[1],e)];case 6:return[6,t(r[1],e)];case 7:return[7,t(r[1],e)];case 8:return[8,r[1],t(r[2],e)];case 9:var n=r[2];return[9,r[1],n,t(r[3],e)];case 10:return[10,t(r[1],e)];case 11:return[11,t(r[1],e)];case 12:return[12,t(r[1],e)];case 13:return[13,t(r[1],e)];default:return[14,t(r[1],e)]}}(d,k),u)};case 10:var h=a[1];return function(t,a){return Lqt(r,e,n,h,u)};case 11:var m=a[1];return function(t){return Lqt(r,e,n,m,u)};case 12:var y=a[1];return function(t){return Lqt(r,e,n,y,u)};case 13:throw[0,pd,Xh];default:throw[0,pd,Jh]}}function Dqt(t,r,e,n,a){var u=[8,n,Gh];return t<50?Iqt(t+1|0,r,e,u,a):Zw(Iqt,[0,r,e,u,a])}function Cqt(t,r,e,n,a,u,i){if(u){var c=u[1];return function(t){return function(t,r,e,n,a,u){return $w(Cqt(0,t,r,e,n,a,u))}(r,e,n,a,c,nd(i,t))}}var f=[4,n,i];return t<50?Iqt(t+1|0,r,e,f,a):Zw(Iqt,[0,r,e,f,a])}function Nqt(t,r,e,n){return $w(Iqt(0,t,r,e,n))}function Lqt(t,r,e,n,a){return $w(Pqt(0,t,r,e,n,a))}function Rqt(t,r){for(var e=r;;){if("number"==typeof e)return 0;switch(e[0]){case 0:var n=e[2],a=e[1];if("number"==typeof n)switch(n){case 0:var u=ay;break;case 1:u=uy;break;case 2:u=iy;break;case 3:u=cy;break;case 4:u=fy;break;case 5:u=sy;break;default:u=oy}else switch(n[0]){case 0:case 1:u=n[1];break;default:u=wGt(vy,MGt(1,n[1]))}return Rqt(t,a),nqt(t,u);case 1:var i=e[2],c=e[1];if(0===i[0]){var f=i[1];Rqt(t,c),nqt(t,qh);e=f;continue}var s=i[1];Rqt(t,c),nqt(t,Yh);e=s;continue;case 6:var o=e[2];return Rqt(t,e[1]),nqt(t,nd(o,0));case 7:e=e[1];continue;case 8:var v=e[2];return Rqt(t,e[1]),lGt(v);case 2:case 4:var l=e[2];return Rqt(t,e[1]),nqt(t,l);default:var b=e[2];return Rqt(t,e[1]),eqt(t,b)}}}function Mqt(t){if(Hw(t,Wh))return Hh;var r=cw(t);function e(r){var e=Vh[1],n=ZGt(Ne);return nd(Nqt(function(t,r){return Rqt(n,r),vGt(tqt(n))},0,0,e),t)}function n(e){for(var n=e;;){if(n===r)return n;var a=zw(t,n);if(9!==a&&32!==a)return n;n=n+1|0}}var a=n(0),u=function(e,n){for(var a=n;;){if(a===r)return a;if(25<(zw(t,a)+Nf|0)>>>0)return a;a=a+1|0}}(0,a),i=UGt(t,a,u-a|0),c=n(u),f=function(e,n){for(var a=n;;){if(a===r)return a;var u=zw(t,a);if(!(48<=u?!(58<=u):45===u))return a;a=a+1|0}}(0,c);if(c===f)var s=0;else try{s=dw(UGt(t,c,f-c|0))}catch(t){if((t=ed(t))[1]!==sd)throw t;s=e()}if(n(f)!==r&&e(),Kw(i,zh))if(Kw(i,Kh))if(Kw(i,Qh))if(Kw(i,$h))if(Kw(i,Zh))if(Kw(i,tm))var o=e(),v=1;else o=1,v=1;else o=2,v=1;else o=3,v=1;else o=0,v=1;else v=0;else v=0;if(!v)o=4;return[0,s,o]}function Uqt(t){return Nqt(function(t,r){var e=ZGt(64);return Rqt(e,r),tqt(e)},0,0,t[1])}var jqt=[0,0];function Bqt(t,r){var e=t[r+1];if(1-("number"==typeof e)){if(Yw(e)===Rp)return nd(Uqt(gy),e);if(Yw(e)===ns)for(var n=Yk(gd,e),a=0,u=cw(n);;){if(u<=a)return wGt(n,xd);var i=zw(n,a);if(!(48<=i?58<=i?0:1:45===i?1:0))return n;a=a+1|0}return xy}return nd(Uqt(Sy),e)}function Xqt(t){var r=t.length-1;if(2>>0){var e=function t(r,e){if(r.length-1<=e)return by;var n=t(r,e+1|0),a=Bqt(r,e);return ad(Uqt(py),a,n)}(t,2),n=Bqt(t,1);return ad(Uqt(yy),n,e)}switch(r){case 0:return _y;case 1:return Fy;default:var a=Bqt(t,1);return nd(Uqt(Ey),a)}}function Jqt(t){return jqt[1]=[0,t,jqt[1]],0}try{var Gqt=Qw(Ay)}catch(Sk){if((Sk=ed(Sk))!==vd)throw Sk;try{var qqt=Qw(Oy)}catch(Sk){if((Sk=ed(Sk))!==vd)throw Sk;qqt=Iy}Gqt=qqt}var Yqt=function(t,r){return BGt(t,0,r)}(Gqt,82),Vqt=[Au,function(t){for(var r=[0,new Date^4294967295*Math.random()],e=[0,Fw(55,0),0],n=0==r.length-1?[0,0]:r,a=n.length-1,u=0;;){Dk(e[1],u)[u+1]=u;var i=u+1|0;if(54===u){var c=[0,Ty],f=54+bGt(55,a)|0;if(!(f<0))for(var s=0;;){var o=s%55|0,v=Gw(s,a),l=Dk(n,v)[v+1],b=wGt(c[1],Sk(so+l));c[1]=Sw(b,0,cw(b));var p=c[1],k=zw(p,3)<<24,w=zw(p,2)<<16,d=zw(p,1)<<8,h=((zw(p,0)+d|0)+w|0)+k|0,m=(Dk(e[1],o)[o+1]^h)&Ol;if(Dk(e[1],o)[o+1]=m,f===s)break;s=s+1|0}return e[2]=0,e}u=i}}];function Wqt(t,r){var e=[0,t,0],n=r[1];return n?(r[1]=e,n[2]=e,0):(r[1]=e,r[2]=e,0)}var Hqt=[sf,Uy,Hk()];function zqt(t){var r=t[2];if(r){var e=r[2],n=r[1];return t[2]=e,0===e&&(t[1]=0),n}throw Hqt}function Kqt(t,r){return t[13]=t[13]+r[3]|0,Wqt(r,t[27])}var Qqt=1000000010;function $qt(t,r){return ud(t[17],r,0,cw(r))}function Zqt(t){return nd(t[19],0)}function tYt(t,r){return nd(t[20],r)}function rYt(t,r,e){Zqt(t),t[11]=1;var n=(t[6]-e|0)+r|0,a=t[8],u=function(t,r){return+(Rk(t,r,!1)<=0)}(a,n)?a:n;return t[10]=u,t[9]=t[6]-t[10]|0,tYt(t,t[10])}function eYt(t,r){return rYt(t,0,r)}function nYt(t,r){return t[9]=t[9]-r|0,tYt(t,r)}function aYt(t,r,e){if("number"==typeof e)switch(e){case 0:var n=t[3];if(n){var a=n[1][1];return a[1]=function t(r,e){if(e){var n=e[1],a=e[2];return function(t,r){return+(Rk(t,r,!1)<0)}(r,n)?[0,r,e]:[0,n,t(r,a)]}return[0,r,0]}(t[6]-t[9]|0,a[1]),0}return 0;case 1:var u=t[2];return u?(t[2]=u[2],0):0;case 2:var i=t[3];return i?(t[3]=i[2],0):0;case 3:var c=t[2];return c?eYt(t,c[1][2]):Zqt(t);case 4:var f=t[10]!==(t[6]-t[9]|0)?1:0;return f?function(t){var r=zqt(t[27]),e=r[1];return t[12]=t[12]-r[3]|0,t[9]=t[9]+e|0,0}(t):f;default:var s=t[5];if(s){var o=s[2];return $qt(t,nd(t[24],s[1])),t[5]=o,0}return 0}else switch(e[0]){case 0:var v=e[1];return t[9]=t[9]-r|0,$qt(t,v),t[11]=0,0;case 1:var l=e[2],b=e[1],p=t[2];if(p){var k=p[1],w=k[2];switch(k[1]){case 0:return nYt(t,b);case 1:case 2:return rYt(t,l,w);case 3:return t[9]>>25|0))|0)&Ol,o=u[2];Dk(u[1],o)[o+1]=s;var v=s}else v=0;return[0,0,Fw(n,0),v,n]}n=2*n|0}}(0,7),Hk();var BYt=[sf,vF,Hk()],XYt=-1,JYt=F,GYt=0,qYt=0,YYt=0,VYt=0,WYt=0;function HYt(t,r,e){throw[0,pd,oF]}function zYt(t){var r=t.length-1;return[0,HYt,YGt(r,function(r){return Dk(t,r)[r+1]}),r,WYt,VYt,YYt,qYt,GYt,1]}function KYt(t){if(t[5]===t[3])if(t[9])var r=XYt;else{if(t[2].length-1<(t[3]+F|0)){var e=t[6],n=t[3]-e|0;if((n+F|0)<=t[2].length-1)VGt(t[2],e,t[2],0,n);else{var a=Fw(2*(t[2].length-1+F|0)|0,0);VGt(t[2],e,a,0,n),t[2]=a}t[3]=n,t[4]=t[4]+e|0,t[5]=t[5]-e|0,t[7]=t[7]-e|0,t[6]=0}var u=ud(t[1],t[2],t[5],JYt);if(0===u){var i=t[3];Dk(t[2],i)[i+1]=XYt,t[3]=t[3]+1|0}else t[3]=t[3]+u|0;var c=t[5];r=Dk(t[2],c)[c+1]}else{var f=t[5];r=Dk(t[2],f)[f+1]}return-1===r?t[9]=1:t[5]=t[5]+1|0,r}function QYt(t){return t[6]=t[5],t[7]=t[5],t[8]=-1,0}function $Yt(t,r){return t[7]=t[5],t[8]=r,0}function ZYt(t){return t[5]=t[7],t[8]}function tVt(t){return t[5]=t[6],0}function rVt(t){return t[6]+t[4]|0}function eVt(t){return t[5]+t[4]|0}function nVt(t){return t[5]-t[6]|0}function aVt(t){var r=t[5]-t[6]|0,e=t[6],n=t[2];return 0<=e&&0<=r&&!((n.length-1-r|0)>>6|0)?1:0;if(b)var p=b;else p=(2!=(v>>>6|0)?1:0)||(2!=(l>>>6|0)?1:0);if(p)throw BYt;var k=(7&f)<<18|(63&o)<<12|(63&v)<<6|63&l;s=1}else if(Is<=f){var w=zw(t,u+1|0),d=zw(t,u+2|0);if((2!=(w>>>6|0)?1:0)||(2!=(d>>>6|0)?1:0))throw BYt;var h=(15&f)<<12|(63&w)<<6|63&d,m=Wr<=h?1:0;if(m?h<=57088?1:0:m)throw BYt;k=h,s=1}else{var y=zw(t,u+1|0);if(2!=(y>>>6|0))throw BYt;k=(31&f)<<6|63&y,s=1}else if(D<=f)s=0;else k=f,s=1;if(s){Dk(a,i)[i+1]=k;var _=zw(t,u);u=u+Dk(uVt,_)[_+1]|0,i=i+1|0,c=c-1|0;continue}throw BYt}return zYt(a)}throw BYt}var F=zw(t,n),E=Dk(uVt,F)[F+1];if(!(0>>18|0)),eqt(u,IGt(D|63&(f>>>12|0))),eqt(u,IGt(D|63&(f>>>6|0))),eqt(u,IGt(D|63&f))}else{var s=Wr<=f?1:0;if(s?f>>12|0)),eqt(u,IGt(D|63&(f>>>6|0))),eqt(u,IGt(D|63&f))}else eqt(u,IGt(Zi|f>>>6|0)),eqt(u,IGt(D|63&f));else eqt(u,IGt(f));i=i+1|0,c=c-1|0}},wVt=function(t){return kVt(t,0,t[5]-t[6]|0)},dVt=function(t,r){function e(r){return eqt(t,r)}return wu<=r?(e(cb|r>>>18|0),e(D|63&(r>>>12|0)),e(D|63&(r>>>6|0)),e(D|63&r)):Qa<=r?(e(Is|r>>>12|0),e(D|63&(r>>>6|0)),e(D|63&r)):D<=r?(e(Zi|r>>>6|0),e(D|63&r)):e(r)},hVt=t,mVt=null,yVt=function(t){return void 0!==t?1:0},_Vt=hVt.Array,FVt=[sf,lF,Hk()],EVt=hVt.Error;RYt(bF,[0,FVt,{}]);var SVt=function(t){throw t};Jqt(function(t){return t[1]===FVt?[0,Kk(t[2].toString())]:0}),Jqt(function(t){return t instanceof _Vt?0:[0,Kk(t.toString())]});var gVt=ad(UYt,iat,uat),xVt=ad(UYt,fat,cat),TVt=ad(UYt,oat,sat),AVt=ad(UYt,lat,vat),OVt=ad(UYt,pat,bat),IVt=ad(UYt,wat,kat),PVt=ad(UYt,hat,dat),DVt=ad(UYt,yat,mat),CVt=ad(UYt,Fat,_at),NVt=ad(UYt,Sat,Eat),LVt=ad(UYt,xat,gat),RVt=ad(UYt,Aat,Tat),MVt=ad(UYt,Iat,Oat),UVt=ad(UYt,Dat,Pat),jVt=function(t,r,e){nd(NYt(r),tat),ad(t,r,e[1]),nd(NYt(r),rat);var n=e[2];return ad(NYt(r),eat,n),nd(NYt(r),nat)};ud(MYt,Cat,gVt,[0,jVt,function(t,r){return ad(LYt(aat),function(r,e){return jVt(t,r,e)},r)}]);var BVt=function t(r,e,n){return t.fun(r,e,n)},XVt=function t(r,e){return t.fun(r,e)};bk(BVt,function(t,r,e){nd(NYt(r),Qnt),ad(t,r,e[1]),nd(NYt(r),$nt);var n=e[2];return ud(gVt[1],function(r){return nd(t,r)},r,n),nd(NYt(r),Znt)}),bk(XVt,function(t,r){var e=nd(BVt,t);return ad(LYt(Knt),e,r)}),ud(MYt,Nat,xVt,[0,BVt,XVt]);var JVt=function(t,r){nd(NYt(t),Unt),ad(NYt(t),Bnt,jnt);var e=r[1];ad(NYt(t),Xnt,e),nd(NYt(t),Jnt),nd(NYt(t),Gnt),ad(NYt(t),Ynt,qnt);var n=r[2];return ad(NYt(t),Vnt,n),nd(NYt(t),Wnt),nd(NYt(t),Hnt)},GVt=[0,JVt,function(t){return ad(LYt(znt),JVt,t)}],qVt=function t(r,e){return t.fun(r,e)},YVt=function t(r){return t.fun(r)},VVt=function t(r,e){return t.fun(r,e)},WVt=function t(r){return t.fun(r)};bk(qVt,function(t,r){nd(NYt(t),Ant),ad(NYt(t),Int,Ont),ad(VVt,t,r[1]),nd(NYt(t),Pnt),nd(NYt(t),Dnt),ad(NYt(t),Nnt,Cnt);var e=r[2];return ad(NYt(t),Lnt,e),nd(NYt(t),Rnt),nd(NYt(t),Mnt)}),bk(YVt,function(t){return ad(LYt(Tnt),qVt,t)}),bk(VVt,function(t,r){if("number"==typeof r)return dYt(t,knt);switch(r[0]){case 0:nd(NYt(t),wnt);var e=r[1];return ad(NYt(t),dnt,e),nd(NYt(t),hnt);case 1:nd(NYt(t),mnt);var n=r[1];return ad(NYt(t),ynt,n),nd(NYt(t),_nt);case 2:nd(NYt(t),Fnt);var a=r[1];return ad(NYt(t),Ent,a),nd(NYt(t),Snt);default:return nd(NYt(t),gnt),ad(GVt[1],t,r[1]),nd(NYt(t),xnt)}}),bk(WVt,function(t){return ad(LYt(pnt),VVt,t)}),ud(MYt,Lat,TVt,[0,GVt,qVt,YVt,VVt,WVt]);var HVt=function(t,r){nd(NYt(t),ent),ad(NYt(t),ant,nnt);var e=r[1];ad(NYt(t),unt,e),nd(NYt(t),int),nd(NYt(t),cnt),ad(NYt(t),snt,fnt);var n=r[2];return ad(NYt(t),ont,n),nd(NYt(t),vnt),nd(NYt(t),lnt)};ud(MYt,Rat,AVt,[0,HVt,function(t){return ad(LYt(bnt),HVt,t)}]);var zVt=function(t,r){nd(NYt(t),qet),ad(NYt(t),Vet,Yet);var e=r[1];ad(NYt(t),Wet,e),nd(NYt(t),Het),nd(NYt(t),zet),ad(NYt(t),Qet,Ket);var n=r[2];return ad(NYt(t),$et,n),nd(NYt(t),Zet),nd(NYt(t),tnt)};ud(MYt,Mat,OVt,[0,zVt,function(t){return ad(LYt(rnt),zVt,t)}]);var KVt=function t(r,e,n){return t.fun(r,e,n)},QVt=function t(r,e){return t.fun(r,e)},$Vt=function t(r,e){return t.fun(r,e)},ZVt=function t(r){return t.fun(r)};bk(KVt,function(t,r,e){return nd(NYt(r),Xet),ad(t,r,e[1]),nd(NYt(r),Jet),ad($Vt,r,e[2]),nd(NYt(r),Get)}),bk(QVt,function(t,r){var e=nd(KVt,t);return ad(LYt(Bet),e,r)}),bk($Vt,function(t,r){return dYt(t,0===r?jet:Uet)}),bk(ZVt,function(t){return ad(LYt(Met),$Vt,t)}),ud(MYt,Uat,IVt,[0,KVt,QVt,$Vt,ZVt]);var tWt=function t(r,e,n,a){return t.fun(r,e,n,a)},rWt=function t(r,e,n){return t.fun(r,e,n)},eWt=function t(r,e,n,a){return t.fun(r,e,n,a)},nWt=function t(r,e,n){return t.fun(r,e,n)};bk(tWt,function(t,r,e,n){nd(NYt(e),Net),ad(t,e,n[1]),nd(NYt(e),Let);var a=n[2];return id(eWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Ret)}),bk(rWt,function(t,r,e){var n=ad(tWt,t,r);return ad(LYt(Cet),n,e)}),bk(eWt,function(t,r,e,n){nd(NYt(e),wet),ad(NYt(e),het,det);var a=n[1];if(a){dYt(e,met);var u=a[1];ud(gVt[1],function(t){return nd(r,t)},e,u),dYt(e,yet)}else dYt(e,_et);nd(NYt(e),Fet),nd(NYt(e),Eet),ad(NYt(e),get,Set);var i=n[2];id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),xet),nd(NYt(e),Tet),ad(NYt(e),Oet,Aet);var c=n[3];return ad(NYt(e),Iet,c),nd(NYt(e),Pet),nd(NYt(e),Det)}),bk(nWt,function(t,r,e){var n=ad(eWt,t,r);return ad(LYt(ket),n,e)});var aWt=[0,tWt,rWt,eWt,nWt],uWt=function t(r,e,n,a){return t.fun(r,e,n,a)},iWt=function t(r,e,n){return t.fun(r,e,n)},cWt=function t(r,e,n,a){return t.fun(r,e,n,a)},fWt=function t(r,e,n){return t.fun(r,e,n)};bk(uWt,function(t,r,e,n){nd(NYt(e),vet),ad(t,e,n[1]),nd(NYt(e),bet);var a=n[2];return id(cWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),pet)}),bk(iWt,function(t,r,e){var n=ad(uWt,t,r);return ad(LYt(oet),n,e)}),bk(cWt,function(t,r,e,n){nd(NYt(e),uet),ad(NYt(e),cet,iet);var a=n[1];return id(aWt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),fet),nd(NYt(e),set)}),bk(fWt,function(t,r,e){var n=ad(cWt,t,r);return ad(LYt(aet),n,e)});var sWt=[0,uWt,iWt,cWt,fWt],oWt=function t(r,e,n,a){return t.fun(r,e,n,a)},vWt=function t(r,e,n){return t.fun(r,e,n)},lWt=function t(r,e,n,a){return t.fun(r,e,n,a)},bWt=function t(r,e,n){return t.fun(r,e,n)};bk(oWt,function(t,r,e,n){nd(NYt(e),ret),ad(t,e,n[1]),nd(NYt(e),eet);var a=n[2];return id(lWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),net)}),bk(vWt,function(t,r,e){var n=ad(oWt,t,r);return ad(LYt(tet),n,e)}),bk(lWt,function(t,r,e,n){nd(NYt(e),Brt),ad(NYt(e),Jrt,Xrt);var a=n[1];nd(NYt(e),Grt);AGt(function(n,a){return n&&nd(NYt(e),jrt),id(aWt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),qrt),nd(NYt(e),Yrt),nd(NYt(e),Vrt),ad(NYt(e),Hrt,Wrt);var u=n[2];if(u){dYt(e,zrt);var i=u[1];id(sWt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,Krt)}else dYt(e,Qrt);return nd(NYt(e),$rt),nd(NYt(e),Zrt)}),bk(bWt,function(t,r,e){var n=ad(lWt,t,r);return ad(LYt(Urt),n,e)});var pWt=[0,oWt,vWt,lWt,bWt],kWt=function t(r,e,n,a){return t.fun(r,e,n,a)},wWt=function t(r,e,n){return t.fun(r,e,n)};bk(kWt,function(t,r,e,n){nd(NYt(e),Frt),ad(NYt(e),Srt,Ert);var a=n[1];if(a){dYt(e,grt);var u=a[1];id(PVt[13][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,xrt)}else dYt(e,Trt);nd(NYt(e),Art),nd(NYt(e),Ort),ad(NYt(e),Prt,Irt);var i=n[2];id(pWt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),Drt),nd(NYt(e),Crt),ad(NYt(e),Lrt,Nrt);var c=n[3];return id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),Rrt),nd(NYt(e),Mrt)}),bk(wWt,function(t,r,e){var n=ad(kWt,t,r);return ad(LYt(_rt),n,e)});var dWt=[0,aWt,sWt,pWt,kWt,wWt],hWt=function t(r,e,n,a){return t.fun(r,e,n,a)},mWt=function t(r,e,n){return t.fun(r,e,n)},yWt=function t(r,e,n,a){return t.fun(r,e,n,a)},_Wt=function t(r,e,n){return t.fun(r,e,n)},FWt=function t(r,e,n,a){return t.fun(r,e,n,a)},EWt=function t(r,e,n){return t.fun(r,e,n)};bk(hWt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),drt);var a=n[1];return ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),hrt)}nd(NYt(e),mrt);var u=n[1];return id(yWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),yrt)}),bk(mWt,function(t,r,e){var n=ad(hWt,t,r);return ad(LYt(wrt),n,e)}),bk(yWt,function(t,r,e,n){nd(NYt(e),brt),ad(t,e,n[1]),nd(NYt(e),prt);var a=n[2];return id(FWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),krt)}),bk(_Wt,function(t,r,e){var n=ad(yWt,t,r);return ad(LYt(lrt),n,e)}),bk(FWt,function(t,r,e,n){nd(NYt(e),nrt),ad(NYt(e),urt,art);var a=n[1];id(hWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),irt),nd(NYt(e),crt),ad(NYt(e),srt,frt);var u=n[2];return ud(gVt[1],function(t){return nd(r,t)},e,u),nd(NYt(e),ort),nd(NYt(e),vrt)}),bk(EWt,function(t,r,e){var n=ad(FWt,t,r);return ad(LYt(ert),n,e)});var SWt=[0,hWt,mWt,yWt,_Wt,FWt,EWt],gWt=function t(r,e,n,a){return t.fun(r,e,n,a)},xWt=function t(r,e,n){return t.fun(r,e,n)};bk(gWt,function(t,r,e,n){nd(NYt(e),qtt),ad(NYt(e),Vtt,Ytt);var a=n[1];id(SWt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Wtt),nd(NYt(e),Htt),ad(NYt(e),Ktt,ztt);var u=n[2];if(u){dYt(e,Qtt);var i=u[1];id(PVt[14][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,$tt)}else dYt(e,Ztt);return nd(NYt(e),trt),nd(NYt(e),rrt)}),bk(xWt,function(t,r,e){var n=ad(gWt,t,r);return ad(LYt(Gtt),n,e)});var TWt=[0,SWt,gWt,xWt],AWt=function t(r,e,n,a){return t.fun(r,e,n,a)},OWt=function t(r,e,n){return t.fun(r,e,n)},IWt=function t(r,e,n,a){return t.fun(r,e,n,a)},PWt=function t(r,e,n){return t.fun(r,e,n)},DWt=function t(r,e,n,a){return t.fun(r,e,n,a)},CWt=function t(r,e,n){return t.fun(r,e,n)};bk(AWt,function(t,r,e,n){nd(NYt(e),Btt),ad(t,e,n[1]),nd(NYt(e),Xtt);var a=n[2];return id(IWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Jtt)}),bk(OWt,function(t,r,e){var n=ad(AWt,t,r);return ad(LYt(jtt),n,e)}),bk(IWt,function(t,r,e,n){nd(NYt(e),ntt),ad(NYt(e),utt,att);var a=n[1];id(CVt[8][1][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),itt),nd(NYt(e),ctt),ad(NYt(e),stt,ftt);var u=n[2];id(DWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),ott),nd(NYt(e),vtt),ad(NYt(e),btt,ltt);var i=n[3];ad(NYt(e),ptt,i),nd(NYt(e),ktt),nd(NYt(e),wtt),ad(NYt(e),htt,dtt);var c=n[4];ad(NYt(e),mtt,c),nd(NYt(e),ytt),nd(NYt(e),_tt),ad(NYt(e),Ett,Ftt);var f=n[5];ad(NYt(e),Stt,f),nd(NYt(e),gtt),nd(NYt(e),xtt),ad(NYt(e),Att,Ttt);var s=n[6];ad(NYt(e),Ott,s),nd(NYt(e),Itt),nd(NYt(e),Ptt),ad(NYt(e),Ctt,Dtt);var o=n[7];if(o){dYt(e,Ntt);var v=o[1];ud(IVt[1],function(r){return nd(t,r)},e,v),dYt(e,Ltt)}else dYt(e,Rtt);return nd(NYt(e),Mtt),nd(NYt(e),Utt)}),bk(PWt,function(t,r,e){var n=ad(IWt,t,r);return ad(LYt(ett),n,e)}),bk(DWt,function(t,r,e,n){switch(n[0]){case 0:nd(NYt(e),q9);var a=n[1];return id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Y9);case 1:var u=n[1];nd(NYt(e),V9),nd(NYt(e),W9),ad(t,e,u[1]),nd(NYt(e),H9);var i=u[2];return id(dWt[4],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),z9),nd(NYt(e),K9);default:var c=n[1];nd(NYt(e),Q9),nd(NYt(e),$9),ad(t,e,c[1]),nd(NYt(e),Z9);var f=c[2];return id(dWt[4],function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),nd(NYt(e),ttt),nd(NYt(e),rtt)}}),bk(CWt,function(t,r,e){var n=ad(DWt,t,r);return ad(LYt(G9),n,e)});var NWt=[0,AWt,OWt,IWt,PWt,DWt,CWt],LWt=function t(r,e,n,a){return t.fun(r,e,n,a)},RWt=function t(r,e,n){return t.fun(r,e,n)},MWt=function t(r,e,n,a){return t.fun(r,e,n,a)},UWt=function t(r,e,n){return t.fun(r,e,n)};bk(LWt,function(t,r,e,n){nd(NYt(e),B9),ad(t,e,n[1]),nd(NYt(e),X9);var a=n[2];return id(MWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),J9)}),bk(RWt,function(t,r,e){var n=ad(LWt,t,r);return ad(LYt(j9),n,e)}),bk(MWt,function(t,r,e,n){nd(NYt(e),N9),ad(NYt(e),R9,L9);var a=n[1];return id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),M9),nd(NYt(e),U9)}),bk(UWt,function(t,r,e){var n=ad(MWt,t,r);return ad(LYt(C9),n,e)});var jWt=[0,LWt,RWt,MWt,UWt],BWt=function t(r,e,n,a){return t.fun(r,e,n,a)},XWt=function t(r,e,n){return t.fun(r,e,n)},JWt=function t(r,e,n,a){return t.fun(r,e,n,a)},GWt=function t(r,e,n){return t.fun(r,e,n)};bk(BWt,function(t,r,e,n){nd(NYt(e),u9),ad(NYt(e),c9,i9);var a=n[1];if(a){dYt(e,f9);var u=a[1];ud(gVt[1],function(r){return nd(t,r)},e,u),dYt(e,s9)}else dYt(e,o9);nd(NYt(e),v9),nd(NYt(e),l9),ad(NYt(e),p9,b9);var i=n[2];id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),k9),nd(NYt(e),w9),ad(NYt(e),h9,d9);var c=n[3];id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),m9),nd(NYt(e),y9),ad(NYt(e),F9,_9);var f=n[4];ad(NYt(e),E9,f),nd(NYt(e),S9),nd(NYt(e),g9),ad(NYt(e),T9,x9);var s=n[5];if(s){dYt(e,A9);var o=s[1];ud(IVt[1],function(r){return nd(t,r)},e,o),dYt(e,O9)}else dYt(e,I9);return nd(NYt(e),P9),nd(NYt(e),D9)}),bk(XWt,function(t,r,e){var n=ad(BWt,t,r);return ad(LYt(a9),n,e)}),bk(JWt,function(t,r,e,n){nd(NYt(e),r9),ad(t,e,n[1]),nd(NYt(e),e9);var a=n[2];return id(BWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),n9)}),bk(GWt,function(t,r,e){var n=ad(JWt,t,r);return ad(LYt(t9),n,e)});var qWt=[0,BWt,XWt,JWt,GWt],YWt=function t(r,e,n,a){return t.fun(r,e,n,a)},VWt=function t(r,e,n){return t.fun(r,e,n)},WWt=function t(r,e,n,a){return t.fun(r,e,n,a)},HWt=function t(r,e,n){return t.fun(r,e,n)};bk(YWt,function(t,r,e,n){nd(NYt(e),Q5),ad(t,e,n[1]),nd(NYt(e),$5);var a=n[2];return id(WWt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Z5)}),bk(VWt,function(t,r,e){var n=ad(YWt,t,r);return ad(LYt(K5),n,e)}),bk(WWt,function(t,r,e,n){nd(NYt(e),M5),ad(NYt(e),j5,U5);var a=n[1];nd(NYt(e),B5),ad(t,e,a[1]),nd(NYt(e),X5);var u=a[2];id(dWt[4],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),J5),nd(NYt(e),G5),nd(NYt(e),q5),ad(NYt(e),V5,Y5);var i=n[2];return ad(NYt(e),W5,i),nd(NYt(e),H5),nd(NYt(e),z5)}),bk(HWt,function(t,r,e){var n=ad(WWt,t,r);return ad(LYt(R5),n,e)});var zWt=[0,YWt,VWt,WWt,HWt],KWt=function t(r,e,n,a){return t.fun(r,e,n,a)},QWt=function t(r,e,n){return t.fun(r,e,n)},$Wt=function t(r,e,n,a){return t.fun(r,e,n,a)},ZWt=function t(r,e,n){return t.fun(r,e,n)};bk(KWt,function(t,r,e,n){nd(NYt(e),C5),ad(t,e,n[1]),nd(NYt(e),N5);var a=n[2];return id($Wt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),L5)}),bk(QWt,function(t,r,e){var n=ad(KWt,t,r);return ad(LYt(D5),n,e)}),bk($Wt,function(t,r,e,n){nd(NYt(e),f5),ad(NYt(e),o5,s5);var a=n[1];ud(gVt[1],function(r){return nd(t,r)},e,a),nd(NYt(e),v5),nd(NYt(e),l5),ad(NYt(e),p5,b5);var u=n[2];id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),k5),nd(NYt(e),w5),ad(NYt(e),h5,d5);var i=n[3];ad(NYt(e),m5,i),nd(NYt(e),y5),nd(NYt(e),_5),ad(NYt(e),E5,F5);var c=n[4];ad(NYt(e),S5,c),nd(NYt(e),g5),nd(NYt(e),x5),ad(NYt(e),A5,T5);var f=n[5];return ad(NYt(e),O5,f),nd(NYt(e),I5),nd(NYt(e),P5)}),bk(ZWt,function(t,r,e){var n=ad($Wt,t,r);return ad(LYt(c5),n,e)});var tHt=[0,KWt,QWt,$Wt,ZWt],rHt=function t(r,e,n,a){return t.fun(r,e,n,a)},eHt=function t(r,e,n){return t.fun(r,e,n)},nHt=function t(r,e,n,a){return t.fun(r,e,n,a)},aHt=function t(r,e,n){return t.fun(r,e,n)};bk(rHt,function(t,r,e,n){nd(NYt(e),q6),ad(NYt(e),V6,Y6);var a=n[1];ad(NYt(e),W6,a),nd(NYt(e),H6),nd(NYt(e),z6),ad(NYt(e),Q6,K6);var u=n[2];ad(NYt(e),$6,u),nd(NYt(e),Z6),nd(NYt(e),t5),ad(NYt(e),e5,r5);var i=n[3];nd(NYt(e),n5);return AGt(function(n,a){return n&&nd(NYt(e),G6),id(nHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,i),nd(NYt(e),a5),nd(NYt(e),u5),nd(NYt(e),i5)}),bk(eHt,function(t,r,e){var n=ad(rHt,t,r);return ad(LYt(J6),n,e)}),bk(nHt,function(t,r,e,n){switch(n[0]){case 0:nd(NYt(e),D6);var a=n[1];return id(NWt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),C6);case 1:nd(NYt(e),N6);var u=n[1];return id(jWt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),L6);case 2:nd(NYt(e),R6);var i=n[1];return id(qWt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),M6);case 3:nd(NYt(e),U6);var c=n[1];return id(zWt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),j6);default:nd(NYt(e),B6);var f=n[1];return id(tHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),nd(NYt(e),X6)}}),bk(aHt,function(t,r,e){var n=ad(nHt,t,r);return ad(LYt(P6),n,e)});var uHt=[0,NWt,jWt,qWt,zWt,tHt,rHt,eHt,nHt,aHt],iHt=function t(r,e,n,a){return t.fun(r,e,n,a)},cHt=function t(r,e,n){return t.fun(r,e,n)};bk(iHt,function(t,r,e,n){nd(NYt(e),d6),ad(NYt(e),m6,h6);var a=n[1];nd(NYt(e),y6),ad(t,e,a[1]),nd(NYt(e),_6);var u=a[2];id(uHt[6],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),F6),nd(NYt(e),E6),nd(NYt(e),S6),ad(NYt(e),x6,g6);var i=n[2];nd(NYt(e),T6);return AGt(function(n,a){n&&nd(NYt(e),b6),nd(NYt(e),p6),ad(t,e,a[1]),nd(NYt(e),k6);var u=a[2];return id(TWt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),w6),1},0,i),nd(NYt(e),A6),nd(NYt(e),O6),nd(NYt(e),I6)}),bk(cHt,function(t,r,e){var n=ad(iHt,t,r);return ad(LYt(l6),n,e)});var fHt=[0,iHt,cHt],sHt=function t(r,e,n,a){return t.fun(r,e,n,a)},oHt=function t(r,e,n){return t.fun(r,e,n)},vHt=function t(r,e,n,a){return t.fun(r,e,n,a)},lHt=function t(r,e,n){return t.fun(r,e,n)},bHt=function t(r,e,n,a){return t.fun(r,e,n,a)},pHt=function t(r,e,n){return t.fun(r,e,n)},kHt=function t(r,e,n,a){return t.fun(r,e,n,a)},wHt=function t(r,e,n){return t.fun(r,e,n)};bk(sHt,function(t,r,e,n){nd(NYt(e),s6),ad(r,e,n[1]),nd(NYt(e),o6);var a=n[2];return id(vHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),v6)}),bk(oHt,function(t,r,e){var n=ad(sHt,t,r);return ad(LYt(f6),n,e)}),bk(vHt,function(t,r,e,n){if("number"==typeof n)switch(n){case 0:return dYt(e,w8);case 1:return dYt(e,d8);case 2:return dYt(e,h8);case 3:return dYt(e,m8);case 4:return dYt(e,y8);case 5:return dYt(e,_8);case 6:return dYt(e,F8);case 7:return dYt(e,E8);default:return dYt(e,S8)}else switch(n[0]){case 0:nd(NYt(e),g8);var a=n[1];return id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),x8);case 1:nd(NYt(e),T8);var u=n[1];return id(dWt[4],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),A8);case 2:nd(NYt(e),O8);var i=n[1];return id(uHt[6],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),I8);case 3:nd(NYt(e),P8);var c=n[1];return id(fHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),D8);case 4:nd(NYt(e),C8);var f=n[1];return id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),nd(NYt(e),N8);case 5:nd(NYt(e),L8);var s=n[1];return id(TWt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,s),nd(NYt(e),R8);case 6:nd(NYt(e),M8);var o=n[1];id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,o),nd(NYt(e),U8);var v=n[2];id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,v),nd(NYt(e),j8),nd(NYt(e),B8);return AGt(function(n,a){return n&&nd(NYt(e),k8),id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,n[3]),nd(NYt(e),X8),nd(NYt(e),J8);case 7:nd(NYt(e),G8);var l=n[1];id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,l),nd(NYt(e),q8);var b=n[2];id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,b),nd(NYt(e),Y8),nd(NYt(e),V8);return AGt(function(n,a){return n&&nd(NYt(e),p8),id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,n[3]),nd(NYt(e),W8),nd(NYt(e),H8);case 8:nd(NYt(e),z8);var p=n[1];return id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,p),nd(NYt(e),K8);case 9:nd(NYt(e),Q8),nd(NYt(e),$8);return AGt(function(n,a){return n&&nd(NYt(e),b8),id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,n[1]),nd(NYt(e),Z8),nd(NYt(e),t6);case 10:return nd(NYt(e),r6),ad(AVt[1],e,n[1]),nd(NYt(e),e6);case 11:return nd(NYt(e),n6),ad(OVt[1],e,n[1]),nd(NYt(e),a6);default:nd(NYt(e),u6);var k=n[1];return ad(NYt(e),i6,k),nd(NYt(e),c6)}}),bk(lHt,function(t,r,e){var n=ad(vHt,t,r);return ad(LYt(l8),n,e)}),bk(bHt,function(t,r,e,n){nd(NYt(e),s8),ad(t,e,n[1]),nd(NYt(e),o8);var a=n[2];return id(sHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),v8)}),bk(pHt,function(t,r,e){var n=ad(bHt,t,r);return ad(LYt(f8),n,e)}),bk(kHt,function(t,r,e,n){if(0===n[0])return nd(NYt(e),a8),ad(r,e,n[1]),nd(NYt(e),u8);nd(NYt(e),i8);var a=n[1];return id(PVt[9],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),c8)}),bk(wHt,function(t,r,e){var n=ad(kHt,t,r);return ad(LYt(n8),n,e)});var dHt=function t(r,e,n,a){return t.fun(r,e,n,a)},hHt=function t(r,e,n){return t.fun(r,e,n)},mHt=function t(r,e,n,a){return t.fun(r,e,n,a)},yHt=function t(r,e,n){return t.fun(r,e,n)};bk(dHt,function(t,r,e,n){nd(NYt(e),t8),ad(r,e,n[1]),nd(NYt(e),r8);var a=n[2];return id(mHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),e8)}),bk(hHt,function(t,r,e){var n=ad(dHt,t,r);return ad(LYt(Z3),n,e)}),bk(mHt,function(t,r,e,n){nd(NYt(e),I3),ad(NYt(e),D3,P3);var a=n[1];ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),C3),nd(NYt(e),N3),ad(NYt(e),R3,L3);var u=n[2];id(PVt[11],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),M3),nd(NYt(e),U3),ad(NYt(e),B3,j3);var i=n[3];if(i){dYt(e,X3);var c=i[1];ud(IVt[1],function(r){return nd(t,r)},e,c),dYt(e,J3)}else dYt(e,G3);nd(NYt(e),q3),nd(NYt(e),Y3),ad(NYt(e),W3,V3);var f=n[4];if(f){dYt(e,H3);var s=f[1];id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,s),dYt(e,z3)}else dYt(e,K3);return nd(NYt(e),Q3),nd(NYt(e),$3)}),bk(yHt,function(t,r,e){var n=ad(mHt,t,r);return ad(LYt(O3),n,e)});var _Ht=[0,dHt,hHt,mHt,yHt],FHt=function t(r,e,n,a){return t.fun(r,e,n,a)},EHt=function t(r,e,n){return t.fun(r,e,n)},SHt=function t(r,e,n,a){return t.fun(r,e,n,a)},gHt=function t(r,e,n){return t.fun(r,e,n)};bk(FHt,function(t,r,e,n){nd(NYt(e),x3),ad(t,e,n[1]),nd(NYt(e),T3);var a=n[2];return id(SHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),A3)}),bk(EHt,function(t,r,e){var n=ad(FHt,t,r);return ad(LYt(g3),n,e)}),bk(SHt,function(t,r,e,n){nd(NYt(e),E3);return AGt(function(n,a){return n&&nd(NYt(e),F3),id(_Ht[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,n),nd(NYt(e),S3)}),bk(gHt,function(t,r,e){var n=ad(SHt,t,r);return ad(LYt(_3),n,e)});var xHt=function t(r,e,n,a){return t.fun(r,e,n,a)},THt=function t(r,e,n){return t.fun(r,e,n)},AHt=function t(r,e,n,a){return t.fun(r,e,n,a)},OHt=function t(r,e,n){return t.fun(r,e,n)},IHt=[0,_Ht,FHt,EHt,SHt,gHt];bk(xHt,function(t,r,e,n){nd(NYt(e),h3),ad(t,e,n[1]),nd(NYt(e),m3);var a=n[2];return id(AHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),y3)}),bk(THt,function(t,r,e){var n=ad(xHt,t,r);return ad(LYt(d3),n,e)}),bk(AHt,function(t,r,e,n){nd(NYt(e),k3);return AGt(function(n,a){return n&&nd(NYt(e),p3),id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,n),nd(NYt(e),w3)}),bk(OHt,function(t,r,e){var n=ad(AHt,t,r);return ad(LYt(b3),n,e)});var PHt=function t(r,e,n,a){return t.fun(r,e,n,a)},DHt=function t(r,e,n){return t.fun(r,e,n)},CHt=function t(r,e,n,a){return t.fun(r,e,n,a)},NHt=function t(r,e,n){return t.fun(r,e,n)},LHt=[0,xHt,THt,AHt,OHt];bk(PHt,function(t,r,e,n){nd(NYt(e),o3),ad(t,e,n[1]),nd(NYt(e),v3);var a=n[2];return id(CHt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),l3)}),bk(DHt,function(t,r,e){var n=ad(PHt,t,r);return ad(LYt(s3),n,e)}),bk(CHt,function(t,r,e,n){if(n){nd(NYt(e),i3);var a=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),c3)}return dYt(e,f3)}),bk(NHt,function(t,r,e){var n=ad(CHt,t,r);return ad(LYt(u3),n,e)}),ud(MYt,jat,PVt,[0,dWt,TWt,uHt,fHt,sHt,oHt,vHt,lHt,bHt,pHt,kHt,wHt,IHt,LHt,[0,PHt,DHt,CHt,NHt]]);var RHt=function t(r,e,n,a){return t.fun(r,e,n,a)},MHt=function t(r,e,n){return t.fun(r,e,n)};bk(RHt,function(t,r,e,n){nd(NYt(e),$4),ad(NYt(e),t3,Z4);var a=n[1];nd(NYt(e),r3);return AGt(function(n,a){return n&&nd(NYt(e),Q4),id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),e3),nd(NYt(e),n3),nd(NYt(e),a3)}),bk(MHt,function(t,r,e){var n=ad(RHt,t,r);return ad(LYt(K4),n,e)});var UHt=[0,RHt,MHt],jHt=function t(r,e,n,a){return t.fun(r,e,n,a)},BHt=function t(r,e,n){return t.fun(r,e,n)};bk(jHt,function(t,r,e,n){nd(NYt(e),N4),ad(NYt(e),R4,L4);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),M4),nd(NYt(e),U4),ad(NYt(e),B4,j4);var u=n[2];id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),X4),nd(NYt(e),J4),ad(NYt(e),q4,G4);var i=n[3];if(i){dYt(e,Y4);var c=i[1];id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),dYt(e,V4)}else dYt(e,W4);return nd(NYt(e),H4),nd(NYt(e),z4)}),bk(BHt,function(t,r,e){var n=ad(jHt,t,r);return ad(LYt(C4),n,e)});var XHt=[0,jHt,BHt],JHt=function t(r,e,n,a){return t.fun(r,e,n,a)},GHt=function t(r,e,n){return t.fun(r,e,n)};bk(JHt,function(t,r,e,n){nd(NYt(e),S4),ad(NYt(e),x4,g4);var a=n[1];ud(gVt[1],function(r){return nd(t,r)},e,a),nd(NYt(e),T4),nd(NYt(e),A4),ad(NYt(e),I4,O4);var u=n[2];return id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),P4),nd(NYt(e),D4)}),bk(GHt,function(t,r,e){var n=ad(JHt,t,r);return ad(LYt(E4),n,e)});var qHt=[0,JHt,GHt],YHt=function t(r,e,n){return t.fun(r,e,n)},VHt=function t(r,e){return t.fun(r,e)};bk(YHt,function(t,r,e){nd(NYt(r),k4),ad(NYt(r),d4,w4);var n=e[1];if(n){dYt(r,h4);var a=n[1];ud(gVt[1],function(r){return nd(t,r)},r,a),dYt(r,m4)}else dYt(r,y4);return nd(NYt(r),_4),nd(NYt(r),F4)}),bk(VHt,function(t,r){var e=nd(YHt,t);return ad(LYt(p4),e,r)});var WHt=[0,YHt,VHt],HHt=function t(r,e,n){return t.fun(r,e,n)},zHt=function t(r,e){return t.fun(r,e)};bk(HHt,function(t,r,e){nd(NYt(r),i4),ad(NYt(r),f4,c4);var n=e[1];if(n){dYt(r,s4);var a=n[1];ud(gVt[1],function(r){return nd(t,r)},r,a),dYt(r,o4)}else dYt(r,v4);return nd(NYt(r),l4),nd(NYt(r),b4)}),bk(zHt,function(t,r){var e=nd(HHt,t);return ad(LYt(u4),e,r)});var KHt=[0,HHt,zHt],QHt=function t(r,e,n,a){return t.fun(r,e,n,a)},$Ht=function t(r,e,n){return t.fun(r,e,n)};bk(QHt,function(t,r,e,n){nd(NYt(e),K7),ad(NYt(e),$7,Q7);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Z7),nd(NYt(e),t4),ad(NYt(e),e4,r4);var u=n[2];return id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),n4),nd(NYt(e),a4)}),bk($Ht,function(t,r,e){var n=ad(QHt,t,r);return ad(LYt(z7),n,e)});var ZHt=[0,QHt,$Ht],tzt=function t(r,e,n,a){return t.fun(r,e,n,a)},rzt=function t(r,e,n){return t.fun(r,e,n)};bk(tzt,function(t,r,e,n){nd(NYt(e),C7),ad(NYt(e),L7,N7);var a=n[1];ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),R7),nd(NYt(e),M7),ad(NYt(e),j7,U7);var u=n[2];if(u){dYt(e,B7);var i=u[1];id(PVt[13][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,X7)}else dYt(e,J7);nd(NYt(e),G7),nd(NYt(e),q7),ad(NYt(e),V7,Y7);var c=n[3];return id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),W7),nd(NYt(e),H7)}),bk(rzt,function(t,r,e){var n=ad(tzt,t,r);return ad(LYt(D7),n,e)});var ezt=[0,tzt,rzt],nzt=function t(r,e,n,a){return t.fun(r,e,n,a)},azt=function t(r,e,n){return t.fun(r,e,n)};bk(nzt,function(t,r,e,n){nd(NYt(e),i7),ad(NYt(e),f7,c7);var a=n[1];ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),s7),nd(NYt(e),o7),ad(NYt(e),l7,v7);var u=n[2];if(u){dYt(e,b7);var i=u[1];id(PVt[13][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,p7)}else dYt(e,k7);nd(NYt(e),w7),nd(NYt(e),d7),ad(NYt(e),m7,h7);var c=n[3];if(c){dYt(e,y7);var f=c[1];id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),dYt(e,_7)}else dYt(e,F7);nd(NYt(e),E7),nd(NYt(e),S7),ad(NYt(e),x7,g7);var s=n[4];if(s){dYt(e,T7);var o=s[1];id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,o),dYt(e,A7)}else dYt(e,O7);return nd(NYt(e),I7),nd(NYt(e),P7)}),bk(azt,function(t,r,e){var n=ad(nzt,t,r);return ad(LYt(u7),n,e)});var uzt=[0,nzt,azt],izt=function t(r,e,n,a){return t.fun(r,e,n,a)},czt=function t(r,e,n){return t.fun(r,e,n)},fzt=function t(r,e,n,a){return t.fun(r,e,n,a)},szt=function t(r,e,n){return t.fun(r,e,n)};bk(izt,function(t,r,e,n){nd(NYt(e),e7),ad(t,e,n[1]),nd(NYt(e),n7);var a=n[2];return id(fzt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),a7)}),bk(czt,function(t,r,e){var n=ad(izt,t,r);return ad(LYt(r7),n,e)}),bk(fzt,function(t,r,e,n){nd(NYt(e),X2),ad(NYt(e),G2,J2);var a=n[1];if(a){dYt(e,q2);var u=a[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,Y2)}else dYt(e,V2);nd(NYt(e),W2),nd(NYt(e),H2),ad(NYt(e),K2,z2);var i=n[2];nd(NYt(e),Q2);return AGt(function(n,a){return n&&nd(NYt(e),B2),id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,i),nd(NYt(e),$2),nd(NYt(e),Z2),nd(NYt(e),t7)}),bk(szt,function(t,r,e){var n=ad(fzt,t,r);return ad(LYt(j2),n,e)});var ozt=[0,izt,czt,fzt,szt],vzt=function t(r,e,n,a){return t.fun(r,e,n,a)},lzt=function t(r,e,n){return t.fun(r,e,n)};bk(vzt,function(t,r,e,n){nd(NYt(e),A2),ad(NYt(e),I2,O2);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),P2),nd(NYt(e),D2),ad(NYt(e),N2,C2);var u=n[2];nd(NYt(e),L2);return AGt(function(n,a){return n&&nd(NYt(e),T2),id(ozt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,u),nd(NYt(e),R2),nd(NYt(e),M2),nd(NYt(e),U2)}),bk(lzt,function(t,r,e){var n=ad(vzt,t,r);return ad(LYt(x2),n,e)});var bzt=[0,ozt,vzt,lzt],pzt=function t(r,e,n,a){return t.fun(r,e,n,a)},kzt=function t(r,e,n){return t.fun(r,e,n)};bk(pzt,function(t,r,e,n){nd(NYt(e),h2),ad(NYt(e),y2,m2);var a=n[1];if(a){dYt(e,_2);var u=a[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,F2)}else dYt(e,E2);return nd(NYt(e),S2),nd(NYt(e),g2)}),bk(kzt,function(t,r,e){var n=ad(pzt,t,r);return ad(LYt(d2),n,e)});var wzt=[0,pzt,kzt],dzt=function t(r,e,n,a){return t.fun(r,e,n,a)},hzt=function t(r,e,n){return t.fun(r,e,n)};bk(dzt,function(t,r,e,n){nd(NYt(e),l2),ad(NYt(e),p2,b2);var a=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),k2),nd(NYt(e),w2)}),bk(hzt,function(t,r,e){var n=ad(dzt,t,r);return ad(LYt(v2),n,e)});var mzt=[0,dzt,hzt],yzt=function t(r,e,n,a){return t.fun(r,e,n,a)},_zt=function t(r,e,n){return t.fun(r,e,n)},Fzt=function t(r,e,n,a){return t.fun(r,e,n,a)},Ezt=function t(r,e,n){return t.fun(r,e,n)};bk(yzt,function(t,r,e,n){nd(NYt(e),f2),ad(t,e,n[1]),nd(NYt(e),s2);var a=n[2];return id(Fzt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),o2)}),bk(_zt,function(t,r,e){var n=ad(yzt,t,r);return ad(LYt(c2),n,e)}),bk(Fzt,function(t,r,e,n){nd(NYt(e),V1),ad(NYt(e),H1,W1);var a=n[1];if(a){dYt(e,z1);var u=a[1];id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,K1)}else dYt(e,Q1);nd(NYt(e),$1),nd(NYt(e),Z1),ad(NYt(e),r2,t2);var i=n[2];nd(NYt(e),e2),ad(t,e,i[1]),nd(NYt(e),n2);var c=i[2];return id(UHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),a2),nd(NYt(e),u2),nd(NYt(e),i2)}),bk(Ezt,function(t,r,e){var n=ad(Fzt,t,r);return ad(LYt(Y1),n,e)});var Szt=[0,yzt,_zt,Fzt,Ezt],gzt=function t(r,e,n,a){return t.fun(r,e,n,a)},xzt=function t(r,e,n){return t.fun(r,e,n)};bk(gzt,function(t,r,e,n){nd(NYt(e),y1),ad(NYt(e),F1,_1);var a=n[1];nd(NYt(e),E1),ad(t,e,a[1]),nd(NYt(e),S1);var u=a[2];id(UHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),g1),nd(NYt(e),x1),nd(NYt(e),T1),ad(NYt(e),O1,A1);var i=n[2];if(i){dYt(e,I1);var c=i[1];id(Szt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),dYt(e,P1)}else dYt(e,D1);nd(NYt(e),C1),nd(NYt(e),N1),ad(NYt(e),R1,L1);var f=n[3];if(f){var s=f[1];dYt(e,M1),nd(NYt(e),U1),ad(t,e,s[1]),nd(NYt(e),j1);var o=s[2];id(UHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,o),nd(NYt(e),B1),dYt(e,X1)}else dYt(e,J1);return nd(NYt(e),G1),nd(NYt(e),q1)}),bk(xzt,function(t,r,e){var n=ad(gzt,t,r);return ad(LYt(m1),n,e)});var Tzt=[0,Szt,gzt,xzt],Azt=function t(r,e,n,a){return t.fun(r,e,n,a)},Ozt=function t(r,e,n){return t.fun(r,e,n)},Izt=function t(r,e,n,a){return t.fun(r,e,n,a)},Pzt=function t(r,e,n){return t.fun(r,e,n)};bk(Azt,function(t,r,e,n){nd(NYt(e),w1),ad(t,e,n[1]),nd(NYt(e),d1);var a=n[2];return id(Izt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),h1)}),bk(Ozt,function(t,r,e){var n=ad(Azt,t,r);return ad(LYt(k1),n,e)}),bk(Izt,function(t,r,e,n){nd(NYt(e),n1),ad(NYt(e),u1,a1);var a=n[1];id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),i1),nd(NYt(e),c1),ad(NYt(e),s1,f1);var u=n[2];if(u){dYt(e,o1);var i=u[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,v1)}else dYt(e,l1);return nd(NYt(e),b1),nd(NYt(e),p1)}),bk(Pzt,function(t,r,e){var n=ad(Izt,t,r);return ad(LYt(e1),n,e)});var Dzt=[0,Azt,Ozt,Izt,Pzt],Czt=function t(r,e,n,a){return t.fun(r,e,n,a)},Nzt=function t(r,e,n){return t.fun(r,e,n)},Lzt=function t(r,e){return t.fun(r,e)},Rzt=function t(r){return t.fun(r)};bk(Czt,function(t,r,e,n){nd(NYt(e),Y0),ad(NYt(e),W0,V0);var a=n[1];nd(NYt(e),H0);return AGt(function(n,a){return n&&nd(NYt(e),q0),id(Dzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),z0),nd(NYt(e),K0),nd(NYt(e),Q0),ad(NYt(e),Z0,$0),ad(Lzt,e,n[2]),nd(NYt(e),t1),nd(NYt(e),r1)}),bk(Nzt,function(t,r,e){var n=ad(Czt,t,r);return ad(LYt(G0),n,e)}),bk(Lzt,function(t,r){switch(r){case 0:return dYt(t,B0);case 1:return dYt(t,X0);default:return dYt(t,J0)}}),bk(Rzt,function(t){return ad(LYt(j0),Lzt,t)});var Mzt=[0,Dzt,Czt,Nzt,Lzt,Rzt],Uzt=function t(r,e,n,a){return t.fun(r,e,n,a)},jzt=function t(r,e,n){return t.fun(r,e,n)};bk(Uzt,function(t,r,e,n){nd(NYt(e),I0),ad(NYt(e),D0,P0);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),C0),nd(NYt(e),N0),ad(NYt(e),R0,L0);var u=n[2];return id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),M0),nd(NYt(e),U0)}),bk(jzt,function(t,r,e){var n=ad(Uzt,t,r);return ad(LYt(O0),n,e)});var Bzt=[0,Uzt,jzt],Xzt=function t(r,e,n,a){return t.fun(r,e,n,a)},Jzt=function t(r,e,n){return t.fun(r,e,n)};bk(Xzt,function(t,r,e,n){nd(NYt(e),y0),ad(NYt(e),F0,_0);var a=n[1];id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),E0),nd(NYt(e),S0),ad(NYt(e),x0,g0);var u=n[2];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),T0),nd(NYt(e),A0)}),bk(Jzt,function(t,r,e){var n=ad(Xzt,t,r);return ad(LYt(m0),n,e)});var Gzt=[0,Xzt,Jzt],qzt=function t(r,e,n,a){return t.fun(r,e,n,a)},Yzt=function t(r,e,n){return t.fun(r,e,n)},Vzt=function t(r,e,n,a){return t.fun(r,e,n,a)},Wzt=function t(r,e,n){return t.fun(r,e,n)};bk(qzt,function(t,r,e,n){nd(NYt(e),WZ),ad(NYt(e),zZ,HZ);var a=n[1];if(a){dYt(e,KZ);var u=a[1];id(Vzt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,QZ)}else dYt(e,$Z);nd(NYt(e),ZZ),nd(NYt(e),t0),ad(NYt(e),e0,r0);var i=n[2];if(i){dYt(e,n0);var c=i[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),dYt(e,a0)}else dYt(e,u0);nd(NYt(e),i0),nd(NYt(e),c0),ad(NYt(e),s0,f0);var f=n[3];if(f){dYt(e,o0);var s=f[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,s),dYt(e,v0)}else dYt(e,l0);nd(NYt(e),b0),nd(NYt(e),p0),ad(NYt(e),w0,k0);var o=n[4];return id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,o),nd(NYt(e),d0),nd(NYt(e),h0)}),bk(Yzt,function(t,r,e){var n=ad(qzt,t,r);return ad(LYt(VZ),n,e)}),bk(Vzt,function(t,r,e,n){if(0===n[0]){var a=n[1];nd(NYt(e),jZ),nd(NYt(e),BZ),ad(t,e,a[1]),nd(NYt(e),XZ);var u=a[2];return id(Mzt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),JZ),nd(NYt(e),GZ)}nd(NYt(e),qZ);var i=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),YZ)}),bk(Wzt,function(t,r,e){var n=ad(Vzt,t,r);return ad(LYt(UZ),n,e)});var Hzt=[0,qzt,Yzt,Vzt,Wzt],zzt=function t(r,e,n,a){return t.fun(r,e,n,a)},Kzt=function t(r,e,n){return t.fun(r,e,n)},Qzt=function t(r,e,n,a){return t.fun(r,e,n,a)},$zt=function t(r,e,n){return t.fun(r,e,n)};bk(zzt,function(t,r,e,n){nd(NYt(e),yZ),ad(NYt(e),FZ,_Z);var a=n[1];id(Qzt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),EZ),nd(NYt(e),SZ),ad(NYt(e),xZ,gZ);var u=n[2];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),TZ),nd(NYt(e),AZ),ad(NYt(e),IZ,OZ);var i=n[3];id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),PZ),nd(NYt(e),DZ),ad(NYt(e),NZ,CZ);var c=n[4];return ad(NYt(e),LZ,c),nd(NYt(e),RZ),nd(NYt(e),MZ)}),bk(Kzt,function(t,r,e){var n=ad(zzt,t,r);return ad(LYt(mZ),n,e)}),bk(Qzt,function(t,r,e,n){if(0===n[0]){var a=n[1];nd(NYt(e),lZ),nd(NYt(e),bZ),ad(t,e,a[1]),nd(NYt(e),pZ);var u=a[2];return id(Mzt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),kZ),nd(NYt(e),wZ)}nd(NYt(e),dZ);var i=n[1];return id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),hZ)}),bk($zt,function(t,r,e){var n=ad(Qzt,t,r);return ad(LYt(vZ),n,e)});var Zzt=[0,zzt,Kzt,Qzt,$zt],tKt=function t(r,e,n,a){return t.fun(r,e,n,a)},rKt=function t(r,e,n){return t.fun(r,e,n)},eKt=function t(r,e,n,a){return t.fun(r,e,n,a)},nKt=function t(r,e,n){return t.fun(r,e,n)};bk(tKt,function(t,r,e,n){nd(NYt(e),W$),ad(NYt(e),z$,H$);var a=n[1];id(eKt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),K$),nd(NYt(e),Q$),ad(NYt(e),Z$,$$);var u=n[2];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),tZ),nd(NYt(e),rZ),ad(NYt(e),nZ,eZ);var i=n[3];id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),aZ),nd(NYt(e),uZ),ad(NYt(e),cZ,iZ);var c=n[4];return ad(NYt(e),fZ,c),nd(NYt(e),sZ),nd(NYt(e),oZ)}),bk(rKt,function(t,r,e){var n=ad(tKt,t,r);return ad(LYt(V$),n,e)}),bk(eKt,function(t,r,e,n){if(0===n[0]){var a=n[1];nd(NYt(e),j$),nd(NYt(e),B$),ad(t,e,a[1]),nd(NYt(e),X$);var u=a[2];return id(Mzt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),J$),nd(NYt(e),G$)}nd(NYt(e),q$);var i=n[1];return id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),Y$)}),bk(nKt,function(t,r,e){var n=ad(eKt,t,r);return ad(LYt(U$),n,e)});var aKt=[0,tKt,rKt,eKt,nKt],uKt=function t(r,e,n,a){return t.fun(r,e,n,a)},iKt=function t(r,e,n){return t.fun(r,e,n)};bk(uKt,function(t,r,e,n){nd(NYt(e),b$),ad(NYt(e),k$,p$);var a=n[1];ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),w$),nd(NYt(e),d$),ad(NYt(e),m$,h$);var u=n[2];if(u){dYt(e,y$);var i=u[1];id(PVt[13][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,_$)}else dYt(e,F$);nd(NYt(e),E$),nd(NYt(e),S$),ad(NYt(e),x$,g$);var c=n[3];nd(NYt(e),T$);AGt(function(n,a){n&&nd(NYt(e),s$),nd(NYt(e),o$),ad(t,e,a[1]),nd(NYt(e),v$);var u=a[2];return id(PVt[2][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),l$),1},0,c),nd(NYt(e),A$),nd(NYt(e),O$),nd(NYt(e),I$),ad(NYt(e),D$,P$);var f=n[4];nd(NYt(e),C$),ad(t,e,f[1]),nd(NYt(e),N$);var s=f[2];return id(PVt[3][6],function(r){return nd(t,r)},function(t){return nd(r,t)},e,s),nd(NYt(e),L$),nd(NYt(e),R$),nd(NYt(e),M$)}),bk(iKt,function(t,r,e){var n=ad(uKt,t,r);return ad(LYt(f$),n,e)});var cKt=[0,uKt,iKt],fKt=function t(r,e,n,a){return t.fun(r,e,n,a)},sKt=function t(r,e,n){return t.fun(r,e,n)};bk(fKt,function(t,r,e,n){nd(NYt(e),_Q),ad(NYt(e),EQ,FQ);var a=n[1];ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),SQ),nd(NYt(e),gQ),ad(NYt(e),TQ,xQ);var u=n[2];if(u){dYt(e,AQ);var i=u[1];id(PVt[13][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,OQ)}else dYt(e,IQ);nd(NYt(e),PQ),nd(NYt(e),DQ),ad(NYt(e),NQ,CQ);var c=n[3];nd(NYt(e),LQ),ad(t,e,c[1]),nd(NYt(e),RQ);var f=c[2];id(PVt[3][6],function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),nd(NYt(e),MQ),nd(NYt(e),UQ),nd(NYt(e),jQ),ad(NYt(e),XQ,BQ);var s=n[4];if(s){var o=s[1];dYt(e,JQ),nd(NYt(e),GQ),ad(t,e,o[1]),nd(NYt(e),qQ);var v=o[2];id(PVt[2][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,v),nd(NYt(e),YQ),dYt(e,VQ)}else dYt(e,WQ);nd(NYt(e),HQ),nd(NYt(e),zQ),ad(NYt(e),QQ,KQ);var l=n[5];nd(NYt(e),$Q);AGt(function(n,a){n&&nd(NYt(e),dQ),nd(NYt(e),hQ),ad(t,e,a[1]),nd(NYt(e),mQ);var u=a[2];return id(PVt[2][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),yQ),1},0,l),nd(NYt(e),ZQ),nd(NYt(e),t$),nd(NYt(e),r$),ad(NYt(e),n$,e$);var b=n[6];nd(NYt(e),a$);return AGt(function(n,a){return n&&nd(NYt(e),wQ),id(MVt[5][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,b),nd(NYt(e),u$),nd(NYt(e),i$),nd(NYt(e),c$)}),bk(sKt,function(t,r,e){var n=ad(fKt,t,r);return ad(LYt(kQ),n,e)});var oKt=[0,fKt,sKt],vKt=function t(r,e,n,a){return t.fun(r,e,n,a)},lKt=function t(r,e,n){return t.fun(r,e,n)};bk(vKt,function(t,r,e,n){nd(NYt(e),iQ),ad(NYt(e),fQ,cQ);var a=n[1];ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),sQ),nd(NYt(e),oQ),ad(NYt(e),lQ,vQ);var u=n[2];return id(PVt[11],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),bQ),nd(NYt(e),pQ)}),bk(lKt,function(t,r,e){var n=ad(vKt,t,r);return ad(LYt(uQ),n,e)});var bKt=[0,vKt,lKt],pKt=function t(r,e,n,a){return t.fun(r,e,n,a)},kKt=function t(r,e,n){return t.fun(r,e,n)};bk(pKt,function(t,r,e,n){nd(NYt(e),GK),ad(NYt(e),YK,qK);var a=n[1];ud(gVt[1],function(r){return nd(t,r)},e,a),nd(NYt(e),VK),nd(NYt(e),WK),ad(NYt(e),zK,HK);var u=n[2];id(PVt[9],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),KK),nd(NYt(e),QK),ad(NYt(e),ZK,$K);var i=n[3];if(i){dYt(e,tQ);var c=i[1];id(PVt[15][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),dYt(e,rQ)}else dYt(e,eQ);return nd(NYt(e),nQ),nd(NYt(e),aQ)}),bk(kKt,function(t,r,e){var n=ad(pKt,t,r);return ad(LYt(JK),n,e)});var wKt=[0,pKt,kKt],dKt=function t(r,e,n){return t.fun(r,e,n)},hKt=function t(r,e){return t.fun(r,e)},mKt=function t(r,e,n){return t.fun(r,e,n)},yKt=function t(r,e){return t.fun(r,e)},_Kt=function t(r,e,n,a){return t.fun(r,e,n,a)},FKt=function t(r,e,n){return t.fun(r,e,n)};bk(dKt,function(t,r,e){if(0===e[0]){nd(NYt(r),LK);var n=e[1];return ud(gVt[1],function(r){return nd(t,r)},r,n),nd(NYt(r),RK)}var a=e[1];return nd(NYt(r),MK),nd(NYt(r),UK),ad(t,r,a[1]),nd(NYt(r),jK),ad(AVt[1],r,a[2]),nd(NYt(r),BK),nd(NYt(r),XK)}),bk(hKt,function(t,r){var e=nd(dKt,t);return ad(LYt(NK),e,r)}),bk(mKt,function(t,r,e){return 0===e[0]?(nd(NYt(r),IK),ad(t,r,e[1]),nd(NYt(r),PK)):(nd(NYt(r),DK),ad(t,r,e[1]),nd(NYt(r),CK))}),bk(yKt,function(t,r){var e=nd(mKt,t);return ad(LYt(OK),e,r)}),bk(_Kt,function(t,r,e,n){nd(NYt(e),bK),ad(NYt(e),kK,pK);var a=n[1];ud(dKt,function(t){return nd(r,t)},e,a),nd(NYt(e),wK),nd(NYt(e),dK),ad(NYt(e),mK,hK);var u=n[2];nd(NYt(e),yK),ad(t,e,u[1]),nd(NYt(e),_K);var i=u[2];id(UHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),FK),nd(NYt(e),EK),nd(NYt(e),SK),ad(NYt(e),xK,gK);var c=n[3];return ud(mKt,function(r){return nd(t,r)},e,c),nd(NYt(e),TK),nd(NYt(e),AK)}),bk(FKt,function(t,r,e){var n=ad(_Kt,t,r);return ad(LYt(lK),n,e)});var EKt=[0,dKt,hKt,mKt,yKt,_Kt,FKt],SKt=function t(r,e,n){return t.fun(r,e,n)},gKt=function t(r,e){return t.fun(r,e)},xKt=function t(r,e,n){return t.fun(r,e,n)},TKt=function t(r,e){return t.fun(r,e)};bk(SKt,function(t,r,e){nd(NYt(r),sK),ad(t,r,e[1]),nd(NYt(r),oK);var n=e[2];return ud(xKt,function(r){return nd(t,r)},r,n),nd(NYt(r),vK)}),bk(gKt,function(t,r){var e=nd(SKt,t);return ad(LYt(fK),e,r)}),bk(xKt,function(t,r,e){nd(NYt(r),Kz),ad(NYt(r),$z,Qz);var n=e[1];ud(gVt[1],function(r){return nd(t,r)},r,n),nd(NYt(r),Zz),nd(NYt(r),tK),ad(NYt(r),eK,rK);var a=e[2];if(a){dYt(r,nK);var u=a[1];ud(gVt[1],function(r){return nd(t,r)},r,u),dYt(r,aK)}else dYt(r,uK);return nd(NYt(r),iK),nd(NYt(r),cK)}),bk(TKt,function(t,r){var e=nd(xKt,t);return ad(LYt(zz),e,r)});var AKt=[0,SKt,gKt,xKt,TKt],OKt=function t(r,e,n,a){return t.fun(r,e,n,a)},IKt=function t(r,e,n){return t.fun(r,e,n)},PKt=function t(r,e,n){return t.fun(r,e,n)},DKt=function t(r,e){return t.fun(r,e)};bk(OKt,function(t,r,e,n){nd(NYt(e),yz),ad(NYt(e),Fz,_z);var a=n[1];if(a){dYt(e,Ez);var u=a[1];id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,Sz)}else dYt(e,gz);nd(NYt(e),xz),nd(NYt(e),Tz),ad(NYt(e),Oz,Az);var i=n[2];if(i){dYt(e,Iz);var c=i[1];ud(PKt,function(r){return nd(t,r)},e,c),dYt(e,Pz)}else dYt(e,Dz);nd(NYt(e),Cz),nd(NYt(e),Nz),ad(NYt(e),Rz,Lz);var f=n[3];if(f){var s=f[1];dYt(e,Mz),nd(NYt(e),Uz),ad(t,e,s[1]),nd(NYt(e),jz),ad(AVt[1],e,s[2]),nd(NYt(e),Bz),dYt(e,Xz)}else dYt(e,Jz);return nd(NYt(e),Gz),nd(NYt(e),qz),ad(NYt(e),Vz,Yz),ad(DVt[29],e,n[4]),nd(NYt(e),Wz),nd(NYt(e),Hz)}),bk(IKt,function(t,r,e){var n=ad(OKt,t,r);return ad(LYt(mz),n,e)}),bk(PKt,function(t,r,e){if(0===e[0]){nd(NYt(r),sz),nd(NYt(r),oz);return AGt(function(e,n){return e&&nd(NYt(r),fz),ud(AKt[1],function(r){return nd(t,r)},r,n),1},0,e[1]),nd(NYt(r),vz),nd(NYt(r),lz)}var n=e[2];if(nd(NYt(r),bz),ad(t,r,e[1]),nd(NYt(r),pz),n){dYt(r,kz);var a=n[1];ud(gVt[1],function(r){return nd(t,r)},r,a),dYt(r,wz)}else dYt(r,dz);return nd(NYt(r),hz)}),bk(DKt,function(t,r){var e=nd(PKt,t);return ad(LYt(cz),e,r)});var CKt=[0,AKt,OKt,IKt,PKt,DKt],NKt=function t(r,e,n,a){return t.fun(r,e,n,a)},LKt=function t(r,e,n){return t.fun(r,e,n)},RKt=function t(r,e,n,a){return t.fun(r,e,n,a)},MKt=function t(r,e,n){return t.fun(r,e,n)};bk(NKt,function(t,r,e,n){nd(NYt(e),$H),ad(NYt(e),tz,ZH),ad(t,e,n[1]),nd(NYt(e),rz),nd(NYt(e),ez),ad(NYt(e),az,nz);var a=n[2];return id(RKt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),uz),nd(NYt(e),iz)}),bk(LKt,function(t,r,e){var n=ad(NKt,t,r);return ad(LYt(QH),n,e)}),bk(RKt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),WH);var a=n[1];return id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),HH)}nd(NYt(e),zH);var u=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),KH)}),bk(MKt,function(t,r,e){var n=ad(RKt,t,r);return ad(LYt(VH),n,e)});var UKt=[0,NKt,LKt,RKt,MKt],jKt=function t(r,e,n,a){return t.fun(r,e,n,a)},BKt=function t(r,e,n){return t.fun(r,e,n)},XKt=function t(r,e,n,a){return t.fun(r,e,n,a)},JKt=function t(r,e,n){return t.fun(r,e,n)};bk(jKt,function(t,r,e,n){switch(n[0]){case 0:var a=n[1];nd(NYt(e),pH),nd(NYt(e),kH),ad(t,e,a[1]),nd(NYt(e),wH);var u=a[2];return id(bKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),dH),nd(NYt(e),hH);case 1:var i=n[1];nd(NYt(e),mH),nd(NYt(e),yH),ad(t,e,i[1]),nd(NYt(e),_H);var c=i[2];return id(wKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),FH),nd(NYt(e),EH);case 2:var f=n[1];nd(NYt(e),SH),nd(NYt(e),gH),ad(t,e,f[1]),nd(NYt(e),xH);var s=f[2];return id(oKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,s),nd(NYt(e),TH),nd(NYt(e),AH);case 3:nd(NYt(e),OH);var o=n[1];return id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,o),nd(NYt(e),IH);case 4:var v=n[1];nd(NYt(e),PH),nd(NYt(e),DH),ad(t,e,v[1]),nd(NYt(e),CH);var l=v[2];return id(ezt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,l),nd(NYt(e),NH),nd(NYt(e),LH);case 5:var b=n[1];nd(NYt(e),RH),nd(NYt(e),MH),ad(t,e,b[1]),nd(NYt(e),UH);var p=b[2];return id(uzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,p),nd(NYt(e),jH),nd(NYt(e),BH);default:var k=n[1];nd(NYt(e),XH),nd(NYt(e),JH),ad(t,e,k[1]),nd(NYt(e),GH);var w=k[2];return id(cKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,w),nd(NYt(e),qH),nd(NYt(e),YH)}}),bk(BKt,function(t,r,e){var n=ad(jKt,t,r);return ad(LYt(bH),n,e)}),bk(XKt,function(t,r,e,n){nd(NYt(e),LW),ad(NYt(e),MW,RW);var a=n[1];a?(dYt(e,UW),ad(t,e,a[1]),dYt(e,jW)):dYt(e,BW),nd(NYt(e),XW),nd(NYt(e),JW),ad(NYt(e),qW,GW);var u=n[2];if(u){dYt(e,YW);var i=u[1];id(jKt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,VW)}else dYt(e,WW);nd(NYt(e),HW),nd(NYt(e),zW),ad(NYt(e),QW,KW);var c=n[3];if(c){dYt(e,$W);var f=c[1];ud(CKt[4],function(r){return nd(t,r)},e,f),dYt(e,ZW)}else dYt(e,tH);nd(NYt(e),rH),nd(NYt(e),eH),ad(NYt(e),aH,nH);var s=n[4];if(s){var o=s[1];dYt(e,uH),nd(NYt(e),iH),ad(t,e,o[1]),nd(NYt(e),cH),ad(AVt[1],e,o[2]),nd(NYt(e),fH),dYt(e,sH)}else dYt(e,oH);return nd(NYt(e),vH),nd(NYt(e),lH)}),bk(JKt,function(t,r,e){var n=ad(XKt,t,r);return ad(LYt(NW),n,e)});var GKt=[0,jKt,BKt,XKt,JKt],qKt=function t(r,e){return t.fun(r,e)},YKt=function t(r){return t.fun(r)},VKt=function t(r,e,n,a){return t.fun(r,e,n,a)},WKt=function t(r,e,n){return t.fun(r,e,n)},HKt=function t(r,e,n){return t.fun(r,e,n)},zKt=function t(r,e){return t.fun(r,e)},KKt=function t(r,e,n,a){return t.fun(r,e,n,a)},QKt=function t(r,e,n){return t.fun(r,e,n)};bk(qKt,function(t,r){switch(r){case 0:return dYt(t,PW);case 1:return dYt(t,DW);default:return dYt(t,CW)}}),bk(YKt,function(t){return ad(LYt(IW),qKt,t)}),bk(VKt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),_W),nd(NYt(e),FW);return AGt(function(t,n){return t&&nd(NYt(e),yW),ud(HKt,function(t){return nd(r,t)},e,n),1},0,n[1]),nd(NYt(e),EW),nd(NYt(e),SW)}var a=n[1];nd(NYt(e),gW),nd(NYt(e),xW),ad(t,e,a[1]),nd(NYt(e),TW);var u=a[2];return ud(gVt[1],function(r){return nd(t,r)},e,u),nd(NYt(e),AW),nd(NYt(e),OW)}),bk(WKt,function(t,r,e){var n=ad(VKt,t,r);return ad(LYt(mW),n,e)}),bk(HKt,function(t,r,e){nd(NYt(r),tW),ad(NYt(r),eW,rW);var n=e[1];n?(dYt(r,nW),ad(qKt,r,n[1]),dYt(r,aW)):dYt(r,uW),nd(NYt(r),iW),nd(NYt(r),cW),ad(NYt(r),sW,fW);var a=e[2];if(a){dYt(r,oW);var u=a[1];ud(gVt[1],function(r){return nd(t,r)},r,u),dYt(r,vW)}else dYt(r,lW);nd(NYt(r),bW),nd(NYt(r),pW),ad(NYt(r),wW,kW);var i=e[3];return ud(gVt[1],function(r){return nd(t,r)},r,i),nd(NYt(r),dW),nd(NYt(r),hW)}),bk(zKt,function(t,r){var e=nd(HKt,t);return ad(LYt(ZV),e,r)}),bk(KKt,function(t,r,e,n){nd(NYt(e),TV),ad(NYt(e),OV,AV),ad(qKt,e,n[1]),nd(NYt(e),IV),nd(NYt(e),PV),ad(NYt(e),CV,DV);var a=n[2];nd(NYt(e),NV),ad(t,e,a[1]),nd(NYt(e),LV),ad(AVt[1],e,a[2]),nd(NYt(e),RV),nd(NYt(e),MV),nd(NYt(e),UV),ad(NYt(e),BV,jV);var u=n[3];if(u){dYt(e,XV);var i=u[1];ud(gVt[1],function(t){return nd(r,t)},e,i),dYt(e,JV)}else dYt(e,GV);nd(NYt(e),qV),nd(NYt(e),YV),ad(NYt(e),WV,VV);var c=n[4];if(c){dYt(e,HV);var f=c[1];id(VKt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),dYt(e,zV)}else dYt(e,KV);return nd(NYt(e),QV),nd(NYt(e),$V)}),bk(QKt,function(t,r,e){var n=ad(KKt,t,r);return ad(LYt(xV),n,e)});var $Kt=[0,qKt,YKt,VKt,WKt,HKt,zKt,KKt,QKt],ZKt=function t(r,e,n,a){return t.fun(r,e,n,a)},tQt=function t(r,e,n){return t.fun(r,e,n)};bk(ZKt,function(t,r,e,n){nd(NYt(e),bV),ad(NYt(e),kV,pV);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),wV),nd(NYt(e),dV),ad(NYt(e),mV,hV);var u=n[2];if(u){dYt(e,yV);var i=u[1];ad(NYt(e),_V,i),dYt(e,FV)}else dYt(e,EV);return nd(NYt(e),SV),nd(NYt(e),gV)}),bk(tQt,function(t,r,e){var n=ad(ZKt,t,r);return ad(LYt(lV),n,e)});var rQt=[0,ZKt,tQt],eQt=function t(r,e){return t.fun(r,e)},nQt=function t(r){return t.fun(r)},aQt=function t(r,e,n,a){return t.fun(r,e,n,a)},uQt=function t(r,e,n){return t.fun(r,e,n)},iQt=function t(r,e,n,a){return t.fun(r,e,n,a)},cQt=function t(r,e,n){return t.fun(r,e,n)};bk(eQt,function(t,r){return dYt(t,0===r?vV:oV)}),bk(nQt,function(t){return ad(LYt(sV),eQt,t)}),bk(aQt,function(t,r,e,n){nd(NYt(e),iV),ad(t,e,n[1]),nd(NYt(e),cV);var a=n[2];return id(iQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),fV)}),bk(uQt,function(t,r,e){var n=ad(aQt,t,r);return ad(LYt(uV),n,e)}),bk(iQt,function(t,r,e,n){if("number"==typeof n)return dYt(e,0===n?Gq:qq);switch(n[0]){case 0:nd(NYt(e),Yq);var a=n[1];return id(UHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Vq);case 1:nd(NYt(e),Wq);var u=n[1];return ud(WHt[1],function(r){return nd(t,r)},e,u),nd(NYt(e),Hq);case 2:nd(NYt(e),zq);var i=n[1];return id(MVt[8],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),Kq);case 3:nd(NYt(e),Qq);var c=n[1];return ud(KHt[1],function(r){return nd(t,r)},e,c),nd(NYt(e),$q);case 4:nd(NYt(e),Zq);var f=n[1];return id(oKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),nd(NYt(e),tY);case 5:nd(NYt(e),rY);var s=n[1];return id(GKt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,s),nd(NYt(e),eY);case 6:nd(NYt(e),nY);var o=n[1];return id(wKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,o),nd(NYt(e),aY);case 7:nd(NYt(e),uY);var v=n[1];return id(cKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,v),nd(NYt(e),iY);case 8:nd(NYt(e),cY);var l=n[1];return id(EKt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,l),nd(NYt(e),fY);case 9:nd(NYt(e),sY);var b=n[1];return id(PVt[9],function(r){return nd(t,r)},function(t){return nd(r,t)},e,b),nd(NYt(e),oY);case 10:nd(NYt(e),vY);var p=n[1];return id(ezt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,p),nd(NYt(e),lY);case 11:nd(NYt(e),bY);var k=n[1];return id(uzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,k),nd(NYt(e),pY);case 12:nd(NYt(e),kY);var w=n[1];return id(bKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,w),nd(NYt(e),wY);case 13:nd(NYt(e),dY);var d=n[1];return id(Gzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,d),nd(NYt(e),hY);case 14:nd(NYt(e),mY);var h=n[1];return id(UKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,h),nd(NYt(e),yY);case 15:nd(NYt(e),_Y);var m=n[1];return id(CKt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,m),nd(NYt(e),FY);case 16:nd(NYt(e),EY);var y=n[1];return id(rQt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,y),nd(NYt(e),SY);case 17:nd(NYt(e),gY);var _=n[1];return id(Hzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,_),nd(NYt(e),xY);case 18:nd(NYt(e),TY);var F=n[1];return id(Zzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,F),nd(NYt(e),AY);case 19:nd(NYt(e),OY);var E=n[1];return id(aKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,E),nd(NYt(e),IY);case 20:nd(NYt(e),PY);var S=n[1];return id(UVt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,S),nd(NYt(e),DY);case 21:nd(NYt(e),CY);var g=n[1];return id(XHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,g),nd(NYt(e),NY);case 22:nd(NYt(e),LY);var x=n[1];return id($Kt[7],function(r){return nd(t,r)},function(t){return nd(r,t)},e,x),nd(NYt(e),RY);case 23:nd(NYt(e),MY);var T=n[1];return id(cKt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,T),nd(NYt(e),UY);case 24:nd(NYt(e),jY);var A=n[1];return id(qHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,A),nd(NYt(e),BY);case 25:nd(NYt(e),XY);var O=n[1];return id(wzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,O),nd(NYt(e),JY);case 26:nd(NYt(e),GY);var I=n[1];return id(bzt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,I),nd(NYt(e),qY);case 27:nd(NYt(e),YY);var P=n[1];return id(mzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,P),nd(NYt(e),VY);case 28:nd(NYt(e),WY);var D=n[1];return id(Tzt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,D),nd(NYt(e),HY);case 29:nd(NYt(e),zY);var C=n[1];return id(ezt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,C),nd(NYt(e),KY);case 30:nd(NYt(e),QY);var N=n[1];return id(uzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,N),nd(NYt(e),$Y);case 31:nd(NYt(e),ZY);var L=n[1];return id(Mzt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,L),nd(NYt(e),tV);case 32:nd(NYt(e),rV);var R=n[1];return id(Bzt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,R),nd(NYt(e),eV);default:nd(NYt(e),nV);var M=n[1];return id(ZHt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,M),nd(NYt(e),aV)}}),bk(cQt,function(t,r,e){var n=ad(iQt,t,r);return ad(LYt(Jq),n,e)}),ud(MYt,Bat,DVt,[0,UHt,XHt,qHt,WHt,KHt,ZHt,ezt,uzt,bzt,wzt,mzt,Tzt,Mzt,Bzt,Gzt,Hzt,Zzt,aKt,cKt,oKt,bKt,wKt,EKt,CKt,UKt,GKt,$Kt,rQt,eQt,nQt,aQt,uQt,iQt,cQt]);var fQt=function t(r,e,n,a){return t.fun(r,e,n,a)},sQt=function t(r,e,n){return t.fun(r,e,n)},oQt=function t(r,e,n,a){return t.fun(r,e,n,a)},vQt=function t(r,e,n){return t.fun(r,e,n)},lQt=function t(r,e,n,a){return t.fun(r,e,n,a)},bQt=function t(r,e,n){return t.fun(r,e,n)};bk(fQt,function(t,r,e,n){nd(NYt(e),jq),ad(t,e,n[1]),nd(NYt(e),Bq);var a=n[2];return id(lQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Xq)}),bk(sQt,function(t,r,e){var n=ad(fQt,t,r);return ad(LYt(Uq),n,e)}),bk(oQt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),Nq);var a=n[1];return id(PVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Lq)}return nd(NYt(e),Rq),ad(r,e,n[1]),nd(NYt(e),Mq)}),bk(vQt,function(t,r,e){var n=ad(oQt,t,r);return ad(LYt(Cq),n,e)}),bk(lQt,function(t,r,e,n){nd(NYt(e),Pq);return AGt(function(n,a){return n&&nd(NYt(e),Iq),id(oQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,n),nd(NYt(e),Dq)}),bk(bQt,function(t,r,e){var n=ad(lQt,t,r);return ad(LYt(Oq),n,e)});var pQt=function t(r,e,n,a){return t.fun(r,e,n,a)},kQt=function t(r,e,n){return t.fun(r,e,n)},wQt=function t(r,e,n,a){return t.fun(r,e,n,a)},dQt=function t(r,e,n){return t.fun(r,e,n)},hQt=[0,fQt,sQt,oQt,vQt,lQt,bQt];bk(pQt,function(t,r,e,n){nd(NYt(e),xq),ad(t,e,n[1]),nd(NYt(e),Tq);var a=n[2];return id(wQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Aq)}),bk(kQt,function(t,r,e){var n=ad(pQt,t,r);return ad(LYt(gq),n,e)}),bk(wQt,function(t,r,e,n){nd(NYt(e),yq),ad(NYt(e),Fq,_q);var a=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Eq),nd(NYt(e),Sq)}),bk(dQt,function(t,r,e){var n=ad(wQt,t,r);return ad(LYt(mq),n,e)});var mQt=[0,pQt,kQt,wQt,dQt],yQt=function t(r,e,n,a){return t.fun(r,e,n,a)},_Qt=function t(r,e,n){return t.fun(r,e,n)};bk(yQt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),kq);var a=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),wq)}nd(NYt(e),dq);var u=n[1];return id(mQt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),hq)}),bk(_Qt,function(t,r,e){var n=ad(yQt,t,r);return ad(LYt(pq),n,e)});var FQt=function t(r,e,n,a){return t.fun(r,e,n,a)},EQt=function t(r,e,n){return t.fun(r,e,n)};bk(FQt,function(t,r,e,n){nd(NYt(e),cq),ad(NYt(e),sq,fq);var a=n[1];nd(NYt(e),oq);return AGt(function(n,a){if(n&&nd(NYt(e),nq),a){dYt(e,aq);var u=a[1];id(yQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,uq)}else dYt(e,iq);return 1},0,a),nd(NYt(e),vq),nd(NYt(e),lq),nd(NYt(e),bq)}),bk(EQt,function(t,r,e){var n=ad(FQt,t,r);return ad(LYt(eq),n,e)});var SQt=[0,FQt,EQt],gQt=function t(r,e){return t.fun(r,e)},xQt=function t(r){return t.fun(r)},TQt=function t(r,e,n){return t.fun(r,e,n)},AQt=function t(r,e){return t.fun(r,e)},OQt=function t(r,e){return t.fun(r,e)},IQt=function t(r){return t.fun(r)};bk(gQt,function(t,r){nd(NYt(t),YG),ad(NYt(t),WG,VG);var e=r[1];ad(NYt(t),HG,e),nd(NYt(t),zG),nd(NYt(t),KG),ad(NYt(t),$G,QG);var n=r[2];return ad(NYt(t),ZG,n),nd(NYt(t),tq),nd(NYt(t),rq)}),bk(xQt,function(t){return ad(LYt(qG),gQt,t)}),bk(TQt,function(t,r,e){return nd(NYt(r),XG),ad(t,r,e[1]),nd(NYt(r),JG),ad(OQt,r,e[2]),nd(NYt(r),GG)}),bk(AQt,function(t,r){var e=nd(TQt,t);return ad(LYt(BG),e,r)}),bk(OQt,function(t,r){nd(NYt(t),IG),ad(NYt(t),DG,PG),ad(gQt,t,r[1]),nd(NYt(t),CG),nd(NYt(t),NG),ad(NYt(t),RG,LG);var e=r[2];return ad(NYt(t),MG,e),nd(NYt(t),UG),nd(NYt(t),jG)}),bk(IQt,function(t){return ad(LYt(OG),OQt,t)});var PQt=[0,gQt,xQt,TQt,AQt,OQt,IQt],DQt=function t(r,e,n,a){return t.fun(r,e,n,a)},CQt=function t(r,e,n){return t.fun(r,e,n)};bk(DQt,function(t,r,e,n){nd(NYt(e),wG),ad(NYt(e),hG,dG);var a=n[1];nd(NYt(e),mG);AGt(function(r,n){return r&&nd(NYt(e),kG),ud(PQt[3],function(r){return nd(t,r)},e,n),1},0,a),nd(NYt(e),yG),nd(NYt(e),_G),nd(NYt(e),FG),ad(NYt(e),SG,EG);var u=n[2];nd(NYt(e),gG);return AGt(function(n,a){return n&&nd(NYt(e),pG),id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,u),nd(NYt(e),xG),nd(NYt(e),TG),nd(NYt(e),AG)}),bk(CQt,function(t,r,e){var n=ad(DQt,t,r);return ad(LYt(bG),n,e)});var NQt=[0,PQt,DQt,CQt],LQt=function t(r,e,n,a){return t.fun(r,e,n,a)},RQt=function t(r,e,n){return t.fun(r,e,n)};bk(LQt,function(t,r,e,n){nd(NYt(e),rG),ad(NYt(e),nG,eG);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),aG),nd(NYt(e),uG),ad(NYt(e),cG,iG);var u=n[2];nd(NYt(e),fG),ad(t,e,u[1]),nd(NYt(e),sG);var i=u[2];return id(NQt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),oG),nd(NYt(e),vG),nd(NYt(e),lG)}),bk(RQt,function(t,r,e){var n=ad(LQt,t,r);return ad(LYt(tG),n,e)});var MQt=[0,LQt,RQt],UQt=function t(r,e,n,a){return t.fun(r,e,n,a)},jQt=function t(r,e,n){return t.fun(r,e,n)},BQt=function t(r,e,n,a){return t.fun(r,e,n,a)},XQt=function t(r,e,n){return t.fun(r,e,n)},JQt=function t(r,e,n,a){return t.fun(r,e,n,a)},GQt=function t(r,e,n){return t.fun(r,e,n)};bk(UQt,function(t,r,e,n){switch(n[0]){case 0:var a=n[1];return nd(NYt(e),GJ),nd(NYt(e),qJ),ad(r,e,a[1]),nd(NYt(e),YJ),ad(TVt[2],e,a[2]),nd(NYt(e),VJ),nd(NYt(e),WJ);case 1:nd(NYt(e),HJ);var u=n[1];return ud(gVt[1],function(t){return nd(r,t)},e,u),nd(NYt(e),zJ);case 2:nd(NYt(e),KJ);var i=n[1];return ud(xVt[1],function(r){return nd(t,r)},e,i),nd(NYt(e),QJ);default:nd(NYt(e),$J);var c=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),ZJ)}}),bk(jQt,function(t,r,e){var n=ad(UQt,t,r);return ad(LYt(JJ),n,e)}),bk(BQt,function(t,r,e,n){nd(NYt(e),jJ),ad(t,e,n[1]),nd(NYt(e),BJ);var a=n[2];return id(JQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),XJ)}),bk(XQt,function(t,r,e){var n=ad(BQt,t,r);return ad(LYt(UJ),n,e)}),bk(JQt,function(t,r,e,n){switch(n[0]){case 0:nd(NYt(e),JX),ad(NYt(e),qX,GX);var a=n[1];id(UQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),YX),nd(NYt(e),VX),ad(NYt(e),HX,WX);var u=n[2];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),zX),nd(NYt(e),KX),ad(NYt(e),$X,QX);var i=n[3];return ad(NYt(e),ZX,i),nd(NYt(e),tJ),nd(NYt(e),rJ);case 1:var c=n[2];nd(NYt(e),eJ),ad(NYt(e),aJ,nJ);var f=n[1];id(UQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),nd(NYt(e),uJ),nd(NYt(e),iJ),ad(NYt(e),fJ,cJ),nd(NYt(e),sJ),ad(t,e,c[1]),nd(NYt(e),oJ);var s=c[2];return id(UVt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,s),nd(NYt(e),vJ),nd(NYt(e),lJ),nd(NYt(e),bJ);case 2:var o=n[2];nd(NYt(e),pJ),ad(NYt(e),wJ,kJ);var v=n[1];id(UQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,v),nd(NYt(e),dJ),nd(NYt(e),hJ),ad(NYt(e),yJ,mJ),nd(NYt(e),_J),ad(t,e,o[1]),nd(NYt(e),FJ);var l=o[2];return id(UVt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,l),nd(NYt(e),EJ),nd(NYt(e),SJ),nd(NYt(e),gJ);default:var b=n[2];nd(NYt(e),xJ),ad(NYt(e),AJ,TJ);var p=n[1];id(UQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,p),nd(NYt(e),OJ),nd(NYt(e),IJ),ad(NYt(e),DJ,PJ),nd(NYt(e),CJ),ad(t,e,b[1]),nd(NYt(e),NJ);var k=b[2];return id(UVt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,k),nd(NYt(e),LJ),nd(NYt(e),RJ),nd(NYt(e),MJ)}}),bk(GQt,function(t,r,e){var n=ad(JQt,t,r);return ad(LYt(XX),n,e)});var qQt=[0,UQt,jQt,BQt,XQt,JQt,GQt],YQt=function t(r,e,n,a){return t.fun(r,e,n,a)},VQt=function t(r,e,n){return t.fun(r,e,n)},WQt=function t(r,e,n,a){return t.fun(r,e,n,a)},HQt=function t(r,e,n){return t.fun(r,e,n)};bk(YQt,function(t,r,e,n){nd(NYt(e),UX),ad(t,e,n[1]),nd(NYt(e),jX);var a=n[2];return id(WQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),BX)}),bk(VQt,function(t,r,e){var n=ad(YQt,t,r);return ad(LYt(MX),n,e)}),bk(WQt,function(t,r,e,n){nd(NYt(e),DX),ad(NYt(e),NX,CX);var a=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),LX),nd(NYt(e),RX)}),bk(HQt,function(t,r,e){var n=ad(WQt,t,r);return ad(LYt(PX),n,e)});var zQt=[0,YQt,VQt,WQt,HQt],KQt=function t(r,e,n,a){return t.fun(r,e,n,a)},QQt=function t(r,e,n){return t.fun(r,e,n)},$Qt=function t(r,e,n,a){return t.fun(r,e,n,a)},ZQt=function t(r,e,n){return t.fun(r,e,n)};bk(KQt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),TX);var a=n[1];return id(qQt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),AX)}nd(NYt(e),OX);var u=n[1];return id(zQt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),IX)}),bk(QQt,function(t,r,e){var n=ad(KQt,t,r);return ad(LYt(xX),n,e)}),bk($Qt,function(t,r,e,n){nd(NYt(e),mX),ad(NYt(e),_X,yX);var a=n[1];nd(NYt(e),FX);return AGt(function(n,a){return n&&nd(NYt(e),hX),id(KQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),EX),nd(NYt(e),SX),nd(NYt(e),gX)}),bk(ZQt,function(t,r,e){var n=ad($Qt,t,r);return ad(LYt(dX),n,e)});var t$t=[0,qQt,zQt,KQt,QQt,$Qt,ZQt],r$t=function t(r,e,n,a){return t.fun(r,e,n,a)},e$t=function t(r,e,n){return t.fun(r,e,n)};bk(r$t,function(t,r,e,n){nd(NYt(e),oX),ad(NYt(e),lX,vX);var a=n[1];nd(NYt(e),bX);return AGt(function(n,a){return n&&nd(NYt(e),sX),id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),pX),nd(NYt(e),kX),nd(NYt(e),wX)}),bk(e$t,function(t,r,e){var n=ad(r$t,t,r);return ad(LYt(fX),n,e)});var n$t=[0,r$t,e$t],a$t=function t(r,e){return t.fun(r,e)},u$t=function t(r){return t.fun(r)},i$t=function t(r,e,n,a){return t.fun(r,e,n,a)},c$t=function t(r,e,n){return t.fun(r,e,n)};bk(a$t,function(t,r){switch(r){case 0:return dYt(t,tX);case 1:return dYt(t,rX);case 2:return dYt(t,eX);case 3:return dYt(t,nX);case 4:return dYt(t,aX);case 5:return dYt(t,uX);case 6:return dYt(t,iX);default:return dYt(t,cX)}}),bk(u$t,function(t){return ad(LYt(ZB),a$t,t)}),bk(i$t,function(t,r,e,n){nd(NYt(e),qB),ad(NYt(e),VB,YB),ad(a$t,e,n[1]),nd(NYt(e),WB),nd(NYt(e),HB),ad(NYt(e),KB,zB);var a=n[2];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),QB),nd(NYt(e),$B)}),bk(c$t,function(t,r,e){var n=ad(i$t,t,r);return ad(LYt(GB),n,e)});var f$t=[0,a$t,u$t,i$t,c$t],s$t=function t(r,e){return t.fun(r,e)},o$t=function t(r){return t.fun(r)},v$t=function t(r,e,n,a){return t.fun(r,e,n,a)},l$t=function t(r,e,n){return t.fun(r,e,n)};bk(s$t,function(t,r){switch(r){case 0:return dYt(t,_B);case 1:return dYt(t,FB);case 2:return dYt(t,EB);case 3:return dYt(t,SB);case 4:return dYt(t,gB);case 5:return dYt(t,xB);case 6:return dYt(t,TB);case 7:return dYt(t,AB);case 8:return dYt(t,OB);case 9:return dYt(t,IB);case 10:return dYt(t,PB);case 11:return dYt(t,DB);case 12:return dYt(t,CB);case 13:return dYt(t,NB);case 14:return dYt(t,LB);case 15:return dYt(t,RB);case 16:return dYt(t,MB);case 17:return dYt(t,UB);case 18:return dYt(t,jB);case 19:return dYt(t,BB);case 20:return dYt(t,XB);default:return dYt(t,JB)}}),bk(o$t,function(t){return ad(LYt(yB),s$t,t)}),bk(v$t,function(t,r,e,n){nd(NYt(e),cB),ad(NYt(e),sB,fB),ad(s$t,e,n[1]),nd(NYt(e),oB),nd(NYt(e),vB),ad(NYt(e),bB,lB);var a=n[2];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),pB),nd(NYt(e),kB),ad(NYt(e),dB,wB);var u=n[3];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),hB),nd(NYt(e),mB)}),bk(l$t,function(t,r,e){var n=ad(v$t,t,r);return ad(LYt(iB),n,e)});var b$t=[0,s$t,o$t,v$t,l$t],p$t=function t(r,e){return t.fun(r,e)},k$t=function t(r){return t.fun(r)},w$t=function t(r,e,n,a){return t.fun(r,e,n,a)},d$t=function t(r,e,n){return t.fun(r,e,n)};bk(p$t,function(t,r){switch(r){case 0:return dYt(t,Wj);case 1:return dYt(t,Hj);case 2:return dYt(t,zj);case 3:return dYt(t,Kj);case 4:return dYt(t,Qj);case 5:return dYt(t,$j);case 6:return dYt(t,Zj);case 7:return dYt(t,tB);case 8:return dYt(t,rB);case 9:return dYt(t,eB);case 10:return dYt(t,nB);case 11:return dYt(t,aB);default:return dYt(t,uB)}}),bk(k$t,function(t){return ad(LYt(Vj),p$t,t)}),bk(w$t,function(t,r,e,n){nd(NYt(e),Cj),ad(NYt(e),Lj,Nj),ad(p$t,e,n[1]),nd(NYt(e),Rj),nd(NYt(e),Mj),ad(NYt(e),jj,Uj);var a=n[2];id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Bj),nd(NYt(e),Xj),ad(NYt(e),Gj,Jj);var u=n[3];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),qj),nd(NYt(e),Yj)}),bk(d$t,function(t,r,e){var n=ad(w$t,t,r);return ad(LYt(Dj),n,e)});var h$t=[0,p$t,k$t,w$t,d$t],m$t=function t(r,e){return t.fun(r,e)},y$t=function t(r){return t.fun(r)},_$t=function t(r,e,n,a){return t.fun(r,e,n,a)},F$t=function t(r,e,n){return t.fun(r,e,n)};bk(m$t,function(t,r){return dYt(t,0===r?Pj:Ij)}),bk(y$t,function(t){return ad(LYt(Oj),m$t,t)}),bk(_$t,function(t,r,e,n){nd(NYt(e),kj),ad(NYt(e),dj,wj),ad(m$t,e,n[1]),nd(NYt(e),hj),nd(NYt(e),mj),ad(NYt(e),_j,yj);var a=n[2];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Fj),nd(NYt(e),Ej),ad(NYt(e),gj,Sj);var u=n[3];return ad(NYt(e),xj,u),nd(NYt(e),Tj),nd(NYt(e),Aj)}),bk(F$t,function(t,r,e){var n=ad(_$t,t,r);return ad(LYt(pj),n,e)});var E$t=[0,m$t,y$t,_$t,F$t],S$t=function t(r,e){return t.fun(r,e)},g$t=function t(r){return t.fun(r)},x$t=function t(r,e,n,a){return t.fun(r,e,n,a)},T$t=function t(r,e,n){return t.fun(r,e,n)};bk(S$t,function(t,r){switch(r){case 0:return dYt(t,vj);case 1:return dYt(t,lj);default:return dYt(t,bj)}}),bk(g$t,function(t){return ad(LYt(oj),S$t,t)}),bk(x$t,function(t,r,e,n){nd(NYt(e),QU),ad(NYt(e),ZU,$U),ad(S$t,e,n[1]),nd(NYt(e),tj),nd(NYt(e),rj),ad(NYt(e),nj,ej);var a=n[2];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),aj),nd(NYt(e),uj),ad(NYt(e),cj,ij);var u=n[3];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),fj),nd(NYt(e),sj)}),bk(T$t,function(t,r,e){var n=ad(x$t,t,r);return ad(LYt(KU),n,e)});var A$t=[0,S$t,g$t,x$t,T$t],O$t=function t(r,e,n,a){return t.fun(r,e,n,a)},I$t=function t(r,e,n){return t.fun(r,e,n)};bk(O$t,function(t,r,e,n){nd(NYt(e),MU),ad(NYt(e),jU,UU);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),BU),nd(NYt(e),XU),ad(NYt(e),GU,JU);var u=n[2];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),qU),nd(NYt(e),YU),ad(NYt(e),WU,VU);var i=n[3];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),HU),nd(NYt(e),zU)}),bk(I$t,function(t,r,e){var n=ad(O$t,t,r);return ad(LYt(RU),n,e)});var P$t=[0,O$t,I$t],D$t=function t(r,e,n,a){return t.fun(r,e,n,a)},C$t=function t(r,e,n){return t.fun(r,e,n)};bk(D$t,function(t,r,e,n){nd(NYt(e),hU),ad(NYt(e),yU,mU);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),_U),nd(NYt(e),FU),ad(NYt(e),SU,EU);var u=n[2];if(u){dYt(e,gU);var i=u[1];id(CVt[1][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,xU)}else dYt(e,TU);nd(NYt(e),AU),nd(NYt(e),OU),ad(NYt(e),PU,IU);var c=n[3];nd(NYt(e),DU);return AGt(function(n,a){return n&&nd(NYt(e),dU),id(yQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,c),nd(NYt(e),CU),nd(NYt(e),NU),nd(NYt(e),LU)}),bk(C$t,function(t,r,e){var n=ad(D$t,t,r);return ad(LYt(wU),n,e)});var N$t=[0,D$t,C$t],L$t=function t(r,e,n,a){return t.fun(r,e,n,a)},R$t=function t(r,e,n){return t.fun(r,e,n)};bk(L$t,function(t,r,e,n){nd(NYt(e),$M),ad(NYt(e),tU,ZM);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),rU),nd(NYt(e),eU),ad(NYt(e),aU,nU);var u=n[2];if(u){dYt(e,uU);var i=u[1];id(CVt[1][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,iU)}else dYt(e,cU);nd(NYt(e),fU),nd(NYt(e),sU),ad(NYt(e),vU,oU);var c=n[3];nd(NYt(e),lU);return AGt(function(n,a){return n&&nd(NYt(e),QM),id(yQt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,c),nd(NYt(e),bU),nd(NYt(e),pU),nd(NYt(e),kU)}),bk(R$t,function(t,r,e){var n=ad(L$t,t,r);return ad(LYt(KM),n,e)});var M$t=[0,L$t,R$t],U$t=function t(r,e,n,a){return t.fun(r,e,n,a)},j$t=function t(r,e,n){return t.fun(r,e,n)};bk(U$t,function(t,r,e,n){nd(NYt(e),BM),ad(NYt(e),JM,XM);var a=n[1];id(M$t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),GM),nd(NYt(e),qM),ad(NYt(e),VM,YM);var u=n[2];return ad(NYt(e),WM,u),nd(NYt(e),HM),nd(NYt(e),zM)}),bk(j$t,function(t,r,e){var n=ad(U$t,t,r);return ad(LYt(jM),n,e)});var B$t=[0,U$t,j$t],X$t=function t(r,e,n,a){return t.fun(r,e,n,a)},J$t=function t(r,e,n){return t.fun(r,e,n)},G$t=function t(r,e,n,a){return t.fun(r,e,n,a)},q$t=function t(r,e,n){return t.fun(r,e,n)};bk(X$t,function(t,r,e,n){switch(n[0]){case 0:nd(NYt(e),CM);var a=n[1];return ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),NM);case 1:nd(NYt(e),LM);var u=n[1];return ud(xVt[1],function(r){return nd(t,r)},e,u),nd(NYt(e),RM);default:nd(NYt(e),MM);var i=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),UM)}}),bk(J$t,function(t,r,e){var n=ad(X$t,t,r);return ad(LYt(DM),n,e)}),bk(G$t,function(t,r,e,n){nd(NYt(e),hM),ad(NYt(e),yM,mM);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),_M),nd(NYt(e),FM),ad(NYt(e),SM,EM);var u=n[2];id(X$t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),gM),nd(NYt(e),xM),ad(NYt(e),AM,TM);var i=n[3];return ad(NYt(e),OM,i),nd(NYt(e),IM),nd(NYt(e),PM)}),bk(q$t,function(t,r,e){var n=ad(G$t,t,r);return ad(LYt(dM),n,e)});var Y$t=[0,X$t,J$t,G$t,q$t],V$t=function t(r,e,n,a){return t.fun(r,e,n,a)},W$t=function t(r,e,n){return t.fun(r,e,n)};bk(V$t,function(t,r,e,n){nd(NYt(e),cM),ad(NYt(e),sM,fM);var a=n[1];id(Y$t[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),oM),nd(NYt(e),vM),ad(NYt(e),bM,lM);var u=n[2];return ad(NYt(e),pM,u),nd(NYt(e),kM),nd(NYt(e),wM)}),bk(W$t,function(t,r,e){var n=ad(V$t,t,r);return ad(LYt(iM),n,e)});var H$t=[0,V$t,W$t],z$t=function t(r,e,n,a){return t.fun(r,e,n,a)},K$t=function t(r,e,n){return t.fun(r,e,n)};bk(z$t,function(t,r,e,n){nd(NYt(e),WR),ad(NYt(e),zR,HR);var a=n[1];if(a){dYt(e,KR);var u=a[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,QR)}else dYt(e,$R);nd(NYt(e),ZR),nd(NYt(e),tM),ad(NYt(e),eM,rM);var i=n[2];return ad(NYt(e),nM,i),nd(NYt(e),aM),nd(NYt(e),uM)}),bk(K$t,function(t,r,e){var n=ad(z$t,t,r);return ad(LYt(VR),n,e)});var Q$t=[0,z$t,K$t],$$t=function t(r,e,n,a){return t.fun(r,e,n,a)},Z$t=function t(r,e,n){return t.fun(r,e,n)},tZt=function t(r,e,n,a){return t.fun(r,e,n,a)},rZt=function t(r,e,n){return t.fun(r,e,n)};bk($$t,function(t,r,e,n){nd(NYt(e),GR),ad(t,e,n[1]),nd(NYt(e),qR);var a=n[2];return id(tZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),YR)}),bk(Z$t,function(t,r,e){var n=ad($$t,t,r);return ad(LYt(JR),n,e)}),bk(tZt,function(t,r,e,n){nd(NYt(e),AR),ad(NYt(e),IR,OR);var a=n[1];id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),PR),nd(NYt(e),DR),ad(NYt(e),NR,CR);var u=n[2];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),LR),nd(NYt(e),RR),ad(NYt(e),UR,MR);var i=n[3];return ad(NYt(e),jR,i),nd(NYt(e),BR),nd(NYt(e),XR)}),bk(rZt,function(t,r,e){var n=ad(tZt,t,r);return ad(LYt(TR),n,e)});var eZt=[0,$$t,Z$t,tZt,rZt],nZt=function t(r,e,n,a){return t.fun(r,e,n,a)},aZt=function t(r,e,n){return t.fun(r,e,n)};bk(nZt,function(t,r,e,n){nd(NYt(e),bR),ad(NYt(e),kR,pR);var a=n[1];nd(NYt(e),wR);AGt(function(n,a){return n&&nd(NYt(e),lR),id(eZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),dR),nd(NYt(e),hR),nd(NYt(e),mR),ad(NYt(e),_R,yR);var u=n[2];if(u){dYt(e,FR);var i=u[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,ER)}else dYt(e,SR);return nd(NYt(e),gR),nd(NYt(e),xR)}),bk(aZt,function(t,r,e){var n=ad(nZt,t,r);return ad(LYt(vR),n,e)});var uZt=[0,eZt,nZt,aZt],iZt=function t(r,e,n,a){return t.fun(r,e,n,a)},cZt=function t(r,e,n){return t.fun(r,e,n)};bk(iZt,function(t,r,e,n){nd(NYt(e),QL),ad(NYt(e),ZL,$L);var a=n[1];nd(NYt(e),tR);AGt(function(n,a){return n&&nd(NYt(e),KL),id(uZt[1][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),rR),nd(NYt(e),eR),nd(NYt(e),nR),ad(NYt(e),uR,aR);var u=n[2];if(u){dYt(e,iR);var i=u[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,cR)}else dYt(e,fR);return nd(NYt(e),sR),nd(NYt(e),oR)}),bk(cZt,function(t,r,e){var n=ad(iZt,t,r);return ad(LYt(zL),n,e)});var fZt=[0,iZt,cZt],sZt=function t(r,e,n,a){return t.fun(r,e,n,a)},oZt=function t(r,e,n){return t.fun(r,e,n)};bk(sZt,function(t,r,e,n){nd(NYt(e),BL),ad(NYt(e),JL,XL);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),GL),nd(NYt(e),qL),ad(NYt(e),VL,YL);var u=n[2];return id(PVt[9],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),WL),nd(NYt(e),HL)}),bk(oZt,function(t,r,e){var n=ad(sZt,t,r);return ad(LYt(jL),n,e)});var vZt=[0,sZt,oZt],lZt=function t(r,e,n){return t.fun(r,e,n)},bZt=function t(r,e){return t.fun(r,e)};bk(lZt,function(t,r,e){nd(NYt(r),IL),ad(NYt(r),DL,PL);var n=e[1];ud(gVt[1],function(r){return nd(t,r)},r,n),nd(NYt(r),CL),nd(NYt(r),NL),ad(NYt(r),RL,LL);var a=e[2];return ud(gVt[1],function(r){return nd(t,r)},r,a),nd(NYt(r),ML),nd(NYt(r),UL)}),bk(bZt,function(t,r){var e=nd(lZt,t);return ad(LYt(OL),e,r)});var pZt=[0,lZt,bZt],kZt=function t(r,e,n,a){return t.fun(r,e,n,a)},wZt=function t(r,e,n){return t.fun(r,e,n)},dZt=function t(r,e,n,a){return t.fun(r,e,n,a)},hZt=function t(r,e,n){return t.fun(r,e,n)};bk(kZt,function(t,r,e,n){nd(NYt(e),xL),ad(r,e,n[1]),nd(NYt(e),TL);var a=n[2];return id(dZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),AL)}),bk(wZt,function(t,r,e){var n=ad(kZt,t,r);return ad(LYt(gL),n,e)}),bk(dZt,function(t,r,e,n){if("number"==typeof n)return dYt(e,0===n?mN:yN);switch(n[0]){case 0:nd(NYt(e),_N);var a=n[1];return id(SQt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),FN);case 1:nd(NYt(e),EN);var u=n[1];return id(UVt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),SN);case 2:nd(NYt(e),gN);var i=n[1];return id(h$t[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),xN);case 3:nd(NYt(e),TN);var c=n[1];return id(b$t[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),AN);case 4:nd(NYt(e),ON);var f=n[1];return id(M$t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),nd(NYt(e),IN);case 5:nd(NYt(e),PN);var s=n[1];return id(MVt[8],function(r){return nd(t,r)},function(t){return nd(r,t)},e,s),nd(NYt(e),DN);case 6:nd(NYt(e),CN);var o=n[1];return id(uZt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,o),nd(NYt(e),NN);case 7:nd(NYt(e),LN);var v=n[1];return id(P$t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,v),nd(NYt(e),RN);case 8:nd(NYt(e),MN);var l=n[1];return id(UVt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,l),nd(NYt(e),UN);case 9:nd(NYt(e),jN);var b=n[1];return id(fZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,b),nd(NYt(e),BN);case 10:nd(NYt(e),XN);var p=n[1];return ud(gVt[1],function(t){return nd(r,t)},e,p),nd(NYt(e),JN);case 11:nd(NYt(e),GN);var k=n[1];return id(kZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,k),nd(NYt(e),qN);case 12:nd(NYt(e),YN);var w=n[1];return id(NVt[16],function(r){return nd(t,r)},function(t){return nd(r,t)},e,w),nd(NYt(e),VN);case 13:nd(NYt(e),WN);var d=n[1];return id(NVt[18],function(r){return nd(t,r)},function(t){return nd(r,t)},e,d),nd(NYt(e),HN);case 14:return nd(NYt(e),zN),ad(TVt[2],e,n[1]),nd(NYt(e),KN);case 15:nd(NYt(e),QN);var h=n[1];return id(A$t[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,h),nd(NYt(e),$N);case 16:nd(NYt(e),ZN);var m=n[1];return id(Y$t[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,m),nd(NYt(e),tL);case 17:nd(NYt(e),rL);var y=n[1];return ud(pZt[1],function(r){return nd(t,r)},e,y),nd(NYt(e),eL);case 18:nd(NYt(e),nL);var _=n[1];return id(N$t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,_),nd(NYt(e),aL);case 19:nd(NYt(e),uL);var F=n[1];return id(t$t[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,F),nd(NYt(e),iL);case 20:nd(NYt(e),cL);var E=n[1];return id(B$t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,E),nd(NYt(e),fL);case 21:nd(NYt(e),sL);var S=n[1];return id(H$t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,S),nd(NYt(e),oL);case 22:nd(NYt(e),vL);var g=n[1];return id(n$t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,g),nd(NYt(e),lL);case 23:nd(NYt(e),bL);var x=n[1];return id(MQt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,x),nd(NYt(e),pL);case 24:nd(NYt(e),kL);var T=n[1];return id(NQt[2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,T),nd(NYt(e),wL);case 25:nd(NYt(e),dL);var A=n[1];return id(vZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,A),nd(NYt(e),hL);case 26:nd(NYt(e),mL);var O=n[1];return id(f$t[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,O),nd(NYt(e),yL);case 27:nd(NYt(e),_L);var I=n[1];return id(E$t[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,I),nd(NYt(e),FL);default:nd(NYt(e),EL);var P=n[1];return id(Q$t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,P),nd(NYt(e),SL)}}),bk(hZt,function(t,r,e){var n=ad(dZt,t,r);return ad(LYt(hN),n,e)}),ud(MYt,Xat,CVt,[0,hQt,mQt,yQt,_Qt,SQt,NQt,MQt,t$t,n$t,f$t,b$t,h$t,E$t,A$t,P$t,N$t,M$t,B$t,Y$t,H$t,Q$t,uZt,fZt,vZt,pZt,kZt,wZt,dZt,hZt]);var mZt=function t(r,e,n){return t.fun(r,e,n)},yZt=function t(r,e){return t.fun(r,e)},_Zt=function t(r,e){return t.fun(r,e)},FZt=function t(r){return t.fun(r)};bk(mZt,function(t,r,e){return nd(NYt(r),kN),ad(t,r,e[1]),nd(NYt(r),wN),ad(_Zt,r,e[2]),nd(NYt(r),dN)}),bk(yZt,function(t,r){var e=nd(mZt,t);return ad(LYt(pN),e,r)}),bk(_Zt,function(t,r){nd(NYt(t),fN),ad(NYt(t),oN,sN);var e=r[1];return ad(NYt(t),vN,e),nd(NYt(t),lN),nd(NYt(t),bN)}),bk(FZt,function(t){return ad(LYt(cN),_Zt,t)});var EZt=[0,mZt,yZt,_Zt,FZt],SZt=function t(r,e,n,a){return t.fun(r,e,n,a)},gZt=function t(r,e,n){return t.fun(r,e,n)},xZt=function t(r,e,n){return t.fun(r,e,n)},TZt=function t(r,e){return t.fun(r,e)};bk(SZt,function(t,r,e,n){nd(NYt(e),aN),ad(t,e,n[1]),nd(NYt(e),uN);var a=n[2];return ud(xZt,function(t){return nd(r,t)},e,a),nd(NYt(e),iN)}),bk(gZt,function(t,r,e){var n=ad(SZt,t,r);return ad(LYt(nN),n,e)}),bk(xZt,function(t,r,e){nd(NYt(r),HC),ad(NYt(r),KC,zC);var n=e[1];ud(EZt[1],function(r){return nd(t,r)},r,n),nd(NYt(r),QC),nd(NYt(r),$C),ad(NYt(r),tN,ZC);var a=e[2];return ud(EZt[1],function(r){return nd(t,r)},r,a),nd(NYt(r),rN),nd(NYt(r),eN)}),bk(TZt,function(t,r){var e=nd(xZt,t);return ad(LYt(WC),e,r)});var AZt=[0,SZt,gZt,xZt,TZt],OZt=function t(r,e,n,a){return t.fun(r,e,n,a)},IZt=function t(r,e,n){return t.fun(r,e,n)},PZt=function t(r,e,n,a){return t.fun(r,e,n,a)},DZt=function t(r,e,n){return t.fun(r,e,n)};bk(OZt,function(t,r,e,n){nd(NYt(e),JC),ad(NYt(e),qC,GC);var a=n[1];return id(PZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),YC),nd(NYt(e),VC)}),bk(IZt,function(t,r,e){var n=ad(OZt,t,r);return ad(LYt(XC),n,e)}),bk(PZt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),MC);var a=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),UC)}return nd(NYt(e),jC),ad(t,e,n[1]),nd(NYt(e),BC)}),bk(DZt,function(t,r,e){var n=ad(PZt,t,r);return ad(LYt(RC),n,e)});var CZt=[0,OZt,IZt,PZt,DZt],NZt=function(t,r){nd(NYt(t),SC),ad(NYt(t),xC,gC);var e=r[1];ad(NYt(t),TC,e),nd(NYt(t),AC),nd(NYt(t),OC),ad(NYt(t),PC,IC);var n=r[2];return ad(NYt(t),DC,n),nd(NYt(t),CC),nd(NYt(t),NC)},LZt=[0,NZt,function(t){return ad(LYt(LC),NZt,t)}],RZt=function t(r,e,n,a){return t.fun(r,e,n,a)},MZt=function t(r,e,n){return t.fun(r,e,n)},UZt=function t(r,e,n,a){return t.fun(r,e,n,a)},jZt=function t(r,e,n){return t.fun(r,e,n)},BZt=function t(r,e,n,a){return t.fun(r,e,n,a)},XZt=function t(r,e,n){return t.fun(r,e,n)},JZt=function t(r,e,n,a){return t.fun(r,e,n,a)},GZt=function t(r,e,n){return t.fun(r,e,n)};bk(RZt,function(t,r,e,n){nd(NYt(e),_C),ad(t,e,n[1]),nd(NYt(e),FC);var a=n[2];return id(JZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),EC)}),bk(MZt,function(t,r,e){var n=ad(RZt,t,r);return ad(LYt(yC),n,e)}),bk(UZt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),wC);var a=n[1];return ud(EZt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),dC)}nd(NYt(e),hC);var u=n[1];return id(AZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),mC)}),bk(jZt,function(t,r,e){var n=ad(UZt,t,r);return ad(LYt(kC),n,e)}),bk(BZt,function(t,r,e,n){if(0===n[0])return nd(NYt(e),sC),ad(r,e,n[1]),nd(NYt(e),oC),ad(TVt[2],e,n[2]),nd(NYt(e),vC);nd(NYt(e),lC),ad(r,e,n[1]),nd(NYt(e),bC);var a=n[2];return id(CZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),pC)}),bk(XZt,function(t,r,e){var n=ad(BZt,t,r);return ad(LYt(fC),n,e)}),bk(JZt,function(t,r,e,n){nd(NYt(e),KD),ad(NYt(e),$D,QD);var a=n[1];id(UZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),ZD),nd(NYt(e),tC),ad(NYt(e),eC,rC);var u=n[2];if(u){dYt(e,nC);var i=u[1];id(BZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,aC)}else dYt(e,uC);return nd(NYt(e),iC),nd(NYt(e),cC)}),bk(GZt,function(t,r,e){var n=ad(JZt,t,r);return ad(LYt(zD),n,e)});var qZt=[0,RZt,MZt,UZt,jZt,BZt,XZt,JZt,GZt],YZt=function t(r,e,n,a){return t.fun(r,e,n,a)},VZt=function t(r,e,n){return t.fun(r,e,n)},WZt=function t(r,e,n,a){return t.fun(r,e,n,a)},HZt=function t(r,e,n){return t.fun(r,e,n)};bk(YZt,function(t,r,e,n){nd(NYt(e),VD),ad(t,e,n[1]),nd(NYt(e),WD);var a=n[2];return id(WZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),HD)}),bk(VZt,function(t,r,e){var n=ad(YZt,t,r);return ad(LYt(YD),n,e)}),bk(WZt,function(t,r,e,n){nd(NYt(e),BD),ad(NYt(e),JD,XD);var a=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),GD),nd(NYt(e),qD)}),bk(HZt,function(t,r,e){var n=ad(WZt,t,r);return ad(LYt(jD),n,e)});var zZt=[0,YZt,VZt,WZt,HZt],KZt=function t(r,e,n,a){return t.fun(r,e,n,a)},QZt=function t(r,e,n){return t.fun(r,e,n)},$Zt=function t(r,e,n,a){return t.fun(r,e,n,a)},ZZt=function t(r,e,n){return t.fun(r,e,n)},t0t=function t(r,e,n,a){return t.fun(r,e,n,a)},r0t=function t(r,e,n){return t.fun(r,e,n)};bk(KZt,function(t,r,e,n){nd(NYt(e),RD),ad(t,e,n[1]),nd(NYt(e),MD);var a=n[2];return id(t0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),UD)}),bk(QZt,function(t,r,e){var n=ad(KZt,t,r);return ad(LYt(LD),n,e)}),bk($Zt,function(t,r,e,n){if(0===n[0]){nd(NYt(e),PD);var a=n[1];return ud(EZt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),DD)}nd(NYt(e),CD);var u=n[1];return id(KZt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),ND)}),bk(ZZt,function(t,r,e){var n=ad($Zt,t,r);return ad(LYt(ID),n,e)}),bk(t0t,function(t,r,e,n){nd(NYt(e),_D),ad(NYt(e),ED,FD);var a=n[1];id($Zt,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),SD),nd(NYt(e),gD),ad(NYt(e),TD,xD);var u=n[2];return ud(EZt[1],function(t){return nd(r,t)},e,u),nd(NYt(e),AD),nd(NYt(e),OD)}),bk(r0t,function(t,r,e){var n=ad(t0t,t,r);return ad(LYt(yD),n,e)});var e0t=[0,KZt,QZt,$Zt,ZZt,t0t,r0t],n0t=function t(r,e,n,a){return t.fun(r,e,n,a)},a0t=function t(r,e,n){return t.fun(r,e,n)};bk(n0t,function(t,r,e,n){switch(n[0]){case 0:nd(NYt(e),pD);var a=n[1];return ud(EZt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),kD);case 1:nd(NYt(e),wD);var u=n[1];return id(AZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),dD);default:nd(NYt(e),hD);var i=n[1];return id(e0t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),mD)}}),bk(a0t,function(t,r,e){var n=ad(n0t,t,r);return ad(LYt(bD),n,e)});var u0t=function t(r,e,n,a){return t.fun(r,e,n,a)},i0t=function t(r,e,n){return t.fun(r,e,n)},c0t=function t(r,e,n,a){return t.fun(r,e,n,a)},f0t=function t(r,e,n){return t.fun(r,e,n)},s0t=function t(r,e,n,a){return t.fun(r,e,n,a)},o0t=function t(r,e,n){return t.fun(r,e,n)};bk(u0t,function(t,r,e,n){nd(NYt(e),oD),ad(t,e,n[1]),nd(NYt(e),vD);var a=n[2];return id(s0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),lD)}),bk(i0t,function(t,r,e){var n=ad(u0t,t,r);return ad(LYt(sD),n,e)}),bk(c0t,function(t,r,e,n){if(0===n[0]){nd(NYt(e),uD);var a=n[1];return id(qZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),iD)}nd(NYt(e),cD);var u=n[1];return id(zZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),fD)}),bk(f0t,function(t,r,e){var n=ad(c0t,t,r);return ad(LYt(aD),n,e)}),bk(s0t,function(t,r,e,n){nd(NYt(e),JP),ad(NYt(e),qP,GP);var a=n[1];id(n0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),YP),nd(NYt(e),VP),ad(NYt(e),HP,WP);var u=n[2];ad(NYt(e),zP,u),nd(NYt(e),KP),nd(NYt(e),QP),ad(NYt(e),ZP,$P);var i=n[3];nd(NYt(e),tD);return AGt(function(n,a){return n&&nd(NYt(e),XP),id(c0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,i),nd(NYt(e),rD),nd(NYt(e),eD),nd(NYt(e),nD)}),bk(o0t,function(t,r,e){var n=ad(s0t,t,r);return ad(LYt(BP),n,e)});var v0t=[0,u0t,i0t,c0t,f0t,s0t,o0t],l0t=function t(r,e,n,a){return t.fun(r,e,n,a)},b0t=function t(r,e,n){return t.fun(r,e,n)},p0t=function t(r,e,n,a){return t.fun(r,e,n,a)},k0t=function t(r,e,n){return t.fun(r,e,n)};bk(l0t,function(t,r,e,n){nd(NYt(e),MP),ad(t,e,n[1]),nd(NYt(e),UP);var a=n[2];return id(p0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),jP)}),bk(b0t,function(t,r,e){var n=ad(l0t,t,r);return ad(LYt(RP),n,e)}),bk(p0t,function(t,r,e,n){nd(NYt(e),PP),ad(NYt(e),CP,DP);var a=n[1];return id(n0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),NP),nd(NYt(e),LP)}),bk(k0t,function(t,r,e){var n=ad(p0t,t,r);return ad(LYt(IP),n,e)});var w0t=[0,l0t,b0t,p0t,k0t],d0t=function t(r,e,n,a){return t.fun(r,e,n,a)},h0t=function t(r,e,n){return t.fun(r,e,n)},m0t=function t(r,e,n,a){return t.fun(r,e,n,a)},y0t=function t(r,e,n){return t.fun(r,e,n)},_0t=function t(r,e,n,a){return t.fun(r,e,n,a)},F0t=function t(r,e,n){return t.fun(r,e,n)},E0t=function t(r,e,n,a){return t.fun(r,e,n,a)},S0t=function t(r,e,n){return t.fun(r,e,n)};bk(d0t,function(t,r,e,n){nd(NYt(e),TP),ad(t,e,n[1]),nd(NYt(e),AP);var a=n[2];return id(m0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),OP)}),bk(h0t,function(t,r,e){var n=ad(d0t,t,r);return ad(LYt(xP),n,e)}),bk(m0t,function(t,r,e,n){switch(n[0]){case 0:nd(NYt(e),wP);var a=n[1];return id(_0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),dP);case 1:nd(NYt(e),hP);var u=n[1];return id(E0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),mP);case 2:nd(NYt(e),yP);var i=n[1];return id(CZt[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),_P);case 3:nd(NYt(e),FP);var c=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),EP);default:return nd(NYt(e),SP),ad(LZt[1],e,n[1]),nd(NYt(e),gP)}}),bk(y0t,function(t,r,e){var n=ad(m0t,t,r);return ad(LYt(kP),n,e)}),bk(_0t,function(t,r,e,n){nd(NYt(e),QI),ad(NYt(e),ZI,$I);var a=n[1];id(v0t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),tP),nd(NYt(e),rP),ad(NYt(e),nP,eP);var u=n[2];if(u){dYt(e,aP);var i=u[1];id(w0t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,uP)}else dYt(e,iP);nd(NYt(e),cP),nd(NYt(e),fP),ad(NYt(e),oP,sP);var c=n[3];nd(NYt(e),vP);return AGt(function(n,a){return n&&nd(NYt(e),KI),id(d0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,c),nd(NYt(e),lP),nd(NYt(e),bP),nd(NYt(e),pP)}),bk(F0t,function(t,r,e){var n=ad(_0t,t,r);return ad(LYt(zI),n,e)}),bk(E0t,function(t,r,e,n){nd(NYt(e),PI),ad(NYt(e),CI,DI),ad(t,e,n[1]),nd(NYt(e),NI),nd(NYt(e),LI),ad(NYt(e),MI,RI);var a=n[2];a?(dYt(e,UI),ad(t,e,a[1]),dYt(e,jI)):dYt(e,BI),nd(NYt(e),XI),nd(NYt(e),JI),ad(NYt(e),qI,GI);var u=n[3];nd(NYt(e),YI);return AGt(function(n,a){return n&&nd(NYt(e),II),id(d0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,u),nd(NYt(e),VI),nd(NYt(e),WI),nd(NYt(e),HI)}),bk(S0t,function(t,r,e){var n=ad(E0t,t,r);return ad(LYt(OI),n,e)}),ud(MYt,Jat,NVt,[0,EZt,AZt,CZt,LZt,qZt,zZt,e0t,n0t,a0t,v0t,w0t,d0t,h0t,m0t,y0t,_0t,F0t,E0t,S0t]);var g0t=function t(r,e,n,a){return t.fun(r,e,n,a)},x0t=function t(r,e,n){return t.fun(r,e,n)},T0t=function t(r,e,n,a){return t.fun(r,e,n,a)},A0t=function t(r,e,n){return t.fun(r,e,n)},O0t=function t(r,e,n,a){return t.fun(r,e,n,a)},I0t=function t(r,e,n){return t.fun(r,e,n)};bk(g0t,function(t,r,e,n){switch(n[0]){case 0:var a=n[1];return nd(NYt(e),yI),nd(NYt(e),_I),ad(t,e,a[1]),nd(NYt(e),FI),ad(TVt[2],e,a[2]),nd(NYt(e),EI),nd(NYt(e),SI);case 1:nd(NYt(e),gI);var u=n[1];return ud(gVt[1],function(r){return nd(t,r)},e,u),nd(NYt(e),xI);default:nd(NYt(e),TI);var i=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),AI)}}),bk(x0t,function(t,r,e){var n=ad(g0t,t,r);return ad(LYt(mI),n,e)}),bk(T0t,function(t,r,e,n){nd(NYt(e),wI),ad(t,e,n[1]),nd(NYt(e),dI);var a=n[2];return id(O0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),hI)}),bk(A0t,function(t,r,e){var n=ad(T0t,t,r);return ad(LYt(kI),n,e)}),bk(O0t,function(t,r,e,n){nd(NYt(e),rI),ad(NYt(e),nI,eI);var a=n[1];id(g0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),aI),nd(NYt(e),uI),ad(NYt(e),cI,iI);var u=n[2];id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),fI),nd(NYt(e),sI),ad(NYt(e),vI,oI);var i=n[3];return ad(NYt(e),lI,i),nd(NYt(e),bI),nd(NYt(e),pI)}),bk(I0t,function(t,r,e){var n=ad(O0t,t,r);return ad(LYt(tI),n,e)});var P0t=[0,g0t,x0t,T0t,A0t,O0t,I0t],D0t=function t(r,e,n,a){return t.fun(r,e,n,a)},C0t=function t(r,e,n){return t.fun(r,e,n)},N0t=function t(r,e,n,a){return t.fun(r,e,n,a)},L0t=function t(r,e,n){return t.fun(r,e,n)};bk(D0t,function(t,r,e,n){nd(NYt(e),QO),ad(t,e,n[1]),nd(NYt(e),$O);var a=n[2];return id(N0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),ZO)}),bk(C0t,function(t,r,e){var n=ad(D0t,t,r);return ad(LYt(KO),n,e)}),bk(N0t,function(t,r,e,n){nd(NYt(e),YO),ad(NYt(e),WO,VO);var a=n[1];return id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),HO),nd(NYt(e),zO)}),bk(L0t,function(t,r,e){var n=ad(N0t,t,r);return ad(LYt(qO),n,e)});var R0t=[0,D0t,C0t,N0t,L0t],M0t=function t(r,e,n,a){return t.fun(r,e,n,a)},U0t=function t(r,e,n){return t.fun(r,e,n)},j0t=function t(r,e,n,a){return t.fun(r,e,n,a)},B0t=function t(r,e,n){return t.fun(r,e,n)};bk(M0t,function(t,r,e,n){if(0===n[0]){nd(NYt(e),BO);var a=n[1];return id(P0t[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),XO)}nd(NYt(e),JO);var u=n[1];return id(R0t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),GO)}),bk(U0t,function(t,r,e){var n=ad(M0t,t,r);return ad(LYt(jO),n,e)}),bk(j0t,function(t,r,e,n){nd(NYt(e),AO),ad(NYt(e),IO,OO);var a=n[1];nd(NYt(e),PO);AGt(function(n,a){return n&&nd(NYt(e),TO),id(M0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),DO),nd(NYt(e),CO),nd(NYt(e),NO),ad(NYt(e),RO,LO);var u=n[2];return id(PVt[11],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),MO),nd(NYt(e),UO)}),bk(B0t,function(t,r,e){var n=ad(j0t,t,r);return ad(LYt(xO),n,e)});var X0t=[0,P0t,R0t,M0t,U0t,j0t,B0t],J0t=function t(r,e,n,a){return t.fun(r,e,n,a)},G0t=function t(r,e,n){return t.fun(r,e,n)},q0t=function t(r,e,n,a){return t.fun(r,e,n,a)},Y0t=function t(r,e,n){return t.fun(r,e,n)};bk(J0t,function(t,r,e,n){nd(NYt(e),EO),ad(t,e,n[1]),nd(NYt(e),SO);var a=n[2];return id(q0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),gO)}),bk(G0t,function(t,r,e){var n=ad(J0t,t,r);return ad(LYt(FO),n,e)}),bk(q0t,function(t,r,e,n){nd(NYt(e),dO),ad(NYt(e),mO,hO);var a=n[1];return id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),yO),nd(NYt(e),_O)}),bk(Y0t,function(t,r,e){var n=ad(q0t,t,r);return ad(LYt(wO),n,e)});var V0t=[0,J0t,G0t,q0t,Y0t],W0t=function t(r,e,n,a){return t.fun(r,e,n,a)},H0t=function t(r,e,n){return t.fun(r,e,n)},z0t=function t(r,e,n,a){return t.fun(r,e,n,a)},K0t=function t(r,e,n){return t.fun(r,e,n)};bk(W0t,function(t,r,e,n){if(0===n[0]){nd(NYt(e),lO);var a=n[1];return id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),bO)}nd(NYt(e),pO);var u=n[1];return id(V0t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),kO)}),bk(H0t,function(t,r,e){var n=ad(W0t,t,r);return ad(LYt(vO),n,e)}),bk(z0t,function(t,r,e,n){nd(NYt(e),tO),ad(NYt(e),eO,rO);var a=n[1];nd(NYt(e),nO);AGt(function(n,a){if(n&&nd(NYt(e),KA),a){dYt(e,QA);var u=a[1];id(W0t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),dYt(e,$A)}else dYt(e,ZA);return 1},0,a),nd(NYt(e),aO),nd(NYt(e),uO),nd(NYt(e),iO),ad(NYt(e),fO,cO);var u=n[2];return id(PVt[11],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),sO),nd(NYt(e),oO)}),bk(K0t,function(t,r,e){var n=ad(z0t,t,r);return ad(LYt(zA),n,e)});var Q0t=[0,V0t,W0t,H0t,z0t,K0t],$0t=function t(r,e,n,a){return t.fun(r,e,n,a)},Z0t=function t(r,e,n){return t.fun(r,e,n)};bk($0t,function(t,r,e,n){nd(NYt(e),BA),ad(NYt(e),JA,XA);var a=n[1];id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),GA),nd(NYt(e),qA),ad(NYt(e),VA,YA);var u=n[2];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),WA),nd(NYt(e),HA)}),bk(Z0t,function(t,r,e){var n=ad($0t,t,r);return ad(LYt(jA),n,e)});var t1t=[0,$0t,Z0t],r1t=function t(r,e,n,a){return t.fun(r,e,n,a)},e1t=function t(r,e,n){return t.fun(r,e,n)};bk(r1t,function(t,r,e,n){nd(NYt(e),gA),ad(NYt(e),TA,xA);var a=n[1];ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),AA),nd(NYt(e),OA),ad(NYt(e),PA,IA);var u=n[2];id(PVt[11],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),DA),nd(NYt(e),CA),ad(NYt(e),LA,NA);var i=n[3];return ad(NYt(e),RA,i),nd(NYt(e),MA),nd(NYt(e),UA)}),bk(e1t,function(t,r,e){var n=ad(r1t,t,r);return ad(LYt(SA),n,e)});var n1t=[0,r1t,e1t],a1t=function t(r,e,n,a){return t.fun(r,e,n,a)},u1t=function t(r,e,n){return t.fun(r,e,n)},i1t=function t(r,e,n,a){return t.fun(r,e,n,a)},c1t=function t(r,e,n){return t.fun(r,e,n)};bk(a1t,function(t,r,e,n){nd(NYt(e),_A),ad(r,e,n[1]),nd(NYt(e),FA);var a=n[2];return id(i1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),EA)}),bk(u1t,function(t,r,e){var n=ad(a1t,t,r);return ad(LYt(yA),n,e)}),bk(i1t,function(t,r,e,n){switch(n[0]){case 0:nd(NYt(e),oA);var a=n[1];return id(X0t[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),vA);case 1:nd(NYt(e),lA);var u=n[1];return id(Q0t[4],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),bA);case 2:nd(NYt(e),pA);var i=n[1];return id(t1t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),kA);case 3:nd(NYt(e),wA);var c=n[1];return id(n1t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),dA);default:nd(NYt(e),hA);var f=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),nd(NYt(e),mA)}}),bk(c1t,function(t,r,e){var n=ad(i1t,t,r);return ad(LYt(sA),n,e)}),ud(MYt,Gat,LVt,[0,X0t,Q0t,t1t,n1t,a1t,u1t,i1t,c1t]);var f1t=function t(r,e,n){return t.fun(r,e,n)},s1t=function t(r,e){return t.fun(r,e)},o1t=function t(r,e){return t.fun(r,e)},v1t=function t(r){return t.fun(r)};bk(f1t,function(t,r,e){return nd(NYt(r),iA),ad(t,r,e[1]),nd(NYt(r),cA),ad(o1t,r,e[2]),nd(NYt(r),fA)}),bk(s1t,function(t,r){var e=nd(f1t,t);return ad(LYt(uA),e,r)}),bk(o1t,function(t,r){if(0===r[0]){nd(NYt(t),ZT);var e=r[1];return ad(NYt(t),tA,e),nd(NYt(t),rA)}nd(NYt(t),eA);var n=r[1];return ad(NYt(t),nA,n),nd(NYt(t),aA)}),bk(v1t,function(t){return ad(LYt($T),o1t,t)}),ud(MYt,qat,RVt,[0,f1t,s1t,o1t,v1t]);var l1t=function t(r,e,n,a){return t.fun(r,e,n,a)},b1t=function t(r,e,n){return t.fun(r,e,n)},p1t=function t(r,e){return t.fun(r,e)},k1t=function t(r){return t.fun(r)},w1t=function t(r,e,n,a){return t.fun(r,e,n,a)},d1t=function t(r,e,n){return t.fun(r,e,n)};bk(l1t,function(t,r,e,n){nd(NYt(e),zT),ad(r,e,n[1]),nd(NYt(e),KT);var a=n[2];return id(w1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),QT)}),bk(b1t,function(t,r,e){var n=ad(l1t,t,r);return ad(LYt(HT),n,e)}),bk(p1t,function(t,r){switch(r){case 0:return dYt(t,qT);case 1:return dYt(t,YT);case 2:return dYt(t,VT);default:return dYt(t,WT)}}),bk(k1t,function(t){return ad(LYt(GT),p1t,t)}),bk(w1t,function(t,r,e,n){nd(NYt(e),wT),ad(NYt(e),hT,dT),ad(p1t,e,n[1]),nd(NYt(e),mT),nd(NYt(e),yT),ad(NYt(e),FT,_T);var a=n[2];id(CVt[8][1][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),ET),nd(NYt(e),ST),ad(NYt(e),xT,gT);var u=n[3];nd(NYt(e),TT),ad(t,e,u[1]),nd(NYt(e),AT);var i=u[2];id(UVt[3],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),OT),nd(NYt(e),IT),nd(NYt(e),PT),ad(NYt(e),CT,DT);var c=n[4];ad(NYt(e),NT,c),nd(NYt(e),LT),nd(NYt(e),RT),ad(NYt(e),UT,MT);var f=n[5];nd(NYt(e),jT);return AGt(function(n,a){return n&&nd(NYt(e),kT),id(MVt[7][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,f),nd(NYt(e),BT),nd(NYt(e),XT),nd(NYt(e),JT)}),bk(d1t,function(t,r,e){var n=ad(w1t,t,r);return ad(LYt(pT),n,e)});var h1t=[0,l1t,b1t,p1t,k1t,w1t,d1t],m1t=function t(r,e,n,a){return t.fun(r,e,n,a)},y1t=function t(r,e,n){return t.fun(r,e,n)},_1t=function t(r,e,n,a){return t.fun(r,e,n,a)},F1t=function t(r,e,n){return t.fun(r,e,n)};bk(m1t,function(t,r,e,n){nd(NYt(e),vT),ad(r,e,n[1]),nd(NYt(e),lT);var a=n[2];return id(_1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),bT)}),bk(y1t,function(t,r,e){var n=ad(m1t,t,r);return ad(LYt(oT),n,e)}),bk(_1t,function(t,r,e,n){nd(NYt(e),Rx),ad(NYt(e),Ux,Mx);var a=n[1];id(CVt[8][1][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),jx),nd(NYt(e),Bx),ad(NYt(e),Jx,Xx);var u=n[2];if(u){dYt(e,Gx);var i=u[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,qx)}else dYt(e,Yx);nd(NYt(e),Vx),nd(NYt(e),Wx),ad(NYt(e),zx,Hx);var c=n[3];id(PVt[11],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),Kx),nd(NYt(e),Qx),ad(NYt(e),Zx,$x);var f=n[4];ad(NYt(e),tT,f),nd(NYt(e),rT),nd(NYt(e),eT),ad(NYt(e),aT,nT);var s=n[5];if(s){dYt(e,uT);var o=s[1];ud(IVt[1],function(r){return nd(t,r)},e,o),dYt(e,iT)}else dYt(e,cT);return nd(NYt(e),fT),nd(NYt(e),sT)}),bk(F1t,function(t,r,e){var n=ad(_1t,t,r);return ad(LYt(Lx),n,e)});var E1t=[0,m1t,y1t,_1t,F1t],S1t=function t(r,e,n,a){return t.fun(r,e,n,a)},g1t=function t(r,e,n){return t.fun(r,e,n)},x1t=function t(r,e,n,a){return t.fun(r,e,n,a)},T1t=function t(r,e,n){return t.fun(r,e,n)};bk(S1t,function(t,r,e,n){nd(NYt(e),Dx),ad(r,e,n[1]),nd(NYt(e),Cx);var a=n[2];return id(x1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Nx)}),bk(g1t,function(t,r,e){var n=ad(S1t,t,r);return ad(LYt(Px),n,e)}),bk(x1t,function(t,r,e,n){nd(NYt(e),nx),ad(NYt(e),ux,ax);var a=n[1];ud(xVt[1],function(r){return nd(t,r)},e,a),nd(NYt(e),ix),nd(NYt(e),cx),ad(NYt(e),sx,fx);var u=n[2];if(u){dYt(e,ox);var i=u[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,vx)}else dYt(e,lx);nd(NYt(e),bx),nd(NYt(e),px),ad(NYt(e),wx,kx);var c=n[3];id(PVt[11],function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),dx),nd(NYt(e),hx),ad(NYt(e),yx,mx);var f=n[4];ad(NYt(e),_x,f),nd(NYt(e),Fx),nd(NYt(e),Ex),ad(NYt(e),gx,Sx);var s=n[5];if(s){dYt(e,xx);var o=s[1];ud(IVt[1],function(r){return nd(t,r)},e,o),dYt(e,Tx)}else dYt(e,Ax);return nd(NYt(e),Ox),nd(NYt(e),Ix)}),bk(T1t,function(t,r,e){var n=ad(x1t,t,r);return ad(LYt(ex),n,e)});var A1t=[0,S1t,g1t,x1t,T1t],O1t=function t(r,e,n,a){return t.fun(r,e,n,a)},I1t=function t(r,e,n){return t.fun(r,e,n)},P1t=function t(r,e,n,a){return t.fun(r,e,n,a)},D1t=function t(r,e,n){return t.fun(r,e,n)};bk(O1t,function(t,r,e,n){nd(NYt(e),Zg),ad(t,e,n[1]),nd(NYt(e),tx);var a=n[2];return id(P1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),rx)}),bk(I1t,function(t,r,e){var n=ad(O1t,t,r);return ad(LYt($g),n,e)}),bk(P1t,function(t,r,e,n){nd(NYt(e),Bg),ad(NYt(e),Jg,Xg);var a=n[1];id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Gg),nd(NYt(e),qg),ad(NYt(e),Vg,Yg);var u=n[2];if(u){dYt(e,Wg);var i=u[1];id(PVt[14][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,Hg)}else dYt(e,zg);return nd(NYt(e),Kg),nd(NYt(e),Qg)}),bk(D1t,function(t,r,e){var n=ad(P1t,t,r);return ad(LYt(jg),n,e)});var C1t=[0,O1t,I1t,P1t,D1t],N1t=function t(r,e,n,a){return t.fun(r,e,n,a)},L1t=function t(r,e,n){return t.fun(r,e,n)},R1t=function t(r,e,n,a){return t.fun(r,e,n,a)},M1t=function t(r,e,n){return t.fun(r,e,n)};bk(N1t,function(t,r,e,n){nd(NYt(e),Rg),ad(t,e,n[1]),nd(NYt(e),Mg);var a=n[2];return id(R1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),Ug)}),bk(L1t,function(t,r,e){var n=ad(N1t,t,r);return ad(LYt(Lg),n,e)}),bk(R1t,function(t,r,e,n){nd(NYt(e),Eg),ad(NYt(e),gg,Sg);var a=n[1];ud(gVt[1],function(t){return nd(r,t)},e,a),nd(NYt(e),xg),nd(NYt(e),Tg),ad(NYt(e),Og,Ag);var u=n[2];if(u){dYt(e,Ig);var i=u[1];id(PVt[14][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,Pg)}else dYt(e,Dg);return nd(NYt(e),Cg),nd(NYt(e),Ng)}),bk(M1t,function(t,r,e){var n=ad(R1t,t,r);return ad(LYt(Fg),n,e)});var U1t=function t(r,e,n,a){return t.fun(r,e,n,a)},j1t=function t(r,e,n){return t.fun(r,e,n)},B1t=function t(r,e,n,a){return t.fun(r,e,n,a)},X1t=function t(r,e,n){return t.fun(r,e,n)},J1t=function t(r,e,n,a){return t.fun(r,e,n,a)},G1t=function t(r,e,n){return t.fun(r,e,n)},q1t=[0,N1t,L1t,R1t,M1t];bk(U1t,function(t,r,e,n){nd(NYt(e),mg),ad(r,e,n[1]),nd(NYt(e),yg);var a=n[2];return id(B1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),_g)}),bk(j1t,function(t,r,e){var n=ad(U1t,t,r);return ad(LYt(hg),n,e)}),bk(B1t,function(t,r,e,n){nd(NYt(e),vg),ad(NYt(e),bg,lg);var a=n[1];nd(NYt(e),pg);return AGt(function(n,a){return n&&nd(NYt(e),og),id(J1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),kg),nd(NYt(e),wg),nd(NYt(e),dg)}),bk(X1t,function(t,r,e){var n=ad(B1t,t,r);return ad(LYt(sg),n,e)}),bk(J1t,function(t,r,e,n){switch(n[0]){case 0:nd(NYt(e),ng);var a=n[1];return id(h1t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),ag);case 1:nd(NYt(e),ug);var u=n[1];return id(E1t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),ig);default:nd(NYt(e),cg);var i=n[1];return id(A1t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),fg)}}),bk(G1t,function(t,r,e){var n=ad(J1t,t,r);return ad(LYt(eg),n,e)});var Y1t=function t(r,e,n,a){return t.fun(r,e,n,a)},V1t=function t(r,e,n){return t.fun(r,e,n)},W1t=function t(r,e,n,a){return t.fun(r,e,n,a)},H1t=function t(r,e,n){return t.fun(r,e,n)},z1t=[0,U1t,j1t,B1t,X1t,J1t,G1t];bk(Y1t,function(t,r,e,n){nd(NYt(e),ZS),ad(t,e,n[1]),nd(NYt(e),tg);var a=n[2];return id(W1t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),rg)}),bk(V1t,function(t,r,e){var n=ad(Y1t,t,r);return ad(LYt($S),n,e)}),bk(W1t,function(t,r,e,n){nd(NYt(e),WS),ad(NYt(e),zS,HS);var a=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),KS),nd(NYt(e),QS)}),bk(H1t,function(t,r,e){var n=ad(W1t,t,r);return ad(LYt(VS),n,e)});var K1t=[0,Y1t,V1t,W1t,H1t],Q1t=function t(r,e,n,a){return t.fun(r,e,n,a)},$1t=function t(r,e,n){return t.fun(r,e,n)};bk(Q1t,function(t,r,e,n){nd(NYt(e),fS),ad(NYt(e),oS,sS);var a=n[1];if(a){dYt(e,vS);var u=a[1];ud(gVt[1],function(t){return nd(r,t)},e,u),dYt(e,lS)}else dYt(e,bS);nd(NYt(e),pS),nd(NYt(e),kS),ad(NYt(e),dS,wS);var i=n[2];id(MVt[6][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),hS),nd(NYt(e),mS),ad(NYt(e),_S,yS);var c=n[3];if(c){dYt(e,FS);var f=c[1];id(PVt[13][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,f),dYt(e,ES)}else dYt(e,SS);nd(NYt(e),gS),nd(NYt(e),xS),ad(NYt(e),AS,TS);var s=n[4];if(s){dYt(e,OS);var o=s[1];id(C1t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,o),dYt(e,IS)}else dYt(e,PS);nd(NYt(e),DS),nd(NYt(e),CS),ad(NYt(e),LS,NS);var v=n[5];nd(NYt(e),RS);AGt(function(n,a){return n&&nd(NYt(e),cS),id(MVt[5][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,v),nd(NYt(e),MS),nd(NYt(e),US),nd(NYt(e),jS),ad(NYt(e),XS,BS);var l=n[6];nd(NYt(e),JS);return AGt(function(n,a){return n&&nd(NYt(e),iS),id(K1t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,l),nd(NYt(e),GS),nd(NYt(e),qS),nd(NYt(e),YS)}),bk($1t,function(t,r,e){var n=ad(Q1t,t,r);return ad(LYt(uS),n,e)}),ud(MYt,Yat,MVt,[0,h1t,E1t,A1t,C1t,q1t,z1t,K1t,Q1t,$1t]);var Z1t=function t(r,e,n,a){return t.fun(r,e,n,a)},t2t=function t(r,e,n){return t.fun(r,e,n)},r2t=function t(r,e,n,a){return t.fun(r,e,n,a)},e2t=function t(r,e,n){return t.fun(r,e,n)};bk(Z1t,function(t,r,e,n){nd(NYt(e),eS),ad(t,e,n[1]),nd(NYt(e),nS);var a=n[2];return id(r2t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),aS)}),bk(t2t,function(t,r,e){var n=ad(Z1t,t,r);return ad(LYt(rS),n,e)}),bk(r2t,function(t,r,e,n){nd(NYt(e),KE),ad(NYt(e),$E,QE);var a=n[1];return id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),ZE),nd(NYt(e),tS)}),bk(e2t,function(t,r,e){var n=ad(r2t,t,r);return ad(LYt(zE),n,e)});var n2t=[0,Z1t,t2t,r2t,e2t],a2t=function t(r,e,n,a){return t.fun(r,e,n,a)},u2t=function t(r,e,n){return t.fun(r,e,n)},i2t=function t(r,e,n,a){return t.fun(r,e,n,a)},c2t=function t(r,e,n){return t.fun(r,e,n)};bk(a2t,function(t,r,e,n){nd(NYt(e),VE),ad(t,e,n[1]),nd(NYt(e),WE);var a=n[2];return id(i2t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),nd(NYt(e),HE)}),bk(u2t,function(t,r,e){var n=ad(a2t,t,r);return ad(LYt(YE),n,e)}),bk(i2t,function(t,r,e,n){nd(NYt(e),PE),ad(NYt(e),CE,DE);var a=n[1];nd(NYt(e),NE);AGt(function(n,a){return n&&nd(NYt(e),IE),id(LVt[5],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,a),nd(NYt(e),LE),nd(NYt(e),RE),nd(NYt(e),ME),ad(NYt(e),jE,UE);var u=n[2];if(u){dYt(e,BE);var i=u[1];id(n2t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),dYt(e,XE)}else dYt(e,JE);return nd(NYt(e),GE),nd(NYt(e),qE)}),bk(c2t,function(t,r,e){var n=ad(i2t,t,r);return ad(LYt(OE),n,e)});var f2t=[0,a2t,u2t,i2t,c2t],s2t=function t(r,e,n,a){return t.fun(r,e,n,a)},o2t=function t(r,e,n){return t.fun(r,e,n)},v2t=function t(r,e,n,a){return t.fun(r,e,n,a)},l2t=function t(r,e,n){return t.fun(r,e,n)};bk(s2t,function(t,r,e,n){nd(NYt(e),NF),ad(NYt(e),RF,LF);var a=n[1];if(a){dYt(e,MF);var u=a[1];ud(gVt[1],function(t){return nd(r,t)},e,u),dYt(e,UF)}else dYt(e,jF);nd(NYt(e),BF),nd(NYt(e),XF),ad(NYt(e),GF,JF);var i=n[2];id(f2t[1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),qF),nd(NYt(e),YF),ad(NYt(e),WF,VF);var c=n[3];id(v2t,function(r){return nd(t,r)},function(t){return nd(r,t)},e,c),nd(NYt(e),HF),nd(NYt(e),zF),ad(NYt(e),QF,KF);var f=n[4];ad(NYt(e),$F,f),nd(NYt(e),ZF),nd(NYt(e),tE),ad(NYt(e),eE,rE);var s=n[5];ad(NYt(e),nE,s),nd(NYt(e),aE),nd(NYt(e),uE),ad(NYt(e),cE,iE);var o=n[6];if(o){dYt(e,fE);var v=o[1];id(PVt[15][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,v),dYt(e,sE)}else dYt(e,oE);nd(NYt(e),vE),nd(NYt(e),lE),ad(NYt(e),pE,bE);var l=n[7];ad(NYt(e),kE,l),nd(NYt(e),wE),nd(NYt(e),dE),ad(NYt(e),mE,hE);var b=n[8];id(PVt[11],function(r){return nd(t,r)},function(t){return nd(r,t)},e,b),nd(NYt(e),yE),nd(NYt(e),_E),ad(NYt(e),EE,FE);var p=n[9];if(p){dYt(e,SE);var k=p[1];id(PVt[13][2],function(r){return nd(t,r)},function(t){return nd(r,t)},e,k),dYt(e,gE)}else dYt(e,xE);return nd(NYt(e),TE),nd(NYt(e),AE)}),bk(o2t,function(t,r,e){var n=ad(s2t,t,r);return ad(LYt(CF),n,e)}),bk(v2t,function(t,r,e,n){if(0===n[0]){var a=n[1];nd(NYt(e),xF),nd(NYt(e),TF),ad(t,e,a[1]),nd(NYt(e),AF);var u=a[2];return id(DVt[1][1],function(r){return nd(t,r)},function(t){return nd(r,t)},e,u),nd(NYt(e),OF),nd(NYt(e),IF)}nd(NYt(e),PF);var i=n[1];return id(CVt[26],function(r){return nd(t,r)},function(t){return nd(r,t)},e,i),nd(NYt(e),DF)}),bk(l2t,function(t,r,e){var n=ad(v2t,t,r);return ad(LYt(gF),n,e)}),ud(MYt,Vat,UVt,[0,n2t,f2t,s2t,o2t,v2t,l2t]);var b2t=function t(r,e,n,a){return t.fun(r,e,n,a)};bk(b2t,function(t,r,e,n){nd(NYt(e),dF),ad(t,e,n[1]),nd(NYt(e),hF),nd(NYt(e),mF);AGt(function(n,a){return n&&nd(NYt(e),wF),id(DVt[31],function(r){return nd(t,r)},function(t){return nd(r,t)},e,a),1},0,n[2]),nd(NYt(e),yF),nd(NYt(e),_F),nd(NYt(e),FF);return AGt(function(r,n){return r&&nd(NYt(e),kF),ud(RVt[1],function(r){return nd(t,r)},e,n),1},0,n[3]),nd(NYt(e),EF),nd(NYt(e),SF)}),bk(function t(r,e,n){return t.fun(r,e,n)},function(t,r,e){var n=ad(b2t,t,r);return ad(LYt(pF),n,e)});var p2t=function(t){return"number"==typeof t?iut:t[1]},k2t=function(t){if("number"==typeof t)return 1;switch(t[0]){case 0:return 2;case 3:return 4;default:return 3}},w2t=function(t,r){nd(NYt(t),cut),ad(NYt(t),sut,fut);var e=r[1];ad(NYt(t),out,e),nd(NYt(t),vut),nd(NYt(t),lut),ad(NYt(t),put,but);var n=r[2];ad(NYt(t),kut,n),nd(NYt(t),wut),nd(NYt(t),dut),ad(NYt(t),mut,hut);var a=r[3];return ad(NYt(t),yut,a),nd(NYt(t),_ut),nd(NYt(t),Fut)},d2t=function t(r,e){return t.fun(r,e)};bk(d2t,function(t,r){nd(NYt(t),Sut),ad(NYt(t),xut,gut);var e=r[1];if(e){dYt(t,Tut);var n=e[1];if("number"==typeof n)dYt(t,Wat);else switch(n[0]){case 0:nd(NYt(t),Hat);var a=n[1];ad(NYt(t),zat,a),nd(NYt(t),Kat);break;case 1:nd(NYt(t),Qat);var u=n[1];ad(NYt(t),$at,u),nd(NYt(t),Zat);break;case 2:nd(NYt(t),tut);var i=n[1];ad(NYt(t),rut,i),nd(NYt(t),eut);break;default:nd(NYt(t),nut);var c=n[1];ad(NYt(t),aut,c),nd(NYt(t),uut)}dYt(t,Aut)}else dYt(t,Out);return nd(NYt(t),Iut),nd(NYt(t),Put),ad(NYt(t),Cut,Dut),w2t(t,r[2]),nd(NYt(t),Nut),nd(NYt(t),Lut),ad(NYt(t),Mut,Rut),w2t(t,r[3]),nd(NYt(t),Uut),nd(NYt(t),jut)}),bk(function t(r){return t.fun(r)},function(t){return ad(LYt(Eut),d2t,t)});var h2t=function(t,r){return[0,t[1],t[2],r[3]]},m2t=function(t,r){var e=t[1]-r[1]|0;return 0===e?t[2]-r[2]|0:e},y2t=function t(r,e){return t.fun(r,e)},_2t=function(t,r){var e=0===r[0]?r[1][2][2][2]:r[1][2][1][2];return ad(y2t,t,e)},F2t=function(t,r){if(r){var e=r[1],n=0===e[0]?e[1][2]:e[1][2][1][2];return ad(y2t,t,n)}return t};bk(y2t,function(t,r){switch(r[0]){case 0:return AGt(_2t,t,r[1][1]);case 1:return AGt(F2t,t,r[1][1]);case 2:return ad(y2t,t,r[1][1][2]);case 3:return[0,r[1][1],t];default:return vGt(fit)}});var E2t=[sf,Pft,Hk()],S2t=function(t){return[0,t[1],t[2].slice(),t[3],t[4],t[5],t[6]]},g2t=function(t){return t[3][1]},x2t=function(t,r){return t!==r[4]?[0,r[1],r[2],r[3],t,r[5],r[6]]:r},T2t=function(t){if("number"==typeof t){var r=t;if(59<=r)switch(r){case 59:return bFt;case 60:return pFt;case 61:return kFt;case 62:return wFt;case 63:return dFt;case 64:return hFt;case 65:return mFt;case 66:return yFt;case 67:return _Ft;case 68:return FFt;case 69:return EFt;case 70:return SFt;case 71:return gFt;case 72:return xFt;case 73:return TFt;case 74:return AFt;case 75:return OFt;case 76:return IFt;case 77:return PFt;case 78:return DFt;case 79:return CFt;case 80:return NFt;case 81:return LFt;case 82:return RFt;case 83:return MFt;case 84:return UFt;case 85:return jFt;case 86:return BFt;case 87:return XFt;case 88:return JFt;case 89:return GFt;case 90:return qFt;case 91:return YFt;case 92:return VFt;case 93:return WFt;case 94:return HFt;case 95:return zFt;case 96:return KFt;case 97:return QFt;case 98:return $Ft;case 99:return ZFt;case 100:return tEt;case 101:return rEt;case 102:return eEt;case 103:return nEt;case 104:return aEt;case 105:return uEt;case 106:return iEt;case 107:return cEt;case 108:return fEt;case 109:return sEt;case 110:return oEt;case 111:return vEt;case 112:return lEt;case 113:return bEt;case 114:return pEt;case 115:return kEt;default:return wEt}switch(r){case 0:return f_t;case 1:return s_t;case 2:return o_t;case 3:return v_t;case 4:return l_t;case 5:return b_t;case 6:return p_t;case 7:return k_t;case 8:return w_t;case 9:return d_t;case 10:return h_t;case 11:return m_t;case 12:return y_t;case 13:return __t;case 14:return F_t;case 15:return E_t;case 16:return S_t;case 17:return g_t;case 18:return x_t;case 19:return T_t;case 20:return A_t;case 21:return O_t;case 22:return I_t;case 23:return P_t;case 24:return D_t;case 25:return C_t;case 26:return N_t;case 27:return L_t;case 28:return R_t;case 29:return M_t;case 30:return U_t;case 31:return j_t;case 32:return B_t;case 33:return X_t;case 34:return J_t;case 35:return G_t;case 36:return q_t;case 37:return Y_t;case 38:return V_t;case 39:return W_t;case 40:return H_t;case 41:return z_t;case 42:return K_t;case 43:return Q_t;case 44:return $_t;case 45:return Z_t;case 46:return tFt;case 47:return rFt;case 48:return eFt;case 49:return nFt;case 50:return aFt;case 51:return uFt;case 52:return iFt;case 53:return cFt;case 54:return fFt;case 55:return sFt;case 56:return oFt;case 57:return vFt;default:return lFt}}else switch(t[0]){case 0:return dEt;case 1:return hEt;case 2:return mEt;case 3:return yEt;case 4:return _Et;case 5:return FEt;case 6:return EEt;case 7:return SEt;case 8:return gEt;default:return xEt}},A2t=function(t){if("number"==typeof t){var r=t;if(59<=r)switch(r){case 59:return tyt;case 60:return ryt;case 61:return eyt;case 62:return nyt;case 63:return ayt;case 64:return uyt;case 65:return iyt;case 66:return cyt;case 67:return fyt;case 68:return syt;case 69:return oyt;case 70:return vyt;case 71:return lyt;case 72:return byt;case 73:return pyt;case 74:return kyt;case 75:return wyt;case 76:return dyt;case 77:return hyt;case 78:return myt;case 79:return yyt;case 80:return _yt;case 81:return Fyt;case 82:return Eyt;case 83:return Syt;case 84:return gyt;case 85:return xyt;case 86:return Tyt;case 87:return Ayt;case 88:return Oyt;case 89:return Iyt;case 90:return Pyt;case 91:return Dyt;case 92:return Cyt;case 93:return Nyt;case 94:return Lyt;case 95:return Ryt;case 96:return Myt;case 97:return Uyt;case 98:return jyt;case 99:return Byt;case 100:return Xyt;case 101:return Jyt;case 102:return Gyt;case 103:return qyt;case 104:return Yyt;case 105:return Vyt;case 106:return Wyt;case 107:return Hyt;case 108:return zyt;case 109:return Kyt;case 110:return Qyt;case 111:return $yt;case 112:return Zyt;case 113:return t_t;case 114:return r_t;case 115:return e_t;default:return n_t}switch(r){case 0:return zht;case 1:return Kht;case 2:return Qht;case 3:return $ht;case 4:return Zht;case 5:return tmt;case 6:return rmt;case 7:return emt;case 8:return nmt;case 9:return amt;case 10:return umt;case 11:return imt;case 12:return cmt;case 13:return fmt;case 14:return smt;case 15:return omt;case 16:return vmt;case 17:return lmt;case 18:return bmt;case 19:return pmt;case 20:return kmt;case 21:return wmt;case 22:return dmt;case 23:return hmt;case 24:return mmt;case 25:return ymt;case 26:return _mt;case 27:return Fmt;case 28:return Emt;case 29:return Smt;case 30:return gmt;case 31:return xmt;case 32:return Tmt;case 33:return Amt;case 34:return Omt;case 35:return Imt;case 36:return Pmt;case 37:return Dmt;case 38:return Cmt;case 39:return Nmt;case 40:return Lmt;case 41:return Rmt;case 42:return Mmt;case 43:return Umt;case 44:return jmt;case 45:return Bmt;case 46:return Xmt;case 47:return Jmt;case 48:return Gmt;case 49:return qmt;case 50:return Ymt;case 51:return Vmt;case 52:return Wmt;case 53:return Hmt;case 54:return zmt;case 55:return Kmt;case 56:return Qmt;case 57:return $mt;default:return Zmt}}else switch(t[0]){case 0:return t[2];case 2:return t[1][2][3];case 4:var e=t[1],n=wGt(a_t,e[3]);return wGt(u_t,wGt(e[2],n));case 8:return 0===t[1]?c_t:i_t;case 1:case 7:return t[1][3];case 3:case 9:return t[3];default:return t[1]}},O2t=function(t){return 35>>0)var v=ZYt(i);else switch(f){case 0:v=2;break;case 1:v=0;break;case 2:v=1;break;default:if($Yt(i,2),0===v4t(KYt(i))){var l=j7t(KYt(i));if(0===l)v=0===M2t(KYt(i))&&0===M2t(KYt(i))&&0===M2t(KYt(i))?0:ZYt(i);else if(1===l)if(0===M2t(KYt(i)))for(;;){var k=Y2t(KYt(i));if(0!==k){v=1===k?0:ZYt(i);break}}else v=ZYt(i);else v=ZYt(i)}else v=ZYt(i)}if(2<=v){if(!(3<=v))return F4t(t,r,35)}else if(0<=v)return t;return vGt(bNt)},I4t=function(t,r,e,n,a){var u=r+rVt(e)|0;return[0,d4t(t,u,r+eVt(e)|0),kVt(e,n,(nVt(e)-n|0)-a|0)]},P4t=function(t,r){for(var e=rVt(t[2]),n=pVt(r),a=ZGt(cw(r)),u=t;;){QYt(n);var i=KYt(n),c=92>>0)var f=ZYt(n);else switch(c){case 0:f=2;break;case 1:for(;;){$Yt(n,3);var s=KYt(n);if(0!==(-1>>0)return vGt(oNt);switch(f){case 0:var l=I4t(u,e,n,2,0),b=dw(wGt(vNt,l[2])),p=O4t(u,l[1],b);dVt(a,b);u=p;continue;case 1:var k=I4t(u,e,n,3,1),w=dw(wGt(lNt,k[2])),d=O4t(u,k[1],w);dVt(a,w);u=d;continue;case 2:return[0,u,tqt(a)];default:nqt(a,wVt(n));continue}}},D4t=function(t,r,e){var n=S4t(t,y4t(t,r));return tVt(r),ad(e,n,r)},C4t=function(t,r,e){for(var n=t;;){QYt(e);var a=KYt(e),u=-1>>0)var i=ZYt(e);else switch(u){case 0:for(;;){$Yt(e,3);var c=KYt(e);if(0!==(-1>>0){var o=S4t(n,y4t(n,e));return[0,o,m4t(o,e)]}switch(i){case 0:var v=g4t(n,e);nqt(r,wVt(e));n=v;continue;case 1:var l=n[4]?F4t(n,y4t(n,e),[2,AEt,TEt]):n;return[0,l,m4t(l,e)];case 2:if(n[4])return[0,n,m4t(n,e)];nqt(r,OEt);continue;default:nqt(r,wVt(e));continue}}},N4t=function(t,r,e){for(;;){QYt(e);var n=KYt(e),a=13>>0)var u=ZYt(e);else switch(a){case 0:u=0;break;case 1:for(;;){$Yt(e,2);var i=KYt(e);if(0!==(-1>>0)return vGt(IEt);switch(u){case 0:return[0,t,m4t(t,e)];case 1:var c=m4t(t,e),f=g4t(t,e),s=nVt(e);return[0,f,[0,c[1],c[2]-s|0,c[3]-s|0]];default:nqt(r,wVt(e));continue}}},L4t=function(t,r){function e(t){return $Yt(t,3),0===b7t(KYt(t))?2:ZYt(t)}QYt(r);var n=KYt(r),a=jn>>0)var u=ZYt(r);else switch(a){case 1:u=16;break;case 2:u=15;break;case 3:$Yt(r,15);u=0===X7t(KYt(r))?15:ZYt(r);break;case 4:$Yt(r,4);u=0===b7t(KYt(r))?e(r):ZYt(r);break;case 5:$Yt(r,11);u=0===b7t(KYt(r))?e(r):ZYt(r);break;case 7:u=5;break;case 8:u=6;break;case 9:u=7;break;case 10:u=8;break;case 11:u=9;break;case 12:$Yt(r,14);var i=j7t(KYt(r));if(0===i)u=0===M2t(KYt(r))&&0===M2t(KYt(r))&&0===M2t(KYt(r))?12:ZYt(r);else if(1===i)if(0===M2t(KYt(r)))for(;;){var c=Y2t(KYt(r));if(0!==c){u=1===c?13:ZYt(r);break}}else u=ZYt(r);else u=ZYt(r);break;case 13:u=10;break;case 14:$Yt(r,14);u=0===M2t(KYt(r))&&0===M2t(KYt(r))?1:ZYt(r);break;default:u=0}if(16>>0)return vGt(KCt);switch(u){case 1:var f=wVt(r);return[0,t,f,[0,dw(wGt(QCt,f))],0];case 2:var s=wVt(r),o=dw(wGt($Ct,s));return Ne<=o?[0,t,s,[0,o>>>3|0,48+(7&o)|0],1]:[0,t,s,[0,o],1];case 3:var v=wVt(r);return[0,t,v,[0,dw(wGt(ZCt,v))],1];case 4:return[0,t,tNt,[0,0],0];case 5:return[0,t,rNt,[0,8],0];case 6:return[0,t,eNt,[0,12],0];case 7:return[0,t,nNt,[0,10],0];case 8:return[0,t,aNt,[0,13],0];case 9:return[0,t,uNt,[0,9],0];case 10:return[0,t,iNt,[0,11],0];case 11:var l=wVt(r);return[0,t,l,[0,dw(wGt(cNt,l))],1];case 12:var b=wVt(r);return[0,t,b,[0,dw(wGt(fNt,UGt(b,1,cw(b)-1|0)))],0];case 13:var p=wVt(r),k=dw(wGt(sNt,UGt(p,2,cw(p)-3|0)));return[0,Cf>>0)var o=ZYt(u);else switch(s){case 1:for(;;){$Yt(u,3);var v=KYt(u);if(0!==(-1>>0)return vGt(PEt);switch(o){case 0:var l=wVt(u);if(nqt(n,l),Hw(r,l))return[0,i,m4t(i,u),c];nqt(e,l);continue;case 1:nqt(n,DEt);var b=L4t(i,u),p=b[4]||c;nqt(n,b[2]),WGt(function(t){return dVt(e,t)},b[3]);i=b[1],c=p;continue;case 2:var k=wVt(u);nqt(n,k);var w=S4t(i,y4t(i,u));return nqt(e,k),[0,w,m4t(w,u),c];default:var d=wVt(u);nqt(n,d),nqt(e,d);continue}}},M4t=function(t,r,e,n,a){for(var u=t;;){QYt(a);var i=KYt(a),c=96>>0)var f=ZYt(a);else switch(c){case 0:f=0;break;case 1:for(;;){$Yt(a,6);var s=KYt(a);if(0!==(-1>>0)return vGt(CEt);switch(f){case 0:return[0,S4t(u,y4t(u,a)),1];case 1:return eqt(n,96),[0,u,1];case 2:return nqt(n,NEt),[0,u,0];case 3:eqt(e,92),eqt(n,92);var v=L4t(u,a),l=v[2];nqt(e,l),nqt(n,l),WGt(function(t){return dVt(r,t)},v[3]);u=v[1];continue;case 4:nqt(e,LEt),nqt(n,REt),nqt(r,MEt);u=g4t(u,a);continue;case 5:var b=wVt(a);nqt(e,b),nqt(n,b),eqt(r,10);u=g4t(u,a);continue;default:var p=wVt(a);nqt(e,p),nqt(n,p),nqt(r,p);continue}}},U4t=function(t,r,e,n,a){for(var u=t;;){QYt(a);var i=KYt(a),c=ln>>0)var f=ZYt(a);else switch(c){case 0:f=1;break;case 1:for(;;){$Yt(a,6);var s=KYt(a);if(0!==(-1>>0)return vGt(YEt);switch(f){case 0:var g=wVt(a);switch(r){case 0:var x=Kw(g,VEt)?0:1;break;case 1:x=Kw(g,WEt)?0:1;break;default:if(Kw(g,HEt))if(Kw(g,zEt)){x=0;var T=0}else T=1;else T=1;if(T)return tVt(a),u}if(x)return u;nqt(n,g),nqt(e,g);continue;case 1:return S4t(u,y4t(u,a));case 2:var A=wVt(a);nqt(n,A),nqt(e,A);u=g4t(u,a);continue;case 3:var O=wVt(a),I=UGt(O,3,cw(O)-4|0);nqt(n,O),dVt(e,dw(wGt(KEt,I)));continue;case 4:var P=wVt(a),D=UGt(P,2,cw(P)-3|0);nqt(n,P),dVt(e,dw(D));continue;case 5:var C=wVt(a),N=UGt(C,1,cw(C)-2|0);nqt(n,C);var L=Lk(N,QEt);if(0<=L)if(0>>0)var a=ZYt(r);else switch(n){case 0:a=0;break;case 1:a=6;break;case 2:if($Yt(r,2),0===D2t(KYt(r))){for(;;)if($Yt(r,2),0!==D2t(KYt(r))){a=ZYt(r);break}}else a=ZYt(r);break;case 3:a=1;break;case 4:$Yt(r,1),a=0===X7t(KYt(r))?1:ZYt(r);break;default:$Yt(r,5);var u=Z7t(KYt(r));a=0===u?4:1===u?3:ZYt(r)}if(6>>0)return vGt(MCt);switch(a){case 0:return[0,t,Xf];case 1:return[2,g4t(t,r)];case 2:return[2,t];case 3:var i=h4t(t,r),c=ZGt(qo),f=N4t(t,c,r),s=f[1];return[1,s,T4t(s,i,f[2],c,0)];case 4:var o=h4t(t,r),l=ZGt(qo),b=C4t(t,l,r),p=b[1];return[1,p,T4t(p,o,b[2],l,1)];case 5:var k=h4t(t,r),d=ZGt(qo),h=t;t:for(;;){QYt(r);var m=KYt(r),y=92>>0)var _=ZYt(r);else switch(y){case 0:_=0;break;case 1:for(;;){$Yt(r,7);var F=KYt(r);if(0!=(-1>>0)_=ZYt(r);else switch(S){case 0:_=2;break;case 1:_=1;break;default:$Yt(r,1),_=0===X7t(KYt(r))?1:ZYt(r)}}if(7<_>>>0)var g=vGt(BEt);else switch(_){case 0:g=[0,F4t(h,y4t(h,r),24),XEt];break;case 1:g=[0,F4t(h,y4t(h,r),24),JEt];break;case 3:var x=wVt(r);g=[0,h,UGt(x,1,cw(x)-1|0)];break;case 4:g=[0,h,GEt];break;case 5:for(eqt(d,91);;){QYt(r);var T=KYt(r),A=93>>0)var O=ZYt(r);else switch(A){case 0:O=0;break;case 1:for(;;){$Yt(r,4);var I=KYt(r);if(0!=(-1>>0)var C=vGt(UEt);else switch(O){case 0:C=h;break;case 1:nqt(d,jEt);continue;case 2:eqt(d,92),eqt(d,93);continue;case 3:eqt(d,93),C=h;break;default:nqt(d,wVt(r));continue}h=C;continue t}case 6:g=[0,F4t(h,y4t(h,r),24),qEt];break;default:nqt(d,wVt(r));continue}var N=g[1],L=m4t(N,r),R=[0,N[1],k,L],M=g[2];return[0,N,[4,[0,R,tqt(d),M]]]}default:return[0,S4t(t,y4t(t,r)),[5,wVt(r)]]}}),X4t=j4t(function(t,r){function e(t,r){for(;;){$Yt(r,12);var e=l7t(KYt(r));if(0!==e)return 1===e?t<50?i(t+1|0,r):Zw(i,[0,r]):ZYt(r)}}function i(t,r){if(0===v4t(KYt(r))){var n=j7t(KYt(r));if(0===n)return 0===M2t(KYt(r))&&0===M2t(KYt(r))&&0===M2t(KYt(r))?t<50?e(t+1|0,r):Zw(e,[0,r]):ZYt(r);if(1===n){if(0===M2t(KYt(r)))for(;;){var a=Y2t(KYt(r));if(0!==a)return 1===a?t<50?e(t+1|0,r):Zw(e,[0,r]):ZYt(r)}return ZYt(r)}return ZYt(r)}return ZYt(r)}function c(t){return $w(e(0,t))}QYt(r);var f=KYt(r),s=sc>>0)var l=ZYt(r);else switch(s){case 0:l=0;break;case 1:l=14;break;case 2:if($Yt(r,2),0===D2t(KYt(r))){for(;;)if($Yt(r,2),0!==D2t(KYt(r))){l=ZYt(r);break}}else l=ZYt(r);break;case 3:l=1;break;case 4:$Yt(r,1),l=0===X7t(KYt(r))?1:ZYt(r);break;case 5:l=13;break;case 6:$Yt(r,12);var b=l7t(KYt(r));l=0===b?c(r):1===b?function(t){return $w(i(0,t))}(r):ZYt(r);break;case 7:l=10;break;case 8:$Yt(r,6);var k=Z7t(KYt(r));l=0===k?4:1===k?3:ZYt(r);break;case 9:l=9;break;case 10:l=5;break;case 11:l=11;break;case 12:l=7;break;case 13:if($Yt(r,14),0===v4t(KYt(r))){var y=j7t(KYt(r));if(0===y)l=0===M2t(KYt(r))&&0===M2t(KYt(r))&&0===M2t(KYt(r))?c(r):ZYt(r);else if(1===y)if(0===M2t(KYt(r)))for(;;){var _=Y2t(KYt(r));if(0!==_){l=1===_?c(r):ZYt(r);break}}else l=ZYt(r);else l=ZYt(r)}else l=ZYt(r);break;default:l=8}if(14>>0)return vGt(LCt);switch(l){case 0:return[0,t,Xf];case 1:return[2,g4t(t,r)];case 2:return[2,t];case 3:var F=h4t(t,r),E=ZGt(qo),S=N4t(t,E,r),I=S[1];return[1,I,T4t(I,F,S[2],E,0)];case 4:var P=h4t(t,r),D=ZGt(qo),N=C4t(t,D,r),R=N[1];return[1,R,T4t(R,P,N[2],D,1)];case 5:return[0,t,95];case 6:return[0,t,Qs];case 7:return[0,t,96];case 8:return[0,t,0];case 9:return[0,t,83];case 10:return[0,t,10];case 11:return[0,t,79];case 12:return[0,t,[6,wVt(r)]];case 13:var U=wVt(r),B=h4t(t,r),J=ZGt(qo),G=ZGt(qo);nqt(G,U);var V=Hw(U,RCt)?0:1,W=U4t(t,V,J,G,r),H=m4t(W,r);nqt(G,U);var K=tqt(J),Q=tqt(G);return[0,W,[7,[0,[0,W[1],B,H],K,Q]]];default:return[0,t,[5,wVt(r)]]}}),J4t=j4t(function(t,r){QYt(r);var e=KYt(r),n=-1>>0)var a=ZYt(r);else switch(n){case 0:a=5;break;case 1:if($Yt(r,1),0===D2t(KYt(r))){for(;;)if($Yt(r,1),0!==D2t(KYt(r))){a=ZYt(r);break}}else a=ZYt(r);break;case 2:a=0;break;case 3:$Yt(r,0),a=0===X7t(KYt(r))?0:ZYt(r);break;case 4:$Yt(r,5);var u=Z7t(KYt(r));a=0===u?3:1===u?2:ZYt(r);break;default:a=4}if(5>>0)return vGt(PCt);switch(a){case 0:return[2,g4t(t,r)];case 1:return[2,t];case 2:var i=h4t(t,r),c=ZGt(qo),f=N4t(t,c,r),s=f[1];return[1,s,T4t(s,i,f[2],c,0)];case 3:var o=h4t(t,r),l=ZGt(qo),b=C4t(t,l,r),p=b[1];return[1,p,T4t(p,o,b[2],l,1)];case 4:var k=h4t(t,r),d=ZGt(qo),h=ZGt(qo),m=ZGt(qo);nqt(m,DCt);var y=M4t(t,d,h,m,r),_=y[1],F=m4t(_,r),E=[0,_[1],k,F],S=y[2],g=tqt(m),x=tqt(h);return[0,_,[2,[0,E,[0,tqt(d),x,g],S]]];default:var T=S4t(t,y4t(t,r));return[0,T,[2,[0,y4t(T,r),CCt,1]]]}}),G4t=j4t(function(t,r){function e(t){return 0===D7t(KYt(t))&&0===k7t(KYt(t))&&0===r4t(KYt(t))&&0===I7t(KYt(t))&&0===P7t(KYt(t))&&0===p7t(KYt(t))&&0===w7t(KYt(t))&&0===D7t(KYt(t))&&0===v4t(KYt(t))&&0===C7t(KYt(t))&&0===K7t(KYt(t))?3:ZYt(t)}function i(t){return $Yt(t,3),0===p4t(KYt(t))?3:ZYt(t)}function c(t){for(;;)if($Yt(t,17),0!==k4t(KYt(t)))return ZYt(t)}function f(t){$Yt(t,18);var r=o7t(KYt(t));if(0===r)return c(t);if(1===r)for(;;){$Yt(t,18);var e=B7t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:return c(t);case 1:continue;default:t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,18);var n=B7t(KYt(t));if(2>>0)return ZYt(t);switch(n){case 0:return c(t);case 1:continue;default:continue t}}return ZYt(t)}}}return ZYt(t)}function l(t){t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,18);var r=V7t(KYt(t));if(3>>0)return ZYt(t);switch(r){case 0:return c(t);case 1:return f(t);case 2:continue;default:continue t}}return ZYt(t)}}function k(t){for(;;)if($Yt(t,15),0!==k4t(KYt(t)))return ZYt(t)}function y(t){for(;;)if($Yt(t,15),0!==k4t(KYt(t)))return ZYt(t)}function _(t){t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,16);var r=B7t(KYt(t));if(2>>0)return ZYt(t);switch(r){case 0:return y(t);case 1:continue;default:continue t}}return ZYt(t)}}function F(t){$Yt(t,17);var r=Q7t(KYt(t));if(3>>0)return ZYt(t);switch(r){case 0:return c(t);case 1:var e=n7t(KYt(t));if(0===e)for(;;){$Yt(t,16);var n=o7t(KYt(t));if(0===n)return y(t);if(1!==n)return ZYt(t)}if(1===e)for(;;){$Yt(t,16);var a=B7t(KYt(t));if(2>>0)return ZYt(t);switch(a){case 0:return y(t);case 1:continue;default:return _(t)}}return ZYt(t);case 2:for(;;){$Yt(t,16);var u=o7t(KYt(t));if(0===u)return k(t);if(1!==u)return ZYt(t)}default:for(;;){$Yt(t,16);var i=B7t(KYt(t));if(2>>0)return ZYt(t);switch(i){case 0:return k(t);case 1:continue;default:return _(t)}}}}function E(t){$Yt(t,18);var r=x7t(KYt(t));if(2>>0)return ZYt(t);switch(r){case 0:return c(t);case 1:for(;;){$Yt(t,18);var e=Z2t(KYt(t));if(3>>0)return ZYt(t);switch(e){case 0:return c(t);case 1:continue;case 2:return F(t);default:t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,18);var n=Z2t(KYt(t));if(3>>0)return ZYt(t);switch(n){case 0:return c(t);case 1:continue;case 2:return F(t);default:continue t}}return ZYt(t)}}}default:return F(t)}}function S(t){for(;;){$Yt(t,18);var r=S7t(KYt(t));if(4>>0)return ZYt(t);switch(r){case 0:return c(t);case 1:return E(t);case 2:continue;case 3:return F(t);default:return l(t)}}}function I(t){$Yt(t,17);var r=G2t(KYt(t));if(0===r)return c(t);if(1===r)for(;;){$Yt(t,14);var e=g7t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:for(;;)if($Yt(t,13),0!==k4t(KYt(t)))return ZYt(t);case 1:continue;default:t:for(;;){if(0===M2t(KYt(t)))for(;;){$Yt(t,14);var n=g7t(KYt(t));if(2>>0)return ZYt(t);switch(n){case 0:for(;;)if($Yt(t,13),0!==k4t(KYt(t)))return ZYt(t);case 1:continue;default:continue t}}return ZYt(t)}}}return ZYt(t)}function P(t){$Yt(t,17);var r=J7t(KYt(t));if(0===r)return c(t);if(1===r)for(;;){$Yt(t,10);var e=$7t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:for(;;)if($Yt(t,9),0!==k4t(KYt(t)))return ZYt(t);case 1:continue;default:t:for(;;){if(0===b7t(KYt(t)))for(;;){$Yt(t,10);var n=$7t(KYt(t));if(2>>0)return ZYt(t);switch(n){case 0:for(;;)if($Yt(t,9),0!==k4t(KYt(t)))return ZYt(t);case 1:continue;default:continue t}}return ZYt(t)}}}return ZYt(t)}function D(t){$Yt(t,17);var r=U7t(KYt(t));if(0===r)return c(t);if(1===r)for(;;){$Yt(t,8);var e=N2t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:for(;;)if($Yt(t,7),0!==k4t(KYt(t)))return ZYt(t);case 1:continue;default:t:for(;;){if(0===r7t(KYt(t)))for(;;){$Yt(t,8);var n=N2t(KYt(t));if(2>>0)return ZYt(t);switch(n){case 0:for(;;)if($Yt(t,7),0!==k4t(KYt(t)))return ZYt(t);case 1:continue;default:continue t}}return ZYt(t)}}}return ZYt(t)}function R(t){for(;;){$Yt(t,18);var r=e4t(KYt(t));if(2>>0)return ZYt(t);switch(r){case 0:return c(t);case 1:return f(t);default:continue}}}function U(t){for(;;)if($Yt(t,11),0!==k4t(KYt(t)))return ZYt(t)}function B(t){for(;;){$Yt(t,12);var r=t4t(KYt(t));if(4>>0)return ZYt(t);switch(r){case 0:return U(t);case 1:return f(t);case 2:continue;case 3:for(;;){$Yt(t,11);var e=e4t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:return U(t);case 1:return f(t);default:continue}}default:t:for(;;){if(0===b7t(KYt(t)))for(;;){$Yt(t,12);var n=$7t(KYt(t));if(2>>0)return ZYt(t);switch(n){case 0:for(;;)if($Yt(t,11),0!==k4t(KYt(t)))return ZYt(t);case 1:continue;default:continue t}}return ZYt(t)}}}}function J(t){$Yt(t,18);var r=K2t(KYt(t));if(7>>0)return ZYt(t);switch(r){case 0:return c(t);case 1:return E(t);case 2:return B(t);case 3:return R(t);case 4:return D(t);case 5:return F(t);case 6:return P(t);default:return I(t)}}function G(t){for(;;){$Yt(t,18);var r=Z2t(KYt(t));if(3>>0)return ZYt(t);switch(r){case 0:return c(t);case 1:continue;case 2:return F(t);default:t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,18);var e=Z2t(KYt(t));if(3>>0)return ZYt(t);switch(e){case 0:return c(t);case 1:continue;case 2:return F(t);default:continue t}}return ZYt(t)}}}}function V(t){return 0===L2t(KYt(t))?G(t):ZYt(t)}function W(t,r){for(;;){$Yt(r,34);var e=q2t(KYt(r));if(0!==e)return 1===e?t<50?H(t+1|0,r):Zw(H,[0,r]):ZYt(r)}}function H(t,r){if(0===v4t(KYt(r))){var e=j7t(KYt(r));if(0===e)return 0===M2t(KYt(r))&&0===M2t(KYt(r))&&0===M2t(KYt(r))?t<50?W(t+1|0,r):Zw(W,[0,r]):ZYt(r);if(1===e){if(0===M2t(KYt(r)))for(;;){var n=Y2t(KYt(r));if(0!==n)return 1===n?t<50?W(t+1|0,r):Zw(W,[0,r]):ZYt(r)}return ZYt(r)}return ZYt(r)}return ZYt(r)}function Q(t){return $w(W(0,t))}function Z(t){return $w(H(0,t))}QYt(r);var rt=function(t){var r=KYt(t),f=sc>>0)return ZYt(t);switch(f){case 0:return 65;case 1:return 66;case 2:if($Yt(t,1),0===D2t(KYt(t)))for(;;)if($Yt(t,1),0!==D2t(KYt(t)))return ZYt(t);return ZYt(t);case 3:return 0;case 4:return $Yt(t,0),0===X7t(KYt(t))?0:ZYt(t);case 5:return 6;case 6:$Yt(t,34);var k=q2t(KYt(t));return 0===k?Q(t):1===k?Z(t):ZYt(t);case 7:if($Yt(t,66),0===w7t(KYt(t))){var y=KYt(t);if(0==($r>>0)return ZYt(t);switch(U){case 0:for(;;){var W=h7t(KYt(t));if(3>>0)return ZYt(t);switch(W){case 0:continue;case 1:return V(t);case 2:return J(t);default:return S(t)}}case 1:return V(t);case 2:return J(t);default:return S(t)}case 15:$Yt(t,45);var H=M7t(KYt(t));return 0===H?0===I2t(KYt(t))?44:ZYt(t):1===H?G(t):ZYt(t);case 16:$Yt(t,66);var rt=Z7t(KYt(t));if(0===rt){$Yt(t,2);var ct=Q2t(KYt(t));if(2>>0)return ZYt(t);switch(ct){case 0:for(;;){var pt=Q2t(KYt(t));if(2>>0)return ZYt(t);switch(pt){case 0:continue;case 1:return i(t);default:return e(t)}}case 1:return i(t);default:return e(t)}}return 1===rt?5:ZYt(t);case 17:$Yt(t,18);var yt=K2t(KYt(t));if(7>>0)return ZYt(t);switch(yt){case 0:return c(t);case 1:return E(t);case 2:return B(t);case 3:return R(t);case 4:return D(t);case 5:return F(t);case 6:return P(t);default:return I(t)}case 18:$Yt(t,18);var Ft=S7t(KYt(t));if(4>>0)return ZYt(t);switch(Ft){case 0:return c(t);case 1:return E(t);case 2:return S(t);case 3:return F(t);default:return l(t)}case 19:return 48;case 20:return 46;case 21:return 52;case 22:$Yt(t,54);var Ot=KYt(t);return 0==(61>>0)return ZYt(t);switch(Rt){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Mt=m7t(KYt(t));if(2>>0)return ZYt(t);switch(Mt){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,19);var Ut=q2t(KYt(t));return 0===Ut?Q(t):1===Ut?Z(t):ZYt(t)}}case 29:$Yt(t,34);var Vt=u4t(KYt(t));if(2>>0)return ZYt(t);switch(Vt){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var zt=u4t(KYt(t));if(2>>0)return ZYt(t);switch(zt){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Zt=_7t(KYt(t));if(2>>0)return ZYt(t);switch(Zt){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,20);var nr=C2t(KYt(t));if(2>>0)return ZYt(t);switch(nr){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var ar=i7t(KYt(t));if(2>>0)return ZYt(t);switch(ar){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var ir=t7t(KYt(t));if(2>>0)return ZYt(t);switch(ir){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,21);var cr=q2t(KYt(t));return 0===cr?Q(t):1===cr?Z(t):ZYt(t)}}}}}}case 30:$Yt(t,34);var or=KYt(t),kr=35>>0)return ZYt(t);switch(kr){case 0:return Q(t);case 1:return Z(t);case 2:$Yt(t,34);var _r=J2t(KYt(t));if(2<_r>>>0)return ZYt(t);switch(_r){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Ar=Y7t(KYt(t));if(2>>0)return ZYt(t);switch(Ar){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Ir=m7t(KYt(t));if(2>>0)return ZYt(t);switch(Ir){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,22);var Cr=q2t(KYt(t));return 0===Cr?Q(t):1===Cr?Z(t):ZYt(t)}}}default:$Yt(t,34);var Lr=Y7t(KYt(t));if(2>>0)return ZYt(t);switch(Lr){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Rr=C2t(KYt(t));if(2>>0)return ZYt(t);switch(Rr){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Yr=t7t(KYt(t));if(2>>0)return ZYt(t);switch(Yr){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Wr=R2t(KYt(t));if(2>>0)return ZYt(t);switch(Wr){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Hr=n4t(KYt(t));if(2
>>0)return ZYt(t);switch(Hr){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,23);var Qr=q2t(KYt(t));return 0===Qr?Q(t):1===Qr?Z(t):ZYt(t)}}}}}}case 31:$Yt(t,34);var Zr=i7t(KYt(t));if(2>>0)return ZYt(t);switch(Zr){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var te=_7t(KYt(t));if(2>>0)return ZYt(t);switch(te){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var ne=n4t(KYt(t));if(2>>0)return ZYt(t);switch(ne){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var fe=C2t(KYt(t));if(2>>0)return ZYt(t);switch(fe){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,24);var se=q2t(KYt(t));return 0===se?Q(t):1===se?Z(t):ZYt(t)}}}}case 32:$Yt(t,34);var le=t7t(KYt(t));if(2>>0)return ZYt(t);switch(le){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var ye=Y7t(KYt(t));if(2>>0)return ZYt(t);switch(ye){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Ie=C2t(KYt(t));if(2>>0)return ZYt(t);switch(Ie){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Pe=f7t(KYt(t));if(2>>0)return ZYt(t);switch(Pe){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var De=a4t(KYt(t));if(2>>0)return ZYt(t);switch(De){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Ne=i7t(KYt(t));if(2>>0)return ZYt(t);switch(Ne){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Xe=N7t(KYt(t));if(2>>0)return ZYt(t);switch(Xe){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Je=C2t(KYt(t));if(2>>0)return ZYt(t);switch(Je){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,25);var qe=q2t(KYt(t));return 0===qe?Q(t):1===qe?Z(t):ZYt(t)}}}}}}}}case 33:$Yt(t,34);var Ve=f4t(KYt(t));if(2>>0)return ZYt(t);switch(Ve){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Ze=KYt(t),en=35>>0)return ZYt(t);switch(en){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var cn=C2t(KYt(t));if(2>>0)return ZYt(t);switch(cn){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var sn=R2t(KYt(t));if(2>>0)return ZYt(t);switch(sn){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,26);var bn=q2t(KYt(t));return 0===bn?Q(t):1===bn?Z(t):ZYt(t)}}}}case 34:$Yt(t,34);var pn=P2t(KYt(t));if(2>>0)return ZYt(t);switch(pn){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var kn=KYt(t),dn=35>>0)return ZYt(t);switch(dn){case 0:return Q(t);case 1:return Z(t);case 2:$Yt(t,34);var mn=_7t(KYt(t));if(2>>0)return ZYt(t);switch(mn){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,27);var gn=q2t(KYt(t));return 0===gn?Q(t):1===gn?Z(t):ZYt(t)}default:$Yt(t,34);var Dn=H7t(KYt(t));if(2>>0)return ZYt(t);switch(Dn){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Cn=C2t(KYt(t));if(2>>0)return ZYt(t);switch(Cn){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var jn=f7t(KYt(t));if(2>>0)return ZYt(t);switch(jn){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,28);var Wn=q2t(KYt(t));return 0===Wn?Q(t):1===Wn?Z(t):ZYt(t)}}}}}case 35:$Yt(t,34);var ua=Y7t(KYt(t));if(2>>0)return ZYt(t);switch(ua){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var oa=KYt(t),da=35>>0)return ZYt(t);switch(da){case 0:return Q(t);case 1:return Z(t);case 2:$Yt(t,34);var ga=Y7t(KYt(t));if(2>>0)return ZYt(t);switch(ga){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var xa=f4t(KYt(t));if(2>>0)return ZYt(t);switch(xa){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Aa=N7t(KYt(t));if(2>>0)return ZYt(t);switch(Aa){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,29);var Ia=q2t(KYt(t));return 0===Ia?Q(t):1===Ia?Z(t):ZYt(t)}}}default:$Yt(t,34);var La=f4t(KYt(t));if(2>>0)return ZYt(t);switch(La){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Ja=t7t(KYt(t));if(2>>0)return ZYt(t);switch(Ja){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Wa=j2t(KYt(t));if(2>>0)return ZYt(t);switch(Wa){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,30);var Ha=q2t(KYt(t));return 0===Ha?Q(t):1===Ha?Z(t):ZYt(t)}}}}}case 36:$Yt(t,34);var za=KYt(t),Qa=35>>0)return ZYt(t);switch(Qa){case 0:return Q(t);case 1:return Z(t);case 2:$Yt(t,34);var Za=P2t(KYt(t));if(2>>0)return ZYt(t);switch(Za){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var eu=C2t(KYt(t));if(2>>0)return ZYt(t);switch(eu){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,31);var iu=q2t(KYt(t));return 0===iu?Q(t):1===iu?Z(t):ZYt(t)}}default:$Yt(t,34);var vu=J2t(KYt(t));if(2>>0)return ZYt(t);switch(vu){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var lu=C2t(KYt(t));if(2>>0)return ZYt(t);switch(lu){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var ku=u4t(KYt(t));if(2>>0)return ZYt(t);switch(ku){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var wu=a4t(KYt(t));if(2>>0)return ZYt(t);switch(wu){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,32);var du=q2t(KYt(t));return 0===du?Q(t):1===du?Z(t):ZYt(t)}}}}}case 37:$Yt(t,34);var Fu=u4t(KYt(t));if(2>>0)return ZYt(t);switch(Fu){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Tu=f4t(KYt(t));if(2>>0)return ZYt(t);switch(Tu){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,34);var Au=R2t(KYt(t));if(2>>0)return ZYt(t);switch(Au){case 0:return Q(t);case 1:return Z(t);default:$Yt(t,33);var Pu=q2t(KYt(t));return 0===Pu?Q(t):1===Pu?Z(t):ZYt(t)}}}case 38:$Yt(t,38);var Du=KYt(t);return 0==(ln>>0)return vGt(gCt);var ct=rt;if(34<=ct)switch(ct){case 34:var pt=y4t(t,r),yt=wVt(r),Ft=P4t(t,yt);return[0,Ft[1],[3,pt,Ft[2],yt]];case 35:return[0,t,66];case 38:return[0,t,0];case 39:return[0,t,1];case 40:return[0,t,2];case 41:return[0,t,3];case 42:return[0,t,4];case 43:return[0,t,5];case 44:return[0,t,12];case 45:return[0,t,10];case 46:return[0,t,8];case 47:return[0,t,9];case 52:return[0,t,95];case 53:return[0,t,96];case 56:return[0,t,$r];case 58:return[0,t,86];case 59:return[0,t,88];case 61:return[0,t,11];case 63:return[0,t,bo];case 64:return[0,t,Zt];case 65:return[0,t[4]?F4t(t,y4t(t,r),7):t,Xf];case 66:return[0,t,[5,wVt(r)]];case 60:break;case 36:case 50:return[0,t,6];case 37:case 51:return[0,t,7];case 48:case 57:return[0,t,83];case 49:case 55:return[0,t,82];default:return[0,t,79]}else switch(ct){case 0:return[2,g4t(t,r)];case 1:return[2,t];case 2:var Ot=h4t(t,r),Ct=ZGt(qo),Lt=C4t(t,Ct,r),Rt=Lt[1];return[1,Rt,T4t(Rt,Ot,Lt[2],Ct,1)];case 3:var Mt=wVt(r);if(t[5]){var Ut=t[4]?E4t(t,y4t(t,r),Mt):t,Vt=x2t(1,Ut),zt=nVt(r);return Hw(kVt(r,zt-1|0,1),xCt)&&Kw(kVt(r,zt-2|0,1),TCt)?[0,Vt,83]:[2,Vt]}var nr=h4t(t,r),ar=ZGt(qo);nqt(ar,Mt);var ir=C4t(t,ar,r),cr=ir[1];return[1,cr,T4t(cr,nr,ir[2],ar,1)];case 4:return t[4]?[2,x2t(0,t)]:(tVt(r),QYt(r),0===function(t){return 0===E7t(KYt(t))?0:ZYt(t)}(r)?[0,t,$r]:vGt(ACt));case 5:var or=h4t(t,r),kr=ZGt(qo),_r=N4t(t,kr,r),Ar=_r[1];return[1,Ar,T4t(Ar,or,_r[2],kr,0)];case 6:var Ir=wVt(r),Cr=h4t(t,r),Lr=ZGt(qo),Rr=ZGt(qo);nqt(Rr,Ir);var Yr=R4t(t,Ir,Lr,Rr,0,r),Wr=Yr[1],Hr=[0,Wr[1],Cr,Yr[2]],Qr=Yr[3],Zr=tqt(Rr);return[0,Wr,[1,[0,Hr,tqt(Lr),Zr,Qr]]];case 7:return D4t(t,r,function(t,r){function e(t){if(0===s7t(KYt(t))){if(0===r7t(KYt(t)))for(;;){$Yt(t,0);var r=z2t(KYt(t));if(0!==r){if(1===r)t:for(;;){if(0===r7t(KYt(t)))for(;;){$Yt(t,0);var e=z2t(KYt(t));if(0!==e){if(1===e)continue t;return ZYt(t)}}return ZYt(t)}return ZYt(t)}}return ZYt(t)}return ZYt(t)}QYt(r);var n=O7t(KYt(r));if(0===n)for(;;){var a=V2t(KYt(r));if(0!==a){var u=1===a?e(r):ZYt(r);break}}else u=1===n?e(r):ZYt(r);return 0===u?[0,t,A4t(0,wVt(r))]:vGt(SCt)});case 8:return[0,t,A4t(0,wVt(r))];case 9:return D4t(t,r,function(t,r){function e(t){if(0===F7t(KYt(t))){if(0===b7t(KYt(t)))for(;;){$Yt(t,0);var r=e7t(KYt(t));if(0!==r){if(1===r)t:for(;;){if(0===b7t(KYt(t)))for(;;){$Yt(t,0);var e=e7t(KYt(t));if(0!==e){if(1===e)continue t;return ZYt(t)}}return ZYt(t)}return ZYt(t)}}return ZYt(t)}return ZYt(t)}QYt(r);var n=O7t(KYt(r));if(0===n)for(;;){var a=V2t(KYt(r));if(0!==a){var u=1===a?e(r):ZYt(r);break}}else u=1===n?e(r):ZYt(r);return 0===u?[0,t,A4t(2,wVt(r))]:vGt(ECt)});case 10:return[0,t,A4t(2,wVt(r))];case 11:return D4t(t,r,function(t,r){function e(t){if(0===b7t(KYt(t)))for(;;){$Yt(t,0);var r=e7t(KYt(t));if(0!==r){if(1===r)t:for(;;){if(0===b7t(KYt(t)))for(;;){$Yt(t,0);var e=e7t(KYt(t));if(0!==e){if(1===e)continue t;return ZYt(t)}}return ZYt(t)}return ZYt(t)}}return ZYt(t)}QYt(r);var n=O7t(KYt(r));if(0===n)for(;;){var a=V2t(KYt(r));if(0!==a){var u=1===a?e(r):ZYt(r);break}}else u=1===n?e(r):ZYt(r);return 0===u?[0,t,A4t(1,wVt(r))]:vGt(FCt)});case 12:return[0,t,A4t(1,wVt(r))];case 13:return D4t(t,r,function(t,r){function e(t){if(0===B2t(KYt(t))){if(0===M2t(KYt(t)))for(;;){$Yt(t,0);var r=L7t(KYt(t));if(0!==r){if(1===r)t:for(;;){if(0===M2t(KYt(t)))for(;;){$Yt(t,0);var e=L7t(KYt(t));if(0!==e){if(1===e)continue t;return ZYt(t)}}return ZYt(t)}return ZYt(t)}}return ZYt(t)}return ZYt(t)}if(QYt(r),0===function(t){var r=O7t(KYt(t));if(0===r)for(;;){var n=V2t(KYt(t));if(0!==n)return 1===n?e(t):ZYt(t)}return 1===r?e(t):ZYt(t)}(r)){var n=wVt(r);try{return[0,t,A4t(3,n)]}catch(e){throw e=ed(e)}}return vGt(_Ct)});case 14:var te=wVt(r);try{return[0,t,A4t(3,te)]}catch(W){throw W=ed(W)}case 15:return D4t(t,r,function(t,r){function e(t){for(;;){$Yt(t,0);var r=W7t(KYt(t));if(0!==r){if(1===r)t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,0);var e=W7t(KYt(t));if(0!==e){if(1===e)continue t;return ZYt(t)}}return ZYt(t)}return ZYt(t)}}}function n(t){for(;;)if($Yt(t,0),0!==L2t(KYt(t)))return ZYt(t)}function a(t){var r=c4t(KYt(t));if(2>>0)return ZYt(t);switch(r){case 0:var a=n7t(KYt(t));return 0===a?n(t):1===a?e(t):ZYt(t);case 1:return n(t);default:return e(t)}}function u(t){if(0===L2t(KYt(t)))for(;;){var r=i4t(KYt(t));if(2>>0)return ZYt(t);switch(r){case 0:continue;case 1:return a(t);default:t:for(;;){if(0===L2t(KYt(t)))for(;;){var e=i4t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:continue;case 1:return a(t);default:continue t}}return ZYt(t)}}}return ZYt(t)}function i(t){var r=T7t(KYt(t));if(0===r)for(;;){var e=i4t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:continue;case 1:return a(t);default:t:for(;;){if(0===L2t(KYt(t)))for(;;){var n=i4t(KYt(t));if(2>>0)return ZYt(t);switch(n){case 0:continue;case 1:return a(t);default:continue t}}return ZYt(t)}}}return 1===r?a(t):ZYt(t)}function c(t){var r=W2t(KYt(t));return 0===r?i(t):1===r?a(t):ZYt(t)}function f(t){for(;;){var r=y7t(KYt(t));if(2>>0)return ZYt(t);switch(r){case 0:return i(t);case 1:continue;default:return a(t)}}}QYt(r);var s=$2t(KYt(r));if(3>>0)var o=ZYt(r);else switch(s){case 0:for(;;){var v=h7t(KYt(r));if(3>>0)o=ZYt(r);else switch(v){case 0:continue;case 1:o=u(r);break;case 2:o=c(r);break;default:o=f(r)}break}break;case 1:o=u(r);break;case 2:o=c(r);break;default:o=f(r)}return 0===o?[0,t,A4t(3,wVt(r))]:vGt(yCt)});case 17:return D4t(t,r,function(t,r){function e(t){for(;;){$Yt(t,0);var r=W7t(KYt(t));if(0!==r){if(1===r)t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,0);var e=W7t(KYt(t));if(0!==e){if(1===e)continue t;return ZYt(t)}}return ZYt(t)}return ZYt(t)}}}function n(t){return $Yt(t,0),0===L2t(KYt(t))?e(t):ZYt(t)}QYt(r);var a=$2t(KYt(r));if(3
>>0)var u=ZYt(r);else switch(a){case 0:for(;;){var i=KYt(r),c=8>>0)u=ZYt(r);else switch(c){case 0:continue;case 1:for(;;){$Yt(r,0);var f=M7t(KYt(r));if(0===f)u=0;else{if(1===f)continue;u=ZYt(r)}break}break;default:for(;;){$Yt(r,0);var s=s4t(KYt(r));if(2>>0)u=ZYt(r);else switch(s){case 0:u=0;break;case 1:continue;default:t:for(;;){if(0===L2t(KYt(r)))for(;;){$Yt(r,0);var o=s4t(KYt(r));if(2>>0)var l=ZYt(r);else switch(o){case 0:l=0;break;case 1:continue;default:continue t}break}else l=ZYt(r);u=l;break}}break}}break}break;case 1:u=0===L2t(KYt(r))?e(r):ZYt(r);break;case 2:for(;;){$Yt(r,0);var b=M7t(KYt(r));if(0===b)u=n(r);else{if(1===b)continue;u=ZYt(r)}break}break;default:for(;;){$Yt(r,0);var p=s4t(KYt(r));if(2

>>0)u=ZYt(r);else switch(p){case 0:u=n(r);break;case 1:continue;default:t:for(;;){if(0===L2t(KYt(r)))for(;;){$Yt(r,0);var k=s4t(KYt(r));if(2>>0)var d=ZYt(r);else switch(k){case 0:d=n(r);break;case 1:continue;default:continue t}break}else d=ZYt(r);u=d;break}}break}}return 0===u?[0,t,A4t(3,wVt(r))]:vGt(mCt)});case 19:return[0,t,111];case 20:return[0,t,OCt];case 21:return[0,t,ICt];case 22:return[0,t,113];case 23:return[0,t,41];case 24:return[0,t,30];case 25:return[0,t,53];case 26:return[0,t,112];case 27:return[0,t,29];case 28:return[0,t,en];case 29:return[0,t,42];case 30:return[0,t,115];case 31:return[0,t,31];case 33:return[0,t,Hp];case 32:break;default:return[0,t,A4t(3,wVt(r))]}return[0,t,46]}),q4t=j4t(function(t,r){function e(t,r){for(;;){$Yt(r,73);var e=q2t(KYt(r));if(0!==e)return 1===e?t<50?i(t+1|0,r):Zw(i,[0,r]):ZYt(r)}}function i(t,r){if(0===v4t(KYt(r))){var n=j7t(KYt(r));if(0===n)return 0===M2t(KYt(r))&&0===M2t(KYt(r))&&0===M2t(KYt(r))?t<50?e(t+1|0,r):Zw(e,[0,r]):ZYt(r);if(1===n){if(0===M2t(KYt(r)))for(;;){var a=Y2t(KYt(r));if(0!==a)return 1===a?t<50?e(t+1|0,r):Zw(e,[0,r]):ZYt(r)}return ZYt(r)}return ZYt(r)}return ZYt(r)}function c(t){return $w(e(0,t))}function f(t){return $w(i(0,t))}function l(t){for(;;)if($Yt(t,20),0!==k4t(KYt(t)))return ZYt(t)}function k(t){for(;;)if($Yt(t,18),0!==k4t(KYt(t)))return ZYt(t)}function y(t){for(;;)if($Yt(t,18),0!==k4t(KYt(t)))return ZYt(t)}function _(t){t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,19);var r=B7t(KYt(t));if(2>>0)return ZYt(t);switch(r){case 0:return y(t);case 1:continue;default:continue t}}return ZYt(t)}}function F(t){$Yt(t,20);var r=Q7t(KYt(t));if(3>>0)return ZYt(t);switch(r){case 0:return l(t);case 1:var e=n7t(KYt(t));if(0===e)for(;;){$Yt(t,19);var n=o7t(KYt(t));if(0===n)return y(t);if(1!==n)return ZYt(t)}if(1===e)for(;;){$Yt(t,19);var a=B7t(KYt(t));if(2>>0)return ZYt(t);switch(a){case 0:return y(t);case 1:continue;default:return _(t)}}return ZYt(t);case 2:for(;;){$Yt(t,19);var u=o7t(KYt(t));if(0===u)return k(t);if(1!==u)return ZYt(t)}default:for(;;){$Yt(t,19);var i=B7t(KYt(t));if(2>>0)return ZYt(t);switch(i){case 0:return k(t);case 1:continue;default:return _(t)}}}}function E(t){return $Yt(t,4),0===p4t(KYt(t))?4:ZYt(t)}function S(t){return 0===D7t(KYt(t))&&0===k7t(KYt(t))&&0===r4t(KYt(t))&&0===I7t(KYt(t))&&0===P7t(KYt(t))&&0===p7t(KYt(t))&&0===w7t(KYt(t))&&0===D7t(KYt(t))&&0===v4t(KYt(t))&&0===C7t(KYt(t))&&0===K7t(KYt(t))?4:ZYt(t)}function I(t){$Yt(t,21);var r=x7t(KYt(t));if(2>>0)return ZYt(t);switch(r){case 0:return l(t);case 1:for(;;){$Yt(t,21);var e=Z2t(KYt(t));if(3>>0)return ZYt(t);switch(e){case 0:return l(t);case 1:continue;case 2:return F(t);default:t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,21);var n=Z2t(KYt(t));if(3>>0)return ZYt(t);switch(n){case 0:return l(t);case 1:continue;case 2:return F(t);default:continue t}}return ZYt(t)}}}default:return F(t)}}function P(t){for(;;)if($Yt(t,14),0!==k4t(KYt(t)))return ZYt(t)}function U(t){$Yt(t,21);var r=o7t(KYt(t));if(0===r)return l(t);if(1===r)for(;;){$Yt(t,21);var e=B7t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:return l(t);case 1:continue;default:t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,21);var n=B7t(KYt(t));if(2>>0)return ZYt(t);switch(n){case 0:return l(t);case 1:continue;default:continue t}}return ZYt(t)}}}return ZYt(t)}function B(t){t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,21);var r=V7t(KYt(t));if(3>>0)return ZYt(t);switch(r){case 0:return l(t);case 1:return U(t);case 2:continue;default:continue t}}return ZYt(t)}}QYt(r);var J=KYt(r),G=sc>>0)var V=ZYt(r);else switch(G){case 0:V=132;break;case 1:V=133;break;case 2:if($Yt(r,2),0===D2t(KYt(r))){for(;;)if($Yt(r,2),0!==D2t(KYt(r))){V=ZYt(r);break}}else V=ZYt(r);break;case 3:V=0;break;case 4:$Yt(r,0),V=0===X7t(KYt(r))?0:ZYt(r);break;case 5:$Yt(r,Mi),V=0===u7t(KYt(r))?($Yt(r,97),0===u7t(KYt(r))?93:ZYt(r)):ZYt(r);break;case 6:V=8;break;case 7:$Yt(r,131);var W=KYt(r);V=0==(32>>0)V=ZYt(r);else switch(rt){case 0:$Yt(r,119),V=0===u7t(KYt(r))?109:ZYt(r);break;case 1:V=5;break;default:V=108}break;case 14:$Yt(r,Hp);var ct=KYt(r),pt=42>>0)V=ZYt(r);else switch(Ct){case 0:V=l(r);break;case 1:continue;case 2:V=F(r);break;default:t:for(;;){if(0===L2t(KYt(r)))for(;;){$Yt(r,21);var Lt=Z2t(KYt(r));if(3>>0)var Rt=ZYt(r);else switch(Lt){case 0:Rt=l(r);break;case 1:continue;case 2:Rt=F(r);break;default:continue t}break}else Rt=ZYt(r);V=Rt;break}}break}else V=ZYt(r);break;case 18:$Yt(r,129);var Mt=A7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Mt){case 0:$Yt(r,3);var Ut=Q2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ut){case 0:for(;;){var Vt=Q2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Vt){case 0:continue;case 1:V=E(r);break;default:V=S(r)}break}break;case 1:V=E(r);break;default:V=S(r)}break;case 1:V=6;break;default:V=D}break;case 19:$Yt(r,21);var zt=K2t(KYt(r));if(7>>0)V=ZYt(r);else switch(zt){case 0:V=l(r);break;case 1:V=I(r);break;case 2:for(;;){$Yt(r,15);var nr=t4t(KYt(r));if(4>>0)V=ZYt(r);else switch(nr){case 0:V=P(r);break;case 1:V=U(r);break;case 2:continue;case 3:for(;;){$Yt(r,14);var ar=e4t(KYt(r));if(2>>0)V=ZYt(r);else switch(ar){case 0:V=P(r);break;case 1:V=U(r);break;default:continue}break}break;default:t:for(;;){if(0===b7t(KYt(r)))for(;;){$Yt(r,15);var ir=$7t(KYt(r));if(2>>0)var cr=ZYt(r);else switch(ir){case 0:for(;;)if($Yt(r,14),0!==k4t(KYt(r))){cr=ZYt(r);break}break;case 1:continue;default:continue t}break}else cr=ZYt(r);V=cr;break}}break}break;case 3:for(;;){$Yt(r,21);var or=e4t(KYt(r));if(2>>0)V=ZYt(r);else switch(or){case 0:V=l(r);break;case 1:V=U(r);break;default:continue}break}break;case 4:$Yt(r,20);var kr=U7t(KYt(r));if(0===kr)V=l(r);else if(1===kr)for(;;){$Yt(r,11);var _r=N2t(KYt(r));if(2<_r>>>0)V=ZYt(r);else switch(_r){case 0:for(;;)if($Yt(r,10),0!==k4t(KYt(r))){V=ZYt(r);break}break;case 1:continue;default:t:for(;;){if(0===r7t(KYt(r)))for(;;){$Yt(r,11);var Ar=N2t(KYt(r));if(2>>0)var Ir=ZYt(r);else switch(Ar){case 0:for(;;)if($Yt(r,10),0!==k4t(KYt(r))){Ir=ZYt(r);break}break;case 1:continue;default:continue t}break}else Ir=ZYt(r);V=Ir;break}}break}else V=ZYt(r);break;case 5:V=F(r);break;case 6:$Yt(r,20);var Cr=J7t(KYt(r));if(0===Cr)V=l(r);else if(1===Cr)for(;;){$Yt(r,13);var Lr=$7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Lr){case 0:for(;;)if($Yt(r,12),0!==k4t(KYt(r))){V=ZYt(r);break}break;case 1:continue;default:t:for(;;){if(0===b7t(KYt(r)))for(;;){$Yt(r,13);var Rr=$7t(KYt(r));if(2>>0)var Yr=ZYt(r);else switch(Rr){case 0:for(;;)if($Yt(r,12),0!==k4t(KYt(r))){Yr=ZYt(r);break}break;case 1:continue;default:continue t}break}else Yr=ZYt(r);V=Yr;break}}break}else V=ZYt(r);break;default:$Yt(r,20);var Wr=G2t(KYt(r));if(0===Wr)V=l(r);else if(1===Wr)for(;;){$Yt(r,17);var Hr=g7t(KYt(r));if(2


>>0)V=ZYt(r);else switch(Hr){case 0:for(;;)if($Yt(r,16),0!==k4t(KYt(r))){V=ZYt(r);break}break;case 1:continue;default:t:for(;;){if(0===M2t(KYt(r)))for(;;){$Yt(r,17);var Qr=g7t(KYt(r));if(2>>0)var Zr=ZYt(r);else switch(Qr){case 0:for(;;)if($Yt(r,16),0!==k4t(KYt(r))){Zr=ZYt(r);break}break;case 1:continue;default:continue t}break}else Zr=ZYt(r);V=Zr;break}}break}else V=ZYt(r)}break;case 20:$Yt(r,21);var te=S7t(KYt(r));if(4>>0)V=ZYt(r);else switch(te){case 0:V=l(r);break;case 1:V=I(r);break;case 2:for(;;){$Yt(r,21);var ne=S7t(KYt(r));if(4>>0)V=ZYt(r);else switch(ne){case 0:V=l(r);break;case 1:V=I(r);break;case 2:continue;case 3:V=F(r);break;default:V=B(r)}break}break;case 3:V=F(r);break;default:V=B(r)}break;case 21:V=85;break;case 22:V=83;break;case 23:$Yt(r,en);var fe=KYt(r),se=59>>0)V=ZYt(r);else switch(bn){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var pn=m7t(KYt(r));if(2>>0)V=ZYt(r);else switch(pn){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var kn=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(kn){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var dn=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(dn){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,22);var mn=q2t(KYt(r));V=0===mn?c(r):1===mn?f(r):ZYt(r)}}}break;default:$Yt(r,73);var gn=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(gn){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Dn=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Dn){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Cn=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Cn){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,23);var Wn=q2t(KYt(r));V=0===Wn?c(r):1===Wn?f(r):ZYt(r)}}}}break;case 34:$Yt(r,73);var ua=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(ua){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var oa=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(oa){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var da=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(da){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var ga=O2t(KYt(r));if(2>>0)V=ZYt(r);else switch(ga){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,24);var xa=q2t(KYt(r));V=0===xa?c(r):1===xa?f(r):ZYt(r)}}}}break;case 35:$Yt(r,73);var Aa=KYt(r),Ia=35>>0)V=ZYt(r);else switch(Ia){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var La=z7t(KYt(r));if(3>>0)V=ZYt(r);else switch(La){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Ja=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ja){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,25);var Wa=q2t(KYt(r));V=0===Wa?c(r):1===Wa?f(r):ZYt(r)}break;default:$Yt(r,73);var Ha=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ha){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var za=o4t(KYt(r));if(2>>0)V=ZYt(r);else switch(za){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,26);var Qa=q2t(KYt(r));V=0===Qa?c(r):1===Qa?f(r):ZYt(r)}}}break;case 3:$Yt(r,73);var Za=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Za){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var eu=n4t(KYt(r));if(2>>0)V=ZYt(r);else switch(eu){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var iu=n4t(KYt(r));if(2>>0)V=ZYt(r);else switch(iu){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,27);var vu=q2t(KYt(r));V=0===vu?c(r):1===vu?f(r):ZYt(r)}}}break;default:$Yt(r,73);var lu=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(lu){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var ku=z7t(KYt(r));if(3>>0)V=ZYt(r);else switch(ku){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var wu=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(wu){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,28);var du=q2t(KYt(r));V=0===du?c(r):1===du?f(r):ZYt(r)}break;default:$Yt(r,73);var Fu=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Fu){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Tu=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Tu){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Au=P2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Au){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Pu=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Pu){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,29);var Du=q2t(KYt(r));V=0===Du?c(r):1===Du?f(r):ZYt(r)}}}}}}}break;case 36:$Yt(r,73);var Uu=KYt(r),ju=35>>0)V=ZYt(r);else switch(ju){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Xu=KYt(r),Yu=35>>0)V=ZYt(r);else switch(Yu){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Ku=P2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ku){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var ri=j2t(KYt(r));if(2>>0)V=ZYt(r);else switch(ri){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var fi=j2t(KYt(r));if(2>>0)V=ZYt(r);else switch(fi){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var ki=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(ki){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Fi=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Fi){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,30);var Ii=q2t(KYt(r));V=0===Ii?c(r):1===Ii?f(r):ZYt(r)}}}}}break;case 3:$Yt(r,73);var Ni=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ni){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Li=i7t(KYt(r));if(2
  • >>0)V=ZYt(r);else switch(Li){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ri=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ri){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var ji=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(ji){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,31);var Gi=q2t(KYt(r));V=0===Gi?c(r):1===Gi?f(r):ZYt(r)}}}}break;case 4:$Yt(r,73);var Yi=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Yi){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Zi=P2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Zi){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var ic=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(ic){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var fc=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(fc){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,32);var bc=q2t(KYt(r));V=0===bc?c(r):1===bc?f(r):ZYt(r)}}}}break;default:$Yt(r,73);var mc=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(mc){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var yc=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(yc){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var _c=C2t(KYt(r));if(2<_c>>>0)V=ZYt(r);else switch(_c){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,33);var Fc=q2t(KYt(r));V=0===Fc?c(r):1===Fc?f(r):ZYt(r)}}}}break;default:$Yt(r,34);var Ac=q2t(KYt(r));V=0===Ac?c(r):1===Ac?f(r):ZYt(r)}break;case 37:$Yt(r,73);var Uc=KYt(r),jc=35>>0)V=ZYt(r);else switch(jc){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Xc=n4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Xc){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Jc=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Jc){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,35);var Vc=q2t(KYt(r));V=0===Vc?c(r):1===Vc?f(r):ZYt(r)}}break;case 3:$Yt(r,73);var Wc=P2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Wc){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Zc=q7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Zc){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,36);var af=q2t(KYt(r));V=0===af?c(r):1===af?f(r):ZYt(r)}}break;default:$Yt(r,73);var sf=KYt(r),bf=35>>0)V=ZYt(r);else switch(bf){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Ff=u4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ff){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ef=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ef){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Pf=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Pf){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,37);var Cf=q2t(KYt(r));V=0===Cf?c(r):1===Cf?f(r):ZYt(r)}}}break;default:$Yt(r,73);var jf=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(jf){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Bf=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Bf){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var qf=R2t(KYt(r));if(2>>0)V=ZYt(r);else switch(qf){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Qf=n4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Qf){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,38);var ns=q2t(KYt(r));V=0===ns?c(r):1===ns?f(r):ZYt(r)}}}}}}break;case 38:$Yt(r,73);var as=KYt(r),is=35>>0)V=ZYt(r);else switch(is){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var cs=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(cs){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var fs=n4t(KYt(r));if(2>>0)V=ZYt(r);else switch(fs){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var os=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(os){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,39);var bs=q2t(KYt(r));V=0===bs?c(r):1===bs?f(r):ZYt(r)}}}break;case 3:$Yt(r,73);var ps=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(ps){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var ms=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(ms){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Es=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Es){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var gs=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(gs){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var xs=m7t(KYt(r));if(2>>0)V=ZYt(r);else switch(xs){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,40);var Is=q2t(KYt(r));V=0===Is?c(r):1===Is?f(r):ZYt(r)}}}}}break;case 4:$Yt(r,73);var Ps=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ps){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,41);var Ns=q2t(KYt(r));V=0===Ns?c(r):1===Ns?f(r):ZYt(r)}break;default:$Yt(r,73);var js=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(js){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Xs=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Xs){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Js=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Js){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ws=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ws){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var uo=u4t(KYt(r));if(2>>0)V=ZYt(r);else switch(uo){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var io=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(io){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,42);var co=q2t(KYt(r));V=0===co?c(r):1===co?f(r):ZYt(r)}}}}}}}break;case 39:$Yt(r,73);var so=KYt(r),oo=35>>0)V=ZYt(r);else switch(oo){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,43);var vo=q2t(KYt(r));V=0===vo?c(r):1===vo?f(r):ZYt(r);break;case 3:$Yt(r,73);var po=J2t(KYt(r));if(2>>0)V=ZYt(r);else switch(po){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var mo=KYt(r),Fo=35>>0)V=ZYt(r);else switch(Fo){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var So=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(So){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ao=q7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ao){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Do=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Do){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var No=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(No){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Uo=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Uo){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ho=n4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ho){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,44);var zo=q2t(KYt(r));V=0===zo?c(r):1===zo?f(r):ZYt(r)}}}}}}break;default:$Yt(r,73);var Qo=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Qo){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var tv=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(tv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,45);var nv=q2t(KYt(r));V=0===nv?c(r):1===nv?f(r):ZYt(r)}}}}break;default:$Yt(r,46);var vv=z7t(KYt(r));if(3>>0)V=ZYt(r);else switch(vv){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var wv=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(wv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Fv=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Fv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ev=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ev){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Sv=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Sv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Nv=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Nv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Rv=u4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Rv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Uv=a4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Uv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,47);var jv=q2t(KYt(r));V=0===jv?c(r):1===jv?f(r):ZYt(r)}}}}}}}break;default:$Yt(r,73);var Vv=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Vv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Wv=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Wv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var zv=a4t(KYt(r));if(2>>0)V=ZYt(r);else switch(zv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Kv=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Kv){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var tl=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(tl){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var rl=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(rl){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,48);var nl=q2t(KYt(r));V=0===nl?c(r):1===nl?f(r):ZYt(r)}}}}}}}}break;case 40:$Yt(r,73);var al=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(al){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var pl=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(pl){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,49);var hl=q2t(KYt(r));V=0===hl?c(r):1===hl?f(r):ZYt(r)}}break;case 41:$Yt(r,73);var ml=KYt(r),yl=35>>0)V=ZYt(r);else switch(yl){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Fl=l4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Fl){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,50);var El=q2t(KYt(r));V=0===El?c(r):1===El?f(r):ZYt(r)}break;default:$Yt(r,73);var Sl=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Sl){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ol=_7t(KYt(r));if(2
      >>0)V=ZYt(r);else switch(Ol){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,51);var Nl=q2t(KYt(r));V=0===Nl?c(r):1===Nl?f(r):ZYt(r)}}}break;case 42:$Yt(r,73);var Ll=KYt(r),jl=35>>0)V=ZYt(r);else switch(jl){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,52);var Bl=q2t(KYt(r));V=0===Bl?c(r):1===Bl?f(r):ZYt(r);break;default:$Yt(r,73);var Vl=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Vl){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var rb=KYt(r),nb=35>>0)V=ZYt(r);else switch(nb){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var cb=P2t(KYt(r));if(2>>0)V=ZYt(r);else switch(cb){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var lb=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(lb){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,53);var pb=q2t(KYt(r));V=0===pb?c(r):1===pb?f(r):ZYt(r)}}}}}break;case 43:$Yt(r,73);var db=KYt(r),_b=35>>0)V=ZYt(r);else switch(_b){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Sb=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Sb){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Cb=O2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Cb){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Xb=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Xb){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Hb=j2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Hb){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var zb=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(zb){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,54);var $b=q2t(KYt(r));V=0===$b?c(r):1===$b?f(r):ZYt(r)}}}}}break;case 3:$Yt(r,73);var up=KYt(r),cp=35>>0)V=ZYt(r);else switch(cp){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var op=KYt(r),lp=35>>0)V=ZYt(r);else switch(lp){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var wp=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(wp){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Fp=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Fp){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Tp=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Tp){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,55);var Dp=q2t(KYt(r));V=0===Dp?c(r):1===Dp?f(r):ZYt(r)}}}}break;default:$Yt(r,73);var Np=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Np){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Rp=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Rp){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Up=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Up){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var jp=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(jp){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Xp=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Xp){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Jp=R2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Jp){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,56);var Qp=q2t(KYt(r));V=0===Qp?c(r):1===Qp?f(r):ZYt(r)}}}}}}}break;default:$Yt(r,73);var ek=H7t(KYt(r));if(2>>0)V=ZYt(r);else switch(ek){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var nk=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(nk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var fk=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(fk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var sk=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(sk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,57);var vk=q2t(KYt(r));V=0===vk?c(r):1===vk?f(r):ZYt(r)}}}}}break;case 44:$Yt(r,73);var lk=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(lk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var bk=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(bk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var pk=P2t(KYt(r));if(2>>0)V=ZYt(r);else switch(pk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var kk=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(kk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var wk=t7t(KYt(r));if(2>>0)V=ZYt(r);else switch(wk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,58);var dk=q2t(KYt(r));V=0===dk?c(r):1===dk?f(r):ZYt(r)}}}}}break;case 45:$Yt(r,73);var hk=KYt(r),mk=35>>0)V=ZYt(r);else switch(mk){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var yk=i7t(KYt(r));if(2>>0)V=ZYt(r);else switch(yk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var _k=Y7t(KYt(r));if(2<_k>>>0)V=ZYt(r);else switch(_k){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Fk=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Fk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ek=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ek){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,59);var Sk=q2t(KYt(r));V=0===Sk?c(r):1===Sk?f(r):ZYt(r)}}}}break;case 3:$Yt(r,73);var gk=J2t(KYt(r));if(2>>0)V=ZYt(r);else switch(gk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var xk=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(xk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Tk=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Tk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,60);var Ak=q2t(KYt(r));V=0===Ak?c(r):1===Ak?f(r):ZYt(r)}}}break;default:$Yt(r,73);var Ok=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ok){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Ik=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Ik){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Pk=N7t(KYt(r));if(2>>0)V=ZYt(r);else switch(Pk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Dk=o4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Dk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,61);var Ck=q2t(KYt(r));V=0===Ck?c(r):1===Ck?f(r):ZYt(r)}}}}}break;case 46:$Yt(r,73);var Nk=KYt(r),Lk=35>>0)V=ZYt(r);else switch(Lk){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Rk=KYt(r),Mk=35>>0)V=ZYt(r);else switch(Mk){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Uk=n4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Uk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,62);var jk=q2t(KYt(r));V=0===jk?c(r):1===jk?f(r):ZYt(r)}break;default:$Yt(r,73);var Bk=u4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Bk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Xk=l4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Xk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,63);var Jk=q2t(KYt(r));V=0===Jk?c(r):1===Jk?f(r):ZYt(r)}}}break;case 3:$Yt(r,73);var Gk=KYt(r),qk=35>>0)V=ZYt(r);else switch(qk){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var Yk=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Yk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,64);var Vk=q2t(KYt(r));V=0===Vk?c(r):1===Vk?f(r):ZYt(r)}break;default:$Yt(r,65);var Wk=q2t(KYt(r));V=0===Wk?c(r):1===Wk?f(r):ZYt(r)}break;default:$Yt(r,73);var Hk=J2t(KYt(r));if(2>>0)V=ZYt(r);else switch(Hk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var zk=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(zk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,66);var Kk=u4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Kk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var Qk=a4t(KYt(r));if(2>>0)V=ZYt(r);else switch(Qk){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,67);var $k=q2t(KYt(r));V=0===$k?c(r):1===$k?f(r):ZYt(r)}}}}}break;case 47:$Yt(r,73);var Zk=KYt(r),tw=35>>0)V=ZYt(r);else switch(tw){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var rw=f7t(KYt(r));if(2>>0)V=ZYt(r);else switch(rw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,68);var ew=q2t(KYt(r));V=0===ew?c(r):1===ew?f(r):ZYt(r)}break;default:$Yt(r,73);var nw=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(nw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var aw=R2t(KYt(r));if(2>>0)V=ZYt(r);else switch(aw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,69);var uw=q2t(KYt(r));V=0===uw?c(r):1===uw?f(r):ZYt(r)}}}break;case 48:$Yt(r,73);var iw=KYt(r),fw=35>>0)V=ZYt(r);else switch(fw){case 0:V=c(r);break;case 1:V=f(r);break;case 2:$Yt(r,73);var sw=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(sw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var ow=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(ow){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var vw=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(vw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,70);var lw=q2t(KYt(r));V=0===lw?c(r):1===lw?f(r):ZYt(r)}}}break;default:$Yt(r,73);var bw=Y7t(KYt(r));if(2>>0)V=ZYt(r);else switch(bw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var pw=o4t(KYt(r));if(2>>0)V=ZYt(r);else switch(pw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,71);var kw=q2t(KYt(r));V=0===kw?c(r):1===kw?f(r):ZYt(r)}}}break;case 49:$Yt(r,73);var ww=f4t(KYt(r));if(2>>0)V=ZYt(r);else switch(ww){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var dw=C2t(KYt(r));if(2>>0)V=ZYt(r);else switch(dw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var hw=_7t(KYt(r));if(2>>0)V=ZYt(r);else switch(hw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,73);var mw=R2t(KYt(r));if(2>>0)V=ZYt(r);else switch(mw){case 0:V=c(r);break;case 1:V=f(r);break;default:$Yt(r,72);var yw=q2t(KYt(r));V=0===yw?c(r):1===yw?f(r):ZYt(r)}}}}break;case 50:V=75;break;case 51:$Yt(r,121);var _w=KYt(r),Fw=60<_w?Mi<_w?-1:zw(URt,_w+-61|0)-1|0:-1;V=0===Fw?112:1===Fw?91:ZYt(r);break;case 52:V=76;break;default:V=Eb}if(133>>0)return vGt(qCt);var Ew=V;if(67<=Ew){if(Zt<=Ew)switch(Ew){case 101:return[0,t,97];case 102:return[0,t,68];case 103:return[0,t,67];case 104:return[0,t,99];case 105:return[0,t,98];case 106:return[0,t,78];case 107:return[0,t,77];case 108:return[0,t,75];case 109:return[0,t,76];case 110:return[0,t,73];case 111:return[0,t,72];case 112:return[0,t,71];case 113:return[0,t,70];case 114:return[0,t,95];case 115:return[0,t,96];case 116:return[0,t,bo];case 117:return[0,t,Zt];case 118:return[0,t,$r];case 119:return[0,t,gc];case 120:return[0,t,Uf];case 121:return[0,t,86];case 122:return[0,t,88];case 123:return[0,t,87];case 124:return[0,t,Oi];case 125:return[0,t,Sf];case 126:return[0,t,79];case 127:return[0,t,11];case 128:return[0,t,74];case 129:return[0,t,Qs];case 130:return[0,t,13];case 131:return[0,t,14];case 132:return[0,t[4]?F4t(t,y4t(t,r),7):t,Xf];default:return[0,S4t(t,y4t(t,r)),[5,wVt(r)]]}switch(Ew){case 67:return[0,t,46];case 68:return[0,t,24];case 69:return[0,t,47];case 70:return[0,t,25];case 71:return[0,t,26];case 72:return[0,t,58];case 73:var Sw=y4t(t,r),gw=wVt(r),xw=P4t(t,gw);return[0,xw[1],[3,Sw,xw[2],gw]];case 74:var Tw=y4t(t,r),Aw=wVt(r);return[0,t,[3,Tw,Aw,Aw]];case 75:return[0,t,0];case 76:return[0,t,1];case 77:return[0,t,4];case 78:return[0,t,5];case 79:return[0,t,6];case 80:return[0,t,7];case 81:return[0,t,12];case 82:return[0,t,10];case 83:return[0,t,8];case 84:return[0,t,9];case 85:return[0,t,83];case 86:tVt(r),QYt(r);var Ow=KYt(r);return 0===(0==(62>>0)return ZYt(t);switch(r){case 0:var a=n7t(KYt(t));return 0===a?n(t):1===a?e(t):ZYt(t);case 1:return n(t);default:return e(t)}}function u(t){var r=T7t(KYt(t));if(0===r)for(;;){var e=i4t(KYt(t));if(2>>0)return ZYt(t);switch(e){case 0:continue;case 1:return a(t);default:t:for(;;){if(0===L2t(KYt(t)))for(;;){var n=i4t(KYt(t));if(2>>0)return ZYt(t);switch(n){case 0:continue;case 1:return a(t);default:continue t}}return ZYt(t)}}}return 1===r?a(t):ZYt(t)}QYt(r);var i=X2t(KYt(r));if(2>>0)var c=ZYt(r);else switch(i){case 0:if(0===L2t(KYt(r)))for(;;){var f=i4t(KYt(r));if(2>>0)c=ZYt(r);else switch(f){case 0:continue;case 1:c=a(r);break;default:t:for(;;){if(0===L2t(KYt(r)))for(;;){var s=i4t(KYt(r));if(2>>0)var o=ZYt(r);else switch(s){case 0:continue;case 1:o=a(r);break;default:continue t}break}else o=ZYt(r);c=o;break}}break}else c=ZYt(r);break;case 1:var v=W2t(KYt(r));c=0===v?u(r):1===v?a(r):ZYt(r);break;default:for(;;){var l=y7t(KYt(r));if(2>>0)c=ZYt(r);else switch(l){case 0:c=u(r);break;case 1:continue;default:c=a(r)}break}}return 0===c?[0,t,[0,3,wVt(r)]]:vGt(jCt)});case 20:return D4t(t,r,function(t,r){function e(t){for(;;){$Yt(t,0);var r=W7t(KYt(t));if(0!==r){if(1===r)t:for(;;){if(0===L2t(KYt(t)))for(;;){$Yt(t,0);var e=W7t(KYt(t));if(0!==e){if(1===e)continue t;return ZYt(t)}}return ZYt(t)}return ZYt(t)}}}function n(t){return $Yt(t,0),0===L2t(KYt(t))?e(t):ZYt(t)}QYt(r);var a=X2t(KYt(r));if(2>>0)var u=ZYt(r);else switch(a){case 0:u=0===L2t(KYt(r))?e(r):ZYt(r);break;case 1:for(;;){$Yt(r,0);var i=M7t(KYt(r));if(0===i)u=n(r);else{if(1===i)continue;u=ZYt(r)}break}break;default:for(;;){$Yt(r,0);var c=s4t(KYt(r));if(2>>0)u=ZYt(r);else switch(c){case 0:u=n(r);break;case 1:continue;default:t:for(;;){if(0===L2t(KYt(r)))for(;;){$Yt(r,0);var f=s4t(KYt(r));if(2>>0)var s=ZYt(r);else switch(f){case 0:s=n(r);break;case 1:continue;default:continue t}break}else s=ZYt(r);u=s;break}}break}}return 0===u?[0,t,[0,3,wVt(r)]]:vGt(UCt)});case 22:return[0,t,64];case 23:return[0,t,65];case 24:return[0,t,32];case 25:return[0,t,33];case 26:return[0,t,34];case 27:return[0,t,40];case 28:return[0,t,27];case 29:return[0,t,35];case 30:return[0,t,59];case 31:return[0,t,60];case 32:return[0,t,36];case 33:return[0,t,45];default:return[0,t,[0,3,wVt(r)]]}}),Y4t=zGt([0,XGt]),V4t=function(t,r){return[0,[0],0,r,S2t(t)]},W4t=function(t,r){var e=r+1|0;if(t[1].length-1>>0)var l=ZYt(s);else switch(v){case 0:l=1;break;case 1:l=4;break;case 2:l=0;break;case 3:$Yt(s,0);l=0===X7t(KYt(s))?0:ZYt(s);break;case 4:l=2;break;default:l=3}if(4>>0)var b=vGt(NCt);else switch(l){case 0:var p=wVt(s);nqt(f,p),nqt(c,p);var k=U4t(g4t(a,s),2,c,f,s),w=m4t(k,s),d=tqt(c),h=tqt(f);b=[0,k,[7,[0,[0,k[1],i,w],d,h]]];break;case 1:b=[0,a,Xf];break;case 2:b=[0,a,95];break;case 3:b=[0,a,0];break;default:var m=wVt(s);nqt(f,m),nqt(c,m);var y=U4t(a,2,c,f,s),_=m4t(y,s),F=tqt(c),E=tqt(f);b=[0,y,[7,[0,[0,y[1],i,_],F,E]]]}u=_4t([0,b[1],b[2],0]);break;case 4:u=nd(J4t,a);break;default:u=nd(B4t,a)}var S=u[1],g=S2t(S);t[4]=S;var x=t[2],T=[0,[0,g,u[2]]];Dk(t[1],x)[x+1]=T,t[2]=t[2]+1|0}},H4t=function(t,r,e,n){var a=t?t[1]:t,u=r?r[1]:r;try{var i=pVt(n),c=0}catch(r){if((r=ed(r))!==BYt)throw r;var f=[0,[0,[0,e,dd[2],dd[3]],81],0];i=pVt(nUt),c=f}var s=u?u[1]:_d,o=function(t,r,e){return[0,t,r,Hht,0,e,hd]}(e,i,s[7]),v=[0,V4t(o,0)];return[0,[0,c],[0,0],Y4t[1],[0,Y4t[1]],[0,0],s[8],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[0,aUt],[0,o],v,[0,a],s,e,[0,0]]},z4t=function(t){return FGt(t[22][1])},K4t=function(t){return t[26][7]},Q4t=function(t,r){var e=r[2];t[1][1]=[0,[0,r[1],e],t[1][1]];var n=t[21];return n?ad(n[1],t,e):n},$4t=function(t,r){var e=r[2];if(Hw(e,eUt))return 0;if(ad(Y4t[3],e,t[4][1]))return Q4t(t,[0,r[1],[8,e]]);var n=ad(Y4t[4],e,t[4][1]);return t[4][1]=n,0},Z4t=function(t,r){if(t<2){var e=r[24][1];W4t(e,t);var n=Dk(e[1],t)[t+1];return n?n[1][2]:vGt(iUt)}throw[0,pd,ZMt]},t3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],t,r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},r3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],t,r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},e3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],t,r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},n3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],t,r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},a3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],t,r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},u3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],t,r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},i3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],t,r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},c3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],t,r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},f3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],t,r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},s3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],t,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},o3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],t,r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},v3t=function(t,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],[0,t],r[22],r[23],r[24],r[25],r[26],r[27],r[28]]},l3t=function(t){function r(r){return Q4t(t,r)}return function(t){return TGt(r,t)}},b3t=function(t){var r=t[5][1];return r?[0,r[1][2]]:r},p3t=function(t){var r=t[5][1];return r?[0,r[1][1]]:r},k3t=function(t){return[0,t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15],t[16],t[17],t[18],t[19],t[20],0,t[22],t[23],t[24],t[25],t[26],t[27],t[28]]},w3t=function(t,r,e){return[0,t[1],t[2],Y4t[1],t[4],t[5],t[6],t[7],0,0,0,1,t[12],t[13],t[14],t[15],t[16],e,r,t[19],t[20],t[21],t[22],t[23],t[24],t[25],t[26],t[27],t[28]]},d3t=function(t){return Kw(t,hMt)?0:1},h3t=function(t){if("number"==typeof t){if(48===t)return 1}else if(3===t[0]&&d3t(t[3]))return 1;return 0},m3t=function(t){return Kw(t,oMt)&&Kw(t,vMt)&&Kw(t,lMt)&&Kw(t,bMt)&&Kw(t,pMt)&&Kw(t,kMt)&&Kw(t,wMt)&&Kw(t,dMt)?0:1},y3t=function(t){if("number"==typeof t)switch(t){case 42:case 52:case 53:case 54:case 55:case 56:case 57:case 58:return 1}else if(3===t[0]&&m3t(t[3]))return 1;return 0},_3t=function(t){return Kw(t,fMt)&&Kw(t,sMt)?0:1},F3t=function(t){var r=Lk(t,mMt);if(0<=r)if(0>>0){if(!(109<(e+1|0)>>>0))return 1}else{var n=6!==e?1:0;if(!n)return n}}return I3t(t)},D3t=function(t,r){var e=S3t(t,r);if(y3t(e))return 1;if(h3t(e))return 1;if("number"==typeof e)var n=0;else if(3===e[0])if(_3t(e[3])){var a=1;n=1}else n=0;else n=0;if(!n)a=0;if(a)return 1;if("number"==typeof e)switch(e){case 14:case 28:case 60:case 61:case 62:case 63:case 64:case 65:var u=1;break;default:u=0}else u=3===e[0]?1:0;return u?1:0},C3t=function(t){return D3t(0,t)},N3t=function(t){var r=15===x3t(t)?1:0;if(r)var e=r;else{var n=64===x3t(t)?1:0;if(n){var a=15===S3t(1,t)?1:0;if(a){var u=g3t(1,t)[2][1];e=T3t(t)[3][1]===u?1:0}else e=a}else e=n}return e},L3t=function(t){var r=x3t(t);if("number"==typeof r&&(13===r?1:40===r?1:0))return 1;return 0},R3t=function(t,r){return Q4t(t,[0,T3t(t),r])},M3t=function(t){var r=O3t(t);nd(l3t(t),r);var e=x3t(t);if("number"==typeof e)if(Xf===e)var n=7,a=1;else a=0;else switch(e[0]){case 0:n=0,a=1;break;case 3:n=2,a=1;break;case 1:case 7:n=1,a=1;break;default:a=0}if(!a)n=h3t(e)?3:y3t(e)?50:[1,A2t(e)];return R3t(t,n)},U3t=function(t){function r(r){return Q4t(t,[0,r[1],70])}return function(t){return TGt(r,t)}},j3t=function(t,r){var e=t[6];return e?R3t(t,r):e},B3t=function(t,r){var e=t[6];return e?Q4t(t,[0,r[1],r[2]]):e},X3t=function(t,r){return Q4t(t,[0,r,[7,t[6]]])},J3t=function(t){var r=t[25][1];if(r){var e=z4t(t),n=x3t(t),a=[0,T3t(t),n,e];nd(r[1],a)}var u=t[24][1];W4t(u,0);var i=Dk(u[1],0)[1],c=i?i[1][1]:vGt(uUt);t[23][1]=c;var f=O3t(t);nd(l3t(t),f);var s=t[2][1],o=EGt(Z4t(0,t)[4],s);t[2][1]=o;var v=[0,Z4t(0,t)];t[5][1]=v;var l=t[24][1];W4t(l,0),1>>0?ad(w,e,nd(r,e)):ad(d,e,ad(t[13],0,e))}function R(t,e,n){return r8t([0,e],function(t){var e=nd(m,t);return V3t(t,83),[0,n,e,nd(r,t)]},t)}function M(t,r,e,n){var a=R(t,r,ad(O,0,t)),u=[0,a[1],[1,a[2]]];return[0,[0,u[1],[0,n,[0,u],0,0!==e?1:0,0,1,0]]]}function U(t,e,n,a,u,i){return 1-K4t(t)&&R3t(t,13),[0,r8t([0,e],function(t){var e=H3t(t,82);return V3t(t,83),[0,i,[0,nd(r,t)],e,0!==a?1:0,0!==u?1:0,0,n]},t)]}function j(t,r){var e=x3t(r);if("number"==typeof e&&!(10<=e))switch(e){case 1:if(!t)return 0;break;case 3:if(t)return 0;break;case 8:case 9:return J3t(r)}return M3t(r)}function B(t,r){return r?Q4t(t,[0,r[1][1],8]):r}function X(t,r){return r?Q4t(t,[0,r[1],10]):r}function J(r){V3t(r,66);var e=4===x3t(r)?1:0;if(e){V3t(r,4),G3t(r,0);var n=nd(t[9],r);q3t(r),V3t(r,5);var a=[0,n]}else a=e;return a}bk(r,function(t){return nd(a,t)}),bk(e,function(t){return 1-K4t(t)&&R3t(t,13),r8t(0,function(t){return V3t(t,83),nd(r,t)},t)}),bk(n,function(t){var r=T3t(t),e=x3t(t);if("number"==typeof e){if(bo===e)return J3t(t),[0,[0,r,0]];if(Zt===e)return J3t(t),[0,[0,r,1]]}return 0}),bk(a,function(t){return H3t(t,86),ad(u,t,nd(i,t))}),bk(u,function(t,r){if(86===x3t(t)){var e=[0,r,0];return r8t([0,r[1]],function(t){for(var r=e;;){var n=x3t(t);if("number"!=typeof n||86!==n){var a=SGt(r);if(a){var u=a[2];if(u)return[6,a[1],u[1],u[2]]}throw[0,pd,Ujt]}V3t(t,86),r=[0,nd(i,t),r]}},t)}return r}),bk(i,function(t){return H3t(t,88),ad(c,t,nd(f,t))}),bk(c,function(t,r){if(88===x3t(t)){var e=[0,r,0];return r8t([0,r[1]],function(t){for(var r=e;;){var n=x3t(t);if("number"!=typeof n||88!==n){var a=SGt(r);if(a){var u=a[2];if(u)return[7,a[1],u[1],u[2]]}throw[0,pd,Mjt]}V3t(t,88),r=[0,nd(f,t),r]}},t)}return r}),bk(f,function(t){return ad(s,t,nd(o,t))}),bk(s,function(t,r){var e=x3t(t);if("number"==typeof e&&11===e&&!t[15]){var n=ad(w,t,r);return id(S,t,n[1],0,[0,n[1],[0,[0,n,0],0]])}return r}),bk(o,function(t){var r=x3t(t);return"number"==typeof r&&82===r?r8t(0,function(t){return V3t(t,82),[0,nd(o,t)]},t):nd(v,t)}),bk(v,function(t){return ad(l,t,nd(b,t))}),bk(l,function(t,r){return!I3t(t)&&H3t(t,6)?ad(l,t,r8t([0,r[1]],function(t){return V3t(t,7),[4,r]},t)):r}),bk(b,function(t){var r=T3t(t),e=x3t(t);if("number"==typeof e)switch(e){case 4:return nd(F,t);case 6:return nd(k,t);case 46:return r8t(0,function(t){return V3t(t,46),[8,nd(b,t)]},t);case 53:return r8t(0,function(t){return V3t(t,53),[3,nd(x,t)]},t);case 95:return nd(E,t);case 103:return V3t(t,$r),[0,r,8];case 42:var n=1;break;case 0:case 2:var a=id(g,0,1,1,t);return[0,a[1],[2,a[2]]];case 30:case 31:return V3t(t,e),[0,r,[12,31===e?1:0]];default:n=0}else switch(e[0]){case 1:var u=e[1],i=u[4],c=u[3],f=u[2],s=u[1];return i&&j3t(t,42),V3t(t,[1,[0,s,f,c,i]]),[0,s,[10,[0,f,c]]];case 9:var o=e[3],v=e[2],l=e[1];return V3t(t,[9,l,v,o]),1===l&&j3t(t,42),[0,r,[11,[0,v,o]]];case 3:n=1;break;default:n=0}if(n){var w=nd(P,t);return[0,w[1],[5,w[2]]]}var d=nd(p,e);return d?(V3t(t,e),[0,r,d[1]]):(M3t(t),[0,r,0])}),bk(p,function(t){if("number"==typeof t)switch(t){case 29:return Ojt;case 111:return Ijt;case 112:return Pjt;case 113:return Djt;case 114:return Cjt;case 115:return Njt;case 116:return Ljt}else if(8===t[0])return Rjt;return 0}),bk(k,function(t){return r8t(0,function(t){V3t(t,6);for(var e=0;;){var n=x3t(t);if("number"==typeof n&&(7===n||Xf===n)){var a=SGt(e);return V3t(t,7),[9,a]}var u=[0,nd(r,t),e];7!==x3t(t)&&V3t(t,9),e=u}},t)}),bk(w,function(t,r){return[0,r[1],[0,0,r,0]]}),bk(d,function(t,e){return 1-K4t(t)&&R3t(t,13),r8t([0,e[1]],function(t){var n=H3t(t,82);return V3t(t,83),[0,[0,e],nd(r,t),n]},t)}),bk(h,function(t){return function(r){for(var e=r;;){var n=x3t(t);if("number"==typeof n){var a=n-5|0;if(7>>0?Uf===a:5<(a-1|0)>>>0){var u=12===n?1:0,i=u?[0,r8t(0,function(t){return V3t(t,12),[0,L(t)]},t)]:u;return[0,SGt(e),i]}}var c=[0,L(t),e];5!==x3t(t)&&V3t(t,9),e=c}}}),bk(m,function(t){return r8t(0,function(t){V3t(t,4);var r=ad(h,t,0);return V3t(t,5),r},t)}),bk(y,function(t){V3t(t,4);var e=f3t(0,t),n=x3t(e);if("number"==typeof n)switch(n){case 5:var a=Ajt,u=2;break;case 42:u=1;break;case 12:case 110:a=[0,ad(h,e,0)],u=2;break;default:u=0}else u=3===n[0]?1:0;switch(u){case 0:if(nd(p,n)){var i=S3t(1,e);if("number"==typeof i)if(1<(i+Rv|0)>>>0)var c=0;else{var f=[0,ad(h,e,0)];c=1}else c=0;c||(f=[1,nd(r,e)]);var s=f}else s=[1,nd(r,e)];a=s;break;case 1:a=nd(_,e)}if(0===a[0])var o=a;else{var v=a[1];if(t[15])var l=a;else{var b=x3t(t);if("number"==typeof b)if(5===b)if(11===S3t(1,t))var k=[0,ad(h,t,[0,ad(w,t,v),0])],d=1;else k=[1,v],d=1;else 9===b?(V3t(t,9),k=[0,ad(h,t,[0,ad(w,t,v),0])],d=1):d=0;else d=0;d||(k=a),l=k}o=l}return V3t(t,5),o}),bk(_,function(r){var e=S3t(1,r);if("number"==typeof e&&!(1<(e+Rv|0)>>>0)){var n=ad(d,r,ad(t[13],0,r));return H3t(r,9),[0,ad(h,r,[0,n,0])]}return[1,ad(u,r,ad(c,r,ad(s,r,ad(l,r,ad(C,r,nd(T,r))))))]}),bk(F,function(t){var r=T3t(t),e=r8t(0,y,t),n=e[2];return 0===n[0]?id(S,t,r,0,[0,e[1],n[1]]):n[1]}),bk(E,function(t){var r=T3t(t),e=ad(O,0,t);return id(S,t,r,e,nd(m,t))}),bk(S,function(t,e,n,a){return r8t([0,e],function(t){return V3t(t,11),[1,[0,n,a,nd(r,t)]]},t)}),bk(g,function(e,n,a,u){var i=n?2===x3t(u)?1:0:n,c=n?1-i:n;return r8t(0,function(n){V3t(n,i?2:i);var u=gjt;t:for(;;){var f=u[2],s=u[1];if(e&&a)throw[0,pd,pjt];if(c&&!a)throw[0,pd,kjt];var o=T3t(n),v=x3t(n);if("number"==typeof v){if(13<=v)if(Xf===v)var l=[0,SGt(s),f],b=1;else b=0;else if(0===v)b=0;else switch(v-1|0){case 0:i?b=0:(l=[0,SGt(s),f],b=1);break;case 2:i?(l=[0,SGt(s),f],b=1):b=0;break;case 11:if(!a){J3t(n);var p=x3t(n);if("number"==typeof p&&!(10<=p))switch(p){case 1:case 3:case 8:case 9:Q4t(n,[0,o,21]),j(i,n);continue}var k=O3t(n);nd(l3t(n),k),Q4t(n,[0,o,18]),J3t(n),j(i,n);continue}J3t(n);var w=x3t(n);if("number"==typeof w)if(10<=w)var d=1;else switch(w){case 1:case 3:case 8:case 9:j(i,n);var h=x3t(n);if("number"==typeof h){var m=h-1|0;if(2>>0)var y=1;else switch(m){case 0:c?(l=[0,SGt(s),1],b=1,d=0,y=0):y=1;break;case 1:y=1;break;default:Q4t(n,[0,o,20]),l=[0,SGt(s),f],b=1,d=0,y=0}}else y=1;if(y){Q4t(n,[0,o,19]);continue}break;default:d=1}else d=1;if(d){var _=[1,r8t([0,o],function(t){return[0,nd(r,t)]},n)];j(i,n),u=[0,[0,_,s],f];continue}break;default:b=0}if(b)return V3t(n,i?3:1),[0,i,l[2],l[1]]}for(var F=e,E=e,S=0,g=0,x=0;;){var T=x3t(n);if("number"==typeof T)switch(T){case 6:X(n,x),V3t(n,6);var A=x3t(n);if("number"==typeof A)if(6===A){B(n,S);var I=[4,r8t([0,o],function(t,e){return function(n){V3t(n,6);var a=Z3t(n);V3t(n,7),V3t(n,7);var u=x3t(n);if("number"==typeof u){if(4===u)var i=1;else if(95===u)i=1;else{var c=0;i=0}if(i){var f=R(n,t,ad(O,0,n)),s=0,o=1,v=[0,f[1],[1,f[2]]];c=1}}else c=0;if(!c){var l=H3t(n,82);V3t(n,83),s=l,o=0,v=nd(r,n)}return[0,a,v,s,0!==e?1:0,o]}}(o,g),n)],P=1,D=0}else D=1;else D=1;D&&(I=[2,r8t([0,o],function(t,e){return function(n){var a=83===S3t(1,n)?1:0;if(a){var u=Z3t(n);V3t(n,83);var i=[0,u]}else i=a;var c=nd(r,n);return V3t(n,7),V3t(n,83),[0,i,c,nd(r,n),0!==t?1:0,e]}}(g,S),n)],P=1);break;case 42:if(F){if(0===S){var C=[0,T3t(n)];J3t(n),F=0,E=0,g=C;continue}throw[0,pd,wjt]}P=0;break;case 100:if(0===S){var N=T3t(n);J3t(n),F=0,E=0,S=[0,[0,N,0]];continue}P=0;break;case 101:if(0===S){var L=T3t(n);J3t(n),F=0,E=0,S=[0,[0,L,1]];continue}P=0;break;case 4:case 95:X(n,x),B(n,S),I=[3,r8t([0,o],function(t){return function(r){var e=ad(O,0,r);return[0,R(r,T3t(r),e),0!==t?1:0]}}(g),n)],P=1;break;default:P=0}else if(3===T[0])if(Kw(T[3],djt))P=0;else{if(E){if(0===S){var J=[0,T3t(n)];J3t(n),F=0,E=0,x=J;continue}throw[0,pd,hjt]}P=0}else P=0;if(!P){if(g)if(x){I=vGt(mjt);var G=1}else"number"==typeof T?1<(T+Rv|0)>>>0?G=0:(I=U(n,o,S,0,x,[1,[0,g[1],yjt]]),G=1):G=0;else x&&"number"==typeof T?1<(T+Rv|0)>>>0?G=0:(I=U(n,o,S,g,0,[1,[0,x[1],_jt]]),G=1):G=0;if(!G){var q=function(r){G3t(r,0);var e=ad(t[21],0,r);return q3t(r),e},Y=q(n)[2];if(1===Y[0]){var V=Y[1][2];if(Kw(V,Fjt))if(Kw(V,Ejt))var W=0,H=0;else H=1;else H=1;if(H){var z=x3t(n);if("number"==typeof z){var K=z-5|0;if(89>>0)if(91<(K+1|0)>>>0)var Q=1;else X(n,x),B(n,S),I=M(n,o,g,Y),W=1,Q=0;else 1<(K-77|0)>>>0?Q=1:(I=U(n,o,S,g,x,Y),W=1,Q=0)}else Q=1;if(Q){var $=q(n),Z=Hw(V,Sjt);X(n,x),B(n,S),I=[0,r8t([0,o],function(t,r,e,n){return function(a){var u=R(a,t,0),i=u[2][2],c=e[1];if(0===n){var f=i[2],s=f[1];f[2]?Q4t(a,[0,c,76]):s&&!s[2]||Q4t(a,[0,c,76])}else{var o=i[2];!o[1]&&!o[2]||Q4t(a,[0,c,75])}var v=0!==r?1:0,l=n?[1,u]:[2,u];return[0,e[2],l,0,v,0,0,0]}}(o,g,$,Z),n)],W=1}}}else W=0;if(!W){var tt=x3t(n);if("number"==typeof tt){if(4===tt)var rt=1;else if(95===tt)rt=1;else{var et=0;rt=0}rt&&(X(n,x),B(n,S),I=M(n,o,g,Y),et=1)}else et=0;if(!et){var nt=0!==g?1:0;if(1===Y[0]){var at=Y[1],ut=at[2];if(e){if(Hw(xjt,ut))var it=1;else if(nt)if(Hw(Tjt,ut))it=1;else{it=0}else 1,it=0;it&&(Q4t(n,[0,at[1],[10,ut,nt,0]]),0)}else 1}I=U(n,o,S,g,x,Y)}}}}j(i,n),u=[0,[0,I,s],f];continue t}}},u)}),bk(x,function(t){var r=41===x3t(t)?1:0;if(r){V3t(t,41);for(var e=0;;){var n=[0,nd(P,t),e],a=x3t(t);if("number"!=typeof a||9!==a){var u=SGt(n);break}V3t(t,9),e=n}}else u=r;return[0,id(g,0,0,0,t),u]}),bk(T,function(t){var r=Z3t(t),e=r[2],n=r[1];return E3t(e)&&Q4t(t,[0,n,4]),[0,n,e]}),bk(A,function(t){return r8t(0,function(t){return[0,nd(T,t),83===x3t(t)?[1,nd(e,t)]:[0,A3t(t)]]},t)}),bk(O,function(t,e){var a=95===x3t(e)?1:0;if(a){1-K4t(e)&&R3t(e,13);var u=[0,r8t(0,function(e){V3t(e,95);for(var a=0,u=0;;){var i=nd(n,e),c=nd(A,e),f=c[2],s=c[1],o=x3t(e);if(0===t)var v=0,l=0;else{if("number"==typeof o)if(79===o){J3t(e),v=[0,nd(r,e)],l=1;var b=1}else b=0;else b=0;b||(a&&Q4t(e,[0,s,71]),v=0,l=a)}var p=[0,[0,s,[0,f[1],f[2],i,v]],u],k=x3t(e);if("number"==typeof k){if(96===k)var w=1;else if(Xf===k)w=1;else{var d=0;w=0}if(w){var h=SGt(p);d=1}}else d=0;if(!d){if(V3t(e,9),96!==x3t(e)){a=l,u=p;continue}h=SGt(p)}return V3t(e,96),h}},e)]}else u=a;return u}),bk(I,function(t){var e=95===x3t(t)?1:0;return e?[0,r8t(0,function(t){V3t(t,95);for(var e=0;;){var n=x3t(t);if("number"==typeof n&&(96===n||Xf===n)){var a=SGt(e);return V3t(t,96),a}var u=[0,nd(r,t),e];96!==x3t(t)&&V3t(t,9),e=u}},t)]:e}),bk(P,function(t){return ad(D,t,nd(T,t))}),bk(D,function(t,r){return r8t([0,r[1]],function(t){for(var e=[0,r[1],[0,r]];;){var n=e[2],a=e[1];if(10!==x3t(t))return[0,n,nd(I,t)];var u=r8t([0,a],function(t){return function(r){return V3t(r,10),[0,t,nd(T,r)]}}(n),t),i=u[1];e=[0,i,[1,[0,i,u[2]]]]}},t)}),bk(C,function(t,r){var e=ad(D,t,r);return[0,e[1],[5,e[2]]]}),bk(N,function(t){var r=x3t(t);return"number"==typeof r&&83===r?[1,nd(e,t)]:[0,A3t(t)]});var G=0;function q(t){var r=f3t(0,t),e=x3t(r);return"number"==typeof e&&66===e?[0,r8t(G,J,r)]:0}function Y(t){var r=x3t(t),e=S3t(1,t);if("number"==typeof r&&83===r){if("number"==typeof e&&66===e){V3t(t,83);var n=q(t);return[0,[0,A3t(t)],n]}return[0,nd(N,t),q(t)]}return[0,[0,A3t(t)],0]}function V(t,r){var e=t3t(1,r);G3t(e,1);var n=nd(t,e);return q3t(e),n}var W=nd(O,1);var H=nd(O,0);return[0,function(t){return V(r,t)},function(t){return V(T,t)},function(t){return V(H,t)},function(t){return V(W,t)},function(t){return V(I,t)},function(t){return V(P,t)},function(t,r){return V(ud(g,t,0,0),r)},function(t){return V(x,t)},function(t){return V(m,t)},function(t){return V(e,t)},function(t){return V(N,t)},function(t){return V(q,t)},function(t){return V(Y,t)}]}(c8t),s8t=function(t){function r(t,r){for(var u=r;;){var i=u[2];switch(i[0]){case 0:return AGt(e,t,i[1][1]);case 1:return AGt(n,t,i[1][1]);case 2:u=i[1][1];continue;case 3:var c=i[1][1],f=c[2],s=t[2],o=t[1];ad(e8t[3],f,s)&&Q4t(o,[0,c[1],40]);var v=a([0,o,s],c),l=ad(e8t[4],f,v[2]);return[0,v[1],l];default:return Q4t(t[1],[0,u[1],29]),t}}}function e(t,e){if(0===e[0]){var n=e[1][2],u=n[1];return r(1===u[0]?a(t,u[1]):t,n[2])}return r(t,e[1][2][1])}function n(t,e){if(e){var n=e[1];return 0===n[0]?r(t,n[1]):r(t,n[1][2][1])}return t}function a(t,r){var e=r[2],n=r[1],a=t[1];return _3t(e)&&B3t(a,[0,n,39]),(d3t(e)||m3t(e))&&B3t(a,[0,n,50]),[0,a,t[2]]}function u(t,e,n,a,u){var i=e||1-n;if(i){var c=u[2],f=c[2],s=e?t3t(1-t[6],t):t;if(a){var o=a[1],v=o[2],l=o[1];_3t(v)&&B3t(s,[0,l,41]),(d3t(v)||m3t(v))&&B3t(s,[0,l,50])}var b=AGt(r,[0,s,e8t[1]],c[1]),p=f?(r(b,f[1][2][1]),0):f}else p=i;return p}function i(t,r){function e(e){var n=r3t(r,e3t(t,e)),a=[0,n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],1,n[11],n[12],n[13],n[14],n[15],n[16],n[17],n[18],n[19],n[20],n[21],n[22],n[23],n[24],n[25],n[26],n[27],n[28]];V3t(a,4);for(var u=0;;){var i=x3t(a);if("number"==typeof i){var c=i-5|0;if(7>>0?Uf===c?1:0:5<(c-1|0)>>>0?1:0){var f=12===i?1:0;if(f){var s=T3t(a);V3t(a,12);var o=ad(c8t[19],a,39),v=[0,[0,h2t(s,o[1]),[0,o]]]}else v=f;5!==x3t(a)&&R3t(a,59);var l=[0,SGt(u),v];return V3t(a,5),l}}var b=ad(c8t[19],a,39);if(79===x3t(a)){V3t(a,79);var p=nd(c8t[10],a),k=[0,h2t(b[1],p[1]),[2,[0,b,p]]]}else k=b;5!==x3t(a)&&V3t(a,9);u=[0,k,u]}}return function(t){return r8t(0,e,t)}}function c(t,r,e){var n=w3t(t,r,e),a=nd(c8t[17],n),u=a[1];return[0,u,[0,[0,u,a[2]]],a[3]]}function f(t){return H3t(t,$r)}function s(t){return H3t(t,64)}function o(t){var r=t[2],e=0===r[2]?1:0;if(e)for(var n=r[1];;){if(n){var a=n[2],u=3===n[1][2][0]?1:0;if(u){n=a;continue}return u}return 1}return e}function v(t){for(var r=0,e=0;;){var n=r8t(0,function(t){var r=ad(c8t[19],t,38);if(79===x3t(t)){V3t(t,79);var e=[0,nd(c8t[10],t)],n=0}else if(3===r[2][0])e=Fd[1],n=Fd[2];else e=0,n=[0,[0,r[1],54],0];return[0,[0,r,e],n]},t),a=n[2],u=[0,[0,n[1],a[1]],r],i=dGt(a[2],e);if(9!==x3t(t)){var c=SGt(i);return[0,SGt(u),c]}V3t(t,9);r=u,e=i}}function l(t,r,e){V3t(e,t);var n=v(e);return[0,[0,n[1],r],n[2]]}var b=0,p=24;function k(t){return l(p,b,t)}function w(t){var r=l(27,2,u3t(1,t)),e=r[1],n=e[1];return[0,e,SGt(AGt(function(t,r){return r[2][2]?t:[0,[0,r[1],53],t]},r[2],n))]}function d(t){return l(28,1,u3t(1,t))}return[0,s,f,function(t,r,e){var n=T3t(t),a=x3t(t);if("number"==typeof a)if(bo===a){J3t(t);var u=[0,[0,n,0]],i=1}else Zt===a?(J3t(t),u=[0,[0,n,1]],i=1):i=0;else i=0;i||(u=0);return u&&(r||e)?(Q4t(t,[0,u[1][1],8]),0):u},i,c,o,u,function(t,r,e){var n=[0,t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],1,t[12],t[13],t[14],t[15],t[16],t[17],t[18],t[19],t[20],t[21],t[22],t[23],t[24],t[25],t[26],t[27],t[28]],a=x3t(n);if("number"==typeof a&&0===a){var u=c(n,r,e);return[0,u[2],u[3]]}var i=w3t(n,r,e);return[0,[1,nd(c8t[10],i)],i[6]]},function(t){var r=r8t(0,function(t){var r=x3t(t);if("number"==typeof r){var e=r+is|0;if(4>>0)var n=0;else{switch(e){case 0:var a=k(t),u=1;break;case 3:a=w(t),u=1;break;case 4:a=d(t),u=1;break;default:n=0,u=0}if(u){var i=a;n=1}}}else n=0;if(!n){M3t(t);i=k(t)}return[0,[31,i[1]],i[2]]},t),e=r[2];return[0,[0,r[1],e[1]],e[2]]},v,d,w,k,function(r){var e=T3t(r),n=s(r);V3t(r,15);var a=f(r),v=r[7],l=x3t(r);if(0===v)var b=0;else if("number"==typeof l)if(4===l){var p=0,k=0;b=1}else 95===l?(p=nd(t[3],r),k=4===x3t(r)?0:[0,ad(c8t[13],jjt,r)],b=1):b=0;else b=0;if(!b){var w=[0,ad(c8t[13],Bjt,r)];p=nd(t[3],r),k=w}if(0===n)if(0===a)var d=0,h=0;else d=1,h=0;else 0===a?(d=0,h=r[18]):(d=1,h=1);var m=nd(i(h,d),r),y=nd(t[13],r),_=c(r,n,a),F=_[2],E=o(m);u(r,_[3],E,k,m);var S=0===F[0]?[0,F[1][1],0]:[0,F[1][1],1],g=[20,[0,k,m,F,n,a,y[2],S[2],y[1],p]];return[0,h2t(e,S[1]),g]}]}(f8t),o8t=function(t){return[0,function(t,r){return 0===r[0]?r[1]:(TGt(function(r){return Q4t(t,r)},r[2][1]),r[1])},function(r,e,n){var a=r?r[1]:25;if(0===n[0])var u=n[1];else TGt(function(t){return Q4t(e,t)},n[2][2]),u=n[1];1-nd(t[24],u)&&Q4t(e,[0,u[1],a]);var i=u[2];return"number"==typeof i||10===i[0]&&_3t(i[1][2])&&B3t(e,[0,u[1],47]),ad(t[20],e,u)},Xjt,function(t,r){var e=EGt(t[2],r[2]);return[0,EGt(t[1],r[1]),e]},function(t){var r=SGt(t[2]);return[0,SGt(t[1]),r]}]}(c8t),v8t=function(t){var r=t[1],e=function t(r){return t.fun(r)},n=function t(r){return t.fun(r)},a=function t(r){return t.fun(r)},u=function t(r){return t.fun(r)},i=function t(r){return t.fun(r)},c=function t(r){return t.fun(r)},f=function t(r){return t.fun(r)},s=function t(r){return t.fun(r)},o=function t(r){return t.fun(r)},v=function t(r){return t.fun(r)},l=function t(r){return t.fun(r)},b=function t(r){return t.fun(r)},p=function t(r){return t.fun(r)},k=function t(r){return t.fun(r)},w=function t(r){return t.fun(r)},d=function t(r){return t.fun(r)},h=function t(r){return t.fun(r)},m=function t(r,e,n,a,u){return t.fun(r,e,n,a,u)},y=function t(r,e,n,a){return t.fun(r,e,n,a)},_=function t(r){return t.fun(r)},F=function t(r){return t.fun(r)},E=function t(r){return t.fun(r)},S=function t(r,e,n,a,u){return t.fun(r,e,n,a,u)},g=function t(r,e,n,a){return t.fun(r,e,n,a)},x=function t(r){return t.fun(r)},T=function t(r,e,n){return t.fun(r,e,n)},A=function t(r){return t.fun(r)},O=function t(r){return t.fun(r)},I=function t(r,e){return t.fun(r,e)},P=function t(r,e,n,a){return t.fun(r,e,n,a)},D=function t(r){return t.fun(r)},C=function t(r){return t.fun(r)},N=function t(r){return t.fun(r)},L=function t(r){return t.fun(r)},R=function t(r,e){return t.fun(r,e)},M=function t(r){return t.fun(r)},U=t[2];function j(t){var r=nd(c,t),e=nd(i,t);if(e){var a=ud(U,0,t,r),u=nd(n,t);return[0,[0,h2t(a[1],u[1]),[2,[0,e[1],a,u]]]]}return r}function B(t,r){if("number"==typeof r){var e=50!==r?1:0;if(!e)return e}throw z3t}function X(t){var r=v3t(B,t),e=j(r),n=x3t(r);if("number"==typeof n){if(11===n)throw z3t;if(83===n&&jk(p3t(r),wXt))throw z3t}if(C3t(r)){if(0===e[0]){var a=e[1][2];if("number"==typeof a);else if(10===a[0])if(Kw(a[1][2],dXt));else{if(!I3t(r))throw z3t}else;}return e}return e}function J(t,e,n,a,u){return[0,[0,u,[15,[0,a,ad(r,t,e),ad(r,t,n)]]]]}function G(t,r,e){for(var n=r,a=e;;){var u=x3t(t);if("number"!=typeof u||85!==u)return[0,a,n];V3t(t,85);var i=r8t(0,o,t),c=h2t(a,i[1]);n=J(t,n,i[2],1,c),a=c}}function q(t,r,e,n){return[0,n,[3,[0,e,t,r]]]}function Y(t,e,n,a,u,i){var c=t?t[1]:1,f=e?e[1]:e,s=n?n[1]:n,o=o3t(0,a),v=nd(c8t[7],o),l=T3t(a);V3t(a,7);var b=h2t(u,l),p=[0,ad(r,a,i),[2,v],1];return cd(m,[0,c],[0,f],a,u,[0,[0,b,f?[21,[0,p,s]]:[16,p]]])}function V(t,e,n,a,u,i){var c=t?t[1]:1,f=e?e[1]:e,s=n?n[1]:n,o=nd(M,a),v=o[3],l=o[2],b=o[1];if(v){var p=a[28][1],k=l[2];if(p){var w=p[1];a[28][1]=[0,[0,w[1],[0,[0,k,b],w[2]]],p[2]]}else Q4t(a,[0,b,85])}var d=h2t(u,b),h=v?[1,[0,b,l]]:[0,l];if(0===i[0]){var y=i[1][2];"number"==typeof y&&0===y&&v&&Q4t(a,[0,d,86])}else;var _=[0,ad(r,a,i),h,0];return cd(m,[0,c],[0,f],a,u,[0,[0,d,f?[21,[0,_,s]]:[16,_]]])}function W(t,r){if("number"==typeof r){if(55<=r)var e=r-56|0,n=30>>0?32<=e?0:1:3===e?1:0;else n=39===r?1:50===r?1:0;if(n)return 0}throw z3t}return bk(e,function(t){var r=x3t(t),e=C3t(t);if("number"==typeof r){var n=r-5|0;if(89>>0)var u=91<(n+1|0)>>>0?0:1;else if(53===n){if(t[17])return[0,nd(a,t)];u=0}else u=0}else u=0;if(!u&&0===e)return j(t);var i=Q3t(t,X);if(i)return i[1];var c=Q3t(t,L);return c?c[1]:j(t)}),bk(n,function(t){return ad(r,t,nd(e,t))}),bk(a,function(t){return r8t(0,function(t){if(t[10]&&R3t(t,87),V3t(t,58),P3t(t))var r=0,e=0;else{var a=H3t(t,$r),u=x3t(t);if("number"==typeof u){if(83===u)var i=1;else if(10<=u){var c=0;i=0}else switch(u){case 0:case 2:case 3:case 4:case 6:c=0,i=0;break;default:i=1}if(i){var f=0;c=1}}else c=0;if(!c)f=1;var s=a||f;r=s?[0,nd(n,t)]:s,e=a}return[28,[0,r,e]]},t)}),bk(u,function(t){var r=t[2];if("number"==typeof r)var e=0;else switch(r[0]){case 17:var n=r[1];if(!Kw(n[1][2],pXt)){var a=Kw(n[2][2],kXt);if(!a)return a}e=1;break;case 10:case 16:e=1;break;default:e=0}return e?1:0}),bk(i,function(t){var r=x3t(t);if("number"==typeof r){var e=r-67|0;if(12>>0)var n=0;else{switch(e){case 0:var a=rXt;break;case 1:a=eXt;break;case 2:a=nXt;break;case 3:a=aXt;break;case 4:a=uXt;break;case 5:a=iXt;break;case 6:a=cXt;break;case 7:a=fXt;break;case 8:a=sXt;break;case 9:a=oXt;break;case 10:a=vXt;break;case 11:a=lXt;break;default:a=bXt}var u=a;n=1}}else n=0;if(!n)u=0;return 0!==u&&J3t(t),u}),bk(c,function(t){var e=T3t(t),a=nd(s,t);if(82===x3t(t)){V3t(t,82);var u=nd(n,c3t(0,t));V3t(t,83);var i=r8t(0,n,t),c=h2t(e,i[1]),f=i[2];return[0,[0,c,[7,[0,ad(r,t,a),u,f]]]]}return a}),bk(f,function(t){return ad(r,t,nd(c,t))}),bk(s,function(t){for(var r=r8t(0,o,t),e=G(t,r[2],r[1]),n=e[2],a=e[1];;){var u=t[26],i=x3t(t);if("number"==typeof i){if(81===i){1-u[6]&&R3t(t,98),V3t(t,81);var c=r8t(0,o,t),f=G(t,c[2],c[1]),s=h2t(a,f[1]);n=J(t,n,f[2],2,s),a=s;continue}if(84===i){V3t(t,84);var v=r8t(0,o,t),l=G(t,v[2],v[1]),b=h2t(a,l[1]);n=J(t,n,l[2],0,b),a=b;continue}}return n}}),bk(o,function(t){var e=0;t:for(;;){var n=r8t(0,function(t){return[0,0!==nd(v,t)?1:0,nd(l,c3t(0,t))]},t),a=n[2],u=a[2],i=n[1];if(95===x3t(t))if(0===u[0]){var c=u[1][2];"number"==typeof c||12===c[0]&&R3t(t,58)}else;var f=x3t(t);if("number"==typeof f){var s=f+mo|0;if(1>>0)if(69<=s)switch(s-69|0){case 0:var o=CBt,b=1;break;case 1:o=NBt,b=1;break;case 2:o=LBt,b=1;break;case 3:o=RBt,b=1;break;case 4:o=MBt,b=1;break;case 5:o=UBt,b=1;break;case 6:o=jBt,b=1;break;case 7:o=BBt,b=1;break;case 8:o=XBt,b=1;break;case 9:o=JBt,b=1;break;case 10:o=GBt,b=1;break;case 11:o=qBt,b=1;break;case 12:o=YBt,b=1;break;case 13:o=VBt,b=1;break;case 14:o=WBt,b=1;break;case 15:o=HBt,b=1;break;case 16:o=zBt,b=1;break;case 17:o=KBt,b=1;break;case 18:o=QBt,b=1;break;case 19:o=$Bt,b=1;break;default:var p=0;b=0}else p=0,b=0;else if(0===s)if(t[12])o=0,b=1;else o=tXt,b=1;else o=ZBt,b=1;if(b){var k=o;p=1}}else p=0;if(!p)k=0;if(0!==k&&J3t(t),!e&&!k)return u;if(k){var w=k[1],d=w[1],h=a[1];(h?14===d?1:0:h)&&Q4t(t,[0,i,26]);for(var m=ad(r,t,u),y=[0,d,w[2]],_=i,F=e;;){var E=y[2],S=y[1];if(F){var g=F[1],x=g[2],T=x[2],A=0===T[0]?T[1]:T[1]-1|0;if(E[1]<=A){var O=h2t(g[3],_);m=q(g[1],m,x[1],O),y=[0,S,E],_=O,F=F[2];continue}}e=[0,[0,m,[0,S,E],_],F];continue t}}for(var I=ad(r,t,u),P=i,D=e;;){if(!D)return[0,I];var C=D[1],N=h2t(C[3],P),L=D[2];I=q(C[1],I,C[2][1],N),P=N,D=L}}}),bk(v,function(t){var r=x3t(t);if("number"==typeof r)if(48<=r){if(bo<=r){if(!(108<=r))switch(r-100|0){case 0:return gBt;case 1:return xBt;case 6:return TBt;case 7:return ABt}}else if(65===r&&t[18])return OBt}else if(45<=r)switch(r+-45|0){case 0:return IBt;case 1:return PBt;default:return DBt}return 0}),bk(l,function(t){var r=T3t(t),e=nd(v,t);if(e){var n=e[1];J3t(t);var a=r8t(0,b,t),i=a[2],c=h2t(r,a[1]);if(6===n){var f=i[2];if("number"==typeof f);else switch(f[0]){case 10:B3t(t,[0,c,43]);break;case 16:1===f[1][2][0]&&Q4t(t,[0,c,84]);break;default:}}else;return[0,[0,c,[26,[0,n,i]]]]}var s=x3t(t);if("number"==typeof s)if(108===s)var o=SBt,l=1;else if(109===s)o=EBt,l=1;else l=0;else l=0;if(!l)o=0;if(o){J3t(t);var k=r8t(0,b,t),w=k[2];1-nd(u,w)&&Q4t(t,[0,w[1],25]);var d=w[2];"number"==typeof d||10===d[0]&&_3t(d[1][2])&&j3t(t,49);return[0,[0,h2t(r,k[1]),[27,[0,o[1],w,1]]]]}return nd(p,t)}),bk(b,function(t){return ad(r,t,nd(l,t))}),bk(p,function(t){var e=nd(k,t);if(I3t(t))return e;var n=x3t(t);if("number"==typeof n)if(108===n)var a=FBt,i=1;else if(109===n)a=_Bt,i=1;else i=0;else i=0;if(!i)a=0;if(a){var c=ad(r,t,e);1-nd(u,c)&&Q4t(t,[0,c[1],25]);var f=c[2],s=("number"==typeof f||10===f[0]&&_3t(f[1][2])&&j3t(t,48),T3t(t));return J3t(t),[0,[0,h2t(c[1],s),[27,[0,a[1],c,0]]]]}return e}),bk(k,function(t){var r=T3t(t),e=[0,t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15],0,t[17],t[18],t[19],t[20],t[21],t[22],t[23],t[24],t[25],t[26],t[27],t[28]],n=1-t[16],a=x3t(e);if("number"==typeof a){var u=a-44|0;if(7>>0)var i=0;else{switch(u){case 0:if(n)var c=[0,nd(_,e)],f=1;else i=0,f=0;break;case 6:c=[0,nd(h,e)],f=1;break;case 7:c=[0,nd(d,e)],f=1;break;default:i=0,f=0}if(f){var s=c;i=1}}}else i=0;if(!i)s=N3t(e)?[0,nd(x,e)]:nd(A,e);return cd(m,0,0,e,r,s)}),bk(w,function(t){return ad(r,t,nd(k,t))}),bk(d,function(t){switch(t[20]){case 0:var r=pBt;break;case 1:r=kBt;break;default:r=wBt}var e=r[1],n=T3t(t);V3t(t,51);var a=[0,n,0],u=x3t(t);if("number"==typeof u&&!(11<=u))switch(u){case 4:var i=r[2]?a:(Q4t(t,[0,n,6]),[0,n,[10,[0,n,dBt]]]);return id(y,hBt,t,n,i);case 6:case 10:var c=e?a:(Q4t(t,[0,n,5]),[0,n,[10,[0,n,mBt]]]);return id(y,yBt,t,n,c)}return e?M3t(t):Q4t(t,[0,n,5]),a}),bk(h,function(t){return r8t(0,function(t){V3t(t,50),V3t(t,4);var r=nd(n,c3t(0,t));return V3t(t,5),[11,r]},t)}),bk(m,function(t,e,n,a,u){var i=t?t[1]:1,c=e?e[1]:e,f=cd(S,[0,i],[0,c],n,a,u),s=jk(p3t(n),bBt);function o(t,e){var n=nd(E,e),u=h2t(a,n[1]),o=n[2],v=[0,ad(r,e,f),t,o];if(s)var l=0;else if(c)l=0;else{var b=[4,v];l=1}if(!l)b=[20,[0,v,s]];return cd(m,[0,i],[0,c],e,a,[0,[0,u,b]])}if(n[13])return f;var v=x3t(n);if("number"==typeof v){if(4===v)return o(0,n);if(95===v&&K4t(n)){var l=v3t(function(t,r){throw z3t},n);return $3t(l,f,function(t){return o(nd(F,t),t)})}}return f}),bk(y,function(t,e,n,a){var u=t?t[1]:1;return ad(r,e,cd(m,[0,u],0,e,n,[0,a]))}),bk(_,function(t){var r=T3t(t);if(V3t(t,44),t[11]&&10===x3t(t)){V3t(t,10);var e=[0,r,oBt],n=x3t(t);if("number"!=typeof n&&3===n[0]&&!Kw(n[3],vBt)){var a=ad(c8t[13],0,t);return[0,h2t(r,a[1]),[17,[0,e,a]]]}return M3t(t),J3t(t),[0,r,[10,e]]}var u=T3t(t),i=x3t(t);if("number"==typeof i)if(44===i)var c=nd(_,t),f=1;else if(51===i)c=nd(d,o3t(1,t)),f=1;else f=0;else f=0;if(!f)c=N3t(t)?nd(x,t):nd(O,t);var s=id(g,lBt,o3t(1,t),u,c),o=x3t(t);if("number"==typeof o)var v=0;else if(2===o[0]){var l=id(P,t,u,s,o[1]);v=1}else v=0;if(!v)l=s;var b=K4t(t),p=b?$3t(v3t(function(t,r){throw z3t},t),0,F):b,k=x3t(t);if("number"==typeof k)if(4===k)var w=nd(E,t),h=w[1],m=w[2],y=1;else y=0;else y=0;if(!y)if(p)h=p[1][1],m=0;else h=l[1],m=0;return[0,h2t(r,h),[18,[0,l,p,m]]]}),bk(F,function(t){var r=95===x3t(t)?1:0;return r?[0,r8t(0,function(t){V3t(t,95);for(var r=0;;){var e=x3t(t);if("number"==typeof e)if(96===e?1:Xf===e?1:0){var n=SGt(r);return V3t(t,96),n}var a=x3t(t);if("number"==typeof a)var u=0;else if(3===a[0])if(Kw(a[2],fBt))u=0;else{var i=T3t(t);W3t(t,sBt);var c=[1,i];u=1}else u=0;if(!u)c=[0,nd(f8t[1],t)];var f=[0,c,r];96!==x3t(t)&&V3t(t,9);r=f}},t)]:r}),bk(E,function(t){var r=T3t(t);V3t(t,4);for(var e=0;;){var a=x3t(t);if("number"==typeof a)if(5===a?1:Xf===a?1:0){var u=SGt(e),i=T3t(t);return V3t(t,5),[0,h2t(r,i),u]}var c=x3t(t);if("number"==typeof c)if(12===c){var f=T3t(t);V3t(t,12);var s=nd(n,t),o=[1,[0,h2t(f,s[1]),[0,s]]],v=1}else v=0;else v=0;if(!v)o=[0,nd(n,t)];var l=[0,o,e];5!==x3t(t)&&V3t(t,9);e=l}}),bk(S,function(t,e,n,a,u){var i=t?t[1]:1,c=e?e[1]:e,f=n[26],s=x3t(n);if("number"==typeof s)switch(s){case 6:return V3t(n,6),Y([0,i],[0,c],0,n,a,u);case 10:return V3t(n,10),V([0,i],[0,c],0,n,a,u);case 80:1-f[5]&&R3t(n,95),1-i&&R3t(n,96),V3t(n,80);var o=x3t(n);if("number"==typeof o)switch(o){case 4:return u;case 6:return V3t(n,6),Y([0,i],aBt,nBt,n,a,u);case 95:if(K4t(n))return u}else if(2===o[0])return R3t(n,97),u;return V([0,i],iBt,uBt,n,a,u)}else if(2===s[0]){c&&R3t(n,97);var v=s[1];return cd(m,cBt,0,n,a,[0,id(P,n,a,ad(r,n,u),v)])}return u}),bk(g,function(t,e,n,a){var u=t?t[1]:1;return ad(r,e,cd(S,[0,u],0,e,n,[0,a]))}),bk(x,function(t){var r=T3t(t),e=nd(s8t[1],t);V3t(t,15);var n=nd(s8t[2],t);if(0===e)if(0===n)var a=0,u=0;else a=1,u=0;else if(0===n)a=0,u=1;else a=1,u=1;if(4===x3t(t))var i=0,c=0;else{var f=x3t(t);if("number"==typeof f){var s=95!==f?1:0;if(s)var o=0;else{var v=s;o=1}}else o=0;if(!o){var l=r3t(a,e3t(u,t));v=[0,ad(c8t[13],eBt,l)]}i=v,c=nd(f8t[3],t)}var b=a3t(0,t),p=ud(s8t[4],u,a,b),k=nd(f8t[13],b),w=ud(s8t[5],b,e,n),d=w[2],h=nd(s8t[6],p);cd(s8t[7],b,w[3],h,i,p);var m=0===d[0]?0:1,y=[8,[0,i,p,d,e,n,k[2],m,k[1],c]];return[0,h2t(r,w[1]),y]}),bk(T,function(t,r,e){if(0===r)var n=0;else switch(r-1|0){case 0:j3t(t,42);try{var a=ww(kw(wGt($jt,e))),u=1}catch(r){if((r=ed(r))[1]!==sd)throw r;var i=vGt(wGt(Zjt,e));n=1,u=0}if(u)i=a,n=1;break;case 2:try{var c=x4t(e),f=1}catch(r){if((r=ed(r))[1]!==sd)throw r;i=vGt(wGt(tBt,e)),n=1,f=0}if(f)i=c,n=1;break;default:n=0}if(!n)try{i=ww(kw(e))}catch(n){if((n=ed(n))[1]!==sd)throw n;i=vGt(wGt(rBt,e))}return V3t(t,[0,r,e]),i}),bk(A,function(t){var r=T3t(t),e=x3t(t);if("number"==typeof e)switch(e){case 0:var n=nd(c8t[12],t);return[1,[0,n[1],[19,n[2]]],n[3]];case 4:return[0,nd(D,t)];case 6:var a=nd(C,t);return[1,[0,a[1],[0,a[2]]],a[3]];case 21:return V3t(t,21),[0,[0,r,1]];case 29:return V3t(t,29),[0,[0,r,[14,[0,0,Hjt]]]];case 40:return[0,nd(c8t[23],t)];case 95:var u=nd(c8t[18],t),i=u[2];return[0,[0,u[1],Js<=i[1]?[13,i[2]]:[12,i[2]]]];case 30:case 31:V3t(t,e);var c=31===e?1:0;return[0,[0,r,[14,[0,[1,c],c?Kjt:Qjt]]]];case 74:case 102:return[0,nd(N,t)]}else switch(e[0]){case 0:var f=e[2];return[0,[0,r,[14,[0,[2,ud(T,t,e[1],f)],f]]]];case 1:var s=e[1],o=s[4],v=s[3],l=s[2],b=s[1];return o&&j3t(t,42),V3t(t,[1,[0,b,l,v,o]]),[0,[0,b,[14,[0,[0,l],v]]]];case 2:var p=ad(I,t,e[1]);return[0,[0,p[1],[24,p[2]]]]}if(C3t(t)){var k=ad(c8t[13],0,t);return[0,[0,k[1],[10,k]]]}M3t(t);"number"==typeof e||5===e[0]&&J3t(t);return[0,[0,r,[14,[0,0,zjt]]]]}),bk(O,function(t){return ad(r,t,nd(A,t))}),bk(I,function(t,r){var e=r[3],n=r[2],a=r[1];V3t(t,[2,r]);var u=[0,a,[0,[0,n[2],n[1]],e]];if(e)var i=a,c=[0,u,0],f=0;else for(var s=[0,u,0],o=0;;){var v=nd(c8t[7],t),l=[0,v,o],b=x3t(t);if("number"==typeof b)if(1===b){G3t(t,4);var p=x3t(t);if("number"==typeof p)var k=1;else if(2===p[0]){var w=p[1],d=w[3],h=w[2];J3t(t);var m=w[1],y=[0,[0,h[2],h[1]],d];q3t(t);var _=[0,[0,m,y],s];if(!d){s=_,o=l;continue}var F=SGt(l),E=[0,m,SGt(_),F],S=1;k=0}else k=1;if(k)throw[0,pd,Vjt]}else S=0;else S=0;if(!S){M3t(t);var g=[0,v[1],Wjt],x=SGt(l),T=SGt([0,g,s]);E=[0,v[1],T,x]}i=E[1],c=E[2],f=E[3];break}return[0,h2t(a,i),[0,c,f]]}),bk(P,function(t,r,e,n){var a=ad(I,t,n);return[0,h2t(r,a[1]),[23,[0,e,a]]]}),bk(D,function(t){V3t(t,4);var r=nd(n,t),e=x3t(t);if("number"==typeof e)if(9===e)var a=ad(R,t,[0,r,0]),u=1;else if(83===e){var i=nd(f8t[10],t);a=[0,h2t(r[1],i[1]),[25,[0,r,i]]],u=1}else u=0;else u=0;if(!u)a=r;return V3t(t,5),a}),bk(C,function(r){var n=r8t(0,function(r){V3t(r,6);for(var n=[0,0,t[3]];;){var a=n[2],u=n[1],i=x3t(r);if("number"==typeof i){if(13<=i)var c=Xf===i?1:0;else if(7<=i)switch(i-7|0){case 2:V3t(r,9);n=[0,[0,0,u],a];continue;case 5:var f=r8t(0,function(r){V3t(r,12);var n=nd(e,r);return 0===n[0]?[0,n[1],t[3]]:[0,n[1],n[2]]},r),s=f[2],o=s[2],v=f[1],l=[1,[0,v,[0,s[1]]]],b=7===x3t(r)?1:0;if(b)var p=0;else if(7===S3t(1,r)){var k=[0,o[1],[0,[0,v,60],o[2]]];p=1}else p=0;if(!p)k=o;1-b&&V3t(r,9);n=[0,[0,[0,l],u],ad(t[4],k,a)];continue;case 0:c=1;break;default:c=0}else c=0;if(c){var w=nd(t[5],a),d=[0,SGt(u),w];return V3t(r,7),d}}var h=nd(e,r),m=0===h[0]?[0,h[1],t[3]]:[0,h[1],h[2]];7!==x3t(r)&&V3t(r,9);n=[0,[0,[0,[0,m[1]]],u],ad(t[4],m[2],a)]}},r),a=n[2];return[0,n[1],[0,a[1]],a[2]]}),bk(N,function(t){G3t(t,5);var r=T3t(t),e=x3t(t);if("number"!=typeof e&&4===e[0]){var n=e[1],a=n[3],u=n[2];J3t(t);var i=wGt(qjt,wGt(u,wGt(Gjt,a)));q3t(t);var c=ZGt(cw(a));jGt(function(t){var r=t-103|0;if(!(18>>0))switch(r){case 0:case 2:case 6:case 12:case 14:case 18:return eqt(c,t)}return 0},a);var f=tqt(c);return Kw(f,a)&&R3t(t,[3,a]),[0,r,[14,[0,[3,[0,u,f]],i]]]}throw[0,pd,Yjt]}),bk(L,function(t){var r=v3t(W,t),e=T3t(r),n=11!==S3t(1,r)?1:0,a=n?nd(s8t[1],r):n,u=nd(f8t[3],r);if(C3t(r))if(0===u)var i=ad(c8t[13],Jjt,r),c=i[1],f=[0,A3t(r)],s=[0,c,[0,[0,[0,c,[3,[0,[0,c,i[2]],f,0]]],0],0]],o=[0,[0,c[1],c[3],c[3]]],v=0,l=1;else l=0;else l=0;if(!l){var b=ud(s8t[4],r[18],r[17],r),p=f3t(1,r),k=nd(f8t[13],p);s=b,o=k[1],v=k[2]}var w=s[2];if(w[2])var d=0;else if(w[1]){var h=r;d=1}else d=0;if(!d)h=k3t(r);var m=I3t(h);(m?11===x3t(h)?1:0:m)&&R3t(h,55),V3t(h,11);var y=k3t(h),_=s8t[8],F=r8t(0,function(t){return ud(_,t,a,0)},y),E=F[2],S=E[1],g=nd(s8t[6],s);cd(s8t[7],y,E[2],g,0,s);var x=0===S[0]?0:1;return[0,[0,h2t(e,F[1]),[1,[0,0,s,S,a,0,v,x,o,u]]]]}),bk(R,function(t,r){var e=x3t(t);if("number"==typeof e&&9===e)return V3t(t,9),ad(R,t,[0,nd(n,t),r]);var a=FGt(r),u=SGt(r),i=FGt(u);return[0,h2t(i[1],a[1]),[22,[0,u]]]}),bk(M,function(t){var r=T3t(t),e=H3t(t,14),n=Z3t(t),a=n[1];return[0,h2t(r,a),[0,a,n[2]],e]}),[0,n,e,f,M,function(t){var r=t[2];if("number"==typeof r)var e=0;else switch(r[0]){case 17:var n=r[1];if(!Kw(n[1][2],hXt)){var a=Kw(n[2][2],mXt);if(!a)return a}e=1;break;case 0:case 10:case 16:case 19:e=1;break;default:e=0}return e?1:0},w,T,R]}(o8t),l8t=function(t){function r(t){return J3t(t),[0,nd(v8t[6],t)]}function e(t){var e=t[26][3];if(e)for(var n=0;;){var a=x3t(t);if("number"!=typeof a||13!==a)return SGt(n);n=[0,r8t(0,r,t),n]}return e}function n(t,r){var e=t?t[1]:t,n=x3t(r);if("number"==typeof n)switch(n){case 6:var a=T3t(r);V3t(r,6);var u=c3t(0,r),i=nd(c8t[10],u),c=T3t(r);return V3t(r,7),[0,h2t(a,c),[3,i]];case 14:if(e){var f=nd(v8t[4],r),s=f[2],o=f[1],v=r[28][1],l=s[2];if(v){var b=v[1],p=v[2],k=b[2],w=[0,[0,ad(Y4t[4],l,b[1]),k],p];r[28][1]=w}else vGt(tUt);return[0,o,[2,[0,o,s]]]}}else switch(n[0]){case 0:var d=n[2],h=T3t(r);return[0,h,[0,[0,h,[0,[2,ud(v8t[7],r,n[1],d)],d]]]];case 1:var m=n[1],y=m[4],_=m[3],F=m[2],E=m[1];return y&&j3t(r,42),V3t(r,[1,[0,E,F,_,y]]),[0,E,[0,[0,E,[0,[0,F],_]]]]}var S=nd(v8t[4],r),g=S[1];return S[3]&&Q4t(r,[0,g,85]),[0,g,[1,S[2]]]}function a(t,r){var e=nd(s8t[2],t),a=n(0,t),u=a[1],i=T3t(t),c=a3t(1,t),f=ud(s8t[4],0,0,c);if(0===r){var s=f[2],o=s[1];if(s[2])Q4t(c,[0,u,76]);else(o?o[2]?0:1:0)||Q4t(c,[0,u,76])}else{var v=f[2];(v[1]?0:v[2]?0:1)||Q4t(c,[0,u,75])}var l=nd(f8t[11],c),b=ud(s8t[5],c,0,e),p=b[2],k=nd(s8t[6],f);cd(s8t[7],c,b[3],k,0,f);var w=0===p[0]?[0,p[1][1],0]:[0,p[1][1],1],d=h2t(i,w[1]);return[0,a[2],[0,d,[0,0,f,p,0,e,0,w[2],l,0]]]}function u(r){var e=nd(v8t[2],r);return 0===e[0]?[0,e[1],t[3]]:[0,e[1],e[2]]}var i=function t(r){return t.fun(r)},c=function t(r,e){return t.fun(r,e)},f=function t(r,e){return t.fun(r,e)},s=function t(r,e,n,a,u){return t.fun(r,e,n,a,u)},o=function t(r,e,n){return t.fun(r,e,n)};function v(t,r,e){var n=T3t(t),a=a3t(1,t),u=nd(f8t[3],a);if(0===r)if(0===e)var i=0,c=0;else i=1,c=0;else if(0===e)i=0,c=a[18];else i=1,c=1;var f=ud(s8t[4],c,i,a),s=nd(f8t[11],a),o=ud(s8t[5],a,r,e),v=o[2],l=nd(s8t[6],f);cd(s8t[7],a,o[3],l,0,f);var b=0===v[0]?[0,v[1][1],0]:[0,v[1][1],1];return[0,h2t(n,b[1]),[0,0,f,v,r,e,0,b[2],s,u]]}function l(t){return V3t(t,83),u(t)}function b(t,r){for(var e=r;;){var n=nd(f8t[2],t),a=nd(f8t[5],t),u=[0,[0,a?h2t(n[1],a[1][1]):n[1],[0,n,a]],e],i=x3t(t);if("number"!=typeof i||9!==i)return SGt(u);V3t(t,9);e=u}}bk(i,function(r){var e=T3t(r);if(12===x3t(r)){V3t(r,12);var a=u(r),i=a[1],o=a[2];return[0,[1,[0,h2t(e,i[1]),[0,i]]],o]}var v=S3t(1,r);if("number"==typeof v){if(83<=v)if(95===v)var l=1;else if(84<=v){var b=0;l=0}else l=1;else if(79===v)l=1;else if(10<=v)b=0,l=0;else switch(v){case 1:case 4:case 9:l=1;break;default:b=0,l=0}if(l){var p=0;b=1}}else b=0;if(!b)p=nd(s8t[1],r);var k=nd(s8t[2],r),w=x3t(r);if(0===p&&0===k&&"number"!=typeof w&&3===w[0]){var d=w[3];if(!Kw(d,XXt)){var h=n(0,r),m=x3t(r);if("number"==typeof m){if(83<=m)var y=95===m?1:84<=m?0:1;else if(79===m)y=1;else if(10<=m)y=0;else switch(m){case 1:case 4:case 9:y=1;break;default:y=0}if(y)return cd(s,r,e,h[2],0,0)}var _=t[3];return[0,ad(c,r,e),_]}if(!Kw(d,JXt)){var F=n(0,r),E=x3t(r);if("number"==typeof E){if(83<=E)var S=95===E?1:84<=E?0:1;else if(79===E)S=1;else if(10<=E)S=0;else switch(E){case 1:case 4:case 9:S=1;break;default:S=0}if(S)return cd(s,r,e,F[2],0,0)}var g=t[3];return[0,ad(f,r,e),g]}}return cd(s,r,e,n(0,r)[2],p,k)}),bk(c,function(t,r){var e=a(t,1),n=e[2],u=n[1];return[0,[0,h2t(r,u),[2,e[1],[0,u,n[2]]]]]}),bk(f,function(t,r){var e=a(t,0),n=e[2],u=n[1];return[0,[0,h2t(r,u),[3,e[1],[0,u,n[2]]]]]}),bk(s,function(r,e,n,a,u){var i=r8t(0,function(r){if(!a&&!u){var e=x3t(r);if("number"==typeof e){if(79===e){if(1===n[0]){var i=n[1],c=T3t(r);V3t(r,79);var f=ad(c8t[20],r,[0,i[1],[10,i]]),s=nd(c8t[10],r),o=[0,[0,h2t(f[1],s[1]),[2,[0,0,f,s]]],[0,[0,[0,c,MXt],0],0]]}else o=l(r);return[0,[0,n,o[1],1],o[2]]}if(95===e)var b=1;else if(10<=e)b=0;else switch(e){case 4:b=1;break;case 1:case 9:switch(n[0]){case 0:var p=n[1],k=p[1];Q4t(r,[0,k,91]);var w=[0,k,[14,p[2]]];break;case 1:var d=n[1],h=d[2],m=d[1];(F3t(h)&&Kw(h,UXt)&&Kw(h,jXt)?(Q4t(r,[0,m,3]),1):0)||m3t(h)&&B3t(r,[0,m,50]);w=[0,m,[10,d]];break;case 2:w=vGt(BXt);break;default:var y=n[1];Q4t(r,[0,y[1],92]);w=y}return[0,[0,n,w,1],t[3]];default:b=0}if(b)return[0,[1,n,v(r,a,u)],t[3]]}var _=l(r);return[0,[0,n,_[1],0],_[2]]}return[0,[1,n,v(r,a,u)],t[3]]},r),c=i[2],f=c[2],s=c[1];return[0,[0,[0,h2t(e,i[1]),s]],f]}),bk(o,function(r,e,n){var a=n[2],u=n[1],c=x3t(r);if("number"==typeof c&&(1===c?1:Xf===c?1:0)){var f=e?[0,a[1],[0,[0,e[1],94],a[2]]]:a,s=nd(t[5],f);return[0,SGt(u),s]}var v=nd(i,r),l=v[1];if(1===l[0])if(9===x3t(r))var b=[0,T3t(r)],p=1;else p=0;else p=0;if(!p)b=0;return 1!==x3t(r)&&V3t(r,9),ud(o,r,b,[0,[0,l,u],ad(t[4],v[2],a)])});var p=function t(r){return t.fun(r)},k=function t(r){return t.fun(r)},w=function t(r){return t.fun(r)};function d(t){var r=r3t(0,t);return[0,nd(v8t[6],r),nd(f8t[5],t)]}function h(t,r){return r?Q4t(t,[0,r[1][1],8]):r}function m(t,r,e,n,a,u,i,c){for(;;){var f=x3t(t);if("number"==typeof f){if(79<=f)if(84<=f)var s=1;else switch(f+$b|0){case 3:M3t(t),J3t(t);continue;case 0:case 4:s=0;break;default:s=1}else s=8===f?0:1;if(!s&&!a&&!u){var o=r8t(0,function(t){var r=nd(f8t[11],t),e=t[26],n=79===x3t(t)?1:0;if(n){var a=i?e[2]:i;if(a)var u=a;else{var c=1-i;u=c?e[1]:c}if(u){V3t(t,79);var f=a3t(1,t),s=[0,nd(c8t[7],f)]}else s=u}else s=n;H3t(t,8)||((6===x3t(t)?1:0)||(4===x3t(t)?1:0))&&M3t(t);return[0,r,s]},t),v=o[2],l=v[2],b=v[1],p=h2t(r,o[1]);return 2===n[0]?[2,[0,p,[0,n[1],l,b,i,c]]]:[1,[0,p,[0,n,l,b,i,c]]]}}if(h(t,c),0===i){switch(n[0]){case 0:var k=n[1][2][1];if("number"==typeof k)var w=1;else if(0===k[0])if(Kw(k[1],xXt)){var d=0,m=0;w=0}else m=1,w=0;else w=1;if(w)d=0,m=0;break;case 1:if(Kw(n[1][2],TXt))d=0,m=0;else m=1;break;default:d=0,m=0}if(m){var y=0,_=a3t(2,t);d=1}}else d=0;if(!d)y=1,_=a3t(1,t);var F=T3t(_),E=nd(f8t[3],_);if(0===a)if(0===u)var S=0,g=0;else S=1,g=0;else if(0===u)S=0,g=_[18];else S=1,g=1;var x=ud(s8t[4],g,S,_),T=nd(f8t[11],_),A=ud(s8t[5],_,a,u),O=A[2],I=nd(s8t[6],x);cd(s8t[7],_,A[3],I,0,x);var P=0===O[0]?[0,O[1][1],0]:[0,O[1][1],1],D=P[1],C=[0,y,n,[0,h2t(F,D),[0,0,x,O,a,u,0,P[2],T,E]],i,e];return[0,[0,h2t(r,D),C]]}}function y(t){var r=t3t(1,t),n=e(r);V3t(r,40);var a=x3t(r);if("number"==typeof a){var u=a-1|0;if(93>>0)if(95<=u)var i=0,c=0;else c=1;else if(40===u)c=1;else i=0,c=0;if(c){var f=0,s=0;i=1}}else i=0;if(!i)f=[0,ad(c8t[13],0,r)],s=nd(f8t[4],r);var o=nd(p,r);return[5,[0,f,o[1],s,o[2],o[3],n]]}bk(p,function(t){var r=H3t(t,41),e=r?[0,r8t(0,d,t)]:r,n=52===x3t(t)?1:0;if(n){1-K4t(t)&&R3t(t,17),V3t(t,52);var a=b(t,0)}else a=n;return[0,nd(k,t),e,a]}),bk(k,function(t){var r=T3t(t);V3t(t,0),t[28][1]=[0,[0,Y4t[1],0],t[28][1]];for(var e=0,n=n8t[1],a=0;;){var u=x3t(t);if("number"==typeof u){var i=u-2|0;if(Sf>>0){if(!(109<(i+1|0)>>>0)){var c=SGt(a),f=function(t,r){for(var e=0,n=r;;){if(!n)return SGt(e);var a=n[2],u=n[1];if(1-ad(Y4t[3],u[1],t))e=[0,u,e],n=a;else n=a}},s=t[28][1];if(s){var o=s[2],v=s[1],l=v[2],b=v[1];if(o){var p=f(b,l),k=FGt(o),d=o?o[2]:vGt(Id),h=dGt(k[2],p);t[28][1]=[0,[0,k[1],h],d]}else{TGt(function(r){return Q4t(t,[0,r[2],[11,r[1]]])},f(b,l)),t[28][1]=0}}else vGt(rUt);var m=T3t(t);return V3t(t,1),[0,h2t(r,m),[0,c]]}}else if(6===i){V3t(t,8);continue}}var y=nd(w,t);switch(y[0]){case 0:var _=y[1],F=_[2],E=_[1],S=F[1];if(1===S){2===F[2][0]&&Q4t(t,[0,E,83]);var g=[0,e,n]}else{if(0===S)if(F[4])var x=0;else{e&&Q4t(t,[0,E,82]);g=[0,1,n],x=1}else x=0;if(!x)g=[0,e,n]}var T=g;break;case 1:var A=y[1],O=A[2],I=O[1];if(1===I[0]){var P=I[1][2];if(Hw(P,CXt))var D=1;else{if(Hw(P,NXt))if(O[4]){D=1;var C=0}else C=1;else C=1;if(C)D=0}if(D){Q4t(t,[0,A[1],[10,P,Hw(P,LXt),0]])}}else;T=[0,e,n];break;default:var N=y[1][2][1],L=N[2][2],R=N[1];if(Hw(L,RXt)){Q4t(t,[0,R,[10,L,0,1]]);var M=[0,e,n]}else{ad(n8t[3],L,n)&&Q4t(t,[0,R,[9,L]]);M=[0,e,ad(n8t[4],L,n)]}T=M}e=T[1],n=T[2],a=[0,y,a]}}),bk(w,function(t){var r=T3t(t),u=e(t),i=4!==S3t(1,t)?1:0;if(i)var c=95!==S3t(1,t)?1:0,f=c?H3t(t,42):c;else f=i;var s=4!==S3t(1,t)?1:0;if(s)var o=83!==S3t(1,t)?1:0,v=o?nd(s8t[1],t):o;else v=s;var l=nd(s8t[2],t),b=ud(s8t[3],t,v,l);if(0===l)if(b)var p=nd(s8t[2],t),k=1;else k=0;else k=0;if(!k)p=l;var w=x3t(t);if(0===v&&0===p&&"number"!=typeof w&&3===w[0]){var d=w[3];if(!Kw(d,AXt)){var y=n(PXt,t),_=x3t(t);if("number"==typeof _){if(79<=_)var F=_+Ct|0,E=14>>0?16<=F?0:1:3===F?1:0;else E=4===_?1:8===_?1:0;if(E)return m(t,r,u,y[2],v,p,f,b)}h(t,b);var S=a(t,1),g=S[2],x=[0,2,S[1],g,f,u];return[0,[0,h2t(r,g[1]),x]]}if(!Kw(d,OXt)){var T=n(IXt,t),A=x3t(t);if("number"==typeof A){if(79<=A)var O=A+Ct|0,I=14>>0?16<=O?0:1:3===O?1:0;else I=4===A?1:8===A?1:0;if(I)return m(t,r,u,T[2],v,p,f,b)}h(t,b);var P=a(t,0),D=P[2],C=[0,3,P[1],D,f,u];return[0,[0,h2t(r,D[1]),C]]}}return m(t,r,u,n(DXt,t)[2],v,p,f,b)});return[0,n,function(r){var e=r8t(0,function(r){V3t(r,0);var e=ud(o,r,0,[0,0,t[3]]);return V3t(r,1),[0,[0,e[1]],e[2]]},r),n=e[2];return[0,e[1],n[1],n[2]]},function(t,r){var n=t3t(1,t),a=T3t(n),u=dGt(r,e(n));V3t(n,40);var i=u3t(1,n),c=n[7],f=C3t(i);if(0===c)var s=0;else{var o=0!==f?1:0;if(o)s=0;else{var v=o;s=1}}s||(v=[0,ad(c8t[13],0,i)]);var l=nd(f8t[4],n),b=nd(p,n),k=b[1];return[0,h2t(a,k[1]),[2,[0,v,k,l,b[2],b[3],u]]]},function(t){return r8t(0,y,t)},b,e]}(o8t),b8t=function(t){function r(t){var r=nd(s8t[14],t);if(t[6])X3t(t,r[1]);else{var e=r[2];if("number"==typeof e);else if(20===e[0]){var n=e[1];if(0===n[4])if(0===n[5])var a=0;else{Q4t(t,[0,r[1],57]);a=1}else{Q4t(t,[0,r[1],56]);a=1}if(a);}else;}return r}var e=function t(r){return t.fun(r)},n=function t(r){return t.fun(r)},a=function t(r){return t.fun(r)},u=function t(r){return t.fun(r)},i=function t(r){return t.fun(r)},c=function t(r){return t.fun(r)},f=function t(r){return t.fun(r)},s=function t(r){return t.fun(r)},o=function t(r,e){return t.fun(r,e)},v=function t(r){return t.fun(r)},l=function t(r){return t.fun(r)},b=function t(r){return t.fun(r)},p=function t(r){return t.fun(r)},k=function t(r){return t.fun(r)},w=function t(r){return t.fun(r)},d=function t(r){return t.fun(r)},h=function t(r){return t.fun(r)},m=function t(r){return t.fun(r)},y=function t(r){return t.fun(r)},_=function t(r){return t.fun(r)},F=function t(r,e){return t.fun(r,e)},E=function t(r){return t.fun(r)},S=function t(r,e){return t.fun(r,e)},g=function t(r){return t.fun(r)},x=function t(r){return t.fun(r)},T=function t(r,e,n){return t.fun(r,e,n)},A=function t(r,e){return t.fun(r,e)},O=function t(r){return t.fun(r)},I=function t(r){return t.fun(r)};function P(t){return V3t(t,59),Y3t(t),0}var D=0;function C(t){V3t(t,37);var r=i3t(1,t),e=nd(c8t[2],r),n=1-t[6];(n?t8t(e):n)&&X3t(t,e[1]),V3t(t,25),V3t(t,4);var a=nd(c8t[7],t);return V3t(t,5),8===x3t(t)&&Y3t(t),[13,[0,e,a]]}var N=0;function L(t,r,e){var n=e[2][1];if(n&&!n[1][2][2]){var a=n[2];if(!a)return a}return Q4t(t,[0,e[1],r])}function R(t,r){var e=1-t[6],n=e?t8t(r):e;return n?X3t(t,r[1]):n}function M(r){V3t(r,39);var e=r[18],n=e?H3t(r,65):e;V3t(r,4);var a=c3t(1,r),u=x3t(a);if("number"==typeof u)if(24<=u)if(29<=u)var i=0;else{switch(u+is|0){case 0:var c=r8t(0,s8t[13],a),f=c[2],s=[0,[0,[1,[0,c[1],f[1]]]],f[2]],o=1;break;case 3:var v=r8t(0,s8t[12],a),l=v[2];s=[0,[0,[1,[0,v[1],l[1]]]],l[2]],o=1;break;case 4:var b=r8t(0,s8t[11],a),p=b[2];s=[0,[0,[1,[0,b[1],p[1]]]],p[2]],o=1;break;default:i=0,o=0}if(o){var k=s[1],w=s[2];i=1}}else if(8===u)k=0,w=0,i=1;else i=0;else i=0;if(!i){var d=u3t(1,a);k=[0,[0,nd(c8t[8],d)]],w=0}var h=x3t(r);if(63!==h&&!n){if("number"==typeof h&&17===h){if(k){var m=k[1];if(0===m[0])var y=[1,ud(t[2],CJt,r,m[1])];else{var _=m[1];L(r,27,_);y=[0,_]}V3t(r,17);var F=nd(c8t[7],r);V3t(r,5);var E=i3t(1,r),S=nd(c8t[2],E);return R(r,S),[18,[0,y,F,S,0]]}throw[0,pd,NJt]}if(TGt(function(t){return Q4t(r,t)},w),V3t(r,8),k)var g=k[1],x=0===g[0]?[0,[1,ad(t[1],r,g[1])]]:[0,[0,g[1]]];else x=k;var T=x3t(r);if("number"==typeof T){var A=8!==T?1:0;if(A)var O=0;else{var I=A;O=1}}else O=0;if(!O)I=[0,nd(c8t[7],r)];V3t(r,8);var P=x3t(r);if("number"==typeof P){var D=5!==P?1:0;if(D)var C=0;else{var N=D;C=1}}else C=0;if(!C)N=[0,nd(c8t[7],r)];V3t(r,5);var M=i3t(1,r),U=nd(c8t[2],M);return R(r,U),[17,[0,x,I,N,U]]}if(k){var j=k[1];if(0===j[0])var B=[1,ud(t[2],PJt,r,j[1])];else{var X=j[1];L(r,28,X);B=[0,X]}V3t(r,63);var J=nd(c8t[10],r);V3t(r,5);var G=i3t(1,r),q=nd(c8t[2],G);return R(r,q),[19,[0,B,J,q,n]]}throw[0,pd,DJt]}var U=0;function j(t){var e=N3t(t)?r(t):nd(c8t[2],t),n=1-t[6];return(n?t8t(e):n)&&X3t(t,e[1]),e}function B(t){V3t(t,16),V3t(t,4);var r=nd(c8t[7],t);V3t(t,5);var e=j(t),n=43===x3t(t)?1:0;return[21,[0,r,e,n?(V3t(t,43),[0,j(t)]):n]]}var X=0;function G(t){if(1-t[11]&&R3t(t,34),V3t(t,19),8===x3t(t))var r=0;else if(P3t(t))r=0;else{var e=[0,nd(c8t[7],t)];r=1}if(!r)e=0;return Y3t(t),[25,[0,e]]}var q=0;function Y(t){V3t(t,20),V3t(t,4);var r=nd(c8t[7],t);V3t(t,5),V3t(t,0);for(var e=IJt;;){var n=e[2],a=e[1],u=x3t(t);if("number"==typeof u)if(1===u?1:Xf===u?1:0){var i=SGt(n);return V3t(t,1),[26,[0,r,i]]}var c=T3t(t),f=x3t(t);if("number"==typeof f)if(36===f){a&&R3t(t,30),V3t(t,36);var s=0,o=1}else o=0;else o=0;if(!o){V3t(t,33);s=[0,nd(c8t[7],t)]}var v=a||(0===s?1:0),l=T3t(t);V3t(t,83);var b=ad(c8t[4],function(t){if("number"==typeof t){var r=t-1|0;if(32>>0?35===r:30<(r-1|0)>>>0)return 1}return 0},[0,t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],1,t[10],t[11],t[12],t[13],t[14],t[15],t[16],t[17],t[18],t[19],t[20],t[21],t[22],t[23],t[24],t[25],t[26],t[27],t[28]]),p=SGt(b),k=p?p[1][1]:l;e=[0,v,[0,[0,h2t(c,k),[0,s,b]],n]]}}var V=0;function W(t){var r=T3t(t);V3t(t,22),I3t(t)&&Q4t(t,[0,r,22]);var e=nd(c8t[7],t);return Y3t(t),[27,[0,e]]}var H=0;function z(t){V3t(t,23);var r=nd(c8t[16],t),e=x3t(t);if("number"==typeof e)if(34===e)var n=[0,r8t(0,function(t){V3t(t,34);var r=4===x3t(t)?1:0;if(r){V3t(t,4);var e=[0,ad(c8t[19],t,37)];V3t(t,5);var n=e}else n=r;return[0,n,nd(c8t[16],t)]},t)],a=1;else a=0;else a=0;if(!a)n=0;var u=x3t(t);if("number"==typeof u)if(38===u){V3t(t,38);var i=[0,nd(c8t[16],t)],c=1}else c=0;else c=0;if(!c)i=0;var f=0===n?1:0;return(f?0===i?1:0:f)&&Q4t(t,[0,r[1],31]),[28,[0,r,n,i]]}var K=0;function Q(t){var r=nd(s8t[9],t);return Y3t(t),TGt(function(r){return Q4t(t,r)},r[2]),r[1][2]}var $=0;function Z(t){V3t(t,28);var r=u3t(1,t),e=nd(s8t[10],r),n=[31,[0,e[1],1]];return Y3t(t),TGt(function(r){return Q4t(t,r)},e[2]),n}var tt=0;function rt(t){V3t(t,25),V3t(t,4);var r=nd(c8t[7],t);V3t(t,5);var e=i3t(1,t),n=nd(c8t[2],e),a=1-t[6];return(a?t8t(n):a)&&X3t(t,n[1]),[32,[0,r,n]]}var et=0;function nt(t){var e=nd(c8t[7],t),n=x3t(t),a=e[2];if("number"!=typeof a&&10===a[0]&&"number"==typeof n&&83===n){var u=a[1],i=u[2];V3t(t,83),ad(u8t[3],i,t[3])&&Q4t(t,[0,e[1],[5,OJt,i]]);var c=t[28],f=t[27],s=t[26],o=t[25],v=t[24],l=t[23],b=t[22],p=t[21],k=t[20],w=t[19],d=t[18],h=t[17],m=t[16],y=t[15],_=t[14],F=t[13],E=t[12],S=t[11],g=t[10],x=t[9],T=t[8],A=t[7],O=t[6],I=t[5],P=t[4],D=ad(Y4t[4],i,t[3]),C=[0,t[1],t[2],D,P,I,O,A,T,x,g,S,E,F,_,y,m,h,d,w,k,p,b,l,v,o,s,f,c];return[24,[0,u,N3t(C)?r(C):nd(c8t[2],C)]]}return Y3t(t),[16,[0,e,0]]}var at=0;function ut(t){var r=nd(c8t[7],t);Y3t(t);var e=t[19];if(e){var n=r[2];if("number"==typeof n)var a=0;else if(14===n[0]){var u=n[1],i=u[1];if("number"==typeof i)var c=1;else if(0===i[0]){var f=u[2],s=[0,UGt(f,1,cw(f)-2|0)];a=1,c=0}else c=1;if(c)a=0}else a=0;if(!a)s=0;var o=s}else o=e;return[16,[0,r,o]]}var it=0;function ct(t){return r8t(it,ut,t)}function ft(t,r){for(var e=r;;){var n=e[2];switch(n[0]){case 0:return AGt(function(t,r){return ft(t,0===r[0]?r[1][2][2]:r[1][2][1])},t,n[1][1]);case 1:return AGt(function(t,r){if(r){var e=r[1];return ft(t,0===e[0]?e[1]:e[1][2][1])}return t},t,n[1][1]);case 2:e=n[1][1];continue;case 3:return[0,n[1][1],t];default:return vGt(AJt)}}}function st(t){W3t(t,xJt);var r=x3t(t);if("number"!=typeof r&&1===r[0]){var e=r[1],n=e[4],a=e[3],u=e[2],i=e[1];return n&&j3t(t,42),V3t(t,[1,[0,i,u,a,n]]),[0,i,[0,u,a]]}var c=[0,T3t(t),TJt];return M3t(t),c}function ot(t,r,e){function n(r){return t?nd(f8t[2],r):ad(c8t[13],0,r)}var a=S3t(1,e);if("number"==typeof a)switch(a){case 1:case 9:case 110:return[0,n(e),0]}else if(3===a[0]&&!Kw(a[3],gJt)){var u=Z3t(e);return J3t(e),[0,u,[0,n(e)]]}var i=x3t(e);if(r&&"number"==typeof i&&!(46===i?0:61===i?0:1))return R3t(e,r[1]),J3t(e),[0,nd(f8t[2],e),0];return[0,n(e),0]}function vt(t,r){var e=T3t(t),n=x3t(t);if("number"==typeof n&&$r===n){V3t(t,$r),W3t(t,hJt);var a=2<=r?ad(c8t[13],0,t):nd(f8t[2],t);return[1,[0,h2t(e,a[1]),a]]}V3t(t,0);for(var u=0,i=0;;){var c=u?u[1]:1,f=x3t(t);if("number"==typeof f)if(1===f?1:Xf===f?1:0){var s=SGt(i);return V3t(t,1),[0,s]}switch(1-c&&R3t(t,79),r){case 0:var o=ot(1,yJt,t),v=[0,0,o[2],o[1]];break;case 1:var l=ot(1,mJt,t);v=[0,0,l[2],l[1]];break;default:var b=x3t(t);if("number"==typeof b)if(46===b)var p=FJt,k=1;else if(61===b)p=_Jt,k=1;else k=0;else k=0;if(!k)p=0;var w=x3t(t);if("number"==typeof w){if(46===w)var d=1;else if(61===w)d=1;else{var h=0;d=0}if(d){var m=1;h=1}}else h=0;if(!h)m=0;if(m){var y=Z3t(t),_=x3t(t);if("number"==typeof _)switch(_){case 1:case 9:case 110:ud(c8t[15],0,t,y);var F=[0,0,0,y],E=1;break;default:E=0}else if(3===_[0])if(Kw(_[3],EJt))E=0;else{var S=S3t(1,t);if("number"==typeof S)switch(S){case 1:case 9:case 110:F=[0,p,0,nd(f8t[2],t)],E=1;var g=0;break;default:g=1}else if(3===S[0])if(Kw(S[3],SJt))g=1;else{var x=Z3t(t);J3t(t);F=[0,p,[0,nd(f8t[2],t)],x],E=1,g=0}else g=1;if(g){ud(c8t[15],0,t,y),J3t(t);F=[0,0,[0,ad(c8t[13],0,t)],y],E=1}}else E=0;if(!E){var T=ot(1,0,t);F=[0,p,T[2],T[1]]}}else{var A=ot(0,0,t);F=[0,0,A[2],A[1]]}v=F}u=[0,H3t(t,9)],i=[0,v,i]}}function lt(t,r){var e=[0,vt(r,t)],n=st(r);return Y3t(r),[22,[0,t,n,0,e]]}function bt(t,r){var e=2<=t?ad(c8t[13],0,r):nd(f8t[2],r),n=x3t(r);if("number"==typeof n)if(9===n){V3t(r,9);var a=[0,vt(r,t)],u=1}else u=0;else u=0;if(!u)a=0;var i=st(r);return Y3t(r),[22,[0,t,i,[0,e],a]]}function pt(t){var r=t3t(1,t);V3t(r,50);var e=x3t(r);if("number"==typeof e)switch(e){case 46:if(K4t(r)){V3t(r,46);var n=x3t(r);if("number"==typeof n)if($r===n?1:0===n?1:0)return lt(1,r);return bt(1,r)}break;case 61:if(K4t(r)){var a=S3t(1,r);if("number"==typeof a)switch(a){case 0:return J3t(r),lt(0,r);case 103:return J3t(r),M3t(r),lt(0,r);case 9:var u=1;break;default:u=0}else u=3===a[0]?Kw(a[3],dJt)?0:1:0;return u?bt(2,r):(J3t(r),bt(0,r))}break;case 0:case 103:return lt(2,r)}else if(1===e[0]){var i=e[1],c=i[4],f=i[3],s=i[2],o=i[1];return c&&j3t(r,42),V3t(r,[1,[0,o,s,f,c]]),Y3t(r),[22,[0,2,[0,o,[0,s,f]],0,0]]}return bt(2,r)}var kt=0;function wt(t){return r8t(kt,pt,t)}return bk(e,function(t){var r=T3t(t);return V3t(t,8),[0,r,1]}),bk(n,function(t){var r=r8t(0,function(t){if(V3t(t,32),8===x3t(t))var r=0;else if(P3t(t))r=0;else{var e=ad(c8t[13],0,t),n=e[2];1-ad(u8t[3],n,t[3])&&R3t(t,[4,n]);var a=[0,e];r=1}if(!r)a=0;return Y3t(t),a},t),e=r[2],n=r[1],a=0===e?1:0;if(a)var u=1-(t[8]||t[9]);else u=a;return u&&Q4t(t,[0,n,33]),[0,n,[1,[0,e]]]}),bk(a,function(t){var r=r8t(0,function(t){if(V3t(t,35),8===x3t(t))var r=0;else if(P3t(t))r=0;else{var e=ad(c8t[13],0,t),n=e[2];1-ad(u8t[3],n,t[3])&&R3t(t,[4,n]);var a=[0,e];r=1}if(!r)a=0;return Y3t(t),a},t),e=r[1];return 1-t[8]&&Q4t(t,[0,e,32]),[0,e,[3,[0,r[2]]]]}),bk(u,function(t){var r=r8t(0,function(t){V3t(t,26),V3t(t,4);var r=nd(c8t[7],t);V3t(t,5);var e=nd(c8t[2],t),n=1-t[6];return(n?t8t(e):n)&&X3t(t,e[1]),[33,[0,r,e]]},t),e=r[1];return B3t(t,[0,e,36]),[0,e,r[2]]}),bk(i,function(t){var r=nd(c8t[16],t);return[0,r[1],[0,r[2]]]}),bk(c,function(t){1-K4t(t)&&R3t(t,11),V3t(t,61),G3t(t,1);var r=nd(f8t[2],t),e=nd(f8t[4],t);V3t(t,79);var n=nd(f8t[1],t);return Y3t(t),q3t(t),[0,r,e,n]}),bk(f,function(t){return r8t(0,function(t){return V3t(t,60),[10,nd(c,t)]},t)}),bk(s,function(t){if(D3t(1,t)){var r=r8t(0,c,t);return[0,r[1],[29,r[2]]]}return nd(c8t[2],t)}),bk(o,function(t,r){var e=t?t[1]:t;1-K4t(r)&&R3t(r,12),V3t(r,62),V3t(r,61),G3t(r,1);var n=nd(f8t[2],r),a=nd(f8t[4],r),u=x3t(r);if("number"==typeof u)if(83===u){V3t(r,83);var i=[0,nd(f8t[1],r)],c=1}else c=0;else c=0;if(!c)i=0;var f=1-e,s=f?(V3t(r,79),[0,nd(f8t[1],r)]):f;return Y3t(r),q3t(r),[0,n,a,s,i]}),bk(v,function(t){return r8t(0,function(t){return V3t(t,60),[11,ad(o,wJt,t)]},t)}),bk(l,function(t){var r=S3t(1,t);if("number"==typeof r&&61===r){var e=r8t(0,nd(o,kJt),t);return[0,e[1],[30,e[2]]]}return nd(c8t[2],t)}),bk(b,function(t){1-K4t(t)&&R3t(t,17),V3t(t,53);var r=nd(f8t[2],t),e=nd(f8t[4],t),n=nd(f8t[8],t);return[0,r,e,n[2],n[1]]}),bk(p,function(t){return r8t(0,function(t){return V3t(t,60),[7,nd(b,t)]},t)}),bk(k,function(t){var r=D3t(1,t);if(r)var e=r;else{var n=z4t(t);if(1===n){var a=S3t(1,t);if("number"==typeof a)var u=0;else if(3===a[0])e=1,u=1;else u=0;if(!u)e=0}else if(0===n){var i=S3t(1,t);if("number"==typeof i)switch(i){case 42:case 46:case 47:e=0;var c=1;break;case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 43:case 44:case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 65:case 111:case 112:case 113:case 114:case 115:case 116:c=0;break;default:e=0,c=1}else switch(i[0]){case 3:if(E3t(i[3]))e=0,c=1;else c=0;break;case 8:case 9:c=0;break;default:e=0,c=1}if(!c)e=1}else e=0}if(e){var f=r8t(0,b,t);return[0,f[1],[23,f[2]]]}return ct(t)}),bk(w,function(t){var r=t3t(1,t);V3t(r,40);var e=ad(c8t[13],0,r),n=nd(f8t[4],r),a=H3t(r,41),u=a?[0,nd(f8t[6],r)]:a,i=x3t(r);if("number"==typeof i)var c=0;else if(3===i[0])if(Kw(i[3],pJt))c=0;else{J3t(r);for(var f=0;;){var s=[0,nd(f8t[6],r),f],o=x3t(r);if("number"!=typeof o||9!==o){var v=SGt(s);c=1;break}V3t(r,9);f=s}}else c=0;if(!c)v=0;var l=x3t(r);if("number"==typeof l)if(52===l){J3t(r);var b=ad(l8t[5],r,0),p=1}else p=0;else p=0;if(!p)b=0;return[0,e,n,ad(f8t[7],1,r),u,v,b]}),bk(d,function(t){return r8t(0,function(t){return V3t(t,60),[4,nd(w,t)]},t)}),bk(h,function(t){V3t(t,15);var r=ad(c8t[13],0,t),e=T3t(t),n=nd(f8t[3],t),a=nd(f8t[9],t);V3t(t,83);var u=nd(f8t[1],t),i=[0,h2t(e,u[1]),[1,[0,n,a,u]]],c=[0,i[1],i],f=nd(f8t[12],t);return Y3t(t),[0,r,c,f]}),bk(m,function(t){return r8t(0,function(t){V3t(t,60);var r=x3t(t);"number"==typeof r&&64===r&&(R3t(t,62),V3t(t,64));return[6,nd(h,t)]},t)}),bk(y,function(t){V3t(t,24);var r=ud(c8t[14],t,bJt,38)[2];return Y3t(t),[0,r[1],r[2]]}),bk(_,function(t){return r8t(0,function(t){return V3t(t,60),[12,nd(y,t)]},t)}),bk(F,function(t,r){var e=t?t[1]:t,n=T3t(r);if(V3t(r,60),W3t(r,lJt),!e&&10!==x3t(r)){var a=x3t(r);if("number"==typeof a)var u=0;else if(1===a[0]){var i=a[1],c=i[4],f=i[3],s=i[2],o=i[1];c&&j3t(r,42),V3t(r,[1,[0,o,s,f,c]]);var v=[1,[0,o,[0,s,f]]];u=1}else u=0;if(!u)v=[0,ad(c8t[13],0,r)];var l=r8t(0,function(t){V3t(t,0);for(var r=0,e=0;;){var n=x3t(t);if("number"==typeof n)if(1===n?1:Xf===n?1:0){var a=[0,r,SGt(e)];return V3t(t,1),a}var u=ad(S,vJt,t),i=u[2],c=u[1];if(r)if(0===r[1][0])if("number"==typeof i)var f=0;else switch(i[0]){case 5:var s=i[1][2];if(s)switch(s[1][0]){case 4:case 6:var o=1;break;default:o=0}else o=0;o||R3t(t,74);var v=r;f=1;break;case 9:R3t(t,73);v=r,f=1;break;default:f=0}else if("number"==typeof i)f=0;else if(9===i[0]){R3t(t,74);v=r,f=1}else f=0;else if("number"==typeof i)f=0;else switch(i[0]){case 5:var l=i[1][2];if(l)switch(l[1][0]){case 4:case 6:var b=r,p=1;break;default:p=0}else p=0;if(!p)b=[0,[1,c]];v=b,f=1;break;case 9:v=[0,[0,c]],f=1;break;default:f=0}if(!f)v=r;r=v,e=[0,u,e]}},r),b=l[2],p=b[1],k=l[1],w=[0,k,[0,b[2]]],d=h2t(n,k);return[0,d,[8,[0,v,w,p?p[1]:[0,d]]]]}var h=r8t(0,E,r),m=h[2];return[0,h2t(n,h[1]),m]}),bk(E,function(t){V3t(t,10),W3t(t,oJt);var r=nd(f8t[10],t);return Y3t(t),[9,r]}),bk(S,function(t,r){var e=t?t[1]:t;1-K4t(r)&&R3t(r,14);var n=S3t(1,r);if("number"==typeof n)switch(n){case 24:return nd(_,r);case 40:return nd(d,r);case 46:if(50===x3t(r))return wt(r);break;case 49:if(e)return ad(I,[0,e],r);break;case 53:return nd(p,r);case 61:var a=x3t(r);return"number"==typeof a&&50===a&&e?wt(r):nd(f,r);case 62:return nd(v,r);case 15:case 64:return nd(m,r)}else if(3===n[0]&&!Kw(n[3],sJt))return ad(F,[0,e],r);if(e){var u=x3t(r);return"number"==typeof u&&50===u?(R3t(r,77),nd(c8t[2],r)):nd(_,r)}return nd(c8t[2],r)}),bk(g,function(t){W3t(t,cJt);var r=x3t(t);if("number"!=typeof r&&1===r[0]){var e=r[1],n=e[4],a=e[3],u=e[2],i=e[1];return n&&j3t(t,42),V3t(t,[1,[0,i,u,a,n]]),[0,i,[0,u,a]]}var c=[0,T3t(t),fJt];return M3t(t),c}),bk(x,function(t){return t[2]}),bk(T,function(t,r,e){var n=t?t[1]:1,a=x3t(r);if("number"==typeof a&&(1===a?1:Xf===a?1:0))return SGt(e);1-n&&R3t(r,80);var u=r8t(0,function(t){var r=Z3t(t),e=x3t(t);if("number"==typeof e)var n=0;else if(3===e[0])if(Kw(e[3],iJt))n=0;else{J3t(t);var a=Z3t(t);$4t(t,a);var u=[0,a];n=1}else n=0;if(!n){$4t(t,r);u=0}return[0,r,u]},r);return ud(T,[0,H3t(r,9)],r,[0,u,e])}),bk(A,function(t,r){return TGt(function(r){var e=r[2];return e[2]?0:ud(c8t[15],uJt,t,e[1])},r)}),bk(O,function(t){function r(r){var e=s3t(1,t3t(1,r)),n=T3t(e);V3t(e,49);var a=x3t(e);if("number"==typeof a)if(65<=a){if($r===a){var u=T3t(e);V3t(e,$r);var i=e[26][4],f=x3t(e);if("number"==typeof f)var s=0;else if(3===f[0])if(Kw(f[3],ZXt))s=0;else{J3t(e);var v=i?[0,ad(c8t[13],0,e)]:(R3t(e,14),0);s=1}else s=0;if(!s)v=0;var l=[0,nd(g,e)];return Y3t(e),[15,[0,0,[0,[1,u,v]],l,1]]}}else if(13<=a)switch(a-13|0){case 23:var b=r8t(0,function(t){return V3t(t,36)},e);if($4t(e,[0,h2t(n,T3t(e)),tJt]),N3t(e))var p=[0,nd(s8t[14],e)];else if(L3t(e))p=[0,ad(l8t[3],e,t)];else{var w=nd(c8t[10],e);Y3t(e);p=[1,w]}return[14,[0,b[1],p]];case 40:1-K4t(e)&&R3t(e,16);var d=nd(k,e),h=d[2];if("number"==typeof h)var m=0;else if(23===h[0]){var y=nd(x,h[1][1]);$4t(e,[0,d[1],y]);m=1}else m=0;return m||vGt(wGt(eJt,rJt)),[15,[0,[0,d],0,0,0]];case 48:if(0!==S3t(1,e)){1-K4t(e)&&R3t(e,16);var _=S3t(1,e);if("number"==typeof _&&$r===_){V3t(e,61);var F=T3t(e);V3t(e,$r);var E=nd(g,e);return Y3t(e),[15,[0,0,[0,[1,F,0]],[0,E],0]]}var S=r8t(0,c,e),O=S[2],I=S[1];return $4t(e,[0,I,nd(x,O[1])]),[15,[0,[0,[0,I,[29,O]]],0,0,0]]}break;case 49:var P=r8t(0,function(t){return ad(o,0,t)},e),D=P[2],C=P[1];return $4t(e,[0,C,nd(x,D[1])]),[15,[0,[0,[0,C,[30,D]]],0,0,0]];case 0:case 2:case 11:case 14:case 15:case 27:case 51:var N=ad(c8t[3],[0,t],e),L=N[2],R=N[1];if("number"==typeof L)var M=0;else switch(L[0]){case 2:var U=L[1][1];if(U){var j=U[1];M=2}else{Q4t(e,[0,R,68]);var B=0;M=1}break;case 20:var X=L[1][1];if(X)j=X[1],M=2;else{Q4t(e,[0,R,69]);B=0,M=1}break;case 31:B=AGt(function(t,r){return AGt(ft,t,[0,r[2][1],0])},0,L[1][1]),M=1;break;default:M=0}switch(M){case 0:B=vGt(aJt);var J=0;break;case 1:J=0;break;default:var G=[0,[0,R,nd(x,j)],0];J=1}if(!J)G=B;return TGt(function(t){return $4t(e,t)},G),[15,[0,[0,N],0,0,1]]}var q=x3t(e);if("number"==typeof q)if(61===q){J3t(e);var Y=0,V=1}else V=0;else V=0;if(!V)Y=1;V3t(e,0);var W=ud(T,0,e,0);V3t(e,1);var H=x3t(e);if("number"==typeof H)var z=0;else if(3===H[0])if(Kw(H[3],nJt))z=0;else{var K=[0,nd(g,e)];z=1}else z=0;if(!z){ad(A,e,W);K=0}return Y3t(e),[15,[0,0,[0,[0,W]],K,Y]]}return function(t){return r8t(0,r,t)}}),bk(I,function(t){var r=t?t[1]:t;function e(t){1-K4t(t)&&R3t(t,14),V3t(t,60);var e=s3t(1,t3t(1,t));V3t(e,49);var n=x3t(e);if("number"==typeof n)if(53<=n){if($r===n){var a=T3t(e);V3t(e,$r);var u=e[26][4],i=x3t(e);if("number"==typeof i)var f=0;else if(3===i[0])if(Kw(i[3],KXt))f=0;else{J3t(e);var s=u?[0,ad(c8t[13],0,e)]:(R3t(e,14),0);f=1}else f=0;if(!f)s=0;var v=nd(g,e);return Y3t(e),[5,[0,0,0,[0,[1,a,s]],[0,v]]]}if(!(63<=n))switch(n+J|0){case 0:if(r)return[5,[0,0,[0,[6,r8t(0,b,e)]],0,0]];break;case 8:if(r)return[5,[0,0,[0,[4,r8t(0,c,e)]],0,0]];break;case 9:return[5,[0,0,[0,[5,r8t(0,nd(o,zXt),e)]],0,0]]}}else{var l=n-15|0;if(!(25>>0))switch(l){case 21:var p=r8t(0,function(t){return V3t(t,36)},e),k=x3t(e);if("number"==typeof k)if(15===k)var d=[0,[1,r8t(0,h,e)]],m=1;else if(40===k)d=[0,[2,r8t(0,w,e)]],m=1;else m=0;else m=0;if(!m){var _=nd(f8t[1],e);Y3t(e);d=[0,[3,_]]}return[5,[0,[0,p[1]],d,0,0]];case 0:case 9:case 12:case 13:case 25:var F=x3t(e);if("number"==typeof F){if(25<=F)if(29<=F)if(40===F)var E=[0,[2,r8t(0,w,e)]],S=2;else S=0;else S=27<=F?1:0;else if(15===F)E=[0,[1,r8t(0,h,e)]],S=2;else S=24<=F?1:0;switch(S){case 0:var x=0;break;case 1:"number"==typeof F&&(27===F?R3t(e,64):28===F&&R3t(e,63)),E=[0,[0,r8t(0,y,e)]],x=1;break;default:x=1}if(x)return[5,[0,0,E,0,0]]}throw[0,pd,$Xt]}}var O=x3t(e);"number"==typeof O&&(53===O?R3t(e,66):61===O&&R3t(e,65));V3t(e,0);var I=ud(T,0,e,0);V3t(e,1);var P=x3t(e);if("number"==typeof P)var D=0;else if(3===P[0])if(Kw(P[3],QXt))D=0;else{var C=[0,nd(g,e)];D=1}else D=0;if(!D){ad(A,e,I);C=0}return Y3t(e),[5,[0,0,0,[0,[0,I]],C]]}return function(t){return r8t(0,e,t)}}),[0,function(t){return r8t(U,M,t)},function(t){return r8t(X,B,t)},function(t){return r8t(tt,Z,t)},function(t){return r8t(K,z,t)},function(t){return r8t(et,rt,t)},u,i,n,a,function(t){return r8t(D,P,t)},S,I,v,function(t){return r8t(N,C,t)},e,O,ct,wt,k,function(t){return r8t(at,nt,t)},l,function(t){return r8t(q,G,t)},function(t){return r8t(V,Y,t)},function(t){return r8t(H,W,t)},s,function(t){return r8t($,Q,t)}]}(o8t),p8t=function(t){var r=function t(r,e){return t.fun(r,e)},e=function t(r,e){return t.fun(r,e)},n=function t(r,e){return t.fun(r,e)};function a(t,r){return nd(c8t[24],r)?[0,ad(n,t,r)]:(Q4t(t,[0,r[1],25]),0)}function u(r){function e(t,r){var e=x3t(t);if("number"==typeof e)if(79===e){V3t(t,79);var n=[0,nd(c8t[10],t)],a=1}else a=0;else a=0;if(!a)n=0;if(n){var u=n[1];return[0,h2t(r[1],u[1]),[2,[0,r,u]]]}return r}function n(n){V3t(n,0);for(var a=0,u=0,i=0;;){var f=x3t(n);if("number"==typeof f)if(1===f?1:Xf===f?1:0){u&&Q4t(n,[0,u[1],94]);var s=SGt(i);return V3t(n,1),[0,[0,s,83===x3t(n)?[1,nd(t[10],n)]:a8t(n)]]}if(12===x3t(n))var o=r8t(0,function(t){return V3t(t,12),c(t,r)},n),v=[0,[1,[0,o[1],[0,o[2]]]]];else{var l=T3t(n),b=ad(c8t[21],0,n),p=x3t(n);if("number"==typeof p)if(83===p){V3t(n,83);var k=e(n,c(n,r)),w=h2t(l,k[1]),d=b[2];switch(d[0]){case 0:var h=[0,d[1]];break;case 1:h=[1,d[1]];break;case 2:h=vGt(GXt);break;default:h=[2,d[1]]}v=[0,[0,[0,w,[0,h,k,0]]]];var m=1}else m=0;else m=0;if(!m){var y=b[2];if(1===y[0]){var _=y[1],F=_[2],E=_[1];(F3t(F)&&Kw(F,qXt)&&Kw(F,YXt)?(Q4t(n,[0,E,3]),1):0)||m3t(F)&&B3t(n,[0,E,50]);var S=e(n,[0,E,[3,[0,_,a8t(n),0]]]);v=[0,[0,[0,h2t(l,S[1]),[0,[1,_],S,1]]]]}else{M3t(n);v=0}}}if(v){var g=v[1],x=a?(Q4t(n,[0,g[1][1],61]),0):u;if(0===g[0])var T=a,A=x;else{var O=9===x3t(n)?1:0;T=1,A=O?[0,T3t(n)]:O}1!==x3t(n)&&V3t(n,9);a=T,u=A,i=[0,g,i]}else;}}return function(t){return r8t(0,n,t)}}function i(r){function e(e){V3t(e,6);for(var n=0;;){var a=x3t(e);if("number"==typeof a){if(13<=a)var u=Xf===a?1:0;else if(7<=a)switch(a-7|0){case 2:V3t(e,9);n=[0,0,n];continue;case 5:var i=r8t(0,function(t){return V3t(t,12),c(t,r)},e),f=i[1],s=[1,[0,f,[0,i[2]]]];7!==x3t(e)&&(Q4t(e,[0,f,60]),9===x3t(e)&&J3t(e));n=[0,[0,s],n];continue;case 0:u=1;break;default:u=0}else u=0;if(u){var o=SGt(n);return V3t(e,7),[1,[0,o,83===x3t(e)?[1,nd(t[10],e)]:a8t(e)]]}}var v=c(e,r),l=x3t(e);if("number"==typeof l)if(79===l){V3t(e,79);var b=nd(c8t[10],e),p=[0,h2t(v[1],b[1]),[2,[0,v,b]]],k=1}else k=0;else k=0;if(!k)p=v;var w=[0,p];7!==x3t(e)&&V3t(e,9);n=[0,[0,w],n]}}return function(t){return r8t(0,e,t)}}function c(t,r){var e=x3t(t);if("number"==typeof e){if(6===e)return nd(i(r),t);if(0===e)return nd(u(r),t)}var n=ud(c8t[14],t,0,r);return[0,n[1],[3,n[2]]]}return bk(r,function(t,r){for(var e=a8t(t),a=0,u=r[2][1];;){if(!u){var i=[0,[0,SGt(a),e]];return[0,r[1],i]}var c=u[1];if(0!==c[0]){var f=u[2],s=c[1],o=s[1];if(f){Q4t(t,[0,o,61]);u=f}else a=[0,[1,[0,o,[0,ad(n,t,s[2][1])]]],a],u=0}else{var v=c[1],l=v[2];switch(l[0]){case 0:var b=l[3],p=ad(n,t,l[2]),k=[0,l[1],p,b],w=0;break;case 1:var d=l[2],h=d[1];Q4t(t,[0,h,93]);k=[0,l[1],[0,h,[4,[0,h,[8,d[2]]]]],0],w=0;break;default:var m=l[2],y=m[1];Q4t(t,[0,y,2]);var _=l[1],F=[0,y,[4,[0,y,[8,m[2]]]]],E=0;w=1}if(!w)_=k[1],F=k[2],E=k[3];switch(_[0]){case 0:var S=[0,_[1]];break;case 1:S=[1,_[1]];break;case 2:S=vGt(HXt);break;default:S=[2,_[1]]}var a=[0,[0,[0,v[1],[0,S,F,E]]],a],u=u[2]}}}),bk(e,function(t,r){for(var e=a8t(t),u=0,i=r[2][1];;){if(!i){var c=[1,[0,SGt(u),e]];return[0,r[1],c]}var f=i[1];if(f){var s=f[1];if(0===s[0]){var o=s[1],v=o[2];if("number"!=typeof v&&2===v[0]&&0===v[1][1]){u=[0,[0,[0,ad(n,t,o)]],u],i=i[2];continue}var l=a(t,o);u=l?[0,[0,[0,l[1]]],u]:u,i=i[2];continue}var b=i[2],p=s[1],k=p[1];if(b){Q4t(t,[0,k,60]);i=b;continue}var w=a(t,p[2][1]);u=w?[0,[0,[1,[0,k,[0,w[1]]]]],u]:u,i=0}else u=[0,0,u],i=i[2]}}),bk(n,function(t,n){var a=n[2],u=n[1];if("number"!=typeof a)switch(a[0]){case 0:return ad(e,t,[0,u,a[1]]);case 2:var i=a[1];if(0===i[1])return[0,u,[2,[0,i[2],i[3]]]];break;case 10:var c=a[1],f=c[2],s=c[1];if(!(t[6]&&_3t(f)?(Q4t(t,[0,s,47]),1):0)&&1-t[6])if(!(t[17]&&Hw(f,VXt)?(Q4t(t,[0,s,89]),1):0)){var o=t[18];(o?Hw(f,WXt):o)&&Q4t(t,[0,s,88])}return[0,u,[3,[0,c,a8t(t),0]]];case 19:return ad(r,t,[0,u,a[1]])}return[0,u,[4,[0,u,a]]]}),[0,r,e,n,u,i,c]}(f8t),k8t=function t(r){return t.fun(r)},w8t=function t(r,e,n){return t.fun(r,e,n)},d8t=function t(r){return t.fun(r)},h8t=function t(r,e){return t.fun(r,e)},m8t=function t(r,e){return t.fun(r,e)},y8t=function t(r,e){return t.fun(r,e)},_8t=function t(r,e){return t.fun(r,e)},F8t=function t(r,e){return t.fun(r,e)},E8t=function t(r){return t.fun(r)},S8t=function t(r){return t.fun(r)},g8t=function t(r){return t.fun(r)},x8t=function t(r,e,n){return t.fun(r,e,n)},T8t=function t(r,e){return t.fun(r,e)},A8t=function t(r,e,n){return t.fun(r,e,n)},O8t=function t(r){return t.fun(r)},I8t=function t(r){return t.fun(r)},P8t=function(t){function r(r){G3t(r,0);var e=T3t(r);V3t(r,0),V3t(r,12);var n=nd(t[10],r),a=T3t(r);return V3t(r,1),q3t(r),[0,h2t(e,a),[0,n]]}function e(r,e){if(1===x3t(r))var n=T3t(r)[2],a=[1,[0,e[1],e[3],n]];else a=[0,nd(t[7],r)];var u=T3t(r);return V3t(r,1),q3t(r),[0,h2t(e,u),[0,a]]}function n(t){G3t(t,0);var r=T3t(t);return V3t(t,0),e(t,r)}function a(r){G3t(r,0);var n=T3t(r);V3t(r,0);var a=x3t(r);if("number"==typeof a&&12===a){V3t(r,12);var u=nd(t[10],r),i=T3t(r);return V3t(r,1),q3t(r),[0,h2t(n,i),[3,u]]}var c=e(r,n);return[0,c[1],[2,c[2]]]}function u(t){var r=T3t(t),e=x3t(t);if("number"==typeof e)var n=0;else if(6===e[0]){var a=e[1];n=1}else n=0;return n||(M3t(t),a=gXt),J3t(t),[0,r,[0,a]]}function i(t){var r=u(t),e=x3t(t);if("number"==typeof e){if(10===e){V3t(t,10);for(var n=u(t),a=[0,h2t(r[1],n[1]),[0,[0,r],n]];;){var i=x3t(t);if("number"!=typeof i||10!==i)return[2,a];V3t(t,10);var c=u(t);a=[0,h2t(a[1],c[1]),[0,[1,a],c]]}}if(83===e){V3t(t,83);var f=u(t);return[1,[0,h2t(r[1],f[1]),[0,r,f]]]}}return[0,r]}function c(t){var r=T3t(t),e=u(t);if(83===x3t(t)){V3t(t,83);var a=u(t),i=h2t(e[1],a[1]),c=i,f=[1,[0,i,[0,e,a]]]}else c=e[1],f=[0,e];if(79===x3t(t)){V3t(t,79);var s=x3t(t);if("number"==typeof s)if(0===s){var o=n(t),v=o[2],l=o[1];0!==v[1][0]&&Q4t(t,[0,l,51]);var b=[0,l,[0,[1,l,v]]],p=0}else p=1;else if(7===s[0]){var k=s[1],w=k[1];V3t(t,s),b=[0,w,[0,[0,w,[0,[0,k[2]],k[3]]]]],p=0}else p=1;if(p){R3t(t,52);var d=T3t(t),h=d,m=[0,[0,d,[0,SXt,EXt]]]}else h=b[1],m=b[2]}else h=c,m=0;return[0,h2t(r,h),[0,f,m]]}function f(t,e){var n=x3t(t);if("number"==typeof n)if(96===n)var a=0,u=0,f=0,s=1;else s=0;else s=0;if(!s)for(var o=0,v=[0,i(t)];;){var l=x3t(t);if("number"==typeof l){if(Qs<=l)if(Xf===l)var b=1;else if($r<=l){var p=0;b=0}else b=1;else if(96===l)b=1;else{if(0===l){o=[0,[1,r(t)],o];continue}p=0,b=0}b&&(a=v,u=SGt(o),f=Qs===x3t(t)?1:0,p=1)}else p=0;if(p)break;o=[0,[0,c(t)],o]}f&&V3t(t,Qs);var k=T3t(t);if(V3t(t,96),q3t(t),a){var w=[0,te,[0,a[1],f,u]];return[0,h2t(e,k),w]}return[0,h2t(e,k),Js]}function s(t,r){V3t(t,Qs);var e=x3t(t);if("number"==typeof e){var n=96!==e?1:0;if(n)var a=0;else{var u=n;a=1}}else a=0;a||(u=[0,i(t)]);var c=T3t(t);V3t(t,96);var f=t[22][1];if(f){var s=f[2];if(s)var o=s[2],v=1;else v=0}else v=0;v||(o=vGt(BRt)),t[22][1]=o;var l=z4t(t),b=V4t(t[23][1],l);if(t[24][1]=b,u){var p=[0,te,[0,u[1]]];return[0,h2t(r,c),p]}return[0,h2t(r,c),Js]}var o=function t(r){return t.fun(r)},v=function t(r,e){return t.fun(r,e)},l=function t(r){return t.fun(r)};function b(t){switch(t[0]){case 0:return t[1][2][1];case 1:var r=t[1][2],e=wGt(yXt,r[2][2][1]);return wGt(r[1][2][1],e);default:var n=t[1][2],a=n[1];return wGt(0===a[0]?a[1][2][1]:b([2,a[1]]),wGt(_Xt,n[2][2][1]))}}return bk(o,function(t){var r=x3t(t);if("number"==typeof r){if(0===r)return a(t)}else if(7===r[0]){var e=r[1];return V3t(t,r),[0,e[1],[4,[0,e[2],e[3]]]]}var n=nd(l,t),u=n[2],i=n[1];return Js<=u[1]?[0,i,[1,u[2]]]:[0,i,[0,u[2]]]}),bk(v,function(t,r){var e=f(t,r),n=e[2];if("number"!=typeof n&&n[2][2])var a=0,u=uo;else{G3t(t,3);for(var i=0;;){var c=x3t(t);if("number"==typeof c){if(95===c){G3t(t,2);var l=T3t(t);V3t(t,95);var p=x3t(t);if("number"==typeof p){if(Qs===p)var k=1;else if(Xf===p)k=1;else{var w=0;k=0}if(k){var d=s(t,l),h=d[2],m=d[1];if("number"==typeof h){var y=[1,m];w=1}else y=[0,[0,m,h[2]]],w=1}}else w=0;if(!w){var _=ad(v,t,l),F=_[2],E=_[1];y=Js<=F[1]?[3,[0,E,F[2]]]:[2,[0,E,F[2]]]}switch(y[0]){case 0:var S=[0,te,y[1]],g=[0,SGt(i),S],x=1;break;case 1:var T=[0,Js,y[1]];g=[0,SGt(i),T],x=1;break;case 2:var A=y[1];i=[0,[0,A[1],[0,A[2]]],i];continue;default:var O=y[1];i=[0,[0,O[1],[1,O[2]]],i];continue}}else if(Xf===c)M3t(t),g=[0,SGt(i),uo],x=1;else{var I=0;x=0}x&&(a=g[1],u=g[2],I=1)}else I=0;if(I)break;i=[0,nd(o,t),i]}}if("number"==typeof u)var P=0;else{var D=u[1];if(te===D){var C=u[2],N=e[2];if("number"==typeof N)R3t(t,FXt);else{var L=b(N[2][1]);Kw(b(C[2][1]),L)&&R3t(t,[6,L])}var R=C[1],M=1}else if(Js===D){var U=e[2];"number"==typeof U||te===U[1]&&R3t(t,[6,b(U[2][1])]),R=u[2],M=1}else P=0,M=0;if(M){var j=R;P=1}}P||(j=e[1]);var B=e[2];if("number"==typeof B){if("number"==typeof u)var X=0;else if(Js===u[1]){var J=[0,u[2]];X=1}else X=0;X||(J=0);var G=[0,Js,[0,e[1],J,a]];return[0,h2t(e[1],j),G]}if("number"==typeof u)var q=0;else if(te===u[1]){var Y=[0,u[2]];q=1}else q=0;q||(Y=0);var V=[0,te,[0,[0,e[1],B[2]],Y,a]];return[0,h2t(e[1],j),V]}),bk(l,function(t){var r=T3t(t);return G3t(t,2),V3t(t,95),ad(v,t,r)}),[0,r,e,n,a,u,i,c,f,s,o,v,l]}(c8t),D8t=l8t[3],C8t=v8t[3],N8t=v8t[1],L8t=v8t[6],R8t=l8t[2],M8t=l8t[1],U8t=l8t[4],j8t=v8t[5],B8t=P8t[12],X8t=p8t[6],J8t=p8t[3];bk(k8t,function(t){var r=ad(h8t,t,function(t){return 0}),e=T3t(t);if(V3t(t,Xf),r)var n=FGt(SGt(r))[1],a=h2t(FGt(r)[1],n);else a=e;return[0,a,r,SGt(t[2][1])]}),bk(w8t,function(t,r,e){for(var n=n3t(1,t),a=jJt;;){var u=a[2],i=a[1],c=x3t(n);if("number"==typeof c)if(Xf===c)var f=[0,n,i,u],s=1;else s=0;else s=0;if(!s)if(nd(r,c))f=[0,n,i,u];else{if("number"==typeof c)var o=0;else if(1===c[0]){var v=nd(e,n),l=[0,v,u],b=v[2];if("number"!=typeof b&&16===b[0]){var p=b[1][2];if(p){var k=n[6]||Hw(p[1],UJt);n=t3t(k,n),a=[0,[0,c,i],l];continue}}f=[0,n,i,l],o=1}else o=0;if(!o)f=[0,n,i,u]}var w=n3t(0,n);return TGt(function(t){if("number"!=typeof t&&1===t[0]){var r=t[1],e=r[4];return e?B3t(w,[0,r[1],42]):e}return vGt(wGt(XJt,wGt(T2t(t),BJt)))},SGt(i)),[0,w,f[3]]}}),bk(d8t,function(t){var r=nd(l8t[6],t),e=x3t(t);if("number"==typeof e){var n=e-49|0;if(!(11>>0))switch(n){case 0:return ad(b8t[16],r,t);case 1:nd(U3t(t),r);var a=S3t(1,t);return nd("number"==typeof a&&4===a?b8t[17]:b8t[18],t);case 11:if(49===S3t(1,t))return nd(U3t(t),r),ad(b8t[12],0,t)}}return ad(F8t,[0,r],t)}),bk(h8t,function(t,r){var e=ud(w8t,t,r,d8t);return AGt(function(t,r){return[0,r,t]},ad(m8t,r,e[1]),e[2])}),bk(m8t,function(t,r){for(var e=0;;){var n=x3t(r);if("number"==typeof n&&Xf===n)return SGt(e);if(nd(t,n))return SGt(e);e=[0,nd(d8t,r),e]}}),bk(y8t,function(t,r){var e=ud(w8t,r,t,function(t){return ad(F8t,0,t)}),n=e[1];return[0,AGt(function(t,r){return[0,r,t]},ad(_8t,t,n),e[2]),n[6]]}),bk(_8t,function(t,r){for(var e=0;;){var n=x3t(r);if("number"==typeof n&&Xf===n)return SGt(e);if(nd(t,n))return SGt(e);e=[0,ad(F8t,0,r),e]}}),bk(F8t,function(t,r){var e=t?t[1]:t;1-L3t(r)&&nd(U3t(r),e);var n=x3t(r);if("number"==typeof n){if(27===n)return nd(b8t[26],r);if(28===n)return nd(b8t[3],r)}if(N3t(r))return nd(s8t[14],r);if(L3t(r))return ad(D8t,r,e);if("number"==typeof n){var a=n+J|0;if(!(9>>0))switch(a){case 0:return nd(b8t[19],r);case 7:return ad(b8t[11],0,r);case 8:return nd(b8t[25],r);case 9:return nd(b8t[21],r)}}return nd(E8t,r)}),bk(E8t,function(t){var r=x3t(t);if("number"==typeof r)switch(r){case 0:return nd(b8t[7],t);case 8:return nd(b8t[15],t);case 19:return nd(b8t[22],t);case 20:return nd(b8t[23],t);case 22:return nd(b8t[24],t);case 23:return nd(b8t[4],t);case 24:return nd(b8t[26],t);case 25:return nd(b8t[5],t);case 26:return nd(b8t[6],t);case 32:return nd(b8t[8],t);case 35:return nd(b8t[9],t);case 37:return nd(b8t[14],t);case 39:return nd(b8t[1],t);case 59:return nd(b8t[10],t);case 110:return M3t(t),[0,T3t(t),1];case 16:case 43:return nd(b8t[2],t);case 1:case 5:case 7:case 9:case 10:case 11:case 12:case 17:case 18:case 33:case 34:case 36:case 38:case 41:case 42:case 49:case 80:case 83:return M3t(t),J3t(t),nd(E8t,t)}if(N3t(t)){var e=nd(s8t[14],t);return X3t(t,e[1]),e}if("number"==typeof r&&28===r&&6===S3t(1,t)){var n=g3t(1,t);return Q4t(t,[0,h2t(T3t(t),n),90]),nd(b8t[17],t)}return C3t(t)?nd(b8t[20],t):L3t(t)?(M3t(t),J3t(t),nd(b8t[17],t)):nd(b8t[17],t)}),bk(S8t,function(t){var r=nd(v8t[1],t),e=x3t(t);return"number"==typeof e&&9===e?ad(v8t[8],t,[0,r,0]):r}),bk(g8t,function(t){var r=nd(v8t[2],t),e=x3t(t);if("number"==typeof e&&9===e){var n=[0,ad(o8t[1],t,r),0];return[0,ad(v8t[8],t,n)]}return r}),bk(x8t,function(t,r,e){var n=e[2],a=e[1];if(Kw(n,LJt)){if(Kw(n,RJt))return Kw(n,MJt)?m3t(n)?B3t(r,[0,a,50]):F3t(n)?Q4t(r,[0,a,[1,n]]):t&&_3t(n)?B3t(r,[0,a,t[1]]):0:r[17]?Q4t(r,[0,a,3]):B3t(r,[0,a,50]);if(r[6])return B3t(r,[0,a,50]);var u=r[14];return u?Q4t(r,[0,a,[1,n]]):u}var i=r[18];return i?Q4t(r,[0,a,3]):i}),bk(T8t,function(t,r){var e=Z3t(r);return ud(x8t,t,r,e),e}),bk(A8t,function(t,r,e){var n=r?r[1]:r;return r8t(0,function(t){var r=1-n,a=ad(T8t,[0,e],t),u=r?82===x3t(t)?1:0:r;return u&&(1-K4t(t)&&R3t(t,13),V3t(t,82)),[0,a,nd(f8t[11],t),u]},t)}),bk(O8t,function(t){var r=T3t(t);V3t(t,0);var e=ad(_8t,function(t){return 1===t?1:0},t),n=T3t(t);return V3t(t,1),[0,h2t(r,n),[0,e]]}),bk(I8t,function(t){var r=T3t(t);V3t(t,0);var e=ad(y8t,function(t){return 1===t?1:0},t),n=T3t(t);V3t(t,1);var a=e[2],u=[0,e[1]];return[0,h2t(r,n),u,a]}),ud(MYt,qJt,c8t,[0,k8t,E8t,F8t,_8t,y8t,m8t,S8t,g8t,C8t,N8t,L8t,R8t,T8t,A8t,x8t,O8t,I8t,B8t,X8t,J8t,M8t,D8t,U8t,j8t]);var G8t=[0,0],q8t=yw,Y8t=mw,V8t=function(t){return _w(HGt(t))},W8t=function(t){return hw(HGt(t))},H8t=function(t,r,e){try{var n=new RegExp(r.toString(),e.toString())}catch(r){G8t[1]=[0,[0,t,23],G8t[1]];n=new RegExp(so,e.toString())}return n},z8t=function(t){function r(t,r){return W8t(gGt(t,r))}function e(t,r){return r?nd(t,r[1]):mVt}function n(t,r){return 0===r[0]?mVt:nd(t,r[1])}function a(t){return V8t([0,[0,Wht,t[1]],[0,[0,Vht,t[2]],0]])}function u(t){var r=t[1];if(r)var e=r[1],n="number"==typeof e?Cn:e[1].toString();else n=mVt;var u=[0,[0,Ght,a(t[3])],0];return V8t([0,[0,Yht,n],[0,[0,qht,a(t[2])],u]])}function i(r,e,n){if(t[1])var a=[0,[0,jht,r.toString()],0],i=[0,[0,Bht,u(e)],a],c=[0,[0,Xht,W8t([0,e[2][3],[0,e[3][3],0]])],i];else c=[0,[0,Jht,r.toString()],0];return V8t(EGt(c,n))}function c(t){return r(d,t)}function f(t){var e=t[2];switch(e[2]){case 0:var n=gkt;break;case 1:n=xkt;break;default:n=Tkt}var a=[0,[0,Akt,n.toString()],0],u=[0,[0,Okt,r(q,e[1])],a];return i(Ikt,t[1],u)}function s(t){var n=t[2],a=[0,[0,cpt,r(N,n[3])],0],u=[0,[0,fpt,W(0,n[4])],a],c=[0,[0,spt,e(rt,n[2])],u],f=[0,[0,opt,F(n[1])],c];return i(vpt,t[1],f)}function o(t,n){var a=n[2],u=a[4];if(u)var c=u[1][2],f=[0,c[1]],s=c[2];else f=0,s=0;var o=[0,[0,Fbt,r(P,a[6])],0],v=[0,[0,Ebt,r(D,a[5])],o],l=[0,[0,Sbt,e(nt,s)],v],b=[0,[0,gbt,e(S,f)],l],p=[0,[0,xbt,e(rt,a[3])],b],k=a[2],w=[0,[0,Nbt,r(C,k[2][1])],0],d=[0,[0,Tbt,i(Lbt,k[1],w)],p],h=[0,[0,Abt,e(F,a[1])],d];return i(t,n[1],h)}function v(t,r){var n=r[2],a=t?pbt:kbt,u=[0,[0,wbt,e(z,n[4])],0],c=[0,[0,dbt,e(z,n[3])],u],f=[0,[0,hbt,e(rt,n[2])],c],s=[0,[0,mbt,F(n[1])],f];return i(a,r[1],s)}function l(t){var r=t[2],n=[0,[0,obt,z(r[3])],0],a=[0,[0,vbt,e(rt,r[2])],n],u=[0,[0,lbt,F(r[1])],a];return i(bbt,t[1],u)}function b(t){var n=t[2],a=n[4],u=W8t(a?[0,N(a[1]),0]:0),c=[0,[0,qlt,r(N,n[5])],0],f=[0,[0,Vlt,u],[0,[0,Ylt,r(D,n[6])],c]],s=[0,[0,Wlt,W(0,n[3])],f],o=[0,[0,Hlt,e(rt,n[2])],s],v=[0,[0,zlt,F(n[1])],o];return i(Klt,t[1],v)}function p(t){var r=t[2],n=h2t(r[1][1],r[2][1]),a=[0,[0,Xlt,e(dt,r[3])],0],u=[0,[0,Jlt,x(n,[0,r[1],[1,r[2]],0])],a];return i(Glt,t[1],u)}function k(t){var r=t[2],e=r[2],n=0===e[0]?r[1][1]:e[1][1],a=h2t(r[1][1],n),u=[0,[0,jlt,x(a,[0,r[1],r[2],0])],0];return i(Blt,t[1],u)}function w(t){var r=[0,[0,Mlt,c(t[2][1])],0];return i(Ult,t[1],r)}function d(t){var n=t[2],a=t[1];if("number"==typeof n)return i(0===n?Rft:Mft,a,0);switch(n[0]){case 0:return w([0,a,n[1]]);case 1:return i(jft,a,[0,[0,Uft,e(F,n[1][1])],0]);case 2:return o(ybt,[0,a,n[1]]);case 3:return i(Xft,a,[0,[0,Bft,e(F,n[1][1])],0]);case 4:return b([0,a,n[1]]);case 5:var u=n[1],c=u[3];if(c){var h=c[1];if(0!==h[0]&&!h[2])return i(Gft,a,[0,[0,Jft,e(J,u[4])],0])}var m=u[2];if(m){var y=m[1];switch(y[0]){case 0:var _=k(y[1]);break;case 1:_=p(y[1]);break;case 2:_=b(y[1]);break;case 3:_=z(y[1]);break;case 4:_=l(y[1]);break;case 5:_=v(1,y[1]);break;default:_=s(y[1])}var E=_}else E=mVt;var g=[0,[0,qft,e(J,u[4])],0],x=[0,[0,Vft,E],[0,[0,Yft,I(u[3])],g]],P=u[1];return i(Hft,a,[0,[0,Wft,!!(P?1:P)],x]);case 6:return p([0,a,n[1]]);case 7:var D=n[1],C=[0,[0,Qlt,r(N,D[3])],0],M=[0,[0,$lt,W(0,D[4])],C],U=[0,[0,Zlt,e(rt,D[2])],M];return i(rbt,a,[0,[0,tbt,F(D[1])],U]);case 8:var j=n[1],B=j[1],X=0===B[0]?F(B[1]):J(B[1]),G=0===j[3][0]?"CommonJS":"ES";return i($ft,a,[0,[0,Qft,X],[0,[0,Kft,w(j[2])],[0,[0,zft,G],0]]]);case 9:return i(tst,a,[0,[0,Zft,tt(n[1])],0]);case 10:var q=n[1],Y=[0,[0,ibt,z(q[3])],0],V=[0,[0,cbt,e(rt,q[2])],Y];return i(sbt,a,[0,[0,fbt,F(q[1])],V]);case 11:return v(1,[0,a,n[1]]);case 12:return k([0,a,n[1]]);case 13:var H=n[1],K=[0,[0,rst,S(H[2])],0];return i(nst,a,[0,[0,est,d(H[1])],K]);case 14:var Q=n[1][2],$=0===Q[0]?d(Q[1]):S(Q[1]);return i(ist,a,[0,[0,ust,$],[0,[0,ast,O(1).toString()],0]]);case 15:var Z=n[1],et=Z[2];if(et){var nt=et[1];if(0!==nt[0]&&!nt[2]){var at=[0,[0,cst,O(Z[4]).toString()],0];return i(sst,a,[0,[0,fst,e(J,Z[3])],at])}}var ut=[0,[0,ost,O(Z[4]).toString()],0],it=[0,[0,vst,e(J,Z[3])],ut],ct=[0,[0,lst,I(Z[2])],it];return i(pst,a,[0,[0,bst,e(d,Z[1])],ct]);case 16:var ft=n[1],st=[0,[0,kst,e(q8t,ft[2])],0];return i(dst,a,[0,[0,wst,S(ft[1])],st]);case 17:var ot=n[1],vt=[0,[0,hst,d(ot[4])],0],lt=[0,[0,mst,e(S,ot[3])],vt],bt=[0,[0,yst,e(S,ot[2])],lt];return i(Fst,a,[0,[0,_st,e(function(t){return 0===t[0]?f(t[1]):S(t[1])},ot[1])],bt]);case 18:var pt=n[1],kt=pt[1],wt=0===kt[0]?f(kt[1]):L(kt[1]),ht=[0,[0,Est,!!pt[4]],0],mt=[0,[0,Sst,d(pt[3])],ht];return i(Tst,a,[0,[0,xst,wt],[0,[0,gst,S(pt[2])],mt]]);case 19:var yt=n[1],_t=yt[4]?Ast:Ost,Ft=yt[1],Et=0===Ft[0]?f(Ft[1]):L(Ft[1]),St=[0,[0,Ist,d(yt[3])],0];return i(_t,a,[0,[0,Dst,Et],[0,[0,Pst,S(yt[2])],St]]);case 20:var gt=n[1],xt=gt[3],Tt=0===xt[0]?w(xt[1]):S(xt[1]),At=gt[8],Ot=0===At[0]?0:[0,At[1]],It=[0,[0,rlt,e(rt,gt[9])],0],Pt=[0,[0,elt,e(tt,Ot)],It],Dt=[0,[0,nlt,!!gt[7]],Pt],Ct=[0,[0,alt,e(dt,gt[6])],Dt],Nt=[0,[0,clt,Tt],[0,[0,ilt,!!gt[4]],[0,[0,ult,!!gt[5]],Ct]]],Lt=[0,[0,flt,R(gt[2])],Nt];return i(olt,a,[0,[0,slt,e(F,gt[1])],Lt]);case 21:var Rt=n[1],Mt=[0,[0,Cst,e(d,Rt[3])],0],Ut=[0,[0,Nst,d(Rt[2])],Mt];return i(Rst,a,[0,[0,Lst,S(Rt[1])],Ut]);case 22:var jt=n[1],Bt=jt[4];if(Bt){var Xt=Bt[1];if(0===Xt[0])var Jt=gGt(function(t){var r=t[1],e=t[3],n=t[2],a=n?h2t(e[1],n[1][1]):e[1],u=n?n[1]:e;if(r)switch(r[1]){case 0:var c=kr,f=1;break;case 1:c=gs,f=1;break;default:f=0}else f=0;if(!f)c=mVt;var s=[0,[0,Fht,F(u)],[0,[0,_ht,c],0]];return i(Sht,a,[0,[0,Eht,F(e)],s])},Xt[1]);else{var Gt=Xt[1],qt=[0,[0,mht,F(Gt[2])],0];Jt=[0,i(yht,Gt[1],qt),0]}var Yt=Jt}else Yt=Bt;var Vt=jt[3];if(Vt)var Wt=Vt[1],Ht=[0,[0,dht,F(Wt)],0],zt=[0,i(hht,Wt[1],Ht),Yt];else zt=Yt;switch(jt[1]){case 0:var Kt=Mst;break;case 1:Kt=Ust;break;default:Kt=jst}var Qt=[0,[0,Bst,Kt.toString()],0],$t=[0,[0,Xst,J(jt[2])],Qt];return i(Gst,a,[0,[0,Jst,W8t(zt)],$t]);case 23:return s([0,a,n[1]]);case 24:var Zt=n[1],tr=[0,[0,qst,d(Zt[2])],0];return i(Vst,a,[0,[0,Yst,F(Zt[1])],tr]);case 25:return i(Hst,a,[0,[0,Wst,e(S,n[1][1])],0]);case 26:var rr=n[1],er=[0,[0,zst,r(T,rr[2])],0];return i(Qst,a,[0,[0,Kst,S(rr[1])],er]);case 27:return i(Zst,a,[0,[0,$st,S(n[1][1])],0]);case 28:var nr=n[1],ar=[0,[0,tot,e(w,nr[3])],0],ur=[0,[0,rot,e(A,nr[2])],ar];return i(not,a,[0,[0,eot,w(nr[1])],ur]);case 29:return l([0,a,n[1]]);case 30:return v(0,[0,a,n[1]]);case 31:return f([0,a,n[1]]);case 32:var ir=n[1],cr=[0,[0,aot,d(ir[2])],0];return i(iot,a,[0,[0,uot,S(ir[1])],cr]);default:var fr=n[1],sr=[0,[0,cot,d(fr[2])],0];return i(sot,a,[0,[0,fot,S(fr[1])],sr])}}function h(t){var n=t[2],a=[0,[0,Ldt,e(ct,n[2])],0],u=[0,[0,Rdt,r(st,n[3])],a],c=[0,[0,Mdt,i(Gdt,n[1],0)],u];return i(Udt,t[1],c)}function m(t){var n=t[2],a=[0,[0,Pdt,r(st,n[3])],0],u=[0,[0,Ddt,e(it,n[2])],a],c=n[1],f=c[2],s=[0,[0,jdt,!!f[2]],0],o=[0,[0,Bdt,r(ut,f[3])],s],v=[0,[0,Xdt,bt(f[1])],o],l=[0,[0,Cdt,i(Jdt,c[1],v)],u];return i(Ndt,t[1],l)}function y(t){var e=t[2],n=[0,[0,pkt,r(S,e[2])],0],a=[0,[0,kkt,r(G,e[1])],n];return i(wkt,t[1],a)}function _(t){var r=t[2],e=r[2],n=r[1],a=t[1];if("number"==typeof n)var u=mVt;else switch(n[0]){case 0:u=n[1].toString();break;case 1:u=!!n[1];break;case 2:u=n[1];break;default:var c=n[1];u=H8t(a,c[1],c[2])}if("number"==typeof n)var f=0;else if(3===n[0]){var s=n[1],o=[0,[0,ukt,V8t([0,[0,akt,s[1].toString()],[0,[0,nkt,s[2].toString()],0]])],0],v=[0,[0,ckt,u],[0,[0,ikt,e.toString()],o]];f=1}else f=0;if(!f)v=[0,[0,skt,u],[0,[0,fkt,e.toString()],0]];return i(okt,a,v)}function F(t){return i(Slt,t[1],[0,[0,Elt,t[2].toString()],[0,[0,Flt,mVt],[0,[0,_lt,!1],0]]])}function E(t){var r=t[2],n=r[3],a=0===n[0]?w(n[1]):S(n[1]),u=r[8],c=0===u[0]?0:[0,u[1]],f=[0,[0,vlt,e(rt,r[9])],0],s=[0,[0,llt,e(tt,c)],f],o=[0,[0,blt,!!r[7]],s],v=[0,[0,plt,e(dt,r[6])],o],l=[0,[0,dlt,a],[0,[0,wlt,!!r[4]],[0,[0,klt,!!r[5]],v]]],b=[0,[0,hlt,R(r[2])],l],p=[0,[0,mlt,e(F,r[1])],b];return i(ylt,t[1],p)}function S(t){var n=t[2],a=t[1];if("number"==typeof n)return i(0===n?oot:vot,a,0);switch(n[0]){case 0:var u=n[1][1];return i(bot,a,[0,[0,lot,r(function(t){return e(B,t)},u)],0]);case 1:var c=n[1],f=c[3],s=0===f[0]?w(f[1]):S(f[1]),v=c[8],l=0===v[0]?0:[0,v[1]],b=[0,[0,pot,e(rt,c[9])],0],p=[0,[0,kot,e(tt,l)],b],k=[0,[0,wot,!!c[7]],p],d=[0,[0,dot,e(dt,c[6])],k],g=[0,[0,yot,s],[0,[0,mot,!!c[4]],[0,[0,hot,!!c[5]],d]]],x=[0,[0,_ot,R(c[2])],g];return i(Eot,a,[0,[0,Fot,e(F,c[1])],x]);case 2:var T=n[1];switch(T[1]){case 0:var A=Sot;break;case 1:A=got;break;case 2:A=xot;break;case 3:A=Tot;break;case 4:A=Aot;break;case 5:A=Oot;break;case 6:A=Iot;break;case 7:A=Pot;break;case 8:A=Dot;break;case 9:A=Cot;break;case 10:A=Not;break;case 11:A=Lot;break;default:A=Rot}var O=[0,[0,Mot,S(T[3])],0],I=[0,[0,Uot,L(T[2])],O];return i(Bot,a,[0,[0,jot,A.toString()],I]);case 3:var P=n[1],D=[0,[0,Xot,S(P[3])],0],C=[0,[0,Jot,S(P[2])],D];switch(P[1]){case 0:var N=But;break;case 1:N=Xut;break;case 2:N=Jut;break;case 3:N=Gut;break;case 4:N=qut;break;case 5:N=Yut;break;case 6:N=Vut;break;case 7:N=Wut;break;case 8:N=Hut;break;case 9:N=zut;break;case 10:N=Kut;break;case 11:N=Qut;break;case 12:N=$ut;break;case 13:N=Zut;break;case 14:N=tit;break;case 15:N=rit;break;case 16:N=eit;break;case 17:N=nit;break;case 18:N=ait;break;case 19:N=uit;break;case 20:N=iit;break;default:N=cit}return i(qot,a,[0,[0,Got,N.toString()],C]);case 4:return i(Yot,a,ht(n[1]));case 5:return o(_bt,[0,a,n[1]]);case 6:var M=n[1],j=[0,[0,Vot,e(S,M[2])],0];return i(Hot,a,[0,[0,Wot,r(X,M[1])],j]);case 7:var J=n[1],G=[0,[0,zot,S(J[3])],0],q=[0,[0,Kot,S(J[2])],G];return i($ot,a,[0,[0,Qot,S(J[1])],q]);case 8:return E([0,a,n[1]]);case 9:var Y=n[1],V=[0,[0,Zot,e(S,Y[2])],0];return i(rvt,a,[0,[0,tvt,r(X,Y[1])],V]);case 10:return F(n[1]);case 11:var W=n[1],H=[0,[0,evt,r(S,[0,W,0])],0];return i(uvt,a,[0,[0,avt,i(nvt,h2t(a,W[1]),0)],H]);case 12:return m([0,a,n[1]]);case 13:return h([0,a,n[1]]);case 14:return _([0,a,n[1]]);case 15:var z=n[1];switch(z[1]){case 0:var K=ivt;break;case 1:K=cvt;break;default:K=fvt}var Q=[0,[0,svt,S(z[3])],0],$=[0,[0,ovt,S(z[2])],Q];return i(lvt,a,[0,[0,vvt,K.toString()],$]);case 16:return i(bvt,a,mt(n[1]));case 17:var Z=n[1],et=[0,[0,pvt,F(Z[2])],0];return i(wvt,a,[0,[0,kvt,F(Z[1])],et]);case 18:var nt=n[1],ut=[0,[0,dvt,r(B,nt[3])],0],it=[0,[0,hvt,e(at,nt[2])],ut];return i(yvt,a,[0,[0,mvt,S(nt[1])],it]);case 19:return i(Fvt,a,[0,[0,_vt,r(U,n[1][1])],0]);case 20:var ct=n[1],ft=[0,[0,Evt,!!ct[2]],0];return i(Svt,a,dGt(ht(ct[1]),ft));case 21:var st=n[1],ot=[0,[0,gvt,!!st[2]],0];return i(xvt,a,dGt(mt(st[1]),ot));case 22:return i(Avt,a,[0,[0,Tvt,r(S,n[1][1])],0]);case 23:var vt=n[1],lt=[0,[0,Fkt,y(vt[2])],0];return i(Skt,a,[0,[0,Ekt,S(vt[1])],lt]);case 24:return y([0,a,n[1]]);case 25:var bt=n[1],pt=[0,[0,Ovt,tt(bt[2])],0];return i(Pvt,a,[0,[0,Ivt,S(bt[1])],pt]);case 26:var kt=n[1];if(7<=kt[1])return i(Cvt,a,[0,[0,Dvt,S(kt[2])],0]);switch(kt[1]){case 0:var wt=Nvt;break;case 1:wt=Lvt;break;case 2:wt=Rvt;break;case 3:wt=Mvt;break;case 4:wt=Uvt;break;case 5:wt=jvt;break;case 6:wt=Bvt;break;default:wt=vGt(Xvt)}var yt=[0,[0,Gvt,!0],[0,[0,Jvt,S(kt[2])],0]];return i(Yvt,a,[0,[0,qvt,wt.toString()],yt]);case 27:var _t=n[1],Ft=0===_t[1]?Wvt:Vvt,Et=[0,[0,Hvt,!!_t[3]],0],St=[0,[0,zvt,S(_t[2])],Et];return i(Qvt,a,[0,[0,Kvt,Ft.toString()],St]);default:var gt=n[1],xt=[0,[0,$vt,!!gt[2]],0];return i(tlt,a,[0,[0,Zvt,e(S,gt[1])],xt])}}function g(t){var r=[0,[0,glt,F(t[2])],0];return i(xlt,t[1],r)}function x(t,r){var e=[0,[0,Tlt,!!r[3]],0],a=[0,[0,Alt,n(tt,r[2])],e];return i(Ilt,t,[0,[0,Olt,r[1][2].toString()],a])}function T(t){var n=t[2],a=[0,[0,Plt,r(d,n[2])],0],u=[0,[0,Dlt,e(S,n[1])],a];return i(Clt,t[1],u)}function A(t){var r=t[2],n=[0,[0,Nlt,w(r[2])],0],a=[0,[0,Llt,e(L,r[1])],n];return i(Rlt,t[1],a)}function O(t){return 0===t?nbt:ebt}function I(t){if(t){var e=t[1];if(0===e[0])return r(kt,e[1]);var n=e[2];if(n){var a=[0,[0,abt,F(n[1])],0];return W8t([0,i(ubt,e[1],a),0])}return W8t(0)}return W8t(0)}function P(t){var r=[0,[0,Obt,S(t[2][1])],0];return i(Ibt,t[1],r)}function D(t){var r=t[2],n=[0,[0,Pbt,e(nt,r[2])],0],a=[0,[0,Dbt,F(r[1])],n];return i(Cbt,t[1],a)}function C(t){switch(t[0]){case 0:var a=t[1],u=a[2],c=u[2];switch(c[0]){case 0:var f=[0,_(c[1]),0];break;case 1:f=[0,F(c[1]),0];break;case 2:f=[0,g(c[1]),0];break;default:f=[0,S(c[1]),1]}switch(u[1]){case 0:var s=Rbt;break;case 1:s=Mbt;break;case 2:s=Ubt;break;default:s=jbt}var o=[0,[0,Bbt,r(P,u[5])],0],v=[0,[0,Gbt,s.toString()],[0,[0,Jbt,!!u[4]],[0,[0,Xbt,!!f[2]],o]]],l=[0,[0,qbt,E(u[3])],v];return i(Vbt,a[1],[0,[0,Ybt,f[1]],l]);case 1:var b=t[1],p=b[2],k=p[1];switch(k[0]){case 0:var w=[0,_(k[1]),0];break;case 1:w=[0,F(k[1]),0];break;case 2:w=vGt(Zbt);break;default:w=[0,S(k[1]),1]}var d=[0,[0,tpt,e(Y,p[5])],0],h=[0,[0,ept,!!w[2]],[0,[0,rpt,!!p[4]],d]],m=[0,[0,npt,n(tt,p[3])],h],y=[0,[0,apt,e(S,p[2])],m];return i(ipt,b[1],[0,[0,upt,w[1]],y]);default:var x=t[1],T=x[2],A=T[1],O=[0,[0,Wbt,e(Y,T[5])],0],I=[0,[0,Hbt,!!T[4]],O],D=[0,[0,zbt,n(tt,T[3])],I],C=[0,[0,Kbt,e(S,T[2])],D],N=[0,[0,Qbt,F(A[2])],C];return i($bt,x[1],N)}}function N(t){var r=t[2],n=r[1],a=0===n[0]?F(n[1]):Z(n[1]),u=[0,[0,bpt,a],[0,[0,lpt,e(nt,r[2])],0]];return i(ppt,t[1],u)}function L(t){var a=t[2],u=t[1];switch(a[0]){case 0:var c=a[1],f=[0,[0,kpt,n(tt,c[2])],0];return i(dpt,u,[0,[0,wpt,r(j,c[1])],f]);case 1:var s=a[1],o=[0,[0,hpt,n(tt,s[2])],0],v=s[1];return i(ypt,u,[0,[0,mpt,r(function(t){return e(M,t)},v)],o]);case 2:var l=a[1],b=[0,[0,_pt,S(l[2])],0];return i(Ept,u,[0,[0,Fpt,L(l[1])],b]);case 3:return x(u,a[1]);default:return S(a[1])}}function R(t){var e=t[2],n=e[2],a=e[1];if(n){var u=n[1],c=[0,[0,Spt,L(u[2][1])],0],f=i(gpt,u[1],c);return W8t(SGt([0,f,SGt(gGt(L,a))]))}return r(L,a)}function M(t){if(0===t[0])return L(t[1]);var r=t[1],e=[0,[0,xpt,L(r[2][1])],0];return i(Tpt,r[1],e)}function U(t){if(0===t[0]){var r=t[1],e=r[2];switch(e[0]){case 0:var n=e[3],a=S(e[2]),u=[0,e[1],a,Apt,0,n];break;case 1:var c=e[2],f=E([0,c[1],c[2]]);u=[0,e[1],f,Opt,1,0];break;case 2:var s=e[2],o=E([0,s[1],s[2]]);u=[0,e[1],o,Ipt,0,0];break;default:var v=e[2],l=E([0,v[1],v[2]]);u=[0,e[1],l,Ppt,0,0]}var b=u[1];switch(b[0]){case 0:var p=[0,_(b[1]),0];break;case 1:p=[0,F(b[1]),0];break;case 2:p=vGt(Dpt);break;default:p=[0,S(b[1]),1]}return i(jpt,r[1],[0,[0,Upt,p[1]],[0,[0,Mpt,u[2]],[0,[0,Rpt,u[3].toString()],[0,[0,Lpt,!!u[4]],[0,[0,Npt,!!u[5]],[0,[0,Cpt,!!p[2]],0]]]]]])}var k=t[1],w=[0,[0,Bpt,S(k[2][1])],0];return i(Xpt,k[1],w)}function j(t){if(0===t[0]){var r=t[1],e=r[2],n=e[1];switch(n[0]){case 0:var a=[0,_(n[1]),0];break;case 1:a=[0,F(n[1]),0];break;default:a=[0,S(n[1]),1]}var u=[0,[0,Ypt,ju],[0,[0,qpt,!1],[0,[0,Gpt,!!e[3]],[0,[0,Jpt,!!a[2]],0]]]],c=[0,[0,Vpt,L(e[2])],u];return i(Hpt,r[1],[0,[0,Wpt,a[1]],c])}var f=t[1],s=[0,[0,zpt,L(f[2][1])],0];return i(Kpt,f[1],s)}function B(t){if(0===t[0])return S(t[1]);var r=t[1],e=[0,[0,Qpt,S(r[2][1])],0];return i($pt,r[1],e)}function X(t){var r=t[2],e=[0,[0,Zpt,!!r[3]],0],n=[0,[0,tkt,S(r[2])],e],a=[0,[0,rkt,L(r[1])],n];return i(ekt,t[1],a)}function J(t){var r=t[2];return i(bkt,t[1],[0,[0,lkt,r[1].toString()],[0,[0,vkt,r[2].toString()],0]])}function G(t){var r=t[2],e=V8t([0,[0,hkt,r[1][1].toString()],[0,[0,dkt,r[1][2].toString()],0]]);return i(_kt,t[1],[0,[0,ykt,e],[0,[0,mkt,!!r[2]],0]])}function q(t){var r=t[2],n=[0,[0,Pkt,e(S,r[2])],0],a=[0,[0,Dkt,L(r[1])],n];return i(Ckt,t[1],a)}function Y(t){var r=0===t[2]?"plus":ic;return i(Lkt,t[1],[0,[0,Nkt,r],0])}function V(t){var r=t[2],n=r[1],a=0===n[0]?F(n[1]):Z(n[1]),u=[0,[0,Kwt,a],[0,[0,zwt,e(nt,r[2])],0]];return i(Qwt,t[1],u)}function W(t,r){var n=r[2],a=n[3],u=AGt(function(t,r){var n=t[4],a=t[3],u=t[2],c=t[1];switch(r[0]){case 0:var f=r[1],s=f[2],o=s[2],v=s[1];switch(v[0]){case 0:var l=_(v[1]);break;case 1:l=F(v[1]);break;case 2:l=vGt(owt);break;default:l=vGt(vwt)}switch(o[0]){case 0:var b=[0,z(o[1]),lwt];break;case 1:var p=o[1];b=[0,H([0,p[1],p[2]]),bwt];break;default:var k=o[1];b=[0,H([0,k[1],k[2]]),pwt]}var w=[0,[0,kwt,b[2].toString()],0],d=[0,[0,wwt,e(Y,s[7])],w];return[0,[0,i(Ewt,f[1],[0,[0,Fwt,l],[0,[0,_wt,b[1]],[0,[0,ywt,!!s[6]],[0,[0,mwt,!!s[3]],[0,[0,hwt,!!s[4]],[0,[0,dwt,!!s[5]],d]]]]]]),c],u,a,n];case 1:var h=r[1],m=[0,[0,Swt,z(h[2][1])],0];return[0,[0,i(gwt,h[1],m),c],u,a,n];case 2:var y=r[1],E=y[2],S=[0,[0,xwt,e(Y,E[5])],0],g=[0,[0,Twt,!!E[4]],S],x=[0,[0,Awt,z(E[3])],g],T=[0,[0,Owt,z(E[2])],x],A=[0,[0,Iwt,e(F,E[1])],T];return[0,c,[0,i(Pwt,y[1],A),u],a,n];case 3:var O=r[1],I=O[2],P=[0,[0,Dwt,!!I[2]],0],D=[0,[0,Cwt,H(I[1])],P];return[0,c,u,[0,i(Nwt,O[1],D),a],n];default:var C=r[1],N=C[2],L=[0,[0,Lwt,z(N[2])],0],R=[0,[0,Uwt,!!N[3]],[0,[0,Mwt,!!N[4]],[0,[0,Rwt,!!N[5]],L]]],M=[0,[0,jwt,F(N[1])],R];return[0,c,u,a,[0,i(Bwt,C[1],M),n]]}},ewt,a),c=[0,[0,nwt,W8t(SGt(u[4]))],0],f=[0,[0,awt,W8t(SGt(u[3]))],c],s=[0,[0,uwt,W8t(SGt(u[2]))],f],o=[0,[0,iwt,W8t(SGt(u[1]))],s],v=[0,[0,cwt,!!n[1]],o],l=t?[0,[0,fwt,!!n[2]],v]:v;return i(swt,r[1],l)}function H(t){var n=t[2],a=n[2][2],u=[0,[0,Wkt,e(rt,n[1])],0],c=[0,[0,Hkt,e($,a[2])],u],f=[0,[0,zkt,z(n[3])],c],s=[0,[0,Kkt,r(Q,a[1])],f];return i(Qkt,t[1],s)}function z(t){var e=t[2],n=t[1];if("number"==typeof e)switch(e){case 0:return i(Mkt,n,0);case 1:return i(Ukt,n,0);case 2:return i(jkt,n,0);case 3:return i(Bkt,n,0);case 4:return i(Xkt,n,0);case 5:return i(Jkt,n,0);case 6:return i(Gkt,n,0);case 7:return i(qkt,n,0);default:return i(ddt,n,0)}else switch(e[0]){case 0:return i(Vkt,n,[0,[0,Ykt,z(e[1])],0]);case 1:return H([0,n,e[1]]);case 2:return W(1,[0,n,e[1]]);case 3:var a=e[1],u=[0,[0,Xwt,W(0,a[1])],0];return i(Gwt,n,[0,[0,Jwt,r(N,a[2])],u]);case 4:return i(Ywt,n,[0,[0,qwt,z(e[1])],0]);case 5:return V([0,n,e[1]]);case 6:return i(Zwt,n,[0,[0,$wt,r(z,[0,e[1],[0,e[2],e[3]]])],0]);case 7:return i(rdt,n,[0,[0,tdt,r(z,[0,e[1],[0,e[2],e[3]]])],0]);case 8:return i(ndt,n,[0,[0,edt,z(e[1])],0]);case 9:return i(udt,n,[0,[0,adt,r(z,e[1])],0]);case 10:var c=e[1];return i(fdt,n,[0,[0,cdt,c[1].toString()],[0,[0,idt,c[2].toString()],0]]);case 11:var f=e[1];return i(vdt,n,[0,[0,odt,f[1]],[0,[0,sdt,f[2].toString()],0]]);default:var s=e[1];return i(wdt,n,[0,[0,kdt,!!s],[0,[0,pdt,(s?ldt:bdt).toString()],0]])}}function K(t){if(0===t[0])return z(t[1]);var r=t[1];return V([0,r,[0,[0,[0,r,Rkt]],0]])}function Q(t){var r=t[2],n=[0,[0,$kt,!!r[3]],0],a=[0,[0,Zkt,z(r[2])],n],u=[0,[0,twt,e(F,r[1])],a];return i(rwt,t[1],u)}function $(t){return Q(t[2][1])}function Z(t){var r=t[2],e=r[1],n=0===e[0]?F(e[1]):Z(e[1]),a=[0,[0,Wwt,n],[0,[0,Vwt,F(r[2])],0]];return i(Hwt,t[1],a)}function tt(t){var r=[0,[0,hdt,z(t[2])],0];return i(mdt,t[1],r)}function rt(t){var e=[0,[0,ydt,r(et,t[2])],0];return i(_dt,t[1],e)}function et(t){var r=t[2],a=[0,[0,Fdt,e(z,r[4])],0],u=[0,[0,Edt,e(Y,r[3])],a],c=[0,[0,Sdt,n(tt,r[2])],u];return i(xdt,t[1],[0,[0,gdt,r[1][2].toString()],c])}function nt(t){var e=[0,[0,Tdt,r(z,t[2])],0];return i(Adt,t[1],e)}function at(t){var e=[0,[0,Odt,r(K,t[2])],0];return i(Idt,t[1],e)}function ut(t){if(0===t[0]){var r=t[1],n=r[2],a=n[1],u=0===a[0]?ot(a[1]):vt(a[1]),c=[0,[0,Kdt,u],[0,[0,zdt,e(pt,n[2])],0]];return i(Qdt,r[1],c)}var f=t[1],s=[0,[0,$dt,S(f[2][1])],0];return i(Zdt,f[1],s)}function it(t){var r=[0,[0,qdt,bt(t[2][1])],0];return i(Ydt,t[1],r)}function ct(t){return i(Vdt,t,0)}function ft(t){var r=t[2][1],e=0===r[0]?S(r[1]):i(tht,r[1],0);return i(eht,t[1],[0,[0,rht,e],0])}function st(t){var r=t[2],e=t[1];switch(r[0]){case 0:return m([0,e,r[1]]);case 1:return h([0,e,r[1]]);case 2:return ft([0,e,r[1]]);case 3:return i(Hdt,e,[0,[0,Wdt,S(r[1])],0]);default:var n=r[1];return i(uht,e,[0,[0,aht,n[1].toString()],[0,[0,nht,n[2].toString()],0]])}}function ot(t){return i(bht,t[1],[0,[0,lht,t[2][1].toString()],0])}function vt(t){var r=t[2],e=[0,[0,sht,ot(r[2])],0],n=[0,[0,oht,ot(r[1])],e];return i(vht,t[1],n)}function lt(t){var r=t[2],e=r[1],n=0===e[0]?ot(e[1]):lt(e[1]),a=[0,[0,cht,n],[0,[0,iht,ot(r[2])],0]];return i(fht,t[1],a)}function bt(t){switch(t[0]){case 0:return ot(t[1]);case 1:return vt(t[1]);default:return lt(t[1])}}function pt(t){return 0===t[0]?_([0,t[1],t[2]]):ft([0,t[1],t[2]])}function kt(t){var r=t[2],e=r[2],n=F(e?e[1]:r[1]),a=[0,[0,kht,F(r[1])],[0,[0,pht,n],0]];return i(wht,t[1],a)}function wt(t){var r=t[2],e=0===r[0]?[0,ght,r[1]]:[0,xht,r[1]];return i(e[1],t[1],[0,[0,Tht,e[2].toString()],0])}function dt(t){var r=t[2];if(r)var e=Oht,n=[0,[0,Aht,S(r[1])],0];else e=Iht,n=0;return i(e,t[1],n)}function ht(t){var n=[0,[0,Pht,r(B,t[3])],0],a=[0,[0,Dht,e(at,t[2])],n];return[0,[0,Cht,S(t[1])],a]}function mt(t){var r=t[2];switch(r[0]){case 0:var e=F(r[1]);break;case 1:e=g(r[1]);break;default:e=S(r[1])}var n=[0,[0,Lht,e],[0,[0,Nht,!!t[3]],0]];return[0,[0,Rht,S(t[1])],n]}return[0,function(e){var n=c(e[2]),a=t[2]?[0,[0,Cft,n],[0,[0,Dft,r(wt,e[3])],0]]:[0,[0,Nft,n],0];return i(Lft,e[1],a)},S,function(t){return r(function(t){var r=t[2];if("number"==typeof r){var e=r;if(50<=e)switch(e){case 50:var n=ict;break;case 51:n=cct;break;case 52:n=fct;break;case 53:n=sct;break;case 54:n=oct;break;case 55:n=vct;break;case 56:n=wGt(bct,lct);break;case 57:n=wGt(kct,pct);break;case 58:n=wGt(dct,wct);break;case 59:n=hct;break;case 60:n=mct;break;case 61:n=yct;break;case 62:n=_ct;break;case 63:n=Fct;break;case 64:n=Ect;break;case 65:n=Sct;break;case 66:n=gct;break;case 67:n=xct;break;case 68:n=Tct;break;case 69:n=Act;break;case 70:n=Oct;break;case 71:n=Ict;break;case 72:n=Pct;break;case 73:n=Dct;break;case 74:n=Cct;break;case 75:n=Nct;break;case 76:n=Lct;break;case 77:n=wGt(Mct,Rct);break;case 78:n=Uct;break;case 79:n=jct;break;case 80:n=Bct;break;case 81:n=Xct;break;case 82:n=Jct;break;case 83:n=Gct;break;case 84:n=qct;break;case 85:n=Yct;break;case 86:n=Vct;break;case 87:n=Wct;break;case 88:n=Hct;break;case 89:n=zct;break;case 90:n=wGt(Qct,Kct);break;case 91:n=$ct;break;case 92:n=Zct;break;case 93:n=tft;break;case 94:n=rft;break;case 95:n=eft;break;case 96:n=nft;break;case 97:n=aft;break;default:n=uft}else switch(e){case 0:n=sit;break;case 1:n=oit;break;case 2:n=vit;break;case 3:n=lit;break;case 4:n=bit;break;case 5:n=pit;break;case 6:n=kit;break;case 7:n=wit;break;case 8:n=dit;break;case 9:n=hit;break;case 10:n=mit;break;case 11:n=yit;break;case 12:n=_it;break;case 13:n=Fit;break;case 14:n=Eit;break;case 15:n=Sit;break;case 16:n=git;break;case 17:n=xit;break;case 18:n=Tit;break;case 19:n=Ait;break;case 20:n=Oit;break;case 21:n=Iit;break;case 22:n=Pit;break;case 23:n=Dit;break;case 24:n=Cit;break;case 25:n=Nit;break;case 26:n=Lit;break;case 27:n=Rit;break;case 28:n=Mit;break;case 29:n=wGt(jit,Uit);break;case 30:n=Bit;break;case 31:n=Xit;break;case 32:n=Jit;break;case 33:n=Git;break;case 34:n=qit;break;case 35:n=Yit;break;case 36:n=Vit;break;case 37:n=Wit;break;case 38:n=Hit;break;case 39:n=zit;break;case 40:n=Kit;break;case 41:n=Qit;break;case 42:n=$it;break;case 43:n=Zit;break;case 44:n=tct;break;case 45:n=rct;break;case 46:n=ect;break;case 47:n=nct;break;case 48:n=act;break;default:n=uct}}else switch(r[0]){case 0:n=wGt(ift,r[1]);break;case 1:n=wGt(cft,r[1]);break;case 2:var a=r[2],i=r[1];n=ad(Uqt(fft),i,a);break;case 3:n=wGt(oft,wGt(r[1],sft));break;case 4:n=wGt(lft,wGt(r[1],vft));break;case 5:var c=wGt(pft,wGt(r[2],bft));n=wGt(r[1],c);break;case 6:n=wGt(kft,r[1]);break;case 7:n=r[1]?wGt(dft,wft):wGt(mft,hft);break;case 8:var f=r[1];n=nd(Uqt(yft),f);break;case 9:n=wGt(Fft,wGt(r[1],_ft));break;case 10:var s=r[1],o=r[2]?Eft:Sft,v=r[3]?wGt(gft,s):s;n=wGt(Aft,wGt(o,wGt(Tft,wGt(v,xft))));break;default:n=wGt(Ift,wGt(r[1],Oft))}var l=[0,[0,Mht,n.toString()],0];return V8t([0,[0,Uht,u(t[1])],l])},t)}]}([0,1,1]),K8t=function(t){function r(r){var e=r[2],n=r[1],a=A2t(e),u=[0,[0,YJt,nd(t[1],a)],0],i=[0,nd(t[5],n[3][3]),0],c=[0,nd(t[5],n[2][3]),i],f=[0,[0,VJt,nd(t[4],c)],u],s=[0,[0,WJt,nd(t[5],n[3][2])],0],o=[0,[0,HJt,nd(t[5],n[3][1])],s],v=[0,[0,zJt,nd(t[3],o)],0],l=[0,[0,KJt,nd(t[5],n[2][2])],0],b=[0,[0,QJt,nd(t[5],n[2][1])],l],p=[0,[0,$Jt,nd(t[3],b)],v],k=[0,[0,ZJt,nd(t[3],p)],f];switch(r[3]){case 0:var w=tGt;break;case 1:w=rGt;break;case 2:w=eGt;break;case 3:w=nGt;break;case 4:w=aGt;break;default:w=uGt}var d=[0,[0,iGt,nd(t[1],w)],k],h=T2t(e),m=[0,[0,cGt,nd(t[1],h)],d];return nd(t[3],m)}return[0,r,function(e){var n=SGt(xGt(r,e));return nd(t[4],n)}]}([0,q8t,Y8t,V8t,W8t,function(t){return t},mVt,H8t]),Q8t=function(t,r){var e=jk(r,void 0)?{}:r,n=e.esproposal_decorators,a=Kk(t),u=yVt(n)?[0,_d[1],_d[2],0|n,_d[4],_d[5],_d[6],_d[7],_d[8]]:_d,i=e.esproposal_class_instance_fields,c=yVt(i)?[0,0|i,u[2],u[3],u[4],u[5],u[6],u[7],u[8]]:u,f=e.esproposal_class_static_fields,s=yVt(f)?[0,c[1],0|f,c[3],c[4],c[5],c[6],c[7],c[8]]:c,o=e.esproposal_export_star_as,v=yVt(o)?[0,s[1],s[2],s[3],0|o,s[5],s[6],s[7],s[8]]:s,l=e.esproposal_optional_chaining,b=yVt(l)?[0,v[1],v[2],v[3],v[4],0|l,v[6],v[7],v[8]]:v,p=e.esproposal_nullish_coalescing,k=yVt(p)?[0,b[1],b[2],b[3],b[4],b[5],0|p,b[7],b[8]]:b,w=e.types,d=yVt(w)?[0,k[1],k[2],k[3],k[4],k[5],k[6],0|w,k[8]]:k,h=e.tokens,m=yVt(h),y=m?0|h:m,_=[0,0],F=[0,[0,d]],E=[0,y?[0,function(t){return _[1]=[0,t,_[1]],0}]:y],S=Ed?Ed[1]:1,g=[0,F?F[1]:F],x=[0,E?E[1]:E],T=H4t([0,x?x[1]:x],[0,g?g[1]:g],0,a),A=nd(c8t[1],T),O=SGt(T[1][1]),I=SGt(AGt(function(t,r){var e=t[2],n=t[1];return ad(i8t[3],r,n)?[0,n,e]:[0,ad(i8t[4],r,n),[0,r,e]]},[0,i8t[1],0],O)[2]);if(S?0!==I?1:0:S)throw[0,E2t,I];G8t[1]=0;var P=nd(z8t[1],A),D=dGt(I,G8t[1]);return P.errors=nd(z8t[3],D),y&&(P.tokens=W8t(xGt(K8t[1],_[1]))),P},$8t=function(t){if(t[1]===FVt)return nd(SVt,t[2]);return nd(SVt,new EVt(wGt(fGt,function(r){for(var e=r;;){if(!e){if(t===fd)return ky;if(t===bd)return wy;if(t[1]===ld){var n=t[2],a=n[3],u=n[2],i=n[1];return cd(Uqt(wd),i,u,a,a+5|0,dy)}if(t[1]===pd){var c=t[2],f=c[3],s=c[2],o=c[1];return cd(Uqt(wd),o,s,f,f+6|0,hy)}if(t[1]===kd){var v=t[2],l=v[3],b=v[2],p=v[1];return cd(Uqt(wd),p,b,l,l+6|0,my)}return 0===Yw(t)?wGt(t[1][1],Xqt(t)):t[1]}var k=e[2],w=e[1];try{var d=nd(w,t)}catch(t){d=0}if(d)return d[1];e=k}}(jqt[1])).toString()))};return r.parse=function(t,r){try{return Q8t(t,r)}catch(r){return r=ed(r),$8t(r)}},void nd(yGt[1],0)}lVt=bVt}else oVt=vVt}else fVt=sVt}else iVt=cVt}}(function(){return this}())}),x=s;return{parsers:{flow:Object.assign({parse:function(e,n,a){"use strict";var u=g.parse(e,{esproposal_class_instance_fields:!0,esproposal_class_static_fields:!0,esproposal_export_star_as:!0,esproposal_optional_chaining:!0,esproposal_nullish_coalescing:!0});if(u.errors.length>0){var i=u.errors[0].loc;throw t(u.errors[0].message,{start:{line:i.start.line,column:i.start.column+1},end:{line:i.end.line,column:i.end.column+1}})}return r(e,u),h(u,Object.assign({},a,{originalText:e}))},astFormat:"estree",hasPragma:x},v)}}}); diff --git a/node_modules/prettier/parser-glimmer.js b/node_modules/prettier/parser-glimmer.js new file mode 100644 index 0000000..3aee5de --- /dev/null +++ b/node_modules/prettier/parser-glimmer.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e())}(this,function(){"use strict";var t=function(t,e){var r=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return r.loc=e,r};function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r@\[-\^`\{-~]/;function E(t){var e=function(t){for(var e=t.attributes.length,r=[],a=0;an&&"|"===r[n+1].charAt(0)){var i=r.slice(n).join(" ");if("|"!==i.charAt(i.length-1)||2!==i.match(/\|/g).length)throw new w("Invalid block parameters syntax: '"+i+"'",t.loc);for(var s=[],o=n+1;o"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData(t),this.state="comment")},commentStartDash:function(){var t=this.consume();"-"===t?this.state="commentEnd":">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("-"),this.state="comment")},comment:function(){var t=this.consume();"-"===t?this.state="commentEndDash":this.delegate.appendToCommentData(t)},commentEndDash:function(){var t=this.consume();"-"===t?this.state="commentEnd":(this.delegate.appendToCommentData("-"+t),this.state="comment")},commentEnd:function(){var t=this.consume();">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("--"+t),this.state="comment")},tagName:function(){var t=this.consume();B(t)?this.state="beforeAttributeName":"/"===t?this.state="selfClosingStartTag":">"===t?(this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToTagName(t)},beforeAttributeName:function(){var t=this.peek();B(t)?this.consume():"/"===t?(this.state="selfClosingStartTag",this.consume()):">"===t?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):"="===t?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.state="attributeName",this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(t)):(this.state="attributeName",this.delegate.beginAttribute())},attributeName:function(){var t=this.peek();B(t)?(this.state="afterAttributeName",this.consume()):"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===t?(this.state="beforeAttributeValue",this.consume()):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):'"'===t||"'"===t||"<"===t?(this.delegate.reportSyntaxError(t+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(t)):(this.consume(),this.delegate.appendToAttributeName(t))},afterAttributeName:function(){var t=this.peek();B(t)?this.consume():"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===t?(this.consume(),this.state="beforeAttributeValue"):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(t))},beforeAttributeValue:function(){var t=this.peek();B(t)?this.consume():'"'===t?(this.state="attributeValueDoubleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):"'"===t?(this.state="attributeValueSingleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeValueUnquoted",this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(t))},attributeValueDoubleQuoted:function(){var t=this.consume();'"'===t?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef('"')||"&"):this.delegate.appendToAttributeValue(t)},attributeValueSingleQuoted:function(){var t=this.consume();"'"===t?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef("'")||"&"):this.delegate.appendToAttributeValue(t)},attributeValueUnquoted:function(){var t=this.peek();B(t)?(this.delegate.finishAttributeValue(),this.consume(),this.state="beforeAttributeName"):"&"===t?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef(">")||"&")):">"===t?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.consume(),this.delegate.appendToAttributeValue(t))},afterAttributeValueQuoted:function(){var t=this.peek();B(t)?(this.consume(),this.state="beforeAttributeName"):"/"===t?(this.consume(),this.state="selfClosingStartTag"):">"===t?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},endTagOpen:function(){var t=this.consume();I(t)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(t.toLowerCase()))}},this.reset()}return t.prototype.reset=function(){this.state="beforeData",this.input="",this.index=0,this.line=1,this.column=0,this.tagLine=-1,this.tagColumn=-1,this.delegate.reset()},t.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},t.prototype.tokenizePart=function(t){for(this.input+=function(t){return t.replace(O,"\n")}(t);this.index",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),z=function(){function t(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.elementStack=[],this.currentAttribute=null,this.currentNode=null,this.tokenizer=new V(this,j),this.options=a,this.tokenizer.states.tagOpen=function(){var t=this.consume();"!"===t?this.state="markupDeclaration":"/"===t?this.state="endTagOpen":/[A-Za-z]/.test(t)&&(this.state="tagName",this.delegate.beginStartTag(),this.delegate.appendToTagName(t))},this.tokenizer.states.endTagOpen=function(){var t=this.consume();/[A-Za-z]/.test(t)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(t))},this.source=e.split(/(?:\r\n?|\n)/g)}return n(t,[{key:"acceptNode",value:function(t){return this[t.type](t)}},{key:"currentElement",value:function(){return this.elementStack[this.elementStack.length-1]}},{key:"sourceForNode",value:function(t,e){var r,a,n,i=t.loc.start.line-1,s=i-1,o=t.loc.start.column,l=[];for(e?(a=e.loc.end.line-1,n=e.loc.end.column):(a=t.loc.end.line-1,n=t.loc.end.column);s"),r.push.apply(r,nt(t.children)),r.push("");break;case"AttrNode":r.push(t.name,"=");var i=at(t.value);"TextNode"===t.value.type?r.push('"',i,'"'):r.push(i);break;case"ConcatStatement":r.push('"'),t.parts.forEach(function(t){"StringLiteral"===t.type?r.push(t.original):r.push(at(t))}),r.push('"');break;case"TextNode":r.push(t.chars);break;case"MustacheStatement":r.push(st(["{{",it(t),"}}"]));break;case"MustacheCommentStatement":r.push(st(["{{!--",t.value,"--}}"]));break;case"ElementModifierStatement":r.push(st(["{{",it(t),"}}"]));break;case"PathExpression":r.push(t.original);break;case"SubExpression":r.push("(",it(t),")");break;case"BooleanLiteral":r.push(t.value?"true":"false");break;case"BlockStatement":var s=[];t.chained?s.push(["{{else ",it(t),"}}"].join("")):s.push(["{{#",it(e=t),function(t){var e=t.program.blockParams;return e.length?" as |".concat(e.join(" "),"|"):null}(e),"}}"].join("")),s.push(at(t.program)),t.inverse&&(t.inverse.chained||s.push("{{else}}"),s.push(at(t.inverse))),t.chained||s.push(function(t){return["{{/",at(t.path),"}}"].join("")}(t)),r.push(s.join(""));break;case"PartialStatement":r.push(st(["{{>",it(t),"}}"]));break;case"CommentStatement":r.push(st(["\x3c!--",t.value,"--\x3e"]));break;case"StringLiteral":r.push('"'.concat(t.value,'"'));break;case"NumberLiteral":r.push(String(t.value));break;case"UndefinedLiteral":r.push("undefined");break;case"NullLiteral":r.push("null");break;case"Hash":r.push(t.pairs.map(function(t){return at(t)}).join(" "));break;case"HashPair":r.push("".concat(t.key,"=").concat(at(t.value)))}return r.join("")}function nt(t){return t.map(at)}function it(t){var e;switch(t.type){case"MustacheStatement":case"SubExpression":case"ElementModifierStatement":case"BlockStatement":if(h(t.path))return String(t.path.value);e=at(t.path);break;case"PartialStatement":e=at(t.name);break;default:return function(){throw new Error("unreachable")}()}return st([e,nt(t.params).join(" "),at(t.hash)]," ")}function st(t,e){return function(t){var e=[];return t.forEach(function(t){void 0!==t&&null!==t&&""!==t&&e.push(t)}),e}(t).join(e||"")}var ot=function(){function t(e){r(this,t),this.order=e,this.stack=[]}return n(t,[{key:"visit",value:function(t,e){t&&(this.stack.push(t),"post"===this.order?(this.children(t,e),e(t,this)):(e(t,this),this.children(t,e)),this.stack.pop())}},{key:"children",value:function(t,e){var r=lt[t.type];r&&r(this,t,e)}}]),t}(),lt={Program:function(t,e,r){for(var a=0;a":">",'"':""","'":"'","`":"`","=":"="},n=/[&<>"'`=]/g,i=/[&<>"'`=]/;function s(t){return a[t]}function o(t){for(var e=1;e0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):a(this);if(r.data&&r.ids){var i=pt.createFrame(r.data);i.contextPath=pt.appendContextPath(r.data.contextPath,r.name),r={data:i}}return n(e,r)})},t.exports=e.default});ut(dt);var mt=ht(function(t,r){r.__esModule=!0;var a,n=(a=ft)&&a.__esModule?a:{default:a};r.default=function(t){t.registerHelper("each",function(t,r){if(!r)throw new n.default("Must pass iterator to #each");var a=r.fn,i=r.inverse,s=0,o="",l=void 0,c=void 0;function u(e,r,n){l&&(l.key=e,l.index=r,l.first=0===r,l.last=!!n,c&&(l.contextPath=c+e)),o+=a(t[e],{data:l,blockParams:pt.blockParams([t[e],e],[c+e,null])})}if(r.data&&r.ids&&(c=pt.appendContextPath(r.data.contextPath,r.ids[0])+"."),pt.isFunction(t)&&(t=t.call(this)),r.data&&(l=pt.createFrame(r.data)),t&&"object"===e(t))if(pt.isArray(t))for(var h=t.length;s=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var a=arguments.length,n=Array(a>1?a-1:0),i=1;i= 2.0.0-beta.1",7:">= 4.0.0"};function i(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},St.registerDefaultHelpers(this),xt.registerDefaultDecorators(this)}i.prototype={constructor:i,logger:n.default,log:n.default.log,registerHelper:function(t,e){if("[object Object]"===pt.toString.call(t)){if(e)throw new a.default("Arg not supported with multiple helpers");pt.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if("[object Object]"===pt.toString.call(t))pt.extend(this.partials,t);else{if(void 0===e)throw new a.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if("[object Object]"===pt.toString.call(t)){if(e)throw new a.default("Arg not supported with multiple decorators");pt.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var s=n.default.log;e.log=s,e.createFrame=pt.createFrame,e.logger=n.default});ut(Pt);var At=ht(function(t,e){function r(t){this.string=t}e.__esModule=!0,r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},e.default=r,t.exports=e.default});ut(At);var Lt=ht(function(t,r){r.__esModule=!0,r.checkRevision=function(t){var e=t&&t[0]||1,r=Pt.COMPILER_REVISION;if(e!==r){if(e2&&k.push("'"+this.terminals_[v]+"'");x=this.lexer.showPosition?"Parse error on line "+(o+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:u,expected:k})}}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+p);switch(m[0]){case 1:r.push(p),a.push(this.lexer.yytext),n.push(this.lexer.yylloc),r.push(m[1]),p=null,f?(p=f,f=null):(l=this.lexer.yyleng,s=this.lexer.yytext,o=this.lexer.yylineno,u=this.lexer.yylloc,c>0&&c--);break;case 2:if(b=this.productions_[m[1]][1],w.$=a[a.length-b],w._$={first_line:n[n.length-(b||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(b||1)].first_column,last_column:n[n.length-1].last_column},h&&(w._$.range=[n[n.length-(b||1)].range[0],n[n.length-1].range[1]]),void 0!==(g=this.performAction.call(w,s,l,o,this.yy,m[1],a,n)))return g;b&&(r=r.slice(0,-1*b*2),a=a.slice(0,-1*b),n=n.slice(0,-1*b)),r.push(this.productions_[m[1]][0]),a.push(w.$),n.push(w._$),y=i[r[r.length-2]][r[r.length-1]],r.push(y);break;case 3:return!0}}return!0}},e=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,r,a,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;se[0].length)||(e=r,a=s,this.options.flex));s++);return e?((n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,i[a],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,r,a){function n(t,r){return e.yytext=e.yytext.substr(t,e.yyleng-r)}switch(r){case 0:if("\\\\"===e.yytext.slice(-2)?(n(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(n(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=n(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=n(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return t}();function r(){this.yy={}}return t.lexer=e,r.prototype=t,t.Parser=r,new r}();e.default=r,t.exports=e.default});ut(Dt);var qt=ht(function(t,e){e.__esModule=!0;var r,a=(r=ft)&&r.__esModule?r:{default:r};function n(){this.parents=[]}function i(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function s(t){i.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function o(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}n.prototype={constructor:n,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!n.prototype[r.type])throw new a.default('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new a.default(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,r=t.length;e0)throw new a.default("Invalid path: "+n,{loc:r});".."===c&&(s++,"../")}}return{type:"PathExpression",data:t,depth:s,parts:i,original:n,loc:r}},e.prepareMustache=function(t,e,r,a,n,i){var s=a.charAt(3)||a.charAt(2),o="{"!==s&&"&"!==s;return{type:/\*/.test(a)?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:o,strip:n,loc:this.locInfo(i)}},e.prepareRawBlock=function(t,e,r,a){n(t,r),a=this.locInfo(a);var i={type:"Program",body:e,strip:{},loc:a};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:a}},e.prepareBlock=function(t,e,r,i,s,o){i&&i.path&&n(t,i);var l=/\*/.test(t.open);e.blockParams=t.blockParams;var c=void 0,u=void 0;if(r){if(l)throw new a.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=i.strip),u=r.strip,c=r.program}s&&(s=c,c=e,e=s);return{type:l?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:c,openStrip:t.strip,inverseStrip:u,closeStrip:i&&i.strip,loc:this.locInfo(o)}},e.prepareProgram=function(t,e){if(!e&&t.length){var r=t[0].loc,a=t[t.length-1].loc;r&&a&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:a.end.line,column:a.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,r,a){return n(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(a)}};var r,a=(r=ft)&&r.__esModule?r:{default:r};function n(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new a.default(t.path.original+" doesn't match "+e,r)}}});ut(Ot);var Bt=ht(function(t,e){function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.parse=function(t,e){if("Program"===t.type)return t;return a.default.yy=s,s.locInfo=function(t){return new s.SourceLocation(e&&e.srcName,t)},new n.default(e).accept(a.default.parse(t))};var a=r(Dt),n=r(Tt),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(Ot);e.parser=a.default;var s={};pt.extend(s,i)});ut(Bt);var It=ht(function(t,e){function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.Compiler=s,e.precompile=function(t,e,r){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new a.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0);e.compat&&(e.useDepths=!0);var n=r.parse(t,e),i=(new r.Compiler).compile(n,e);return(new r.JavaScriptCompiler).compile(i,e)},e.compile=function(t,e,r){void 0===e&&(e={});if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new a.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in(e=pt.extend({},e))||(e.data=!0);e.compat&&(e.useDepths=!0);var n=void 0;function i(){var a=r.parse(t,e),n=(new r.Compiler).compile(a,e),i=(new r.JavaScriptCompiler).compile(n,e,void 0,!0);return r.template(i)}function s(t,e){return n||(n=i()),n.call(this,t,e)}return s._setup=function(t){return n||(n=i()),n._setup(t)},s._child=function(t,e,r,a){return n||(n=i()),n._child(t,e,r,a)},s};var a=r(ft),n=r(Ct),i=[].slice;function s(){}function o(t,e){if(t===e)return!0;if(pt.isArray(t)&&pt.isArray(e)&&t.length===e.length){for(var r=0;r1)throw new a.default("Unsupported number of partial arguments: "+r.length,t);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var n=t.name.original,i="SubExpression"===t.name.type;i&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",i,n,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){l(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,r){var a=t.path,n=a.parts[0],i=null!=e||null!=r;this.opcode("getContext",a.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",r),a.strict=!0,this.accept(a),this.opcode("invokeAmbiguous",n,i)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,r){var i=this.setupFullMustacheParams(t,e,r),s=t.path,o=s.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",i.length,o);else{if(this.options.knownHelpersOnly)throw new a.default("You specified knownHelpersOnly, but used the unknown helper "+o,t);s.strict=!0,s.falsy=!0,this.accept(s),this.opcode("invokeHelper",i.length,s.original,n.default.helpers.simpleId(s))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],r=n.default.helpers.scopedId(t),a=!t.depth&&!r&&this.blockParamIndex(e);a?this.opcode("lookupBlockParam",a,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,r):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,r=0,a=e.length;for(this.opcode("pushHash");r=0)return[e,n]}}}});ut(It);var Rt=ht(function(t,e){e.__esModule=!0;var r=void 0;try{var a=require("source-map");r=a.SourceNode}catch(t){}function n(t,e,r){if(pt.isArray(t)){for(var a=[],n=0,i=t.length;n0&&(e+=", "+r.join(", "));var a=0;for(var n in this.aliases){var i=this.aliases[n];this.aliases.hasOwnProperty(n)&&i.children&&i.referenceCount>1&&(e+=", alias"+ ++a+"="+n,i.children[0]="alias"+a)}var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var o=this.mergeSource(e);return t?(s.push(o),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),") {\n ",o,"}"])},mergeSource:function(t){var e=this.environment.isSimple,r=!this.forceBuffer,a=void 0,n=void 0,i=void 0,s=void 0;return this.source.each(function(t){t.appendToBuffer?(i?t.prepend(" + "):i=t,s=t):(i&&(n?i.prepend("buffer += "):a=!0,s.add(";"),i=s=void 0),n=!0,e||(r=!1))}),r?i?(i.prepend("return "),s.add(";")):n||this.source.push('return "";'):(t+=", buffer = "+(a?"":this.initializeBuffer()),i?(i.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(a?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs(t,0,r);var a=this.popStack();r.splice(1,0,a),this.push(this.source.functionCall(e,"call",r))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var r=this.topStack();e.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,r,a){var n=0;a||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[n++])),this.resolvePath("context",t,n,e,r)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,r){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,r)},resolvePath:function(t,e,r,a,n){var i=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,r,a){var n=e.popStack(),i=0,s=r.length;t&&s--;for(;ithis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,r=t.length;e "+e+" }}")},n.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")},n.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")},n.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")},n.prototype.SubExpression=function(t){for(var e,r=t.params,a=[],n=0,i=r.length;n' character, or '/>' (on line ".concat(a,")"),k.loc(a,0))}return t.length>0?t[0]:k.text("")}(r,a,n,this.tokenizer.line);o.loc=k.loc(i,s,this.tokenizer.line,this.tokenizer.column);var l=k.loc(this.currentAttr.start.line,this.currentAttr.start.column,this.tokenizer.line,this.tokenizer.column),c=k.attr(e,o,l);this.currentStartTag.attributes.push(c)}},{key:"reportSyntaxError",value:function(t){throw new w("Syntax error at line ".concat(this.tokenizer.line," col ").concat(this.tokenizer.column,": ").concat(t),k.loc(this.tokenizer.line,this.tokenizer.column))}}]),e}();function Wt(t){return"`"+t.name+"` (on line "+t.loc.end.line+")"}var Zt={parse:Yt,builders:k,print:at,traverse:rt,Walker:ot};function Yt(t,r){var a="object"===e(t)?t:Kt(t),n=new Qt(t,r).acceptNode(a);if(r&&r.plugins&&r.plugins.ast)for(var i=0,s=r.plugins.ast.length;i=2&&i(f,s)+": "+v[t-2],i(f,l)+": "+v[t-1],r(2+f+u-1)+"^",t0&&r(n[0]);)n.shift();for(;n.length>0&&r(n[n.length-1]);)n.pop();return n.join("\n")}});r(E);var p=i(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenKind=void 0,n.createLexer=function(e,n){var t=new s(a.SOF,0,0,0,0,null);return{source:e,options:n,lastToken:t,token:t,line:1,lineStart:0,advance:i,lookahead:o}},n.getTokenDesc=function(e){var n=e.value;return n?e.kind+' "'+n+'"':e.kind};var t,r=(t=E)&&t.__esModule?t:{default:t};function i(){return this.lastToken=this.token,this.token=this.lookahead()}function o(){var e=this.token;if(e.kind!==a.EOF)do{e=e.next||(e.next=d(this,e))}while(e.kind===a.COMMENT);return e}var a=n.TokenKind=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});var c=String.prototype.charCodeAt,u=String.prototype.slice;function s(e,n,t,r,i,o,a){this.kind=e,this.start=n,this.end=t,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function l(e){return isNaN(e)?a.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'+("00"+e.toString(16).toUpperCase()).slice(-4)+'"'}function d(e,n){var t=e.source,i=t.body,o=i.length,d=function(e,n,t){var r=e.length,i=n;for(;i=o)return new s(a.EOF,o,o,E,T,n);var N=c.call(i,d);if(N<32&&9!==N&&10!==N&&13!==N)throw(0,v.syntaxError)(t,d,"Cannot contain the invalid character "+l(N)+".");switch(N){case 33:return new s(a.BANG,d,d+1,E,T,n);case 35:return function(e,n,t,r,i){var o=e.body,l=void 0,d=n;do{l=c.call(o,++d)}while(null!==l&&(l>31||9===l));return new s(a.COMMENT,n,d,t,r,i,u.call(o,n+1,d))}(t,d,E,T,n);case 36:return new s(a.DOLLAR,d,d+1,E,T,n);case 38:return new s(a.AMP,d,d+1,E,T,n);case 40:return new s(a.PAREN_L,d,d+1,E,T,n);case 41:return new s(a.PAREN_R,d,d+1,E,T,n);case 46:if(46===c.call(i,d+1)&&46===c.call(i,d+2))return new s(a.SPREAD,d,d+3,E,T,n);break;case 58:return new s(a.COLON,d,d+1,E,T,n);case 61:return new s(a.EQUALS,d,d+1,E,T,n);case 64:return new s(a.AT,d,d+1,E,T,n);case 91:return new s(a.BRACKET_L,d,d+1,E,T,n);case 93:return new s(a.BRACKET_R,d,d+1,E,T,n);case 123:return new s(a.BRACE_L,d,d+1,E,T,n);case 124:return new s(a.PIPE,d,d+1,E,T,n);case 125:return new s(a.BRACE_R,d,d+1,E,T,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,n,t,r,i){var o=e.body,l=o.length,d=n+1,f=0;for(;d!==l&&null!==(f=c.call(o,d))&&(95===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122);)++d;return new s(a.NAME,n,d,t,r,i,u.call(o,n,d))}(t,d,E,T,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,n,t,r,i,o){var d=e.body,E=t,p=n,T=!1;45===E&&(E=c.call(d,++p));if(48===E){if((E=c.call(d,++p))>=48&&E<=57)throw(0,v.syntaxError)(e,p,"Invalid number, unexpected digit after 0: "+l(E)+".")}else p=f(e,p,E),E=c.call(d,p);46===E&&(T=!0,E=c.call(d,++p),p=f(e,p,E),E=c.call(d,p));69!==E&&101!==E||(T=!0,43!==(E=c.call(d,++p))&&45!==E||(E=c.call(d,++p)),p=f(e,p,E));return new s(T?a.FLOAT:a.INT,n,p,r,i,o,u.call(d,n,p))}(t,d,N,E,T,n);case 34:return 34===c.call(i,d+1)&&34===c.call(i,d+2)?function(e,n,t,i,o){var d=e.body,f=n+3,E=f,p=0,T="";for(;f=48&&o<=57){do{o=c.call(r,++i)}while(o>=48&&o<=57);return i}throw(0,v.syntaxError)(e,i,"Invalid number, expected digit but got: "+l(o)+".")}function p(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}s.prototype.toJSON=s.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}});r(p);var T=i(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var t,r=(t=d)&&t.__esModule?t:{default:t};n.Source=function e(n,t,i){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.body=n,this.name=t||"GraphQL request",this.locationOffset=i||{line:1,column:1},this.locationOffset.line>0||(0,r.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,r.default)(0,"column in locationOffset is 1-indexed and must be positive")}});r(T);var N=i(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});n.DirectiveLocation=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"})});r(N);var I=i(function(e,n){function t(e){var n=X(e,p.TokenKind.NAME);return{kind:a.Kind.NAME,value:n.value,loc:Y(e,n)}}function r(e){if(Q(e,p.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return i(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"extend":case"directive":return S(e)}else{if(Q(e,p.TokenKind.BRACE_L))return i(e);if(D(e))return S(e)}throw $(e)}function i(e){if(Q(e,p.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return o(e);case"fragment":return function(e){var n=e.token;if(H(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:a.Kind.FRAGMENT_DEFINITION,name:m(e),variableDefinitions:u(e),typeCondition:(H(e,"on"),L(e)),directives:g(e,!1),selectionSet:d(e),loc:Y(e,n)};return{kind:a.Kind.FRAGMENT_DEFINITION,name:m(e),typeCondition:(H(e,"on"),L(e)),directives:g(e,!1),selectionSet:d(e),loc:Y(e,n)}}(e)}else if(Q(e,p.TokenKind.BRACE_L))return o(e);throw $(e)}function o(e){var n=e.token;if(Q(e,p.TokenKind.BRACE_L))return{kind:a.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:d(e),loc:Y(e,n)};var r=c(e),i=void 0;return Q(e,p.TokenKind.NAME)&&(i=t(e)),{kind:a.Kind.OPERATION_DEFINITION,operation:r,name:i,variableDefinitions:u(e),directives:g(e,!1),selectionSet:d(e),loc:Y(e,n)}}function c(e){var n=X(e,p.TokenKind.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw $(e,n)}function u(e){return Q(e,p.TokenKind.PAREN_L)?z(e,p.TokenKind.PAREN_L,s,p.TokenKind.PAREN_R):[]}function s(e){var n=e.token;return{kind:a.Kind.VARIABLE_DEFINITION,variable:l(e),type:(X(e,p.TokenKind.COLON),K(e)),defaultValue:q(e,p.TokenKind.EQUALS)?y(e,!0):void 0,loc:Y(e,n)}}function l(e){var n=e.token;return X(e,p.TokenKind.DOLLAR),{kind:a.Kind.VARIABLE,name:t(e),loc:Y(e,n)}}function d(e){var n=e.token;return{kind:a.Kind.SELECTION_SET,selections:z(e,p.TokenKind.BRACE_L,f,p.TokenKind.BRACE_R),loc:Y(e,n)}}function f(e){return Q(e,p.TokenKind.SPREAD)?function(e){var n=e.token;if(X(e,p.TokenKind.SPREAD),Q(e,p.TokenKind.NAME)&&"on"!==e.token.value)return{kind:a.Kind.FRAGMENT_SPREAD,name:m(e),directives:g(e,!1),loc:Y(e,n)};var t=void 0;"on"===e.token.value&&(e.advance(),t=L(e));return{kind:a.Kind.INLINE_FRAGMENT,typeCondition:t,directives:g(e,!1),selectionSet:d(e),loc:Y(e,n)}}(e):function(e){var n=e.token,r=t(e),i=void 0,o=void 0;q(e,p.TokenKind.COLON)?(i=r,o=t(e)):o=r;return{kind:a.Kind.FIELD,alias:i,name:o,arguments:E(e,!1),directives:g(e,!1),selectionSet:Q(e,p.TokenKind.BRACE_L)?d(e):void 0,loc:Y(e,n)}}(e)}function E(e,n){var t=n?k:I;return Q(e,p.TokenKind.PAREN_L)?z(e,p.TokenKind.PAREN_L,t,p.TokenKind.PAREN_R):[]}function I(e){var n=e.token;return{kind:a.Kind.ARGUMENT,name:t(e),value:(X(e,p.TokenKind.COLON),y(e,!1)),loc:Y(e,n)}}function k(e){var n=e.token;return{kind:a.Kind.ARGUMENT,name:t(e),value:(X(e,p.TokenKind.COLON),_(e)),loc:Y(e,n)}}function m(e){if("on"===e.token.value)throw $(e);return t(e)}function y(e,n){var t=e.token;switch(t.kind){case p.TokenKind.BRACKET_L:return function(e,n){var t=e.token,r=n?_:h;return{kind:a.Kind.LIST,values:function(e,n,t,r){X(e,n);var i=[];for(;!q(e,r);)i.push(t(e));return i}(e,p.TokenKind.BRACKET_L,r,p.TokenKind.BRACKET_R),loc:Y(e,t)}}(e,n);case p.TokenKind.BRACE_L:return function(e,n){var t=e.token;X(e,p.TokenKind.BRACE_L);var r=[];for(;!q(e,p.TokenKind.BRACE_R);)r.push(A(e,n));return{kind:a.Kind.OBJECT,fields:r,loc:Y(e,t)}}(e,n);case p.TokenKind.INT:return e.advance(),{kind:a.Kind.INT,value:t.value,loc:Y(e,t)};case p.TokenKind.FLOAT:return e.advance(),{kind:a.Kind.FLOAT,value:t.value,loc:Y(e,t)};case p.TokenKind.STRING:case p.TokenKind.BLOCK_STRING:return O(e);case p.TokenKind.NAME:return"true"===t.value||"false"===t.value?(e.advance(),{kind:a.Kind.BOOLEAN,value:"true"===t.value,loc:Y(e,t)}):"null"===t.value?(e.advance(),{kind:a.Kind.NULL,loc:Y(e,t)}):(e.advance(),{kind:a.Kind.ENUM,value:t.value,loc:Y(e,t)});case p.TokenKind.DOLLAR:if(!n)return l(e)}throw $(e)}function O(e){var n=e.token;return e.advance(),{kind:a.Kind.STRING,value:n.value,block:n.kind===p.TokenKind.BLOCK_STRING,loc:Y(e,n)}}function _(e){return y(e,!0)}function h(e){return y(e,!1)}function A(e,n){var r=e.token;return{kind:a.Kind.OBJECT_FIELD,name:t(e),value:(X(e,p.TokenKind.COLON),y(e,n)),loc:Y(e,r)}}function g(e,n){for(var t=[];Q(e,p.TokenKind.AT);)t.push(b(e,n));return t}function b(e,n){var r=e.token;return X(e,p.TokenKind.AT),{kind:a.Kind.DIRECTIVE,name:t(e),arguments:E(e,n),loc:Y(e,r)}}function K(e){var n=e.token,t=void 0;return q(e,p.TokenKind.BRACKET_L)?(t=K(e),X(e,p.TokenKind.BRACKET_R),t={kind:a.Kind.LIST_TYPE,type:t,loc:Y(e,n)}):t=L(e),q(e,p.TokenKind.BANG)?{kind:a.Kind.NON_NULL_TYPE,type:t,loc:Y(e,n)}:t}function L(e){var n=e.token;return{kind:a.Kind.NAMED_TYPE,name:t(e),loc:Y(e,n)}}function S(e){var n=D(e)?e.lookahead():e.token;if(n.kind===p.TokenKind.NAME)switch(n.value){case"schema":return function(e){var n=e.token;H(e,"schema");var t=g(e,!0),r=z(e,p.TokenKind.BRACE_L,P,p.TokenKind.BRACE_R);return{kind:a.Kind.SCHEMA_DEFINITION,directives:t,operationTypes:r,loc:Y(e,n)}}(e);case"scalar":return function(e){var n=e.token,r=R(e);H(e,"scalar");var i=t(e),o=g(e,!0);return{kind:a.Kind.SCALAR_TYPE_DEFINITION,description:r,name:i,directives:o,loc:Y(e,n)}}(e);case"type":return function(e){var n=e.token,r=R(e);H(e,"type");var i=t(e),o=F(e),c=g(e,!0),u=C(e);return{kind:a.Kind.OBJECT_TYPE_DEFINITION,description:r,name:i,interfaces:o,directives:c,fields:u,loc:Y(e,n)}}(e);case"interface":return function(e){var n=e.token,r=R(e);H(e,"interface");var i=t(e),o=g(e,!0),c=C(e);return{kind:a.Kind.INTERFACE_TYPE_DEFINITION,description:r,name:i,directives:o,fields:c,loc:Y(e,n)}}(e);case"union":return function(e){var n=e.token,r=R(e);H(e,"union");var i=t(e),o=g(e,!0),c=B(e);return{kind:a.Kind.UNION_TYPE_DEFINITION,description:r,name:i,directives:o,types:c,loc:Y(e,n)}}(e);case"enum":return function(e){var n=e.token,r=R(e);H(e,"enum");var i=t(e),o=g(e,!0),c=j(e);return{kind:a.Kind.ENUM_TYPE_DEFINITION,description:r,name:i,directives:o,values:c,loc:Y(e,n)}}(e);case"input":return function(e){var n=e.token,r=R(e);H(e,"input");var i=t(e),o=g(e,!0),c=V(e);return{kind:a.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:i,directives:o,fields:c,loc:Y(e,n)}}(e);case"extend":return function(e){var n=e.lookahead();if(n.kind===p.TokenKind.NAME)switch(n.value){case"scalar":return function(e){var n=e.token;H(e,"extend"),H(e,"scalar");var r=t(e),i=g(e,!0);if(0===i.length)throw $(e);return{kind:a.Kind.SCALAR_TYPE_EXTENSION,name:r,directives:i,loc:Y(e,n)}}(e);case"type":return function(e){var n=e.token;H(e,"extend"),H(e,"type");var r=t(e),i=F(e),o=g(e,!0),c=C(e);if(0===i.length&&0===o.length&&0===c.length)throw $(e);return{kind:a.Kind.OBJECT_TYPE_EXTENSION,name:r,interfaces:i,directives:o,fields:c,loc:Y(e,n)}}(e);case"interface":return function(e){var n=e.token;H(e,"extend"),H(e,"interface");var r=t(e),i=g(e,!0),o=C(e);if(0===i.length&&0===o.length)throw $(e);return{kind:a.Kind.INTERFACE_TYPE_EXTENSION,name:r,directives:i,fields:o,loc:Y(e,n)}}(e);case"union":return function(e){var n=e.token;H(e,"extend"),H(e,"union");var r=t(e),i=g(e,!0),o=B(e);if(0===i.length&&0===o.length)throw $(e);return{kind:a.Kind.UNION_TYPE_EXTENSION,name:r,directives:i,types:o,loc:Y(e,n)}}(e);case"enum":return function(e){var n=e.token;H(e,"extend"),H(e,"enum");var r=t(e),i=g(e,!0),o=j(e);if(0===i.length&&0===o.length)throw $(e);return{kind:a.Kind.ENUM_TYPE_EXTENSION,name:r,directives:i,values:o,loc:Y(e,n)}}(e);case"input":return function(e){var n=e.token;H(e,"extend"),H(e,"input");var r=t(e),i=g(e,!0),o=V(e);if(0===i.length&&0===o.length)throw $(e);return{kind:a.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:i,fields:o,loc:Y(e,n)}}(e)}throw $(e,n)}(e);case"directive":return function(e){var n=e.token,r=R(e);H(e,"directive"),X(e,p.TokenKind.AT);var i=t(e),o=M(e);H(e,"on");var c=function(e){q(e,p.TokenKind.PIPE);var n=[];do{n.push(G(e))}while(q(e,p.TokenKind.PIPE));return n}(e);return{kind:a.Kind.DIRECTIVE_DEFINITION,description:r,name:i,arguments:o,locations:c,loc:Y(e,n)}}(e)}throw $(e,n)}function D(e){return Q(e,p.TokenKind.STRING)||Q(e,p.TokenKind.BLOCK_STRING)}function R(e){if(D(e))return O(e)}function P(e){var n=e.token,t=c(e);X(e,p.TokenKind.COLON);var r=L(e);return{kind:a.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:Y(e,n)}}function F(e){var n=[];if("implements"===e.token.value){e.advance(),q(e,p.TokenKind.AMP);do{n.push(L(e))}while(q(e,p.TokenKind.AMP)||e.options.allowLegacySDLImplementsInterfaces&&Q(e,p.TokenKind.NAME))}return n}function C(e){return e.options.allowLegacySDLEmptyFields&&Q(e,p.TokenKind.BRACE_L)&&e.lookahead().kind===p.TokenKind.BRACE_R?(e.advance(),e.advance(),[]):Q(e,p.TokenKind.BRACE_L)?z(e,p.TokenKind.BRACE_L,w,p.TokenKind.BRACE_R):[]}function w(e){var n=e.token,r=R(e),i=t(e),o=M(e);X(e,p.TokenKind.COLON);var c=K(e),u=g(e,!0);return{kind:a.Kind.FIELD_DEFINITION,description:r,name:i,arguments:o,type:c,directives:u,loc:Y(e,n)}}function M(e){return Q(e,p.TokenKind.PAREN_L)?z(e,p.TokenKind.PAREN_L,x,p.TokenKind.PAREN_R):[]}function x(e){var n=e.token,r=R(e),i=t(e);X(e,p.TokenKind.COLON);var o=K(e),c=void 0;q(e,p.TokenKind.EQUALS)&&(c=_(e));var u=g(e,!0);return{kind:a.Kind.INPUT_VALUE_DEFINITION,description:r,name:i,type:o,defaultValue:c,directives:u,loc:Y(e,n)}}function B(e){var n=[];if(q(e,p.TokenKind.EQUALS)){q(e,p.TokenKind.PIPE);do{n.push(L(e))}while(q(e,p.TokenKind.PIPE))}return n}function j(e){return Q(e,p.TokenKind.BRACE_L)?z(e,p.TokenKind.BRACE_L,U,p.TokenKind.BRACE_R):[]}function U(e){var n=e.token,r=R(e),i=t(e),o=g(e,!0);return{kind:a.Kind.ENUM_VALUE_DEFINITION,description:r,name:i,directives:o,loc:Y(e,n)}}function V(e){return Q(e,p.TokenKind.BRACE_L)?z(e,p.TokenKind.BRACE_L,x,p.TokenKind.BRACE_R):[]}function G(e){var n=e.token,r=t(e);if(N.DirectiveLocation.hasOwnProperty(r.value))return r;throw $(e,n)}function Y(e,n){if(!e.options.noLocation)return new J(n,e.lastToken,e.source)}function J(e,n,t){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=t}function Q(e,n){return e.token.kind===n}function q(e,n){var t=e.token.kind===n;return t&&e.advance(),t}function X(e,n){var t=e.token;if(t.kind===n)return e.advance(),t;throw(0,v.syntaxError)(e.source,t.start,"Expected "+n+", found "+(0,p.getTokenDesc)(t))}function H(e,n){var t=e.token;if(t.kind===p.TokenKind.NAME&&t.value===n)return e.advance(),t;throw(0,v.syntaxError)(e.source,t.start,'Expected "'+n+'", found '+(0,p.getTokenDesc)(t))}function $(e,n){var t=n||e.token;return(0,v.syntaxError)(e.source,t.start,"Unexpected "+(0,p.getTokenDesc)(t))}function z(e,n,t,r){X(e,n);for(var i=[t(e)];!q(e,r);)i.push(t(e));return i}Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(e,n){var t="string"==typeof e?new T.Source(e):e;if(!(t instanceof T.Source))throw new TypeError("Must provide Source. Received: "+String(t));return function(e){var n=e.token;X(e,p.TokenKind.SOF);var t=[];do{t.push(r(e))}while(!q(e,p.TokenKind.EOF));return{kind:a.Kind.DOCUMENT,definitions:t,loc:Y(e,n)}}((0,p.createLexer)(t,n||{}))},n.parseValue=function(e,n){var t="string"==typeof e?new T.Source(e):e,r=(0,p.createLexer)(t,n||{});X(r,p.TokenKind.SOF);var i=y(r,!1);return X(r,p.TokenKind.EOF),i},n.parseType=function(e,n){var t="string"==typeof e?new T.Source(e):e,r=(0,p.createLexer)(t,n||{});X(r,p.TokenKind.SOF);var i=K(r);return X(r,p.TokenKind.EOF),i},n.parseConstValue=_,n.parseTypeReference=K,n.parseNamedType=L,J.prototype.toJSON=J.prototype.inspect=function(){return{start:this.start,end:this.end}}});r(I);var k=i(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.visit=function(e,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,c=void 0,u=Array.isArray(e),s=[e],l=-1,d=[],f=void 0,v=void 0,E=void 0,p=[],T=[],N=e;do{var I=++l===s.length,k=I&&0!==d.length;if(I){if(v=0===T.length?void 0:p[p.length-1],f=E,E=T.pop(),k){if(u)f=f.slice();else{var m={};for(var y in f)f.hasOwnProperty(y)&&(m[y]=f[y]);f=m}for(var O=0,_=0;_"!==t.kind;)"Comment"===t.kind&&(Object.assign(t,{column:t.column-1}),n.push(t)),t=t.next;return n}(i),function n(t){if(t&&"object"===e(t))for(var r in delete t.startToken,delete t.endToken,delete t.prev,delete t.next,t)n(t[r]);return t}(i),i}catch(e){throw e instanceof v.GraphQLError?n(e.message,{start:{line:e.locations[0].line,column:e.locations[0].column}}):e}},astFormat:"graphql",hasPragma:t,locStart:function(e){return"number"==typeof e.start?e.start:e.loc&&e.loc.start},locEnd:function(e){return"number"==typeof e.end?e.end:e.loc&&e.loc.end}}}}}); diff --git a/node_modules/prettier/parser-html.js b/node_modules/prettier/parser-html.js new file mode 100644 index 0000000..d2f10cc --- /dev/null +++ b/node_modules/prettier/parser-html.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.html=t())}(this,function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n0){for(var r=0;r<~]))"].join("|");return new RegExp(e,"g")}}),b=C(function(e){e.exports=function(e){return!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))}});C(function(e){e.exports=function(e){if("string"!=typeof e||0===e.length)return 0;var t;e="string"==typeof(t=e)?t.replace(E(),""):t;for(var n=0,i=0;i=127&&r<=159||(r>=768&&r<=879||(r>65535&&i++,n+=b(r)?2:1))}return n}});function A(e){return function(t,n,i){var r=i&&i.backwards;if(!1===n)return!1;for(var a=t.length,o=n;o>=0&&o"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(e,t){e.forEach(function(e){x[e]=t})});var P={};function N(e,t,n,i){for(var r=[e];0!==r.length;){var a=r.pop();if(a!==P){var o=!0;if(t&&!1===t(a)&&(o=!1),n&&(r.push(a),r.push(P)),o)if("concat"===a.type||"fill"===a.type)for(var s=a.parts.length-1;s>=0;--s)r.push(a.parts[s]);else if("if-break"===a.type)a.flatContents&&r.push(a.flatContents),a.breakContents&&r.push(a.breakContents);else if("group"===a.type&&a.expandedStates)if(i)for(var c=a.expandedStates.length-1;c>=0;--c)r.push(a.expandedStates[c]);else r.push(a.contents);else a.contents&&r.push(a.contents)}else n(r.pop())}}function w(e,t){if("concat"===e.type||"fill"===e.type){var n=e.parts.map(function(e){return w(e,t)});return t(Object.assign({},e,{parts:n}))}if("if-break"===e.type){var i=e.breakContents&&w(e.breakContents,t),r=e.flatContents&&w(e.flatContents,t);return t(Object.assign({},e,{breakContents:i,flatContents:r}))}if(e.contents){var a=w(e.contents,t);return t(Object.assign({},e,{contents:a}))}return t(e)}function O(e,t,n){var i=n,r=!1;return N(e,function(e){var n=t(e);if(void 0!==n&&(r=!0,i=n),r)return!1}),i}function R(e){return"string"!=typeof e&&("line"===e.type||void 0)}function D(e){return!("group"!==e.type||!e.break)||(!("line"!==e.type||!e.hard)||("break-parent"===e.type||void 0))}function $(e){if(e.length>0){var t=e[e.length-1];t.expandedStates||(t.break=!0)}return null}function I(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}var L=S,M={isEmpty:function(e){return"string"==typeof e&&0===e.length},willBreak:function(e){return O(e,D,!1)},isLineNext:function(e){return O(e,R,!1)},traverseDoc:N,mapDoc:w,propagateBreaks:function(e){var t=new Set,n=[];N(e,function(e){if("break-parent"===e.type&&$(n),"group"===e.type){if(n.push(e),t.has(e))return!1;t.add(e)}},function(e){"group"===e.type&&n.pop().break&&$(n)},!0)},removeLines:function(e){return w(e,I)},stripTrailingHardline:function e(t){if("concat"===t.type&&0!==t.parts.length){var n=t.parts[t.parts.length-1];if("concat"===n.type)return 2===n.parts.length&&n.parts[0].hard&&"break-parent"===n.parts[1].type?{type:"concat",parts:t.parts.slice(0,-1)}:{type:"concat",parts:t.parts.slice(0,-1).concat(e(n))}}return t}},F=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],B=Object.freeze({default:F}),U=["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],X=["title"],j=["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],q=["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],V=["autoplay","controls","crossorigin","loop","muted","preload","src"],z=["href","target"],W=["color","face","size"],G=["dir"],H=["cite"],Q=["alink","background","bgcolor","link","text","vlink"],K=["clear"],Y=["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],Z=["height","width"],J=["align"],ee=["align","char","charoff","span","valign","width"],te=["align","char","charoff","span","valign","width"],ne=["value"],ie=["cite","datetime"],re=["open"],ae=["title"],oe=["open"],se=["compact"],ce=["align"],ue=["compact"],le=["height","src","type","width"],he=["disabled","form","name"],pe=["color","face","size"],fe=["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],de=["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],me=["cols","rows"],ve=["align"],_e=["align"],ye=["align"],ge=["align"],Te=["align"],Se=["align"],ke=["profile"],Ce=["align","noshade","size","width"],Ee=["manifest","version"],be=["align","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],Ae=["align","alt","border","crossorigin","decoding","height","hspace","ismap","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],xe=["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],Pe=["cite","datetime"],Ne=["prompt"],we=["accesskey","for","form"],Oe=["accesskey","align"],Re=["type","value"],De=["as","charset","color","crossorigin","href","hreflang","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],$e=["name"],Ie=["compact"],Le=["charset","content","http-equiv","name","scheme"],Me=["high","low","max","min","optimum","value"],Fe=["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],Be=["compact","reversed","start","type"],Ue=["disabled","label"],Xe=["disabled","label","selected","value"],je=["for","form","name"],qe=["align"],Ve=["name","type","value","valuetype"],ze=["width"],We=["max","value"],Ge=["cite"],He=["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],Qe=["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],Ke=["name"],Ye=["media","sizes","src","srcset","type"],Ze=["media","nonce","title","type"],Je=["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],et=["align","char","charoff","valign"],tt=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],nt=["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],it=["align","char","charoff","valign"],rt=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],at=["align","char","charoff","valign"],ot=["datetime"],st=["align","bgcolor","char","charoff","valign"],ct=["default","kind","label","src","srclang"],ut=["compact","type"],lt=["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"],ht={a:U,abbr:X,applet:j,area:q,audio:V,base:z,basefont:W,bdo:G,blockquote:H,body:Q,br:K,button:Y,canvas:Z,caption:J,col:ee,colgroup:te,data:ne,del:ie,details:re,dfn:ae,dialog:oe,dir:se,div:ce,dl:ue,embed:le,fieldset:he,font:pe,form:fe,frame:de,frameset:me,h1:ve,h2:_e,h3:ye,h4:ge,h5:Te,h6:Se,head:ke,hr:Ce,html:Ee,iframe:be,img:Ae,input:xe,ins:Pe,isindex:Ne,label:we,legend:Oe,li:Re,link:De,map:$e,menu:Ie,meta:Le,meter:Me,object:Fe,ol:Be,optgroup:Ue,option:Xe,output:je,p:qe,param:Ve,pre:ze,progress:We,q:Ge,script:He,select:Qe,slot:Ke,source:Ye,style:Ze,table:Je,tbody:et,td:tt,textarea:nt,tfoot:it,th:rt,thead:at,time:ot,tr:st,track:ct,ul:ut,video:lt,"*":["accesskey","autocapitalize","class","contenteditable","dir","draggable","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"]},pt=Object.freeze({a:U,abbr:X,applet:j,area:q,audio:V,base:z,basefont:W,bdo:G,blockquote:H,body:Q,br:K,button:Y,canvas:Z,caption:J,col:ee,colgroup:te,data:ne,del:ie,details:re,dfn:ae,dialog:oe,dir:se,div:ce,dl:ue,embed:le,fieldset:he,font:pe,form:fe,frame:de,frameset:me,h1:ve,h2:_e,h3:ye,h4:ge,h5:Te,h6:Se,head:ke,hr:Ce,html:Ee,iframe:be,img:Ae,input:xe,ins:Pe,isindex:Ne,label:we,legend:Oe,li:Re,link:De,map:$e,menu:Ie,meta:Le,meter:Me,object:Fe,ol:Be,optgroup:Ue,option:Xe,output:je,p:qe,param:Ve,pre:ze,progress:We,q:Ge,script:He,select:Qe,slot:Ke,source:Ye,style:Ze,table:Je,tbody:et,td:tt,textarea:nt,tfoot:it,th:rt,thead:at,time:ot,tr:st,track:ct,ul:ut,video:lt,default:ht});const ft={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"none",rp:"none",script:"none",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",video:"inline-block",audio:"inline-block"},dt="inline",mt={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},vt="normal";var _t=B&&F||B,yt=pt&&ht||pt,gt=L.concat,Tt=M.mapDoc,St=ft,kt=dt,Ct=mt,Et=vt,bt=At(_t);function At(e){var t=Object.create(null),n=!0,i=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){t[a.value]=!0}}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}return t}function xt(e){return!("element"!==e.type||"template"!==e.fullName||!e.attrMap.lang||"html"===e.attrMap.lang)||(!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||!(!Ft(e)||!e.children.some(function(e){return"text"!==e.type&&"interpolation"!==e.type}))))}function Pt(e){return"attribute"!==e.type&&"text"!==e.type&&(!!e.parent&&("number"==typeof e.index&&0!==e.index&&function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])))}function Nt(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName)}function wt(e){return"yaml"===e.type||"toml"===e.type}function Ot(e){return Bt(e).startsWith("pre")}function Rt(e,t){return e.split(/(\n)/g).map(function(e,n){return n%2==1?t:e})}function Dt(e){return"element"===e.type&&0!==e.children.length&&(-1!==["html","head","ul","ol","select"].indexOf(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function $t(e){return Lt(e)||"element"===e.type&&"br"===e.fullName||It(e)}function It(e){return function(e){return"element"===e.type&&!e.namespace&&(e.name.includes("-")||/[A-Z]/.test(e.name[0]))}(e)&&function(e){return function(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}(e)}(e)}function Lt(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return-1!==["script","select"].indexOf(e.name)}return!1}function Mt(e){return"block"===e||"list-item"===e||e.startsWith("table")}function Ft(e){return Bt(e).startsWith("pre")}function Bt(e){return"element"===e.type&&!e.namespace&&Ct[e.name]||Et}function Ut(e){var t=1/0,n=!0,i=!1,r=void 0;try{for(var a,o=e.split("\n")[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;if(0!==s.length){if(/\S/.test(s[0]))return 0;var c=s.match(/^\s*/)[0].length;s.length!==c&&c1&&void 0!==arguments[1]?arguments[1]:Ut(e);return 0===t?e:e.split("\n").map(function(e){return e.slice(t)}).join("\n")}var jt={HTML_ELEMENT_ATTRIBUTES:function(e,t){for(var n=Object.create(null),i=Object.keys(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:function(){return!0},i=0,r=t.stack.length-1;r>=0;r--){var a=t.stack[r];a&&"object"===e(a)&&!Array.isArray(a)&&n(a)&&i++}return i},dedentString:Xt,forceBreakChildren:Dt,forceBreakContent:function(e){return Dt(e)||"element"===e.type&&0!==e.children.length&&(-1!==["body","template","script","style"].indexOf(e.name)||e.children.some(function(e){return(t=e).children&&t.children.some(function(e){return"text"!==e.type});var t}))},forceNextEmptyLine:function(e){return wt(e)||e.next&&e.sourceSpan.end.line+1=o?Xt(" ".repeat(o)+t.slice(a)):t.slice(0,n).trim()+"\n"+Xt(i,r)},getLastDescendant:function e(t){return t.lastChild?e(t.lastChild):t},getNodeCssStyleDisplay:function(e,t){if(e.prev&&"comment"===e.prev.type){var n=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(n)return n[1]}var i=!1;if("element"===e.type&&"svg"===e.namespace){if(!function(e,t){for(var n=e;n;){if(t(n))return!0;n=n.parent}return!1}(e,function(e){return"svg:foreignObject"===e.fullName}))return"svg"===e.name?"inline-block":"block";i=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"element"===e.type&&(!e.namespace||i)&&St[e.name]||kt}},getNodeCssStyleWhiteSpace:Bt,getPrettierIgnoreAttributeCommentData:function(e){var t=e.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);return!!t&&(!t[1]||t[1].split(/\s+/))},hasPrettierIgnore:Pt,identity:function(e){return e},inferScriptParser:function(e){if("script"===e.name&&!e.attrMap.src){if(!e.attrMap.lang&&!e.attrMap.type||"module"===e.attrMap.type||"text/javascript"===e.attrMap.type||"text/babel"===e.attrMap.type||"application/javascript"===e.attrMap.type)return"babylon";if("application/x-typescript"===e.attrMap.type||"ts"===e.attrMap.lang||"tsx"===e.attrMap.lang)return"typescript";if("text/markdown"===e.attrMap.type)return"markdown"}if("style"===e.name){if(!e.attrMap.lang||"postcss"===e.attrMap.lang)return"css";if("scss"===e.attrMap.lang)return"scss";if("less"===e.attrMap.lang)return"less"}return null},isDanglingSpaceSensitiveNode:function(e){return!Mt(t=e.cssDisplay)&&"inline-block"!==t&&!Nt(e);var t},isFrontMatterNode:wt,isIndentationSensitiveNode:Ot,isLeadingSpaceSensitiveNode:function(e){return!(wt(e)||("text"!==e.type&&"interpolation"!==e.type||!e.prev||"text"!==e.prev.type&&"interpolation"!==e.prev.type)&&(!e.parent||"none"===e.parent.cssDisplay||!e.prev&&"element"===e.parent.type&&e.parent.tagDefinition.ignoreFirstLf||!Ft(e.parent)&&(!e.prev&&("root"===e.parent.type||Nt(e.parent)||(t=e.parent.cssDisplay,Mt(t)||"inline-block"===t))||e.prev&&!function(e){return!Mt(e)}(e.prev.cssDisplay))));var t},isPreLikeNode:Ft,isScriptLikeTag:Nt,isTrailingSpaceSensitiveNode:function(e){return!(wt(e)||("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)&&(!e.parent||"none"===e.parent.cssDisplay||!Ft(e.parent)&&(!e.next&&("root"===e.parent.type||Nt(e.parent)||(t=e.parent.cssDisplay,Mt(t)||"inline-block"===t))||e.next&&!function(e){return!Mt(e)}(e.next.cssDisplay))));var t},isWhitespaceSensitiveNode:function(e){return Nt(e)||"interpolation"===e.type||Ot(e)},normalizeParts:function(e){for(var t=[],n=e.slice();0!==n.length;){var i=n.shift();i&&("concat"!==i.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof i?t.push(i):t.push(t.pop()+i):Array.prototype.unshift.apply(n,i.parts))}return t},preferHardlineAsLeadingSpaces:function(e){return Lt(e)||e.prev&&$t(e.prev)||It(e)},preferHardlineAsTrailingSpaces:$t,replaceDocNewlines:function(e,t){return Tt(e,function(e){return"string"==typeof e&&e.includes("\n")?gt(Rt(e,t)):e})},replaceNewlines:Rt,shouldNotPrintClosingTag:function(e){return!e.isSelfClosing&&!e.endSourceSpan&&(Pt(e)||xt(e.parent))},shouldPreserveContent:xt};var qt=function(e){return/^\s*/.test(e)};var Vt=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n},zt={attrs:!0,children:!0},Wt=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e);for(var i=Object.keys(n),r=0;r",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞",int:"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"‎",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"‏",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"‍",zwnj:"‌"},t.NGSP_UNICODE="",t.NAMED_ENTITIES.ngsp=t.NGSP_UNICODE});k(Kt);var Yt=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r,a,o=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.closedByChildren,a=i.requiredParents,o=i.implicitNamespacePrefix,s=i.contentType,c=void 0===s?Kt.TagContentType.PARSABLE_DATA:s,u=i.closedByParent,l=void 0!==u&&u,h=i.isVoid,p=void 0!==h&&h,f=i.ignoreFirstLf,d=void 0!==f&&f;t(this,e),this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,r&&r.length>0&&r.forEach(function(e){return n.closedByChildren[e]=!0}),this.isVoid=p,this.closedByParent=l||p,a&&a.length>0&&(this.requiredParents={},this.parentToAdd=a[0],a.forEach(function(e){return n.requiredParents[e]=!0})),this.implicitNamespacePrefix=o||null,this.contentType=c,this.ignoreFirstLf=d}return i(e,[{key:"requireExtraParent",value:function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return!("template"===t||"ng-template"===e)&&1!=this.requiredParents[t]}},{key:"isClosedByChild",value:function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}]),e}();n.HtmlTagDefinition=o,n.getHtmlTagDefinition=function(e){return a||(r=new o,a={base:new o({isVoid:!0}),meta:new o({isVoid:!0}),area:new o({isVoid:!0}),embed:new o({isVoid:!0}),link:new o({isVoid:!0}),img:new o({isVoid:!0}),input:new o({isVoid:!0}),param:new o({isVoid:!0}),hr:new o({isVoid:!0}),br:new o({isVoid:!0}),source:new o({isVoid:!0}),track:new o({isVoid:!0}),wbr:new o({isVoid:!0}),p:new o({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new o({closedByChildren:["tbody","tfoot"]}),tbody:new o({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new o({closedByChildren:["tbody"],closedByParent:!0}),tr:new o({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new o({closedByChildren:["td","th"],closedByParent:!0}),th:new o({closedByChildren:["td","th"],closedByParent:!0}),col:new o({requiredParents:["colgroup"],isVoid:!0}),svg:new o({implicitNamespacePrefix:"svg"}),math:new o({implicitNamespacePrefix:"math"}),li:new o({closedByChildren:["li"],closedByParent:!0}),dt:new o({closedByChildren:["dt","dd"]}),dd:new o({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new o({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new o({closedByChildren:["optgroup"],closedByParent:!0}),option:new o({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new o({ignoreFirstLf:!0}),listing:new o({ignoreFirstLf:!0}),style:new o({contentType:Kt.TagContentType.RAW_TEXT}),script:new o({contentType:Kt.TagContentType.RAW_TEXT}),title:new o({contentType:Kt.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new o({contentType:Kt.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),a[e.toLowerCase()]||r}});k(Yt);var Zt=C(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayOfStrings=function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '".concat(e,"' to be an array of strings."));for(var n=0;n]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){var i=t[0],r=t[1];n.forEach(function(e){if(e.test(i)||e.test(r))throw new Error("['".concat(i,"', '").concat(r,"'] contains unusable interpolation symbol."))})}}});k(Zt);var Jt=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(n,i){t(this,e),this.start=n,this.end=i}return i(e,null,[{key:"fromArray",value:function(t){return t?(Zt.assertInterpolationSymbols("interpolation",t),new e(t[0],t[1])):n.DEFAULT_INTERPOLATION_CONFIG}}]),e}();n.InterpolationConfig=r,n.DEFAULT_INTERPOLATION_CONFIG=new r("{{","}}")});k(Jt);var en=C(function(e,t){function n(e){return t.$0<=e&&e<=t.$9}Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=n,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||n(e)}});k(en);var tn=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(n,i,r){t(this,e),this.filePath=n,this.name=i,this.members=r}return i(e,[{key:"assertNoMembers",value:function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}]),e}();n.StaticSymbol=r;var a=function(){function e(){t(this,e),this.cache=new Map}return i(e,[{key:"get",value:function(e,t,n){var i=(n=n||[]).length?".".concat(n.join(".")):"",a='"'.concat(e,'".').concat(t).concat(i),o=this.cache.get(a);return o||(o=new r(e,t,n),this.cache.set(a,o)),o}}]),e}();n.StaticSymbolCache=a});k(tn);var nn=C(function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var a=/-+([a-z0-9])/g;function o(e,t,n){var i=e.indexOf(t);return-1==i?n:[e.slice(0,i).trim(),e.slice(i+1).trim()]}function s(t,n,i){return Array.isArray(t)?n.visitArray(t,i):"object"===e(r=t)&&null!==r&&Object.getPrototypeOf(r)===h?n.visitStringMap(t,i):null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t?n.visitPrimitive(t,i):n.visitOther(t,i);var r}r.dashCaseToCamelCase=function(e){return e.replace(a,function(){for(var e=arguments.length,t=new Array(e),n=0;n=55296&&i<=56319&&e.length>n+1){var r=e.charCodeAt(n+1);r>=56320&&r<=57343&&(n++,i=(i-55296<<10)+r-56320+65536)}i<=127?t+=String.fromCharCode(i):i<=2047?t+=String.fromCharCode(i>>6&31|192,63&i|128):i<=65535?t+=String.fromCharCode(i>>12|224,i>>6&63|128,63&i|128):i<=2097151&&(t+=String.fromCharCode(i>>18&7|240,i>>12&63|128,i>>6&63|128,63&i|128))}return t},r.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);var n=t.toString();if(null==n)return""+n;var i=n.indexOf("\n");return-1===i?n:n.substring(0,i)},r.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},r.isPromise=p;r.Version=function e(n){t(this,e),this.full=n;var i=n.split(".");this.major=i[0],this.minor=i[1],this.patch=i.slice(2).join(".")}});k(nn);var rn=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function a(e){return e.replace(/\W/g,"_")}n.sanitizeIdentifier=a;var o,s=0;function c(e){if(!e||!e.reference)return null;var t=e.reference;if(t instanceof tn.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;var n=nn.stringify(t);return n.indexOf("(")>=0?(n="anonymous_".concat(s++),t.__anonymousType=n):n=a(n),n}n.identifierName=c,n.identifierModuleUrl=function(e){var t=e.reference;return t instanceof tn.StaticSymbol?t.filePath:"./".concat(nn.stringify(t))},n.viewClassName=function(e,t){return"View_".concat(c({reference:e}),"_").concat(t)},n.rendererTypeName=function(e){return"RenderType_".concat(c({reference:e}))},n.hostViewClassName=function(e){return"HostView_".concat(c({reference:e}))},n.componentFactoryName=function(e){return"".concat(c({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(o=n.CompileSummaryKind||(n.CompileSummaryKind={})),n.tokenName=function(e){return null!=e.value?a(e.value):c(e.identifier)},n.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};n.CompileStylesheetMetadata=function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.moduleUrl,r=n.styles,a=n.styleUrls;t(this,e),this.moduleUrl=i||null,this.styles=d(r),this.styleUrls=d(a)};var u=function(){function e(n){var i=n.encapsulation,r=n.template,a=n.templateUrl,o=n.htmlAst,s=n.styles,c=n.styleUrls,u=n.externalStylesheets,l=n.animations,h=n.ngContentSelectors,p=n.interpolation,f=n.isInline,v=n.preserveWhitespaces;if(t(this,e),this.encapsulation=i,this.template=r,this.templateUrl=a,this.htmlAst=o,this.styles=d(s),this.styleUrls=d(c),this.externalStylesheets=d(u),this.animations=l?m(l):[],this.ngContentSelectors=h||[],p&&2!=p.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=p,this.isInline=f,this.preserveWhitespaces=v}return i(e,[{key:"toSummary",value:function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}}]),e}();n.CompileTemplateMetadata=u;var l=function(){function e(n){var i=n.isHost,r=n.type,a=n.isComponent,o=n.selector,s=n.exportAs,c=n.changeDetection,u=n.inputs,l=n.outputs,h=n.hostListeners,p=n.hostProperties,f=n.hostAttributes,m=n.providers,v=n.viewProviders,_=n.queries,y=n.guards,g=n.viewQueries,T=n.entryComponents,S=n.template,k=n.componentViewType,C=n.rendererType,E=n.componentFactory;t(this,e),this.isHost=!!i,this.type=r,this.isComponent=a,this.selector=o,this.exportAs=s,this.changeDetection=c,this.inputs=u,this.outputs=l,this.hostListeners=h,this.hostProperties=p,this.hostAttributes=f,this.providers=d(m),this.viewProviders=d(v),this.queries=d(_),this.guards=y,this.viewQueries=d(g),this.entryComponents=d(T),this.template=S,this.componentViewType=k,this.rendererType=C,this.componentFactory=E}return i(e,null,[{key:"create",value:function(t){var n=t.isHost,i=t.type,a=t.isComponent,o=t.selector,s=t.exportAs,c=t.changeDetection,u=t.inputs,l=t.outputs,h=t.host,p=t.providers,f=t.viewProviders,d=t.queries,m=t.guards,v=t.viewQueries,_=t.entryComponents,y=t.template,g=t.componentViewType,T=t.rendererType,S=t.componentFactory,k={},C={},E={};null!=h&&Object.keys(h).forEach(function(e){var t=h[e],n=e.match(r);null===n?E[e]=t:null!=n[1]?C[n[1]]=t:null!=n[2]&&(k[n[2]]=t)});var b={};null!=u&&u.forEach(function(e){var t=nn.splitAtColon(e,[e,e]);b[t[0]]=t[1]});var A={};return null!=l&&l.forEach(function(e){var t=nn.splitAtColon(e,[e,e]);A[t[0]]=t[1]}),new e({isHost:n,type:i,isComponent:!!a,selector:o,exportAs:s,changeDetection:c,inputs:b,outputs:A,hostListeners:k,hostProperties:C,hostAttributes:E,providers:p,viewProviders:f,queries:d,guards:m,viewQueries:v,entryComponents:_,template:y,componentViewType:g,rendererType:T,componentFactory:S})}}]),i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}]),e}();n.CompileDirectiveMetadata=l;var h=function(){function e(n){var i=n.type,r=n.name,a=n.pure;t(this,e),this.type=i,this.name=r,this.pure=!!a}return i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Pipe,type:this.type,name:this.name,pure:this.pure}}}]),e}();n.CompilePipeMetadata=h;n.CompileShallowModuleMetadata=function e(){t(this,e)};var p=function(){function e(n){var i=n.type,r=n.providers,a=n.declaredDirectives,o=n.exportedDirectives,s=n.declaredPipes,c=n.exportedPipes,u=n.entryComponents,l=n.bootstrapComponents,h=n.importedModules,p=n.exportedModules,f=n.schemas,m=n.transitiveModule,v=n.id;t(this,e),this.type=i||null,this.declaredDirectives=d(a),this.exportedDirectives=d(o),this.declaredPipes=d(s),this.exportedPipes=d(c),this.providers=d(r),this.entryComponents=d(u),this.bootstrapComponents=d(l),this.importedModules=d(h),this.exportedModules=d(p),this.schemas=d(f),this.id=v||null,this.transitiveModule=m||null}return i(e,[{key:"toSummary",value:function(){var e=this.transitiveModule;return{summaryKind:o.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}}]),e}();n.CompileNgModuleMetadata=p;var f=function(){function e(){t(this,e),this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return i(e,[{key:"addProvider",value:function(e,t){this.providers.push({provider:e,module:t})}},{key:"addDirective",value:function(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}},{key:"addExportedDirective",value:function(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}},{key:"addPipe",value:function(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}},{key:"addExportedPipe",value:function(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}},{key:"addModule",value:function(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}},{key:"addEntryComponent",value:function(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}}]),e}();function d(e){return e||[]}n.TransitiveCompileNgModuleMetadata=f;function m(e){return e.reduce(function(e,t){var n=Array.isArray(t)?m(t):t;return e.concat(n)},[])}function v(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}n.ProviderMeta=function e(n,i){var r=i.useClass,a=i.useValue,o=i.useExisting,s=i.useFactory,c=i.deps,u=i.multi;t(this,e),this.token=n,this.useClass=r||null,this.useValue=a,this.useExisting=o,this.useFactory=s||null,this.dependencies=c||null,this.multi=!!u},n.flatten=m,n.templateSourceUrl=function(e,t,n){var i;return i=n.isInline?t.type.reference instanceof tn.StaticSymbol?"".concat(t.type.reference.filePath,".").concat(t.type.reference.name,".html"):"".concat(c(e),"/").concat(c(t.type),".html"):n.templateUrl,t.type.reference instanceof tn.StaticSymbol?i:v(i)},n.sharedStylesheetJitUrl=function(e,t){var n=e.moduleUrl.split(/\/\\/g),i=n[n.length-1];return v("css/".concat(t).concat(i,".ngstyle.js"))},n.ngModuleJitUrl=function(e){return v("".concat(c(e.type),"/module.ngfactory.js"))},n.templateJitUrl=function(e,t){return v("".concat(c(e),"/").concat(c(t.type),".ngfactory.js"))}});k(rn);var an=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(n,i,r,a){t(this,e),this.file=n,this.offset=i,this.line=r,this.col=a}return i(e,[{key:"toString",value:function(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}},{key:"moveBy",value:function(t){for(var n=this.file.content,i=n.length,r=this.offset,a=this.line,o=this.col;r>0&&t<0;){if(r--,t++,n.charCodeAt(r)==en.$LF){a--;var s=n.substr(0,r-1).lastIndexOf(String.fromCharCode(en.$LF));o=s>0?r-s:r}else o--}for(;r0;){var c=n.charCodeAt(r);r++,t--,c==en.$LF?(a++,o=0):o++}return new e(this.file,r,a,o)}},{key:"getContext",value:function(e,t){var n=this.file.content,i=this.offset;if(null!=i){i>n.length-1&&(i=n.length-1);for(var r=i,a=0,o=0;a0&&(a++,"\n"!=n[--i]||++o!=t););for(a=0,o=0;a2&&void 0!==arguments[2]?arguments[2]:null;t(this,e),this.start=n,this.end=i,this.details=r}return i(e,[{key:"toString",value:function(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}]),e}();n.ParseSourceSpan=s,function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(o=n.ParseErrorLevel||(n.ParseErrorLevel={}));var c=function(){function e(n,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.ERROR;t(this,e),this.span=n,this.msg=i,this.level=r}return i(e,[{key:"contextualMessage",value:function(){var e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(o[this.level]," ->]").concat(e.after,'")'):this.msg}},{key:"toString",value:function(){var e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}}]),e}();n.ParseError=c,n.typeSourceSpan=function(e,t){var n=rn.identifierModuleUrl(t),i=null!=n?"in ".concat(e," ").concat(rn.identifierName(t)," in ").concat(n):"in ".concat(e," ").concat(rn.identifierName(t)),o=new a("",i);return new s(new r(o,-1,-1,-1),new r(o,-1,-1,-1))}});k(an);var on=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t(this,e),this.path=n,this.position=i}return i(e,[{key:"parentOf",value:function(e){return e&&this.path[this.path.indexOf(e)-1]}},{key:"childOf",value:function(e){return this.path[this.path.indexOf(e)+1]}},{key:"first",value:function(e){for(var t=this.path.length-1;t>=0;t--){var n=this.path[t];if(n instanceof e)return n}}},{key:"push",value:function(e){this.path.push(e)}},{key:"pop",value:function(){return this.path.pop()}},{key:"empty",get:function(){return!this.path||!this.path.length}},{key:"head",get:function(){return this.path[0]}},{key:"tail",get:function(){return this.path[this.path.length-1]}}]),e}();n.AstPath=r});k(on);var sn=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(n,i){t(this,e),this.value=n,this.sourceSpan=i}return i(e,[{key:"visit",value:function(e,t){return e.visitText(this,t)}}]),e}();n.Text=o;var c=function(){function e(n,i){t(this,e),this.value=n,this.sourceSpan=i}return i(e,[{key:"visit",value:function(e,t){return e.visitCdata(this,t)}}]),e}();n.CDATA=c;var u=function(){function e(n,i,r,a,o){t(this,e),this.switchValue=n,this.type=i,this.cases=r,this.sourceSpan=a,this.switchValueSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansion(this,t)}}]),e}();n.Expansion=u;var l=function(){function e(n,i,r,a,o){t(this,e),this.value=n,this.expression=i,this.sourceSpan=r,this.valueSourceSpan=a,this.expSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansionCase(this,t)}}]),e}();n.ExpansionCase=l;var h=function(){function e(n,i,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;t(this,e),this.name=n,this.value=i,this.sourceSpan=r,this.valueSpan=a,this.nameSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitAttribute(this,t)}}]),e}();n.Attribute=h;var p=function(){function e(n,i,r,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;t(this,e),this.name=n,this.attrs=i,this.children=r,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=s,this.nameSpan=c}return i(e,[{key:"visit",value:function(e,t){return e.visitElement(this,t)}}]),e}();n.Element=p;var f=function(){function e(n,i){t(this,e),this.value=n,this.sourceSpan=i}return i(e,[{key:"visit",value:function(e,t){return e.visitComment(this,t)}}]),e}();n.Comment=f;var d=function(){function e(n,i){t(this,e),this.value=n,this.sourceSpan=i}return i(e,[{key:"visit",value:function(e,t){return e.visitDocType(this,t)}}]),e}();function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=[],r=e.visit?function(t){return e.visit(t,n)||t.visit(e,n)}:function(t){return t.visit(e,n)};return t.forEach(function(e){var t=r(e);t&&i.push(t)}),i}n.DocType=d,n.visitAll=m;var v=function(){function e(){t(this,e)}return i(e,[{key:"visitElement",value:function(e,t){this.visitChildren(t,function(t){t(e.attrs),t(e.children)})}},{key:"visitAttribute",value:function(e,t){}},{key:"visitText",value:function(e,t){}},{key:"visitCdata",value:function(e,t){}},{key:"visitComment",value:function(e,t){}},{key:"visitDocType",value:function(e,t){}},{key:"visitExpansion",value:function(e,t){return this.visitChildren(t,function(t){t(e.cases)})}},{key:"visitExpansionCase",value:function(e,t){}},{key:"visitChildren",value:function(e,t){var n=[],i=this;return t(function(t){t&&n.push(m(i,t,e))}),[].concat.apply([],n)}}]),e}();n.RecursiveVisitor=v,n.findNode=function(e,n){var o=[];return m(new(function(e){function c(){return t(this,c),s(this,a(c).apply(this,arguments))}return r(c,v),i(c,[{key:"visit",value:function(e,t){var i=function e(t){var n=t.sourceSpan.start.offset,i=t.sourceSpan.end.offset;return t instanceof p&&(t.endSourceSpan?i=t.endSourceSpan.end.offset:t.children&&t.children.length&&(i=e(t.children[t.children.length-1]).end)),{start:n,end:i}}(e);if(!(i.start<=n&&n3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Jt.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return new m(new an.ParseSourceFile(e,t),n,i,r,a).tokenize()};var h=/\r\n?/g;function p(e){var t=e===en.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function f(e){return'Unknown entity "'.concat(e,'" - use the "&#;" or "&#x;" syntax')}var d=function e(n){t(this,e),this.error=n},m=function(){function e(n,i,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jt.DEFAULT_INTERPOLATION_CONFIG,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];t(this,e),this._file=n,this._getTagDefinition=i,this._tokenizeIcu=r,this._interpolationConfig=a,this.canSelfClose=o,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=n.content,this._length=n.content.length,this._advance()}return i(e,[{key:"_processCarriageReturns",value:function(e){return e.replace(h,"\n")}},{key:"tokenize",value:function(){for(;this._peek!==en.$EOF;){var e=this._getLocation();try{this._attemptCharCode(en.$LT)?this._attemptCharCode(en.$BANG)?this._attemptCharCode(en.$LBRACKET)?this._consumeCdata(e):this._attemptCharCode(en.$MINUS)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(en.$SLASH)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){if(!(e instanceof d))throw e;this.errors.push(e.error)}}return this._beginToken(o.EOF),this._endToken([]),new l(function(e){for(var t=[],n=void 0,i=0;i0&&void 0!==arguments[0]?arguments[0]:this._getLocation(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation();return new an.ParseSourceSpan(e,t)}},{key:"_beginToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation();this._currentTokenStart=t,this._currentTokenType=e}},{key:"_endToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation(),n=new c(this._currentTokenType,e,new an.ParseSourceSpan(this._currentTokenStart,t));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}},{key:"_createError",value:function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new u(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new d(n)}},{key:"_advance",value:function(){if(this._index>=this._length)throw this._createError(p(en.$EOF),this._getSpan());this._peek===en.$LF?(this._line++,this._column=0):this._peek!==en.$LF&&this._peek!==en.$CR&&this._column++,this._index++,this._peek=this._index>=this._length?en.$EOF:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?en.$EOF:this._input.charCodeAt(this._index+1)}},{key:"_attemptCharCode",value:function(e){return this._peek===e&&(this._advance(),!0)}},{key:"_attemptCharCodeCaseInsensitive",value:function(e){return t=this._peek,n=e,S(t)==S(n)&&(this._advance(),!0);var t,n}},{key:"_requireCharCode",value:function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(p(this._peek),this._getSpan(t,t))}},{key:"_attemptStr",value:function(e){var t=e.length;if(this._index+t>this._length)return!1;for(var n=this._savePosition(),i=0;ii.offset&&a.push(this._input.substring(i.offset,this._index));this._peek!==t;)a.push(this._readChar(e));return this._endToken([this._processCarriageReturns(a.join(""))],i)}},{key:"_consumeComment",value:function(e){var t=this;this._beginToken(o.COMMENT_START,e),this._requireCharCode(en.$MINUS),this._endToken([]);var n=this._consumeRawText(!1,en.$MINUS,function(){return t._attemptStr("->")});this._beginToken(o.COMMENT_END,n.sourceSpan.end),this._endToken([])}},{key:"_consumeCdata",value:function(e){var t=this;this._beginToken(o.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]);var n=this._consumeRawText(!1,en.$RBRACKET,function(){return t._attemptStr("]>")});this._beginToken(o.CDATA_END,n.sourceSpan.end),this._endToken([])}},{key:"_consumeDocType",value:function(e){this._beginToken(o.DOC_TYPE_START,e),this._requireStrCaseInsensitive("DOCTYPE"),this._endToken([]),this._attemptCharCodeUntilFn(v);var t=this._consumeRawText(!1,en.$GT,function(){return!0});this._beginToken(o.DOC_TYPE_END,t.sourceSpan.end),this._endToken([])}},{key:"_consumePrefixAndName",value:function(){for(var e,t,n=this._index,i=null;this._peek!==en.$COLON&&!(((e=this._peek)en.$9));)this._advance();return this._peek===en.$COLON?(this._advance(),i=this._input.substring(n,this._index-1),t=this._index):t=n,this._requireCharCodeUntilFn(_,this._index===t?1:0),[i,this._input.substring(t,this._index)]}},{key:"_consumeTagOpen",value:function(e){var t,n,i=this._savePosition();try{if(!en.isAsciiLetter(this._peek))throw this._createError(p(this._peek),this._getSpan());var r=this._index;for(this._consumeTagOpenStart(e),n=(t=this._input.substring(r,this._index)).toLowerCase(),this._attemptCharCodeUntilFn(v);this._peek!==en.$SLASH&&this._peek!==en.$GT;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(v),this._attemptCharCode(en.$EQ)&&(this._attemptCharCodeUntilFn(v),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(v);this._consumeTagOpenEnd()}catch(t){if(t instanceof d)return this._restorePosition(i),this._beginToken(o.TEXT,e),void this._endToken(["<"]);throw t}if(!this.canSelfClose||this.tokens[this.tokens.length-1].type!==o.TAG_OPEN_END_VOID){var a=this._getTagDefinition(t).contentType;a===Kt.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(n,!1):a===Kt.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,!0)}}},{key:"_consumeRawTextWithTagClose",value:function(e,t){var n=this,i=this._consumeRawText(t,en.$LT,function(){return!!n._attemptCharCode(en.$SLASH)&&(n._attemptCharCodeUntilFn(v),!!n._attemptStrCaseInsensitive(e)&&(n._attemptCharCodeUntilFn(v),n._attemptCharCode(en.$GT)))});this._beginToken(o.TAG_CLOSE,i.sourceSpan.end),this._endToken([null,e])}},{key:"_consumeTagOpenStart",value:function(e){this._beginToken(o.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)}},{key:"_consumeAttributeName",value:function(){this._beginToken(o.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)}},{key:"_consumeAttributeValue",value:function(){var e;if(this._beginToken(o.ATTR_VALUE),this._peek===en.$SQ||this._peek===en.$DQ){var t=this._peek;this._advance();for(var n=[];this._peek!==t;)n.push(this._readChar(!0));e=n.join(""),this._advance()}else{var i=this._index;this._requireCharCodeUntilFn(_,1),e=this._input.substring(i,this._index)}this._endToken([this._processCarriageReturns(e)])}},{key:"_consumeTagOpenEnd",value:function(){var e=this._attemptCharCode(en.$SLASH)?o.TAG_OPEN_END_VOID:o.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(en.$GT),this._endToken([])}},{key:"_consumeTagClose",value:function(e){this._beginToken(o.TAG_CLOSE,e),this._attemptCharCodeUntilFn(v);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(v),this._requireCharCode(en.$GT),this._endToken(t)}},{key:"_consumeExpansionFormStart",value:function(){this._beginToken(o.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(en.$LBRACE),this._endToken([]),this._expansionCaseStack.push(o.EXPANSION_FORM_START),this._beginToken(o.RAW_TEXT,this._getLocation());var e=this._readUntil(en.$COMMA);this._endToken([e],this._getLocation()),this._requireCharCode(en.$COMMA),this._attemptCharCodeUntilFn(v),this._beginToken(o.RAW_TEXT,this._getLocation());var t=this._readUntil(en.$COMMA);this._endToken([t],this._getLocation()),this._requireCharCode(en.$COMMA),this._attemptCharCodeUntilFn(v)}},{key:"_consumeExpansionCaseStart",value:function(){this._beginToken(o.EXPANSION_CASE_VALUE,this._getLocation());var e=this._readUntil(en.$LBRACE).trim();this._endToken([e],this._getLocation()),this._attemptCharCodeUntilFn(v),this._beginToken(o.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(en.$LBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(v),this._expansionCaseStack.push(o.EXPANSION_CASE_EXP_START)}},{key:"_consumeExpansionCaseEnd",value:function(){this._beginToken(o.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(en.$RBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(v),this._expansionCaseStack.pop()}},{key:"_consumeExpansionFormEnd",value:function(){this._beginToken(o.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(en.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}},{key:"_consumeText",value:function(){var e=this._getLocation();this._beginToken(o.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}},{key:"_isTextEnd",value:function(){if(this._peek===en.$LT||this._peek===en.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(T(this._input,this._index,this._interpolationConfig))return!0;if(this._peek===en.$RBRACE&&this._isInExpansionCase())return!0}return!1}},{key:"_savePosition",value:function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]}},{key:"_readUntil",value:function(e){var t=this._index;return this._attemptUntilChar(e),this._input.substring(t,this._index)}},{key:"_restorePosition",value:function(e){this._peek=e[0],this._index=e[1],this._column=e[2],this._line=e[3];var t=e[4];t0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===o.EXPANSION_CASE_EXP_START}},{key:"_isInExpansionForm",value:function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===o.EXPANSION_FORM_START}}]),e}();function v(e){return!en.isWhitespace(e)||e===en.$EOF}function _(e){return en.isWhitespace(e)||e===en.$GT||e===en.$SLASH||e===en.$SQ||e===en.$DQ||e===en.$EQ}function y(e){return e==en.$SEMICOLON||e==en.$EOF||!en.isAsciiHexDigit(e)}function g(e){return e==en.$SEMICOLON||e==en.$EOF||!en.isAsciiLetter(e)}function T(e,t,n){var i=!!n&&e.indexOf(n.start,t)==t;return e.charCodeAt(t)==en.$LBRACE&&!i}function S(e){return e>=en.$a&&e<=en.$z?e-en.$a+en.$A:e}});k(cn);var un=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var o=function(e){function n(e,i,r){var o;return t(this,n),(o=s(this,a(n).call(this,i,r))).elementName=e,o}return r(n,an.ParseError),i(n,null,[{key:"create",value:function(e,t,i){return new n(e,t,i)}}]),n}();n.TreeError=o;var c=function e(n,i){t(this,e),this.rootNodes=n,this.errors=i};n.ParseTreeResult=c;var u=function(){function e(n){t(this,e),this.getTagDefinition=n}return i(e,[{key:"parse",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jt.DEFAULT_INTERPOLATION_CONFIG,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=cn.tokenize(e,t,this.getTagDefinition,n,i,r),o=new l(a.tokens,this.getTagDefinition,r).build();return new c(o.rootNodes,a.errors.concat(o.errors))}}]),e}();n.Parser=u;var l=function(){function e(n,i,r){t(this,e),this.tokens=n,this.getTagDefinition=i,this.canSelfClose=r,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return i(e,[{key:"build",value:function(){for(;this._peek.type!==cn.TokenType.EOF;)this._peek.type===cn.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===cn.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===cn.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===cn.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===cn.TokenType.TEXT||this._peek.type===cn.TokenType.RAW_TEXT||this._peek.type===cn.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===cn.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===cn.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new c(this._rootNodes,this._errors)}},{key:"_advance",value:function(){var e=this._peek;return this._index0)return this._errors=this._errors.concat(a.errors),null;var s=new an.ParseSourceSpan(t.sourceSpan.start,r.sourceSpan.end),c=new an.ParseSourceSpan(n.sourceSpan.start,r.sourceSpan.end);return new sn.ExpansionCase(t.parts[0],a.rootNodes,s,t.sourceSpan,c)}},{key:"_collectExpansionExpTokens",value:function(e){for(var t=[],n=[cn.TokenType.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==cn.TokenType.EXPANSION_FORM_START&&this._peek.type!==cn.TokenType.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===cn.TokenType.EXPANSION_CASE_EXP_END){if(!h(n,cn.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(o.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===cn.TokenType.EXPANSION_FORM_END){if(!h(n,cn.TokenType.EXPANSION_FORM_START))return this._errors.push(o.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===cn.TokenType.EOF)return this._errors.push(o.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}},{key:"_getText",value:function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}return t}},{key:"_consumeText",value:function(e){var t=this._getText(e);t.length>0&&this._addToParent(new sn.Text(t,e.sourceSpan))}},{key:"_closeVoidElement",value:function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},{key:"_consumeStartTag",value:function(e){for(var t=e.parts[0],n=e.parts[1],i=[];this._peek.type===cn.TokenType.ATTR_NAME;)i.push(this._consumeAttr(this._advance()));var r=this._getElementFullName(t,n,this._getParentElement()),a=!1;if(this._peek.type===cn.TokenType.TAG_OPEN_END_VOID){this._advance(),a=!0;var s=this.getTagDefinition(r);this.canSelfClose||s.canSelfClose||null!==Kt.getNsPrefix(r)||s.isVoid||this._errors.push(o.create(r,e.sourceSpan,'Only void and foreign elements can be self closed "'.concat(e.parts[1],'"')))}else this._peek.type===cn.TokenType.TAG_OPEN_END&&(this._advance(),a=!1);var c=this._peek.sourceSpan.start,u=new an.ParseSourceSpan(e.sourceSpan.start,c),l=new an.ParseSourceSpan(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),h=new sn.Element(r,i,[],u,u,void 0,l);this._pushElement(h),a&&(this._popElement(r),h.endSourceSpan=u)}},{key:"_pushElement",value:function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop();var n=this.getTagDefinition(e.name),i=this._getParentElementSkippingContainers(),r=i.parent,a=i.container;if(r&&n.requireExtraParent(r.name)){var o=new sn.Element(n.parentToAdd,[],[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._insertBeforeContainer(r,a,o)}this._addToParent(e),this._elementStack.push(e)}},{key:"_consumeEndTag",value:function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid)this._errors.push(o.create(t,e.sourceSpan,'Void elements do not have end tags "'.concat(e.parts[1],'"')));else if(!this._popElement(t)){var n='Unexpected closing tag "'.concat(t,'". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags');this._errors.push(o.create(t,e.sourceSpan,n))}}},{key:"_popElement",value:function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(Kt.getNsPrefix(n.name)?n.name==e:n.name.toLowerCase()==e.toLowerCase())return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1}},{key:"_consumeAttr",value:function(e){var t=Kt.mergeNsAndName(e.parts[0],e.parts[1]),n=e.sourceSpan.end,i="",r=void 0;if(this._peek.type===cn.TokenType.ATTR_VALUE){var a=this._advance();i=a.parts[0],n=a.sourceSpan.end,r=a.sourceSpan}return new sn.Attribute(t,i,new an.ParseSourceSpan(e.sourceSpan.start,n),r,e.sourceSpan)}},{key:"_getParentElement",value:function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}},{key:"_getParentElementSkippingContainers",value:function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!Kt.isNgContainer(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}}},{key:"_addToParent",value:function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)}},{key:"_insertBeforeContainer",value:function(e,t,n){if(t){if(e){var i=e.children.indexOf(t);e.children[i]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)}},{key:"_getElementFullName",value:function(e,t,n){return null==e&&null==(e=this.getTagDefinition(t).implicitNamespacePrefix)&&null!=n&&(e=Kt.getNsPrefix(n.name)),Kt.mergeNsAndName(e,t)}}]),e}();function h(e,t){return e.length>0&&e[e.length-1]===t}});k(un);var ln=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var o=un;n.ParseTreeResult=o.ParseTreeResult,n.TreeError=o.TreeError;var u=function(e){function n(){return t(this,n),s(this,a(n).call(this,Yt.getHtmlTagDefinition))}return r(n,un.Parser),i(n,[{key:"parse",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jt.DEFAULT_INTERPOLATION_CONFIG,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return c(a(n.prototype),"parse",this).call(this,e,t,i,r,o)}}]),n}();n.HtmlParser=u});k(ln);var hn=C(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=null,i=function(){return n||(n=new ln.HtmlParser),n};t.parse=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).canSelfClose,n=void 0!==t&&t;return i().parse(e,"angular-html-parser",!1,void 0,n)}});k(hn);var pn=jt.HTML_ELEMENT_ATTRIBUTES,fn=jt.HTML_TAGS,dn=qt,mn=Qt.Node;function vn(e,n){var o=hn,c=sn.RecursiveVisitor,u=sn.visitAll,l=sn.Attribute,h=sn.CDATA,p=sn.Comment,f=sn.DocType,d=sn.Element,m=sn.Text,v=an.ParseSourceSpan,_=Yt.getHtmlTagDefinition,y=o.parse(e,{canSelfClose:n}),g=y.rootNodes,T=y.errors;if(0!==T.length){var S=T[0],k=S.msg,C=S.span.start,E=C.line,b=C.col;throw Vt(k,{start:{line:E+1,column:b}})}var A=function(e){var t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,n=e.nameSpan?e.nameSpan.toString():e.name,i=n.startsWith("".concat(t,":")),r=i?n.slice(t.length+1):n;e.name=r,e.namespace=t,e.hasExplicitNamespace=i},x=function(e,t){var n=e.toLowerCase();return t(n)?n:e};return u(new(function(e){function n(){return t(this,n),s(this,a(n).apply(this,arguments))}return r(n,c),i(n,[{key:"visit",value:function(e){!function(e){if(e instanceof l)e.type="attribute";else if(e instanceof h)e.type="cdata";else if(e instanceof p)e.type="comment";else if(e instanceof f)e.type="docType";else if(e instanceof d)e.type="element";else{if(!(e instanceof m))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}}(e),function(e){e instanceof d?(A(e),e.attrs.forEach(function(e){A(e),e.valueSpan?(e.value=e.valueSpan.toString(),/['"]/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null})):e instanceof p?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof m&&(e.value=e.sourceSpan.toString())}(e),function(e){if(e instanceof d){var t=_(e.name);e.namespace&&e.namespace!==t.implicitNamespacePrefix?e.tagDefinition=_(""):e.tagDefinition=t}}(e),function(e){if(e instanceof d){e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix||(e.name=x(e.name,function(e){return e in fn}));var t=pn[e.name]||Object.create(null);e.attrs.forEach(function(n){n.namespace||(n.name=x(n.name,function(n){return e.name in pn&&(n in pn["*"]||n in t)}))})}}(e),function(e){e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new v(e.sourceSpan.start,e.endSourceSpan.end))}(e)}}]),n}()),g),g}function _n(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?m(e):{frontMatter:null,content:e},r=i.frontMatter,a=i.content,o={type:"root",sourceSpan:{start:{offset:0},end:{offset:e.length}},children:vn(a,n)};r&&o.children.unshift(r);var s=function(i,r){var a=r.offset,o=_n(e.slice(0,a).replace(/[^\r\n]/g," ")+i,t,n,!1),s=o.children[0].sourceSpan.constructor;o.sourceSpan=new s(r,o.children[o.children.length-1].sourceSpan.end);var c=o.children[0];return c.length===a?o.children.shift():(c.sourceSpan=new s(c.sourceSpan.start.moveBy(a),c.sourceSpan.end),c.value=c.value.slice(a)),o},c=function(e){return"element"===e.type&&!e.nameSpan};return new mn(o).map(function(e){if(e.children&&e.children.some(c)){var t=[],n=!0,i=!1,r=void 0;try{for(var a,o=e.children[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var l=a.value;c(l)?Array.prototype.push.apply(t,l.children):t.push(l)}}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}return e.clone({children:t})}if("comment"===e.type){var h=function(e,t){if(!e.value)return null;var n=e.value.match(/^(\[if([^\]]*?)\]>)([\s\S]*?)e)return{line:t+1,column:e-(r[t-1]||0)+1,offset:e};return{}}}(e),toOffset:function(r){return function(e){var t=e&&e.line,n=e&&e.column;if(!isNaN(t)&&!isNaN(n)&&t-1 in r)return(r[t-2]||0)+n-1||0;return-1}}(e)}};var g=function(r,e){return function(t){var n,a=0,o=t.indexOf("\\"),i=r[e],c=[];for(;-1!==o;)c.push(t.slice(a,o)),a=o+1,(n=t.charAt(a))&&-1!==i.indexOf(n)||c.push("\\"),o=t.indexOf("\\",a);return c.push(t.slice(a)),c.join("")}};var m={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌",Map:"⤅",in:"∈"},b=Object.freeze({AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌",default:m}),v={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},w=Object.freeze({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ",default:v}),y={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},q=Object.freeze({default:y}),A=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=48&&e<=57};var k=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57};var x=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=97&&e<=122||e>=65&&e<=90};var E=function(r){return x(r)||A(r)};var L=b&&m||b,S=w&&v||w,D=q&&y||q,T=function(r,e){var t,n,a={};e||(e={});for(n in Z)t=e[n],a[n]=null===t||void 0===t?Z[n]:t;(a.position.indent||a.position.start)&&(a.indent=a.position.indent||[],a.position=a.position.start);return function(r,e){var t,n,a,o,i,c,l,u,s,f,p,h,d,g,m,b,v,w,y=e.additional,q=e.nonTerminated,A=e.text,k=e.reference,x=e.warning,T=e.textContext,Z=e.referenceContext,or=e.warningContext,ir=e.position,cr=e.indent||[],sr=r.length,fr=0,pr=-1,hr=ir.column||1,dr=ir.line||1,gr=$,mr=[];m=vr(),l=x?function(r,e){var t=vr();t.column+=e,t.offset+=e,x.call(or,lr[r],t,r)}:R,fr--,sr++;for(;++fr=55296&&br<=57343||br>1114111?(l(ar,v),i=C):i in D?(l(nr,v),i=D[i]):(s=$,ur(i)&&l(nr,v),i>65535&&(s+=N((i-=65536)>>>10|55296),i=56320|1023&i),i=s+N(i))):d!==Y&&l(er,v)),i?(yr(),m=vr(),fr=w-1,hr+=w-h+1,mr.push(i),(b=vr()).offset++,k&&k.call(Z,i,{start:m,end:b},r.slice(h-1,w)),m=b):(a=r.slice(h-1,w),gr+=a,hr+=a.length,fr=w-1)}var br;return mr.join($);function vr(){return{line:dr,column:hr,offset:fr+(ir.offset||0)}}function wr(e){return r.charAt(e)}function yr(){gr&&(mr.push(gr),A&&A.call(T,gr,{start:m,end:vr()}),gr=$)}}(r,a)},O={}.hasOwnProperty,N=String.fromCharCode,R=Function.prototype,C="�",U="\f",B="&",V="#",I=";",z="\n",P="x",j="X",G=" ",H="<",M="=",$="",F="\t",Z={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Y="named",J="hexadecimal",Q="decimal",_={};_[J]=16,_[Q]=10;var K={};K[Y]=E,K[Q]=A,K[J]=k;var X=1,W=2,rr=3,er=4,tr=5,nr=6,ar=7,or="Numeric character references",ir=" must be terminated by a semicolon",cr=" cannot be empty",lr={};function ur(r){return r>=1&&r<=8||11===r||r>=13&&r<=31||r>=127&&r<=159||r>=64976&&r<=65007||65535==(65535&r)||65534==(65535&r)}lr[X]="Named character references"+ir,lr[W]=or+ir,lr[rr]="Named character references"+cr,lr[er]=or+cr,lr[tr]="Named character references must be known",lr[nr]=or+" cannot be disallowed",lr[ar]=or+" cannot be outside the permissible Unicode range";var sr=function(r){return n.raw=function(r,n,o){return T(r,a(o,{position:e(n),warning:t}))},n;function e(e){for(var t=r.offset,n=e.line,a=[];++n&&n in t;)a.push((t[n]||0)+1);return{start:e,indent:a}}function t(e,t,n){3!==n&&r.file.message(e,t)}function n(n,a,o){T(n,{position:e(a),warning:t,text:o,reference:o,textContext:r,referenceContext:r})}};var fr=function(r){return function(e,t){var n,a,o,i,c,l,u=this,s=u.offset,f=[],p=u[r+"Methods"],h=u[r+"Tokenizers"],d=t.line,g=t.column;if(!e)return f;w.now=b,w.file=u.file,m("");for(;e;){for(n=-1,a=p.length,c=!1;++n"],mr=gr.concat(["~","|"]),br=mr.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function vr(r){var e=r||{};return e.commonmark?br:e.gfm?mr:gr}vr.default=gr,vr.gfm=mr,vr.commonmark=br;var wr=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yr=Object.freeze({default:wr}),qr={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:yr&&wr||yr},Ar=function(e){var t,n,o=this.options;if(null==e)e={};else{if("object"!==r(e))throw new Error("Invalid value `"+e+"` for setting `options`");e=a(e)}for(t in qr){if(null==(n=e[t])&&(n=o[t]),"blocks"!==t&&"boolean"!=typeof n||"blocks"===t&&"object"!==r(n))throw new Error("Invalid value `"+n+"` for setting `options."+t+"`");e[t]=n}return this.options=e,this.escape=dr(e),this};var kr=function(r,e,t,n){"function"==typeof e&&(n=t,t=e,e=null);function a(r,o,i){var c;return o=o||(i?0:null),e&&r.type!==e||(c=t(r,o,i||null)),r.children&&!1!==c?function(r,e){var t,o=n?-1:1,i=r.length,c=(n?i:-1)+o;for(;c>-1&&c=t)return Br.substr(0,t);for(;t>Br.length&&e>1;)1&e&&(Br+=r),e>>=1,r+=r;return Br=(Br+=r).substr(0,t)};var Ir=function(r){var e=String(r),t=e.length;for(;e.charAt(--t)===zr;);return e.slice(0,t+1)},zr="\n";var Pr=function(r,e,t){var n,a,o,i=-1,c=e.length,l="",u="",s="",f="";for(;++i=Kr)){for(c="";mse)return;if(!o||!i.pedantic&&e.charAt(l+1)===ue)return;c=e.length+1,a="";for(;++l=ve&&(!n||n===pe)?(u+=i,!!t||r(u)({type:"thematicBreak"})):void 0;i+=n}},pe="\n",he="\t",de=" ",ge="*",me="_",be="-",ve=3;var we=function(r){var e,t=0,n=0,a=r.charAt(t),o={};for(;a in ye;)e=ye[a],n+=e,e>1&&(n=Math.floor(n/e)*e),o[n]=t,a=r.charAt(++t);return{indent:n,stops:o}},ye={" ":1,"\t":4};var qe=function(r,e){var t,n,a,o,i=r.split(ke),c=i.length+1,l=1/0,u=[];i.unshift(Vr(Ae,e)+"!");for(;c--;)if(n=we(i[c]),u[c]=n.stops,0!==Xr(i[c]).length){if(!n.indent){l=1/0;break}n.indent>0&&n.indent=Ce)return;if(i=e.charAt(R),n=D?Ge:je,!0===Pe[i])c=i,o=!1;else{for(o=!0,a="";R=Ce&&(S=!0),w&&B>=w.indent&&(S=!0),i=e.charAt(R),f=null,!S){if(!0===Pe[i])f=i,R++,B++;else{for(a="";R=w.indent||B>Ce):S=!0,s=!1,R=u;if(h=e.slice(u,l),p=u===R?h:e.slice(R,l),(f===Le||f===Se||f===De)&&O.thematicBreak.call(this,r,h,!0))break;if(d=g,g=!Xr(p).length,S&&w)w.value=w.value.concat(v,h),b=b.concat(v,h),v=[];else if(s)0!==v.length&&(w.value.push(""),w.trail=v.concat()),w={value:[h],indent:B,trail:[]},m.push(w),b=b.concat(v,h),v=[];else if(g){if(d)break;v.push(h)}else{if(d)break;if(Wr(N,O,this,[r,h,!0]))break;w.value=w.value.concat(v,h),b=b.concat(v,h),v=[]}R=l+1}x=r(b.join(Oe)).reset({type:"list",ordered:o,start:U,loose:null,children:[]}),y=this.enterList(),q=this.enterBlock(),k=!1,R=-1,C=m.length;for(;++R=Qe){s--;break}f+=o}n="",a="";for(;++s`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Xe="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",We={openCloseTag:new RegExp("^(?:"+Ke+"|"+Xe+")"),tag:new RegExp("^(?:"+Ke+"|"+Xe+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)")},rt=We.openCloseTag,et=function(r,e,t){var n,a,o,i,c,l,u,s=this.options.blocks,f=e.length,p=0,h=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(rt.source+"\\s*$"),/^$/,!1]];for(;px){if(y1&&(f?(i+=s.slice(0,s.length-1),s=s.charAt(s.length-1)):(i+=s,s="")),v=r.now(),r(i)({type:"tableCell",children:this.tokenizeInline(d,v)},c)),r(s+f),s="",d=""}else if(s&&(d+=s,s=""),d+=f,f===It&&n!==l-2&&(d+=q.charAt(n+1),n++),f===zt){for(m=1;q.charAt(n+1)===f;)d+=f,n++,m++;b?m>=b&&(b=0):b=m}g=!1,n++}else d?s+=f:r(f),n++;w||r(Mt+a)}return k},It="\\",zt="`",Pt="-",jt="|",Gt=":",Ht=" ",Mt="\n",$t="\t",Ft=1,Zt=2,Yt="left",Jt="center",Qt="right",_t=null;var Kt=function(r,e,t){var n,a,o,i,c,l=this.options,u=l.commonmark,s=l.gfm,f=this.blockTokenizers,p=this.interruptParagraph,h=e.indexOf(Xt),d=e.length;for(;h=en){h=e.indexOf(Xt,h+1);continue}}if(a=e.slice(h+1),Wr(p,f,this,[r,a,!0]))break;if(f.list.call(this,r,a,!0)&&(this.inList||u||s&&!A(Xr.left(a).charAt(0))))break;if(n=h,-1!==(h=e.indexOf(Xt,h+1))&&""===Xr(e.slice(n,h))){h=n;break}}if(a=e.slice(0,h),""===Xr(a))return r(a),null;if(t)return!0;return c=r.now(),a=Ir(a),r(a)({type:"paragraph",children:this.tokenizeInline(a,c)})},Xt="\n",Wt="\t",rn=" ",en=4;var tn=function(r,e){return r.indexOf("\\",e)};var nn=an;function an(r,e,t){var n,a;if("\\"===e.charAt(0)&&(n=e.charAt(1),-1!==this.escape.indexOf(n)))return!!t||(a="\n"===n?{type:"break"}:{type:"text",value:n},r("\\"+n)(a))}an.locator=tn;var on=function(r,e){return r.indexOf("<",e)};var cn=dn;dn.locator=on,dn.notInLink=!0;var ln="<",un=">",sn="@",fn="/",pn="mailto:",hn=pn.length;function dn(r,e,t){var n,a,o,i,c,l,u,s,f,p,h;if(e.charAt(0)===ln){for(this,n="",a=e.length,o=0,i="",l=!1,u="",o++,n=ln;o/i;function Rn(r,e,t){var n,a,o=e.length;if(!("<"!==e.charAt(0)||o<3)&&(n=e.charAt(1),(x(n)||"?"===n||"!"===n||"/"===n)&&(a=e.match(Dn))))return!!t||(a=a[0],!this.inLink&&On.test(a)?this.inLink=!0:this.inLink&&Nn.test(a)&&(this.inLink=!1),r(a)({type:"html",value:a}))}var Cn=function(r,e){var t=r.indexOf("[",e),n=r.indexOf("![",e);if(-1===n)return t;return t",Mn="`",$n={'"':'"',"'":"'"},Fn={};function Zn(r,e,t){var n,a,o,i,c,l,u,s,f,p,h,d,g,m,b,v,w,y,q,A="",k=0,x=e.charAt(0),E=this.options.pedantic,L=this.options.commonmark,S=this.options.gfm;if("!"===x&&(f=!0,A=x,x=e.charAt(++k)),x===In&&(f||!this.inLink)){for(A+=x,b="",k++,d=e.length,m=0,(w=r.now()).column+=k,w.offset+=k;k=o&&(o=0):o=a}else if(x===Vn)k++,l+=e.charAt(k);else if(o&&!S||x!==In){if((!o||S)&&x===zn){if(!m){if(!E)for(;ke&&" "===r.charAt(t-1);)t--;return t};var Da=Oa;Oa.locator=Sa;var Ta=2;function Oa(r,e,t){for(var n,a=e.length,o=-1,i="";++o1)for(var t=1;to.length;i&&o.push(n);try{e=r.apply(null,o)}catch(r){if(i&&t)throw r;return n(r)}i||(e&&"function"==typeof e.then?e.then(a,n):e instanceof Error?n(e):a(e))};function n(){t||(t=!0,e.apply(null,arguments))}function a(r){n(null,r)}}(i,a).apply(null,t):n.apply(null,[null].concat(t))}}).apply(null,[null].concat(t))},e.use=function(t){if("function"!=typeof t)throw new Error("Expected `fn` to be a function, not "+t);return r.push(t),e},e},Po=[].slice;var jo=Object.prototype.toString,Go=function(r){return"[object String]"===jo.call(r)};var Ho=function(r){return"[object Function]"===Object.prototype.toString.call(r)},Mo=Object.prototype.toString,$o=function(r){var e;return"[object Object]"===Mo.call(r)&&(null===(e=Object.getPrototypeOf(r))||e===Object.getPrototypeOf({}))},Fo=function e(){var t=[];var n=zo();var a={};var o=!1;var i=-1;c.data=function(r,e){if(Go(r))return 2===arguments.length?(Xo("data",o),a[r]=e,c):Yo.call(a,r)&&a[r]||null;if(r)return Xo("data",o),a=r,c;return a};c.freeze=l;c.attachers=t;c.use=function(e){var n;if(Xo("use",o),null===e||void 0===e);else if(Ho(e))s.apply(null,arguments);else{if("object"!==r(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?u(e):i(e)}n&&(a.settings=Ha(a.settings||{},n));return c;function i(r){u(r.plugins),r.settings&&(n=Ha(n||{},r.settings))}function l(e){if(Ho(e))s(e);else{if("object"!==r(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?s.apply(null,e):i(e)}}function u(e){var t,n;if(null===e||void 0===e);else{if(!("object"===r(e)&&"length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(t=e.length,n=-1;++n<~]))"].join("|");return new RegExp(r,"g")}}),ci=i(function(r){r.exports=function(r){return!Number.isNaN(r)&&(r>=4352&&(r<=4447||9001===r||9002===r||11904<=r&&r<=12871&&12351!==r||12880<=r&&r<=19903||19968<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65131||65281<=r&&r<=65376||65504<=r&&r<=65510||110592<=r&&r<=110593||127488<=r&&r<=127569||131072<=r&&r<=262141))}});i(function(r){r.exports=function(r){if("string"!=typeof r||0===r.length)return 0;var e;r="string"==typeof(e=r)?e.replace(ii(),""):e;for(var t=0,n=0;n=127&&a<=159||(a>=768&&a<=879||(a>65535&&n++,t+=ci(a)?2:1))}return t}});function li(r){return function(e,t,n){var a=n&&n.backwards;if(!1===t)return!1;for(var o=e.length,i=t;i>=0&&i"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(r,e){r.forEach(function(r){ui[r]=e})});var si="[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0af0\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166d-\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e49\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc9\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]";new RegExp("[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]"),new RegExp(si);var fi=function(r,e){return function r(t,n,a){a=a||[];var o=Object.assign({},e(t,n,a));return o.children&&(o.children=o.children.map(function(e,t){return r(e,t,[o].concat(a))})),o}(r,null,null)},pi=i(function(r){var e=/^import/,t=/^export/,n=function(r){return e.test(r)},a=function(r){return t.test(r)},o=function(r,e){var t=e.indexOf("\n\n"),o=e.slice(0,t);if(a(o)||n(o))return r(o)({type:a(o)?"export":"import",value:o})};o.locator=function(r){return a(r)||n(r)?-1:1},r.exports={esSyntax:function(){var r=this.Parser,e=r.prototype.blockTokenizers,t=r.prototype.blockMethods;e.esSyntax=o,t.splice(t.indexOf("paragraph"),0,"esSyntax")},BLOCKS_REGEX:"[a-z\\.]+(\\.){0,1}[a-z\\.]"}});function hi(r,e){return r.indexOf("$",e)}var di=/^\\\$/,gi=/^\$((?:\\\$|[^$])+)\$/,mi=/^\$\$((?:\\\$|[^$])+)\$\$/,bi=function(r){var e=String(r),t=e.length;for(;e.charAt(--t)===vi;);return e.slice(0,t+1)},vi="\n";var wi="\n",yi="\t",qi=" ",Ai="$",ki=2,xi=4,Ei=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(function(r){var e=this.Parser,t=e.prototype.blockTokenizers,n=e.prototype.blockMethods;t.math=function(r,e,t){for(var n,a,o,i,c,l,u,s,f,p,h=e.length+1,d=0,g="";d=xi)){for(i="";d$/.test(r.value)||"paragraph"===a.type?r:Object.assign({},r,{type:"jsx"})})}}function Oi(){var r=this.Parser.prototype;function e(r,e){var t=ai(e);if(t.frontMatter)return r(t.frontMatter.raw)(t.frontMatter)}r.blockMethods=["frontMatter"].concat(r.blockMethods),r.blockTokenizers.frontMatter=e,e.onlyAtStart=!0}function Ni(){var r=this.Parser.prototype,e=r.inlineMethods;function t(r,e){var t=e.match(/^({%[\s\S]*?%}|{{[\s\S]*?}})/);if(t)return r(t[0])({type:"liquidNode",value:t[0]})}e.splice(e.indexOf("text"),0,"liquid"),r.inlineTokenizers.liquid=t,t.locator=function(r,e){return r.indexOf("{",e)}}var Ri={astFormat:"mdast",hasPragma:oi.hasPragma,locStart:function(r){return r.position.start.offset},locEnd:function(r){return r.position.end.offset},preprocess:function(r){return r.replace(/\n\s+$/,"\n")}},Ci=Object.assign({},Ri,{parse:Si({isMDX:!1})});return{parsers:{remark:Ci,markdown:Ci,mdx:Object.assign({},Ri,{parse:Si({isMDX:!0})})}}}); diff --git a/node_modules/prettier/parser-postcss.js b/node_modules/prettier/parser-postcss.js new file mode 100644 index 0000000..a6247ab --- /dev/null +++ b/node_modules/prettier/parser-postcss.js @@ -0,0 +1,32712 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["postcss"] = factory(); + else + root["prettierPlugins"] = root["prettierPlugins"] || {}, root["prettierPlugins"]["postcss"] = factory(); +})(typeof self !== 'undefined' ? self : this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 91); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var TAG = exports.TAG = 'tag'; +var STRING = exports.STRING = 'string'; +var SELECTOR = exports.SELECTOR = 'selector'; +var ROOT = exports.ROOT = 'root'; +var PSEUDO = exports.PSEUDO = 'pseudo'; +var NESTING = exports.NESTING = 'nesting'; +var ID = exports.ID = 'id'; +var COMMENT = exports.COMMENT = 'comment'; +var COMBINATOR = exports.COMBINATOR = 'combinator'; +var CLASS = exports.CLASS = 'class'; +var ATTRIBUTE = exports.ATTRIBUTE = 'attribute'; +var UNIVERSAL = exports.UNIVERSAL = 'universal'; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Node = __webpack_require__(3); + +var Container = +/*#__PURE__*/ +function (_Node) { + _inherits(Container, _Node); + + function Container(opts) { + var _this; + + _classCallCheck(this, Container); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Container).call(this, opts)); + + if (!_this.nodes) { + _this.nodes = []; + } + + return _this; + } + + _createClass(Container, [{ + key: "push", + value: function push(child) { + child.parent = this; + this.nodes.push(child); + return this; + } + }, { + key: "each", + value: function each(callback) { + if (!this.lastEach) this.lastEach = 0; + if (!this.indexes) this.indexes = {}; + this.lastEach += 1; + var id = this.lastEach, + index, + result; + this.indexes[id] = 0; + if (!this.nodes) return undefined; + + while (this.indexes[id] < this.nodes.length) { + index = this.indexes[id]; + result = callback(this.nodes[index], index); + if (result === false) break; + this.indexes[id] += 1; + } + + delete this.indexes[id]; + return result; + } + }, { + key: "walk", + value: function walk(callback) { + return this.each(function (child, i) { + var result = callback(child, i); + + if (result !== false && child.walk) { + result = child.walk(callback); + } + + return result; + }); + } + }, { + key: "walkType", + value: function walkType(type, callback) { + var _this2 = this; + + if (!type || !callback) { + throw new Error('Parameters {type} and {callback} are required.'); + } // allow users to pass a constructor, or node type string; eg. Word. + + + type = type.name && type.prototype ? type.name : type; + return this.walk(function (node, index) { + if (node.type === type) { + return callback.call(_this2, node, index); + } + }); + } + }, { + key: "append", + value: function append(node) { + node.parent = this; + this.nodes.push(node); + return this; + } + }, { + key: "prepend", + value: function prepend(node) { + node.parent = this; + this.nodes.unshift(node); + return this; + } + }, { + key: "cleanRaws", + value: function cleanRaws(keepBetween) { + _get(_getPrototypeOf(Container.prototype), "cleanRaws", this).call(this, keepBetween); + + if (this.nodes) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this.nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var node = _step.value; + node.cleanRaws(keepBetween); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + } + }, { + key: "insertAfter", + value: function insertAfter(oldNode, newNode) { + var oldIndex = this.index(oldNode), + index; + this.nodes.splice(oldIndex + 1, 0, newNode); + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (oldIndex <= index) { + this.indexes[id] = index + this.nodes.length; + } + } + + return this; + } + }, { + key: "insertBefore", + value: function insertBefore(oldNode, newNode) { + var oldIndex = this.index(oldNode), + index; + this.nodes.splice(oldIndex, 0, newNode); + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (oldIndex <= index) { + this.indexes[id] = index + this.nodes.length; + } + } + + return this; + } + }, { + key: "removeChild", + value: function removeChild(child) { + child = this.index(child); + this.nodes[child].parent = undefined; + this.nodes.splice(child, 1); + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + return this; + } + }, { + key: "removeAll", + value: function removeAll() { + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = this.nodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var node = _step2.value; + node.parent = undefined; + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + this.nodes = []; + return this; + } + }, { + key: "every", + value: function every(condition) { + return this.nodes.every(condition); + } + }, { + key: "some", + value: function some(condition) { + return this.nodes.some(condition); + } + }, { + key: "index", + value: function index(child) { + if (typeof child === 'number') { + return child; + } else { + return this.nodes.indexOf(child); + } + } + }, { + key: "toString", + value: function toString() { + var result = this.nodes.map(String).join(''); + + if (this.value) { + result = this.value + result; + } + + if (this.raws.before) { + result = this.raws.before + result; + } + + if (this.raws.after) { + result += this.raws.after; + } + + return result; + } + }, { + key: "first", + get: function get() { + if (!this.nodes) return undefined; + return this.nodes[0]; + } + }, { + key: "last", + get: function get() { + if (!this.nodes) return undefined; + return this.nodes[this.nodes.length - 1]; + } + }]); + + return Container; +}(Node); + +Container.registerWalker = function (constructor) { + var walkerName = 'walk' + constructor.name; // plural sugar + + if (walkerName.lastIndexOf('s') !== walkerName.length - 1) { + walkerName += 's'; + } + + if (Container.prototype[walkerName]) { + return; + } // we need access to `this` so we can't use an arrow function + + + Container.prototype[walkerName] = function (callback) { + return this.walkType(constructor, callback); + }; +}; + +module.exports = Container; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var singleQuote = exports.singleQuote = '\''.charCodeAt(0); +var doubleQuote = exports.doubleQuote = '"'.charCodeAt(0); +var backslash = exports.backslash = '\\'.charCodeAt(0); +var backTick = exports.backTick = '`'.charCodeAt(0); +var slash = exports.slash = '/'.charCodeAt(0); +var newline = exports.newline = '\n'.charCodeAt(0); +var space = exports.space = ' '.charCodeAt(0); +var feed = exports.feed = '\f'.charCodeAt(0); +var tab = exports.tab = '\t'.charCodeAt(0); +var carriageReturn = exports.carriageReturn = '\r'.charCodeAt(0); +var openedParenthesis = exports.openedParenthesis = '('.charCodeAt(0); +var closedParenthesis = exports.closedParenthesis = ')'.charCodeAt(0); +var openedCurlyBracket = exports.openedCurlyBracket = '{'.charCodeAt(0); +var closedCurlyBracket = exports.closedCurlyBracket = '}'.charCodeAt(0); +var openSquareBracket = exports.openSquareBracket = '['.charCodeAt(0); +var closeSquareBracket = exports.closeSquareBracket = ']'.charCodeAt(0); +var semicolon = exports.semicolon = ';'.charCodeAt(0); +var asterisk = exports.asterisk = '*'.charCodeAt(0); +var colon = exports.colon = ':'.charCodeAt(0); +var comma = exports.comma = ','.charCodeAt(0); +var dot = exports.dot = '.'.charCodeAt(0); +var atRule = exports.atRule = '@'.charCodeAt(0); +var tilde = exports.tilde = '~'.charCodeAt(0); +var hash = exports.hash = '#'.charCodeAt(0); +var atEndPattern = exports.atEndPattern = /[ \n\t\r\f\{\(\)'"\\;/\[\]#]/g; +var wordEndPattern = exports.wordEndPattern = /[ \n\t\r\f\(\)\{\}:,;@!'"\\\]\[#]|\/(?=\*)/g; +var badBracketPattern = exports.badBracketPattern = /.[\\\/\("'\n]/; +var variablePattern = exports.variablePattern = /^@[^:\(\{]+:/; +var hashColorPattern = exports.hashColorPattern = /^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var cloneNode = function cloneNode(obj, parent) { + var cloned = new obj.constructor(); + + for (var i in obj) { + if (!obj.hasOwnProperty(i)) continue; + + var value = obj[i], + type = _typeof(value); + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent; + } else if (i === 'source') { + cloned[i] = value; + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else if (i !== 'before' && i !== 'after' && i !== 'between' && i !== 'semicolon') { + if (type === 'object' && value !== null) value = cloneNode(value); + cloned[i] = value; + } + } + + return cloned; +}; + +module.exports = +/*#__PURE__*/ +function () { + function Node(defaults) { + _classCallCheck(this, Node); + + defaults = defaults || {}; + this.raws = { + before: '', + after: '' + }; + + for (var name in defaults) { + this[name] = defaults[name]; + } + } + + _createClass(Node, [{ + key: "remove", + value: function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + + this.parent = undefined; + return this; + } + }, { + key: "toString", + value: function toString() { + return [this.raws.before, String(this.value), this.raws.after].join(''); + } + }, { + key: "clone", + value: function clone(overrides) { + overrides = overrides || {}; + var cloned = cloneNode(this); + + for (var name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + } + }, { + key: "cloneBefore", + value: function cloneBefore(overrides) { + overrides = overrides || {}; + var cloned = this.clone(overrides); + this.parent.insertBefore(this, cloned); + return cloned; + } + }, { + key: "cloneAfter", + value: function cloneAfter(overrides) { + overrides = overrides || {}; + var cloned = this.clone(overrides); + this.parent.insertAfter(this, cloned); + return cloned; + } + }, { + key: "replaceWith", + value: function replaceWith() { + var nodes = Array.prototype.slice.call(arguments); + + if (this.parent) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var node = _step.value; + this.parent.insertBefore(this, node); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + this.remove(); + } + + return this; + } + }, { + key: "moveTo", + value: function moveTo(container) { + this.cleanRaws(this.root() === container.root()); + this.remove(); + container.append(this); + return this; + } + }, { + key: "moveBefore", + value: function moveBefore(node) { + this.cleanRaws(this.root() === node.root()); + this.remove(); + node.parent.insertBefore(node, this); + return this; + } + }, { + key: "moveAfter", + value: function moveAfter(node) { + this.cleanRaws(this.root() === node.root()); + this.remove(); + node.parent.insertAfter(node, this); + return this; + } + }, { + key: "next", + value: function next() { + var index = this.parent.index(this); + return this.parent.nodes[index + 1]; + } + }, { + key: "prev", + value: function prev() { + var index = this.parent.index(this); + return this.parent.nodes[index - 1]; + } + }, { + key: "toJSON", + value: function toJSON() { + var fixed = {}; + + for (var name in this) { + if (!this.hasOwnProperty(name)) continue; + if (name === 'parent') continue; + var value = this[name]; + + if (value instanceof Array) { + fixed[name] = value.map(function (i) { + if (_typeof(i) === 'object' && i.toJSON) { + return i.toJSON(); + } else { + return i; + } + }); + } else if (_typeof(value) === 'object' && value.toJSON) { + fixed[name] = value.toJSON(); + } else { + fixed[name] = value; + } + } + + return fixed; + } + }, { + key: "root", + value: function root() { + var result = this; + + while (result.parent) { + result = result.parent; + } + + return result; + } + }, { + key: "cleanRaws", + value: function cleanRaws(keepBetween) { + delete this.raws.before; + delete this.raws.after; + if (!keepBetween) delete this.raws.between; + } + }, { + key: "positionInside", + value: function positionInside(index) { + var string = this.toString(), + column = this.source.start.column, + line = this.source.start.line; + + for (var i = 0; i < index; i++) { + if (string[i] === '\n') { + column = 1; + line += 1; + } else { + column += 1; + } + } + + return { + line: line, + column: column + }; + } + }, { + key: "positionBy", + value: function positionBy(opts) { + var pos = this.source.start; + + if (opts.index) { + pos = this.positionInside(opts.index); + } else if (opts.word) { + var index = this.toString().indexOf(opts.word); + if (index !== -1) pos = this.positionInside(index); + } + + return pos; + } + }]); + + return Node; +}(); + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = warnOnce; +var printed = {}; + +function warnOnce(message) { + if (printed[message]) return; + printed[message] = true; + if (typeof console !== 'undefined' && console.warn) console.warn(message); +} + +module.exports = exports['default']; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var cloneNode = function cloneNode(obj, parent) { + if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object') { + return obj; + } + + var cloned = new obj.constructor(); + + for (var i in obj) { + if (!obj.hasOwnProperty(i)) { + continue; + } + + var value = obj[i]; + var type = typeof value === 'undefined' ? 'undefined' : _typeof(value); + + if (i === 'parent' && type === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + cloned[i] = cloneNode(value, cloned); + } + } + + return cloned; +}; + +var _class = function () { + function _class() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _classCallCheck(this, _class); + + for (var key in opts) { + this[key] = opts[key]; + } + + var _opts$spaces = opts.spaces; + _opts$spaces = _opts$spaces === undefined ? {} : _opts$spaces; + var _opts$spaces$before = _opts$spaces.before, + before = _opts$spaces$before === undefined ? '' : _opts$spaces$before, + _opts$spaces$after = _opts$spaces.after, + after = _opts$spaces$after === undefined ? '' : _opts$spaces$after; + this.spaces = { + before: before, + after: after + }; + } + + _class.prototype.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + + this.parent = undefined; + return this; + }; + + _class.prototype.replaceWith = function replaceWith() { + if (this.parent) { + for (var index in arguments) { + this.parent.insertBefore(this, arguments[index]); + } + + this.remove(); + } + + return this; + }; + + _class.prototype.next = function next() { + return this.parent.at(this.parent.index(this) + 1); + }; + + _class.prototype.prev = function prev() { + return this.parent.at(this.parent.index(this) - 1); + }; + + _class.prototype.clone = function clone() { + var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var cloned = cloneNode(this); + + for (var name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + }; + + _class.prototype.toString = function toString() { + return [this.spaces.before, String(this.value), this.spaces.after].join(''); + }; + + return _class; +}(); + +exports.default = _class; +module.exports = exports['default']; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } // if the path is allowed to go above the root, restore leading ..s + + + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} // Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. + + +var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + +var splitPath = function splitPath(filename) { + return splitPathRe.exec(filename).slice(1); +}; // path.resolve([from ...], to) +// posix version + + +exports.resolve = function () { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = i >= 0 ? arguments[i] : process.cwd(); // Skip empty and invalid entries + + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + // Normalize the path + + + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; +}; // path.normalize(path) +// posix version + + +exports.normalize = function (path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; // Normalize the path + + path = normalizeArray(filter(path.split('/'), function (p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; // posix version + + +exports.isAbsolute = function (path) { + return path.charAt(0) === '/'; +}; // posix version + + +exports.join = function () { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function (p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + + return p; + }).join('/')); +}; // path.relative(from, to) +// posix version + + +exports.relative = function (from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); +}; + +exports.sep = '/'; +exports.delimiter = ':'; + +exports.dirname = function (path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +}; + +exports.basename = function (path, ext) { + var f = splitPath(path)[2]; // TODO: make this comparison case-insensitive on windows? + + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + + return f; +}; + +exports.extname = function (path) { + return splitPath(path)[3]; +}; + +function filter(xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + + return res; +} // String.prototype.substr - negative index don't work in IE8 + + +var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) { + return str.substr(start, len); +} : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12))) + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _node = __webpack_require__(5); + +var _node2 = _interopRequireDefault(_node); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Namespace = function (_Node) { + _inherits(Namespace, _Node); + + function Namespace() { + _classCallCheck(this, Namespace); + + return _possibleConstructorReturn(this, _Node.apply(this, arguments)); + } + + Namespace.prototype.toString = function toString() { + return [this.spaces.before, this.ns, String(this.value), this.spaces.after].join(''); + }; + + _createClass(Namespace, [{ + key: 'ns', + get: function get() { + var n = this.namespace; + return n ? (typeof n === 'string' ? n : '') + '|' : ''; + } + }]); + + return Namespace; +}(_node2.default); + +exports.default = Namespace; +; +module.exports = exports['default']; + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} + +exports.getArg = getArg; +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + + if (!match) { + return null; + } + + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} + +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + + url += '//'; + + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + + return url; +} + +exports.urlGenerate = urlGenerate; +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + + if (url) { + if (!url.path) { + return aPath; + } + + path = url.path; + } + + var isAbsolute = exports.isAbsolute(path); + var parts = path.split(/\/+/); + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + + return path; +} + +exports.normalize = normalize; +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + if (aPath === "") { + aPath = "."; + } + + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } // `join(foo, '//www.example.org')` + + + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } // `join('http://', 'www.example.com')` + + + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + + return joined; +} + +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + + +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + + var level = 0; + + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + + if (index < 0) { + return aPath; + } // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + + + aRoot = aRoot.slice(0, index); + + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } // Make sure we add a "../" for each component we removed from the root. + + + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} + +exports.relative = relative; + +var supportsNullProto = function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}(); + +function identity(s) { + return s; +} +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + + +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} + +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} + +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 + /* "__proto__".length */ + ) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 + /* '_' */ + || s.charCodeAt(length - 2) !== 95 + /* '_' */ + || s.charCodeAt(length - 3) !== 111 + /* 'o' */ + || s.charCodeAt(length - 4) !== 116 + /* 't' */ + || s.charCodeAt(length - 5) !== 111 + /* 'o' */ + || s.charCodeAt(length - 6) !== 114 + /* 'r' */ + || s.charCodeAt(length - 7) !== 112 + /* 'p' */ + || s.charCodeAt(length - 8) !== 95 + /* '_' */ + || s.charCodeAt(length - 9) !== 95 + /* '_' */ + ) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 + /* '$' */ + ) { + return false; + } + } + + return true; +} +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + + +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} + +exports.compareByOriginalPositions = compareByOriginalPositions; +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} + +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + + +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} + +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} + +exports.parseSourceMapInput = parseSourceMapInput; +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + + + sourceURL = sourceRoot + sourceURL; + } // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + + + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} + +exports.computeSourceURL = computeSourceURL; + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} + +exports.getArg = getArg; +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + + if (!match) { + return null; + } + + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} + +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + + url += '//'; + + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + + return url; +} + +exports.urlGenerate = urlGenerate; +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + + if (url) { + if (!url.path) { + return aPath; + } + + path = url.path; + } + + var isAbsolute = exports.isAbsolute(path); + var parts = path.split(/\/+/); + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + + return path; +} + +exports.normalize = normalize; +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + if (aPath === "") { + aPath = "."; + } + + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } // `join(foo, '//www.example.org')` + + + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } // `join('http://', 'www.example.com')` + + + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + + return joined; +} + +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); +}; +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + + +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + + var level = 0; + + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + + if (index < 0) { + return aPath; + } // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + + + aRoot = aRoot.slice(0, index); + + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } // Make sure we add a "../" for each component we removed from the root. + + + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} + +exports.relative = relative; + +var supportsNullProto = function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}(); + +function identity(s) { + return s; +} +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + + +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} + +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} + +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 + /* "__proto__".length */ + ) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 + /* '_' */ + || s.charCodeAt(length - 2) !== 95 + /* '_' */ + || s.charCodeAt(length - 3) !== 111 + /* 'o' */ + || s.charCodeAt(length - 4) !== 116 + /* 't' */ + || s.charCodeAt(length - 5) !== 111 + /* 'o' */ + || s.charCodeAt(length - 6) !== 114 + /* 'r' */ + || s.charCodeAt(length - 7) !== 112 + /* 'p' */ + || s.charCodeAt(length - 8) !== 95 + /* '_' */ + || s.charCodeAt(length - 9) !== 95 + /* '_' */ + ) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 + /* '$' */ + ) { + return false; + } + } + + return true; +} +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + + +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} + +exports.compareByOriginalPositions = compareByOriginalPositions; +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} + +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + + +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} + +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _container = __webpack_require__(28); + +var _container2 = _interopRequireDefault(_container); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _list = __webpack_require__(162); + +var _list2 = _interopRequireDefault(_list); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents a CSS rule: a selector followed by a declaration block. + * + * @extends Container + * + * @example + * const root = postcss.parse('a{}'); + * const rule = root.first; + * rule.type //=> 'rule' + * rule.toString() //=> 'a{}' + */ + + +var Rule = function (_Container) { + _inherits(Rule, _Container); + + function Rule(defaults) { + _classCallCheck(this, Rule); + + var _this = _possibleConstructorReturn(this, _Container.call(this, defaults)); + + _this.type = 'rule'; + if (!_this.nodes) _this.nodes = []; + return _this; + } + /** + * An array containing the rule’s individual selectors. + * Groups of selectors are split at commas. + * + * @type {string[]} + * + * @example + * const root = postcss.parse('a, b { }'); + * const rule = root.first; + * + * rule.selector //=> 'a, b' + * rule.selectors //=> ['a', 'b'] + * + * rule.selectors = ['a', 'strong']; + * rule.selector //=> 'a, strong' + */ + + + _createClass(Rule, [{ + key: 'selectors', + get: function get() { + return _list2.default.comma(this.selector); + }, + set: function set(values) { + var match = this.selector ? this.selector.match(/,\s*/) : null; + var sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen'); + this.selector = values.join(sep); + } + }, { + key: '_selector', + get: function get() { + (0, _warnOnce2.default)('Rule#_selector is deprecated. Use Rule#raws.selector'); + return this.raws.selector; + }, + set: function set(val) { + (0, _warnOnce2.default)('Rule#_selector is deprecated. Use Rule#raws.selector'); + this.raws.selector = val; + } + /** + * @memberof Rule# + * @member {string} selector - the rule’s full selector represented + * as a string + * + * @example + * const root = postcss.parse('a, b { }'); + * const rule = root.first; + * rule.selector //=> 'a, b' + */ + + /** + * @memberof Rule# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * + * PostCSS cleans selectors from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '', between: ' ', after: '\n' } + */ + + }]); + + return Rule; +}(_container2.default); + +exports.default = Rule; +module.exports = exports['default']; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = unclosed; + +function unclosed(state, what) { + throw state.input.error("Unclosed " + what, state.line, state.pos - state.offset); +} + +module.exports = exports["default"]; + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} + +function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); +} + +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +})(); + +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } // if setTimeout wasn't available but was latter defined + + + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } +} + +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } // if clearTimeout wasn't available but was latter defined + + + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } +} + +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + + draining = false; + + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + + while (len) { + currentQueue = queue; + queue = []; + + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + + queueIndex = -1; + len = queue.length; + } + + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + + queue.push(new Item(fun, args)); + + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; // v8 likes predictible objects + + +function Item(fun, array) { + this.fun = fun; + this.array = array; +} + +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues + +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { + return []; +}; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { + return '/'; +}; + +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; + +process.umask = function () { + return 0; +}; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _declaration = __webpack_require__(72); + +var _declaration2 = _interopRequireDefault(_declaration); + +var _comment = __webpack_require__(20); + +var _comment2 = _interopRequireDefault(_comment); + +var _node = __webpack_require__(21); + +var _node2 = _interopRequireDefault(_node); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +function cleanSource(nodes) { + return nodes.map(function (i) { + if (i.nodes) i.nodes = cleanSource(i.nodes); + delete i.source; + return i; + }); +} +/** + * The {@link Root}, {@link AtRule}, and {@link Rule} container nodes + * inherit some common methods to help work with their children. + * + * Note that all containers can store any content. If you write a rule inside + * a rule, PostCSS will parse it. + * + * @extends Node + * @abstract + */ + + +var Container = function (_Node) { + _inherits(Container, _Node); + + function Container() { + _classCallCheck(this, Container); + + return _possibleConstructorReturn(this, _Node.apply(this, arguments)); + } + + Container.prototype.push = function push(child) { + child.parent = this; + this.nodes.push(child); + return this; + }; + /** + * Iterates through the container’s immediate children, + * calling `callback` for each child. + * + * Returning `false` in the callback will break iteration. + * + * This method only iterates through the container’s immediate children. + * If you need to recursively iterate through all the container’s descendant + * nodes, use {@link Container#walk}. + * + * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe + * if you are mutating the array of child nodes during iteration. + * PostCSS will adjust the current index to match the mutations. + * + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * const root = postcss.parse('a { color: black; z-index: 1 }'); + * const rule = root.first; + * + * for ( let decl of rule.nodes ) { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }); + * // Cycle will be infinite, because cloneBefore moves the current node + * // to the next index + * } + * + * rule.each(decl => { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }); + * // Will be executed only for color and z-index + * }); + */ + + + Container.prototype.each = function each(callback) { + if (!this.lastEach) this.lastEach = 0; + if (!this.indexes) this.indexes = {}; + this.lastEach += 1; + var id = this.lastEach; + this.indexes[id] = 0; + if (!this.nodes) return undefined; + var index = void 0, + result = void 0; + + while (this.indexes[id] < this.nodes.length) { + index = this.indexes[id]; + result = callback(this.nodes[index], index); + if (result === false) break; + this.indexes[id] += 1; + } + + delete this.indexes[id]; + return result; + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each node. + * + * Like container.each(), this method is safe to use + * if you are mutating arrays during iteration. + * + * If you only need to iterate through the container’s immediate children, + * use {@link Container#each}. + * + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * root.walk(node => { + * // Traverses all descendant nodes. + * }); + */ + + + Container.prototype.walk = function walk(callback) { + return this.each(function (child, i) { + var result = callback(child, i); + + if (result !== false && child.walk) { + result = child.walk(callback); + } + + return result; + }); + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each declaration node. + * + * If you pass a filter, iteration will only happen over declarations + * with matching properties. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [prop] - string or regular expression + * to filter declarations by property name + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * root.walkDecls(decl => { + * checkPropertySupport(decl.prop); + * }); + * + * root.walkDecls('border-radius', decl => { + * decl.remove(); + * }); + * + * root.walkDecls(/^background/, decl => { + * decl.value = takeFirstColorFromGradient(decl.value); + * }); + */ + + + Container.prototype.walkDecls = function walkDecls(prop, callback) { + if (!callback) { + callback = prop; + return this.walk(function (child, i) { + if (child.type === 'decl') { + return callback(child, i); + } + }); + } else if (prop instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i); + } + }); + } else { + return this.walk(function (child, i) { + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i); + } + }); + } + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each rule node. + * + * If you pass a filter, iteration will only happen over rules + * with matching selectors. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [selector] - string or regular expression + * to filter rules by selector + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * const selectors = []; + * root.walkRules(rule => { + * selectors.push(rule.selector); + * }); + * console.log(`Your CSS uses ${selectors.length} selectors`); + */ + + + Container.prototype.walkRules = function walkRules(selector, callback) { + if (!callback) { + callback = selector; + return this.walk(function (child, i) { + if (child.type === 'rule') { + return callback(child, i); + } + }); + } else if (selector instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i); + } + }); + } else { + return this.walk(function (child, i) { + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i); + } + }); + } + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each at-rule node. + * + * If you pass a filter, iteration will only happen over at-rules + * that have matching names. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [name] - string or regular expression + * to filter at-rules by name + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * root.walkAtRules(rule => { + * if ( isOld(rule.name) ) rule.remove(); + * }); + * + * let first = false; + * root.walkAtRules('charset', rule => { + * if ( !first ) { + * first = true; + * } else { + * rule.remove(); + * } + * }); + */ + + + Container.prototype.walkAtRules = function walkAtRules(name, callback) { + if (!callback) { + callback = name; + return this.walk(function (child, i) { + if (child.type === 'atrule') { + return callback(child, i); + } + }); + } else if (name instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i); + } + }); + } else { + return this.walk(function (child, i) { + if (child.type === 'atrule' && child.name === name) { + return callback(child, i); + } + }); + } + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each comment node. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * root.walkComments(comment => { + * comment.remove(); + * }); + */ + + + Container.prototype.walkComments = function walkComments(callback) { + return this.walk(function (child, i) { + if (child.type === 'comment') { + return callback(child, i); + } + }); + }; + /** + * Inserts new nodes to the end of the container. + * + * @param {...(Node|object|string|Node[])} children - new nodes + * + * @return {Node} this node for methods chain + * + * @example + * const decl1 = postcss.decl({ prop: 'color', value: 'black' }); + * const decl2 = postcss.decl({ prop: 'background-color', value: 'white' }); + * rule.append(decl1, decl2); + * + * root.append({ name: 'charset', params: '"UTF-8"' }); // at-rule + * root.append({ selector: 'a' }); // rule + * rule.append({ prop: 'color', value: 'black' }); // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}'); + * root.first.append('color: black; z-index: 1'); + */ + + + Container.prototype.append = function append() { + for (var _len = arguments.length, children = Array(_len), _key = 0; _key < _len; _key++) { + children[_key] = arguments[_key]; + } + + for (var _iterator = children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var child = _ref; + var nodes = this.normalize(child, this.last); + + for (var _iterator2 = nodes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var node = _ref2; + this.nodes.push(node); + } + } + + return this; + }; + /** + * Inserts new nodes to the start of the container. + * + * @param {...(Node|object|string|Node[])} children - new nodes + * + * @return {Node} this node for methods chain + * + * @example + * const decl1 = postcss.decl({ prop: 'color', value: 'black' }); + * const decl2 = postcss.decl({ prop: 'background-color', value: 'white' }); + * rule.prepend(decl1, decl2); + * + * root.append({ name: 'charset', params: '"UTF-8"' }); // at-rule + * root.append({ selector: 'a' }); // rule + * rule.append({ prop: 'color', value: 'black' }); // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}'); + * root.first.append('color: black; z-index: 1'); + */ + + + Container.prototype.prepend = function prepend() { + for (var _len2 = arguments.length, children = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + children[_key2] = arguments[_key2]; + } + + children = children.reverse(); + + for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var child = _ref3; + var nodes = this.normalize(child, this.first, 'prepend').reverse(); + + for (var _iterator4 = nodes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var node = _ref4; + this.nodes.unshift(node); + } + + for (var id in this.indexes) { + this.indexes[id] = this.indexes[id] + nodes.length; + } + } + + return this; + }; + + Container.prototype.cleanRaws = function cleanRaws(keepBetween) { + _Node.prototype.cleanRaws.call(this, keepBetween); + + if (this.nodes) { + for (var _iterator5 = this.nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var node = _ref5; + node.cleanRaws(keepBetween); + } + } + }; + /** + * Insert new node before old node within the container. + * + * @param {Node|number} exist - child or child’s index. + * @param {Node|object|string|Node[]} add - new node + * + * @return {Node} this node for methods chain + * + * @example + * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop })); + */ + + + Container.prototype.insertBefore = function insertBefore(exist, add) { + exist = this.index(exist); + var type = exist === 0 ? 'prepend' : false; + var nodes = this.normalize(add, this.nodes[exist], type).reverse(); + + for (var _iterator6 = nodes, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var node = _ref6; + this.nodes.splice(exist, 0, node); + } + + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (exist <= index) { + this.indexes[id] = index + nodes.length; + } + } + + return this; + }; + /** + * Insert new node after old node within the container. + * + * @param {Node|number} exist - child or child’s index + * @param {Node|object|string|Node[]} add - new node + * + * @return {Node} this node for methods chain + */ + + + Container.prototype.insertAfter = function insertAfter(exist, add) { + exist = this.index(exist); + var nodes = this.normalize(add, this.nodes[exist]).reverse(); + + for (var _iterator7 = nodes, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + var node = _ref7; + this.nodes.splice(exist + 1, 0, node); + } + + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (exist < index) { + this.indexes[id] = index + nodes.length; + } + } + + return this; + }; + /** + * Removes node from the container and cleans the parent properties + * from the node and its children. + * + * @param {Node|number} child - child or child’s index + * + * @return {Node} this node for methods chain + * + * @example + * rule.nodes.length //=> 5 + * rule.removeChild(decl); + * rule.nodes.length //=> 4 + * decl.parent //=> undefined + */ + + + Container.prototype.removeChild = function removeChild(child) { + child = this.index(child); + this.nodes[child].parent = undefined; + this.nodes.splice(child, 1); + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + return this; + }; + /** + * Removes all children from the container + * and cleans their parent properties. + * + * @return {Node} this node for methods chain + * + * @example + * rule.removeAll(); + * rule.nodes.length //=> 0 + */ + + + Container.prototype.removeAll = function removeAll() { + for (var _iterator8 = this.nodes, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref8; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref8 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref8 = _i8.value; + } + + var node = _ref8; + node.parent = undefined; + } + + this.nodes = []; + return this; + }; + /** + * Passes all declaration values within the container that match pattern + * through callback, replacing those values with the returned result + * of callback. + * + * This method is useful if you are using a custom unit or function + * and need to iterate through all values. + * + * @param {string|RegExp} pattern - replace pattern + * @param {object} opts - options to speed up the search + * @param {string|string[]} opts.props - an array of property names + * @param {string} opts.fast - string that’s used + * to narrow down values and speed up + the regexp search + * @param {function|string} callback - string to replace pattern + * or callback that returns a new + * value. + * The callback will receive + * the same arguments as those + * passed to a function parameter + * of `String#replace`. + * + * @return {Node} this node for methods chain + * + * @example + * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => { + * return 15 * parseInt(string) + 'px'; + * }); + */ + + + Container.prototype.replaceValues = function replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts; + opts = {}; + } + + this.walkDecls(function (decl) { + if (opts.props && opts.props.indexOf(decl.prop) === -1) return; + if (opts.fast && decl.value.indexOf(opts.fast) === -1) return; + decl.value = decl.value.replace(pattern, callback); + }); + return this; + }; + /** + * Returns `true` if callback returns `true` + * for all of the container’s children. + * + * @param {childCondition} condition - iterator returns true or false. + * + * @return {boolean} is every child pass condition + * + * @example + * const noPrefixes = rule.every(i => i.prop[0] !== '-'); + */ + + + Container.prototype.every = function every(condition) { + return this.nodes.every(condition); + }; + /** + * Returns `true` if callback returns `true` for (at least) one + * of the container’s children. + * + * @param {childCondition} condition - iterator returns true or false. + * + * @return {boolean} is some child pass condition + * + * @example + * const hasPrefix = rule.some(i => i.prop[0] === '-'); + */ + + + Container.prototype.some = function some(condition) { + return this.nodes.some(condition); + }; + /** + * Returns a `child`’s index within the {@link Container#nodes} array. + * + * @param {Node} child - child of the current container. + * + * @return {number} child index + * + * @example + * rule.index( rule.nodes[2] ) //=> 2 + */ + + + Container.prototype.index = function index(child) { + if (typeof child === 'number') { + return child; + } else { + return this.nodes.indexOf(child); + } + }; + /** + * The container’s first child. + * + * @type {Node} + * + * @example + * rule.first == rules.nodes[0]; + */ + + + Container.prototype.normalize = function normalize(nodes, sample) { + var _this2 = this; + + if (typeof nodes === 'string') { + var parse = __webpack_require__(73); + + nodes = cleanSource(parse(nodes).nodes); + } else if (Array.isArray(nodes)) { + nodes = nodes.slice(0); + + for (var _iterator9 = nodes, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref9; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref9 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref9 = _i9.value; + } + + var i = _ref9; + if (i.parent) i.parent.removeChild(i, 'ignore'); + } + } else if (nodes.type === 'root') { + nodes = nodes.nodes.slice(0); + + for (var _iterator10 = nodes, _isArray10 = Array.isArray(_iterator10), _i11 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref10; + + if (_isArray10) { + if (_i11 >= _iterator10.length) break; + _ref10 = _iterator10[_i11++]; + } else { + _i11 = _iterator10.next(); + if (_i11.done) break; + _ref10 = _i11.value; + } + + var _i10 = _ref10; + if (_i10.parent) _i10.parent.removeChild(_i10, 'ignore'); + } + } else if (nodes.type) { + nodes = [nodes]; + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation'); + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value); + } + + nodes = [new _declaration2.default(nodes)]; + } else if (nodes.selector) { + var Rule = __webpack_require__(23); + + nodes = [new Rule(nodes)]; + } else if (nodes.name) { + var AtRule = __webpack_require__(22); + + nodes = [new AtRule(nodes)]; + } else if (nodes.text) { + nodes = [new _comment2.default(nodes)]; + } else { + throw new Error('Unknown node type in node creation'); + } + + var processed = nodes.map(function (i) { + if (typeof i.before !== 'function') i = _this2.rebuild(i); + if (i.parent) i.parent.removeChild(i); + + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/[^\s]/g, ''); + } + } + + i.parent = _this2; + return i; + }); + return processed; + }; + + Container.prototype.rebuild = function rebuild(node, parent) { + var _this3 = this; + + var fix = void 0; + + if (node.type === 'root') { + var Root = __webpack_require__(74); + + fix = new Root(); + } else if (node.type === 'atrule') { + var AtRule = __webpack_require__(22); + + fix = new AtRule(); + } else if (node.type === 'rule') { + var Rule = __webpack_require__(23); + + fix = new Rule(); + } else if (node.type === 'decl') { + fix = new _declaration2.default(); + } else if (node.type === 'comment') { + fix = new _comment2.default(); + } + + for (var i in node) { + if (i === 'nodes') { + fix.nodes = node.nodes.map(function (j) { + return _this3.rebuild(j, fix); + }); + } else if (i === 'parent' && parent) { + fix.parent = parent; + } else if (node.hasOwnProperty(i)) { + fix[i] = node[i]; + } + } + + return fix; + }; + /** + * @memberof Container# + * @member {Node[]} nodes - an array containing the container’s children + * + * @example + * const root = postcss.parse('a { color: black }'); + * root.nodes.length //=> 1 + * root.nodes[0].selector //=> 'a' + * root.nodes[0].nodes[0].prop //=> 'color' + */ + + + _createClass(Container, [{ + key: 'first', + get: function get() { + if (!this.nodes) return undefined; + return this.nodes[0]; + } + /** + * The container’s last child. + * + * @type {Node} + * + * @example + * rule.last == rule.nodes[rule.nodes.length - 1]; + */ + + }, { + key: 'last', + get: function get() { + if (!this.nodes) return undefined; + return this.nodes[this.nodes.length - 1]; + } + }]); + + return Container; +}(_node2.default); + +exports.default = Container; +/** + * @callback childCondition + * @param {Node} node - container child + * @param {number} index - child index + * @param {Node[]} nodes - all container children + * @return {boolean} + */ + +/** + * @callback childIterator + * @param {Node} node - container child + * @param {number} index - child index + * @return {false|undefined} returning `false` will break iteration + */ + +module.exports = exports['default']; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = lessStringify; + +var _lessStringifier = __webpack_require__(163); + +var _lessStringifier2 = _interopRequireDefault(_lessStringifier); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function lessStringify(node, builder) { + var str = new _lessStringifier2.default(builder); + str.stringify(node); +} + +module.exports = exports['default']; + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var g; // This works in non-strict mode + +g = function () { + return this; +}(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1, eval)("this"); +} catch (e) { + // This works if the window reference is available + if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window; +} // g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + + +module.exports = g; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _node = __webpack_require__(5); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(0); + +var types = _interopRequireWildcard(_types); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Container = function (_Node) { + _inherits(Container, _Node); + + function Container(opts) { + _classCallCheck(this, Container); + + var _this = _possibleConstructorReturn(this, _Node.call(this, opts)); + + if (!_this.nodes) { + _this.nodes = []; + } + + return _this; + } + + Container.prototype.append = function append(selector) { + selector.parent = this; + this.nodes.push(selector); + return this; + }; + + Container.prototype.prepend = function prepend(selector) { + selector.parent = this; + this.nodes.unshift(selector); + return this; + }; + + Container.prototype.at = function at(index) { + return this.nodes[index]; + }; + + Container.prototype.index = function index(child) { + if (typeof child === 'number') { + return child; + } + + return this.nodes.indexOf(child); + }; + + Container.prototype.removeChild = function removeChild(child) { + child = this.index(child); + this.at(child).parent = undefined; + this.nodes.splice(child, 1); + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + return this; + }; + + Container.prototype.removeAll = function removeAll() { + for (var _iterator = this.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + node.parent = undefined; + } + + this.nodes = []; + return this; + }; + + Container.prototype.empty = function empty() { + return this.removeAll(); + }; + + Container.prototype.insertAfter = function insertAfter(oldNode, newNode) { + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex + 1, 0, newNode); + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (oldIndex <= index) { + this.indexes[id] = index + this.nodes.length; + } + } + + return this; + }; + + Container.prototype.insertBefore = function insertBefore(oldNode, newNode) { + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex, 0, newNode); + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (oldIndex <= index) { + this.indexes[id] = index + this.nodes.length; + } + } + + return this; + }; + + Container.prototype.each = function each(callback) { + if (!this.lastEach) { + this.lastEach = 0; + } + + if (!this.indexes) { + this.indexes = {}; + } + + this.lastEach++; + var id = this.lastEach; + this.indexes[id] = 0; + + if (!this.length) { + return undefined; + } + + var index = void 0, + result = void 0; + + while (this.indexes[id] < this.length) { + index = this.indexes[id]; + result = callback(this.at(index), index); + + if (result === false) { + break; + } + + this.indexes[id] += 1; + } + + delete this.indexes[id]; + + if (result === false) { + return false; + } + }; + + Container.prototype.walk = function walk(callback) { + return this.each(function (node, i) { + var result = callback(node, i); + + if (result !== false && node.length) { + result = node.walk(callback); + } + + if (result === false) { + return false; + } + }); + }; + + Container.prototype.walkAttributes = function walkAttributes(callback) { + var _this2 = this; + + return this.walk(function (selector) { + if (selector.type === types.ATTRIBUTE) { + return callback.call(_this2, selector); + } + }); + }; + + Container.prototype.walkClasses = function walkClasses(callback) { + var _this3 = this; + + return this.walk(function (selector) { + if (selector.type === types.CLASS) { + return callback.call(_this3, selector); + } + }); + }; + + Container.prototype.walkCombinators = function walkCombinators(callback) { + var _this4 = this; + + return this.walk(function (selector) { + if (selector.type === types.COMBINATOR) { + return callback.call(_this4, selector); + } + }); + }; + + Container.prototype.walkComments = function walkComments(callback) { + var _this5 = this; + + return this.walk(function (selector) { + if (selector.type === types.COMMENT) { + return callback.call(_this5, selector); + } + }); + }; + + Container.prototype.walkIds = function walkIds(callback) { + var _this6 = this; + + return this.walk(function (selector) { + if (selector.type === types.ID) { + return callback.call(_this6, selector); + } + }); + }; + + Container.prototype.walkNesting = function walkNesting(callback) { + var _this7 = this; + + return this.walk(function (selector) { + if (selector.type === types.NESTING) { + return callback.call(_this7, selector); + } + }); + }; + + Container.prototype.walkPseudos = function walkPseudos(callback) { + var _this8 = this; + + return this.walk(function (selector) { + if (selector.type === types.PSEUDO) { + return callback.call(_this8, selector); + } + }); + }; + + Container.prototype.walkTags = function walkTags(callback) { + var _this9 = this; + + return this.walk(function (selector) { + if (selector.type === types.TAG) { + return callback.call(_this9, selector); + } + }); + }; + + Container.prototype.walkUniversals = function walkUniversals(callback) { + var _this10 = this; + + return this.walk(function (selector) { + if (selector.type === types.UNIVERSAL) { + return callback.call(_this10, selector); + } + }); + }; + + Container.prototype.split = function split(callback) { + var _this11 = this; + + var current = []; + return this.reduce(function (memo, node, index) { + var split = callback.call(_this11, node); + current.push(node); + + if (split) { + memo.push(current); + current = []; + } else if (index === _this11.length - 1) { + memo.push(current); + } + + return memo; + }, []); + }; + + Container.prototype.map = function map(callback) { + return this.nodes.map(callback); + }; + + Container.prototype.reduce = function reduce(callback, memo) { + return this.nodes.reduce(callback, memo); + }; + + Container.prototype.every = function every(callback) { + return this.nodes.every(callback); + }; + + Container.prototype.some = function some(callback) { + return this.nodes.some(callback); + }; + + Container.prototype.filter = function filter(callback) { + return this.nodes.filter(callback); + }; + + Container.prototype.sort = function sort(callback) { + return this.nodes.sort(callback); + }; + + Container.prototype.toString = function toString() { + return this.map(String).join(''); + }; + + _createClass(Container, [{ + key: 'first', + get: function get() { + return this.at(0); + } + }, { + key: 'last', + get: function get() { + return this.at(this.length - 1); + } + }, { + key: 'length', + get: function get() { + return this.nodes.length; + } + }]); + + return Container; +}(_node2.default); + +exports.default = Container; +module.exports = exports['default']; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var defaultRaw = { + colon: ': ', + indent: ' ', + beforeDecl: '\n', + beforeRule: '\n', + beforeOpen: ' ', + beforeClose: '\n', + beforeComment: '\n', + after: '\n', + emptyBody: '', + commentLeft: ' ', + commentRight: ' ' +}; + +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +} + +var Stringifier = function () { + function Stringifier(builder) { + _classCallCheck(this, Stringifier); + + this.builder = builder; + } + + Stringifier.prototype.stringify = function stringify(node, semicolon) { + this[node.type](node, semicolon); + }; + + Stringifier.prototype.root = function root(node) { + this.body(node); + if (node.raws.after) this.builder(node.raws.after); + }; + + Stringifier.prototype.comment = function comment(node) { + var left = this.raw(node, 'left', 'commentLeft'); + var right = this.raw(node, 'right', 'commentRight'); + this.builder('/*' + left + node.text + right + '*/', node); + }; + + Stringifier.prototype.decl = function decl(node, semicolon) { + var between = this.raw(node, 'between', 'colon'); + var string = node.prop + between + this.rawValue(node, 'value'); + + if (node.important) { + string += node.raws.important || ' !important'; + } + + if (semicolon) string += ';'; + this.builder(string, node); + }; + + Stringifier.prototype.rule = function rule(node) { + this.block(node, this.rawValue(node, 'selector')); + + if (node.raws.ownSemicolon) { + this.builder(node.raws.ownSemicolon, node, 'end'); + } + }; + + Stringifier.prototype.atrule = function atrule(node, semicolon) { + var name = '@' + node.name; + var params = node.params ? this.rawValue(node, 'params') : ''; + + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName; + } else if (params) { + name += ' '; + } + + if (node.nodes) { + this.block(node, name + params); + } else { + var end = (node.raws.between || '') + (semicolon ? ';' : ''); + this.builder(name + params + end, node); + } + }; + + Stringifier.prototype.body = function body(node) { + var last = node.nodes.length - 1; + + while (last > 0) { + if (node.nodes[last].type !== 'comment') break; + last -= 1; + } + + var semicolon = this.raw(node, 'semicolon'); + + for (var i = 0; i < node.nodes.length; i++) { + var child = node.nodes[i]; + var before = this.raw(child, 'before'); + if (before) this.builder(before); + this.stringify(child, last !== i || semicolon); + } + }; + + Stringifier.prototype.block = function block(node, start) { + var between = this.raw(node, 'between', 'beforeOpen'); + this.builder(start + between + '{', node, 'start'); + var after = void 0; + + if (node.nodes && node.nodes.length) { + this.body(node); + after = this.raw(node, 'after'); + } else { + after = this.raw(node, 'after', 'emptyBody'); + } + + if (after) this.builder(after); + this.builder('}', node, 'end'); + }; + + Stringifier.prototype.raw = function raw(node, own, detect) { + var value = void 0; + if (!detect) detect = own; // Already had + + if (own) { + value = node.raws[own]; + if (typeof value !== 'undefined') return value; + } + + var parent = node.parent; // Hack for first rule in CSS + + if (detect === 'before') { + if (!parent || parent.type === 'root' && parent.first === node) { + return ''; + } + } // Floating child without parent + + + if (!parent) return defaultRaw[detect]; // Detect style by other nodes + + var root = node.root(); + if (!root.rawCache) root.rawCache = {}; + + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect]; + } + + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect); + } else { + var method = 'raw' + capitalize(detect); + + if (this[method]) { + value = this[method](root, node); + } else { + root.walk(function (i) { + value = i.raws[own]; + if (typeof value !== 'undefined') return false; + }); + } + } + + if (typeof value === 'undefined') value = defaultRaw[detect]; + root.rawCache[detect] = value; + return value; + }; + + Stringifier.prototype.rawSemicolon = function rawSemicolon(root) { + var value = void 0; + root.walk(function (i) { + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + Stringifier.prototype.rawEmptyBody = function rawEmptyBody(root) { + var value = void 0; + root.walk(function (i) { + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + Stringifier.prototype.rawIndent = function rawIndent(root) { + if (root.raws.indent) return root.raws.indent; + var value = void 0; + root.walk(function (i) { + var p = i.parent; + + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + var parts = i.raws.before.split('\n'); + value = parts[parts.length - 1]; + value = value.replace(/[^\s]/g, ''); + return false; + } + } + }); + return value; + }; + + Stringifier.prototype.rawBeforeComment = function rawBeforeComment(root, node) { + var value = void 0; + root.walkComments(function (i) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + }); + + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl'); + } else if (value) { + value = value.replace(/[^\s]/g, ''); + } + + return value; + }; + + Stringifier.prototype.rawBeforeDecl = function rawBeforeDecl(root, node) { + var value = void 0; + root.walkDecls(function (i) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + }); + + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule'); + } else if (value) { + value = value.replace(/[^\s]/g, ''); + } + + return value; + }; + + Stringifier.prototype.rawBeforeRule = function rawBeforeRule(root) { + var value = void 0; + root.walk(function (i) { + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + } + }); + if (value) value = value.replace(/[^\s]/g, ''); + return value; + }; + + Stringifier.prototype.rawBeforeClose = function rawBeforeClose(root) { + var value = void 0; + root.walk(function (i) { + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + } + }); + if (value) value = value.replace(/[^\s]/g, ''); + return value; + }; + + Stringifier.prototype.rawBeforeOpen = function rawBeforeOpen(root) { + var value = void 0; + root.walk(function (i) { + if (i.type !== 'decl') { + value = i.raws.between; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + Stringifier.prototype.rawColon = function rawColon(root) { + var value = void 0; + root.walkDecls(function (i) { + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, ''); + return false; + } + }); + return value; + }; + + Stringifier.prototype.beforeAfter = function beforeAfter(node, detect) { + var value = void 0; + + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl'); + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment'); + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule'); + } else { + value = this.raw(node, null, 'beforeClose'); + } + + var buf = node.parent; + var depth = 0; + + while (buf && buf.type !== 'root') { + depth += 1; + buf = buf.parent; + } + + if (value.indexOf('\n') !== -1) { + var indent = this.raw(node, null, 'indent'); + + if (indent.length) { + for (var step = 0; step < depth; step++) { + value += indent; + } + } + } + + return value; + }; + + Stringifier.prototype.rawValue = function rawValue(node, prop) { + var value = node[prop]; + var raw = node.raws[prop]; + + if (raw && raw.value === value) { + return raw.raw; + } else { + return value; + } + }; + + return Stringifier; +}(); + +exports.default = Stringifier; +module.exports = exports['default']; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _cssSyntaxError = __webpack_require__(62); + +var _cssSyntaxError2 = _interopRequireDefault(_cssSyntaxError); + +var _previousMap = __webpack_require__(123); + +var _previousMap2 = _interopRequireDefault(_previousMap); + +var _path = __webpack_require__(6); + +var _path2 = _interopRequireDefault(_path); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var sequence = 0; +/** + * Represents the source CSS. + * + * @example + * const root = postcss.parse(css, { from: file }); + * const input = root.source.input; + */ + +var Input = function () { + /** + * @param {string} css - input CSS source + * @param {object} [opts] - {@link Processor#process} options + */ + function Input(css) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Input); + + if (css === null || (typeof css === 'undefined' ? 'undefined' : _typeof(css)) === 'object' && !css.toString) { + throw new Error('PostCSS received ' + css + ' instead of CSS string'); + } + /** + * @member {string} - input CSS source + * + * @example + * const input = postcss.parse('a{}', { from: file }).input; + * input.css //=> "a{}"; + */ + + + this.css = css.toString(); + + if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") { + this.css = this.css.slice(1); + } + + if (opts.from) { + if (/^\w+:\/\//.test(opts.from)) { + /** + * @member {string} - The absolute path to the CSS source file + * defined with the `from` option. + * + * @example + * const root = postcss.parse(css, { from: 'a.css' }); + * root.source.input.file //=> '/home/ai/a.css' + */ + this.file = opts.from; + } else { + this.file = _path2.default.resolve(opts.from); + } + } + + var map = new _previousMap2.default(this.css, opts); + + if (map.text) { + /** + * @member {PreviousMap} - The input source map passed from + * a compilation step before PostCSS + * (for example, from Sass compiler). + * + * @example + * root.source.input.map.consumer().sources //=> ['a.sass'] + */ + this.map = map; + var file = map.consumer().file; + if (!this.file && file) this.file = this.mapResolve(file); + } + + if (!this.file) { + sequence += 1; + /** + * @member {string} - The unique ID of the CSS source. It will be + * created if `from` option is not provided + * (because PostCSS does not know the file path). + * + * @example + * const root = postcss.parse(css); + * root.source.input.file //=> undefined + * root.source.input.id //=> "" + */ + + this.id = ''; + } + + if (this.map) this.map.file = this.from; + } + + Input.prototype.error = function error(message, line, column) { + var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var result = void 0; + var origin = this.origin(line, column); + + if (origin) { + result = new _cssSyntaxError2.default(message, origin.line, origin.column, origin.source, origin.file, opts.plugin); + } else { + result = new _cssSyntaxError2.default(message, line, column, this.css, this.file, opts.plugin); + } + + result.input = { + line: line, + column: column, + source: this.css + }; + if (this.file) result.input.file = this.file; + return result; + }; + /** + * Reads the input source map and returns a symbol position + * in the input source (e.g., in a Sass file that was compiled + * to CSS before being passed to PostCSS). + * + * @param {number} line - line in input CSS + * @param {number} column - column in input CSS + * + * @return {filePosition} position in input source + * + * @example + * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 } + */ + + + Input.prototype.origin = function origin(line, column) { + if (!this.map) return false; + var consumer = this.map.consumer(); + var from = consumer.originalPositionFor({ + line: line, + column: column + }); + if (!from.source) return false; + var result = { + file: this.mapResolve(from.source), + line: from.line, + column: from.column + }; + var source = consumer.sourceContentFor(from.source); + if (source) result.source = source; + return result; + }; + + Input.prototype.mapResolve = function mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file; + } else { + return _path2.default.resolve(this.map.consumer().sourceRoot || '.', file); + } + }; + /** + * The CSS source identifier. Contains {@link Input#file} if the user + * set the `from` option, or {@link Input#id} if they did not. + * @type {string} + * + * @example + * const root = postcss.parse(css, { from: 'a.css' }); + * root.source.input.from //=> "/home/ai/a.css" + * + * const root = postcss.parse(css); + * root.source.input.from //=> "" + */ + + + _createClass(Input, [{ + key: 'from', + get: function get() { + return this.file || this.id; + } + }]); + + return Input; +}(); + +exports.default = Input; +/** + * @typedef {object} filePosition + * @property {string} file - path to file + * @property {number} line - source line in file + * @property {number} column - source column in file + */ + +module.exports = exports['default']; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/* eslint-disable no-proto */ + + +var base64 = __webpack_require__(124); + +var ieee754 = __webpack_require__(125); + +var isArray = __webpack_require__(126); + +exports.Buffer = Buffer; +exports.SlowBuffer = SlowBuffer; +exports.INSPECT_MAX_BYTES = 50; +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ + +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport(); +/* + * Export kMaxLength after typed array support is determined. + */ + +exports.kMaxLength = kMaxLength(); + +function typedArraySupport() { + try { + var arr = new Uint8Array(1); + arr.__proto__ = { + __proto__: Uint8Array.prototype, + foo: function foo() { + return 42; + } + }; + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray` + } catch (e) { + return false; + } +} + +function kMaxLength() { + return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff; +} + +function createBuffer(that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length'); + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length); + that.__proto__ = Buffer.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length); + } + + that.length = length; + } + + return that; +} +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + + +function Buffer(arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length); + } // Common case. + + + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error('If encoding is specified then the first argument must be a string'); + } + + return allocUnsafe(this, arg); + } + + return from(this, arg, encodingOrOffset, length); +} + +Buffer.poolSize = 8192; // not used by this implementation +// TODO: Legacy, not needed anymore. Remove in next major version. + +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype; + return arr; +}; + +function from(that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number'); + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length); + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset); + } + + return fromObject(that, value); +} +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ + + +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length); +}; + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype; + Buffer.__proto__ = Uint8Array; + + if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }); + } +} + +function assertSize(size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number'); + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative'); + } +} + +function alloc(that, size, fill, encoding) { + assertSize(size); + + if (size <= 0) { + return createBuffer(that, size); + } + + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill); + } + + return createBuffer(that, size); +} +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ + + +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding); +}; + +function allocUnsafe(that, size) { + assertSize(size); + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); + + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0; + } + } + + return that; +} +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ + + +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size); +}; +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ + + +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size); +}; + +function fromString(that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding'); + } + + var length = byteLength(string, encoding) | 0; + that = createBuffer(that, length); + var actual = that.write(string, encoding); + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual); + } + + return that; +} + +function fromArrayLike(that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + that = createBuffer(that, length); + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255; + } + + return that; +} + +function fromArrayBuffer(that, array, byteOffset, length) { + array.byteLength; // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds'); + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds'); + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array); + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset); + } else { + array = new Uint8Array(array, byteOffset, length); + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array; + that.__proto__ = Buffer.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array); + } + + return that; +} + +function fromObject(that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0; + that = createBuffer(that, len); + + if (that.length === 0) { + return that; + } + + obj.copy(that, 0, 0, len); + return that; + } + + if (obj) { + if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0); + } + + return fromArrayLike(that, obj); + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data); + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'); +} + +function checked(length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes'); + } + + return length | 0; +} + +function SlowBuffer(length) { + if (+length != length) { + // eslint-disable-line eqeqeq + length = 0; + } + + return Buffer.alloc(+length); +} + +Buffer.isBuffer = function isBuffer(b) { + return !!(b != null && b._isBuffer); +}; + +Buffer.compare = function compare(a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers'); + } + + if (a === b) return 0; + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; +}; + +Buffer.isEncoding = function isEncoding(encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true; + + default: + return false; + } +}; + +Buffer.concat = function concat(list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + + if (list.length === 0) { + return Buffer.alloc(0); + } + + var i; + + if (length === undefined) { + length = 0; + + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + + var buffer = Buffer.allocUnsafe(length); + var pos = 0; + + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + + buf.copy(buffer, pos); + pos += buf.length; + } + + return buffer; +}; + +function byteLength(string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength; + } + + if (typeof string !== 'string') { + string = '' + string; + } + + var len = string.length; + if (len === 0) return 0; // Use a for loop to avoid recursion + + var loweredCase = false; + + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len; + + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length; + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2; + + case 'hex': + return len >>> 1; + + case 'base64': + return base64ToBytes(string).length; + + default: + if (loweredCase) return utf8ToBytes(string).length; // assume utf8 + + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +} + +Buffer.byteLength = byteLength; + +function slowToString(encoding, start, end) { + var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + + if (start === undefined || start < 0) { + start = 0; + } // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + + + if (start > this.length) { + return ''; + } + + if (end === undefined || end > this.length) { + end = this.length; + } + + if (end <= 0) { + return ''; + } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + + + end >>>= 0; + start >>>= 0; + + if (end <= start) { + return ''; + } + + if (!encoding) encoding = 'utf8'; + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end); + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end); + + case 'ascii': + return asciiSlice(this, start, end); + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end); + + case 'base64': + return base64Slice(this, start, end); + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end); + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); + encoding = (encoding + '').toLowerCase(); + loweredCase = true; + } + } +} // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. + + +Buffer.prototype._isBuffer = true; + +function swap(b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; +} + +Buffer.prototype.swap16 = function swap16() { + var len = this.length; + + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits'); + } + + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + + return this; +}; + +Buffer.prototype.swap32 = function swap32() { + var len = this.length; + + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits'); + } + + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + + return this; +}; + +Buffer.prototype.swap64 = function swap64() { + var len = this.length; + + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits'); + } + + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + + return this; +}; + +Buffer.prototype.toString = function toString() { + var length = this.length | 0; + if (length === 0) return ''; + if (arguments.length === 0) return utf8Slice(this, 0, length); + return slowToString.apply(this, arguments); +}; + +Buffer.prototype.equals = function equals(b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); + if (this === b) return true; + return Buffer.compare(this, b) === 0; +}; + +Buffer.prototype.inspect = function inspect() { + var str = ''; + var max = exports.INSPECT_MAX_BYTES; + + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); + if (this.length > max) str += ' ... '; + } + + return ''; +}; + +Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer'); + } + + if (start === undefined) { + start = 0; + } + + if (end === undefined) { + end = target ? target.length : 0; + } + + if (thisStart === undefined) { + thisStart = 0; + } + + if (thisEnd === undefined) { + thisEnd = this.length; + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index'); + } + + if (thisStart >= thisEnd && start >= end) { + return 0; + } + + if (thisStart >= thisEnd) { + return -1; + } + + if (start >= end) { + return 1; + } + + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + if (this === target) return 0; + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; +}; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf + + +function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1; // Normalize byteOffset + + if (typeof byteOffset === 'string') { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + + byteOffset = +byteOffset; // Coerce to Number. + + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : buffer.length - 1; + } // Normalize byteOffset: negative offsets start from the end of the buffer + + + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + + if (byteOffset >= buffer.length) { + if (dir) return -1;else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0;else return -1; + } // Normalize val + + + if (typeof val === 'string') { + val = Buffer.from(val, encoding); + } // Finally, search either indexOf (if dir is true) or lastIndexOf + + + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1; + } + + return arrayIndexOf(buffer, val, byteOffset, encoding, dir); + } else if (typeof val === 'number') { + val = val & 0xFF; // Search for a byte value [0-255] + + if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); + } + } + + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); + } + + throw new TypeError('val must be string, number or Buffer'); +} + +function arrayIndexOf(arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + + if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1; + } + + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + + function read(buf, i) { + if (indexSize === 1) { + return buf[i]; + } else { + return buf.readUInt16BE(i * indexSize); + } + } + + var i; + + if (dir) { + var foundIndex = -1; + + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + + for (i = byteOffset; i >= 0; i--) { + var found = true; + + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break; + } + } + + if (found) return i; + } + } + + return -1; +} + +Buffer.prototype.includes = function includes(val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1; +}; + +Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true); +}; + +Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false); +}; + +function hexWrite(buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + + if (!length) { + length = remaining; + } else { + length = Number(length); + + if (length > remaining) { + length = remaining; + } + } // must be an even number of digits + + + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string'); + + if (length > strLen / 2) { + length = strLen / 2; + } + + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (isNaN(parsed)) return i; + buf[offset + i] = parsed; + } + + return i; +} + +function utf8Write(buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); +} + +function asciiWrite(buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length); +} + +function latin1Write(buf, string, offset, length) { + return asciiWrite(buf, string, offset, length); +} + +function base64Write(buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length); +} + +function ucs2Write(buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); +} + +Buffer.prototype.write = function write(string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8'; + length = this.length; + offset = 0; // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset; + length = this.length; + offset = 0; // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0; + + if (isFinite(length)) { + length = length | 0; + if (encoding === undefined) encoding = 'utf8'; + } else { + encoding = length; + length = undefined; + } // legacy write(string, encoding, offset, length) - remove in v0.13 + + } else { + throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); + } + + var remaining = this.length - offset; + if (length === undefined || length > remaining) length = remaining; + + if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds'); + } + + if (!encoding) encoding = 'utf8'; + var loweredCase = false; + + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length); + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length); + + case 'ascii': + return asciiWrite(this, string, offset, length); + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length); + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length); + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length); + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +}; + +Buffer.prototype.toJSON = function toJSON() { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + }; +}; + +function base64Slice(buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf); + } else { + return base64.fromByteArray(buf.slice(start, end)); + } +} + +function utf8Slice(buf, start, end) { + end = Math.min(buf.length, end); + var res = []; + var i = start; + + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + + break; + + case 2: + secondByte = buf[i + 1]; + + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F; + + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint; + } + } + + break; + + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F; + + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint; + } + } + + break; + + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F; + + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint; + } + } + + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD; + bytesPerSequence = 1; + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000; + res.push(codePoint >>> 10 & 0x3FF | 0xD800); + codePoint = 0xDC00 | codePoint & 0x3FF; + } + + res.push(codePoint); + i += bytesPerSequence; + } + + return decodeCodePointsArray(res); +} // Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety + + +var MAX_ARGUMENTS_LENGTH = 0x1000; + +function decodeCodePointsArray(codePoints) { + var len = codePoints.length; + + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints); // avoid extra slice() + } // Decode in chunks to avoid "call stack size exceeded". + + + var res = ''; + var i = 0; + + while (i < len) { + res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); + } + + return res; +} + +function asciiSlice(buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F); + } + + return ret; +} + +function latin1Slice(buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + + return ret; +} + +function hexSlice(buf, start, end) { + var len = buf.length; + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; + var out = ''; + + for (var i = start; i < end; ++i) { + out += toHex(buf[i]); + } + + return out; +} + +function utf16leSlice(buf, start, end) { + var bytes = buf.slice(start, end); + var res = ''; + + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + + return res; +} + +Buffer.prototype.slice = function slice(start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; + } + + if (end < start) end = start; + var newBuf; + + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end); + newBuf.__proto__ = Buffer.prototype; + } else { + var sliceLen = end - start; + newBuf = new Buffer(sliceLen, undefined); + + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start]; + } + } + + return newBuf; +}; +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ + + +function checkOffset(offset, ext, length) { + if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); +} + +Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var val = this[offset]; + var mul = 1; + var i = 0; + + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + return val; +}; + +Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + checkOffset(offset, byteLength, this.length); + } + + var val = this[offset + --byteLength]; + var mul = 1; + + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; + } + + return val; +}; + +Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset]; +}; + +Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | this[offset + 1] << 8; +}; + +Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] << 8 | this[offset + 1]; +}; + +Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000; +}; + +Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); +}; + +Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var val = this[offset]; + var mul = 1; + var i = 0; + + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + mul *= 0x80; + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + return val; +}; + +Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; + } + + mul *= 0x80; + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + return val; +}; + +Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 0x80)) return this[offset]; + return (0xff - this[offset] + 1) * -1; +}; + +Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | this[offset + 1] << 8; + return val & 0x8000 ? val | 0xFFFF0000 : val; +}; + +Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | this[offset] << 8; + return val & 0x8000 ? val | 0xFFFF0000 : val; +}; + +Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; +}; + +Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; +}; + +Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, true, 23, 4); +}; + +Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, false, 23, 4); +}; + +Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, true, 52, 8); +}; + +Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, false, 52, 8); +}; + +function checkInt(buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); + if (offset + ext > buf.length) throw new RangeError('Index out of range'); +} + +Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var mul = 1; + var i = 0; + this[offset] = value & 0xFF; + + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = value / mul & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xFF; + + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = value / mul & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + this[offset] = value & 0xff; + return offset + 1; +}; + +function objectWriteUInt16(buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1; + + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8; + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + } else { + objectWriteUInt16(this, value, offset, true); + } + + return offset + 2; +}; + +Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + } else { + objectWriteUInt16(this, value, offset, false); + } + + return offset + 2; +}; + +function objectWriteUInt32(buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1; + + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff; + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = value >>> 24; + this[offset + 2] = value >>> 16; + this[offset + 1] = value >>> 8; + this[offset] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, true); + } + + return offset + 4; +}; + +Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, false); + } + + return offset + 4; +}; + +Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xFF; + + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + + this[offset + i] = (value / mul >> 0) - sub & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xFF; + + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + + this[offset + i] = (value / mul >> 0) - sub & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (value < 0) value = 0xff + value + 1; + this[offset] = value & 0xff; + return offset + 1; +}; + +Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + } else { + objectWriteUInt16(this, value, offset, true); + } + + return offset + 2; +}; + +Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + } else { + objectWriteUInt16(this, value, offset, false); + } + + return offset + 2; +}; + +Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + this[offset + 2] = value >>> 16; + this[offset + 3] = value >>> 24; + } else { + objectWriteUInt32(this, value, offset, true); + } + + return offset + 4; +}; + +Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, false); + } + + return offset + 4; +}; + +function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range'); + if (offset < 0) throw new RangeError('Index out of range'); +} + +function writeFloat(buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38); + } + + ieee754.write(buf, value, offset, littleEndian, 23, 4); + return offset + 4; +} + +Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert); +}; + +Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert); +}; + +function writeDouble(buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308); + } + + ieee754.write(buf, value, offset, littleEndian, 52, 8); + return offset + 8; +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert); +}; + +Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert); +}; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) + + +Buffer.prototype.copy = function copy(target, targetStart, start, end) { + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done + + if (end === start) return 0; + if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions + + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds'); + } + + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds'); + if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob? + + if (end > this.length) end = this.length; + + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + + var len = end - start; + var i; + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart); + } + + return len; +}; // Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) + + +Buffer.prototype.fill = function fill(val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === 'string') { + encoding = end; + end = this.length; + } + + if (val.length === 1) { + var code = val.charCodeAt(0); + + if (code < 256) { + val = code; + } + } + + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string'); + } + + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding); + } + } else if (typeof val === 'number') { + val = val & 255; + } // Invalid ranges are not set to a default, so can range check early. + + + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index'); + } + + if (end <= start) { + return this; + } + + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + if (!val) val = 0; + var i; + + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()); + var len = bytes.length; + + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + + return this; +}; // HELPER FUNCTIONS +// ================ + + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; + +function base64clean(str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' + + if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + + while (str.length % 4 !== 0) { + str = str + '='; + } + + return str; +} + +function stringtrim(str) { + if (str.trim) return str.trim(); + return str.replace(/^\s+|\s+$/g, ''); +} + +function toHex(n) { + if (n < 16) return '0' + n.toString(16); + return n.toString(16); +} + +function utf8ToBytes(string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); // is surrogate component + + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue; + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue; + } // valid lead + + + leadSurrogate = codePoint; + continue; + } // 2 leads in a row + + + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + leadSurrogate = codePoint; + continue; + } // valid surrogate pair + + + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + } + + leadSurrogate = null; // encode utf8 + + if (codePoint < 0x80) { + if ((units -= 1) < 0) break; + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break; + bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break; + bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break; + bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); + } else { + throw new Error('Invalid code point'); + } + } + + return bytes; +} + +function asciiToBytes(str) { + var byteArray = []; + + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF); + } + + return byteArray; +} + +function utf16leToBytes(str, units) { + var c, hi, lo; + var byteArray = []; + + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break; + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + + return byteArray; +} + +function base64ToBytes(str) { + return base64.toByteArray(base64clean(str)); +} + +function blitBuffer(src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if (i + offset >= dst.length || i >= src.length) break; + dst[i + offset] = src[i]; + } + + return i; +} + +function isnan(val) { + return val !== val; // eslint-disable-line no-self-compare +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _node = __webpack_require__(21); + +var _node2 = _interopRequireDefault(_node); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents a comment between declarations or statements (rule and at-rules). + * + * Comments inside selectors, at-rule parameters, or declaration values + * will be stored in the `raws` properties explained above. + * + * @extends Node + */ + + +var Comment = function (_Node) { + _inherits(Comment, _Node); + + function Comment(defaults) { + _classCallCheck(this, Comment); + + var _this = _possibleConstructorReturn(this, _Node.call(this, defaults)); + + _this.type = 'comment'; + return _this; + } + /** + * @memberof Comment# + * @member {string} text - the comment’s text + */ + + /** + * @memberof Comment# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text. + */ + + + return Comment; +}(_node2.default); + +exports.default = Comment; +module.exports = exports['default']; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _cssSyntaxError = __webpack_require__(62); + +var _cssSyntaxError2 = _interopRequireDefault(_cssSyntaxError); + +var _stringifier = __webpack_require__(17); + +var _stringifier2 = _interopRequireDefault(_stringifier); + +var _stringify = __webpack_require__(69); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _warnOnce = __webpack_require__(70); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var cloneNode = function cloneNode(obj, parent) { + var cloned = new obj.constructor(); + + for (var i in obj) { + if (!obj.hasOwnProperty(i)) continue; + var value = obj[i]; + var type = typeof value === 'undefined' ? 'undefined' : _typeof(value); + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent; + } else if (i === 'source') { + cloned[i] = value; + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + if (type === 'object' && value !== null) value = cloneNode(value); + cloned[i] = value; + } + } + + return cloned; +}; +/** + * All node classes inherit the following common methods. + * + * @abstract + */ + + +var Node = function () { + /** + * @param {object} [defaults] - value for node properties + */ + function Node() { + var defaults = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _classCallCheck(this, Node); + + this.raws = {}; + + if ((typeof defaults === 'undefined' ? 'undefined' : _typeof(defaults)) !== 'object' && typeof defaults !== 'undefined') { + throw new Error('PostCSS nodes constructor accepts object, not ' + JSON.stringify(defaults)); + } + + for (var name in defaults) { + this[name] = defaults[name]; + } + } + /** + * Returns a CssSyntaxError instance containing the original position + * of the node in the source, showing line and column numbers and also + * a small excerpt to facilitate debugging. + * + * If present, an input source map will be used to get the original position + * of the source, even from a previous compilation step + * (e.g., from Sass compilation). + * + * This method produces very useful error messages. + * + * @param {string} message - error description + * @param {object} [opts] - options + * @param {string} opts.plugin - plugin name that created this error. + * PostCSS will set it automatically. + * @param {string} opts.word - a word inside a node’s string that should + * be highlighted as the source of the error + * @param {number} opts.index - an index inside a node’s string that should + * be highlighted as the source of the error + * + * @return {CssSyntaxError} error object to throw it + * + * @example + * if ( !variables[name] ) { + * throw decl.error('Unknown variable ' + name, { word: name }); + * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black + * // color: $black + * // a + * // ^ + * // background: white + * } + */ + + + Node.prototype.error = function error(message) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (this.source) { + var pos = this.positionBy(opts); + return this.source.input.error(message, pos.line, pos.column, opts); + } else { + return new _cssSyntaxError2.default(message); + } + }; + /** + * This method is provided as a convenience wrapper for {@link Result#warn}. + * + * @param {Result} result - the {@link Result} instance + * that will receive the warning + * @param {string} text - warning message + * @param {object} [opts] - options + * @param {string} opts.plugin - plugin name that created this warning. + * PostCSS will set it automatically. + * @param {string} opts.word - a word inside a node’s string that should + * be highlighted as the source of the warning + * @param {number} opts.index - an index inside a node’s string that should + * be highlighted as the source of the warning + * + * @return {Warning} created warning object + * + * @example + * const plugin = postcss.plugin('postcss-deprecated', () => { + * return (root, result) => { + * root.walkDecls('bad', decl => { + * decl.warn(result, 'Deprecated property bad'); + * }); + * }; + * }); + */ + + + Node.prototype.warn = function warn(result, text, opts) { + var data = { + node: this + }; + + for (var i in opts) { + data[i] = opts[i]; + } + + return result.warn(text, data); + }; + /** + * Removes the node from its parent and cleans the parent properties + * from the node and its children. + * + * @example + * if ( decl.prop.match(/^-webkit-/) ) { + * decl.remove(); + * } + * + * @return {Node} node to make calls chain + */ + + + Node.prototype.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + + this.parent = undefined; + return this; + }; + /** + * Returns a CSS string representing the node. + * + * @param {stringifier|syntax} [stringifier] - a syntax to use + * in string generation + * + * @return {string} CSS string of this node + * + * @example + * postcss.rule({ selector: 'a' }).toString() //=> "a {}" + */ + + + Node.prototype.toString = function toString() { + var stringifier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _stringify2.default; + if (stringifier.stringify) stringifier = stringifier.stringify; + var result = ''; + stringifier(this, function (i) { + result += i; + }); + return result; + }; + /** + * Returns a clone of the node. + * + * The resulting cloned node and its (cloned) children will have + * a clean parent and code style properties. + * + * @param {object} [overrides] - new properties to override in the clone. + * + * @example + * const cloned = decl.clone({ prop: '-moz-' + decl.prop }); + * cloned.raws.before //=> undefined + * cloned.parent //=> undefined + * cloned.toString() //=> -moz-transform: scale(0) + * + * @return {Node} clone of the node + */ + + + Node.prototype.clone = function clone() { + var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var cloned = cloneNode(this); + + for (var name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + }; + /** + * Shortcut to clone the node and insert the resulting cloned node + * before the current node. + * + * @param {object} [overrides] - new properties to override in the clone. + * + * @example + * decl.cloneBefore({ prop: '-moz-' + decl.prop }); + * + * @return {Node} - new node + */ + + + Node.prototype.cloneBefore = function cloneBefore() { + var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var cloned = this.clone(overrides); + this.parent.insertBefore(this, cloned); + return cloned; + }; + /** + * Shortcut to clone the node and insert the resulting cloned node + * after the current node. + * + * @param {object} [overrides] - new properties to override in the clone. + * + * @return {Node} - new node + */ + + + Node.prototype.cloneAfter = function cloneAfter() { + var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var cloned = this.clone(overrides); + this.parent.insertAfter(this, cloned); + return cloned; + }; + /** + * Inserts node(s) before the current node and removes the current node. + * + * @param {...Node} nodes - node(s) to replace current one + * + * @example + * if ( atrule.name == 'mixin' ) { + * atrule.replaceWith(mixinRules[atrule.params]); + * } + * + * @return {Node} current node to methods chain + */ + + + Node.prototype.replaceWith = function replaceWith() { + if (this.parent) { + for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) { + nodes[_key] = arguments[_key]; + } + + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + this.parent.insertBefore(this, node); + } + + this.remove(); + } + + return this; + }; + + Node.prototype.moveTo = function moveTo(newParent) { + (0, _warnOnce2.default)('Node#moveTo was deprecated. Use Container#append.'); + this.cleanRaws(this.root() === newParent.root()); + this.remove(); + newParent.append(this); + return this; + }; + + Node.prototype.moveBefore = function moveBefore(otherNode) { + (0, _warnOnce2.default)('Node#moveBefore was deprecated. Use Node#before.'); + this.cleanRaws(this.root() === otherNode.root()); + this.remove(); + otherNode.parent.insertBefore(otherNode, this); + return this; + }; + + Node.prototype.moveAfter = function moveAfter(otherNode) { + (0, _warnOnce2.default)('Node#moveAfter was deprecated. Use Node#after.'); + this.cleanRaws(this.root() === otherNode.root()); + this.remove(); + otherNode.parent.insertAfter(otherNode, this); + return this; + }; + /** + * Returns the next child of the node’s parent. + * Returns `undefined` if the current node is the last child. + * + * @return {Node|undefined} next node + * + * @example + * if ( comment.text === 'delete next' ) { + * const next = comment.next(); + * if ( next ) { + * next.remove(); + * } + * } + */ + + + Node.prototype.next = function next() { + if (!this.parent) return undefined; + var index = this.parent.index(this); + return this.parent.nodes[index + 1]; + }; + /** + * Returns the previous child of the node’s parent. + * Returns `undefined` if the current node is the first child. + * + * @return {Node|undefined} previous node + * + * @example + * const annotation = decl.prev(); + * if ( annotation.type == 'comment' ) { + * readAnnotation(annotation.text); + * } + */ + + + Node.prototype.prev = function prev() { + if (!this.parent) return undefined; + var index = this.parent.index(this); + return this.parent.nodes[index - 1]; + }; + /** + * Insert new node before current node to current node’s parent. + * + * Just alias for `node.parent.insertBefore(node, add)`. + * + * @param {Node|object|string|Node[]} add - new node + * + * @return {Node} this node for methods chain. + * + * @example + * decl.before('content: ""'); + */ + + + Node.prototype.before = function before(add) { + this.parent.insertBefore(this, add); + return this; + }; + /** + * Insert new node after current node to current node’s parent. + * + * Just alias for `node.parent.insertAfter(node, add)`. + * + * @param {Node|object|string|Node[]} add - new node + * + * @return {Node} this node for methods chain. + * + * @example + * decl.after('color: black'); + */ + + + Node.prototype.after = function after(add) { + this.parent.insertAfter(this, add); + return this; + }; + + Node.prototype.toJSON = function toJSON() { + var fixed = {}; + + for (var name in this) { + if (!this.hasOwnProperty(name)) continue; + if (name === 'parent') continue; + var value = this[name]; + + if (value instanceof Array) { + fixed[name] = value.map(function (i) { + if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object' && i.toJSON) { + return i.toJSON(); + } else { + return i; + } + }); + } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.toJSON) { + fixed[name] = value.toJSON(); + } else { + fixed[name] = value; + } + } + + return fixed; + }; + /** + * Returns a {@link Node#raws} value. If the node is missing + * the code style property (because the node was manually built or cloned), + * PostCSS will try to autodetect the code style property by looking + * at other nodes in the tree. + * + * @param {string} prop - name of code style property + * @param {string} [defaultType] - name of default value, it can be missed + * if the value is the same as prop + * + * @example + * const root = postcss.parse('a { background: white }'); + * root.nodes[0].append({ prop: 'color', value: 'black' }); + * root.nodes[0].nodes[1].raws.before //=> undefined + * root.nodes[0].nodes[1].raw('before') //=> ' ' + * + * @return {string} code style value + */ + + + Node.prototype.raw = function raw(prop, defaultType) { + var str = new _stringifier2.default(); + return str.raw(this, prop, defaultType); + }; + /** + * Finds the Root instance of the node’s tree. + * + * @example + * root.nodes[0].nodes[0].root() === root + * + * @return {Root} root parent + */ + + + Node.prototype.root = function root() { + var result = this; + + while (result.parent) { + result = result.parent; + } + + return result; + }; + + Node.prototype.cleanRaws = function cleanRaws(keepBetween) { + delete this.raws.before; + delete this.raws.after; + if (!keepBetween) delete this.raws.between; + }; + + Node.prototype.positionInside = function positionInside(index) { + var string = this.toString(); + var column = this.source.start.column; + var line = this.source.start.line; + + for (var i = 0; i < index; i++) { + if (string[i] === '\n') { + column = 1; + line += 1; + } else { + column += 1; + } + } + + return { + line: line, + column: column + }; + }; + + Node.prototype.positionBy = function positionBy(opts) { + var pos = this.source.start; + + if (opts.index) { + pos = this.positionInside(opts.index); + } else if (opts.word) { + var index = this.toString().indexOf(opts.word); + if (index !== -1) pos = this.positionInside(index); + } + + return pos; + }; + /** + * @memberof Node# + * @member {string} type - String representing the node’s type. + * Possible values are `root`, `atrule`, `rule`, + * `decl`, or `comment`. + * + * @example + * postcss.decl({ prop: 'color', value: 'black' }).type //=> 'decl' + */ + + /** + * @memberof Node# + * @member {Container} parent - the node’s parent node. + * + * @example + * root.nodes[0].parent == root; + */ + + /** + * @memberof Node# + * @member {source} source - the input source of the node + * + * The property is used in source map generation. + * + * If you create a node manually (e.g., with `postcss.decl()`), + * that node will not have a `source` property and will be absent + * from the source map. For this reason, the plugin developer should + * consider cloning nodes to create new ones (in which case the new node’s + * source will reference the original, cloned node) or setting + * the `source` property manually. + * + * ```js + * // Bad + * const prefixed = postcss.decl({ + * prop: '-moz-' + decl.prop, + * value: decl.value + * }); + * + * // Good + * const prefixed = decl.clone({ prop: '-moz-' + decl.prop }); + * ``` + * + * ```js + * if ( atrule.name == 'add-link' ) { + * const rule = postcss.rule({ selector: 'a', source: atrule.source }); + * atrule.parent.insertBefore(atrule, rule); + * } + * ``` + * + * @example + * decl.source.input.from //=> '/home/ai/a.sass' + * decl.source.start //=> { line: 10, column: 2 } + * decl.source.end //=> { line: 10, column: 12 } + */ + + /** + * @memberof Node# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text + * and */. + * * `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS cleans selectors, declaration values and at-rule parameters + * from comments and extra spaces, but it stores origin content in raws + * properties. As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + */ + + + return Node; +}(); + +exports.default = Node; +/** + * @typedef {object} position + * @property {number} line - source line in file + * @property {number} column - source column in file + */ + +/** + * @typedef {object} source + * @property {Input} input - {@link Input} with input file + * @property {position} start - The starting position of the node’s source + * @property {position} end - The ending position of the node’s source + */ + +module.exports = exports['default']; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _container = __webpack_require__(13); + +var _container2 = _interopRequireDefault(_container); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents an at-rule. + * + * If it’s followed in the CSS by a {} block, this node will have + * a nodes property representing its children. + * + * @extends Container + * + * @example + * const root = postcss.parse('@charset "UTF-8"; @media print {}'); + * + * const charset = root.first; + * charset.type //=> 'atrule' + * charset.nodes //=> undefined + * + * const media = root.last; + * media.nodes //=> [] + */ + + +var AtRule = function (_Container) { + _inherits(AtRule, _Container); + + function AtRule(defaults) { + _classCallCheck(this, AtRule); + + var _this = _possibleConstructorReturn(this, _Container.call(this, defaults)); + + _this.type = 'atrule'; + return _this; + } + + AtRule.prototype.append = function append() { + var _Container$prototype$; + + if (!this.nodes) this.nodes = []; + + for (var _len = arguments.length, children = Array(_len), _key = 0; _key < _len; _key++) { + children[_key] = arguments[_key]; + } + + return (_Container$prototype$ = _Container.prototype.append).call.apply(_Container$prototype$, [this].concat(children)); + }; + + AtRule.prototype.prepend = function prepend() { + var _Container$prototype$2; + + if (!this.nodes) this.nodes = []; + + for (var _len2 = arguments.length, children = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + children[_key2] = arguments[_key2]; + } + + return (_Container$prototype$2 = _Container.prototype.prepend).call.apply(_Container$prototype$2, [this].concat(children)); + }; + /** + * @memberof AtRule# + * @member {string} name - the at-rule’s name immediately follows the `@` + * + * @example + * const root = postcss.parse('@media print {}'); + * media.name //=> 'media' + * const media = root.first; + */ + + /** + * @memberof AtRule# + * @member {string} params - the at-rule’s parameters, the values + * that follow the at-rule’s name but precede + * any {} block + * + * @example + * const root = postcss.parse('@media print, screen {}'); + * const media = root.first; + * media.params //=> 'print, screen' + */ + + /** + * @memberof AtRule# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * + * PostCSS cleans at-rule parameters from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse(' @media\nprint {\n}') + * root.first.first.raws //=> { before: ' ', + * // between: ' ', + * // afterName: '\n', + * // after: '\n' } + */ + + + return AtRule; +}(_container2.default); + +exports.default = AtRule; +module.exports = exports['default']; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _container = __webpack_require__(13); + +var _container2 = _interopRequireDefault(_container); + +var _list = __webpack_require__(135); + +var _list2 = _interopRequireDefault(_list); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents a CSS rule: a selector followed by a declaration block. + * + * @extends Container + * + * @example + * const root = postcss.parse('a{}'); + * const rule = root.first; + * rule.type //=> 'rule' + * rule.toString() //=> 'a{}' + */ + + +var Rule = function (_Container) { + _inherits(Rule, _Container); + + function Rule(defaults) { + _classCallCheck(this, Rule); + + var _this = _possibleConstructorReturn(this, _Container.call(this, defaults)); + + _this.type = 'rule'; + if (!_this.nodes) _this.nodes = []; + return _this; + } + /** + * An array containing the rule’s individual selectors. + * Groups of selectors are split at commas. + * + * @type {string[]} + * + * @example + * const root = postcss.parse('a, b { }'); + * const rule = root.first; + * + * rule.selector //=> 'a, b' + * rule.selectors //=> ['a', 'b'] + * + * rule.selectors = ['a', 'strong']; + * rule.selector //=> 'a, strong' + */ + + + _createClass(Rule, [{ + key: 'selectors', + get: function get() { + return _list2.default.comma(this.selector); + }, + set: function set(values) { + var match = this.selector ? this.selector.match(/,\s*/) : null; + var sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen'); + this.selector = values.join(sep); + } + /** + * @memberof Rule# + * @member {string} selector - the rule’s full selector represented + * as a string + * + * @example + * const root = postcss.parse('a, b { }'); + * const rule = root.first; + * rule.selector //=> 'a, b' + */ + + /** + * @memberof Rule# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains `true` if the last child has + * an (optional) semicolon. + * * `ownSemicolon`: contains `true` if there is semicolon after rule. + * + * PostCSS cleans selectors from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '', between: ' ', after: '\n' } + */ + + }]); + + return Rule; +}(_container2.default); + +exports.default = Rule; +module.exports = exports['default']; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _node = __webpack_require__(25); + +var _node2 = _interopRequireDefault(_node); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents a comment between declarations or statements (rule and at-rules). + * + * Comments inside selectors, at-rule parameters, or declaration values + * will be stored in the `raws` properties explained above. + * + * @extends Node + */ + + +var Comment = function (_Node) { + _inherits(Comment, _Node); + + function Comment(defaults) { + _classCallCheck(this, Comment); + + var _this = _possibleConstructorReturn(this, _Node.call(this, defaults)); + + _this.type = 'comment'; + return _this; + } + + _createClass(Comment, [{ + key: 'left', + get: function get() { + (0, _warnOnce2.default)('Comment#left was deprecated. Use Comment#raws.left'); + return this.raws.left; + }, + set: function set(val) { + (0, _warnOnce2.default)('Comment#left was deprecated. Use Comment#raws.left'); + this.raws.left = val; + } + }, { + key: 'right', + get: function get() { + (0, _warnOnce2.default)('Comment#right was deprecated. Use Comment#raws.right'); + return this.raws.right; + }, + set: function set(val) { + (0, _warnOnce2.default)('Comment#right was deprecated. Use Comment#raws.right'); + this.raws.right = val; + } + /** + * @memberof Comment# + * @member {string} text - the comment’s text + */ + + /** + * @memberof Comment# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text. + */ + + }]); + + return Comment; +}(_node2.default); + +exports.default = Comment; +module.exports = exports['default']; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _cssSyntaxError = __webpack_require__(77); + +var _cssSyntaxError2 = _interopRequireDefault(_cssSyntaxError); + +var _stringifier = __webpack_require__(27); + +var _stringifier2 = _interopRequireDefault(_stringifier); + +var _stringify = __webpack_require__(86); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var cloneNode = function cloneNode(obj, parent) { + var cloned = new obj.constructor(); + + for (var i in obj) { + if (!obj.hasOwnProperty(i)) continue; + var value = obj[i]; + var type = typeof value === 'undefined' ? 'undefined' : _typeof(value); + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent; + } else if (i === 'source') { + cloned[i] = value; + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else if (i !== 'before' && i !== 'after' && i !== 'between' && i !== 'semicolon') { + if (type === 'object' && value !== null) value = cloneNode(value); + cloned[i] = value; + } + } + + return cloned; +}; +/** + * All node classes inherit the following common methods. + * + * @abstract + */ + + +var Node = function () { + /** + * @param {object} [defaults] - value for node properties + */ + function Node() { + var defaults = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _classCallCheck(this, Node); + + this.raws = {}; + + if ((typeof defaults === 'undefined' ? 'undefined' : _typeof(defaults)) !== 'object' && typeof defaults !== 'undefined') { + throw new Error('PostCSS nodes constructor accepts object, not ' + JSON.stringify(defaults)); + } + + for (var name in defaults) { + this[name] = defaults[name]; + } + } + /** + * Returns a CssSyntaxError instance containing the original position + * of the node in the source, showing line and column numbers and also + * a small excerpt to facilitate debugging. + * + * If present, an input source map will be used to get the original position + * of the source, even from a previous compilation step + * (e.g., from Sass compilation). + * + * This method produces very useful error messages. + * + * @param {string} message - error description + * @param {object} [opts] - options + * @param {string} opts.plugin - plugin name that created this error. + * PostCSS will set it automatically. + * @param {string} opts.word - a word inside a node’s string that should + * be highlighted as the source of the error + * @param {number} opts.index - an index inside a node’s string that should + * be highlighted as the source of the error + * + * @return {CssSyntaxError} error object to throw it + * + * @example + * if ( !variables[name] ) { + * throw decl.error('Unknown variable ' + name, { word: name }); + * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black + * // color: $black + * // a + * // ^ + * // background: white + * } + */ + + + Node.prototype.error = function error(message) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (this.source) { + var pos = this.positionBy(opts); + return this.source.input.error(message, pos.line, pos.column, opts); + } else { + return new _cssSyntaxError2.default(message); + } + }; + /** + * This method is provided as a convenience wrapper for {@link Result#warn}. + * + * @param {Result} result - the {@link Result} instance + * that will receive the warning + * @param {string} text - warning message + * @param {object} [opts] - options + * @param {string} opts.plugin - plugin name that created this warning. + * PostCSS will set it automatically. + * @param {string} opts.word - a word inside a node’s string that should + * be highlighted as the source of the warning + * @param {number} opts.index - an index inside a node’s string that should + * be highlighted as the source of the warning + * + * @return {Warning} created warning object + * + * @example + * const plugin = postcss.plugin('postcss-deprecated', () => { + * return (root, result) => { + * root.walkDecls('bad', decl => { + * decl.warn(result, 'Deprecated property bad'); + * }); + * }; + * }); + */ + + + Node.prototype.warn = function warn(result, text, opts) { + var data = { + node: this + }; + + for (var i in opts) { + data[i] = opts[i]; + } + + return result.warn(text, data); + }; + /** + * Removes the node from its parent and cleans the parent properties + * from the node and its children. + * + * @example + * if ( decl.prop.match(/^-webkit-/) ) { + * decl.remove(); + * } + * + * @return {Node} node to make calls chain + */ + + + Node.prototype.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + + this.parent = undefined; + return this; + }; + /** + * Returns a CSS string representing the node. + * + * @param {stringifier|syntax} [stringifier] - a syntax to use + * in string generation + * + * @return {string} CSS string of this node + * + * @example + * postcss.rule({ selector: 'a' }).toString() //=> "a {}" + */ + + + Node.prototype.toString = function toString() { + var stringifier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _stringify2.default; + if (stringifier.stringify) stringifier = stringifier.stringify; + var result = ''; + stringifier(this, function (i) { + result += i; + }); + return result; + }; + /** + * Returns a clone of the node. + * + * The resulting cloned node and its (cloned) children will have + * a clean parent and code style properties. + * + * @param {object} [overrides] - new properties to override in the clone. + * + * @example + * const cloned = decl.clone({ prop: '-moz-' + decl.prop }); + * cloned.raws.before //=> undefined + * cloned.parent //=> undefined + * cloned.toString() //=> -moz-transform: scale(0) + * + * @return {Node} clone of the node + */ + + + Node.prototype.clone = function clone() { + var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var cloned = cloneNode(this); + + for (var name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + }; + /** + * Shortcut to clone the node and insert the resulting cloned node + * before the current node. + * + * @param {object} [overrides] - new properties to override in the clone. + * + * @example + * decl.cloneBefore({ prop: '-moz-' + decl.prop }); + * + * @return {Node} - new node + */ + + + Node.prototype.cloneBefore = function cloneBefore() { + var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var cloned = this.clone(overrides); + this.parent.insertBefore(this, cloned); + return cloned; + }; + /** + * Shortcut to clone the node and insert the resulting cloned node + * after the current node. + * + * @param {object} [overrides] - new properties to override in the clone. + * + * @return {Node} - new node + */ + + + Node.prototype.cloneAfter = function cloneAfter() { + var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var cloned = this.clone(overrides); + this.parent.insertAfter(this, cloned); + return cloned; + }; + /** + * Inserts node(s) before the current node and removes the current node. + * + * @param {...Node} nodes - node(s) to replace current one + * + * @example + * if ( atrule.name == 'mixin' ) { + * atrule.replaceWith(mixinRules[atrule.params]); + * } + * + * @return {Node} current node to methods chain + */ + + + Node.prototype.replaceWith = function replaceWith() { + if (this.parent) { + for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) { + nodes[_key] = arguments[_key]; + } + + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + this.parent.insertBefore(this, node); + } + + this.remove(); + } + + return this; + }; + /** + * Removes the node from its current parent and inserts it + * at the end of `newParent`. + * + * This will clean the `before` and `after` code {@link Node#raws} data + * from the node and replace them with the indentation style of `newParent`. + * It will also clean the `between` property + * if `newParent` is in another {@link Root}. + * + * @param {Container} newParent - container node where the current node + * will be moved + * + * @example + * atrule.moveTo(atrule.root()); + * + * @return {Node} current node to methods chain + */ + + + Node.prototype.moveTo = function moveTo(newParent) { + this.cleanRaws(this.root() === newParent.root()); + this.remove(); + newParent.append(this); + return this; + }; + /** + * Removes the node from its current parent and inserts it into + * a new parent before `otherNode`. + * + * This will also clean the node’s code style properties just as it would + * in {@link Node#moveTo}. + * + * @param {Node} otherNode - node that will be before current node + * + * @return {Node} current node to methods chain + */ + + + Node.prototype.moveBefore = function moveBefore(otherNode) { + this.cleanRaws(this.root() === otherNode.root()); + this.remove(); + otherNode.parent.insertBefore(otherNode, this); + return this; + }; + /** + * Removes the node from its current parent and inserts it into + * a new parent after `otherNode`. + * + * This will also clean the node’s code style properties just as it would + * in {@link Node#moveTo}. + * + * @param {Node} otherNode - node that will be after current node + * + * @return {Node} current node to methods chain + */ + + + Node.prototype.moveAfter = function moveAfter(otherNode) { + this.cleanRaws(this.root() === otherNode.root()); + this.remove(); + otherNode.parent.insertAfter(otherNode, this); + return this; + }; + /** + * Returns the next child of the node’s parent. + * Returns `undefined` if the current node is the last child. + * + * @return {Node|undefined} next node + * + * @example + * if ( comment.text === 'delete next' ) { + * const next = comment.next(); + * if ( next ) { + * next.remove(); + * } + * } + */ + + + Node.prototype.next = function next() { + var index = this.parent.index(this); + return this.parent.nodes[index + 1]; + }; + /** + * Returns the previous child of the node’s parent. + * Returns `undefined` if the current node is the first child. + * + * @return {Node|undefined} previous node + * + * @example + * const annotation = decl.prev(); + * if ( annotation.type == 'comment' ) { + * readAnnotation(annotation.text); + * } + */ + + + Node.prototype.prev = function prev() { + var index = this.parent.index(this); + return this.parent.nodes[index - 1]; + }; + + Node.prototype.toJSON = function toJSON() { + var fixed = {}; + + for (var name in this) { + if (!this.hasOwnProperty(name)) continue; + if (name === 'parent') continue; + var value = this[name]; + + if (value instanceof Array) { + fixed[name] = value.map(function (i) { + if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object' && i.toJSON) { + return i.toJSON(); + } else { + return i; + } + }); + } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.toJSON) { + fixed[name] = value.toJSON(); + } else { + fixed[name] = value; + } + } + + return fixed; + }; + /** + * Returns a {@link Node#raws} value. If the node is missing + * the code style property (because the node was manually built or cloned), + * PostCSS will try to autodetect the code style property by looking + * at other nodes in the tree. + * + * @param {string} prop - name of code style property + * @param {string} [defaultType] - name of default value, it can be missed + * if the value is the same as prop + * + * @example + * const root = postcss.parse('a { background: white }'); + * root.nodes[0].append({ prop: 'color', value: 'black' }); + * root.nodes[0].nodes[1].raws.before //=> undefined + * root.nodes[0].nodes[1].raw('before') //=> ' ' + * + * @return {string} code style value + */ + + + Node.prototype.raw = function raw(prop, defaultType) { + var str = new _stringifier2.default(); + return str.raw(this, prop, defaultType); + }; + /** + * Finds the Root instance of the node’s tree. + * + * @example + * root.nodes[0].nodes[0].root() === root + * + * @return {Root} root parent + */ + + + Node.prototype.root = function root() { + var result = this; + + while (result.parent) { + result = result.parent; + } + + return result; + }; + + Node.prototype.cleanRaws = function cleanRaws(keepBetween) { + delete this.raws.before; + delete this.raws.after; + if (!keepBetween) delete this.raws.between; + }; + + Node.prototype.positionInside = function positionInside(index) { + var string = this.toString(); + var column = this.source.start.column; + var line = this.source.start.line; + + for (var i = 0; i < index; i++) { + if (string[i] === '\n') { + column = 1; + line += 1; + } else { + column += 1; + } + } + + return { + line: line, + column: column + }; + }; + + Node.prototype.positionBy = function positionBy(opts) { + var pos = this.source.start; + + if (opts.index) { + pos = this.positionInside(opts.index); + } else if (opts.word) { + var index = this.toString().indexOf(opts.word); + if (index !== -1) pos = this.positionInside(index); + } + + return pos; + }; + + Node.prototype.removeSelf = function removeSelf() { + (0, _warnOnce2.default)('Node#removeSelf is deprecated. Use Node#remove.'); + return this.remove(); + }; + + Node.prototype.replace = function replace(nodes) { + (0, _warnOnce2.default)('Node#replace is deprecated. Use Node#replaceWith'); + return this.replaceWith(nodes); + }; + + Node.prototype.style = function style(own, detect) { + (0, _warnOnce2.default)('Node#style() is deprecated. Use Node#raw()'); + return this.raw(own, detect); + }; + + Node.prototype.cleanStyles = function cleanStyles(keepBetween) { + (0, _warnOnce2.default)('Node#cleanStyles() is deprecated. Use Node#cleanRaws()'); + return this.cleanRaws(keepBetween); + }; + + _createClass(Node, [{ + key: 'before', + get: function get() { + (0, _warnOnce2.default)('Node#before is deprecated. Use Node#raws.before'); + return this.raws.before; + }, + set: function set(val) { + (0, _warnOnce2.default)('Node#before is deprecated. Use Node#raws.before'); + this.raws.before = val; + } + }, { + key: 'between', + get: function get() { + (0, _warnOnce2.default)('Node#between is deprecated. Use Node#raws.between'); + return this.raws.between; + }, + set: function set(val) { + (0, _warnOnce2.default)('Node#between is deprecated. Use Node#raws.between'); + this.raws.between = val; + } + /** + * @memberof Node# + * @member {string} type - String representing the node’s type. + * Possible values are `root`, `atrule`, `rule`, + * `decl`, or `comment`. + * + * @example + * postcss.decl({ prop: 'color', value: 'black' }).type //=> 'decl' + */ + + /** + * @memberof Node# + * @member {Container} parent - the node’s parent node. + * + * @example + * root.nodes[0].parent == root; + */ + + /** + * @memberof Node# + * @member {source} source - the input source of the node + * + * The property is used in source map generation. + * + * If you create a node manually (e.g., with `postcss.decl()`), + * that node will not have a `source` property and will be absent + * from the source map. For this reason, the plugin developer should + * consider cloning nodes to create new ones (in which case the new node’s + * source will reference the original, cloned node) or setting + * the `source` property manually. + * + * ```js + * // Bad + * const prefixed = postcss.decl({ + * prop: '-moz-' + decl.prop, + * value: decl.value + * }); + * + * // Good + * const prefixed = decl.clone({ prop: '-moz-' + decl.prop }); + * ``` + * + * ```js + * if ( atrule.name == 'add-link' ) { + * const rule = postcss.rule({ selector: 'a', source: atrule.source }); + * atrule.parent.insertBefore(atrule, rule); + * } + * ``` + * + * @example + * decl.source.input.from //=> '/home/ai/a.sass' + * decl.source.start //=> { line: 10, column: 2 } + * decl.source.end //=> { line: 10, column: 12 } + */ + + /** + * @memberof Node# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text + * and */. + * * `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS cleans selectors, declaration values and at-rule parameters + * from comments and extra spaces, but it stores origin content in raws + * properties. As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + */ + + }]); + + return Node; +}(); + +exports.default = Node; +/** + * @typedef {object} position + * @property {number} line - source line in file + * @property {number} column - source column in file + */ + +/** + * @typedef {object} source + * @property {Input} input - {@link Input} with input file + * @property {position} start - The starting position of the node’s source + * @property {position} end - The ending position of the node’s source + */ + +module.exports = exports['default']; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _cssSyntaxError = __webpack_require__(77); + +var _cssSyntaxError2 = _interopRequireDefault(_cssSyntaxError); + +var _previousMap = __webpack_require__(149); + +var _previousMap2 = _interopRequireDefault(_previousMap); + +var _path = __webpack_require__(6); + +var _path2 = _interopRequireDefault(_path); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var sequence = 0; +/** + * Represents the source CSS. + * + * @example + * const root = postcss.parse(css, { from: file }); + * const input = root.source.input; + */ + +var Input = function () { + /** + * @param {string} css - input CSS source + * @param {object} [opts] - {@link Processor#process} options + */ + function Input(css) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Input); + /** + * @member {string} - input CSS source + * + * @example + * const input = postcss.parse('a{}', { from: file }).input; + * input.css //=> "a{}"; + */ + + + this.css = css.toString(); + + if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") { + this.css = this.css.slice(1); + } + + if (opts.from) { + if (/^\w+:\/\//.test(opts.from)) { + /** + * @member {string} - The absolute path to the CSS source file + * defined with the `from` option. + * + * @example + * const root = postcss.parse(css, { from: 'a.css' }); + * root.source.input.file //=> '/home/ai/a.css' + */ + this.file = opts.from; + } else { + this.file = _path2.default.resolve(opts.from); + } + } + + var map = new _previousMap2.default(this.css, opts); + + if (map.text) { + /** + * @member {PreviousMap} - The input source map passed from + * a compilation step before PostCSS + * (for example, from Sass compiler). + * + * @example + * root.source.input.map.consumer().sources //=> ['a.sass'] + */ + this.map = map; + var file = map.consumer().file; + if (!this.file && file) this.file = this.mapResolve(file); + } + + if (!this.file) { + sequence += 1; + /** + * @member {string} - The unique ID of the CSS source. It will be + * created if `from` option is not provided + * (because PostCSS does not know the file path). + * + * @example + * const root = postcss.parse(css); + * root.source.input.file //=> undefined + * root.source.input.id //=> "" + */ + + this.id = ''; + } + + if (this.map) this.map.file = this.from; + } + + Input.prototype.error = function error(message, line, column) { + var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var result = void 0; + var origin = this.origin(line, column); + + if (origin) { + result = new _cssSyntaxError2.default(message, origin.line, origin.column, origin.source, origin.file, opts.plugin); + } else { + result = new _cssSyntaxError2.default(message, line, column, this.css, this.file, opts.plugin); + } + + result.input = { + line: line, + column: column, + source: this.css + }; + if (this.file) result.input.file = this.file; + return result; + }; + /** + * Reads the input source map and returns a symbol position + * in the input source (e.g., in a Sass file that was compiled + * to CSS before being passed to PostCSS). + * + * @param {number} line - line in input CSS + * @param {number} column - column in input CSS + * + * @return {filePosition} position in input source + * + * @example + * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 } + */ + + + Input.prototype.origin = function origin(line, column) { + if (!this.map) return false; + var consumer = this.map.consumer(); + var from = consumer.originalPositionFor({ + line: line, + column: column + }); + if (!from.source) return false; + var result = { + file: this.mapResolve(from.source), + line: from.line, + column: from.column + }; + var source = consumer.sourceContentFor(from.source); + if (source) result.source = source; + return result; + }; + + Input.prototype.mapResolve = function mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file; + } else { + return _path2.default.resolve(this.map.consumer().sourceRoot || '.', file); + } + }; + /** + * The CSS source identifier. Contains {@link Input#file} if the user + * set the `from` option, or {@link Input#id} if they did not. + * @type {string} + * + * @example + * const root = postcss.parse(css, { from: 'a.css' }); + * root.source.input.from //=> "/home/ai/a.css" + * + * const root = postcss.parse(css); + * root.source.input.from //=> "" + */ + + + _createClass(Input, [{ + key: 'from', + get: function get() { + return this.file || this.id; + } + }]); + + return Input; +}(); + +exports.default = Input; +/** + * @typedef {object} filePosition + * @property {string} file - path to file + * @property {number} line - source line in file + * @property {number} column - source column in file + */ + +module.exports = exports['default']; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var defaultRaw = { + colon: ': ', + indent: ' ', + beforeDecl: '\n', + beforeRule: '\n', + beforeOpen: ' ', + beforeClose: '\n', + beforeComment: '\n', + after: '\n', + emptyBody: '', + commentLeft: ' ', + commentRight: ' ' +}; + +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +} + +var Stringifier = function () { + function Stringifier(builder) { + _classCallCheck(this, Stringifier); + + this.builder = builder; + } + + Stringifier.prototype.stringify = function stringify(node, semicolon) { + this[node.type](node, semicolon); + }; + + Stringifier.prototype.root = function root(node) { + this.body(node); + if (node.raws.after) this.builder(node.raws.after); + }; + + Stringifier.prototype.comment = function comment(node) { + var left = this.raw(node, 'left', 'commentLeft'); + var right = this.raw(node, 'right', 'commentRight'); + this.builder('/*' + left + node.text + right + '*/', node); + }; + + Stringifier.prototype.decl = function decl(node, semicolon) { + var between = this.raw(node, 'between', 'colon'); + var string = node.prop + between + this.rawValue(node, 'value'); + + if (node.important) { + string += node.raws.important || ' !important'; + } + + if (semicolon) string += ';'; + this.builder(string, node); + }; + + Stringifier.prototype.rule = function rule(node) { + this.block(node, this.rawValue(node, 'selector')); + }; + + Stringifier.prototype.atrule = function atrule(node, semicolon) { + var name = '@' + node.name; + var params = node.params ? this.rawValue(node, 'params') : ''; + + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName; + } else if (params) { + name += ' '; + } + + if (node.nodes) { + this.block(node, name + params); + } else { + var end = (node.raws.between || '') + (semicolon ? ';' : ''); + this.builder(name + params + end, node); + } + }; + + Stringifier.prototype.body = function body(node) { + var last = node.nodes.length - 1; + + while (last > 0) { + if (node.nodes[last].type !== 'comment') break; + last -= 1; + } + + var semicolon = this.raw(node, 'semicolon'); + + for (var i = 0; i < node.nodes.length; i++) { + var child = node.nodes[i]; + var before = this.raw(child, 'before'); + if (before) this.builder(before); + this.stringify(child, last !== i || semicolon); + } + }; + + Stringifier.prototype.block = function block(node, start) { + var between = this.raw(node, 'between', 'beforeOpen'); + this.builder(start + between + '{', node, 'start'); + var after = void 0; + + if (node.nodes && node.nodes.length) { + this.body(node); + after = this.raw(node, 'after'); + } else { + after = this.raw(node, 'after', 'emptyBody'); + } + + if (after) this.builder(after); + this.builder('}', node, 'end'); + }; + + Stringifier.prototype.raw = function raw(node, own, detect) { + var value = void 0; + if (!detect) detect = own; // Already had + + if (own) { + value = node.raws[own]; + if (typeof value !== 'undefined') return value; + } + + var parent = node.parent; // Hack for first rule in CSS + + if (detect === 'before') { + if (!parent || parent.type === 'root' && parent.first === node) { + return ''; + } + } // Floating child without parent + + + if (!parent) return defaultRaw[detect]; // Detect style by other nodes + + var root = node.root(); + if (!root.rawCache) root.rawCache = {}; + + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect]; + } + + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect); + } else { + var method = 'raw' + capitalize(detect); + + if (this[method]) { + value = this[method](root, node); + } else { + root.walk(function (i) { + value = i.raws[own]; + if (typeof value !== 'undefined') return false; + }); + } + } + + if (typeof value === 'undefined') value = defaultRaw[detect]; + root.rawCache[detect] = value; + return value; + }; + + Stringifier.prototype.rawSemicolon = function rawSemicolon(root) { + var value = void 0; + root.walk(function (i) { + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + Stringifier.prototype.rawEmptyBody = function rawEmptyBody(root) { + var value = void 0; + root.walk(function (i) { + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + Stringifier.prototype.rawIndent = function rawIndent(root) { + if (root.raws.indent) return root.raws.indent; + var value = void 0; + root.walk(function (i) { + var p = i.parent; + + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + var parts = i.raws.before.split('\n'); + value = parts[parts.length - 1]; + value = value.replace(/[^\s]/g, ''); + return false; + } + } + }); + return value; + }; + + Stringifier.prototype.rawBeforeComment = function rawBeforeComment(root, node) { + var value = void 0; + root.walkComments(function (i) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + }); + + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl'); + } + + return value; + }; + + Stringifier.prototype.rawBeforeDecl = function rawBeforeDecl(root, node) { + var value = void 0; + root.walkDecls(function (i) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + }); + + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule'); + } + + return value; + }; + + Stringifier.prototype.rawBeforeRule = function rawBeforeRule(root) { + var value = void 0; + root.walk(function (i) { + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + } + }); + return value; + }; + + Stringifier.prototype.rawBeforeClose = function rawBeforeClose(root) { + var value = void 0; + root.walk(function (i) { + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + } + }); + return value; + }; + + Stringifier.prototype.rawBeforeOpen = function rawBeforeOpen(root) { + var value = void 0; + root.walk(function (i) { + if (i.type !== 'decl') { + value = i.raws.between; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + Stringifier.prototype.rawColon = function rawColon(root) { + var value = void 0; + root.walkDecls(function (i) { + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, ''); + return false; + } + }); + return value; + }; + + Stringifier.prototype.beforeAfter = function beforeAfter(node, detect) { + var value = void 0; + + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl'); + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment'); + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule'); + } else { + value = this.raw(node, null, 'beforeClose'); + } + + var buf = node.parent; + var depth = 0; + + while (buf && buf.type !== 'root') { + depth += 1; + buf = buf.parent; + } + + if (value.indexOf('\n') !== -1) { + var indent = this.raw(node, null, 'indent'); + + if (indent.length) { + for (var step = 0; step < depth; step++) { + value += indent; + } + } + } + + return value; + }; + + Stringifier.prototype.rawValue = function rawValue(node, prop) { + var value = node[prop]; + var raw = node.raws[prop]; + + if (raw && raw.value === value) { + return raw.raw; + } else { + return value; + } + }; + + return Stringifier; +}(); + +exports.default = Stringifier; +module.exports = exports['default']; + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _declaration = __webpack_require__(87); + +var _declaration2 = _interopRequireDefault(_declaration); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _comment = __webpack_require__(24); + +var _comment2 = _interopRequireDefault(_comment); + +var _node = __webpack_require__(25); + +var _node2 = _interopRequireDefault(_node); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +function cleanSource(nodes) { + return nodes.map(function (i) { + if (i.nodes) i.nodes = cleanSource(i.nodes); + delete i.source; + return i; + }); +} +/** + * The {@link Root}, {@link AtRule}, and {@link Rule} container nodes + * inherit some common methods to help work with their children. + * + * Note that all containers can store any content. If you write a rule inside + * a rule, PostCSS will parse it. + * + * @extends Node + * @abstract + */ + + +var Container = function (_Node) { + _inherits(Container, _Node); + + function Container() { + _classCallCheck(this, Container); + + return _possibleConstructorReturn(this, _Node.apply(this, arguments)); + } + + Container.prototype.push = function push(child) { + child.parent = this; + this.nodes.push(child); + return this; + }; + /** + * Iterates through the container’s immediate children, + * calling `callback` for each child. + * + * Returning `false` in the callback will break iteration. + * + * This method only iterates through the container’s immediate children. + * If you need to recursively iterate through all the container’s descendant + * nodes, use {@link Container#walk}. + * + * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe + * if you are mutating the array of child nodes during iteration. + * PostCSS will adjust the current index to match the mutations. + * + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * const root = postcss.parse('a { color: black; z-index: 1 }'); + * const rule = root.first; + * + * for ( let decl of rule.nodes ) { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }); + * // Cycle will be infinite, because cloneBefore moves the current node + * // to the next index + * } + * + * rule.each(decl => { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }); + * // Will be executed only for color and z-index + * }); + */ + + + Container.prototype.each = function each(callback) { + if (!this.lastEach) this.lastEach = 0; + if (!this.indexes) this.indexes = {}; + this.lastEach += 1; + var id = this.lastEach; + this.indexes[id] = 0; + if (!this.nodes) return undefined; + var index = void 0, + result = void 0; + + while (this.indexes[id] < this.nodes.length) { + index = this.indexes[id]; + result = callback(this.nodes[index], index); + if (result === false) break; + this.indexes[id] += 1; + } + + delete this.indexes[id]; + return result; + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each node. + * + * Like container.each(), this method is safe to use + * if you are mutating arrays during iteration. + * + * If you only need to iterate through the container’s immediate children, + * use {@link Container#each}. + * + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * root.walk(node => { + * // Traverses all descendant nodes. + * }); + */ + + + Container.prototype.walk = function walk(callback) { + return this.each(function (child, i) { + var result = callback(child, i); + + if (result !== false && child.walk) { + result = child.walk(callback); + } + + return result; + }); + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each declaration node. + * + * If you pass a filter, iteration will only happen over declarations + * with matching properties. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [prop] - string or regular expression + * to filter declarations by property name + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * root.walkDecls(decl => { + * checkPropertySupport(decl.prop); + * }); + * + * root.walkDecls('border-radius', decl => { + * decl.remove(); + * }); + * + * root.walkDecls(/^background/, decl => { + * decl.value = takeFirstColorFromGradient(decl.value); + * }); + */ + + + Container.prototype.walkDecls = function walkDecls(prop, callback) { + if (!callback) { + callback = prop; + return this.walk(function (child, i) { + if (child.type === 'decl') { + return callback(child, i); + } + }); + } else if (prop instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i); + } + }); + } else { + return this.walk(function (child, i) { + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i); + } + }); + } + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each rule node. + * + * If you pass a filter, iteration will only happen over rules + * with matching selectors. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [selector] - string or regular expression + * to filter rules by selector + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * const selectors = []; + * root.walkRules(rule => { + * selectors.push(rule.selector); + * }); + * console.log(`Your CSS uses ${selectors.length} selectors`); + */ + + + Container.prototype.walkRules = function walkRules(selector, callback) { + if (!callback) { + callback = selector; + return this.walk(function (child, i) { + if (child.type === 'rule') { + return callback(child, i); + } + }); + } else if (selector instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i); + } + }); + } else { + return this.walk(function (child, i) { + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i); + } + }); + } + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each at-rule node. + * + * If you pass a filter, iteration will only happen over at-rules + * that have matching names. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [name] - string or regular expression + * to filter at-rules by name + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * root.walkAtRules(rule => { + * if ( isOld(rule.name) ) rule.remove(); + * }); + * + * let first = false; + * root.walkAtRules('charset', rule => { + * if ( !first ) { + * first = true; + * } else { + * rule.remove(); + * } + * }); + */ + + + Container.prototype.walkAtRules = function walkAtRules(name, callback) { + if (!callback) { + callback = name; + return this.walk(function (child, i) { + if (child.type === 'atrule') { + return callback(child, i); + } + }); + } else if (name instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i); + } + }); + } else { + return this.walk(function (child, i) { + if (child.type === 'atrule' && child.name === name) { + return callback(child, i); + } + }); + } + }; + /** + * Traverses the container’s descendant nodes, calling callback + * for each comment node. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {childIterator} callback - iterator receives each node and index + * + * @return {false|undefined} returns `false` if iteration was broke + * + * @example + * root.walkComments(comment => { + * comment.remove(); + * }); + */ + + + Container.prototype.walkComments = function walkComments(callback) { + return this.walk(function (child, i) { + if (child.type === 'comment') { + return callback(child, i); + } + }); + }; + /** + * Inserts new nodes to the end of the container. + * + * @param {...(Node|object|string|Node[])} children - new nodes + * + * @return {Node} this node for methods chain + * + * @example + * const decl1 = postcss.decl({ prop: 'color', value: 'black' }); + * const decl2 = postcss.decl({ prop: 'background-color', value: 'white' }); + * rule.append(decl1, decl2); + * + * root.append({ name: 'charset', params: '"UTF-8"' }); // at-rule + * root.append({ selector: 'a' }); // rule + * rule.append({ prop: 'color', value: 'black' }); // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}'); + * root.first.append('color: black; z-index: 1'); + */ + + + Container.prototype.append = function append() { + for (var _len = arguments.length, children = Array(_len), _key = 0; _key < _len; _key++) { + children[_key] = arguments[_key]; + } + + for (var _iterator = children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var child = _ref; + var nodes = this.normalize(child, this.last); + + for (var _iterator2 = nodes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var node = _ref2; + this.nodes.push(node); + } + } + + return this; + }; + /** + * Inserts new nodes to the start of the container. + * + * @param {...(Node|object|string|Node[])} children - new nodes + * + * @return {Node} this node for methods chain + * + * @example + * const decl1 = postcss.decl({ prop: 'color', value: 'black' }); + * const decl2 = postcss.decl({ prop: 'background-color', value: 'white' }); + * rule.prepend(decl1, decl2); + * + * root.append({ name: 'charset', params: '"UTF-8"' }); // at-rule + * root.append({ selector: 'a' }); // rule + * rule.append({ prop: 'color', value: 'black' }); // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}'); + * root.first.append('color: black; z-index: 1'); + */ + + + Container.prototype.prepend = function prepend() { + for (var _len2 = arguments.length, children = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + children[_key2] = arguments[_key2]; + } + + children = children.reverse(); + + for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var child = _ref3; + var nodes = this.normalize(child, this.first, 'prepend').reverse(); + + for (var _iterator4 = nodes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var node = _ref4; + this.nodes.unshift(node); + } + + for (var id in this.indexes) { + this.indexes[id] = this.indexes[id] + nodes.length; + } + } + + return this; + }; + + Container.prototype.cleanRaws = function cleanRaws(keepBetween) { + _Node.prototype.cleanRaws.call(this, keepBetween); + + if (this.nodes) { + for (var _iterator5 = this.nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var node = _ref5; + node.cleanRaws(keepBetween); + } + } + }; + /** + * Insert new node before old node within the container. + * + * @param {Node|number} exist - child or child’s index. + * @param {Node|object|string|Node[]} add - new node + * + * @return {Node} this node for methods chain + * + * @example + * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop })); + */ + + + Container.prototype.insertBefore = function insertBefore(exist, add) { + exist = this.index(exist); + var type = exist === 0 ? 'prepend' : false; + var nodes = this.normalize(add, this.nodes[exist], type).reverse(); + + for (var _iterator6 = nodes, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var node = _ref6; + this.nodes.splice(exist, 0, node); + } + + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (exist <= index) { + this.indexes[id] = index + nodes.length; + } + } + + return this; + }; + /** + * Insert new node after old node within the container. + * + * @param {Node|number} exist - child or child’s index + * @param {Node|object|string|Node[]} add - new node + * + * @return {Node} this node for methods chain + */ + + + Container.prototype.insertAfter = function insertAfter(exist, add) { + exist = this.index(exist); + var nodes = this.normalize(add, this.nodes[exist]).reverse(); + + for (var _iterator7 = nodes, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + var node = _ref7; + this.nodes.splice(exist + 1, 0, node); + } + + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (exist < index) { + this.indexes[id] = index + nodes.length; + } + } + + return this; + }; + + Container.prototype.remove = function remove(child) { + if (typeof child !== 'undefined') { + (0, _warnOnce2.default)('Container#remove is deprecated. ' + 'Use Container#removeChild'); + this.removeChild(child); + } else { + _Node.prototype.remove.call(this); + } + + return this; + }; + /** + * Removes node from the container and cleans the parent properties + * from the node and its children. + * + * @param {Node|number} child - child or child’s index + * + * @return {Node} this node for methods chain + * + * @example + * rule.nodes.length //=> 5 + * rule.removeChild(decl); + * rule.nodes.length //=> 4 + * decl.parent //=> undefined + */ + + + Container.prototype.removeChild = function removeChild(child) { + child = this.index(child); + this.nodes[child].parent = undefined; + this.nodes.splice(child, 1); + var index = void 0; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + return this; + }; + /** + * Removes all children from the container + * and cleans their parent properties. + * + * @return {Node} this node for methods chain + * + * @example + * rule.removeAll(); + * rule.nodes.length //=> 0 + */ + + + Container.prototype.removeAll = function removeAll() { + for (var _iterator8 = this.nodes, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref8; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref8 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref8 = _i8.value; + } + + var node = _ref8; + node.parent = undefined; + } + + this.nodes = []; + return this; + }; + /** + * Passes all declaration values within the container that match pattern + * through callback, replacing those values with the returned result + * of callback. + * + * This method is useful if you are using a custom unit or function + * and need to iterate through all values. + * + * @param {string|RegExp} pattern - replace pattern + * @param {object} opts - options to speed up the search + * @param {string|string[]} opts.props - an array of property names + * @param {string} opts.fast - string that’s used + * to narrow down values and speed up + the regexp search + * @param {function|string} callback - string to replace pattern + * or callback that returns a new + * value. + * The callback will receive + * the same arguments as those + * passed to a function parameter + * of `String#replace`. + * + * @return {Node} this node for methods chain + * + * @example + * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => { + * return 15 * parseInt(string) + 'px'; + * }); + */ + + + Container.prototype.replaceValues = function replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts; + opts = {}; + } + + this.walkDecls(function (decl) { + if (opts.props && opts.props.indexOf(decl.prop) === -1) return; + if (opts.fast && decl.value.indexOf(opts.fast) === -1) return; + decl.value = decl.value.replace(pattern, callback); + }); + return this; + }; + /** + * Returns `true` if callback returns `true` + * for all of the container’s children. + * + * @param {childCondition} condition - iterator returns true or false. + * + * @return {boolean} is every child pass condition + * + * @example + * const noPrefixes = rule.every(i => i.prop[0] !== '-'); + */ + + + Container.prototype.every = function every(condition) { + return this.nodes.every(condition); + }; + /** + * Returns `true` if callback returns `true` for (at least) one + * of the container’s children. + * + * @param {childCondition} condition - iterator returns true or false. + * + * @return {boolean} is some child pass condition + * + * @example + * const hasPrefix = rule.some(i => i.prop[0] === '-'); + */ + + + Container.prototype.some = function some(condition) { + return this.nodes.some(condition); + }; + /** + * Returns a `child`’s index within the {@link Container#nodes} array. + * + * @param {Node} child - child of the current container. + * + * @return {number} child index + * + * @example + * rule.index( rule.nodes[2] ) //=> 2 + */ + + + Container.prototype.index = function index(child) { + if (typeof child === 'number') { + return child; + } else { + return this.nodes.indexOf(child); + } + }; + /** + * The container’s first child. + * + * @type {Node} + * + * @example + * rule.first == rules.nodes[0]; + */ + + + Container.prototype.normalize = function normalize(nodes, sample) { + var _this2 = this; + + if (typeof nodes === 'string') { + var parse = __webpack_require__(88); + + nodes = cleanSource(parse(nodes).nodes); + } else if (!Array.isArray(nodes)) { + if (nodes.type === 'root') { + nodes = nodes.nodes; + } else if (nodes.type) { + nodes = [nodes]; + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation'); + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value); + } + + nodes = [new _declaration2.default(nodes)]; + } else if (nodes.selector) { + var Rule = __webpack_require__(10); + + nodes = [new Rule(nodes)]; + } else if (nodes.name) { + var AtRule = __webpack_require__(29); + + nodes = [new AtRule(nodes)]; + } else if (nodes.text) { + nodes = [new _comment2.default(nodes)]; + } else { + throw new Error('Unknown node type in node creation'); + } + } + + var processed = nodes.map(function (i) { + if (typeof i.raws === 'undefined') i = _this2.rebuild(i); + if (i.parent) i = i.clone(); + + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/[^\s]/g, ''); + } + } + + i.parent = _this2; + return i; + }); + return processed; + }; + + Container.prototype.rebuild = function rebuild(node, parent) { + var _this3 = this; + + var fix = void 0; + + if (node.type === 'root') { + var Root = __webpack_require__(30); + + fix = new Root(); + } else if (node.type === 'atrule') { + var AtRule = __webpack_require__(29); + + fix = new AtRule(); + } else if (node.type === 'rule') { + var Rule = __webpack_require__(10); + + fix = new Rule(); + } else if (node.type === 'decl') { + fix = new _declaration2.default(); + } else if (node.type === 'comment') { + fix = new _comment2.default(); + } + + for (var i in node) { + if (i === 'nodes') { + fix.nodes = node.nodes.map(function (j) { + return _this3.rebuild(j, fix); + }); + } else if (i === 'parent' && parent) { + fix.parent = parent; + } else if (node.hasOwnProperty(i)) { + fix[i] = node[i]; + } + } + + return fix; + }; + + Container.prototype.eachInside = function eachInside(callback) { + (0, _warnOnce2.default)('Container#eachInside is deprecated. ' + 'Use Container#walk instead.'); + return this.walk(callback); + }; + + Container.prototype.eachDecl = function eachDecl(prop, callback) { + (0, _warnOnce2.default)('Container#eachDecl is deprecated. ' + 'Use Container#walkDecls instead.'); + return this.walkDecls(prop, callback); + }; + + Container.prototype.eachRule = function eachRule(selector, callback) { + (0, _warnOnce2.default)('Container#eachRule is deprecated. ' + 'Use Container#walkRules instead.'); + return this.walkRules(selector, callback); + }; + + Container.prototype.eachAtRule = function eachAtRule(name, callback) { + (0, _warnOnce2.default)('Container#eachAtRule is deprecated. ' + 'Use Container#walkAtRules instead.'); + return this.walkAtRules(name, callback); + }; + + Container.prototype.eachComment = function eachComment(callback) { + (0, _warnOnce2.default)('Container#eachComment is deprecated. ' + 'Use Container#walkComments instead.'); + return this.walkComments(callback); + }; + + _createClass(Container, [{ + key: 'first', + get: function get() { + if (!this.nodes) return undefined; + return this.nodes[0]; + } + /** + * The container’s last child. + * + * @type {Node} + * + * @example + * rule.last == rule.nodes[rule.nodes.length - 1]; + */ + + }, { + key: 'last', + get: function get() { + if (!this.nodes) return undefined; + return this.nodes[this.nodes.length - 1]; + } + }, { + key: 'semicolon', + get: function get() { + (0, _warnOnce2.default)('Node#semicolon is deprecated. Use Node#raws.semicolon'); + return this.raws.semicolon; + }, + set: function set(val) { + (0, _warnOnce2.default)('Node#semicolon is deprecated. Use Node#raws.semicolon'); + this.raws.semicolon = val; + } + }, { + key: 'after', + get: function get() { + (0, _warnOnce2.default)('Node#after is deprecated. Use Node#raws.after'); + return this.raws.after; + }, + set: function set(val) { + (0, _warnOnce2.default)('Node#after is deprecated. Use Node#raws.after'); + this.raws.after = val; + } + /** + * @memberof Container# + * @member {Node[]} nodes - an array containing the container’s children + * + * @example + * const root = postcss.parse('a { color: black }'); + * root.nodes.length //=> 1 + * root.nodes[0].selector //=> 'a' + * root.nodes[0].nodes[0].prop //=> 'color' + */ + + }]); + + return Container; +}(_node2.default); + +exports.default = Container; +/** + * @callback childCondition + * @param {Node} node - container child + * @param {number} index - child index + * @param {Node[]} nodes - all container children + * @return {boolean} + */ + +/** + * @callback childIterator + * @param {Node} node - container child + * @param {number} index - child index + * @return {false|undefined} returning `false` will break iteration + */ + +module.exports = exports['default']; + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _container = __webpack_require__(28); + +var _container2 = _interopRequireDefault(_container); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents an at-rule. + * + * If it’s followed in the CSS by a {} block, this node will have + * a nodes property representing its children. + * + * @extends Container + * + * @example + * const root = postcss.parse('@charset "UTF-8"; @media print {}'); + * + * const charset = root.first; + * charset.type //=> 'atrule' + * charset.nodes //=> undefined + * + * const media = root.last; + * media.nodes //=> [] + */ + + +var AtRule = function (_Container) { + _inherits(AtRule, _Container); + + function AtRule(defaults) { + _classCallCheck(this, AtRule); + + var _this = _possibleConstructorReturn(this, _Container.call(this, defaults)); + + _this.type = 'atrule'; + return _this; + } + + AtRule.prototype.append = function append() { + var _Container$prototype$; + + if (!this.nodes) this.nodes = []; + + for (var _len = arguments.length, children = Array(_len), _key = 0; _key < _len; _key++) { + children[_key] = arguments[_key]; + } + + return (_Container$prototype$ = _Container.prototype.append).call.apply(_Container$prototype$, [this].concat(children)); + }; + + AtRule.prototype.prepend = function prepend() { + var _Container$prototype$2; + + if (!this.nodes) this.nodes = []; + + for (var _len2 = arguments.length, children = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + children[_key2] = arguments[_key2]; + } + + return (_Container$prototype$2 = _Container.prototype.prepend).call.apply(_Container$prototype$2, [this].concat(children)); + }; + + _createClass(AtRule, [{ + key: 'afterName', + get: function get() { + (0, _warnOnce2.default)('AtRule#afterName was deprecated. Use AtRule#raws.afterName'); + return this.raws.afterName; + }, + set: function set(val) { + (0, _warnOnce2.default)('AtRule#afterName was deprecated. Use AtRule#raws.afterName'); + this.raws.afterName = val; + } + }, { + key: '_params', + get: function get() { + (0, _warnOnce2.default)('AtRule#_params was deprecated. Use AtRule#raws.params'); + return this.raws.params; + }, + set: function set(val) { + (0, _warnOnce2.default)('AtRule#_params was deprecated. Use AtRule#raws.params'); + this.raws.params = val; + } + /** + * @memberof AtRule# + * @member {string} name - the at-rule’s name immediately follows the `@` + * + * @example + * const root = postcss.parse('@media print {}'); + * media.name //=> 'media' + * const media = root.first; + */ + + /** + * @memberof AtRule# + * @member {string} params - the at-rule’s parameters, the values + * that follow the at-rule’s name but precede + * any {} block + * + * @example + * const root = postcss.parse('@media print, screen {}'); + * const media = root.first; + * media.params //=> 'print, screen' + */ + + /** + * @memberof AtRule# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * + * PostCSS cleans at-rule parameters from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse(' @media\nprint {\n}') + * root.first.first.raws //=> { before: ' ', + * // between: ' ', + * // afterName: '\n', + * // after: '\n' } + */ + + }]); + + return AtRule; +}(_container2.default); + +exports.default = AtRule; +module.exports = exports['default']; + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _container = __webpack_require__(28); + +var _container2 = _interopRequireDefault(_container); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents a CSS file and contains all its parsed nodes. + * + * @extends Container + * + * @example + * const root = postcss.parse('a{color:black} b{z-index:2}'); + * root.type //=> 'root' + * root.nodes.length //=> 2 + */ + + +var Root = function (_Container) { + _inherits(Root, _Container); + + function Root(defaults) { + _classCallCheck(this, Root); + + var _this = _possibleConstructorReturn(this, _Container.call(this, defaults)); + + _this.type = 'root'; + if (!_this.nodes) _this.nodes = []; + return _this; + } + + Root.prototype.removeChild = function removeChild(child) { + child = this.index(child); + + if (child === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[child].raws.before; + } + + return _Container.prototype.removeChild.call(this, child); + }; + + Root.prototype.normalize = function normalize(child, sample, type) { + var nodes = _Container.prototype.normalize.call(this, child); + + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before; + } else { + delete sample.raws.before; + } + } else if (this.first !== sample) { + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + node.raws.before = sample.raws.before; + } + } + } + + return nodes; + }; + /** + * Returns a {@link Result} instance representing the root’s CSS. + * + * @param {processOptions} [opts] - options with only `to` and `map` keys + * + * @return {Result} result with current root’s CSS + * + * @example + * const root1 = postcss.parse(css1, { from: 'a.css' }); + * const root2 = postcss.parse(css2, { from: 'b.css' }); + * root1.append(root2); + * const result = root1.toResult({ to: 'all.css', map: true }); + */ + + + Root.prototype.toResult = function toResult() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var LazyResult = __webpack_require__(90); + + var Processor = __webpack_require__(161); + + var lazy = new LazyResult(new Processor(), this, opts); + return lazy.stringify(); + }; + + Root.prototype.remove = function remove(child) { + (0, _warnOnce2.default)('Root#remove is deprecated. Use Root#removeChild'); + this.removeChild(child); + }; + + Root.prototype.prevMap = function prevMap() { + (0, _warnOnce2.default)('Root#prevMap is deprecated. Use Root#source.input.map'); + return this.source.input.map; + }; + /** + * @memberof Root# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `after`: the space symbols after the last child to the end of file. + * * `semicolon`: is the last child has an (optional) semicolon. + * + * @example + * postcss.parse('a {}\n').raws //=> { after: '\n' } + * postcss.parse('a {}').raws //=> { after: '' } + */ + + + return Root; +}(_container2.default); + +exports.default = Root; +module.exports = exports['default']; + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var escape = __webpack_require__(32); + +var DELIMITER_MAP = { + "---": "yaml", + "+++": "toml" +}; + +function parse(text) { + var delimiterRegex = Object.keys(DELIMITER_MAP).map(escape).join("|"); + var match = text.match( // trailing spaces after delimiters are allowed + new RegExp("^(".concat(delimiterRegex, ")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)"))); + + if (match === null) { + return { + frontMatter: null, + content: text + }; + } + + var raw = match[0].replace(/\n$/, ""); + var delimiter = match[1]; + var value = match[2]; + return { + frontMatter: { + type: DELIMITER_MAP[delimiter], + value: value, + raw: raw + }, + content: match[0].replace(/[^\n]/g, " ") + text.slice(match[0].length) + }; +} + +module.exports = parse; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +module.exports = +/*#__PURE__*/ +function (_Container) { + _inherits(Value, _Container); + + function Value(opts) { + var _this; + + _classCallCheck(this, Value); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Value).call(this, opts)); + _this.type = 'value'; + _this.unbalanced = 0; + return _this; + } + + return Value; +}(Container); + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var AtWord = +/*#__PURE__*/ +function (_Container) { + _inherits(AtWord, _Container); + + function AtWord(opts) { + var _this; + + _classCallCheck(this, AtWord); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(AtWord).call(this, opts)); + _this.type = 'atword'; + return _this; + } + + _createClass(AtWord, [{ + key: "toString", + value: function toString() { + var quote = this.quoted ? this.raws.quote : ''; + return [this.raws.before, '@', // we can't use String() here because it'll try using itself + // as the constructor + String.prototype.toString.call(this.value), this.raws.after].join(''); + } + }]); + + return AtWord; +}(Container); + +Container.registerWalker(AtWord); +module.exports = AtWord; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var Colon = +/*#__PURE__*/ +function (_Node) { + _inherits(Colon, _Node); + + function Colon(opts) { + var _this; + + _classCallCheck(this, Colon); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Colon).call(this, opts)); + _this.type = 'colon'; + return _this; + } + + return Colon; +}(Node); + +Container.registerWalker(Colon); +module.exports = Colon; + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var Comma = +/*#__PURE__*/ +function (_Node) { + _inherits(Comma, _Node); + + function Comma(opts) { + var _this; + + _classCallCheck(this, Comma); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Comma).call(this, opts)); + _this.type = 'comma'; + return _this; + } + + return Comma; +}(Node); + +Container.registerWalker(Comma); +module.exports = Comma; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var Comment = +/*#__PURE__*/ +function (_Node) { + _inherits(Comment, _Node); + + function Comment(opts) { + var _this; + + _classCallCheck(this, Comment); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Comment).call(this, opts)); + _this.type = 'comment'; + _this.inline = opts.inline || false; + return _this; + } + + _createClass(Comment, [{ + key: "toString", + value: function toString() { + return [this.raws.before, this.inline ? '//' : '/*', String(this.value), this.inline ? '' : '*/', this.raws.after].join(''); + } + }]); + + return Comment; +}(Node); + +; +Container.registerWalker(Comment); +module.exports = Comment; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var FunctionNode = +/*#__PURE__*/ +function (_Container) { + _inherits(FunctionNode, _Container); + + function FunctionNode(opts) { + var _this; + + _classCallCheck(this, FunctionNode); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(FunctionNode).call(this, opts)); + _this.type = 'func'; // start off at -1 so we know there haven't been any parens added + + _this.unbalanced = -1; + return _this; + } + + return FunctionNode; +}(Container); + +; +Container.registerWalker(FunctionNode); +module.exports = FunctionNode; + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var NumberNode = +/*#__PURE__*/ +function (_Node) { + _inherits(NumberNode, _Node); + + function NumberNode(opts) { + var _this; + + _classCallCheck(this, NumberNode); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(NumberNode).call(this, opts)); + _this.type = 'number'; + _this.unit = opts.unit || ''; + return _this; + } + + _createClass(NumberNode, [{ + key: "toString", + value: function toString() { + return [this.raws.before, String(this.value), this.unit, this.raws.after].join(''); + } + }]); + + return NumberNode; +}(Node); + +; +Container.registerWalker(NumberNode); +module.exports = NumberNode; + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var Operator = +/*#__PURE__*/ +function (_Node) { + _inherits(Operator, _Node); + + function Operator(opts) { + var _this; + + _classCallCheck(this, Operator); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Operator).call(this, opts)); + _this.type = 'operator'; + return _this; + } + + return Operator; +}(Node); + +Container.registerWalker(Operator); +module.exports = Operator; + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var Parenthesis = +/*#__PURE__*/ +function (_Node) { + _inherits(Parenthesis, _Node); + + function Parenthesis(opts) { + var _this; + + _classCallCheck(this, Parenthesis); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Parenthesis).call(this, opts)); + _this.type = 'paren'; + _this.parenType = ''; + return _this; + } + + return Parenthesis; +}(Node); + +Container.registerWalker(Parenthesis); +module.exports = Parenthesis; + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var StringNode = +/*#__PURE__*/ +function (_Node) { + _inherits(StringNode, _Node); + + function StringNode(opts) { + var _this; + + _classCallCheck(this, StringNode); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(StringNode).call(this, opts)); + _this.type = 'string'; + return _this; + } + + _createClass(StringNode, [{ + key: "toString", + value: function toString() { + var quote = this.quoted ? this.raws.quote : ''; + return [this.raws.before, quote, // we can't use String() here because it'll try using itself + // as the constructor + this.value + '', quote, this.raws.after].join(''); + } + }]); + + return StringNode; +}(Node); + +Container.registerWalker(StringNode); +module.exports = StringNode; + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var Word = +/*#__PURE__*/ +function (_Node) { + _inherits(Word, _Node); + + function Word(opts) { + var _this; + + _classCallCheck(this, Word); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Word).call(this, opts)); + _this.type = 'word'; + return _this; + } + + return Word; +}(Node); + +Container.registerWalker(Word); +module.exports = Word; + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +var Node = __webpack_require__(3); + +var UnicodeRange = +/*#__PURE__*/ +function (_Node) { + _inherits(UnicodeRange, _Node); + + function UnicodeRange(opts) { + var _this; + + _classCallCheck(this, UnicodeRange); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(UnicodeRange).call(this, opts)); + _this.type = 'unicode-range'; + return _this; + } + + return UnicodeRange; +}(Node); + +Container.registerWalker(UnicodeRange); +module.exports = UnicodeRange; + +/***/ }), +/* 45 */ +/***/ (function(module, exports) { + +module.exports = function flatten(list, depth) { + depth = typeof depth == 'number' ? depth : Infinity; + + if (!depth) { + if (Array.isArray(list)) { + return list.map(function (i) { + return i; + }); + } + + return list; + } + + return _flatten(list, 1); + + function _flatten(list, d) { + return list.reduce(function (acc, item) { + if (Array.isArray(item) && d < depth) { + return acc.concat(_flatten(item, d + 1)); + } else { + return acc.concat(item); + } + }, []); + } +}; + +/***/ }), +/* 46 */ +/***/ (function(module, exports) { + +module.exports = function (ary, item) { + var i = -1, + indexes = []; + + while ((i = ary.indexOf(item, i + 1)) !== -1) { + indexes.push(i); + } + + return indexes; +}; + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function unique_pred(list, compare) { + var ptr = 1, + len = list.length, + a = list[0], + b = list[0]; + + for (var i = 1; i < len; ++i) { + b = a; + a = list[i]; + + if (compare(a, b)) { + if (i === ptr) { + ptr++; + continue; + } + + list[ptr++] = a; + } + } + + list.length = ptr; + return list; +} + +function unique_eq(list) { + var ptr = 1, + len = list.length, + a = list[0], + b = list[0]; + + for (var i = 1; i < len; ++i, b = a) { + b = a; + a = list[i]; + + if (a !== b) { + if (i === ptr) { + ptr++; + continue; + } + + list[ptr++] = a; + } + } + + list.length = ptr; + return list; +} + +function unique(list, compare, sorted) { + if (list.length === 0) { + return list; + } + + if (compare) { + if (!sorted) { + list.sort(compare); + } + + return unique_pred(list, compare); + } + + if (!sorted) { + list.sort(); + } + + return unique_eq(list); +} + +module.exports = unique; + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _container = __webpack_require__(16); + +var _container2 = _interopRequireDefault(_container); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Root = function (_Container) { + _inherits(Root, _Container); + + function Root(opts) { + _classCallCheck(this, Root); + + var _this = _possibleConstructorReturn(this, _Container.call(this, opts)); + + _this.type = _types.ROOT; + return _this; + } + + Root.prototype.toString = function toString() { + var str = this.reduce(function (memo, selector) { + var sel = String(selector); + return sel ? memo + sel + ',' : ''; + }, '').slice(0, -1); + return this.trailingComma ? str + ',' : str; + }; + + return Root; +}(_container2.default); + +exports.default = Root; +module.exports = exports['default']; + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _container = __webpack_require__(16); + +var _container2 = _interopRequireDefault(_container); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Selector = function (_Container) { + _inherits(Selector, _Container); + + function Selector(opts) { + _classCallCheck(this, Selector); + + var _this = _possibleConstructorReturn(this, _Container.call(this, opts)); + + _this.type = _types.SELECTOR; + return _this; + } + + return Selector; +}(_container2.default); + +exports.default = Selector; +module.exports = exports['default']; + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _namespace = __webpack_require__(7); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var ClassName = function (_Namespace) { + _inherits(ClassName, _Namespace); + + function ClassName(opts) { + _classCallCheck(this, ClassName); + + var _this = _possibleConstructorReturn(this, _Namespace.call(this, opts)); + + _this.type = _types.CLASS; + return _this; + } + + ClassName.prototype.toString = function toString() { + return [this.spaces.before, this.ns, String('.' + this.value), this.spaces.after].join(''); + }; + + return ClassName; +}(_namespace2.default); + +exports.default = ClassName; +module.exports = exports['default']; + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _node = __webpack_require__(5); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Comment = function (_Node) { + _inherits(Comment, _Node); + + function Comment(opts) { + _classCallCheck(this, Comment); + + var _this = _possibleConstructorReturn(this, _Node.call(this, opts)); + + _this.type = _types.COMMENT; + return _this; + } + + return Comment; +}(_node2.default); + +exports.default = Comment; +module.exports = exports['default']; + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _namespace = __webpack_require__(7); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var ID = function (_Namespace) { + _inherits(ID, _Namespace); + + function ID(opts) { + _classCallCheck(this, ID); + + var _this = _possibleConstructorReturn(this, _Namespace.call(this, opts)); + + _this.type = _types.ID; + return _this; + } + + ID.prototype.toString = function toString() { + return [this.spaces.before, this.ns, String('#' + this.value), this.spaces.after].join(''); + }; + + return ID; +}(_namespace2.default); + +exports.default = ID; +module.exports = exports['default']; + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _namespace = __webpack_require__(7); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Tag = function (_Namespace) { + _inherits(Tag, _Namespace); + + function Tag(opts) { + _classCallCheck(this, Tag); + + var _this = _possibleConstructorReturn(this, _Namespace.call(this, opts)); + + _this.type = _types.TAG; + return _this; + } + + return Tag; +}(_namespace2.default); + +exports.default = Tag; +module.exports = exports['default']; + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _node = __webpack_require__(5); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var String = function (_Node) { + _inherits(String, _Node); + + function String(opts) { + _classCallCheck(this, String); + + var _this = _possibleConstructorReturn(this, _Node.call(this, opts)); + + _this.type = _types.STRING; + return _this; + } + + return String; +}(_node2.default); + +exports.default = String; +module.exports = exports['default']; + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _container = __webpack_require__(16); + +var _container2 = _interopRequireDefault(_container); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Pseudo = function (_Container) { + _inherits(Pseudo, _Container); + + function Pseudo(opts) { + _classCallCheck(this, Pseudo); + + var _this = _possibleConstructorReturn(this, _Container.call(this, opts)); + + _this.type = _types.PSEUDO; + return _this; + } + + Pseudo.prototype.toString = function toString() { + var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; + return [this.spaces.before, String(this.value), params, this.spaces.after].join(''); + }; + + return Pseudo; +}(_container2.default); + +exports.default = Pseudo; +module.exports = exports['default']; + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _namespace = __webpack_require__(7); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Attribute = function (_Namespace) { + _inherits(Attribute, _Namespace); + + function Attribute(opts) { + _classCallCheck(this, Attribute); + + var _this = _possibleConstructorReturn(this, _Namespace.call(this, opts)); + + _this.type = _types.ATTRIBUTE; + _this.raws = {}; + return _this; + } + + Attribute.prototype.toString = function toString() { + var selector = [this.spaces.before, '[', this.ns, this.attribute]; + + if (this.operator) { + selector.push(this.operator); + } + + if (this.value) { + selector.push(this.value); + } + + if (this.raws.insensitive) { + selector.push(this.raws.insensitive); + } else if (this.insensitive) { + selector.push(' i'); + } + + selector.push(']'); + return selector.concat(this.spaces.after).join(''); + }; + + return Attribute; +}(_namespace2.default); + +exports.default = Attribute; +module.exports = exports['default']; + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _namespace = __webpack_require__(7); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Universal = function (_Namespace) { + _inherits(Universal, _Namespace); + + function Universal(opts) { + _classCallCheck(this, Universal); + + var _this = _possibleConstructorReturn(this, _Namespace.call(this, opts)); + + _this.type = _types.UNIVERSAL; + _this.value = '*'; + return _this; + } + + return Universal; +}(_namespace2.default); + +exports.default = Universal; +module.exports = exports['default']; + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _node = __webpack_require__(5); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Combinator = function (_Node) { + _inherits(Combinator, _Node); + + function Combinator(opts) { + _classCallCheck(this, Combinator); + + var _this = _possibleConstructorReturn(this, _Node.call(this, opts)); + + _this.type = _types.COMBINATOR; + return _this; + } + + return Combinator; +}(_node2.default); + +exports.default = Combinator; +module.exports = exports['default']; + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _node = __webpack_require__(5); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(0); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Nesting = function (_Node) { + _inherits(Nesting, _Node); + + function Nesting(opts) { + _classCallCheck(this, Nesting); + + var _this = _possibleConstructorReturn(this, _Node.call(this, opts)); + + _this.type = _types.NESTING; + _this.value = '&'; + return _this; + } + + return Nesting; +}(_node2.default); + +exports.default = Nesting; +module.exports = exports['default']; + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _Node = __webpack_require__(61); + +var _Node2 = _interopRequireDefault(_Node); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function Container(opts) { + var _this = this; + + this.constructor(opts); + this.nodes = opts.nodes; + + if (this.after === undefined) { + this.after = this.nodes.length > 0 ? this.nodes[this.nodes.length - 1].after : ''; + } + + if (this.before === undefined) { + this.before = this.nodes.length > 0 ? this.nodes[0].before : ''; + } + + if (this.sourceIndex === undefined) { + this.sourceIndex = this.before.length; + } + + this.nodes.forEach(function (node) { + node.parent = _this; // eslint-disable-line no-param-reassign + }); +} +/** + * A node that contains other nodes and support traversing over them + */ + + +Container.prototype = Object.create(_Node2.default.prototype); +Container.constructor = _Node2.default; +/** + * Iterate over descendant nodes of the node + * + * @param {RegExp|string} filter - Optional. Only nodes with node.type that + * satisfies the filter will be traversed over + * @param {function} cb - callback to call on each node. Takes theese params: + * node - the node being processed, i - it's index, nodes - the array + * of all nodes + * If false is returned, the iteration breaks + * + * @return (boolean) false, if the iteration was broken + */ + +Container.prototype.walk = function walk(filter, cb) { + var hasFilter = typeof filter === 'string' || filter instanceof RegExp; + var callback = hasFilter ? cb : filter; + var filterReg = typeof filter === 'string' ? new RegExp(filter) : filter; + + for (var i = 0; i < this.nodes.length; i++) { + var node = this.nodes[i]; + var filtered = hasFilter ? filterReg.test(node.type) : true; + + if (filtered && callback && callback(node, i, this.nodes) === false) { + return false; + } + + if (node.nodes && node.walk(filter, cb) === false) { + return false; + } + } + + return true; +}; +/** + * Iterate over immediate children of the node + * + * @param {function} cb - callback to call on each node. Takes theese params: + * node - the node being processed, i - it's index, nodes - the array + * of all nodes + * If false is returned, the iteration breaks + * + * @return (boolean) false, if the iteration was broken + */ + + +Container.prototype.each = function each() { + var cb = arguments.length <= 0 || arguments[0] === undefined ? function () {} : arguments[0]; + + for (var i = 0; i < this.nodes.length; i++) { + var node = this.nodes[i]; + + if (cb(node, i, this.nodes) === false) { + return false; + } + } + + return true; +}; + +exports.default = Container; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * A very generic node. Pretty much any element of a media query + */ + +function Node(opts) { + this.after = opts.after; + this.before = opts.before; + this.type = opts.type; + this.value = opts.value; + this.sourceIndex = opts.sourceIndex; +} + +exports.default = Node; + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _supportsColor = __webpack_require__(121); + +var _supportsColor2 = _interopRequireDefault(_supportsColor); + +var _chalk = __webpack_require__(63); + +var _chalk2 = _interopRequireDefault(_chalk); + +var _terminalHighlight = __webpack_require__(122); + +var _terminalHighlight2 = _interopRequireDefault(_terminalHighlight); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * The CSS parser throws this error for broken CSS. + * + * Custom parsers can throw this error for broken custom syntax using + * the {@link Node#error} method. + * + * PostCSS will use the input source map to detect the original error location. + * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS, + * PostCSS will show the original position in the Sass file. + * + * If you need the position in the PostCSS input + * (e.g., to debug the previous compiler), use `error.input.file`. + * + * @example + * // Catching and checking syntax error + * try { + * postcss.parse('a{') + * } catch (error) { + * if ( error.name === 'CssSyntaxError' ) { + * error //=> CssSyntaxError + * } + * } + * + * @example + * // Raising error from plugin + * throw node.error('Unknown variable', { plugin: 'postcss-vars' }); + */ + + +var CssSyntaxError = function () { + /** + * @param {string} message - error message + * @param {number} [line] - source line of the error + * @param {number} [column] - source column of the error + * @param {string} [source] - source code of the broken file + * @param {string} [file] - absolute path to the broken file + * @param {string} [plugin] - PostCSS plugin name, if error came from plugin + */ + function CssSyntaxError(message, line, column, source, file, plugin) { + _classCallCheck(this, CssSyntaxError); + /** + * @member {string} - Always equal to `'CssSyntaxError'`. You should + * always check error type + * by `error.name === 'CssSyntaxError'` instead of + * `error instanceof CssSyntaxError`, because + * npm could have several PostCSS versions. + * + * @example + * if ( error.name === 'CssSyntaxError' ) { + * error //=> CssSyntaxError + * } + */ + + + this.name = 'CssSyntaxError'; + /** + * @member {string} - Error message. + * + * @example + * error.message //=> 'Unclosed block' + */ + + this.reason = message; + + if (file) { + /** + * @member {string} - Absolute path to the broken file. + * + * @example + * error.file //=> 'a.sass' + * error.input.file //=> 'a.css' + */ + this.file = file; + } + + if (source) { + /** + * @member {string} - Source code of the broken file. + * + * @example + * error.source //=> 'a { b {} }' + * error.input.column //=> 'a b { }' + */ + this.source = source; + } + + if (plugin) { + /** + * @member {string} - Plugin name, if error came from plugin. + * + * @example + * error.plugin //=> 'postcss-vars' + */ + this.plugin = plugin; + } + + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + /** + * @member {number} - Source line of the error. + * + * @example + * error.line //=> 2 + * error.input.line //=> 4 + */ + this.line = line; + /** + * @member {number} - Source column of the error. + * + * @example + * error.column //=> 1 + * error.input.column //=> 4 + */ + + this.column = column; + } + + this.setMessage(); + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, CssSyntaxError); + } + } + + CssSyntaxError.prototype.setMessage = function setMessage() { + /** + * @member {string} - Full error text in the GNU error format + * with plugin, file, line and column. + * + * @example + * error.message //=> 'a.css:1:1: Unclosed block' + */ + this.message = this.plugin ? this.plugin + ': ' : ''; + this.message += this.file ? this.file : ''; + + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column; + } + + this.message += ': ' + this.reason; + }; + /** + * Returns a few lines of CSS source that caused the error. + * + * If the CSS has an input source map without `sourceContent`, + * this method will return an empty string. + * + * @param {boolean} [color] whether arrow will be colored red by terminal + * color codes. By default, PostCSS will detect + * color support by `process.stdout.isTTY` + * and `process.env.NODE_DISABLE_COLORS`. + * + * @example + * error.showSourceCode() //=> " 4 | } + * // 5 | a { + * // > 6 | bad + * // | ^ + * // 7 | } + * // 8 | b {" + * + * @return {string} few lines of CSS source that caused the error + */ + + + CssSyntaxError.prototype.showSourceCode = function showSourceCode(color) { + var _this = this; + + if (!this.source) return ''; + var css = this.source; + if (typeof color === 'undefined') color = _supportsColor2.default.stdout; + if (color) css = (0, _terminalHighlight2.default)(css); + var lines = css.split(/\r?\n/); + var start = Math.max(this.line - 3, 0); + var end = Math.min(this.line + 2, lines.length); + var maxWidth = String(end).length; + + function mark(text) { + if (color && _chalk2.default.red) { + return _chalk2.default.red.bold(text); + } else { + return text; + } + } + + function aside(text) { + if (color && _chalk2.default.gray) { + return _chalk2.default.gray(text); + } else { + return text; + } + } + + return lines.slice(start, end).map(function (line, index) { + var number = start + 1 + index; + var gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '; + + if (number === _this.line) { + var spacing = aside(gutter.replace(/\d/g, ' ')) + line.slice(0, _this.column - 1).replace(/[^\t]/g, ' '); + return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^'); + } else { + return ' ' + aside(gutter) + line; + } + }).join('\n'); + }; + /** + * Returns error position, message and source code of the broken part. + * + * @example + * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block + * // > 1 | a { + * // | ^" + * + * @return {string} error position, message and source code + */ + + + CssSyntaxError.prototype.toString = function toString() { + var code = this.showSourceCode(); + + if (code) { + code = '\n\n' + code + '\n'; + } + + return this.name + ': ' + this.message + code; + }; + /** + * @memberof CssSyntaxError# + * @member {Input} input - Input object with PostCSS internal information + * about input file. If input has source map + * from previous tool, PostCSS will use origin + * (for example, Sass) source. You can use this + * object to get PostCSS input source. + * + * @example + * error.input.file //=> 'a.css' + * error.file //=> 'a.sass' + */ + + + return CssSyntaxError; +}(); + +exports.default = CssSyntaxError; +module.exports = exports['default']; + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = tokenizer; +var SINGLE_QUOTE = 39; +var DOUBLE_QUOTE = 34; +var BACKSLASH = 92; +var SLASH = 47; +var NEWLINE = 10; +var SPACE = 32; +var FEED = 12; +var TAB = 9; +var CR = 13; +var OPEN_SQUARE = 91; +var CLOSE_SQUARE = 93; +var OPEN_PARENTHESES = 40; +var CLOSE_PARENTHESES = 41; +var OPEN_CURLY = 123; +var CLOSE_CURLY = 125; +var SEMICOLON = 59; +var ASTERISK = 42; +var COLON = 58; +var AT = 64; +var RE_AT_END = /[ \n\t\r\f\{\}\(\)'"\\;/\[\]#]/g; +var RE_WORD_END = /[ \n\t\r\f\(\)\{\}:;@!'"\\\]\[#]|\/(?=\*)/g; +var RE_BAD_BRACKET = /.[\\\/\("'\n]/; +var RE_HEX_ESCAPE = /[a-f0-9]/i; + +function tokenizer(input) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var css = input.css.valueOf(); + var ignore = options.ignoreErrors; + var code = void 0, + next = void 0, + quote = void 0, + lines = void 0, + last = void 0, + content = void 0, + escape = void 0, + nextLine = void 0, + nextOffset = void 0, + escaped = void 0, + escapePos = void 0, + prev = void 0, + n = void 0, + currentToken = void 0; + var length = css.length; + var offset = -1; + var line = 1; + var pos = 0; + var buffer = []; + var returned = []; + + function unclosed(what) { + throw input.error('Unclosed ' + what, line, pos - offset); + } + + function endOfFile() { + return returned.length === 0 && pos >= length; + } + + function nextToken() { + if (returned.length) return returned.pop(); + if (pos >= length) return; + code = css.charCodeAt(pos); + + if (code === NEWLINE || code === FEED || code === CR && css.charCodeAt(pos + 1) !== NEWLINE) { + offset = pos; + line += 1; + } + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: + next = pos; + + do { + next += 1; + code = css.charCodeAt(next); + + if (code === NEWLINE) { + offset = next; + line += 1; + } + } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED); + + currentToken = ['space', css.slice(pos, next)]; + pos = next - 1; + break; + + case OPEN_SQUARE: + currentToken = ['[', '[', line, pos - offset]; + break; + + case CLOSE_SQUARE: + currentToken = [']', ']', line, pos - offset]; + break; + + case OPEN_CURLY: + currentToken = ['{', '{', line, pos - offset]; + break; + + case CLOSE_CURLY: + currentToken = ['}', '}', line, pos - offset]; + break; + + case COLON: + currentToken = [':', ':', line, pos - offset]; + break; + + case SEMICOLON: + currentToken = [';', ';', line, pos - offset]; + break; + + case OPEN_PARENTHESES: + prev = buffer.length ? buffer.pop()[1] : ''; + n = css.charCodeAt(pos + 1); + + if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) { + next = pos; + + do { + escaped = false; + next = css.indexOf(')', next + 1); + + if (next === -1) { + if (ignore) { + next = pos; + break; + } else { + unclosed('bracket'); + } + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + currentToken = ['brackets', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + pos = next; + } else { + next = css.indexOf(')', pos + 1); + content = css.slice(pos, next + 1); + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = ['(', '(', line, pos - offset]; + } else { + currentToken = ['brackets', content, line, pos - offset, line, next - offset]; + pos = next; + } + } + + break; + + case CLOSE_PARENTHESES: + currentToken = [')', ')', line, pos - offset]; + break; + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: + quote = code === SINGLE_QUOTE ? '\'' : '"'; + next = pos; + + do { + escaped = false; + next = css.indexOf(quote, next + 1); + + if (next === -1) { + if (ignore) { + next = pos + 1; + break; + } else { + unclosed('string'); + } + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + currentToken = ['string', css.slice(pos, next + 1), line, pos - offset, nextLine, next - nextOffset]; + offset = nextOffset; + line = nextLine; + pos = next; + break; + + case AT: + RE_AT_END.lastIndex = pos + 1; + RE_AT_END.test(css); + + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_AT_END.lastIndex - 2; + } + + currentToken = ['at-word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + pos = next; + break; + + case BACKSLASH: + next = pos; + escape = true; + + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1; + escape = !escape; + } + + code = css.charCodeAt(next + 1); + + if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) { + next += 1; + + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { + next += 1; + } + + if (css.charCodeAt(next + 1) === SPACE) { + next += 1; + } + } + } + + currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + pos = next; + break; + + default: + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1; + + if (next === 0) { + if (ignore) { + next = css.length; + } else { + unclosed('comment'); + } + } + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + currentToken = ['comment', content, line, pos - offset, nextLine, next - nextOffset]; + offset = nextOffset; + line = nextLine; + pos = next; + } else { + RE_WORD_END.lastIndex = pos + 1; + RE_WORD_END.test(css); + + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_WORD_END.lastIndex - 2; + } + + currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + buffer.push(currentToken); + pos = next; + } + + break; + } + + pos++; + return currentToken; + } + + function back(token) { + returned.push(token); + } + + return { + back: back, + nextToken: nextToken, + endOfFile: endOfFile + }; +} + +module.exports = exports['default']; + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = __webpack_require__(66).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(129).SourceMapConsumer; +exports.SourceNode = __webpack_require__(132).SourceNode; + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var base64VLQ = __webpack_require__(67); + +var util = __webpack_require__(8); + +var ArraySet = __webpack_require__(68).ArraySet; + +var MappingList = __webpack_require__(128).MappingList; +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + + +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + +SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; +}; +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + + +SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); +}; +/** + * Set the source content for a source file. + */ + + +SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } +}; +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + + +SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; // If aSourceFile is omitted, we will use the file property of the SourceMap + + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.'); + } + + sourceFile = aSourceMapConsumer.file; + } + + var sourceRoot = this._sourceRoot; // Make "sourceFile" relative if an absolute Url is passed. + + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } // Applying the SourceMap can add and remove items from the sources and + // the names array. + + + var newSources = new ArraySet(); + var newNames = new ArraySet(); // Find mappings for the "sourceFile" + + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + }, this); + + this._sources = newSources; + this._names = newNames; // Copy sourcesContents of applied map. + + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + + this.setSourceContent(sourceFile, content); + } + }, this); +}; +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + + +SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error('original.line and original.column are not numbers -- you probably meant to omit ' + 'the original mapping entirely and only map the generated position. If so, pass ' + 'null for the original mapping instead of an object with empty or null values.'); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { + // Cases 2 and 3. + return; + } else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } +}; +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + + +SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; // lines are stored 0-based in SourceMap spec version 3 + + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; +}; + +SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; + }, this); +}; +/** + * Externalize the source map. + */ + + +SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + + if (this._file != null) { + map.file = this._file; + } + + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; +}; +/** + * Render the source map being generated to a string. + */ + + +SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); +}; + +exports.SourceMapGenerator = SourceMapGenerator; + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +var base64 = __webpack_require__(127); // A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + + +var VLQ_BASE_SHIFT = 5; // binary: 100000 + +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; // binary: 011111 + +var VLQ_BASE_MASK = VLQ_BASE - 1; // binary: 100000 + +var VLQ_CONTINUATION_BIT = VLQ_BASE; +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + +function toVLQSigned(aValue) { + return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; +} +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + + +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative ? -shifted : shifted; +} +/** + * Returns the base 64 VLQ encoded value. + */ + + +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + + +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var util = __webpack_require__(8); + +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} +/** + * Static method for creating ArraySet instances from an existing array. + */ + + +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + + return set; +}; +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + + +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; +/** + * Add the given string to this set. + * + * @param String aStr + */ + + +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; +/** + * Is the given string a member of this set? + * + * @param String aStr + */ + + +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ + + +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; +/** + * What is the element at the given index? + * + * @param Number aIdx + */ + + +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + + throw new Error('No element indexed by ' + aIdx); +}; +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + + +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = stringify; + +var _stringifier = __webpack_require__(17); + +var _stringifier2 = _interopRequireDefault(_stringifier); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function stringify(node, builder) { + var str = new _stringifier2.default(builder); + str.stringify(node); +} + +module.exports = exports['default']; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = warnOnce; +var printed = {}; + +function warnOnce(message) { + if (printed[message]) return; + printed[message] = true; + if (typeof console !== 'undefined' && console.warn) console.warn(message); +} + +module.exports = exports['default']; + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _declaration = __webpack_require__(72); + +var _declaration2 = _interopRequireDefault(_declaration); + +var _tokenize = __webpack_require__(64); + +var _tokenize2 = _interopRequireDefault(_tokenize); + +var _comment = __webpack_require__(20); + +var _comment2 = _interopRequireDefault(_comment); + +var _atRule = __webpack_require__(22); + +var _atRule2 = _interopRequireDefault(_atRule); + +var _root = __webpack_require__(74); + +var _root2 = _interopRequireDefault(_root); + +var _rule = __webpack_require__(23); + +var _rule2 = _interopRequireDefault(_rule); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var Parser = function () { + function Parser(input) { + _classCallCheck(this, Parser); + + this.input = input; + this.root = new _root2.default(); + this.current = this.root; + this.spaces = ''; + this.semicolon = false; + this.createTokenizer(); + this.root.source = { + input: input, + start: { + line: 1, + column: 1 + } + }; + } + + Parser.prototype.createTokenizer = function createTokenizer() { + this.tokenizer = (0, _tokenize2.default)(this.input); + }; + + Parser.prototype.parse = function parse() { + var token = void 0; + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken(); + + switch (token[0]) { + case 'space': + this.spaces += token[1]; + break; + + case ';': + this.freeSemicolon(token); + break; + + case '}': + this.end(token); + break; + + case 'comment': + this.comment(token); + break; + + case 'at-word': + this.atrule(token); + break; + + case '{': + this.emptyRule(token); + break; + + default: + this.other(token); + break; + } + } + + this.endFile(); + }; + + Parser.prototype.comment = function comment(token) { + var node = new _comment2.default(); + this.init(node, token[2], token[3]); + node.source.end = { + line: token[4], + column: token[5] + }; + var text = token[1].slice(2, -2); + + if (/^\s*$/.test(text)) { + node.text = ''; + node.raws.left = text; + node.raws.right = ''; + } else { + var match = text.match(/^(\s*)([^]*[^\s])(\s*)$/); + node.text = match[2]; + node.raws.left = match[1]; + node.raws.right = match[3]; + } + }; + + Parser.prototype.emptyRule = function emptyRule(token) { + var node = new _rule2.default(); + this.init(node, token[2], token[3]); + node.selector = ''; + node.raws.between = ''; + this.current = node; + }; + + Parser.prototype.other = function other(start) { + var end = false; + var type = null; + var colon = false; + var bracket = null; + var brackets = []; + var tokens = []; + var token = start; + + while (token) { + type = token[0]; + tokens.push(token); + + if (type === '(' || type === '[') { + if (!bracket) bracket = token; + brackets.push(type === '(' ? ')' : ']'); + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens); + return; + } else { + break; + } + } else if (type === '{') { + this.rule(tokens); + return; + } else if (type === '}') { + this.tokenizer.back(tokens.pop()); + end = true; + break; + } else if (type === ':') { + colon = true; + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + if (brackets.length === 0) bracket = null; + } + + token = this.tokenizer.nextToken(); + } + + if (this.tokenizer.endOfFile()) end = true; + if (brackets.length > 0) this.unclosedBracket(bracket); + + if (end && colon) { + while (tokens.length) { + token = tokens[tokens.length - 1][0]; + if (token !== 'space' && token !== 'comment') break; + this.tokenizer.back(tokens.pop()); + } + + this.decl(tokens); + return; + } else { + this.unknownWord(tokens); + } + }; + + Parser.prototype.rule = function rule(tokens) { + tokens.pop(); + var node = new _rule2.default(); + this.init(node, tokens[0][2], tokens[0][3]); + node.raws.between = this.spacesAndCommentsFromEnd(tokens); + this.raw(node, 'selector', tokens); + this.current = node; + }; + + Parser.prototype.decl = function decl(tokens) { + var node = new _declaration2.default(); + this.init(node); + var last = tokens[tokens.length - 1]; + + if (last[0] === ';') { + this.semicolon = true; + tokens.pop(); + } + + if (last[4]) { + node.source.end = { + line: last[4], + column: last[5] + }; + } else { + node.source.end = { + line: last[2], + column: last[3] + }; + } + + while (tokens[0][0] !== 'word') { + if (tokens.length === 1) this.unknownWord(tokens); + node.raws.before += tokens.shift()[1]; + } + + node.source.start = { + line: tokens[0][2], + column: tokens[0][3] + }; + node.prop = ''; + + while (tokens.length) { + var type = tokens[0][0]; + + if (type === ':' || type === 'space' || type === 'comment') { + break; + } + + node.prop += tokens.shift()[1]; + } + + node.raws.between = ''; + var token = void 0; + + while (tokens.length) { + token = tokens.shift(); + + if (token[0] === ':') { + node.raws.between += token[1]; + break; + } else { + node.raws.between += token[1]; + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0]; + node.prop = node.prop.slice(1); + } + + node.raws.between += this.spacesAndCommentsFromStart(tokens); + this.precheckMissedSemicolon(tokens); + + for (var i = tokens.length - 1; i > 0; i--) { + token = tokens[i]; + + if (token[1].toLowerCase() === '!important') { + node.important = true; + var string = this.stringFrom(tokens, i); + string = this.spacesFromEnd(tokens) + string; + if (string !== ' !important') node.raws.important = string; + break; + } else if (token[1].toLowerCase() === 'important') { + var cache = tokens.slice(0); + var str = ''; + + for (var j = i; j > 0; j--) { + var _type = cache[j][0]; + + if (str.trim().indexOf('!') === 0 && _type !== 'space') { + break; + } + + str = cache.pop()[1] + str; + } + + if (str.trim().indexOf('!') === 0) { + node.important = true; + node.raws.important = str; + tokens = cache; + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break; + } + } + + this.raw(node, 'value', tokens); + if (node.value.indexOf(':') !== -1) this.checkMissedSemicolon(tokens); + }; + + Parser.prototype.atrule = function atrule(token) { + var node = new _atRule2.default(); + node.name = token[1].slice(1); + + if (node.name === '') { + this.unnamedAtrule(node, token); + } + + this.init(node, token[2], token[3]); + var prev = void 0; + var shift = void 0; + var last = false; + var open = false; + var params = []; + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken(); + + if (token[0] === ';') { + node.source.end = { + line: token[2], + column: token[3] + }; + this.semicolon = true; + break; + } else if (token[0] === '{') { + open = true; + break; + } else if (token[0] === '}') { + if (params.length > 0) { + shift = params.length - 1; + prev = params[shift]; + + while (prev && prev[0] === 'space') { + prev = params[--shift]; + } + + if (prev) { + node.source.end = { + line: prev[4], + column: prev[5] + }; + } + } + + this.end(token); + break; + } else { + params.push(token); + } + + if (this.tokenizer.endOfFile()) { + last = true; + break; + } + } + + node.raws.between = this.spacesAndCommentsFromEnd(params); + + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params); + this.raw(node, 'params', params); + + if (last) { + token = params[params.length - 1]; + node.source.end = { + line: token[4], + column: token[5] + }; + this.spaces = node.raws.between; + node.raws.between = ''; + } + } else { + node.raws.afterName = ''; + node.params = ''; + } + + if (open) { + node.nodes = []; + this.current = node; + } + }; + + Parser.prototype.end = function end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + + this.semicolon = false; + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.spaces = ''; + + if (this.current.parent) { + this.current.source.end = { + line: token[2], + column: token[3] + }; + this.current = this.current.parent; + } else { + this.unexpectedClose(token); + } + }; + + Parser.prototype.endFile = function endFile() { + if (this.current.parent) this.unclosedBlock(); + + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + }; + + Parser.prototype.freeSemicolon = function freeSemicolon(token) { + this.spaces += token[1]; + + if (this.current.nodes) { + var prev = this.current.nodes[this.current.nodes.length - 1]; + + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces; + this.spaces = ''; + } + } + }; // Helpers + + + Parser.prototype.init = function init(node, line, column) { + this.current.push(node); + node.source = { + start: { + line: line, + column: column + }, + input: this.input + }; + node.raws.before = this.spaces; + this.spaces = ''; + if (node.type !== 'comment') this.semicolon = false; + }; + + Parser.prototype.raw = function raw(node, prop, tokens) { + var token = void 0, + type = void 0; + var length = tokens.length; + var value = ''; + var clean = true; + var next = void 0, + prev = void 0; + var pattern = /^([.|#])?([\w])+/i; + + for (var i = 0; i < length; i += 1) { + token = tokens[i]; + type = token[0]; + + if (type === 'comment' && node.type === 'rule') { + prev = tokens[i - 1]; + next = tokens[i + 1]; + + if (prev[0] !== 'space' && next[0] !== 'space' && pattern.test(prev[1]) && pattern.test(next[1])) { + value += token[1]; + } else { + clean = false; + } + + continue; + } + + if (type === 'comment' || type === 'space' && i === length - 1) { + clean = false; + } else { + value += token[1]; + } + } + + if (!clean) { + var raw = tokens.reduce(function (all, i) { + return all + i[1]; + }, ''); + node.raws[prop] = { + value: value, + raw: raw + }; + } + + node[prop] = value; + }; + + Parser.prototype.spacesAndCommentsFromEnd = function spacesAndCommentsFromEnd(tokens) { + var lastTokenType = void 0; + var spaces = ''; + + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break; + spaces = tokens.pop()[1] + spaces; + } + + return spaces; + }; + + Parser.prototype.spacesAndCommentsFromStart = function spacesAndCommentsFromStart(tokens) { + var next = void 0; + var spaces = ''; + + while (tokens.length) { + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break; + spaces += tokens.shift()[1]; + } + + return spaces; + }; + + Parser.prototype.spacesFromEnd = function spacesFromEnd(tokens) { + var lastTokenType = void 0; + var spaces = ''; + + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space') break; + spaces = tokens.pop()[1] + spaces; + } + + return spaces; + }; + + Parser.prototype.stringFrom = function stringFrom(tokens, from) { + var result = ''; + + for (var i = from; i < tokens.length; i++) { + result += tokens[i][1]; + } + + tokens.splice(from, tokens.length - from); + return result; + }; + + Parser.prototype.colon = function colon(tokens) { + var brackets = 0; + var token = void 0, + type = void 0, + prev = void 0; + + for (var i = 0; i < tokens.length; i++) { + token = tokens[i]; + type = token[0]; + + if (type === '(') { + brackets += 1; + } else if (type === ')') { + brackets -= 1; + } else if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token); + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue; + } else { + return i; + } + } + + prev = token; + } + + return false; + }; // Errors + + + Parser.prototype.unclosedBracket = function unclosedBracket(bracket) { + throw this.input.error('Unclosed bracket', bracket[2], bracket[3]); + }; + + Parser.prototype.unknownWord = function unknownWord(tokens) { + throw this.input.error('Unknown word', tokens[0][2], tokens[0][3]); + }; + + Parser.prototype.unexpectedClose = function unexpectedClose(token) { + throw this.input.error('Unexpected }', token[2], token[3]); + }; + + Parser.prototype.unclosedBlock = function unclosedBlock() { + var pos = this.current.source.start; + throw this.input.error('Unclosed block', pos.line, pos.column); + }; + + Parser.prototype.doubleColon = function doubleColon(token) { + throw this.input.error('Double colon', token[2], token[3]); + }; + + Parser.prototype.unnamedAtrule = function unnamedAtrule(node, token) { + throw this.input.error('At-rule without name', token[2], token[3]); + }; + + Parser.prototype.precheckMissedSemicolon = function precheckMissedSemicolon(tokens) { + // Hook for Safe Parser + tokens; + }; + + Parser.prototype.checkMissedSemicolon = function checkMissedSemicolon(tokens) { + var colon = this.colon(tokens); + if (colon === false) return; + var founded = 0; + var token = void 0; + + for (var j = colon - 1; j >= 0; j--) { + token = tokens[j]; + + if (token[0] !== 'space') { + founded += 1; + if (founded === 2) break; + } + } + + throw this.input.error('Missed semicolon', token[2], token[3]); + }; + + return Parser; +}(); + +exports.default = Parser; +module.exports = exports['default']; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _node = __webpack_require__(21); + +var _node2 = _interopRequireDefault(_node); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents a CSS declaration. + * + * @extends Node + * + * @example + * const root = postcss.parse('a { color: black }'); + * const decl = root.first.first; + * decl.type //=> 'decl' + * decl.toString() //=> ' color: black' + */ + + +var Declaration = function (_Node) { + _inherits(Declaration, _Node); + + function Declaration(defaults) { + _classCallCheck(this, Declaration); + + var _this = _possibleConstructorReturn(this, _Node.call(this, defaults)); + + _this.type = 'decl'; + return _this; + } + /** + * @memberof Declaration# + * @member {string} prop - the declaration’s property name + * + * @example + * const root = postcss.parse('a { color: black }'); + * const decl = root.first.first; + * decl.prop //=> 'color' + */ + + /** + * @memberof Declaration# + * @member {string} value - the declaration’s value + * + * @example + * const root = postcss.parse('a { color: black }'); + * const decl = root.first.first; + * decl.value //=> 'black' + */ + + /** + * @memberof Declaration# + * @member {boolean} important - `true` if the declaration + * has an !important annotation. + * + * @example + * const root = postcss.parse('a { color: black !important; color: red }'); + * root.first.first.important //=> true + * root.first.last.important //=> undefined + */ + + /** + * @memberof Declaration# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `between`: the symbols between the property and value + * for declarations. + * * `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS cleans declaration from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + */ + + + return Declaration; +}(_node2.default); + +exports.default = Declaration; +module.exports = exports['default']; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = parse; + +var _parser = __webpack_require__(71); + +var _parser2 = _interopRequireDefault(_parser); + +var _input = __webpack_require__(18); + +var _input2 = _interopRequireDefault(_input); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function parse(css, opts) { + if (opts && opts.safe) { + throw new Error('Option safe was removed. ' + 'Use parser: require("postcss-safe-parser")'); + } + + var input = new _input2.default(css, opts); + var parser = new _parser2.default(input); + + try { + parser.parse(); + } catch (e) { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += '\nYou tried to parse SCSS with ' + 'the standard CSS parser; ' + 'try again with the postcss-scss parser'; + } else if (/\.sass/i.test(opts.from)) { + e.message += '\nYou tried to parse Sass with ' + 'the standard CSS parser; ' + 'try again with the postcss-sass parser'; + } else if (/\.less$/i.test(opts.from)) { + e.message += '\nYou tried to parse Less with ' + 'the standard CSS parser; ' + 'try again with the postcss-less parser'; + } + } + + throw e; + } + + return parser.root; +} + +module.exports = exports['default']; + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _container = __webpack_require__(13); + +var _container2 = _interopRequireDefault(_container); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents a CSS file and contains all its parsed nodes. + * + * @extends Container + * + * @example + * const root = postcss.parse('a{color:black} b{z-index:2}'); + * root.type //=> 'root' + * root.nodes.length //=> 2 + */ + + +var Root = function (_Container) { + _inherits(Root, _Container); + + function Root(defaults) { + _classCallCheck(this, Root); + + var _this = _possibleConstructorReturn(this, _Container.call(this, defaults)); + + _this.type = 'root'; + if (!_this.nodes) _this.nodes = []; + return _this; + } + + Root.prototype.removeChild = function removeChild(child, ignore) { + var index = this.index(child); + + if (!ignore && index === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[index].raws.before; + } + + return _Container.prototype.removeChild.call(this, child); + }; + + Root.prototype.normalize = function normalize(child, sample, type) { + var nodes = _Container.prototype.normalize.call(this, child); + + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before; + } else { + delete sample.raws.before; + } + } else if (this.first !== sample) { + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + node.raws.before = sample.raws.before; + } + } + } + + return nodes; + }; + /** + * Returns a {@link Result} instance representing the root’s CSS. + * + * @param {processOptions} [opts] - options with only `to` and `map` keys + * + * @return {Result} result with current root’s CSS + * + * @example + * const root1 = postcss.parse(css1, { from: 'a.css' }); + * const root2 = postcss.parse(css2, { from: 'b.css' }); + * root1.append(root2); + * const result = root1.toResult({ to: 'all.css', map: true }); + */ + + + Root.prototype.toResult = function toResult() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var LazyResult = __webpack_require__(75); + + var Processor = __webpack_require__(139); + + var lazy = new LazyResult(new Processor(), this, opts); + return lazy.stringify(); + }; + /** + * @memberof Root# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `after`: the space symbols after the last child to the end of file. + * * `semicolon`: is the last child has an (optional) semicolon. + * + * @example + * postcss.parse('a {}\n').raws //=> { after: '\n' } + * postcss.parse('a {}').raws //=> { after: '' } + */ + + + return Root; +}(_container2.default); + +exports.default = Root; +module.exports = exports['default']; + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _mapGenerator = __webpack_require__(136); + +var _mapGenerator2 = _interopRequireDefault(_mapGenerator); + +var _stringify2 = __webpack_require__(69); + +var _stringify3 = _interopRequireDefault(_stringify2); + +var _warnOnce = __webpack_require__(70); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _result = __webpack_require__(137); + +var _result2 = _interopRequireDefault(_result); + +var _parse = __webpack_require__(73); + +var _parse2 = _interopRequireDefault(_parse); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function isPromise(obj) { + return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && typeof obj.then === 'function'; +} +/** + * A Promise proxy for the result of PostCSS transformations. + * + * A `LazyResult` instance is returned by {@link Processor#process}. + * + * @example + * const lazy = postcss([cssnext]).process(css); + */ + + +var LazyResult = function () { + function LazyResult(processor, css, opts) { + _classCallCheck(this, LazyResult); + + this.stringified = false; + this.processed = false; + var root = void 0; + + if ((typeof css === 'undefined' ? 'undefined' : _typeof(css)) === 'object' && css !== null && css.type === 'root') { + root = css; + } else if (css instanceof LazyResult || css instanceof _result2.default) { + root = css.root; + + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {}; + if (!opts.map.inline) opts.map.inline = false; + opts.map.prev = css.map; + } + } else { + var parser = _parse2.default; + if (opts.syntax) parser = opts.syntax.parse; + if (opts.parser) parser = opts.parser; + if (parser.parse) parser = parser.parse; + + try { + root = parser(css, opts); + } catch (error) { + this.error = error; + } + } + + this.result = new _result2.default(processor, root, opts); + } + /** + * Returns a {@link Processor} instance, which will be used + * for CSS transformations. + * @type {Processor} + */ + + /** + * Processes input CSS through synchronous plugins + * and calls {@link Result#warnings()}. + * + * @return {Warning[]} warnings from plugins + */ + + + LazyResult.prototype.warnings = function warnings() { + return this.sync().warnings(); + }; + /** + * Alias for the {@link LazyResult#css} property. + * + * @example + * lazy + '' === lazy.css; + * + * @return {string} output CSS + */ + + + LazyResult.prototype.toString = function toString() { + return this.css; + }; + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls `onFulfilled` with a Result instance. If a plugin throws + * an error, the `onRejected` callback will be executed. + * + * It implements standard Promise API. + * + * @param {onFulfilled} onFulfilled - callback will be executed + * when all plugins will finish work + * @param {onRejected} onRejected - callback will be executed on any error + * + * @return {Promise} Promise API to make queue + * + * @example + * postcss([cssnext]).process(css, { from: cssPath }).then(result => { + * console.log(result.css); + * }); + */ + + + LazyResult.prototype.then = function then(onFulfilled, onRejected) { + if (!('from' in this.opts)) { + (0, _warnOnce2.default)('Without `from` option PostCSS could generate wrong ' + 'source map and will not find Browserslist config. ' + 'Set it to CSS file path or to `undefined` to prevent ' + 'this warning.'); + } + + return this.async().then(onFulfilled, onRejected); + }; + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onRejected for each error thrown in any plugin. + * + * It implements standard Promise API. + * + * @param {onRejected} onRejected - callback will be executed on any error + * + * @return {Promise} Promise API to make queue + * + * @example + * postcss([cssnext]).process(css).then(result => { + * console.log(result.css); + * }).catch(error => { + * console.error(error); + * }); + */ + + + LazyResult.prototype.catch = function _catch(onRejected) { + return this.async().catch(onRejected); + }; + + LazyResult.prototype.handleError = function handleError(error, plugin) { + try { + this.error = error; + + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin; + error.setMessage(); + } else if (plugin.postcssVersion) { + var pluginName = plugin.postcssPlugin; + var pluginVer = plugin.postcssVersion; + var runtimeVer = this.result.processor.version; + var a = pluginVer.split('.'); + var b = runtimeVer.split('.'); + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + console.error('Unknown error from PostCSS plugin. ' + 'Your current PostCSS version ' + 'is ' + runtimeVer + ', but ' + pluginName + ' ' + 'uses ' + pluginVer + '. Perhaps this is ' + 'the source of the error below.'); + } + } + } catch (err) { + if (console && console.error) console.error(err); + } + }; + + LazyResult.prototype.asyncTick = function asyncTick(resolve, reject) { + var _this = this; + + if (this.plugin >= this.processor.plugins.length) { + this.processed = true; + return resolve(); + } + + try { + var plugin = this.processor.plugins[this.plugin]; + var promise = this.run(plugin); + this.plugin += 1; + + if (isPromise(promise)) { + promise.then(function () { + _this.asyncTick(resolve, reject); + }).catch(function (error) { + _this.handleError(error, plugin); + + _this.processed = true; + reject(error); + }); + } else { + this.asyncTick(resolve, reject); + } + } catch (error) { + this.processed = true; + reject(error); + } + }; + + LazyResult.prototype.async = function async() { + var _this2 = this; + + if (this.processed) { + return new Promise(function (resolve, reject) { + if (_this2.error) { + reject(_this2.error); + } else { + resolve(_this2.stringify()); + } + }); + } + + if (this.processing) { + return this.processing; + } + + this.processing = new Promise(function (resolve, reject) { + if (_this2.error) return reject(_this2.error); + _this2.plugin = 0; + + _this2.asyncTick(resolve, reject); + }).then(function () { + _this2.processed = true; + return _this2.stringify(); + }); + return this.processing; + }; + + LazyResult.prototype.sync = function sync() { + if (this.processed) return this.result; + this.processed = true; + + if (this.processing) { + throw new Error('Use process(css).then(cb) to work with async plugins'); + } + + if (this.error) throw this.error; + + for (var _iterator = this.result.processor.plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var plugin = _ref; + var promise = this.run(plugin); + + if (isPromise(promise)) { + throw new Error('Use process(css).then(cb) to work with async plugins'); + } + } + + return this.result; + }; + + LazyResult.prototype.run = function run(plugin) { + this.result.lastPlugin = plugin; + + try { + return plugin(this.result.root, this.result); + } catch (error) { + this.handleError(error, plugin); + throw error; + } + }; + + LazyResult.prototype.stringify = function stringify() { + if (this.stringified) return this.result; + this.stringified = true; + this.sync(); + var opts = this.result.opts; + var str = _stringify3.default; + if (opts.syntax) str = opts.syntax.stringify; + if (opts.stringifier) str = opts.stringifier; + if (str.stringify) str = str.stringify; + var map = new _mapGenerator2.default(str, this.result.root, this.result.opts); + var data = map.generate(); + this.result.css = data[0]; + this.result.map = data[1]; + return this.result; + }; + + _createClass(LazyResult, [{ + key: 'processor', + get: function get() { + return this.result.processor; + } + /** + * Options from the {@link Processor#process} call. + * @type {processOptions} + */ + + }, { + key: 'opts', + get: function get() { + return this.result.opts; + } + /** + * Processes input CSS through synchronous plugins, converts `Root` + * to a CSS string and returns {@link Result#css}. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {string} + * @see Result#css + */ + + }, { + key: 'css', + get: function get() { + return this.stringify().css; + } + /** + * An alias for the `css` property. Use it with syntaxes + * that generate non-CSS output. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {string} + * @see Result#content + */ + + }, { + key: 'content', + get: function get() { + return this.stringify().content; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#map}. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {SourceMapGenerator} + * @see Result#map + */ + + }, { + key: 'map', + get: function get() { + return this.stringify().map; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#root}. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * This is why this method is only for debug purpose, + * you should always use {@link LazyResult#then}. + * + * @type {Root} + * @see Result#root + */ + + }, { + key: 'root', + get: function get() { + return this.sync().root; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#messages}. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * This is why this method is only for debug purpose, + * you should always use {@link LazyResult#then}. + * + * @type {Message[]} + * @see Result#messages + */ + + }, { + key: 'messages', + get: function get() { + return this.sync().messages; + } + }]); + + return LazyResult; +}(); + +exports.default = LazyResult; +/** + * @callback onFulfilled + * @param {Result} result + */ + +/** + * @callback onRejected + * @param {Error} error + */ + +module.exports = exports['default']; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; + +var _comment = __webpack_require__(24); + +var _comment2 = _interopRequireDefault(_comment); + +var _import2 = __webpack_require__(157); + +var _import3 = _interopRequireDefault(_import2); + +var _parser = __webpack_require__(89); + +var _parser2 = _interopRequireDefault(_parser); + +var _rule = __webpack_require__(164); + +var _rule2 = _interopRequireDefault(_rule); + +var _root = __webpack_require__(165); + +var _root2 = _interopRequireDefault(_root); + +var _findExtendRule = __webpack_require__(166); + +var _findExtendRule2 = _interopRequireDefault(_findExtendRule); + +var _isMixinToken = __webpack_require__(167); + +var _isMixinToken2 = _interopRequireDefault(_isMixinToken); + +var _lessTokenize = __webpack_require__(168); + +var _lessTokenize2 = _interopRequireDefault(_lessTokenize); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var blockCommentEndPattern = /\*\/$/; + +var LessParser = function (_Parser) { + _inherits(LessParser, _Parser); + + function LessParser(input) { + _classCallCheck(this, LessParser); + + var _this = _possibleConstructorReturn(this, (LessParser.__proto__ || Object.getPrototypeOf(LessParser)).call(this, input)); + + _this.root = new _root2.default(); + _this.current = _this.root; + _this.root.source = { + input: input, + start: { + line: 1, + column: 1 + } + }; + return _this; + } + + _createClass(LessParser, [{ + key: 'atrule', + value: function atrule(token) { + if (token[1] === '@import') { + this.import(token); + } else { + _get(LessParser.prototype.__proto__ || Object.getPrototypeOf(LessParser.prototype), 'atrule', this).call(this, token); + } + } + }, { + key: 'comment', + value: function comment(token) { + var node = new _comment2.default(); + var content = token[1]; + var text = content.slice(2).replace(blockCommentEndPattern, ''); + this.init(node, token[2], token[3]); + node.source.end = { + line: token[4], + column: token[5] + }; + node.raws.content = content; + node.raws.begin = content[0] + content[1]; + node.inline = token[6] === 'inline'; + node.block = !node.inline; + + if (/^\s*$/.test(text)) { + node.text = ''; + node.raws.left = text; + node.raws.right = ''; + } else { + var match = text.match(/^(\s*)([^]*[^\s])(\s*)$/); + node.text = match[2]; // Add extra spaces to generate a comment in a common style /*[space][text][space]*/ + + node.raws.left = match[1] || ' '; + node.raws.right = match[3] || ' '; + } + } + /** + * @description Create a Declaration + * @param options {{start: number}} + */ + + }, { + key: 'createDeclaration', + value: function createDeclaration(options) { + this.decl(this.tokens.slice(options.start, this.pos + 1)); + } + /** + * @description Create a Rule node + * @param options {{start: number, params: Array}} + */ + + }, { + key: 'createRule', + value: function createRule(options) { + var semi = this.tokens[this.pos][0] === ';'; + var end = this.pos + (options.empty && semi ? 2 : 1); + var tokens = this.tokens.slice(options.start, end); + var node = this.rule(tokens); + /** + * By default in PostCSS `Rule.params` is `undefined`. + * To preserve compability with PostCSS: + * - Don't set empty params for a Rule. + * - Set params for a Rule only if it can be a mixin or &:extend rule. + */ + + if (options.params[0] && (options.mixin || options.extend)) { + this.raw(node, 'params', options.params); + } + + if (options.empty) { + // if it's an empty mixin or extend, it must have a semicolon + // (that's the only way we get to this point) + if (semi) { + node.raws.semicolon = this.semicolon = true; + node.selector = node.selector.replace(/;$/, ''); + } + + if (options.extend) { + node.extend = true; + } + + if (options.mixin) { + node.mixin = true; + } + /** + * @description Mark mixin without declarations. + * @type {boolean} + */ + + + node.empty = true; // eslint-disable-next-line + + delete this.current.nodes; + + if (/!\s*important/i.test(node.selector)) { + node.important = true; + + if (/\s*!\s*important/i.test(node.selector)) { + node.raws.important = node.selector.match(/(\s*!\s*important)/i)[1]; + } + + node.selector = node.selector.replace(/\s*!\s*important/i, ''); + } // rules don't have trailing semicolons in vanilla css, so they get + // added to this.spaces by the parser loop, so don't step back. + + + if (!semi) { + this.pos--; + } + + this.end(this.tokens[this.pos]); + } + } + }, { + key: 'end', + value: function end(token) { + var node = this.current; // if a Rule contains other Rules (mixins, extends) and those have + // semicolons, assert that the parent Rule has a semicolon + + if (node.nodes && node.nodes.length && node.last.raws.semicolon && !node.last.nodes) { + this.semicolon = true; + } + + _get(LessParser.prototype.__proto__ || Object.getPrototypeOf(LessParser.prototype), 'end', this).call(this, token); + } + }, { + key: 'import', + value: function _import(token) { + /* eslint complexity: 0 */ + var last = false, + open = false, + end = { + line: 0, + column: 0 + }; + var directives = []; + var node = new _import3.default(); + node.name = token[1].slice(1); + this.init(node, token[2], token[3]); + this.pos += 1; + + while (this.pos < this.tokens.length) { + var tokn = this.tokens[this.pos]; + + if (tokn[0] === ';') { + end = { + line: tokn[2], + column: tokn[3] + }; + node.raws.semicolon = true; + break; + } else if (tokn[0] === '{') { + open = true; + break; + } else if (tokn[0] === '}') { + this.end(tokn); + break; + } else if (tokn[0] === 'brackets') { + if (node.urlFunc) { + node.importPath = tokn[1].replace(/[()]/g, ''); + } else { + directives.push(tokn); + } + } else if (tokn[0] === 'space') { + if (directives.length) { + node.raws.between = tokn[1]; + } else if (node.urlFunc) { + node.raws.beforeUrl = tokn[1]; + } else if (node.importPath) { + if (node.urlFunc) { + node.raws.afterUrl = tokn[1]; + } else { + node.raws.after = tokn[1]; + } + } else { + node.raws.afterName = tokn[1]; + } + } else if (tokn[0] === 'word' && tokn[1] === 'url') { + node.urlFunc = true; + } else { + if (tokn[0] !== '(' && tokn[0] !== ')') { + node.importPath = tokn[1]; + } + } + + if (this.pos === this.tokens.length) { + last = true; + break; + } + + this.pos += 1; + } + + if (node.raws.between && !node.raws.afterName) { + node.raws.afterName = node.raws.between; + node.raws.between = ''; + } + + node.source.end = end; + + if (directives.length) { + this.raw(node, 'directives', directives); + + if (last) { + token = directives[directives.length - 1]; + node.source.end = { + line: token[4], + column: token[5] + }; + this.spaces = node.raws.between; + node.raws.between = ''; + } + } else { + node.directives = ''; + } + + if (open) { + node.nodes = []; + this.current = node; + } + } + /* eslint-disable max-statements, complexity */ + + }, { + key: 'other', + value: function other() { + var brackets = []; + var params = []; + var start = this.pos; + var end = false, + colon = false, + bracket = null; // we need pass "()" as spaces + // However we can override method Parser.loop, but it seems less maintainable + + if (this.tokens[start][0] === 'brackets') { + this.spaces += this.tokens[start][1]; + return; + } + + var mixin = (0, _isMixinToken2.default)(this.tokens[start]); + var extend = Boolean((0, _findExtendRule2.default)(this.tokens, start)); + + while (this.pos < this.tokens.length) { + var token = this.tokens[this.pos]; + var type = token[0]; + + if (type === '(' || type === '[') { + if (!bracket) { + bracket = token; + } + + brackets.push(type === '(' ? ')' : ']'); + } else if (brackets.length === 0) { + if (type === ';') { + var foundEndOfRule = this.ruleEnd({ + start: start, + params: params, + colon: colon, + mixin: mixin, + extend: extend + }); + + if (foundEndOfRule) { + return; + } + + break; + } else if (type === '{') { + this.createRule({ + start: start, + params: params, + mixin: mixin + }); + return; + } else if (type === '}') { + this.pos -= 1; + end = true; + break; + } else if (type === ':') { + colon = true; + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + + if (brackets.length === 0) { + bracket = null; + } + } // we don't want to add params for pseudo-selectors that utilize parens (#56) + // if ((extend || !colon) && (brackets.length > 0 || type === 'brackets' || params[0])) { + // params.push(token); + // } + // we don't want to add params for pseudo-selectors that utilize parens (#56) or bracket selectors (#96) + + + if ((extend || !colon) && (brackets.length > 0 || type === 'brackets' || params[0]) && brackets[0] !== ']') { + params.push(token); + } + + this.pos += 1; + } + + if (this.pos === this.tokens.length) { + this.pos -= 1; + end = true; + } + + if (brackets.length > 0) { + this.unclosedBracket(bracket); + } // dont process an end of rule if there's only one token and it's unknown (#64) + + + if (end && this.tokens.length > 1) { + // Handle the case where the there is only a single token in the end rule. + if (start === this.pos) { + this.pos += 1; + } + + var _foundEndOfRule = this.ruleEnd({ + start: start, + params: params, + colon: colon, + mixin: mixin, + extend: extend, + isEndOfBlock: true + }); + + if (_foundEndOfRule) { + return; + } + } + + this.unknownWord(start); + } + }, { + key: 'rule', + value: function rule(tokens) { + tokens.pop(); + var node = new _rule2.default(); + this.init(node, tokens[0][2], tokens[0][3]); //node.raws.between = this.spacesFromEnd(tokens); + + node.raws.between = this.spacesAndCommentsFromEnd(tokens); + this.raw(node, 'selector', tokens); + this.current = node; + return node; + } + }, { + key: 'ruleEnd', + value: function ruleEnd(options) { + var start = options.start; + + if (options.extend || options.mixin) { + this.createRule(Object.assign(options, { + empty: true + })); + return true; + } + + if (options.colon) { + if (options.isEndOfBlock) { + while (this.pos > start) { + var token = this.tokens[this.pos][0]; + + if (token !== 'space' && token !== 'comment') { + break; + } + + this.pos -= 1; + } + } + + this.createDeclaration({ + start: start + }); + return true; + } + + return false; + } + }, { + key: 'tokenize', + value: function tokenize() { + this.tokens = (0, _lessTokenize2.default)(this.input); + } + /* eslint-enable max-statements, complexity */ + + }]); + + return LessParser; +}(_parser2.default); + +exports.default = LessParser; +module.exports = exports['default']; + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _supportsColor = __webpack_require__(142); + +var _supportsColor2 = _interopRequireDefault(_supportsColor); + +var _chalk = __webpack_require__(78); + +var _chalk2 = _interopRequireDefault(_chalk); + +var _terminalHighlight = __webpack_require__(148); + +var _terminalHighlight2 = _interopRequireDefault(_terminalHighlight); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * The CSS parser throws this error for broken CSS. + * + * Custom parsers can throw this error for broken custom syntax using + * the {@link Node#error} method. + * + * PostCSS will use the input source map to detect the original error location. + * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS, + * PostCSS will show the original position in the Sass file. + * + * If you need the position in the PostCSS input + * (e.g., to debug the previous compiler), use `error.input.file`. + * + * @example + * // Catching and checking syntax error + * try { + * postcss.parse('a{') + * } catch (error) { + * if ( error.name === 'CssSyntaxError' ) { + * error //=> CssSyntaxError + * } + * } + * + * @example + * // Raising error from plugin + * throw node.error('Unknown variable', { plugin: 'postcss-vars' }); + */ + + +var CssSyntaxError = function () { + /** + * @param {string} message - error message + * @param {number} [line] - source line of the error + * @param {number} [column] - source column of the error + * @param {string} [source] - source code of the broken file + * @param {string} [file] - absolute path to the broken file + * @param {string} [plugin] - PostCSS plugin name, if error came from plugin + */ + function CssSyntaxError(message, line, column, source, file, plugin) { + _classCallCheck(this, CssSyntaxError); + /** + * @member {string} - Always equal to `'CssSyntaxError'`. You should + * always check error type + * by `error.name === 'CssSyntaxError'` instead of + * `error instanceof CssSyntaxError`, because + * npm could have several PostCSS versions. + * + * @example + * if ( error.name === 'CssSyntaxError' ) { + * error //=> CssSyntaxError + * } + */ + + + this.name = 'CssSyntaxError'; + /** + * @member {string} - Error message. + * + * @example + * error.message //=> 'Unclosed block' + */ + + this.reason = message; + + if (file) { + /** + * @member {string} - Absolute path to the broken file. + * + * @example + * error.file //=> 'a.sass' + * error.input.file //=> 'a.css' + */ + this.file = file; + } + + if (source) { + /** + * @member {string} - Source code of the broken file. + * + * @example + * error.source //=> 'a { b {} }' + * error.input.column //=> 'a b { }' + */ + this.source = source; + } + + if (plugin) { + /** + * @member {string} - Plugin name, if error came from plugin. + * + * @example + * error.plugin //=> 'postcss-vars' + */ + this.plugin = plugin; + } + + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + /** + * @member {number} - Source line of the error. + * + * @example + * error.line //=> 2 + * error.input.line //=> 4 + */ + this.line = line; + /** + * @member {number} - Source column of the error. + * + * @example + * error.column //=> 1 + * error.input.column //=> 4 + */ + + this.column = column; + } + + this.setMessage(); + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, CssSyntaxError); + } + } + + CssSyntaxError.prototype.setMessage = function setMessage() { + /** + * @member {string} - Full error text in the GNU error format + * with plugin, file, line and column. + * + * @example + * error.message //=> 'a.css:1:1: Unclosed block' + */ + this.message = this.plugin ? this.plugin + ': ' : ''; + this.message += this.file ? this.file : ''; + + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column; + } + + this.message += ': ' + this.reason; + }; + /** + * Returns a few lines of CSS source that caused the error. + * + * If the CSS has an input source map without `sourceContent`, + * this method will return an empty string. + * + * @param {boolean} [color] whether arrow will be colored red by terminal + * color codes. By default, PostCSS will detect + * color support by `process.stdout.isTTY` + * and `process.env.NODE_DISABLE_COLORS`. + * + * @example + * error.showSourceCode() //=> " 4 | } + * // 5 | a { + * // > 6 | bad + * // | ^ + * // 7 | } + * // 8 | b {" + * + * @return {string} few lines of CSS source that caused the error + */ + + + CssSyntaxError.prototype.showSourceCode = function showSourceCode(color) { + var _this = this; + + if (!this.source) return ''; + var css = this.source; + if (typeof color === 'undefined') color = _supportsColor2.default; + if (color) css = (0, _terminalHighlight2.default)(css); + var lines = css.split(/\r?\n/); + var start = Math.max(this.line - 3, 0); + var end = Math.min(this.line + 2, lines.length); + var maxWidth = String(end).length; + var colors = new _chalk2.default.constructor({ + enabled: true + }); + + function mark(text) { + if (color) { + return colors.red.bold(text); + } else { + return text; + } + } + + function aside(text) { + if (color) { + return colors.gray(text); + } else { + return text; + } + } + + return lines.slice(start, end).map(function (line, index) { + var number = start + 1 + index; + var gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '; + + if (number === _this.line) { + var spacing = aside(gutter.replace(/\d/g, ' ')) + line.slice(0, _this.column - 1).replace(/[^\t]/g, ' '); + return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^'); + } else { + return ' ' + aside(gutter) + line; + } + }).join('\n'); + }; + /** + * Returns error position, message and source code of the broken part. + * + * @example + * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block + * // > 1 | a { + * // | ^" + * + * @return {string} error position, message and source code + */ + + + CssSyntaxError.prototype.toString = function toString() { + var code = this.showSourceCode(); + + if (code) { + code = '\n\n' + code + '\n'; + } + + return this.name + ': ' + this.message + code; + }; + + _createClass(CssSyntaxError, [{ + key: 'generated', + get: function get() { + (0, _warnOnce2.default)('CssSyntaxError#generated is deprecated. Use input instead.'); + return this.input; + } + /** + * @memberof CssSyntaxError# + * @member {Input} input - Input object with PostCSS internal information + * about input file. If input has source map + * from previous tool, PostCSS will use origin + * (for example, Sass) source. You can use this + * object to get PostCSS input source. + * + * @example + * error.input.file //=> 'a.css' + * error.file //=> 'a.sass' + */ + + }]); + + return CssSyntaxError; +}(); + +exports.default = CssSyntaxError; +module.exports = exports['default']; + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +var escapeStringRegexp = __webpack_require__(32); + +var ansiStyles = __webpack_require__(143); + +var stripAnsi = __webpack_require__(145); + +var hasAnsi = __webpack_require__(146); + +var supportsColor = __webpack_require__(147); + +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} // use bright blue on Windows as the normal blue color is illegible + + +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = "\x1B[94m"; +} + +var styles = function () { + var ret = {}; + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + ret[key] = { + get: function get() { + return build.call(this, this._styles.concat(key)); + } + }; + }); + return ret; +}(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + + /* eslint-disable no-proto */ + + builder.__proto__ = proto; + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + + + ansiStyles.dim.open = originalDim; + return str; +} + +function init() { + var ret = {}; + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function get() { + return build.call(this, [name]); + } + }; + }); + return ret; +} + +defineProps(Chalk.prototype, init()); +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12))) + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = tokenize; +var SINGLE_QUOTE = 39; +var DOUBLE_QUOTE = 34; +var BACKSLASH = 92; +var SLASH = 47; +var NEWLINE = 10; +var SPACE = 32; +var FEED = 12; +var TAB = 9; +var CR = 13; +var OPEN_SQUARE = 91; +var CLOSE_SQUARE = 93; +var OPEN_PARENTHESES = 40; +var CLOSE_PARENTHESES = 41; +var OPEN_CURLY = 123; +var CLOSE_CURLY = 125; +var SEMICOLON = 59; +var ASTERISK = 42; +var COLON = 58; +var AT = 64; +var RE_AT_END = /[ \n\t\r\f\{\(\)'"\\;/\[\]#]/g; +var RE_WORD_END = /[ \n\t\r\f\(\)\{\}:;@!'"\\\]\[#]|\/(?=\*)/g; +var RE_BAD_BRACKET = /.[\\\/\("'\n]/; + +function tokenize(input) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var tokens = []; + var css = input.css.valueOf(); + var ignore = options.ignoreErrors; + var code = void 0, + next = void 0, + quote = void 0, + lines = void 0, + last = void 0, + content = void 0, + escape = void 0, + nextLine = void 0, + nextOffset = void 0, + escaped = void 0, + escapePos = void 0, + prev = void 0, + n = void 0; + var length = css.length; + var offset = -1; + var line = 1; + var pos = 0; + + function unclosed(what) { + throw input.error('Unclosed ' + what, line, pos - offset); + } + + while (pos < length) { + code = css.charCodeAt(pos); + + if (code === NEWLINE || code === FEED || code === CR && css.charCodeAt(pos + 1) !== NEWLINE) { + offset = pos; + line += 1; + } + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: + next = pos; + + do { + next += 1; + code = css.charCodeAt(next); + + if (code === NEWLINE) { + offset = next; + line += 1; + } + } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED); + + tokens.push(['space', css.slice(pos, next)]); + pos = next - 1; + break; + + case OPEN_SQUARE: + tokens.push(['[', '[', line, pos - offset]); + break; + + case CLOSE_SQUARE: + tokens.push([']', ']', line, pos - offset]); + break; + + case OPEN_CURLY: + tokens.push(['{', '{', line, pos - offset]); + break; + + case CLOSE_CURLY: + tokens.push(['}', '}', line, pos - offset]); + break; + + case COLON: + tokens.push([':', ':', line, pos - offset]); + break; + + case SEMICOLON: + tokens.push([';', ';', line, pos - offset]); + break; + + case OPEN_PARENTHESES: + prev = tokens.length ? tokens[tokens.length - 1][1] : ''; + n = css.charCodeAt(pos + 1); + + if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) { + next = pos; + + do { + escaped = false; + next = css.indexOf(')', next + 1); + + if (next === -1) { + if (ignore) { + next = pos; + break; + } else { + unclosed('bracket'); + } + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + tokens.push(['brackets', css.slice(pos, next + 1), line, pos - offset, line, next - offset]); + pos = next; + } else { + next = css.indexOf(')', pos + 1); + content = css.slice(pos, next + 1); + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + tokens.push(['(', '(', line, pos - offset]); + } else { + tokens.push(['brackets', content, line, pos - offset, line, next - offset]); + pos = next; + } + } + + break; + + case CLOSE_PARENTHESES: + tokens.push([')', ')', line, pos - offset]); + break; + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: + quote = code === SINGLE_QUOTE ? '\'' : '"'; + next = pos; + + do { + escaped = false; + next = css.indexOf(quote, next + 1); + + if (next === -1) { + if (ignore) { + next = pos + 1; + break; + } else { + unclosed('string'); + } + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + tokens.push(['string', css.slice(pos, next + 1), line, pos - offset, nextLine, next - nextOffset]); + offset = nextOffset; + line = nextLine; + pos = next; + break; + + case AT: + RE_AT_END.lastIndex = pos + 1; + RE_AT_END.test(css); + + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_AT_END.lastIndex - 2; + } + + tokens.push(['at-word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]); + pos = next; + break; + + case BACKSLASH: + next = pos; + escape = true; + + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1; + escape = !escape; + } + + code = css.charCodeAt(next + 1); + + if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) { + next += 1; + } + + tokens.push(['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]); + pos = next; + break; + + default: + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1; + + if (next === 0) { + if (ignore) { + next = css.length; + } else { + unclosed('comment'); + } + } + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + tokens.push(['comment', content, line, pos - offset, nextLine, next - nextOffset]); + offset = nextOffset; + line = nextLine; + pos = next; + } else { + RE_WORD_END.lastIndex = pos + 1; + RE_WORD_END.test(css); + + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_WORD_END.lastIndex - 2; + } + + tokens.push(['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]); + pos = next; + } + + break; + } + + pos++; + } + + return tokens; +} + +module.exports = exports['default']; + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* + * $Id: base64.js,v 2.15 2014/04/05 12:58:57 dankogai Exp dankogai $ + * + * Licensed under the BSD 3-Clause License. + * http://opensource.org/licenses/BSD-3-Clause + * + * References: + * http://en.wikipedia.org/wiki/Base64 + */ +(function (global) { + 'use strict'; // existing version for noConflict() + + var _Base64 = global.Base64; + var version = "2.3.2"; // if node.js, we use Buffer + + var buffer; + + if (typeof module !== 'undefined' && module.exports) { + try { + buffer = __webpack_require__(19).Buffer; + } catch (err) {} + } // constants + + + var b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + + var b64tab = function (bin) { + var t = {}; + + for (var i = 0, l = bin.length; i < l; i++) { + t[bin.charAt(i)] = i; + } + + return t; + }(b64chars); + + var fromCharCode = String.fromCharCode; // encoder stuff + + var cb_utob = function cb_utob(c) { + if (c.length < 2) { + var cc = c.charCodeAt(0); + return cc < 0x80 ? c : cc < 0x800 ? fromCharCode(0xc0 | cc >>> 6) + fromCharCode(0x80 | cc & 0x3f) : fromCharCode(0xe0 | cc >>> 12 & 0x0f) + fromCharCode(0x80 | cc >>> 6 & 0x3f) + fromCharCode(0x80 | cc & 0x3f); + } else { + var cc = 0x10000 + (c.charCodeAt(0) - 0xD800) * 0x400 + (c.charCodeAt(1) - 0xDC00); + return fromCharCode(0xf0 | cc >>> 18 & 0x07) + fromCharCode(0x80 | cc >>> 12 & 0x3f) + fromCharCode(0x80 | cc >>> 6 & 0x3f) + fromCharCode(0x80 | cc & 0x3f); + } + }; + + var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; + + var utob = function utob(u) { + return u.replace(re_utob, cb_utob); + }; + + var cb_encode = function cb_encode(ccc) { + var padlen = [0, 2, 1][ccc.length % 3], + ord = ccc.charCodeAt(0) << 16 | (ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8 | (ccc.length > 2 ? ccc.charCodeAt(2) : 0), + chars = [b64chars.charAt(ord >>> 18), b64chars.charAt(ord >>> 12 & 63), padlen >= 2 ? '=' : b64chars.charAt(ord >>> 6 & 63), padlen >= 1 ? '=' : b64chars.charAt(ord & 63)]; + return chars.join(''); + }; + + var btoa = global.btoa ? function (b) { + return global.btoa(b); + } : function (b) { + return b.replace(/[\s\S]{1,3}/g, cb_encode); + }; + + var _encode = buffer ? buffer.from && buffer.from !== Uint8Array.from ? function (u) { + return (u.constructor === buffer.constructor ? u : buffer.from(u)).toString('base64'); + } : function (u) { + return (u.constructor === buffer.constructor ? u : new buffer(u)).toString('base64'); + } : function (u) { + return btoa(utob(u)); + }; + + var encode = function encode(u, urisafe) { + return !urisafe ? _encode(String(u)) : _encode(String(u)).replace(/[+\/]/g, function (m0) { + return m0 == '+' ? '-' : '_'; + }).replace(/=/g, ''); + }; + + var encodeURI = function encodeURI(u) { + return encode(u, true); + }; // decoder stuff + + + var re_btou = new RegExp(['[\xC0-\xDF][\x80-\xBF]', '[\xE0-\xEF][\x80-\xBF]{2}', '[\xF0-\xF7][\x80-\xBF]{3}'].join('|'), 'g'); + + var cb_btou = function cb_btou(cccc) { + switch (cccc.length) { + case 4: + var cp = (0x07 & cccc.charCodeAt(0)) << 18 | (0x3f & cccc.charCodeAt(1)) << 12 | (0x3f & cccc.charCodeAt(2)) << 6 | 0x3f & cccc.charCodeAt(3), + offset = cp - 0x10000; + return fromCharCode((offset >>> 10) + 0xD800) + fromCharCode((offset & 0x3FF) + 0xDC00); + + case 3: + return fromCharCode((0x0f & cccc.charCodeAt(0)) << 12 | (0x3f & cccc.charCodeAt(1)) << 6 | 0x3f & cccc.charCodeAt(2)); + + default: + return fromCharCode((0x1f & cccc.charCodeAt(0)) << 6 | 0x3f & cccc.charCodeAt(1)); + } + }; + + var btou = function btou(b) { + return b.replace(re_btou, cb_btou); + }; + + var cb_decode = function cb_decode(cccc) { + var len = cccc.length, + padlen = len % 4, + n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) | (len > 3 ? b64tab[cccc.charAt(3)] : 0), + chars = [fromCharCode(n >>> 16), fromCharCode(n >>> 8 & 0xff), fromCharCode(n & 0xff)]; + chars.length -= [0, 0, 2, 1][padlen]; + return chars.join(''); + }; + + var atob = global.atob ? function (a) { + return global.atob(a); + } : function (a) { + return a.replace(/[\s\S]{1,4}/g, cb_decode); + }; + + var _decode = buffer ? buffer.from && buffer.from !== Uint8Array.from ? function (a) { + return (a.constructor === buffer.constructor ? a : buffer.from(a, 'base64')).toString(); + } : function (a) { + return (a.constructor === buffer.constructor ? a : new buffer(a, 'base64')).toString(); + } : function (a) { + return btou(atob(a)); + }; + + var decode = function decode(a) { + return _decode(String(a).replace(/[-_]/g, function (m0) { + return m0 == '-' ? '+' : '/'; + }).replace(/[^A-Za-z0-9\+\/]/g, '')); + }; + + var noConflict = function noConflict() { + var Base64 = global.Base64; + global.Base64 = _Base64; + return Base64; + }; // export Base64 + + + global.Base64 = { + VERSION: version, + atob: atob, + btoa: btoa, + fromBase64: decode, + toBase64: encode, + utob: utob, + encode: encode, + encodeURI: encodeURI, + btou: btou, + decode: decode, + noConflict: noConflict + }; // if ES5 is available, make Base64.extendString() available + + if (typeof Object.defineProperty === 'function') { + var noEnum = function noEnum(v) { + return { + value: v, + enumerable: false, + writable: true, + configurable: true + }; + }; + + global.Base64.extendString = function () { + Object.defineProperty(String.prototype, 'fromBase64', noEnum(function () { + return decode(this); + })); + Object.defineProperty(String.prototype, 'toBase64', noEnum(function (urisafe) { + return encode(this, urisafe); + })); + Object.defineProperty(String.prototype, 'toBase64URI', noEnum(function () { + return encode(this, true); + })); + }; + } // + // export Base64 to the namespace + // + + + if (global['Meteor']) { + // Meteor.js + Base64 = global.Base64; + } // module.exports and AMD are mutually exclusive. + // module.exports has precedence. + + + if (typeof module !== 'undefined' && module.exports) { + module.exports.Base64 = global.Base64; + } else if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return global.Base64; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } // that's it! + +})(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : this); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15))) + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = __webpack_require__(83).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(152).SourceMapConsumer; +exports.SourceNode = __webpack_require__(155).SourceNode; + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var base64VLQ = __webpack_require__(84); + +var util = __webpack_require__(9); + +var ArraySet = __webpack_require__(85).ArraySet; + +var MappingList = __webpack_require__(151).MappingList; +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + + +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + +SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; +}; +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + + +SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); +}; +/** + * Set the source content for a source file. + */ + + +SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } +}; +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + + +SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; // If aSourceFile is omitted, we will use the file property of the SourceMap + + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.'); + } + + sourceFile = aSourceMapConsumer.file; + } + + var sourceRoot = this._sourceRoot; // Make "sourceFile" relative if an absolute Url is passed. + + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } // Applying the SourceMap can add and remove items from the sources and + // the names array. + + + var newSources = new ArraySet(); + var newNames = new ArraySet(); // Find mappings for the "sourceFile" + + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + }, this); + + this._sources = newSources; + this._names = newNames; // Copy sourcesContents of applied map. + + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + + this.setSourceContent(sourceFile, content); + } + }, this); +}; +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + + +SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { + // Cases 2 and 3. + return; + } else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } +}; +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + + +SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; // lines are stored 0-based in SourceMap spec version 3 + + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; +}; + +SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; + }, this); +}; +/** + * Externalize the source map. + */ + + +SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + + if (this._file != null) { + map.file = this._file; + } + + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; +}; +/** + * Render the source map being generated to a string. + */ + + +SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); +}; + +exports.SourceMapGenerator = SourceMapGenerator; + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +var base64 = __webpack_require__(150); // A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + + +var VLQ_BASE_SHIFT = 5; // binary: 100000 + +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; // binary: 011111 + +var VLQ_BASE_MASK = VLQ_BASE - 1; // binary: 100000 + +var VLQ_CONTINUATION_BIT = VLQ_BASE; +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + +function toVLQSigned(aValue) { + return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; +} +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + + +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative ? -shifted : shifted; +} +/** + * Returns the base 64 VLQ encoded value. + */ + + +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + + +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var util = __webpack_require__(9); + +var has = Object.prototype.hasOwnProperty; +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + +function ArraySet() { + this._array = []; + this._set = Object.create(null); +} +/** + * Static method for creating ArraySet instances from an existing array. + */ + + +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + + return set; +}; +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + + +ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; +}; +/** + * Add the given string to this set. + * + * @param String aStr + */ + + +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = util.toSetString(aStr); + var isDuplicate = has.call(this._set, sStr); + var idx = this._array.length; + + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + + if (!isDuplicate) { + this._set[sStr] = idx; + } +}; +/** + * Is the given string a member of this set? + * + * @param String aStr + */ + + +ArraySet.prototype.has = function ArraySet_has(aStr) { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); +}; +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ + + +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + var sStr = util.toSetString(aStr); + + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; +/** + * What is the element at the given index? + * + * @param Number aIdx + */ + + +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + + throw new Error('No element indexed by ' + aIdx); +}; +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + + +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = stringify; + +var _stringifier = __webpack_require__(27); + +var _stringifier2 = _interopRequireDefault(_stringifier); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function stringify(node, builder) { + var str = new _stringifier2.default(builder); + str.stringify(node); +} + +module.exports = exports['default']; + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _node = __webpack_require__(25); + +var _node2 = _interopRequireDefault(_node); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} +/** + * Represents a CSS declaration. + * + * @extends Node + * + * @example + * const root = postcss.parse('a { color: black }'); + * const decl = root.first.first; + * decl.type //=> 'decl' + * decl.toString() //=> ' color: black' + */ + + +var Declaration = function (_Node) { + _inherits(Declaration, _Node); + + function Declaration(defaults) { + _classCallCheck(this, Declaration); + + var _this = _possibleConstructorReturn(this, _Node.call(this, defaults)); + + _this.type = 'decl'; + return _this; + } + + _createClass(Declaration, [{ + key: '_value', + get: function get() { + (0, _warnOnce2.default)('Node#_value was deprecated. Use Node#raws.value'); + return this.raws.value; + }, + set: function set(val) { + (0, _warnOnce2.default)('Node#_value was deprecated. Use Node#raws.value'); + this.raws.value = val; + } + }, { + key: '_important', + get: function get() { + (0, _warnOnce2.default)('Node#_important was deprecated. Use Node#raws.important'); + return this.raws.important; + }, + set: function set(val) { + (0, _warnOnce2.default)('Node#_important was deprecated. Use Node#raws.important'); + this.raws.important = val; + } + /** + * @memberof Declaration# + * @member {string} prop - the declaration’s property name + * + * @example + * const root = postcss.parse('a { color: black }'); + * const decl = root.first.first; + * decl.prop //=> 'color' + */ + + /** + * @memberof Declaration# + * @member {string} value - the declaration’s value + * + * @example + * const root = postcss.parse('a { color: black }'); + * const decl = root.first.first; + * decl.value //=> 'black' + */ + + /** + * @memberof Declaration# + * @member {boolean} important - `true` if the declaration + * has an !important annotation. + * + * @example + * const root = postcss.parse('a { color: black !important; color: red }'); + * root.first.first.important //=> true + * root.first.last.important //=> undefined + */ + + /** + * @memberof Declaration# + * @member {object} raws - Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `between`: the symbols between the property and value + * for declarations. + * * `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS cleans declaration from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + */ + + }]); + + return Declaration; +}(_node2.default); + +exports.default = Declaration; +module.exports = exports['default']; + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = parse; + +var _parser = __webpack_require__(89); + +var _parser2 = _interopRequireDefault(_parser); + +var _input = __webpack_require__(26); + +var _input2 = _interopRequireDefault(_input); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function parse(css, opts) { + if (opts && opts.safe) { + throw new Error('Option safe was removed. ' + 'Use parser: require("postcss-safe-parser")'); + } + + var input = new _input2.default(css, opts); + var parser = new _parser2.default(input); + + try { + parser.tokenize(); + parser.loop(); + } catch (e) { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += '\nYou tried to parse SCSS with ' + 'the standard CSS parser; ' + 'try again with the postcss-scss parser'; + } else if (/\.sass/i.test(opts.from)) { + e.message += '\nYou tried to parse Sass with ' + 'the standard CSS parser; ' + 'try again with the postcss-sass parser'; + } else if (/\.less$/i.test(opts.from)) { + e.message += '\nYou tried to parse Less with ' + 'the standard CSS parser; ' + 'try again with the postcss-less parser'; + } + } + + throw e; + } + + return parser.root; +} + +module.exports = exports['default']; + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _declaration = __webpack_require__(87); + +var _declaration2 = _interopRequireDefault(_declaration); + +var _tokenize = __webpack_require__(80); + +var _tokenize2 = _interopRequireDefault(_tokenize); + +var _comment = __webpack_require__(24); + +var _comment2 = _interopRequireDefault(_comment); + +var _atRule = __webpack_require__(29); + +var _atRule2 = _interopRequireDefault(_atRule); + +var _root = __webpack_require__(30); + +var _root2 = _interopRequireDefault(_root); + +var _rule = __webpack_require__(10); + +var _rule2 = _interopRequireDefault(_rule); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var Parser = function () { + function Parser(input) { + _classCallCheck(this, Parser); + + this.input = input; + this.pos = 0; + this.root = new _root2.default(); + this.current = this.root; + this.spaces = ''; + this.semicolon = false; + this.root.source = { + input: input, + start: { + line: 1, + column: 1 + } + }; + } + + Parser.prototype.tokenize = function tokenize() { + this.tokens = (0, _tokenize2.default)(this.input); + }; + + Parser.prototype.loop = function loop() { + var token = void 0; + + while (this.pos < this.tokens.length) { + token = this.tokens[this.pos]; + + switch (token[0]) { + case 'space': + case ';': + this.spaces += token[1]; + break; + + case '}': + this.end(token); + break; + + case 'comment': + this.comment(token); + break; + + case 'at-word': + this.atrule(token); + break; + + case '{': + this.emptyRule(token); + break; + + default: + this.other(); + break; + } + + this.pos += 1; + } + + this.endFile(); + }; + + Parser.prototype.comment = function comment(token) { + var node = new _comment2.default(); + this.init(node, token[2], token[3]); + node.source.end = { + line: token[4], + column: token[5] + }; + var text = token[1].slice(2, -2); + + if (/^\s*$/.test(text)) { + node.text = ''; + node.raws.left = text; + node.raws.right = ''; + } else { + var match = text.match(/^(\s*)([^]*[^\s])(\s*)$/); + node.text = match[2]; + node.raws.left = match[1]; + node.raws.right = match[3]; + } + }; + + Parser.prototype.emptyRule = function emptyRule(token) { + var node = new _rule2.default(); + this.init(node, token[2], token[3]); + node.selector = ''; + node.raws.between = ''; + this.current = node; + }; + + Parser.prototype.other = function other() { + var token = void 0; + var end = false; + var type = null; + var colon = false; + var bracket = null; + var brackets = []; + var start = this.pos; + + while (this.pos < this.tokens.length) { + token = this.tokens[this.pos]; + type = token[0]; + + if (type === '(' || type === '[') { + if (!bracket) bracket = token; + brackets.push(type === '(' ? ')' : ']'); + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(this.tokens.slice(start, this.pos + 1)); + return; + } else { + break; + } + } else if (type === '{') { + this.rule(this.tokens.slice(start, this.pos + 1)); + return; + } else if (type === '}') { + this.pos -= 1; + end = true; + break; + } else if (type === ':') { + colon = true; + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + if (brackets.length === 0) bracket = null; + } + + this.pos += 1; + } + + if (this.pos === this.tokens.length) { + this.pos -= 1; + end = true; + } + + if (brackets.length > 0) this.unclosedBracket(bracket); + + if (end && colon) { + while (this.pos > start) { + token = this.tokens[this.pos][0]; + if (token !== 'space' && token !== 'comment') break; + this.pos -= 1; + } + + this.decl(this.tokens.slice(start, this.pos + 1)); + return; + } + + this.unknownWord(start); + }; + + Parser.prototype.rule = function rule(tokens) { + tokens.pop(); + var node = new _rule2.default(); + this.init(node, tokens[0][2], tokens[0][3]); + node.raws.between = this.spacesAndCommentsFromEnd(tokens); + this.raw(node, 'selector', tokens); + this.current = node; + }; + + Parser.prototype.decl = function decl(tokens) { + var node = new _declaration2.default(); + this.init(node); + var last = tokens[tokens.length - 1]; + + if (last[0] === ';') { + this.semicolon = true; + tokens.pop(); + } + + if (last[4]) { + node.source.end = { + line: last[4], + column: last[5] + }; + } else { + node.source.end = { + line: last[2], + column: last[3] + }; + } + + while (tokens[0][0] !== 'word') { + node.raws.before += tokens.shift()[1]; + } + + node.source.start = { + line: tokens[0][2], + column: tokens[0][3] + }; + node.prop = ''; + + while (tokens.length) { + var type = tokens[0][0]; + + if (type === ':' || type === 'space' || type === 'comment') { + break; + } + + node.prop += tokens.shift()[1]; + } + + node.raws.between = ''; + var token = void 0; + + while (tokens.length) { + token = tokens.shift(); + + if (token[0] === ':') { + node.raws.between += token[1]; + break; + } else { + node.raws.between += token[1]; + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0]; + node.prop = node.prop.slice(1); + } + + node.raws.between += this.spacesAndCommentsFromStart(tokens); + this.precheckMissedSemicolon(tokens); + + for (var i = tokens.length - 1; i > 0; i--) { + token = tokens[i]; + + if (token[1] === '!important') { + node.important = true; + var string = this.stringFrom(tokens, i); + string = this.spacesFromEnd(tokens) + string; + if (string !== ' !important') node.raws.important = string; + break; + } else if (token[1] === 'important') { + var cache = tokens.slice(0); + var str = ''; + + for (var j = i; j > 0; j--) { + var _type = cache[j][0]; + + if (str.trim().indexOf('!') === 0 && _type !== 'space') { + break; + } + + str = cache.pop()[1] + str; + } + + if (str.trim().indexOf('!') === 0) { + node.important = true; + node.raws.important = str; + tokens = cache; + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break; + } + } + + this.raw(node, 'value', tokens); + if (node.value.indexOf(':') !== -1) this.checkMissedSemicolon(tokens); + }; + + Parser.prototype.atrule = function atrule(token) { + var node = new _atRule2.default(); + node.name = token[1].slice(1); + + if (node.name === '') { + this.unnamedAtrule(node, token); + } + + this.init(node, token[2], token[3]); + var last = false; + var open = false; + var params = []; + this.pos += 1; + + while (this.pos < this.tokens.length) { + token = this.tokens[this.pos]; + + if (token[0] === ';') { + node.source.end = { + line: token[2], + column: token[3] + }; + this.semicolon = true; + break; + } else if (token[0] === '{') { + open = true; + break; + } else if (token[0] === '}') { + this.end(token); + break; + } else { + params.push(token); + } + + this.pos += 1; + } + + if (this.pos === this.tokens.length) { + last = true; + } + + node.raws.between = this.spacesAndCommentsFromEnd(params); + + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params); + this.raw(node, 'params', params); + + if (last) { + token = params[params.length - 1]; + node.source.end = { + line: token[4], + column: token[5] + }; + this.spaces = node.raws.between; + node.raws.between = ''; + } + } else { + node.raws.afterName = ''; + node.params = ''; + } + + if (open) { + node.nodes = []; + this.current = node; + } + }; + + Parser.prototype.end = function end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + + this.semicolon = false; + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.spaces = ''; + + if (this.current.parent) { + this.current.source.end = { + line: token[2], + column: token[3] + }; + this.current = this.current.parent; + } else { + this.unexpectedClose(token); + } + }; + + Parser.prototype.endFile = function endFile() { + if (this.current.parent) this.unclosedBlock(); + + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + }; // Helpers + + + Parser.prototype.init = function init(node, line, column) { + this.current.push(node); + node.source = { + start: { + line: line, + column: column + }, + input: this.input + }; + node.raws.before = this.spaces; + this.spaces = ''; + if (node.type !== 'comment') this.semicolon = false; + }; + + Parser.prototype.raw = function raw(node, prop, tokens) { + var token = void 0, + type = void 0; + var length = tokens.length; + var value = ''; + var clean = true; + + for (var i = 0; i < length; i += 1) { + token = tokens[i]; + type = token[0]; + + if (type === 'comment' || type === 'space' && i === length - 1) { + clean = false; + } else { + value += token[1]; + } + } + + if (!clean) { + var raw = tokens.reduce(function (all, i) { + return all + i[1]; + }, ''); + node.raws[prop] = { + value: value, + raw: raw + }; + } + + node[prop] = value; + }; + + Parser.prototype.spacesAndCommentsFromEnd = function spacesAndCommentsFromEnd(tokens) { + var lastTokenType = void 0; + var spaces = ''; + + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break; + spaces = tokens.pop()[1] + spaces; + } + + return spaces; + }; + + Parser.prototype.spacesAndCommentsFromStart = function spacesAndCommentsFromStart(tokens) { + var next = void 0; + var spaces = ''; + + while (tokens.length) { + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break; + spaces += tokens.shift()[1]; + } + + return spaces; + }; + + Parser.prototype.spacesFromEnd = function spacesFromEnd(tokens) { + var lastTokenType = void 0; + var spaces = ''; + + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space') break; + spaces = tokens.pop()[1] + spaces; + } + + return spaces; + }; + + Parser.prototype.stringFrom = function stringFrom(tokens, from) { + var result = ''; + + for (var i = from; i < tokens.length; i++) { + result += tokens[i][1]; + } + + tokens.splice(from, tokens.length - from); + return result; + }; + + Parser.prototype.colon = function colon(tokens) { + var brackets = 0; + var token = void 0, + type = void 0, + prev = void 0; + + for (var i = 0; i < tokens.length; i++) { + token = tokens[i]; + type = token[0]; + + if (type === '(') { + brackets += 1; + } else if (type === ')') { + brackets -= 1; + } else if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token); + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue; + } else { + return i; + } + } + + prev = token; + } + + return false; + }; // Errors + + + Parser.prototype.unclosedBracket = function unclosedBracket(bracket) { + throw this.input.error('Unclosed bracket', bracket[2], bracket[3]); + }; + + Parser.prototype.unknownWord = function unknownWord(start) { + var token = this.tokens[start]; + throw this.input.error('Unknown word', token[2], token[3]); + }; + + Parser.prototype.unexpectedClose = function unexpectedClose(token) { + throw this.input.error('Unexpected }', token[2], token[3]); + }; + + Parser.prototype.unclosedBlock = function unclosedBlock() { + var pos = this.current.source.start; + throw this.input.error('Unclosed block', pos.line, pos.column); + }; + + Parser.prototype.doubleColon = function doubleColon(token) { + throw this.input.error('Double colon', token[2], token[3]); + }; + + Parser.prototype.unnamedAtrule = function unnamedAtrule(node, token) { + throw this.input.error('At-rule without name', token[2], token[3]); + }; + + Parser.prototype.precheckMissedSemicolon = function precheckMissedSemicolon(tokens) { + // Hook for Safe Parser + tokens; + }; + + Parser.prototype.checkMissedSemicolon = function checkMissedSemicolon(tokens) { + var colon = this.colon(tokens); + if (colon === false) return; + var founded = 0; + var token = void 0; + + for (var j = colon - 1; j >= 0; j--) { + token = tokens[j]; + + if (token[0] !== 'space') { + founded += 1; + if (founded === 2) break; + } + } + + throw this.input.error('Missed semicolon', token[2], token[3]); + }; + + return Parser; +}(); + +exports.default = Parser; +module.exports = exports['default']; + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _mapGenerator = __webpack_require__(158); + +var _mapGenerator2 = _interopRequireDefault(_mapGenerator); + +var _stringify2 = __webpack_require__(86); + +var _stringify3 = _interopRequireDefault(_stringify2); + +var _warnOnce = __webpack_require__(4); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _result = __webpack_require__(159); + +var _result2 = _interopRequireDefault(_result); + +var _parse = __webpack_require__(88); + +var _parse2 = _interopRequireDefault(_parse); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function isPromise(obj) { + return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && typeof obj.then === 'function'; +} +/** + * A Promise proxy for the result of PostCSS transformations. + * + * A `LazyResult` instance is returned by {@link Processor#process}. + * + * @example + * const lazy = postcss([cssnext]).process(css); + */ + + +var LazyResult = function () { + function LazyResult(processor, css, opts) { + _classCallCheck(this, LazyResult); + + this.stringified = false; + this.processed = false; + var root = void 0; + + if ((typeof css === 'undefined' ? 'undefined' : _typeof(css)) === 'object' && css.type === 'root') { + root = css; + } else if (css instanceof LazyResult || css instanceof _result2.default) { + root = css.root; + + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {}; + if (!opts.map.inline) opts.map.inline = false; + opts.map.prev = css.map; + } + } else { + var parser = _parse2.default; + if (opts.syntax) parser = opts.syntax.parse; + if (opts.parser) parser = opts.parser; + if (parser.parse) parser = parser.parse; + + try { + root = parser(css, opts); + } catch (error) { + this.error = error; + } + } + + this.result = new _result2.default(processor, root, opts); + } + /** + * Returns a {@link Processor} instance, which will be used + * for CSS transformations. + * @type {Processor} + */ + + /** + * Processes input CSS through synchronous plugins + * and calls {@link Result#warnings()}. + * + * @return {Warning[]} warnings from plugins + */ + + + LazyResult.prototype.warnings = function warnings() { + return this.sync().warnings(); + }; + /** + * Alias for the {@link LazyResult#css} property. + * + * @example + * lazy + '' === lazy.css; + * + * @return {string} output CSS + */ + + + LazyResult.prototype.toString = function toString() { + return this.css; + }; + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls `onFulfilled` with a Result instance. If a plugin throws + * an error, the `onRejected` callback will be executed. + * + * It implements standard Promise API. + * + * @param {onFulfilled} onFulfilled - callback will be executed + * when all plugins will finish work + * @param {onRejected} onRejected - callback will be executed on any error + * + * @return {Promise} Promise API to make queue + * + * @example + * postcss([cssnext]).process(css).then(result => { + * console.log(result.css); + * }); + */ + + + LazyResult.prototype.then = function then(onFulfilled, onRejected) { + return this.async().then(onFulfilled, onRejected); + }; + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onRejected for each error thrown in any plugin. + * + * It implements standard Promise API. + * + * @param {onRejected} onRejected - callback will be executed on any error + * + * @return {Promise} Promise API to make queue + * + * @example + * postcss([cssnext]).process(css).then(result => { + * console.log(result.css); + * }).catch(error => { + * console.error(error); + * }); + */ + + + LazyResult.prototype.catch = function _catch(onRejected) { + return this.async().catch(onRejected); + }; + + LazyResult.prototype.handleError = function handleError(error, plugin) { + try { + this.error = error; + + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin; + error.setMessage(); + } else if (plugin.postcssVersion) { + var pluginName = plugin.postcssPlugin; + var pluginVer = plugin.postcssVersion; + var runtimeVer = this.result.processor.version; + var a = pluginVer.split('.'); + var b = runtimeVer.split('.'); + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + (0, _warnOnce2.default)('Your current PostCSS version ' + 'is ' + runtimeVer + ', but ' + pluginName + ' ' + 'uses ' + pluginVer + '. Perhaps this is ' + 'the source of the error below.'); + } + } + } catch (err) { + if (console && console.error) console.error(err); + } + }; + + LazyResult.prototype.asyncTick = function asyncTick(resolve, reject) { + var _this = this; + + if (this.plugin >= this.processor.plugins.length) { + this.processed = true; + return resolve(); + } + + try { + var plugin = this.processor.plugins[this.plugin]; + var promise = this.run(plugin); + this.plugin += 1; + + if (isPromise(promise)) { + promise.then(function () { + _this.asyncTick(resolve, reject); + }).catch(function (error) { + _this.handleError(error, plugin); + + _this.processed = true; + reject(error); + }); + } else { + this.asyncTick(resolve, reject); + } + } catch (error) { + this.processed = true; + reject(error); + } + }; + + LazyResult.prototype.async = function async() { + var _this2 = this; + + if (this.processed) { + return new Promise(function (resolve, reject) { + if (_this2.error) { + reject(_this2.error); + } else { + resolve(_this2.stringify()); + } + }); + } + + if (this.processing) { + return this.processing; + } + + this.processing = new Promise(function (resolve, reject) { + if (_this2.error) return reject(_this2.error); + _this2.plugin = 0; + + _this2.asyncTick(resolve, reject); + }).then(function () { + _this2.processed = true; + return _this2.stringify(); + }); + return this.processing; + }; + + LazyResult.prototype.sync = function sync() { + if (this.processed) return this.result; + this.processed = true; + + if (this.processing) { + throw new Error('Use process(css).then(cb) to work with async plugins'); + } + + if (this.error) throw this.error; + + for (var _iterator = this.result.processor.plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var plugin = _ref; + var promise = this.run(plugin); + + if (isPromise(promise)) { + throw new Error('Use process(css).then(cb) to work with async plugins'); + } + } + + return this.result; + }; + + LazyResult.prototype.run = function run(plugin) { + this.result.lastPlugin = plugin; + + try { + return plugin(this.result.root, this.result); + } catch (error) { + this.handleError(error, plugin); + throw error; + } + }; + + LazyResult.prototype.stringify = function stringify() { + if (this.stringified) return this.result; + this.stringified = true; + this.sync(); + var opts = this.result.opts; + var str = _stringify3.default; + if (opts.syntax) str = opts.syntax.stringify; + if (opts.stringifier) str = opts.stringifier; + if (str.stringify) str = str.stringify; + var map = new _mapGenerator2.default(str, this.result.root, this.result.opts); + var data = map.generate(); + this.result.css = data[0]; + this.result.map = data[1]; + return this.result; + }; + + _createClass(LazyResult, [{ + key: 'processor', + get: function get() { + return this.result.processor; + } + /** + * Options from the {@link Processor#process} call. + * @type {processOptions} + */ + + }, { + key: 'opts', + get: function get() { + return this.result.opts; + } + /** + * Processes input CSS through synchronous plugins, converts `Root` + * to a CSS string and returns {@link Result#css}. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {string} + * @see Result#css + */ + + }, { + key: 'css', + get: function get() { + return this.stringify().css; + } + /** + * An alias for the `css` property. Use it with syntaxes + * that generate non-CSS output. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {string} + * @see Result#content + */ + + }, { + key: 'content', + get: function get() { + return this.stringify().content; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#map}. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {SourceMapGenerator} + * @see Result#map + */ + + }, { + key: 'map', + get: function get() { + return this.stringify().map; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#root}. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * This is why this method is only for debug purpose, + * you should always use {@link LazyResult#then}. + * + * @type {Root} + * @see Result#root + */ + + }, { + key: 'root', + get: function get() { + return this.sync().root; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#messages}. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * This is why this method is only for debug purpose, + * you should always use {@link LazyResult#then}. + * + * @type {Message[]} + * @see Result#messages + */ + + }, { + key: 'messages', + get: function get() { + return this.sync().messages; + } + }]); + + return LazyResult; +}(); + +exports.default = LazyResult; +/** + * @callback onFulfilled + * @param {Result} result + */ + +/** + * @callback onRejected + * @param {Error} error + */ + +module.exports = exports['default']; + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var createError = __webpack_require__(92); + +var parseFrontMatter = __webpack_require__(31); + +var lineColumnToIndex = __webpack_require__(93); + +var _require = __webpack_require__(94), + hasPragma = _require.hasPragma; // utils + + +var utils = __webpack_require__(99); + +var isSCSS = utils.isSCSS; +var isSCSSNestedPropertyNode = utils.isSCSSNestedPropertyNode; + +function parseValueNodes(nodes) { + var parenGroup = { + open: null, + close: null, + groups: [], + type: "paren_group" + }; + var parenGroupStack = [parenGroup]; + var rootParenGroup = parenGroup; + var commaGroup = { + groups: [], + type: "comma_group" + }; + var commaGroupStack = [commaGroup]; + + for (var i = 0; i < nodes.length; ++i) { + var node = nodes[i]; + var isUnquotedDataURLCall = node.type === "func" && node.value === "url" && node.group && node.group.groups && node.group.groups[0] && node.group.groups[0].groups && node.group.groups[0].groups.length > 2 && node.group.groups[0].groups[0].type === "word" && node.group.groups[0].groups[0].value === "data" && node.group.groups[0].groups[1].type === "colon" && node.group.groups[0].groups[1].value === ":"; + + if (isUnquotedDataURLCall) { + node.group.groups = [stringifyGroup(node)]; + } + + if (node.type === "paren" && node.value === "(") { + parenGroup = { + open: node, + close: null, + groups: [], + type: "paren_group" + }; + parenGroupStack.push(parenGroup); + commaGroup = { + groups: [], + type: "comma_group" + }; + commaGroupStack.push(commaGroup); + } else if (node.type === "paren" && node.value === ")") { + if (commaGroup.groups.length) { + parenGroup.groups.push(commaGroup); + } + + parenGroup.close = node; + + if (commaGroupStack.length === 1) { + throw new Error("Unbalanced parenthesis"); + } + + commaGroupStack.pop(); + commaGroup = commaGroupStack[commaGroupStack.length - 1]; + commaGroup.groups.push(parenGroup); + parenGroupStack.pop(); + parenGroup = parenGroupStack[parenGroupStack.length - 1]; + } else if (node.type === "comma") { + parenGroup.groups.push(commaGroup); + commaGroup = { + groups: [], + type: "comma_group" + }; + commaGroupStack[commaGroupStack.length - 1] = commaGroup; + } else { + commaGroup.groups.push(node); + } + } + + if (commaGroup.groups.length > 0) { + parenGroup.groups.push(commaGroup); + } + + return rootParenGroup; +} + +function stringifyGroup(node) { + if (node.group) { + return stringifyGroup(node.group); + } + + if (node.groups) { + return node.groups.reduce(function (previousValue, currentValue, index) { + return previousValue + stringifyGroup(currentValue) + (currentValue.type === "comma_group" && index !== node.groups.length - 1 ? "," : ""); + }, ""); + } + + var before = node.raws && node.raws.before ? node.raws.before : ""; + var value = node.value ? node.value : ""; + var unit = node.unit ? node.unit : ""; + var after = node.raws && node.raws.after ? node.raws.after : ""; + return before + value + unit + after; +} + +function flattenGroups(node) { + if (node.type === "paren_group" && !node.open && !node.close && node.groups.length === 1) { + return flattenGroups(node.groups[0]); + } + + if (node.type === "comma_group" && node.groups.length === 1) { + return flattenGroups(node.groups[0]); + } + + if (node.type === "paren_group" || node.type === "comma_group") { + return Object.assign({}, node, { + groups: node.groups.map(flattenGroups) + }); + } + + return node; +} + +function addTypePrefix(node, prefix) { + if (node && _typeof(node) === "object") { + delete node.parent; + + for (var key in node) { + addTypePrefix(node[key], prefix); + + if (key === "type" && typeof node[key] === "string") { + if (!node[key].startsWith(prefix)) { + node[key] = prefix + node[key]; + } + } + } + } + + return node; +} + +function addMissingType(node) { + if (node && _typeof(node) === "object") { + delete node.parent; + + for (var key in node) { + addMissingType(node[key]); + } + + if (!Array.isArray(node) && node.value && !node.type) { + node.type = "unknown"; + } + } + + return node; +} + +function parseNestedValue(node) { + if (node && _typeof(node) === "object") { + delete node.parent; + + for (var key in node) { + parseNestedValue(node[key]); + + if (key === "nodes") { + node.group = flattenGroups(parseValueNodes(node[key])); + delete node[key]; + } + } + } + + return node; +} + +function parseValue(value) { + var valueParser = __webpack_require__(101); + + var result = null; + + try { + result = valueParser(value, { + loose: true + }).parse(); + } catch (e) { + return { + type: "value-unknown", + value: value + }; + } + + var parsedResult = parseNestedValue(result); + return addTypePrefix(parsedResult, "value-"); +} + +function parseSelector(selector) { + // If there's a comment inside of a selector, the parser tries to parse + // the content of the comment as selectors which turns it into complete + // garbage. Better to print the whole selector as-is and not try to parse + // and reformat it. + if (selector.match(/\/\/|\/\*/)) { + return { + type: "selector-unknown", + value: selector.replace(/^ +/, "").replace(/ +$/, "") + }; + } + + var selectorParser = __webpack_require__(110); + + var result = null; + + try { + selectorParser(function (result_) { + result = result_; + }).process(selector); + } catch (e) { + // Fail silently. It's better to print it as is than to try and parse it + // Note: A common failure is for SCSS nested properties. `background: + // none { color: red; }` is parsed as a NestedDeclaration by + // postcss-scss, while `background: { color: red; }` is parsed as a Rule + // with a selector ending with a colon. See: + // https://github.com/postcss/postcss-scss/issues/39 + return { + type: "selector-unknown", + value: selector + }; + } + + return addTypePrefix(result, "selector-"); +} + +function parseMediaQuery(params) { + var mediaParser = __webpack_require__(115).default; + + var result = null; + + try { + result = mediaParser(params); + } catch (e) { + // Ignore bad media queries + return { + type: "selector-unknown", + value: params + }; + } + + return addTypePrefix(addMissingType(result), "media-"); +} + +var DEFAULT_SCSS_DIRECTIVE = /(\s*?)(!default).*$/; +var GLOBAL_SCSS_DIRECTIVE = /(\s*?)(!global).*$/; + +function parseNestedCSS(node) { + if (node && _typeof(node) === "object") { + delete node.parent; + + for (var key in node) { + parseNestedCSS(node[key]); + } + + if (!node.type) { + return node; + } + + if (!node.raws) { + node.raws = {}; + } + + var selector = ""; + + if (typeof node.selector === "string") { + selector = node.raws.selector ? node.raws.selector.scss ? node.raws.selector.scss : node.raws.selector.raw : node.selector; + + if (node.raws.between && node.raws.between.trim().length > 0) { + selector += node.raws.between; + } + + node.raws.selector = selector; + } + + var value = ""; + + if (typeof node.value === "string") { + value = node.raws.value ? node.raws.value.scss ? node.raws.value.scss : node.raws.value.raw : node.value; + value = value.trim(); + node.raws.value = selector; + } + + var params = ""; + + if (typeof node.params === "string") { + params = node.raws.params ? node.raws.params.scss ? node.raws.params.scss : node.raws.params.raw : node.params; + + if (node.raws.afterName && node.raws.afterName.trim().length > 0) { + params = node.raws.afterName + params; + } + + if (node.raws.between && node.raws.between.trim().length > 0) { + params = params + node.raws.between; + } + + params = params.trim(); + node.raws.params = params; + } // Ignore LESS mixin declaration + + + if (selector.trim().length > 0) { + if (selector.startsWith("@") && selector.endsWith(":")) { + return node; + } // Ignore LESS mixins + + + if (node.mixin) { + node.selector = parseValue(selector); + return node; + } // Check on SCSS nested property + + + if (isSCSSNestedPropertyNode(node)) { + node.isSCSSNesterProperty = true; + } + + node.selector = parseSelector(selector); + return node; + } + + if (value.length > 0) { + var defaultSCSSDirectiveIndex = value.match(DEFAULT_SCSS_DIRECTIVE); + + if (defaultSCSSDirectiveIndex) { + value = value.substring(0, defaultSCSSDirectiveIndex.index); + node.scssDefault = true; + + if (defaultSCSSDirectiveIndex[0].trim() !== "!default") { + node.raws.scssDefault = defaultSCSSDirectiveIndex[0]; + } + } + + var globalSCSSDirectiveIndex = value.match(GLOBAL_SCSS_DIRECTIVE); + + if (globalSCSSDirectiveIndex) { + value = value.substring(0, globalSCSSDirectiveIndex.index); + node.scssGlobal = true; + + if (globalSCSSDirectiveIndex[0].trim() !== "!global") { + node.raws.scssGlobal = globalSCSSDirectiveIndex[0]; + } + } + + if (value.startsWith("progid:")) { + return { + type: "value-unknown", + value: value + }; + } + + node.value = parseValue(value); + } + + if (node.type === "css-atrule" && params.length > 0) { + var name = node.name; + var lowercasedName = node.name.toLowerCase(); + + if (name === "warn" || name === "error") { + node.params = { + type: "media-unknown", + value: params + }; + return node; + } + + if (name === "extend" || name === "nest") { + node.selector = parseSelector(params); + delete node.params; + return node; + } + + if (name === "at-root") { + if (/^\(\s*(without|with)\s*:[\s\S]+\)$/.test(params)) { + node.params = parseValue(params); + } else { + node.selector = parseSelector(params); + delete node.params; + } + + return node; + } + + if (lowercasedName === "import") { + node.params = parseValue(params); + return node; + } + + if (["namespace", "supports", "if", "else", "for", "each", "while", "debug", "mixin", "include", "function", "return", "define-mixin", "add-mixin"].indexOf(name) !== -1) { + // Remove unnecessary spaces in SCSS variable arguments + params = params.replace(/(\$\S+?)\s+?\.\.\./, "$1..."); // Remove unnecessary spaces before SCSS control, mixin and function directives + + params = params.replace(/^(?!if)(\S+)\s+\(/, "$1("); + node.value = parseValue(params); + delete node.params; + return node; + } + + if (name === "custom-selector") { + var customSelector = params.match(/:--\S+?\s+/)[0].trim(); + node.customSelector = customSelector; + node.selector = parseSelector(params.substring(customSelector.length)); + delete node.params; + return node; + } + + if (["media", "custom-media"].indexOf(lowercasedName) !== -1) { + if (params.includes("#{")) { + // Workaround for media at rule with scss interpolation + return { + type: "media-unknown", + value: params + }; + } + + node.params = parseMediaQuery(params); + return node; + } + + node.params = params; + return node; + } + } + + return node; +} + +function parseWithParser(parser, text) { + var parsed = parseFrontMatter(text); + var frontMatter = parsed.frontMatter; + text = parsed.content; + var result; + + try { + result = parser.parse(text); + } catch (e) { + if (typeof e.line !== "number") { + throw e; + } + + throw createError("(postcss) " + e.name + " " + e.reason, { + start: e + }); + } + + result = parseNestedCSS(addTypePrefix(result, "css-")); + + if (frontMatter) { + result.nodes.unshift(frontMatter); + } + + return result; +} + +function requireParser(isSCSSParser) { + if (isSCSSParser) { + return __webpack_require__(117); + } // TODO: Remove this hack when this issue is fixed: + // https://github.com/shellscape/postcss-less/issues/88 + + + var LessParser = __webpack_require__(76); + + LessParser.prototype.atrule = function () { + return Object.getPrototypeOf(LessParser.prototype).atrule.apply(this, arguments); + }; + + return __webpack_require__(182); +} + +function parse(text, parsers, opts) { + var hasExplicitParserChoice = opts.parser === "less" || opts.parser === "scss"; + var isSCSSParser = isSCSS(opts.parser, text); + + try { + return parseWithParser(requireParser(isSCSSParser), text); + } catch (originalError) { + if (hasExplicitParserChoice) { + throw originalError; + } + + try { + return parseWithParser(requireParser(!isSCSSParser), text); + } catch (_secondError) { + throw originalError; + } + } +} + +var parser = { + parse: parse, + astFormat: "postcss", + hasPragma: hasPragma, + locStart: function locStart(node) { + if (node.source) { + return lineColumnToIndex(node.source.start, node.source.input.css) - 1; + } + + return null; + }, + locEnd: function locEnd(node) { + var endNode = node.nodes && node.nodes[node.nodes.length - 1]; + + if (endNode && node.source && !node.source.end) { + node = endNode; + } + + if (node.source && node.source.end) { + return lineColumnToIndex(node.source.end, node.source.input.css); + } + + return null; + } +}; // Export as a plugin so we can reuse the same bundle for UMD loading + +module.exports = { + parsers: { + css: parser, + less: parser, + scss: parser + } +}; + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function createError(message, loc) { + // Construct an error similar to the ones thrown by Babylon. + var error = new SyntaxError(message + " (" + loc.start.line + ":" + loc.start.column + ")"); + error.loc = loc; + return error; +} + +module.exports = createError; + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + // Super inefficient, needs to be cached. + +module.exports = function (lineColumn, text) { + var index = 0; + + for (var i = 0; i < lineColumn.line - 1; ++i) { + index = text.indexOf("\n", index) + 1; + + if (index === -1) { + return -1; + } + } + + return index + lineColumn.column; +}; + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var jsPragma = __webpack_require__(95); + +var parseFrontMatter = __webpack_require__(31); + +function hasPragma(text) { + return jsPragma.hasPragma(parseFrontMatter(text).content); +} + +function insertPragma(text) { + var _parseFrontMatter = parseFrontMatter(text), + frontMatter = _parseFrontMatter.frontMatter, + content = _parseFrontMatter.content; + + return (frontMatter ? frontMatter.raw + "\n\n" : "") + jsPragma.insertPragma(content); +} + +module.exports = { + hasPragma: hasPragma, + insertPragma: insertPragma +}; + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var docblock = __webpack_require__(96); + +function hasPragma(text) { + var pragmas = Object.keys(docblock.parse(docblock.extract(text))); + return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1; +} + +function insertPragma(text) { + var parsedDocblock = docblock.parseWithComments(docblock.extract(text)); + var pragmas = Object.assign({ + format: "" + }, parsedDocblock.pragmas); + var newDocblock = docblock.print({ + pragmas: pragmas, + comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines + + }).replace(/(\r\n|\r)/g, "\n"); // normalise newlines (mitigate use of os.EOL by jest-docblock) + + var strippedText = docblock.strip(text); + var separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n"; + return newDocblock + separatingNewlines + strippedText; +} + +module.exports = { + hasPragma: hasPragma, + insertPragma: insertPragma +}; + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.extract = extract; +exports.strip = strip; +exports.parse = parse; +exports.parseWithComments = parseWithComments; +exports.print = print; + +var _detectNewline; + +function _load_detectNewline() { + return _detectNewline = _interopRequireDefault(__webpack_require__(97)); +} + +var _os; + +function _load_os() { + return _os = __webpack_require__(98); +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + + +var commentEndRe = /\*\/$/; +var commentStartRe = /^\/\*\*/; +var docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/; +var lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g; +var ltrimNewlineRe = /^(\r?\n)+/; +var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g; +var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; +var stringStartRe = /(\r?\n|^) *\* ?/g; + +function extract(contents) { + var match = contents.match(docblockRe); + return match ? match[0].trimLeft() : ''; +} + +function strip(contents) { + var match = contents.match(docblockRe); + return match && match[0] ? contents.substring(match[0].length) : contents; +} + +function parse(docblock) { + return parseWithComments(docblock).pragmas; +} + +function parseWithComments(docblock) { + var line = (0, (_detectNewline || _load_detectNewline()).default)(docblock) || (_os || _load_os()).EOL; + + docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives + + var prev = ''; + + while (prev !== docblock) { + prev = docblock; + docblock = docblock.replace(multilineRe, "".concat(line, "$1 $2").concat(line)); + } + + docblock = docblock.replace(ltrimNewlineRe, '').trimRight(); + var result = Object.create(null); + var comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').trimRight(); + var match; + + while (match = propertyRe.exec(docblock)) { + // strip linecomments from pragmas + var nextPragma = match[2].replace(lineCommentRe, ''); + + if (typeof result[match[1]] === 'string' || Array.isArray(result[match[1]])) { + result[match[1]] = [].concat(result[match[1]], nextPragma); + } else { + result[match[1]] = nextPragma; + } + } + + return { + comments: comments, + pragmas: result + }; +} + +function print(_ref) { + var _ref$comments = _ref.comments; + var comments = _ref$comments === undefined ? '' : _ref$comments; + var _ref$pragmas = _ref.pragmas; + var pragmas = _ref$pragmas === undefined ? {} : _ref$pragmas; + + var line = (0, (_detectNewline || _load_detectNewline()).default)(comments) || (_os || _load_os()).EOL; + + var head = '/**'; + var start = ' *'; + var tail = ' */'; + var keys = Object.keys(pragmas); + var printedObject = keys.map(function (key) { + return printKeyValues(key, pragmas[key]); + }).reduce(function (arr, next) { + return arr.concat(next); + }, []).map(function (keyValue) { + return start + ' ' + keyValue + line; + }).join(''); + + if (!comments) { + if (keys.length === 0) { + return ''; + } + + if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) { + var value = pragmas[keys[0]]; + return "".concat(head, " ").concat(printKeyValues(keys[0], value)[0]).concat(tail); + } + } + + var printedComments = comments.split(line).map(function (textLine) { + return "".concat(start, " ").concat(textLine); + }).join(line) + line; + return head + line + (comments ? printedComments : '') + (comments && keys.length ? start + line : '') + printedObject + tail; +} + +function printKeyValues(key, valueOrArray) { + return [].concat(valueOrArray).map(function (value) { + return "@".concat(key, " ").concat(value).trim(); + }); +} + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + var newlines = str.match(/(?:\r?\n)/g) || []; + + if (newlines.length === 0) { + return null; + } + + var crlf = newlines.filter(function (el) { + return el === '\r\n'; + }).length; + var lf = newlines.length - crlf; + return crlf > lf ? '\r\n' : '\n'; +}; + +module.exports.graceful = function (str) { + return module.exports(str) || '\n'; +}; + +/***/ }), +/* 98 */ +/***/ (function(module, exports) { + +exports.endianness = function () { + return 'LE'; +}; + +exports.hostname = function () { + if (typeof location !== 'undefined') { + return location.hostname; + } else return ''; +}; + +exports.loadavg = function () { + return []; +}; + +exports.uptime = function () { + return 0; +}; + +exports.freemem = function () { + return Number.MAX_VALUE; +}; + +exports.totalmem = function () { + return Number.MAX_VALUE; +}; + +exports.cpus = function () { + return []; +}; + +exports.type = function () { + return 'Browser'; +}; + +exports.release = function () { + if (typeof navigator !== 'undefined') { + return navigator.appVersion; + } + + return ''; +}; + +exports.networkInterfaces = exports.getNetworkInterfaces = function () { + return {}; +}; + +exports.arch = function () { + return 'javascript'; +}; + +exports.platform = function () { + return 'browser'; +}; + +exports.tmpdir = exports.tmpDir = function () { + return '/tmp'; +}; + +exports.EOL = '\n'; + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var htmlTagNames = __webpack_require__(100); + +var colorAdjusterFunctions = ["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"]; + +function getAncestorCounter(path, typeOrTypes) { + var types = [].concat(typeOrTypes); + var counter = -1; + var ancestorNode; + + while (ancestorNode = path.getParentNode(++counter)) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode(path, typeOrTypes) { + var counter = getAncestorCounter(path, typeOrTypes); + return counter === -1 ? null : path.getParentNode(counter); +} + +function getPropOfDeclNode(path) { + var declAncestorNode = getAncestorNode(path, "css-decl"); + return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase(); +} + +function isSCSS(parser, text) { + var hasExplicitParserChoice = parser === "less" || parser === "scss"; + var IS_POSSIBLY_SCSS = /(\w\s*: [^}:]+|#){|@import[^\n]+(url|,)/; + return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text); +} + +function isWideKeywords(value) { + return ["initial", "inherit", "unset", "revert"].indexOf(value.toLowerCase()) !== -1; +} + +function isKeyframeAtRuleKeywords(path, value) { + var atRuleAncestorNode = getAncestorNode(path, "css-atrule"); + return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].indexOf(value.toLowerCase()) !== -1; +} + +function maybeToLowerCase(value) { + return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase(); +} + +function insideValueFunctionNode(path, functionName) { + var funcAncestorNode = getAncestorNode(path, "value-func"); + return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName; +} + +function insideICSSRuleNode(path) { + var ruleAncestorNode = getAncestorNode(path, "css-rule"); + return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export")); +} + +function insideAtRuleNode(path, atRuleNameOrAtRuleNames) { + var atRuleNames = [].concat(atRuleNameOrAtRuleNames); + var atRuleAncestorNode = getAncestorNode(path, "css-atrule"); + return atRuleAncestorNode && atRuleNames.indexOf(atRuleAncestorNode.name.toLowerCase()) !== -1; +} + +function insideURLFunctionInImportAtRuleNode(path) { + var node = path.getValue(); + var atRuleAncestorNode = getAncestorNode(path, "css-atrule"); + return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2; +} + +function isURLFunctionNode(node) { + return node.type === "value-func" && node.value.toLowerCase() === "url"; +} + +function isLastNode(path, node) { + var parentNode = path.getParentNode(); + + if (!parentNode) { + return false; + } + + var nodes = parentNode.nodes; + return nodes && nodes.indexOf(node) === nodes.length - 1; +} + +function isHTMLTag(value) { + return htmlTagNames.indexOf(value.toLowerCase()) !== -1; +} + +function isDetachedRulesetDeclarationNode(node) { + // If a Less file ends up being parsed with the SCSS parser, Less + // variable declarations will be parsed as atrules with names ending + // with a colon, so keep the original case then. + if (!node.selector) { + return false; + } + + return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value); +} + +function isForKeywordNode(node) { + return node.type === "value-word" && ["from", "through", "end"].indexOf(node.value) !== -1; +} + +function isIfElseKeywordNode(node) { + return node.type === "value-word" && ["and", "or", "not"].indexOf(node.value) !== -1; +} + +function isEachKeywordNode(node) { + return node.type === "value-word" && node.value === "in"; +} + +function isMultiplicationNode(node) { + return node.type === "value-operator" && node.value === "*"; +} + +function isDivisionNode(node) { + return node.type === "value-operator" && node.value === "/"; +} + +function isAdditionNode(node) { + return node.type === "value-operator" && node.value === "+"; +} + +function isSubtractionNode(node) { + return node.type === "value-operator" && node.value === "-"; +} + +function isModuloNode(node) { + return node.type === "value-operator" && node.value === "%"; +} + +function isMathOperatorNode(node) { + return isMultiplicationNode(node) || isDivisionNode(node) || isAdditionNode(node) || isSubtractionNode(node) || isModuloNode(node); +} + +function isEqualityOperatorNode(node) { + return node.type === "value-word" && ["==", "!="].indexOf(node.value) !== -1; +} + +function isRelationalOperatorNode(node) { + return node.type === "value-word" && ["<", ">", "<=", ">="].indexOf(node.value) !== -1; +} + +function isSCSSControlDirectiveNode(node) { + return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].indexOf(node.name) !== -1; +} + +function isSCSSNestedPropertyNode(node) { + if (!node.selector) { + return false; + } + + return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":"); +} + +function isDetachedRulesetCallNode(node) { + return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params); +} + +function isTemplatePlaceholderNode(node) { + return node.name.startsWith("prettier-placeholder"); +} + +function isTemplatePropNode(node) { + return node.prop.startsWith("@prettier-placeholder"); +} + +function isPostcssSimpleVarNode(currentNode, nextNode) { + return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before; +} + +function hasComposesNode(node) { + return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes"; +} + +function hasParensAroundNode(node) { + return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null; +} + +function hasEmptyRawBefore(node) { + return node.raws && node.raws.before === ""; +} + +function isKeyValuePairNode(node) { + return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon"; +} + +function isKeyValuePairInParenGroupNode(node) { + return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode(node.groups[0]); +} + +function isSCSSMapItemNode(path) { + var node = path.getValue(); // Ignore empty item (i.e. `$key: ()`) + + if (node.groups.length === 0) { + return false; + } + + var parentParentNode = path.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`) + + if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) { + return false; + } + + var declNode = getAncestorNode(path, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`) + + if (declNode && declNode.prop && declNode.prop.startsWith("$")) { + return true; + } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`) + + + if (isKeyValuePairInParenGroupNode(parentParentNode)) { + return true; + } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`) + + + if (parentParentNode.type === "value-func") { + return true; + } + + return false; +} + +function isInlineValueCommentNode(node) { + return node.type === "value-comment" && node.inline; +} + +function isHashNode(node) { + return node.type === "value-word" && node.value === "#"; +} + +function isLeftCurlyBraceNode(node) { + return node.type === "value-word" && node.value === "{"; +} + +function isRightCurlyBraceNode(node) { + return node.type === "value-word" && node.value === "}"; +} + +function isWordNode(node) { + return ["value-word", "value-atword"].indexOf(node.type) !== -1; +} + +function isColonNode(node) { + return node.type === "value-colon"; +} + +function isMediaAndSupportsKeywords(node) { + return node.value && ["not", "and", "or"].indexOf(node.value.toLowerCase()) !== -1; +} + +function isColorAdjusterFuncNode(node) { + if (node.type !== "value-func") { + return false; + } + + return colorAdjusterFunctions.indexOf(node.value.toLowerCase()) !== -1; +} + +module.exports = { + getAncestorCounter: getAncestorCounter, + getAncestorNode: getAncestorNode, + getPropOfDeclNode: getPropOfDeclNode, + maybeToLowerCase: maybeToLowerCase, + insideValueFunctionNode: insideValueFunctionNode, + insideICSSRuleNode: insideICSSRuleNode, + insideAtRuleNode: insideAtRuleNode, + insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode, + isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords, + isHTMLTag: isHTMLTag, + isWideKeywords: isWideKeywords, + isSCSS: isSCSS, + isLastNode: isLastNode, + isSCSSControlDirectiveNode: isSCSSControlDirectiveNode, + isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode, + isRelationalOperatorNode: isRelationalOperatorNode, + isEqualityOperatorNode: isEqualityOperatorNode, + isMultiplicationNode: isMultiplicationNode, + isDivisionNode: isDivisionNode, + isAdditionNode: isAdditionNode, + isSubtractionNode: isSubtractionNode, + isModuloNode: isModuloNode, + isMathOperatorNode: isMathOperatorNode, + isEachKeywordNode: isEachKeywordNode, + isForKeywordNode: isForKeywordNode, + isURLFunctionNode: isURLFunctionNode, + isIfElseKeywordNode: isIfElseKeywordNode, + hasComposesNode: hasComposesNode, + hasParensAroundNode: hasParensAroundNode, + hasEmptyRawBefore: hasEmptyRawBefore, + isSCSSNestedPropertyNode: isSCSSNestedPropertyNode, + isDetachedRulesetCallNode: isDetachedRulesetCallNode, + isTemplatePlaceholderNode: isTemplatePlaceholderNode, + isTemplatePropNode: isTemplatePropNode, + isPostcssSimpleVarNode: isPostcssSimpleVarNode, + isKeyValuePairNode: isKeyValuePairNode, + isKeyValuePairInParenGroupNode: isKeyValuePairInParenGroupNode, + isSCSSMapItemNode: isSCSSMapItemNode, + isInlineValueCommentNode: isInlineValueCommentNode, + isHashNode: isHashNode, + isLeftCurlyBraceNode: isLeftCurlyBraceNode, + isRightCurlyBraceNode: isRightCurlyBraceNode, + isWordNode: isWordNode, + isColonNode: isColonNode, + isMediaAndSupportsKeywords: isMediaAndSupportsKeywords, + isColorAdjusterFuncNode: isColorAdjusterFuncNode +}; + +/***/ }), +/* 100 */ +/***/ (function(module, exports) { + +module.exports = [ + "a", + "abbr", + "acronym", + "address", + "applet", + "area", + "article", + "aside", + "audio", + "b", + "base", + "basefont", + "bdi", + "bdo", + "bgsound", + "big", + "blink", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "center", + "cite", + "code", + "col", + "colgroup", + "command", + "content", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "dir", + "div", + "dl", + "dt", + "element", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "font", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "image", + "img", + "input", + "ins", + "isindex", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "listing", + "main", + "map", + "mark", + "marquee", + "math", + "menu", + "menuitem", + "meta", + "meter", + "multicol", + "nav", + "nextid", + "nobr", + "noembed", + "noframes", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "picture", + "plaintext", + "pre", + "progress", + "q", + "rb", + "rbc", + "rp", + "rt", + "rtc", + "ruby", + "s", + "samp", + "script", + "section", + "select", + "shadow", + "slot", + "small", + "source", + "spacer", + "span", + "strike", + "strong", + "style", + "sub", + "summary", + "sup", + "svg", + "table", + "tbody", + "td", + "template", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "tt", + "u", + "ul", + "var", + "video", + "wbr", + "xmp" +]; + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Parser = __webpack_require__(102); + +var AtWord = __webpack_require__(34); + +var Colon = __webpack_require__(35); + +var Comma = __webpack_require__(36); + +var Comment = __webpack_require__(37); + +var Func = __webpack_require__(38); + +var Num = __webpack_require__(39); + +var Operator = __webpack_require__(40); + +var Paren = __webpack_require__(41); + +var Str = __webpack_require__(42); + +var UnicodeRange = __webpack_require__(44); + +var Value = __webpack_require__(33); + +var Word = __webpack_require__(43); + +var parser = function parser(source, options) { + return new Parser(source, options); +}; + +parser.atword = function (opts) { + return new AtWord(opts); +}; + +parser.colon = function (opts) { + opts.value = opts.value || ':'; + return new Colon(opts); +}; + +parser.comma = function (opts) { + opts.value = opts.value || ','; + return new Comma(opts); +}; + +parser.comment = function (opts) { + return new Comment(opts); +}; + +parser.func = function (opts) { + return new Func(opts); +}; + +parser.number = function (opts) { + return new Num(opts); +}; + +parser.operator = function (opts) { + return new Operator(opts); +}; + +parser.paren = function (opts) { + opts.value = opts.value || '('; + return new Paren(opts); +}; + +parser.string = function (opts) { + opts.quote = opts.quote || '\''; + return new Str(opts); +}; + +parser.value = function (opts) { + return new Value(opts); +}; + +parser.word = function (opts) { + return new Word(opts); +}; + +parser.unicodeRange = function (opts) { + return new UnicodeRange(opts); +}; + +module.exports = parser; + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var Root = __webpack_require__(103); + +var Value = __webpack_require__(33); + +var AtWord = __webpack_require__(34); + +var Colon = __webpack_require__(35); + +var Comma = __webpack_require__(36); + +var Comment = __webpack_require__(37); + +var Func = __webpack_require__(38); + +var Numbr = __webpack_require__(39); + +var Operator = __webpack_require__(40); + +var Paren = __webpack_require__(41); + +var Str = __webpack_require__(42); + +var Word = __webpack_require__(43); + +var UnicodeRange = __webpack_require__(44); + +var tokenize = __webpack_require__(104); + +var flatten = __webpack_require__(45); + +var indexesOf = __webpack_require__(46); + +var uniq = __webpack_require__(47); + +var ParserError = __webpack_require__(109); + +function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); +} + +module.exports = +/*#__PURE__*/ +function () { + function Parser(input, options) { + _classCallCheck(this, Parser); + + var defaults = { + loose: false + }; // cache needs to be an array for values with more than 1 level of function nesting + + this.cache = []; + this.input = input; + this.options = Object.assign({}, defaults, options); + this.position = 0; // we'll use this to keep track of the paren balance + + this.unbalanced = 0; + this.root = new Root(); + var value = new Value(); + this.root.append(value); + this.current = value; + this.tokens = tokenize(input, this.options); + } + + _createClass(Parser, [{ + key: "parse", + value: function parse() { + return this.loop(); + } + }, { + key: "colon", + value: function colon() { + var token = this.currToken; + this.newNode(new Colon({ + value: token[1], + source: { + start: { + line: token[2], + column: token[3] + }, + end: { + line: token[4], + column: token[5] + } + }, + sourceIndex: token[6] + })); + this.position++; + } + }, { + key: "comma", + value: function comma() { + var token = this.currToken; + this.newNode(new Comma({ + value: token[1], + source: { + start: { + line: token[2], + column: token[3] + }, + end: { + line: token[4], + column: token[5] + } + }, + sourceIndex: token[6] + })); + this.position++; + } + }, { + key: "comment", + value: function comment() { + var inline = false, + value = this.currToken[1].replace(/\/\*|\*\//g, ''), + node; + + if (this.options.loose && value.startsWith("//")) { + value = value.substring(2); + inline = true; + } + + node = new Comment({ + value: value, + inline: inline, + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[4], + column: this.currToken[5] + } + }, + sourceIndex: this.currToken[6] + }); + this.newNode(node); + this.position++; + } + }, { + key: "error", + value: function error(message, token) { + throw new ParserError(message + " at line: ".concat(token[2], ", column ").concat(token[3])); + } + }, { + key: "loop", + value: function loop() { + while (this.position < this.tokens.length) { + this.parseTokens(); + } + + if (!this.current.last && this.spaces) { + this.current.raws.before += this.spaces; + } else if (this.spaces) { + this.current.last.raws.after += this.spaces; + } + + this.spaces = ''; + return this.root; + } + }, { + key: "operator", + value: function operator() { + // if a +|- operator is followed by a non-word character (. is allowed) and + // is preceded by a non-word character. (5+5) + var char = this.currToken[1], + node; + + if (char === '+' || char === '-') { + // only inspect if the operator is not the first token, and we're only + // within a calc() function: the only spec-valid place for math expressions + if (!this.options.loose) { + if (this.position > 0) { + if (this.current.type === 'func' && this.current.value === 'calc') { + // allow operators to be proceeded by spaces and opening parens + if (this.prevToken[0] !== 'space' && this.prevToken[0] !== '(') { + this.error('Syntax Error', this.currToken); + } // valid: calc(1 - +2) + // invalid: calc(1 -+2) + else if (this.nextToken[0] !== 'space' && this.nextToken[0] !== 'word') { + this.error('Syntax Error', this.currToken); + } // valid: calc(1 - +2) + // valid: calc(-0.5 + 2) + // invalid: calc(1 -2) + else if (this.nextToken[0] === 'word' && this.current.last.type !== 'operator' && this.current.last.value !== '(') { + this.error('Syntax Error', this.currToken); + } + } // if we're not in a function and someone has doubled up on operators, + // or they're trying to perform a calc outside of a calc + // eg. +-4px or 5+ 5, throw an error + else if (this.nextToken[0] === 'space' || this.nextToken[0] === 'operator' || this.prevToken[0] === 'operator') { + this.error('Syntax Error', this.currToken); + } + } + } + + if (!this.options.loose) { + if (this.nextToken[0] === 'word') { + return this.word(); + } + } else { + if ((!this.current.nodes.length || this.current.last && this.current.last.type === 'operator') && this.nextToken[0] === 'word') { + return this.word(); + } + } + } + + node = new Operator({ + value: this.currToken[1], + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: this.currToken[4] + }); + this.position++; + return this.newNode(node); + } + }, { + key: "parseTokens", + value: function parseTokens() { + switch (this.currToken[0]) { + case 'space': + this.space(); + break; + + case 'colon': + this.colon(); + break; + + case 'comma': + this.comma(); + break; + + case 'comment': + this.comment(); + break; + + case '(': + this.parenOpen(); + break; + + case ')': + this.parenClose(); + break; + + case 'atword': + case 'word': + this.word(); + break; + + case 'operator': + this.operator(); + break; + + case 'string': + this.string(); + break; + + case 'unicoderange': + this.unicodeRange(); + break; + + default: + this.word(); + break; + } + } + }, { + key: "parenOpen", + value: function parenOpen() { + var unbalanced = 1, + pos = this.position + 1, + token = this.currToken, + last; // check for balanced parens + + while (pos < this.tokens.length && unbalanced) { + var tkn = this.tokens[pos]; + + if (tkn[0] === '(') { + unbalanced++; + } + + if (tkn[0] === ')') { + unbalanced--; + } + + pos++; + } + + if (unbalanced) { + this.error('Expected closing parenthesis', token); + } // ok, all parens are balanced. continue on + + + last = this.current.last; + + if (last && last.type === 'func' && last.unbalanced < 0) { + last.unbalanced = 0; // ok we're ready to add parens now + + this.current = last; + } + + this.current.unbalanced++; + this.newNode(new Paren({ + value: token[1], + source: { + start: { + line: token[2], + column: token[3] + }, + end: { + line: token[4], + column: token[5] + } + }, + sourceIndex: token[6] + })); + this.position++; // url functions get special treatment, and anything between the function + // parens get treated as one word, if the contents aren't not a string. + + if (this.current.type === 'func' && this.current.unbalanced && this.current.value === 'url' && this.currToken[0] !== 'string' && this.currToken[0] !== ')' && !this.options.loose) { + var nextToken = this.nextToken, + value = this.currToken[1], + start = { + line: this.currToken[2], + column: this.currToken[3] + }; + + while (nextToken && nextToken[0] !== ')' && this.current.unbalanced) { + this.position++; + value += this.currToken[1]; + nextToken = this.nextToken; + } + + if (this.position !== this.tokens.length - 1) { + // skip the following word definition, or it'll be a duplicate + this.position++; + this.newNode(new Word({ + value: value, + source: { + start: start, + end: { + line: this.currToken[4], + column: this.currToken[5] + } + }, + sourceIndex: this.currToken[6] + })); + } + } + } + }, { + key: "parenClose", + value: function parenClose() { + var token = this.currToken; + this.newNode(new Paren({ + value: token[1], + source: { + start: { + line: token[2], + column: token[3] + }, + end: { + line: token[4], + column: token[5] + } + }, + sourceIndex: token[6] + })); + this.position++; + + if (this.position >= this.tokens.length - 1 && !this.current.unbalanced) { + return; + } + + this.current.unbalanced--; + + if (this.current.unbalanced < 0) { + this.error('Expected opening parenthesis', token); + } + + if (!this.current.unbalanced && this.cache.length) { + this.current = this.cache.pop(); + } + } + }, { + key: "space", + value: function space() { + var token = this.currToken; // Handle space before and after the selector + + if (this.position === this.tokens.length - 1 || this.nextToken[0] === ',' || this.nextToken[0] === ')') { + this.current.last.raws.after += token[1]; + this.position++; + } else { + this.spaces = token[1]; + this.position++; + } + } + }, { + key: "unicodeRange", + value: function unicodeRange() { + var token = this.currToken; + this.newNode(new UnicodeRange({ + value: token[1], + source: { + start: { + line: token[2], + column: token[3] + }, + end: { + line: token[4], + column: token[5] + } + }, + sourceIndex: token[6] + })); + this.position++; + } + }, { + key: "splitWord", + value: function splitWord() { + var _this = this; + + var nextToken = this.nextToken, + word = this.currToken[1], + rNumber = /^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/, + // treat css-like groupings differently so they can be inspected, + // but don't address them as anything but a word, but allow hex values + // to pass through. + rNoFollow = /^(?!\#([a-z0-9]+))[\#\{\}]/gi, + hasAt, + indices; + + if (!rNoFollow.test(word)) { + while (nextToken && nextToken[0] === 'word') { + this.position++; + var current = this.currToken[1]; + word += current; + nextToken = this.nextToken; + } + } + + hasAt = indexesOf(word, '@'); + indices = sortAscending(uniq(flatten([[0], hasAt]))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length, + value = word.slice(ind, index), + node; + + if (~hasAt.indexOf(ind)) { + node = new AtWord({ + value: value.slice(1), + source: { + start: { + line: _this.currToken[2], + column: _this.currToken[3] + ind + }, + end: { + line: _this.currToken[4], + column: _this.currToken[3] + (index - 1) + } + }, + sourceIndex: _this.currToken[6] + indices[i] + }); + } else if (rNumber.test(_this.currToken[1])) { + var unit = value.replace(rNumber, ''); + node = new Numbr({ + value: value.replace(unit, ''), + source: { + start: { + line: _this.currToken[2], + column: _this.currToken[3] + ind + }, + end: { + line: _this.currToken[4], + column: _this.currToken[3] + (index - 1) + } + }, + sourceIndex: _this.currToken[6] + indices[i], + unit: unit + }); + } else { + node = new (nextToken && nextToken[0] === '(' ? Func : Word)({ + value: value, + source: { + start: { + line: _this.currToken[2], + column: _this.currToken[3] + ind + }, + end: { + line: _this.currToken[4], + column: _this.currToken[3] + (index - 1) + } + }, + sourceIndex: _this.currToken[6] + indices[i] + }); + + if (node.constructor.name === 'Word') { + node.isHex = /^#(.+)/.test(value); + node.isColor = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(value); + } else { + _this.cache.push(_this.current); + } + } + + _this.newNode(node); + }); + this.position++; + } + }, { + key: "string", + value: function string() { + var token = this.currToken, + value = this.currToken[1], + rQuote = /^(\"|\')/, + quoted = rQuote.test(value), + quote = '', + node; + + if (quoted) { + quote = value.match(rQuote)[0]; // set value to the string within the quotes + // quotes are stored in raws + + value = value.slice(1, value.length - 1); + } + + node = new Str({ + value: value, + source: { + start: { + line: token[2], + column: token[3] + }, + end: { + line: token[4], + column: token[5] + } + }, + sourceIndex: token[6], + quoted: quoted + }); + node.raws.quote = quote; + this.newNode(node); + this.position++; + } + }, { + key: "word", + value: function word() { + return this.splitWord(); + } + }, { + key: "newNode", + value: function newNode(node) { + if (this.spaces) { + node.raws.before += this.spaces; + this.spaces = ''; + } + + return this.current.append(node); + } + }, { + key: "currToken", + get: function get() { + return this.tokens[this.position]; + } + }, { + key: "nextToken", + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: "prevToken", + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + + return Parser; +}(); + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = __webpack_require__(1); + +module.exports = +/*#__PURE__*/ +function (_Container) { + _inherits(Root, _Container); + + function Root(opts) { + var _this; + + _classCallCheck(this, Root); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Root).call(this, opts)); + _this.type = 'root'; + return _this; + } + + return Root; +}(Container); + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var openBracket = '{'.charCodeAt(0); +var closeBracket = '}'.charCodeAt(0); +var openParen = '('.charCodeAt(0); +var closeParen = ')'.charCodeAt(0); +var singleQuote = '\''.charCodeAt(0); +var doubleQuote = '"'.charCodeAt(0); +var backslash = '\\'.charCodeAt(0); +var slash = '/'.charCodeAt(0); +var period = '.'.charCodeAt(0); +var comma = ','.charCodeAt(0); +var colon = ':'.charCodeAt(0); +var asterisk = '*'.charCodeAt(0); +var minus = '-'.charCodeAt(0); +var plus = '+'.charCodeAt(0); +var pound = '#'.charCodeAt(0); +var newline = '\n'.charCodeAt(0); +var space = ' '.charCodeAt(0); +var feed = '\f'.charCodeAt(0); +var tab = '\t'.charCodeAt(0); +var cr = '\r'.charCodeAt(0); +var at = '@'.charCodeAt(0); +var lowerE = 'e'.charCodeAt(0); +var upperE = 'E'.charCodeAt(0); +var digit0 = '0'.charCodeAt(0); +var digit9 = '9'.charCodeAt(0); +var lowerU = 'u'.charCodeAt(0); +var upperU = 'U'.charCodeAt(0); +var atEnd = /[ \n\t\r\{\(\)'"\\;,/]/g; +var wordEnd = /[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g; +var wordEndNum = /[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g; +var alphaNum = /^[a-z0-9]/i; +var unicodeRange = /^[a-f0-9?\-]/i; + +var util = __webpack_require__(105); + +var TokenizeError = __webpack_require__(108); + +module.exports = function tokenize(input, options) { + options = options || {}; + var tokens = [], + css = input.valueOf(), + length = css.length, + offset = -1, + line = 1, + pos = 0, + parentCount = 0, + isURLArg = null, + code, + next, + quote, + lines, + last, + content, + escape, + nextLine, + nextOffset, + escaped, + escapePos, + nextChar; + + function unclosed(what) { + var message = util.format('Unclosed %s at line: %d, column: %d, token: %d', what, line, pos - offset, pos); + throw new TokenizeError(message); + } + + function tokenizeError() { + var message = util.format('Syntax error at line: %d, column: %d, token: %d', line, pos - offset, pos); + throw new TokenizeError(message); + } + + while (pos < length) { + code = css.charCodeAt(pos); + + if (code === newline) { + offset = pos; + line += 1; + } + + switch (code) { + case newline: + case space: + case tab: + case cr: + case feed: + next = pos; + + do { + next += 1; + code = css.charCodeAt(next); + + if (code === newline) { + offset = next; + line += 1; + } + } while (code === space || code === newline || code === tab || code === cr || code === feed); + + tokens.push(['space', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); + pos = next - 1; + break; + + case colon: + next = pos + 1; + tokens.push(['colon', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); + pos = next - 1; + break; + + case comma: + next = pos + 1; + tokens.push(['comma', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); + pos = next - 1; + break; + + case openBracket: + tokens.push(['{', '{', line, pos - offset, line, next - offset, pos]); + break; + + case closeBracket: + tokens.push(['}', '}', line, pos - offset, line, next - offset, pos]); + break; + + case openParen: + parentCount++; + isURLArg = !isURLArg && parentCount === 1 && tokens.length > 0 && tokens[tokens.length - 1][0] === "word" && tokens[tokens.length - 1][1] === "url"; + tokens.push(['(', '(', line, pos - offset, line, next - offset, pos]); + break; + + case closeParen: + parentCount--; + isURLArg = !isURLArg && parentCount === 1; + tokens.push([')', ')', line, pos - offset, line, next - offset, pos]); + break; + + case singleQuote: + case doubleQuote: + quote = code === singleQuote ? '\'' : '"'; + next = pos; + + do { + escaped = false; + next = css.indexOf(quote, next + 1); + + if (next === -1) { + unclosed('quote', quote); + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + tokens.push(['string', css.slice(pos, next + 1), line, pos - offset, line, next - offset, pos]); + pos = next; + break; + + case at: + atEnd.lastIndex = pos + 1; + atEnd.test(css); + + if (atEnd.lastIndex === 0) { + next = css.length - 1; + } else { + next = atEnd.lastIndex - 2; + } + + tokens.push(['atword', css.slice(pos, next + 1), line, pos - offset, line, next - offset, pos]); + pos = next; + break; + + case backslash: + next = pos; + code = css.charCodeAt(next + 1); + + if (escape && code !== slash && code !== space && code !== newline && code !== tab && code !== cr && code !== feed) { + next += 1; + } + + tokens.push(['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset, pos]); + pos = next; + break; + + case plus: + case minus: + case asterisk: + next = pos + 1; + nextChar = css.slice(pos + 1, next + 1); + var prevChar = css.slice(pos - 1, pos); // if the operator is immediately followed by a word character, then we + // have a prefix of some kind, and should fall-through. eg. -webkit + // look for --* for custom variables + + if (code === minus && nextChar.charCodeAt(0) === minus) { + next++; + tokens.push(['word', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); + pos = next - 1; + break; + } + + tokens.push(['operator', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); + pos = next - 1; + break; + + default: + if (code === slash && (css.charCodeAt(pos + 1) === asterisk || options.loose && !isURLArg && css.charCodeAt(pos + 1) === slash)) { + var isStandardComment = css.charCodeAt(pos + 1) === asterisk; + + if (isStandardComment) { + next = css.indexOf('*/', pos + 2) + 1; + + if (next === 0) { + unclosed('comment', '*/'); + } + } else { + var newlinePos = css.indexOf('\n', pos + 2); + next = newlinePos !== -1 ? newlinePos - 1 : length; + } + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + tokens.push(['comment', content, line, pos - offset, nextLine, next - nextOffset, pos]); + offset = nextOffset; + line = nextLine; + pos = next; + } else if (code === pound && !alphaNum.test(css.slice(pos + 1, pos + 2))) { + next = pos + 1; + tokens.push(['#', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); + pos = next - 1; + } else if ((code === lowerU || code === upperU) && css.charCodeAt(pos + 1) === plus) { + next = pos + 2; + + do { + next += 1; + code = css.charCodeAt(next); + } while (next < length && unicodeRange.test(css.slice(next, next + 1))); + + tokens.push(['unicoderange', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); + pos = next - 1; + } // catch a regular slash, that isn't a comment + else if (code === slash) { + next = pos + 1; + tokens.push(['operator', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); + pos = next - 1; + } else { + var regex = wordEnd; // we're dealing with a word that starts with a number + // those get treated differently + + if (code >= digit0 && code <= digit9) { + regex = wordEndNum; + } + + regex.lastIndex = pos + 1; + regex.test(css); + + if (regex.lastIndex === 0) { + next = css.length - 1; + } else { + next = regex.lastIndex - 2; + } // Exponential number notation with minus or plus: 1e-10, 1e+10 + + + if (regex === wordEndNum || code === period) { + var ncode = css.charCodeAt(next), + ncode1 = css.charCodeAt(next + 1), + ncode2 = css.charCodeAt(next + 2); + + if ((ncode === lowerE || ncode === upperE) && (ncode1 === minus || ncode1 === plus) && ncode2 >= digit0 && ncode2 <= digit9) { + wordEndNum.lastIndex = next + 2; + wordEndNum.test(css); + + if (wordEndNum.lastIndex === 0) { + next = css.length - 1; + } else { + next = wordEndNum.lastIndex - 2; + } + } + } + + tokens.push(['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset, pos]); + pos = next; + } + + break; + } + + pos++; + } + + return tokens; +}; + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, process) {function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +var formatRegExp = /%[sdj%]/g; + +exports.format = function (f) { + if (!isString(f)) { + var objects = []; + + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (x === '%%') return '%'; + if (i >= len) return x; + + switch (x) { + case '%s': + return String(args[i++]); + + case '%d': + return Number(args[i++]); + + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + + default: + return x; + } + }); + + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + + return str; +}; // Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. + + +exports.deprecate = function (fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function () { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + + warned = true; + } + + return fn.apply(this, arguments); + } + + return deprecated; +}; + +var debugs = {}; +var debugEnviron; + +exports.debuglog = function (set) { + if (isUndefined(debugEnviron)) debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + + debugs[set] = function () { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function () {}; + } + } + + return debugs[set]; +}; +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ + +/* legacy: obj, showHidden, depth, colors*/ + + +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; // legacy... + + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } // set default options + + + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} + +exports.inspect = inspect; // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + +inspect.colors = { + 'bold': [1, 22], + 'italic': [3, 23], + 'underline': [4, 24], + 'inverse': [7, 27], + 'white': [37, 39], + 'grey': [90, 39], + 'black': [30, 39], + 'blue': [34, 39], + 'cyan': [36, 39], + 'green': [32, 39], + 'magenta': [35, 39], + 'red': [31, 39], + 'yellow': [33, 39] +}; // Don't use 'blue' not visible on cmd.exe + +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return "\x1B[" + inspect.colors[style][0] + 'm' + str + "\x1B[" + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + +function stylizeNoColor(str, styleType) { + return str; +} + +function arrayToHash(array) { + var hash = {}; + array.forEach(function (val, idx) { + hash[val] = true; + }); + return hash; +} + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + + return ret; + } // Primitive types cannot have properties + + + var primitive = formatPrimitive(ctx, value); + + if (primitive) { + return primitive; + } // Look up the keys of the object. + + + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + + + if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } // Some type of object without properties can be shortcutted. + + + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + + if (isError(value)) { + return formatError(value); + } + } + + var base = '', + array = false, + braces = ['{', '}']; // Make Array say that they are Array + + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } // Make functions say that they are functions + + + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } // Make RegExps say that they are RegExps + + + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } // Make dates with properties first say the date + + + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } // Make error with message first say the error + + + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + var output; + + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function (key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + return reduceToSingleString(output, base, braces); +} + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); + + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + + if (isNumber(value)) return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); // For some reason typeof null is "object", so special case here. + + if (isNull(value)) return ctx.stylize('null', 'null'); +} + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); + } else { + output.push(''); + } + } + + keys.forEach(function (key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); + } + }); + return output; +} + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { + value: value[key] + }; + + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + + name = JSON.stringify('' + key); + + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function (prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} // NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + + +function isArray(ar) { + return Array.isArray(ar); +} + +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} + +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} + +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} + +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} + +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} + +exports.isString = isString; + +function isSymbol(arg) { + return _typeof(arg) === 'symbol'; +} + +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} + +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} + +exports.isRegExp = isRegExp; + +function isObject(arg) { + return _typeof(arg) === 'object' && arg !== null; +} + +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} + +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error); +} + +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} + +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || _typeof(arg) === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} + +exports.isPrimitive = isPrimitive; +exports.isBuffer = __webpack_require__(106); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // 26 Feb 16:19:34 + +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} // log is just a thin wrapper to console.log that prepends a timestamp + + +exports.log = function () { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ + + +exports.inherits = __webpack_require__(107); + +exports._extend = function (origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + var keys = Object.keys(add); + var i = keys.length; + + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15), __webpack_require__(12))) + +/***/ }), +/* 106 */ +/***/ (function(module, exports) { + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +module.exports = function isBuffer(arg) { + return arg && _typeof(arg) === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; +}; + +/***/ }), +/* 107 */ +/***/ (function(module, exports) { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + + var TempCtor = function TempCtor() {}; + + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; +} + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } + +function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } + +function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var TokenizeError = +/*#__PURE__*/ +function (_Error) { + _inherits(TokenizeError, _Error); + + function TokenizeError(message) { + var _this; + + _classCallCheck(this, TokenizeError); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(TokenizeError).call(this, message)); + _this.name = _this.constructor.name; + _this.message = message || 'An error ocurred while tokzenizing.'; + + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(_assertThisInitialized(_assertThisInitialized(_this)), _this.constructor); + } else { + _this.stack = new Error(message).stack; + } + + return _this; + } + + return TokenizeError; +}(_wrapNativeSuper(Error)); + +module.exports = TokenizeError; + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } + +function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } + +function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var ParserError = +/*#__PURE__*/ +function (_Error) { + _inherits(ParserError, _Error); + + function ParserError(message) { + var _this; + + _classCallCheck(this, ParserError); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ParserError).call(this, message)); + _this.name = _this.constructor.name; + _this.message = message || 'An error ocurred while parsing.'; + + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(_assertThisInitialized(_assertThisInitialized(_this)), _this.constructor); + } else { + _this.stack = new Error(message).stack; + } + + return _this; + } + + return ParserError; +}(_wrapNativeSuper(Error)); + +module.exports = ParserError; + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _processor = __webpack_require__(111); + +var _processor2 = _interopRequireDefault(_processor); + +var _attribute = __webpack_require__(56); + +var _attribute2 = _interopRequireDefault(_attribute); + +var _className = __webpack_require__(50); + +var _className2 = _interopRequireDefault(_className); + +var _combinator = __webpack_require__(58); + +var _combinator2 = _interopRequireDefault(_combinator); + +var _comment = __webpack_require__(51); + +var _comment2 = _interopRequireDefault(_comment); + +var _id = __webpack_require__(52); + +var _id2 = _interopRequireDefault(_id); + +var _nesting = __webpack_require__(59); + +var _nesting2 = _interopRequireDefault(_nesting); + +var _pseudo = __webpack_require__(55); + +var _pseudo2 = _interopRequireDefault(_pseudo); + +var _root = __webpack_require__(48); + +var _root2 = _interopRequireDefault(_root); + +var _selector = __webpack_require__(49); + +var _selector2 = _interopRequireDefault(_selector); + +var _string = __webpack_require__(54); + +var _string2 = _interopRequireDefault(_string); + +var _tag = __webpack_require__(53); + +var _tag2 = _interopRequireDefault(_tag); + +var _universal = __webpack_require__(57); + +var _universal2 = _interopRequireDefault(_universal); + +var _types = __webpack_require__(0); + +var types = _interopRequireWildcard(_types); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var parser = function parser(processor) { + return new _processor2.default(processor); +}; + +parser.attribute = function (opts) { + return new _attribute2.default(opts); +}; + +parser.className = function (opts) { + return new _className2.default(opts); +}; + +parser.combinator = function (opts) { + return new _combinator2.default(opts); +}; + +parser.comment = function (opts) { + return new _comment2.default(opts); +}; + +parser.id = function (opts) { + return new _id2.default(opts); +}; + +parser.nesting = function (opts) { + return new _nesting2.default(opts); +}; + +parser.pseudo = function (opts) { + return new _pseudo2.default(opts); +}; + +parser.root = function (opts) { + return new _root2.default(opts); +}; + +parser.selector = function (opts) { + return new _selector2.default(opts); +}; + +parser.string = function (opts) { + return new _string2.default(opts); +}; + +parser.tag = function (opts) { + return new _tag2.default(opts); +}; + +parser.universal = function (opts) { + return new _universal2.default(opts); +}; + +Object.keys(types).forEach(function (type) { + if (type === '__esModule') { + return; + } + + parser[type] = types[type]; // eslint-disable-line +}); +exports.default = parser; +module.exports = exports['default']; + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _parser = __webpack_require__(112); + +var _parser2 = _interopRequireDefault(_parser); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var Processor = function () { + function Processor(func) { + _classCallCheck(this, Processor); + + this.func = func || function noop() {}; + + return this; + } + + Processor.prototype.process = function process(selectors) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var input = new _parser2.default({ + css: selectors, + error: function error(e) { + throw new Error(e); + }, + options: options + }); + this.res = input; + this.func(input); + return this; + }; + + _createClass(Processor, [{ + key: 'result', + get: function get() { + return String(this.res); + } + }]); + + return Processor; +}(); + +exports.default = Processor; +module.exports = exports['default']; + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _flatten = __webpack_require__(45); + +var _flatten2 = _interopRequireDefault(_flatten); + +var _indexesOf = __webpack_require__(46); + +var _indexesOf2 = _interopRequireDefault(_indexesOf); + +var _uniq = __webpack_require__(47); + +var _uniq2 = _interopRequireDefault(_uniq); + +var _root = __webpack_require__(48); + +var _root2 = _interopRequireDefault(_root); + +var _selector = __webpack_require__(49); + +var _selector2 = _interopRequireDefault(_selector); + +var _className = __webpack_require__(50); + +var _className2 = _interopRequireDefault(_className); + +var _comment = __webpack_require__(51); + +var _comment2 = _interopRequireDefault(_comment); + +var _id = __webpack_require__(52); + +var _id2 = _interopRequireDefault(_id); + +var _tag = __webpack_require__(53); + +var _tag2 = _interopRequireDefault(_tag); + +var _string = __webpack_require__(54); + +var _string2 = _interopRequireDefault(_string); + +var _pseudo = __webpack_require__(55); + +var _pseudo2 = _interopRequireDefault(_pseudo); + +var _attribute = __webpack_require__(56); + +var _attribute2 = _interopRequireDefault(_attribute); + +var _universal = __webpack_require__(57); + +var _universal2 = _interopRequireDefault(_universal); + +var _combinator = __webpack_require__(58); + +var _combinator2 = _interopRequireDefault(_combinator); + +var _nesting = __webpack_require__(59); + +var _nesting2 = _interopRequireDefault(_nesting); + +var _sortAscending = __webpack_require__(113); + +var _sortAscending2 = _interopRequireDefault(_sortAscending); + +var _tokenize = __webpack_require__(114); + +var _tokenize2 = _interopRequireDefault(_tokenize); + +var _types = __webpack_require__(0); + +var types = _interopRequireWildcard(_types); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj.default = obj; + return newObj; + } +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var Parser = function () { + function Parser(input) { + _classCallCheck(this, Parser); + + this.input = input; + this.lossy = input.options.lossless === false; + this.position = 0; + this.root = new _root2.default(); + var selectors = new _selector2.default(); + this.root.append(selectors); + this.current = selectors; + + if (this.lossy) { + this.tokens = (0, _tokenize2.default)({ + safe: input.safe, + css: input.css.trim() + }); + } else { + this.tokens = (0, _tokenize2.default)(input); + } + + return this.loop(); + } + + Parser.prototype.attribute = function attribute() { + var str = ''; + var attr = void 0; + var startingToken = this.currToken; + this.position++; + + while (this.position < this.tokens.length && this.currToken[0] !== ']') { + str += this.tokens[this.position][1]; + this.position++; + } + + if (this.position === this.tokens.length && !~str.indexOf(']')) { + this.error('Expected a closing square bracket.'); + } + + var parts = str.split(/((?:[*~^$|]?=))([^]*)/); + var namespace = parts[0].split(/(\|)/g); + var attributeProps = { + operator: parts[1], + value: parts[2], + source: { + start: { + line: startingToken[2], + column: startingToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: startingToken[4] + }; + + if (namespace.length > 1) { + if (namespace[0] === '') { + namespace[0] = true; + } + + attributeProps.attribute = this.parseValue(namespace[2]); + attributeProps.namespace = this.parseNamespace(namespace[0]); + } else { + attributeProps.attribute = this.parseValue(parts[0]); + } + + attr = new _attribute2.default(attributeProps); + + if (parts[2]) { + var insensitive = parts[2].split(/(\s+i\s*?)$/); + var trimmedValue = insensitive[0].trim(); + attr.value = this.lossy ? trimmedValue : insensitive[0]; + + if (insensitive[1]) { + attr.insensitive = true; + + if (!this.lossy) { + attr.raws.insensitive = insensitive[1]; + } + } + + attr.quoted = trimmedValue[0] === '\'' || trimmedValue[0] === '"'; + attr.raws.unquoted = attr.quoted ? trimmedValue.slice(1, -1) : trimmedValue; + } + + this.newNode(attr); + this.position++; + }; + + Parser.prototype.combinator = function combinator() { + if (this.currToken[1] === '|') { + return this.namespace(); + } + + var node = new _combinator2.default({ + value: '', + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: this.currToken[4] + }); + + while (this.position < this.tokens.length && this.currToken && (this.currToken[0] === 'space' || this.currToken[0] === 'combinator')) { + if (this.nextToken && this.nextToken[0] === 'combinator') { + node.spaces.before = this.parseSpace(this.currToken[1]); + node.source.start.line = this.nextToken[2]; + node.source.start.column = this.nextToken[3]; + node.source.end.column = this.nextToken[3]; + node.source.end.line = this.nextToken[2]; + node.sourceIndex = this.nextToken[4]; + } else if (this.prevToken && this.prevToken[0] === 'combinator') { + node.spaces.after = this.parseSpace(this.currToken[1]); + } else if (this.currToken[0] === 'combinator') { + node.value = this.currToken[1]; + } else if (this.currToken[0] === 'space') { + node.value = this.parseSpace(this.currToken[1], ' '); + } + + this.position++; + } + + return this.newNode(node); + }; + + Parser.prototype.comma = function comma() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = true; + this.position++; + return; + } + + var selectors = new _selector2.default(); + this.current.parent.append(selectors); + this.current = selectors; + this.position++; + }; + + Parser.prototype.comment = function comment() { + var node = new _comment2.default({ + value: this.currToken[1], + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[4], + column: this.currToken[5] + } + }, + sourceIndex: this.currToken[6] + }); + this.newNode(node); + this.position++; + }; + + Parser.prototype.error = function error(message) { + throw new this.input.error(message); // eslint-disable-line new-cap + }; + + Parser.prototype.missingBackslash = function missingBackslash() { + return this.error('Expected a backslash preceding the semicolon.'); + }; + + Parser.prototype.missingParenthesis = function missingParenthesis() { + return this.error('Expected opening parenthesis.'); + }; + + Parser.prototype.missingSquareBracket = function missingSquareBracket() { + return this.error('Expected opening square bracket.'); + }; + + Parser.prototype.namespace = function namespace() { + var before = this.prevToken && this.prevToken[1] || true; + + if (this.nextToken[0] === 'word') { + this.position++; + return this.word(before); + } else if (this.nextToken[0] === '*') { + this.position++; + return this.universal(before); + } + }; + + Parser.prototype.nesting = function nesting() { + this.newNode(new _nesting2.default({ + value: this.currToken[1], + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: this.currToken[4] + })); + this.position++; + }; + + Parser.prototype.parentheses = function parentheses() { + var last = this.current.last; + + if (last && last.type === types.PSEUDO) { + var selector = new _selector2.default(); + var cache = this.current; + last.append(selector); + this.current = selector; + var balanced = 1; + this.position++; + + while (this.position < this.tokens.length && balanced) { + if (this.currToken[0] === '(') { + balanced++; + } + + if (this.currToken[0] === ')') { + balanced--; + } + + if (balanced) { + this.parse(); + } else { + selector.parent.source.end.line = this.currToken[2]; + selector.parent.source.end.column = this.currToken[3]; + this.position++; + } + } + + if (balanced) { + this.error('Expected closing parenthesis.'); + } + + this.current = cache; + } else { + var _balanced = 1; + this.position++; + last.value += '('; + + while (this.position < this.tokens.length && _balanced) { + if (this.currToken[0] === '(') { + _balanced++; + } + + if (this.currToken[0] === ')') { + _balanced--; + } + + last.value += this.parseParenthesisToken(this.currToken); + this.position++; + } + + if (_balanced) { + this.error('Expected closing parenthesis.'); + } + } + }; + + Parser.prototype.pseudo = function pseudo() { + var _this = this; + + var pseudoStr = ''; + var startingToken = this.currToken; + + while (this.currToken && this.currToken[0] === ':') { + pseudoStr += this.currToken[1]; + this.position++; + } + + if (!this.currToken) { + return this.error('Expected pseudo-class or pseudo-element'); + } + + if (this.currToken[0] === 'word') { + var pseudo = void 0; + this.splitWord(false, function (first, length) { + pseudoStr += first; + pseudo = new _pseudo2.default({ + value: pseudoStr, + source: { + start: { + line: startingToken[2], + column: startingToken[3] + }, + end: { + line: _this.currToken[4], + column: _this.currToken[5] + } + }, + sourceIndex: startingToken[4] + }); + + _this.newNode(pseudo); + + if (length > 1 && _this.nextToken && _this.nextToken[0] === '(') { + _this.error('Misplaced parenthesis.'); + } + }); + } else { + this.error('Unexpected "' + this.currToken[0] + '" found.'); + } + }; + + Parser.prototype.space = function space() { + var token = this.currToken; // Handle space before and after the selector + + if (this.position === 0 || this.prevToken[0] === ',' || this.prevToken[0] === '(') { + this.spaces = this.parseSpace(token[1]); + this.position++; + } else if (this.position === this.tokens.length - 1 || this.nextToken[0] === ',' || this.nextToken[0] === ')') { + this.current.last.spaces.after = this.parseSpace(token[1]); + this.position++; + } else { + this.combinator(); + } + }; + + Parser.prototype.string = function string() { + var token = this.currToken; + this.newNode(new _string2.default({ + value: this.currToken[1], + source: { + start: { + line: token[2], + column: token[3] + }, + end: { + line: token[4], + column: token[5] + } + }, + sourceIndex: token[6] + })); + this.position++; + }; + + Parser.prototype.universal = function universal(namespace) { + var nextToken = this.nextToken; + + if (nextToken && nextToken[1] === '|') { + this.position++; + return this.namespace(); + } + + this.newNode(new _universal2.default({ + value: this.currToken[1], + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: this.currToken[4] + }), namespace); + this.position++; + }; + + Parser.prototype.splitWord = function splitWord(namespace, firstCallback) { + var _this2 = this; + + var nextToken = this.nextToken; + var word = this.currToken[1]; + + while (nextToken && nextToken[0] === 'word') { + this.position++; + var current = this.currToken[1]; + word += current; + + if (current.lastIndexOf('\\') === current.length - 1) { + var next = this.nextToken; + + if (next && next[0] === 'space') { + word += this.parseSpace(next[1], ' '); + this.position++; + } + } + + nextToken = this.nextToken; + } + + var hasClass = (0, _indexesOf2.default)(word, '.'); + var hasId = (0, _indexesOf2.default)(word, '#'); // Eliminate Sass interpolations from the list of id indexes + + var interpolations = (0, _indexesOf2.default)(word, '#{'); + + if (interpolations.length) { + hasId = hasId.filter(function (hashIndex) { + return !~interpolations.indexOf(hashIndex); + }); + } + + var indices = (0, _sortAscending2.default)((0, _uniq2.default)((0, _flatten2.default)([[0], hasClass, hasId]))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length; + var value = word.slice(ind, index); + + if (i === 0 && firstCallback) { + return firstCallback.call(_this2, value, indices.length); + } + + var node = void 0; + + if (~hasClass.indexOf(ind)) { + node = new _className2.default({ + value: value.slice(1), + source: { + start: { + line: _this2.currToken[2], + column: _this2.currToken[3] + ind + }, + end: { + line: _this2.currToken[4], + column: _this2.currToken[3] + (index - 1) + } + }, + sourceIndex: _this2.currToken[6] + indices[i] + }); + } else if (~hasId.indexOf(ind)) { + node = new _id2.default({ + value: value.slice(1), + source: { + start: { + line: _this2.currToken[2], + column: _this2.currToken[3] + ind + }, + end: { + line: _this2.currToken[4], + column: _this2.currToken[3] + (index - 1) + } + }, + sourceIndex: _this2.currToken[6] + indices[i] + }); + } else { + node = new _tag2.default({ + value: value, + source: { + start: { + line: _this2.currToken[2], + column: _this2.currToken[3] + ind + }, + end: { + line: _this2.currToken[4], + column: _this2.currToken[3] + (index - 1) + } + }, + sourceIndex: _this2.currToken[6] + indices[i] + }); + } + + _this2.newNode(node, namespace); + }); + this.position++; + }; + + Parser.prototype.word = function word(namespace) { + var nextToken = this.nextToken; + + if (nextToken && nextToken[1] === '|') { + this.position++; + return this.namespace(); + } + + return this.splitWord(namespace); + }; + + Parser.prototype.loop = function loop() { + while (this.position < this.tokens.length) { + this.parse(true); + } + + return this.root; + }; + + Parser.prototype.parse = function parse(throwOnParenthesis) { + switch (this.currToken[0]) { + case 'space': + this.space(); + break; + + case 'comment': + this.comment(); + break; + + case '(': + this.parentheses(); + break; + + case ')': + if (throwOnParenthesis) { + this.missingParenthesis(); + } + + break; + + case '[': + this.attribute(); + break; + + case ']': + this.missingSquareBracket(); + break; + + case 'at-word': + case 'word': + this.word(); + break; + + case ':': + this.pseudo(); + break; + + case ';': + this.missingBackslash(); + break; + + case ',': + this.comma(); + break; + + case '*': + this.universal(); + break; + + case '&': + this.nesting(); + break; + + case 'combinator': + this.combinator(); + break; + + case 'string': + this.string(); + break; + } + }; + /** + * Helpers + */ + + + Parser.prototype.parseNamespace = function parseNamespace(namespace) { + if (this.lossy && typeof namespace === 'string') { + var trimmed = namespace.trim(); + + if (!trimmed.length) { + return true; + } + + return trimmed; + } + + return namespace; + }; + + Parser.prototype.parseSpace = function parseSpace(space, replacement) { + return this.lossy ? replacement || '' : space; + }; + + Parser.prototype.parseValue = function parseValue(value) { + return this.lossy && value && typeof value === 'string' ? value.trim() : value; + }; + + Parser.prototype.parseParenthesisToken = function parseParenthesisToken(token) { + if (!this.lossy) { + return token[1]; + } + + if (token[0] === 'space') { + return this.parseSpace(token[1], ' '); + } + + return this.parseValue(token[1]); + }; + + Parser.prototype.newNode = function newNode(node, namespace) { + if (namespace) { + node.namespace = this.parseNamespace(namespace); + } + + if (this.spaces) { + node.spaces.before = this.spaces; + this.spaces = ''; + } + + return this.current.append(node); + }; + + _createClass(Parser, [{ + key: 'currToken', + get: function get() { + return this.tokens[this.position]; + } + }, { + key: 'nextToken', + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: 'prevToken', + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + + return Parser; +}(); + +exports.default = Parser; +module.exports = exports['default']; + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = sortAscending; + +function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); +} + +; +module.exports = exports["default"]; + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = tokenize; +var singleQuote = 39, + doubleQuote = 34, + backslash = 92, + slash = 47, + newline = 10, + space = 32, + feed = 12, + tab = 9, + cr = 13, + plus = 43, + gt = 62, + tilde = 126, + pipe = 124, + comma = 44, + openBracket = 40, + closeBracket = 41, + openSq = 91, + closeSq = 93, + semicolon = 59, + asterisk = 42, + colon = 58, + ampersand = 38, + at = 64, + atEnd = /[ \n\t\r\{\(\)'"\\;/]/g, + wordEnd = /[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g; + +function tokenize(input) { + var tokens = []; + var css = input.css.valueOf(); + var code = void 0, + next = void 0, + quote = void 0, + lines = void 0, + last = void 0, + content = void 0, + escape = void 0, + nextLine = void 0, + nextOffset = void 0, + escaped = void 0, + escapePos = void 0; + var length = css.length; + var offset = -1; + var line = 1; + var pos = 0; + + var unclosed = function unclosed(what, end) { + if (input.safe) { + css += end; + next = css.length - 1; + } else { + throw input.error('Unclosed ' + what, line, pos - offset, pos); + } + }; + + while (pos < length) { + code = css.charCodeAt(pos); + + if (code === newline) { + offset = pos; + line += 1; + } + + switch (code) { + case newline: + case space: + case tab: + case cr: + case feed: + next = pos; + + do { + next += 1; + code = css.charCodeAt(next); + + if (code === newline) { + offset = next; + line += 1; + } + } while (code === space || code === newline || code === tab || code === cr || code === feed); + + tokens.push(['space', css.slice(pos, next), line, pos - offset, pos]); + pos = next - 1; + break; + + case plus: + case gt: + case tilde: + case pipe: + next = pos; + + do { + next += 1; + code = css.charCodeAt(next); + } while (code === plus || code === gt || code === tilde || code === pipe); + + tokens.push(['combinator', css.slice(pos, next), line, pos - offset, pos]); + pos = next - 1; + break; + + case asterisk: + tokens.push(['*', '*', line, pos - offset, pos]); + break; + + case ampersand: + tokens.push(['&', '&', line, pos - offset, pos]); + break; + + case comma: + tokens.push([',', ',', line, pos - offset, pos]); + break; + + case openSq: + tokens.push(['[', '[', line, pos - offset, pos]); + break; + + case closeSq: + tokens.push([']', ']', line, pos - offset, pos]); + break; + + case colon: + tokens.push([':', ':', line, pos - offset, pos]); + break; + + case semicolon: + tokens.push([';', ';', line, pos - offset, pos]); + break; + + case openBracket: + tokens.push(['(', '(', line, pos - offset, pos]); + break; + + case closeBracket: + tokens.push([')', ')', line, pos - offset, pos]); + break; + + case singleQuote: + case doubleQuote: + quote = code === singleQuote ? "'" : '"'; + next = pos; + + do { + escaped = false; + next = css.indexOf(quote, next + 1); + + if (next === -1) { + unclosed('quote', quote); + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + tokens.push(['string', css.slice(pos, next + 1), line, pos - offset, line, next - offset, pos]); + pos = next; + break; + + case at: + atEnd.lastIndex = pos + 1; + atEnd.test(css); + + if (atEnd.lastIndex === 0) { + next = css.length - 1; + } else { + next = atEnd.lastIndex - 2; + } + + tokens.push(['at-word', css.slice(pos, next + 1), line, pos - offset, line, next - offset, pos]); + pos = next; + break; + + case backslash: + next = pos; + escape = true; + + while (css.charCodeAt(next + 1) === backslash) { + next += 1; + escape = !escape; + } + + code = css.charCodeAt(next + 1); + + if (escape && code !== slash && code !== space && code !== newline && code !== tab && code !== cr && code !== feed) { + next += 1; + } + + tokens.push(['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset, pos]); + pos = next; + break; + + default: + if (code === slash && css.charCodeAt(pos + 1) === asterisk) { + next = css.indexOf('*/', pos + 2) + 1; + + if (next === 0) { + unclosed('comment', '*/'); + } + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + tokens.push(['comment', content, line, pos - offset, nextLine, next - nextOffset, pos]); + offset = nextOffset; + line = nextLine; + pos = next; + } else { + wordEnd.lastIndex = pos + 1; + wordEnd.test(css); + + if (wordEnd.lastIndex === 0) { + next = css.length - 1; + } else { + next = wordEnd.lastIndex - 2; + } + + tokens.push(['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset, pos]); + pos = next; + } + + break; + } + + pos++; + } + + return tokens; +} + +module.exports = exports['default']; + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = parseMedia; + +var _Container = __webpack_require__(60); + +var _Container2 = _interopRequireDefault(_Container); + +var _parsers = __webpack_require__(116); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +/** + * Parses a media query list into an array of nodes. A typical node signature: + * {string} node.type -- one of: 'media-query', 'media-type', 'keyword', + * 'media-feature-expression', 'media-feature', 'colon', 'value' + * {string} node.value -- the contents of a particular element, trimmed + * e.g.: `screen`, `max-width`, `1024px` + * {string} node.after -- whitespaces that follow the element + * {string} node.before -- whitespaces that precede the element + * {string} node.sourceIndex -- the index of the element in a source media + * query list, 0-based + * {object} node.parent -- a link to the parent node (a container) + * + * Some nodes (media queries, media feature expressions) contain other nodes. + * They additionally have: + * {array} node.nodes -- an array of nodes of the type described here + * {funciton} node.each -- traverses direct children of the node, calling + * a callback for each one + * {funciton} node.walk -- traverses ALL descendants of the node, calling + * a callback for each one + */ + + +function parseMedia(value) { + return new _Container2.default({ + nodes: (0, _parsers.parseMediaList)(value), + type: 'media-query-list', + value: value.trim() + }); +} + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.parseMediaFeature = parseMediaFeature; +exports.parseMediaQuery = parseMediaQuery; +exports.parseMediaList = parseMediaList; + +var _Node = __webpack_require__(61); + +var _Node2 = _interopRequireDefault(_Node); + +var _Container = __webpack_require__(60); + +var _Container2 = _interopRequireDefault(_Container); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +/** + * Parses a media feature expression, e.g. `max-width: 10px`, `(color)` + * + * @param {string} string - the source expression string, can be inside parens + * @param {Number} index - the index of `string` in the overall input + * + * @return {Array} an array of Nodes, the first element being a media feature, + * the secont - its value (may be missing) + */ + + +function parseMediaFeature(string) { + var index = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1]; + var modesEntered = [{ + mode: 'normal', + character: null + }]; + var result = []; + var lastModeIndex = 0; + var mediaFeature = ''; + var colon = null; + var mediaFeatureValue = null; + var indexLocal = index; + var stringNormalized = string; // Strip trailing parens (if any), and correct the starting index + + if (string[0] === '(' && string[string.length - 1] === ')') { + stringNormalized = string.substring(1, string.length - 1); + indexLocal++; + } + + for (var i = 0; i < stringNormalized.length; i++) { + var character = stringNormalized[i]; // If entering/exiting a string + + if (character === '\'' || character === '"') { + if (modesEntered[lastModeIndex].isCalculationEnabled === true) { + modesEntered.push({ + mode: 'string', + isCalculationEnabled: false, + character: character + }); + lastModeIndex++; + } else if (modesEntered[lastModeIndex].mode === 'string' && modesEntered[lastModeIndex].character === character && stringNormalized[i - 1] !== '\\') { + modesEntered.pop(); + lastModeIndex--; + } + } // If entering/exiting interpolation + + + if (character === '{') { + modesEntered.push({ + mode: 'interpolation', + isCalculationEnabled: true + }); + lastModeIndex++; + } else if (character === '}') { + modesEntered.pop(); + lastModeIndex--; + } // If a : is met outside of a string, function call or interpolation, than + // this : separates a media feature and a value + + + if (modesEntered[lastModeIndex].mode === 'normal' && character === ':') { + var mediaFeatureValueStr = stringNormalized.substring(i + 1); + mediaFeatureValue = { + type: 'value', + before: /^(\s*)/.exec(mediaFeatureValueStr)[1], + after: /(\s*)$/.exec(mediaFeatureValueStr)[1], + value: mediaFeatureValueStr.trim() + }; // +1 for the colon + + mediaFeatureValue.sourceIndex = mediaFeatureValue.before.length + i + 1 + indexLocal; + colon = { + type: 'colon', + sourceIndex: i + indexLocal, + after: mediaFeatureValue.before, + value: ':' + }; + break; + } + + mediaFeature += character; + } // Forming a media feature node + + + mediaFeature = { + type: 'media-feature', + before: /^(\s*)/.exec(mediaFeature)[1], + after: /(\s*)$/.exec(mediaFeature)[1], + value: mediaFeature.trim() + }; + mediaFeature.sourceIndex = mediaFeature.before.length + indexLocal; + result.push(mediaFeature); + + if (colon !== null) { + colon.before = mediaFeature.after; + result.push(colon); + } + + if (mediaFeatureValue !== null) { + result.push(mediaFeatureValue); + } + + return result; +} +/** + * Parses a media query, e.g. `screen and (color)`, `only tv` + * + * @param {string} string - the source media query string + * @param {Number} index - the index of `string` in the overall input + * + * @return {Array} an array of Nodes and Containers + */ + + +function parseMediaQuery(string) { + var index = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1]; + var result = []; // How many timies the parser entered parens/curly braces + + var localLevel = 0; // Has any keyword, media type, media feature expression or interpolation + // ('element' hereafter) started + + var insideSomeValue = false; + var node = void 0; + + function resetNode() { + return { + before: '', + after: '', + value: '' + }; + } + + node = resetNode(); + + for (var i = 0; i < string.length; i++) { + var character = string[i]; // If not yet entered any element + + if (!insideSomeValue) { + if (character.search(/\s/) !== -1) { + // A whitespace + // Don't form 'after' yet; will do it later + node.before += character; + } else { + // Not a whitespace - entering an element + // Expression start + if (character === '(') { + node.type = 'media-feature-expression'; + localLevel++; + } + + node.value = character; + node.sourceIndex = index + i; + insideSomeValue = true; + } + } else { + // Already in the middle of some alement + node.value += character; // Here parens just increase localLevel and don't trigger a start of + // a media feature expression (since they can't be nested) + // Interpolation start + + if (character === '{' || character === '(') { + localLevel++; + } // Interpolation/function call/media feature expression end + + + if (character === ')' || character === '}') { + localLevel--; + } + } // If exited all parens/curlies and the next symbol + + + if (insideSomeValue && localLevel === 0 && (character === ')' || i === string.length - 1 || string[i + 1].search(/\s/) !== -1)) { + if (['not', 'only', 'and'].indexOf(node.value) !== -1) { + node.type = 'keyword'; + } // if it's an expression, parse its contents + + + if (node.type === 'media-feature-expression') { + node.nodes = parseMediaFeature(node.value, node.sourceIndex); + } + + result.push(Array.isArray(node.nodes) ? new _Container2.default(node) : new _Node2.default(node)); + node = resetNode(); + insideSomeValue = false; + } + } // Now process the result array - to specify undefined types of the nodes + // and specify the `after` prop + + + for (var _i = 0; _i < result.length; _i++) { + node = result[_i]; + + if (_i > 0) { + result[_i - 1].after = node.before; + } // Node types. Might not be set because contains interpolation/function + // calls or fully consists of them + + + if (node.type === undefined) { + if (_i > 0) { + // only `and` can follow an expression + if (result[_i - 1].type === 'media-feature-expression') { + node.type = 'keyword'; + continue; + } // Anything after 'only|not' is a media type + + + if (result[_i - 1].value === 'not' || result[_i - 1].value === 'only') { + node.type = 'media-type'; + continue; + } // Anything after 'and' is an expression + + + if (result[_i - 1].value === 'and') { + node.type = 'media-feature-expression'; + continue; + } + + if (result[_i - 1].type === 'media-type') { + // if it is the last element - it might be an expression + // or 'and' depending on what is after it + if (!result[_i + 1]) { + node.type = 'media-feature-expression'; + } else { + node.type = result[_i + 1].type === 'media-feature-expression' ? 'keyword' : 'media-feature-expression'; + } + } + } + + if (_i === 0) { + // `screen`, `fn( ... )`, `#{ ... }`. Not an expression, since then + // its type would have been set by now + if (!result[_i + 1]) { + node.type = 'media-type'; + continue; + } // `screen and` or `#{...} (max-width: 10px)` + + + if (result[_i + 1] && (result[_i + 1].type === 'media-feature-expression' || result[_i + 1].type === 'keyword')) { + node.type = 'media-type'; + continue; + } + + if (result[_i + 2]) { + // `screen and (color) ...` + if (result[_i + 2].type === 'media-feature-expression') { + node.type = 'media-type'; + result[_i + 1].type = 'keyword'; + continue; + } // `only screen and ...` + + + if (result[_i + 2].type === 'keyword') { + node.type = 'keyword'; + result[_i + 1].type = 'media-type'; + continue; + } + } + + if (result[_i + 3]) { + // `screen and (color) ...` + if (result[_i + 3].type === 'media-feature-expression') { + node.type = 'keyword'; + result[_i + 1].type = 'media-type'; + result[_i + 2].type = 'keyword'; + continue; + } + } + } + } + } + + return result; +} +/** + * Parses a media query list. Takes a possible `url()` at the start into + * account, and divides the list into media queries that are parsed separately + * + * @param {string} string - the source media query list string + * + * @return {Array} an array of Nodes/Containers + */ + + +function parseMediaList(string) { + var result = []; + var interimIndex = 0; + var levelLocal = 0; // Check for a `url(...)` part (if it is contents of an @import rule) + + var doesHaveUrl = /^(\s*)url\s*\(/.exec(string); + + if (doesHaveUrl !== null) { + var i = doesHaveUrl[0].length; + var parenthesesLv = 1; + + while (parenthesesLv > 0) { + var character = string[i]; + + if (character === '(') { + parenthesesLv++; + } + + if (character === ')') { + parenthesesLv--; + } + + i++; + } + + result.unshift(new _Node2.default({ + type: 'url', + value: string.substring(0, i).trim(), + sourceIndex: doesHaveUrl[1].length, + before: doesHaveUrl[1], + after: /^(\s*)/.exec(string.substring(i))[1] + })); + interimIndex = i; + } // Start processing the media query list + + + for (var _i2 = interimIndex; _i2 < string.length; _i2++) { + var _character = string[_i2]; // Dividing the media query list into comma-separated media queries + // Only count commas that are outside of any parens + // (i.e., not part of function call params list, etc.) + + if (_character === '(') { + levelLocal++; + } + + if (_character === ')') { + levelLocal--; + } + + if (levelLocal === 0 && _character === ',') { + var _mediaQueryString = string.substring(interimIndex, _i2); + + var _spaceBefore = /^(\s*)/.exec(_mediaQueryString)[1]; + result.push(new _Container2.default({ + type: 'media-query', + value: _mediaQueryString.trim(), + sourceIndex: interimIndex + _spaceBefore.length, + nodes: parseMediaQuery(_mediaQueryString, interimIndex), + before: _spaceBefore, + after: /(\s*)$/.exec(_mediaQueryString)[1] + })); + interimIndex = _i2 + 1; + } + } + + var mediaQueryString = string.substring(interimIndex); + var spaceBefore = /^(\s*)/.exec(mediaQueryString)[1]; + result.push(new _Container2.default({ + type: 'media-query', + value: mediaQueryString.trim(), + sourceIndex: interimIndex + spaceBefore.length, + nodes: parseMediaQuery(mediaQueryString, interimIndex), + before: spaceBefore, + after: /(\s*)$/.exec(mediaQueryString)[1] + })); + return result; +} + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _scssStringify = __webpack_require__(118); + +var _scssStringify2 = _interopRequireDefault(_scssStringify); + +var _scssParse = __webpack_require__(120); + +var _scssParse2 = _interopRequireDefault(_scssParse); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +exports.default = { + parse: _scssParse2.default, + stringify: _scssStringify2.default +}; +module.exports = exports['default']; + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = scssStringify; + +var _scssStringifier = __webpack_require__(119); + +var _scssStringifier2 = _interopRequireDefault(_scssStringifier); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function scssStringify(node, builder) { + var str = new _scssStringifier2.default(builder); + str.stringify(node); +} + +module.exports = exports['default']; + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _stringifier = __webpack_require__(17); + +var _stringifier2 = _interopRequireDefault(_stringifier); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var ScssStringifier = function (_Stringifier) { + _inherits(ScssStringifier, _Stringifier); + + function ScssStringifier() { + _classCallCheck(this, ScssStringifier); + + return _possibleConstructorReturn(this, _Stringifier.apply(this, arguments)); + } + + ScssStringifier.prototype.comment = function comment(node) { + var left = this.raw(node, 'left', 'commentLeft'); + var right = this.raw(node, 'right', 'commentRight'); + + if (node.raws.inline) { + var text = node.raws.text || node.text; + this.builder('//' + left + text + right, node); + } else { + this.builder('/*' + left + node.text + right + '*/', node); + } + }; + + ScssStringifier.prototype.decl = function decl(node, semicolon) { + if (!node.isNested) { + _Stringifier.prototype.decl.call(this, node, semicolon); + } else { + var between = this.raw(node, 'between', 'colon'); + var string = node.prop + between + this.rawValue(node, 'value'); + + if (node.important) { + string += node.raws.important || ' !important'; + } + + this.builder(string + '{', node, 'start'); + var after = void 0; + + if (node.nodes && node.nodes.length) { + this.body(node); + after = this.raw(node, 'after'); + } else { + after = this.raw(node, 'after', 'emptyBody'); + } + + if (after) this.builder(after); + this.builder('}', node, 'end'); + } + }; + + ScssStringifier.prototype.rawValue = function rawValue(node, prop) { + var value = node[prop]; + var raw = node.raws[prop]; + + if (raw && raw.value === value) { + return raw.scss ? raw.scss : raw.raw; + } else { + return value; + } + }; + + return ScssStringifier; +}(_stringifier2.default); + +exports.default = ScssStringifier; +module.exports = exports['default']; + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = scssParse; + +var _input = __webpack_require__(18); + +var _input2 = _interopRequireDefault(_input); + +var _scssParser = __webpack_require__(134); + +var _scssParser2 = _interopRequireDefault(_scssParser); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function scssParse(scss, opts) { + var input = new _input2.default(scss, opts); + var parser = new _scssParser2.default(input); + parser.parse(); + return parser.root; +} + +module.exports = exports['default']; + +/***/ }), +/* 121 */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _chalk = __webpack_require__(63); + +var _chalk2 = _interopRequireDefault(_chalk); + +var _tokenize = __webpack_require__(64); + +var _tokenize2 = _interopRequireDefault(_tokenize); + +var _input = __webpack_require__(18); + +var _input2 = _interopRequireDefault(_input); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var HIGHLIGHT_THEME = { + 'brackets': _chalk2.default.cyan, + 'at-word': _chalk2.default.cyan, + 'call': _chalk2.default.cyan, + 'comment': _chalk2.default.gray, + 'string': _chalk2.default.green, + 'class': _chalk2.default.yellow, + 'hash': _chalk2.default.magenta, + '(': _chalk2.default.cyan, + ')': _chalk2.default.cyan, + '{': _chalk2.default.yellow, + '}': _chalk2.default.yellow, + '[': _chalk2.default.yellow, + ']': _chalk2.default.yellow, + ':': _chalk2.default.yellow, + ';': _chalk2.default.yellow +}; + +function getTokenType(_ref, processor) { + var type = _ref[0], + value = _ref[1]; + + if (type === 'word') { + if (value[0] === '.') { + return 'class'; + } + + if (value[0] === '#') { + return 'hash'; + } + } + + if (!processor.endOfFile()) { + var next = processor.nextToken(); + processor.back(next); + if (next[0] === 'brackets' || next[0] === '(') return 'call'; + } + + return type; +} + +function terminalHighlight(css) { + var processor = (0, _tokenize2.default)(new _input2.default(css), { + ignoreErrors: true + }); + var result = ''; + + var _loop = function _loop() { + var token = processor.nextToken(); + var color = HIGHLIGHT_THEME[getTokenType(token, processor)]; + + if (color) { + result += token[1].split(/\r?\n/).map(function (i) { + return color(i); + }).join('\n'); + } else { + result += token[1]; + } + }; + + while (!processor.endOfFile()) { + _loop(); + } + + return result; +} + +exports.default = terminalHighlight; +module.exports = exports['default']; + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _sourceMap = __webpack_require__(65); + +var _sourceMap2 = _interopRequireDefault(_sourceMap); + +var _path = __webpack_require__(6); + +var _path2 = _interopRequireDefault(_path); + +var _fs = __webpack_require__(133); + +var _fs2 = _interopRequireDefault(_fs); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function fromBase64(str) { + if (Buffer) { + if (Buffer.from && Buffer.from !== Uint8Array.from) { + return Buffer.from(str, 'base64').toString(); + } else { + return new Buffer(str, 'base64').toString(); + } + } else { + return window.atob(str); + } +} +/** + * Source map information from input CSS. + * For example, source map after Sass compiler. + * + * This class will automatically find source map in input CSS or in file system + * near input file (according `from` option). + * + * @example + * const root = postcss.parse(css, { from: 'a.sass.css' }); + * root.input.map //=> PreviousMap + */ + + +var PreviousMap = function () { + /** + * @param {string} css - input CSS source + * @param {processOptions} [opts] - {@link Processor#process} options + */ + function PreviousMap(css, opts) { + _classCallCheck(this, PreviousMap); + + this.loadAnnotation(css); + /** + * @member {boolean} - Was source map inlined by data-uri to input CSS. + */ + + this.inline = this.startWith(this.annotation, 'data:'); + var prev = opts.map ? opts.map.prev : undefined; + var text = this.loadMap(opts.from, prev); + if (text) this.text = text; + } + /** + * Create a instance of `SourceMapGenerator` class + * from the `source-map` library to work with source map information. + * + * It is lazy method, so it will create object only on first call + * and then it will use cache. + * + * @return {SourceMapGenerator} object with source map information + */ + + + PreviousMap.prototype.consumer = function consumer() { + if (!this.consumerCache) { + this.consumerCache = new _sourceMap2.default.SourceMapConsumer(this.text); + } + + return this.consumerCache; + }; + /** + * Does source map contains `sourcesContent` with input source text. + * + * @return {boolean} Is `sourcesContent` present + */ + + + PreviousMap.prototype.withContent = function withContent() { + return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0); + }; + + PreviousMap.prototype.startWith = function startWith(string, start) { + if (!string) return false; + return string.substr(0, start.length) === start; + }; + + PreviousMap.prototype.loadAnnotation = function loadAnnotation(css) { + var match = css.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//); + if (match) this.annotation = match[1].trim(); + }; + + PreviousMap.prototype.decodeInline = function decodeInline(text) { + // data:application/json;charset=utf-8;base64, + // data:application/json;charset=utf8;base64, + // data:application/json;base64, + var baseUri = /^data:application\/json;(?:charset=utf-?8;)?base64,/; + var uri = 'data:application/json,'; + + if (this.startWith(text, uri)) { + return decodeURIComponent(text.substr(uri.length)); + } else if (baseUri.test(text)) { + return fromBase64(text.substr(RegExp.lastMatch.length)); + } else { + var encoding = text.match(/data:application\/json;([^,]+),/)[1]; + throw new Error('Unsupported source map encoding ' + encoding); + } + }; + + PreviousMap.prototype.loadMap = function loadMap(file, prev) { + if (prev === false) return false; + + if (prev) { + if (typeof prev === 'string') { + return prev; + } else if (typeof prev === 'function') { + var prevPath = prev(file); + + if (prevPath && _fs2.default.existsSync && _fs2.default.existsSync(prevPath)) { + return _fs2.default.readFileSync(prevPath, 'utf-8').toString().trim(); + } else { + throw new Error('Unable to load previous source map: ' + prevPath.toString()); + } + } else if (prev instanceof _sourceMap2.default.SourceMapConsumer) { + return _sourceMap2.default.SourceMapGenerator.fromSourceMap(prev).toString(); + } else if (prev instanceof _sourceMap2.default.SourceMapGenerator) { + return prev.toString(); + } else if (this.isMap(prev)) { + return JSON.stringify(prev); + } else { + throw new Error('Unsupported previous source map format: ' + prev.toString()); + } + } else if (this.inline) { + return this.decodeInline(this.annotation); + } else if (this.annotation) { + var map = this.annotation; + if (file) map = _path2.default.join(_path2.default.dirname(file), map); + this.root = _path2.default.dirname(map); + + if (_fs2.default.existsSync && _fs2.default.existsSync(map)) { + return _fs2.default.readFileSync(map, 'utf-8').toString().trim(); + } else { + return false; + } + } + }; + + PreviousMap.prototype.isMap = function isMap(map) { + if ((typeof map === 'undefined' ? 'undefined' : _typeof(map)) !== 'object') return false; + return typeof map.mappings === 'string' || typeof map._mappings === 'string'; + }; + + return PreviousMap; +}(); + +exports.default = PreviousMap; +module.exports = exports['default']; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19).Buffer)) + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.byteLength = byteLength; +exports.toByteArray = toByteArray; +exports.fromByteArray = fromByteArray; +var lookup = []; +var revLookup = []; +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; +} + +revLookup['-'.charCodeAt(0)] = 62; +revLookup['_'.charCodeAt(0)] = 63; + +function placeHoldersCount(b64) { + var len = b64.length; + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4'); + } // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + + + return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; +} + +function byteLength(b64) { + // base64 is 4/3 + up to two characters of the original data + return b64.length * 3 / 4 - placeHoldersCount(b64); +} + +function toByteArray(b64) { + var i, j, l, tmp, placeHolders, arr; + var len = b64.length; + placeHolders = placeHoldersCount(b64); + arr = new Arr(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars + + l = placeHolders > 0 ? len - 4 : len; + var L = 0; + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)]; + arr[L++] = tmp >> 16 & 0xFF; + arr[L++] = tmp >> 8 & 0xFF; + arr[L++] = tmp & 0xFF; + } + + if (placeHolders === 2) { + tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4; + arr[L++] = tmp & 0xFF; + } else if (placeHolders === 1) { + tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2; + arr[L++] = tmp >> 8 & 0xFF; + arr[L++] = tmp & 0xFF; + } + + return arr; +} + +function tripletToBase64(num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; +} + +function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2]; + output.push(tripletToBase64(tmp)); + } + + return output.join(''); +} + +function fromByteArray(uint8) { + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + + var output = ''; + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + // go through the array every three bytes, we'll deal with trailing stuff later + + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength)); + } // pad the end with zeros, but make sure to not forget the extra bytes + + + if (extraBytes === 1) { + tmp = uint8[len - 1]; + output += lookup[tmp >> 2]; + output += lookup[tmp << 4 & 0x3F]; + output += '=='; + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + output += lookup[tmp >> 10]; + output += lookup[tmp >> 4 & 0x3F]; + output += lookup[tmp << 2 & 0x3F]; + output += '='; + } + + parts.push(output); + return parts.join(''); +} + +/***/ }), +/* 125 */ +/***/ (function(module, exports) { + +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? nBytes - 1 : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + i += d; + e = s & (1 << -nBits) - 1; + s >>= -nBits; + nBits += eLen; + + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : (s ? -1 : 1) * Infinity; + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); +}; + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; + var i = isLE ? 0 : nBytes - 1; + var d = isLE ? 1 : -1; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = e << mLen | m; + eLen += mLen; + + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; +}; + +/***/ }), +/* 126 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + +/***/ }), +/* 127 */ +/***/ (function(module, exports) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + + throw new TypeError("Must be between 0 and 63: " + number); +}; +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + + +exports.decode = function (charCode) { + var bigA = 65; // 'A' + + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + + var littleZ = 122; // 'z' + + var zero = 48; // '0' + + var nine = 57; // '9' + + var plus = 43; // '+' + + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + + if (bigA <= charCode && charCode <= bigZ) { + return charCode - bigA; + } // 26 - 51: abcdefghijklmnopqrstuvwxyz + + + if (littleA <= charCode && charCode <= littleZ) { + return charCode - littleA + littleOffset; + } // 52 - 61: 0123456789 + + + if (zero <= charCode && charCode <= nine) { + return charCode - zero + numberOffset; + } // 62: + + + + if (charCode == plus) { + return 62; + } // 63: / + + + if (charCode == slash) { + return 63; + } // Invalid base64 digit. + + + return -1; +}; + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var util = __webpack_require__(8); +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + + +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + + +function MappingList() { + this._array = []; + this._sorted = true; // Serves as infimum + + this._last = { + generatedLine: -1, + generatedColumn: 0 + }; +} +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + + +MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); +}; +/** + * Add the given source mapping. + * + * @param Object aMapping + */ + + +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + + this._array.push(aMapping); + } else { + this._sorted = false; + + this._array.push(aMapping); + } +}; +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + + +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + + this._sorted = true; + } + + return this._array; +}; + +exports.MappingList = MappingList; + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var util = __webpack_require__(8); + +var binarySearch = __webpack_require__(130); + +var ArraySet = __webpack_require__(68).ArraySet; + +var base64VLQ = __webpack_require__(67); + +var quickSort = __webpack_require__(131).quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function (aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +}; +/** + * The version of the source mapping spec that we are consuming. + */ + + +SourceMapConsumer.prototype._version = 3; // `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function get() { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function get() { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; +}; +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + + +SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); +}; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + +SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var mappings; + + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); +}; +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + + +SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + needle.source = this._findSourceIndex(needle.source); + + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + + while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; +}; + +exports.SourceMapConsumer = SourceMapConsumer; +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources.map(String) // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; + }); // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + +BasicSourceMapConsumer.prototype._findSourceIndex = function (aSource) { + var relativeSource = aSource; + + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + + + var i; + + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + + +BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping(); + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + return smc; +}; +/** + * The version of the source mapping spec that we are consuming. + */ + + +BasicSourceMapConsumer.prototype._version = 3; +/** + * The list of original sources. + */ + +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function get() { + return this._absoluteSources.slice(); + } +}); +/** + * Provide the JIT with a nice shape / hidden class. + */ + +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + + +BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } else if (aStr.charAt(index) === ',') { + index++; + } else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + + str = aStr.slice(index, end); + segment = cachedSegments[str]; + + if (segment) { + index += str.length; + } else { + segment = []; + + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } // Generated column. + + + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; // Original line. + + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; // Lines are stored 0-based + + mapping.originalLine += 1; // Original column. + + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; +}; +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + + +BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]); + } + + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); +}; +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + + +BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } // The last mapping for each line spans the entire line. + + + mapping.lastGeneratedColumn = Infinity; + } +}; +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + + +BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + + var name = util.getArg(mapping, 'name', null); + + if (name !== null) { + name = this._names.at(name); + } + + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; +}; +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + + +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + + return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) { + return sc == null; + }); +}; +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + + +BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + + if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + + if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; + } + + if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + + + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } +}; +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + + +BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; +}; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + + lastOffset = offset; + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + }; + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; +/** + * The version of the source mapping spec that we are consuming. + */ + +IndexedSourceMapConsumer.prototype._version = 3; +/** + * The list of original sources. + */ + +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function get() { + var sources = []; + + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + + return sources; + } +}); +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + +IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; // Find the section containing the generated position we're trying to map + // to an original position. + + var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + + if (cmp) { + return cmp; + } + + return needle.generatedColumn - section.generatedOffset.generatedColumn; + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + bias: aArgs.bias + }); +}; +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + + +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); +}; +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + + +IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var content = section.consumer.sourceContentFor(aSource, true); + + if (content) { + return content; + } + } + + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } +}; +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + + +IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; // Only consider this section if the requested source is in the list of + // sources of the consumer. + + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + + if (generatedPosition) { + var ret = { + line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; +}; +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + + +IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + + this._sources.add(source); + + source = this._sources.indexOf(source); + var name = null; + + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + + this._names.add(name); + + name = this._names.indexOf(name); + } // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + + + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); +}; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + +/***/ }), +/* 130 */ +/***/ (function(module, exports) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + + + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } // we are in termination case (3) or (2) and return the appropriate thing. + + + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + + +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND); + + if (index < 0) { + return -1; + } // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + + + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + + --index; + } + + return index; +}; + +/***/ }), +/* 131 */ +/***/ (function(module, exports) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + + +function randomIntInRange(low, high) { + return Math.round(low + Math.random() * (high - low)); +} +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + + +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + swap(ary, pivotIndex, r); + var pivot = ary[r]; // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + + +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var SourceMapGenerator = __webpack_require__(66).SourceMapGenerator; + +var util = __webpack_require__(8); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). + + +var REGEX_NEWLINE = /(\r?\n)/; // Newline character code for charCodeAt() comparisons + +var NEWLINE_CODE = 10; // Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! + +var isSourceNode = "$$$isSourceNode$$$"; +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + + +SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + + var shiftNextLine = function shiftNextLine() { + var lineContents = getNextLine(); // The last line of a file might not have a newline. + + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined; + } + }; // We need to remember the position of "remainingLines" + + + var lastGeneratedLine = 1, + lastGeneratedColumn = 0; // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + + var lastMapping = null; + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); // No more remaining code, continue + + lastMapping = mapping; + return; + } + } // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + + + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + + lastMapping = mapping; + }, this); // We have processed all mappings. + + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } // and add the remaining lines without any mapping + + + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } // Copy sourcesContent into SourceNode + + + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + + node.setSourceContent(sourceFile, content); + } + }); + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; + node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name)); + } + } +}; +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + + +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + + return this; +}; +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + + +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length - 1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + + return this; +}; +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + + +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } else { + if (chunk !== '') { + aFn(chunk, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }); + } + } + } +}; +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + + +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + + if (len > 0) { + newChildren = []; + + for (i = 0; i < len - 1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + + newChildren.push(this.children[i]); + this.children = newChildren; + } + + return this; +}; +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + + +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } else { + this.children.push(''.replace(aPattern, aReplacement)); + } + + return this; +}; +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + + +SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; +}; +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + + +SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } +}; +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + + +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; +/** + * Returns the string representation of this source node along with a source + * map. + */ + + +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + + if (original.source !== null && original.line !== null && original.column !== null) { + if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; // Mappings end at eol + + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + return { + code: generated.code, + map: map + }; +}; + +exports.SourceNode = SourceNode; + +/***/ }), +/* 133 */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _comment = __webpack_require__(20); + +var _comment2 = _interopRequireDefault(_comment); + +var _parser = __webpack_require__(71); + +var _parser2 = _interopRequireDefault(_parser); + +var _nestedDeclaration = __webpack_require__(140); + +var _nestedDeclaration2 = _interopRequireDefault(_nestedDeclaration); + +var _scssTokenize = __webpack_require__(141); + +var _scssTokenize2 = _interopRequireDefault(_scssTokenize); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var ScssParser = function (_Parser) { + _inherits(ScssParser, _Parser); + + function ScssParser() { + _classCallCheck(this, ScssParser); + + return _possibleConstructorReturn(this, _Parser.apply(this, arguments)); + } + + ScssParser.prototype.createTokenizer = function createTokenizer() { + this.tokenizer = (0, _scssTokenize2.default)(this.input); + }; + + ScssParser.prototype.rule = function rule(tokens) { + var withColon = false; + var brackets = 0; + var value = ''; + + for (var _iterator = tokens, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var i = _ref; + + if (withColon) { + if (i[0] !== 'comment' && i[0] !== '{') { + value += i[1]; + } + } else if (i[0] === 'space' && i[1].indexOf('\n') !== -1) { + break; + } else if (i[0] === '(') { + brackets += 1; + } else if (i[0] === ')') { + brackets -= 1; + } else if (brackets === 0 && i[0] === ':') { + withColon = true; + } + } + + if (!withColon || value.trim() === '' || /^[a-zA-Z-:#]/.test(value)) { + _Parser.prototype.rule.call(this, tokens); + } else { + tokens.pop(); + var node = new _nestedDeclaration2.default(); + this.init(node); + var last = tokens[tokens.length - 1]; + + if (last[4]) { + node.source.end = { + line: last[4], + column: last[5] + }; + } else { + node.source.end = { + line: last[2], + column: last[3] + }; + } + + while (tokens[0][0] !== 'word') { + node.raws.before += tokens.shift()[1]; + } + + node.source.start = { + line: tokens[0][2], + column: tokens[0][3] + }; + node.prop = ''; + + while (tokens.length) { + var type = tokens[0][0]; + + if (type === ':' || type === 'space' || type === 'comment') { + break; + } + + node.prop += tokens.shift()[1]; + } + + node.raws.between = ''; + var token = void 0; + + while (tokens.length) { + token = tokens.shift(); + + if (token[0] === ':') { + node.raws.between += token[1]; + break; + } else { + node.raws.between += token[1]; + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0]; + node.prop = node.prop.slice(1); + } + + node.raws.between += this.spacesAndCommentsFromStart(tokens); + this.precheckMissedSemicolon(tokens); + + for (var _i2 = tokens.length - 1; _i2 > 0; _i2--) { + token = tokens[_i2]; + + if (token[1] === '!important') { + node.important = true; + var string = this.stringFrom(tokens, _i2); + string = this.spacesFromEnd(tokens) + string; + + if (string !== ' !important') { + node.raws.important = string; + } + + break; + } else if (token[1] === 'important') { + var cache = tokens.slice(0); + var str = ''; + + for (var j = _i2; j > 0; j--) { + var _type = cache[j][0]; + + if (str.trim().indexOf('!') === 0 && _type !== 'space') { + break; + } + + str = cache.pop()[1] + str; + } + + if (str.trim().indexOf('!') === 0) { + node.important = true; + node.raws.important = str; + tokens = cache; + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break; + } + } + + this.raw(node, 'value', tokens); + + if (node.value.indexOf(':') !== -1) { + this.checkMissedSemicolon(tokens); + } + + this.current = node; + } + }; + + ScssParser.prototype.comment = function comment(token) { + if (token[6] === 'inline') { + var node = new _comment2.default(); + this.init(node, token[2], token[3]); + node.raws.inline = true; + node.source.end = { + line: token[4], + column: token[5] + }; + var text = token[1].slice(2); + + if (/^\s*$/.test(text)) { + node.text = ''; + node.raws.left = text; + node.raws.right = ''; + } else { + var match = text.match(/^(\s*)([^]*[^\s])(\s*)$/); + var fixed = match[2].replace(/(\*\/|\/\*)/g, '*//*'); + node.text = fixed; + node.raws.left = match[1]; + node.raws.right = match[3]; + node.raws.text = match[2]; + } + } else { + _Parser.prototype.comment.call(this, token); + } + }; + + ScssParser.prototype.raw = function raw(node, prop, tokens) { + _Parser.prototype.raw.call(this, node, prop, tokens); + + if (node.raws[prop]) { + var scss = node.raws[prop].raw; + node.raws[prop].raw = tokens.reduce(function (all, i) { + if (i[0] === 'comment' && i[6] === 'inline') { + var text = i[1].slice(2).replace(/(\*\/|\/\*)/g, '*//*'); + return all + '/*' + text + '*/'; + } else { + return all + i[1]; + } + }, ''); + + if (scss !== node.raws[prop].raw) { + node.raws[prop].scss = scss; + } + } + }; + + return ScssParser; +}(_parser2.default); + +exports.default = ScssParser; +module.exports = exports['default']; + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +/** + * Contains helpers for safely splitting lists of CSS values, + * preserving parentheses and quotes. + * + * @example + * const list = postcss.list; + * + * @namespace list + */ + +var list = { + split: function split(string, separators, last) { + var array = []; + var current = ''; + var split = false; + var func = 0; + var quote = false; + var escape = false; + + for (var i = 0; i < string.length; i++) { + var letter = string[i]; + + if (quote) { + if (escape) { + escape = false; + } else if (letter === '\\') { + escape = true; + } else if (letter === quote) { + quote = false; + } + } else if (letter === '"' || letter === '\'') { + quote = letter; + } else if (letter === '(') { + func += 1; + } else if (letter === ')') { + if (func > 0) func -= 1; + } else if (func === 0) { + if (separators.indexOf(letter) !== -1) split = true; + } + + if (split) { + if (current !== '') array.push(current.trim()); + current = ''; + split = false; + } else { + current += letter; + } + } + + if (last || current !== '') array.push(current.trim()); + return array; + }, + + /** + * Safely splits space-separated values (such as those for `background`, + * `border-radius`, and other shorthand properties). + * + * @param {string} string - space-separated values + * + * @return {string[]} split values + * + * @example + * postcss.list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)'] + */ + space: function space(string) { + var spaces = [' ', '\n', '\t']; + return list.split(string, spaces); + }, + + /** + * Safely splits comma-separated values (such as those for `transition-*` + * and `background` properties). + * + * @param {string} string - comma-separated values + * + * @return {string[]} split values + * + * @example + * postcss.list.comma('black, linear-gradient(white, black)') + * //=> ['black', 'linear-gradient(white, black)'] + */ + comma: function comma(string) { + var comma = ','; + return list.split(string, [comma], true); + } +}; +exports.default = list; +module.exports = exports['default']; + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +exports.__esModule = true; + +var _sourceMap = __webpack_require__(65); + +var _sourceMap2 = _interopRequireDefault(_sourceMap); + +var _path = __webpack_require__(6); + +var _path2 = _interopRequireDefault(_path); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var MapGenerator = function () { + function MapGenerator(stringify, root, opts) { + _classCallCheck(this, MapGenerator); + + this.stringify = stringify; + this.mapOpts = opts.map || {}; + this.root = root; + this.opts = opts; + } + + MapGenerator.prototype.isMap = function isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map; + } else { + return this.previous().length > 0; + } + }; + + MapGenerator.prototype.previous = function previous() { + var _this = this; + + if (!this.previousMaps) { + this.previousMaps = []; + this.root.walk(function (node) { + if (node.source && node.source.input.map) { + var map = node.source.input.map; + + if (_this.previousMaps.indexOf(map) === -1) { + _this.previousMaps.push(map); + } + } + }); + } + + return this.previousMaps; + }; + + MapGenerator.prototype.isInline = function isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline; + } + + var annotation = this.mapOpts.annotation; + + if (typeof annotation !== 'undefined' && annotation !== true) { + return false; + } + + if (this.previous().length) { + return this.previous().some(function (i) { + return i.inline; + }); + } else { + return true; + } + }; + + MapGenerator.prototype.isSourcesContent = function isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent; + } + + if (this.previous().length) { + return this.previous().some(function (i) { + return i.withContent(); + }); + } else { + return true; + } + }; + + MapGenerator.prototype.clearAnnotation = function clearAnnotation() { + if (this.mapOpts.annotation === false) return; + var node = void 0; + + for (var i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i]; + if (node.type !== 'comment') continue; + + if (node.text.indexOf('# sourceMappingURL=') === 0) { + this.root.removeChild(i); + } + } + }; + + MapGenerator.prototype.setSourcesContent = function setSourcesContent() { + var _this2 = this; + + var already = {}; + this.root.walk(function (node) { + if (node.source) { + var from = node.source.input.from; + + if (from && !already[from]) { + already[from] = true; + + var relative = _this2.relative(from); + + _this2.map.setSourceContent(relative, node.source.input.css); + } + } + }); + }; + + MapGenerator.prototype.applyPrevMaps = function applyPrevMaps() { + for (var _iterator = this.previous(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var prev = _ref; + var from = this.relative(prev.file); + + var root = prev.root || _path2.default.dirname(prev.file); + + var map = void 0; + + if (this.mapOpts.sourcesContent === false) { + map = new _sourceMap2.default.SourceMapConsumer(prev.text); + + if (map.sourcesContent) { + map.sourcesContent = map.sourcesContent.map(function () { + return null; + }); + } + } else { + map = prev.consumer(); + } + + this.map.applySourceMap(map, from, this.relative(root)); + } + }; + + MapGenerator.prototype.isAnnotation = function isAnnotation() { + if (this.isInline()) { + return true; + } else if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation; + } else if (this.previous().length) { + return this.previous().some(function (i) { + return i.annotation; + }); + } else { + return true; + } + }; + + MapGenerator.prototype.toBase64 = function toBase64(str) { + if (Buffer) { + if (Buffer.from && Buffer.from !== Uint8Array.from) { + return Buffer.from(str).toString('base64'); + } else { + return new Buffer(str).toString('base64'); + } + } else { + return window.btoa(unescape(encodeURIComponent(str))); + } + }; + + MapGenerator.prototype.addAnnotation = function addAnnotation() { + var content = void 0; + + if (this.isInline()) { + content = 'data:application/json;base64,' + this.toBase64(this.map.toString()); + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation; + } else { + content = this.outputFile() + '.map'; + } + + var eol = '\n'; + if (this.css.indexOf('\r\n') !== -1) eol = '\r\n'; + this.css += eol + '/*# sourceMappingURL=' + content + ' */'; + }; + + MapGenerator.prototype.outputFile = function outputFile() { + if (this.opts.to) { + return this.relative(this.opts.to); + } else if (this.opts.from) { + return this.relative(this.opts.from); + } else { + return 'to.css'; + } + }; + + MapGenerator.prototype.generateMap = function generateMap() { + this.generateString(); + if (this.isSourcesContent()) this.setSourcesContent(); + if (this.previous().length > 0) this.applyPrevMaps(); + if (this.isAnnotation()) this.addAnnotation(); + + if (this.isInline()) { + return [this.css]; + } else { + return [this.css, this.map]; + } + }; + + MapGenerator.prototype.relative = function relative(file) { + if (file.indexOf('<') === 0) return file; + if (/^\w+:\/\//.test(file)) return file; + var from = this.opts.to ? _path2.default.dirname(this.opts.to) : '.'; + + if (typeof this.mapOpts.annotation === 'string') { + from = _path2.default.dirname(_path2.default.resolve(from, this.mapOpts.annotation)); + } + + file = _path2.default.relative(from, file); + + if (_path2.default.sep === '\\') { + return file.replace(/\\/g, '/'); + } else { + return file; + } + }; + + MapGenerator.prototype.sourcePath = function sourcePath(node) { + if (this.mapOpts.from) { + return this.mapOpts.from; + } else { + return this.relative(node.source.input.from); + } + }; + + MapGenerator.prototype.generateString = function generateString() { + var _this3 = this; + + this.css = ''; + this.map = new _sourceMap2.default.SourceMapGenerator({ + file: this.outputFile() + }); + var line = 1; + var column = 1; + var lines = void 0, + last = void 0; + this.stringify(this.root, function (str, node, type) { + _this3.css += str; + + if (node && type !== 'end') { + if (node.source && node.source.start) { + _this3.map.addMapping({ + source: _this3.sourcePath(node), + generated: { + line: line, + column: column - 1 + }, + original: { + line: node.source.start.line, + column: node.source.start.column - 1 + } + }); + } else { + _this3.map.addMapping({ + source: '', + original: { + line: 1, + column: 0 + }, + generated: { + line: line, + column: column - 1 + } + }); + } + } + + lines = str.match(/\n/g); + + if (lines) { + line += lines.length; + last = str.lastIndexOf('\n'); + column = str.length - last; + } else { + column += str.length; + } + + if (node && type !== 'start') { + if (node.source && node.source.end) { + _this3.map.addMapping({ + source: _this3.sourcePath(node), + generated: { + line: line, + column: column - 1 + }, + original: { + line: node.source.end.line, + column: node.source.end.column + } + }); + } else { + _this3.map.addMapping({ + source: '', + original: { + line: 1, + column: 0 + }, + generated: { + line: line, + column: column - 1 + } + }); + } + } + }); + }; + + MapGenerator.prototype.generate = function generate() { + this.clearAnnotation(); + + if (this.isMap()) { + return this.generateMap(); + } else { + var result = ''; + this.stringify(this.root, function (i) { + result += i; + }); + return [result]; + } + }; + + return MapGenerator; +}(); + +exports.default = MapGenerator; +module.exports = exports['default']; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19).Buffer)) + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _warning = __webpack_require__(138); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * Provides the result of the PostCSS transformations. + * + * A Result instance is returned by {@link LazyResult#then} + * or {@link Root#toResult} methods. + * + * @example + * postcss([cssnext]).process(css).then(function (result) { + * console.log(result.css); + * }); + * + * @example + * var result2 = postcss.parse(css).toResult(); + */ + + +var Result = function () { + /** + * @param {Processor} processor - processor used for this transformation. + * @param {Root} root - Root node after all transformations. + * @param {processOptions} opts - options from the {@link Processor#process} + * or {@link Root#toResult} + */ + function Result(processor, root, opts) { + _classCallCheck(this, Result); + /** + * @member {Processor} - The Processor instance used + * for this transformation. + * + * @example + * for ( let plugin of result.processor.plugins) { + * if ( plugin.postcssPlugin === 'postcss-bad' ) { + * throw 'postcss-good is incompatible with postcss-bad'; + * } + * }); + */ + + + this.processor = processor; + /** + * @member {Message[]} - Contains messages from plugins + * (e.g., warnings or custom messages). + * Each message should have type + * and plugin properties. + * + * @example + * postcss.plugin('postcss-min-browser', () => { + * return (root, result) => { + * var browsers = detectMinBrowsersByCanIUse(root); + * result.messages.push({ + * type: 'min-browser', + * plugin: 'postcss-min-browser', + * browsers: browsers + * }); + * }; + * }); + */ + + this.messages = []; + /** + * @member {Root} - Root node after all transformations. + * + * @example + * root.toResult().root == root; + */ + + this.root = root; + /** + * @member {processOptions} - Options from the {@link Processor#process} + * or {@link Root#toResult} call + * that produced this Result instance. + * + * @example + * root.toResult(opts).opts == opts; + */ + + this.opts = opts; + /** + * @member {string} - A CSS string representing of {@link Result#root}. + * + * @example + * postcss.parse('a{}').toResult().css //=> "a{}" + */ + + this.css = undefined; + /** + * @member {SourceMapGenerator} - An instance of `SourceMapGenerator` + * class from the `source-map` library, + * representing changes + * to the {@link Result#root} instance. + * + * @example + * result.map.toJSON() //=> { version: 3, file: 'a.css', … } + * + * @example + * if ( result.map ) { + * fs.writeFileSync(result.opts.to + '.map', result.map.toString()); + * } + */ + + this.map = undefined; + } + /** + * Returns for @{link Result#css} content. + * + * @example + * result + '' === result.css + * + * @return {string} string representing of {@link Result#root} + */ + + + Result.prototype.toString = function toString() { + return this.css; + }; + /** + * Creates an instance of {@link Warning} and adds it + * to {@link Result#messages}. + * + * @param {string} text - warning message + * @param {Object} [opts] - warning options + * @param {Node} opts.node - CSS node that caused the warning + * @param {string} opts.word - word in CSS source that caused the warning + * @param {number} opts.index - index in CSS node string that caused + * the warning + * @param {string} opts.plugin - name of the plugin that created + * this warning. {@link Result#warn} fills + * this property automatically. + * + * @return {Warning} created warning + */ + + + Result.prototype.warn = function warn(text) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin; + } + } + + var warning = new _warning2.default(text, opts); + this.messages.push(warning); + return warning; + }; + /** + * Returns warnings from plugins. Filters {@link Warning} instances + * from {@link Result#messages}. + * + * @example + * result.warnings().forEach(warn => { + * console.warn(warn.toString()); + * }); + * + * @return {Warning[]} warnings from plugins + */ + + + Result.prototype.warnings = function warnings() { + return this.messages.filter(function (i) { + return i.type === 'warning'; + }); + }; + /** + * An alias for the {@link Result#css} property. + * Use it with syntaxes that generate non-CSS output. + * @type {string} + * + * @example + * result.css === result.content; + */ + + + _createClass(Result, [{ + key: 'content', + get: function get() { + return this.css; + } + }]); + + return Result; +}(); + +exports.default = Result; +/** + * @typedef {object} Message + * @property {string} type - message type + * @property {string} plugin - source PostCSS plugin name + */ + +module.exports = exports['default']; + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * Represents a plugin’s warning. It can be created using {@link Node#warn}. + * + * @example + * if ( decl.important ) { + * decl.warn(result, 'Avoid !important', { word: '!important' }); + * } + */ + + +var Warning = function () { + /** + * @param {string} text - warning message + * @param {Object} [opts] - warning options + * @param {Node} opts.node - CSS node that caused the warning + * @param {string} opts.word - word in CSS source that caused the warning + * @param {number} opts.index - index in CSS node string that caused + * the warning + * @param {string} opts.plugin - name of the plugin that created + * this warning. {@link Result#warn} fills + * this property automatically. + */ + function Warning(text) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Warning); + /** + * @member {string} - Type to filter warnings from + * {@link Result#messages}. Always equal + * to `"warning"`. + * + * @example + * const nonWarning = result.messages.filter(i => i.type !== 'warning') + */ + + + this.type = 'warning'; + /** + * @member {string} - The warning message. + * + * @example + * warning.text //=> 'Try to avoid !important' + */ + + this.text = text; + + if (opts.node && opts.node.source) { + var pos = opts.node.positionBy(opts); + /** + * @member {number} - Line in the input file + * with this warning’s source + * + * @example + * warning.line //=> 5 + */ + + this.line = pos.line; + /** + * @member {number} - Column in the input file + * with this warning’s source. + * + * @example + * warning.column //=> 6 + */ + + this.column = pos.column; + } + + for (var opt in opts) { + this[opt] = opts[opt]; + } + } + /** + * Returns a warning position and message. + * + * @example + * warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important' + * + * @return {string} warning position and message + */ + + + Warning.prototype.toString = function toString() { + if (this.node) { + return this.node.error(this.text, { + plugin: this.plugin, + index: this.index, + word: this.word + }).message; + } else if (this.plugin) { + return this.plugin + ': ' + this.text; + } else { + return this.text; + } + }; + /** + * @memberof Warning# + * @member {string} plugin - The name of the plugin that created + * it will fill this property automatically. + * this warning. When you call {@link Node#warn} + * + * @example + * warning.plugin //=> 'postcss-important' + */ + + /** + * @memberof Warning# + * @member {Node} node - Contains the CSS node that caused the warning. + * + * @example + * warning.node.toString() //=> 'color: white !important' + */ + + + return Warning; +}(); + +exports.default = Warning; +module.exports = exports['default']; + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _lazyResult = __webpack_require__(75); + +var _lazyResult2 = _interopRequireDefault(_lazyResult); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * Contains plugins to process CSS. Create one `Processor` instance, + * initialize its plugins, and then use that instance on numerous CSS files. + * + * @example + * const processor = postcss([autoprefixer, precss]); + * processor.process(css1).then(result => console.log(result.css)); + * processor.process(css2).then(result => console.log(result.css)); + */ + + +var Processor = function () { + /** + * @param {Array.|Processor} plugins - PostCSS + * plugins. See {@link Processor#use} for plugin format. + */ + function Processor() { + var plugins = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + _classCallCheck(this, Processor); + /** + * @member {string} - Current PostCSS version. + * + * @example + * if ( result.processor.version.split('.')[0] !== '6' ) { + * throw new Error('This plugin works only with PostCSS 6'); + * } + */ + + + this.version = '6.0.23'; + /** + * @member {pluginFunction[]} - Plugins added to this processor. + * + * @example + * const processor = postcss([autoprefixer, precss]); + * processor.plugins.length //=> 2 + */ + + this.plugins = this.normalize(plugins); + } + /** + * Adds a plugin to be used as a CSS processor. + * + * PostCSS plugin can be in 4 formats: + * * A plugin created by {@link postcss.plugin} method. + * * A function. PostCSS will pass the function a @{link Root} + * as the first argument and current {@link Result} instance + * as the second. + * * An object with a `postcss` method. PostCSS will use that method + * as described in #2. + * * Another {@link Processor} instance. PostCSS will copy plugins + * from that instance into this one. + * + * Plugins can also be added by passing them as arguments when creating + * a `postcss` instance (see [`postcss(plugins)`]). + * + * Asynchronous plugins should return a `Promise` instance. + * + * @param {Plugin|pluginFunction|Processor} plugin - PostCSS plugin + * or {@link Processor} + * with plugins + * + * @example + * const processor = postcss() + * .use(autoprefixer) + * .use(precss); + * + * @return {Processes} current processor to make methods chain + */ + + + Processor.prototype.use = function use(plugin) { + this.plugins = this.plugins.concat(this.normalize([plugin])); + return this; + }; + /** + * Parses source CSS and returns a {@link LazyResult} Promise proxy. + * Because some plugins can be asynchronous it doesn’t make + * any transformations. Transformations will be applied + * in the {@link LazyResult} methods. + * + * @param {string|toString|Result} css - String with input CSS or + * any object with a `toString()` + * method, like a Buffer. + * Optionally, send a {@link Result} + * instance and the processor will + * take the {@link Root} from it. + * @param {processOptions} [opts] - options + * + * @return {LazyResult} Promise proxy + * + * @example + * processor.process(css, { from: 'a.css', to: 'a.out.css' }) + * .then(result => { + * console.log(result.css); + * }); + */ + + + Processor.prototype.process = function process(css) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return new _lazyResult2.default(this, css, opts); + }; + + Processor.prototype.normalize = function normalize(plugins) { + var normalized = []; + + for (var _iterator = plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var i = _ref; + if (i.postcss) i = i.postcss; + + if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins); + } else if (typeof i === 'function') { + normalized.push(i); + } else if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object' && (i.parse || i.stringify)) { + throw new Error('PostCSS syntaxes cannot be used as plugins. ' + 'Instead, please use one of the ' + 'syntax/parser/stringifier options as ' + 'outlined in your PostCSS ' + 'runner documentation.'); + } else { + throw new Error(i + ' is not a PostCSS plugin'); + } + } + + return normalized; + }; + + return Processor; +}(); + +exports.default = Processor; +/** + * @callback builder + * @param {string} part - part of generated CSS connected to this node + * @param {Node} node - AST node + * @param {"start"|"end"} [type] - node’s part type + */ + +/** + * @callback parser + * + * @param {string|toString} css - string with input CSS or any object + * with toString() method, like a Buffer + * @param {processOptions} [opts] - options with only `from` and `map` keys + * + * @return {Root} PostCSS AST + */ + +/** + * @callback stringifier + * + * @param {Node} node - start node for stringifing. Usually {@link Root}. + * @param {builder} builder - function to concatenate CSS from node’s parts + * or generate string and source map + * + * @return {void} + */ + +/** + * @typedef {object} syntax + * @property {parser} parse - function to generate AST by string + * @property {stringifier} stringify - function to generate string by AST + */ + +/** + * @typedef {object} toString + * @property {function} toString + */ + +/** + * @callback pluginFunction + * @param {Root} root - parsed input CSS + * @param {Result} result - result to set warnings or check other plugins + */ + +/** + * @typedef {object} Plugin + * @property {function} postcss - PostCSS plugin function + */ + +/** + * @typedef {object} processOptions + * @property {string} from - the path of the CSS source file. + * You should always set `from`, + * because it is used in source map + * generation and syntax error messages. + * @property {string} to - the path where you’ll put the output + * CSS file. You should always set `to` + * to generate correct source maps. + * @property {parser} parser - function to generate AST by string + * @property {stringifier} stringifier - class to generate string by AST + * @property {syntax} syntax - object with `parse` and `stringify` + * @property {object} map - source map options + * @property {boolean} map.inline - does source map should + * be embedded in the output + * CSS as a base64-encoded + * comment + * @property {string|object|false|function} map.prev - source map content + * from a previous + * processing step + * (for example, Sass). + * PostCSS will try to find + * previous map + * automatically, so you + * could disable it by + * `false` value. + * @property {boolean} map.sourcesContent - does PostCSS should set + * the origin content to map + * @property {string|false} map.annotation - does PostCSS should set + * annotation comment to map + * @property {string} map.from - override `from` in map’s + * `sources` + */ + +module.exports = exports['default']; + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +exports.__esModule = true; + +var _container = __webpack_require__(13); + +var _container2 = _interopRequireDefault(_container); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var NestedDeclaration = function (_Container) { + _inherits(NestedDeclaration, _Container); + + function NestedDeclaration(defaults) { + _classCallCheck(this, NestedDeclaration); + + var _this = _possibleConstructorReturn(this, _Container.call(this, defaults)); + + _this.type = 'decl'; + _this.isNested = true; + if (!_this.nodes) _this.nodes = []; + return _this; + } + + return NestedDeclaration; +}(_container2.default); + +exports.default = NestedDeclaration; +module.exports = exports['default']; + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = scssTokenize; +var SINGLE_QUOTE = 39; +var DOUBLE_QUOTE = 34; +var BACKSLASH = 92; +var SLASH = 47; +var NEWLINE = 10; +var SPACE = 32; +var FEED = 12; +var TAB = 9; +var CR = 13; +var OPEN_SQUARE = 91; +var CLOSE_SQUARE = 93; +var OPEN_PARENTHESES = 40; +var CLOSE_PARENTHESES = 41; +var OPEN_CURLY = 123; +var CLOSE_CURLY = 125; +var SEMICOLON = 59; +var ASTERISK = 42; +var COLON = 58; +var AT = 64; // SCSS PATCH { + +var COMMA = 44; +var HASH = 35; // } SCSS PATCH + +var RE_AT_END = /[ \n\t\r\f\{\}\(\)'"\\;/\[\]#]/g; +var RE_WORD_END = /[ \n\t\r\f\(\)\{\}:;@!'"\\\]\[#]|\/(?=\*)/g; +var RE_BAD_BRACKET = /.[\\\/\("'\n]/; +var RE_HEX_ESCAPE = /[a-f0-9]/i; +var RE_NEW_LINE = /[\r\f\n]/g; // SCSS PATCH +// SCSS PATCH function name was changed + +function scssTokenize(input) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var css = input.css.valueOf(); + var ignore = options.ignoreErrors; + var code = void 0, + next = void 0, + quote = void 0, + lines = void 0, + last = void 0, + content = void 0, + escape = void 0, + nextLine = void 0, + nextOffset = void 0, + escaped = void 0, + prev = void 0, + n = void 0, + currentToken = void 0; + var brackets = void 0; // SCSS PATCH + + var length = css.length; + var offset = -1; + var line = 1; + var pos = 0; + var buffer = []; + var returned = []; + + function unclosed(what) { + throw input.error('Unclosed ' + what, line, pos - offset); + } + + function endOfFile() { + return returned.length === 0 && pos >= length; + } // SCSS PATCH { + + + function interpolation() { + var deep = 1; + var stringQuote = false; + var stringEscaped = false; + + while (deep > 0) { + next += 1; + if (css.length <= next) unclosed('interpolation'); + code = css.charCodeAt(next); + n = css.charCodeAt(next + 1); + + if (stringQuote) { + if (!stringEscaped && code === stringQuote) { + stringQuote = false; + stringEscaped = false; + } else if (code === BACKSLASH) { + stringEscaped = !escaped; + } else if (stringEscaped) { + stringEscaped = false; + } + } else if (code === SINGLE_QUOTE || code === DOUBLE_QUOTE) { + stringQuote = code; + } else if (code === CLOSE_CURLY) { + deep -= 1; + } else if (code === HASH && n === OPEN_CURLY) { + deep += 1; + } + } + } // } SCSS PATCH + + + function nextToken() { + if (returned.length) return returned.pop(); + if (pos >= length) return; + code = css.charCodeAt(pos); + + if (code === NEWLINE || code === FEED || code === CR && css.charCodeAt(pos + 1) !== NEWLINE) { + offset = pos; + line += 1; + } + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: + next = pos; + + do { + next += 1; + code = css.charCodeAt(next); + + if (code === NEWLINE) { + offset = next; + line += 1; + } + } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED); + + currentToken = ['space', css.slice(pos, next)]; + pos = next - 1; + break; + + case OPEN_SQUARE: + currentToken = ['[', '[', line, pos - offset]; + break; + + case CLOSE_SQUARE: + currentToken = [']', ']', line, pos - offset]; + break; + + case OPEN_CURLY: + currentToken = ['{', '{', line, pos - offset]; + break; + + case CLOSE_CURLY: + currentToken = ['}', '}', line, pos - offset]; + break; + // SCSS PATCH { + + case COMMA: + currentToken = ['word', ',', line, pos - offset, line, pos - offset + 1]; + break; + // } SCSS PATCH + + case COLON: + currentToken = [':', ':', line, pos - offset]; + break; + + case SEMICOLON: + currentToken = [';', ';', line, pos - offset]; + break; + + case OPEN_PARENTHESES: + prev = buffer.length ? buffer.pop()[1] : ''; + n = css.charCodeAt(pos + 1); // SCSS PATCH { + + if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE) { + brackets = 1; + escaped = false; + next = pos + 1; + + while (next <= css.length - 1) { + n = css.charCodeAt(next); + + if (n === BACKSLASH) { + escaped = !escaped; + } else if (n === OPEN_PARENTHESES) { + brackets += 1; + } else if (n === CLOSE_PARENTHESES) { + brackets -= 1; + if (brackets === 0) break; + } + + next += 1; + } + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + currentToken = ['brackets', content, line, pos - offset, nextLine, next - nextOffset]; + offset = nextOffset; + line = nextLine; + pos = next; // } SCSS PATCH + } else { + next = css.indexOf(')', pos + 1); + content = css.slice(pos, next + 1); + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = ['(', '(', line, pos - offset]; + } else { + currentToken = ['brackets', content, line, pos - offset, line, next - offset]; + pos = next; + } + } + + break; + + case CLOSE_PARENTHESES: + currentToken = [')', ')', line, pos - offset]; + break; + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: + // SCSS PATCH { + quote = code; + next = pos; + escaped = false; + + while (next < length) { + next++; + if (next === length) unclosed('string'); + code = css.charCodeAt(next); + n = css.charCodeAt(next + 1); + + if (!escaped && code === quote) { + break; + } else if (code === BACKSLASH) { + escaped = !escaped; + } else if (escaped) { + escaped = false; + } else if (code === HASH && n === OPEN_CURLY) { + interpolation(); + } + } // } SCSS PATCH + + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + currentToken = ['string', css.slice(pos, next + 1), line, pos - offset, nextLine, next - nextOffset]; + offset = nextOffset; + line = nextLine; + pos = next; + break; + + case AT: + RE_AT_END.lastIndex = pos + 1; + RE_AT_END.test(css); + + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_AT_END.lastIndex - 2; + } + + currentToken = ['at-word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + pos = next; + break; + + case BACKSLASH: + next = pos; + escape = true; + + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1; + escape = !escape; + } + + code = css.charCodeAt(next + 1); + + if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) { + next += 1; + + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { + next += 1; + } + + if (css.charCodeAt(next + 1) === SPACE) { + next += 1; + } + } + } + + currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + pos = next; + break; + + default: + // SCSS PATCH { + n = css.charCodeAt(pos + 1); + + if (code === HASH && n === OPEN_CURLY) { + next = pos; + interpolation(); + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + currentToken = ['word', content, line, pos - offset, nextLine, next - nextOffset]; + offset = nextOffset; + line = nextLine; + pos = next; + } else if (code === SLASH && n === ASTERISK) { + // } SCSS PATCH + next = css.indexOf('*/', pos + 2) + 1; + + if (next === 0) { + if (ignore) { + next = css.length; + } else { + unclosed('comment'); + } + } + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + currentToken = ['comment', content, line, pos - offset, nextLine, next - nextOffset]; + offset = nextOffset; + line = nextLine; + pos = next; // SCSS PATCH { + } else if (code === SLASH && n === SLASH) { + RE_NEW_LINE.lastIndex = pos + 1; + RE_NEW_LINE.test(css); + + if (RE_NEW_LINE.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_NEW_LINE.lastIndex - 2; + } + + content = css.slice(pos, next + 1); + currentToken = ['comment', content, line, pos - offset, line, next - offset, 'inline']; + pos = next; // } SCSS PATCH + } else { + RE_WORD_END.lastIndex = pos + 1; + RE_WORD_END.test(css); + + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_WORD_END.lastIndex - 2; + } + + currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + buffer.push(currentToken); + pos = next; + } + + break; + } + + pos++; + return currentToken; + } + + function back(token) { + returned.push(token); + } + + return { + back: back, + nextToken: nextToken, + endOfFile: endOfFile + }; +} + +module.exports = exports['default']; + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = false; + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) { + +function assembleStyles() { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], + // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; // fix humans + + styles.colors.grey = styles.colors.gray; + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + styles[styleName] = group[styleName] = { + open: "\x1B[" + style[0] + 'm', + close: "\x1B[" + style[1] + 'm' + }; + }); + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(144)(module))) + +/***/ }), +/* 144 */ +/***/ (function(module, exports) { + +module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + + module.paths = []; // module.parent = undefined by default + + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function get() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function get() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + + return module; +}; + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var ansiRegex = __webpack_require__(79)(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var ansiRegex = __webpack_require__(79); + +var re = new RegExp(ansiRegex().source); // remove the `g` flag + +module.exports = re.test.bind(re); + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +var argv = process.argv; +var terminator = argv.indexOf('--'); + +var hasFlag = function hasFlag(flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +}(); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12))) + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _chalk = __webpack_require__(78); + +var _chalk2 = _interopRequireDefault(_chalk); + +var _tokenize = __webpack_require__(80); + +var _tokenize2 = _interopRequireDefault(_tokenize); + +var _input = __webpack_require__(26); + +var _input2 = _interopRequireDefault(_input); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +var colors = new _chalk2.default.constructor({ + enabled: true +}); +var HIGHLIGHT_THEME = { + 'brackets': colors.cyan, + 'at-word': colors.cyan, + 'call': colors.cyan, + 'comment': colors.gray, + 'string': colors.green, + 'class': colors.yellow, + 'hash': colors.magenta, + '(': colors.cyan, + ')': colors.cyan, + '{': colors.yellow, + '}': colors.yellow, + '[': colors.yellow, + ']': colors.yellow, + ':': colors.yellow, + ';': colors.yellow +}; + +function getTokenType(_ref, index, tokens) { + var type = _ref[0], + value = _ref[1]; + + if (type === 'word') { + if (value[0] === '.') { + return 'class'; + } + + if (value[0] === '#') { + return 'hash'; + } + } + + var nextToken = tokens[index + 1]; + + if (nextToken && (nextToken[0] === 'brackets' || nextToken[0] === '(')) { + return 'call'; + } + + return type; +} + +function terminalHighlight(css) { + var tokens = (0, _tokenize2.default)(new _input2.default(css), { + ignoreErrors: true + }); + return tokens.map(function (token, index) { + var color = HIGHLIGHT_THEME[getTokenType(token, index, tokens)]; + + if (color) { + return token[1].split(/\r?\n/).map(function (i) { + return color(i); + }).join('\n'); + } else { + return token[1]; + } + }).join(''); +} + +exports.default = terminalHighlight; +module.exports = exports['default']; + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _jsBase = __webpack_require__(81); + +var _sourceMap = __webpack_require__(82); + +var _sourceMap2 = _interopRequireDefault(_sourceMap); + +var _path = __webpack_require__(6); + +var _path2 = _interopRequireDefault(_path); + +var _fs = __webpack_require__(156); + +var _fs2 = _interopRequireDefault(_fs); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * Source map information from input CSS. + * For example, source map after Sass compiler. + * + * This class will automatically find source map in input CSS or in file system + * near input file (according `from` option). + * + * @example + * const root = postcss.parse(css, { from: 'a.sass.css' }); + * root.input.map //=> PreviousMap + */ + + +var PreviousMap = function () { + /** + * @param {string} css - input CSS source + * @param {processOptions} [opts] - {@link Processor#process} options + */ + function PreviousMap(css, opts) { + _classCallCheck(this, PreviousMap); + + this.loadAnnotation(css); + /** + * @member {boolean} - Was source map inlined by data-uri to input CSS. + */ + + this.inline = this.startWith(this.annotation, 'data:'); + var prev = opts.map ? opts.map.prev : undefined; + var text = this.loadMap(opts.from, prev); + if (text) this.text = text; + } + /** + * Create a instance of `SourceMapGenerator` class + * from the `source-map` library to work with source map information. + * + * It is lazy method, so it will create object only on first call + * and then it will use cache. + * + * @return {SourceMapGenerator} object with source map information + */ + + + PreviousMap.prototype.consumer = function consumer() { + if (!this.consumerCache) { + this.consumerCache = new _sourceMap2.default.SourceMapConsumer(this.text); + } + + return this.consumerCache; + }; + /** + * Does source map contains `sourcesContent` with input source text. + * + * @return {boolean} Is `sourcesContent` present + */ + + + PreviousMap.prototype.withContent = function withContent() { + return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0); + }; + + PreviousMap.prototype.startWith = function startWith(string, start) { + if (!string) return false; + return string.substr(0, start.length) === start; + }; + + PreviousMap.prototype.loadAnnotation = function loadAnnotation(css) { + var match = css.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//); + if (match) this.annotation = match[1].trim(); + }; + + PreviousMap.prototype.decodeInline = function decodeInline(text) { + var utfd64 = 'data:application/json;charset=utf-8;base64,'; + var utf64 = 'data:application/json;charset=utf8;base64,'; + var b64 = 'data:application/json;base64,'; + var uri = 'data:application/json,'; + + if (this.startWith(text, uri)) { + return decodeURIComponent(text.substr(uri.length)); + } else if (this.startWith(text, b64)) { + return _jsBase.Base64.decode(text.substr(b64.length)); + } else if (this.startWith(text, utf64)) { + return _jsBase.Base64.decode(text.substr(utf64.length)); + } else if (this.startWith(text, utfd64)) { + return _jsBase.Base64.decode(text.substr(utfd64.length)); + } else { + var encoding = text.match(/data:application\/json;([^,]+),/)[1]; + throw new Error('Unsupported source map encoding ' + encoding); + } + }; + + PreviousMap.prototype.loadMap = function loadMap(file, prev) { + if (prev === false) return false; + + if (prev) { + if (typeof prev === 'string') { + return prev; + } else if (typeof prev === 'function') { + var prevPath = prev(file); + + if (prevPath && _fs2.default.existsSync && _fs2.default.existsSync(prevPath)) { + return _fs2.default.readFileSync(prevPath, 'utf-8').toString().trim(); + } else { + throw new Error('Unable to load previous source map: ' + prevPath.toString()); + } + } else if (prev instanceof _sourceMap2.default.SourceMapConsumer) { + return _sourceMap2.default.SourceMapGenerator.fromSourceMap(prev).toString(); + } else if (prev instanceof _sourceMap2.default.SourceMapGenerator) { + return prev.toString(); + } else if (this.isMap(prev)) { + return JSON.stringify(prev); + } else { + throw new Error('Unsupported previous source map format: ' + prev.toString()); + } + } else if (this.inline) { + return this.decodeInline(this.annotation); + } else if (this.annotation) { + var map = this.annotation; + if (file) map = _path2.default.join(_path2.default.dirname(file), map); + this.root = _path2.default.dirname(map); + + if (_fs2.default.existsSync && _fs2.default.existsSync(map)) { + return _fs2.default.readFileSync(map, 'utf-8').toString().trim(); + } else { + return false; + } + } + }; + + PreviousMap.prototype.isMap = function isMap(map) { + if ((typeof map === 'undefined' ? 'undefined' : _typeof(map)) !== 'object') return false; + return typeof map.mappings === 'string' || typeof map._mappings === 'string'; + }; + + return PreviousMap; +}(); + +exports.default = PreviousMap; +module.exports = exports['default']; + +/***/ }), +/* 150 */ +/***/ (function(module, exports) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + + throw new TypeError("Must be between 0 and 63: " + number); +}; +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + + +exports.decode = function (charCode) { + var bigA = 65; // 'A' + + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + + var littleZ = 122; // 'z' + + var zero = 48; // '0' + + var nine = 57; // '9' + + var plus = 43; // '+' + + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + + if (bigA <= charCode && charCode <= bigZ) { + return charCode - bigA; + } // 26 - 51: abcdefghijklmnopqrstuvwxyz + + + if (littleA <= charCode && charCode <= littleZ) { + return charCode - littleA + littleOffset; + } // 52 - 61: 0123456789 + + + if (zero <= charCode && charCode <= nine) { + return charCode - zero + numberOffset; + } // 62: + + + + if (charCode == plus) { + return 62; + } // 63: / + + + if (charCode == slash) { + return 63; + } // Invalid base64 digit. + + + return -1; +}; + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var util = __webpack_require__(9); +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + + +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + + +function MappingList() { + this._array = []; + this._sorted = true; // Serves as infimum + + this._last = { + generatedLine: -1, + generatedColumn: 0 + }; +} +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + + +MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); +}; +/** + * Add the given source mapping. + * + * @param Object aMapping + */ + + +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + + this._array.push(aMapping); + } else { + this._sorted = false; + + this._array.push(aMapping); + } +}; +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + + +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + + this._sorted = true; + } + + return this._array; +}; + +exports.MappingList = MappingList; + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var util = __webpack_require__(9); + +var binarySearch = __webpack_require__(153); + +var ArraySet = __webpack_require__(85).ArraySet; + +var base64VLQ = __webpack_require__(84); + +var quickSort = __webpack_require__(154).quickSort; + +function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap); +} + +SourceMapConsumer.fromSourceMap = function (aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); +}; +/** + * The version of the source mapping spec that we are consuming. + */ + + +SourceMapConsumer.prototype._version = 3; // `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function get() { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function get() { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; +}; +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + + +SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); +}; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + +SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var mappings; + + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); +}; +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + + +SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + if (!this._sources.has(needle.source)) { + return []; + } + + needle.source = this._sources.indexOf(needle.source); + var mappings = []; + + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + + while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; +}; + +exports.SourceMapConsumer = SourceMapConsumer; +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + +function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources.map(String) // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; + }); // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + +BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); + smc.file = aSourceMap._file; // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping(); + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + return smc; +}; +/** + * The version of the source mapping spec that we are consuming. + */ + + +BasicSourceMapConsumer.prototype._version = 3; +/** + * The list of original sources. + */ + +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function get() { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } +}); +/** + * Provide the JIT with a nice shape / hidden class. + */ + +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + + +BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } else if (aStr.charAt(index) === ',') { + index++; + } else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + + str = aStr.slice(index, end); + segment = cachedSegments[str]; + + if (segment) { + index += str.length; + } else { + segment = []; + + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } // Generated column. + + + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; // Original line. + + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; // Lines are stored 0-based + + mapping.originalLine += 1; // Original column. + + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; +}; +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + + +BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]); + } + + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); +}; +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + + +BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } // The last mapping for each line spans the entire line. + + + mapping.lastGeneratedColumn = Infinity; + } +}; +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + + +BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + + if (source !== null) { + source = this._sources.at(source); + + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + + var name = util.getArg(mapping, 'name', null); + + if (name !== null) { + name = this._names.at(name); + } + + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; +}; +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + + +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + + return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) { + return sc == null; + }); +}; +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + + +BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + + if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + + if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; + } + + if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + + + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } +}; +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + + +BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + source = this._sources.indexOf(source); + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; +}; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + +function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + + lastOffset = offset; + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + }; + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; +/** + * The version of the source mapping spec that we are consuming. + */ + +IndexedSourceMapConsumer.prototype._version = 3; +/** + * The list of original sources. + */ + +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function get() { + var sources = []; + + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + + return sources; + } +}); +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + +IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; // Find the section containing the generated position we're trying to map + // to an original position. + + var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + + if (cmp) { + return cmp; + } + + return needle.generatedColumn - section.generatedOffset.generatedColumn; + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + bias: aArgs.bias + }); +}; +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + + +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); +}; +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + + +IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var content = section.consumer.sourceContentFor(aSource, true); + + if (content) { + return content; + } + } + + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } +}; +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + + +IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; // Only consider this section if the requested source is in the list of + // sources of the consumer. + + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + + if (generatedPosition) { + var ret = { + line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; +}; +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + + +IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + + this._sources.add(source); + + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + + this._names.add(name); + + name = this._names.indexOf(name); // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); +}; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + +/***/ }), +/* 153 */ +/***/ (function(module, exports) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + + + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } // we are in termination case (3) or (2) and return the appropriate thing. + + + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + + +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND); + + if (index < 0) { + return -1; + } // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + + + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + + --index; + } + + return index; +}; + +/***/ }), +/* 154 */ +/***/ (function(module, exports) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + + +function randomIntInRange(low, high) { + return Math.round(low + Math.random() * (high - low)); +} +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + + +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + swap(ary, pivotIndex, r); + var pivot = ary[r]; // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + + +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var SourceMapGenerator = __webpack_require__(83).SourceMapGenerator; + +var util = __webpack_require__(9); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). + + +var REGEX_NEWLINE = /(\r?\n)/; // Newline character code for charCodeAt() comparisons + +var NEWLINE_CODE = 10; // Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! + +var isSourceNode = "$$$isSourceNode$$$"; +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + + +SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + + var shiftNextLine = function shiftNextLine() { + var lineContents = remainingLines.shift(); // The last line of a file might not have a newline. + + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; // We need to remember the position of "remainingLines" + + + var lastGeneratedLine = 1, + lastGeneratedColumn = 0; // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + + var lastMapping = null; + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); // No more remaining code, continue + + lastMapping = mapping; + return; + } + } // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + + + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + + lastMapping = mapping; + }, this); // We have processed all mappings. + + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } // and add the remaining lines without any mapping + + + node.add(remainingLines.join("")); + } // Copy sourcesContent into SourceNode + + + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + + node.setSourceContent(sourceFile, content); + } + }); + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; + node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name)); + } + } +}; +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + + +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + + return this; +}; +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + + +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length - 1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + + return this; +}; +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + + +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } else { + if (chunk !== '') { + aFn(chunk, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }); + } + } + } +}; +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + + +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + + if (len > 0) { + newChildren = []; + + for (i = 0; i < len - 1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + + newChildren.push(this.children[i]); + this.children = newChildren; + } + + return this; +}; +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + + +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } else { + this.children.push(''.replace(aPattern, aReplacement)); + } + + return this; +}; +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + + +SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; +}; +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + + +SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } +}; +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + + +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; +/** + * Returns the string representation of this source node along with a source + * map. + */ + + +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + + if (original.source !== null && original.line !== null && original.column !== null) { + if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; // Mappings end at eol + + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + return { + code: generated.code, + map: map + }; +}; + +exports.SourceNode = SourceNode; + +/***/ }), +/* 156 */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; + +var _rule = __webpack_require__(10); + +var _rule2 = _interopRequireDefault(_rule); + +var _lessStringify = __webpack_require__(14); + +var _lessStringify2 = _interopRequireDefault(_lessStringify); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Import = function (_PostCssRule) { + _inherits(Import, _PostCssRule); + + function Import(defaults) { + _classCallCheck(this, Import); + + var _this = _possibleConstructorReturn(this, (Import.__proto__ || Object.getPrototypeOf(Import)).call(this, defaults)); + + _this.type = 'import'; + return _this; + } + + _createClass(Import, [{ + key: 'toString', + value: function toString(stringifier) { + if (!stringifier) { + stringifier = { + stringify: _lessStringify2.default + }; + } + + return _get(Import.prototype.__proto__ || Object.getPrototypeOf(Import.prototype), 'toString', this).call(this, stringifier); + } + }]); + + return Import; +}(_rule2.default); + +exports.default = Import; +module.exports = exports['default']; + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _jsBase = __webpack_require__(81); + +var _sourceMap = __webpack_require__(82); + +var _sourceMap2 = _interopRequireDefault(_sourceMap); + +var _path = __webpack_require__(6); + +var _path2 = _interopRequireDefault(_path); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var MapGenerator = function () { + function MapGenerator(stringify, root, opts) { + _classCallCheck(this, MapGenerator); + + this.stringify = stringify; + this.mapOpts = opts.map || {}; + this.root = root; + this.opts = opts; + } + + MapGenerator.prototype.isMap = function isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map; + } else { + return this.previous().length > 0; + } + }; + + MapGenerator.prototype.previous = function previous() { + var _this = this; + + if (!this.previousMaps) { + this.previousMaps = []; + this.root.walk(function (node) { + if (node.source && node.source.input.map) { + var map = node.source.input.map; + + if (_this.previousMaps.indexOf(map) === -1) { + _this.previousMaps.push(map); + } + } + }); + } + + return this.previousMaps; + }; + + MapGenerator.prototype.isInline = function isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline; + } + + var annotation = this.mapOpts.annotation; + + if (typeof annotation !== 'undefined' && annotation !== true) { + return false; + } + + if (this.previous().length) { + return this.previous().some(function (i) { + return i.inline; + }); + } else { + return true; + } + }; + + MapGenerator.prototype.isSourcesContent = function isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent; + } + + if (this.previous().length) { + return this.previous().some(function (i) { + return i.withContent(); + }); + } else { + return true; + } + }; + + MapGenerator.prototype.clearAnnotation = function clearAnnotation() { + if (this.mapOpts.annotation === false) return; + var node = void 0; + + for (var i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i]; + if (node.type !== 'comment') continue; + + if (node.text.indexOf('# sourceMappingURL=') === 0) { + this.root.removeChild(i); + } + } + }; + + MapGenerator.prototype.setSourcesContent = function setSourcesContent() { + var _this2 = this; + + var already = {}; + this.root.walk(function (node) { + if (node.source) { + var from = node.source.input.from; + + if (from && !already[from]) { + already[from] = true; + + var relative = _this2.relative(from); + + _this2.map.setSourceContent(relative, node.source.input.css); + } + } + }); + }; + + MapGenerator.prototype.applyPrevMaps = function applyPrevMaps() { + for (var _iterator = this.previous(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var prev = _ref; + var from = this.relative(prev.file); + + var root = prev.root || _path2.default.dirname(prev.file); + + var map = void 0; + + if (this.mapOpts.sourcesContent === false) { + map = new _sourceMap2.default.SourceMapConsumer(prev.text); + + if (map.sourcesContent) { + map.sourcesContent = map.sourcesContent.map(function () { + return null; + }); + } + } else { + map = prev.consumer(); + } + + this.map.applySourceMap(map, from, this.relative(root)); + } + }; + + MapGenerator.prototype.isAnnotation = function isAnnotation() { + if (this.isInline()) { + return true; + } else if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation; + } else if (this.previous().length) { + return this.previous().some(function (i) { + return i.annotation; + }); + } else { + return true; + } + }; + + MapGenerator.prototype.addAnnotation = function addAnnotation() { + var content = void 0; + + if (this.isInline()) { + content = 'data:application/json;base64,' + _jsBase.Base64.encode(this.map.toString()); + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation; + } else { + content = this.outputFile() + '.map'; + } + + var eol = '\n'; + if (this.css.indexOf('\r\n') !== -1) eol = '\r\n'; + this.css += eol + '/*# sourceMappingURL=' + content + ' */'; + }; + + MapGenerator.prototype.outputFile = function outputFile() { + if (this.opts.to) { + return this.relative(this.opts.to); + } else if (this.opts.from) { + return this.relative(this.opts.from); + } else { + return 'to.css'; + } + }; + + MapGenerator.prototype.generateMap = function generateMap() { + this.generateString(); + if (this.isSourcesContent()) this.setSourcesContent(); + if (this.previous().length > 0) this.applyPrevMaps(); + if (this.isAnnotation()) this.addAnnotation(); + + if (this.isInline()) { + return [this.css]; + } else { + return [this.css, this.map]; + } + }; + + MapGenerator.prototype.relative = function relative(file) { + if (file.indexOf('<') === 0) return file; + if (/^\w+:\/\//.test(file)) return file; + var from = this.opts.to ? _path2.default.dirname(this.opts.to) : '.'; + + if (typeof this.mapOpts.annotation === 'string') { + from = _path2.default.dirname(_path2.default.resolve(from, this.mapOpts.annotation)); + } + + file = _path2.default.relative(from, file); + + if (_path2.default.sep === '\\') { + return file.replace(/\\/g, '/'); + } else { + return file; + } + }; + + MapGenerator.prototype.sourcePath = function sourcePath(node) { + if (this.mapOpts.from) { + return this.mapOpts.from; + } else { + return this.relative(node.source.input.from); + } + }; + + MapGenerator.prototype.generateString = function generateString() { + var _this3 = this; + + this.css = ''; + this.map = new _sourceMap2.default.SourceMapGenerator({ + file: this.outputFile() + }); + var line = 1; + var column = 1; + var lines = void 0, + last = void 0; + this.stringify(this.root, function (str, node, type) { + _this3.css += str; + + if (node && type !== 'end') { + if (node.source && node.source.start) { + _this3.map.addMapping({ + source: _this3.sourcePath(node), + generated: { + line: line, + column: column - 1 + }, + original: { + line: node.source.start.line, + column: node.source.start.column - 1 + } + }); + } else { + _this3.map.addMapping({ + source: '', + original: { + line: 1, + column: 0 + }, + generated: { + line: line, + column: column - 1 + } + }); + } + } + + lines = str.match(/\n/g); + + if (lines) { + line += lines.length; + last = str.lastIndexOf('\n'); + column = str.length - last; + } else { + column += str.length; + } + + if (node && type !== 'start') { + if (node.source && node.source.end) { + _this3.map.addMapping({ + source: _this3.sourcePath(node), + generated: { + line: line, + column: column - 1 + }, + original: { + line: node.source.end.line, + column: node.source.end.column + } + }); + } else { + _this3.map.addMapping({ + source: '', + original: { + line: 1, + column: 0 + }, + generated: { + line: line, + column: column - 1 + } + }); + } + } + }); + }; + + MapGenerator.prototype.generate = function generate() { + this.clearAnnotation(); + + if (this.isMap()) { + return this.generateMap(); + } else { + var result = ''; + this.stringify(this.root, function (i) { + result += i; + }); + return [result]; + } + }; + + return MapGenerator; +}(); + +exports.default = MapGenerator; +module.exports = exports['default']; + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _warning = __webpack_require__(160); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * Provides the result of the PostCSS transformations. + * + * A Result instance is returned by {@link LazyResult#then} + * or {@link Root#toResult} methods. + * + * @example + * postcss([cssnext]).process(css).then(function (result) { + * console.log(result.css); + * }); + * + * @example + * var result2 = postcss.parse(css).toResult(); + */ + + +var Result = function () { + /** + * @param {Processor} processor - processor used for this transformation. + * @param {Root} root - Root node after all transformations. + * @param {processOptions} opts - options from the {@link Processor#process} + * or {@link Root#toResult} + */ + function Result(processor, root, opts) { + _classCallCheck(this, Result); + /** + * @member {Processor} - The Processor instance used + * for this transformation. + * + * @example + * for ( let plugin of result.processor.plugins) { + * if ( plugin.postcssPlugin === 'postcss-bad' ) { + * throw 'postcss-good is incompatible with postcss-bad'; + * } + * }); + */ + + + this.processor = processor; + /** + * @member {Message[]} - Contains messages from plugins + * (e.g., warnings or custom messages). + * Each message should have type + * and plugin properties. + * + * @example + * postcss.plugin('postcss-min-browser', () => { + * return (root, result) => { + * var browsers = detectMinBrowsersByCanIUse(root); + * result.messages.push({ + * type: 'min-browser', + * plugin: 'postcss-min-browser', + * browsers: browsers + * }); + * }; + * }); + */ + + this.messages = []; + /** + * @member {Root} - Root node after all transformations. + * + * @example + * root.toResult().root == root; + */ + + this.root = root; + /** + * @member {processOptions} - Options from the {@link Processor#process} + * or {@link Root#toResult} call + * that produced this Result instance. + * + * @example + * root.toResult(opts).opts == opts; + */ + + this.opts = opts; + /** + * @member {string} - A CSS string representing of {@link Result#root}. + * + * @example + * postcss.parse('a{}').toResult().css //=> "a{}" + */ + + this.css = undefined; + /** + * @member {SourceMapGenerator} - An instance of `SourceMapGenerator` + * class from the `source-map` library, + * representing changes + * to the {@link Result#root} instance. + * + * @example + * result.map.toJSON() //=> { version: 3, file: 'a.css', … } + * + * @example + * if ( result.map ) { + * fs.writeFileSync(result.opts.to + '.map', result.map.toString()); + * } + */ + + this.map = undefined; + } + /** + * Returns for @{link Result#css} content. + * + * @example + * result + '' === result.css + * + * @return {string} string representing of {@link Result#root} + */ + + + Result.prototype.toString = function toString() { + return this.css; + }; + /** + * Creates an instance of {@link Warning} and adds it + * to {@link Result#messages}. + * + * @param {string} text - warning message + * @param {Object} [opts] - warning options + * @param {Node} opts.node - CSS node that caused the warning + * @param {string} opts.word - word in CSS source that caused the warning + * @param {number} opts.index - index in CSS node string that caused + * the warning + * @param {string} opts.plugin - name of the plugin that created + * this warning. {@link Result#warn} fills + * this property automatically. + * + * @return {Warning} created warning + */ + + + Result.prototype.warn = function warn(text) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin; + } + } + + var warning = new _warning2.default(text, opts); + this.messages.push(warning); + return warning; + }; + /** + * Returns warnings from plugins. Filters {@link Warning} instances + * from {@link Result#messages}. + * + * @example + * result.warnings().forEach(warn => { + * console.warn(warn.toString()); + * }); + * + * @return {Warning[]} warnings from plugins + */ + + + Result.prototype.warnings = function warnings() { + return this.messages.filter(function (i) { + return i.type === 'warning'; + }); + }; + /** + * An alias for the {@link Result#css} property. + * Use it with syntaxes that generate non-CSS output. + * @type {string} + * + * @example + * result.css === result.content; + */ + + + _createClass(Result, [{ + key: 'content', + get: function get() { + return this.css; + } + }]); + + return Result; +}(); + +exports.default = Result; +/** + * @typedef {object} Message + * @property {string} type - message type + * @property {string} plugin - source PostCSS plugin name + */ + +module.exports = exports['default']; + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * Represents a plugin’s warning. It can be created using {@link Node#warn}. + * + * @example + * if ( decl.important ) { + * decl.warn(result, 'Avoid !important', { word: '!important' }); + * } + */ + + +var Warning = function () { + /** + * @param {string} text - warning message + * @param {Object} [opts] - warning options + * @param {Node} opts.node - CSS node that caused the warning + * @param {string} opts.word - word in CSS source that caused the warning + * @param {number} opts.index - index in CSS node string that caused + * the warning + * @param {string} opts.plugin - name of the plugin that created + * this warning. {@link Result#warn} fills + * this property automatically. + */ + function Warning(text) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Warning); + /** + * @member {string} - Type to filter warnings from + * {@link Result#messages}. Always equal + * to `"warning"`. + * + * @example + * const nonWarning = result.messages.filter(i => i.type !== 'warning') + */ + + + this.type = 'warning'; + /** + * @member {string} - The warning message. + * + * @example + * warning.text //=> 'Try to avoid !important' + */ + + this.text = text; + + if (opts.node && opts.node.source) { + var pos = opts.node.positionBy(opts); + /** + * @member {number} - Line in the input file + * with this warning’s source + * + * @example + * warning.line //=> 5 + */ + + this.line = pos.line; + /** + * @member {number} - Column in the input file + * with this warning’s source. + * + * @example + * warning.column //=> 6 + */ + + this.column = pos.column; + } + + for (var opt in opts) { + this[opt] = opts[opt]; + } + } + /** + * Returns a warning position and message. + * + * @example + * warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important' + * + * @return {string} warning position and message + */ + + + Warning.prototype.toString = function toString() { + if (this.node) { + return this.node.error(this.text, { + plugin: this.plugin, + index: this.index, + word: this.word + }).message; + } else if (this.plugin) { + return this.plugin + ': ' + this.text; + } else { + return this.text; + } + }; + /** + * @memberof Warning# + * @member {string} plugin - The name of the plugin that created + * it will fill this property automatically. + * this warning. When you call {@link Node#warn} + * + * @example + * warning.plugin //=> 'postcss-important' + */ + + /** + * @memberof Warning# + * @member {Node} node - Contains the CSS node that caused the warning. + * + * @example + * warning.node.toString() //=> 'color: white !important' + */ + + + return Warning; +}(); + +exports.default = Warning; +module.exports = exports['default']; + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof2(obj); +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); +}; + +var _lazyResult = __webpack_require__(90); + +var _lazyResult2 = _interopRequireDefault(_lazyResult); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +/** + * Contains plugins to process CSS. Create one `Processor` instance, + * initialize its plugins, and then use that instance on numerous CSS files. + * + * @example + * const processor = postcss([autoprefixer, precss]); + * processor.process(css1).then(result => console.log(result.css)); + * processor.process(css2).then(result => console.log(result.css)); + */ + + +var Processor = function () { + /** + * @param {Array.|Processor} plugins - PostCSS + * plugins. See {@link Processor#use} for plugin format. + */ + function Processor() { + var plugins = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + _classCallCheck(this, Processor); + /** + * @member {string} - Current PostCSS version. + * + * @example + * if ( result.processor.version.split('.')[0] !== '5' ) { + * throw new Error('This plugin works only with PostCSS 5'); + * } + */ + + + this.version = '5.2.17'; + /** + * @member {pluginFunction[]} - Plugins added to this processor. + * + * @example + * const processor = postcss([autoprefixer, precss]); + * processor.plugins.length //=> 2 + */ + + this.plugins = this.normalize(plugins); + } + /** + * Adds a plugin to be used as a CSS processor. + * + * PostCSS plugin can be in 4 formats: + * * A plugin created by {@link postcss.plugin} method. + * * A function. PostCSS will pass the function a @{link Root} + * as the first argument and current {@link Result} instance + * as the second. + * * An object with a `postcss` method. PostCSS will use that method + * as described in #2. + * * Another {@link Processor} instance. PostCSS will copy plugins + * from that instance into this one. + * + * Plugins can also be added by passing them as arguments when creating + * a `postcss` instance (see [`postcss(plugins)`]). + * + * Asynchronous plugins should return a `Promise` instance. + * + * @param {Plugin|pluginFunction|Processor} plugin - PostCSS plugin + * or {@link Processor} + * with plugins + * + * @example + * const processor = postcss() + * .use(autoprefixer) + * .use(precss); + * + * @return {Processes} current processor to make methods chain + */ + + + Processor.prototype.use = function use(plugin) { + this.plugins = this.plugins.concat(this.normalize([plugin])); + return this; + }; + /** + * Parses source CSS and returns a {@link LazyResult} Promise proxy. + * Because some plugins can be asynchronous it doesn’t make + * any transformations. Transformations will be applied + * in the {@link LazyResult} methods. + * + * @param {string|toString|Result} css - String with input CSS or + * any object with a `toString()` + * method, like a Buffer. + * Optionally, send a {@link Result} + * instance and the processor will + * take the {@link Root} from it. + * @param {processOptions} [opts] - options + * + * @return {LazyResult} Promise proxy + * + * @example + * processor.process(css, { from: 'a.css', to: 'a.out.css' }) + * .then(result => { + * console.log(result.css); + * }); + */ + + + Processor.prototype.process = function process(css) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return new _lazyResult2.default(this, css, opts); + }; + + Processor.prototype.normalize = function normalize(plugins) { + var normalized = []; + + for (var _iterator = plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var i = _ref; + if (i.postcss) i = i.postcss; + + if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins); + } else if (typeof i === 'function') { + normalized.push(i); + } else if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object' && (i.parse || i.stringify)) { + throw new Error('PostCSS syntaxes cannot be used as plugins. ' + 'Instead, please use one of the ' + 'syntax/parser/stringifier options as ' + 'outlined in your PostCSS ' + 'runner documentation.'); + } else { + throw new Error(i + ' is not a PostCSS plugin'); + } + } + + return normalized; + }; + + return Processor; +}(); + +exports.default = Processor; +/** + * @callback builder + * @param {string} part - part of generated CSS connected to this node + * @param {Node} node - AST node + * @param {"start"|"end"} [type] - node’s part type + */ + +/** + * @callback parser + * + * @param {string|toString} css - string with input CSS or any object + * with toString() method, like a Buffer + * @param {processOptions} [opts] - options with only `from` and `map` keys + * + * @return {Root} PostCSS AST + */ + +/** + * @callback stringifier + * + * @param {Node} node - start node for stringifing. Usually {@link Root}. + * @param {builder} builder - function to concatenate CSS from node’s parts + * or generate string and source map + * + * @return {void} + */ + +/** + * @typedef {object} syntax + * @property {parser} parse - function to generate AST by string + * @property {stringifier} stringify - function to generate string by AST + */ + +/** + * @typedef {object} toString + * @property {function} toString + */ + +/** + * @callback pluginFunction + * @param {Root} root - parsed input CSS + * @param {Result} result - result to set warnings or check other plugins + */ + +/** + * @typedef {object} Plugin + * @property {function} postcss - PostCSS plugin function + */ + +/** + * @typedef {object} processOptions + * @property {string} from - the path of the CSS source file. + * You should always set `from`, + * because it is used in source map + * generation and syntax error messages. + * @property {string} to - the path where you’ll put the output + * CSS file. You should always set `to` + * to generate correct source maps. + * @property {parser} parser - function to generate AST by string + * @property {stringifier} stringifier - class to generate string by AST + * @property {syntax} syntax - object with `parse` and `stringify` + * @property {object} map - source map options + * @property {boolean} map.inline - does source map should + * be embedded in the output + * CSS as a base64-encoded + * comment + * @property {string|object|false|function} map.prev - source map content + * from a previous + * processing step + * (for example, Sass). + * PostCSS will try to find + * previous map + * automatically, so you + * could disable it by + * `false` value. + * @property {boolean} map.sourcesContent - does PostCSS should set + * the origin content to map + * @property {string|false} map.annotation - does PostCSS should set + * annotation comment to map + * @property {string} map.from - override `from` in map’s + * `sources` + */ + +module.exports = exports['default']; + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +/** + * Contains helpers for safely splitting lists of CSS values, + * preserving parentheses and quotes. + * + * @example + * const list = postcss.list; + * + * @namespace list + */ + +var list = { + split: function split(string, separators, last) { + var array = []; + var current = ''; + var split = false; + var func = 0; + var quote = false; + var escape = false; + + for (var i = 0; i < string.length; i++) { + var letter = string[i]; + + if (quote) { + if (escape) { + escape = false; + } else if (letter === '\\') { + escape = true; + } else if (letter === quote) { + quote = false; + } + } else if (letter === '"' || letter === '\'') { + quote = letter; + } else if (letter === '(') { + func += 1; + } else if (letter === ')') { + if (func > 0) func -= 1; + } else if (func === 0) { + if (separators.indexOf(letter) !== -1) split = true; + } + + if (split) { + if (current !== '') array.push(current.trim()); + current = ''; + split = false; + } else { + current += letter; + } + } + + if (last || current !== '') array.push(current.trim()); + return array; + }, + + /** + * Safely splits space-separated values (such as those for `background`, + * `border-radius`, and other shorthand properties). + * + * @param {string} string - space-separated values + * + * @return {string[]} split values + * + * @example + * postcss.list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)'] + */ + space: function space(string) { + var spaces = [' ', '\n', '\t']; + return list.split(string, spaces); + }, + + /** + * Safely splits comma-separated values (such as those for `transition-*` + * and `background` properties). + * + * @param {string} string - comma-separated values + * + * @return {string[]} split values + * + * @example + * postcss.list.comma('black, linear-gradient(white, black)') + * //=> ['black', 'linear-gradient(white, black)'] + */ + comma: function comma(string) { + var comma = ','; + return list.split(string, [comma], true); + } +}; +exports.default = list; +module.exports = exports['default']; + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; + +var _stringifier = __webpack_require__(27); + +var _stringifier2 = _interopRequireDefault(_stringifier); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var LessStringifier = function (_Stringifier) { + _inherits(LessStringifier, _Stringifier); + + function LessStringifier() { + _classCallCheck(this, LessStringifier); + + return _possibleConstructorReturn(this, (LessStringifier.__proto__ || Object.getPrototypeOf(LessStringifier)).apply(this, arguments)); + } + + _createClass(LessStringifier, [{ + key: 'comment', + value: function comment(node) { + this.builder(node.raws.content, node); + } + }, { + key: 'import', + value: function _import(node) { + this.builder('@' + node.name); + this.builder((node.raws.afterName || '') + (node.directives || '') + (node.raws.between || '') + (node.urlFunc ? 'url(' : '') + (node.raws.beforeUrl || '') + (node.importPath || '') + (node.raws.afterUrl || '') + (node.urlFunc ? ')' : '') + (node.raws.after || '')); + + if (node.raws.semicolon) { + this.builder(';'); + } + } + }, { + key: 'rule', + value: function rule(node) { + _get(LessStringifier.prototype.__proto__ || Object.getPrototypeOf(LessStringifier.prototype), 'rule', this).call(this, node); + + if (node.empty && node.raws.semicolon) { + if (node.important) { + if (node.raws.important) { + this.builder(node.raws.important); + } else { + this.builder(' !important'); + } + } + + if (node.raws.semicolon) { + this.builder(';'); + } + } + } + }, { + key: 'block', + value: function block(node, start) { + var empty = node.empty; + var between = this.raw(node, 'between', 'beforeOpen'); + var after = ''; + + if (empty) { + this.builder(start + between, node, 'start'); + } else { + this.builder(start + between + '{', node, 'start'); + } + + if (node.nodes && node.nodes.length) { + this.body(node); + after = this.raw(node, 'after'); + } else { + after = this.raw(node, 'after', 'emptyBody'); + } + + if (after) { + this.builder(after); + } + + if (!empty) { + this.builder('}', node, 'end'); + } + } + }]); + + return LessStringifier; +}(_stringifier2.default); + +exports.default = LessStringifier; +module.exports = exports['default']; + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; + +var _rule = __webpack_require__(10); + +var _rule2 = _interopRequireDefault(_rule); + +var _lessStringify = __webpack_require__(14); + +var _lessStringify2 = _interopRequireDefault(_lessStringify); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Rule = function (_PostCssRule) { + _inherits(Rule, _PostCssRule); + + function Rule() { + _classCallCheck(this, Rule); + + return _possibleConstructorReturn(this, (Rule.__proto__ || Object.getPrototypeOf(Rule)).apply(this, arguments)); + } + + _createClass(Rule, [{ + key: 'toString', + value: function toString(stringifier) { + if (!stringifier) { + stringifier = { + stringify: _lessStringify2.default + }; + } + + return _get(Rule.prototype.__proto__ || Object.getPrototypeOf(Rule.prototype), 'toString', this).call(this, stringifier); + } + }]); + + return Rule; +}(_rule2.default); + +exports.default = Rule; +module.exports = exports['default']; + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; + +var _root = __webpack_require__(30); + +var _root2 = _interopRequireDefault(_root); + +var _lessStringify = __webpack_require__(14); + +var _lessStringify2 = _interopRequireDefault(_lessStringify); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (_typeof(call) === "object" || typeof call === "function") ? call : self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass)); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} + +var Root = function (_PostCssRoot) { + _inherits(Root, _PostCssRoot); + + function Root() { + _classCallCheck(this, Root); + + return _possibleConstructorReturn(this, (Root.__proto__ || Object.getPrototypeOf(Root)).apply(this, arguments)); + } + + _createClass(Root, [{ + key: 'toString', + value: function toString(stringifier) { + if (!stringifier) { + stringifier = { + stringify: _lessStringify2.default + }; + } + + return _get(Root.prototype.__proto__ || Object.getPrototypeOf(Root.prototype), 'toString', this).call(this, stringifier); + } + }]); + + return Root; +}(_root2.default); + +exports.default = Root; +module.exports = exports['default']; + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = findExtendRule; +var extendRuleKeyWords = ['&', ':', 'extend']; +var extendRuleKeyWordsCount = extendRuleKeyWords.length; + +function findExtendRule(tokens) { + var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var stack = []; + var len = tokens.length; + var end = start; + + while (end < len) { + var token = tokens[end]; + + if (extendRuleKeyWords.indexOf(token[1]) >= 0) { + stack.push(token[1]); + } else if (token[0] !== 'space') { + break; + } + + end++; + } + + for (var index = 0; index < extendRuleKeyWordsCount; index++) { + if (stack[index] !== extendRuleKeyWords[index]) { + return null; + } + } + + return tokens.slice(start, end); +} + +module.exports = exports['default']; + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMixinToken; + +var _globals = __webpack_require__(2); + +var unpaddedFractionalNumbersPattern = /\.[0-9]/; + +function isMixinToken(token) { + var symbol = token[1]; + var firstSymbolCode = symbol ? symbol[0].charCodeAt(0) : null; + return (firstSymbolCode === _globals.dot || firstSymbolCode === _globals.hash) && // ignore hashes used for colors + _globals.hashColorPattern.test(symbol) === false && // ignore dots used for unpadded fractional numbers + unpaddedFractionalNumbersPattern.test(symbol) === false; +} + +module.exports = exports['default']; + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = lessTokenize; + +var _globals = __webpack_require__(2); + +var _tokenizeSymbol = __webpack_require__(169); + +var _tokenizeSymbol2 = _interopRequireDefault(_tokenizeSymbol); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function lessTokenize(input) { + var state = { + input: input, + tokens: [], + css: input.css.valueOf(), + offset: -1, + line: 1, + pos: 0 + }; + state.length = state.css.length; + + while (state.pos < state.length) { + state.symbolCode = state.css.charCodeAt(state.pos); + state.symbol = state.css[state.pos]; + state.nextPos = null; + state.escaped = null; + state.lines = null; + state.lastLine = null; + state.cssPart = null; + state.escape = null; + state.nextLine = null; + state.nextOffset = null; + state.escapePos = null; + state.token = null; + + if (state.symbolCode === _globals.newline) { + state.offset = state.pos; + state.line += 1; + } + + (0, _tokenizeSymbol2.default)(state); + state.pos++; + } + + return state.tokens; +} + +module.exports = exports['default']; + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeSymbol; + +var _globals = __webpack_require__(2); + +var _tokenizeAtRule = __webpack_require__(170); + +var _tokenizeAtRule2 = _interopRequireDefault(_tokenizeAtRule); + +var _tokenizeBackslash = __webpack_require__(171); + +var _tokenizeBackslash2 = _interopRequireDefault(_tokenizeBackslash); + +var _tokenizeBasicSymbol = __webpack_require__(172); + +var _tokenizeBasicSymbol2 = _interopRequireDefault(_tokenizeBasicSymbol); + +var _tokenizeComma = __webpack_require__(173); + +var _tokenizeComma2 = _interopRequireDefault(_tokenizeComma); + +var _tokenizeDefault = __webpack_require__(174); + +var _tokenizeDefault2 = _interopRequireDefault(_tokenizeDefault); + +var _tokenizeOpenedParenthesis = __webpack_require__(179); + +var _tokenizeOpenedParenthesis2 = _interopRequireDefault(_tokenizeOpenedParenthesis); + +var _tokenizeQuotes = __webpack_require__(180); + +var _tokenizeQuotes2 = _interopRequireDefault(_tokenizeQuotes); + +var _tokenizeWhitespace = __webpack_require__(181); + +var _tokenizeWhitespace2 = _interopRequireDefault(_tokenizeWhitespace); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} // we cannot reduce complexity beyond this level +// eslint-disable-next-line complexity + + +function tokenizeSymbol(state) { + switch (state.symbolCode) { + case _globals.newline: + case _globals.space: + case _globals.tab: + case _globals.carriageReturn: + case _globals.feed: + (0, _tokenizeWhitespace2.default)(state); + break; + + case _globals.comma: + (0, _tokenizeComma2.default)(state); + break; + + case _globals.colon: + case _globals.semicolon: + case _globals.openedCurlyBracket: + case _globals.closedCurlyBracket: + case _globals.closedParenthesis: + case _globals.openSquareBracket: + case _globals.closeSquareBracket: + (0, _tokenizeBasicSymbol2.default)(state); + break; + + case _globals.openedParenthesis: + (0, _tokenizeOpenedParenthesis2.default)(state); + break; + + case _globals.singleQuote: + case _globals.doubleQuote: + (0, _tokenizeQuotes2.default)(state); + break; + + case _globals.atRule: + (0, _tokenizeAtRule2.default)(state); + break; + + case _globals.backslash: + (0, _tokenizeBackslash2.default)(state); + break; + + default: + (0, _tokenizeDefault2.default)(state); + break; + } +} + +module.exports = exports['default']; + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeAtRule; + +var _globals = __webpack_require__(2); + +var _unclosed = __webpack_require__(11); + +var _unclosed2 = _interopRequireDefault(_unclosed); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function tokenizeAtRule(state) { + // it's an interpolation + if (state.css.charCodeAt(state.pos + 1) === _globals.openedCurlyBracket) { + state.nextPos = state.css.indexOf('}', state.pos + 2); + + if (state.nextPos === -1) { + (0, _unclosed2.default)(state, 'interpolation'); + } + + state.cssPart = state.css.slice(state.pos, state.nextPos + 1); + state.lines = state.cssPart.split('\n'); + state.lastLine = state.lines.length - 1; + + if (state.lastLine > 0) { + state.nextLine = state.line + state.lastLine; + state.nextOffset = state.nextPos - state.lines[state.lastLine].length; + } else { + state.nextLine = state.line; + state.nextOffset = state.offset; + } + + state.tokens.push(['word', state.cssPart, state.line, state.pos - state.offset, state.nextLine, state.nextPos - state.nextOffset]); + state.offset = state.nextOffset; + state.line = state.nextLine; + } else { + _globals.atEndPattern.lastIndex = state.pos + 1; + + _globals.atEndPattern.test(state.css); + + if (_globals.atEndPattern.lastIndex === 0) { + state.nextPos = state.css.length - 1; + } else { + state.nextPos = _globals.atEndPattern.lastIndex - 2; + } + + state.cssPart = state.css.slice(state.pos, state.nextPos + 1); + state.token = 'at-word'; // check if it's a variable + + if (_globals.variablePattern.test(state.cssPart)) { + _globals.wordEndPattern.lastIndex = state.pos + 1; + + _globals.wordEndPattern.test(state.css); + + if (_globals.wordEndPattern.lastIndex === 0) { + state.nextPos = state.css.length - 1; + } else { + state.nextPos = _globals.wordEndPattern.lastIndex - 2; + } + + state.cssPart = state.css.slice(state.pos, state.nextPos + 1); + state.token = 'word'; + } + + state.tokens.push([state.token, state.cssPart, state.line, state.pos - state.offset, state.line, state.nextPos - state.offset]); + } + + state.pos = state.nextPos; +} + +module.exports = exports['default']; + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeBackslash; + +var _globals = __webpack_require__(2); + +function tokenizeBackslash(state) { + state.nextPos = state.pos; + state.escape = true; + + while (state.css.charCodeAt(state.nextPos + 1) === _globals.backslash) { + state.nextPos += 1; + state.escape = !state.escape; + } + + state.symbolCode = state.css.charCodeAt(state.nextPos + 1); + + if (state.escape && state.symbolCode !== _globals.slash && state.symbolCode !== _globals.space && state.symbolCode !== _globals.newline && state.symbolCode !== _globals.tab && state.symbolCode !== _globals.carriageReturn && state.symbolCode !== _globals.feed) { + state.nextPos += 1; + } + + state.tokens.push(['word', state.css.slice(state.pos, state.nextPos + 1), state.line, state.pos - state.offset, state.line, state.nextPos - state.offset]); + state.pos = state.nextPos; +} + +module.exports = exports['default']; + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeBasicSymbol; + +function tokenizeBasicSymbol(state) { + state.tokens.push([state.symbol, state.symbol, state.line, state.pos - state.offset]); +} + +module.exports = exports["default"]; + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeComma; + +function tokenizeComma(state) { + state.tokens.push(['word', state.symbol, state.line, state.pos - state.offset, state.line, state.pos - state.offset + 1]); +} + +module.exports = exports['default']; + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeDefault; + +var _globals = __webpack_require__(2); + +var _findEndOfEscaping = __webpack_require__(175); + +var _findEndOfEscaping2 = _interopRequireDefault(_findEndOfEscaping); + +var _isEscaping = __webpack_require__(176); + +var _isEscaping2 = _interopRequireDefault(_isEscaping); + +var _tokenizeInlineComment = __webpack_require__(177); + +var _tokenizeInlineComment2 = _interopRequireDefault(_tokenizeInlineComment); + +var _tokenizeMultilineComment = __webpack_require__(178); + +var _tokenizeMultilineComment2 = _interopRequireDefault(_tokenizeMultilineComment); + +var _unclosed = __webpack_require__(11); + +var _unclosed2 = _interopRequireDefault(_unclosed); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function tokenizeDefault(state) { + var nextSymbolCode = state.css.charCodeAt(state.pos + 1); + + if (state.symbolCode === _globals.slash && nextSymbolCode === _globals.asterisk) { + (0, _tokenizeMultilineComment2.default)(state); + } else if (state.symbolCode === _globals.slash && nextSymbolCode === _globals.slash) { + (0, _tokenizeInlineComment2.default)(state); + } else { + if ((0, _isEscaping2.default)(state)) { + var pos = (0, _findEndOfEscaping2.default)(state); + + if (pos < 0) { + (0, _unclosed2.default)(state, 'escaping'); + } else { + state.nextPos = pos; + } + } else { + _globals.wordEndPattern.lastIndex = state.pos + 1; + + _globals.wordEndPattern.test(state.css); + + if (_globals.wordEndPattern.lastIndex === 0) { + state.nextPos = state.css.length - 1; + } else { + state.nextPos = _globals.wordEndPattern.lastIndex - 2; + } + } + + state.cssPart = state.css.slice(state.pos, state.nextPos + 1); + state.tokens.push(['word', state.cssPart, state.line, state.pos - state.offset, state.line, state.nextPos - state.offset]); + state.pos = state.nextPos; + } +} + +module.exports = exports['default']; + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = findEndOfEscaping; + +var _globals = __webpack_require__(2); +/** + * @param state + * @returns {number} + */ + + +function findEndOfEscaping(state) { + var openQuotesCount = 0, + quoteCode = -1; + + for (var i = state.pos + 1; i < state.length; i++) { + var symbolCode = state.css.charCodeAt(i); + var prevSymbolCode = state.css.charCodeAt(i - 1); + + if (prevSymbolCode !== _globals.backslash && (symbolCode === _globals.singleQuote || symbolCode === _globals.doubleQuote || symbolCode === _globals.backTick)) { + if (quoteCode === -1) { + quoteCode = symbolCode; + openQuotesCount++; + } else if (symbolCode === quoteCode) { + openQuotesCount--; + + if (!openQuotesCount) { + return i; + } + } + } + } + + return -1; +} + +module.exports = exports['default']; + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isEscaping; + +var _globals = __webpack_require__(2); + +var nextSymbolVariants = [_globals.backTick, _globals.doubleQuote, _globals.singleQuote]; + +function isEscaping(state) { + var nextSymbolCode = state.css.charCodeAt(state.pos + 1); + return state.symbolCode === _globals.tilde && nextSymbolVariants.indexOf(nextSymbolCode) >= 0; +} + +module.exports = exports['default']; + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeInlineComment; + +function tokenizeInlineComment(state) { + state.nextPos = state.css.indexOf('\n', state.pos + 2) - 1; + + if (state.nextPos === -2) { + state.nextPos = state.css.length - 1; + } + + state.tokens.push(['comment', state.css.slice(state.pos, state.nextPos + 1), state.line, state.pos - state.offset, state.line, state.nextPos - state.offset, 'inline']); + state.pos = state.nextPos; +} + +module.exports = exports['default']; + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeMultilineComment; + +var _unclosed = __webpack_require__(11); + +var _unclosed2 = _interopRequireDefault(_unclosed); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function tokenizeMultilineComment(state) { + state.nextPos = state.css.indexOf('*/', state.pos + 2) + 1; + + if (state.nextPos === 0) { + (0, _unclosed2.default)(state, 'comment'); + } + + state.cssPart = state.css.slice(state.pos, state.nextPos + 1); + state.lines = state.cssPart.split('\n'); + state.lastLine = state.lines.length - 1; + + if (state.lastLine > 0) { + state.nextLine = state.line + state.lastLine; + state.nextOffset = state.nextPos - state.lines[state.lastLine].length; + } else { + state.nextLine = state.line; + state.nextOffset = state.offset; + } + + state.tokens.push(['comment', state.cssPart, state.line, state.pos - state.offset, state.nextLine, state.nextPos - state.nextOffset]); + state.offset = state.nextOffset; + state.line = state.nextLine; + state.pos = state.nextPos; +} + +module.exports = exports['default']; + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeOpenedParenthesis; + +var _globals = __webpack_require__(2); + +var _unclosed = __webpack_require__(11); + +var _unclosed2 = _interopRequireDefault(_unclosed); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function findClosedParenthesisPosition(css, length, start) { + var openedParenthesisCount = 0; + + for (var i = start; i < length; i++) { + var symbol = css[i]; + + if (symbol === '(') { + openedParenthesisCount++; + } else if (symbol === ')') { + openedParenthesisCount--; + + if (!openedParenthesisCount) { + return i; + } + } + } + + return -1; +} // it is not very reasonable to reduce complexity beyond this level +// eslint-disable-next-line complexity + + +function tokenizeOpenedParenthesis(state) { + var nextSymbolCode = state.css.charCodeAt(state.pos + 1); + var tokensCount = state.tokens.length; + var prevTokenCssPart = tokensCount ? state.tokens[tokensCount - 1][1] : ''; + + if (prevTokenCssPart === 'url' && nextSymbolCode !== _globals.singleQuote && nextSymbolCode !== _globals.doubleQuote && nextSymbolCode !== _globals.space && nextSymbolCode !== _globals.newline && nextSymbolCode !== _globals.tab && nextSymbolCode !== _globals.feed && nextSymbolCode !== _globals.carriageReturn) { + state.nextPos = state.pos; + + do { + state.escaped = false; + state.nextPos = state.css.indexOf(')', state.nextPos + 1); + + if (state.nextPos === -1) { + (0, _unclosed2.default)(state, 'bracket'); + } + + state.escapePos = state.nextPos; + + while (state.css.charCodeAt(state.escapePos - 1) === _globals.backslash) { + state.escapePos -= 1; + state.escaped = !state.escaped; + } + } while (state.escaped); + + state.tokens.push(['brackets', state.css.slice(state.pos, state.nextPos + 1), state.line, state.pos - state.offset, state.line, state.nextPos - state.offset]); + state.pos = state.nextPos; + } else { + state.nextPos = findClosedParenthesisPosition(state.css, state.length, state.pos); + state.cssPart = state.css.slice(state.pos, state.nextPos + 1); + var foundParam = state.cssPart.indexOf('@') >= 0; + var foundString = /['"]/.test(state.cssPart); + + if (state.cssPart.length === 0 || state.cssPart === '...' || foundParam && !foundString) { + // we're dealing with a mixin param block + if (state.nextPos === -1) { + (0, _unclosed2.default)(state, 'bracket'); + } + + state.tokens.push([state.symbol, state.symbol, state.line, state.pos - state.offset]); + } else { + var badBracket = _globals.badBracketPattern.test(state.cssPart); + + if (state.nextPos === -1 || badBracket) { + state.tokens.push([state.symbol, state.symbol, state.line, state.pos - state.offset]); + } else { + state.tokens.push(['brackets', state.cssPart, state.line, state.pos - state.offset, state.line, state.nextPos - state.offset]); + state.pos = state.nextPos; + } + } + } +} + +module.exports = exports['default']; + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeQuotes; + +var _globals = __webpack_require__(2); + +var _unclosed = __webpack_require__(11); + +var _unclosed2 = _interopRequireDefault(_unclosed); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function tokenizeQuotes(state) { + state.nextPos = state.pos; + + do { + state.escaped = false; + state.nextPos = state.css.indexOf(state.symbol, state.nextPos + 1); + + if (state.nextPos === -1) { + (0, _unclosed2.default)(state, 'quote'); + } + + state.escapePos = state.nextPos; + + while (state.css.charCodeAt(state.escapePos - 1) === _globals.backslash) { + state.escapePos -= 1; + state.escaped = !state.escaped; + } + } while (state.escaped); + + state.tokens.push(['string', state.css.slice(state.pos, state.nextPos + 1), state.line, state.pos - state.offset, state.line, state.nextPos - state.offset]); + state.pos = state.nextPos; +} + +module.exports = exports['default']; + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = tokenizeWhitespace; + +var _globals = __webpack_require__(2); + +function tokenizeWhitespace(state) { + state.nextPos = state.pos; // collect all neighbour space symbols + + do { + state.nextPos += 1; + state.symbolCode = state.css.charCodeAt(state.nextPos); + + if (state.symbolCode === _globals.newline) { + state.offset = state.nextPos; + state.line += 1; + } + } while (state.symbolCode === _globals.space || state.symbolCode === _globals.newline || state.symbolCode === _globals.tab || state.symbolCode === _globals.carriageReturn || state.symbolCode === _globals.feed); + + state.tokens.push(['space', state.css.slice(state.pos, state.nextPos)]); + state.pos = state.nextPos - 1; +} + +module.exports = exports['default']; + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lessParse = __webpack_require__(183); + +var _lessParse2 = _interopRequireDefault(_lessParse); + +var _lessStringify = __webpack_require__(14); + +var _lessStringify2 = _interopRequireDefault(_lessStringify); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +exports.default = { + parse: _lessParse2.default, + stringify: _lessStringify2.default +}; +module.exports = exports['default']; + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = lessParse; + +var _input = __webpack_require__(26); + +var _input2 = _interopRequireDefault(_input); + +var _lessParser = __webpack_require__(76); + +var _lessParser2 = _interopRequireDefault(_lessParser); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function lessParse(less, opts) { + var input = new _input2.default(less, opts); + var parser = new _lessParser2.default(input, opts); // const parser = new Parser(input, opts); + + parser.tokenize(); + parser.loop(); + return parser.root; +} // import Parser from 'postcss/lib/parser'; + + +module.exports = exports['default']; + +/***/ }) +/******/ ]); +}); \ No newline at end of file diff --git a/node_modules/prettier/parser-typescript.js b/node_modules/prettier/parser-typescript.js new file mode 100644 index 0000000..3a571d3 --- /dev/null +++ b/node_modules/prettier/parser-typescript.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.typescript=t())}(this,function(){"use strict";var e=function(e,t){var r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};var t=function(e,t){if(e.startsWith("#!")){var r=e.indexOf("\n"),n={type:"Line",value:e.slice(2,r),range:[0,r],loc:{source:null,start:{line:1,column:0},end:{line:1,column:r}}};t.comments=[n].concat(t.comments)}},r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e,t){return e(t={exports:{}},t.exports),t.exports}var a=i(function(e){e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return null;var r=t.filter(function(e){return"\r\n"===e}).length;return r>t.length-r?"\r\n":"\n"},e.exports.graceful=function(t){return e.exports(t)||"\n"}}),o={EOL:"\n"},s=Object.freeze({default:o}),c=s&&o||s,u=i(function(e,t){var r,n;function i(){return r=(e=a)&&e.__esModule?e:{default:e};var e}function o(){return n=c}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e){var t=e.match(l);return t?t[0].trimLeft():""},t.strip=function(e){var t=e.match(l);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return g(e).pragmas},t.parseWithComments=g,t.print=function(e){var t=e.comments,a=void 0===t?"":t,s=e.pragmas,c=void 0===s?{}:s,u=(0,(r||i()).default)(a)||(n||o()).EOL,l=Object.keys(c),_=l.map(function(e){return y(e,c[e])}).reduce(function(e,t){return e.concat(t)},[]).map(function(e){return" * "+e+u}).join("");if(!a){if(0===l.length)return"";if(1===l.length&&!Array.isArray(c[l[0]])){var d=c[l[0]];return"".concat("/**"," ").concat(y(l[0],d)[0]).concat(" */")}}var p=a.split(u).map(function(e){return"".concat(" *"," ").concat(e)}).join(u)+u;return"/**"+u+(a?p:"")+(a&&l.length?" *"+u:"")+_+" */"};var s=/\*\/$/,u=/^\/\*\*/,l=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,_=/(^|\s+)\/\/([^\r\n]*)/g,d=/^(\r?\n)+/,p=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,f=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,m=/(\r?\n|^) *\* ?/g;function g(e){var t=(0,(r||i()).default)(e)||(n||o()).EOL;e=e.replace(u,"").replace(s,"").replace(m,"$1");for(var a="";a!==e;)a=e,e=e.replace(p,"".concat(t,"$1 $2").concat(t));e=e.replace(d,"").trimRight();for(var c,l=Object.create(null),g=e.replace(f,"").replace(d,"").trimRight();c=f.exec(e);){var y=c[2].replace(_,"");"string"==typeof l[c[1]]||Array.isArray(l[c[1]])?l[c[1]]=[].concat(l[c[1]],y):l[c[1]]=y}return{comments:g,pragmas:l}}function y(e,t){return[].concat(t).map(function(t){return"@".concat(e," ").concat(t).trim()})}});n(u);var l=function(e){var t=Object.keys(u.parse(u.extract(e)));return-1!==t.indexOf("prettier")||-1!==t.indexOf("format")},_=function(e){return e.length>0?e[e.length-1]:null};var d={locStart:function e(t,r){return!(r=r||{}).ignoreDecorators&&t.declaration&&t.declaration.decorators&&t.declaration.decorators.length>0?e(t.declaration.decorators[0]):!r.ignoreDecorators&&t.decorators&&t.decorators.length>0?e(t.decorators[0]):t.__location?t.__location.startOffset:t.range?t.range[0]:"number"==typeof t.start?t.start:t.loc?t.loc.start:null},locEnd:function e(t){var r=t.nodes&&_(t.nodes);if(r&&t.source&&!t.source.end&&(t=r),t.__location)return t.__location.endOffset;var n=t.range?t.range[1]:"number"==typeof t.end?t.end:null;return t.typeAnnotation?Math.max(n,e(t.typeAnnotation)):t.loc&&!n?t.loc.end:n}};function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var f=i(function(e){e.exports=function(){var e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(e,"g")}}),m=i(function(e){e.exports=function(e){return!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))}});i(function(e){e.exports=function(e){if("string"!=typeof e||0===e.length)return 0;var t;e="string"==typeof(t=e)?t.replace(f(),""):t;for(var r=0,n=0;n=127&&i<=159||(i>=768&&i<=879||(i>65535&&n++,r+=m(i)?2:1))}return r}});function g(e){return function(t,r,n){var i=n&&n.backwards;if(!1===r)return!1;for(var a=t.length,o=r;o>=0&&o"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(e,t){e.forEach(function(e){y[e]=t})});var h=function(e){return e.length>0?e[e.length-1]:null};var v=function(e,t){return function e(t,r){if(t&&"object"===p(t))if(Array.isArray(t)){var n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;e(c,r)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}}else if("string"==typeof t.type){for(var u=Object.keys(t),l=0;l1)for(var r=1;r>>=5)>0&&(t|=32),r+=te(t)}while(n>0);return r},ie=function(e,t,r){var n,i,a,o,s=e.length,c=0,u=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=re(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&i),c+=(i&=31)<>1,1==(1&a)?-o:o),r.rest=t},ae=i(function(e,t){t.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function i(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var r=e,n=i(e);if(n){if(!n.path)return e;r=n.path}for(var o,s=t.isAbsolute(r),c=r.split(/\/+/),u=0,l=c.length-1;l>=0;l--)"."===(o=c[l])?c.splice(l,1):".."===o?u++:u>0&&(""===o?(c.splice(l+1,u),u=0):(c.splice(l,2),u--));return""===(r=c.join("/"))&&(r=s?"/":"."),n?(n.path=r,a(n)):r}function s(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),s=i(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),a(r);if(r||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,a(s)):c}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function _(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=c?u:function(e){return l(e)?"$"+e:e},t.fromSetString=c?u:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=_(e.source,t.source);return 0!==n?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)||r?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!=(n=e.generatedLine-t.generatedLine)?n:_(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=_(e.source,t.source))?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:_(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=_(e.source,t.source))?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:_(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var n=i(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var c=n.path.lastIndexOf("/");c>=0&&(n.path=n.path.substring(0,c+1))}t=s(a(n),t)}return o(t)}}),oe=Object.prototype.hasOwnProperty,se="undefined"!=typeof Map;function ce(){this._array=[],this._set=se?new Map:Object.create(null)}ce.fromArray=function(e,t){for(var r=new ce,n=0,i=e.length;n=0)return t}else{var r=ae.toSetString(e);if(oe.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},ce.prototype.at=function(e){if(e>=0&&en||i==n&&o>=a||ae.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},le.prototype.toArray=function(){return this._sorted||(this._array.sort(ae.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var _e=ue.ArraySet,de={MappingList:le}.MappingList;function pe(e){e||(e={}),this._file=ae.getArg(e,"file",null),this._sourceRoot=ae.getArg(e,"sourceRoot",null),this._skipValidation=ae.getArg(e,"skipValidation",!1),this._sources=new _e,this._names=new _e,this._mappings=new de,this._sourcesContents=null}pe.prototype._version=3,pe.fromSourceMap=function(e){var t=e.sourceRoot,r=new pe({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=ae.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(n){var i=n;null!==t&&(i=ae.relative(t,n)),r._sources.has(i)||r._sources.add(i);var a=e.sourceContentFor(n);null!=a&&r.setSourceContent(n,a)}),r},pe.prototype.addMapping=function(e){var t=ae.getArg(e,"generated"),r=ae.getArg(e,"original",null),n=ae.getArg(e,"source",null),i=ae.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},pe.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=ae.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ae.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[ae.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},pe.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var i=this._sourceRoot;null!=i&&(n=ae.relative(i,n));var a=new _e,o=new _e;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=r&&(t.source=ae.join(r,t.source)),null!=i&&(t.source=ae.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var c=t.source;null==c||a.has(c)||a.add(c);var u=t.name;null==u||o.has(u)||o.add(u)},this),this._sources=a,this._names=o,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=ae.join(r,t)),null!=i&&(t=ae.relative(i,t)),this.setSourceContent(t,n))},this)},pe.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},pe.prototype._serializeMappings=function(){for(var e,t,r,n,i=0,a=1,o=0,s=0,c=0,u=0,l="",_=this._mappings.toArray(),d=0,p=_.length;d0){if(!ae.compareByGeneratedPositionsInflated(t,_[d-1]))continue;e+=","}e+=ne(t.generatedColumn-i),i=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=ne(n-u),u=n,e+=ne(t.originalLine-1-s),s=t.originalLine-1,e+=ne(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=ne(r-c),c=r)),l+=e}return l},pe.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=ae.relative(t,e));var r=ae.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},pe.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},pe.prototype.toString=function(){return JSON.stringify(this.toJSON())};var fe={SourceMapGenerator:pe},me=i(function(e,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,n,i){if(0===r.length)return-1;var a=function e(r,n,i,a,o,s){var c=Math.floor((n-r)/2)+r,u=o(i,a[c],!0);return 0===u?c:u>0?n-c>1?e(c,n,i,a,o,s):s==t.LEAST_UPPER_BOUND?n1?e(r,c,i,a,o,s):s==t.LEAST_UPPER_BOUND?c:r<0?-1:r}(-1,r.length,e,r,n,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===n(r[a],r[a-1],!0);)--a;return a}});function ge(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ye(e,t,r,n){if(r=0){var a=this._originalMappings[i];if(void 0===e.column)for(var o=a.originalLine;a&&a.originalLine===o;)n.push({line:ae.getArg(a,"generatedLine",null),column:ae.getArg(a,"generatedColumn",null),lastColumn:ae.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var s=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==s;)n.push({line:ae.getArg(a,"generatedLine",null),column:ae.getArg(a,"generatedColumn",null),lastColumn:ae.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return n};function xe(e,t){var r=e;"string"==typeof e&&(r=ae.parseSourceMapInput(e));var n=ae.getArg(r,"version"),i=ae.getArg(r,"sources"),a=ae.getArg(r,"names",[]),o=ae.getArg(r,"sourceRoot",null),s=ae.getArg(r,"sourcesContent",null),c=ae.getArg(r,"mappings"),u=ae.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=ae.normalize(o)),i=i.map(String).map(ae.normalize).map(function(e){return o&&ae.isAbsolute(o)&&ae.isAbsolute(e)?ae.relative(o,e):e}),this._names=he.fromArray(a.map(String),!0),this._sources=he.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(e){return ae.computeSourceURL(o,e,t)}),this.sourceRoot=o,this.sourcesContent=s,this._mappings=c,this._sourceMapURL=t,this.file=u}function Se(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}xe.prototype=Object.create(be.prototype),xe.prototype.consumer=be,xe.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=ae.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t1&&(r.source=_+i[1],_+=i[1],r.originalLine=u+i[2],u=r.originalLine,r.originalLine+=1,r.originalColumn=l+i[3],l=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),h.push(r),"number"==typeof r.originalLine&&y.push(r)}ve(h,ae.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,ve(y,ae.compareByOriginalPositions),this.__originalMappings=y},xe.prototype._findMapping=function(e,t,r,n,i,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return me.search(e,t,i,a)},xe.prototype.computeColumnSpans=function(){for(var e=0;e=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var i=ae.getArg(n,"source",null);null!==i&&(i=this._sources.at(i),i=ae.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=ae.getArg(n,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:ae.getArg(n,"originalLine",null),column:ae.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},xe.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},xe.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var n,i=e;if(null!=this.sourceRoot&&(i=ae.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(n=ae.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||"/"==n.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},xe.prototype.generatedPositionFor=function(e){var t=ae.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:ae.getArg(e,"line"),originalColumn:ae.getArg(e,"column")},n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",ae.compareByOriginalPositions,ae.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(n>=0){var i=this._originalMappings[n];if(i.source===r.source)return{line:ae.getArg(i,"generatedLine",null),column:ae.getArg(i,"generatedColumn",null),lastColumn:ae.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};function De(e,t){var r=e;"string"==typeof e&&(r=ae.parseSourceMapInput(e));var n=ae.getArg(r,"version"),i=ae.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new he,this._names=new he;var a={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=ae.getArg(e,"offset"),n=ae.getArg(r,"line"),i=ae.getArg(r,"column");if(n=0;t--)this.prepend(e[t]);else{if(!e[Ce]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},Ee.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r>18&63]+Ne[i>>12&63]+Ne[i>>6&63]+Ne[63&i]);return a.join("")}function Oe(e){var t;we||Fe();for(var r=e.length,n=r%3,i="",a=[],o=0,s=r-n;os?s:o+16383));return 1===n?(t=e[r-1],i+=Ne[t>>2],i+=Ne[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=Ne[t>>10],i+=Ne[t>>4&63],i+=Ne[t<<2&63],i+="="),a.push(i),a.join("")}function Me(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,l=-7,_=r?i-1:0,d=r?-1:1,p=e[t+_];for(_+=d,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+_],_+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+_],_+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)}function Le(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+_>=1?d/c:d*Math.pow(2,1-_))*c>=2&&(o++,c/=2),o+_>=l?(s=0,o=l):o+_>=1?(s=(t*c-1)*Math.pow(2,i),o+=_):(s=t*Math.pow(2,_-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=f,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=f,o/=256,u-=8);e[r+p-f]|=128*m}var Re={}.toString,Be=Array.isArray||function(e){return"[object Array]"==Re.call(e)};function je(){return ze.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Je(e,t){if(je()=je())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+je().toString(16)+" bytes");return 0|e}function He(e){return!(null==e||!e._isBuffer)}function Ge(e,t){if(He(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return bt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return xt(e).length;default:if(n)return bt(e).length;t=(""+t).toLowerCase(),n=!0}}function Xe(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Qe(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=ze.from(t,n)),He(t))return 0===t.length?-1:Ye(e,t,r,n,i);if("number"==typeof t)return t&=255,ze.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ye(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Ye(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){for(var _=!0,d=0;di&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function it(e,t,r){return 0===t&&r===e.length?Oe(e):Oe(e.slice(t,r))}function at(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+_<=r)switch(_){case 1:u<128&&(l=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(l=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,_=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=_}return function(e){var t=e.length;if(t<=ot)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ut(this,t,r);case"utf8":case"utf-8":return at(this,t,r);case"ascii":return st(this,t,r);case"latin1":case"binary":return ct(this,t,r);case"base64":return it(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},ze.prototype.equals=function(e){if(!He(e))throw new TypeError("Argument must be a Buffer");return this===e||0===ze.compare(this,e)},ze.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},ze.prototype.compare=function(e,t,r,n,i){if(!He(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return $e(this,e,t,r);case"utf8":case"utf-8":return Ze(this,e,t,r);case"ascii":return et(this,e,t,r);case"latin1":case"binary":return tt(this,e,t,r);case"base64":return rt(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},ze.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ot=4096;function st(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function dt(e,t,r,n,i,a){if(!He(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function pt(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function ft(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function mt(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function gt(e,t,r,n,i){return i||mt(e,0,r,4),Le(e,t,r,n,23,4),r+4}function yt(e,t,r,n,i){return i||mt(e,0,r,8),Le(e,t,r,n,52,8),r+8}ze.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},ze.prototype.readUInt8=function(e,t){return t||_t(e,1,this.length),this[e]},ze.prototype.readUInt16LE=function(e,t){return t||_t(e,2,this.length),this[e]|this[e+1]<<8},ze.prototype.readUInt16BE=function(e,t){return t||_t(e,2,this.length),this[e]<<8|this[e+1]},ze.prototype.readUInt32LE=function(e,t){return t||_t(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},ze.prototype.readUInt32BE=function(e,t){return t||_t(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},ze.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||_t(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},ze.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||_t(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},ze.prototype.readInt8=function(e,t){return t||_t(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},ze.prototype.readInt16LE=function(e,t){t||_t(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},ze.prototype.readInt16BE=function(e,t){t||_t(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},ze.prototype.readInt32LE=function(e,t){return t||_t(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},ze.prototype.readInt32BE=function(e,t){return t||_t(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},ze.prototype.readFloatLE=function(e,t){return t||_t(e,4,this.length),Me(this,e,!0,23,4)},ze.prototype.readFloatBE=function(e,t){return t||_t(e,4,this.length),Me(this,e,!1,23,4)},ze.prototype.readDoubleLE=function(e,t){return t||_t(e,8,this.length),Me(this,e,!0,52,8)},ze.prototype.readDoubleBE=function(e,t){return t||_t(e,8,this.length),Me(this,e,!1,52,8)},ze.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||dt(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},ze.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,1,255,0),ze.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},ze.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,2,65535,0),ze.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):pt(this,e,t,!0),t+2},ze.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,2,65535,0),ze.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):pt(this,e,t,!1),t+2},ze.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,4,4294967295,0),ze.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):ft(this,e,t,!0),t+4},ze.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,4,4294967295,0),ze.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ft(this,e,t,!1),t+4},ze.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);dt(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},ze.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);dt(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},ze.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,1,127,-128),ze.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},ze.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,2,32767,-32768),ze.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):pt(this,e,t,!0),t+2},ze.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,2,32767,-32768),ze.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):pt(this,e,t,!1),t+2},ze.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,4,2147483647,-2147483648),ze.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ft(this,e,t,!0),t+4},ze.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||dt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),ze.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ft(this,e,t,!1),t+4},ze.prototype.writeFloatLE=function(e,t,r){return gt(this,e,t,!0,r)},ze.prototype.writeFloatBE=function(e,t,r){return gt(this,e,t,!1,r)},ze.prototype.writeDoubleLE=function(e,t,r){return yt(this,e,t,!0,r)},ze.prototype.writeDoubleBE=function(e,t,r){return yt(this,e,t,!1,r)},ze.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!ze.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function xt(e){return function(e){var t,r,n,i,a,o;we||Fe();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new Pe(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=Ae[e.charCodeAt(t)]<<2|Ae[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=Ae[e.charCodeAt(t)]<<10|Ae[e.charCodeAt(t+1)]<<4|Ae[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ht,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function St(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Dt(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var kt=Object.prototype.toString,Tt="function"==typeof ze.alloc&&"function"==typeof ze.allocUnsafe&&"function"==typeof ze.from;var Ct,Et=function(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return n=e,"ArrayBuffer"===kt.call(n).slice(8,-1)?function(e,t,r){t>>>=0;var n=e.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(void 0===r)r=n;else if((r>>>=0)>n)throw new RangeError("'length' is out of bounds");return Tt?ze.from(e.slice(t,t+r)):new ze(new Uint8Array(e.slice(t,t+r)))}(e,t,r):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ze.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return Tt?ze.from(e,t):new ze(e,t)}(e,t):Tt?ze.from(e):new ze(e);var n},Nt={},At=(Object.freeze({default:Nt}),Y&&Q||Y),Pt=X&&G||X,wt=At;try{(Ct=Pt).existsSync&&Ct.readFileSync||(Ct=null)}catch(e){}var Ft="auto",It={},Ot=/^data:application\/json[^,]+base64,/,Mt=[],Lt=[];function Rt(){return"browser"===Ft||"node"!==Ft&&("undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type))}function Bt(e){return function(t){for(var r=0;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0;for(var r=0,n=e;r>1);switch(n(r(e[c]),s)){case-1:a=c+1;break;case 0:return c;case 1:o=c-1}}return~a}function m(e,t,r,n,i){if(e&&e.length>0){var a=e.length;if(a>0){var o=void 0===n||n<0?0:n,s=void 0===i||o+i>a-1?a-1:o+i,c=void 0;for(arguments.length<=2?(c=e[o],o++):c=r;o<=s;)c=t(c,e[o],o),o++;return c}}return r}e.createMap=r,e.createMapFromEntries=function(e){for(var t=r(),n=0,i=e;n=0;r--){var n=e[r];if(t(n,r))return n}},e.findIndex=function(e,t,r){for(var n=r||0;n=0;n--)if(t(e[n],n))return n;return-1},e.findMap=function(e,t){for(var r=0;r0&&g.assertGreaterThanOrEqual(r(t[a],t[a-1]),0);t:for(var o=i;io&&g.assertGreaterThanOrEqual(r(e[i],e[i-1]),0),r(t[a],e[i])){case-1:n.push(t[a]);continue e;case 0:continue e;case 1:continue t}}return n},e.sum=function(e,t){for(var r=0,n=0,i=e;nt?1:0}function I(e,t){return P(e,t)}e.hasProperty=h,e.getProperty=function(e,t){return y.call(e,t)?e[t]:void 0},e.getOwnKeys=function(e){var t=[];for(var r in e)y.call(e,r)&&t.push(r);return t},e.getOwnValues=function(e){var t=[];for(var r in e)y.call(e,r)&&t.push(e[r]);return t},e.arrayFrom=v,e.assign=function(e){for(var t=[],r=1;r=t},e.assert=function e(r,n,i,a){r||(i&&(n+="\r\nVerbose Debug Information: "+("string"==typeof i?i:i())),t(n?"False expression: "+n:"False expression.",a||e))},e.assertEqual=function(e,r,n,i){e!==r&&t("Expected "+e+" === "+r+". "+(n?i?n+" "+i:n:""))},e.assertLessThan=function(e,r,n){e>=r&&t("Expected "+e+" < "+r+". "+(n||""))},e.assertLessThanOrEqual=function(e,r){e>r&&t("Expected "+e+" <= "+r)},e.assertGreaterThanOrEqual=function(e,r){e= "+r)},e.fail=t,e.assertDefined=r,e.assertEachDefined=function(e,t){for(var n=0,i=e;n0?1:0}function i(e){var t=new Intl.Collator(e,{usage:"sort",sensitivity:"variant"}).compare;return function(e,r){return n(e,r,t)}}function a(e){return void 0!==e?o():function(e,r){return n(e,r,t)};function t(e,t){return e.localeCompare(t)}}function o(){return function(t,r){return n(t,r,e)};function e(e,r){return t(e.toUpperCase(),r.toUpperCase())||t(e,r)}function t(e,t){return et?1:0}}}();function R(e,t,r){for(var n=new Array(t.length+1),i=new Array(t.length+1),a=r+1,o=0;o<=t.length;o++)n[o]=o;for(o=1;o<=e.length;o++){var s=e.charCodeAt(o-1),c=o>r?o-r:1,u=t.length>r+o?r+o:t.length;i[0]=o;for(var l=o,_=1;_r)return;var p=n;n=i,i=p}var f=n[t.length];return f>r?void 0:f}function B(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function j(e,t){return e.length>t.length&&B(e,t)}function J(e,t){for(var r=t;r=r.length+n.length&&U(t,r)&&B(t,n)}e.getUILocale=function(){return M},e.setUILocale=function(e){M!==e&&(M=e,O=void 0)},e.compareStringsCaseSensitiveUI=function(e,t){return(O||(O=L(M)))(e,t)},e.compareProperties=function(e,t,r,n){return e===t?0:void 0===e?-1:void 0===t?1:n(e[r],t[r])},e.compareBooleans=function(e,t){return w(e?1:0,t?1:0)},e.getSpellingSuggestion=function(e,t,r){for(var n,i=Math.min(2,Math.floor(.34*e.length)),a=Math.floor(.4*e.length)+1,o=!1,s=e.toLowerCase(),c=0,u=t;ci&&(i=c.prefix.length,n=s)}return n},e.startsWith=U,e.removePrefix=function(e,t){return U(e,t)?e.substr(t.length):e},e.tryRemovePrefix=function(e,t,r){return void 0===r&&(r=C),U(r(e),r(t))?e.substring(t.length):void 0},e.and=function(e,t){return function(r){return e(r)&&t(r)}},e.or=function(e,t){return function(r){return e(r)||t(r)}},e.assertTypeIsNever=function(e){},e.singleElementArray=function(e){return void 0===e?void 0:[e]},e.enumerateInsertsAndDeletes=function(e,t,r,n,i,a){a=a||T;for(var o=0,s=0,c=e.length,u=t.length;o0;p(),s--){var l=t[a];if(l)if(l.isClosed)t[a]=void 0;else{u++;var _=d(l,v(l.fileName));l.isClosed?t[a]=void 0:_?(l.unchangedPolls=0,t!==i&&(t[a]=void 0,g(l))):l.unchangedPolls!==e.unchangedPollThresholds[n]?l.unchangedPolls++:t===i?(l.unchangedPolls=1,t[a]=void 0,m(l,r.Low)):n!==r.High&&(l.unchangedPolls++,t[a]=void 0,m(l,n===r.Low?r.Medium:r.High)),t[a]&&(c type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:t(1066,e.DiagnosticCategory.Error,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:t(1068,e.DiagnosticCategory.Error,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:t(1069,e.DiagnosticCategory.Error,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:t(1070,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:t(1071,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:t(1079,e.DiagnosticCategory.Error,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:t(1084,e.DiagnosticCategory.Error,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:t(1085,e.DiagnosticCategory.Error,"Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085","Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."),An_accessor_cannot_be_declared_in_an_ambient_context:t(1086,e.DiagnosticCategory.Error,"An_accessor_cannot_be_declared_in_an_ambient_context_1086","An accessor cannot be declared in an ambient context."),_0_modifier_cannot_appear_on_a_constructor_declaration:t(1089,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:t(1090,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:t(1091,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:t(1092,e.DiagnosticCategory.Error,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:t(1093,e.DiagnosticCategory.Error,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:t(1094,e.DiagnosticCategory.Error,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:t(1095,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:t(1096,e.DiagnosticCategory.Error,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:t(1097,e.DiagnosticCategory.Error,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:t(1098,e.DiagnosticCategory.Error,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:t(1099,e.DiagnosticCategory.Error,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:t(1100,e.DiagnosticCategory.Error,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:t(1101,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:t(1102,e.DiagnosticCategory.Error,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator:t(1103,e.DiagnosticCategory.Error,"A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103","A 'for-await-of' statement is only allowed within an async function or async generator."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:t(1104,e.DiagnosticCategory.Error,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:t(1105,e.DiagnosticCategory.Error,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),Jump_target_cannot_cross_function_boundary:t(1107,e.DiagnosticCategory.Error,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:t(1108,e.DiagnosticCategory.Error,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:t(1109,e.DiagnosticCategory.Error,"Expression_expected_1109","Expression expected."),Type_expected:t(1110,e.DiagnosticCategory.Error,"Type_expected_1110","Type expected."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:t(1113,e.DiagnosticCategory.Error,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:t(1114,e.DiagnosticCategory.Error,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:t(1115,e.DiagnosticCategory.Error,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:t(1116,e.DiagnosticCategory.Error,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode:t(1117,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117","An object literal cannot have multiple properties with the same name in strict mode."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:t(1118,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:t(1119,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:t(1120,e.DiagnosticCategory.Error,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_in_strict_mode:t(1121,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_strict_mode_1121","Octal literals are not allowed in strict mode."),Variable_declaration_list_cannot_be_empty:t(1123,e.DiagnosticCategory.Error,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:t(1124,e.DiagnosticCategory.Error,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:t(1125,e.DiagnosticCategory.Error,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:t(1126,e.DiagnosticCategory.Error,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:t(1127,e.DiagnosticCategory.Error,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:t(1128,e.DiagnosticCategory.Error,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:t(1129,e.DiagnosticCategory.Error,"Statement_expected_1129","Statement expected."),case_or_default_expected:t(1130,e.DiagnosticCategory.Error,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:t(1131,e.DiagnosticCategory.Error,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:t(1132,e.DiagnosticCategory.Error,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:t(1134,e.DiagnosticCategory.Error,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:t(1135,e.DiagnosticCategory.Error,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:t(1136,e.DiagnosticCategory.Error,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:t(1137,e.DiagnosticCategory.Error,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:t(1138,e.DiagnosticCategory.Error,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:t(1139,e.DiagnosticCategory.Error,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:t(1140,e.DiagnosticCategory.Error,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:t(1141,e.DiagnosticCategory.Error,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:t(1142,e.DiagnosticCategory.Error,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:t(1144,e.DiagnosticCategory.Error,"or_expected_1144","'{' or ';' expected."),Declaration_expected:t(1146,e.DiagnosticCategory.Error,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:t(1147,e.DiagnosticCategory.Error,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:t(1148,e.DiagnosticCategory.Error,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:t(1149,e.DiagnosticCategory.Error,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead:t(1150,e.DiagnosticCategory.Error,"new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150","'new T[]' cannot be used to create an array. Use 'new Array()' instead."),const_declarations_must_be_initialized:t(1155,e.DiagnosticCategory.Error,"const_declarations_must_be_initialized_1155","'const' declarations must be initialized."),const_declarations_can_only_be_declared_inside_a_block:t(1156,e.DiagnosticCategory.Error,"const_declarations_can_only_be_declared_inside_a_block_1156","'const' declarations can only be declared inside a block."),let_declarations_can_only_be_declared_inside_a_block:t(1157,e.DiagnosticCategory.Error,"let_declarations_can_only_be_declared_inside_a_block_1157","'let' declarations can only be declared inside a block."),Unterminated_template_literal:t(1160,e.DiagnosticCategory.Error,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:t(1161,e.DiagnosticCategory.Error,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:t(1162,e.DiagnosticCategory.Error,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:t(1163,e.DiagnosticCategory.Error,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:t(1164,e.DiagnosticCategory.Error,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1165,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1166,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_1166","A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1168,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1169,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1170,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:t(1171,e.DiagnosticCategory.Error,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:t(1172,e.DiagnosticCategory.Error,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:t(1173,e.DiagnosticCategory.Error,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:t(1174,e.DiagnosticCategory.Error,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:t(1175,e.DiagnosticCategory.Error,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:t(1176,e.DiagnosticCategory.Error,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:t(1177,e.DiagnosticCategory.Error,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:t(1178,e.DiagnosticCategory.Error,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:t(1179,e.DiagnosticCategory.Error,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:t(1180,e.DiagnosticCategory.Error,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:t(1181,e.DiagnosticCategory.Error,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:t(1182,e.DiagnosticCategory.Error,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:t(1183,e.DiagnosticCategory.Error,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:t(1184,e.DiagnosticCategory.Error,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:t(1185,e.DiagnosticCategory.Error,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:t(1186,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:t(1187,e.DiagnosticCategory.Error,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:t(1188,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:t(1189,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:t(1190,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:t(1191,e.DiagnosticCategory.Error,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:t(1192,e.DiagnosticCategory.Error,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:t(1193,e.DiagnosticCategory.Error,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:t(1194,e.DiagnosticCategory.Error,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),Catch_clause_variable_cannot_have_a_type_annotation:t(1196,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_a_type_annotation_1196","Catch clause variable cannot have a type annotation."),Catch_clause_variable_cannot_have_an_initializer:t(1197,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:t(1198,e.DiagnosticCategory.Error,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:t(1199,e.DiagnosticCategory.Error,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:t(1200,e.DiagnosticCategory.Error,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:t(1202,e.DiagnosticCategory.Error,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202","Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:t(1203,e.DiagnosticCategory.Error,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided:t(1205,e.DiagnosticCategory.Error,"Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205","Cannot re-export a type when the '--isolatedModules' flag is provided."),Decorators_are_not_valid_here:t(1206,e.DiagnosticCategory.Error,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:t(1207,e.DiagnosticCategory.Error,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided:t(1208,e.DiagnosticCategory.Error,"Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208","Cannot compile namespaces when the '--isolatedModules' flag is provided."),Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided:t(1209,e.DiagnosticCategory.Error,"Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209","Ambient const enums are not allowed when the '--isolatedModules' flag is provided."),Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:t(1210,e.DiagnosticCategory.Error,"Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210","Invalid use of '{0}'. Class definitions are automatically in strict mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:t(1211,e.DiagnosticCategory.Error,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:t(1212,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:t(1213,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:t(1214,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:t(1215,e.DiagnosticCategory.Error,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:t(1216,e.DiagnosticCategory.Error,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:t(1218,e.DiagnosticCategory.Error,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning:t(1219,e.DiagnosticCategory.Error,"Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219","Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning."),Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher:t(1220,e.DiagnosticCategory.Error,"Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220","Generators are only available when targeting ECMAScript 2015 or higher."),Generators_are_not_allowed_in_an_ambient_context:t(1221,e.DiagnosticCategory.Error,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:t(1222,e.DiagnosticCategory.Error,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:t(1223,e.DiagnosticCategory.Error,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:t(1224,e.DiagnosticCategory.Error,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:t(1225,e.DiagnosticCategory.Error,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:t(1226,e.DiagnosticCategory.Error,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:t(1227,e.DiagnosticCategory.Error,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:t(1228,e.DiagnosticCategory.Error,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:t(1229,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:t(1230,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_can_only_be_used_in_a_module:t(1231,e.DiagnosticCategory.Error,"An_export_assignment_can_only_be_used_in_a_module_1231","An export assignment can only be used in a module."),An_import_declaration_can_only_be_used_in_a_namespace_or_module:t(1232,e.DiagnosticCategory.Error,"An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232","An import declaration can only be used in a namespace or module."),An_export_declaration_can_only_be_used_in_a_module:t(1233,e.DiagnosticCategory.Error,"An_export_declaration_can_only_be_used_in_a_module_1233","An export declaration can only be used in a module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:t(1234,e.DiagnosticCategory.Error,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_in_a_namespace_or_module:t(1235,e.DiagnosticCategory.Error,"A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235","A namespace declaration is only allowed in a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:t(1236,e.DiagnosticCategory.Error,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:t(1237,e.DiagnosticCategory.Error,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:t(1238,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:t(1239,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:t(1240,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:t(1241,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:t(1242,e.DiagnosticCategory.Error,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:t(1243,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:t(1244,e.DiagnosticCategory.Error,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:t(1245,e.DiagnosticCategory.Error,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:t(1246,e.DiagnosticCategory.Error,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:t(1247,e.DiagnosticCategory.Error,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:t(1248,e.DiagnosticCategory.Error,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:t(1249,e.DiagnosticCategory.Error,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5:t(1250,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode:t(1251,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode:t(1252,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."),_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag:t(1253,e.DiagnosticCategory.Error,"_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253","'{0}' tag cannot be used independently as a top level JSDoc tag."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal:t(1254,e.DiagnosticCategory.Error,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254","A 'const' initializer in an ambient context must be a string or numeric literal."),A_definite_assignment_assertion_is_not_permitted_in_this_context:t(1255,e.DiagnosticCategory.Error,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_rest_element_must_be_last_in_a_tuple_type:t(1256,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_tuple_type_1256","A rest element must be last in a tuple type."),A_required_element_cannot_follow_an_optional_element:t(1257,e.DiagnosticCategory.Error,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),with_statements_are_not_allowed_in_an_async_function_block:t(1300,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expression_is_only_allowed_within_an_async_function:t(1308,e.DiagnosticCategory.Error,"await_expression_is_only_allowed_within_an_async_function_1308","'await' expression is only allowed within an async function."),can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment:t(1312,e.DiagnosticCategory.Error,"can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312","'=' can only be used in an object literal property inside a destructuring assignment."),The_body_of_an_if_statement_cannot_be_the_empty_statement:t(1313,e.DiagnosticCategory.Error,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:t(1314,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:t(1315,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:t(1316,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:t(1317,e.DiagnosticCategory.Error,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:t(1318,e.DiagnosticCategory.Error,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:t(1319,e.DiagnosticCategory.Error,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1320,e.DiagnosticCategory.Error,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1321,e.DiagnosticCategory.Error,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1322,e.DiagnosticCategory.Error,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext:t(1323,e.DiagnosticCategory.Error,"Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323","Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."),Dynamic_import_must_have_one_specifier_as_an_argument:t(1324,e.DiagnosticCategory.Error,"Dynamic_import_must_have_one_specifier_as_an_argument_1324","Dynamic import must have one specifier as an argument."),Specifier_of_dynamic_import_cannot_be_spread_element:t(1325,e.DiagnosticCategory.Error,"Specifier_of_dynamic_import_cannot_be_spread_element_1325","Specifier of dynamic import cannot be spread element."),Dynamic_import_cannot_have_type_arguments:t(1326,e.DiagnosticCategory.Error,"Dynamic_import_cannot_have_type_arguments_1326","Dynamic import cannot have type arguments"),String_literal_with_double_quotes_expected:t(1327,e.DiagnosticCategory.Error,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:t(1328,e.DiagnosticCategory.Error,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:t(1329,e.DiagnosticCategory.Error,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:t(1330,e.DiagnosticCategory.Error,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:t(1331,e.DiagnosticCategory.Error,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:t(1332,e.DiagnosticCategory.Error,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:t(1333,e.DiagnosticCategory.Error,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:t(1334,e.DiagnosticCategory.Error,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:t(1335,e.DiagnosticCategory.Error,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead:t(1336,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336","An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead."),An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead:t(1337,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337","An index signature parameter type cannot be a union type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:t(1338,e.DiagnosticCategory.Error,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:t(1339,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:t(1340,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Type_arguments_cannot_be_used_here:t(1342,e.DiagnosticCategory.Error,"Type_arguments_cannot_be_used_here_1342","Type arguments cannot be used here."),The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_options:t(1343,e.DiagnosticCategory.Error,"The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343","The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options."),Duplicate_identifier_0:t(2300,e.DiagnosticCategory.Error,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:t(2301,e.DiagnosticCategory.Error,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:t(2302,e.DiagnosticCategory.Error,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:t(2303,e.DiagnosticCategory.Error,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:t(2304,e.DiagnosticCategory.Error,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:t(2305,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:t(2306,e.DiagnosticCategory.Error,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0:t(2307,e.DiagnosticCategory.Error,"Cannot_find_module_0_2307","Cannot find module '{0}'."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:t(2308,e.DiagnosticCategory.Error,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:t(2309,e.DiagnosticCategory.Error,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:t(2310,e.DiagnosticCategory.Error,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),A_class_may_only_extend_another_class:t(2311,e.DiagnosticCategory.Error,"A_class_may_only_extend_another_class_2311","A class may only extend another class."),An_interface_may_only_extend_a_class_or_another_interface:t(2312,e.DiagnosticCategory.Error,"An_interface_may_only_extend_a_class_or_another_interface_2312","An interface may only extend a class or another interface."),Type_parameter_0_has_a_circular_constraint:t(2313,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:t(2314,e.DiagnosticCategory.Error,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:t(2315,e.DiagnosticCategory.Error,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:t(2316,e.DiagnosticCategory.Error,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:t(2317,e.DiagnosticCategory.Error,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:t(2318,e.DiagnosticCategory.Error,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:t(2319,e.DiagnosticCategory.Error,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:t(2320,e.DiagnosticCategory.Error,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:t(2321,e.DiagnosticCategory.Error,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:t(2322,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:t(2323,e.DiagnosticCategory.Error,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:t(2324,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:t(2325,e.DiagnosticCategory.Error,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:t(2326,e.DiagnosticCategory.Error,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:t(2327,e.DiagnosticCategory.Error,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:t(2328,e.DiagnosticCategory.Error,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_is_missing_in_type_0:t(2329,e.DiagnosticCategory.Error,"Index_signature_is_missing_in_type_0_2329","Index signature is missing in type '{0}'."),Index_signatures_are_incompatible:t(2330,e.DiagnosticCategory.Error,"Index_signatures_are_incompatible_2330","Index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:t(2331,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:t(2332,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:t(2333,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:t(2334,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:t(2335,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:t(2336,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:t(2337,e.DiagnosticCategory.Error,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:t(2338,e.DiagnosticCategory.Error,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:t(2339,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:t(2340,e.DiagnosticCategory.Error,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:t(2341,e.DiagnosticCategory.Error,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),An_index_expression_argument_must_be_of_type_string_number_symbol_or_any:t(2342,e.DiagnosticCategory.Error,"An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342","An index expression argument must be of type 'string', 'number', 'symbol', or 'any'."),This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1:t(2343,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343","This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'."),Type_0_does_not_satisfy_the_constraint_1:t(2344,e.DiagnosticCategory.Error,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:t(2345,e.DiagnosticCategory.Error,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Call_target_does_not_contain_any_signatures:t(2346,e.DiagnosticCategory.Error,"Call_target_does_not_contain_any_signatures_2346","Call target does not contain any signatures."),Untyped_function_calls_may_not_accept_type_arguments:t(2347,e.DiagnosticCategory.Error,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:t(2348,e.DiagnosticCategory.Error,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures:t(2349,e.DiagnosticCategory.Error,"Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349","Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures."),Only_a_void_function_can_be_called_with_the_new_keyword:t(2350,e.DiagnosticCategory.Error,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature:t(2351,e.DiagnosticCategory.Error,"Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351","Cannot use 'new' with an expression whose type lacks a call or construct signature."),Type_0_cannot_be_converted_to_type_1:t(2352,e.DiagnosticCategory.Error,"Type_0_cannot_be_converted_to_type_1_2352","Type '{0}' cannot be converted to type '{1}'."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:t(2353,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:t(2354,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value:t(2355,e.DiagnosticCategory.Error,"A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'void' nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type:t(2356,e.DiagnosticCategory.Error,"An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:t(2357,e.DiagnosticCategory.Error,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2358,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type:t(2359,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359","The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."),The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol:t(2360,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360","The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'."),The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2361,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361","The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type:t(2362,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type:t(2363,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:t(2364,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:t(2365,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:t(2366,e.DiagnosticCategory.Error,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap:t(2367,e.DiagnosticCategory.Error,"This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367","This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap."),Type_parameter_name_cannot_be_0:t(2368,e.DiagnosticCategory.Error,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:t(2369,e.DiagnosticCategory.Error,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:t(2370,e.DiagnosticCategory.Error,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:t(2371,e.DiagnosticCategory.Error,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_be_referenced_in_its_initializer:t(2372,e.DiagnosticCategory.Error,"Parameter_0_cannot_be_referenced_in_its_initializer_2372","Parameter '{0}' cannot be referenced in its initializer."),Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it:t(2373,e.DiagnosticCategory.Error,"Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_string_index_signature:t(2374,e.DiagnosticCategory.Error,"Duplicate_string_index_signature_2374","Duplicate string index signature."),Duplicate_number_index_signature:t(2375,e.DiagnosticCategory.Error,"Duplicate_number_index_signature_2375","Duplicate number index signature."),A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties:t(2376,e.DiagnosticCategory.Error,"A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376","A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties."),Constructors_for_derived_classes_must_contain_a_super_call:t(2377,e.DiagnosticCategory.Error,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:t(2378,e.DiagnosticCategory.Error,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Getter_and_setter_accessors_do_not_agree_in_visibility:t(2379,e.DiagnosticCategory.Error,"Getter_and_setter_accessors_do_not_agree_in_visibility_2379","Getter and setter accessors do not agree in visibility."),get_and_set_accessor_must_have_the_same_type:t(2380,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_type_2380","'get' and 'set' accessor must have the same type."),A_signature_with_an_implementation_cannot_use_a_string_literal_type:t(2381,e.DiagnosticCategory.Error,"A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381","A signature with an implementation cannot use a string literal type."),Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature:t(2382,e.DiagnosticCategory.Error,"Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382","Specialized overload signature is not assignable to any non-specialized signature."),Overload_signatures_must_all_be_exported_or_non_exported:t(2383,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:t(2384,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:t(2385,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:t(2386,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:t(2387,e.DiagnosticCategory.Error,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:t(2388,e.DiagnosticCategory.Error,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:t(2389,e.DiagnosticCategory.Error,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:t(2390,e.DiagnosticCategory.Error,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:t(2391,e.DiagnosticCategory.Error,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:t(2392,e.DiagnosticCategory.Error,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:t(2393,e.DiagnosticCategory.Error,"Duplicate_function_implementation_2393","Duplicate function implementation."),Overload_signature_is_not_compatible_with_function_implementation:t(2394,e.DiagnosticCategory.Error,"Overload_signature_is_not_compatible_with_function_implementation_2394","Overload signature is not compatible with function implementation."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:t(2395,e.DiagnosticCategory.Error,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:t(2396,e.DiagnosticCategory.Error,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:t(2397,e.DiagnosticCategory.Error,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:t(2399,e.DiagnosticCategory.Error,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:t(2400,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference:t(2401,e.DiagnosticCategory.Error,"Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401","Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:t(2402,e.DiagnosticCategory.Error,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:t(2403,e.DiagnosticCategory.Error,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:t(2404,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:t(2405,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:t(2406,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:t(2407,e.DiagnosticCategory.Error,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:t(2408,e.DiagnosticCategory.Error,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:t(2409,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:t(2410,e.DiagnosticCategory.Error,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Property_0_of_type_1_is_not_assignable_to_string_index_type_2:t(2411,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411","Property '{0}' of type '{1}' is not assignable to string index type '{2}'."),Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2:t(2412,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412","Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'."),Numeric_index_type_0_is_not_assignable_to_string_index_type_1:t(2413,e.DiagnosticCategory.Error,"Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413","Numeric index type '{0}' is not assignable to string index type '{1}'."),Class_name_cannot_be_0:t(2414,e.DiagnosticCategory.Error,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:t(2415,e.DiagnosticCategory.Error,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:t(2416,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:t(2417,e.DiagnosticCategory.Error,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:t(2418,e.DiagnosticCategory.Error,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Class_0_incorrectly_implements_interface_1:t(2420,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_may_only_implement_another_class_or_interface:t(2422,e.DiagnosticCategory.Error,"A_class_may_only_implement_another_class_or_interface_2422","A class may only implement another class or interface."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:t(2423,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property:t(2424,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:t(2425,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:t(2426,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:t(2427,e.DiagnosticCategory.Error,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:t(2428,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:t(2430,e.DiagnosticCategory.Error,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:t(2431,e.DiagnosticCategory.Error,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:t(2432,e.DiagnosticCategory.Error,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:t(2433,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:t(2434,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:t(2435,e.DiagnosticCategory.Error,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:t(2436,e.DiagnosticCategory.Error,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:t(2437,e.DiagnosticCategory.Error,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:t(2438,e.DiagnosticCategory.Error,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:t(2439,e.DiagnosticCategory.Error,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:t(2440,e.DiagnosticCategory.Error,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:t(2441,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:t(2442,e.DiagnosticCategory.Error,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:t(2443,e.DiagnosticCategory.Error,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:t(2444,e.DiagnosticCategory.Error,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:t(2445,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1:t(2446,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:t(2447,e.DiagnosticCategory.Error,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:t(2448,e.DiagnosticCategory.Error,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:t(2449,e.DiagnosticCategory.Error,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:t(2450,e.DiagnosticCategory.Error,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:t(2451,e.DiagnosticCategory.Error,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:t(2452,e.DiagnosticCategory.Error,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly:t(2453,e.DiagnosticCategory.Error,"The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453","The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."),Variable_0_is_used_before_being_assigned:t(2454,e.DiagnosticCategory.Error,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0:t(2455,e.DiagnosticCategory.Error,"Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455","Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'."),Type_alias_0_circularly_references_itself:t(2456,e.DiagnosticCategory.Error,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:t(2457,e.DiagnosticCategory.Error,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:t(2458,e.DiagnosticCategory.Error,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Type_0_has_no_property_1_and_no_string_index_signature:t(2459,e.DiagnosticCategory.Error,"Type_0_has_no_property_1_and_no_string_index_signature_2459","Type '{0}' has no property '{1}' and no string index signature."),Type_0_has_no_property_1:t(2460,e.DiagnosticCategory.Error,"Type_0_has_no_property_1_2460","Type '{0}' has no property '{1}'."),Type_0_is_not_an_array_type:t(2461,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:t(2462,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:t(2463,e.DiagnosticCategory.Error,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:t(2464,e.DiagnosticCategory.Error,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:t(2465,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:t(2466,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:t(2467,e.DiagnosticCategory.Error,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:t(2468,e.DiagnosticCategory.Error,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:t(2469,e.DiagnosticCategory.Error,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object:t(2470,e.DiagnosticCategory.Error,"Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470","'Symbol' reference does not refer to the global Symbol constructor object."),A_computed_property_name_of_the_form_0_must_be_of_type_symbol:t(2471,e.DiagnosticCategory.Error,"A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471","A computed property name of the form '{0}' must be of type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:t(2472,e.DiagnosticCategory.Error,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:t(2473,e.DiagnosticCategory.Error,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),In_const_enum_declarations_member_initializer_must_be_constant_expression:t(2474,e.DiagnosticCategory.Error,"In_const_enum_declarations_member_initializer_must_be_constant_expression_2474","In 'const' enum declarations member initializer must be constant expression."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:t(2475,e.DiagnosticCategory.Error,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:t(2476,e.DiagnosticCategory.Error,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:t(2477,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:t(2478,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),Property_0_does_not_exist_on_const_enum_1:t(2479,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_const_enum_1_2479","Property '{0}' does not exist on 'const' enum '{1}'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:t(2480,e.DiagnosticCategory.Error,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:t(2481,e.DiagnosticCategory.Error,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:t(2483,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:t(2484,e.DiagnosticCategory.Error,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:t(2487,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2488,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:t(2489,e.DiagnosticCategory.Error,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property:t(2490,e.DiagnosticCategory.Error,"The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the 'next()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:t(2491,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:t(2492,e.DiagnosticCategory.Error,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2:t(2493,e.DiagnosticCategory.Error,"Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493","Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:t(2494,e.DiagnosticCategory.Error,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:t(2495,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression:t(2496,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496","The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."),Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct:t(2497,e.DiagnosticCategory.Error,"Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497","Module '{0}' resolves to a non-module entity and cannot be imported using this construct."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:t(2498,e.DiagnosticCategory.Error,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2499,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2500,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:t(2501,e.DiagnosticCategory.Error,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:t(2502,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:t(2503,e.DiagnosticCategory.Error,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:t(2504,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:t(2505,e.DiagnosticCategory.Error,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:t(2506,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:t(2507,e.DiagnosticCategory.Error,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:t(2508,e.DiagnosticCategory.Error,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_a_class_or_interface_type:t(2509,e.DiagnosticCategory.Error,"Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509","Base constructor return type '{0}' is not a class or interface type."),Base_constructors_must_all_have_the_same_return_type:t(2510,e.DiagnosticCategory.Error,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:t(2511,e.DiagnosticCategory.Error,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:t(2512,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:t(2513,e.DiagnosticCategory.Error,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),Classes_containing_abstract_methods_must_be_marked_abstract:t(2514,e.DiagnosticCategory.Error,"Classes_containing_abstract_methods_must_be_marked_abstract_2514","Classes containing abstract methods must be marked abstract."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:t(2515,e.DiagnosticCategory.Error,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:t(2516,e.DiagnosticCategory.Error,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:t(2517,e.DiagnosticCategory.Error,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:t(2518,e.DiagnosticCategory.Error,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:t(2519,e.DiagnosticCategory.Error,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:t(2520,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions:t(2521,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521","Expression resolves to variable declaration '{0}' that compiler uses to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method:t(2522,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522","The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:t(2523,e.DiagnosticCategory.Error,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:t(2524,e.DiagnosticCategory.Error,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value:t(2525,e.DiagnosticCategory.Error,"Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525","Initializer provides no value for this binding element and the binding element has no default value."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:t(2526,e.DiagnosticCategory.Error,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:t(2527,e.DiagnosticCategory.Error,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:t(2528,e.DiagnosticCategory.Error,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:t(2529,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:t(2530,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:t(2531,e.DiagnosticCategory.Error,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:t(2532,e.DiagnosticCategory.Error,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:t(2533,e.DiagnosticCategory.Error,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:t(2534,e.DiagnosticCategory.Error,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Enum_type_0_has_members_with_initializers_that_are_not_literals:t(2535,e.DiagnosticCategory.Error,"Enum_type_0_has_members_with_initializers_that_are_not_literals_2535","Enum type '{0}' has members with initializers that are not literals."),Type_0_cannot_be_used_to_index_type_1:t(2536,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:t(2537,e.DiagnosticCategory.Error,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:t(2538,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:t(2539,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property:t(2540,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540","Cannot assign to '{0}' because it is a constant or a read-only property."),The_target_of_an_assignment_must_be_a_variable_or_a_property_access:t(2541,e.DiagnosticCategory.Error,"The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541","The target of an assignment must be a variable or a property access."),Index_signature_in_type_0_only_permits_reading:t(2542,e.DiagnosticCategory.Error,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:t(2543,e.DiagnosticCategory.Error,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:t(2544,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:t(2545,e.DiagnosticCategory.Error,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1:t(2546,e.DiagnosticCategory.Error,"Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546","Property '{0}' has conflicting declarations and is inaccessible in type '{1}'."),The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:t(2547,e.DiagnosticCategory.Error,"The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547","The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2548,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2549,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Generic_type_instantiation_is_excessively_deep_and_possibly_infinite:t(2550,e.DiagnosticCategory.Error,"Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550","Generic type instantiation is excessively deep and possibly infinite."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:t(2551,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:t(2552,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:t(2553,e.DiagnosticCategory.Error,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:t(2554,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:t(2555,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),Expected_0_arguments_but_got_1_or_more:t(2556,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_or_more_2556","Expected {0} arguments, but got {1} or more."),Expected_at_least_0_arguments_but_got_1_or_more:t(2557,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_or_more_2557","Expected at least {0} arguments, but got {1} or more."),Expected_0_type_arguments_but_got_1:t(2558,e.DiagnosticCategory.Error,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:t(2559,e.DiagnosticCategory.Error,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:t(2560,e.DiagnosticCategory.Error,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:t(2561,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:t(2562,e.DiagnosticCategory.Error,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:t(2563,e.DiagnosticCategory.Error,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:t(2564,e.DiagnosticCategory.Error,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:t(2565,e.DiagnosticCategory.Error,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:t(2566,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:t(2567,e.DiagnosticCategory.Error,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:t(2568,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568","Type '{0}' is not an array type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:t(2569,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569","Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await:t(2570,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570","Property '{0}' does not exist on type '{1}'. Did you forget to use 'await'?"),Object_is_of_type_unknown:t(2571,e.DiagnosticCategory.Error,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),Rest_signatures_are_incompatible:t(2572,e.DiagnosticCategory.Error,"Rest_signatures_are_incompatible_2572","Rest signatures are incompatible."),Property_0_is_incompatible_with_rest_element_type:t(2573,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_rest_element_type_2573","Property '{0}' is incompatible with rest element type."),A_rest_element_type_must_be_an_array_type:t(2574,e.DiagnosticCategory.Error,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:t(2575,e.DiagnosticCategory.Error,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),JSX_element_attributes_type_0_may_not_be_a_union_type:t(2600,e.DiagnosticCategory.Error,"JSX_element_attributes_type_0_may_not_be_a_union_type_2600","JSX element attributes type '{0}' may not be a union type."),The_return_type_of_a_JSX_element_constructor_must_return_an_object_type:t(2601,e.DiagnosticCategory.Error,"The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601","The return type of a JSX element constructor must return an object type."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:t(2602,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:t(2603,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:t(2604,e.DiagnosticCategory.Error,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements:t(2605,e.DiagnosticCategory.Error,"JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605","JSX element type '{0}' is not a constructor function for JSX elements."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:t(2606,e.DiagnosticCategory.Error,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:t(2607,e.DiagnosticCategory.Error,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:t(2608,e.DiagnosticCategory.Error,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:t(2609,e.DiagnosticCategory.Error,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:t(2649,e.DiagnosticCategory.Error,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:t(2651,e.DiagnosticCategory.Error,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:t(2652,e.DiagnosticCategory.Error,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:t(2653,e.DiagnosticCategory.Error,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition:t(2654,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654","Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition."),Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition:t(2656,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656","Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition."),JSX_expressions_must_have_one_parent_element:t(2657,e.DiagnosticCategory.Error,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:t(2658,e.DiagnosticCategory.Error,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:t(2659,e.DiagnosticCategory.Error,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:t(2660,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:t(2661,e.DiagnosticCategory.Error,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:t(2662,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:t(2663,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:t(2664,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:t(2665,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:t(2666,e.DiagnosticCategory.Error,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:t(2667,e.DiagnosticCategory.Error,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:t(2668,e.DiagnosticCategory.Error,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:t(2669,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:t(2670,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:t(2671,e.DiagnosticCategory.Error,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:t(2672,e.DiagnosticCategory.Error,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:t(2673,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:t(2674,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:t(2675,e.DiagnosticCategory.Error,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:t(2676,e.DiagnosticCategory.Error,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:t(2677,e.DiagnosticCategory.Error,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:t(2678,e.DiagnosticCategory.Error,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:t(2679,e.DiagnosticCategory.Error,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:t(2680,e.DiagnosticCategory.Error,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:t(2681,e.DiagnosticCategory.Error,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),get_and_set_accessor_must_have_the_same_this_type:t(2682,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_this_type_2682","'get' and 'set' accessor must have the same 'this' type."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:t(2683,e.DiagnosticCategory.Error,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:t(2684,e.DiagnosticCategory.Error,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:t(2685,e.DiagnosticCategory.Error,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:t(2686,e.DiagnosticCategory.Error,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:t(2687,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:t(2688,e.DiagnosticCategory.Error,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:t(2689,e.DiagnosticCategory.Error,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead:t(2691,e.DiagnosticCategory.Error,"An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691","An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:t(2692,e.DiagnosticCategory.Error,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:t(2693,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:t(2694,e.DiagnosticCategory.Error,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:t(2695,e.DiagnosticCategory.Error,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:t(2696,e.DiagnosticCategory.Error,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2697,e.DiagnosticCategory.Error,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),Spread_types_may_only_be_created_from_object_types:t(2698,e.DiagnosticCategory.Error,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:t(2699,e.DiagnosticCategory.Error,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:t(2700,e.DiagnosticCategory.Error,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:t(2701,e.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:t(2702,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:t(2703,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a delete operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:t(2704,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a delete operator cannot be a read-only property."),An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2705,e.DiagnosticCategory.Error,"An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705","An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Required_type_parameters_may_not_follow_optional_type_parameters:t(2706,e.DiagnosticCategory.Error,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:t(2707,e.DiagnosticCategory.Error,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:t(2708,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:t(2709,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:t(2710,e.DiagnosticCategory.Error,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2711,e.DiagnosticCategory.Error,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2712,e.DiagnosticCategory.Error,"A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712","A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:t(2713,e.DiagnosticCategory.Error,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713","Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:t(2714,e.DiagnosticCategory.Error,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:t(2715,e.DiagnosticCategory.Error,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:t(2716,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:t(2717,e.DiagnosticCategory.Error,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_declaration_0:t(2718,e.DiagnosticCategory.Error,"Duplicate_declaration_0_2718","Duplicate declaration '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:t(2719,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:t(2720,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:t(2721,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:t(2722,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:t(2723,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),Module_0_has_no_exported_member_1_Did_you_mean_2:t(2724,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_Did_you_mean_2_2724","Module '{0}' has no exported member '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:t(2725,e.DiagnosticCategory.Error,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:t(2726,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:t(2727,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:t(2728,e.DiagnosticCategory.Message,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:t(2729,e.DiagnosticCategory.Error,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),Import_declaration_0_is_using_private_name_1:t(4e3,e.DiagnosticCategory.Error,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:t(4002,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:t(4004,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4006,e.DiagnosticCategory.Error,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4008,e.DiagnosticCategory.Error,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4010,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4012,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4014,e.DiagnosticCategory.Error,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4016,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4019,e.DiagnosticCategory.Error,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4020,e.DiagnosticCategory.Error,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:t(4022,e.DiagnosticCategory.Error,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4023,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:t(4024,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:t(4025,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4026,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4027,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t(4028,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4029,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4030,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:t(4031,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4032,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:t(4033,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4034,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4035,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4036,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4037,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4038,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4039,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4040,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4041,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4042,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4043,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4044,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:t(4045,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4046,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:t(4047,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4048,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:t(4049,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4050,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4051,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:t(4052,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4053,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4054,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t(4055,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4056,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:t(4057,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4058,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:t(4059,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:t(4060,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4061,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4062,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:t(4063,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4064,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4065,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4066,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4067,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4068,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4069,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4070,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4071,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4072,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4073,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4074,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4075,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4076,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:t(4077,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4078,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:t(4081,e.DiagnosticCategory.Error,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:t(4082,e.DiagnosticCategory.Error,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:t(4083,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict:t(4090,e.DiagnosticCategory.Error,"Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090","Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4091,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:t(4092,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_class_expression_may_not_be_private_or_protected:t(4094,e.DiagnosticCategory.Error,"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094","Property '{0}' of exported class expression may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4095,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4096,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:t(4097,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4098,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4099,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:t(4100,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4101,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:t(4102,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),The_current_host_does_not_support_the_0_option:t(5001,e.DiagnosticCategory.Error,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:t(5009,e.DiagnosticCategory.Error,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5010,e.DiagnosticCategory.Error,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:t(5012,e.DiagnosticCategory.Error,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:t(5014,e.DiagnosticCategory.Error,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:t(5023,e.DiagnosticCategory.Error,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:t(5024,e.DiagnosticCategory.Error,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Could_not_write_file_0_Colon_1:t(5033,e.DiagnosticCategory.Error,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:t(5042,e.DiagnosticCategory.Error,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:t(5047,e.DiagnosticCategory.Error,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:t(5051,e.DiagnosticCategory.Error,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:t(5052,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:t(5053,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:t(5054,e.DiagnosticCategory.Error,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:t(5055,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:t(5056,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:t(5057,e.DiagnosticCategory.Error,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:t(5058,e.DiagnosticCategory.Error,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:t(5059,e.DiagnosticCategory.Error,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Option_paths_cannot_be_used_without_specifying_baseUrl_option:t(5060,e.DiagnosticCategory.Error,"Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060","Option 'paths' cannot be used without specifying '--baseUrl' option."),Pattern_0_can_have_at_most_one_Asterisk_character:t(5061,e.DiagnosticCategory.Error,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character:t(5062,e.DiagnosticCategory.Error,"Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' in can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:t(5063,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:t(5064,e.DiagnosticCategory.Error,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5065,e.DiagnosticCategory.Error,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:t(5066,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:t(5067,e.DiagnosticCategory.Error,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:t(5068,e.DiagnosticCategory.Error,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:t(5069,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy:t(5070,e.DiagnosticCategory.Error,"Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070","Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs:t(5071,e.DiagnosticCategory.Error,"Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_5071","Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:t(6e3,e.DiagnosticCategory.Message,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:t(6001,e.DiagnosticCategory.Message,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:t(6002,e.DiagnosticCategory.Message,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:t(6003,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:t(6004,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:t(6005,e.DiagnosticCategory.Message,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:t(6006,e.DiagnosticCategory.Message,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:t(6007,e.DiagnosticCategory.Message,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:t(6008,e.DiagnosticCategory.Message,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:t(6009,e.DiagnosticCategory.Message,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:t(6010,e.DiagnosticCategory.Message,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:t(6011,e.DiagnosticCategory.Message,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:t(6012,e.DiagnosticCategory.Message,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:t(6013,e.DiagnosticCategory.Message,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:t(6014,e.DiagnosticCategory.Message,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT:t(6015,e.DiagnosticCategory.Message,"Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015","Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'."),Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext:t(6016,e.DiagnosticCategory.Message,"Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016","Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'."),Print_this_message:t(6017,e.DiagnosticCategory.Message,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:t(6019,e.DiagnosticCategory.Message,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:t(6020,e.DiagnosticCategory.Message,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:t(6023,e.DiagnosticCategory.Message,"Syntax_Colon_0_6023","Syntax: {0}"),options:t(6024,e.DiagnosticCategory.Message,"options_6024","options"),file:t(6025,e.DiagnosticCategory.Message,"file_6025","file"),Examples_Colon_0:t(6026,e.DiagnosticCategory.Message,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:t(6027,e.DiagnosticCategory.Message,"Options_Colon_6027","Options:"),Version_0:t(6029,e.DiagnosticCategory.Message,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:t(6030,e.DiagnosticCategory.Message,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:t(6031,e.DiagnosticCategory.Message,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:t(6032,e.DiagnosticCategory.Message,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:t(6034,e.DiagnosticCategory.Message,"KIND_6034","KIND"),FILE:t(6035,e.DiagnosticCategory.Message,"FILE_6035","FILE"),VERSION:t(6036,e.DiagnosticCategory.Message,"VERSION_6036","VERSION"),LOCATION:t(6037,e.DiagnosticCategory.Message,"LOCATION_6037","LOCATION"),DIRECTORY:t(6038,e.DiagnosticCategory.Message,"DIRECTORY_6038","DIRECTORY"),STRATEGY:t(6039,e.DiagnosticCategory.Message,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:t(6040,e.DiagnosticCategory.Message,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Generates_corresponding_map_file:t(6043,e.DiagnosticCategory.Message,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:t(6044,e.DiagnosticCategory.Error,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:t(6045,e.DiagnosticCategory.Error,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:t(6046,e.DiagnosticCategory.Error,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:t(6048,e.DiagnosticCategory.Error,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unsupported_locale_0:t(6049,e.DiagnosticCategory.Error,"Unsupported_locale_0_6049","Unsupported locale '{0}'."),Unable_to_open_file_0:t(6050,e.DiagnosticCategory.Error,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:t(6051,e.DiagnosticCategory.Error,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:t(6052,e.DiagnosticCategory.Message,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:t(6053,e.DiagnosticCategory.Error,"File_0_not_found_6053","File '{0}' not found."),File_0_has_unsupported_extension_The_only_supported_extensions_are_1:t(6054,e.DiagnosticCategory.Error,"File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:t(6055,e.DiagnosticCategory.Message,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:t(6056,e.DiagnosticCategory.Message,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:t(6058,e.DiagnosticCategory.Message,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:t(6059,e.DiagnosticCategory.Error,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:t(6060,e.DiagnosticCategory.Message,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:t(6061,e.DiagnosticCategory.Message,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file:t(6064,e.DiagnosticCategory.Error,"Option_0_can_only_be_specified_in_tsconfig_json_file_6064","Option '{0}' can only be specified in 'tsconfig.json' file."),Enables_experimental_support_for_ES7_decorators:t(6065,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:t(6066,e.DiagnosticCategory.Message,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Enables_experimental_support_for_ES7_async_functions:t(6068,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_async_functions_6068","Enables experimental support for ES7 async functions."),Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6:t(6069,e.DiagnosticCategory.Message,"Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069","Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:t(6070,e.DiagnosticCategory.Message,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:t(6071,e.DiagnosticCategory.Message,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:t(6072,e.DiagnosticCategory.Message,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:t(6073,e.DiagnosticCategory.Message,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:t(6074,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:t(6075,e.DiagnosticCategory.Message,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:t(6076,e.DiagnosticCategory.Message,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:t(6077,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:t(6078,e.DiagnosticCategory.Message,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:t(6079,e.DiagnosticCategory.Message,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation_Colon_preserve_react_native_or_react:t(6080,e.DiagnosticCategory.Message,"Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080","Specify JSX code generation: 'preserve', 'react-native', or 'react'."),File_0_has_an_unsupported_extension_so_skipping_it:t(6081,e.DiagnosticCategory.Message,"File_0_has_an_unsupported_extension_so_skipping_it_6081","File '{0}' has an unsupported extension, so skipping it."),Only_amd_and_system_modules_are_supported_alongside_0:t(6082,e.DiagnosticCategory.Error,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:t(6083,e.DiagnosticCategory.Message,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:t(6084,e.DiagnosticCategory.Message,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:t(6085,e.DiagnosticCategory.Message,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:t(6086,e.DiagnosticCategory.Message,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:t(6087,e.DiagnosticCategory.Message,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:t(6088,e.DiagnosticCategory.Message,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:t(6089,e.DiagnosticCategory.Message,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:t(6090,e.DiagnosticCategory.Message,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:t(6091,e.DiagnosticCategory.Message,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:t(6092,e.DiagnosticCategory.Message,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:t(6093,e.DiagnosticCategory.Message,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:t(6094,e.DiagnosticCategory.Message,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1:t(6095,e.DiagnosticCategory.Message,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095","Loading module as file / folder, candidate module location '{0}', target file type '{1}'."),File_0_does_not_exist:t(6096,e.DiagnosticCategory.Message,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exist_use_it_as_a_name_resolution_result:t(6097,e.DiagnosticCategory.Message,"File_0_exist_use_it_as_a_name_resolution_result_6097","File '{0}' exist - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_type_1:t(6098,e.DiagnosticCategory.Message,"Loading_module_0_from_node_modules_folder_target_file_type_1_6098","Loading module '{0}' from 'node_modules' folder, target file type '{1}'."),Found_package_json_at_0:t(6099,e.DiagnosticCategory.Message,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:t(6100,e.DiagnosticCategory.Message,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:t(6101,e.DiagnosticCategory.Message,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:t(6102,e.DiagnosticCategory.Message,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Option_0_should_have_array_of_strings_as_a_value:t(6103,e.DiagnosticCategory.Error,"Option_0_should_have_array_of_strings_as_a_value_6103","Option '{0}' should have array of strings as a value."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:t(6104,e.DiagnosticCategory.Message,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_string_got_1:t(6105,e.DiagnosticCategory.Message,"Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105","Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:t(6106,e.DiagnosticCategory.Message,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:t(6107,e.DiagnosticCategory.Message,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:t(6108,e.DiagnosticCategory.Message,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:t(6109,e.DiagnosticCategory.Message,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:t(6110,e.DiagnosticCategory.Message,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:t(6111,e.DiagnosticCategory.Message,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:t(6112,e.DiagnosticCategory.Message,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:t(6113,e.DiagnosticCategory.Message,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:t(6114,e.DiagnosticCategory.Error,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:t(6115,e.DiagnosticCategory.Message,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:t(6116,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Resolving_using_primary_search_paths:t(6117,e.DiagnosticCategory.Message,"Resolving_using_primary_search_paths_6117","Resolving using primary search paths..."),Resolving_from_node_modules_folder:t(6118,e.DiagnosticCategory.Message,"Resolving_from_node_modules_folder_6118","Resolving from node_modules folder..."),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:t(6119,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:t(6120,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:t(6121,e.DiagnosticCategory.Message,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:t(6122,e.DiagnosticCategory.Message,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:t(6123,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:t(6124,e.DiagnosticCategory.Message,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:t(6125,e.DiagnosticCategory.Message,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:t(6126,e.DiagnosticCategory.Message,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:t(6127,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:t(6128,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:t(6130,e.DiagnosticCategory.Message,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:t(6131,e.DiagnosticCategory.Error,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:t(6132,e.DiagnosticCategory.Message,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:t(6133,e.DiagnosticCategory.Error,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:t(6134,e.DiagnosticCategory.Message,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:t(6135,e.DiagnosticCategory.Message,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:t(6136,e.DiagnosticCategory.Message,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:t(6137,e.DiagnosticCategory.Error,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:t(6138,e.DiagnosticCategory.Error,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:t(6139,e.DiagnosticCategory.Message,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:t(6140,e.DiagnosticCategory.Error,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:t(6141,e.DiagnosticCategory.Message,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:t(6142,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:t(6144,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified:t(6145,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145","Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:t(6146,e.DiagnosticCategory.Message,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:t(6147,e.DiagnosticCategory.Message,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:t(6148,e.DiagnosticCategory.Message,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:t(6149,e.DiagnosticCategory.Message,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:t(6150,e.DiagnosticCategory.Message,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:t(6151,e.DiagnosticCategory.Message,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:t(6152,e.DiagnosticCategory.Message,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:t(6153,e.DiagnosticCategory.Message,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:t(6154,e.DiagnosticCategory.Message,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:t(6155,e.DiagnosticCategory.Message,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:t(6156,e.DiagnosticCategory.Message,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:t(6157,e.DiagnosticCategory.Message,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:t(6158,e.DiagnosticCategory.Message,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:t(6159,e.DiagnosticCategory.Message,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:t(6160,e.DiagnosticCategory.Message,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:t(6161,e.DiagnosticCategory.Message,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:t(6162,e.DiagnosticCategory.Message,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:t(6163,e.DiagnosticCategory.Message,"The_character_set_of_the_input_files_6163","The character set of the input files."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:t(6164,e.DiagnosticCategory.Message,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Do_not_truncate_error_messages:t(6165,e.DiagnosticCategory.Message,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:t(6166,e.DiagnosticCategory.Message,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:t(6167,e.DiagnosticCategory.Message,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:t(6168,e.DiagnosticCategory.Message,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:t(6169,e.DiagnosticCategory.Message,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:t(6170,e.DiagnosticCategory.Message,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:t(6171,e.DiagnosticCategory.Message,"Command_line_Options_6171","Command-line Options"),Basic_Options:t(6172,e.DiagnosticCategory.Message,"Basic_Options_6172","Basic Options"),Strict_Type_Checking_Options:t(6173,e.DiagnosticCategory.Message,"Strict_Type_Checking_Options_6173","Strict Type-Checking Options"),Module_Resolution_Options:t(6174,e.DiagnosticCategory.Message,"Module_Resolution_Options_6174","Module Resolution Options"),Source_Map_Options:t(6175,e.DiagnosticCategory.Message,"Source_Map_Options_6175","Source Map Options"),Additional_Checks:t(6176,e.DiagnosticCategory.Message,"Additional_Checks_6176","Additional Checks"),Experimental_Options:t(6177,e.DiagnosticCategory.Message,"Experimental_Options_6177","Experimental Options"),Advanced_Options:t(6178,e.DiagnosticCategory.Message,"Advanced_Options_6178","Advanced Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:t(6179,e.DiagnosticCategory.Message,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."),Enable_all_strict_type_checking_options:t(6180,e.DiagnosticCategory.Message,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),List_of_language_service_plugins:t(6181,e.DiagnosticCategory.Message,"List_of_language_service_plugins_6181","List of language service plugins."),Scoped_package_detected_looking_in_0:t(6182,e.DiagnosticCategory.Message,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_to_file_1_from_old_program:t(6183,e.DiagnosticCategory.Message,"Reusing_resolution_of_module_0_to_file_1_from_old_program_6183","Reusing resolution of module '{0}' to file '{1}' from old program."),Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program:t(6184,e.DiagnosticCategory.Message,"Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184","Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program."),Disable_strict_checking_of_generic_signatures_in_function_types:t(6185,e.DiagnosticCategory.Message,"Disable_strict_checking_of_generic_signatures_in_function_types_6185","Disable strict checking of generic signatures in function types."),Enable_strict_checking_of_function_types:t(6186,e.DiagnosticCategory.Message,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:t(6187,e.DiagnosticCategory.Message,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:t(6188,e.DiagnosticCategory.Error,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:t(6189,e.DiagnosticCategory.Error,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Found_package_json_at_0_Package_ID_is_1:t(6190,e.DiagnosticCategory.Message,"Found_package_json_at_0_Package_ID_is_1_6190","Found 'package.json' at '{0}'. Package ID is '{1}'."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:t(6191,e.DiagnosticCategory.Message,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:t(6192,e.DiagnosticCategory.Error,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:t(6193,e.DiagnosticCategory.Message,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:t(6194,e.DiagnosticCategory.Message,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:t(6195,e.DiagnosticCategory.Message,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:t(6196,e.DiagnosticCategory.Error,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:t(6197,e.DiagnosticCategory.Message,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:t(6198,e.DiagnosticCategory.Error,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:t(6199,e.DiagnosticCategory.Error,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:t(6200,e.DiagnosticCategory.Error,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:t(6201,e.DiagnosticCategory.Message,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),_0_was_also_declared_here:t(6203,e.DiagnosticCategory.Message,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:t(6204,e.DiagnosticCategory.Message,"and_here_6204","and here."),Projects_to_reference:t(6300,e.DiagnosticCategory.Message,"Projects_to_reference_6300","Projects to reference"),Enable_project_compilation:t(6302,e.DiagnosticCategory.Message,"Enable_project_compilation_6302","Enable project compilation"),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:t(6202,e.DiagnosticCategory.Error,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),Composite_projects_may_not_disable_declaration_emit:t(6304,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:t(6305,e.DiagnosticCategory.Error,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:t(6306,e.DiagnosticCategory.Error,"Referenced_project_0_must_have_setting_composite_Colon_true_6306","Referenced project '{0}' must have setting \"composite\": true."),File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern:t(6307,e.DiagnosticCategory.Error,"File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307","File '{0}' is not in project file list. Projects must list all files or use an 'include' pattern."),Cannot_prepend_project_0_because_it_does_not_have_outFile_set:t(6308,e.DiagnosticCategory.Error,"Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308","Cannot prepend project '{0}' because it does not have 'outFile' set"),Output_file_0_from_project_1_does_not_exist:t(6309,e.DiagnosticCategory.Error,"Output_file_0_from_project_1_does_not_exist_6309","Output file '{0}' from project '{1}' does not exist"),Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2:t(6350,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350","Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2:t(6351,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:t(6352,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:t(6353,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:t(6354,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:t(6355,e.DiagnosticCategory.Message,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:t(6356,e.DiagnosticCategory.Message,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:t(6357,e.DiagnosticCategory.Message,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:t(6358,e.DiagnosticCategory.Message,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:t(6359,e.DiagnosticCategory.Message,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),delete_this_Project_0_is_up_to_date_because_it_was_previously_built:t(6360,e.DiagnosticCategory.Message,"delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360","delete this - Project '{0}' is up to date because it was previously built"),Project_0_is_up_to_date:t(6361,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:t(6362,e.DiagnosticCategory.Message,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:t(6363,e.DiagnosticCategory.Message,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:t(6364,e.DiagnosticCategory.Message,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:t(6365,e.DiagnosticCategory.Message,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects"),Enable_verbose_logging:t(6366,e.DiagnosticCategory.Message,"Enable_verbose_logging_6366","Enable verbose logging"),Show_what_would_be_built_or_deleted_if_specified_with_clean:t(6367,e.DiagnosticCategory.Message,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Build_all_projects_including_those_that_appear_to_be_up_to_date:t(6368,e.DiagnosticCategory.Message,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6368","Build all projects, including those that appear to be up to date"),Option_build_must_be_the_first_command_line_argument:t(6369,e.DiagnosticCategory.Error,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:t(6370,e.DiagnosticCategory.Error,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Skipping_clean_because_not_all_projects_could_be_located:t(6371,e.DiagnosticCategory.Error,"Skipping_clean_because_not_all_projects_could_be_located_6371","Skipping clean because not all projects could be located"),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:t(6500,e.DiagnosticCategory.Message,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:t(6501,e.DiagnosticCategory.Message,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),Variable_0_implicitly_has_an_1_type:t(7005,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:t(7006,e.DiagnosticCategory.Error,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:t(7008,e.DiagnosticCategory.Error,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:t(7009,e.DiagnosticCategory.Error,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:t(7010,e.DiagnosticCategory.Error,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7011,e.DiagnosticCategory.Error,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7013,e.DiagnosticCategory.Error,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:t(7015,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:t(7016,e.DiagnosticCategory.Error,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:t(7017,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:t(7018,e.DiagnosticCategory.Error,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:t(7019,e.DiagnosticCategory.Error,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7020,e.DiagnosticCategory.Error,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:t(7022,e.DiagnosticCategory.Error,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7023,e.DiagnosticCategory.Error,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7024,e.DiagnosticCategory.Error,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type:t(7025,e.DiagnosticCategory.Error,"Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025","Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:t(7026,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:t(7027,e.DiagnosticCategory.Error,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:t(7028,e.DiagnosticCategory.Error,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:t(7029,e.DiagnosticCategory.Error,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:t(7030,e.DiagnosticCategory.Error,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:t(7031,e.DiagnosticCategory.Error,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:t(7032,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:t(7033,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:t(7034,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:t(7035,e.DiagnosticCategory.Error,"Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035","Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:t(7036,e.DiagnosticCategory.Error,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:t(7037,e.DiagnosticCategory.Message,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:t(7038,e.DiagnosticCategory.Message,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:t(7039,e.DiagnosticCategory.Error,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_0:t(7040,e.DiagnosticCategory.Error,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{0}`"),You_cannot_rename_this_element:t(8e3,e.DiagnosticCategory.Error,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:t(8001,e.DiagnosticCategory.Error,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_a_ts_file:t(8002,e.DiagnosticCategory.Error,"import_can_only_be_used_in_a_ts_file_8002","'import ... =' can only be used in a .ts file."),export_can_only_be_used_in_a_ts_file:t(8003,e.DiagnosticCategory.Error,"export_can_only_be_used_in_a_ts_file_8003","'export=' can only be used in a .ts file."),type_parameter_declarations_can_only_be_used_in_a_ts_file:t(8004,e.DiagnosticCategory.Error,"type_parameter_declarations_can_only_be_used_in_a_ts_file_8004","'type parameter declarations' can only be used in a .ts file."),implements_clauses_can_only_be_used_in_a_ts_file:t(8005,e.DiagnosticCategory.Error,"implements_clauses_can_only_be_used_in_a_ts_file_8005","'implements clauses' can only be used in a .ts file."),interface_declarations_can_only_be_used_in_a_ts_file:t(8006,e.DiagnosticCategory.Error,"interface_declarations_can_only_be_used_in_a_ts_file_8006","'interface declarations' can only be used in a .ts file."),module_declarations_can_only_be_used_in_a_ts_file:t(8007,e.DiagnosticCategory.Error,"module_declarations_can_only_be_used_in_a_ts_file_8007","'module declarations' can only be used in a .ts file."),type_aliases_can_only_be_used_in_a_ts_file:t(8008,e.DiagnosticCategory.Error,"type_aliases_can_only_be_used_in_a_ts_file_8008","'type aliases' can only be used in a .ts file."),_0_can_only_be_used_in_a_ts_file:t(8009,e.DiagnosticCategory.Error,"_0_can_only_be_used_in_a_ts_file_8009","'{0}' can only be used in a .ts file."),types_can_only_be_used_in_a_ts_file:t(8010,e.DiagnosticCategory.Error,"types_can_only_be_used_in_a_ts_file_8010","'types' can only be used in a .ts file."),type_arguments_can_only_be_used_in_a_ts_file:t(8011,e.DiagnosticCategory.Error,"type_arguments_can_only_be_used_in_a_ts_file_8011","'type arguments' can only be used in a .ts file."),parameter_modifiers_can_only_be_used_in_a_ts_file:t(8012,e.DiagnosticCategory.Error,"parameter_modifiers_can_only_be_used_in_a_ts_file_8012","'parameter modifiers' can only be used in a .ts file."),non_null_assertions_can_only_be_used_in_a_ts_file:t(8013,e.DiagnosticCategory.Error,"non_null_assertions_can_only_be_used_in_a_ts_file_8013","'non-null assertions' can only be used in a .ts file."),enum_declarations_can_only_be_used_in_a_ts_file:t(8015,e.DiagnosticCategory.Error,"enum_declarations_can_only_be_used_in_a_ts_file_8015","'enum declarations' can only be used in a .ts file."),type_assertion_expressions_can_only_be_used_in_a_ts_file:t(8016,e.DiagnosticCategory.Error,"type_assertion_expressions_can_only_be_used_in_a_ts_file_8016","'type assertion expressions' can only be used in a .ts file."),Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:t(8017,e.DiagnosticCategory.Error,"Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017","Octal literal types must use ES2015 syntax. Use the syntax '{0}'."),Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0:t(8018,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018","Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."),Report_errors_in_js_files:t(8019,e.DiagnosticCategory.Message,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:t(8020,e.DiagnosticCategory.Error,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:t(8021,e.DiagnosticCategory.Error,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:t(8022,e.DiagnosticCategory.Error,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:t(8023,e.DiagnosticCategory.Error,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:t(8024,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:t(8025,e.DiagnosticCategory.Error,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one `@augments` or `@extends` tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:t(8026,e.DiagnosticCategory.Error,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:t(8027,e.DiagnosticCategory.Error,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:t(8028,e.DiagnosticCategory.Error,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:t(8029,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:t(8030,e.DiagnosticCategory.Error,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause:t(9002,e.DiagnosticCategory.Error,"Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002","Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause."),class_expressions_are_not_currently_supported:t(9003,e.DiagnosticCategory.Error,"class_expressions_are_not_currently_supported_9003","'class' expressions are not currently supported."),Language_service_is_disabled:t(9004,e.DiagnosticCategory.Error,"Language_service_is_disabled_9004","Language service is disabled."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:t(17e3,e.DiagnosticCategory.Error,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:t(17001,e.DiagnosticCategory.Error,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:t(17002,e.DiagnosticCategory.Error,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),JSX_attribute_expected:t(17003,e.DiagnosticCategory.Error,"JSX_attribute_expected_17003","JSX attribute expected."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:t(17004,e.DiagnosticCategory.Error,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:t(17005,e.DiagnosticCategory.Error,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17006,e.DiagnosticCategory.Error,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17007,e.DiagnosticCategory.Error,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:t(17008,e.DiagnosticCategory.Error,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:t(17009,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:t(17010,e.DiagnosticCategory.Error,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:t(17011,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:t(17012,e.DiagnosticCategory.Error,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:t(17013,e.DiagnosticCategory.Error,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:t(17014,e.DiagnosticCategory.Error,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:t(17015,e.DiagnosticCategory.Error,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),JSX_fragment_is_not_supported_when_using_jsxFactory:t(17016,e.DiagnosticCategory.Error,"JSX_fragment_is_not_supported_when_using_jsxFactory_17016","JSX fragment is not supported when using --jsxFactory"),JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma:t(17017,e.DiagnosticCategory.Error,"JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017","JSX fragment is not supported when using an inline JSX factory pragma"),Circularity_detected_while_resolving_configuration_Colon_0:t(18e3,e.DiagnosticCategory.Error,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not:t(18001,e.DiagnosticCategory.Error,"A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001","A path in an 'extends' option must be relative or rooted, but '{0}' is not."),The_files_list_in_config_file_0_is_empty:t(18002,e.DiagnosticCategory.Error,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:t(18003,e.DiagnosticCategory.Error,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module:t(80001,e.DiagnosticCategory.Suggestion,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001","File is a CommonJS module; it may be converted to an ES6 module."),This_constructor_function_may_be_converted_to_a_class_declaration:t(80002,e.DiagnosticCategory.Suggestion,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:t(80003,e.DiagnosticCategory.Suggestion,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:t(80004,e.DiagnosticCategory.Suggestion,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:t(80005,e.DiagnosticCategory.Suggestion,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),Add_missing_super_call:t(90001,e.DiagnosticCategory.Message,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:t(90002,e.DiagnosticCategory.Message,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:t(90003,e.DiagnosticCategory.Message,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_declaration_for_Colon_0:t(90004,e.DiagnosticCategory.Message,"Remove_declaration_for_Colon_0_90004","Remove declaration for: '{0}'"),Remove_import_from_0:t(90005,e.DiagnosticCategory.Message,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:t(90006,e.DiagnosticCategory.Message,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:t(90007,e.DiagnosticCategory.Message,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:t(90008,e.DiagnosticCategory.Message,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_destructuring:t(90009,e.DiagnosticCategory.Message,"Remove_destructuring_90009","Remove destructuring"),Remove_variable_statement:t(90010,e.DiagnosticCategory.Message,"Remove_variable_statement_90010","Remove variable statement"),Import_0_from_module_1:t(90013,e.DiagnosticCategory.Message,"Import_0_from_module_1_90013","Import '{0}' from module \"{1}\""),Change_0_to_1:t(90014,e.DiagnosticCategory.Message,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Add_0_to_existing_import_declaration_from_1:t(90015,e.DiagnosticCategory.Message,"Add_0_to_existing_import_declaration_from_1_90015","Add '{0}' to existing import declaration from \"{1}\""),Declare_property_0:t(90016,e.DiagnosticCategory.Message,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:t(90017,e.DiagnosticCategory.Message,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:t(90018,e.DiagnosticCategory.Message,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:t(90019,e.DiagnosticCategory.Message,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:t(90020,e.DiagnosticCategory.Message,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:t(90021,e.DiagnosticCategory.Message,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:t(90022,e.DiagnosticCategory.Message,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:t(90023,e.DiagnosticCategory.Message,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:t(90024,e.DiagnosticCategory.Message,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:t(90025,e.DiagnosticCategory.Message,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:t(90026,e.DiagnosticCategory.Message,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:t(90027,e.DiagnosticCategory.Message,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:t(90028,e.DiagnosticCategory.Message,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:t(90029,e.DiagnosticCategory.Message,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Convert_function_to_an_ES2015_class:t(95001,e.DiagnosticCategory.Message,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_function_0_to_class:t(95002,e.DiagnosticCategory.Message,"Convert_function_0_to_class_95002","Convert function '{0}' to class"),Extract_to_0_in_1:t(95004,e.DiagnosticCategory.Message,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:t(95005,e.DiagnosticCategory.Message,"Extract_function_95005","Extract function"),Extract_constant:t(95006,e.DiagnosticCategory.Message,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:t(95007,e.DiagnosticCategory.Message,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:t(95008,e.DiagnosticCategory.Message,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:t(95009,e.DiagnosticCategory.Message,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Annotate_with_types_from_JSDoc:t(95010,e.DiagnosticCategory.Message,"Annotate_with_types_from_JSDoc_95010","Annotate with types from JSDoc"),Infer_type_of_0_from_usage:t(95011,e.DiagnosticCategory.Message,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:t(95012,e.DiagnosticCategory.Message,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:t(95013,e.DiagnosticCategory.Message,"Convert_to_default_import_95013","Convert to default import"),Install_0:t(95014,e.DiagnosticCategory.Message,"Install_0_95014","Install '{0}'"),Replace_import_with_0:t(95015,e.DiagnosticCategory.Message,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:t(95016,e.DiagnosticCategory.Message,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES6_module:t(95017,e.DiagnosticCategory.Message,"Convert_to_ES6_module_95017","Convert to ES6 module"),Add_undefined_type_to_property_0:t(95018,e.DiagnosticCategory.Message,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:t(95019,e.DiagnosticCategory.Message,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:t(95020,e.DiagnosticCategory.Message,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Add_all_missing_members:t(95022,e.DiagnosticCategory.Message,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:t(95023,e.DiagnosticCategory.Message,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:t(95024,e.DiagnosticCategory.Message,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:t(95025,e.DiagnosticCategory.Message,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:t(95026,e.DiagnosticCategory.Message,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:t(95027,e.DiagnosticCategory.Message,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:t(95028,e.DiagnosticCategory.Message,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:t(95029,e.DiagnosticCategory.Message,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:t(95030,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:t(95031,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:t(95032,e.DiagnosticCategory.Message,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:t(95033,e.DiagnosticCategory.Message,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:t(95034,e.DiagnosticCategory.Message,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:t(95035,e.DiagnosticCategory.Message,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:t(95036,e.DiagnosticCategory.Message,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:t(95037,e.DiagnosticCategory.Message,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:t(95038,e.DiagnosticCategory.Message,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:t(95039,e.DiagnosticCategory.Message,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:t(95040,e.DiagnosticCategory.Message,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:t(95041,e.DiagnosticCategory.Message,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:t(95042,e.DiagnosticCategory.Message,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:t(95043,e.DiagnosticCategory.Message,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:t(95044,e.DiagnosticCategory.Message,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:t(95045,e.DiagnosticCategory.Message,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:t(95046,e.DiagnosticCategory.Message,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:t(95047,e.DiagnosticCategory.Message,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:t(95048,e.DiagnosticCategory.Message,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:t(95049,e.DiagnosticCategory.Message,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:t(95050,e.DiagnosticCategory.Message,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:t(95051,e.DiagnosticCategory.Message,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:t(95052,e.DiagnosticCategory.Message,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:t(95053,e.DiagnosticCategory.Message,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:t(95054,e.DiagnosticCategory.Message,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:t(95055,e.DiagnosticCategory.Message,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:t(95056,e.DiagnosticCategory.Message,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:t(95057,e.DiagnosticCategory.Message,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:t(95058,e.DiagnosticCategory.Message,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:t(95059,e.DiagnosticCategory.Message,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:t(95060,e.DiagnosticCategory.Message,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:t(95061,e.DiagnosticCategory.Message,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:t(95062,e.DiagnosticCategory.Message,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:t(95063,e.DiagnosticCategory.Message,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:t(95064,e.DiagnosticCategory.Message,"Add_all_missing_imports_95064","Add all missing imports")}}(s||(s={})),function(e){function t(e){return e>=71}e.tokenIsIdentifierOrKeyword=t,e.tokenIsIdentifierOrKeywordOrGreaterThan=function(e){return 29===e||t(e)};var r=e.createMapFromTemplate({abstract:117,any:119,as:118,boolean:122,break:72,case:73,catch:74,class:75,continue:77,const:76,constructor:123,debugger:78,declare:124,default:79,delete:80,do:81,else:82,enum:83,export:84,extends:85,false:86,finally:87,for:88,from:143,function:89,get:125,if:90,implements:108,import:91,in:92,infer:126,instanceof:93,interface:109,is:127,keyof:128,let:110,module:129,namespace:130,never:131,new:94,null:95,number:134,object:135,package:111,private:112,protected:113,public:114,readonly:132,require:133,global:144,return:96,set:136,static:115,string:137,super:97,switch:98,symbol:138,this:99,throw:100,true:101,try:102,type:139,typeof:103,undefined:140,unique:141,unknown:142,var:104,void:105,while:106,with:107,yield:116,async:120,await:121,of:145,"{":17,"}":18,"(":19,")":20,"[":21,"]":22,".":23,"...":24,";":25,",":26,"<":27,">":29,"<=":30,">=":31,"==":32,"!=":33,"===":34,"!==":35,"=>":36,"+":37,"-":38,"**":40,"*":39,"/":41,"%":42,"++":43,"--":44,"<<":45,">":46,">>>":47,"&":48,"|":49,"^":50,"!":51,"~":52,"&&":53,"||":54,"?":55,":":56,"=":58,"+=":59,"-=":60,"*=":61,"**=":62,"/=":63,"%=":64,"<<=":65,">>=":66,">>>=":67,"&=":68,"|=":69,"^=":70,"@":57}),n=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1569,1594,1600,1610,1649,1747,1749,1749,1765,1766,1786,1788,1808,1808,1810,1836,1920,1957,2309,2361,2365,2365,2384,2384,2392,2401,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2784,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2877,2908,2909,2911,2913,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3294,3294,3296,3297,3333,3340,3342,3344,3346,3368,3370,3385,3424,3425,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3946,3976,3979,4096,4129,4131,4135,4137,4138,4176,4181,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6067,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12329,12337,12341,12344,12346,12353,12436,12445,12446,12449,12538,12540,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65138,65140,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],i=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,768,846,864,866,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1155,1158,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1425,1441,1443,1465,1467,1469,1471,1471,1473,1474,1476,1476,1488,1514,1520,1522,1569,1594,1600,1621,1632,1641,1648,1747,1749,1756,1759,1768,1770,1773,1776,1788,1808,1836,1840,1866,1920,1968,2305,2307,2309,2361,2364,2381,2384,2388,2392,2403,2406,2415,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2492,2494,2500,2503,2504,2507,2509,2519,2519,2524,2525,2527,2531,2534,2545,2562,2562,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2649,2652,2654,2654,2662,2676,2689,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2784,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2876,2883,2887,2888,2891,2893,2902,2903,2908,2909,2911,2913,2918,2927,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3010,3014,3016,3018,3021,3031,3031,3047,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3134,3140,3142,3144,3146,3149,3157,3158,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3395,3398,3400,3402,3405,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3805,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3946,3953,3972,3974,3979,3984,3991,3993,4028,4038,4038,4096,4129,4131,4135,4137,4138,4140,4146,4150,4153,4160,4169,4176,4185,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4969,4977,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6099,6112,6121,6160,6169,6176,6263,6272,6313,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8319,8319,8400,8412,8417,8417,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12335,12337,12341,12344,12346,12353,12436,12441,12442,12445,12446,12449,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65056,65059,65075,65076,65101,65103,65136,65138,65140,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500],a=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],o=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500];function s(e,t){if(e=1?a:n)}e.isUnicodeIdentifierStart=c;var u,l=(u=[],r.forEach(function(e,t){u[e]=t}),u);function _(e){for(var t=new Array,r=0,n=0;r127&&y(i)&&(t.push(n),n=r)}}return t.push(n),t}function d(t,r,n,i){(r<0||r>=t.length)&&e.Debug.fail("Bad line number. Line: "+r+", lineStarts.length: "+t.length+" , line map is correct? "+(void 0!==i?e.arraysEqual(t,_(i)):"unknown"));var a=t[r]+n;return r=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function y(e){return 10===e||13===e||8232===e||8233===e}function h(e){return e>=48&&e<=57}function v(e){return e>=48&&e<=55}e.tokenToString=function(e){return l[e]},e.stringToToken=function(e){return r.get(e)},e.computeLineStarts=_,e.getPositionOfLineAndCharacter=function(e,t,r){return d(p(e),t,r,e.text)},e.computePositionOfLineAndCharacter=d,e.getLineStarts=p,e.computeLineAndCharacterOfPosition=f,e.getLineAndCharacterOfPosition=function(e,t){return f(p(e),t)},e.isWhiteSpaceLike=m,e.isWhiteSpaceSingleLine=g,e.isLineBreak=y,e.isOctalDigit=v,e.couldStartTrivia=function(e,t){var r=e.charCodeAt(t);switch(r){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return 0===t;default:return r>127}},e.skipTrivia=function(t,r,n,i){if(void 0===i&&(i=!1),e.positionIsSynthesized(r))return r;for(;;){var a=t.charCodeAt(r);switch(a){case 13:10===t.charCodeAt(r+1)&&r++;case 10:if(r++,n)return r;continue;case 9:case 11:case 12:case 32:r++;continue;case 47:if(i)break;if(47===t.charCodeAt(r+1)){for(r+=2;r127&&m(a)){r++;continue}}return r}};var b="<<<<<<<".length;function x(t,r){if(e.Debug.assert(r>=0),0===r||y(t.charCodeAt(r-1))){var n=t.charCodeAt(r);if(r+b=0&&r127&&m(f)){_&&y(f)&&(l=!0),r++;continue}break e}}return _&&(p=i(s,c,u,l,a,p)),p}function E(e,t,r,n,i){return C(!0,e,t,!1,r,n,i)}function N(e,t,r,n,i){return C(!0,e,t,!0,r,n,i)}function A(e,t,r,n,i,a){return a||(a=[]),a.push({kind:r,pos:e,end:t,hasTrailingNewLine:n}),a}function P(e,t){return e>=65&&e<=90||e>=97&&e<=122||36===e||95===e||e>127&&c(e,t)}function w(e,t){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||36===e||95===e||e>127&&function(e,t){return s(e,t>=1?o:i)}(e,t)}e.forEachLeadingCommentRange=function(e,t,r,n){return C(!1,e,t,!1,r,n)},e.forEachTrailingCommentRange=function(e,t,r,n){return C(!1,e,t,!0,r,n)},e.reduceEachLeadingCommentRange=E,e.reduceEachTrailingCommentRange=N,e.getLeadingCommentRanges=function(e,t){return E(e,t,A,void 0,void 0)},e.getTrailingCommentRanges=function(e,t){return N(e,t,A,void 0,void 0)},e.getShebang=function(e){var t=D.exec(e);if(t)return t[0]},e.isIdentifierStart=P,e.isIdentifierPart=w,e.isIdentifierText=function(e,t){if(!P(e.charCodeAt(0),t))return!1;for(var r=1;r107},isReservedWord:function(){return f>=72&&f<=107},isUnterminated:function(){return 0!=(4&D)},getTokenFlags:function(){return D},reScanGreaterToken:function(){if(29===f){if(62===C.charCodeAt(l))return 62===C.charCodeAt(l+1)?61===C.charCodeAt(l+2)?(l+=3,f=67):(l+=2,f=47):61===C.charCodeAt(l+1)?(l+=2,f=66):(l++,f=46);if(61===C.charCodeAt(l))return l++,f=31}return f},reScanSlashToken:function(){if(41===f||63===f){for(var t=p+1,r=!1,i=!1;;){if(t>=_){D|=4,E(e.Diagnostics.Unterminated_regular_expression_literal);break}var a=C.charCodeAt(t);if(y(a)){D|=4,E(e.Diagnostics.Unterminated_regular_expression_literal);break}if(r)r=!1;else{if(47===a&&!i){t++;break}91===a?i=!0:92===a?r=!0:93===a&&(i=!1)}t++}for(;t<_&&w(C.charCodeAt(t),n);)t++;l=t,b=C.substring(p,l),f=12}return f},reScanTemplateToken:function(){return e.Debug.assert(18===f,"'reScanTemplateToken' should only be called on a '}'"),l=p,f=R()},scanJsxIdentifier:function(){if(t(f)){for(var e=l;l<_;){var r=C.charCodeAt(l);if(45!==r&&(e===l?!P(r,n):!w(r,n)))break;l++}b+=C.substring(e,l)}return f},scanJsxAttributeValue:function(){switch(d=l,C.charCodeAt(l)){case 34:case 39:return b=L(!0),f=9;default:return q()}},reScanJsxToken:function(){return l=p=d,f=V()},scanJsxToken:V,scanJSDocToken:function(){if(d=p=l,l>=_)return f=1;var e=C.charCodeAt(l);switch(l++,e){case 9:case 11:case 12:case 32:for(;l<_&&g(C.charCodeAt(l));)l++;return f=5;case 64:return f=57;case 10:case 13:return f=4;case 42:return f=39;case 123:return f=17;case 125:return f=18;case 91:return f=21;case 93:return f=22;case 60:return f=27;case 61:return f=58;case 44:return f=26;case 46:return f=23;case 96:for(;l<_&&96!==C.charCodeAt(l);)l++;return b=C.substring(p+1,l),l++,f=13}if(P(e,6)){for(;w(C.charCodeAt(l),6)&&l<_;)l++;return b=C.substring(p,l),f=71}return f=0},scan:q,getText:function(){return C},setText:H,setScriptTarget:function(e){n=e},setLanguageVariant:function(e){a=e},setOnError:function(e){s=e},setTextPos:G,tryScan:function(e){return W(e,!1)},lookAhead:function(e){return W(e,!0)},scanRange:function(e,t,r){var n=_,i=l,a=d,o=p,s=f,c=b,u=D;H(C,e,t);var m=r();return _=n,l=i,d=a,p=o,f=s,b=c,D=u,m}};function E(e,t,r){if(void 0===t&&(t=l),s){var n=l;l=t,s(e,r||0),l=n}}function N(){for(var t=l,r=!1,n=!1,i="";;){var a=C.charCodeAt(l);if(95!==a){if(!h(a))break;r=!0,n=!1,l++}else D|=512,r?(r=!1,n=!0,i+=C.substring(t,l)):E(n?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),t=++l}return 95===C.charCodeAt(l-1)&&E(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),i+C.substring(t,l)}function A(){var t,r,n=l,i=N();46===C.charCodeAt(l)&&(l++,t=N());var a=l;if(69===C.charCodeAt(l)||101===C.charCodeAt(l)){l++,D|=16,43!==C.charCodeAt(l)&&45!==C.charCodeAt(l)||l++;var o=l,s=N();s?(r=C.substring(a,o)+s,a=l):E(e.Diagnostics.Digit_expected)}if(512&D){var c=i;return t&&(c+="."+t),r&&(c+=r),""+ +c}return""+ +C.substring(n,a)}function F(){for(var e=l;v(C.charCodeAt(l));)l++;return+C.substring(e,l)}function I(e,t){return M(e,!1,t)}function O(e,t){return M(e,!0,t)}function M(t,r,n){for(var i=0,a=0,o=!1,s=!1;i=48&&c<=57)a=16*a+c-48;else if(c>=65&&c<=70)a=16*a+c-65+10;else{if(!(c>=97&&c<=102))break;a=16*a+c-97+10}l++,i++,s=!1}}return i=_){n+=C.substring(i,l),D|=4,E(e.Diagnostics.Unterminated_string_literal);break}var a=C.charCodeAt(l);if(a===r){n+=C.substring(i,l),l++;break}if(92!==a||t){if(y(a)&&!t){n+=C.substring(i,l),D|=4,E(e.Diagnostics.Unterminated_string_literal);break}l++}else n+=C.substring(i,l),n+=B(),i=l}return n}function R(){for(var t,r=96===C.charCodeAt(l),n=++l,i="";;){if(l>=_){i+=C.substring(n,l),D|=4,E(e.Diagnostics.Unterminated_template_literal),t=r?13:16;break}var a=C.charCodeAt(l);if(96===a){i+=C.substring(n,l),l++,t=r?13:16;break}if(36===a&&l+1<_&&123===C.charCodeAt(l+1)){i+=C.substring(n,l),l+=2,t=r?14:15;break}92!==a?13!==a?l++:(i+=C.substring(n,l),++l<_&&10===C.charCodeAt(l)&&l++,i+="\n",n=l):(i+=C.substring(n,l),i+=B(),n=l)}return e.Debug.assert(void 0!==t),b=i,t}function B(){if(++l>=_)return E(e.Diagnostics.Unexpected_end_of_text),"";var t,r,n=C.charCodeAt(l);switch(l++,n){case 48:return"\0";case 98:return"\b";case 116:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:return l<_&&123===C.charCodeAt(l)?(D|=8,l++,t=O(1,!1),r=!1,t<0?(E(e.Diagnostics.Hexadecimal_digit_expected),r=!0):t>1114111&&(E(e.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),r=!0),l>=_?(E(e.Diagnostics.Unexpected_end_of_text),r=!0):125===C.charCodeAt(l)?l++:(E(e.Diagnostics.Unterminated_Unicode_escape_sequence),r=!0),r?"":function(t){if(e.Debug.assert(0<=t&&t<=1114111),t<=65535)return String.fromCharCode(t);var r=Math.floor((t-65536)/1024)+55296,n=(t-65536)%1024+56320;return String.fromCharCode(r,n)}(t)):j(4);case 120:return j(2);case 13:l<_&&10===C.charCodeAt(l)&&l++;case 10:case 8232:case 8233:return"";default:return String.fromCharCode(n)}}function j(t){var r=I(t,!1);return r>=0?String.fromCharCode(r):(E(e.Diagnostics.Hexadecimal_digit_expected),"")}function J(){if(l+5<_&&117===C.charCodeAt(l+1)){var e=l;l+=2;var t=I(4,!1);return l=e,t}return-1}function z(){for(var e="",t=l;l<_;){var r=C.charCodeAt(l);if(w(r,n))l++;else{if(92!==r)break;if(!((r=J())>=0&&w(r,n)))break;e+=C.substring(t,l),e+=String.fromCharCode(r),t=l+=6}}return e+=C.substring(t,l)}function K(){var e=b.length;if(e>=2&&e<=11){var t=b.charCodeAt(0);if(t>=97&&t<=122&&void 0!==(f=r.get(b)))return f}return f=71}function U(t){e.Debug.assert(2===t||8===t,"Expected either base 2 or base 8");for(var r=0,n=0,i=!1,a=!1;;){var o=C.charCodeAt(l);if(95!==o){i=!0;var s=o-48;if(!h(o)||s>=t)break;r=r*t+s,l++,n++,a=!1}else D|=512,i?(i=!1,a=!0):E(a?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),l++}return 0===n?-1:95===C.charCodeAt(l-1)?(E(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),r):r}function q(){for(d=l,D=0;;){if(p=l,l>=_)return f=1;var t=C.charCodeAt(l);if(35===t&&0===l&&k(C,l)){if(l=T(C,l),i)continue;return f=6}switch(t){case 10:case 13:if(D|=1,i){l++;continue}return 13===t&&l+1<_&&10===C.charCodeAt(l+1)?l+=2:l++,f=4;case 9:case 11:case 12:case 32:if(i){l++;continue}for(;l<_&&g(C.charCodeAt(l));)l++;return f=5;case 33:return 61===C.charCodeAt(l+1)?61===C.charCodeAt(l+2)?(l+=3,f=35):(l+=2,f=33):(l++,f=51);case 34:case 39:return b=L(),f=9;case 96:return f=R();case 37:return 61===C.charCodeAt(l+1)?(l+=2,f=64):(l++,f=42);case 38:return 38===C.charCodeAt(l+1)?(l+=2,f=53):61===C.charCodeAt(l+1)?(l+=2,f=68):(l++,f=48);case 40:return l++,f=19;case 41:return l++,f=20;case 42:return 61===C.charCodeAt(l+1)?(l+=2,f=61):42===C.charCodeAt(l+1)?61===C.charCodeAt(l+2)?(l+=3,f=62):(l+=2,f=40):(l++,f=39);case 43:return 43===C.charCodeAt(l+1)?(l+=2,f=43):61===C.charCodeAt(l+1)?(l+=2,f=59):(l++,f=37);case 44:return l++,f=26;case 45:return 45===C.charCodeAt(l+1)?(l+=2,f=44):61===C.charCodeAt(l+1)?(l+=2,f=60):(l++,f=38);case 46:return h(C.charCodeAt(l+1))?(b=A(),f=8):46===C.charCodeAt(l+1)&&46===C.charCodeAt(l+2)?(l+=3,f=24):(l++,f=23);case 47:if(47===C.charCodeAt(l+1)){for(l+=2;l<_&&!y(C.charCodeAt(l));)l++;if(i)continue;return f=2}if(42===C.charCodeAt(l+1)){l+=2,42===C.charCodeAt(l)&&47!==C.charCodeAt(l+1)&&(D|=2);for(var r=!1;l<_;){var o=C.charCodeAt(l);if(42===o&&47===C.charCodeAt(l+1)){l+=2,r=!0;break}y(o)&&(D|=1),l++}if(r||E(e.Diagnostics.Asterisk_Slash_expected),i)continue;return r||(D|=4),f=3}return 61===C.charCodeAt(l+1)?(l+=2,f=63):(l++,f=41);case 48:var s;if(l+2<_&&(88===C.charCodeAt(l+1)||120===C.charCodeAt(l+1)))return l+=2,(s=O(1,!0))<0&&(E(e.Diagnostics.Hexadecimal_digit_expected),s=0),b=""+s,D|=64,f=8;if(l+2<_&&(66===C.charCodeAt(l+1)||98===C.charCodeAt(l+1)))return l+=2,(s=U(2))<0&&(E(e.Diagnostics.Binary_digit_expected),s=0),b=""+s,D|=128,f=8;if(l+2<_&&(79===C.charCodeAt(l+1)||111===C.charCodeAt(l+1)))return l+=2,(s=U(8))<0&&(E(e.Diagnostics.Octal_digit_expected),s=0),b=""+s,D|=256,f=8;if(l+1<_&&v(C.charCodeAt(l+1)))return b=""+F(),D|=32,f=8;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return b=A(),f=8;case 58:return l++,f=56;case 59:return l++,f=25;case 60:if(x(C,l)){if(l=S(C,l,E),i)continue;return f=7}return 60===C.charCodeAt(l+1)?61===C.charCodeAt(l+2)?(l+=3,f=65):(l+=2,f=45):61===C.charCodeAt(l+1)?(l+=2,f=30):1===a&&47===C.charCodeAt(l+1)&&42!==C.charCodeAt(l+2)?(l+=2,f=28):(l++,f=27);case 61:if(x(C,l)){if(l=S(C,l,E),i)continue;return f=7}return 61===C.charCodeAt(l+1)?61===C.charCodeAt(l+2)?(l+=3,f=34):(l+=2,f=32):62===C.charCodeAt(l+1)?(l+=2,f=36):(l++,f=58);case 62:if(x(C,l)){if(l=S(C,l,E),i)continue;return f=7}return l++,f=29;case 63:return l++,f=55;case 91:return l++,f=21;case 93:return l++,f=22;case 94:return 61===C.charCodeAt(l+1)?(l+=2,f=70):(l++,f=50);case 123:return l++,f=17;case 124:if(x(C,l)){if(l=S(C,l,E),i)continue;return f=7}return 124===C.charCodeAt(l+1)?(l+=2,f=54):61===C.charCodeAt(l+1)?(l+=2,f=69):(l++,f=49);case 125:return l++,f=18;case 126:return l++,f=52;case 64:return l++,f=57;case 92:var c=J();return c>=0&&P(c,n)?(l+=6,b=String.fromCharCode(c)+z(),f=K()):(E(e.Diagnostics.Invalid_character),l++,f=0);default:if(P(t,n)){for(l++;l<_&&w(t=C.charCodeAt(l),n);)l++;return b=C.substring(p,l),92===t&&(b+=z()),f=K()}if(g(t)){l++;continue}if(y(t)){D|=1,l++;continue}return E(e.Diagnostics.Invalid_character),l++,f=0}}}function V(){if(d=p=l,l>=_)return f=1;var e=C.charCodeAt(l);if(60===e)return 47===C.charCodeAt(l+1)?(l+=2,f=28):(l++,f=27);if(123===e)return l++,f=17;for(var t=0;l<_&&123!==(e=C.charCodeAt(l));){if(60===e){if(x(C,l))return l=S(C,l,E),f=7;break}y(e)&&0===t?t=-1:m(e)||(t=l),l++}return-1===t?11:10}function W(e,t){var r=l,n=d,i=p,a=f,o=b,s=D,c=e();return c&&!t||(l=r,d=n,p=i,f=a,b=o,D=s),c}function H(e,t,r){C=e||"",_=void 0===r?C.length:t+r,G(t||0)}function G(t){e.Debug.assert(t>=0),l=t,d=t,p=t,f=0,b=void 0,D=0}}}(s||(s={})),function(e){e.isExternalModuleNameRelative=function(t){return e.pathIsRelative(t)||e.isRootedDiskPath(t)},e.sortAndDeduplicateDiagnostics=function(t){return e.sortAndDeduplicate(t,e.compareDiagnostics)}}(s||(s={})),function(e){e.emptyArray=[],e.resolvingEmptyArray=[],e.emptyMap=e.createMap(),e.emptyUnderscoreEscapedMap=e.emptyMap,e.externalHelpersModuleNameText="tslib",e.defaultMaximumTruncationLength=160,e.getDeclarationOfKind=function(e,t){var r=e.declarations;if(r)for(var n=0,i=r;n=0);var n=e.getLineStarts(r),i=t,a=r.text;if(i+1===n.length)return a.length-1;var o=n[i],s=n[i+1]-1;for(e.Debug.assert(e.isLineBreak(a.charCodeAt(s)));o<=s&&e.isLineBreak(a.charCodeAt(s));)s--;return s}function _(e){return void 0===e||e.pos===e.end&&e.pos>=0&&1!==e.kind}function d(e){return!_(e)}function f(e,t){return 42===e.charCodeAt(t+1)&&33===e.charCodeAt(t+2)}function m(t,r,n){return _(t)?t.pos:e.isJSDocNode(t)?e.skipTrivia((r||u(t)).text,t.pos,!1,!0):n&&e.hasJSDocNodes(t)?m(t.jsDoc[0]):303===t.kind&&t._children.length>0?m(t._children[0],r,n):e.skipTrivia((r||u(t)).text,t.pos)}function g(e,t,r){return void 0===r&&(r=!1),y(e.text,t,r)}function y(t,r,n){return void 0===n&&(n=!1),_(r)?"":t.substring(n?r.pos:e.skipTrivia(t,r.pos),r.end)}function h(e,t){return void 0===t&&(t=!1),g(u(e),e,t)}function v(e){return e.pos}function b(e){var t=e.emitNode;return t&&t.flags||0}function x(e){return e.length>=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?"_"+e:e}function S(e){var t=Be(e);return 235===t.kind&&272===t.parent.kind}function D(t){return e.isModuleDeclaration(t)&&(9===t.name.kind||k(t))}function k(e){return!!(512&e.flags)}function T(t){switch(t.parent.kind){case 277:return e.isExternalModule(t.parent);case 243:return D(t.parent.parent)&&e.isSourceFile(t.parent.parent.parent)&&!e.isExternalModule(t.parent.parent.parent)}return!1}function C(t,r){switch(t.kind){case 277:case 244:case 272:case 242:case 223:case 224:case 225:case 155:case 154:case 156:case 157:case 237:case 194:case 195:return!0;case 216:return!e.isFunctionLike(r)}return!1}function E(e){switch(e.kind){case 247:case 246:return!0;default:return!1}}function N(e){return e&&0!==s(e)?h(e):"(Missing)"}function A(t){switch(t.kind){case 71:return t.escapedText;case 9:case 8:return x(t.text);case 147:return we(t.expression)?x(t.expression.text):void 0;default:e.Debug.assertNever(t)}}function P(t,r,n,i,a,o,s){var c=F(t,r);return e.createFileDiagnostic(t,c.start,c.length,n,i,a,o,s)}function w(t,r){var n=e.createScanner(t.languageVersion,!0,t.languageVariant,t.text,void 0,r);n.scan();var i=n.getTokenPos();return e.createTextSpanFromBounds(i,n.getTextPos())}function F(t,r){var n=r;switch(r.kind){case 277:var i=e.skipTrivia(t.text,0,!1);return i===t.text.length?e.createTextSpan(0,0):w(t,i);case 235:case 184:case 238:case 207:case 239:case 242:case 241:case 276:case 237:case 194:case 154:case 156:case 157:case 240:case 152:case 151:n=r.name;break;case 195:return function(t,r){var n=e.skipTrivia(t.text,r.pos);if(r.body&&216===r.body.kind){var i=e.getLineAndCharacterOfPosition(t,r.body.pos).line;if(i=n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(o<=n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),e.createTextSpanFromBounds(o,n.end)}function I(t){return!!(2&e.getCombinedNodeFlags(t))}function O(t){return e.isImportTypeNode(t)&&e.isLiteralTypeNode(t.argument)&&e.isStringLiteral(t.argument.literal)}function M(e){return 219===e.kind&&9===e.expression.kind}e.toPath=i,e.changesAffectModuleResolution=function(t,r){return!(t&&t.module===r.module&&t.moduleResolution===r.moduleResolution&&t.noResolve===r.noResolve&&t.target===r.target&&t.noLib===r.noLib&&t.jsx===r.jsx&&t.allowJs===r.allowJs&&t.rootDir===r.rootDir&&t.configFilePath===r.configFilePath&&t.baseUrl===r.baseUrl&&t.maxNodeModuleJsDepth===r.maxNodeModuleJsDepth&&e.arrayIsEqualTo(t.lib,r.lib)&&e.arrayIsEqualTo(t.typeRoots,r.typeRoots)&&e.arrayIsEqualTo(t.rootDirs,r.rootDirs)&&e.equalOwnProperties(t.paths,r.paths))},e.findAncestor=a,e.forEachEntry=function(e,t){for(var r,n=e.entries(),i=n.next(),a=i.value,o=i.done;!o;a=(r=n.next()).value,o=r.done,r){var s=a[0],c=t(a[1],s);if(c)return c}},e.forEachKey=function(e,t){for(var r,n=e.keys(),i=n.next(),a=i.value,o=i.done;!o;a=(r=n.next()).value,o=r.done,r){var s=t(a);if(s)return s}},e.copyEntries=o,e.arrayToSet=function(t,r){return e.arrayToMap(t,r||function(e){return e},function(){return!0})},e.cloneMap=function(t){var r=e.createMap();return o(t,r),r},e.usingSingleLineStringWriter=function(e){var t=n.getText();try{return e(n),n.getText()}finally{n.clear(),n.writeKeyword(t)}},e.getFullWidth=s,e.getResolvedModule=function(e,t){return e&&e.resolvedModules&&e.resolvedModules.get(t)},e.setResolvedModule=function(t,r,n){t.resolvedModules||(t.resolvedModules=e.createMap()),t.resolvedModules.set(r,n)},e.setResolvedTypeReferenceDirective=function(t,r,n){t.resolvedTypeReferenceDirectiveNames||(t.resolvedTypeReferenceDirectiveNames=e.createMap()),t.resolvedTypeReferenceDirectiveNames.set(r,n)},e.moduleResolutionIsEqualTo=function(e,t){return e.isExternalLibraryImport===t.isExternalLibraryImport&&e.extension===t.extension&&e.resolvedFileName===t.resolvedFileName&&e.originalPath===t.originalPath&&(r=e.packageId,n=t.packageId,r===n||!!r&&!!n&&r.name===n.name&&r.subModuleName===n.subModuleName&&r.version===n.version);var r,n},e.packageIdToString=function(e){var t=e.name,r=e.subModuleName,n=e.version;return(r?t+"/"+r:t)+"@"+n},e.typeDirectiveIsEqualTo=function(e,t){return e.resolvedFileName===t.resolvedFileName&&e.primary===t.primary},e.hasChangesInResolutions=function(t,r,n,i){e.Debug.assert(t.length===r.length);for(var a=0;a=0),e.getLineStarts(r)[t]},e.nodePosToString=function(t){var r=u(t),n=e.getLineAndCharacterOfPosition(r,t.pos);return r.fileName+"("+(n.line+1)+","+(n.character+1)+")"},e.getEndLinePosition=l,e.isFileLevelUniqueName=function(e,t,r){return!(r&&r(t)||e.identifiers.has(t))},e.nodeIsMissing=_,e.nodeIsPresent=d,e.addStatementsAfterPrologue=function(e,t){if(void 0===t||0===t.length)return e;for(var r=0;r/;var L=/^(\/\/\/\s*/;e.fullTripleSlashAMDReferencePathRegEx=/^(\/\/\/\s*/;var R=/^(\/\/\/\s*/;function B(t){if(161<=t.kind&&t.kind<=181)return!0;switch(t.kind){case 119:case 142:case 134:case 137:case 122:case 138:case 140:case 131:return!0;case 105:return 198!==t.parent.kind;case 209:return!At(t);case 148:return 179===t.parent.kind||174===t.parent.kind;case 71:146===t.parent.kind&&t.parent.right===t?t=t.parent:187===t.parent.kind&&t.parent.name===t&&(t=t.parent),e.Debug.assert(71===t.kind||146===t.kind||187===t.kind,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 146:case 187:case 99:var r=t.parent;if(165===r.kind)return!1;if(181===r.kind)return!r.isTypeOf;if(161<=r.kind&&r.kind<=181)return!0;switch(r.kind){case 209:return!At(r);case 148:return t===r.constraint;case 152:case 151:case 149:case 235:return t===r.type;case 237:case 194:case 195:case 155:case 154:case 153:case 156:case 157:return t===r.type;case 158:case 159:case 160:case 192:return t===r.type;case 189:case 190:return e.contains(r.typeArguments,t);case 191:return!1}}return!1}function j(e){if(e)switch(e.kind){case 184:case 276:case 149:case 273:case 152:case 151:case 274:case 235:return!0}return!1}function J(e){return 236===e.parent.kind&&217===e.parent.parent.kind}function z(e,t,r){return e.properties.filter(function(e){if(273===e.kind){var n=A(e.name);return t===n||!!r&&r===n}return!1})}function K(t){if(t&&t.statements.length){var r=t.statements[0].expression;return e.tryCast(r,e.isObjectLiteralExpression)}}function U(t,r){var n=K(t);return n?z(n,r):e.emptyArray}function q(t,r){for(e.Debug.assert(277!==t.kind);;){if(!(t=t.parent))return e.Debug.fail();switch(t.kind){case 147:if(e.isClassLike(t.parent.parent))return t;t=t.parent;break;case 150:149===t.parent.kind&&e.isClassElement(t.parent.parent)?t=t.parent.parent:e.isClassElement(t.parent)&&(t=t.parent);break;case 195:if(!r)continue;case 237:case 194:case 242:case 152:case 151:case 154:case 153:case 155:case 156:case 157:case 158:case 159:case 160:case 241:case 277:return t}}}function V(e,t,r){switch(e.kind){case 238:return!0;case 152:return 238===t.kind;case 156:case 157:case 154:return void 0!==e.body&&238===t.kind;case 149:return void 0!==t.body&&(155===t.kind||154===t.kind||157===t.kind)&&238===r.kind}return!1}function W(e,t,r){return void 0!==e.decorators&&V(e,t,r)}function H(e,t,r){return W(e,t,r)||G(e,t)}function G(t,r){switch(t.kind){case 238:return e.some(t.members,function(e){return H(e,t,r)});case 154:case 157:return e.some(t.parameters,function(e){return W(e,t,r)});default:return!1}}function X(e){var t=e.parent;return(260===t.kind||259===t.kind||261===t.kind)&&t.tagName===e}function Q(e){switch(e.kind){case 97:case 95:case 101:case 86:case 12:case 185:case 186:case 187:case 188:case 189:case 190:case 191:case 210:case 192:case 211:case 193:case 194:case 207:case 195:case 198:case 196:case 197:case 200:case 201:case 202:case 203:case 206:case 204:case 13:case 208:case 258:case 259:case 262:case 205:case 199:case 212:return!0;case 146:for(;146===e.parent.kind;)e=e.parent;return 165===e.parent.kind||X(e);case 71:if(165===e.parent.kind||X(e))return!0;case 8:case 9:case 99:return Y(e);default:return!1}}function Y(e){var t=e.parent;switch(t.kind){case 235:case 149:case 152:case 151:case 276:case 273:case 184:return t.initializer===e;case 219:case 220:case 221:case 222:case 228:case 229:case 230:case 269:case 232:return t.expression===e;case 223:var r=t;return r.initializer===e&&236!==r.initializer.kind||r.condition===e||r.incrementor===e;case 224:case 225:var n=t;return n.initializer===e&&236!==n.initializer.kind||n.expression===e;case 192:case 210:case 214:case 147:return e===t.expression;case 150:case 268:case 267:case 275:return!0;case 209:return t.expression===e&&At(t);default:return Q(t)}}function $(e){return 246===e.kind&&257===e.moduleReference.kind}function Z(e){return ee(e)}function ee(e){return!!e&&!!(65536&e.flags)}function te(t){return ee(t)&&t.initializer&&e.isBinaryExpression(t.initializer)&&54===t.initializer.operatorToken.kind&&t.name&&Pt(t.name)&&ne(t.name,t.initializer.left)?t.initializer.right:t.initializer}function re(t,r){if(e.isCallExpression(t)){var n=xe(t.expression);return 194===n.kind||195===n.kind?t:void 0}return 194===t.kind||207===t.kind||195===t.kind?t:e.isObjectLiteralExpression(t)&&(0===t.properties.length||r)?t:void 0}function ne(t,r){return e.isIdentifier(t)&&e.isIdentifier(r)?t.escapedText===r.escapedText:e.isIdentifier(t)&&e.isPropertyAccessExpression(r)?(99===r.expression.kind||e.isIdentifier(r.expression)&&("window"===r.expression.escapedText||"self"===r.expression.escapedText||"global"===r.expression.escapedText))&&ne(t,r.name):!(!e.isPropertyAccessExpression(t)||!e.isPropertyAccessExpression(r))&&(t.name.escapedText===r.name.escapedText&&ne(t.expression,r.expression))}function ie(t){if(!ee(t)||58!==t.operatorToken.kind||!e.isPropertyAccessExpression(t.left))return 0;var r=t.left;return Pt(r.expression)&&"prototype"===r.name.escapedText&&e.isObjectLiteralExpression(oe(t))?6:ae(r)}function ae(t){if(99===t.expression.kind)return 4;if(e.isIdentifier(t.expression)&&"module"===t.expression.escapedText&&"exports"===t.name.escapedText)return 2;if(Pt(t.expression)){if(Ft(t.expression))return 3;for(var r=t;e.isPropertyAccessExpression(r.expression);)r=r.expression;e.Debug.assert(e.isIdentifier(r.expression));var n=r.expression;return"exports"===n.escapedText||"module"===n.escapedText&&"exports"===r.name.escapedText?1:5}return 0}function oe(t){for(;e.isBinaryExpression(t.right);)t=t.right;return t.right}function se(t){switch(t.parent.kind){case 247:case 253:return t.parent;case 257:return t.parent.parent;case 189:return t.parent;case 180:return e.Debug.assert(e.isStringLiteral(t)),e.tryCast(t.parent.parent,e.isImportTypeNode);default:return}}function ce(e){return 301===e.kind||295===e.kind}function ue(t){return e.isExpressionStatement(t)&&e.isBinaryExpression(t.expression)&&0!==ie(t.expression)&&e.isBinaryExpression(t.expression.right)&&54===t.expression.right.operatorToken.kind?t.expression.right.right:void 0}function le(e){switch(e.kind){case 217:var t=_e(e);return t&&t.initializer;case 152:case 273:return e.initializer}}function _e(t){return e.isVariableStatement(t)?e.firstOrUndefined(t.declarationList.declarations):void 0}function de(t){return e.isModuleDeclaration(t)&&t.body&&242===t.body.kind?t.body:void 0}function pe(t){var r=t.parent;return 273===r.kind||152===r.kind||219===r.kind&&187===t.kind||de(r)||e.isBinaryExpression(t)&&58===t.operatorToken.kind?r:r.parent&&(_e(r.parent)===t||e.isBinaryExpression(r)&&58===r.operatorToken.kind)?r.parent:r.parent&&r.parent.parent&&(_e(r.parent.parent)||le(r.parent.parent)===t||ue(r.parent.parent))?r.parent.parent:void 0}function fe(e){return me(ge(e))}function me(t){var r,n=ue(t)||(r=t,e.isExpressionStatement(r)&&r.expression&&e.isBinaryExpression(r.expression)&&58===r.expression.operatorToken.kind?r.expression.right:void 0)||le(t)||_e(t)||de(t)||t;return n&&e.isFunctionLike(n)?n:void 0}function ge(t){return e.Debug.assertDefined(a(t.parent,e.isJSDoc)).parent}function ye(t){var r=e.isJSDocParameterTag(t)?t.typeExpression&&t.typeExpression.type:t.type;return void 0!==t.dotDotDotToken||!!r&&288===r.kind}function he(e){for(var t=e.parent;;){switch(t.kind){case 202:var r=t.operatorToken.kind;return Ct(r)&&t.left===e?58===r?1:2:0;case 200:case 201:var n=t.operator;return 43===n||44===n?2:0;case 224:case 225:return t.initializer===e?1:0;case 193:case 185:case 206:case 211:e=t;break;case 274:if(t.name!==e)return 0;e=t.parent;break;case 273:if(t.name===e)return 0;e=t.parent;break;default:return 0}t=e.parent}}function ve(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function be(e){return ve(e,193)}function xe(e){for(;193===e.kind;)e=e.expression;return e}function Se(t){var r=e.isExportAssignment(t)?t.expression:t.right;return Pt(r)||e.isClassExpression(r)}function De(t){if(ee(t)){var r=e.getJSDocAugmentsTag(t);if(r)return r.class}return ke(t)}function ke(e){var t=Ee(e.heritageClauses,85);return t&&t.types.length>0?t.types[0]:void 0}function Te(e){var t=Ee(e.heritageClauses,108);return t?t.types:void 0}function Ce(e){var t=Ee(e.heritageClauses,85);return t?t.types:void 0}function Ee(e,t){if(e)for(var r=0,n=e;r0&&e.parameters[0].name&&"new"===e.parameters[0].name.escapedText},e.isJSDocTypeAlias=ce,e.isTypeAlias=function(t){return ce(t)||e.isTypeAliasDeclaration(t)},e.getJSDocCommentsAndTags=function(t){var r;j(t)&&e.hasInitializer(t)&&e.hasJSDocNodes(t.initializer)&&(r=e.addRange(r,t.initializer.jsDoc));for(var n=t;n&&n.parent;){if(e.hasJSDocNodes(n)&&(r=e.addRange(r,n.jsDoc)),149===n.kind){r=e.addRange(r,e.getJSDocParameterTags(n));break}n=pe(n)}return r||e.emptyArray},e.getParameterSymbolFromJSDoc=function(t){if(t.symbol)return t.symbol;if(e.isIdentifier(t.name)){var r=t.name.escapedText,n=fe(t);if(n){var i=e.find(n.parameters,function(e){return 71===e.name.kind&&e.name.escapedText===r});return i&&i.symbol}}},e.getHostSignatureFromJSDoc=fe,e.getHostSignatureFromJSDocHost=me,e.getJSDocHost=ge,e.getTypeParameterFromJsDoc=function(t){var r=t.name.escapedText,n=t.parent.parent.parent.typeParameters;return e.find(n,function(e){return e.name.escapedText===r})},e.hasRestParameter=function(t){var r=e.lastOrUndefined(t.parameters);return!!r&&ye(r)},e.isRestParameter=ye,function(e){e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound"}(e.AssignmentKind||(e.AssignmentKind={})),e.getAssignmentTargetKind=he,e.isAssignmentTarget=function(e){return 0!==he(e)},e.isNodeWithPossibleHoistedDeclaration=function(e){switch(e.kind){case 216:case 217:case 229:case 220:case 230:case 244:case 269:case 270:case 231:case 223:case 224:case 225:case 221:case 222:case 233:case 272:return!0}return!1},e.isValueSignatureDeclaration=function(t){return e.isFunctionExpression(t)||e.isArrowFunction(t)||e.isMethodOrAccessor(t)||e.isFunctionDeclaration(t)||e.isConstructorDeclaration(t)},e.walkUpParenthesizedTypes=function(e){return ve(e,175)},e.walkUpParenthesizedExpressions=be,e.skipParentheses=xe,e.isDeleteTarget=function(e){return(187===e.kind||188===e.kind)&&(e=be(e.parent))&&196===e.kind},e.isNodeDescendantOf=function(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1},e.isDeclarationName=function(t){return!e.isSourceFile(t)&&!e.isBindingPattern(t)&&e.isDeclaration(t.parent)&&t.parent.name===t},e.isAnyDeclarationName=function(t){switch(t.kind){case 71:case 9:case 8:var r=t.parent;if(e.isDeclaration(r))return r.name===t;if(e.isQualifiedName(t.parent)){var n=t.parent.parent;return e.isJSDocParameterTag(n)&&n.name===t.parent}var i=t.parent.parent;return e.isBinaryExpression(i)&&0!==ie(i)&&e.getNameOfDeclaration(i)===t;default:return!1}},e.isLiteralComputedPropertyDeclarationName=function(t){return(9===t.kind||8===t.kind)&&147===t.parent.kind&&e.isDeclaration(t.parent.parent)},e.isIdentifierName=function(e){var t=e.parent;switch(t.kind){case 152:case 151:case 154:case 153:case 156:case 157:case 276:case 273:case 187:return t.name===e;case 146:if(t.right===e){for(;146===t.kind;)t=t.parent;return 165===t.kind||162===t.kind}return!1;case 184:case 251:return t.propertyName===e;case 255:case 265:return!0}return!1},e.isAliasSymbolDeclaration=function(t){return 246===t.kind||245===t.kind||248===t.kind&&!!t.name||249===t.kind||251===t.kind||255===t.kind||252===t.kind&&Se(t)||e.isBinaryExpression(t)&&2===ie(t)},e.exportAssignmentIsAlias=Se,e.getEffectiveBaseTypeNode=De,e.getClassExtendsHeritageElement=ke,e.getClassImplementsHeritageClauseElements=Te,e.getAllSuperTypeNodes=function(t){return e.isInterfaceDeclaration(t)?Ce(t)||e.emptyArray:e.isClassLike(t)&&e.concatenate(e.singleElementArray(De(t)),Te(t))||e.emptyArray},e.getInterfaceBaseTypeNodes=Ce,e.getHeritageClause=Ee,e.tryResolveScriptReference=function(t,r,n){if(!t.getCompilerOptions().noResolve){var i=e.isRootedDiskPath(n.fileName)?n.fileName:e.combinePaths(e.getDirectoryPath(r.fileName),n.fileName);return t.getSourceFile(i)}},e.getAncestor=function(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}},e.isKeyword=Ne,e.isContextualKeyword=Ae,e.isNonContextualKeyword=Pe,e.isStringANonContextualKeyword=function(t){var r=e.stringToToken(t);return void 0!==r&&Pe(r)},e.isTrivia=function(e){return 2<=e&&e<=7},function(e){e[e.Normal=0]="Normal",e[e.Generator=1]="Generator",e[e.Async=2]="Async",e[e.Invalid=4]="Invalid",e[e.AsyncGenerator=3]="AsyncGenerator"}(e.FunctionFlags||(e.FunctionFlags={})),e.getFunctionFlags=function(e){if(!e)return 4;var t=0;switch(e.kind){case 237:case 194:case 154:e.asteriskToken&&(t|=1);case 195:vt(e,256)&&(t|=2)}return e.body||(t|=4),t},e.isAsyncFunction=function(e){switch(e.kind){case 237:case 194:case 195:case 154:return void 0!==e.body&&void 0===e.asteriskToken&&vt(e,256)}return!1},e.isStringOrNumericLiteral=we,e.hasDynamicName=Fe,e.isDynamicName=Ie,e.isWellKnownSymbolSyntactically=Oe,e.getPropertyNameForPropertyNameNode=Me,e.isPropertyNameLiteral=function(e){switch(e.kind){case 71:case 9:case 13:case 8:return!0;default:return!1}},e.getTextOfIdentifierOrLiteral=function(t){return 71===t.kind?e.idText(t):t.text},e.getEscapedTextOfIdentifierOrLiteral=function(e){return 71===e.kind?e.escapedText:x(e.text)},e.getPropertyNameForKnownSymbolName=Le,e.isKnownSymbol=function(t){return e.startsWith(t.escapedName,"__@")},e.isESSymbolIdentifier=Re,e.isPushOrUnshiftIdentifier=function(e){return"push"===e.escapedText||"unshift"===e.escapedText},e.isParameterDeclaration=function(e){return 149===Be(e).kind},e.getRootDeclaration=Be,e.nodeStartsNewLexicalEnvironment=function(e){var t=e.kind;return 155===t||194===t||237===t||195===t||154===t||156===t||157===t||242===t||277===t},e.nodeIsSynthesized=je,e.getOriginalSourceFile=function(t){return e.getParseTreeNode(t,e.isSourceFile)||t},function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(e.Associativity||(e.Associativity={})),e.getExpressionAssociativity=function(e){var t=ze(e),r=190===e.kind&&void 0!==e.arguments;return Je(e.kind,t,r)},e.getOperatorAssociativity=Je,e.getExpressionPrecedence=function(e){var t=ze(e),r=190===e.kind&&void 0!==e.arguments;return Ke(e.kind,t,r)},e.getOperator=ze,e.getOperatorPrecedence=Ke,e.getBinaryOperatorPrecedence=Ue,e.createDiagnosticCollection=function(){var t=[],r=[],n=e.createMap(),i=!1;return{add:function(a){var o;a.file?(o=n.get(a.file.fileName))||(o=[],n.set(a.file.fileName,o),e.insertSorted(r,a.file.fileName,e.compareStringsCaseSensitive)):(i&&(i=!1,t=t.slice()),o=t),e.insertSorted(o,a,e.compareDiagnostics)},lookup:function(r){var i;if(i=r.file?n.get(r.file.fileName):t){var a=e.binarySearch(i,r,e.identity,e.compareDiagnosticsSkipRelatedInformation);return a>=0?i[a]:void 0}},getGlobalDiagnostics:function(){return i=!0,t},getDiagnostics:function(i){if(i)return n.get(i)||[];var a=e.flatMap(r,function(e){return n.get(e)});return t.length?(a.unshift.apply(a,t),a):a},reattachFileDiagnostics:function(t){e.forEach(n.get(t.fileName),function(e){return e.file=t})}}};var qe=/[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,Ve=/[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,We=/[\\\`\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,He=e.createMapFromTemplate({"\t":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","…":"\\u0085"});function Ge(e,t){var r=96===t?We:39===t?Ve:qe;return e.replace(r,Xe)}function Xe(e,t,r){if(0===e.charCodeAt(0)){var n=r.charCodeAt(t+e.length);return n>=48&&n<=57?"\\x00":"\\0"}return He.get(e)||Qe(e.charCodeAt(0))}function Qe(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}e.escapeString=Ge,e.isIntrinsicJsxName=function(e){var t=e.charCodeAt(0);return t>=97&&t<=122||e.indexOf("-")>-1};var Ye=/[^\u0000-\u007F]/g;function $e(e,t){return e=Ge(e,t),Ye.test(e)?e.replace(Ye,function(e){return Qe(e.charCodeAt(0))}):e}e.escapeNonAsciiString=$e;var Ze=[""," "];function et(e){return void 0===Ze[e]&&(Ze[e]=et(e-1)+Ze[1]),Ze[e]}function tt(){return Ze[1].length}function rt(e,t,r){return t.moduleName||nt(e,t.fileName,r&&r.fileName)}function nt(t,r,n){var a=function(e){return t.getCanonicalFileName(e)},o=i(n?e.getDirectoryPath(n):t.getCommonSourceDirectory(),t.getCurrentDirectory(),a),s=e.getNormalizedAbsolutePath(r,t.getCurrentDirectory()),c=e.getRelativePathToDirectoryOrUrl(o,s,o,a,!1),u=e.removeFileExtension(c);return n?e.ensurePathIsNonModuleName(u):u}function it(e,t,r){return!(t.noEmitForJsFiles&&Z(e)||e.isDeclarationFile||r(e))}function at(e,t,r){return ot(e,r,t.getCurrentDirectory(),t.getCommonSourceDirectory(),function(e){return t.getCanonicalFileName(e)})}function ot(t,r,n,i,a){var o=e.getNormalizedAbsolutePath(t,n);return o=0===a(o).indexOf(a(i))?o.substring(i.length):o,e.combinePaths(r,o)}function st(t,r){return e.getLineAndCharacterOfPosition(t,r).line}function ct(t,r){return e.computeLineAndCharacterOfPosition(t,r).line}function ut(e){if(e&&e.parameters.length>0){var t=2===e.parameters.length&<(e.parameters[0]);return e.parameters[t?1:0]}}function lt(e){return _t(e.name)}function _t(e){return!!e&&71===e.kind&&dt(e)}function dt(e){return 99===e.originalKeywordKind}function pt(t){return t.type||(ee(t)?e.getJSDocType(t):void 0)}function ft(e,t,r,n){mt(e,t,r.pos,n)}function mt(e,t,r,n){n&&n.length&&r!==n[0].pos&&ct(e,r)!==ct(e,n[0].pos)&&t.writeLine()}function gt(e,t,r,n,i,a,o,s){if(n&&n.length>0){i&&r.write(" ");for(var c=!1,u=0,l=n;u=58&&e<=70}function Et(t){if(e.isExpressionWithTypeArguments(t)&&85===t.parent.token&&e.isClassLike(t.parent.parent))return t.parent.parent}function Nt(t,r){return e.isBinaryExpression(t)&&(r?58===t.operatorToken.kind:Ct(t.operatorToken.kind))&&e.isLeftHandSideExpression(t.left)}function At(e){return void 0!==Et(e)}function Pt(e){return 71===e.kind||wt(e)}function wt(t){return e.isPropertyAccessExpression(t)&&Pt(t.expression)}function Ft(t){return e.isPropertyAccessExpression(t)&&"prototype"===t.name.escapedText}e.getIndentString=et,e.getIndentSize=tt,e.createTextWriter=function(t){var r,n,i,a,o;function s(t){var n=e.computeLineStarts(t);n.length>1?(a=a+n.length-1,o=r.length-t.length+e.last(n),i=o-r.length==0):i=!1}function c(e){e&&e.length&&(i&&(e=et(n)+e,i=!1),r+=e,s(e))}function u(){r="",n=0,i=!0,a=0,o=0}return u(),{write:c,rawWrite:function(e){void 0!==e&&(r+=e,s(e))},writeTextOfNode:function(e,t){var r=y(e,t);c(r),s(r)},writeLiteral:function(e){e&&e.length&&c(e)},writeLine:function(){i||(a++,o=(r+=t).length,i=!0)},increaseIndent:function(){n++},decreaseIndent:function(){n--},getIndent:function(){return n},getTextPos:function(){return r.length},getLine:function(){return a},getColumn:function(){return i?n*tt():r.length-o},getText:function(){return r},isAtStartOfLine:function(){return i},clear:u,reportInaccessibleThisError:e.noop,reportPrivateInBaseOfClassExpression:e.noop,reportInaccessibleUniqueSymbolError:e.noop,trackSymbol:e.noop,writeKeyword:c,writeOperator:c,writeParameter:c,writeProperty:c,writePunctuation:c,writeSpace:c,writeStringLiteral:c,writeSymbol:c}},e.getResolvedExternalModuleName=rt,e.getExternalModuleNameFromDeclaration=function(e,t,r){var n=t.getExternalModuleFileFromDeclaration(r);if(n&&!n.isDeclarationFile)return rt(e,n)},e.getExternalModuleNameFromPath=nt,e.getOwnEmitOutputFilePath=function(t,r,n){var i=r.getCompilerOptions();return(i.outDir?e.removeFileExtension(at(t,r,i.outDir)):e.removeFileExtension(t))+n},e.getDeclarationEmitOutputFilePath=function(t,r){var n=r.getCompilerOptions(),i=n.declarationDir||n.outDir,a=i?at(t,r,i):t;return e.removeFileExtension(a)+".d.ts"},e.getDeclarationEmitOutputFilePathWorker=function(t,r,n,i,a){var o=r.declarationDir||r.outDir,s=o?ot(t,o,n,i,a):t;return e.removeFileExtension(s)+".d.ts"},e.getSourceFilesToEmit=function(t,r){var n=t.getCompilerOptions(),i=function(e){return t.isSourceFileFromExternalLibrary(e)};if(n.outFile||n.out){var a=e.getEmitModuleKind(n),o=a===e.ModuleKind.AMD||a===e.ModuleKind.System;return e.filter(t.getSourceFiles(),function(t){return(o||!e.isExternalModule(t))&&it(t,n,i)})}var s=void 0===r?t.getSourceFiles():[r];return e.filter(s,function(e){return it(e,n,i)})},e.sourceFileMayBeEmitted=it,e.getSourceFilePathInNewDir=at,e.getSourceFilePathInNewDirWorker=ot,e.writeFile=function(t,r,n,i,a,o){t.writeFile(n,i,a,function(t){r.add(e.createCompilerDiagnostic(e.Diagnostics.Could_not_write_file_0_Colon_1,n,t))},o)},e.getLineOfLocalPosition=st,e.getLineOfLocalPositionFromLineMap=ct,e.getFirstConstructorWithBody=function(t){return e.find(t.members,function(t){return e.isConstructorDeclaration(t)&&d(t.body)})},e.getSetAccessorTypeAnnotationNode=function(e){var t=ut(e);return t&&t.type},e.getThisParameter=function(t){if(t.parameters.length&&!e.isJSDocSignature(t)){var r=t.parameters[0];if(lt(r))return r}},e.parameterIsThisKeyword=lt,e.isThisIdentifier=_t,e.identifierIsThisKeyword=dt,e.getAllAccessorDeclarations=function(t,r){var n,i,a,o;return Fe(r)?(n=r,156===r.kind?a=r:157===r.kind?o=r:e.Debug.fail("Accessor has wrong kind")):e.forEach(t,function(e){156!==e.kind&&157!==e.kind||vt(e,32)!==vt(r,32)||Me(e.name)===Me(r.name)&&(n?i||(i=e):n=e,156!==e.kind||a||(a=e),157!==e.kind||o||(o=e))}),{firstAccessor:n,secondAccessor:i,getAccessor:a,setAccessor:o}},e.getEffectiveTypeAnnotationNode=pt,e.getTypeAnnotationNode=function(e){return e.type},e.getEffectiveReturnTypeNode=function(t){return e.isJSDocSignature(t)?t.type&&t.type.typeExpression&&t.type.typeExpression.type:t.type||(ee(t)?e.getJSDocReturnType(t):void 0)},e.getJSDocTypeParameterDeclarations=function(t){return e.flatMap(e.getJSDocTags(t),function(t){return function(t){return e.isJSDocTemplateTag(t)&&!(289===t.parent.kind&&t.parent.tags.some(ce))}(t)?t.typeParameters:void 0})},e.getEffectiveSetAccessorTypeAnnotationNode=function(e){var t=ut(e);return t&&pt(t)},e.emitNewLineBeforeLeadingComments=ft,e.emitNewLineBeforeLeadingCommentsOfPosition=mt,e.emitNewLineBeforeLeadingCommentOfPosition=function(e,t,r,n){r!==n&&ct(e,r)!==ct(e,n)&&t.writeLine()},e.emitComments=gt,e.emitDetachedComments=function(t,r,n,i,a,o,s){var c,u;if(s?0===a.pos&&(c=e.filter(e.getLeadingCommentRanges(t,a.pos),function(e){return f(t,e.pos)})):c=e.getLeadingCommentRanges(t,a.pos),c){for(var l=[],_=void 0,d=0,p=c;d=g+2)break}l.push(m),_=m}l.length&&(g=ct(r,e.last(l).end),ct(r,e.skipTrivia(t,a.pos))>=g+2&&(ft(r,n,a,c),gt(t,r,n,l,!1,!0,o,i),u={nodePos:a.pos,detachedCommentEndPos:e.last(l).end}))}return u},e.writeCommentRange=function(t,r,n,i,a,o){if(42===t.charCodeAt(i+1))for(var s=e.computeLineAndCharacterOfPosition(r,i),c=r.length,u=void 0,l=i,_=s.line;l0){var f=p%tt(),m=et((p-f)/tt());for(n.rawWrite(m);f;)n.rawWrite(" "),f--}else n.rawWrite("")}yt(t,a,n,o,l,d),l=d}else n.write(t.substring(i,a))},e.hasModifiers=function(e){return 0!==Dt(e)},e.hasModifier=vt,e.hasStaticModifier=bt,e.hasReadonlyModifier=xt,e.getSelectedModifierFlags=St,e.getModifierFlags=Dt,e.getModifierFlagsNoCache=kt,e.modifierToFlag=Tt,e.isLogicalOperator=function(e){return 54===e||53===e||51===e},e.isAssignmentOperator=Ct,e.tryGetClassExtendingExpressionWithTypeArguments=Et,e.isAssignmentExpression=Nt,e.isDestructuringAssignment=function(e){if(Nt(e,!0)){var t=e.left.kind;return 186===t||185===t}return!1},e.isExpressionWithTypeArgumentsInClassExtendsClause=At,e.isExpressionWithTypeArgumentsInClassImplementsClause=function(t){return 209===t.kind&&Pt(t.expression)&&t.parent&&108===t.parent.token&&t.parent.parent&&e.isClassLike(t.parent.parent)},e.isEntityNameExpression=Pt,e.isPropertyAccessEntityNameExpression=wt,e.isPrototypeAccess=Ft,e.isRightSideOfQualifiedNameOrPropertyAccess=function(e){return 146===e.parent.kind&&e.parent.right===e||187===e.parent.kind&&e.parent.name===e},e.isEmptyObjectLiteral=function(e){return 186===e.kind&&0===e.properties.length},e.isEmptyArrayLiteral=function(e){return 185===e.kind&&0===e.elements.length},e.getLocalSymbolForExportDefault=function(t){return function(t){return t&&e.length(t.declarations)>0&&vt(t.declarations[0],512)}(t)?t.declarations[0].localSymbol:void 0},e.tryExtractTypeScriptExtension=function(t){return e.find(e.supportedTypescriptExtensionsForExtractExtension,function(r){return e.fileExtensionIs(t,r)})};var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Ot(t){for(var r,n,i,a,o="",s=function(t){for(var r=[],n=t.length,i=0;i>6|192),r.push(63&a|128)):a<65536?(r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)):a<131072?(r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)):e.Debug.assert(!1,"Unexpected code point")}return r}(t),c=0,u=s.length;c>2,n=(3&s[c])<<4|s[c+1]>>4,i=(15&s[c+1])<<2|s[c+2]>>6,a=63&s[c+2],c+1>=u?i=a=64:c+2>=u&&(a=64),o+=It.charAt(r)+It.charAt(n)+It.charAt(i)+It.charAt(a),c+=3;return o}e.convertToBase64=Ot,e.base64encode=function(e,t){return e&&e.base64encode?e.base64encode(t):Ot(t)},e.base64decode=function(e,t){if(e&&e.base64decode)return e.base64decode(t);for(var r=t.length,n=[],i=0;i>4&3,l=(15&o)<<4|s>>2&15,_=(3&s)<<6|63&c;0===l&&0!==s?n.push(u):0===_&&0!==c?n.push(u,l):n.push(u,l,_),i+=4}return function(e){for(var t="",r=0,n=e.length;r0&&0===i[0][0]?i[0][1]:"0";if(n){for(var a="",o=t,s=i.length-1;s>=0&&0!==o;s--){var c=i[s],u=c[0],l=c[1];0!==u&&(o&u)===u&&(o&=~u,a=l+(a?", ":"")+a)}if(0===o)return a}else for(var _=0,d=i;_0?Jt(e,e.decorators.end):e}function Kt(e,t,r){return Ut(qt(e,r),t.end,r)}function Ut(e,t,r){return e===t||st(r,e)===st(r,t)}function qt(t,r){return e.positionIsSynthesized(t.pos)?-1:e.skipTrivia(r.text,t.pos)}function Vt(e){return void 0!==e.initializer}function Wt(e){return 33554432&e.flags?e.checkFlags:0}function Ht(e){var t=e.parent;if(!t)return 0;switch(t.kind){case 201:case 200:var r=t.operator;return 43===r||44===r?o():0;case 202:var n=t,i=n.left,a=n.operatorToken;return i===e&&Ct(a.kind)?o():0;case 187:return t.name!==e?0:Ht(t);default:return 0}function o(){return t.parent&&219===t.parent.kind?1:2}}function Gt(t,r){for(;;){var n=r(t);if(void 0!==n)return n;var i=e.getDirectoryPath(t);if(i===t)return;t=i}}function Xt(e){if(32&e.flags){var t=Qt(e);return!!t&&vt(t,128)}return!1}function Qt(t){return e.find(t.declarations,e.isClassLike)}function Yt(e){return 131072&e.flags?e.objectFlags:0}e.getNewLineCharacter=function(t,r){switch(t.newLine){case 0:return Lt;case 1:return Rt}return r?r():e.sys?e.sys.newLine:Lt},e.formatSyntaxKind=function(t){return Bt(t,e.SyntaxKind,!1)},e.formatModifierFlags=function(t){return Bt(t,e.ModifierFlags,!0)},e.formatTransformFlags=function(t){return Bt(t,e.TransformFlags,!0)},e.formatEmitFlags=function(t){return Bt(t,e.EmitFlags,!0)},e.formatSymbolFlags=function(t){return Bt(t,e.SymbolFlags,!0)},e.formatTypeFlags=function(t){return Bt(t,e.TypeFlags,!0)},e.formatObjectFlags=function(t){return Bt(t,e.ObjectFlags,!0)},e.createRange=jt,e.moveRangeEnd=function(e,t){return jt(e.pos,t)},e.moveRangePos=Jt,e.moveRangePastDecorators=zt,e.moveRangePastModifiers=function(e){return e.modifiers&&e.modifiers.length>0?Jt(e,e.modifiers.end):zt(e)},e.isCollapsedRange=function(e){return e.pos===e.end},e.createTokenRange=function(t,r){return jt(t,t+e.tokenToString(r).length)},e.rangeIsOnSingleLine=function(e,t){return Kt(e,e,t)},e.rangeStartPositionsAreOnSameLine=function(e,t,r){return Ut(qt(e,r),qt(t,r),r)},e.rangeEndPositionsAreOnSameLine=function(e,t,r){return Ut(e.end,t.end,r)},e.rangeStartIsOnSameLineAsRangeEnd=Kt,e.rangeEndIsOnSameLineAsRangeStart=function(e,t,r){return Ut(e.end,qt(t,r),r)},e.positionsAreOnSameLine=Ut,e.getStartPositionOfRange=qt,e.isDeclarationNameOfEnumOrNamespace=function(t){var r=e.getParseTreeNode(t);if(r)switch(r.parent.kind){case 241:case 242:return r===r.parent.name}return!1},e.getInitializedVariables=function(t){return e.filter(t.declarations,Vt)},e.isWatchSet=function(e){return e.watch&&e.hasOwnProperty("watch")},e.closeFileWatcher=function(e){e.close()},e.getCheckFlags=Wt,e.getDeclarationModifierFlagsFromSymbol=function(t){if(t.valueDeclaration){var r=e.getCombinedModifierFlags(t.valueDeclaration);return t.parent&&32&t.parent.flags?r:-29&r}if(6&Wt(t)){var n=t.checkFlags;return(256&n?8:64&n?4:16)|(512&n?32:0)}return 4194304&t.flags?36:0},e.skipAlias=function(e,t){return 2097152&e.flags?t.getAliasedSymbol(e):e},e.getCombinedLocalAndExportSymbolFlags=function(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags},e.isWriteOnlyAccess=function(e){return 1===Ht(e)},e.isWriteAccess=function(e){return 0!==Ht(e)},function(e){e[e.Read=0]="Read",e[e.Write=1]="Write",e[e.ReadWrite=2]="ReadWrite"}(Mt||(Mt={})),e.compareDataObjects=function e(t,r){if(!t||!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(var n in t)if("object"===p(t[n])){if(!e(t[n],r[n]))return!1}else if("function"!=typeof t[n]&&t[n]!==r[n])return!1;return!0},e.clearMap=function(e,t){e.forEach(t),e.clear()},e.mutateMap=function(e,t,r){var n=r.createNewValue,i=r.onDeleteValue,a=r.onExistingValue;e.forEach(function(r,n){var o=t.get(n);void 0===o?(e.delete(n),i(r,n)):a&&a(r,o,n)}),t.forEach(function(t,r){e.has(r)||e.set(r,n(r,t))})},e.forEachAncestorDirectory=Gt,e.isAbstractConstructorType=function(e){return!!(16&Yt(e))&&!!e.symbol&&Xt(e.symbol)},e.isAbstractConstructorSymbol=Xt,e.getClassLikeDeclarationOfSymbol=Qt,e.getObjectFlags=Yt,e.typeHasCallOrConstructSignatures=function(e,t){return 0!==t.getSignaturesOfType(e,0).length||0!==t.getSignaturesOfType(e,1).length},e.forSomeAncestorDirectory=function(e,t){return!!Gt(e,function(e){return!!t(e)||void 0})},e.isUMDExportSymbol=function(t){return!!t&&!!t.declarations&&!!t.declarations[0]&&e.isNamespaceExportDeclaration(t.declarations[0])},e.showModuleSpecifier=function(t){var r=t.moduleSpecifier;return e.isStringLiteral(r)?r.text:h(r)},e.getLastChild=function(t){var r;return e.forEachChild(t,function(e){d(e)&&(r=e)},function(e){for(var t=e.length-1;t>=0;t--)if(d(e[t])){r=e[t];break}}),r},e.addToSeen=function(e,t,r){return void 0===r&&(r=!0),t=String(t),!e.has(t)&&(e.set(t,r),!0)},e.isObjectTypeDeclaration=function(t){return e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isTypeLiteralNode(t)}}(s||(s={})),function(e){function t(e){return e.start+e.length}function r(e){return 0===e.length}function n(e,t){var r=a(e,t);return r&&0===r.length?void 0:r}function i(e,t,r,n){return r<=e+t&&r+n>=e}function a(e,r){var n=Math.max(e.start,r.start),i=Math.min(t(e),t(r));return n<=i?s(n,i):void 0}function o(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function s(e,t){return o(e,t-e)}function c(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function u(t){return!!e.isBindingPattern(t)&&e.every(t.elements,l)}function l(t){return!!e.isOmittedExpression(t)||u(t.name)}function _(t){for(var r=t.parent;e.isBindingElement(r.parent);)r=r.parent.parent;return r.parent}function d(t,r){e.isBindingElement(t)&&(t=_(t));var n=r(t);return 235===t.kind&&(t=t.parent),t&&236===t.kind&&(n|=r(t),t=t.parent),t&&217===t.kind&&(n|=r(t)),n}function p(e,t){if(e)for(;void 0!==e.original;)e=e.original;return!t||t(e)?e:void 0}function f(e){return 0==(8&e.flags)}function m(e){var t=e;return t.length>=3&&95===t.charCodeAt(0)&&95===t.charCodeAt(1)&&95===t.charCodeAt(2)?t.substr(1):t}function g(t){var r=v(t);return r&&e.isIdentifier(r)?r:void 0}function y(t){return t.name||function(t){var r=t.parent.parent;if(r){if(e.isDeclaration(r))return g(r);switch(r.kind){case 217:return r.declarationList&&r.declarationList.declarations[0]?g(r.declarationList.declarations[0]):void 0;case 219:var n=r.expression;switch(n.kind){case 187:return n.name;case 188:var i=n.argumentExpression;if(e.isIdentifier(i))return i}return;case 1:return;case 193:return g(r.expression);case 231:return e.isDeclaration(r.statement)||e.isExpression(r.statement)?g(r.statement):void 0;default:e.Debug.assertNever(r,"Found typedef tag attached to node which it should not be!")}}}(t)}function h(t){switch(t.kind){case 71:return t;case 302:case 296:var r=t.name;if(146===r.kind)return r.right;break;case 202:var n=t;switch(e.getSpecialPropertyAssignmentKind(n)){case 1:case 4:case 5:case 3:return n.left.name;default:return}case 301:return y(t);case 252:var i=t.expression;return e.isIdentifier(i)?i:void 0}return t.name}function v(t){if(void 0!==t)return h(t)||(e.isFunctionExpression(t)||e.isClassExpression(t)?function(t){if(!t.parent)return;if(e.isPropertyAssignment(t.parent)||e.isBindingElement(t.parent))return t.parent.name;if(e.isBinaryExpression(t.parent)&&t===t.parent.right){if(e.isIdentifier(t.parent.left))return t.parent.left;if(e.isPropertyAccessExpression(t.parent.left))return t.parent.left.name}}(t):void 0)}function b(t){if(t.name){if(e.isIdentifier(t.name)){var r=t.name.escapedText;return D(t.parent).filter(function(t){return e.isJSDocParameterTag(t)&&e.isIdentifier(t.name)&&t.name.escapedText===r})}var n=t.parent.parameters.indexOf(t);e.Debug.assert(n>-1,"Parameters should always be in their parents' parameter list");var i=D(t.parent).filter(e.isJSDocParameterTag);if(n=e.start&&r=e.pos&&t<=e.end},e.textSpanContainsTextSpan=function(e,r){return r.start>=e.start&&t(r)<=t(e)},e.textSpanOverlapsWith=function(e,t){return void 0!==n(e,t)},e.textSpanOverlap=n,e.textSpanIntersectsWithTextSpan=function(e,t){return i(e.start,e.length,t.start,t.length)},e.textSpanIntersectsWith=function(e,t,r){return i(e.start,e.length,t,r)},e.decodedTextSpanIntersectsWith=i,e.textSpanIntersectsWithPosition=function(e,r){return r<=t(e)&&r>=e.start},e.textSpanIntersection=a,e.createTextSpan=o,e.createTextRange=function(t,r){return void 0===r&&(r=t),e.Debug.assert(r>=t),{pos:t,end:r}},e.createTextSpanFromBounds=s,e.textChangeRangeNewSpan=function(e){return o(e.span.start,e.newLength)},e.textChangeRangeIsUnchanged=function(e){return r(e.span)&&0===e.newLength},e.createTextChangeRange=c,e.unchangedTextChangeRange=c(o(0,0),0),e.collapseTextChangeRangesAcrossMultipleVersions=function(r){if(0===r.length)return e.unchangedTextChangeRange;if(1===r.length)return r[0];for(var n=r[0],i=n.span.start,a=t(n.span),o=i+n.newLength,u=1;u=146}function r(e){return 8<=e&&e<=13}function n(e){return 13<=e&&e<=16}function i(e){switch(e){case 117:case 120:case 76:case 124:case 79:case 84:case 114:case 112:case 113:case 132:case 115:return!0}return!1}function a(t){return!!(92&e.modifierToFlag(t))}function o(e){return e&&c(e.kind)}function s(e){switch(e){case 237:case 154:case 155:case 156:case 157:case 194:case 195:return!0;default:return!1}}function c(e){switch(e){case 153:case 158:case 291:case 159:case 160:case 163:case 287:case 164:return!0;default:return s(e)}}function u(e){var t=e.kind;return 155===t||152===t||154===t||156===t||157===t||160===t||215===t}function l(e){var t=e.kind;return 159===t||158===t||151===t||153===t||160===t}function _(e){switch(e.kind){case 182:case 186:return!0}return!1}function d(e){switch(e.kind){case 183:case 185:return!0}return!1}function p(e){switch(e){case 187:case 188:case 190:case 189:case 258:case 259:case 262:case 191:case 185:case 193:case 186:case 207:case 194:case 71:case 12:case 8:case 9:case 13:case 204:case 86:case 95:case 99:case 101:case 97:case 211:case 212:case 91:return!0;default:return!1}}function f(e){switch(e){case 200:case 201:case 196:case 197:case 198:case 199:case 192:return!0;default:return p(e)}}function m(t){return function(e){switch(e){case 203:case 205:case 195:case 202:case 206:case 210:case 208:case 306:case 305:return!0;default:return f(e)}}(e.skipPartiallyEmittedExpressions(t).kind)}function g(e){return 305===e.kind}function y(e){return 304===e.kind}function h(e){return 237===e||256===e||238===e||239===e||240===e||241===e||242===e||247===e||246===e||253===e||252===e||245===e}function v(e){return 227===e||226===e||234===e||221===e||219===e||218===e||224===e||225===e||223===e||220===e||231===e||228===e||230===e||232===e||233===e||217===e||222===e||229===e||304===e||308===e||307===e}function b(e){return e.kind>=292&&e.kind<=302}function x(e){return!!e.initializer}e.isSyntaxList=function(e){return 303===e.kind},e.isNode=function(e){return t(e.kind)},e.isNodeKind=t,e.isToken=function(e){return e.kind>=0&&e.kind<=145},e.isNodeArray=function(e){return e.hasOwnProperty("pos")&&e.hasOwnProperty("end")},e.isLiteralKind=r,e.isLiteralExpression=function(e){return r(e.kind)},e.isTemplateLiteralKind=n,e.isTemplateLiteralToken=function(e){return n(e.kind)},e.isTemplateMiddleOrTemplateTail=function(e){var t=e.kind;return 15===t||16===t},e.isStringTextContainingNode=function(e){return 9===e.kind||n(e.kind)},e.isGeneratedIdentifier=function(t){return e.isIdentifier(t)&&(7&t.autoGenerateFlags)>0},e.isModifierKind=i,e.isParameterPropertyModifier=a,e.isClassMemberModifier=function(e){return a(e)||115===e},e.isModifier=function(e){return i(e.kind)},e.isEntityName=function(e){var t=e.kind;return 146===t||71===t},e.isPropertyName=function(e){var t=e.kind;return 71===t||9===t||8===t||147===t},e.isBindingName=function(e){var t=e.kind;return 71===t||182===t||183===t},e.isFunctionLike=o,e.isFunctionLikeDeclaration=function(e){return e&&s(e.kind)},e.isFunctionLikeKind=c,e.isFunctionOrModuleBlock=function(t){return e.isSourceFile(t)||e.isModuleBlock(t)||e.isBlock(t)&&o(t.parent)},e.isClassElement=u,e.isClassLike=function(e){return e&&(238===e.kind||207===e.kind)},e.isAccessor=function(e){return e&&(156===e.kind||157===e.kind)},e.isMethodOrAccessor=function(e){switch(e.kind){case 154:case 156:case 157:return!0;default:return!1}},e.isTypeElement=l,e.isClassOrTypeElement=function(e){return l(e)||u(e)},e.isObjectLiteralElementLike=function(e){var t=e.kind;return 273===t||274===t||275===t||154===t||156===t||157===t},e.isTypeNode=function(e){return(t=e.kind)>=161&&t<=181||119===t||142===t||134===t||135===t||122===t||137===t||138===t||99===t||105===t||140===t||95===t||131===t||209===t||282===t||283===t||284===t||285===t||286===t||287===t||288===t;var t},e.isFunctionOrConstructorTypeNode=function(e){switch(e.kind){case 163:case 164:return!0}return!1},e.isBindingPattern=function(e){if(e){var t=e.kind;return 183===t||182===t}return!1},e.isAssignmentPattern=function(e){var t=e.kind;return 185===t||186===t},e.isArrayBindingElement=function(e){var t=e.kind;return 184===t||208===t},e.isDeclarationBindingElement=function(e){switch(e.kind){case 235:case 149:case 184:return!0}return!1},e.isBindingOrAssignmentPattern=function(e){return _(e)||d(e)},e.isObjectBindingOrAssignmentPattern=_,e.isArrayBindingOrAssignmentPattern=d,e.isPropertyAccessOrQualifiedNameOrImportTypeNode=function(e){var t=e.kind;return 187===t||146===t||181===t},e.isPropertyAccessOrQualifiedName=function(e){var t=e.kind;return 187===t||146===t},e.isCallLikeExpression=function(e){switch(e.kind){case 260:case 259:case 189:case 190:case 191:case 150:return!0;default:return!1}},e.isCallOrNewExpression=function(e){return 189===e.kind||190===e.kind},e.isTemplateLiteral=function(e){var t=e.kind;return 204===t||13===t},e.isLeftHandSideExpression=function(t){return p(e.skipPartiallyEmittedExpressions(t).kind)},e.isUnaryExpression=function(t){return f(e.skipPartiallyEmittedExpressions(t).kind)},e.isUnaryExpressionWithWrite=function(e){switch(e.kind){case 201:return!0;case 200:return 43===e.operator||44===e.operator;default:return!1}},e.isExpression=m,e.isAssertionExpression=function(e){var t=e.kind;return 192===t||210===t},e.isPartiallyEmittedExpression=g,e.isNotEmittedStatement=y,e.isNotEmittedOrPartiallyEmittedNode=function(e){return y(e)||g(e)},e.isIterationStatement=function e(t,r){switch(t.kind){case 223:case 224:case 225:case 221:case 222:return!0;case 231:return r&&e(t.statement,r)}return!1},e.isForInOrOfStatement=function(e){return 224===e.kind||225===e.kind},e.isConciseBody=function(t){return e.isBlock(t)||m(t)},e.isFunctionBody=function(t){return e.isBlock(t)},e.isForInitializer=function(t){return e.isVariableDeclarationList(t)||m(t)},e.isModuleBody=function(e){var t=e.kind;return 243===t||242===t||71===t},e.isNamespaceBody=function(e){var t=e.kind;return 243===t||242===t},e.isJSDocNamespaceBody=function(e){var t=e.kind;return 71===t||242===t},e.isNamedImportBindings=function(e){var t=e.kind;return 250===t||249===t},e.isModuleOrEnumDeclaration=function(e){return 242===e.kind||241===e.kind},e.isDeclaration=function(t){return 148===t.kind?300!==t.parent.kind||e.isInJavaScriptFile(t):195===(r=t.kind)||184===r||238===r||207===r||155===r||241===r||276===r||255===r||237===r||194===r||156===r||248===r||246===r||251===r||239===r||265===r||154===r||153===r||242===r||245===r||249===r||149===r||273===r||152===r||151===r||157===r||274===r||240===r||148===r||235===r||301===r||295===r||302===r;var r},e.isDeclarationStatement=function(e){return h(e.kind)},e.isStatementButNotDeclaration=function(e){return v(e.kind)},e.isStatement=function(t){var r=t.kind;return v(r)||h(r)||function(t){return 216===t.kind&&((void 0===t.parent||233!==t.parent.kind&&272!==t.parent.kind)&&!e.isFunctionBlock(t))}(t)},e.isModuleReference=function(e){var t=e.kind;return 257===t||146===t||71===t},e.isJsxTagNameExpression=function(e){var t=e.kind;return 99===t||71===t||187===t},e.isJsxChild=function(e){var t=e.kind;return 258===t||268===t||259===t||10===t||262===t},e.isJsxAttributeLike=function(e){var t=e.kind;return 265===t||267===t},e.isStringLiteralOrJsxExpression=function(e){var t=e.kind;return 9===t||268===t},e.isJsxOpeningLikeElement=function(e){var t=e.kind;return 260===t||259===t},e.isCaseOrDefaultClause=function(e){var t=e.kind;return 269===t||270===t},e.isJSDocNode=function(e){return e.kind>=281&&e.kind<=302},e.isJSDocCommentContainingNode=function(t){return 289===t.kind||b(t)||e.isJSDocTypeLiteral(t)||e.isJSDocSignature(t)},e.isJSDocTag=b,e.isSetAccessor=function(e){return 157===e.kind},e.isGetAccessor=function(e){return 156===e.kind},e.hasJSDocNodes=function(e){var t=e.jsDoc;return!!t&&t.length>0},e.hasType=function(e){return!!e.type},e.hasInitializer=x,e.hasOnlyExpressionInitializer=function(t){return x(t)&&!e.isForStatement(t)&&!e.isForInStatement(t)&&!e.isForOfStatement(t)&&!e.isJsxAttribute(t)},e.isObjectLiteralElement=function(e){switch(e.kind){case 265:case 267:case 273:case 274:case 154:case 156:case 157:return!0;default:return!1}},e.isTypeReferenceType=function(e){return 162===e.kind||209===e.kind};var S=1073741823;e.guessIndentation=function(t){for(var r=S,n=0,i=t;n=2?e.ModuleKind.ES2015:e.ModuleKind.CommonJS}function p(e){return!(!e.declaration&&!e.composite)}e.isNamedImportsOrExports=function(e){return 250===e.kind||254===e.kind},e.objectAllocator={getNodeConstructor:function(){return i},getTokenConstructor:function(){return i},getIdentifierConstructor:function(){return i},getSourceFileConstructor:function(){return i},getSymbolConstructor:function(){return t},getTypeConstructor:function(){return r},getSignatureConstructor:function(){return n},getSourceMapSourceConstructor:function(){return a}},e.formatStringFromArgs=o,e.getLocaleSpecificMessage=s,e.createFileDiagnostic=function(t,r,n,i){e.Debug.assertGreaterThanOrEqual(r,0),e.Debug.assertGreaterThanOrEqual(n,0),t&&(e.Debug.assertLessThanOrEqual(r,t.text.length),e.Debug.assertLessThanOrEqual(r+n,t.text.length));var a=s(i);return arguments.length>4&&(a=o(a,arguments,4)),{file:t,start:r,length:n,messageText:a,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary}},e.formatMessage=function(e,t){var r=s(t);return arguments.length>2&&(r=o(r,arguments,2)),r},e.createCompilerDiagnostic=function(e){var t=s(e);return arguments.length>1&&(t=o(t,arguments,1)),{file:void 0,start:void 0,length:void 0,messageText:t,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary}},e.createCompilerDiagnosticFromMessageChain=function(e){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText}},e.chainDiagnosticMessages=function(e,t){var r=s(t);return arguments.length>2&&(r=o(r,arguments,2)),{messageText:r,category:t.category,code:t.code,next:e}},e.concatenateDiagnosticMessageChains=function(e,t){for(var r=e;r.next;)r=r.next;return r.next=t,e},e.compareDiagnostics=u,e.compareDiagnosticsSkipRelatedInformation=l,e.getEmitScriptTarget=_,e.getEmitModuleKind=d,e.getEmitModuleResolutionKind=function(t){var r=t.moduleResolution;return void 0===r&&(r=d(t)===e.ModuleKind.CommonJS?e.ModuleResolutionKind.NodeJs:e.ModuleResolutionKind.Classic),r},e.unreachableCodeIsError=function(e){return!1===e.allowUnreachableCode},e.unusedLabelIsError=function(e){return!1===e.allowUnusedLabels},e.getAreDeclarationMapsEnabled=function(e){return!(!p(e)||!e.declarationMap)},e.getAllowSyntheticDefaultImports=function(t){var r=d(t);return void 0!==t.allowSyntheticDefaultImports?t.allowSyntheticDefaultImports:t.esModuleInterop?r!==e.ModuleKind.None&&r=97&&e<=122||e>=65&&e<=90}function v(t){if(!t)return 0;var r=t.charCodeAt(0);if(47===r||92===r){if(t.charCodeAt(1)!==r)return 1;var n=t.indexOf(47===r?e.directorySeparator:f,2);return n<0?t.length:n+1}if(h(r)&&58===t.charCodeAt(1)){var i=t.charCodeAt(2);if(47===i||92===i)return 3;if(2===t.length)return 2}var a=t.indexOf(m);if(-1!==a){var o=a+m.length,s=t.indexOf(e.directorySeparator,o);if(-1!==s){var c=t.slice(0,a),u=t.slice(o,s);if("file"===c&&(""===u||"localhost"===u)&&h(t.charCodeAt(s+1))){var l=function(e,t){var r=e.charCodeAt(t);if(58===r)return t+1;if(37===r&&51===e.charCodeAt(t+1)){var n=e.charCodeAt(t+2);if(97===n||65===n)return t+3}return-1}(t,s+2);if(-1!==l){if(47===t.charCodeAt(l))return~(l+1);if(l===t.length)return~l}}return~(s+1)}return~t.length}return 0}function b(e){var t=v(e);return t<0?~t:t}function x(e){return v(e)>0}function S(t,r){return void 0===r&&(r=""),function(t,r){var n=t.substring(0,r),i=t.substring(r).split(e.directorySeparator);return i.length&&!e.lastOrUndefined(i)&&i.pop(),[n].concat(i)}(t=e.combinePaths(r,t),b(t))}function D(t){if(!e.some(t))return[];for(var r=[t[0]],n=1;n1){if(".."!==r[r.length-1]){r.pop();continue}}else if(r[0])continue;r.push(i)}}return r}function k(e,t){return D(S(e,t))}function T(t){if(0===t.length)return"";var r=t[0]&&e.ensureTrailingDirectorySeparator(t[0]);return 1===t.length?r:r+t.slice(1).join(e.directorySeparator)}e.normalizeSlashes=y,e.getRootLength=b,e.normalizePath=function(t){return e.resolvePath(t)},e.normalizePathAndParts=function(t){var r=D(S(t=y(t))),n=r[0],i=r.slice(1);if(i.length){var a=n+i.join(e.directorySeparator);return{path:e.hasTrailingDirectorySeparator(t)?e.ensureTrailingDirectorySeparator(a):a,parts:i}}return{path:n,parts:i}},e.getDirectoryPath=function(t){var r=b(t=y(t));return r===t.length?t:(t=e.removeTrailingDirectorySeparator(t)).slice(0,Math.max(r,t.lastIndexOf(e.directorySeparator)))},e.isUrl=function(e){return v(e)<0},e.pathIsRelative=function(e){return/^\.\.?($|[\\/])/.test(e)},e.isRootedDiskPath=x,e.isDiskPathRoot=function(e){var t=v(e);return t>0&&t===e.length},e.convertToRelativePath=function(t,r,n){return x(t)?e.getRelativePathToDirectoryOrUrl(r,t,r,n,!1):t},e.getPathComponents=S,e.reducePathComponents=D,e.getNormalizedPathComponents=k,e.getNormalizedAbsolutePath=function(e,t){return T(k(e,t))},e.getPathFromPathComponents=T}(s||(s={})),function(e){function t(t,r,n,i){var a,o=e.reducePathComponents(e.getPathComponents(t)),s=e.reducePathComponents(e.getPathComponents(r));for(a=0;a0==e.getRootLength(n)>0,"Paths must either both be absolute or both be relative");var a="function"==typeof i?i:e.identity,o=t(r,n,"boolean"==typeof i&&i?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive,a);return e.getPathFromPathComponents(o)}function n(t){return 0!==e.getRootLength(t)||e.pathIsRelative(t)?t:"./"+t}function i(t,r,n){if(t=e.normalizeSlashes(t),e.getRootLength(t)===t.length)return"";var i=(t=c(t)).slice(Math.max(e.getRootLength(t),t.lastIndexOf(e.directorySeparator)+1)),a=void 0!==r&&void 0!==n?j(i,r,n):void 0;return a?i.slice(0,i.length-a.length):i}function a(t){for(var r=[],n=1;n0;)u+=")?",f--;return u}(t,r,n,v[n])})}function S(e){return!/[.*?]/.test(e)}function D(e,t){return"*"===e?t:"?"===e?"[^/]":"\\"+e}function k(t,r,n,i,o){t=e.normalizePath(t);var s=a(o=e.normalizePath(o),t);return{includeFilePatterns:e.map(x(n,s,"files"),function(e){return"^"+e+"$"}),includeFilePattern:b(n,s,"files"),includeDirectoryPattern:b(n,s,"directories"),excludePattern:b(r,s,"exclude"),basePaths:function(t,r,n){var i=[t];if(r){for(var o=[],s=0,c=r;s=0;n--)if(e.fileExtensionIs(t,r[n]))return P(n,r);return 0},e.adjustExtensionPriority=P,e.getNextLowestExtensionPriority=function(e,t){return e<2?2:t.length};var w,F=[".d.ts",".ts",".js",".tsx",".jsx",".json"];function I(t,r){return e.fileExtensionIs(t,r)?O(t,r):void 0}function O(e,t){return e.substring(0,e.length-t.length)}function M(t,r,n,i){var a=void 0!==n&&void 0!==i?j(t,n,i):j(t);return a?t.slice(0,t.length-a.length)+(e.startsWith(r,".")?r:"."+r):t}function L(t){w.assert(e.hasZeroOrOneAsteriskCharacter(t));var r=t.indexOf("*");return-1===r?void 0:{prefix:t.substr(0,r),suffix:t.substr(r+1)}}function R(e){return".ts"===e||".tsx"===e||".d.ts"===e}function B(t){return e.find(F,function(r){return e.fileExtensionIs(t,r)})}function j(t,r,n){if(r)return function(t,r,n){"string"==typeof r&&(r=[r]);for(var i=0,a=r;i=o.length&&"."===t.charAt(t.length-o.length)){var s=t.slice(t.length-o.length);if(n(s,o))return s}}return""}(t,r,n?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive);var a=i(t),o=a.lastIndexOf(".");return o>=0?a.substring(o):""}e.removeFileExtension=function(e){for(var t=0,r=F;t=0)},e.extensionIsTypeScript=R,e.resolutionExtensionIsTypeScriptOrJson=function(e){return R(e)||".json"===e},e.extensionFromPath=function(e){var t=B(e);return void 0!==t?t:w.fail("File "+e+" has unknown extension.")},e.isAnySupportedFileExtension=function(e){return void 0!==B(e)},e.tryGetExtensionFromPath=B,e.getAnyExtensionFromPath=j,e.isCheckJsEnabledForFile=function(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs},e.emptyFileSystemEntries={files:e.emptyArray,directories:e.emptyArray},e.matchPatternOrExact=function(t,r){for(var n=[],i=0,a=t;in&&(n=a)}return{min:r,max:n}}}(s||(s={})),function(e){var t,r,n,i,a,o,s;function c(e,t){return t&&e(t)}function u(e,t,r){if(r){if(t)return t(r);for(var n=0,i=r;nt.checkJsDirective.pos)&&(t.checkJsDirective={enabled:"ts-check"===i,end:e.range.end,pos:e.range.pos})});break;case"jsx":return;default:e.Debug.fail("Unhandled pragma kind")}})}!function(e){e[e.None=0]="None",e[e.Yield=1]="Yield",e[e.Await=2]="Await",e[e.Type=4]="Type",e[e.IgnoreMissingOpenBrace=16]="IgnoreMissingOpenBrace",e[e.JSDoc=32]="JSDoc"}(t||(t={})),e.createNode=function(t,o,s){return 277===t?new(a||(a=e.objectAllocator.getSourceFileConstructor()))(t,o,s):71===t?new(i||(i=e.objectAllocator.getIdentifierConstructor()))(t,o,s):e.isNodeKind(t)?new(r||(r=e.objectAllocator.getNodeConstructor()))(t,o,s):new(n||(n=e.objectAllocator.getTokenConstructor()))(t,o,s)},e.isJSDocLikeText=l,e.forEachChild=_,e.createSourceFile=function(t,r,n,i,a){var s;return void 0===i&&(i=!1),e.performance.mark("beforeParse"),s=100===n?o.parseJsonText(t,r,n,void 0,i):o.parseSourceFile(t,r,n,void 0,i,a),e.performance.mark("afterParse"),e.performance.measure("Parse","beforeParse","afterParse"),s},e.parseIsolatedEntityName=function(e,t){return o.parseIsolatedEntityName(e,t)},e.parseJsonText=function(e,t){return o.parseJsonText(e,t)},e.isExternalModule=function(e){return void 0!==e.externalModuleIndicator},e.updateSourceFile=function(e,t,r,n){void 0===n&&(n=!1);var i=s.updateSourceFile(e,t,r,n);return i.flags|=1572864&e.flags,i},e.parseIsolatedJSDocComment=function(e,t,r){var n=o.JSDocParser.parseIsolatedJSDocComment(e,t,r);return n&&n.jsDoc&&o.fixupParentReferences(n.jsDoc),n},e.parseJSDocTypeExpressionForTests=function(e,t,r){return o.JSDocParser.parseJSDocTypeExpressionForTests(e,t,r)},function(t){var r,n,i,a,o,s,c,u,m,g,y,h,v,b,S,D,k,T=e.createScanner(6,!0),C=10240,E=!1;function N(t,r,n,i,a){void 0===n&&(n=2),P(r,n,i,6),(o=M(t,2,6,!1)).flags=b,ne();var c=te();if(1===re())o.statements=be([],c,c),o.endOfFileToken=me();else{var u=he(219);switch(re()){case 21:u.expression=Er();break;case 101:case 86:case 95:u.expression=me();break;case 38:ce(function(){return 8===ne()&&56!==ne()})?u.expression=sr():u.expression=Ar();break;case 8:case 9:if(ce(function(){return 56!==ne()})){u.expression=rt();break}default:u.expression=Ar()}xe(u),o.statements=be([u],c),o.endOfFileToken=fe(1,e.Diagnostics.Unexpected_token)}a&&O(o),o.parseDiagnostics=s;var l=o;return w(),l}function A(e){return 4===e||2===e||1===e||6===e?1:0}function P(t,o,u,l){switch(r=e.objectAllocator.getNodeConstructor(),n=e.objectAllocator.getTokenConstructor(),i=e.objectAllocator.getIdentifierConstructor(),a=e.objectAllocator.getSourceFileConstructor(),m=t,c=u,s=[],v=0,y=e.createMap(),h=0,g=0,l){case 1:case 2:b=65536;break;case 6:b=16842752;break;default:b=0}E=!1,T.setText(m),T.setOnError(ee),T.setScriptTarget(o),T.setLanguageVariant(A(l))}function w(){T.setText(""),T.setOnError(void 0),s=void 0,o=void 0,y=void 0,c=void 0,m=void 0}function F(t,r,n,i){var a=d(t);return a&&(b|=4194304),(o=M(t,r,i,a)).flags=b,ne(),p(o,m),f(o,function(t,r,n){s.push(e.createFileDiagnostic(o,t,r,n))}),o.statements=qe(0,Wr),e.Debug.assert(1===re()),o.endOfFileToken=I(me()),function(t){t.externalModuleIndicator=e.forEach(t.statements,On)||function(e){return 1048576&e.flags?Mn(e):void 0}(t)}(o),o.nodeCount=g,o.identifierCount=h,o.identifiers=y,o.parseDiagnostics=s,n&&O(o),o}function I(t){e.Debug.assert(!t.jsDoc);var r=e.mapDefined(e.getJSDocCommentRanges(t,o.text),function(e){return k.parseJSDocComment(t,e.pos,e.end-e.pos)});return r.length&&(t.jsDoc=r),t}function O(t){var r=t;return void _(t,function t(n){if(n.parent!==r){n.parent=r;var i=r;if(r=n,_(n,t),e.hasJSDocNodes(n))for(var a=0,o=n.jsDoc;a107)}function _e(t,r,n){return void 0===n&&(n=!0),re()===t?(n&&ne(),!0):(r?Q(r):Q(e.Diagnostics._0_expected,e.tokenToString(t)),!1)}function de(e){return re()===e&&(ne(),!0)}function pe(e){if(re()===e)return me()}function fe(t,r,n){return pe(t)||Se(t,!1,r||e.Diagnostics._0_expected,n||e.tokenToString(t))}function me(){var e=he(re());return ne(),xe(e)}function ge(){return 25===re()||(18===re()||1===re()||T.hasPrecedingLineBreak())}function ye(){return ge()?(25===re()&&ne(),!0):_e(25)}function he(t,a){g++;var o=a>=0?a:T.getStartPos();return e.isNodeKind(t)||0===t?new r(t,o,o):71===t?new i(t,o,o):new n(t,o,o)}function ve(e,t){var r=he(e,t);return 2&T.getTokenFlags()&&I(r),r}function be(e,t,r){var n=e.length,i=n>=1&&n<=4?e.slice():e;return i.pos=t,i.end=void 0===r?T.getStartPos():r,i}function xe(e,t){return e.end=void 0===t?T.getStartPos():t,b&&(e.flags|=b),E&&(E=!1,e.flags|=32768),e}function Se(t,r,n,i){r?Y(T.getStartPos(),0,n,i):n&&Q(n,i);var a=he(t);return 71===t?a.escapedText="":(e.isLiteralKind(t)||e.isTemplateLiteralKind(t))&&(a.text=""),xe(a)}function De(e){var t=y.get(e);return void 0===t&&y.set(e,t=e),t}function ke(t,r){if(h++,t){var n=he(71);return 71!==re()&&(n.originalKeywordKind=re()),n.escapedText=e.escapeLeadingUnderscores(De(T.getTokenValue())),ne(),xe(n)}return Se(71,1===re(),r||e.Diagnostics.Identifier_expected)}function Te(e){return ke(le(),e)}function Ce(t){return ke(e.tokenIsIdentifierOrKeyword(re()),t)}function Ee(){return e.tokenIsIdentifierOrKeyword(re())||9===re()||8===re()}function Ne(e){if(9===re()||8===re()){var t=rt();return t.text=De(t.text),t}return e&&21===re()?function(){var e=he(147);return _e(21),e.expression=U(Ht),_e(22),xe(e)}():Ce()}function Ae(){return Ne(!0)}function Pe(e){return re()===e&&ue(Fe)}function we(){return ne(),!T.hasPrecedingLineBreak()&&Ie()}function Fe(){switch(re()){case 76:return 83===ne();case 84:return ne(),79===re()?ce(Oe):39!==re()&&118!==re()&&17!==re()&&Ie();case 79:return Oe();case 115:case 125:case 136:return ne(),Ie();default:return we()}}function Ie(){return 21===re()||17===re()||39===re()||24===re()||Ee()}function Oe(){return ne(),75===re()||89===re()||109===re()||117===re()&&ce(jr)||120===re()&&ce(Jr)}function Me(t,r){if(We(t))return!0;switch(t){case 0:case 1:case 3:return!(25===re()&&r)&&qr();case 2:return 73===re()||79===re();case 4:return ce(vt);case 5:return ce(dn)||25===re()&&!r;case 6:return 21===re()||Ee();case 12:return 21===re()||39===re()||24===re()||Ee();case 17:return Ee();case 9:return 21===re()||24===re()||Ee();case 7:return 17===re()?ce(Le):r?le()&&!Je():Vt()&&!Je();case 8:return en();case 10:return 26===re()||24===re()||en();case 18:return le();case 15:if(26===re())return!0;case 11:return 24===re()||Wt();case 16:return _t();case 19:case 20:return 26===re()||Ot();case 21:return Dn();case 22:return e.tokenIsIdentifierOrKeyword(re());case 13:return e.tokenIsIdentifierOrKeyword(re())||17===re();case 14:return!0}return e.Debug.fail("Non-exhaustive case in 'isListElement'.")}function Le(){if(e.Debug.assert(17===re()),18===ne()){var t=ne();return 26===t||17===t||85===t||108===t}return!0}function Re(){return ne(),le()}function Be(){return ne(),e.tokenIsIdentifierOrKeyword(re())}function je(){return ne(),e.tokenIsIdentifierOrKeywordOrGreaterThan(re())}function Je(){return(108===re()||85===re())&&ce(ze)}function ze(){return ne(),Wt()}function Ke(){return ne(),Ot()}function Ue(e){if(1===re())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 22:return 18===re();case 3:return 18===re()||73===re()||79===re();case 7:return 17===re()||85===re()||108===re();case 8:return function(){if(ge())return!0;if(nr(re()))return!0;if(36===re())return!0;return!1}();case 18:return 29===re()||19===re()||17===re()||85===re()||108===re();case 11:return 20===re()||25===re();case 15:case 20:case 10:return 22===re();case 16:case 17:return 20===re()||22===re();case 19:return 26!==re();case 21:return 17===re()||18===re();case 13:return 29===re()||41===re();case 14:return 27===re()&&ce(Nn);default:return!1}}function qe(e,t){var r=v;v|=1<=0&&(c.hasTrailingComma=!0),c}function Xe(){var e=be([],te());return e.isMissingList=!0,e}function Qe(e,t,r,n){if(_e(r)){var i=Ge(e,t);return _e(n),i}return Xe()}function Ye(e,t){for(var r=e?Ce(t):Te(t),n=T.getStartPos();de(23);){if(27===re()){r.jsdocDotPos=n;break}n=T.getStartPos(),r=$e(r,Ze(e))}return r}function $e(e,t){var r=he(146,e.pos);return r.left=e,r.right=t,xe(r)}function Ze(t){if(T.hasPrecedingLineBreak()&&e.tokenIsIdentifierOrKeyword(re())&&ce(Br))return Se(71,!0,e.Diagnostics.Identifier_expected);return t?Ce():Te()}function et(){var t,r=he(204);r.head=(t=nt(re()),e.Debug.assert(14===t.kind,"Template head has wrong token kind"),t),e.Debug.assert(14===r.head.kind,"Template head has wrong token kind");var n=[],i=te();do{n.push(tt())}while(15===e.last(n).literal.kind);return r.templateSpans=be(n,i),xe(r)}function tt(){var t,r,n=he(214);return n.expression=U(Ht),18===re()?(u=T.reScanTemplateToken(),r=nt(re()),e.Debug.assert(15===r.kind||16===r.kind,"Template fragment has wrong token kind"),t=r):t=fe(16,e.Diagnostics._0_expected,e.tokenToString(18)),n.literal=t,xe(n)}function rt(){return nt(re())}function nt(e){var t=he(e),r=T.getTokenValue();return t.text=r,T.hasExtendedUnicodeEscape()&&(t.hasExtendedUnicodeEscape=!0),T.isUnterminated()&&(t.isUnterminated=!0),8===t.kind&&(t.numericLiteralFlags=1008&T.getTokenFlags()),ne(),xe(t),t}function it(){var t=he(162);return t.typeName=Ye(!0,e.Diagnostics.Type_expected),T.hasPrecedingLineBreak()||27!==re()||(t.typeArguments=Qe(19,Kt,27,29)),xe(t)}function at(e){var t=he(282);return e?Lt(286,t):(ne(),xe(t))}function ot(){var e=he(149);return 99!==re()&&94!==re()||(e.name=Ce(),_e(56)),e.type=st(),xe(e)}function st(){var e=pe(24),t=Kt();if(e){var r=he(288,e.pos);r.type=t,t=xe(r)}return 58===re()?Lt(286,t):t}function ct(){var e=he(148);return e.name=Te(),de(85)&&(Ot()||!Wt()?e.constraint=Kt():e.expression=cr()),de(58)&&(e.default=Kt()),xe(e)}function ut(){if(27===re())return Qe(18,ct,27,29)}function lt(){if(de(56))return Kt()}function _t(){return 24===re()||en()||e.isModifierKind(re())||57===re()||Ot(!0)}function dt(){var t=ve(149);return 99===re()?(t.name=ke(!0),t.type=lt(),xe(t)):(t.decorators=pn(),t.modifiers=fn(),t.dotDotDotToken=pe(24),t.name=tn(),0===e.getFullWidth(t.name)&&!e.hasModifiers(t)&&e.isModifierKind(re())&&ne(),t.questionToken=pe(55),t.type=lt(),t.initializer=Gt(),xe(t))}function pt(t,r,n){32&r||(n.typeParameters=ut());var i=function(e,t){if(!_e(19))return e.parameters=Xe(),!1;var r=W(),n=X();return B(!!(1&t)),J(!!(2&t)),e.parameters=Ge(16,32&t?ot:dt),B(r),J(n),_e(20)}(n,r);return(!function(t,r){if(36===t)return _e(t),!0;if(de(56))return!0;if(r&&36===re())return Q(e.Diagnostics._0_expected,e.tokenToString(56)),ne(),!0;return!1}(t,!!(4&r))||(n.type=function(){var e=le()&&ue(zt),t=Kt();if(e){var r=he(161,e.pos);return r.parameterName=e,r.type=t,xe(r)}return t}(),!function t(r){switch(r.kind){case 162:return e.nodeIsMissing(r.typeName);case 163:case 164:var n=r,i=n.parameters,a=n.type;return!!i.isMissingList||t(a);case 175:return t(r.type);default:return!1}}(n.type)))&&i}function ft(){de(26)||ye()}function mt(e){var t=ve(e);return 159===e&&_e(94),pt(56,4,t),ft(),xe(t)}function gt(){return 21===re()&&ce(yt)}function yt(){if(ne(),24===re()||22===re())return!0;if(e.isModifierKind(re())){if(ne(),le())return!0}else{if(!le())return!1;ne()}return 56===re()||26===re()||55===re()&&(ne(),56===re()||26===re()||22===re())}function ht(e){return e.kind=160,e.parameters=Qe(16,dt,21,22),e.type=qt(),ft(),xe(e)}function vt(){if(19===re()||27===re())return!0;for(var t=!1;e.isModifierKind(re());)t=!0,ne();return 21===re()||(Ee()&&(t=!0,ne()),!!t&&(19===re()||27===re()||55===re()||56===re()||26===re()||ge()))}function bt(){if(19===re()||27===re())return mt(158);if(94===re()&&ce(xt))return mt(159);var e=ve(0);return e.modifiers=fn(),gt()?ht(e):function(e){return e.name=Ae(),e.questionToken=pe(55),19===re()||27===re()?(e.kind=153,pt(56,4,e)):(e.kind=151,e.type=qt(),58===re()&&(e.initializer=Gt())),ft(),xe(e)}(e)}function xt(){return ne(),19===re()||27===re()}function St(){return 23===ne()}function Dt(){switch(ne()){case 19:case 27:case 23:return!0}return!1}function kt(){var e;return _e(17)?(e=qe(4,bt),_e(18)):e=Xe(),e}function Tt(){return ne(),37===re()||38===re()?132===ne():(132===re()&&ne(),21===re()&&Re()&&92===ne())}function Ct(){var e=he(179);return _e(17),132!==re()&&37!==re()&&38!==re()||(e.readonlyToken=me(),132!==e.readonlyToken.kind&&fe(132)),_e(21),e.typeParameter=function(){var e=he(148);return e.name=Te(),_e(92),e.constraint=Kt(),xe(e)}(),_e(22),55!==re()&&37!==re()&&38!==re()||(e.questionToken=me(),55!==e.questionToken.kind&&fe(55)),e.type=qt(),ye(),_e(18),xe(e)}function Et(){var e=te();if(de(24)){var t=he(170,e);return t.type=Kt(),xe(t)}var r=Kt();return 2097152&b||284!==r.kind||r.pos!==r.type.pos||(r.kind=169),r}function Nt(){var e=me();return 23===re()?void 0:e}function At(e){var t,r=he(180);e&&((t=he(200)).operator=38,ne());var n=101===re()||86===re()?me():nt(re());return e&&(t.operand=n,xe(t),n=t),r.literal=n,xe(r)}function Pt(){return ne(),91===re()}function wt(){o.flags|=524288;var t=he(181);return de(103)&&(t.isTypeOf=!0),_e(91),_e(19),t.argument=Kt(),_e(20),de(23)&&(t.qualifier=Ye(!0,e.Diagnostics.Type_expected)),t.typeArguments=Sn(),xe(t)}function Ft(){return 8===ne()}function It(){switch(re()){case 119:case 142:case 137:case 134:case 138:case 122:case 140:case 131:case 135:return ue(Nt)||it();case 39:return at(!1);case 61:return at(!0);case 55:return n=T.getStartPos(),ne(),26===re()||18===re()||20===re()||29===re()||58===re()||49===re()?xe(r=he(283,n)):((r=he(284,n)).type=Kt(),xe(r));case 89:return function(){if(ce(En)){var e=ve(287);return ne(),pt(56,36,e),xe(e)}var t=he(162);return t.typeName=Ce(),xe(t)}();case 51:return function(){var e=he(285);return ne(),e.type=It(),xe(e)}();case 13:case 9:case 8:case 101:case 86:return At();case 38:return ce(Ft)?At(!0):it();case 105:case 95:return me();case 99:var e=(t=he(176),ne(),xe(t));return 127!==re()||T.hasPrecedingLineBreak()?e:function(e){ne();var t=he(161,e.pos);return t.parameterName=e,t.type=Kt(),xe(t)}(e);case 103:return ce(Pt)?wt():function(){var e=he(165);return _e(103),e.exprName=Ye(!0),xe(e)}();case 17:return ce(Tt)?Ct():function(){var e=he(166);return e.members=kt(),xe(e)}();case 21:return function(){var e=he(168);return e.elementTypes=Qe(20,Et,21,22),xe(e)}();case 19:return function(){var e=he(175);return _e(19),e.type=Kt(),_e(20),xe(e)}();case 91:return wt();default:return it()}var t,r,n}function Ot(e){switch(re()){case 119:case 142:case 137:case 134:case 122:case 138:case 141:case 105:case 140:case 95:case 99:case 103:case 131:case 17:case 21:case 27:case 49:case 48:case 94:case 9:case 8:case 101:case 86:case 135:case 39:case 55:case 51:case 24:case 126:case 91:return!0;case 38:return!e&&ce(Ft);case 19:return!e&&ce(Mt);default:return le()}}function Mt(){return ne(),20===re()||_t()||Ot()}function Lt(e,t){ne();var r=he(e,t.pos);return r.type=t,xe(r)}function Rt(){var e=re();switch(e){case 128:case 141:return function(e){var t=he(177);return _e(e),t.operator=e,t.type=Rt(),xe(t)}(e);case 126:return function(){var e=he(174);_e(126);var t=he(148);return t.name=Te(),e.typeParameter=xe(t),xe(e)}()}return function(){for(var e=It();!T.hasPrecedingLineBreak();)switch(re()){case 51:e=Lt(285,e);break;case 55:if(!(2097152&b)&&ce(Ke))return e;e=Lt(284,e);break;case 21:var t;_e(21),Ot()?((t=he(178,e.pos)).objectType=e,t.indexType=Kt(),_e(22),e=xe(t)):((t=he(167,e.pos)).elementType=e,_e(22),e=xe(t));break;default:return e}return e}()}function Bt(e,t,r){de(r);var n=t();if(re()===r){for(var i=[n];de(r);)i.push(t());var a=he(e,n.pos);a.types=be(i,n.pos),n=xe(a)}return n}function jt(){return Bt(172,Rt,48)}function Jt(){if(ne(),20===re()||24===re())return!0;if(function(){if(e.isModifierKind(re())&&fn(),le()||99===re())return ne(),!0;if(21===re()||17===re()){var t=s.length;return tn(),t===s.length}return!1}()){if(56===re()||26===re()||55===re()||58===re())return!0;if(20===re()&&(ne(),36===re()))return!0}return!1}function zt(){var e=Te();if(127===re()&&!T.hasPrecedingLineBreak())return ne(),e}function Kt(){return z(20480,Ut)}function Ut(e){if(27===re()||19===re()&&ce(Jt)||94===re())return function(){var e=te(),t=ve(de(94)?164:163,e);return pt(36,4,t),xe(t)}();var t=Bt(171,jt,49);if(!e&&!T.hasPrecedingLineBreak()&&de(85)){var r=he(173,t.pos);return r.checkType=t,r.extendsType=Ut(!0),_e(55),r.trueType=Ut(),_e(56),r.falseType=Ut(),xe(r)}return t}function qt(){return de(56)?Kt():void 0}function Vt(){switch(re()){case 99:case 97:case 95:case 101:case 86:case 8:case 9:case 13:case 14:case 19:case 21:case 17:case 89:case 75:case 94:case 41:case 63:case 71:return!0;case 91:return ce(Dt);default:return le()}}function Wt(){if(Vt())return!0;switch(re()){case 37:case 38:case 52:case 51:case 80:case 103:case 105:case 43:case 44:case 27:case 121:case 116:return!0;default:return!!function(){if(H()&&92===re())return!1;return e.getBinaryOperatorPrecedence(re())>0}()||le()}}function Ht(){var e=G();e&&j(!1);for(var t,r=Xt();t=pe(26);)r=ar(r,t,Xt());return e&&j(!0),r}function Gt(){return de(58)?Xt():void 0}function Xt(){if(function(){if(116===re())return!!W()||ce(zr);return!1}())return t=he(205),ne(),T.hasPrecedingLineBreak()||39!==re()&&!Wt()?xe(t):(t.asteriskToken=pe(39),t.expression=Xt(),xe(t));var t,r=function(){var t=function(){if(19===re()||27===re()||120===re())return ce(Yt);if(36===re())return 1;return 0}();if(0===t)return;var r=1===t?er(!0):ue($t);if(!r)return;var n=e.hasModifier(r,256),i=re();return r.equalsGreaterThanToken=fe(36),r.body=36===i||17===i?tr(n):Te(),xe(r)}()||function(){if(120===re()&&1===ce(Zt)){var e=mn(),t=rr(0);return Qt(t,e)}return}();if(r)return r;var n=rr(0);return 71===n.kind&&36===re()?Qt(n):e.isLeftHandSideExpression(n)&&e.isAssignmentOperator(ie())?ar(n,me(),Xt()):function(t){var r=pe(55);if(!r)return t;var n=he(203,t.pos);return n.condition=t,n.questionToken=r,n.whenTrue=z(C,Xt),n.colonToken=fe(56),n.whenFalse=e.nodeIsPresent(n.colonToken)?Xt():Se(71,!1,e.Diagnostics._0_expected,e.tokenToString(56)),xe(n)}(n)}function Qt(t,r){var n;e.Debug.assert(36===re(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>"),r?(n=he(195,r.pos)).modifiers=r:n=he(195,t.pos);var i=he(149,t.pos);return i.name=t,xe(i),n.parameters=be([i],i.pos,i.end),n.equalsGreaterThanToken=fe(36),n.body=tr(!!r),I(xe(n))}function Yt(){if(120===re()){if(ne(),T.hasPrecedingLineBreak())return 0;if(19!==re()&&27!==re())return 0}var t=re(),r=ne();if(19===t){if(20===r)switch(ne()){case 36:case 56:case 17:return 1;default:return 0}if(21===r||17===r)return 2;if(24===r)return 1;if(e.isModifierKind(r)&&120!==r&&ce(Re))return 1;if(!le())return 0;switch(ne()){case 56:return 1;case 55:return ne(),56===re()||26===re()||58===re()||20===re()?1:0;case 26:case 58:case 20:return 2}return 0}return e.Debug.assert(27===t),le()?1===o.languageVariant?ce(function(){var e=ne();if(85===e)switch(ne()){case 58:case 29:return!1;default:return!0}else if(26===e)return!0;return!1})?1:0:2:0}function $t(){return er(!1)}function Zt(){if(120===re()){if(ne(),T.hasPrecedingLineBreak()||36===re())return 0;var e=rr(0);if(!T.hasPrecedingLineBreak()&&71===e.kind&&36===re())return 1}return 0}function er(t){var r=ve(195);if(r.modifiers=mn(),(pt(56,e.hasModifier(r,256)?2:0,r)||t)&&(t||36===re()||17===re()))return r}function tr(e){return 17===re()?Ir(e?2:0):25===re()||89===re()||75===re()||!qr()||17!==re()&&89!==re()&&75!==re()&&57!==re()&&Wt()?e?q(Xt):z(16384,Xt):Ir(16|(e?2:0))}function rr(e){return ir(e,cr())}function nr(e){return 92===e||145===e}function ir(t,r){for(;;){ie();var n=e.getBinaryOperatorPrecedence(re());if(!(40===re()?n>=t:n>t))break;if(92===re()&&H())break;if(118===re()){if(T.hasPrecedingLineBreak())break;ne(),r=or(r,Kt())}else r=ar(r,me(),rr(n))}return r}function ar(e,t,r){var n=he(202,e.pos);return n.left=e,n.operatorToken=t,n.right=r,xe(n)}function or(e,t){var r=he(210,e.pos);return r.expression=e,r.type=t,xe(r)}function sr(){var e=he(200);return e.operator=re(),ne(),e.operand=ur(),xe(e)}function cr(){if(function(){switch(re()){case 37:case 38:case 52:case 51:case 80:case 103:case 105:case 121:return!1;case 27:if(1!==o.languageVariant)return!1;default:return!0}}()){var t=lr();return 40===re()?ir(e.getBinaryOperatorPrecedence(re()),t):t}var r=re(),n=ur();if(40===re()){var i=e.skipTrivia(m,n.pos),a=n.end;192===n.kind?$(i,a,e.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):$(i,a,e.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,e.tokenToString(r))}return n}function ur(){switch(re()){case 37:case 38:case 52:case 51:return sr();case 80:return e=he(196),ne(),e.expression=ur(),xe(e);case 103:return function(){var e=he(197);return ne(),e.expression=ur(),xe(e)}();case 105:return function(){var e=he(198);return ne(),e.expression=ur(),xe(e)}();case 27:return function(){var e=he(192);return _e(27),e.type=Kt(),_e(29),e.expression=ur(),xe(e)}();case 121:if(121===re()&&(X()||ce(zr)))return function(){var e=he(199);return ne(),e.expression=ur(),xe(e)}();default:return lr()}var e}function lr(){if(43===re()||44===re())return(t=he(200)).operator=re(),ne(),t.operand=_r(),xe(t);if(1===o.languageVariant&&27===re()&&ce(je))return pr(!0);var t,r=_r();return e.Debug.assert(e.isLeftHandSideExpression(r)),43!==re()&&44!==re()||T.hasPrecedingLineBreak()?r:((t=he(201,r.pos)).operand=r,t.operator=re(),ne(),xe(t))}function _r(){var t;if(91===re())if(ce(xt))o.flags|=524288,t=me();else if(ce(St)){var r=T.getStartPos();ne(),ne();var n=he(212,r);n.keywordToken=91,n.name=Ce(),t=xe(n),o.flags|=1048576}else t=dr();else t=97===re()?function(){var t=me();if(19===re()||23===re()||21===re())return t;var r=he(187,t.pos);return r.expression=t,fe(23,e.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access),r.name=Ze(!0),xe(r)}():dr();return function(e){for(;;)if(e=vr(e),27!==re()){if(19!==re())return e;var t=he(189,e.pos);t.expression=e,t.arguments=Sr(),e=xe(t)}else{var r=ue(Dr);if(!r)return e;if(br()){e=xr(e,r);continue}var t=he(189,e.pos);t.expression=e,t.typeArguments=r,t.arguments=Sr(),e=xe(t)}}(t)}function dr(){return vr(kr())}function pr(t){var r,n=function(e){var t=T.getStartPos();if(_e(27),29===re()){var r=he(263,t);return oe(),xe(r)}var n,i=gr(),a=Sn(),o=(s=he(266),s.properties=qe(13,hr),xe(s));var s;29===re()?(n=he(260,t),oe()):(_e(41),e?_e(29):(_e(29,void 0,!1),oe()),n=he(259,t));return n.tagName=i,n.typeArguments=a,n.attributes=o,xe(n)}(t);if(260===n.kind)(i=he(258,n.pos)).openingElement=n,i.children=mr(i.openingElement),i.closingElement=function(e){var t=he(261);_e(28),t.tagName=gr(),e?_e(29):(_e(29,void 0,!1),oe());return xe(t)}(t),x(i.openingElement.tagName,i.closingElement.tagName)||Z(i.closingElement,e.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0,e.getTextOfNodeFromSourceText(m,i.openingElement.tagName)),r=xe(i);else if(263===n.kind){var i;(i=he(262,n.pos)).openingFragment=n,i.children=mr(i.openingFragment),i.closingFragment=function(t){var r=he(264);_e(28),e.tokenIsIdentifierOrKeyword(re())&&Z(gr(),e.Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment);t?_e(29):(_e(29,void 0,!1),oe());return xe(r)}(t),r=xe(i)}else e.Debug.assert(259===n.kind),r=n;if(t&&27===re()){var a=ue(function(){return pr(!0)});if(a){Q(e.Diagnostics.JSX_expressions_must_have_one_parent_element);var o=he(202,r.pos);return o.end=a.end,o.left=r,o.right=a,o.operatorToken=Se(26,!1,void 0),o.operatorToken.pos=o.operatorToken.end=o.right.pos,o}}return r}function fr(t,r){switch(r){case 1:return void(e.isJsxOpeningFragment(t)?Z(t,e.Diagnostics.JSX_fragment_has_no_corresponding_closing_tag):Z(t.tagName,e.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag,e.getTextOfNodeFromSourceText(m,t.tagName)));case 28:case 7:return;case 10:case 11:return(n=he(10)).containsOnlyWhiteSpaces=11===u,u=T.scanJsxToken(),xe(n);case 17:return yr(!1);case 27:return pr(!1);default:return e.Debug.assertNever(r)}var n}function mr(e){var t=[],r=te(),n=v;for(v|=16384;;){var i=fr(e,u=T.reScanJsxToken());if(!i)break;t.push(i)}return v=n,be(t,r)}function gr(){ae();for(var e=99===re()?me():Ce();de(23);){var t=he(187,e.pos);t.expression=e,t.name=Ze(!0),e=xe(t)}return e}function yr(e){var t=he(268);if(_e(17))return 18!==re()&&(t.dotDotDotToken=pe(24),t.expression=Xt()),e?_e(18):(_e(18,void 0,!1),oe()),xe(t)}function hr(){if(17===re())return function(){var e=he(267);return _e(17),_e(24),e.expression=Ht(),_e(18),xe(e)}();ae();var e=he(265);if(e.name=Ce(),58===re())switch(u=T.scanJsxAttributeValue()){case 9:e.initializer=rt();break;default:e.initializer=yr(!0)}return xe(e)}function vr(t){for(;;){if(pe(23)){var r=he(187,t.pos);r.expression=t,r.name=Ze(!0),t=xe(r)}else if(51!==re()||T.hasPrecedingLineBreak())if(G()||!de(21)){if(!br())return t;t=xr(t,void 0)}else{var n=he(188,t.pos);if(n.expression=t,22===re())n.argumentExpression=Se(71,!0,e.Diagnostics.An_element_access_expression_should_take_an_argument);else{var i=U(Ht);e.isStringOrNumericLiteral(i)&&(i.text=De(i.text)),n.argumentExpression=i}_e(22),t=xe(n)}else{ne();var a=he(211,t.pos);a.expression=t,t=xe(a)}}}function br(){return 13===re()||14===re()}function xr(e,t){var r=he(191,e.pos);return r.tag=e,r.typeArguments=t,r.template=13===re()?rt():et(),xe(r)}function Sr(){_e(19);var e=Ge(11,Cr);return _e(20),e}function Dr(){if(de(27)){var e=Ge(19,Kt);if(_e(29))return e&&function(){switch(re()){case 19:case 13:case 14:case 23:case 20:case 22:case 56:case 25:case 55:case 32:case 34:case 33:case 35:case 53:case 54:case 50:case 48:case 49:case 18:case 1:return!0;case 26:case 17:default:return!1}}()?e:void 0}}function kr(){switch(re()){case 8:case 9:case 13:return rt();case 99:case 97:case 95:case 101:case 86:return me();case 19:return t=ve(193),_e(19),t.expression=U(Ht),_e(20),xe(t);case 21:return Er();case 17:return Ar();case 120:if(!ce(Jr))break;return Pr();case 75:return hn(ve(0),207);case 89:return Pr();case 94:return function(){var t=T.getStartPos();if(_e(94),de(23)){var r=he(212,t);return r.keywordToken=94,r.name=Ce(),xe(r)}var n,i=kr();for(;;){i=vr(i),n=ue(Dr),br()&&(e.Debug.assert(!!n,"Expected a type argument list; all plain tagged template starts should be consumed in 'parseMemberExpressionRest'"),i=xr(i,n),n=void 0);break}var a=he(190,t);a.expression=i,a.typeArguments=n,(a.typeArguments||19===re())&&(a.arguments=Sr());return xe(a)}();case 41:case 63:if(12===(u=T.reScanSlashToken()))return rt();break;case 14:return et()}var t;return Te(e.Diagnostics.Expression_expected)}function Tr(){return 24===re()?(e=he(206),_e(24),e.expression=Xt(),xe(e)):26===re()?he(208):Xt();var e}function Cr(){return z(C,Tr)}function Er(){var e=he(185);return _e(21),T.hasPrecedingLineBreak()&&(e.multiLine=!0),e.elements=Ge(15,Tr),_e(22),xe(e)}function Nr(){var e=ve(0);if(pe(24))return e.kind=275,e.expression=Xt(),xe(e);if(e.decorators=pn(),e.modifiers=fn(),Pe(125))return _n(e,156);if(Pe(136))return _n(e,157);var t=pe(39),r=le();if(e.name=Ae(),e.questionToken=pe(55),t||19===re()||27===re())return un(e,t);if(r&&(26===re()||18===re()||58===re())){e.kind=274;var n=pe(58);n&&(e.equalsToken=n,e.objectAssignmentInitializer=U(Xt))}else e.kind=273,_e(56),e.initializer=U(Xt);return xe(e)}function Ar(){var e=he(186);return _e(17),T.hasPrecedingLineBreak()&&(e.multiLine=!0),e.properties=Ge(12,Nr,!0),_e(18),xe(e)}function Pr(){var t=G();t&&j(!1);var r=ve(194);r.modifiers=fn(),_e(89),r.asteriskToken=pe(39);var n=r.asteriskToken?1:0,i=e.hasModifier(r,256)?2:0;return r.name=n&&i?K(20480,wr):n?function(e){return K(4096,e)}(wr):i?q(wr):wr(),pt(56,n|i,r),r.body=Ir(n|i),t&&j(!0),xe(r)}function wr(){return le()?Te():void 0}function Fr(e,t){var r=he(216);return _e(17,t)||e?(T.hasPrecedingLineBreak()&&(r.multiLine=!0),r.statements=qe(1,Wr),_e(18)):r.statements=Xe(),xe(r)}function Ir(e,t){var r=W();B(!!(1&e));var n=X();J(!!(2&e));var i=G();i&&j(!1);var a=Fr(!!(16&e),t);return i&&j(!0),B(r),J(n),a}function Or(){var e=te();_e(88);var t,r,n=pe(121);if(_e(19),25!==re()&&(t=104===re()||110===re()||76===re()?an(!0):K(2048,Ht)),n?_e(145):de(145)){var i=he(225,e);i.awaitModifier=n,i.initializer=t,i.expression=U(Xt),_e(20),r=i}else if(de(92)){var a=he(224,e);a.initializer=t,a.expression=U(Ht),_e(20),r=a}else{var o=he(223,e);o.initializer=t,_e(25),25!==re()&&20!==re()&&(o.condition=U(Ht)),_e(25),20!==re()&&(o.incrementor=U(Ht)),_e(20),r=o}return r.statement=Wr(),xe(r)}function Mr(e){var t=he(e);return _e(227===e?72:77),ge()||(t.label=Te()),ye(),xe(t)}function Lr(){return 73===re()?(e=he(269),_e(73),e.expression=U(Ht),_e(56),e.statements=qe(3,Wr),xe(e)):function(){var e=he(270);return _e(79),_e(56),e.statements=qe(3,Wr),xe(e)}();var e}function Rr(){var e=he(233);return _e(102),e.tryBlock=Fr(!1),e.catchClause=74===re()?function(){var e=he(272);_e(74),de(19)?(e.variableDeclaration=nn(),_e(20)):e.variableDeclaration=void 0;return e.block=Fr(!1),xe(e)}():void 0,e.catchClause&&87!==re()||(_e(87),e.finallyBlock=Fr(!1)),xe(e)}function Br(){return ne(),e.tokenIsIdentifierOrKeyword(re())&&!T.hasPrecedingLineBreak()}function jr(){return ne(),75===re()&&!T.hasPrecedingLineBreak()}function Jr(){return ne(),89===re()&&!T.hasPrecedingLineBreak()}function zr(){return ne(),(e.tokenIsIdentifierOrKeyword(re())||8===re()||9===re())&&!T.hasPrecedingLineBreak()}function Kr(){for(;;)switch(re()){case 104:case 110:case 76:case 89:case 75:case 83:return!0;case 109:case 139:return ne(),!T.hasPrecedingLineBreak()&&le();case 129:case 130:return Qr();case 117:case 120:case 124:case 112:case 113:case 114:case 132:if(ne(),T.hasPrecedingLineBreak())return!1;continue;case 144:return ne(),17===re()||71===re()||84===re();case 91:return ne(),9===re()||39===re()||17===re()||e.tokenIsIdentifierOrKeyword(re());case 84:if(ne(),58===re()||39===re()||17===re()||79===re()||118===re())return!0;continue;case 115:ne();continue;default:return!1}}function Ur(){return ce(Kr)}function qr(){switch(re()){case 57:case 25:case 17:case 104:case 110:case 89:case 75:case 83:case 90:case 81:case 106:case 88:case 77:case 72:case 96:case 107:case 98:case 100:case 102:case 78:case 74:case 87:return!0;case 91:return Ur()||ce(Dt);case 76:case 84:return Ur();case 120:case 124:case 109:case 129:case 130:case 139:case 144:return!0;case 114:case 112:case 113:case 115:case 132:return Ur()||!ce(Br);default:return Wt()}}function Vr(){return ne(),le()||17===re()||21===re()}function Wr(){switch(re()){case 25:return e=he(218),_e(25),xe(e);case 17:return Fr(!1);case 104:return sn(ve(235));case 110:if(ce(Vr))return sn(ve(235));break;case 89:return cn(ve(237));case 75:return yn(ve(238));case 90:return function(){var e=he(220);return _e(90),_e(19),e.expression=U(Ht),_e(20),e.thenStatement=Wr(),e.elseStatement=de(82)?Wr():void 0,xe(e)}();case 81:return function(){var e=he(221);return _e(81),e.statement=Wr(),_e(106),_e(19),e.expression=U(Ht),_e(20),de(25),xe(e)}();case 106:return function(){var e=he(222);return _e(106),_e(19),e.expression=U(Ht),_e(20),e.statement=Wr(),xe(e)}();case 88:return Or();case 77:return Mr(226);case 72:return Mr(227);case 96:return function(){var e=he(228);return _e(96),ge()||(e.expression=U(Ht)),ye(),xe(e)}();case 107:return function(){var e=he(229);return _e(107),_e(19),e.expression=U(Ht),_e(20),e.statement=K(8388608,Wr),xe(e)}();case 98:return function(){var e=he(230);_e(98),_e(19),e.expression=U(Ht),_e(20);var t=he(244);return _e(17),t.clauses=qe(2,Lr),_e(18),e.caseBlock=xe(t),xe(e)}();case 100:return function(){var e=he(232);return _e(100),e.expression=T.hasPrecedingLineBreak()?void 0:U(Ht),ye(),xe(e)}();case 102:case 74:case 87:return Rr();case 78:return function(){var e=he(234);return _e(78),ye(),xe(e)}();case 57:return Gr();case 120:case 109:case 139:case 129:case 130:case 124:case 76:case 83:case 84:case 91:case 112:case 113:case 114:case 117:case 115:case 132:case 144:if(Ur())return Gr()}var e;return function(){var e=ve(0),t=U(Ht);return 71===t.kind&&de(56)?(e.kind=231,e.label=t,e.statement=Wr()):(e.kind=219,e.expression=t,ye()),xe(e)}()}function Hr(e){return 124===e.kind}function Gr(){var t=ve(0);if(t.decorators=pn(),t.modifiers=fn(),e.some(t.modifiers,Hr)){for(var r=0,n=t.modifiers;r=0),e.Debug.assert(t<=a),e.Debug.assert(a<=i.length),l(i,t)){var o,s,c,_=[];return T.scanRange(t+3,n-5,function(){var e,r,n=1,u=t-Math.max(i.lastIndexOf("\n",t),0)+4;function l(t){e||(e=u),_.push(t),u+=t.length}for(w();F(5););F(4)&&(n=0,u=0);e:for(;;){switch(re()){case 57:0===n||1===n?(p(_),v(y(u)),n=0,e=void 0,u++):l(T.getTokenText());break;case 4:_.push(T.getTokenText()),n=0,u=0;break;case 39:var f=T.getTokenText();1===n||2===n?(n=2,l(f)):(n=1,u+=f.length);break;case 71:l(T.getTokenText()),n=2;break;case 5:var m=T.getTokenText();2===n?_.push(m):void 0!==e&&u+m.length>e&&_.push(m.slice(e-u-1)),u+=m.length;break;case 1:break e;default:n=2,l(T.getTokenText())}w()}return d(_),p(_),(r=he(289,t)).tags=o&&be(o,s,c),r.comment=_.length?_.join(""):void 0,xe(r,a)})}function d(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function p(e){for(;e.length&&("\n"===e[e.length-1]||"\r"===e[e.length-1]);)e.pop()}function f(){for(;;){if(w(),1===re())return!0;if(5!==re()&&4!==re())return!1}}function g(){if(5!==re()&&4!==re()||!ce(f))for(;5===re()||4===re();)w()}function y(t){e.Debug.assert(57===re());var n=he(57,T.getTokenPos());n.end=T.getTextPos(),w();var i,a=I();switch(g(),a.escapedText){case"augments":case"extends":i=function(e,t){var r=he(293,e.pos);return r.atToken=e,r.tagName=t,r.class=function(){var e=de(17),t=he(209);t.expression=function(){for(var e=I();de(23);){var t=he(187,e.pos);t.expression=e,t.name=I(),e=xe(t)}return e}(),t.typeArguments=Sn();var r=xe(t);return e&&_e(18),r}(),xe(r)}(n,a);break;case"class":case"constructor":i=function(e,t){var r=he(294,e.pos);return r.atToken=e,r.tagName=t,xe(r)}(n,a);break;case"this":i=function(e,t){var n=he(298,e.pos);return n.atToken=e,n.tagName=t,n.typeExpression=r(!0),g(),xe(n)}(n,a);break;case"arg":case"argument":case"param":return D(n,a,2,t);case"return":case"returns":i=function(t,r){e.forEach(o,function(e){return 297===e.kind})&&$(r.pos,T.getTokenPos(),e.Diagnostics._0_tag_already_specified,r.escapedText);var n=he(297,t.pos);return n.atToken=t,n.tagName=r,n.typeExpression=b(),xe(n)}(n,a);break;case"template":i=function(t,n){var i;17===re()&&(i=r());var a=[],o=te();do{g();var s=he(148);s.name=I(e.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),g(),xe(s),a.push(s)}while(F(26));i&&(e.first(a).constraint=i.type);var c=he(300,t.pos);return c.atToken=t,c.tagName=n,c.typeParameters=be(a,o),xe(c),c}(n,a);break;case"type":i=k(n,a);break;case"typedef":i=function(t,r,n){var i=b();g();var a,o=he(301,t.pos);if(o.atToken=t,o.tagName=r,o.fullName=C(),o.name=E(o.fullName),g(),o.comment=h(n),o.typeExpression=i,!i||S(i.type)){for(var s=void 0,c=void 0,u=void 0,l=T.getStartPos();s=ue(function(){return A(1)});)if(c||(c=he(290,l)),299===s.kind){if(u)break;u=s}else c.jsDocPropertyTags=e.append(c.jsDocPropertyTags,s);c&&(i&&167===i.type.kind&&(c.isArrayType=!0),o.typeExpression=u&&u.typeExpression&&!S(u.typeExpression.type)?u.typeExpression:xe(c),a=o.typeExpression.end)}return xe(o,a||void 0!==o.comment?T.getStartPos():(o.fullName||o.typeExpression||o.tagName).end)}(n,a,t);break;case"callback":i=function(t,r,n){var i,a=he(295,t.pos);a.atToken=t,a.tagName=r,a.fullName=C(),a.name=E(a.fullName),g(),a.comment=h(n);var o=he(291,T.getStartPos());o.parameters=[];for(;i=ue(function(){return A(4)});)o.parameters=e.append(o.parameters,i);var s=ue(function(){if(F(57)){var e=y(n);if(e&&297===e.kind)return e}});s&&(o.type=s);return a.typeExpression=xe(o),xe(a)}(n,a,t);break;default:i=function(e,t){var r=he(292,e.pos);return r.atToken=e,r.tagName=t,xe(r)}(n,a)}return i.comment||(i.comment=h(t+i.end-i.pos)),i}function h(t){var r,n=[],i=0;function a(e){r||(r=t),n.push(e),t+=e.length}var o=re();e:for(;;){switch(o){case 4:i>=1&&(i=0,n.push(T.getTokenText())),t=0;break;case 57:T.setTextPos(T.getTextPos()-1);case 1:break e;case 5:if(2===i)a(T.getTokenText());else{var s=T.getTokenText();void 0!==r&&t+s.length>r&&n.push(s.slice(r-t-1)),t+=s.length}break;case 17:i=2,ce(function(){return 57===w()&&e.tokenIsIdentifierOrKeyword(w())&&"link"===T.getTokenText()})&&(a(T.getTokenText()),w(),a(T.getTokenText()),w()),a(T.getTokenText());break;case 39:if(0===i){i=1,t+=1;break}default:i=2,a(T.getTokenText())}o=w()}return d(n),p(n),0===n.length?void 0:n.join("")}function v(e){e&&(o?o.push(e):(o=[e],s=e.pos),c=e.end)}function b(){return g(),17===re()?r():void 0}function x(){if(13===re())return{name:ke(!0),isBracketed:!1};var e=de(21),t=function(){var e=I();de(21)&&_e(22);for(;de(23);){var t=I();de(21)&&_e(22),e=$e(e,t)}return e}();return e&&(g(),pe(58)&&Ht(),_e(22)),{name:t,isBracketed:e}}function S(t){switch(t.kind){case 135:return!0;case 167:return S(t.elementType);default:return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)&&"Object"===t.typeName.escapedText}}function D(t,r,n,i){var a=b(),o=!a;g();var s=x(),c=s.name,u=s.isBracketed;g(),o&&(a=b());var l,_=he(1===n?302:296,t.pos);void 0!==i&&(l=h(i+T.getStartPos()-t.pos));var d=4!==n&&function(t,r,n){if(t&&S(t.type)){for(var i=he(281,T.getTokenPos()),a=void 0,o=void 0,s=T.getStartPos(),c=void 0;a=ue(function(){return A(n,r)});)296!==a.kind&&302!==a.kind||(c=e.append(c,a));if(c)return(o=he(290,s)).jsDocPropertyTags=c,167===t.type.kind&&(o.isArrayType=!0),i.type=xe(o),xe(i)}}(a,c,n);return d&&(a=d,o=!0),_.atToken=t,_.tagName=r,_.typeExpression=a,_.name=c,_.isNameFirst=o,_.isBracketed=u,_.comment=l,xe(_)}function k(t,n){e.forEach(o,function(e){return 299===e.kind})&&$(n.pos,T.getTokenPos(),e.Diagnostics._0_tag_already_specified,n.escapedText);var i=he(299,t.pos);return i.atToken=t,i.tagName=n,i.typeExpression=r(!0),xe(i)}function C(t){var r=T.getTokenPos();if(e.tokenIsIdentifierOrKeyword(re())){var n=I();if(de(23)){var i=he(242,r);return t&&(i.flags|=4),i.name=n,i.body=C(!0),xe(i)}return t&&(n.isInJSDocNamespace=!0),n}}function E(t){if(t)for(var r=t;;){if(e.isIdentifier(r)||!r.body)return e.isIdentifier(r)?r:r.name;r=r.body}}function N(t,r){for(;!e.isIdentifier(t)||!e.isIdentifier(r);){if(e.isIdentifier(t)||e.isIdentifier(r)||t.right.escapedText!==r.right.escapedText)return!1;t=t.left,r=r.left}return t.escapedText===r.escapedText}function A(t,r){for(var n=!0,i=!1;;)switch(w()){case 57:if(n){var a=P(t);return!(a&&(296===a.kind||302===a.kind)&&4!==t&&r&&(e.isIdentifier(a.name)||!N(r,a.name.left)))&&a}i=!1;break;case 4:n=!0,i=!1;break;case 39:i&&(n=!1),i=!0;break;case 71:n=!1;break;case 1:return!1}}function P(t){e.Debug.assert(57===re());var r=he(57);r.end=T.getTextPos(),w();var n,i=I();switch(g(),i.escapedText){case"type":return 1===t&&k(r,i);case"prop":case"property":n=1;break;case"arg":case"argument":case"param":n=6;break;default:return!1}if(!(t&n))return!1;var a=D(r,i,t,void 0);return a.comment=h(a.end-a.pos),a}function w(){return u=T.scanJSDocToken()}function F(e){return re()===e&&(w(),!0)}function I(t){if(!e.tokenIsIdentifierOrKeyword(re()))return Se(71,!t,t||e.Diagnostics.Identifier_expected);var r=T.getTokenPos(),n=T.getTextPos(),i=he(71,r);return i.escapedText=e.escapeLeadingUnderscores(T.getTokenText()),xe(i,n),w(),i}}t.parseJSDocTypeExpressionForTests=function(e,t,n){P(e,6,void 0,1),o=M("file.js",6,1,!1),T.setText(e,t,n),u=T.scan();var i=r(),a=s;return w(),i?{jsDocTypeExpression:i,diagnostics:a}:void 0},t.parseJSDocTypeExpression=r,t.parseIsolatedJSDocComment=function(e,t,r){P(e,6,void 0,1),o={languageVariant:0,text:e};var n=a(t,r),i=s;return w(),n?{jsDoc:n,diagnostics:i}:void 0},t.parseJSDocComment=function(e,t,r){var n,i=u,c=s.length,l=E,_=a(t,r);return _&&(_.parent=e),65536&b&&(o.jsDocDiagnostics||(o.jsDocDiagnostics=[]),(n=o.jsDocDiagnostics).push.apply(n,s)),u=i,s.length=c,E=l,_},function(e){e[e.BeginningOfLine=0]="BeginningOfLine",e[e.SawAsterisk=1]="SawAsterisk",e[e.SavingComments=2]="SavingComments"}(n||(n={})),function(e){e[e.Property=1]="Property",e[e.Parameter=2]="Parameter",e[e.CallbackParameter=4]="CallbackParameter"}(i||(i={})),t.parseJSDocCommentWorker=a}(k=t.JSDocParser||(t.JSDocParser={}))}(o||(o={})),function(t){function r(t,r,i,o,s,c){return void(r?l(t):u(t));function u(t){var r="";if(c&&n(t)&&(r=o.substring(t.pos,t.end)),t._children&&(t._children=void 0),t.pos+=i,t.end+=i,c&&n(t)&&e.Debug.assert(r===s.substring(t.pos,t.end)),_(t,u,l),e.hasJSDocNodes(t))for(var d=0,p=t.jsDoc;d=r,"Adjusting an element that was entirely before the change range"),e.Debug.assert(t.pos<=n,"Adjusting an element that was entirely after the change range"),e.Debug.assert(t.pos<=t.end),t.pos=Math.min(t.pos,i),t.end>=n?t.end+=a:t.end=Math.min(t.end,i),e.Debug.assert(t.pos<=t.end),t.parent&&(e.Debug.assert(t.pos>=t.parent.pos),e.Debug.assert(t.end<=t.parent.end))}function a(t,r){if(r){var n=t.pos,i=function(t){e.Debug.assert(t.pos>=n),n=t.end};if(e.hasJSDocNodes(t))for(var a=0,o=t.jsDoc;ar),!0;if(a.pos>=i.pos&&(i=a),ri.pos&&(i=a)}return i}function c(t,r,n,i){var a=t.text;if(n&&(e.Debug.assert(a.length-n.span.length+n.newLength===r.length),i||e.Debug.shouldAssert(3))){var o=a.substr(0,n.span.start),s=r.substr(0,n.span.start);e.Debug.assert(o===s);var c=a.substring(e.textSpanEnd(n.span),a.length),u=r.substring(e.textSpanEnd(e.textChangeRangeNewSpan(n)),r.length);e.Debug.assert(c===u)}}var u;t.updateSourceFile=function(t,n,u,l){if(c(t,n,u,l=l||e.Debug.shouldAssert(2)),e.textChangeRangeIsUnchanged(u))return t;if(0===t.statements.length)return o.parseSourceFile(t.fileName,n,t.languageVersion,void 0,!0,t.scriptKind);var d=t;e.Debug.assert(!d.hasBeenIncrementallyParsed),d.hasBeenIncrementallyParsed=!0;var p=t.text,f=function(t){var r=t.statements,n=0;e.Debug.assert(n=t.pos&&e=t.pos&&e0&&i<=1;i++){var a=s(t,n);e.Debug.assert(a.pos<=n);var o=a.pos;n=Math.max(0,o-1)}var c=e.createTextSpanFromBounds(n,e.textSpanEnd(r.span)),u=r.newLength+(r.span.start-n);return e.createTextChangeRange(c,u)}(t,u);c(t,n,m,l),e.Debug.assert(m.span.start<=u.span.start),e.Debug.assert(e.textSpanEnd(m.span)===e.textSpanEnd(u.span)),e.Debug.assert(e.textSpanEnd(e.textChangeRangeNewSpan(m))===e.textSpanEnd(e.textChangeRangeNewSpan(u)));var g=e.textChangeRangeNewSpan(m).length-m.span.length;return function(t,n,o,s,c,u,l,d){return void p(t);function p(t){if(e.Debug.assert(t.pos<=t.end),t.pos>o)r(t,!1,c,u,l,d);else{var m=t.end;if(m>=n){if(t.intersectsChange=!0,t._children=void 0,i(t,n,o,s,c),_(t,p,f),e.hasJSDocNodes(t))for(var g=0,y=t.jsDoc;go)r(t,!0,c,u,l,d);else{var a=t.end;if(a>=n){t.intersectsChange=!0,t._children=void 0,i(t,n,o,s,c);for(var _=0,f=t;_/im,h=/^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im;function v(t,r,n){var i=2===r.kind&&y.exec(n);if(i){var a=i[1].toLowerCase(),o=e.commentPragmas[a];if(!(o&&1&o.kind))return;if(o.args){for(var s={},c=0,u=o.args;c=0)return c.push(e.createCompilerDiagnostic(e.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0,s.concat([u]).join(" -> "))),{raw:t||h(n,c)};var l=t?function(t,r,n,i,a){e.hasProperty(t,"excludes")&&a.push(e.createCompilerDiagnostic(e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));var o,s=F(t.compilerOptions,n,a,i),c=O(t.typeAcquisition||t.typingOptions,n,a,i);if(t.compileOnSave=function(t,r,n){if(!e.hasProperty(t,e.compileOnSaveCommandLineOption.name))return!1;var i=L(e.compileOnSaveCommandLineOption,t.compileOnSave,r,n);return"boolean"==typeof i&&i}(t,n,a),t.extends)if(e.isString(t.extends)){var u=i?T(i,n):n;o=P(t.extends,r,u,a,e.createCompilerDiagnostic)}else a.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"extends","string"));return{raw:t,options:s,typeAcquisition:c,extendedConfigPath:o}}(t,i,a,o,c):function(t,n,i,a,o){var s,c,u,l=w(a),_={onSetValidOptionKeyValueInParent:function(t,r,n){e.Debug.assert("compilerOptions"===t||"typeAcquisition"===t||"typingOptions"===t);var o="compilerOptions"===t?l:"typeAcquisition"===t?s||(s=I(a)):c||(c=I(a));o[r.name]=function t(r,n,i){if(k(i))return;if("list"===r.type){var a=r;return a.element.isFilePath||!e.isString(a.element.type)?e.filter(e.map(i,function(e){return t(a.element,n,e)}),function(e){return!!e}):i}if(!e.isString(r.type))return r.type.get(e.isString(i)?i.toLowerCase():i);return R(r,n,i)}(r,i,n)},onSetValidOptionKeyValueInRoot:function(r,s,c,l){switch(r){case"extends":var _=a?T(a,i):i;return void(u=P(c,n,_,o,function(r,n){return e.createDiagnosticForNodeInSourceFile(t,l,r,n)}));case"files":return void(0===c.length&&o.push(e.createDiagnosticForNodeInSourceFile(t,l,e.Diagnostics.The_files_list_in_config_file_0_is_empty,a||"tsconfig.json")))}},onSetUnknownOptionKeyValueInRoot:function(r,n,i,a){"excludes"===r&&o.push(e.createDiagnosticForNodeInSourceFile(t,n,e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude))}},d=v(t,o,!0,(void 0===r&&(r={name:void 0,type:"object",elementOptions:y([{name:"compilerOptions",type:"object",elementOptions:y(e.optionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_compiler_option_0},{name:"typingOptions",type:"object",elementOptions:y(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"typeAcquisition",type:"object",elementOptions:y(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"extends",type:"string"},{name:"references",type:"list",element:{name:"references",type:"object"}},{name:"files",type:"list",element:{name:"files",type:"string"}},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},e.compileOnSaveCommandLineOption])}),r),_);s||(s=c?void 0!==c.enableAutoDiscovery?{enable:c.enableAutoDiscovery,include:c.include,exclude:c.exclude}:c:I(a));return{raw:d,options:l,typeAcquisition:s,extendedConfigPath:u}}(n,i,a,o,c);if(l.extendedConfigPath){s=s.concat([u]);var _=function(t,r,n,i,a,o){var s,c=m(r,function(e){return n.readFile(e)});t&&(t.extendedSourceFiles||(t.extendedSourceFiles=[])).push(c.fileName);if(c.parseDiagnostics.length)return void o.push.apply(o,c.parseDiagnostics);var u=e.getDirectoryPath(r),l=A(void 0,c,n,u,e.getBaseFileName(r),a,o);t&&(s=t.extendedSourceFiles).push.apply(s,c.extendedSourceFiles);if(N(l)){var _=e.convertToRelativePath(u,i,e.identity),d=function(t){return e.isRootedDiskPath(t)?t:e.combinePaths(_,t)},p=function(t){f[t]&&(f[t]=e.map(f[t],d))},f=l.raw;p("include"),p("exclude"),p("files")}return l}(n,l.extendedConfigPath,i,a,s,c);if(_&&N(_)){var d=_.raw,p=l.raw,f=function(e){var t=p[e]||d[e];t&&(p[e]=t)};f("include"),f("exclude"),f("files"),void 0===p.compileOnSave&&(p.compileOnSave=d.compileOnSave),l.options=e.assign({},_.options,l.options)}}return l}function P(t,r,n,i,a){if(t=e.normalizeSlashes(t),e.isRootedDiskPath(t)||e.startsWith(t,"./")||e.startsWith(t,"../")){var o=e.getNormalizedAbsolutePath(t,n);if(r.fileExists(o)||e.endsWith(o,".json")||(o+=".json",r.fileExists(o)))return o;i.push(a(e.Diagnostics.File_0_does_not_exist,t))}else i.push(a(e.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not,t))}function w(t){return t&&"jsconfig.json"===e.getBaseFileName(t)?{allowJs:!0,maxNodeModuleJsDepth:2,allowSyntheticDefaultImports:!0,skipLibCheck:!0,noEmit:!0}:{}}function F(t,r,n,i){var a=w(i);return M(e.optionDeclarations,t,r,a,e.Diagnostics.Unknown_compiler_option_0,n),i&&(a.configFilePath=e.normalizeSlashes(i)),a}function I(t){return{enable:!!t&&"jsconfig.json"===e.getBaseFileName(t),include:[],exclude:[]}}function O(t,r,n,i){var o=I(i),s=a(t);return M(e.typeAcquisitionDeclarations,s,r,o,e.Diagnostics.Unknown_type_acquisition_option_0,n),o}function M(t,r,n,i,a,o){if(r){var s=y(t);for(var c in r){var u=s.get(c);u?i[u.name]=L(u,r[c],n,o):o.push(e.createCompilerDiagnostic(a,c))}}}function L(t,r,n,i){if(x(t,r)){var a=t.type;return"list"===a&&e.isArray(r)?function(t,r,n,i){return e.filter(e.map(r,function(e){return L(t.element,e,n,i)}),function(e){return!!e})}(t,r,n,i):e.isString(a)?R(t,n,r):B(t,r,i)}i.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,t.name,b(t)))}function R(t,r,n){return t.isFilePath&&""===(n=e.normalizePath(e.combinePaths(r,n)))&&(n="."),n}function B(e,t,r){if(!k(t)){var n=t.toLowerCase(),i=e.type.get(n);if(void 0!==i)return i;r.push(s(e))}}function j(e){return"function"==typeof e.trim?e.trim():e.replace(/^[\s]+|[\s]+$/g,"")}e.libs=i.map(function(e){return e[0]}),e.libMap=e.createMapFromEntries(i),e.optionDeclarations=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_this_message},{name:"help",shortName:"?",type:"boolean"},{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_all_compiler_options},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_the_compiler_s_version},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,paramType:e.Diagnostics.FILE_OR_DIRECTORY,description:e.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Watch_input_files},{name:"target",shortName:"t",type:e.createMapFromTemplate({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,esnext:6}),paramType:e.Diagnostics.VERSION,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT},{name:"module",shortName:"m",type:e.createMapFromTemplate({none:e.ModuleKind.None,commonjs:e.ModuleKind.CommonJS,amd:e.ModuleKind.AMD,system:e.ModuleKind.System,umd:e.ModuleKind.UMD,es6:e.ModuleKind.ES2015,es2015:e.ModuleKind.ES2015,esnext:e.ModuleKind.ESNext}),paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext},{name:"lib",type:"list",element:{name:"lib",type:e.libMap},showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_library_files_to_be_included_in_the_compilation},{name:"allowJs",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Allow_javascript_files_to_be_compiled},{name:"checkJs",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Report_errors_in_js_files},{name:"jsx",type:e.createMapFromTemplate({preserve:1,"react-native":3,react:2}),paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react},{name:"declaration",shortName:"d",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_d_ts_file},{name:"declarationMap",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file},{name:"emitDeclarationOnly",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Only_emit_d_ts_declaration_files},{name:"sourceMap",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_map_file},{name:"outFile",type:"string",isFilePath:!0,paramType:e.Diagnostics.FILE,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Concatenate_and_emit_output_to_single_file},{name:"outDir",type:"string",isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Redirect_output_structure_to_the_directory},{name:"rootDir",type:"string",isFilePath:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir},{name:"composite",type:"boolean",isTSConfigOnly:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_project_compilation},{name:"removeComments",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_comments_to_output},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_outputs},{name:"importHelpers",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Import_emit_helpers_from_tslib},{name:"downlevelIteration",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3},{name:"isolatedModules",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule},{name:"strict",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_all_strict_type_checking_options},{name:"noImplicitAny",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type},{name:"strictNullChecks",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_null_checks},{name:"strictFunctionTypes",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_function_types},{name:"strictPropertyInitialization",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_property_initialization_in_classes},{name:"noImplicitThis",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type},{name:"alwaysStrict",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file},{name:"noUnusedLocals",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_locals},{name:"noUnusedParameters",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_parameters},{name:"noImplicitReturns",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value},{name:"noFallthroughCasesInSwitch",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement},{name:"moduleResolution",type:e.createMapFromTemplate({node:e.ModuleResolutionKind.NodeJs,classic:e.ModuleResolutionKind.Classic}),paramType:e.Diagnostics.STRATEGY,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6},{name:"baseUrl",type:"string",isFilePath:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Base_directory_to_resolve_non_absolute_module_names},{name:"paths",type:"object",isTSConfigOnly:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_folders_to_include_type_definitions_from},{name:"types",type:"list",element:{name:"types",type:"string"},showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Type_declaration_files_to_be_included_in_compilation},{name:"allowSyntheticDefaultImports",type:"boolean",category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking},{name:"esModuleInterop",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports},{name:"preserveSymlinks",type:"boolean",category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Do_not_resolve_the_real_path_of_symlinks},{name:"sourceRoot",type:"string",paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations},{name:"mapRoot",type:"string",paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSourceMap",type:"boolean",category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file},{name:"inlineSources",type:"boolean",category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set},{name:"experimentalDecorators",type:"boolean",category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_ES7_decorators},{name:"emitDecoratorMetadata",type:"boolean",category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators},{name:"jsxFactory",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h},{name:"diagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_diagnostic_information},{name:"extendedDiagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_verbose_diagnostic_information},{name:"traceResolution",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Enable_tracing_of_the_name_resolution_process},{name:"resolveJsonModule",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Include_modules_imported_with_json_extension},{name:"listFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_files_part_of_the_compilation},{name:"listEmittedFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_generated_files_part_of_the_compilation},{name:"out",type:"string",isFilePath:!1,category:e.Diagnostics.Advanced_Options,paramType:e.Diagnostics.FILE,description:e.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file},{name:"reactNamespace",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit},{name:"skipDefaultLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files},{name:"charset",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_character_set_of_the_input_files},{name:"emitBOM",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files},{name:"locale",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us},{name:"newLine",type:e.createMapFromTemplate({crlf:0,lf:1}),paramType:e.Diagnostics.NEWLINE,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix},{name:"noErrorTruncation",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_truncate_error_messages},{name:"noLib",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts},{name:"noResolve",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files},{name:"stripInternal",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation},{name:"disableSizeLimit",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_size_limitations_on_JavaScript_projects},{name:"noImplicitUseStrict",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_use_strict_directives_in_module_output},{name:"noEmitHelpers",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output},{name:"noEmitOnError",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported},{name:"preserveConstEnums",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code},{name:"declarationDir",type:"string",isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Output_directory_for_generated_declaration_files},{name:"skipLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Skip_type_checking_of_declaration_files},{name:"allowUnusedLabels",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unused_labels},{name:"allowUnreachableCode",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unreachable_code},{name:"suppressExcessPropertyErrors",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_excess_property_checks_for_object_literals},{name:"suppressImplicitAnyIndexErrors",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures},{name:"forceConsistentCasingInFileNames",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file},{name:"maxNodeModuleJsDepth",type:"number",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files},{name:"noStrictGenericChecks",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types},{name:"keyofStringsOnly",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:e.Diagnostics.List_of_language_service_plugins}],e.typeAcquisitionDeclarations=[{name:"enableAutoDiscovery",type:"boolean"},{name:"enable",type:"boolean"},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}}],e.defaultInitCompilerOptions={module:e.ModuleKind.CommonJS,target:1,strict:!0,esModuleInterop:!0},e.convertEnableAutoDiscoveryToEnable=a,e.createCompilerDiagnosticForInvalidCustomType=s,e.parseCustomTypeOption=u,e.parseListTypeOption=l,e.parseCommandLine=function(t,r){var n={},i=[],a=[];return o(t),{options:n,fileNames:i,projectReferences:void 0,errors:a};function o(t){for(var r=0;r=n.length)break;var c=s;if(34===n.charCodeAt(c)){for(s++;s32;)s++;i.push(n.substring(c,s))}}o(i)}else a.push(e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t))}},e.getOptionFromName=_,e.printVersion=function(){e.sys.write(d(e.Diagnostics.Version_0,e.version)+e.sys.newLine)},e.printHelp=function(t,r){void 0===r&&(r="");var n=[],i=d(e.Diagnostics.Syntax_Colon_0,"").length,a=d(e.Diagnostics.Examples_Colon_0,"").length,o=Math.max(i,a),s=P(o-i);s+="tsc "+r+"["+d(e.Diagnostics.options)+"] ["+d(e.Diagnostics.file)+"...]",n.push(d(e.Diagnostics.Syntax_Colon_0,s)),n.push(e.sys.newLine+e.sys.newLine);var c=P(o);n.push(d(e.Diagnostics.Examples_Colon_0,P(o-a)+"tsc hello.ts")+e.sys.newLine),n.push(c+"tsc --outFile file.js file.ts"+e.sys.newLine),n.push(c+"tsc @args.txt"+e.sys.newLine),n.push(c+"tsc --build tsconfig.json"+e.sys.newLine),n.push(e.sys.newLine),n.push(d(e.Diagnostics.Options_Colon)+e.sys.newLine),o=0;for(var u=[],l=[],_=e.createMap(),p=0,f=t;p";u.push(v),l.push(d(e.Diagnostics.Insert_command_line_options_and_files_from_a_file)),o=Math.max(v.length,o);for(var b=0;b0)for(var v=0,b=a.readDirectory(r,f,d,_,void 0);vr.length){var g=m.substring(r.length+1);n=(e.forEach(e.supportedJavascriptExtensions,function(t){return e.tryRemoveExtension(g,t)})||g)+".d.ts"}else n="index.d.ts"}}e.endsWith(n,".d.ts")||(n=S(n));var y="string"==typeof p.name&&"string"==typeof p.version?{name:p.name,subModuleName:n,version:p.version}:void 0;return c&&(y?t(s,e.Diagnostics.Found_package_json_at_0_Package_ID_is_1,d,e.packageIdToString(y)):t(s,e.Diagnostics.Found_package_json_at_0,d)),{found:!0,packageJsonContent:p,packageId:y}}return _&&c&&t(s,e.Diagnostics.File_0_does_not_exist,d),i.push(d),{found:!1,packageJsonContent:void 0,packageId:void 0}}function w(t){return e.combinePaths(t,"package.json")}function F(t,r,n,a,o,s){var c,u,l=e.normalizePath(e.combinePaths(n,r)),_=P(l,"",o,!a,s);if(_.found)c=_.packageJsonContent,u=_.packageId;else{var d=I(r),p=d.packageName,f=d.rest;if(""!==f)u=P(e.combinePaths(n,p),f,o,!a,s).packageId}return i(u,T(t,l,o,!a,s)||A(t,l,o,!a,s,c))}function I(t){var r=t.indexOf(e.directorySeparator);return"@"===t[0]&&(r=t.indexOf(e.directorySeparator,r+1)),-1===r?{packageName:t,rest:""}:{packageName:t.slice(0,r),rest:t.slice(r+1)}}function O(e,t,r,n,i,a){return M(e,t,r,n,i,!1,a)}function M(t,r,n,i,a,o,s){var c=s&&s.getOrCreateCacheForModuleName(r);return e.forEachAncestorDirectory(e.normalizeSlashes(n),function(n){if("node_modules"!==e.getBaseFileName(n)){var s=J(c,r,n,a.traceEnabled,a.host,i);return s||K(L(t,r,n,i,a,o))}})}function L(r,n,i,a,s,c){void 0===c&&(c=!1);var u=e.combinePaths(i,"node_modules"),l=D(u,s.host);!l&&s.traceEnabled&&t(s.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,u);var _=c?void 0:F(r,n,u,l,a,s);if(_)return _;if(r!==o.JavaScript&&r!==o.Json){var d=e.combinePaths(u,"@types"),p=l;return l&&!D(d,s.host)&&(s.traceEnabled&&t(s.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,d),p=!1),F(o.DtsOnly,function(r,n){var i=B(r);n.traceEnabled&&i!==r&&t(n.host,e.Diagnostics.Scoped_package_detected_looking_in_0,i);return i}(n,s),d,p,a,s)}}e.directoryProbablyExists=D,e.getPackageName=I;var R="__";function B(t){if(e.startsWith(t,"@")){var r=t.replace(e.directorySeparator,R);if(r!==t)return r.slice(1)}return t}function j(t){return e.stringContains(t,R)?"@"+t.replace(R,e.directorySeparator):t}function J(r,n,i,a,o,s){var c=r&&r.get(i);if(c)return a&&t(o,e.Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1,n,i),s.push.apply(s,c.failedLookupLocations),{value:c.resolvedModule&&{path:c.resolvedModule.resolvedFileName,extension:c.resolvedModule.extension,packageId:c.resolvedModule.packageId}}}function z(t,n,i,a,s){var u=r(i,a),l={compilerOptions:i,host:a,traceEnabled:u},_=[],d=e.getDirectoryPath(n),p=f(o.TypeScript)||f(o.JavaScript);return c(p&&p.value,void 0,!1,_);function f(r){var n=m(r,t,d,k,_,l);if(n)return{value:n};var i=s&&s.getOrCreateCacheForModuleName(t);if(e.isExternalModuleNameRelative(t)){var c=e.normalizePath(e.combinePaths(d,t));return K(k(r,c,_,!1,l))}var p=e.forEachAncestorDirectory(d,function(n){var o=J(i,t,n,u,a,_);if(o)return o;var s=e.normalizePath(e.combinePaths(n,t));return K(k(r,s,_,!1,l))});return p||(r===o.TypeScript?function(e,t,r,n){return M(o.DtsOnly,e,t,r,n,!0,void 0)}(t,d,_,l):void 0)}}function K(e){return void 0!==e?{value:e}:void 0}e.getTypesPackageName=function(e){return"@types/"+B(e)},e.getMangledNameForScopedPackage=B,e.getPackageNameFromAtTypesDirectory=function(t){var r=e.removePrefix(t,"@types/");return r!==t?j(r):t},e.getUnmangledNameForScopedPackage=j,e.classicNameResolver=z,e.loadModuleFromGlobalCache=function(n,i,a,s,u){var l=r(a,s);l&&t(s,e.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,i,n,u);var _={compilerOptions:a,host:s,traceEnabled:l},d=[];return c(L(o.DtsOnly,n,u,d,_),void 0,!0,d)}}(s||(s={})),function(e){var t;function r(t){return t.body?function t(n){switch(n.kind){case 239:case 240:return 0;case 241:if(e.isEnumConst(n))return 2;break;case 247:case 246:if(!e.hasModifier(n,1))return 0;break;case 243:var i=0;return e.forEachChild(n,function(r){var n=t(r);switch(n){case 0:return;case 2:return void(i=2);case 1:return i=1,!0;default:e.Debug.assertNever(n)}}),i;case 242:return r(n);case 71:if(n.isInJSDocNamespace)return 0}return 1}(t.body):1}!function(e){e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly"}(e.ModuleInstanceState||(e.ModuleInstanceState={})),e.getModuleInstanceState=r,function(e){e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethod=128]="IsObjectLiteralOrClassExpressionMethod"}(t||(t={}));var i=function(){var t,i,d,p,f,m,g,y,h,v,b,x,S,D,k,T,C,E,N,A,P,w,F,I,O=0,M={flags:1},L={flags:1},R=0;function B(r,n,i,a,o){return e.createDiagnosticForNodeInSourceFile(e.getSourceFileOfNode(r)||t,r,n,i,a,o)}return function(r,n){t=r,i=n,d=e.getEmitScriptTarget(i),P=function(t,r){return!(!e.getStrictOptionValue(r,"alwaysStrict")||t.isDeclarationFile)||!!t.externalModuleIndicator}(t,n),F=e.createUnderscoreEscapedMap(),O=0,I=t.isDeclarationFile,w=e.objectAllocator.getSymbolConstructor(),t.locals||(Ne(t),t.symbolCount=O,t.classifiableNames=F,function(){if(!h)return;for(var r=f,n=y,i=g,a=p,o=b,s=0,c=h;s=108&&r.originalKeywordKind<=116)||e.isIdentifierName(r)||4194304&r.flags||t.parseDiagnostics.length||t.bindDiagnostics.push(B(r,function(r){if(e.getContainingClass(r))return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;if(t.externalModuleIndicator)return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(r),e.declarationNameToString(r)))}function De(r,n){if(n&&71===n.kind){var i=n;if(o=i,e.isIdentifier(o)&&("eval"===o.escapedText||"arguments"===o.escapedText)){var a=e.getErrorSpanForNode(t,n);t.bindDiagnostics.push(e.createFileDiagnostic(t,a.start,a.length,function(r){if(e.getContainingClass(r))return e.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode;if(t.externalModuleIndicator)return e.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Invalid_use_of_0_in_strict_mode}(r),e.idText(i)))}}var o}function ke(e){P&&De(e,e.name)}function Te(r){if(d<2&&277!==g.kind&&242!==g.kind&&!e.isFunctionLike(g)){var n=e.getErrorSpanForNode(t,r);t.bindDiagnostics.push(e.createFileDiagnostic(t,n.start,n.length,function(r){if(e.getContainingClass(r))return e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode;if(t.externalModuleIndicator)return e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5}(r)))}}function Ce(r,n,i,a,o){var s=e.getSpanOfTokenAtPosition(t,r.pos);t.bindDiagnostics.push(e.createFileDiagnostic(t,s.start,s.length,n,i,a,o))}function Ee(r,i,a,o){!function(r,i,a){var o=e.createFileDiagnostic(t,i.pos,i.end-i.pos,a);r?t.bindDiagnostics.push(o):t.bindSuggestionDiagnostics=e.append(t.bindSuggestionDiagnostics,n({},o,{category:e.DiagnosticCategory.Suggestion}))}(r,{pos:e.getTokenPosOfNode(i,t),end:a.end},o)}function Ne(r){if(r){r.parent=p;var n=P;if(function(r){switch(r.kind){case 71:if(r.isInJSDocNamespace){for(var n=r.parent;n&&!e.isJSDocTypeAlias(n);)n=n.parent;xe(n,524288,67901928);break}case 99:return b&&(e.isExpression(r)||274===p.kind)&&(r.flowNode=b),Se(r);case 187:b&&Q(r)&&(r.flowNode=b),e.isSpecialPropertyDeclaration(r)&&function(t){99===t.expression.kind?Oe(t):e.isPropertyAccessEntityNameExpression(t)&&277===t.parent.parent.kind&&(e.isPrototypeAccess(t.expression)?Me(t,t.parent):Le(t))}(r);break;case 202:var i=e.getSpecialPropertyAssignmentKind(r);switch(i){case 1:Ie(r);break;case 2:!function(r){if(!Fe(r))return;var n=e.getRightMostAssignedExpression(r.right);if(e.isEmptyObjectLiteral(n)||f===t&&o(t,n))return;var i=e.exportAssignmentIsAlias(r)?2097152:1049092;K(t.symbol.exports,t.symbol,r,i,0)}(r);break;case 3:Me(r.left,r);break;case 6:!function(e){e.left.parent=e,e.right.parent=e;var t=e.left;Re(t,t,!1)}(r);break;case 4:Oe(r);break;case 5:!function(r){var n=r.left;r.left.parent=r,r.right.parent=r,e.isIdentifier(n.expression)&&f===t&&s(t,n.expression)?Ie(r):Le(n)}(r);break;case 0:break;default:e.Debug.fail("Unknown special property assignment kind")}return function(t){P&&e.isLeftHandSideExpression(t.left)&&e.isAssignmentOperator(t.operatorToken.kind)&&De(t,t.left)}(r);case 272:return function(e){P&&e.variableDeclaration&&De(e,e.variableDeclaration.name)}(r);case 196:return function(r){if(P&&71===r.expression.kind){var n=e.getErrorSpanForNode(t,r.expression);t.bindDiagnostics.push(e.createFileDiagnostic(t,n.start,n.length,e.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}(r);case 8:return function(r){P&&32&r.numericLiteralFlags&&t.bindDiagnostics.push(B(r,e.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode))}(r);case 201:return function(e){P&&De(e,e.operand)}(r);case 200:return function(e){P&&(43!==e.operator&&44!==e.operator||De(e,e.operand))}(r);case 229:return function(t){P&&Ce(t,e.Diagnostics.with_statements_are_not_allowed_in_strict_mode)}(r);case 176:return void(v=!0);case 161:break;case 148:return function(t){if(e.isJSDocTemplateTag(t.parent)){var r=e.find(t.parent.parent.tags,e.isJSDocTypeAlias)||e.getHostSignatureFromJSDoc(t.parent);r?(r.locals||(r.locals=e.createSymbolTable()),K(r.locals,void 0,t,262144,67639784)):ye(t,262144,67639784)}else if(174===t.parent.kind){var n=function(t){var r=e.findAncestor(t,function(t){return t.parent&&e.isConditionalTypeNode(t.parent)&&t.parent.extendsType===t});return r&&r.parent}(t.parent);n?(n.locals||(n.locals=e.createSymbolTable()),K(n.locals,void 0,t,262144,67639784)):be(t,262144,z(t))}else ye(t,262144,67639784)}(r);case 149:return ze(r);case 235:return Je(r);case 184:return r.flowNode=b,Je(r);case 152:case 151:return function(e){return Ke(e,4|(e.questionToken?16777216:0),0)}(r);case 273:case 274:return Ke(r,4,0);case 276:return Ke(r,8,68008959);case 158:case 159:case 160:return ye(r,131072,0);case 154:case 153:return Ke(r,8192|(r.questionToken?16777216:0),e.isObjectLiteralMethod(r)?0:67208127);case 237:return function(r){t.isDeclarationFile||4194304&r.flags||e.isAsyncFunction(r)&&(A|=1024);ke(r),P?(Te(r),xe(r,16,67215791)):ye(r,16,67215791)}(r);case 155:return ye(r,16384,0);case 156:return Ke(r,32768,67150783);case 157:return Ke(r,65536,67183551);case 163:case 287:case 291:case 164:return function(t){var r=j(131072,z(t));J(r,t,131072);var n=j(2048,"__type");J(n,t,2048),n.members=e.createSymbolTable(),n.members.set(r.escapedName,r)}(r);case 166:case 290:case 179:return function(e){return be(e,2048,"__type")}(r);case 186:return function(r){var n;if(function(e){e[e.Property=1]="Property",e[e.Accessor=2]="Accessor"}(n||(n={})),P)for(var i=e.createUnderscoreEscapedMap(),a=0,o=r.properties;a145){var i=p;p=r;var a=me(r);0===a?q(r):function(t,r){var n=f,i=m,a=g;1&r?(195!==t.kind&&(m=f),f=g=t,32&r&&(f.locals=e.createSymbolTable()),ge(f)):2&r&&((g=t).locals=void 0);if(4&r){var o=b,s=x,c=S,u=D,l=E,_=N,d=16&r&&!e.hasModifier(t,256)&&!t.asteriskToken&&!!e.getImmediatelyInvokedFunctionExpression(t);d||(b={flags:2},144&r&&(b.container=t)),D=d||155===t.kind?Z():void 0,x=void 0,S=void 0,E=void 0,N=!1,q(t),t.flags&=-1409,!(1&b.flags)&&8&r&&e.nodeIsPresent(t.body)&&(t.flags|=128,N&&(t.flags|=256)),277===t.kind&&(t.flags|=A),D&&(re(D,b),b=se(D),155===t.kind&&(t.returnFlowNode=b)),d||(b=o),x=s,S=c,D=u,E=l,N=_}else 64&r?(v=!1,q(t),t.flags=v?64|t.flags:-65&t.flags):q(t);f=n,m=i,g=a}(r,a),p=i}else if(!I&&0==(536870912&r.transformFlags)){R|=u(r,0);var i=p;1===r.kind&&(p=r),Ae(r),p=i}P=n}}function Ae(t){if(e.hasJSDocNodes(t))if(e.isInJavaScriptFile(t))for(var r=0,n=t.jsDoc;r=161&&e<=181)return-3;switch(e){case 189:case 190:case 185:return 940049729;case 242:return 977327425;case 149:return 939525441;case 195:return 1003902273;case 194:case 237:return 1003935041;case 236:return 948962625;case 238:case 207:return 942011713;case 155:return 1003668801;case 154:case 156:case 157:return 1003668801;case 119:case 134:case 131:case 137:case 135:case 122:case 138:case 105:case 148:case 151:case 153:case 158:case 159:case 160:case 239:case 240:return-3;case 186:return 942740801;case 272:return 940574017;case 182:case 183:return 940049729;case 192:case 210:case 305:case 193:case 97:return 536872257;case 187:case 188:return 671089985;default:return 939525441}}function _(t,r){r.parent=t,e.forEachChild(r,function(e){return _(r,e)})}e.bindSourceFile=function(t,r){e.performance.mark("beforeBind"),i(t,r),e.performance.mark("afterBind"),e.performance.measure("Bind","beforeBind","afterBind")},e.isExportsOrModuleExportsOrAlias=o,e.computeTransformFlagsForNode=u,e.getTransformFlagsSubtreeExclusions=l}(s||(s={})),function(e){e.createGetSymbolWalker=function(t,r,n,i,a,o,s,c,u,l){return function(_){void 0===_&&(_=function(){return!0});var d=[],p=[];return{walkType:function(t){try{return f(t),{visitedTypes:e.getOwnValues(d),visitedSymbols:e.getOwnValues(p)}}finally{e.clear(d),e.clear(p)}},walkSymbol:function(t){try{return y(t),{visitedTypes:e.getOwnValues(d),visitedSymbols:e.getOwnValues(p)}}finally{e.clear(d),e.clear(p)}}};function f(t){if(t&&!d[t.id]){d[t.id]=t;var r=y(t.symbol);if(!r){if(131072&t.flags){var n=t,a=n.objectFlags;4&a&&function(t){f(t.target),e.forEach(t.typeArguments,f)}(t),32&a&&function(e){f(e.typeParameter),f(e.constraintType),f(e.templateType),f(e.modifiersType)}(t),3&a&&(g(o=t),e.forEach(o.typeParameters,f),e.forEach(i(o),f),f(o.thisType)),24&a&&g(n)}var o;65536&t.flags&&function(e){f(u(e))}(t),786432&t.flags&&function(t){e.forEach(t.types,f)}(t),1048576&t.flags&&function(e){f(e.type)}(t),2097152&t.flags&&function(e){f(e.objectType),f(e.indexType),f(e.constraint)}(t)}}}function m(i){var a=r(i);a&&f(a.type),e.forEach(i.typeParameters,f);for(var o=0,s=i.parameters;o0?e.createPropertyAccess(t(n,i-1),l):l}91===c&&(s=s.substring(1,s.length-1),c=s.charCodeAt(0));var _=void 0;return e.isSingleOrDoubleQuote(c)?(_=e.createLiteral(s.substring(1,s.length-1).replace(/\\./g,function(e){return e.substring(1)}))).singleQuote=39===c:""+ +s===s&&(_=e.createLiteral(+s)),_||((_=e.setEmitFlags(e.createIdentifier(s,a),16777216)).symbol=o),e.createElementAccess(t(n,i-1),_)}(i,i.length-1)}(r,t,n)})},symbolToTypeParameterDeclarations:function(e,r,n,i){return t(r,n,i,function(t){return f(e,t)})},symbolToParameterDeclaration:function(e,r,n,i){return t(r,n,i,function(t){return d(e,t)})},typeParameterToDeclaration:function(e,r,n,i){return t(r,n,i,function(t){return _(e,t)})}};function t(t,r,n,i){e.Debug.assert(void 0===t||0==(8&t.flags));var a={enclosingDeclaration:t,flags:r||0,tracker:n&&n.trackSymbol?n:{trackSymbol:e.noop},encounteredError:!1,visitedSymbols:void 0,inferTypeParameters:void 0,approximateLength:0},o=i(a);return a.encounteredError?void 0:o}function r(t){return t.truncating?t.truncating:t.truncating=!(1&t.flags)&&t.approximateLength>e.defaultMaximumTruncationLength}function n(t,_){m&&m.throwIfCancellationRequested&&m.throwIfCancellationRequested();var d=8388608&_.flags;if(_.flags&=-8388609,t){if(1&t.flags)return _.approximateLength+=3,e.createKeywordTypeNode(119);if(2&t.flags)return e.createKeywordTypeNode(142);if(4&t.flags)return _.approximateLength+=6,e.createKeywordTypeNode(137);if(8&t.flags)return _.approximateLength+=6,e.createKeywordTypeNode(134);if(16&t.flags)return _.approximateLength+=7,e.createKeywordTypeNode(122);if(512&t.flags&&!(262144&t.flags)){var p=bn(t.symbol),f=h(p,_,67901928,!1),g=ea(p)===t?f:e.createQualifiedName(f,e.symbolName(t.symbol));return _.approximateLength+=e.symbolName(t.symbol).length,e.createTypeReferenceNode(g,void 0)}if(544&t.flags){var v=h(t.symbol,_,67901928,!1);return _.approximateLength+=e.symbolName(t.symbol).length,e.createTypeReferenceNode(v,void 0)}if(64&t.flags)return _.approximateLength+=t.value.length+2,e.createLiteralTypeNode(e.setEmitFlags(e.createLiteral(t.value),16777216));if(128&t.flags)return _.approximateLength+=(""+t.value).length,e.createLiteralTypeNode(e.createLiteral(t.value));if(256&t.flags)return _.approximateLength+=t.intrinsicName.length,"true"===t.intrinsicName?e.createTrue():e.createFalse();if(2048&t.flags){if(!(1048576&_.flags)){if(Bn(t.symbol,_.enclosingDeclaration))return _.approximateLength+=6,y(t.symbol,_,67216319);_.tracker.reportInaccessibleUniqueSymbolError&&_.tracker.reportInaccessibleUniqueSymbolError()}return _.approximateLength+=13,e.createTypeOperatorNode(141,e.createKeywordTypeNode(138))}if(4096&t.flags)return _.approximateLength+=4,e.createKeywordTypeNode(105);if(8192&t.flags)return _.approximateLength+=9,e.createKeywordTypeNode(140);if(16384&t.flags)return _.approximateLength+=4,e.createKeywordTypeNode(95);if(32768&t.flags)return _.approximateLength+=5,e.createKeywordTypeNode(131);if(1024&t.flags)return _.approximateLength+=6,e.createKeywordTypeNode(138);if(16777216&t.flags)return _.approximateLength+=6,e.createKeywordTypeNode(135);if(65536&t.flags&&t.isThisType)return 4194304&_.flags&&(_.encounteredError||32768&_.flags||(_.encounteredError=!0),_.tracker.reportInaccessibleThisError&&_.tracker.reportInaccessibleThisError()),_.approximateLength+=4,e.createThis();var b=e.getObjectFlags(t);if(4&b)return e.Debug.assert(!!(131072&t.flags)),function(t){var r=t.typeArguments||e.emptyArray;if(t.target===Be){if(2&_.flags){var i=n(r[0],_);return e.createTypeReferenceNode("Array",[i])}var o=n(r[0],_);return e.createArrayTypeNode(o)}if(8&t.target.objectFlags){if(r.length>0){var s=es(t),c=a(r.slice(0,s),_),u=t.target.hasRestElement;if(c&&c.length>0){for(var l=t.target.minLength;l0){var S=(t.target.typeParameters||e.emptyArray).length;x=a(r.slice(l,S),_)}var D=_.flags;_.flags|=16;var k=y(t.symbol,_,67901928,x);return _.flags=D,p?M(p,k):k}(t);if(65536&t.flags||3&b){if(65536&t.flags&&e.contains(_.inferTypeParameters,t))return _.approximateLength+=e.symbolName(t.symbol).length+6,e.createInferTypeNode(u(t,_,void 0));if(4&_.flags&&65536&t.flags&&e.length(t.symbol.declarations)&&e.isTypeParameterDeclaration(t.symbol.declarations[0])&&c(t,_)&&!Rn(t.symbol,_.enclosingDeclaration)){var v=t.symbol.declarations[0].name;return _.approximateLength+=e.idText(v).length,e.createTypeReferenceNode(e.getGeneratedNameForNode(v,24),void 0)}return t.symbol?y(t.symbol,_,67901928):e.createTypeReferenceNode(e.createIdentifier("?"),void 0)}if(!d&&t.aliasSymbol&&(16384&_.flags||Rn(t.aliasSymbol,_.enclosingDeclaration))){var x=a(t.aliasTypeArguments,_);return!An(t.aliasSymbol.escapedName)||32&t.aliasSymbol.flags?y(t.aliasSymbol,_,67901928,x):e.createTypeReferenceNode(e.createIdentifier(""),x)}if(!(786432&t.flags)){if(48&b)return e.Debug.assert(!!(131072&t.flags)),I(t);if(1048576&t.flags){var S=t.type;_.approximateLength+=6;var D=n(S,_);return e.createTypeOperatorNode(D)}if(2097152&t.flags){var k=n(t.objectType,_),D=n(t.indexType,_);return _.approximateLength+=2,e.createIndexedAccessTypeNode(k,D)}if(4194304&t.flags){var T=n(t.checkType,_),C=_.inferTypeParameters;_.inferTypeParameters=t.root.inferTypeParameters;var E=n(t.extendsType,_);_.inferTypeParameters=C;var N=n(mc(t),_),A=n(gc(t),_);return _.approximateLength+=15,e.createConditionalTypeNode(T,E,N,A)}return 8388608&t.flags?n(t.typeVariable,_):e.Debug.fail("Should be unreachable.")}var P=262144&t.flags?function(e){for(var t=[],r=0,n=0;n0){var F=e.createUnionOrIntersectionTypeNode(262144&t.flags?171:172,w);return F}_.encounteredError||262144&_.flags||(_.encounteredError=!0)}else _.encounteredError=!0;function I(t){var r,n=t.symbol;if(n){var i=16&e.getObjectFlags(t)&&t.symbol&&32&t.symbol.flags;if(r=(i?"+":"")+l(n),Xp(n.valueDeclaration)){var a=t===$p(n)?67901928:67216319;return y(n,_,a)}if(32&n.flags&&!Ni(n)&&!(207===n.valueDeclaration.kind&&2048&_.flags)||896&n.flags||function(){var t=!!(8192&n.flags)&&e.some(n.declarations,function(t){return e.hasModifier(t,32)}),i=!!(16&n.flags)&&(n.parent||e.forEach(n.declarations,function(e){return 277===e.parent.kind||243===e.parent.kind}));if(t||i)return(!!(4096&_.flags)||_.visitedSymbols&&_.visitedSymbols.has(r))&&(!(8&_.flags)||Bn(n,_.enclosingDeclaration))}())return y(n,_,67216319);if(_.visitedSymbols&&_.visitedSymbols.has(r)){var o=function(t){if(t.symbol&&2048&t.symbol.flags){var r=e.findAncestor(t.symbol.declarations[0].parent,function(e){return 175!==e.kind});if(240===r.kind)return vn(r)}}(t);return o?y(o,_,67901928):(_.approximateLength+=3,e.createKeywordTypeNode(119))}_.visitedSymbols||(_.visitedSymbols=e.createMap()),_.visitedSymbols.set(r,!0);var s=O(t);return _.visitedSymbols.delete(r),s}return O(t)}function O(t){if(za(t))return function(t){e.Debug.assert(!!(131072&t.flags));var r,i=t.declaration.readonlyToken?e.createToken(t.declaration.readonlyToken.kind):void 0,a=t.declaration.questionToken?e.createToken(t.declaration.questionToken.kind):void 0;r=La(t)?e.createTypeOperatorNode(n(Ra(t),_)):n(Ia(t),_);var o=u(Fa(t),_,r),s=n(Oa(t),_),c=e.createMappedTypeNode(i,o,a,s);return _.approximateLength+=10,e.setEmitFlags(c,1)}(t);var a=Ka(t);if(!a.properties.length&&!a.stringIndexInfo&&!a.numberIndexInfo){if(!a.callSignatures.length&&!a.constructSignatures.length)return _.approximateLength+=2,e.setEmitFlags(e.createTypeLiteralNode(void 0),1);if(1===a.callSignatures.length&&!a.constructSignatures.length){var c=a.callSignatures[0],l=s(c,163,_);return l}if(1===a.constructSignatures.length&&!a.callSignatures.length){var c=a.constructSignatures[0],l=s(c,164,_);return l}}var d=_.flags;_.flags|=4194304;var p=function(t){if(r(_))return[e.createPropertySignature(void 0,"...",void 0,void 0,void 0)];for(var n=[],a=0,c=t.callSignatures;a2)return[n(t[0],i),e.createTypeReferenceNode("... "+(t.length-2)+" more ...",void 0),n(t[t.length-1],i)]}for(var o=[],s=0,c=0,u=t;c=o?4096:0,c=br(1,i,a);return c.type=n===s?Ls(e):e,c});return e.concatenate(t.parameters.slice(0,r),c)}}return t.parameters}(t).map(function(e){return d(e,i,155===r)});if(t.thisParameter){var u=d(t.thisParameter,i);c.unshift(u)}var l=Io(t);if(l){var p=1===l.kind?e.setEmitFlags(e.createIdentifier(l.parameterName),16777216):e.createThisTypeNode(),f=n(l.type,i);s=e.createTypePredicateNode(p,f)}else{var m=Oo(t);s=m&&n(m,i)}return 256&i.flags?s&&119===s.kind&&(s=void 0):s||(s=e.createKeywordTypeNode(119)),i.approximateLength+=3,e.createSignatureDeclaration(r,a,c,s,o)}function c(e,t){return!!Mr(t.enclosingDeclaration,e.symbol.escapedName,67901928,void 0,e.symbol.escapedName,!1)}function u(t,r,i){var a=r.flags;r.flags&=-513;var o=4&r.flags&&t.symbol.declarations[0]&&e.isTypeParameterDeclaration(t.symbol.declarations[0])&&c(t,r),s=o?e.getGeneratedNameForNode(t.symbol.declarations[0].name,24):h(t.symbol,r,67901928,!0),u=no(t),l=u&&n(u,r);return r.flags=a,e.createTypeParameterDeclaration(s,i,l)}function _(e,t,r){void 0===r&&(r=Ga(e));var i=r&&n(r,t);return u(e,t,i)}function d(t,r,i){var a=e.getDeclarationOfKind(t,149);a||xr(t)||(a=e.getDeclarationOfKind(t,296));var o=wi(t);a&&yy(a)&&(o=il(o));var s=n(o,r),c=!(8192&r.flags)&&i&&a&&a.modifiers?a.modifiers.map(e.getSynthesizedClone):void 0,u=a&&e.isRestParameter(a)||8192&e.getCheckFlags(t),l=u?e.createToken(24):void 0,_=a&&a.name?71===a.name.kind?e.setEmitFlags(e.getSynthesizedClone(a.name),16777216):146===a.name.kind?e.setEmitFlags(e.getSynthesizedClone(a.name.right),16777216):function t(r){var n=e.visitEachChild(r,t,e.nullTransformationContext,void 0,t),i=e.nodeIsSynthesized(n)?n:e.getSynthesizedClone(n);return 184===i.kind&&(i.initializer=void 0),e.setEmitFlags(i,16777217)}(a.name):e.symbolName(t),d=a&&xo(a)||4096&e.getCheckFlags(t),p=d?e.createToken(55):void 0,f=e.createParameter(void 0,c,l,_,p,s,void 0);return r.approximateLength+=e.symbolName(t).length+3,f}function p(t,r,n,i){var a;r.tracker.trackSymbol(t,r.enclosingDeclaration,n);var o=262144&t.flags;return!o&&(r.enclosingDeclaration||64&r.flags)?(a=e.Debug.assertDefined(function t(n,a,o){var s=Mn(n,r.enclosingDeclaration,a,!!(128&r.flags));if(!s||Ln(s[0],r.enclosingDeclaration,1===s.length?a:On(a))){var c=xn(s?s[0]:n,r.enclosingDeclaration);if(e.length(c))for(var u=0,l=c;u0)):a=[t],a}function f(t,r){var n,i=Dg(t);return 524384&i.flags&&(n=e.createNodeArray(e.map(Bi(t),function(e){return _(e,r)}))),n}function g(t,r,n){e.Debug.assert(t&&0<=r&&r1?h(a,a.length-1,1):void 0,c=i||g(a,0,r),u=function(t,r){var n=e.getDeclarationOfKind(t,277);if(n&&void 0!==n.moduleName)return n.moduleName;if(n){if(!r.enclosingDeclaration||!r.tracker.moduleResolverHost)return t.escapedName.substring(1,t.escapedName.length-1);var i=e.getSourceFileOfNode(e.getOriginalNode(r.enclosingDeclaration)),a=Pr(t),o=a.specifierCache&&a.specifierCache.get(i.path);return o||(o=e.flatten(e.moduleSpecifiers.getModuleSpecifiers(t,E,i,r.tracker.moduleResolverHost,r.tracker.moduleResolverHost.getSourceFiles(),{importModuleSpecifierPreference:"non-relative"}))[0],a.specifierCache=a.specifierCache||e.createMap(),a.specifierCache.set(i.path,o)),o}if(r.tracker.trackReferencedAmbientModule){var s=e.filter(t.declarations,e.isAmbientModule);if(e.length(s))for(var c=0,u=s;ca){var l=h(t,n-1,a);return e.isEntityName(l)?e.createQualifiedName(l,_):e.Debug.fail("Impossible construct - an export of an indexed access cannot be reachable")}return _}}function h(t,r,n,i){var a=p(t,r,n);return!i||1===a.length||r.encounteredError||65536&r.flags||(r.encounteredError=!0),function t(n,i){var a=g(n,i,r),o=n[i];0===i&&(r.flags|=16777216);var s=Zn(o,r);0===i&&(r.flags^=16777216);var c=e.setEmitFlags(e.createIdentifier(s,a),16777216);return c.symbol=o,i>0?e.createQualifiedName(t(n,i-1),c):c}(a,a.length-1)}}(),j=br(4,"undefined");j.declarations=[];var J,z,K=br(4,"arguments"),U=br(4,"require"),q=br(4,"module"),V={getNodeCount:function(){return e.sum(a.getSourceFiles(),"nodeCount")},getIdentifierCount:function(){return e.sum(a.getSourceFiles(),"identifierCount")},getSymbolCount:function(){return e.sum(a.getSourceFiles(),"symbolCount")+S},getTypeCount:function(){return x},isUndefinedSymbol:function(e){return e===j},isArgumentsSymbol:function(e){return e===K},isUnknownSymbol:function(e){return e===Z},getMergedSymbol:hn,getDiagnostics:Wg,getGlobalDiagnostics:function(){return Hg(),Ht.getGlobalDiagnostics()},getTypeOfSymbolAtLocation:function(t,r){return(r=e.getParseTreeNode(r))?function(t,r){if(t=t.exportSymbol||t,71===r.kind&&(e.isRightSideOfQualifiedNameOrPropertyAccess(r)&&(r=r.parent),e.isExpressionNode(r)&&!e.isAssignmentTarget(r))){var n=em(r);if(Dn(wr(r).resolvedSymbol)===t)return n}return wi(t)}(t,r):ie},getSymbolsOfParameterPropertyDeclaration:function(t,r){var n=e.getParseTreeNode(t,e.isParameter);return void 0===n?e.Debug.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):function(t,r){var n=t.parent,i=t.parent.parent,a=Ir(n.locals,r,67216319),o=Ir(ya(i.symbol),r,67216319);return a&&o?[a,o]:e.Debug.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(n,e.escapeLeadingUnderscores(r))},getDeclaredTypeOfSymbol:ea,getPropertiesOfType:Wa,getPropertyOfType:function(t,r){return co(t,e.escapeLeadingUnderscores(r))},getTypeOfPropertyOfType:function(t,r){return si(t,e.escapeLeadingUnderscores(r))},getIndexInfoOfType:fo,getSignaturesOfType:lo,getIndexTypeOfType:mo,getBaseTypes:Vi,getBaseTypeOfLiteralType:Wu,getWidenedType:pl,getTypeFromTypeNode:function(t){var r=e.getParseTreeNode(t,e.isTypeNode);return r?Oc(r):ie},getParameterType:lf,getReturnTypeOfSignature:Oo,getNullableType:nl,getNonNullableType:al,typeToTypeNode:B.typeToTypeNode,indexInfoToIndexSignatureDeclaration:B.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:B.signatureToSignatureDeclaration,symbolToEntityName:B.symbolToEntityName,symbolToExpression:B.symbolToExpression,symbolToTypeParameterDeclarations:B.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:B.symbolToParameterDeclaration,typeParameterToDeclaration:B.typeParameterToDeclaration,getSymbolsInScope:function(t,r){return(t=e.getParseTreeNode(t))?function(t,r){if(8388608&t.flags)return[];var n=e.createSymbolTable(),i=!1;return function(){for(;t;){switch(t.locals&&!Fr(t)&&o(t.locals,r),t.kind){case 242:o(vn(t).exports,2623475&r);break;case 241:o(vn(t).exports,8&r);break;case 207:var n=t.name;n&&a(t.symbol,r);case 238:case 239:i||o(ya(vn(t)),67901928&r);break;case 194:var s=t.name;s&&a(t.symbol,r)}e.introducesArgumentsExoticObject(t)&&a(K,r),i=e.hasModifier(t,32),t=t.parent}o(xt,r)}(),ho(n);function a(t,r){if(e.getCombinedLocalAndExportSymbolFlags(t)&r){var i=t.escapedName;n.has(i)||n.set(i,t)}}function o(e,t){t&&e.forEach(function(e){a(e,t)})}}(t,r):[]},getSymbolAtLocation:function(t){return(t=e.getParseTreeNode(t))?ey(t):void 0},getShorthandAssignmentValueSymbol:function(t){return(t=e.getParseTreeNode(t))?function(e){if(e&&274===e.kind)return nn(e.name,69313471)}(t):void 0},getExportSpecifierLocalTargetSymbol:function(t){var r=e.getParseTreeNode(t,e.isExportSpecifier);return r?function(e){return e.parent.parent.moduleSpecifier?Hr(e.parent.parent,e):nn(e.propertyName||e.name,70107135)}(r):void 0},getExportSymbolOfSymbol:function(e){return hn(e.exportSymbol||e)},getTypeAtLocation:function(t){return(t=e.getParseTreeNode(t))?ty(t):ie},getPropertySymbolOfDestructuringAssignment:function(t){var r=e.getParseTreeNode(t,e.isIdentifier);return r?function(t){var r=function t(r){if(e.Debug.assert(186===r.kind||185===r.kind),225===r.parent.kind){var n=og(r.parent.expression,r.parent.awaitModifier);return zf(r,n||ie)}if(202===r.parent.kind){var n=em(r.parent.right);return zf(r,n||ie)}if(273===r.parent.kind){var i=t(r.parent.parent);return jf(i||ie,r.parent)}e.Debug.assert(185===r.parent.kind);var a=t(r.parent),o=sg(a||ie,r.parent,!1,!1)||ie;return Jf(r.parent,a,r.parent.elements.indexOf(r),o||ie)}(t.parent.parent);return r&&co(r,t.escapedText)}(r):void 0},signatureToString:function(t,r,n,i){return Wn(t,e.getParseTreeNode(r),n,i)},typeToString:function(t,r,n){return Hn(t,e.getParseTreeNode(r),n)},symbolToString:function(t,r,n,i){return Vn(t,e.getParseTreeNode(r),n,i)},typePredicateToString:function(t,r,n){return Xn(t,e.getParseTreeNode(r),n)},writeSignature:function(t,r,n,i,a){return Wn(t,e.getParseTreeNode(r),n,i,a)},writeType:function(t,r,n,i){return Hn(t,e.getParseTreeNode(r),n,i)},writeSymbol:function(t,r,n,i,a){return Vn(t,e.getParseTreeNode(r),n,i,a)},writeTypePredicate:function(t,r,n,i){return Xn(t,e.getParseTreeNode(r),n,i)},getAugmentedPropertiesOfType:ny,getRootSymbols:function t(r){var n=function(t){if(6&e.getCheckFlags(t))return e.mapDefined(Pr(t).containingType.types,function(e){return co(e,t.escapedName)});if(33554432&t.flags){var r=t,n=r.leftSpread,i=r.rightSpread,a=r.syntheticOrigin;return n?[n,i]:a?[a]:e.singleElementArray(function(e){for(var t,r=e;r=Pr(r).target;)t=r;return t}(t))}}(r);return n?e.flatMap(n,t):[r]},getContextualType:function(t){var r=e.getParseTreeNode(t,e.isExpression);return r?ad(r):void 0},getContextualTypeForArgumentAtIndex:function(t,r){var n=e.getParseTreeNode(t,e.isCallLikeExpression);return n&&X_(n,r)},getContextualTypeForJsxAttribute:function(t){var r=e.getParseTreeNode(t,e.isJsxAttributeLike);return r&&rd(r)},isContextSensitive:eu,getFullyQualifiedName:rn,getResolvedSignature:function(t,r,n){var i=e.getParseTreeNode(t,e.isCallLikeExpression);J=n;var a=i?Gp(i,r):void 0;return J=void 0,a},getConstantValue:function(t){var r=e.getParseTreeNode(t,xy);return r?Sy(r):void 0},isValidPropertyAccess:function(t,r){var n=e.getParseTreeNode(t,e.isPropertyAccessOrQualifiedNameOrImportTypeNode);return!!n&&function(e,t){switch(e.kind){case 187:return cp(e,e.expression,t,pl(rm(e.expression)));case 146:return cp(e,e.left,t,pl(rm(e.left)));case 181:return cp(e,e,t,Oc(e))}}(n,e.escapeLeadingUnderscores(r))},isValidPropertyAccessForCompletions:function(t,r,n){var i=e.getParseTreeNode(t,e.isPropertyAccessExpression);return!!i&&function(t,r,n){return cp(t,181===t.kind?t:t.expression,n.escapedName,r)&&(!(8192&n.flags)||(a=lo(al(si(i=r,n.escapedName)),0),e.Debug.assert(0!==a.length),a.some(function(e){var t=wo(e);return!t||cu(i,function(e,t,r){if(!e.typeParameters)return t;var n=hl(e.typeParameters,e,0);return Nl(n.inferences,r,t),Yc(t,jo(e,Ll(n)))}(e,t,i))})));var i,a}(i,r,n)},getSignatureFromDeclaration:function(t){var r=e.getParseTreeNode(t,e.isFunctionLike);return r?Eo(r):void 0},isImplementationOfOverload:function(t){var r=e.getParseTreeNode(t,e.isFunctionLike);return r?gy(r):void 0},getImmediateAliasedSymbol:function(t){e.Debug.assert(0!=(2097152&t.flags),"Should only get Alias here.");var r=Pr(t);if(!r.immediateTarget){var n=Ur(t);if(!n)return e.Debug.fail();r.immediateTarget=Xr(n,!0)}return r.immediateTarget},getAliasedSymbol:$r,getEmitResolver:function(e,t){return Wg(e,t),R},getExportsOfModule:dn,getExportsAndPropertiesOfModule:function(t){var r=dn(t),n=un(t);return n!==t&&e.addRange(r,Wa(wi(n))),r},getSymbolWalker:e.createGetSymbolWalker(function(e){return Mo(e)||te},Io,Oo,Vi,Ka,wi,Rl,po,Ga,wg),getAmbientModules:function(){return Oe||(Oe=[],xt.forEach(function(e,t){r.test(t)&&Oe.push(e)})),Oe},getAllAttributesTypeFromJsxOpeningLikeElement:function(t){var r=e.getParseTreeNode(t,e.isJsxOpeningLikeElement);return r?function(e){return Td(e.tagName)?jd(e):Jd(e,!0)}(r):void 0},getJsxIntrinsicTagNamesAt:function(r){var n=Ad(t.IntrinsicElements,r);return n?Wa(n):e.emptyArray},isOptionalParameter:function(t){var r=e.getParseTreeNode(t,e.isParameter);return!!r&&xo(r)},tryGetMemberInModuleExports:function(t,r){return pn(e.escapeLeadingUnderscores(t),r)},tryGetMemberInModuleExportsAndProperties:function(t,r){return function(e,t){var r=pn(e,t);if(r)return r;var n=un(t);if(n!==t){var i=wi(n);return 32764&i.flags?void 0:co(i,e)}}(e.escapeLeadingUnderscores(t),r)},tryFindAmbientModuleWithoutAugmentations:function(e){return bo(e,!1)},getApparentType:io,getUnionType:Ws,createAnonymousType:Fn,createSignature:xa,createSymbol:br,createIndexInfo:Wo,getAnyType:function(){return te},getStringType:function(){return le},getNumberType:function(){return _e},createPromiseType:bf,createArrayType:Ls,getBooleanType:function(){return fe},getFalseType:function(){return de},getTrueType:function(){return pe},getVoidType:function(){return ge},getUndefinedType:function(){return oe},getNullType:function(){return ce},getESSymbolType:function(){return me},getNeverType:function(){return ye},isSymbolAccessible:jn,isArrayLikeType:ju,isTypeInvalidDueToUnionDiscriminant:function(t,r){return r.properties.some(function(r){var n=r.name&&e.getTextOfPropertyName(r.name),i=void 0===n?void 0:si(t,n);if(i&&448&i.flags){var a=ty(r);return!!a&&!iu(a,i)}return!1})},getAllPossiblePropertiesOfTypes:function(t){var r=Ws(t);if(!(262144&r.flags))return ny(r);for(var n=e.createSymbolTable(),i=0,a=t;i>",0,te),ft=xa(void 0,void 0,void 0,e.emptyArray,te,void 0,0,!1,!1),mt=xa(void 0,void 0,void 0,e.emptyArray,ie,void 0,0,!1,!1),gt=xa(void 0,void 0,void 0,e.emptyArray,te,void 0,0,!1,!1),yt=xa(void 0,void 0,void 0,e.emptyArray,he,void 0,0,!1,!1),ht=[gt],vt=Wo(le,!0),bt=Wo(te,!1),xt=e.createSymbolTable(),St=e.createMap(),Dt=e.createMap(),kt=0,Tt=0,Ct=0,Et=!1,Nt=wc(""),At=wc(0),Pt=[],wt=[],Ft=[],It=0,Ot=10,Mt=[],Lt=[],Rt=[],Bt=[],jt=[],Jt=[],zt=[],Kt=[],Ut=[],qt=[],Vt=[],Wt=[],Ht=e.createDiagnosticCollection(),Gt=e.createMultiMap();!function(e){e[e.None=0]="None",e[e.TypeofEQString=1]="TypeofEQString",e[e.TypeofEQNumber=2]="TypeofEQNumber",e[e.TypeofEQBoolean=4]="TypeofEQBoolean",e[e.TypeofEQSymbol=8]="TypeofEQSymbol",e[e.TypeofEQObject=16]="TypeofEQObject",e[e.TypeofEQFunction=32]="TypeofEQFunction",e[e.TypeofEQHostObject=64]="TypeofEQHostObject",e[e.TypeofNEString=128]="TypeofNEString",e[e.TypeofNENumber=256]="TypeofNENumber",e[e.TypeofNEBoolean=512]="TypeofNEBoolean",e[e.TypeofNESymbol=1024]="TypeofNESymbol",e[e.TypeofNEObject=2048]="TypeofNEObject",e[e.TypeofNEFunction=4096]="TypeofNEFunction",e[e.TypeofNEHostObject=8192]="TypeofNEHostObject",e[e.EQUndefined=16384]="EQUndefined",e[e.EQNull=32768]="EQNull",e[e.EQUndefinedOrNull=65536]="EQUndefinedOrNull",e[e.NEUndefined=131072]="NEUndefined",e[e.NENull=262144]="NENull",e[e.NEUndefinedOrNull=524288]="NEUndefinedOrNull",e[e.Truthy=1048576]="Truthy",e[e.Falsy=2097152]="Falsy",e[e.All=4194303]="All",e[e.BaseStringStrictFacts=933633]="BaseStringStrictFacts",e[e.BaseStringFacts=3145473]="BaseStringFacts",e[e.StringStrictFacts=4079361]="StringStrictFacts",e[e.StringFacts=4194049]="StringFacts",e[e.EmptyStringStrictFacts=3030785]="EmptyStringStrictFacts",e[e.EmptyStringFacts=3145473]="EmptyStringFacts",e[e.NonEmptyStringStrictFacts=1982209]="NonEmptyStringStrictFacts",e[e.NonEmptyStringFacts=4194049]="NonEmptyStringFacts",e[e.BaseNumberStrictFacts=933506]="BaseNumberStrictFacts",e[e.BaseNumberFacts=3145346]="BaseNumberFacts",e[e.NumberStrictFacts=4079234]="NumberStrictFacts",e[e.NumberFacts=4193922]="NumberFacts",e[e.ZeroStrictFacts=3030658]="ZeroStrictFacts",e[e.ZeroFacts=3145346]="ZeroFacts",e[e.NonZeroStrictFacts=1982082]="NonZeroStrictFacts",e[e.NonZeroFacts=4193922]="NonZeroFacts",e[e.BaseBooleanStrictFacts=933252]="BaseBooleanStrictFacts",e[e.BaseBooleanFacts=3145092]="BaseBooleanFacts",e[e.BooleanStrictFacts=4078980]="BooleanStrictFacts",e[e.BooleanFacts=4193668]="BooleanFacts",e[e.FalseStrictFacts=3030404]="FalseStrictFacts",e[e.FalseFacts=3145092]="FalseFacts",e[e.TrueStrictFacts=1981828]="TrueStrictFacts",e[e.TrueFacts=4193668]="TrueFacts",e[e.SymbolStrictFacts=1981320]="SymbolStrictFacts",e[e.SymbolFacts=4193160]="SymbolFacts",e[e.ObjectStrictFacts=1972176]="ObjectStrictFacts",e[e.ObjectFacts=4184016]="ObjectFacts",e[e.FunctionStrictFacts=1970144]="FunctionStrictFacts",e[e.FunctionFacts=4181984]="FunctionFacts",e[e.UndefinedFacts=2457472]="UndefinedFacts",e[e.NullFacts=2340752]="NullFacts"}(_t||(_t={}));var Xt,Qt,Yt,$t,Zt,er,tr,rr,nr,ir=e.createMapFromTemplate({string:1,number:2,boolean:4,symbol:8,undefined:16384,object:16,function:32}),ar=e.createMapFromTemplate({string:128,number:256,boolean:512,symbol:1024,undefined:131072,object:2048,function:4096}),or=e.createMapFromTemplate({string:le,number:_e,boolean:fe,symbol:me,undefined:oe}),sr=Ws(e.arrayFrom(ir.keys(),wc)),cr=e.createMap(),ur=e.createMap(),lr=e.createMap(),_r=e.createMap(),dr=e.createMap(),pr=e.createMap();!function(e){e[e.Type=0]="Type",e[e.ResolvedBaseConstructorType=1]="ResolvedBaseConstructorType",e[e.DeclaredType=2]="DeclaredType",e[e.ResolvedReturnType=3]="ResolvedReturnType",e[e.ImmediateBaseConstraint=4]="ImmediateBaseConstraint"}(Yt||(Yt={})),function(e){e[e.Normal=0]="Normal",e[e.SkipContextSensitive=1]="SkipContextSensitive",e[e.Inferential=2]="Inferential",e[e.Contextual=3]="Contextual"}($t||($t={})),function(e){e[e.None=0]="None",e[e.Bivariant=1]="Bivariant",e[e.Strict=2]="Strict"}(Zt||(Zt={})),function(e){e[e.IncludeReadonly=1]="IncludeReadonly",e[e.ExcludeReadonly=2]="ExcludeReadonly",e[e.IncludeOptional=4]="IncludeOptional",e[e.ExcludeOptional=8]="ExcludeOptional"}(er||(er={})),function(e){e[e.None=0]="None",e[e.Source=1]="Source",e[e.Target=2]="Target",e[e.Both=3]="Both"}(tr||(tr={})),function(e){e.resolvedExports="resolvedExports",e.resolvedMembers="resolvedMembers"}(rr||(rr={})),function(e){e[e.Local=0]="Local",e[e.Parameter=1]="Parameter"}(nr||(nr={}));var fr=e.createSymbolTable();fr.set(j.escapedName,j);var mr=e.and(Bg,function(t){return!e.isAccessor(t)});return function(){for(var t=0,r=a.getSourceFiles();t1)}function Pr(e){if(33554432&e.flags)return e;var t=l(e);return Lt[t]||(Lt[t]={})}function wr(e){var t=u(e);return Rt[t]||(Rt[t]={flags:0})}function Fr(t){return 277===t.kind&&!e.isExternalOrCommonJsModule(t)}function Ir(t,r,n){if(n){var i=t.get(r);if(i){if(e.Debug.assert(0==(1&e.getCheckFlags(i)),"Should never get an instantiated symbol here."),i.flags&n)return i;if(2097152&i.flags){var a=$r(i);if(a===Z||a.flags&n)return i}}}}function Or(t,r){var n=e.getSourceFileOfNode(t),i=e.getSourceFileOfNode(r);if(n!==i){if(A&&(n.externalModuleIndicator||i.externalModuleIndicator)||!E.outFile&&!E.out||Bl(r)||4194304&t.flags)return!0;if(u(r,t))return!0;var o=a.getSourceFiles();return o.indexOf(n)<=o.indexOf(i)}if(t.pos<=r.pos){if(184===t.kind){var s=e.getAncestor(r,184);return s?e.findAncestor(s,e.isBindingElement)!==e.findAncestor(t,e.isBindingElement)||t.pos=0)return void hr(i,e.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1,r,h)}}if(l)hr(i,l,r,u.resolvedFileName);else{var v=e.tryExtractTypeScriptExtension(r);v?hr(i,e.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead,v,e.removeExtension(r,v)):hr(i,n,r)}}}}function cn(t,r,n,i){var o,s=n.packageId,c=n.resolvedFileName,u=s?e.chainDiagnosticMessages(void 0,(o=s.name,a.getSourceFiles().some(function(t){return!!t.resolvedModules&&!!e.forEachEntry(t.resolvedModules,function(t){return t&&t.packageId&&t.packageId.name===e.getTypesPackageName(o)})})?e.Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_0:e.Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0),e.getMangledNameForScopedPackage(s.name)):void 0;vr(t,r,e.chainDiagnosticMessages(u,e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,i,c))}function un(t,r){return t&&hn(function(t,r){if(!t||1===r.exports.size)return t;var n=kr(t);return void 0===n.exports&&(n.flags=512|n.flags,n.exports=e.createSymbolTable()),r.exports.forEach(function(e,t){"export="!==t&&n.exports.set(t,n.exports.has(t)?Tr(n.exports.get(t),e):e)}),n}(Yr(t.exports.get("export="),r),t))||t}function ln(t,r,n){var i=un(t,n);if(!n&&i){if(!(1539&i.flags||e.getDeclarationOfKind(i,277)))return hr(r,e.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct,Vn(t)),i;if(E.esModuleInterop){var a=r.parent;if(e.isImportDeclaration(a)&&e.getNamespaceDeclarationNode(a)||e.isImportCall(a)){var o=wi(i),s=uo(o,0);if(s&&s.length||(s=uo(o,1)),s&&s.length){var c=nf(o,i,t),u=br(i.flags,i.escapedName);u.declarations=i.declarations?i.declarations.slice():[],u.parent=i.parent,u.target=i,u.originatingImport=a,i.valueDeclaration&&(u.valueDeclaration=i.valueDeclaration),i.constEnumOnlyModule&&(u.constEnumOnlyModule=!0),i.members&&(u.members=e.cloneMap(i.members)),i.exports&&(u.exports=e.cloneMap(i.exports));var l=Ka(c);return u.type=Fn(u,l.members,e.emptyArray,e.emptyArray,l.stringIndexInfo,l.numberIndexInfo),u}}}}return i}function _n(e){return void 0!==e.exports.get("export=")}function dn(e){return ho(mn(e))}function pn(e,t){var r=mn(t);if(r)return r.get(e)}function fn(e){return 32&e.flags?ga(e,"resolvedExports"):1536&e.flags?mn(e):e.exports||T}function mn(e){var t=Pr(e);return t.resolvedExports||(t.resolvedExports=yn(e))}function gn(t,r,n,i){r&&r.forEach(function(r,a){if("default"!==a){var o=t.get(a);if(o){if(n&&i&&o&&Yr(o)!==Yr(r)){var s=n.get(a);s.exportsWithDuplicate?s.exportsWithDuplicate.push(i):s.exportsWithDuplicate=[i]}}else t.set(a,r),n&&i&&n.set(a,{specifierText:e.getTextOfNode(i.moduleSpecifier)})}})}function yn(t){var r=[];return function t(n){if(n&&n.exports&&e.pushIfUnique(r,n)){var i=e.cloneMap(n.exports),a=n.exports.get("__export");if(a){for(var o=e.createSymbolTable(),s=e.createMap(),c=0,u=a.declarations;c=l?u.substr(0,l-"...".length)+"...":u}function Gn(e){return void 0===e&&(e=0),9469291&e}function Xn(t,r,n,i){return void 0===n&&(n=16384),i?a(i).getText():e.usingSingleLineStringWriter(a);function a(i){var a=e.createTypePredicateNode(1===t.kind?e.createIdentifier(t.parameterName):e.createThisTypeNode(),B.typeToTypeNode(t.type,r,3113472|Gn(n))),o=e.createPrinter({removeComments:!0}),s=r&&e.getSourceFileOfNode(r);return o.writeNode(4,a,s,i),i}}function Qn(e){return 8===e?"private":16===e?"protected":"public"}function Yn(t){return t&&t.parent&&243===t.parent.kind&&e.isExternalModuleAugmentation(t.parent.parent)}function $n(t){return 277===t.kind||e.isAmbientModule(t)}function Zn(t,r){if(r&&"default"===t.escapedName&&!(16384&r.flags)&&(!(16777216&r.flags)||!t.declarations||r.enclosingDeclaration&&e.findAncestor(t.declarations[0],$n)!==e.findAncestor(r.enclosingDeclaration,$n)))return"default";if(t.declarations&&t.declarations.length){var n=t.declarations[0],i=e.getNameOfDeclaration(n);if(i)return e.declarationNameToString(i);if(n.parent&&235===n.parent.kind)return e.declarationNameToString(n.parent.name);switch(n.kind){case 207:case 194:case 195:return!r||r.encounteredError||131072&r.flags||(r.encounteredError=!0),207===n.kind?"(Anonymous class)":"(Anonymous function)"}}var a=t.nameType;if(a){if(64&a.flags&&!e.isIdentifierText(a.value,E.target))return'"'+e.escapeString(a.value,34)+'"';if(a&&2048&a.flags)return"["+Zn(a.symbol,r)+"]"}return e.symbolName(t)}function ei(t){if(t){var r=wr(t);return void 0===r.isVisible&&(r.isVisible=!!function(){switch(t.kind){case 295:case 301:return!!(t.parent&&t.parent.parent&&t.parent.parent.parent&&e.isSourceFile(t.parent.parent.parent));case 184:return ei(t.parent.parent);case 235:if(e.isBindingPattern(t.name)&&!t.name.elements.length)return!1;case 242:case 238:case 239:case 240:case 237:case 241:case 246:if(e.isExternalModuleAugmentation(t))return!0;var r=oi(t);return 1&e.getCombinedModifierFlags(t)||246!==t.kind&&277!==r.kind&&4194304&r.flags?ei(r):Fr(r);case 152:case 151:case 156:case 157:case 154:case 153:if(e.hasModifier(t,24))return!1;case 155:case 159:case 158:case 160:case 149:case 243:case 163:case 164:case 166:case 162:case 167:case 168:case 171:case 172:case 175:return ei(t.parent);case 248:case 249:case 251:return!1;case 148:case 277:case 245:return!0;case 252:default:return!1}}()),r.isVisible}return!1}function ti(t,r){var n,i;return t.parent&&252===t.parent.kind?n=Mr(t,t.escapedText,70107135,void 0,t,!1):255===t.parent.kind&&(n=Gr(t.parent,70107135)),n&&function t(n){e.forEach(n,function(n){var a=Kr(n)||n;if(r?wr(n).isVisible=!0:(i=i||[],e.pushIfUnique(i,a)),e.isInternalModuleImportEqualsDeclaration(n)){var o=n.moduleReference,s=wg(o),c=Mr(n,s.escapedText,68009983,void 0,void 0,!1);c&&t(c.declarations)}})}(n.declarations),i}function ri(e,t){var r=ni(e,t);if(r>=0){for(var n=Pt.length,i=r;i=0;r--){if(ii(Pt[r],Ft[r]))return-1;if(Pt[r]===e&&Ft[r]===t)return r}return-1}function ii(t,r){switch(r){case 0:return!!Pr(t).type;case 2:return!!Pr(t).declaredType;case 1:return!!t.resolvedBaseConstructorType;case 3:return!!t.resolvedReturnType;case 4:return!!t.immediateBaseConstraint}return e.Debug.assertNever(r)}function ai(){return Pt.pop(),Ft.pop(),wt.pop()}function oi(t){return e.findAncestor(e.getRootDeclaration(t),function(e){switch(e.kind){case 235:case 236:case 251:case 250:case 249:case 248:return!1;default:return!0}}).parent}function si(e,t){var r=co(e,t);return r?wi(r):void 0}function ci(e){return e&&0!=(1&e.flags)}function ui(e){var t=vn(e);return t&&Pr(t).type||gi(e,!1)}function li(t){return 147===t.kind&&!e.isStringOrNumericLiteral(t.expression)}function _i(t,r,n){if(32768&(t=u_(t,function(e){return!(24576&e.flags)})).flags)return De;if(262144&t.flags)return l_(t,function(e){return _i(e,r,n)});for(var i=e.createSymbolTable(),a=e.createUnderscoreEscapedMap(),o=0,s=r;o=2?Os(te):Ve;var s=Bs(e.map(i,function(t){return e.isOmittedExpression(t)?te:hi(t,r,n)}),e.findLastIndex(i,function(t){return!e.isOmittedExpression(t)&&!fd(t)},i.length-(o?2:1))+1,o);return r&&((s=Zo(s)).pattern=t),s}(t,r,n)}function bi(t,r){return function(t,r,n){return t?(n&&gl(r,t),2048&t.flags&&(e.isBindingElement(r)||!r.type)&&t.symbol!==vn(r)&&(t=me),pl(t)):(t=e.isParameter(r)&&r.dotDotDotToken?Ve:te,n&&O&&(xi(r)||ml(r,t)),t)}(gi(t,!0),t,r)}function xi(t){var r=e.getRootDeclaration(t);return vm(149===r.kind?r.parent:r)}function Si(t){var r=e.getEffectiveTypeAnnotationNode(t);if(r)return Oc(r)}function Di(t){var r,n=Pr(t);if(!n.type){if(4194304&t.flags)return n.type=(r=ea(bn(t))).typeParameters?$o(r,e.map(r.typeParameters,function(e){return te})):r;if(t===U||t===q)return n.type=te;var i=t.valueDeclaration;if(e.isCatchClauseVariableDeclarationOrBindingElement(i))return n.type=te;if(e.isSourceFile(i)){var a=e.cast(i,e.isJsonSourceFile);return n.type=a.statements.length?rm(a.statements[0].expression):De}if(252===i.kind)return n.type=rm(i.expression);if(!ri(t,0))return ie;var o=function(t,r){if(e.isInJavaScriptFile(r)){if(e.isJSDocPropertyLikeTag(r)&&r.typeExpression)return Oc(r.typeExpression.type);if(e.isBinaryExpression(r)||e.isPropertyAccessExpression(r)&&e.isBinaryExpression(r.parent))return ki(r,t,e.getAssignedJavascriptInitializer(e.isBinaryExpression(r)?r.left:r))||yi(t);if(e.isParameter(r)||e.isPropertyDeclaration(r)||e.isPropertySignature(r)||e.isVariableDeclaration(r)||e.isBindingElement(r)){var n=e.isParameter(r)&&vo(r)||!e.isBindingElement(r)&&!e.isVariableDeclaration(r)&&!!r.questionToken,i=Si(r);return i&&mi(i,n)||ki(r,t,e.getDeclaredJavascriptInitializer(r))||bi(r,!0)}}}(t,i);if(!o)if(e.isJSDocPropertyLikeTag(i)||e.isPropertyAccessExpression(i)||e.isIdentifier(i)||e.isClassDeclaration(i)||e.isFunctionDeclaration(i)||e.isMethodDeclaration(i)&&!e.isObjectLiteralMethod(i)||e.isMethodSignature(i)){if(9136&t.flags)return Ai(t);o=Si(i)||te}else if(e.isPropertyAssignment(i))o=Si(i)||Yf(i);else if(e.isJsxAttribute(i))o=Si(i)||Cd(i);else if(e.isShorthandPropertyAssignment(i))o=Si(i)||Qf(i.name,0);else if(e.isObjectLiteralMethod(i))o=Si(i)||$f(i,0);else{if(!(e.isParameter(i)||e.isPropertyDeclaration(i)||e.isPropertySignature(i)||e.isVariableDeclaration(i)||e.isBindingElement(i)))return e.Debug.fail("Unhandled declaration kind! "+e.Debug.showSyntaxKind(i)+" for "+e.Debug.showSymbol(t));o=bi(i,!0)}ai()||(o=Pi(t)),n.type=o}return n.type}function ki(t,r,n){if(n&&e.isInJavaScriptFile(n)&&e.isObjectLiteralExpression(n)){for(var i=e.createSymbolTable();e.isBinaryExpression(t)||e.isPropertyAccessExpression(t);){var a=vn(t);a&&e.hasEntries(a.exports)&&Nr(i,a.exports),t=e.isBinaryExpression(t)?t.parent:t.parent.parent}var o=vn(t);return o&&e.hasEntries(o.exports)&&Nr(i,o.exports),Fn(r,i,e.emptyArray,e.emptyArray,bt,void 0)}}function Ti(t){if(t){if(156===t.kind){var r=e.getEffectiveReturnTypeNode(t);return r&&Oc(r)}var n=e.getEffectiveSetAccessorTypeAnnotationNode(t);return n&&Oc(n)}}function Ci(e){return wo(Eo(e))}function Ei(t){var r=Pr(t);if(!r.type){var n=e.getDeclarationOfKind(t,156),i=e.getDeclarationOfKind(t,157);if(n&&e.isInJavaScriptFile(n)){var a=pi(n);if(a)return r.type=a}if(!ri(t,0))return ie;var o=void 0,s=Ti(n);if(s)o=s;else{var c=Ti(i);c?o=c:n&&n.body?o=Sf(n):(O&&(i?hr(i,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,Vn(t)):(e.Debug.assert(!!n,"there must existed getter as we are current checking either setter or getter in this function"),hr(n,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,Vn(t)))),o=te)}ai()||(o=te,O&&hr(e.getDeclarationOfKind(t,156),e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Vn(t))),r.type=o}return r.type}function Ni(e){var t=qi(Hi(e));return 2162688&t.flags?t:void 0}function Ai(t){var r=Pr(t);if(!r.type){var n=e.getDeclarationOfJSInitializer(t.valueDeclaration);if(n){var i=vn(n);i&&(e.hasEntries(i.exports)||e.hasEntries(i.members))&&(r=t=kr(t),e.hasEntries(i.exports)&&(t.exports=t.exports||e.createSymbolTable(),Nr(t.exports,i.exports)),e.hasEntries(i.members)&&(t.members=t.members||e.createSymbolTable(),Nr(t.members,i.members)))}if(1536&t.flags&&e.isShorthandAmbientModuleSymbol(t))r.type=te;else if(202===t.valueDeclaration.kind||187===t.valueDeclaration.kind&&202===t.valueDeclaration.parent.kind)r.type=yi(t);else{var a=Nn(16,t);if(32&t.flags){var o=Ni(t);r.type=o?Ys([a,o]):a}else r.type=w&&16777216&t.flags?il(a):a}}return r.type}function Pi(t){return e.getEffectiveTypeAnnotationNode(t.valueDeclaration)?(hr(t.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Vn(t)),ie):(O&&hr(t.valueDeclaration,e.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,Vn(t)),te)}function wi(t){return 1&e.getCheckFlags(t)?function(t){var r=Pr(t);if(!r.type)if(100===k)hr(t.valueDeclaration,e.Diagnostics.Generic_type_instantiation_is_excessively_deep_and_possibly_infinite),r.type=ie;else{if(!ri(t,0))return ie;k++;var n=Yc(wi(r.target),r.mapper);k--,ai()||(n=Pi(t)),r.type=n}return r.type}(t):2048&e.getCheckFlags(t)?function(e){return kl(e.propertyType,e.mappedType)}(t):7&t.flags?Di(t):9136&t.flags?Ai(t):8&t.flags?function(e){var t=Pr(e);return t.type||(t.type=$i(e)),t.type}(t):98304&t.flags?Ei(t):2097152&t.flags?function(e){var t=Pr(e);if(!t.type){var r=$r(e);t.type=67216319&r.flags?wi(r):ie}return t.type}(t):ie}function Fi(t,r){return void 0!==t&&void 0!==r&&0!=(4&e.getObjectFlags(t))&&t.target===r}function Ii(t){return 4&e.getObjectFlags(t)?t.target:t}function Oi(t,r){return function t(n){if(7&e.getObjectFlags(n)){var i=Ii(n);return i===r||e.some(Vi(i),t)}return!!(524288&n.flags)&&e.some(n.types,t)}(t)}function Mi(t,r){for(var n=0,i=r;n0)return!0;if(2162688&e.flags){var t=$a(e);return!!t&&Wi(t)&&ji(t)}return!1}function zi(t){return e.getEffectiveBaseTypeNode(t.symbol.valueDeclaration)}function Ki(t,r,n){var i=e.length(r),a=e.isInJavaScriptFile(n);return e.filter(lo(t,1),function(t){return(a||i>=To(t.typeParameters))&&i<=e.length(t.typeParameters)})}function Ui(t,r,n){var i=Ki(t,r,n),a=e.map(r,Oc);return e.sameMap(i,function(t){return e.some(t.typeParameters)?Lo(t,a,e.isInJavaScriptFile(n)):t})}function qi(t){if(!t.resolvedBaseConstructorType){var r=t.symbol.valueDeclaration,n=e.getEffectiveBaseTypeNode(r),i=zi(t);if(!i)return t.resolvedBaseConstructorType=oe;if(!ri(t,1))return ie;var a=rm(i.expression);if(n&&i!==n&&(e.Debug.assert(!n.typeArguments),rm(n.expression)),655360&a.flags&&Ka(a),!ai())return hr(t.symbol.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,Vn(t.symbol)),t.resolvedBaseConstructorType=ie;if(!(1&a.flags||a===ue||Ji(a)))return hr(i.expression,e.Diagnostics.Type_0_is_not_a_constructor_function_type,Hn(a)),t.resolvedBaseConstructorType=ie;t.resolvedBaseConstructorType=a}return t.resolvedBaseConstructorType}function Vi(t){return t.resolvedBaseTypes||(8&t.objectFlags?t.resolvedBaseTypes=[Ls(Ws(t.typeParameters||e.emptyArray))]:96&t.symbol.flags?(32&t.symbol.flags&&function(t){t.resolvedBaseTypes=e.resolvingEmptyArray;var r=io(qi(t));if(!(655361&r.flags))return t.resolvedBaseTypes=e.emptyArray;var n,i=zi(t),a=fs(i),o=r&&r.symbol?ea(r.symbol):void 0;if(r.symbol&&32&r.symbol.flags&&function(e){var t=e.outerTypeParameters;if(t){var r=t.length-1,n=e.typeArguments;return t[r].symbol!==n[r].symbol}return!0}(o))n=ts(i,r.symbol,a);else if(1&r.flags)n=r;else{var s=Ui(r,i.typeArguments,i);if(!s.length)return hr(i.expression,e.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments),t.resolvedBaseTypes=e.emptyArray;n=Oo(s[0])}n===ie?t.resolvedBaseTypes=e.emptyArray:Wi(n)?t===n||Oi(n,t)?(hr(t.symbol.valueDeclaration,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,Hn(t,void 0,2)),t.resolvedBaseTypes=e.emptyArray):(t.resolvedBaseTypes===e.resolvingEmptyArray&&(t.members=void 0),t.resolvedBaseTypes=[n]):(hr(i.expression,e.Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type,Hn(n)),t.resolvedBaseTypes=e.emptyArray)}(t),64&t.symbol.flags&&function(t){t.resolvedBaseTypes=t.resolvedBaseTypes||e.emptyArray;for(var r=0,n=t.symbol.declarations;r0)return;for(var i=1;i1){var _=c.thisParameter;if(e.forEach(u,function(e){return e.thisParameter})){var d=Ws(e.map(u,function(e){return e.thisParameter?wi(e.thisParameter):te}),2);_=sl(c.thisParameter,d)}(l=Sa(c)).thisParameter=_,l.unionSignatures=u}(n||(n=[])).push(l)}}}return n||e.emptyArray}function Ca(e,t){for(var r=[],n=!1,i=0,a=e;i0&&(l=e.map(l,function(e){var t=Sa(e);return t.resolvedReturnType=function(e,t,r){for(var n=[],i=0;i=_&&o<=d){var p=d?Bo(l,Co(a,l.typeParameters,_,i)):Sa(l);p.typeParameters=t.localTypeParameters,p.resolvedReturnType=t,s.push(p)}}return s}(c)),t.constructSignatures=s}}}function Fa(e){return e.typeParameter||(e.typeParameter=Zi(vn(e.declaration.typeParameter)))}function Ia(e){return e.constraintType||(e.constraintType=Yc(Ga(Fa(e)),e.mapper||C)||ie)}function Oa(e){return e.templateType||(e.templateType=e.declaration.type?Yc(mi(Oc(e.declaration.type),!!(4&Ba(e))),e.mapper||C):ie)}function Ma(e){return e.declaration.typeParameter.constraint}function La(e){var t=Ma(e);return 177===t.kind&&128===t.operator}function Ra(e){if(!e.modifiersType)if(La(e))e.modifiersType=Yc(Oc(Ma(e).type),e.mapper||C);else{var t=Ia(dc(e.declaration)),r=t&&65536&t.flags?Ga(t):t;e.modifiersType=r&&1048576&r.flags?Yc(r.type,e.mapper||C):De}return e.modifiersType}function Ba(e){var t=e.declaration;return(t.readonlyToken?38===t.readonlyToken.kind?2:1:0)|(t.questionToken?38===t.questionToken.kind?8:4:0)}function ja(e){var t=Ba(e);return 8&t?-1:4&t?1:0}function Ja(e){var t=ja(e),r=Ra(e);return t||(za(r)?ja(r):0)}function za(t){return!!(32&e.getObjectFlags(t))&&ac(Ia(t))}function Ka(t){return t.members||(131072&t.flags?4&t.objectFlags?function(t){var r=ca(t.target),n=e.concatenate(r.typeParameters,[r.thisType]);ba(t,r,n,t.typeArguments&&t.typeArguments.length===n.length?t.typeArguments:e.concatenate(t.typeArguments,[t]))}(t):3&t.objectFlags?function(t){ba(t,ca(t),e.emptyArray,e.emptyArray)}(t):2048&t.objectFlags?function(t){for(var r=fo(t.source,0),n=Ba(t.mappedType),i=!(1&n),a=4&n?0:16777216,o=r&&Wo(kl(r.type,t.mappedType),i&&r.isReadonly),s=e.createSymbolTable(),c=0,u=Wa(t.source);c=2):16777216&t.flags?De:1048576&t.flags?Se:t}function ao(t,r){for(var n,i,a=262144&t.flags,o=a?24:0,s=a?0:16777216,c=4,u=0,l=0,_=t.types;l<_.length;l++)if((k=io(_[l]))!==ie){var d=(D=co(k,r))?e.getDeclarationModifierFlagsFromSymbol(D):0;if(!D||d&o){if(a){var p=!_a(r)&&(vd(r)&&fo(k,1)||fo(k,0));p?(u|=p.isReadonly?8:0,i=e.append(i,p.type)):u|=16}}else s&=D.flags,n=e.appendIfUnique(n,D),u|=(Pf(D)?8:0)|(24&d?0:64)|(16&d?128:0)|(8&d?256:0)|(32&d?512:0),Hd(D)||(c=2)}if(n){if(!(1!==n.length||16&u||i))return n[0];for(var f,m,g,y,h=[],v=!0,b=!1,x=0,S=n;x=0),n>=ff(r)}var i=e.getImmediatelyInvokedFunctionExpression(t.parent);return!!i&&!t.type&&!t.dotDotDotToken&&t.parent.parameters.indexOf(t)>=i.arguments.length}function So(t){if(!e.isJSDocParameterTag(t))return!1;var r=t.isBracketed,n=t.typeExpression;return r||!!n&&286===n.type.kind}function Do(e,t,r){return{kind:1,parameterName:e,parameterIndex:t,type:r}}function ko(e){return{kind:0,type:e}}function To(t){var r,n=0;if(t)for(var i=0;i=n&&o<=a){t||(t=[]);for(var s=o;su.arguments.length&&!m||_||vo(p)||(o=i.length)}if(!(156!==t.kind&&157!==t.kind||pa(t)||c&&s)){var g=156===t.kind?157:156,y=e.getDeclarationOfKind(vn(t),g);y&&(s=(r=Gy(y))&&r.symbol)}var h=155===t.kind?Hi(hn(t.parent.symbol)):void 0,v=h?h.localTypeParameters:yo(t),b=function(t,r,n){if(r)return Oc(t.parameters[0].type);if(n)return n;var i=e.getEffectiveReturnTypeNode(t);if(i)return Oc(i);if(156===t.kind&&!pa(t)){var a=e.getDeclarationOfKind(vn(t),157);return Ti(a)}var o=No(t);return o||(e.nodeIsMissing(t.body)?te:void 0)}(t,l,h),x=e.hasRestParameter(t)||e.isInJavaScriptFile(t)&&function(t,r){if(e.isJSDocSignature(t)||!Ao(t))return!1;var n=e.lastOrUndefined(t.parameters),i=n?e.getJSDocParameterTags(n):e.getJSDocTags(t).filter(e.isJSDocParameterTag),a=e.firstDefined(i,function(t){return t.typeExpression&&e.isJSDocVariadicType(t.typeExpression.type)?t.typeExpression.type:void 0}),o=br(3,"args",8192);return o.type=a?Ls(Oc(a.type)):Ve,a&&r.pop(),r.push(o),!0}(t,i);n.resolvedSignature=xa(t,v,s,i,b,void 0,o,x,a)}return n.resolvedSignature}function No(t){var r=e.isInJavaScriptFile(t)?e.getJSDocTypeTag(t):void 0,n=r&&r.typeExpression&&lo(Oc(r.typeExpression),0);return n&&1===n.length?Oo(n[0]):void 0}function Ao(t){var r=wr(t);return void 0===r.containsArgumentsReference&&(8192&r.flags?r.containsArgumentsReference=!0:r.containsArgumentsReference=function t(r){if(!r)return!1;switch(r.kind){case 71:return"arguments"===r.escapedText&&e.isExpressionNode(r);case 152:case 154:case 156:case 157:return 147===r.name.kind&&t(r.name);default:return!e.nodeStartsNewLexicalEnvironment(r)&&!e.isPartOfTypeNode(r)&&!!e.forEachChild(r,t)}}(t.body)),r.containsArgumentsReference}function Po(t){if(!t)return e.emptyArray;for(var r=[],n=0;n0&&i.body){var a=t.declarations[n-1];if(i.parent===a.parent&&i.kind===a.kind&&i.pos===a.end)continue}r.push(Eo(i))}}return r}function wo(e){if(e.thisParameter)return wi(e.thisParameter)}function Fo(e){return void 0!==Io(e)}function Io(t){if(!t.resolvedTypePredicate){if(t.target){var r=Io(t.target);t.resolvedTypePredicate=r?(i=r,a=t.mapper,e.isIdentifierTypePredicate(i)?{kind:1,parameterName:i.parameterName,parameterIndex:i.parameterIndex,type:Yc(i.type,a)}:{kind:0,type:Yc(i.type,a)}):pt}else if(t.unionSignatures)t.resolvedTypePredicate=function(t){for(var r,n=[],i=0,a=t;i1&&(t+=":"+a),n+=a}return t}function Yo(e,t){for(var r=0,n=0,i=e;na.length)){var u=c&&293!==t.parent.kind;if(hr(t,s===a.length?u?e.Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_1_type_argument_s:u?e.Diagnostics.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,Hn(i,void 0,2),s,a.length),!c)return ie}return $o(i,e.concatenate(i.outerTypeParameters,Co(n,a,s,c)))}return ds(t,r)?i:ie}function rs(t,r){var n=ea(t),i=Pr(t),a=i.typeParameters,o=Qo(r),s=i.instantiations.get(o);return s||i.instantiations.set(o,s=Yc(n,jc(a,Co(r,a,To(a),e.isInJavaScriptFile(t.valueDeclaration))))),s}function ns(t){switch(t.kind){case 162:return t.typeName;case 209:var r=t.expression;if(e.isEntityNameExpression(r))return r}}function is(e,t){return e&&nn(e,t)||Z}function as(e,t){var r=fs(e);if(t===Z)return ie;var n=ss(e,t,r);if(n)return n;var i=ta(t);if(i)return ds(e,t)?65536&i.flags?ls(i,e):i:ie;if(!(67216319&t.flags&&_s(e)))return ie;var a=os(e,t,r);return a||(is(ns(e),67901928),wi(t))}function os(e,t,r){var n=Qp(t),i=wi(t),a=i.symbol&&i.symbol!==t&&!Zp(i)&&ss(e,i.symbol,r);if(a||n)return a&&n?Ys([n,a]):a||n}function ss(t,r,n){if(96&r.flags){if(r.valueDeclaration&&e.isBinaryExpression(r.valueDeclaration.parent)){var i=os(t,r,n);if(i)return i}return ts(t,r,n)}return 524288&r.flags?function(t,r,n){var i=ea(r),a=Pr(r).typeParameters;if(a){var o=e.length(t.typeArguments),s=To(a);return oa.length?(hr(t,s===a.length?e.Diagnostics.Generic_type_0_requires_1_type_argument_s:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,Vn(r),s,a.length),ie):rs(r,n)}return ds(t,r)?i:ie}(t,r,n):16&r.flags&&_s(t)&&(r.members||e.getJSDocClassTag(r.valueDeclaration))?$p(r):void 0}function cs(e){return 168===e.kind&&1===e.elementTypes.length}function us(e,t,r){return cs(t)&&cs(r)?us(e,t.elementTypes[0],r.elementTypes[0]):pc(Oc(t))===e?Oc(r):void 0}function ls(t,r){for(var n;r&&!e.isStatement(r)&&289!==r.kind;){var i=r.parent;if(173===i.kind&&r===i.trueType){var a=us(t,i.checkType,i.extendsType);a&&(n=e.append(n,a))}r=i}return n?function(e,t){var r=Cn(8388608);return r.typeVariable=e,r.substitute=t,r}(t,Ys(e.append(n,t))):t}function _s(e){return!!(2097152&e.flags)&&162===e.kind}function ds(t,r){return!t.typeArguments||(hr(t,e.Diagnostics.Type_0_is_not_generic,r?Vn(r):t.typeName?e.declarationNameToString(t.typeName):"(anonymous)"),!1)}function ps(t){var r=wr(t);if(!r.resolvedType){var n=void 0,i=void 0,a=67901928;_s(t)&&(i=function(t){if(e.isIdentifier(t.typeName)){var r=t.typeArguments;switch(t.typeName.escapedText){case"String":return ds(t),le;case"Number":return ds(t),_e;case"Boolean":return ds(t),fe;case"Void":return ds(t),ge;case"Undefined":return ds(t),oe;case"Null":return ds(t),ce;case"Function":case"function":return ds(t),Re;case"Array":case"array":return r&&r.length?void 0:Ve;case"Promise":case"promise":return r&&r.length?void 0:bf(te);case"Object":if(r&&2===r.length){if(e.isJSDocIndexSignature(t)){var n=Oc(r[0]),i=Wo(Oc(r[1]),!1);return Fn(void 0,T,e.emptyArray,e.emptyArray,n===le?i:void 0,n===_e?i:void 0)}return te}return ds(t),te}}}(t),a|=67216319),i||(i=as(t,n=is(ns(t),a))),r.resolvedSymbol=n,r.resolvedType=i}return r.resolvedType}function fs(t){return e.map(t.typeArguments,Oc)}function ms(e){var t=wr(e);return t.resolvedType||(t.resolvedType=Pc(pl(rm(e.exprName)))),t.resolvedType}function gs(t,r){function n(e){for(var t=0,r=e.declarations;t=r?16777216:0),""+c);l.type=u,o.push(l)}}}var _=[];for(c=r;c<=s;c++)_.push(wc(c));var d=br(4,"length");d.type=n?_e:Ws(_),o.push(d);var p=Nn(12);return p.typeParameters=a,p.outerTypeParameters=void 0,p.localTypeParameters=a,p.instantiations=e.createMap(),p.instantiations.set(Qo(p.typeParameters),p),p.target=p,p.typeArguments=p.typeParameters,p.thisType=Cn(65536),p.thisType.isThisType=!0,p.thisType.constraint=p,p.declaredProperties=o,p.declaredCallSignatures=e.emptyArray,p.declaredConstructSignatures=e.emptyArray,p.declaredStringIndexInfo=void 0,p.declaredNumberIndexInfo=void 0,p.minLength=r,p.hasRestElement=n,p.associatedNames=i,p}(t,r,n,i)),o}function Bs(e,t,r,n){void 0===t&&(t=e.length),void 0===r&&(r=!1);var i=e.length;if(1===i&&r)return Ls(e[0]);var a=Rs(i,t,i>0&&r,n);return e.length?$o(a,e):a}function js(e){return e.id}function Js(t,r){return e.binarySearch(t,r,js,e.compareValues)>=0}function zs(t,r,n){var i=n.flags;if(262144&i)return Ks(t,r,n.types);if(!(32768&i||524288&i&&function(e){for(var t=0,r=0,n=e.types;rt[a-1].id?~a:e.binarySearch(t,n,js,e.compareValues);o<0&&(131072&i&&16&n.objectFlags&&n.symbol&&8208&n.symbol.flags&&Us(t,n)||t.splice(~o,0,n))}return r}function Ks(e,t,r){for(var n=0,i=r;n0;)qs(t[--r],t)&&e.orderedRemoveItemAt(t,r)}function Ws(t,r,n,i){if(void 0===r&&(r=1),0===t.length)return ye;if(1===t.length)return t[0];var a=[],o=Ks(a,0,t);if(3&o)return 1&o?268435456&o?ne:te:ae;switch(r){case 1:2240&o&&function(t,r){for(var n=t.length;n>0;){var i=t[--n];(64&i.flags&&4&r||128&i.flags&&8&r||2048&i.flags&&1024&r||192&i.flags&&33554432&i.flags&&Js(t,i.regularType))&&e.orderedRemoveItemAt(t,n)}}(a,o);break;case 2:Vs(a)}return 0===a.length?16384&o?134217728&o?ce:ue:8192&o?134217728&o?oe:se:ye:Gs(a,16749629&o?0:67108864,n,i)}function Hs(t,r){return e.isIdentifierTypePredicate(t)?e.isIdentifierTypePredicate(r)&&t.parameterIndex===r.parameterIndex:!e.isIdentifierTypePredicate(r)}function Gs(e,t,r,n){if(0===e.length)return ye;if(1===e.length)return e[0];var i=Qo(e),a=H.get(i);return a||(a=Cn(262144|Yo(e,24576)|t),H.set(i,a),a.types=e,a.aliasSymbol=r,a.aliasTypeArguments=n),a}function Xs(t,r,n){var i=n.flags;return 524288&i?Qs(t,r,n.types):(16&e.getObjectFlags(n)&&vu(n)?r|=536870912:(r|=-939524097&i,3&i?n===ne&&(r|=268435456):!w&&24576&i||e.contains(t,n)||131072&i&&16&n.objectFlags&&n.symbol&&8208&n.symbol.flags&&Us(t,n)||t.push(n)),r)}function Qs(e,t,r){for(var n=0,i=r;n0;){var i=t[--n];(4&i.flags&&64&r||8&i.flags&&128&r||1024&i.flags&&2048&r)&&e.orderedRemoveItemAt(t,n)}}(i,a),536870912&a&&!(131072&a)&&i.push(De),0===i.length)return ae;if(1===i.length)return i[0];if(262144&a){if(67108864&a&&function(t){for(var r=e.findIndex(t,function(e){return 0!=(67108864&e.flags)}),n=t[r],i=n.types,a=t.length-1,o=function(){var r=t[a];67108864&r.flags&&(i=e.filter(i,function(e){return Js(r.types,e)}),e.orderedRemoveItemAt(t,a)),a--};a>r;)o();return i!==n.types&&(t[r]=Gs(i,67108864&n.flags),!0)}(i))return Ys(i,r,n);var o=e.findIndex(i,function(e){return 0!=(262144&e.flags)}),s=i[o];return Ws(e.map(s.types,function(t){return Ys(e.replaceElement(i,o,t))}),1,r,n)}var c=Qo(i),u=G.get(c);return u||(u=Cn(524288|Yo(i,24576)),G.set(c,u),u.types=i,u.aliasSymbol=r,u.aliasTypeArguments=n),u}function $s(e,t){var r=Cn(1048576);return r.type=e,r.stringsOnly=t,r}function Zs(t,r){if(!(24&e.getDeclarationModifierFlagsFromSymbol(t))){var n=ha(t).nameType;if(!n&&!e.isKnownSymbol(t)){var i=t.valueDeclaration&&e.getNameOfDeclaration(t.valueDeclaration);n=i&&e.isNumericLiteral(i)?wc(+i.text):i&&147===i.kind&&e.isNumericLiteral(i.expression)?wc(+i.expression.text):wc(e.symbolName(t))}if(n&&n.flags&r)return n}return ye}function ec(t,r){return Ws(e.map(Wa(t),function(e){return Zs(e,r)}))}function tc(t,r){return void 0===r&&(r=L),262144&t.flags?Ys(e.map(t.types,function(e){return tc(e,r)})):524288&t.flags?Ws(e.map(t.types,function(e){return tc(e,r)})):Of(t,14745600)?function(e,t){return t?e.resolvedStringIndexType||(e.resolvedStringIndexType=$s(e,!0)):e.resolvedIndexType||(e.resolvedIndexType=$s(e,!1))}(t,r):32&e.getObjectFlags(t)?Ia(t):t===ne?ne:1&t.flags?Se:r?fo(t,0)?le:ec(t,64):fo(t,0)?Ws([le,_e,ec(t,2048)]):function(e){var t=fo(e,1);return t!==vt?t:void 0}(t)?Ws([_e,ec(t,2112)]):ec(t,2240)}function rc(t){if(L)return t;var r=ut||(ut=hs("Extract",524288,e.Diagnostics.Cannot_find_global_type_0));return r?rs(r,[t,le]):le}function nc(t,r,n,i){var a=n&&188===n.kind?n:void 0,o=ua(r)?fa(r):a&&_p(a.argumentExpression,r,!1)?e.getPropertyNameForKnownSymbolName(e.idText(a.argumentExpression.name)):void 0;if(void 0!==o){var s=co(t,o);if(s){if(a){if(sp(s,a,99===a.expression.kind),e.isAssignmentTarget(a)&&(wf(a,s)||Ff(a)))return hr(a.argumentExpression,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property,Vn(s)),ie;i&&(wr(n).resolvedSymbol=s)}return wi(s)}if(Qu(t)){var c=Yu(t);if(c&&vd(o)&&+o>=0)return c}}if(!(24576&r.flags)&&Mf(r,3308)){if(ci(t))return t;var u=Mf(r,168)&&fo(t,1)||fo(t,0)||void 0;if(u)return n&&!Mf(r,12)?hr(_=188===n.kind?n.argumentExpression:n.indexType,e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,Hn(r)):a&&u.isReadonly&&(e.isAssignmentTarget(a)||e.isDeleteTarget(a))&&hr(a,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,Hn(t)),u.type;if(32768&r.flags)return ye;if(a&&!Rf(t)){if(O&&!E.suppressImplicitAnyIndexErrors)if(mo(t,1))hr(a.argumentExpression,e.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{var l=void 0;void 0!==o&&(l=np(o,t))?void 0!==l&&hr(a.argumentExpression,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2,o,Hn(t),l):hr(a,e.Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,Hn(t))}return te}}if(n){var _=188===n.kind?n.argumentExpression:n.indexType;192&r.flags?hr(_,e.Diagnostics.Property_0_does_not_exist_on_type_1,""+r.value,Hn(t)):12&r.flags?hr(_,e.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1,Hn(t),Hn(r)):hr(_,e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,Hn(r))}return ie}function ic(e){return Of(e,148963328)}function ac(e){return Of(e,15794176)}function oc(e){if(131072&e.flags&&!za(e)){var t=Ka(e);return 0===t.properties.length&&0===t.callSignatures.length&&0===t.constructSignatures.length&&!!t.stringIndexInfo&&!t.numberIndexInfo}return!1}function sc(t){return!!(32&e.getObjectFlags(t))&&Oa(t)===ye}function cc(t){return 2097152&t.flags?function(t){if(t.simplified)return t.simplified===Ae?t:t.simplified;t.simplified=Ae;var r=cc(t.objectType);if(524288&r.flags&&ic(r)){if(e.some(r.types,oc)){for(var n=[],i=[],a=0,o=r.types;ac)return 0;t.typeParameters&&t.typeParameters!==r.typeParameters&&(t=bp(t,r=zo(r),void 0,s));var u=pf(t),l=mf(t),_=l?mf(r):void 0;if(l&&(!_||u!==c))return 0;var d=r.declaration?r.declaration.kind:0,p=!n&&F&&154!==d&&153!==d&&155!==d,f=-1,m=wo(t);if(m&&m!==ge){var g=wo(r);if(g){if(!(b=!p&&s(m,g,!1)||s(g,m,a)))return a&&o(e.Diagnostics.The_this_types_of_each_signature_are_incompatible),0;f&=b}}for(var y=Math.max(u,c),h=y-1,v=0;v0||iy(r))&&M(n)&&!function(t,r){for(var n=!!(4096&e.getObjectFlags(t)),i=0,a=Wa(t);i0&&N(Oo(_[0]),n,!1)||d.length>0&&N(Oo(d[0]),n,!1)?T(e.Diagnostics.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,Hn(r),Hn(n)):T(e.Diagnostics.Type_0_has_no_properties_in_common_with_type_1,Hn(r),Hn(n))}return 0}var f=0,m=u,g=h;if(h=!1,262144&r.flags?f=i===_r?F(r,n,o&&!(32764&r.flags)):function(e,t,r){for(var n=-1,i=0,a=e.types;i0&&e.every(r.properties,function(e){return!!(16777216&e.flags)})}return!!(524288&t.flags)&&e.every(t.types,M)}function L(t,r,n,a){if(i===dr)return function(e,t,r){var n=lo(e,r),i=lo(t,r);if(n.length!==i.length)return 0;for(var a=-1,o=0;o":n+="-"+o.id}return n}function Pu(e,t,r){if(r===dr&&e.id>t.id){var n=e;e=t,t=n}if(Nu(e)&&Nu(t)){var i=[];return Au(e,i)+","+Au(t,i)}return e.id+","+t.id}function wu(t,r){if(!(6&e.getCheckFlags(t)))return r(t);for(var n=0,i=t.containingType.types;n=5&&131072&e.flags){var n=e.symbol;if(n)for(var i=0,a=0;a=5)return!0}}return!1}function Mu(t,r,n){if(t===r)return-1;var i=24&e.getDeclarationModifierFlagsFromSymbol(t);if(i!==(24&e.getDeclarationModifierFlagsFromSymbol(r)))return 0;if(i){if(Dg(t)!==Dg(r))return 0}else if((16777216&t.flags)!=(16777216&r.flags))return 0;return Pf(t)!==Pf(r)?0:n(wi(t),wi(r))}function Lu(t,r,n,i,a,o){if(t===r)return-1;if(!function(e,t,r){var n=pf(e),i=pf(t),a=ff(e),o=ff(t),s=gf(e),c=gf(t);if(n===i&&a===o&&s===c)return!0;var u=s?1:0,l=c?1:0;return!!(r&&a<=o&&(u>l||u===l&&n>=i))}(t,r,n))return 0;if(e.length(t.typeParameters)!==e.length(r.typeParameters))return 0;t=Jo(t),r=Jo(r);var s=-1;if(!i){var c=wo(t);if(c){var u=wo(r);if(u){if(!(d=o(c,u)))return 0;s&=d}}}for(var l=pf(r),_=0;_e.target.minLength||!Yu(t)&&(!!Yu(e)||$u(t)<$u(e))}(e,t)||!!Tl(e,t,!1)&&!!Tl(t,e,!1)}function El(e){return e.candidates?Ws(e.candidates,2):e.contraCandidates?Ys(e.contraCandidates):De}function Nl(t,r,n,i){var a,o;void 0===i&&(i=0);var s,c=!1;function u(t,r){if(xl(r)){if(t===ne){var p=s;return s=t,u(r,r),void(s=p)}if(t.aliasSymbol&&t.aliasTypeArguments&&t.aliasSymbol===r.aliasSymbol)for(var f=t.aliasTypeArguments,m=r.aliasTypeArguments,g=0;g1){var r=e.filter(t,wl);if(r.length){var n=pl(Ws(r,2));return e.concatenate(e.filter(t,function(e){return!wl(e)}),[n])}}return t}(t.candidates),s=(i=t.typeParameter,!!(a=Ga(i))&&Of(a,1081340)),c=!s&&t.topLevel&&(t.isFixed||!Sl(Oo(n),t.typeParameter)),u=s?e.sameMap(o,Pc):c?e.sameMap(o,Hu):o;return pl(1&r.flags||28&t.priority?Ws(u,2):function(t){if(!w)return Ru(t);var r=e.filter(t,function(e){return!(24576&e.flags)});return r.length?nl(Ru(r),24576&Zu(t)):Ws(t,2)}(u))}function Ol(t,r){var n=t.inferences[r],i=n.inferredType;if(!i){var a=t.signature;if(a)if(n.contraCandidates&&(n.candidates=e.append(n.candidates,Fl(n)),n.contraCandidates=void 0),n.candidates)i=Il(n,t,a);else if(2&t.flags)i=he;else{var o=no(n.typeParameter);i=o?Yc(o,zc(function(e,t){return function(r){return e.indexOf(r)>=t?De:r}}(t.signature.typeParameters,r),t)):Ml(!!(4&t.flags))}else i=El(n);n.inferredType=i;var s=Ga(n.typeParameter);if(s){var c=Yc(s,t);t.compareTypes(i,va(c,i))||(n.inferredType=i=c)}}return i}function Ml(e){return e?te:De}function Ll(e){for(var t=[],r=0;r=2||0==(34&r.flags)||272===r.valueDeclaration.parent.kind)){for(var n=e.getEnclosingBlockScopeContainer(r.valueDeclaration),i=function(t,r){return!!e.findAncestor(t,function(t){return t===r?"quit":e.isFunctionLike(t)})}(t.parent,n),a=n,o=!1;a&&!e.nodeStartsNewLexicalEnvironment(a);){if(e.isIterationStatement(a,!1)){o=!0;break}a=a.parent}o&&(i&&(wr(a).flags|=65536),223===n.kind&&e.getAncestor(r.valueDeclaration,236).parent===n&&function(t,r){for(var n=t;193===n.parent.kind;)n=n.parent;var i=!1;if(e.isAssignmentTarget(n))i=!0;else if(200===n.parent.kind||201===n.parent.kind){var a=n.parent;i=43===a.operator||44===a.operator}return!!i&&!!e.findAncestor(n,function(e){return e===r?"quit":e===r.statement})}(t,n)&&(wr(r.valueDeclaration).flags|=2097152),wr(r.valueDeclaration).flags|=262144),i&&(wr(r.valueDeclaration).flags|=131072)}}(t,r);var o=w_(wi(i),t),s=e.getAssignmentTargetKind(t);if(s){if(!(3&i.flags||e.isInJavaScriptFile(t)&&512&i.flags))return hr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable,Vn(r)),ie;if(Pf(i))return hr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property,Vn(r)),ie}var c=2097152&i.flags;if(3&i.flags){if(1===s)return o}else{if(!c)return o;a=e.find(r.declarations,f)}if(!a)return o;for(var u=149===e.getRootDeclaration(a).kind,l=T_(a),_=T_(t),d=_!==l,p=t.parent&&t.parent.parent&&e.isSpreadAssignment(t.parent)&&$l(t.parent.parent);_!==l&&(194===_.kind||195===_.kind||e.isObjectLiteralOrClassExpressionMethod(_))&&(N_(i)||u&&!C_(i));)_=T_(_);var m=u||c||d||p||o!==re&&o!==We&&(!w||0!=(3&o.flags)||Bl(t)||255===t.parent.kind)||211===t.parent.kind||235===a.kind&&a.exclamationToken||4194304&a.flags,g=k_(t,o,m?u?function(e,t){return w&&149===t.kind&&t.initializer&&8192&el(e)&&!(8192&el(rm(t.initializer)))?Hl(e,131072):e}(o,a):o:o===re||o===We?oe:il(o),_,!m);if(o===re||o===We){if(g===re||g===We)return O&&(hr(e.getNameOfDeclaration(a),e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,Vn(r),Hn(g)),hr(t,e.Diagnostics.Variable_0_implicitly_has_an_1_type,Vn(r),Hn(g))),$m(g)}else if(!m&&!(8192&el(o))&&8192&el(g))return hr(t,e.Diagnostics.Variable_0_is_used_before_being_assigned,Vn(r)),o;return s?Wu(g):g}function O_(e,t){wr(e).flags|=2,152===t.kind||155===t.kind?wr(t.parent).flags|=4:wr(t).flags|=4}function M_(t){return e.isSuperCall(t)?t:e.isFunctionLike(t)?void 0:e.forEachChild(t,M_)}function L_(e){var t=wr(e);return void 0===t.hasSuperCall&&(t.superCall=M_(e.body),t.hasSuperCall=!!t.superCall),t.superCall}function R_(e){return qi(ea(vn(e)))===ue}function B_(t,r,n){var i=r.parent;if(e.getEffectiveBaseTypeNode(i)&&!R_(i)){var a=L_(r);(!a||a.end>t.pos)&&hr(t,n)}}function j_(t,r){if(void 0===r&&(r=e.getThisContainer(t,!1)),e.isFunctionLike(r)&&(!W_(t)||e.getThisParameter(r))){if(194===r.kind&&202===r.parent.kind&&3===e.getSpecialPropertyAssignmentKind(r.parent)){var n=rm(r.parent.left.expression.expression).symbol;if(n&&n.members&&16&n.flags)return k_(t,$p(n))}var i=Ci(r)||q_(r);if(i)return k_(t,i)}if(e.isClassLike(r.parent)){var a=vn(r.parent);return k_(t,o=e.hasModifier(r,32)?wi(a):ea(a).thisType)}var o;if(e.isInJavaScriptFile(t)&&(o=function(t){var r=e.getJSDocType(t);if(r&&287===r.kind){var n=r;if(n.parameters.length>0&&n.parameters[0].name&&"this"===n.parameters[0].name.escapedText)return Oc(n.parameters[0].type)}var i=e.getJSDocThisTag(t);if(i&&i.typeExpression)return Oc(i.typeExpression)}(r))&&o!==ie)return k_(t,o)}function J_(t,r){return!!e.findAncestor(t,function(e){return e===r?"quit":149===e.kind})}function z_(t){var r=189===t.parent.kind&&t.parent.expression===t,n=e.getSuperContainer(t,!0),i=!1;if(!r)for(;n&&195===n.kind;)n=e.getSuperContainer(n,!0),i=N<2;var a=0;if(!function(t){return!!t&&(r?155===t.kind:!(!e.isClassLike(t.parent)&&186!==t.parent.kind)&&(e.hasModifier(t,32)?154===t.kind||153===t.kind||156===t.kind||157===t.kind:154===t.kind||153===t.kind||156===t.kind||157===t.kind||152===t.kind||151===t.kind||155===t.kind))}(n)){var o=e.findAncestor(t,function(e){return e===n?"quit":147===e.kind});return o&&147===o.kind?hr(t,e.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name):r?hr(t,e.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):n&&n.parent&&(e.isClassLike(n.parent)||186===n.parent.kind)?hr(t,e.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):hr(t,e.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),ie}if(r||155!==n.kind||B_(t,n,e.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),a=e.hasModifier(n,32)||r?512:256,wr(t).flags|=a,154===n.kind&&e.hasModifier(n,256)&&(e.isSuperProperty(t.parent)&&e.isAssignmentTarget(t.parent)?wr(n).flags|=4096:wr(n).flags|=2048),i&&O_(t.parent,n),186===n.parent.kind)return N<2?(hr(t,e.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),ie):te;var s=n.parent;if(!e.getEffectiveBaseTypeNode(s))return hr(t,e.Diagnostics.super_can_only_be_referenced_in_a_derived_class),ie;var c=ea(vn(s)),u=c&&Vi(c)[0];return u?155===n.kind&&J_(t,n)?(hr(t,e.Diagnostics.super_cannot_be_referenced_in_constructor_arguments),ie):512===a?qi(c):va(u,c.thisType):ie}function K_(t){return 4&e.getObjectFlags(t)&&t.target===qe?t.typeArguments[0]:void 0}function U_(t){return l_(t,function(t){return 524288&t.flags?e.forEach(t.types,K_):K_(t)})}function q_(t){if(195!==t.kind){if(ru(t)){var r=pd(t);if(r){var n=r.thisParameter;if(n)return wi(n)}}var i=e.isInJavaScriptFile(t);if(M||i){var a=function(e){return 154!==e.kind&&156!==e.kind&&157!==e.kind||186!==e.parent.kind?194===e.kind&&273===e.parent.kind?e.parent.parent:void 0:e.parent}(t);if(a){for(var o=id(a),s=a,c=o;c;){var u=U_(c);if(u)return Yc(u,od(a));if(273!==s.parent.kind)break;c=id(s=s.parent.parent)}return o?al(o):Hf(a)}var l=t.parent;if(202===l.kind&&58===l.operatorToken.kind){var _=l.left;if(187===_.kind||188===_.kind){var d=_.expression;if(i&&e.isIdentifier(d)){var p=e.getSourceFileOfNode(l);if(p.commonJsModuleIndicator&&Rl(d)===p.symbol)return}return Hf(d)}}}}}function V_(t){var r=t.parent;if(ru(r)){var n=e.getImmediatelyInvokedFunctionExpression(r);if(n&&n.arguments){var i=Ep(n),a=r.parameters.indexOf(t);if(t.dotDotDotToken)return Dp(n,i,a,i.length,te,void 0);var o=wr(n),s=o.resolvedSignature;o.resolvedSignature=ft;var c=a=0}(r)?Oo(r):void 0}function G_(e,t){var r=Ep(e).indexOf(t);return-1===r?void 0:X_(e,r)}function X_(e,t){return lf(wr(e).resolvedSignature===gt?gt:Gp(e),t)}function Q_(t){var r=t.parent,n=r.left,i=r.operatorToken,a=r.right;switch(i.kind){case 58:return t===a&&function(t){var r=e.getSpecialPropertyAssignmentKind(t);switch(r){case 0:return!0;case 5:return!t.left.symbol;case 1:case 2:case 3:case 4:case 6:return!1;default:return e.Debug.assertNever(r)}}(r)?em(n):void 0;case 54:var o=ad(r);return o||t!==a||e.isDefaultedJavascriptInitializer(r)?o:em(n);case 53:case 26:return t===a?ad(r):void 0;default:return}}function Y_(e,t){return l_(e,function(e){if(917504&e.flags){var r=co(e,t);if(r)return wi(r);if(Qu(e)){var n=Yu(e);if(n&&vd(t)&&+t>=0)return n}}},!0)}function $_(e,t){return l_(e,function(e){return po(e,t)},!0)}function Z_(e){var t=id(e.parent);if(t){if(!pa(e)){var r=Y_(t,vn(e).escapedName);if(r)return r}return yd(e.name)&&$_(t,1)||$_(t,0)}}function ed(e,t){return e&&(Y_(e,""+t)||$_(e,1)||cg(e,void 0,!1,!1,!1))}function td(t){var r=t.parent;return e.isJsxAttributeLike(r)?ad(t):e.isJsxElement(r)?function(e){var t=id(e.openingElement.tagName),r=Md(Id(e));return t&&!ci(t)&&r&&""!==r?Y_(t,r):void 0}(r):void 0}function rd(t){if(e.isJsxAttribute(t)){var r=id(t.parent);if(!r||ci(r))return;return Y_(r,t.name.escapedText)}return ad(t.parent)}function nd(e){switch(e.kind){case 9:case 8:case 13:case 101:case 86:case 95:case 71:return!0;case 187:case 193:return nd(e.expression)}return!1}function id(t){var r,n=ad(t);if(!((n=n&&l_(n,io))&&262144&n.flags&&e.isObjectLiteralExpression(t)))return n;e:for(var i=0,a=t.properties;i=2)return $o(s,c=Co([Hf(r.tagName),i],s.typeParameters,2,e.isInJavaScriptFile(r)));if(e.length(s.aliasTypeArguments)>=2){var c=Co([Hf(r.tagName),i],s.aliasTypeArguments,2,e.isInJavaScriptFile(r));return rs(s.aliasSymbol,c)}}return i}function cd(r,n,i,a){var o,s=Id(i),c=(o=s,Od(t.ElementAttributesPropertyNameContainer,o)),u=void 0===c?hf(r,De):""===c?Oo(r):function(e,t){var r=Oo(e);return ci(r)?r:si(r,t)}(r,c);if(!u)return a&&c&&e.length(i.attributes.properties)&&hr(i,e.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,e.unescapeLeadingUnderscores(c)),De;if(ci(u=sd(i,s,u)))return u;var l=u,_=Ad(t.IntrinsicClassAttributes,i);if(_!==ie){var d=Bi(_.symbol),p=Oo(r);l=Ea(d?$o(_,Co([p],d,To(d),n)):_,l)}var f=Ad(t.IntrinsicAttributes,i);return f!==ie&&(l=Ea(f,l)),l}function ud(t,r){var n=lo(t,0);if(1===n.length){var i=n[0];if(!function(t,r){for(var n=0;n0&&206===n[i-1].kind,m=i-(f?1:0);if(s&&m>0)return(p=Zo(Bs(o,m,f))).pattern=t,p;if(c&&function(t){return!!(262144&t.flags?e.forEach(t.types,zu):zu(t))}(c)){var g=c.pattern;if(!f&&g&&(183===g.kind||185===g.kind))for(var y=g.elements,h=i;h0&&(o=kc(o,P(),t.symbol,s,0),a=[],n=e.createSymbolTable(),f=!1,m=!1,d=0),!Dd(x=rm(h.expression)))return hr(h,e.Diagnostics.Spread_types_may_only_be_created_from_object_types),ie;o=kc(o,x,t.symbol,s,0),g=y+1;continue}e.Debug.assert(156===h.kind||157===h.kind),zg(h)}!b||2240&b.flags?n.set(v.escapedName,v):cu(b,xe)&&(cu(b,_e)?m=!0:f=!0,i&&(p=!0)),a.push(v)}if(u)for(var C=0,A=Wa(c);C0&&(o=kc(o,P(),t.symbol,s,0)),o):P();function P(){var r=_?bt:f?xd(t.properties,g,a,0):void 0,o=m&&!_?xd(t.properties,g,a,1):void 0,c=Fn(t.symbol,n,e.emptyArray,e.emptyArray,r,o),u=E.suppressExcessPropertyErrors?0:33554432;return c.flags|=268435456|u|939524096&d,c.objectFlags|=128,p&&(c.objectFlags|=512),i&&(c.pattern=t),24576&c.flags||(s|=939524096&c.flags),c}}function Dd(t){return!!(16777219&t.flags||29120&el(t)&&Dd(tl(t))||131072&t.flags&&!za(t)||786432&t.flags&&e.every(t.types,Dd))}function kd(t){return!e.stringContains(t,"-")}function Td(t){return 71===t.kind&&e.isIntrinsicJsxName(t.escapedText)}function Cd(e,t){return e.initializer?Qf(e.initializer,t):pe}function Ed(e,t){for(var r=[],n=0,i=e.children;n0&&(o=kc(o,b(),i.symbol,0,4096),a=e.createSymbolTable()),ci(f=Hf(d.expression,r))&&(s=!0),Dd(f)?o=kc(o,f,t.symbol,0,4096):n=n?Ys([n,f]):f}s||a.size>0&&(o=kc(o,b(),i.symbol,0,4096));var g=258===t.parent.kind?t.parent:void 0;if(g&&g.openingElement===t&&g.children.length>0){var y=Ed(g,r);if(!s&&u&&""!==u){c&&hr(i,e.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,e.unescapeLeadingUnderscores(u));var h=br(33554436,u);h.type=1===y.length?y[0]:Ls(Ws(y));var v=e.createSymbolTable();v.set(u,h),o=kc(o,Fn(i.symbol,v,e.emptyArray,e.emptyArray,void 0,void 0),i.symbol,0,4096)}}return s?te:n&&o!==De?Ys([n,o]):n||(o===De?b():o);function b(){var t=Fn(i.symbol,a,e.emptyArray,e.emptyArray,void 0,void 0);return t.flags|=268435456,t.objectFlags|=4224,t}}(t.parent,r)}function Ad(e,t){var r=Id(t),n=r&&fn(r),i=n&&Ir(n,e,67901928);return i?ea(i):ie}function Pd(r){var n=wr(r);if(!n.resolvedSymbol){var i=Ad(t.IntrinsicElements,r);if(i!==ie){if(!e.isIdentifier(r.tagName))return e.Debug.fail();var a=co(i,r.tagName.escapedText);return a?(n.jsxFlags|=1,n.resolvedSymbol=a):mo(i,0)?(n.jsxFlags|=2,n.resolvedSymbol=i.symbol):(hr(r,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.idText(r.tagName),"JSX."+t.IntrinsicElements),n.resolvedSymbol=Z)}return O&&hr(r,e.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,e.unescapeLeadingUnderscores(t.IntrinsicElements)),n.resolvedSymbol=Z}return n.resolvedSymbol}function wd(t,r){for(var n,i=[],a=!!t.typeArguments,o=0,s=r;o1&&hr(n.declarations[0],e.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property,e.unescapeLeadingUnderscores(t))}}function Md(e){return Od(t.ElementChildrenAttributeNameContainer,e)}function Ld(e){if(e){if(524288&e.flags){for(var t=[],r=0,n=e.types;r=0)return s>=ff(n)&&(gf(n)||spf(n))return!1;var l=a>=ff(n);return o||l}function hp(t,r){var n=e.length(t.typeParameters),i=To(t.typeParameters);return!r||r.length>=i&&r.length<=n}function vp(e){if(131072&e.flags){var t=Ka(e);if(1===t.callSignatures.length&&0===t.constructSignatures.length&&0===t.properties.length&&!t.stringIndexInfo&&!t.numberIndexInfo)return t.callSignatures[0]}}function bp(t,r,n,i){var a=hl(t.typeParameters,t,1,i);return yl(n?Vc(r,n):r,t,function(e,t){Nl(a.inferences,e,t)}),n||Nl(a.inferences,Oo(r),Oo(t),8),Lo(t,Ll(a),e.isInJavaScriptFile(r.declaration))}function xp(e,t,r){var n=lf(e,0),i=Wf(t.attributes,n,C);Nl(r.inferences,i,n);var a=lf(e,0),o=Wf(t.attributes,a,r);return Nl(r.inferences,o,a),Ll(r)}function Sp(e,t,r,n,i){for(var a=0,o=i.inferences;a=i-1){var s=Fp(t,r,i-1);if(mp(s))return 213===s.kind?Ls(s.type):Wf(s.expression,a,o)}for(var c=mo(a,1)||te,u=Of(c,1081340),l=[],_=-1,d=n;d=0?wi(n.parameters[_]):te,p=0;p0?[t.attributes]:e.emptyArray;var i=t.arguments||e.emptyArray,a=i.length;if(a&&mp(i[a-1])&&gp(i)===a-1){var o=i[a-1],s=Hf(o.expression);if(Qu(s)){var c=s.typeArguments||e.emptyArray,u=s.target.hasRestElement?c.length-1:-1,l=e.map(c,function(t,r){var n=e.createNode(213,o.pos,o.end);return n.parent=o,n.type=t,n.isSpread=r===u,n});return e.concatenate(i.slice(0,a-1),l)}}return i}}function Np(t,r,n){if(150!==t.kind)return r.length;switch(t.parent.kind){case 238:case 207:return 1;case 152:return 2;case 154:case 156:case 157:return 0===N?2:n.parameters.length>=3?3:2;case 149:return 3;default:return e.Debug.fail()}}function Ap(t){return 238===t.kind?wi(vn(t)):149===t.kind&&155===(t=t.parent).kind?wi(vn(t)):152===t.kind||154===t.kind||156===t.kind||157===t.kind?function(t){var r=vn(t.parent);return e.hasModifier(t,32)?wi(r):ea(r)}(t):(e.Debug.fail("Unsupported decorator target."),ie)}function Pp(t,r){return 0===r?Ap(t.parent):1===r?function(t){if(238===t.kind)return e.Debug.fail("Class decorators should not have a second synthetic argument."),ie;if(149===t.kind&&155===(t=t.parent).kind)return te;if(152===t.kind||154===t.kind||156===t.kind||157===t.kind){var r=t.name;switch(r.kind){case 71:return wc(e.idText(r));case 8:case 9:return wc(r.text);case 147:var n=bd(r);return Mf(n,3072)?n:le;default:return e.Debug.fail("Unsupported property name."),ie}}return e.Debug.fail("Unsupported decorator target."),ie}(t.parent):2===r?function(t){return 238===t.kind?(e.Debug.fail("Class decorators should not have a third synthetic argument."),ie):149===t.kind?_e:152===t.kind?(e.Debug.fail("Property decorators should not have a third synthetic argument."),ie):154===t.kind||156===t.kind||157===t.kind?Fs(ty(t)):(e.Debug.fail("Unsupported decorator target."),ie)}(t.parent):(e.Debug.fail("Decorators should not have a fourth synthetic argument."),ie)}function wp(e,t){return 150===e.kind?Pp(e,t):0===t&&191===e.kind?st||(st=vs("TemplateStringsArray",0,!0))||De:void 0}function Fp(e,t,r){if(150!==e.kind&&(0!==r||191!==e.kind))return t[r]}function Ip(e,t,r){return 150===e.kind?e.expression:0===t&&191===e.kind?e.template:r}function Op(t,r,n){for(var i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,c=n.length,u=0,l=r;uo&&(o=d),c-1;if(c<=a&&g&&c--,f||g){var y=f&&g?e.Diagnostics.Expected_at_least_0_arguments_but_got_1_or_more:f?e.Diagnostics.Expected_at_least_0_arguments_but_got_1:e.Diagnostics.Expected_0_arguments_but_got_1_or_more;return e.createDiagnosticForNode(t,y,m,c)}return i1&&(m=x(l,cr,b)),m||(m=x(l,ur,b)),m)return m;if(d){if(u)return d;Tp(t,g,d,ur,void 0,!0)}else p?Ht.add(Op(t,[p],g)):f?kp(f,t.typeArguments,!0,i):a&&e.every(r,function(t){return e.length(t.typeParameters)!==a.length})?Ht.add(Mp(t,r,a)):g?Ht.add(Op(t,r,g)):i&&Ht.add(e.createDiagnosticForNode(t,i));return o||!g?fp(t):function(t,r,n,i){return e.Debug.assert(r.length>0),i||1===r.length||r.some(function(e){return!!e.typeParameters})?function(t,r,n){var i=function(e,t){for(var r=-1,n=-1,i=0;i=t)return i;o>n&&(n=o,r=i)}return r}(r,void 0===J?n.length:J),a=r[i],o=a.typeParameters;if(!o)return a;for(var s=(dp(t)&&t.typeArguments||e.emptyArray).map(function(e){return ty(e)||te});s.length>o.length;)s.pop();for(;s.length0?_[_.indexOf(!0)]=!1:_=void 0}}}}}function Rp(e){var t=e.parameters.length;return e.hasRestParameter?t-1:t}function Bp(e,t){return jp(e,Ws(t,2))}function jp(t,r){return sl(e.first(t),r)}function Jp(e,t,r,n){return ci(e)||ci(t)&&65536&e.flags||!r&&!n&&!(294912&t.flags)&&cu(e,Re)}function zp(t,r){if(t.arguments&&N<1){var n=gp(t.arguments);n>=0&&hr(t.arguments[n],e.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher)}var i=Qd(t.expression);if(i===he)return yt;if((i=io(i))===ie)return fp(t);if(ci(i))return t.typeArguments&&hr(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),pp(t);var a=lo(i,1);if(a.length){if(!function(t,r){if(!r||!r.declaration)return!0;var n=r.declaration,i=e.getSelectedModifierFlags(n,24);if(!i)return!0;var a=e.getClassLikeDeclarationOfSymbol(n.parent.symbol),o=ea(n.parent.symbol);if(!Yg(t,a)){var s=e.getContainingClass(t);if(s&&16&i){var c=ty(s);if(function t(r,n){var i=Vi(n);if(!e.length(i))return!1;var a=i[0];if(524288&a.flags){for(var o=a.types,s=e.countWhere(o,ji),c=0,u=0,l=a.types;u0)return Lp(t,i,n)}function Hp(t,r){switch(t.kind){case 189:return function(t,r){if(97===t.expression.kind){var n=z_(t.expression);if(ci(n))return e.forEach(t.arguments,tm),ft;if(n!==ie){var i=e.getEffectiveBaseTypeNode(e.getContainingClass(t));if(i)return Lp(t,Ui(n,i.typeArguments,i),r)}return pp(t)}var a=Qd(t.expression,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined);if(a===he)return yt;var o=io(a);if(o===ie)return fp(t);var s=lo(o,0),c=lo(o,1);return Jp(a,o,s.length,c.length)?(a!==ie&&t.typeArguments&&hr(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),pp(t)):s.length?Lp(t,s,r):(c.length?hr(t,e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Hn(a)):Kp(t,o,0),fp(t))}(t,r);case 190:return zp(t,r);case 191:return function(e,t){var r=rm(e.tag),n=io(r);if(n===ie)return fp(e);var i=lo(n,0),a=lo(n,1);return Jp(r,n,i.length,a.length)?pp(e):i.length?Lp(e,i,t):(Kp(e,n,0),fp(e))}(t,r);case 150:return Vp(t,r);case 260:case 259:return c_(rm(t.tagName),function(n){var i=Wp(t,n,r);if(i&&i!==mt)return i;var a=Rd(t,n);return r&&e.length(a)&&r.push.apply(r,a),e.length(a)?a[0]:mt})||mt}throw e.Debug.assertNever(t,"Branch in 'resolveSignature' should be unreachable.")}function Gp(e,t){var r=wr(e),n=r.resolvedSignature;if(n&&n!==gt&&!t)return n;r.resolvedSignature=gt;var i=Hp(e,t);return r.resolvedSignature=kt===Tt?i:n,i}function Xp(t){if(t&&e.isInJavaScriptFile(t)){if(e.getJSDocClassTag(t))return!0;var r=e.isFunctionDeclaration(t)||e.isFunctionExpression(t)?vn(t):e.isVariableDeclaration(t)&&t.initializer&&e.isFunctionExpression(t.initializer)?vn(t.initializer):void 0;return!!r&&void 0!==r.members}return!1}function Qp(t){var r=t.valueDeclaration,n=r&&r.parent&&(e.isFunctionDeclaration(r)&&vn(r)||e.isBinaryExpression(r.parent)&&vn(r.parent.left)||e.isVariableDeclaration(r.parent)&&vn(r.parent));if(n){var i=e.forEach(n.declarations,Yp);if(i)return rm(i)}}function Yp(t){if(!t.parent)return!1;for(var r=t.parent;r&&187===r.kind;)r=r.parent;if(r&&e.isBinaryExpression(r)&&e.isPrototypeAccess(r.left)&&58===r.operatorToken.kind){var n=e.getInitializerOfBinaryExpression(r);return e.isObjectLiteralExpression(n)&&n}}function $p(t){var r=Pr(t);return r.inferredClassType||(r.inferredClassType=Fn(t,ya(t)||T,e.emptyArray,e.emptyArray,void 0,void 0)),r.inferredClassType}function Zp(t){return t.symbol&&16&e.getObjectFlags(t)&&Pr(t.symbol).inferredClassType===t}function ef(t){Jy(t,t.typeArguments)||zy(t.arguments);var r=Gp(t);if(97===t.expression.kind)return ge;if(190===t.kind){var n=r.declaration;if(n&&155!==n.kind&&159!==n.kind&&164!==n.kind&&!e.isJSDocConstructSignature(n)){var i=rm(t.expression).symbol;i||71!==t.expression.kind||(i=Rl(t.expression));var a=i&&function(e){var t;Xp(e.valueDeclaration)&&(t=$p(e));var r=Qp(e),n=wi(e);return n.symbol&&!Zp(n)&&Xp(n.symbol.valueDeclaration)&&(t=$p(n.symbol)),r&&t?Ys([t,r]):r||t}(i);return a?r.target?Yc(a,r.mapper):a:(O&&hr(t,e.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type),te)}}if(e.isInJavaScriptFile(t)&&af(t))return function(e){var t=an(e,e);if(t){var r=un(t);if(r)return wi(r)}return te}(t.arguments[0]);var o,s=Oo(r);if(3072&s.flags&&tf(t))return Fc(e.walkUpParenthesizedExpressions(t.parent));if(e.isInJavaScriptFile(t)){var c=e.getDeclarationOfJSInitializer(t);if(c){var u=vn(c);u&&e.hasEntries(u.exports)&&(o=Fn(u,u.exports,e.emptyArray,e.emptyArray,bt,void 0))}}return o?Ys([s,o]):s}function tf(t){if(!e.isCallExpression(t))return!1;var r=t.expression;if(e.isPropertyAccessExpression(r)&&"for"===r.name.escapedText&&(r=r.expression),!e.isIdentifier(r)||"Symbol"!==r.escapedText)return!1;var n=bs(!1);return!!n&&n===Mr(r,"Symbol",67216319,void 0,void 0,!1)}function rf(t){if(zy(t.arguments)||function(t){if(A===e.ModuleKind.ES2015)return rh(t,e.Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext);if(t.typeArguments)return rh(t,e.Diagnostics.Dynamic_import_cannot_have_type_arguments);var r=t.arguments;1!==r.length?rh(t,e.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument):e.isSpreadElement(r[0])&&rh(r[0],e.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element)}(t),0===t.arguments.length)return xf(t,te);for(var r=t.arguments[0],n=Hf(r),i=1;i0)return e.parameters.length-1+r}}return e.minArgumentCount}function mf(e){if(e.hasRestParameter){var t=wi(e.parameters[e.parameters.length-1]);if(15794176&t.flags)return t}}function gf(e){if(e.hasRestParameter){var t=wi(e.parameters[e.parameters.length-1]);return!Qu(t)||t.target.hasRestElement}return!1}function yf(e){return hf(e,ye)}function hf(e,t){return e.parameters.length>0?lf(e,0):t}function vf(t,r){var n=Pr(t);if(!n.type){n.type=r;var i=t.valueDeclaration;71!==i.name.kind&&(n.type===De&&(n.type=vi(i.name)),function t(r){for(var n=0,i=r.elements;n=2||E.noEmit||!e.hasRestParameter(t)||4194304&t.flags||e.nodeIsMissing(t.body)||e.forEach(t.parameters,function(t){t.name&&!e.isBindingPattern(t.name)&&t.name.escapedText===K.escapedName&&hr(t,e.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)})}(t);var n=e.getEffectiveReturnTypeNode(t);if(O&&!n)switch(t.kind){case 159:hr(t,e.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 158:hr(t,e.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(n){var i=e.getFunctionFlags(t);if(1==(5&i)){var a=Oc(n);if(a===ge)hr(n,e.Diagnostics.A_generator_cannot_have_a_void_type_annotation);else{var s=dg(a,0!=(2&i))||te;du(2&i?Is(s):Ms(s),a,n)}}else 2==(3&i)&&Em(t,n)}160!==t.kind&&287!==t.kind&&Mm(t)}}function sm(t){for(var r=e.createMap(),n=0,i=t.members;n0&&r.declarations[0]!==t)return}var n=qo(vn(t));if(n)for(var i=!1,a=!1,o=0,s=n.declarations;o=0)return void(r&&hr(r,e.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));Wt.push(t.id);var l=Cm(u,r,n);if(Wt.pop(),!l)return;return i.awaitedTypeOfType=l}var _=si(t,"then");if(!(_&&lo(_,0).length>0))return i.awaitedTypeOfType=t;if(r){if(!n)return e.Debug.fail();hr(r,n)}}function Em(t,r){var n=Oc(r);if(N>=2){if(n===ie)return ie;var i=Ss(!0);if(i!==Ce&&!Fi(n,i))return hr(r,e.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type),ie}else{if(function(t){Am(t&&e.getEntityNameFromTypeNode(t))}(r),n===ie)return ie;var a=e.getEntityNameFromTypeNode(r);if(void 0===a)return hr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,Hn(n)),ie;var o=nn(a,67216319,!0),s=o?wi(o):ie;if(s===ie)return 71===a.kind&&"Promise"===a.escapedText&&Ii(n)===Ss(!1)?hr(r,e.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):hr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a)),ie;var c=et||(et=vs("PromiseConstructorLike",0,!0))||De;if(c===De)return hr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a)),ie;if(!du(s,c,r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value))return ie;var u=a&&wg(a),l=Ir(t.locals,u.escapedText,67216319);if(l)return hr(l.valueDeclaration,e.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,e.idText(u),e.entityNameToString(a)),ie}return Tm(n,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}function Nm(t){var r=Oo(Gp(t));if(!(1&r.flags)){var n,i,a=qp(t);switch(t.parent.kind){case 238:n=Ws([wi(vn(t.parent)),ge]);break;case 149:n=ge,i=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);break;case 152:n=ge,i=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);break;case 154:case 156:case 157:n=Ws([Fs(ty(t.parent)),ge]);break;default:return e.Debug.fail()}du(r,n,t,a,function(){return i})}}function Am(e){if(e){var t=wg(e),r=2097152|(71===e.kind?67901928:1920),n=Mr(t,t.escapedText,r,void 0,void 0,!0);n&&2097152&n.flags&&kn(n)&&!my($r(n))&&en(n)}}function Pm(t){var r=function t(r){if(r)switch(r.kind){case 172:case 171:for(var n=void 0,i=0,a=r.types;i=e.ModuleKind.ES2015||E.noEmit)&&(Wm(t,r,"require")||Wm(t,r,"exports"))&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var n=oi(t);277===n.kind&&e.isExternalOrCommonJsModule(n)&&hr(r,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,e.declarationNameToString(r),e.declarationNameToString(r))}}function Qm(t,r){if(!(N>=4||E.noEmit)&&Wm(t,r,"Promise")&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var n=oi(t);277===n.kind&&e.isExternalOrCommonJsModule(n)&&1024&n.flags&&hr(r,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,e.declarationNameToString(r),e.declarationNameToString(r))}}function Ym(t){if(149===e.getRootDeclaration(t).kind){var r=e.getContainingFunction(t);!function n(i){if(!e.isTypeNode(i)&&!e.isDeclarationName(i)){if(187===i.kind)return n(i.expression);if(71!==i.kind)return e.forEachChild(i,n);var a=Mr(i,i.escapedText,69313471,void 0,void 0,!1);if(a&&a!==Z&&a.valueDeclaration)if(a.valueDeclaration!==t){var o=e.getEnclosingBlockScopeContainer(a.valueDeclaration);if(o===r){if(149===a.valueDeclaration.kind||184===a.valueDeclaration.kind){if(a.valueDeclaration.pos=1&&tg(t.declarations[0])}function og(e,t){return sg(Qd(e),e,!0,void 0!==t)}function sg(e,t,r,n){return ci(e)?e:cg(e,t,r,n,!0)||te}function cg(t,r,n,i,a){if(t!==ye){var o=N>=2,s=!o&&E.downlevelIteration;if(o||s||i){var c=ug(t,o?r:void 0,i,!0,a);if(c||o)return c}var u=t,l=!1,_=!1;if(n){if(262144&u.flags){var d=t.types,p=e.filter(d,function(e){return!(68&e.flags)});p!==d&&(u=Ws(p,2))}else 68&u.flags&&(u=ye);if((_=u!==t)&&(N<1&&r&&(hr(r,e.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher),l=!0),32768&u.flags))return le}if(!ju(u)){if(r&&!l){var f=!!ug(t,void 0,i,!0,a);hr(r,!n||_?s?e.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:f?e.Diagnostics.Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:e.Diagnostics.Type_0_is_not_an_array_type:s?e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:f?e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type,Hn(u))}return _?le:void 0}var m=mo(u,1);return _&&m?68&m.flags?le:Ws([m,le],2):m}lg(r,t,i)}function ug(t,r,n,i,a){if(!ci(t))return l_(t,function(t){var o=t;if(n){if(o.iteratedTypeOfAsyncIterable)return o.iteratedTypeOfAsyncIterable;if(Fi(t,ks(!1))||Fi(t,Cs(!1)))return o.iteratedTypeOfAsyncIterable=t.typeArguments[0]}if(i){if(o.iteratedTypeOfIterable)return o.iteratedTypeOfIterable;if(Fi(t,Es(!1))||Fi(t,As(!1)))return o.iteratedTypeOfIterable=t.typeArguments[0]}var s=n&&si(t,e.getPropertyNameForKnownSymbolName("asyncIterator")),c=s||(i?si(t,e.getPropertyNameForKnownSymbolName("iterator")):void 0);if(!ci(c)){var u=c?lo(c,0):void 0;if(e.some(u)){var l=_g(Ws(e.map(u,Oo),2),r,!!s);return a&&r&&l&&du(t,s?function(e){return ws(ks(!0),[e])}(l):Os(l),r),s?o.iteratedTypeOfAsyncIterable=l:o.iteratedTypeOfIterable=l}r&&(lg(r,t,n),r=void 0)}})}function lg(t,r,n){hr(t,n?e.Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:e.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator,Hn(r))}function _g(t,r,n){if(!ci(t)){var i=t;if(n?i.iteratedTypeOfAsyncIterator:i.iteratedTypeOfIterator)return n?i.iteratedTypeOfAsyncIterator:i.iteratedTypeOfIterator;if(Fi(t,(n?Ts:Ns)(!1)))return n?i.iteratedTypeOfAsyncIterator=t.typeArguments[0]:i.iteratedTypeOfIterator=t.typeArguments[0];var a=si(t,"next");if(!ci(a)){var o=a?lo(a,0):e.emptyArray;if(0!==o.length){var s=Ws(e.map(o,Oo),2);if(!(ci(s)||n&&ci(s=Dm(s,r,e.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property)))){var c=s&&si(s,"value");if(c)return n?i.iteratedTypeOfAsyncIterator=c:i.iteratedTypeOfIterator=c;r&&hr(r,n?e.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:e.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property)}}else r&&hr(r,n?e.Diagnostics.An_async_iterator_must_have_a_next_method:e.Diagnostics.An_iterator_must_have_a_next_method)}}}function dg(e,t){if(!ci(e))return ug(e,void 0,t,!t,!1)||_g(e,void 0,t)}function pg(t){nh(t)||function(t){for(var r=t;r;){if(e.isFunctionLike(r))return rh(t,e.Diagnostics.Jump_target_cannot_cross_function_boundary);switch(r.kind){case 231:if(t.label&&r.label.escapedText===t.label.escapedText){var n=226===t.kind&&!e.isIterationStatement(r.statement,!0);return!!n&&rh(t,e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement)}break;case 230:if(227===t.kind&&!t.label)return!1;break;default:if(e.isIterationStatement(r,!1)&&!t.label)return!1}r=r.parent}if(t.label){var i=227===t.kind?e.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;return rh(t,i)}var i=227===t.kind?e.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:e.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;rh(t,i)}(t)}function fg(t){return 156===t.kind&&void 0!==e.getEffectiveSetAccessorTypeAnnotationNode(e.getDeclarationOfKind(t.symbol,157))}function mg(t,r){var n=2==(3&e.getFunctionFlags(t))?km(r):r;return!!n&&Of(n,4099)}function gg(t){nh(t)||void 0===t.expression&&function(t,r,n,i,a){var o=e.getSourceFileOfNode(t);if(!Zy(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);Ht.add(e.createFileDiagnostic(o,e.textSpanEnd(s),0,r,n,i,a))}}(t,e.Diagnostics.Line_break_not_permitted_here),t.expression&&rm(t.expression)}function yg(t){var r,n=Vo(t.symbol,1),i=Vo(t.symbol,0),a=mo(t,0),o=mo(t,1);if(a||o){e.forEach(Ua(t),function(e){var r=wi(e);p(e,r,t,i,a,0),p(e,r,t,n,o,1)});var s=t.symbol.valueDeclaration;if(1&e.getObjectFlags(t)&&e.isClassLike(s))for(var c=0,u=s.members;cn)return!1;for(var l=0;l1)return eh(o.types[1],e.Diagnostics.Classes_can_only_extend_a_single_class);r=!0}else{if(e.Debug.assert(108===o.token),n)return eh(o,e.Diagnostics.implements_clause_already_seen);n=!0}Ky(o)}})(t)||By(t.typeParameters,r)}(t),Fm(t),t.name&&(hg(t.name,e.Diagnostics.Class_name_cannot_be_0),Xm(t,t.name),Qm(t,t.name),4194304&t.flags||(r=t.name,1===N&&"Object"===r.escapedText&&A!==e.ModuleKind.ES2015&&A!==e.ModuleKind.ESNext&&hr(r,e.Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,e.ModuleKind[A]))),vg(e.getEffectiveTypeParameterDeclarations(t)),Sm(t);var n=vn(t),i=ea(n),a=va(i),s=wi(n);bg(n),function(t){var r;!function(e){e[e.Getter=1]="Getter",e[e.Setter=2]="Setter",e[e.Method=4]="Method",e[e.Property=3]="Property"}(r||(r={}));for(var n=e.createUnderscoreEscapedMap(),i=e.createUnderscoreEscapedMap(),a=0,o=t.members;a>s;case 47:return a>>>s;case 45:return a<1&&!n&&_(t,!!E.preserveConstEnums||!!E.isolatedModules)){var s=function(t){for(var r=0,n=t.declarations;r1)for(var o=0,s=n;o=0)r.parameters[n.parameterIndex].dotDotDotToken?hr(i,e.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter):du(n.type,ty(r.parameters[n.parameterIndex]),t.type,void 0,function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type)});else if(i){for(var a=!1,o=0,s=r.parameters;o0),n.length>1&&hr(n[1],e.Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);var i=Im(t.class.expression),a=e.getClassExtendsHeritageElement(r);if(a){var o=Im(a.expression);o&&i.escapedText!==o.escapedText&&hr(i,e.Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause,e.idText(t.tagName),e.idText(i),e.idText(o))}}else hr(r,e.Diagnostics.JSDoc_0_is_not_attached_to_a_class,e.idText(t.tagName))}(t);case 301:case 295:return function(t){t.typeExpression||hr(t.name,e.Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),t.name&&hg(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),jg(t.typeExpression)}(t);case 299:return function(e){jg(e.typeExpression)}(t);case 296:return function(t){if(jg(t.typeExpression),!e.getParameterSymbolFromJSDoc(t)){var r=e.getHostSignatureFromJSDoc(t);if(r){var n=e.getJSDocTags(r).filter(e.isJSDocParameterTag).indexOf(t);if(n>-1&&n0?s.statements[0].pos:s.end)-u,e.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),n=!0}if(o&&269===s.kind){var l=rm(s.expression),_=Vu(l),d=i;_&&a||(l=_?Wu(l):l,d=Wu(i)),Kf(d,l)||gu(l,d,s.expression,void 0)}e.forEach(s.statements,jg)}),t.caseBlock.locals&&Mm(t.caseBlock)}(t);case 231:return function(t){nh(t)||e.findAncestor(t.parent,function(r){return e.isFunctionLike(r)?"quit":231===r.kind&&r.label.escapedText===t.label.escapedText&&(rh(t.label,e.Diagnostics.Duplicate_label_0,e.getTextOfNode(t.label)),!0)}),jg(t.statement)}(t);case 232:return gg(t);case 233:return function(t){nh(t),Vm(t.tryBlock);var r=t.catchClause;if(r){if(r.variableDeclaration)if(r.variableDeclaration.type)eh(r.variableDeclaration.type,e.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation);else if(r.variableDeclaration.initializer)eh(r.variableDeclaration.initializer,e.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);else{var n=r.block.locals;n&&e.forEachKey(r.locals,function(t){var r=n.get(t);r&&0!=(2&r.flags)&&rh(r.valueDeclaration,e.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause,t)})}Vm(r.block)}t.finallyBlock&&Vm(t.finallyBlock)}(t);case 235:return tg(t);case 184:return rg(t);case 238:return function(t){t.name||e.hasModifier(t,512)||eh(t,e.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name),xg(t),e.forEach(t.members,jg),Mm(t)}(t);case 239:return Cg(t);case 240:return function(t){My(t),hg(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),vg(t.typeParameters),jg(t.type),Mm(t)}(t);case 241:return function(t){if(o){My(t),hg(t.name,e.Diagnostics.Enum_name_cannot_be_0),Xm(t,t.name),Qm(t,t.name),Sm(t),Eg(t);var r=e.isEnumConst(t);E.isolatedModules&&r&&4194304&t.flags&&hr(t.name,e.Diagnostics.Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided);var n=vn(t);if(t===e.getDeclarationOfKind(n,t.kind)){n.declarations.length>1&&e.forEach(n.declarations,function(t){e.isEnumDeclaration(t)&&e.isEnumConst(t)!==r&&hr(e.getNameOfDeclaration(t),e.Diagnostics.Enum_declarations_must_all_be_const_or_non_const)});var i=!1;e.forEach(n.declarations,function(t){if(241!==t.kind)return!1;var r=t;if(!r.members.length)return!1;var n=r.members[0];n.initializer||(i?hr(n.name,e.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):i=!0)})}}}(t);case 242:return Ag(t);case 247:return function(t){if(!Mg(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(!My(t)&&e.hasModifiers(t)&&eh(t,e.Diagnostics.An_import_declaration_cannot_have_modifiers),Fg(t))){var r=t.importClause;r&&(r.name&&Og(r),r.namedBindings&&(249===r.namedBindings.kind?Og(r.namedBindings):an(t,t.moduleSpecifier)&&e.forEach(r.namedBindings.elements,Og)))}}(t);case 246:return function(t){if(!Mg(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(My(t),e.isInternalModuleImportEqualsDeclaration(t)||Fg(t)))if(Og(t),e.hasModifier(t,1)&&Zr(t),257!==t.moduleReference.kind){var r=$r(vn(t));if(r!==Z){if(67216319&r.flags){var n=wg(t.moduleReference);1920&nn(n,67217343).flags||hr(n,e.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,e.declarationNameToString(n))}67901928&r.flags&&hg(t.name,e.Diagnostics.Import_name_cannot_be_0)}}else A>=e.ModuleKind.ES2015&&!(4194304&t.flags)&&rh(t,e.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(t);case 253:return function(t){if(!Mg(t,e.Diagnostics.An_export_declaration_can_only_be_used_in_a_module)&&(!My(t)&&e.hasModifiers(t)&&eh(t,e.Diagnostics.An_export_declaration_cannot_have_modifiers),!t.moduleSpecifier||Fg(t)))if(t.exportClause){e.forEach(t.exportClause.elements,Lg);var r=243===t.parent.kind&&e.isAmbientModule(t.parent.parent),n=!r&&243===t.parent.kind&&!t.moduleSpecifier&&4194304&t.flags;277===t.parent.kind||r||n||hr(t,e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace)}else{var i=an(t,t.moduleSpecifier);i&&_n(i)&&hr(t.moduleSpecifier,e.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,Vn(i)),A!==e.ModuleKind.System&&A!==e.ModuleKind.ES2015&&A!==e.ModuleKind.ESNext&&Iy(t,32768)}}(t);case 252:return function(t){if(!Mg(t,e.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)){var r=277===t.parent.kind?t.parent:t.parent.parent;242!==r.kind||e.isAmbientModule(r)?(!My(t)&&e.hasModifiers(t)&&eh(t,e.Diagnostics.An_export_assignment_cannot_have_modifiers),71===t.expression.kind?(Zr(t),E.declaration&&ti(t.expression,!0)):Hf(t.expression),Rg(r),4194304&t.flags&&!e.isEntityNameExpression(t.expression)&&rh(t.expression,e.Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),!t.isExportEquals||4194304&t.flags||(A>=e.ModuleKind.ES2015?rh(t,e.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):A===e.ModuleKind.System&&rh(t,e.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system))):t.isExportEquals?hr(t,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace):hr(t,e.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module)}}(t);case 218:case 234:return void nh(t);case 256:return function(e){Fm(e)}(t)}}}function Jg(t){e.isInJavaScriptFile(t)||rh(t,e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments)}function zg(e){if(lt){var t=""+u(e);lt.set(t,e)}}function Kg(){lt.forEach(function(t){switch(t.kind){case 194:case 195:case 154:case 153:!function(t){e.Debug.assert(154!==t.kind||e.isObjectLiteralMethod(t));var r=e.getFunctionFlags(t),n=Nf(t,r);if(0==(1&r)&&Cf(t,n),t.body)if(e.getEffectiveReturnTypeNode(t)||Oo(Eo(t)),216===t.body.kind)jg(t.body);else{var i=rm(t.body);n&&pu(2==(3&r)?Tm(i,t.body,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):i,n,t.body,t.body)}}(t);break;case 156:case 157:_m(t);break;case 207:!function(t){e.forEach(t.members,jg),Mm(t)}(t);break;case 259:!function(e){qd(e,0)}(t);break;case 258:!function(e){qd(e.openingElement,0),Td(e.closingElement.tagName)?Pd(e.closingElement):rm(e.closingElement.tagName)}(t)}})}function Ug(t){e.performance.mark("beforeCheck"),function(t){var r=wr(t);if(!(1&r.flags)){if(E.skipLibCheck&&t.isDeclarationFile||E.skipDefaultLibCheck&&t.hasNoDefaultLib)return;!function(t){4194304&t.flags&&function(t){for(var r=0,n=t.statements;r0?e.concatenate(o,i):i}return e.forEach(a.getSourceFiles(),Ug),Ht.getDiagnostics()}(t)}finally{m=void 0}}function Hg(){if(!o)throw new Error("Trying to get diagnostics from a type checker that does not produce them.")}function Gg(e){switch(e.kind){case 148:case 238:case 239:case 240:case 241:return!0;default:return!1}}function Xg(e){for(;146===e.parent.kind;)e=e.parent;return 162===e.parent.kind}function Qg(t,r){for(var n;(t=e.getContainingClass(t))&&!(n=r(t)););return n}function Yg(e,t){return!!Qg(e,function(e){return e===t})}function $g(e){return void 0!==function(e){for(;146===e.parent.kind;)e=e.parent;return 246===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:252===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function Zg(t){if(e.isDeclarationName(t))return vn(t.parent);if(e.isInJavaScriptFile(t)&&187===t.parent.kind&&t.parent===t.parent.parent.left){var r=function(t){switch(e.getSpecialPropertyAssignmentKind(t.parent.parent)){case 1:case 3:return vn(t.parent);case 4:case 2:case 5:return vn(t.parent.parent)}}(t);if(r)return r}if(252===t.parent.kind&&e.isEntityNameExpression(t)){var n=nn(t,70107135,!0);if(n&&n!==Z)return n}else if(!e.isPropertyAccessExpression(t)&&$g(t)){var i=e.getAncestor(t,246);return e.Debug.assert(void 0!==i),tn(t,!0)}if(!e.isPropertyAccessExpression(t)){var a=function(t){for(var r=t.parent;e.isQualifiedName(r);)t=r,r=r.parent;if(r&&181===r.kind&&r.qualifier===t)return r}(t);if(a){Oc(a);var o=wr(t).resolvedSymbol;return o===Z?void 0:o}}for(;e.isRightSideOfQualifiedNameOrPropertyAccess(t);)t=t.parent;if(function(e){for(;187===e.parent.kind;)e=e.parent;return 209===e.parent.kind}(t)){var s=0;209===t.parent.kind?(s=67901928,e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)&&(s|=67216319)):s=1920,s|=2097152;var c=e.isEntityNameExpression(t)?nn(t,s):void 0;if(c)return c}if(296===t.parent.kind)return e.getParameterSymbolFromJSDoc(t.parent);if(148===t.parent.kind&&300===t.parent.parent.kind){e.Debug.assert(!e.isInJavaScriptFile(t));var u=e.getTypeParameterFromJsDoc(t.parent);return u&&u.symbol}if(e.isExpressionNode(t)){if(e.nodeIsMissing(t))return;if(71===t.kind){if(e.isJSXTagName(t)&&Td(t)){var l=Pd(t.parent);return l===Z?void 0:l}return nn(t,67216319,!1,!0)}if(187===t.kind||146===t.kind){var _=wr(t);return _.resolvedSymbol?_.resolvedSymbol:(187===t.kind?$d(t):Zd(t),_.resolvedSymbol)}}else{if(Xg(t))return nn(t,s=162===t.parent.kind?67901928:1920,!1,!0);if(265===t.parent.kind)return zd(t.parent)}return 161===t.parent.kind?nn(t,1):void 0}function ey(t){if(277===t.kind)return e.isExternalModule(t)?hn(t.symbol):void 0;var r=t.parent,n=r.parent;if(!(8388608&t.flags)){if(d(t))return vn(r);if(e.isLiteralComputedPropertyDeclarationName(t))return vn(r.parent);if(71===t.kind){if($g(t))return Zg(t);if(184===r.kind&&182===n.kind&&t===r.propertyName){var i=ty(n),a=i&&co(i,t.escapedText);if(a)return a}}switch(t.kind){case 71:case 187:case 146:return Zg(t);case 99:var o=e.getThisContainer(t,!1);if(e.isFunctionLike(o)){var s=Eo(o);if(s.thisParameter)return s.thisParameter}if(e.isInExpressionContext(t))return rm(t).symbol;case 176:return Ic(t).symbol;case 97:return rm(t).symbol;case 123:var c=t.parent;return c&&155===c.kind?c.parent.symbol:void 0;case 9:case 13:if(e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t||(247===t.parent.kind||253===t.parent.kind)&&t.parent.moduleSpecifier===t||e.isInJavaScriptFile(t)&&e.isRequireCall(t.parent,!1)||e.isImportCall(t.parent)||e.isLiteralTypeNode(t.parent)&&e.isLiteralImportTypeNode(t.parent.parent)&&t.parent.parent.argument===t.parent)return an(t,t);case 8:var u=e.isElementAccessExpression(r)?r.argumentExpression===t?em(r.expression):void 0:e.isLiteralTypeNode(r)&&e.isIndexedAccessTypeNode(n)?Oc(n.objectType):void 0;return u&&co(u,e.escapeLeadingUnderscores(t.text));case 79:case 89:case 36:return vn(t.parent);case 181:return e.isLiteralImportTypeNode(t)?ey(t.argument.literal):void 0;default:return}}}function ty(t){if(8388608&t.flags)return ie;if(e.isPartOfTypeNode(t)){var r=Oc(t);return r&&e.isExpressionWithTypeArgumentsInClassImplementsClause(t)&&(r=va(r,(n=ty(e.getContainingClass(t))).thisType)),r}if(e.isExpressionNode(t))return ry(t);if(e.isExpressionWithTypeArgumentsInClassExtendsClause(t)){var n,i=Vi(n=ea(vn(e.getContainingClass(t))))[0];return i&&va(i,n.thisType)}var a,o;if(Gg(t))return ea(o=vn(t));if(71===(a=t).kind&&Gg(a.parent)&&a.parent.name===a)return(o=ey(t))?ea(o):ie;if(e.isDeclaration(t))return wi(o=vn(t));if(d(t))return(o=ey(t))?wi(o):ie;if(e.isBindingPattern(t))return gi(t.parent,!0)||ie;if($g(t)&&(o=ey(t))){var s=ea(o);return s!==ie?s:wi(o)}return ie}function ry(t){return e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),Pc(em(t))}function ny(t){t=io(t);var r=e.createSymbolTable(Wa(t));return iy(t)&&e.forEach(Wa(Re),function(e){r.has(e.escapedName)||r.set(e.escapedName,e)}),Pn(r)}function iy(t){return e.typeHasCallOrConstructSignatures(t,V)}function ay(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r)return!(187===r.parent.kind&&r.parent.name===r)&&Ny(r)===K}return!1}function oy(t){var r=an(t.parent,t);if(!r||e.isShorthandAmbientModuleSymbol(r))return!0;var n=_n(r),i=Pr(r=un(r));return void 0===i.exportsSomeValue&&(i.exportsSomeValue=n?!!(67216319&r.flags):e.forEachEntry(mn(r),function(e){return(e=Yr(e))&&!!(67216319&e.flags)})),i.exportsSomeValue}function sy(t,r){var n=e.getParseTreeNode(t,e.isIdentifier);if(n){var i=Ny(n,function(t){return e.isModuleOrEnumDeclaration(t.parent)&&t===t.parent.name}(n));if(i){if(1048576&i.flags){var a=hn(i.exportSymbol);if(!r&&944&a.flags&&!(3&a.flags))return;i=a}var o=bn(i);if(o){if(512&o.flags&&277===o.valueDeclaration.kind){var s=o.valueDeclaration;return s!==e.getSourceFileOfNode(n)?void 0:s}return e.findAncestor(n.parent,function(t){return e.isModuleOrEnumDeclaration(t)&&vn(t)===o})}}}}function cy(t){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=Ny(r);if(Qr(n,67216319))return Ur(n)}}function uy(t){if(418&t.flags){var r=Pr(t);if(void 0===r.isDeclarationWithCollidingName){var n=e.getEnclosingBlockScopeContainer(t.valueDeclaration);if(e.isStatementWithLocals(n)){var i=wr(t.valueDeclaration);if(Mr(n.parent,t.escapedName,67216319,void 0,void 0,!1))r.isDeclarationWithCollidingName=!0;else if(131072&i.flags){var a=262144&i.flags,o=e.isIterationStatement(n,!1),s=216===n.kind&&e.isIterationStatement(n.parent,!1);r.isDeclarationWithCollidingName=!(e.isBlockScopedContainerTopLevel(n)||a&&(o||s))}else r.isDeclarationWithCollidingName=!1}}return r.isDeclarationWithCollidingName}return!1}function ly(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=Ny(r);if(n&&uy(n))return n.valueDeclaration}}}function _y(t){var r=e.getParseTreeNode(t,e.isDeclaration);if(r){var n=vn(r);if(n)return uy(n)}return!1}function dy(t){switch(t.kind){case 246:case 248:case 249:case 251:case 255:return fy(vn(t)||Z);case 253:var r=t.exportClause;return!!r&&e.some(r.elements,dy);case 252:return!t.expression||71!==t.expression.kind||fy(vn(t)||Z)}return!1}function py(t){var r=e.getParseTreeNode(t,e.isImportEqualsDeclaration);return!(void 0===r||277!==r.parent.kind||!e.isInternalModuleImportEqualsDeclaration(r))&&fy(vn(r))&&r.moduleReference&&!e.nodeIsMissing(r.moduleReference)}function fy(e){var t=$r(e);return t===Z||!!(67216319&t.flags)&&(E.preserveConstEnums||!my(t))}function my(e){return Bf(e)||!!e.constEnumOnlyModule}function gy(t){if(e.nodeIsPresent(t.body)){if(e.isGetAccessor(t)||e.isSetAccessor(t))return!1;var r=Po(vn(t));return r.length>1||1===r.length&&r[0].declaration!==t}return!1}function yy(t){return!(!w||xo(t)||e.isJSDocParameterTag(t)||!t.initializer||e.hasModifier(t,92))}function hy(t){return w&&xo(t)&&!t.initializer&&e.hasModifier(t,92)}function vy(e){return wr(e).flags||0}function by(e){return Eg(e.parent),wr(e).enumMemberValue}function xy(e){switch(e.kind){case 276:case 187:case 188:return!0}return!1}function Sy(t){if(276===t.kind)return by(t);var r=wr(t).resolvedSymbol;if(r&&8&r.flags){var n=r.valueDeclaration;if(e.isEnumConst(n.parent))return by(n)}}function Dy(t,r){var n=e.getParseTreeNode(t,e.isEntityName);if(!n)return e.TypeReferenceSerializationKind.Unknown;if(r&&!(r=e.getParseTreeNode(r)))return e.TypeReferenceSerializationKind.Unknown;var i=nn(n,67216319,!0,!1,r),a=nn(n,67901928,!0,!1,r);if(i&&i===a){var o=Ds(!1);if(o&&i===o)return e.TypeReferenceSerializationKind.Promise;var s=wi(i);if(s&&Ji(s))return e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue}if(!a)return e.TypeReferenceSerializationKind.Unknown;var c=ea(a);return c===ie?e.TypeReferenceSerializationKind.Unknown:3&c.flags?e.TypeReferenceSerializationKind.ObjectType:Mf(c,61440)?e.TypeReferenceSerializationKind.VoidNullableOrNeverType:Mf(c,272)?e.TypeReferenceSerializationKind.BooleanType:Mf(c,168)?e.TypeReferenceSerializationKind.NumberLikeType:Mf(c,68)?e.TypeReferenceSerializationKind.StringLikeType:Qu(c)?e.TypeReferenceSerializationKind.ArrayLikeType:Mf(c,3072)?e.TypeReferenceSerializationKind.ESSymbolType:function(e){return!!(131072&e.flags)&&lo(e,0).length>0}(c)?e.TypeReferenceSerializationKind.TypeWithCallSignature:Bu(c)?e.TypeReferenceSerializationKind.ArrayLikeType:e.TypeReferenceSerializationKind.ObjectType}function ky(t,r,n,i,a){var o=e.getParseTreeNode(t,e.isVariableLikeOrAccessor);if(!o)return e.createToken(119);var s=vn(o),c=!s||133120&s.flags?ie:Hu(wi(s));return 2048&c.flags&&c.symbol===s&&(n|=1048576),a&&(c=il(c)),B.typeToTypeNode(c,r,1024|n,i)}function Ty(t,r,n,i){var a=e.getParseTreeNode(t,e.isFunctionLike);if(!a)return e.createToken(119);var o=Eo(a);return B.typeToTypeNode(Oo(o),r,1024|n,i)}function Cy(t,r,n,i){var a=e.getParseTreeNode(t,e.isExpression);if(!a)return e.createToken(119);var o=pl(ry(a));return B.typeToTypeNode(o,r,1024|n,i)}function Ey(t){return xt.has(e.escapeLeadingUnderscores(t))}function Ny(t,r){var n=wr(t).resolvedSymbol;if(n)return n;var i=t;if(r){var a=t.parent;e.isDeclaration(a)&&t===a.name&&(i=oi(a))}return Mr(i,t.escapedText,70362047,void 0,void 0,!0)}function Ay(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=Ny(r);if(n)return Dn(n).valueDeclaration}}}function Py(t){if(e.isVariableDeclaration(t)&&e.isVarConst(t)){var r=wi(vn(t));return!!(192&r.flags&&33554432&r.flags)}return!1}function wy(t){return function(t){return e.createLiteral(t.value)}(wi(vn(t)))}function Fy(t){var r=242===t.kind?e.tryCast(t.name,e.isStringLiteral):e.getExternalModuleName(t),n=on(r,r,void 0);if(n)return e.getDeclarationOfKind(n,277)}function Iy(t,r){if((g&r)!==r&&E.importHelpers){var n=e.getSourceFileOfNode(t);if(e.isEffectiveExternalModule(n,E)&&!(4194304&t.flags)){var i=(c=t,y||(y=sn(n,e.externalHelpersModuleNameText,e.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,c)||Z),y);if(i!==Z)for(var a=r&~g,o=1;o<=65536;o<<=1)if(a&o){var s=Oy(o);Ir(i.exports,e.escapeLeadingUnderscores(s),67216319)||hr(t,e.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1,e.externalHelpersModuleNameText,s)}g|=r}}var c}function Oy(t){switch(t){case 1:return"__extends";case 2:return"__assign";case 4:return"__rest";case 8:return"__decorate";case 16:return"__metadata";case 32:return"__param";case 64:return"__awaiter";case 128:return"__generator";case 256:return"__values";case 512:return"__read";case 1024:return"__spread";case 2048:return"__await";case 4096:return"__asyncGenerator";case 8192:return"__asyncDelegator";case 16384:return"__asyncValues";case 32768:return"__exportStar";case 65536:return"__makeTemplateObject";default:return e.Debug.fail("Unrecognized helper")}}function My(t){return function(t){if(!t.decorators)return!1;if(!e.nodeCanBeDecorated(t,t.parent,t.parent.parent))return 154!==t.kind||e.nodeIsPresent(t.body)?eh(t,e.Diagnostics.Decorators_are_not_valid_here):eh(t,e.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(156===t.kind||157===t.kind){var r=e.getAllAccessorDeclarations(t.parent.members,t);if(r.firstAccessor.decorators&&t===r.secondAccessor)return eh(t,e.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}return!1}(t)||function(t){var r,n,i,a,o=function(t){return!!t.modifiers&&(function(t){switch(t.kind){case 156:case 157:case 155:case 152:case 151:case 154:case 153:case 160:case 242:case 247:case 246:case 253:case 252:case 194:case 195:case 149:return!1;default:if(243===t.parent.kind||277===t.parent.kind)return!1;switch(t.kind){case 237:return Ly(t,120);case 238:return Ly(t,117);case 239:case 217:case 240:return!0;case 241:return Ly(t,76);default:return e.Debug.fail(),!1}}}(t)?eh(t,e.Diagnostics.Modifiers_cannot_appear_here):void 0)}(t);if(void 0!==o)return o;for(var s=0,c=0,u=t.modifiers;c1||e.modifiers[0].kind!==t}function Ry(t,r){return void 0===r&&(r=e.Diagnostics.Trailing_comma_not_allowed),!(!t||!t.hasTrailingComma)&&th(t[0],t.end-",".length,",".length,r)}function By(t,r){if(t&&0===t.length){var n=t.pos-"<".length;return th(r,n,e.skipTrivia(r.text,t.end)+">".length-n,e.Diagnostics.Type_parameter_list_cannot_be_empty)}return!1}function jy(t){var r=e.getSourceFileOfNode(t);return My(t)||By(t.typeParameters,r)||function(t){for(var r=!1,n=t.length,i=0;i".length-i,e.Diagnostics.Type_argument_list_cannot_be_empty)}return!1}(t,r)}function zy(t){return function(t){if(t)for(var r=0,n=t;r1){var i=224===t.kind?e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return eh(r.declarations[1],i)}var a=n[0];if(a.initializer){var i=224===t.kind?e.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:e.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return rh(a.name,i)}if(a.type)return rh(a,i=224===t.kind?e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:e.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}return!1}function Gy(t){if(t.parameters.length===(156===t.kind?1:2))return e.getThisParameter(t)}function Xy(t,r){if(function(t){return e.isDynamicName(t)&&!la(t)}(t))return rh(t,r)}function Qy(t){if(jy(t))return!0;if(154===t.kind){if(186===t.parent.kind){if(t.modifiers&&(1!==t.modifiers.length||120!==e.first(t.modifiers).kind))return eh(t,e.Diagnostics.Modifiers_cannot_appear_here);if(Wy(t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional))return!0;if(void 0===t.body)return th(t,t.end-1,";".length,e.Diagnostics._0_expected,"{")}if(Vy(t))return!0}if(e.isClassLike(t.parent)){if(4194304&t.flags)return Xy(t.name,e.Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(154===t.kind&&!t.body)return Xy(t.name,e.Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(239===t.parent.kind)return Xy(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(166===t.parent.kind)return Xy(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function Yy(e){return 9===e.kind||8===e.kind||200===e.kind&&38===e.operator&&8===e.operand.kind}function $y(t){var r=t.declarations;return!!Ry(t.declarations)||!t.declarations.length&&th(t,r.pos,r.end-r.pos,e.Diagnostics.Variable_declaration_list_cannot_be_empty)}function Zy(e){return e.parseDiagnostics.length>0}function eh(t,r,n,i,a){var o=e.getSourceFileOfNode(t);if(!Zy(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return Ht.add(e.createFileDiagnostic(o,s.start,s.length,r,n,i,a)),!0}return!1}function th(t,r,n,i,a,o,s){var c=e.getSourceFileOfNode(t);return!Zy(c)&&(Ht.add(e.createFileDiagnostic(c,r,n,i,a,o,s)),!0)}function rh(t,r,n,i,a){return!Zy(e.getSourceFileOfNode(t))&&(Ht.add(e.createDiagnosticForNode(t,r,n,i,a)),!0)}function nh(t){if(4194304&t.flags){if(e.isAccessor(t.parent))return wr(t).hasReportedStatementInAmbientContext=!0;if(!wr(t).hasReportedStatementInAmbientContext&&e.isFunctionLike(t.parent))return wr(t).hasReportedStatementInAmbientContext=eh(t,e.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);if(216===t.parent.kind||243===t.parent.kind||277===t.parent.kind){var r=wr(t.parent);if(!r.hasReportedStatementInAmbientContext)return r.hasReportedStatementInAmbientContext=eh(t,e.Diagnostics.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function ih(t){if(32&t.numericLiteralFlags){var r=void 0;if(N>=1?r=e.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:e.isChildOfNodeWithKind(t,180)?r=e.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:e.isChildOfNodeWithKind(t,276)&&(r=e.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0),r){var n=e.isPrefixUnaryExpression(t.parent)&&38===t.parent.operator,i=(n?"-":"")+"0o"+t.text;return rh(n?t.parent:t,r,i)}}return!1}},function(e){e.JSX="JSX",e.IntrinsicElements="IntrinsicElements",e.ElementClass="ElementClass",e.ElementAttributesPropertyNameContainer="ElementAttributesProperty",e.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",e.Element="Element",e.IntrinsicAttributes="IntrinsicAttributes",e.IntrinsicClassAttributes="IntrinsicClassAttributes",e.LibraryManagedAttributes="LibraryManagedAttributes"}(t||(t={}))}(s||(s={})),function(e){function t(t){var r=e.createNode(t,-1,-1);return r.flags|=8,r}function r(t,r){return t!==r&&(Kt(t,r),Lt(t,r),e.aggregateTransformFlags(t)),t}function n(t,r){if(t&&t!==e.emptyArray){if(e.isNodeArray(t))return t}else t=[];var n=t;return n.pos=-1,n.end=-1,n.hasTrailingComma=r,n}function i(e){if(void 0===e)return e;var r=t(e.kind);for(var n in r.flags|=e.flags,Kt(r,e),e)!r.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(r[n]=e[n]);return r}function a(t,r){if("number"==typeof t)return o(t+"");if("boolean"==typeof t)return t?p():f();if(e.isString(t)){var n=s(t);return r&&(n.singleQuote=!0),n}return i=t,(a=s(e.getTextOfIdentifierOrLiteral(i))).textSourceNode=i,a;var i,a}function o(e){var r=t(8);return r.text=e,r.numericLiteralFlags=0,r}function s(e){var r=t(9);return r.text=e,r}function c(r,i){var a=t(71);return a.escapedText=e.escapeLeadingUnderscores(r),a.originalKeywordKind=r?e.stringToToken(r):0,a.autoGenerateFlags=0,a.autoGenerateId=0,i&&(a.typeArguments=n(i)),a}e.updateNode=r,e.createNodeArray=n,e.getSynthesizedClone=i,e.createLiteral=a,e.createNumericLiteral=o,e.createStringLiteral=s,e.createRegularExpressionLiteral=function(e){var r=t(12);return r.text=e,r},e.createIdentifier=c,e.updateIdentifier=function(t,n){return t.typeArguments!==n?r(c(e.idText(t),n),t):t};var u,l=0;function _(e){var t=c(e);return t.autoGenerateFlags=19,t.autoGenerateId=l,l++,t}function d(e){return t(e)}function p(){return t(101)}function f(){return t(86)}function m(e){return d(e)}function g(e,r){var n=t(146);return n.left=e,n.right=It(r),n}function y(r){var n=t(147);return n.expression=function(t){return e.isCommaSequence(t)?oe(t):t}(r),n}function h(e,r,n){var i=t(148);return i.name=It(e),i.constraint=r,i.default=n,i}function v(r,n,i,a,o,s,c){var u=t(149);return u.decorators=Ot(r),u.modifiers=Ot(n),u.dotDotDotToken=i,u.name=It(a),u.questionToken=o,u.type=s,u.initializer=c?e.parenthesizeExpressionForList(c):void 0,u}function b(r){var n=t(150);return n.expression=e.parenthesizeForAccess(r),n}function x(e,r,n,i,a){var o=t(151);return o.modifiers=Ot(e),o.name=It(r),o.questionToken=n,o.type=i,o.initializer=a,o}function S(e,r,n,i,a,o){var s=t(152);return s.decorators=Ot(e),s.modifiers=Ot(r),s.name=It(n),s.questionToken=void 0!==i&&55===i.kind?i:void 0,s.exclamationToken=void 0!==i&&51===i.kind?i:void 0,s.type=a,s.initializer=o,s}function D(e,t,r,n,i){var a=A(153,e,t,r);return a.name=It(n),a.questionToken=i,a}function k(e,r,i,a,o,s,c,u,l){var _=t(154);return _.decorators=Ot(e),_.modifiers=Ot(r),_.asteriskToken=i,_.name=It(a),_.questionToken=o,_.typeParameters=Ot(s),_.parameters=n(c),_.type=u,_.body=l,_}function T(e,r,i,a){var o=t(155);return o.decorators=Ot(e),o.modifiers=Ot(r),o.typeParameters=void 0,o.parameters=n(i),o.type=void 0,o.body=a,o}function C(e,r,i,a,o,s){var c=t(156);return c.decorators=Ot(e),c.modifiers=Ot(r),c.name=It(i),c.typeParameters=void 0,c.parameters=n(a),c.type=o,c.body=s,c}function E(e,r,i,a,o){var s=t(157);return s.decorators=Ot(e),s.modifiers=Ot(r),s.name=It(i),s.typeParameters=void 0,s.parameters=n(a),s.body=o,s}function N(e,r,i,a){var o=t(160);return o.decorators=Ot(e),o.modifiers=Ot(r),o.parameters=n(i),o.type=a,o}function A(e,r,n,i,a){var o=t(e);return o.typeParameters=Ot(r),o.parameters=Ot(n),o.type=i,o.typeArguments=Ot(a),o}function P(e,t,n,i){return e.typeParameters!==t||e.parameters!==n||e.type!==i?r(A(e.kind,t,n,i),e):e}function w(e,r){var n=t(161);return n.parameterName=It(e),n.type=r,n}function F(r,n){var i=t(162);return i.typeName=It(r),i.typeArguments=n&&e.parenthesizeTypeParameters(n),i}function I(e){var r=t(165);return r.exprName=e,r}function O(e){var r=t(166);return r.members=n(e),r}function M(r){var n=t(167);return n.elementType=e.parenthesizeArrayTypeMember(r),n}function L(e){var r=t(168);return r.elementTypes=n(e),r}function R(r){var n=t(169);return n.type=e.parenthesizeArrayTypeMember(r),n}function B(e){var r=t(170);return r.type=e,r}function j(r,n){var i=t(r);return i.types=e.parenthesizeElementTypeMembers(n),i}function J(e,t){return e.types!==t?r(j(e.kind,t),e):e}function z(r,n,i,a){var o=t(173);return o.checkType=e.parenthesizeConditionalTypeMember(r),o.extendsType=e.parenthesizeConditionalTypeMember(n),o.trueType=i,o.falseType=a,o}function K(e){var r=t(174);return r.typeParameter=e,r}function U(e,r,n,i){var a=t(181);return a.argument=e,a.qualifier=r,a.typeArguments=Ot(n),a.isTypeOf=i,a}function q(e){var r=t(175);return r.type=e,r}function V(r,n){var i=t(177);return i.operator="number"==typeof r?r:128,i.type=e.parenthesizeElementTypeMember("number"==typeof r?n:r),i}function W(r,n){var i=t(178);return i.objectType=e.parenthesizeElementTypeMember(r),i.indexType=n,i}function H(e,r,n,i){var a=t(179);return a.readonlyToken=e,a.typeParameter=r,a.questionToken=n,a.type=i,a}function G(e){var r=t(180);return r.literal=e,r}function X(e){var r=t(182);return r.elements=n(e),r}function Q(e){var r=t(183);return r.elements=n(e),r}function Y(e,r,n,i){var a=t(184);return a.dotDotDotToken=e,a.propertyName=It(r),a.name=It(n),a.initializer=i,a}function $(r,i){var a=t(185);return a.elements=e.parenthesizeListElements(n(r)),i&&(a.multiLine=!0),a}function Z(e,r){var i=t(186);return i.properties=n(e),r&&(i.multiLine=!0),i}function ee(r,n){var i=t(187);return i.expression=e.parenthesizeForAccess(r),i.name=It(n),Rt(i,131072),i}function te(r,n){var i,o=t(188);return o.expression=e.parenthesizeForAccess(r),o.argumentExpression=(i=n,e.isString(i)||"number"==typeof i?a(i):i),o}function re(r,i,a){var o=t(189);return o.expression=e.parenthesizeForAccess(r),o.typeArguments=Ot(i),o.arguments=e.parenthesizeListElements(n(a)),o}function ne(r,i,a){var o=t(190);return o.expression=e.parenthesizeForNew(r),o.typeArguments=Ot(i),o.arguments=a?e.parenthesizeListElements(n(a)):void 0,o}function ie(r,n,i){var a=t(191);return a.tag=e.parenthesizeForAccess(r),i?(a.typeArguments=Ot(n),a.template=i):(a.typeArguments=void 0,a.template=n),a}function ae(r,n){var i=t(192);return i.type=r,i.expression=e.parenthesizePrefixOperand(n),i}function oe(e){var r=t(193);return r.expression=e,r}function se(e,r,i,a,o,s,c){var u=t(194);return u.modifiers=Ot(e),u.asteriskToken=r,u.name=It(i),u.typeParameters=Ot(a),u.parameters=n(o),u.type=s,u.body=c,u}function ce(r,i,a,o,s,c){var u=t(195);return u.modifiers=Ot(r),u.typeParameters=Ot(i),u.parameters=n(a),u.type=o,u.equalsGreaterThanToken=s||d(36),u.body=e.parenthesizeConciseBody(c),u}function ue(r){var n=t(196);return n.expression=e.parenthesizePrefixOperand(r),n}function le(r){var n=t(197);return n.expression=e.parenthesizePrefixOperand(r),n}function _e(r){var n=t(198);return n.expression=e.parenthesizePrefixOperand(r),n}function de(r){var n=t(199);return n.expression=e.parenthesizePrefixOperand(r),n}function pe(r,n){var i=t(200);return i.operator=r,i.operand=e.parenthesizePrefixOperand(n),i}function fe(r,n){var i=t(201);return i.operand=e.parenthesizePostfixOperand(r),i.operator=n,i}function me(r,n,i){var a,o=t(202),s="number"==typeof(a=n)?d(a):a,c=s.kind;return o.left=e.parenthesizeBinaryOperand(c,r,!0,void 0),o.operatorToken=s,o.right=e.parenthesizeBinaryOperand(c,i,!1,o.left),o}function ge(r,n,i,a,o){var s=t(203);return s.condition=e.parenthesizeForConditionalHead(r),s.questionToken=o?n:d(55),s.whenTrue=e.parenthesizeSubexpressionOfConditionalExpression(o?i:n),s.colonToken=o?a:d(56),s.whenFalse=e.parenthesizeSubexpressionOfConditionalExpression(o||i),s}function ye(e,r){var i=t(204);return i.head=e,i.templateSpans=n(r),i}function he(e,r){var n=t(205);return n.asteriskToken=e&&39===e.kind?e:void 0,n.expression=e&&39!==e.kind?e:r,n}function ve(r){var n=t(206);return n.expression=e.parenthesizeExpressionForList(r),n}function be(e,r,i,a,o){var s=t(207);return s.decorators=void 0,s.modifiers=Ot(e),s.name=It(r),s.typeParameters=Ot(i),s.heritageClauses=Ot(a),s.members=n(o),s}function xe(r,n){var i=t(209);return i.expression=e.parenthesizeForAccess(n),i.typeArguments=Ot(r),i}function Se(e,r){var n=t(210);return n.expression=e,n.type=r,n}function De(r){var n=t(211);return n.expression=e.parenthesizeForAccess(r),n}function ke(e,r){var n=t(212);return n.keywordToken=e,n.name=r,n}function Te(e,r){var n=t(214);return n.expression=e,n.literal=r,n}function Ce(e,r){var i=t(216);return i.statements=n(e),r&&(i.multiLine=r),i}function Ee(r,n){var i=t(217);return i.decorators=void 0,i.modifiers=Ot(r),i.declarationList=e.isArray(n)?Ve(n):n,i}function Ne(r){var n=t(219);return n.expression=e.parenthesizeExpressionForExpressionStatement(r),n}function Ae(e,t){return e.expression!==t?r(Ne(t),e):e}function Pe(e,r,n){var i=t(220);return i.expression=e,i.thenStatement=r,i.elseStatement=n,i}function we(e,r){var n=t(221);return n.statement=e,n.expression=r,n}function Fe(e,r){var n=t(222);return n.expression=e,n.statement=r,n}function Ie(e,r,n,i){var a=t(223);return a.initializer=e,a.condition=r,a.incrementor=n,a.statement=i,a}function Oe(e,r,n){var i=t(224);return i.initializer=e,i.expression=r,i.statement=n,i}function Me(e,r,n,i){var a=t(225);return a.awaitModifier=e,a.initializer=r,a.expression=n,a.statement=i,a}function Le(e){var r=t(226);return r.label=It(e),r}function Re(e){var r=t(227);return r.label=It(e),r}function Be(e){var r=t(228);return r.expression=e,r}function je(e,r){var n=t(229);return n.expression=e,n.statement=r,n}function Je(r,n){var i=t(230);return i.expression=e.parenthesizeExpressionForList(r),i.caseBlock=n,i}function ze(e,r){var n=t(231);return n.label=It(e),n.statement=r,n}function Ke(e){var r=t(232);return r.expression=e,r}function Ue(e,r,n){var i=t(233);return i.tryBlock=e,i.catchClause=r,i.finallyBlock=n,i}function qe(r,n,i){var a=t(235);return a.name=It(r),a.type=n,a.initializer=void 0!==i?e.parenthesizeExpressionForList(i):void 0,a}function Ve(e,r){void 0===r&&(r=0);var i=t(236);return i.flags|=3&r,i.declarations=n(e),i}function We(e,r,i,a,o,s,c,u){var l=t(237);return l.decorators=Ot(e),l.modifiers=Ot(r),l.asteriskToken=i,l.name=It(a),l.typeParameters=Ot(o),l.parameters=n(s),l.type=c,l.body=u,l}function He(e,r,i,a,o,s){var c=t(238);return c.decorators=Ot(e),c.modifiers=Ot(r),c.name=It(i),c.typeParameters=Ot(a),c.heritageClauses=Ot(o),c.members=n(s),c}function Ge(e,r,i,a,o,s){var c=t(239);return c.decorators=Ot(e),c.modifiers=Ot(r),c.name=It(i),c.typeParameters=Ot(a),c.heritageClauses=Ot(o),c.members=n(s),c}function Xe(e,r,n,i,a){var o=t(240);return o.decorators=Ot(e),o.modifiers=Ot(r),o.name=It(n),o.typeParameters=Ot(i),o.type=a,o}function Qe(e,r,i,a){var o=t(241);return o.decorators=Ot(e),o.modifiers=Ot(r),o.name=It(i),o.members=n(a),o}function Ye(e,r,n,i,a){void 0===a&&(a=0);var o=t(242);return o.flags|=532&a,o.decorators=Ot(e),o.modifiers=Ot(r),o.name=n,o.body=i,o}function $e(e){var r=t(243);return r.statements=n(e),r}function Ze(e){var r=t(244);return r.clauses=n(e),r}function et(e){var r=t(245);return r.name=It(e),r}function tt(e,r,n,i){var a=t(246);return a.decorators=Ot(e),a.modifiers=Ot(r),a.name=It(n),a.moduleReference=i,a}function rt(e,r,n,i){var a=t(247);return a.decorators=Ot(e),a.modifiers=Ot(r),a.importClause=n,a.moduleSpecifier=i,a}function nt(e,r){var n=t(248);return n.name=e,n.namedBindings=r,n}function it(e){var r=t(249);return r.name=e,r}function at(e){var r=t(250);return r.elements=n(e),r}function ot(e,r){var n=t(251);return n.propertyName=e,n.name=r,n}function st(r,n,i,a){var o=t(252);return o.decorators=Ot(r),o.modifiers=Ot(n),o.isExportEquals=i,o.expression=i?e.parenthesizeBinaryOperand(58,a,!1,void 0):e.parenthesizeDefaultExpression(a),o}function ct(e,r,n,i){var a=t(253);return a.decorators=Ot(e),a.modifiers=Ot(r),a.exportClause=n,a.moduleSpecifier=i,a}function ut(e){var r=t(254);return r.elements=n(e),r}function lt(e,r){var n=t(255);return n.propertyName=It(e),n.name=It(r),n}function _t(e){var r=t(257);return r.expression=e,r}function dt(e,r,i){var a=t(258);return a.openingElement=e,a.children=n(r),a.closingElement=i,a}function pt(e,r,i){var a=t(259);return a.tagName=e,a.typeArguments=r&&n(r),a.attributes=i,a}function ft(e,r,i){var a=t(260);return a.tagName=e,a.typeArguments=r&&n(r),a.attributes=i,a}function mt(e){var r=t(261);return r.tagName=e,r}function gt(e,r,i){var a=t(262);return a.openingFragment=e,a.children=n(r),a.closingFragment=i,a}function yt(e,r){var n=t(265);return n.name=e,n.initializer=r,n}function ht(e){var r=t(266);return r.properties=n(e),r}function vt(e){var r=t(267);return r.expression=e,r}function bt(e,r){var n=t(268);return n.dotDotDotToken=e,n.expression=r,n}function xt(r,i){var a=t(269);return a.expression=e.parenthesizeExpressionForList(r),a.statements=n(i),a}function St(e){var r=t(270);return r.statements=n(e),r}function Dt(e,r){var i=t(271);return i.token=e,i.types=n(r),i}function kt(r,n){var i=t(272);return i.variableDeclaration=e.isString(r)?qe(r):r,i.block=n,i}function Tt(r,n){var i=t(273);return i.name=It(r),i.questionToken=void 0,i.initializer=e.parenthesizeExpressionForList(n),i}function Ct(r,n){var i=t(274);return i.name=It(r),i.objectAssignmentInitializer=void 0!==n?e.parenthesizeExpressionForList(n):void 0,i}function Et(r){var n=t(275);return n.expression=void 0!==r?e.parenthesizeExpressionForList(r):void 0,n}function Nt(r,n){var i=t(276);return i.name=It(r),i.initializer=n&&e.parenthesizeExpressionForList(n),i}function At(e,r){var n=t(305);return n.expression=e,n.original=r,Lt(n,r),n}function Pt(t){if(e.nodeIsSynthesized(t)&&!e.isParseTreeNode(t)&&!t.original&&!t.emitNode&&!t.id){if(306===t.kind)return t.elements;if(e.isBinaryExpression(t)&&26===t.operatorToken.kind)return[t.left,t.right]}return t}function wt(r){var i=t(306);return i.elements=n(e.sameFlatMap(r,Pt)),i}function Ft(t,r){void 0===r&&(r=e.emptyArray);var n=e.createNode(278);return n.prepends=r,n.sourceFiles=t,n}function It(t){return e.isString(t)?c(t):t}function Ot(e){return e?n(e):void 0}function Mt(t){if(!t.emitNode){if(e.isParseTreeNode(t)){if(277===t.kind)return t.emitNode={annotatedNodes:[t]};Mt(e.getSourceFileOfNode(t)).annotatedNodes.push(t)}t.emitNode={}}return t.emitNode}function Lt(e,t){return t&&(e.pos=t.pos,e.end=t.end),e}function Rt(e,t){return Mt(e).flags=t,e}function Bt(e){var t=e.emitNode;return t&&t.leadingComments}function jt(e,t){return Mt(e).leadingComments=t,e}function Jt(e){var t=e.emitNode;return t&&t.trailingComments}function zt(e,t){return Mt(e).trailingComments=t,e}function Kt(t,r){if(t.original=r,r){var n=r.emitNode;n&&(t.emitNode=function(t,r){var n=t.flags,i=t.leadingComments,a=t.trailingComments,o=t.commentRange,s=t.sourceMapRange,c=t.tokenSourceMapRanges,u=t.constantValue,l=t.helpers,_=t.startsOnNewLine;r||(r={});i&&(r.leadingComments=e.addRange(i.slice(),r.leadingComments));a&&(r.trailingComments=e.addRange(a.slice(),r.trailingComments));n&&(r.flags=n);o&&(r.commentRange=o);s&&(r.sourceMapRange=s);c&&(r.tokenSourceMapRanges=function(e,t){t||(t=[]);for(var r in e)t[r]=e[r];return t}(c,r.tokenSourceMapRanges));void 0!==u&&(r.constantValue=u);l&&(r.helpers=e.addRange(r.helpers,l));void 0!==_&&(r.startsOnNewLine=_);return r}(n,t.emitNode))}return t}e.createTempVariable=function(e,t){var r=c("");return r.autoGenerateFlags=1,r.autoGenerateId=l,l++,e&&e(r),t&&(r.autoGenerateFlags|=8),r},e.createLoopVariable=function(){var e=c("");return e.autoGenerateFlags=2,e.autoGenerateId=l,l++,e},e.createUniqueName=function(e){var t=c(e);return t.autoGenerateFlags=3,t.autoGenerateId=l,l++,t},e.createOptimisticUniqueName=_,e.createFileLevelUniqueName=function(e){var t=_(e);return t.autoGenerateFlags|=32,t},e.getGeneratedNameForNode=function(t,r){var n=c(t&&e.isIdentifier(t)?e.idText(t):"");return n.autoGenerateFlags=4|r,n.autoGenerateId=l,n.original=t,l++,n},e.createToken=d,e.createSuper=function(){return t(97)},e.createThis=function(){return t(99)},e.createNull=function(){return t(95)},e.createTrue=p,e.createFalse=f,e.createModifier=m,e.createModifiersFromModifierFlags=function(e){var t=[];return 1&e&&t.push(m(84)),2&e&&t.push(m(124)),512&e&&t.push(m(79)),2048&e&&t.push(m(76)),4&e&&t.push(m(114)),8&e&&t.push(m(112)),16&e&&t.push(m(113)),128&e&&t.push(m(117)),32&e&&t.push(m(115)),64&e&&t.push(m(132)),256&e&&t.push(m(120)),t},e.createQualifiedName=g,e.updateQualifiedName=function(e,t,n){return e.left!==t||e.right!==n?r(g(t,n),e):e},e.createComputedPropertyName=y,e.updateComputedPropertyName=function(e,t){return e.expression!==t?r(y(t),e):e},e.createTypeParameterDeclaration=h,e.updateTypeParameterDeclaration=function(e,t,n,i){return e.name!==t||e.constraint!==n||e.default!==i?r(h(t,n,i),e):e},e.createParameter=v,e.updateParameter=function(e,t,n,i,a,o,s,c){return e.decorators!==t||e.modifiers!==n||e.dotDotDotToken!==i||e.name!==a||e.questionToken!==o||e.type!==s||e.initializer!==c?r(v(t,n,i,a,o,s,c),e):e},e.createDecorator=b,e.updateDecorator=function(e,t){return e.expression!==t?r(b(t),e):e},e.createPropertySignature=x,e.updatePropertySignature=function(e,t,n,i,a,o){return e.modifiers!==t||e.name!==n||e.questionToken!==i||e.type!==a||e.initializer!==o?r(x(t,n,i,a,o),e):e},e.createProperty=S,e.updateProperty=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.questionToken!==(void 0!==a&&55===a.kind?a:void 0)||e.exclamationToken!==(void 0!==a&&51===a.kind?a:void 0)||e.type!==o||e.initializer!==s?r(S(t,n,i,a,o,s),e):e},e.createMethodSignature=D,e.updateMethodSignature=function(e,t,n,i,a,o){return e.typeParameters!==t||e.parameters!==n||e.type!==i||e.name!==a||e.questionToken!==o?r(D(t,n,i,a,o),e):e},e.createMethod=k,e.updateMethod=function(e,t,n,i,a,o,s,c,u,l){return e.decorators!==t||e.modifiers!==n||e.asteriskToken!==i||e.name!==a||e.questionToken!==o||e.typeParameters!==s||e.parameters!==c||e.type!==u||e.body!==l?r(k(t,n,i,a,o,s,c,u,l),e):e},e.createConstructor=T,e.updateConstructor=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.parameters!==i||e.body!==a?r(T(t,n,i,a),e):e},e.createGetAccessor=C,e.updateGetAccessor=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.parameters!==a||e.type!==o||e.body!==s?r(C(t,n,i,a,o,s),e):e},e.createSetAccessor=E,e.updateSetAccessor=function(e,t,n,i,a,o){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.parameters!==a||e.body!==o?r(E(t,n,i,a,o),e):e},e.createCallSignature=function(e,t,r){return A(158,e,t,r)},e.updateCallSignature=function(e,t,r,n){return P(e,t,r,n)},e.createConstructSignature=function(e,t,r){return A(159,e,t,r)},e.updateConstructSignature=function(e,t,r,n){return P(e,t,r,n)},e.createIndexSignature=N,e.updateIndexSignature=function(e,t,n,i,a){return e.parameters!==i||e.type!==a||e.decorators!==t||e.modifiers!==n?r(N(t,n,i,a),e):e},e.createSignatureDeclaration=A,e.createKeywordTypeNode=function(e){return t(e)},e.createTypePredicateNode=w,e.updateTypePredicateNode=function(e,t,n){return e.parameterName!==t||e.type!==n?r(w(t,n),e):e},e.createTypeReferenceNode=F,e.updateTypeReferenceNode=function(e,t,n){return e.typeName!==t||e.typeArguments!==n?r(F(t,n),e):e},e.createFunctionTypeNode=function(e,t,r){return A(163,e,t,r)},e.updateFunctionTypeNode=function(e,t,r,n){return P(e,t,r,n)},e.createConstructorTypeNode=function(e,t,r){return A(164,e,t,r)},e.updateConstructorTypeNode=function(e,t,r,n){return P(e,t,r,n)},e.createTypeQueryNode=I,e.updateTypeQueryNode=function(e,t){return e.exprName!==t?r(I(t),e):e},e.createTypeLiteralNode=O,e.updateTypeLiteralNode=function(e,t){return e.members!==t?r(O(t),e):e},e.createArrayTypeNode=M,e.updateArrayTypeNode=function(e,t){return e.elementType!==t?r(M(t),e):e},e.createTupleTypeNode=L,e.updateTupleTypeNode=function(e,t){return e.elementTypes!==t?r(L(t),e):e},e.createOptionalTypeNode=R,e.updateOptionalTypeNode=function(e,t){return e.type!==t?r(R(t),e):e},e.createRestTypeNode=B,e.updateRestTypeNode=function(e,t){return e.type!==t?r(B(t),e):e},e.createUnionTypeNode=function(e){return j(171,e)},e.updateUnionTypeNode=function(e,t){return J(e,t)},e.createIntersectionTypeNode=function(e){return j(172,e)},e.updateIntersectionTypeNode=function(e,t){return J(e,t)},e.createUnionOrIntersectionTypeNode=j,e.createConditionalTypeNode=z,e.updateConditionalTypeNode=function(e,t,n,i,a){return e.checkType!==t||e.extendsType!==n||e.trueType!==i||e.falseType!==a?r(z(t,n,i,a),e):e},e.createInferTypeNode=K,e.updateInferTypeNode=function(e,t){return e.typeParameter!==t?r(K(t),e):e},e.createImportTypeNode=U,e.updateImportTypeNode=function(e,t,n,i,a){return e.argument!==t||e.qualifier!==n||e.typeArguments!==i||e.isTypeOf!==a?r(U(t,n,i,a),e):e},e.createParenthesizedType=q,e.updateParenthesizedType=function(e,t){return e.type!==t?r(q(t),e):e},e.createThisTypeNode=function(){return t(176)},e.createTypeOperatorNode=V,e.updateTypeOperatorNode=function(e,t){return e.type!==t?r(V(e.operator,t),e):e},e.createIndexedAccessTypeNode=W,e.updateIndexedAccessTypeNode=function(e,t,n){return e.objectType!==t||e.indexType!==n?r(W(t,n),e):e},e.createMappedTypeNode=H,e.updateMappedTypeNode=function(e,t,n,i,a){return e.readonlyToken!==t||e.typeParameter!==n||e.questionToken!==i||e.type!==a?r(H(t,n,i,a),e):e},e.createLiteralTypeNode=G,e.updateLiteralTypeNode=function(e,t){return e.literal!==t?r(G(t),e):e},e.createObjectBindingPattern=X,e.updateObjectBindingPattern=function(e,t){return e.elements!==t?r(X(t),e):e},e.createArrayBindingPattern=Q,e.updateArrayBindingPattern=function(e,t){return e.elements!==t?r(Q(t),e):e},e.createBindingElement=Y,e.updateBindingElement=function(e,t,n,i,a){return e.propertyName!==n||e.dotDotDotToken!==t||e.name!==i||e.initializer!==a?r(Y(t,n,i,a),e):e},e.createArrayLiteral=$,e.updateArrayLiteral=function(e,t){return e.elements!==t?r($(t,e.multiLine),e):e},e.createObjectLiteral=Z,e.updateObjectLiteral=function(e,t){return e.properties!==t?r(Z(t,e.multiLine),e):e},e.createPropertyAccess=ee,e.updatePropertyAccess=function(t,n,i){return t.expression!==n||t.name!==i?r(Rt(ee(n,i),e.getEmitFlags(t)),t):t},e.createElementAccess=te,e.updateElementAccess=function(e,t,n){return e.expression!==t||e.argumentExpression!==n?r(te(t,n),e):e},e.createCall=re,e.updateCall=function(e,t,n,i){return e.expression!==t||e.typeArguments!==n||e.arguments!==i?r(re(t,n,i),e):e},e.createNew=ne,e.updateNew=function(e,t,n,i){return e.expression!==t||e.typeArguments!==n||e.arguments!==i?r(ne(t,n,i),e):e},e.createTaggedTemplate=ie,e.updateTaggedTemplate=function(e,t,n,i){return e.tag!==t||(i?e.typeArguments!==n||e.template!==i:void 0!==e.typeArguments||e.template!==n)?r(ie(t,n,i),e):e},e.createTypeAssertion=ae,e.updateTypeAssertion=function(e,t,n){return e.type!==t||e.expression!==n?r(ae(t,n),e):e},e.createParen=oe,e.updateParen=function(e,t){return e.expression!==t?r(oe(t),e):e},e.createFunctionExpression=se,e.updateFunctionExpression=function(e,t,n,i,a,o,s,c){return e.name!==i||e.modifiers!==t||e.asteriskToken!==n||e.typeParameters!==a||e.parameters!==o||e.type!==s||e.body!==c?r(se(t,n,i,a,o,s,c),e):e},e.createArrowFunction=ce,e.updateArrowFunction=function(t,n,i,a,o,s,c){var u,l;return void 0===c?(u=t.equalsGreaterThanToken,l=e.cast(s,e.isConciseBody)):(u=e.cast(s,function(e){return 36===e.kind}),l=c),t.modifiers!==n||t.typeParameters!==i||t.parameters!==a||t.type!==o||t.equalsGreaterThanToken!==u||t.body!==l?r(ce(n,i,a,o,u,l),t):t},e.createDelete=ue,e.updateDelete=function(e,t){return e.expression!==t?r(ue(t),e):e},e.createTypeOf=le,e.updateTypeOf=function(e,t){return e.expression!==t?r(le(t),e):e},e.createVoid=_e,e.updateVoid=function(e,t){return e.expression!==t?r(_e(t),e):e},e.createAwait=de,e.updateAwait=function(e,t){return e.expression!==t?r(de(t),e):e},e.createPrefix=pe,e.updatePrefix=function(e,t){return e.operand!==t?r(pe(e.operator,t),e):e},e.createPostfix=fe,e.updatePostfix=function(e,t){return e.operand!==t?r(fe(t,e.operator),e):e},e.createBinary=me,e.updateBinary=function(e,t,n,i){return e.left!==t||e.right!==n?r(me(t,i||e.operatorToken,n),e):e},e.createConditional=ge,e.updateConditional=function t(n,i){for(var a=[],o=2;o0&&(a[c-s]=u)}s>0&&(a.length-=s)}},e.compareEmitHelpers=function(t,r){return t===r?0:t.priority===r.priority?0:void 0===t.priority?1:void 0===r.priority?-1:e.compareValues(t.priority,r.priority)},e.setOriginalNode=Kt}(s||(s={})),function(e){function t(t,r,n){if(e.isComputedPropertyName(r))return e.setTextRange(e.createElementAccess(t,r.expression),n);var i=e.setTextRange(e.isIdentifier(r)?e.createPropertyAccess(t,r):e.createElementAccess(t,r),r);return e.getOrCreateEmitNode(i).flags|=64,i}function r(t,r){var n=e.createIdentifier(t||"React");return n.flags&=-9,n.parent=e.getParseTreeNode(r),n}function n(t,n,i){return t?function t(n,i){if(e.isQualifiedName(n)){var a=t(n.left,i),o=e.createIdentifier(e.idText(n.right));return o.escapedText=n.right.escapedText,e.createPropertyAccess(a,o)}return r(e.idText(n),i)}(t,i):e.createPropertyAccess(r(n,i),"createElement")}function i(t){return e.setEmitFlags(e.createIdentifier(t),4098)}e.nullTransformationContext={enableEmitNotification:e.noop,enableSubstitution:e.noop,endLexicalEnvironment:function(){},getCompilerOptions:e.notImplemented,getEmitHost:e.notImplemented,getEmitResolver:e.notImplemented,hoistFunctionDeclaration:e.noop,hoistVariableDeclaration:e.noop,isEmitNotificationEnabled:e.notImplemented,isSubstitutionEnabled:e.notImplemented,onEmitNode:e.noop,onSubstituteNode:e.notImplemented,readEmitHelpers:e.notImplemented,requestEmitHelper:e.noop,resumeLexicalEnvironment:e.noop,startLexicalEnvironment:e.noop,suspendLexicalEnvironment:e.noop,addDiagnostic:e.noop},e.createTypeCheck=function(t,r){return"undefined"===r?e.createStrictEquality(t,e.createVoidZero()):e.createStrictEquality(e.createTypeOf(t),e.createLiteral(r))},e.createMemberAccessForPropertyName=t,e.createFunctionCall=function(t,r,n,i){return e.setTextRange(e.createCall(e.createPropertyAccess(t,"call"),void 0,[r].concat(n)),i)},e.createFunctionApply=function(t,r,n,i){return e.setTextRange(e.createCall(e.createPropertyAccess(t,"apply"),void 0,[r,n]),i)},e.createArraySlice=function(t,r){var n=[];return void 0!==r&&n.push("number"==typeof r?e.createLiteral(r):r),e.createCall(e.createPropertyAccess(t,"slice"),void 0,n)},e.createArrayConcat=function(t,r){return e.createCall(e.createPropertyAccess(t,"concat"),void 0,r)},e.createMathPow=function(t,r,n){return e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Math"),"pow"),void 0,[t,r]),n)},e.createExpressionForJsxElement=function(t,r,i,a,o,s,c){var u=[i];if(a&&u.push(a),o&&o.length>0)if(a||u.push(e.createNull()),o.length>1)for(var l=0,_=o;l<_.length;l++){var d=_[l];E(d),u.push(d)}else u.push(o[0]);return e.setTextRange(e.createCall(n(t,r,s),void 0,u),c)},e.createExpressionForJsxFragment=function(t,i,a,o,s){var c=[e.createPropertyAccess(r(i,o),"Fragment")];if(c.push(e.createNull()),a&&a.length>0)if(a.length>1)for(var u=0,l=a;u= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };'};e.createValuesHelper=function(t,r,n){return t.requestEmitHelper(a),e.setTextRange(e.createCall(i("__values"),void 0,[r]),n)};var o={name:"typescript:read",scoped:!1,text:'\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };'};e.createReadHelper=function(t,r,n,a){return t.requestEmitHelper(o),e.setTextRange(e.createCall(i("__read"),void 0,void 0!==n?[r,e.createLiteral(n)]:[r]),a)};var s={name:"typescript:spread",scoped:!1,text:"\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"};function c(t,r){var n=e.skipParentheses(t);switch(n.kind){case 71:return r;case 99:case 8:case 9:return!1;case 185:return 0!==n.elements.length;case 186:return n.properties.length>0;default:return!0}}function u(t){return e.isIdentifier(t)?e.createLiteral(t):e.isComputedPropertyName(t)?e.getMutableClone(t.expression):e.getMutableClone(t)}function l(e,t,r){return _(e,t,r,8192)}function _(t,r,n,i){void 0===i&&(i=0);var a=e.getNameOfDeclaration(t);if(a&&e.isIdentifier(a)&&!e.isGeneratedIdentifier(a)){var o=e.getMutableClone(a);return i|=e.getEmitFlags(a),n||(i|=48),r||(i|=1536),i&&e.setEmitFlags(o,i),o}return e.getGeneratedNameForNode(t)}function d(t,r,n,i){var a=e.createPropertyAccess(t,e.nodeIsSynthesized(r)?r:e.getSynthesizedClone(r));e.setTextRange(a,r);var o=0;return i||(o|=48),n||(o|=1536),o&&e.setEmitFlags(a,o),a}function p(t){return e.isStringLiteral(t.expression)&&"use strict"===t.expression.text}function f(t,r,n){e.Debug.assert(0===t.length,"Prologue directives should be at the first statement in the target statements array");for(var i=!1,a=0,o=r.length;ae.getOperatorPrecedence(202,26)?t:e.setTextRange(e.createParen(t),t)}function v(t){return 173===t.kind?e.createParenthesizedType(t):t}function b(t){switch(t.kind){case 171:case 172:case 163:case 164:return e.createParenthesizedType(t)}return v(t)}function x(e,t){for(;;){switch(e.kind){case 201:e=e.operand;continue;case 202:e=e.left;continue;case 203:e=e.condition;continue;case 191:e=e.tag;continue;case 189:if(t)return e;case 210:case 188:case 187:case 211:case 305:e=e.expression;continue}return e}}function S(e){return 202===e.kind&&26===e.operatorToken.kind||306===e.kind}function D(e,t){switch(void 0===t&&(t=7),e.kind){case 193:return 0!=(1&t);case 192:case 210:case 211:return 0!=(2&t);case 305:return 0!=(4&t)}return!1}function k(t,r){var n;void 0===r&&(r=7);do{n=t,1&r&&(t=e.skipParentheses(t)),2&r&&(t=T(t)),4&r&&(t=e.skipPartiallyEmittedExpressions(t))}while(n!==t);return t}function T(t){for(;e.isAssertionExpression(t)||211===t.kind;)t=t.expression;return t}function C(t,r,n){return void 0===n&&(n=7),t&&D(t,n)&&(!(193===(i=t).kind&&e.nodeIsSynthesized(i)&&e.nodeIsSynthesized(e.getSourceMapRange(i))&&e.nodeIsSynthesized(e.getCommentRange(i)))||e.some(e.getSyntheticLeadingComments(i))||e.some(e.getSyntheticTrailingComments(i)))?function(t,r){switch(t.kind){case 193:return e.updateParen(t,r);case 192:return e.updateTypeAssertion(t,t.type,r);case 210:return e.updateAsExpression(t,r,t.type);case 211:return e.updateNonNullExpression(t,r);case 305:return e.updatePartiallyEmittedExpression(t,r)}}(t,C(t.expression,r)):r;var i}function E(t){return e.setStartsOnNewLine(t,!0)}function N(t){var r=e.getOriginalNode(t,e.isSourceFile),n=r&&r.emitNode;return n&&n.externalHelpersModuleName}function A(t,r,n){if(t)return t.moduleName?e.createLiteral(t.moduleName):t.isDeclarationFile||!n.out&&!n.outFile?void 0:e.createLiteral(e.getExternalModuleNameFromPath(r,t.fileName))}function P(t){if(e.isDeclarationBindingElement(t))return t.name;if(!e.isObjectLiteralElementLike(t))return e.isAssignmentExpression(t,!0)?P(t.left):e.isSpreadElement(t)?P(t.expression):t;switch(t.kind){case 273:return P(t.initializer);case 274:return t.name;case 275:return P(t.expression)}}function w(t){if(e.isBindingElement(t)){if(t.dotDotDotToken)return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createSpread(t.name),t),t);var r=L(t.name);return t.initializer?e.setOriginalNode(e.setTextRange(e.createAssignment(r,t.initializer),t),t):r}return e.Debug.assertNode(t,e.isExpression),t}function F(t){if(e.isBindingElement(t)){if(t.dotDotDotToken)return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createSpreadAssignment(t.name),t),t);if(t.propertyName){var r=L(t.name);return e.setOriginalNode(e.setTextRange(e.createPropertyAssignment(t.propertyName,t.initializer?e.createAssignment(r,t.initializer):r),t),t)}return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createShorthandPropertyAssignment(t.name,t.initializer),t),t)}return e.Debug.assertNode(t,e.isObjectLiteralElementLike),t}function I(e){switch(e.kind){case 183:case 185:return M(e);case 182:case 186:return O(e)}}function O(t){return e.isObjectBindingPattern(t)?e.setOriginalNode(e.setTextRange(e.createObjectLiteral(e.map(t.elements,F)),t),t):(e.Debug.assertNode(t,e.isObjectLiteralExpression),t)}function M(t){return e.isArrayBindingPattern(t)?e.setOriginalNode(e.setTextRange(e.createArrayLiteral(e.map(t.elements,w)),t),t):(e.Debug.assertNode(t,e.isArrayLiteralExpression),t)}function L(t){return e.isBindingPattern(t)?I(t):(e.Debug.assertNode(t,e.isExpression),t)}e.createSpreadHelper=function(t,r,n){return t.requestEmitHelper(o),t.requestEmitHelper(s),e.setTextRange(e.createCall(i("__spread"),void 0,r),n)},e.createForOfBindingStatement=function(t,r){if(e.isVariableDeclarationList(t)){var n=e.first(t.declarations),i=e.updateVariableDeclaration(n,n.name,void 0,r);return e.setTextRange(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}var a=e.setTextRange(e.createAssignment(t,r),t);return e.setTextRange(e.createStatement(a),t)},e.insertLeadingStatement=function(t,r){return e.isBlock(t)?e.updateBlock(t,e.setTextRange(e.createNodeArray([r].concat(t.statements)),t.statements)):e.createBlock(e.createNodeArray([t,r]),!0)},e.restoreEnclosingLabel=function t(r,n,i){if(!n)return r;var a=e.updateLabel(n,n.label,231===n.statement.kind?t(r,n.statement):r);return i&&i(n),a},e.createCallBinding=function(t,r,n,i){void 0===i&&(i=!1);var a,o,s=k(t,7);if(e.isSuperProperty(s))a=e.createThis(),o=s;else if(97===s.kind)a=e.createThis(),o=n<2?e.setTextRange(e.createIdentifier("_super"),s):s;else if(4096&e.getEmitFlags(s))a=e.createVoidZero(),o=y(s);else switch(s.kind){case 187:c(s.expression,i)?(a=e.createTempVariable(r),o=e.createPropertyAccess(e.setTextRange(e.createAssignment(a,s.expression),s.expression),s.name),e.setTextRange(o,s)):(a=s.expression,o=s);break;case 188:c(s.expression,i)?(a=e.createTempVariable(r),o=e.createElementAccess(e.setTextRange(e.createAssignment(a,s.expression),s.expression),s.argumentExpression),e.setTextRange(o,s)):(a=s.expression,o=s);break;default:a=e.createVoidZero(),o=y(t)}return{target:o,thisArg:a}},e.inlineExpressions=function(t){return t.length>10?e.createCommaList(t):e.reduceLeft(t,e.createComma)},e.createExpressionFromEntityName=function t(r){if(e.isQualifiedName(r)){var n=t(r.left),i=e.getMutableClone(r.right);return e.setTextRange(e.createPropertyAccess(n,i),r)}return e.getMutableClone(r)},e.createExpressionForPropertyName=u,e.createExpressionForObjectLiteralElementLike=function(r,n,i){switch(n.kind){case 156:case 157:return function(t,r,n,i){var a=e.getAllAccessorDeclarations(t,r),o=a.firstAccessor,s=a.getAccessor,c=a.setAccessor;if(r===o){var l=[];if(s){var _=e.createFunctionExpression(s.modifiers,void 0,void 0,void 0,s.parameters,void 0,s.body);e.setTextRange(_,s),e.setOriginalNode(_,s);var d=e.createPropertyAssignment("get",_);l.push(d)}if(c){var p=e.createFunctionExpression(c.modifiers,void 0,void 0,void 0,c.parameters,void 0,c.body);e.setTextRange(p,c),e.setOriginalNode(p,c);var f=e.createPropertyAssignment("set",p);l.push(f)}l.push(e.createPropertyAssignment("enumerable",e.createTrue())),l.push(e.createPropertyAssignment("configurable",e.createTrue()));var m=e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[n,u(r.name),e.createObjectLiteral(l,i)]),o);return e.aggregateTransformFlags(m)}}(r.properties,n,i,!!r.multiLine);case 273:return function(r,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(n,r.name,r.name),r.initializer),r),r))}(n,i);case 274:return function(r,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(n,r.name,r.name),e.getSynthesizedClone(r.name)),r),r))}(n,i);case 154:return function(r,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(n,r.name,r.name),e.setOriginalNode(e.setTextRange(e.createFunctionExpression(r.modifiers,r.asteriskToken,void 0,void 0,r.parameters,void 0,r.body),r),r)),r),r))}(n,i)}},e.getInternalName=function(e,t,r){return _(e,t,r,49152)},e.isInternalName=function(t){return 0!=(32768&e.getEmitFlags(t))},e.getLocalName=function(e,t,r){return _(e,t,r,16384)},e.isLocalName=function(t){return 0!=(16384&e.getEmitFlags(t))},e.getExportName=l,e.isExportName=function(t){return 0!=(8192&e.getEmitFlags(t))},e.getDeclarationName=function(e,t,r){return _(e,t,r)},e.getExternalModuleOrNamespaceExportName=function(t,r,n,i){return t&&e.hasModifier(r,1)?d(t,_(r),n,i):l(r,n,i)},e.getNamespaceMemberName=d,e.convertToFunctionBody=function(t,r){return e.isBlock(t)?t:e.setTextRange(e.createBlock([e.setTextRange(e.createReturn(t),t)],r),t)},e.convertFunctionDeclarationToExpression=function(t){if(!t.body)return e.Debug.fail();var r=e.createFunctionExpression(t.modifiers,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);return e.setOriginalNode(r,t),e.setTextRange(r,t),e.getStartsOnNewLine(t)&&e.setStartsOnNewLine(r,!0),e.aggregateTransformFlags(r),r},e.addPrologue=function(e,t,r,n){return m(e,t,f(e,t,r),n)},e.addStandardPrologue=f,e.addCustomPrologue=m,e.startsWithUseStrict=function(t){var r=e.firstOrUndefined(t);return void 0!==r&&e.isPrologueDirective(r)&&p(r)},e.ensureUseStrict=function(t){for(var r=!1,n=0,i=t;ns-i)&&(a=s-i),(i>0||a0&&d<=145||176===d)return s;switch(d){case 71:return e.updateIdentifier(s,l(s.typeArguments,c,t));case 146:return e.updateQualifiedName(s,r(s.left,c,e.isEntityName),r(s.right,c,e.isIdentifier));case 147:return e.updateComputedPropertyName(s,r(s.expression,c,e.isExpression));case 148:return e.updateTypeParameterDeclaration(s,r(s.name,c,e.isIdentifier),r(s.constraint,c,e.isTypeNode),r(s.default,c,e.isTypeNode));case 149:return e.updateParameter(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.dotDotDotToken,_,e.isToken),r(s.name,c,e.isBindingName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 150:return e.updateDecorator(s,r(s.expression,c,e.isExpression));case 151:return e.updatePropertySignature(s,l(s.modifiers,c,e.isToken),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 152:return e.updateProperty(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 153:return e.updateMethodSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken));case 154:return e.updateMethod(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 155:return e.updateConstructor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),a(s.parameters,c,u,l),o(s.body,c,u));case 156:return e.updateGetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 157:return e.updateSetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),o(s.body,c,u));case 158:return e.updateCallSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 159:return e.updateConstructSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 160:return e.updateIndexSignature(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 161:return e.updateTypePredicateNode(s,r(s.parameterName,c),r(s.type,c,e.isTypeNode));case 162:return e.updateTypeReferenceNode(s,r(s.typeName,c,e.isEntityName),l(s.typeArguments,c,e.isTypeNode));case 163:return e.updateFunctionTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 164:return e.updateConstructorTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 165:return e.updateTypeQueryNode(s,r(s.exprName,c,e.isEntityName));case 166:return e.updateTypeLiteralNode(s,l(s.members,c,e.isTypeElement));case 167:return e.updateArrayTypeNode(s,r(s.elementType,c,e.isTypeNode));case 168:return e.updateTupleTypeNode(s,l(s.elementTypes,c,e.isTypeNode));case 169:return e.updateOptionalTypeNode(s,r(s.type,c,e.isTypeNode));case 170:return e.updateRestTypeNode(s,r(s.type,c,e.isTypeNode));case 171:return e.updateUnionTypeNode(s,l(s.types,c,e.isTypeNode));case 172:return e.updateIntersectionTypeNode(s,l(s.types,c,e.isTypeNode));case 173:return e.updateConditionalTypeNode(s,r(s.checkType,c,e.isTypeNode),r(s.extendsType,c,e.isTypeNode),r(s.trueType,c,e.isTypeNode),r(s.falseType,c,e.isTypeNode));case 174:return e.updateInferTypeNode(s,r(s.typeParameter,c,e.isTypeParameterDeclaration));case 181:return e.updateImportTypeNode(s,r(s.argument,c,e.isTypeNode),r(s.qualifier,c,e.isEntityName),n(s.typeArguments,c,e.isTypeNode),s.isTypeOf);case 175:return e.updateParenthesizedType(s,r(s.type,c,e.isTypeNode));case 177:return e.updateTypeOperatorNode(s,r(s.type,c,e.isTypeNode));case 178:return e.updateIndexedAccessTypeNode(s,r(s.objectType,c,e.isTypeNode),r(s.indexType,c,e.isTypeNode));case 179:return e.updateMappedTypeNode(s,r(s.readonlyToken,_,e.isToken),r(s.typeParameter,c,e.isTypeParameterDeclaration),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode));case 180:return e.updateLiteralTypeNode(s,r(s.literal,c,e.isExpression));case 182:return e.updateObjectBindingPattern(s,l(s.elements,c,e.isBindingElement));case 183:return e.updateArrayBindingPattern(s,l(s.elements,c,e.isArrayBindingElement));case 184:return e.updateBindingElement(s,r(s.dotDotDotToken,_,e.isToken),r(s.propertyName,c,e.isPropertyName),r(s.name,c,e.isBindingName),r(s.initializer,c,e.isExpression));case 185:return e.updateArrayLiteral(s,l(s.elements,c,e.isExpression));case 186:return e.updateObjectLiteral(s,l(s.properties,c,e.isObjectLiteralElementLike));case 187:return e.updatePropertyAccess(s,r(s.expression,c,e.isExpression),r(s.name,c,e.isIdentifier));case 188:return e.updateElementAccess(s,r(s.expression,c,e.isExpression),r(s.argumentExpression,c,e.isExpression));case 189:return e.updateCall(s,r(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 190:return e.updateNew(s,r(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 191:return e.updateTaggedTemplate(s,r(s.tag,c,e.isExpression),n(s.typeArguments,c,e.isExpression),r(s.template,c,e.isTemplateLiteral));case 192:return e.updateTypeAssertion(s,r(s.type,c,e.isTypeNode),r(s.expression,c,e.isExpression));case 193:return e.updateParen(s,r(s.expression,c,e.isExpression));case 194:return e.updateFunctionExpression(s,l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 195:return e.updateArrowFunction(s,l(s.modifiers,c,e.isModifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),r(s.equalsGreaterThanToken,c,e.isToken),o(s.body,c,u));case 196:return e.updateDelete(s,r(s.expression,c,e.isExpression));case 197:return e.updateTypeOf(s,r(s.expression,c,e.isExpression));case 198:return e.updateVoid(s,r(s.expression,c,e.isExpression));case 199:return e.updateAwait(s,r(s.expression,c,e.isExpression));case 200:return e.updatePrefix(s,r(s.operand,c,e.isExpression));case 201:return e.updatePostfix(s,r(s.operand,c,e.isExpression));case 202:return e.updateBinary(s,r(s.left,c,e.isExpression),r(s.right,c,e.isExpression),r(s.operatorToken,c,e.isToken));case 203:return e.updateConditional(s,r(s.condition,c,e.isExpression),r(s.questionToken,c,e.isToken),r(s.whenTrue,c,e.isExpression),r(s.colonToken,c,e.isToken),r(s.whenFalse,c,e.isExpression));case 204:return e.updateTemplateExpression(s,r(s.head,c,e.isTemplateHead),l(s.templateSpans,c,e.isTemplateSpan));case 205:return e.updateYield(s,r(s.asteriskToken,_,e.isToken),r(s.expression,c,e.isExpression));case 206:return e.updateSpread(s,r(s.expression,c,e.isExpression));case 207:return e.updateClassExpression(s,l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 209:return e.updateExpressionWithTypeArguments(s,l(s.typeArguments,c,e.isTypeNode),r(s.expression,c,e.isExpression));case 210:return e.updateAsExpression(s,r(s.expression,c,e.isExpression),r(s.type,c,e.isTypeNode));case 211:return e.updateNonNullExpression(s,r(s.expression,c,e.isExpression));case 212:return e.updateMetaProperty(s,r(s.name,c,e.isIdentifier));case 214:return e.updateTemplateSpan(s,r(s.expression,c,e.isExpression),r(s.literal,c,e.isTemplateMiddleOrTemplateTail));case 216:return e.updateBlock(s,l(s.statements,c,e.isStatement));case 217:return e.updateVariableStatement(s,l(s.modifiers,c,e.isModifier),r(s.declarationList,c,e.isVariableDeclarationList));case 219:return e.updateExpressionStatement(s,r(s.expression,c,e.isExpression));case 220:return e.updateIf(s,r(s.expression,c,e.isExpression),r(s.thenStatement,c,e.isStatement,e.liftToBlock),r(s.elseStatement,c,e.isStatement,e.liftToBlock));case 221:return e.updateDo(s,r(s.statement,c,e.isStatement,e.liftToBlock),r(s.expression,c,e.isExpression));case 222:return e.updateWhile(s,r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 223:return e.updateFor(s,r(s.initializer,c,e.isForInitializer),r(s.condition,c,e.isExpression),r(s.incrementor,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 224:return e.updateForIn(s,r(s.initializer,c,e.isForInitializer),r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 225:return e.updateForOf(s,r(s.awaitModifier,c,e.isToken),r(s.initializer,c,e.isForInitializer),r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 226:return e.updateContinue(s,r(s.label,c,e.isIdentifier));case 227:return e.updateBreak(s,r(s.label,c,e.isIdentifier));case 228:return e.updateReturn(s,r(s.expression,c,e.isExpression));case 229:return e.updateWith(s,r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 230:return e.updateSwitch(s,r(s.expression,c,e.isExpression),r(s.caseBlock,c,e.isCaseBlock));case 231:return e.updateLabel(s,r(s.label,c,e.isIdentifier),r(s.statement,c,e.isStatement,e.liftToBlock));case 232:return e.updateThrow(s,r(s.expression,c,e.isExpression));case 233:return e.updateTry(s,r(s.tryBlock,c,e.isBlock),r(s.catchClause,c,e.isCatchClause),r(s.finallyBlock,c,e.isBlock));case 235:return e.updateVariableDeclaration(s,r(s.name,c,e.isBindingName),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 236:return e.updateVariableDeclarationList(s,l(s.declarations,c,e.isVariableDeclaration));case 237:return e.updateFunctionDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 238:return e.updateClassDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 239:return e.updateInterfaceDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isTypeElement));case 240:return e.updateTypeAliasDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),r(s.type,c,e.isTypeNode));case 241:return e.updateEnumDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.members,c,e.isEnumMember));case 242:return e.updateModuleDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),r(s.body,c,e.isModuleBody));case 243:return e.updateModuleBlock(s,l(s.statements,c,e.isStatement));case 244:return e.updateCaseBlock(s,l(s.clauses,c,e.isCaseOrDefaultClause));case 245:return e.updateNamespaceExportDeclaration(s,r(s.name,c,e.isIdentifier));case 246:return e.updateImportEqualsDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),r(s.moduleReference,c,e.isModuleReference));case 247:return e.updateImportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.importClause,c,e.isImportClause),r(s.moduleSpecifier,c,e.isExpression));case 248:return e.updateImportClause(s,r(s.name,c,e.isIdentifier),r(s.namedBindings,c,e.isNamedImportBindings));case 249:return e.updateNamespaceImport(s,r(s.name,c,e.isIdentifier));case 250:return e.updateNamedImports(s,l(s.elements,c,e.isImportSpecifier));case 251:return e.updateImportSpecifier(s,r(s.propertyName,c,e.isIdentifier),r(s.name,c,e.isIdentifier));case 252:return e.updateExportAssignment(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.expression,c,e.isExpression));case 253:return e.updateExportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.exportClause,c,e.isNamedExports),r(s.moduleSpecifier,c,e.isExpression));case 254:return e.updateNamedExports(s,l(s.elements,c,e.isExportSpecifier));case 255:return e.updateExportSpecifier(s,r(s.propertyName,c,e.isIdentifier),r(s.name,c,e.isIdentifier));case 257:return e.updateExternalModuleReference(s,r(s.expression,c,e.isExpression));case 258:return e.updateJsxElement(s,r(s.openingElement,c,e.isJsxOpeningElement),l(s.children,c,e.isJsxChild),r(s.closingElement,c,e.isJsxClosingElement));case 259:return e.updateJsxSelfClosingElement(s,r(s.tagName,c,e.isJsxTagNameExpression),l(s.typeArguments,c,e.isTypeNode),r(s.attributes,c,e.isJsxAttributes));case 260:return e.updateJsxOpeningElement(s,r(s.tagName,c,e.isJsxTagNameExpression),l(s.typeArguments,c,e.isTypeNode),r(s.attributes,c,e.isJsxAttributes));case 261:return e.updateJsxClosingElement(s,r(s.tagName,c,e.isJsxTagNameExpression));case 262:return e.updateJsxFragment(s,r(s.openingFragment,c,e.isJsxOpeningFragment),l(s.children,c,e.isJsxChild),r(s.closingFragment,c,e.isJsxClosingFragment));case 265:return e.updateJsxAttribute(s,r(s.name,c,e.isIdentifier),r(s.initializer,c,e.isStringLiteralOrJsxExpression));case 266:return e.updateJsxAttributes(s,l(s.properties,c,e.isJsxAttributeLike));case 267:return e.updateJsxSpreadAttribute(s,r(s.expression,c,e.isExpression));case 268:return e.updateJsxExpression(s,r(s.expression,c,e.isExpression));case 269:return e.updateCaseClause(s,r(s.expression,c,e.isExpression),l(s.statements,c,e.isStatement));case 270:return e.updateDefaultClause(s,l(s.statements,c,e.isStatement));case 271:return e.updateHeritageClause(s,l(s.types,c,e.isExpressionWithTypeArguments));case 272:return e.updateCatchClause(s,r(s.variableDeclaration,c,e.isVariableDeclaration),r(s.block,c,e.isBlock));case 273:return e.updatePropertyAssignment(s,r(s.name,c,e.isPropertyName),r(s.initializer,c,e.isExpression));case 274:return e.updateShorthandPropertyAssignment(s,r(s.name,c,e.isIdentifier),r(s.objectAssignmentInitializer,c,e.isExpression));case 275:return e.updateSpreadAssignment(s,r(s.expression,c,e.isExpression));case 276:return e.updateEnumMember(s,r(s.name,c,e.isPropertyName),r(s.initializer,c,e.isExpression));case 277:return e.updateSourceFileNode(s,i(s.statements,c,u));case 305:return e.updatePartiallyEmittedExpression(s,r(s.expression,c,e.isExpression));case 306:return e.updateCommaList(s,l(s.elements,c,e.isExpression));default:return s}}}}(s||(s={})),function(e){function t(e,t,r){return e?t(r,e):r}function r(e,t,r){return e?t(r,e):r}function n(n,i,a,o){if(void 0===n)return i;var s=o?r:e.reduceLeft,c=o||a,u=n.kind;if(u>0&&u<=145)return i;if(u>=161&&u<=180)return i;var l=i;switch(n.kind){case 215:case 218:case 208:case 234:case 304:break;case 146:l=t(n.left,a,l),l=t(n.right,a,l);break;case 147:l=t(n.expression,a,l);break;case 149:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 150:l=t(n.expression,a,l);break;case 151:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.questionToken,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 152:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 154:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 155:l=s(n.modifiers,c,l),l=s(n.parameters,c,l),l=t(n.body,a,l);break;case 156:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 157:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.parameters,c,l),l=t(n.body,a,l);break;case 182:case 183:l=s(n.elements,c,l);break;case 184:l=t(n.propertyName,a,l),l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 185:l=s(n.elements,c,l);break;case 186:l=s(n.properties,c,l);break;case 187:l=t(n.expression,a,l),l=t(n.name,a,l);break;case 188:l=t(n.expression,a,l),l=t(n.argumentExpression,a,l);break;case 189:case 190:l=t(n.expression,a,l),l=s(n.typeArguments,c,l),l=s(n.arguments,c,l);break;case 191:l=t(n.tag,a,l),l=t(n.template,a,l);break;case 192:l=t(n.type,a,l),l=t(n.expression,a,l);break;case 194:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 195:l=s(n.modifiers,c,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 193:case 196:case 197:case 198:case 199:case 205:case 206:case 211:l=t(n.expression,a,l);break;case 200:case 201:l=t(n.operand,a,l);break;case 202:l=t(n.left,a,l),l=t(n.right,a,l);break;case 203:l=t(n.condition,a,l),l=t(n.whenTrue,a,l),l=t(n.whenFalse,a,l);break;case 204:l=t(n.head,a,l),l=s(n.templateSpans,c,l);break;case 207:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.heritageClauses,c,l),l=s(n.members,c,l);break;case 209:l=t(n.expression,a,l),l=s(n.typeArguments,c,l);break;case 210:l=t(n.expression,a,l),l=t(n.type,a,l);break;case 214:l=t(n.expression,a,l),l=t(n.literal,a,l);break;case 216:l=s(n.statements,c,l);break;case 217:l=s(n.modifiers,c,l),l=t(n.declarationList,a,l);break;case 219:l=t(n.expression,a,l);break;case 220:l=t(n.expression,a,l),l=t(n.thenStatement,a,l),l=t(n.elseStatement,a,l);break;case 221:l=t(n.statement,a,l),l=t(n.expression,a,l);break;case 222:case 229:l=t(n.expression,a,l),l=t(n.statement,a,l);break;case 223:l=t(n.initializer,a,l),l=t(n.condition,a,l),l=t(n.incrementor,a,l),l=t(n.statement,a,l);break;case 224:case 225:l=t(n.initializer,a,l),l=t(n.expression,a,l),l=t(n.statement,a,l);break;case 228:case 232:l=t(n.expression,a,l);break;case 230:l=t(n.expression,a,l),l=t(n.caseBlock,a,l);break;case 231:l=t(n.label,a,l),l=t(n.statement,a,l);break;case 233:l=t(n.tryBlock,a,l),l=t(n.catchClause,a,l),l=t(n.finallyBlock,a,l);break;case 235:l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 236:l=s(n.declarations,c,l);break;case 237:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 238:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.heritageClauses,c,l),l=s(n.members,c,l);break;case 241:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.members,c,l);break;case 242:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.body,a,l);break;case 243:l=s(n.statements,c,l);break;case 244:l=s(n.clauses,c,l);break;case 246:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.moduleReference,a,l);break;case 247:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.importClause,a,l),l=t(n.moduleSpecifier,a,l);break;case 248:l=t(n.name,a,l),l=t(n.namedBindings,a,l);break;case 249:l=t(n.name,a,l);break;case 250:case 254:l=s(n.elements,c,l);break;case 251:case 255:l=t(n.propertyName,a,l),l=t(n.name,a,l);break;case 252:l=e.reduceLeft(n.decorators,a,l),l=e.reduceLeft(n.modifiers,a,l),l=t(n.expression,a,l);break;case 253:l=e.reduceLeft(n.decorators,a,l),l=e.reduceLeft(n.modifiers,a,l),l=t(n.exportClause,a,l),l=t(n.moduleSpecifier,a,l);break;case 257:l=t(n.expression,a,l);break;case 258:l=t(n.openingElement,a,l),l=e.reduceLeft(n.children,a,l),l=t(n.closingElement,a,l);break;case 262:l=t(n.openingFragment,a,l),l=e.reduceLeft(n.children,a,l),l=t(n.closingFragment,a,l);break;case 259:case 260:l=t(n.tagName,a,l),l=t(n.attributes,a,l);break;case 266:l=s(n.properties,c,l);break;case 261:l=t(n.tagName,a,l);break;case 265:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 267:case 268:l=t(n.expression,a,l);break;case 269:l=t(n.expression,a,l);case 270:l=s(n.statements,c,l);break;case 271:l=s(n.types,c,l);break;case 272:l=t(n.variableDeclaration,a,l),l=t(n.block,a,l);break;case 273:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 274:l=t(n.name,a,l),l=t(n.objectAssignmentInitializer,a,l);break;case 275:l=t(n.expression,a,l);break;case 276:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 277:l=s(n.statements,c,l);break;case 305:l=t(n.expression,a,l);break;case 306:l=s(n.elements,c,l)}return l}function i(t){if(void 0===t)return 0;if(536870912&t.transformFlags)return t.transformFlags&~e.getTransformFlagsSubtreeExclusions(t.kind);var r=function(t){if(e.hasModifier(t,2)||e.isTypeNode(t)&&209!==t.kind)return 0;return n(t,0,a,o)}(t);return e.computeTransformFlagsForNode(t,r)}function a(e,t){return e|i(t)}function o(e,t){return e|function(e){if(void 0===e)return 0;for(var t=0,r=0,n=0,a=e;n=e.encodedText.length,"Error in decoding base64VLQFormatDecode, past the mapping string"))return;var o=(t=e.encodedText.charAt(e.decodingIndex),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(t));n=0!=(32&o),a|=(31&o)<>=1:a=-(a>>=1),a}}(t)?{done:!1,value:r()}:{done:!0,value:void 0}}}}function n(e,t){return t===e.length||44===e.charCodeAt(t)||59===e.charCodeAt(t)}t.identitySourceMapper={getOriginalPosition:e.identity,getGeneratedPosition:e.identity},t.decode=function(t,n,i,a,o){void 0===o&&(o=e.createSourceFileLikeCache(t));var s,c,u,l=e.getDirectoryPath(n),_=i.sourceRoot?e.getNormalizedAbsolutePath(i.sourceRoot,l):l;return{getOriginalPosition:function(r){var n=c||(c=p().slice().sort(m));if(!e.length(n))return r;var i=e.binarySearch(n,{emittedPosition:r.position},e.identity,m);return i<0&&n.length>0&&(i=~i),{fileName:e.toPath(n[i].sourcePath,_,t.getCanonicalFileName),position:n[i].sourcePosition}},getGeneratedPosition:function(r){var n=u||(u=p().slice().sort(f));if(!e.length(n))return r;var a=e.binarySearch(n,{sourcePath:r.fileName,sourcePosition:r.position},e.identity,f);return a<0&&n.length>0&&(a=~a),n[a]&&0===e.comparePaths(r.fileName,n[a].sourcePath,_)?{fileName:e.toPath(i.file,_,t.getCanonicalFileName),position:n[a].emittedPosition}:r}};function d(r,n,i,s){var c=function(r,n){var i=e.toPath(r,n,t.getCanonicalFileName),s=a&&a.getSourceFile(i);return s||o.get(i)}(r,n);return c?e.getPositionOfLineAndCharacter(c,i,s):-1}function p(){return s||(s=function(t,n,i){var a=r(t),o=e.arrayFrom(a,n);return a.error?(i&&i.log&&i.log("Encountered error while decoding sourcemap: "+a.error),[]):o}(i,g,t))}function f(t,r){return e.comparePaths(t.sourcePath,r.sourcePath,_)||e.compareValues(t.sourcePosition,r.sourcePosition)}function m(t,r){return e.compareValues(t.emittedPosition,r.emittedPosition)}function g(e){var t=i.sources[e.sourceIndex];return{emittedPosition:d(i.file,l,e.emittedLine,e.emittedColumn),sourcePosition:d(t,_,e.sourceLine,e.sourceColumn),sourcePath:t}}},t.decodeMappings=r}(e.sourcemaps||(e.sourcemaps={}))}(s||(s={})),function(e){function t(t){return(t=e.getOriginalNode(t))?e.getNodeId(t):0}function r(e){return void 0!==e.propertyName&&"default"===e.propertyName.escapedText}function n(t){if(e.getNamespaceDeclarationNode(t))return!0;var n=t.importClause&&t.importClause.namedBindings;if(!n)return!1;if(!e.isNamedImports(n))return!1;for(var i=0,a=0,o=n.elements;a0&&i!==n.elements.length||!!(n.elements.length-i)&&e.isDefaultImport(t)}function i(t){return!n(t)&&(e.isDefaultImport(t)||!!t.importClause&&e.isNamedImports(t.importClause.namedBindings)&&function(t){return!!t&&!!e.isNamedImports(t)&&e.some(t.elements,r)}(t.importClause.namedBindings))}function a(t,r,n){if(e.isBindingPattern(t.name))for(var i=0,o=t.name.elements;i=1)||1572864&g.transformFlags||1572864&e.getTargetOfBindingOrAssignmentElement(g).transformFlags||e.isComputedPropertyName(h)){u&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o),u=void 0);var y=n(t,s,h);e.isComputedPropertyName(h)&&(l=e.append(l,y.argumentExpression)),r(t,g,y,g)}else u=e.append(u,g)}}u&&t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o)}(t,a,l,o,s):e.isArrayBindingOrAssignmentPattern(l)?function(t,n,a,o,s){var c,u,l=e.getElementsOfBindingOrAssignmentPattern(a),_=l.length;if(t.level<1&&t.downlevelIteration)o=i(t,e.createReadHelper(t.context,o,_>0&&e.getRestIndicatorOfBindingOrAssignmentElement(l[_-1])?void 0:_,s),!1,s);else if(1!==_&&(t.level<1||0===_)||e.every(l,e.isOmittedExpression)){var d=!e.isDeclarationBindingElement(n)||0!==_;o=i(t,o,d,s)}for(var p=0;p<_;p++){var f=l[p];if(t.level>=1)if(1048576&f.transformFlags){var m=e.createTempVariable(void 0);t.hoistTempVariables&&t.context.hoistVariableDeclaration(m),u=e.append(u,[m,f]),c=e.append(c,t.createArrayBindingOrAssignmentElement(m))}else c=e.append(c,f);else{if(e.isOmittedExpression(f))continue;if(e.getRestIndicatorOfBindingOrAssignmentElement(f)){if(p===_-1){var g=e.createArraySlice(o,p);r(t,f,g,f)}}else{var g=e.createElementAccess(o,p);r(t,f,g,f)}}}c&&t.emitBindingOrAssignment(t.createArrayBindingOrAssignmentPattern(c),o,s,a);if(u)for(var y=0,h=u;y0)return!0;var r=e.getFirstConstructorWithBody(t);return!!r&&e.forEach(r.parameters,J)}(t)&&(n|=2),e.childIsDecorated(t)&&(n|=4),Oe(t)?n|=8:function(t){return Me(t)&&e.hasModifier(t,512)}(t)?n|=32:Le(t)&&(n|=16),D<=1&&7&n&&(n|=128),n}(n,o);128&s&&t.startLexicalEnvironment();var c=n.name||(5&s?e.getGeneratedNameForNode(n):void 0),u=2&s?function(t,r,n){var i=e.moveRangePastDecorators(t),a=function(t){if(8388608&b.getNodeCheckFlags(t)){Ue();var r=e.createUniqueName(t.name&&!e.isGeneratedIdentifier(t.name)?e.idText(t.name):"default");return p[e.getOriginalNodeId(t)]=r,v(r),r}}(t),o=e.getLocalName(t,!1,!0),s=e.visitNodes(t.heritageClauses,A,e.isHeritageClause),c=z(t,0!=(64&n)),u=e.createClassExpression(void 0,r,void 0,s,c);e.setOriginalNode(u,t),e.setTextRange(u,i);var l=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(o,void 0,a?e.createAssignment(a,u):u)],1));return e.setOriginalNode(l,t),e.setTextRange(l,i),e.setCommentRange(l,t),l}(n,c,s):function(t,r,n){var i=128&n?void 0:e.visitNodes(t.modifiers,R,e.isModifier),a=e.createClassDeclaration(void 0,i,r,void 0,e.visitNodes(t.heritageClauses,A,e.isHeritageClause),z(t,0!=(64&n))),o=e.getEmitFlags(t);return 1&n&&(o|=32),e.setTextRange(a,t),e.setOriginalNode(a,t),e.setEmitFlags(a,o),a}(n,c,s),l=[u];if(e.some(m)&&l.push(e.createExpressionStatement(e.inlineExpressions(m))),m=a,1&s&&G(l,o,128&s?e.getInternalName(n):e.getLocalName(n)),te(l,n,!1),te(l,n,!0),function(r,n){var a=function(r){var n=function(t){var r=t.decorators,n=$(e.getFirstConstructorWithBody(t));if(r||n)return{decorators:r,parameters:n}}(r),a=ee(r,r,n);if(a){var o=p&&p[e.getOriginalNodeId(r)],s=e.getLocalName(r,!1,!0),c=i(t,a,s),u=e.createAssignment(s,o?e.createAssignment(o,c):c);return e.setEmitFlags(u,1536),e.setSourceMapRange(u,e.moveRangePastDecorators(r)),u}}(n);a&&r.push(e.setOriginalNode(e.createExpressionStatement(a),n))}(l,n),128&s){var _=e.createTokenRange(e.skipTrivia(r.text,n.members.end),18),d=e.getInternalName(n),f=e.createPartiallyEmittedExpression(d);f.end=_.end,e.setEmitFlags(f,1536);var g=e.createReturn(f);g.pos=_.pos,e.setEmitFlags(g,1920),l.push(g),e.addStatementsAfterPrologue(l,t.endLexicalEnvironment());var y=e.createImmediatelyInvokedArrowFunction(l);e.setEmitFlags(y,33554432);var h=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getLocalName(n,!1,!1),void 0,y)]));e.setOriginalNode(h,n),e.setCommentRange(h,n),e.setSourceMapRange(h,e.moveRangePastDecorators(n)),e.startOnNewLine(h),l=[h]}return 8&s?Be(l,n):(128&s||2&s)&&(32&s?l.push(e.createExportDefault(e.getLocalName(n,!1,!0))):16&s&&l.push(e.createExternalModuleExport(e.getLocalName(n,!1,!0)))),l.length>1&&(l.push(e.createEndOfDeclarationMarker(n)),e.setEmitFlags(u,4194304|e.getEmitFlags(u))),e.singleOrMany(l)}(n);case 207:return function(t){var r=m;m=void 0;var n=q(t,!0),i=e.visitNodes(t.heritageClauses,A,e.isHeritageClause),a=z(t,e.some(i,function(e){return 85===e.token})),o=e.createClassExpression(void 0,t.name,void 0,i,a);if(e.setOriginalNode(o,t),e.setTextRange(o,t),e.some(n)||e.some(m)){var s=[],c=8388608&b.getNodeCheckFlags(t),u=e.createTempVariable(v,!!c);if(c){Ue();var l=e.getSynthesizedClone(u);l.autoGenerateFlags&=-9,p[e.getOriginalNodeId(t)]=l}return e.setEmitFlags(o,65536|e.getEmitFlags(o)),s.push(e.startOnNewLine(e.createAssignment(u,o))),e.addRange(s,e.map(m,e.startOnNewLine)),m=r,e.addRange(s,function(t,r){for(var n=[],i=0,a=t;i=e.ModuleKind.ES2015)&&!e.isJsonSourceFile(r);return e.updateSourceFileNode(r,e.visitLexicalEnvironment(r.statements,w,t,0,n))}function J(e){return void 0!==e.decorators&&e.decorators.length>0}function z(r,n){var i=[],a=function(r,n){var i=e.forEach(r.members,W),a=262144&r.transformFlags,o=e.getFirstConstructorWithBody(r);if(!i&&!a)return e.visitEachChild(o,A,t);var s=function(r){return e.visitParameterList(r&&r.parameters,A,t)||[]}(o),c=function(t,r,n){var i=[],a=0;if(y(),r){a=function(t,r){if(t.body){var n=t.body.statements,i=e.addPrologue(r,n,!1,A);if(i===n.length)return i;var a=n[i];return 219===a.kind&&e.isSuperCall(a.expression)?(r.push(e.visitNode(a,A,e.isStatement)),i+1):i}return 0}(r,i);var o=function(t){return e.filter(t.parameters,K)}(r);e.addRange(i,e.map(o,U))}else n&&i.push(e.createExpressionStatement(e.createCall(e.createSuper(),void 0,[e.createSpread(e.createIdentifier("arguments"))])));var s=q(t,!1);return G(i,s,e.createThis()),r&&e.addRange(i,e.visitNodes(r.body.statements,A,e.isStatement,a)),i=e.mergeLexicalEnvironment(i,h()),e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(i),r?r.body.statements:t.members),!0),r?r.body:void 0)}(r,o,n);return e.startOnNewLine(e.setOriginalNode(e.setTextRange(e.createConstructor(void 0,void 0,s,c),o||r),o))}(r,n);return a&&i.push(a),e.addRange(i,e.visitNodes(r.members,M,e.isClassElement)),e.setTextRange(e.createNodeArray(i),r.members)}function K(t){return e.hasModifier(t,92)&&e.isIdentifier(t.name)}function U(t){e.Debug.assert(e.isIdentifier(t.name));var r=t.name,n=e.getMutableClone(r);e.setEmitFlags(n,1584);var i=e.getMutableClone(r);return e.setEmitFlags(i,1536),e.startOnNewLine(e.setEmitFlags(e.setTextRange(e.createExpressionStatement(e.createAssignment(e.setTextRange(e.createPropertyAccess(e.createThis(),n),t.name),i)),e.moveRangePos(t,-1)),1536))}function q(t,r){return e.filter(t.members,r?V:W)}function V(e){return H(e,!0)}function W(e){return H(e,!1)}function H(t,r){return 152===t.kind&&r===e.hasModifier(t,32)&&void 0!==t.initializer}function G(t,r,n){for(var i=0,a=r;i0?152===n.kind?e.createVoidZero():e.createNull():void 0,u=i(t,a,o,s,c,e.moveRangePastDecorators(n));return e.setEmitFlags(u,1536),u}}function ne(t){return e.visitNode(t.expression,A,e.isExpression)}function ie(r,n){var i;if(r){i=[];for(var a=0,o=r;a= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };'};function o(t,r,n){return t.requestEmitHelper(s),e.createCall(e.getHelperName("__metadata"),void 0,[e.createLiteral(r),n])}var s={name:"typescript:metadata",scoped:!1,priority:3,text:'\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);\n };'};function c(t,r,n,i){return t.requestEmitHelper(u),e.setTextRange(e.createCall(e.getHelperName("__param"),void 0,[e.createLiteral(n),r]),i)}var u={name:"typescript:param",scoped:!1,priority:4,text:"\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"}}(s||(s={})),function(e){var t;!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(t||(t={})),e.transformES2017=function(t){var r,i,a=t.resumeLexicalEnvironment,o=t.endLexicalEnvironment,s=t.hoistVariableDeclaration,c=t.getEmitResolver(),u=t.getCompilerOptions(),l=e.getEmitScriptTarget(u),_=0,d=t.onEmitNode,p=t.onSubstituteNode;return t.onEmitNode=function(e,t,n){if(1&r&&function(e){var t=e.kind;return 238===t||155===t||154===t||156===t||157===t}(t)){var i=6144&c.getNodeCheckFlags(t);if(i!==_){var a=_;return _=i,d(e,t,n),void(_=a)}}d(e,t,n)},t.onSubstituteNode=function(t,r){return r=p(t,r),1===t&&_?function(t){switch(t.kind){case 187:return T(t);case 188:return C(t);case 189:return function(t){var r=t.expression;if(e.isSuperProperty(r)){var n=e.isPropertyAccessExpression(r)?T(r):C(r);return e.createCall(e.createPropertyAccess(n,"call"),void 0,[e.createThis()].concat(t.arguments))}return t}(t)}return t}(r):r},e.chainBundle(function(r){if(r.isDeclarationFile)return r;var n=e.visitEachChild(r,f,t);return e.addEmitHelpers(n,t.readEmitHelpers()),n});function f(r){if(0==(16&r.transformFlags))return r;switch(r.kind){case 120:return;case 199:return function(t){return e.setOriginalNode(e.setTextRange(e.createYield(void 0,e.visitNode(t.expression,f,e.isExpression)),t),t)}(r);case 154:return function(r){return e.updateMethod(r,void 0,e.visitNodes(r.modifiers,f,e.isModifier),r.asteriskToken,r.name,void 0,void 0,e.visitParameterList(r.parameters,f,t),void 0,2&e.getFunctionFlags(r)?S(r):e.visitFunctionBody(r.body,f,t))}(r);case 237:return function(r){return e.updateFunctionDeclaration(r,void 0,e.visitNodes(r.modifiers,f,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,f,t),void 0,2&e.getFunctionFlags(r)?S(r):e.visitFunctionBody(r.body,f,t))}(r);case 194:return function(r){return e.updateFunctionExpression(r,e.visitNodes(r.modifiers,f,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,f,t),void 0,2&e.getFunctionFlags(r)?S(r):e.visitFunctionBody(r.body,f,t))}(r);case 195:return function(r){return e.updateArrowFunction(r,e.visitNodes(r.modifiers,f,e.isModifier),void 0,e.visitParameterList(r.parameters,f,t),void 0,r.equalsGreaterThanToken,2&e.getFunctionFlags(r)?S(r):e.visitFunctionBody(r.body,f,t))}(r);default:return e.visitEachChild(r,f,t)}}function m(r){if(e.isNodeWithPossibleHoistedDeclaration(r))switch(r.kind){case 217:return function(r){if(y(r.declarationList)){var n=h(r.declarationList,!1);return n?e.createExpressionStatement(n):void 0}return e.visitEachChild(r,f,t)}(r);case 223:return function(t){var r=t.initializer;return e.updateFor(t,y(r)?h(r,!1):e.visitNode(t.initializer,f,e.isForInitializer),e.visitNode(t.condition,f,e.isExpression),e.visitNode(t.incrementor,f,e.isExpression),e.visitNode(t.statement,m,e.isStatement,e.liftToBlock))}(r);case 224:return function(t){return e.updateForIn(t,y(t.initializer)?h(t.initializer,!0):e.visitNode(t.initializer,f,e.isForInitializer),e.visitNode(t.expression,f,e.isExpression),e.visitNode(t.statement,m,e.isStatement,e.liftToBlock))}(r);case 225:return function(t){return e.updateForOf(t,e.visitNode(t.awaitModifier,f,e.isToken),y(t.initializer)?h(t.initializer,!0):e.visitNode(t.initializer,f,e.isForInitializer),e.visitNode(t.expression,f,e.isExpression),e.visitNode(t.statement,m,e.isStatement,e.liftToBlock))}(r);case 272:return function(r){var n,a=e.createUnderscoreEscapedMap();if(g(r.variableDeclaration,a),a.forEach(function(t,r){i.has(r)&&(n||(n=e.cloneMap(i)),n.delete(r))}),n){var o=i;i=n;var s=e.visitEachChild(r,m,t);return i=o,s}return e.visitEachChild(r,m,t)}(r);case 216:case 230:case 244:case 269:case 270:case 233:case 221:case 222:case 220:case 229:case 231:return e.visitEachChild(r,m,t);default:return e.Debug.assertNever(r,"Unhandled node.")}return f(r)}function g(t,r){var n=t.name;if(e.isIdentifier(n))r.set(n.escapedText,!0);else for(var i=0,a=n.elements;i=2&&(4096&c.getNodeCheckFlags(r)?(k(),e.addEmitHelper(T,e.advancedAsyncSuperHelper)):2048&c.getNodeCheckFlags(r)&&(k(),e.addEmitHelper(T,e.asyncSuperHelper))),s=T}return i=m,s}function D(t,r){return e.isBlock(t)?e.updateBlock(t,e.visitNodes(t.statements,m,e.isStatement,r)):e.convertToFunctionBody(e.visitNode(t,m,e.isConciseBody))}function k(){0==(1&r)&&(r|=1,t.enableSubstitution(189),t.enableSubstitution(187),t.enableSubstitution(188),t.enableEmitNotification(238),t.enableEmitNotification(154),t.enableEmitNotification(156),t.enableEmitNotification(157),t.enableEmitNotification(155))}function T(t){return 97===t.expression.kind?E(e.createLiteral(e.idText(t.name)),t):t}function C(e){return 97===e.expression.kind?E(e.argumentExpression,e):e}function E(t,r){return 4096&_?e.setTextRange(e.createPropertyAccess(e.createCall(e.createFileLevelUniqueName("_super"),void 0,[t]),"value"),r):e.setTextRange(e.createCall(e.createFileLevelUniqueName("_super"),void 0,[t]),r)}};var r={name:"typescript:awaiter",scoped:!1,priority:5,text:'\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };'};function n(t,n,i,a){t.requestEmitHelper(r);var o=e.createFunctionExpression(void 0,e.createToken(39),void 0,void 0,[],void 0,a);return(o.emitNode||(o.emitNode={})).flags|=786432,e.createCall(e.getHelperName("__awaiter"),void 0,[e.createThis(),n?e.createIdentifier("arguments"):e.createVoidZero(),i?e.createExpressionFromEntityName(i):e.createVoidZero(),o])}e.asyncSuperHelper={name:"typescript:async-super",scoped:!0,text:e.helperString(a(["\n const "," = name => super[name];"],["\n const "," = name => super[name];"]),"_super")},e.advancedAsyncSuperHelper={name:"typescript:advanced-async-super",scoped:!0,text:e.helperString(a(["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"],["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"]),"_super")}}(s||(s={})),function(e){var t;!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(t||(t={})),e.transformESNext=function(t){var r=t.resumeLexicalEnvironment,c=t.endLexicalEnvironment,l=t.hoistVariableDeclaration,_=t.getEmitResolver(),d=t.getCompilerOptions(),p=e.getEmitScriptTarget(d),f=t.onEmitNode;t.onEmitNode=function(e,t,r){if(1&m&&function(e){var t=e.kind;return 238===t||155===t||154===t||156===t||157===t}(t)){var n=6144&_.getNodeCheckFlags(t);if(n!==h){var i=h;return h=n,f(e,t,r),void(h=i)}}f(e,t,r)};var m,g,y=t.onSubstituteNode;t.onSubstituteNode=function(t,r){return r=y(t,r),1===t&&h?function(t){switch(t.kind){case 187:return A(t);case 188:return P(t);case 189:return function(t){var r=t.expression;if(e.isSuperProperty(r)){var n=e.isPropertyAccessExpression(r)?A(r):P(r);return e.createCall(e.createPropertyAccess(n,"call"),void 0,[e.createThis()].concat(t.arguments))}return t}(t)}return t}(r):r};var h=0;return e.chainBundle(function(r){if(r.isDeclarationFile)return r;var n=e.visitEachChild(r,v,t);return e.addEmitHelpers(n,t.readEmitHelpers()),n});function v(e){return S(e,!1)}function b(e){return S(e,!0)}function x(e){if(120!==e.kind)return e}function S(r,o){if(0==(8&r.transformFlags))return r;switch(r.kind){case 199:return function(r){return 2&g&&1&g?e.setOriginalNode(e.setTextRange(e.createYield(a(t,e.visitNode(r.expression,v,e.isExpression))),r),r):e.visitEachChild(r,v,t)}(r);case 205:return function(r){if(2&g&&1&g){if(r.asteriskToken){var n=e.visitNode(r.expression,v,e.isExpression);return e.setOriginalNode(e.setTextRange(e.createYield(a(t,e.updateYield(r,r.asteriskToken,function(t,r,n){return t.requestEmitHelper(i),t.requestEmitHelper(s),e.setTextRange(e.createCall(e.getHelperName("__asyncDelegator"),void 0,[r]),n)}(t,u(t,n,n),n)))),r),r)}return e.setOriginalNode(e.setTextRange(e.createYield(k(r.expression?e.visitNode(r.expression,v,e.isExpression):e.createVoidZero())),r),r)}return e.visitEachChild(r,v,t)}(r);case 228:return function(r){return 2&g&&1&g?e.updateReturn(r,k(r.expression?e.visitNode(r.expression,v,e.isExpression):e.createVoidZero())):e.visitEachChild(r,v,t)}(r);case 231:return function(r){if(2&g){var n=e.unwrapInnermostStatementOfLabel(r);return 225===n.kind&&n.awaitModifier?D(n,r):e.restoreEnclosingLabel(e.visitEachChild(n,v,t),r)}return e.visitEachChild(r,v,t)}(r);case 186:return function(r){if(1048576&r.transformFlags){var i=function(t){for(var r,n=[],i=0,a=t;i=2&&(4096&_.getNodeCheckFlags(n)?(N(),e.addEmitHelper(u,e.advancedAsyncSuperHelper)):2048&_.getNodeCheckFlags(n)&&(N(),e.addEmitHelper(u,e.asyncSuperHelper))),u}function C(t){r();var n=0,i=[],a=e.visitNode(t.body,v,e.isConciseBody);e.isBlock(a)&&(n=e.addPrologue(i,a.statements,!1,v)),e.addRange(i,E(void 0,t));var o=c();if(n>0||e.some(i)||e.some(o)){var s=e.convertToFunctionBody(a,!0);return e.addStatementsAfterPrologue(i,o),e.addRange(i,s.statements.slice(n)),e.updateBlock(s,e.setTextRange(e.createNodeArray(i),s.statements))}return a}function E(r,n){for(var i=0,a=n.parameters;i=2?e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"assign"),void 0,n):(t.requestEmitHelper(r),e.createCall(e.getHelperName("__assign"),void 0,n))}e.createAssignHelper=n;var i={name:"typescript:await",scoped:!1,text:"\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }"};function a(t,r){return t.requestEmitHelper(i),e.createCall(e.getHelperName("__await"),void 0,[r])}var o={name:"typescript:asyncGenerator",scoped:!1,text:'\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };'};var s={name:"typescript:asyncDelegator",scoped:!1,text:'\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }\n };'};var c={name:"typescript:asyncValues",scoped:!1,text:'\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };'};function u(t,r,n){return t.requestEmitHelper(c),e.setTextRange(e.createCall(e.getHelperName("__asyncValues"),void 0,[r]),n)}}(s||(s={})),function(e){e.transformJsx=function(r){var n,i=r.getCompilerOptions();return e.chainBundle(function(t){if(t.isDeclarationFile)return t;n=t;var i=e.visitEachChild(t,a,r);return e.addEmitHelpers(i,r.readEmitHelpers()),i});function a(t){return 4&t.transformFlags?function(t){switch(t.kind){case 258:return s(t,!1);case 259:return c(t,!1);case 262:return u(t,!1);case 268:return m(t);default:return e.visitEachChild(t,a,r)}}(t):t}function o(t){switch(t.kind){case 10:return function(t){var r=function(t){for(var r,n=0,i=-1,a=0;a=t.end)return!1;for(var i=e.getEnclosingBlockScopeContainer(t);n;){if(n===i||n===t)return!1;if(e.isClassElement(n)&&n.parent===t)return!0;n=n.parent}return!1}(r,t)))return e.setTextRange(e.getGeneratedNameForNode(e.getNameOfDeclaration(r)),t)}return t}(t);case 99:return function(t){return 1&u&&16&i?e.setTextRange(e.createFileLevelUniqueName("_this"),t):t}(t)}return t}(r):e.isIdentifier(r)?function(t){if(2&u&&!e.isInternalName(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r&&function(e){switch(e.parent.kind){case 184:case 238:case 241:case 235:return e.parent.name===e&&m.isDeclarationWithCollidingName(e.parent)}return!1}(r))return e.setTextRange(e.getGeneratedNameForNode(r),t)}return t}(r):r},e.chainBundle(function(o){if(o.isDeclarationFile)return o;r=o,n=o.text;var s=function(t){var r=h(3968,64),n=[];l();var i=e.addStandardPrologue(n,t.statements,!1);return I(n,t),i=e.addCustomPrologue(n,t.statements,i,S),e.addRange(n,e.visitNodes(t.statements,S,e.isStatement,i)),a&&n.push(e.createVariableStatement(void 0,e.createVariableDeclarationList(a))),e.addStatementsAfterPrologue(n,d()),v(r,0,0),e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray(n),t.statements))}(o);return e.addEmitHelpers(s,t.readEmitHelpers()),r=void 0,n=void 0,a=void 0,i=0,s});function h(e,t){var r=i;return i=16383&(i&~e|t),r}function v(e,t,r){i=-16384&(i&~t|r)|e}function b(e){return 0!=(4096&i)&&228===e.kind&&!e.expression}function x(t){return 0!=(128&t.transformFlags)||void 0!==c||4096&i&&(e.isStatement(t)||216===t.kind)||e.isIterationStatement(t,!1)&&ae(t)||0!=(33554432&e.getEmitFlags(t))}function S(n){return x(n)?function(n){switch(n.kind){case 115:return;case 238:return function(t){var r=e.createVariableDeclaration(e.getLocalName(t,!0),void 0,C(t));e.setOriginalNode(r,t);var n=[],i=e.createVariableStatement(void 0,e.createVariableDeclarationList([r]));if(e.setOriginalNode(i,t),e.setTextRange(i,t),e.startOnNewLine(i),n.push(i),e.hasModifier(t,1)){var a=e.hasModifier(t,512)?e.createExportDefault(e.getLocalName(t)):e.createExternalModuleExport(e.getLocalName(t));e.setOriginalNode(a,i),n.push(a)}var o=e.getEmitFlags(t);return 0==(4194304&o)&&(n.push(e.createEndOfDeclarationMarker(t)),e.setEmitFlags(i,4194304|o)),e.singleOrMany(n)}(n);case 207:return function(e){return C(e)}(n);case 149:return function(t){return t.dotDotDotToken?void 0:e.isBindingPattern(t.name)?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,e.getGeneratedNameForNode(t),void 0,void 0,void 0),t),t):t.initializer?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,t.name,void 0,void 0,void 0),t),t):t}(n);case 237:return function(r){var n=c;c=void 0;var a=h(16286,65),o=e.visitParameterList(r.parameters,S,t),s=64&r.transformFlags?z(r):K(r),u=16384&i?e.getLocalName(r):r.name;return v(a,49152,0),c=n,e.updateFunctionDeclaration(r,void 0,e.visitNodes(r.modifiers,S,e.isModifier),r.asteriskToken,u,void 0,o,void 0,s)}(n);case 195:return function(r){16384&r.transformFlags&&ke();var n=c;c=void 0;var i=h(16256,66),a=e.createFunctionExpression(void 0,void 0,void 0,void 0,e.visitParameterList(r.parameters,S,t),void 0,z(r));return e.setTextRange(a,r),e.setOriginalNode(a,r),e.setEmitFlags(a,8),v(i,0,0),c=n,a}(n);case 194:return function(r){var n=262144&e.getEmitFlags(r)?h(16278,69):h(16286,65),a=c;c=void 0;var o=e.visitParameterList(r.parameters,S,t),s=64&r.transformFlags?z(r):K(r),u=16384&i?e.getLocalName(r):r.name;return v(n,49152,0),c=a,e.updateFunctionExpression(r,void 0,r.asteriskToken,u,void 0,o,void 0,s)}(n);case 235:return H(n);case 71:return function(t){return c?e.isGeneratedIdentifier(t)?t:"arguments"===t.escapedText&&m.isArgumentsLocalBinding(t)?c.argumentsName||(c.argumentsName=e.createUniqueName("arguments")):t:t}(n);case 236:return function(r){if(64&r.transformFlags){3&r.flags&&De();var n=e.flatMap(r.declarations,1&r.flags?W:H),i=e.createVariableDeclarationList(n);if(e.setOriginalNode(i,r),e.setTextRange(i,r),e.setCommentRange(i,r),8388608&r.transformFlags&&(e.isBindingPattern(r.declarations[0].name)||e.isBindingPattern(e.last(r.declarations).name))){var a=e.firstOrUndefined(n);a&&e.setSourceMapRange(i,e.createRange(a.pos,e.last(n).end))}return i}return e.visitEachChild(r,S,t)}(n);case 230:return function(r){if(void 0!==c){var n=c.allowedNonLabeledJumps;c.allowedNonLabeledJumps|=2;var i=e.visitEachChild(r,S,t);return c.allowedNonLabeledJumps=n,i}return e.visitEachChild(r,S,t)}(n);case 244:return function(r){var n=h(4032,0),i=e.visitEachChild(r,S,t);return v(n,0,0),i}(n);case 216:return U(n,!1);case 227:case 226:return function(r){if(c){var n=227===r.kind?2:4,i=r.label&&c.labels&&c.labels.get(e.idText(r.label))||!r.label&&c.allowedNonLabeledJumps&n;if(!i){var a=void 0,o=r.label;o?227===r.kind?(a="break-"+o.escapedText,ue(c,!0,e.idText(o),a)):(a="continue-"+o.escapedText,ue(c,!1,e.idText(o),a)):227===r.kind?(c.nonLocalJumps|=2,a="break"):(c.nonLocalJumps|=4,a="continue");var s=e.createLiteral(a);if(c.loopOutParameters.length){for(var u=c.loopOutParameters,l=void 0,_=0;_=0,"statementOffset not initialized correctly!"));var c=!!n&&95!==e.skipOuterExpressions(n.expression).kind,u=function(t,r,n,i,a){if(!n)return r&&I(t,r),0;if(!r)return t.push(e.createReturn(N())),2;if(i)return O(t,r,N()),ke(),1;var o,s,c,u=r.body.statements;if(a0?r.push(e.setEmitFlags(e.createVariableStatement(void 0,e.createVariableDeclarationList(e.flattenDestructuringBinding(n,S,t,0,o))),1048576)):a&&r.push(e.setEmitFlags(e.createExpressionStatement(e.createAssignment(o,e.visitNode(a,S,e.isExpression))),1048576))}function w(t,r,n,i){i=e.visitNode(i,S,e.isExpression);var a=e.createIf(e.createTypeCheck(e.getSynthesizedClone(n),"undefined"),e.setEmitFlags(e.setTextRange(e.createBlock([e.createExpressionStatement(e.setEmitFlags(e.setTextRange(e.createAssignment(e.setEmitFlags(e.getMutableClone(n),48),e.setEmitFlags(i,1584|e.getEmitFlags(i))),r),1536))]),r),1953));e.startOnNewLine(a),e.setTextRange(a,r),e.setEmitFlags(a,1050528),t.push(a)}function F(t,r,n){var i=e.lastOrUndefined(r.parameters);if(function(e,t){return e&&e.dotDotDotToken&&71===e.name.kind&&!t}(i,n)){var a=e.getMutableClone(i.name);e.setEmitFlags(a,48);var o=e.getSynthesizedClone(i.name),s=r.parameters.length-1,c=e.createLoopVariable();t.push(e.setEmitFlags(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(a,void 0,e.createArrayLiteral([]))])),i),1048576));var u=e.createFor(e.setTextRange(e.createVariableDeclarationList([e.createVariableDeclaration(c,void 0,e.createLiteral(s))]),i),e.setTextRange(e.createLessThan(c,e.createPropertyAccess(e.createIdentifier("arguments"),"length")),i),e.setTextRange(e.createPostfixIncrement(c),i),e.createBlock([e.startOnNewLine(e.setTextRange(e.createExpressionStatement(e.createAssignment(e.createElementAccess(o,0===s?c:e.createSubtract(c,e.createLiteral(s))),e.createElementAccess(e.createIdentifier("arguments"),c))),i))]));e.setEmitFlags(u,1048576),e.startOnNewLine(u),t.push(u)}}function I(t,r){32768&r.transformFlags&&195!==r.kind&&O(t,r,e.createThis())}function O(t,r,n,i){ke();var a=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_this"),void 0,n)]));e.setEmitFlags(a,1050112),e.setTextRange(a,i),e.setSourceMapRange(a,r),t.push(a)}function M(t,r,n){if(16384&i){var a=void 0;switch(r.kind){case 195:return t;case 154:case 156:case 157:a=e.createVoidZero();break;case 155:a=e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor");break;case 237:case 194:a=e.createConditional(e.createLogicalAnd(e.setEmitFlags(e.createThis(),4),e.createBinary(e.setEmitFlags(e.createThis(),4),93,e.getLocalName(r))),e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor"),e.createVoidZero());break;default:return e.Debug.failBadSyntaxKind(r)}var o=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_newTarget"),void 0,a)]));if(n)return[o].concat(t);t.unshift(o)}return t}function L(t){return e.setTextRange(e.createEmptyStatement(),t)}function R(t,r,n){var a=h(0,0),o=e.getCommentRange(r),s=e.getSourceMapRange(r),c=e.createMemberAccessForPropertyName(t,e.visitNode(r.name,S,e.isPropertyName),r.name),u=J(r,r,void 0,n);e.setEmitFlags(u,1536),e.setSourceMapRange(u,s);var l=e.setTextRange(e.createExpressionStatement(e.createAssignment(c,u)),r);return e.setOriginalNode(l,r),e.setCommentRange(l,o),e.setEmitFlags(l,48),v(a,49152,49152&i?16384:0),l}function B(t,r,n){var i=e.createExpressionStatement(j(t,r,n,!1));return e.setEmitFlags(i,1536),e.setSourceMapRange(i,e.getSourceMapRange(r.firstAccessor)),i}function j(t,r,n,a){var o=r.firstAccessor,s=r.getAccessor,c=r.setAccessor,u=h(0,0),l=e.getMutableClone(t);e.setEmitFlags(l,1568),e.setSourceMapRange(l,o.name);var _=e.createExpressionForPropertyName(e.visitNode(o.name,S,e.isPropertyName));e.setEmitFlags(_,1552),e.setSourceMapRange(_,o.name);var d=[];if(s){var p=J(s,void 0,void 0,n);e.setSourceMapRange(p,e.getSourceMapRange(s)),e.setEmitFlags(p,512);var f=e.createPropertyAssignment("get",p);e.setCommentRange(f,e.getCommentRange(s)),d.push(f)}if(c){var m=J(c,void 0,void 0,n);e.setSourceMapRange(m,e.getSourceMapRange(c)),e.setEmitFlags(m,512);var g=e.createPropertyAssignment("set",m);e.setCommentRange(g,e.getCommentRange(c)),d.push(g)}d.push(e.createPropertyAssignment("enumerable",e.createTrue()),e.createPropertyAssignment("configurable",e.createTrue()));var y=e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[l,_,e.createObjectLiteral(d,!0)]);return a&&e.startOnNewLine(y),v(u,49152,49152&i?16384:0),y}function J(r,n,a,o){var s=c;c=void 0;var u=o&&e.isClassLike(o)&&!e.hasModifier(r,32)?h(16286,73):h(16286,65),l=e.visitParameterList(r.parameters,S,t),_=z(r);return 16384&i&&!a&&(237===r.kind||194===r.kind)&&(a=e.getGeneratedNameForNode(r)),v(u,49152,0),c=s,e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,r.asteriskToken,a,void 0,l,void 0,_),n),r)}function z(n){var i,a,o,s=!1,c=!1,u=[],l=[],d=n.body;if(_(),e.isBlock(d)&&(o=e.addStandardPrologue(u,d.statements,!1)),I(u,n),A(u,n),F(u,n,!1),e.isBlock(d))o=e.addCustomPrologue(u,d.statements,o,S),i=d.statements,e.addRange(l,e.visitNodes(d.statements,S,e.isStatement,o)),!s&&d.multiLine&&(s=!0);else{e.Debug.assert(195===n.kind),i=e.moveRangeEnd(d,-1);var p=n.equalsGreaterThanToken;e.nodeIsSynthesized(p)||e.nodeIsSynthesized(d)||(e.rangeEndIsOnSameLineAsRangeStart(p,d,r)?c=!0:s=!0);var f=e.visitNode(d,S,e.isExpression),m=e.createReturn(f);e.setTextRange(m,d),e.moveSyntheticComments(m,d),e.setEmitFlags(m,1440),l.push(m),a=d}var g=t.endLexicalEnvironment();e.addStatementsAfterPrologue(l,g),M(l,n,!1),(e.some(u)||e.some(g))&&(s=!0);var y=e.createBlock(e.setTextRange(e.createNodeArray(u.concat(l)),i),s);return e.setTextRange(y,n.body),!s&&c&&e.setEmitFlags(y,1),a&&e.setTokenSourceMapRange(y,18,a),e.setOriginalNode(y,n.body),y}function K(r){var n=e.visitFunctionBody(r.body,D,t);return e.updateBlock(n,e.setTextRange(e.createNodeArray(M(n.statements,r,!0)),n.statements))}function U(r,n){if(n)return e.visitEachChild(r,S,t);var a=256&i?h(4032,512):h(3904,128),o=e.visitEachChild(r,S,t);return v(a,0,0),o}function q(r,n){if(!n)switch(r.expression.kind){case 193:return e.updateParen(r,q(r.expression,!1));case 202:return e.updateParen(r,V(r.expression,!1))}return e.visitEachChild(r,S,t)}function V(r,n){return e.isDestructuringAssignment(r)?e.flattenDestructuringAssignment(r,S,t,0,n):e.visitEachChild(r,S,t)}function W(r){var n=r.name;if(e.isBindingPattern(n))return H(r);if(!r.initializer&&function(e){var t=m.getNodeCheckFlags(e),r=131072&t,n=262144&t;return!(0!=(64&i)||r&&n&&0!=(512&i))&&0==(2048&i)&&(!m.isDeclarationWithCollidingName(e)||n&&!r&&0==(3072&i))}(r)){var a=e.getMutableClone(r);return a.initializer=e.createVoidZero(),a}return e.visitEachChild(r,S,t)}function H(r){var n,i=h(32,0);return n=e.isBindingPattern(r.name)?e.flattenDestructuringBinding(r,S,t,0,void 0,0!=(32&i)):e.visitEachChild(r,S,t),v(i,0,0),n}function G(t){c.labels.set(e.idText(t.label),!0)}function X(t){c.labels.set(e.idText(t.label),!1)}function Q(r,n,a,o,s){var u=h(r,n),_=function(r,n,a){if(!ae(r)){var o=void 0;c&&(o=c.allowedNonLabeledJumps,c.allowedNonLabeledJumps=6);var s=a?a(r,n,void 0):e.restoreEnclosingLabel(e.visitEachChild(r,S,t),n,c&&X);return c&&(c.allowedNonLabeledJumps=o),s}var u,_=e.createUniqueName("_loop");switch(r.kind){case 223:case 224:case 225:var p=r.initializer;p&&236===p.kind&&(u=p)}var f=[],m=[];if(u&&3&e.getCombinedNodeFlags(u))for(var g=0,y=u.declarations;g=72&&r<=107)return e.setTextRange(e.createLiteral(t),t)}}}(s||(s={})),function(e){var t,r,n,i,a;!function(e){e[e.Nop=0]="Nop",e[e.Statement=1]="Statement",e[e.Assign=2]="Assign",e[e.Break=3]="Break",e[e.BreakWhenTrue=4]="BreakWhenTrue",e[e.BreakWhenFalse=5]="BreakWhenFalse",e[e.Yield=6]="Yield",e[e.YieldStar=7]="YieldStar",e[e.Return=8]="Return",e[e.Throw=9]="Throw",e[e.Endfinally=10]="Endfinally"}(t||(t={})),function(e){e[e.Open=0]="Open",e[e.Close=1]="Close"}(r||(r={})),function(e){e[e.Exception=0]="Exception",e[e.With=1]="With",e[e.Switch=2]="Switch",e[e.Loop=3]="Loop",e[e.Labeled=4]="Labeled"}(n||(n={})),function(e){e[e.Try=0]="Try",e[e.Catch=1]="Catch",e[e.Finally=2]="Finally",e[e.Done=3]="Done"}(i||(i={})),function(e){e[e.Next=0]="Next",e[e.Throw=1]="Throw",e[e.Return=2]="Return",e[e.Break=3]="Break",e[e.Yield=4]="Yield",e[e.YieldStar=5]="YieldStar",e[e.Catch=6]="Catch",e[e.Endfinally=7]="Endfinally"}(a||(a={})),e.transformGenerators=function(t){var r,n,i,a,s,c,u,l,_,d,p=t.resumeLexicalEnvironment,f=t.endLexicalEnvironment,m=t.hoistFunctionDeclaration,g=t.hoistVariableDeclaration,y=t.getCompilerOptions(),h=e.getEmitScriptTarget(y),v=t.getEmitResolver(),b=t.onSubstituteNode;t.onSubstituteNode=function(t,i){return i=b(t,i),1===t?function(t){return e.isIdentifier(t)?function(t){if(!e.isGeneratedIdentifier(t)&&r&&r.has(e.idText(t))){var i=e.getOriginalNode(t);if(e.isIdentifier(i)&&i.parent){var a=v.getReferencedValueDeclaration(i);if(a){var o=n[e.getOriginalNodeId(a)];if(o){var s=e.getMutableClone(o);return e.setSourceMapRange(s,t),e.setCommentRange(s,t),s}}}}return t}(t):t}(i):i};var x,S,D,k,T,C,E,N,A,P,w,F,I=1,O=0,M=0;return e.chainBundle(function(r){if(r.isDeclarationFile||0==(512&r.transformFlags))return r;var n=e.visitEachChild(r,L,t);return e.addEmitHelpers(n,t.readEmitHelpers()),n});function L(r){var n=r.transformFlags;return a?function(r){switch(r.kind){case 221:case 222:return function(r){return a?(ne(),r=e.visitEachChild(r,L,t),ae(),r):e.visitEachChild(r,L,t)}(r);case 230:return function(r){return a&&Z({kind:2,isScript:!0,breakLabel:-1}),r=e.visitEachChild(r,L,t),a&&oe(),r}(r);case 231:return function(r){return a&&Z({kind:4,isScript:!0,labelText:e.idText(r.label),breakLabel:-1}),r=e.visitEachChild(r,L,t),a&&se(),r}(r);default:return R(r)}}(r):i?R(r):256&n?function(t){switch(t.kind){case 237:return B(t);case 194:return j(t);default:return e.Debug.failBadSyntaxKind(t)}}(r):512&n?e.visitEachChild(r,L,t):r}function R(r){switch(r.kind){case 237:return B(r);case 194:return j(r);case 156:case 157:return function(r){var n=i,o=a;return i=!1,a=!1,r=e.visitEachChild(r,L,t),i=n,a=o,r}(r);case 217:return function(t){if(16777216&t.transformFlags)V(t.declarationList);else{if(1048576&e.getEmitFlags(t))return t;for(var r=0,n=t.declarationList.declarations;r0?e.inlineExpressions(e.map(c,W)):void 0,e.visitNode(r.condition,L,e.isExpression),e.visitNode(r.incrementor,L,e.isExpression),e.visitNode(r.statement,L,e.isStatement,e.liftToBlock))}else r=e.visitEachChild(r,L,t);return a&&ae(),r}(r);case 224:return function(r){a&&ne();var n=r.initializer;if(e.isVariableDeclarationList(n)){for(var i=0,o=n.declarations;i0)return ge(n,r)}return e.visitEachChild(r,L,t)}(r);case 226:return function(r){if(a){var n=pe(r.label&&e.idText(r.label));if(n>0)return ge(n,r)}return e.visitEachChild(r,L,t)}(r);case 228:return function(t){return r=e.visitNode(t.expression,L,e.isExpression),n=t,e.setTextRange(e.createReturn(e.createArrayLiteral(r?[me(2),r]:[me(2)])),n);var r,n}(r);default:return 16777216&r.transformFlags?function(r){switch(r.kind){case 202:return function(r){var n=e.getExpressionAssociativity(r);switch(n){case 0:return function(r){if(H(r.right)){if(e.isLogicalOperator(r.operatorToken.kind))return function(t){var r=Y(),n=Q();return ve(n,e.visitNode(t.left,L,e.isExpression),t.left),53===t.operatorToken.kind?Se(r,n,t.left):xe(r,n,t.left),ve(n,e.visitNode(t.right,L,e.isExpression),t.right),$(r),n}(r);if(26===r.operatorToken.kind)return function(t){var r=[];return n(t.left),n(t.right),e.inlineExpressions(r);function n(t){e.isBinaryExpression(t)&&26===t.operatorToken.kind?(n(t.left),n(t.right)):(H(t)&&r.length>0&&(De(1,[e.createExpressionStatement(e.inlineExpressions(r))]),r=[]),r.push(e.visitNode(t,L,e.isExpression)))}}(r);var n=e.getMutableClone(r);return n.left=X(e.visitNode(r.left,L,e.isExpression)),n.right=e.visitNode(r.right,L,e.isExpression),n}return e.visitEachChild(r,L,t)}(r);case 1:return function(r){var n,i=r.left,a=r.right;if(H(a)){var o=void 0;switch(i.kind){case 187:o=e.updatePropertyAccess(i,X(e.visitNode(i.expression,L,e.isLeftHandSideExpression)),i.name);break;case 188:o=e.updateElementAccess(i,X(e.visitNode(i.expression,L,e.isLeftHandSideExpression)),X(e.visitNode(i.argumentExpression,L,e.isExpression)));break;default:o=e.visitNode(i,L,e.isExpression)}var s=r.operatorToken.kind;return(n=s)>=59&&n<=70?e.setTextRange(e.createAssignment(o,e.setTextRange(e.createBinary(X(o),function(e){switch(e){case 59:return 37;case 60:return 38;case 61:return 39;case 62:return 40;case 63:return 41;case 64:return 42;case 65:return 45;case 66:return 46;case 67:return 47;case 68:return 48;case 69:return 49;case 70:return 50}}(s),e.visitNode(a,L,e.isExpression)),r)),r):e.updateBinary(r,o,e.visitNode(a,L,e.isExpression))}return e.visitEachChild(r,L,t)}(r);default:return e.Debug.assertNever(n)}}(r);case 203:return function(r){if(H(r.whenTrue)||H(r.whenFalse)){var n=Y(),i=Y(),a=Q();return Se(n,e.visitNode(r.condition,L,e.isExpression),r.condition),ve(a,e.visitNode(r.whenTrue,L,e.isExpression),r.whenTrue),be(i),$(n),ve(a,e.visitNode(r.whenFalse,L,e.isExpression),r.whenFalse),$(i),a}return e.visitEachChild(r,L,t)}(r);case 205:return function(r){var n,i=Y(),a=e.visitNode(r.expression,L,e.isExpression);if(r.asteriskToken){var o=0==(8388608&e.getEmitFlags(r.expression))?e.createValuesHelper(t,a,r):a;!function(e,t){De(7,[e],t)}(o,r)}else!function(e,t){De(6,[e],t)}(a,r);return $(i),n=r,e.setTextRange(e.createCall(e.createPropertyAccess(k,"sent"),void 0,[]),n)}(r);case 185:return function(e){return z(e.elements,void 0,void 0,e.multiLine)}(r);case 186:return function(t){var r=t.properties,n=t.multiLine,i=G(r),a=Q();ve(a,e.createObjectLiteral(e.visitNodes(r,L,e.isObjectLiteralElementLike,0,i),n));var o=e.reduceLeft(r,function(r,i){H(i)&&r.length>0&&(he(e.createExpressionStatement(e.inlineExpressions(r))),r=[]);var o=e.createExpressionForObjectLiteralElementLike(t,i,a),s=e.visitNode(o,L,e.isExpression);return s&&(n&&e.startOnNewLine(s),r.push(s)),r},[],i);return o.push(n?e.startOnNewLine(e.getMutableClone(a)):a),e.inlineExpressions(o)}(r);case 188:return function(r){if(H(r.argumentExpression)){var n=e.getMutableClone(r);return n.expression=X(e.visitNode(r.expression,L,e.isLeftHandSideExpression)),n.argumentExpression=e.visitNode(r.argumentExpression,L,e.isExpression),n}return e.visitEachChild(r,L,t)}(r);case 189:return function(r){if(!e.isImportCall(r)&&e.forEach(r.arguments,H)){var n=e.createCallBinding(r.expression,g,h,!0),i=n.target,a=n.thisArg;return e.setOriginalNode(e.createFunctionApply(X(e.visitNode(i,L,e.isLeftHandSideExpression)),a,z(r.arguments),r),r)}return e.visitEachChild(r,L,t)}(r);case 190:return function(r){if(e.forEach(r.arguments,H)){var n=e.createCallBinding(e.createPropertyAccess(r.expression,"bind"),g),i=n.target,a=n.thisArg;return e.setOriginalNode(e.setTextRange(e.createNew(e.createFunctionApply(X(e.visitNode(i,L,e.isExpression)),a,z(r.arguments,e.createVoidZero())),void 0,[]),r),r)}return e.visitEachChild(r,L,t)}(r);default:return e.visitEachChild(r,L,t)}}(r):33554944&r.transformFlags?e.visitEachChild(r,L,t):r}}function B(r){if(r.asteriskToken)r=e.setOriginalNode(e.setTextRange(e.createFunctionDeclaration(void 0,r.modifiers,void 0,r.name,void 0,e.visitParameterList(r.parameters,L,t),void 0,J(r.body)),r),r);else{var n=i,o=a;i=!1,a=!1,r=e.visitEachChild(r,L,t),i=n,a=o}return i?void m(r):r}function j(r){if(r.asteriskToken)r=e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,void 0,r.name,void 0,e.visitParameterList(r.parameters,L,t),void 0,J(r.body)),r),r);else{var n=i,o=a;i=!1,a=!1,r=e.visitEachChild(r,L,t),i=n,a=o}return r}function J(t){var r=[],n=i,o=a,m=s,g=c,y=u,h=l,v=_,b=d,T=I,C=x,E=S,N=D,A=k;i=!0,a=!1,s=void 0,c=void 0,u=void 0,l=void 0,_=void 0,d=void 0,I=1,x=void 0,S=void 0,D=void 0,k=e.createTempVariable(void 0),p();var P=e.addPrologue(r,t.statements,!1,L);K(t.statements,P);var w=ke();return e.addStatementsAfterPrologue(r,f()),r.push(e.createReturn(w)),i=n,a=o,s=m,c=g,u=y,l=h,_=v,d=b,I=T,x=C,S=E,D=N,k=A,e.setTextRange(e.createBlock(r,t.multiLine),t)}function z(t,r,n,i){var a,o=G(t);if(o>0){a=Q();var s=e.visitNodes(t,L,e.isExpression,0,o);ve(a,e.createArrayLiteral(r?[r].concat(s):s)),r=void 0}var c=e.reduceLeft(t,function(t,n){if(H(n)&&t.length>0){var o=void 0!==a;a||(a=Q()),ve(a,o?e.createArrayConcat(a,[e.createArrayLiteral(t,i)]):e.createArrayLiteral(r?[r].concat(t):t,i)),r=void 0,t=[]}return t.push(e.visitNode(n,L,e.isExpression)),t},[],o);return a?e.createArrayConcat(a,[e.createArrayLiteral(c,i)]):e.setTextRange(e.createArrayLiteral(r?[r].concat(c):c,i),n)}function K(e,t){void 0===t&&(t=0);for(var r=e.length,n=t;n0?be(r,t):he(t)}(i);case 227:return function(t){var r=de(t.label?e.idText(t.label):void 0);r>0?be(r,t):he(t)}(i);case 228:return function(t){De(8,[e.visitNode(t.expression,L,e.isExpression)],t)}(i);case 229:return function(t){var r,n,i;H(t)?(r=X(e.visitNode(t.expression,L,e.isExpression)),n=Y(),i=Y(),$(n),Z({kind:1,expression:r,startLabel:n,endLabel:i}),U(t.statement),e.Debug.assert(1===re()),$(ee().endLabel)):he(e.visitNode(t,L,e.isStatement))}(i);case 230:return function(t){if(H(t.caseBlock)){for(var r=t.caseBlock,n=r.clauses.length,i=(Z({kind:2,isScript:!1,breakLabel:p=Y()}),p),a=X(e.visitNode(t.expression,L,e.isExpression)),o=[],s=-1,c=0;c0)break;_.push(e.createCaseClause(e.visitNode(u.expression,L,e.isExpression),[ge(o[c],u.expression)]))}else d++}_.length&&(he(e.createSwitch(a,e.createCaseBlock(_))),l+=_.length,_=[]),d>0&&(l+=d,d=0)}be(s>=0?o[s]:i);for(var c=0;c0);l++)u.push(W(i));u.length&&(he(e.createExpressionStatement(e.inlineExpressions(u))),c+=u.length,u=[])}}function W(t){return e.setSourceMapRange(e.createAssignment(e.setSourceMapRange(e.getSynthesizedClone(t.name),t.name),e.visitNode(t.initializer,L,e.isExpression)),t)}function H(e){return!!e&&0!=(16777216&e.transformFlags)}function G(e){for(var t=e.length,r=0;r=0;r--){var n=l[r];if(!ue(n))break;if(n.labelText===e)return!0}return!1}function de(e){if(l)if(e)for(var t=l.length-1;t>=0;t--){if(ue(r=l[t])&&r.labelText===e)return r.breakLabel;if(ce(r)&&_e(e,t-1))return r.breakLabel}else for(t=l.length-1;t>=0;t--){var r;if(ce(r=l[t]))return r.breakLabel}return 0}function pe(e){if(l)if(e){for(var t=l.length-1;t>=0;t--)if(le(r=l[t])&&_e(e,t-1))return r.continueLabel}else for(t=l.length-1;t>=0;t--){var r;if(le(r=l[t]))return r.continueLabel}return 0}function fe(t){if(void 0!==t&&t>0){void 0===d&&(d=[]);var r=e.createLiteral(-1);return void 0===d[t]?d[t]=[r]:d[t].push(r),r}return e.createOmittedExpression()}function me(t){var r=e.createLiteral(t);return e.addSyntheticTrailingComment(r,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(t)),r}function ge(t,r){return e.Debug.assertLessThan(0,t,"Invalid label"),e.setTextRange(e.createReturn(e.createArrayLiteral([me(3),fe(t)])),r)}function ye(){De(0)}function he(e){e?De(1,[e]):ye()}function ve(e,t,r){De(2,[e,t],r)}function be(e,t){De(3,[e],t)}function xe(e,t,r){De(4,[e,t],r)}function Se(e,t,r){De(5,[e,t],r)}function De(e,t,r){void 0===x&&(x=[],S=[],D=[]),void 0===_&&$(Y());var n=x.length;x[n]=e,S[n]=t,D[n]=r}function ke(){O=0,M=0,T=void 0,C=!1,E=!1,N=void 0,A=void 0,P=void 0,w=void 0,F=void 0;var r=function(){if(x){for(var t=0;t0)),524288))}function Te(e){(function(e){if(!E)return!0;if(!_||!d)return!1;for(var t=0;t<_.length;t++)if(_[t]===e&&d[t])return!0;return!1})(e)&&(Ee(e),F=void 0,Pe(void 0,void 0)),A&&N&&Ce(!1),function(){if(void 0!==d&&void 0!==T)for(var e=0;e=0;r--){var n=F[r];A=[e.createWith(n.expression,e.createBlock(A))]}if(w){var i=w.startLabel,a=w.catchLabel,o=w.finallyLabel,s=w.endLabel;A.unshift(e.createExpressionStatement(e.createCall(e.createPropertyAccess(e.createPropertyAccess(k,"trys"),"push"),void 0,[e.createArrayLiteral([fe(i),fe(a),fe(o),fe(s)])]))),w=void 0}t&&A.push(e.createExpressionStatement(e.createAssignment(e.createPropertyAccess(k,"label"),e.createLiteral(M+1))))}N.push(e.createCaseClause(e.createLiteral(M),A||[])),A=void 0}function Ee(e){if(_)for(var t=0;t<_.length;t++)_[t]===e&&(A&&(Ce(!C),C=!1,E=!1,M++),void 0===T&&(T=[]),void 0===T[M]?T[M]=[t]:T[M].push(t))}function Ne(t){if(Ee(t),function(e){if(s)for(;O 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };'}}(s||(s={})),function(e){e.transformModule=function(a){var o=a.startLexicalEnvironment,s=a.endLexicalEnvironment,c=a.hoistVariableDeclaration,u=a.getCompilerOptions(),l=a.getEmitResolver(),_=a.getEmitHost(),d=e.getEmitScriptTarget(u),p=e.getEmitModuleKind(u),f=a.onSubstituteNode,m=a.onEmitNode;a.onSubstituteNode=function(t,r){return(r=f(t,r)).id&&h[r.id]?r:1===t?function(t){switch(t.kind){case 71:return X(t);case 202:return function(t){if(e.isAssignmentOperator(t.operatorToken.kind)&&e.isIdentifier(t.left)&&!e.isGeneratedIdentifier(t.left)&&!e.isLocalName(t.left)&&!e.isDeclarationNameOfEnumOrNamespace(t.left)){var r=Q(t.left);if(r){for(var n=t,i=0,a=r;i=2?2:0)),t))}else n&&e.isDefaultImport(t)&&(r=e.append(r,e.createVariableStatement(void 0,e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(e.getSynthesizedClone(n.name),void 0,e.getGeneratedNameForNode(t)),t)],d>=2?2:0))));if(B(t)){var a=e.getOriginalNodeId(t);x[a]=j(x[a],t)}else r=j(r,t);return e.singleOrMany(r)}(t);case 246:return function(t){var r;if(e.Debug.assert(e.isExternalModuleImportEqualsDeclaration(t),"import= for internal module references should be handled in an earlier transformer."),p!==e.ModuleKind.AMD?r=e.hasModifier(t,1)?e.append(r,e.setTextRange(e.createExpressionStatement(H(t.name,M(t))),t)):e.append(r,e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedClone(t.name),void 0,M(t))],d>=2?2:0)),t)):e.hasModifier(t,1)&&(r=e.append(r,e.setTextRange(e.createExpressionStatement(H(e.getExportName(t),e.getLocalName(t))),t))),B(t)){var n=e.getOriginalNodeId(t);x[n]=J(x[n],t)}else r=J(r,t);return e.singleOrMany(r)}(t);case 253:return function(t){if(t.moduleSpecifier){var r=e.getGeneratedNameForNode(t);if(t.exportClause){var n=[];p!==e.ModuleKind.AMD&&n.push(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,M(t))])),t));for(var i=0,o=t.exportClause.elements;i(e.isExportName(r)?1:0);return!1}(t.left)?e.flattenDestructuringAssignment(t,w,a,0,!1,L):e.visitEachChild(t,w,a)}(t):e.visitEachChild(t,w,a):t}function F(t,r){var i,o=e.createUniqueName("resolve"),s=e.createUniqueName("reject"),c=[e.createParameter(void 0,void 0,void 0,o),e.createParameter(void 0,void 0,void 0,s)],l=e.createBlock([e.createExpressionStatement(e.createCall(e.createIdentifier("require"),void 0,[e.createArrayLiteral([t||e.createOmittedExpression()]),o,s]))]);d>=2?i=e.createArrowFunction(void 0,void 0,c,void 0,void 0,l):(i=e.createFunctionExpression(void 0,void 0,void 0,void 0,c,void 0,l),r&&e.setEmitFlags(i,8));var _=e.createNew(e.createIdentifier("Promise"),void 0,[i]);return u.esModuleInterop?(a.requestEmitHelper(n),e.createCall(e.createPropertyAccess(_,e.createIdentifier("then")),void 0,[e.getHelperName("__importStar")])):_}function I(t,r){var i,o=e.createCall(e.createPropertyAccess(e.createIdentifier("Promise"),"resolve"),void 0,[]),s=e.createCall(e.createIdentifier("require"),void 0,t?[t]:[]);return u.esModuleInterop&&(a.requestEmitHelper(n),s=e.createCall(e.getHelperName("__importStar"),void 0,[s])),d>=2?i=e.createArrowFunction(void 0,void 0,[],void 0,void 0,s):(i=e.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,e.createBlock([e.createReturn(s)])),r&&e.setEmitFlags(i,8)),e.createCall(e.createPropertyAccess(o,"then"),void 0,[i])}function O(t,r){return!u.esModuleInterop||67108864&e.getEmitFlags(t)?r:e.getImportNeedsImportStarHelper(t)?(a.requestEmitHelper(n),e.createCall(e.getHelperName("__importStar"),void 0,[r])):e.getImportNeedsImportDefaultHelper(t)?(a.requestEmitHelper(i),e.createCall(e.getHelperName("__importDefault"),void 0,[r])):r}function M(t){var r=e.getExternalModuleNameLiteral(t,g,_,l,u),n=[];return r&&n.push(r),e.createCall(e.createIdentifier("require"),void 0,n)}function L(t,r,n){var i=Q(t);if(i){for(var a=e.isExportName(t)?r:e.createAssignment(t,r),o=0,s=i;o1){var i=n.slice(1),a=e.guessIndentation(i);r=[n[0]].concat(e.map(i,function(e){return e.slice(a)})).join(T)}e.addSyntheticLeadingComment(o,t.kind,r,t.hasTrailingNewLine)}},u=0,l=s;u0?e.parameters[0].type:void 0}e.transformDeclarations=r}(s||(s={})),function(e){var t,r;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initialized=1]="Initialized",e[e.Completed=2]="Completed",e[e.Disposed=3]="Disposed"}(t||(t={})),function(e){e[e.Substitution=1]="Substitution",e[e.EmitNotifications=2]="EmitNotifications"}(r||(r={})),e.getTransformers=function(t,r){var n=t.jsx,i=e.getEmitScriptTarget(t),a=e.getEmitModuleKind(t),o=[];return e.addRange(o,r&&r.before),o.push(e.transformTypeScript),2===n&&o.push(e.transformJsx),i<6&&o.push(e.transformESNext),i<4&&o.push(e.transformES2017),i<3&&o.push(e.transformES2016),i<2&&(o.push(e.transformES2015),o.push(e.transformGenerators)),o.push(function(t){switch(t){case e.ModuleKind.ESNext:case e.ModuleKind.ES2015:return e.transformES2015Module;case e.ModuleKind.System:return e.transformSystemModule;default:return e.transformModule}}(a)),i<1&&o.push(e.transformES5),e.addRange(o,r&&r.after),o},e.transformNodes=function(t,r,n,i,a,o){for(var s,c,u,l=new Array(309),_=[],d=[],p=0,f=!1,m=function(e,t){return t},g=function(e,t,r){return r(e,t)},y=0,h=[],v={getCompilerOptions:function(){return n},getEmitResolver:function(){return t},getEmitHost:function(){return r},startLexicalEnvironment:function(){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!f,"Lexical environment is suspended."),_[p]=s,d[p]=c,p++,s=void 0,c=void 0},suspendLexicalEnvironment:function(){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!f,"Lexical environment is already suspended."),f=!0},resumeLexicalEnvironment:function(){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(f,"Lexical environment is not suspended."),f=!1},endLexicalEnvironment:function(){var t;if(e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!f,"Lexical environment is suspended."),(s||c)&&(c&&(t=c.slice()),s)){var r=e.createVariableStatement(void 0,e.createVariableDeclarationList(s));t?t.push(r):t=[r]}return s=_[--p],c=d[p],0===p&&(_=[],d=[]),t},hoistVariableDeclaration:function(t){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed.");var r=e.setEmitFlags(e.createVariableDeclaration(t),64);s?s.push(r):s=[r]},hoistFunctionDeclaration:function(t){e.Debug.assert(y>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(y<2,"Cannot modify the lexical environment after transformation has completed."),c?c.push(t):c=[t]},requestEmitHelper:function(t){e.Debug.assert(y>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(y<2,"Cannot modify the transformation context after transformation has completed."),e.Debug.assert(!t.scoped,"Cannot request a scoped emit helper."),u=e.append(u,t)},readEmitHelpers:function(){e.Debug.assert(y>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(y<2,"Cannot modify the transformation context after transformation has completed.");var t=u;return u=void 0,t},enableSubstitution:function(t){e.Debug.assert(y<2,"Cannot modify the transformation context after transformation has completed."),l[t]|=1},enableEmitNotification:function(t){e.Debug.assert(y<2,"Cannot modify the transformation context after transformation has completed."),l[t]|=2},isSubstitutionEnabled:T,isEmitNotificationEnabled:C,get onSubstituteNode(){return m},set onSubstituteNode(t){e.Debug.assert(y<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),m=t},get onEmitNode(){return g},set onEmitNode(t){e.Debug.assert(y<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),g=t},addDiagnostic:function(e){h.push(e)}},b=0,x=i;b=0&&S(v(V)),H&&k(G),64&K?(h=!0,c(t,a),h=!1):c(t,a),H&&k(H),304!==a.kind&&0==(32&K)&&W>=0&&S(W),H&&k(G)}},emitTokenWithSourceMap:function(t,r,n,i,a){if(h||e.isInJsonFile(t))return a(r,n,i);var o=t&&t.emitNode,s=o&&o.flags||0,c=o&&o.tokenSourceMapRanges&&o.tokenSourceMapRanges[r];return i=v(c?c.pos:i),0==(128&s)&&i>=0&&S(i),i=a(r,n,i),c&&(i=c.end),0==(256&s)&&i>=0&&S(i),i},getText:C,getSourceMappingURL:function(){if(!h&&!D(s)){if(o.inlineSourceMap){var t=e.base64encode(e.sys,C());return m.jsSourceMappingURL="data:application/json;base64,"+t}return m.jsSourceMappingURL}}};function v(t){return s.skipTrivia?s.skipTrivia(t):e.skipTrivia(c,t)}function b(){h||(g&&g.push(m),s=void 0,u=void 0,l=void 0,_=void 0,d=void 0,f=void 0,m=void 0,g=void 0)}function x(){if(_&&_!==d){e.Debug.assert(_.emittedColumn>=0,"lastEncodedSourceMapSpan.emittedColumn was negative"),e.Debug.assert(_.sourceIndex>=0,"lastEncodedSourceMapSpan.sourceIndex was negative"),e.Debug.assert(_.sourceLine>=0,"lastEncodedSourceMapSpan.sourceLine was negative"),e.Debug.assert(_.sourceColumn>=0,"lastEncodedSourceMapSpan.sourceColumn was negative");var t=d.emittedColumn;if(d.emittedLine===_.emittedLine)m.sourceMapMappings&&(m.sourceMapMappings+=",");else{for(var r=d.emittedLine;r<_.emittedLine;r++)m.sourceMapMappings+=";";t=0}m.sourceMapMappings+=a(_.emittedColumn-t),m.sourceMapMappings+=a(_.sourceIndex-d.sourceIndex),m.sourceMapMappings+=a(_.sourceLine-d.sourceLine),m.sourceMapMappings+=a(_.sourceColumn-d.sourceColumn),_.nameIndex>=0&&(e.Debug.assert(!1,"We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this"),m.sourceMapMappings+=a(_.nameIndex-f),f=_.nameIndex),d=_}}function S(t){if(!(h||e.positionIsSynthesized(t)||D(s))){y&&e.performance.mark("beforeSourcemap");var r=e.getLineAndCharacterOfPosition(s,t),n=i.getLine(),a=i.getColumn();!_||_.emittedLine!==n||_.emittedColumn!==a||_.sourceIndex===l&&(_.sourceLine>r.line||_.sourceLine===r.line&&_.sourceColumn>r.character)?(x(),_={emittedLine:n,emittedColumn:a,sourceLine:r.line,sourceColumn:r.character,sourceIndex:l}):(_.sourceLine=r.line,_.sourceColumn=r.character,_.sourceIndex=l),y&&(e.performance.mark("afterSourcemap"),e.performance.measure("Source Map","beforeSourcemap","afterSourcemap"))}}function D(t){return e.fileExtensionIs(t.fileName,".json")}function k(e){h||(c=(s=e).text,D(e)||T(e.fileName,e.text))}function T(t,n,i){if(!i){var a=o.sourceRoot?r.getCommonSourceDirectory():u;i=e.getRelativePathToDirectoryOrUrl(a,t,r.getCurrentDirectory(),r.getCanonicalFileName,!0)}-1===(l=m.sourceMapSources.indexOf(i))&&(l=m.sourceMapSources.length,m.sourceMapSources.push(i),m.inputSourceFileNames.push(t),o.inlineSources&&m.sourceMapSourcesContent.push(n))}function C(){if(!h&&!D(s))return x(),JSON.stringify({version:3,file:m.sourceMapFile,sourceRoot:m.sourceMapSourceRoot,sources:m.sourceMapSources,names:m.sourceMapNames,mappings:m.sourceMapMappings,sourcesContent:m.sourceMapSourcesContent})}};var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function i(e){if(e<64)return r.charAt(e);throw TypeError(e+": not a 64 based value")}function a(e){e<0?e=1+(-e<<1):e<<=1;var t="";do{var r=31&e;(e>>=5)>0&&(r|=32),t+=i(r)}while(e>0);return t}}(s||(s={})),function(e){e.createCommentWriter=function(t,r){var n,i,a,o,s,c=t.extendedDiagnostics,u=e.getNewLineCharacter(t),l=-1,_=-1,d=-1,p=!1,f=!!t.removeComments;return{reset:function(){i=void 0,a=void 0,o=void 0,s=void 0},setWriter:function(e){n=e},setSourceFile:function(t){a=(i=t).text,o=e.getLineStarts(i),s=void 0},emitNodeWithComments:function(t,r,n){if(f)n(t,r);else if(r){p=!1;var i=r.emitNode,a=i&&i.flags||0,o=i&&i.commentRange||r,s=o.pos,u=o.end;if(s<0&&u<0||s===u)m(t,r,i,a,n);else{c&&e.performance.mark("preEmitNodeWithComment");var g=304!==r.kind,y=s<0||0!=(512&a)||10===r.kind,h=u<0||0!=(1024&a)||10===r.kind;y||v(s,g);var b=l,x=_,S=d;y||(l=s),h||(_=u,236===r.kind&&(d=u)),c&&e.performance.measure("commentTime","preEmitNodeWithComment"),m(t,r,i,a,n),c&&e.performance.mark("postEmitNodeWithComment"),l=b,_=x,d=S,!h&&g&&function(e){C(e,D)}(u),c&&e.performance.measure("commentTime","postEmitNodeWithComment")}}},emitBodyWithDetachedComments:function(t,r,i){c&&e.performance.mark("preEmitBodyWithDetachedComments");var l,_,d=r.pos,m=r.end,g=e.getEmitFlags(t),y=f||m<0||0!=(1024&g);d<0||0!=(512&g)||(l=r,(_=e.emitDetachedComments(a,o,n,E,l,u,f))&&(s?s.push(_):s=[_])),c&&e.performance.measure("commentTime","preEmitBodyWithDetachedComments"),2048&g&&!f?(f=!0,i(t),f=!1):i(t),c&&e.performance.mark("beginEmitBodyWithDetachedCommetns"),y||(v(r.end,!0),p&&!n.isAtStartOfLine()&&n.writeLine()),c&&e.performance.measure("commentTime","beginEmitBodyWithDetachedCommetns")},emitTrailingCommentsOfPosition:function(t,r){f||(c&&e.performance.mark("beforeEmitTrailingCommentsOfPosition"),C(t,r?D:k),c&&e.performance.measure("commentTime","beforeEmitTrailingCommentsOfPosition"))},emitLeadingCommentsOfPosition:function(e){f||-1===e||v(e,!0)}};function m(t,r,n,i,a){var o=n&&n.leadingComments;e.some(o)&&(c&&e.performance.mark("preEmitNodeWithSynthesizedComments"),e.forEach(o,g),c&&e.performance.measure("commentTime","preEmitNodeWithSynthesizedComments")),function(e,t,r,n){2048&r?(f=!0,n(e,t),f=!1):n(e,t)}(t,r,i,a);var s=n&&n.trailingComments;e.some(s)&&(c&&e.performance.mark("postEmitNodeWithSynthesizedComments"),e.forEach(s,y),c&&e.performance.measure("commentTime","postEmitNodeWithSynthesizedComments"))}function g(e){2===e.kind&&n.writeLine(),h(e),e.hasTrailingNewLine||2===e.kind?n.writeLine():n.write(" ")}function y(e){n.isAtStartOfLine()||n.write(" "),h(e),e.hasTrailingNewLine&&n.writeLine()}function h(t){var r=function(e){return 3===e.kind?"/*"+e.text+"*/":"//"+e.text}(t),i=3===t.kind?e.computeLineStarts(r):void 0;e.writeCommentRange(r,i,n,0,r.length,u)}function v(e,t){p=!1,t?T(e,S):0===e&&T(e,b)}function b(t,r,n,i,o){(function(t,r){return e.isRecognizedTripleSlashComment(a,t,r)})(t,r)&&S(t,r,n,i,o)}function x(r,n){return!t.onlyPrintJsDocStyle||e.isJSDocLikeText(r,n)||e.isPinnedComment(r,n)}function S(t,i,s,c,l){x(a,t)&&(p||(e.emitNewLineBeforeLeadingCommentOfPosition(o,n,l,t),p=!0),r&&r(t),e.writeCommentRange(a,o,n,t,i,u),r&&r(i),c?n.writeLine():3===s&&n.write(" "))}function D(t,i,s,c){x(a,t)&&(n.isAtStartOfLine()||n.write(" "),r&&r(t),e.writeCommentRange(a,o,n,t,i,u),r&&r(i),c&&n.writeLine())}function k(t,i,s,c){r&&r(t),e.writeCommentRange(a,o,n,t,i,u),r&&r(i),c?n.writeLine():n.write(" ")}function T(t,r){-1!==l&&t===l||(function(t){return void 0!==s&&e.last(s).nodePos===t}(t)?function(t){var r=e.last(s).detachedCommentEndPos;s.length-1?s.pop():s=void 0,e.forEachLeadingCommentRange(a,r,t,r)}(r):e.forEachLeadingCommentRange(a,t,r,t))}function C(t,r){(-1===_||t!==_&&t!==d)&&e.forEachTrailingCommentRange(a,t,r)}function E(t,n,i,o,s,c){x(a,o)&&(r&&r(o),e.writeCommentRange(t,n,i,o,s,c),r&&r(s))}}}(s||(s={})),function(e){var t,r,i=".tsbundleinfo",a=function(){var e=[];return e[512]=["{","}"],e[1024]=["(",")"],e[2048]=["<",">"],e[4096]=["[","]"],e}();function o(t,r,n,i){void 0===i&&(i=!1);var a=e.isArray(n)?n:e.getSourceFilesToEmit(t,n),o=t.getCompilerOptions();if(o.outFile||o.out){if(a.length){var c=e.createBundle(a,t.getPrependNodes());if(_=r(s(c,t,i),c))return _}}else for(var u=0,l=a;u"),tt(),Y(e.type),Dt(e)}(i);case 287:return function(e){w("function"),Ue(e,e.parameters),w(":"),Y(e.type)}(i);case 164:return function(e){St(e),$e("new"),tt(),Ke(e,e.typeParameters),Ue(e,e.parameters),tt(),Qe("=>"),tt(),Y(e.type),Dt(e)}(i);case 165:return function(e){$e("typeof"),tt(),Y(e.exprName)}(i);case 166:return function(t){Qe("{");var r=1&e.getEmitFlags(t)?384:16449;Ve(t,t.members,262144|r),Qe("}")}(i);case 167:return function(e){Y(e.elementType),Qe("["),Qe("]")}(i);case 168:return function(e){Qe("["),Ve(e,e.elementTypes,272),Qe("]")}(i);case 169:return function(e){Y(e.type),w("?")}(i);case 171:return function(e){Ve(e,e.types,260)}(i);case 172:return function(e){Ve(e,e.types,264)}(i);case 173:return function(e){Y(e.checkType),tt(),$e("extends"),tt(),Y(e.extendsType),tt(),Qe("?"),tt(),Y(e.trueType),tt(),Qe(":"),tt(),Y(e.falseType)}(i);case 174:return function(e){$e("infer"),tt(),Y(e.typeParameter)}(i);case 175:return function(e){Qe("("),Y(e.type),Qe(")")}(i);case 209:return function(e){Z(e.expression),ze(e,e.typeArguments)}(i);case 176:return void $e("this");case 177:return function(e){ct(e.operator,$e),tt(),Y(e.type)}(i);case 178:return function(e){Y(e.objectType),Qe("["),Y(e.indexType),Qe("]")}(i);case 179:return function(t){var r=e.getEmitFlags(t);Qe("{"),1&r?tt():(nt(),it());t.readonlyToken&&(Y(t.readonlyToken),132!==t.readonlyToken.kind&&$e("readonly"),tt());Qe("["),ee(0,3)(3,t.typeParameter),Qe("]"),t.questionToken&&(Y(t.questionToken),55!==t.questionToken.kind&&Qe("?"));Qe(":"),tt(),Y(t.type),I(),1&r?tt():(nt(),at());Qe("}")}(i);case 180:return function(e){Z(e.literal)}(i);case 181:return function(e){e.isTypeOf&&($e("typeof"),tt());$e("import"),Qe("("),Y(e.argument),Qe(")"),e.qualifier&&(Qe("."),Y(e.qualifier));ze(e,e.typeArguments)}(i);case 282:return void w("*");case 283:return void w("?");case 284:return function(e){w("?"),Y(e.type)}(i);case 285:return function(e){w("!"),Y(e.type)}(i);case 286:return function(e){Y(e.type),w("=")}(i);case 170:case 288:return function(e){w("..."),Y(e.type)}(i);case 182:return function(e){Qe("{"),Ve(e,e.elements,262576),Qe("}")}(i);case 183:return function(e){Qe("["),Ve(e,e.elements,262448),Qe("]")}(i);case 184:return function(e){Y(e.dotDotDotToken),e.propertyName&&(Y(e.propertyName),Qe(":"),tt());Y(e.name),Le(e.initializer,e.name.end,e)}(i);case 214:return function(e){Z(e.expression),Y(e.literal)}(i);case 215:return void I();case 216:return function(e){de(e,!e.multiLine&&ht(e))}(i);case 217:return function(e){Oe(e,e.modifiers),Y(e.declarationList),I()}(i);case 218:return void I();case 219:return function(t){Z(t.expression),e.isJsonSourceFile(n)||I()}(i);case 220:return function(e){var t=me(90,e.pos,$e,e);tt(),me(19,t,Qe,e),Z(e.expression),me(20,e.expression.end,Qe,e),je(e,e.thenStatement),e.elseStatement&&(ut(e),me(82,e.thenStatement.end,$e,e),220===e.elseStatement.kind?(tt(),Y(e.elseStatement)):je(e,e.elseStatement))}(i);case 221:return function(t){me(81,t.pos,$e,t),je(t,t.statement),e.isBlock(t.statement)?tt():ut(t);pe(t,t.statement.end),Qe(";")}(i);case 222:return function(e){pe(e,e.pos),je(e,e.statement)}(i);case 223:return function(e){var t=me(88,e.pos,$e,e);tt();var r=me(19,t,Qe,e);fe(e.initializer),r=me(25,e.initializer?e.initializer.end:r,I,e),Be(e.condition),r=me(25,e.condition?e.condition.end:r,I,e),Be(e.incrementor),me(20,e.incrementor?e.incrementor.end:r,Qe,e),je(e,e.statement)}(i);case 224:return function(e){var t=me(88,e.pos,$e,e);tt(),me(19,t,Qe,e),fe(e.initializer),tt(),me(92,e.initializer.end,$e,e),tt(),Z(e.expression),me(20,e.expression.end,Qe,e),je(e,e.statement)}(i);case 225:return function(e){var t=me(88,e.pos,$e,e);tt(),function(e){e&&(Y(e),tt())}(e.awaitModifier),me(19,t,Qe,e),fe(e.initializer),tt(),me(145,e.initializer.end,$e,e),tt(),Z(e.expression),me(20,e.expression.end,Qe,e),je(e,e.statement)}(i);case 226:return function(e){me(77,e.pos,$e,e),Re(e.label),I()}(i);case 227:return function(e){me(72,e.pos,$e,e),Re(e.label),I()}(i);case 228:return function(e){me(96,e.pos,$e,e),Be(e.expression),I()}(i);case 229:return function(e){var t=me(107,e.pos,$e,e);tt(),me(19,t,Qe,e),Z(e.expression),me(20,e.expression.end,Qe,e),je(e,e.statement)}(i);case 230:return function(e){var t=me(98,e.pos,$e,e);tt(),me(19,t,Qe,e),Z(e.expression),me(20,e.expression.end,Qe,e),tt(),Y(e.caseBlock)}(i);case 231:return function(e){Y(e.label),me(56,e.label.end,Qe,e),tt(),Y(e.statement)}(i);case 232:return function(e){me(100,e.pos,$e,e),Be(e.expression),I()}(i);case 233:return function(e){me(102,e.pos,$e,e),tt(),Y(e.tryBlock),e.catchClause&&(ut(e),Y(e.catchClause));e.finallyBlock&&(ut(e),me(87,(e.catchClause||e.tryBlock).end,$e,e),tt(),Y(e.finallyBlock))}(i);case 234:return function(e){ot(78,e.pos,$e),I()}(i);case 235:return function(e){Y(e.name),Me(e.type),Le(e.initializer,e.type?e.type.end:e.name.end,e)}(i);case 236:return function(t){$e(e.isLet(t)?"let":e.isVarConst(t)?"const":"var"),tt(),Ve(t,t.declarations,272)}(i);case 237:return function(e){ge(e)}(i);case 238:return function(e){De(e)}(i);case 239:return function(e){Je(e,e.decorators),Oe(e,e.modifiers),$e("interface"),tt(),Y(e.name),Ke(e,e.typeParameters),Ve(e,e.heritageClauses,256),tt(),Qe("{"),Ve(e,e.members,65),Qe("}")}(i);case 240:return function(e){Je(e,e.decorators),Oe(e,e.modifiers),$e("type"),tt(),Y(e.name),Ke(e,e.typeParameters),tt(),Qe("="),tt(),Y(e.type),I()}(i);case 241:return function(e){Oe(e,e.modifiers),$e("enum"),tt(),Y(e.name),tt(),Qe("{"),Ve(e,e.members,81),Qe("}")}(i);case 242:return function(e){Oe(e,e.modifiers),512&~e.flags&&($e(16&e.flags?"namespace":"module"),tt());Y(e.name);var t=e.body;if(!t)return I();for(;242===t.kind;)Qe("."),Y(t.name),t=t.body;tt(),Y(t)}(i);case 243:return function(t){St(t),e.forEach(t.statements,Tt),de(t,ht(t)),Dt(t)}(i);case 244:return function(e){me(17,e.pos,Qe,e),Ve(e,e.clauses,65),me(18,e.clauses.end,Qe,e,!0)}(i);case 245:return function(e){var t=me(84,e.pos,$e,e);tt(),t=me(118,t,$e,e),tt(),t=me(130,t,$e,e),tt(),Y(e.name),I()}(i);case 246:return function(e){Oe(e,e.modifiers),me(91,e.modifiers?e.modifiers.end:e.pos,$e,e),tt(),Y(e.name),tt(),me(58,e.name.end,Qe,e),tt(),function(e){71===e.kind?Z(e):Y(e)}(e.moduleReference),I()}(i);case 247:return function(e){Oe(e,e.modifiers),me(91,e.modifiers?e.modifiers.end:e.pos,$e,e),tt(),e.importClause&&(Y(e.importClause),tt(),me(143,e.importClause.end,$e,e),tt());Z(e.moduleSpecifier),I()}(i);case 248:return function(e){Y(e.name),e.name&&e.namedBindings&&(me(26,e.name.end,Qe,e),tt());Y(e.namedBindings)}(i);case 249:return function(e){var t=me(39,e.pos,Qe,e);tt(),me(118,t,$e,e),tt(),Y(e.name)}(i);case 250:return function(e){ke(e)}(i);case 251:return function(e){Te(e)}(i);case 252:return function(e){var t=me(84,e.pos,$e,e);tt(),e.isExportEquals?me(58,t,Ze,e):me(79,t,$e,e);tt(),Z(e.expression),I()}(i);case 253:return function(e){var t=me(84,e.pos,$e,e);tt(),e.exportClause?Y(e.exportClause):t=me(39,t,Qe,e);if(e.moduleSpecifier){tt();var r=e.exportClause?e.exportClause.end:t;me(143,r,$e,e),tt(),Z(e.moduleSpecifier)}I()}(i);case 254:return function(e){ke(e)}(i);case 255:return function(e){Te(e)}(i);case 256:return;case 257:return function(e){$e("require"),Qe("("),Z(e.expression),Qe(")")}(i);case 10:return function(e){F(),d.writeLiteral(bt(e,!0))}(i);case 260:case 263:return function(t){Qe("<"),e.isJsxOpeningElement(t)&&(Ce(t.tagName),t.attributes.properties&&t.attributes.properties.length>0&&tt(),Y(t.attributes));Qe(">")}(i);case 261:case 264:return function(t){Qe("")}(i);case 265:return function(e){Y(e.name),function(e,t,r,n){r&&(t(e),n(r))}("=",Qe,e.initializer,Y)}(i);case 266:return function(e){Ve(e,e.properties,131328)}(i);case 267:return function(e){Qe("{..."),Z(e.expression),Qe("}")}(i);case 268:return function(e){e.expression&&(Qe("{"),Y(e.dotDotDotToken),Z(e.expression),Qe("}"))}(i);case 269:return function(e){me(73,e.pos,$e,e),tt(),Z(e.expression),Ee(e,e.statements,e.expression.end)}(i);case 270:return function(e){var t=me(79,e.pos,$e,e);Ee(e,e.statements,t)}(i);case 271:return function(e){tt(),ct(e.token,$e),tt(),Ve(e,e.types,272)}(i);case 272:return function(e){var t=me(74,e.pos,$e,e);tt(),e.variableDeclaration&&(me(19,t,Qe,e),Y(e.variableDeclaration),me(20,e.variableDeclaration.end,Qe,e),tt());Y(e.block)}(i);case 273:return function(t){Y(t.name),Qe(":"),tt();var r=t.initializer;if(A&&0==(512&e.getEmitFlags(r))){var n=e.getCommentRange(r);A(n.pos)}Z(r)}(i);case 274:return function(e){Y(e.name),e.objectAssignmentInitializer&&(tt(),Qe("="),tt(),Z(e.objectAssignmentInitializer))}(i);case 275:return function(e){e.expression&&(Qe("..."),Z(e.expression))}(i);case 276:return function(e){Y(e.name),Le(e.initializer,e.name.end,e)}(i)}if(e.isExpression(i))r=1,i=se(1,i);else if(e.isToken(i))return st(i,Qe)}var a,o;if(1===r)switch(i.kind){case 8:return function(e){ue(e)}(i);case 9:case 12:case 13:return ue(i);case 71:return le(i);case 86:case 95:case 97:case 101:case 99:case 91:return void st(i,$e);case 185:return function(e){var t=e.elements,r=e.multiLine?32768:0;We(e,t,4466|r)}(i);case 186:return function(t){e.forEach(t.properties,Ct);var r=65536&e.getEmitFlags(t);r&&it();var i=t.multiLine?32768:0,a=n.languageVersion>=1&&!e.isJsonSourceFile(n)?32:0;Ve(t,t.properties,263122|a|i),r&&at()}(i);case 187:return function(r){var i=!1,a=!1;if(!(131072&e.getEmitFlags(r))){var o=r.expression.end,s=e.skipTrivia(n.text,r.expression.end)+1,c=e.createToken(23);c.pos=o,c.end=s,i=yt(r,r.expression,c),a=yt(r,c,r.name)}Z(r.expression),_t(i),!i&&function(r){if(r=e.skipPartiallyEmittedExpressions(r),e.isNumericLiteral(r)){var n=xt(r);return!r.numericLiteralFlags&&!e.stringContains(n,e.tokenToString(23))}if(e.isPropertyAccessExpression(r)||e.isElementAccessExpression(r)){var i=e.getConstantValue(r);return"number"==typeof i&&isFinite(i)&&Math.floor(i)===i&&t.removeComments}}(r.expression)&&Qe(".");me(23,r.expression.end,Qe,r),_t(a),Y(r.name),dt(i,a)}(i);case 188:return function(e){Z(e.expression),me(21,e.expression.end,Qe,e),Z(e.argumentExpression),me(22,e.argumentExpression.end,Qe,e)}(i);case 189:return function(e){Z(e.expression),ze(e,e.typeArguments),We(e,e.arguments,1296)}(i);case 190:return function(e){me(94,e.pos,$e,e),tt(),Z(e.expression),ze(e,e.typeArguments),We(e,e.arguments,9488)}(i);case 191:return function(e){Z(e.tag),ze(e,e.typeArguments),tt(),Z(e.template)}(i);case 192:return function(e){Qe("<"),Y(e.type),Qe(">"),Z(e.expression)}(i);case 193:return function(e){var t=me(19,e.pos,Qe,e);Z(e.expression),me(20,e.expression?e.expression.end:t,Qe,e)}(i);case 194:return function(e){Et(e.name),ge(e)}(i);case 195:return function(e){Je(e,e.decorators),Oe(e,e.modifiers),he(e,_e)}(i);case 196:return function(e){me(80,e.pos,$e,e),tt(),Z(e.expression)}(i);case 197:return function(e){me(103,e.pos,$e,e),tt(),Z(e.expression)}(i);case 198:return function(e){me(105,e.pos,$e,e),tt(),Z(e.expression)}(i);case 199:return function(e){me(121,e.pos,$e,e),tt(),Z(e.expression)}(i);case 200:return function(e){ct(e.operator,Ze),function(e){var t=e.operand;return 200===t.kind&&(37===e.operator&&(37===t.operator||43===t.operator)||38===e.operator&&(38===t.operator||44===t.operator))}(e)&&tt();Z(e.operand)}(i);case 201:return function(e){Z(e.operand),ct(e.operator,Ze)}(i);case 202:return function(e){var t=26!==e.operatorToken.kind,r=yt(e,e.left,e.operatorToken),n=yt(e,e.operatorToken,e.right);Z(e.left),_t(r,t?" ":void 0),P(e.operatorToken.pos),st(e.operatorToken,Ze),A(e.operatorToken.end,!0),_t(n," "),Z(e.right),dt(r,n)}(i);case 203:return function(e){var t=yt(e,e.condition,e.questionToken),r=yt(e,e.questionToken,e.whenTrue),n=yt(e,e.whenTrue,e.colonToken),i=yt(e,e.colonToken,e.whenFalse);Z(e.condition),_t(t," "),Y(e.questionToken),_t(r," "),Z(e.whenTrue),dt(t,r),_t(n," "),Y(e.colonToken),_t(i," "),Z(e.whenFalse),dt(n,i)}(i);case 204:return function(e){Y(e.head),Ve(e,e.templateSpans,131072)}(i);case 205:return function(e){me(116,e.pos,$e,e),Y(e.asteriskToken),Be(e.expression)}(i);case 206:return function(e){Qe("..."),Z(e.expression)}(i);case 207:return function(e){Et(e.name),De(e)}(i);case 208:return;case 210:return function(e){Z(e.expression),e.type&&(tt(),$e("as"),tt(),Y(e.type))}(i);case 211:return function(e){Z(e.expression),Ze("!")}(i);case 212:return function(e){ot(e.keywordToken,e.pos,Qe),Qe("."),Y(e.name)}(i);case 258:return function(e){Y(e.openingElement),Ve(e,e.children,131072),Y(e.closingElement)}(i);case 259:return function(e){Qe("<"),Ce(e.tagName),tt(),Y(e.attributes),Qe("/>")}(i);case 262:return function(e){Y(e.openingFragment),Ve(e,e.children,131072),Y(e.closingFragment)}(i);case 305:return function(e){Z(e.expression)}(i);case 306:return function(e){We(e,e.elements,272)}(i)}}function se(e,t){return t&&b&&b(e,t)||t}function ce(r){var i=!1,a=278===r.kind?r:void 0;if(!a||R!==e.ModuleKind.None){for(var o=a?a.sourceFiles.length:1,s=0;s'),nt()),n&&n.moduleName&&(w('/// '),nt()),n&&n.amdDependencies)for(var i=0,a=n.amdDependencies;i'):w('/// '),nt()}for(var s=0,c=t;s'),nt()}for(var l=0,_=r;l<_.length;l++){u=_[l];w('/// '),nt()}}function Ae(t){var r=t.statements;St(t),e.forEach(t.statements,Tt),ce(t);var n=e.findIndex(r,function(t){return!e.isPrologueDirective(t)});!function(e){e.isDeclarationFile&&Ne(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives)}(t),Ve(t,r,1,-1===n?r.length:n),Dt(t)}function Pe(t,r,n){for(var i=0;i0)&&nt(),Y(a),n&&n.set(a.expression.text,!0))}return t.length}function we(t){if(e.isSourceFile(t))G(t),Pe(t.statements);else for(var r=e.createMap(),n=0,i=t.sourceFiles;n=n.length||0===s;if(u&&16384&i)return x&&x(n),void(S&&S(n));if(7680&i&&(Qe(function(e){return a[7680&e][0]}(i)),u&&!c&&A(n.pos,!0)),x&&x(n),u)1&i?nt():128&i&&!(262144&i)&&tt();else{var l=0==(131072&i),_=l;pt(r,n,i)?(nt(),_=!1):128&i&&tt(),64&i&&it();for(var d=void 0,p=!1,f=0;fe.getRootLength(t)&&!function(t){return!!i.has(t)||!!e.sys.directoryExists(t)&&(i.set(t,!0),!0)}(t)&&(a(e.getDirectoryPath(t)),e.sys.createDirectory(t))}function o(){return e.getDirectoryPath(e.normalizePath(e.sys.getExecutingFilePath()))}var s=e.getNewLineCharacter(t),c=e.sys.realpath&&function(t){return e.sys.realpath(t)};return{getSourceFile:function(n,i,a){var o;try{e.performance.mark("beforeIORead"),o=e.sys.readFile(n,t.charset),e.performance.mark("afterIORead"),e.performance.measure("I/O Read","beforeIORead","afterIORead")}catch(e){a&&a(e.message),o=""}return void 0!==o?e.createSourceFile(n,o,i,r):void 0},getDefaultLibLocation:o,getDefaultLibFileName:function(t){return e.combinePaths(o(),e.getDefaultLibFileName(t))},writeFile:function(r,i,o,s){try{e.performance.mark("beforeIOWrite"),a(e.getDirectoryPath(e.normalizePath(r))),e.isWatchSet(t)&&e.sys.createHash&&e.sys.getModifiedTime?function(t,r,i){n||(n=e.createMap());var a=e.sys.createHash(r),o=e.sys.getModifiedTime(t);if(o){var s=n.get(t);if(s&&s.byteOrderMark===i&&s.hash===a&&s.mtime.getTime()===o.getTime())return}e.sys.writeFile(t,r,i);var c=e.sys.getModifiedTime(t);n.set(t,{hash:a,byteOrderMark:i,mtime:c})}(r,i,o):e.sys.writeFile(r,i,o),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){s&&s(e.message)}},getCurrentDirectory:e.memoize(function(){return e.sys.getCurrentDirectory()}),useCaseSensitiveFileNames:function(){return e.sys.useCaseSensitiveFileNames},getCanonicalFileName:function(t){return e.sys.useCaseSensitiveFileNames?t:t.toLowerCase()},getNewLine:function(){return s},fileExists:function(t){return e.sys.fileExists(t)},readFile:function(t){return e.sys.readFile(t)},trace:function(t){return e.sys.write(t+s)},directoryExists:function(t){return e.sys.directoryExists(t)},getEnvironmentVariable:function(t){return e.sys.getEnvironmentVariable?e.sys.getEnvironmentVariable(t):""},getDirectories:function(t){return e.sys.getDirectories(t)},realpath:c,readDirectory:function(t,r,n,i,a){return e.sys.readDirectory(t,r,n,i,a)},getModifiedTime:e.sys.getModifiedTime&&function(t){return e.sys.getModifiedTime(t)},setModifiedTime:e.sys.setModifiedTime&&function(t,r){return e.sys.setModifiedTime(t,r)},deleteFile:e.sys.deleteFile&&function(t){return e.sys.deleteFile(t)}}}function s(t,r){var n=e.diagnosticCategoryName(t)+" TS"+t.code+": "+b(t.messageText,r.getNewLine())+r.getNewLine();if(t.file){var i=e.getLineAndCharacterOfPosition(t.file,t.start),a=i.line,o=i.character,s=t.file.fileName;return e.convertToRelativePath(s,r.getCurrentDirectory(),function(e){return r.getCanonicalFileName(e)})+"("+(a+1)+","+(o+1)+"): "+n}return n}e.findConfigFile=function(t,r,n){return void 0===n&&(n="tsconfig.json"),e.forEachAncestorDirectory(t,function(t){var i=e.combinePaths(t,n);return r(i)?i:void 0})},e.resolveTripleslashReference=i,e.computeCommonSourceDirectoryOfFilenames=a,e.createCompilerHost=o,e.getPreEmitDiagnostics=function(t,r,n){var i=t.getConfigFileParsingDiagnostics().concat(t.getOptionsDiagnostics(n),t.getSyntacticDiagnostics(r,n),t.getGlobalDiagnostics(n),t.getSemanticDiagnostics(r,n));return t.getCompilerOptions().declaration&&e.addRange(i,t.getDeclarationDiagnostics(r,n)),e.sortAndDeduplicateDiagnostics(i)},e.formatDiagnostics=function(e,t){for(var r="",n=0,i=e;n=4,x=(m+1+"").length;b&&(x=Math.max(_.length,x));for(var S="",D=d;D<=m;D++){S+=o.getNewLine(),b&&d+10||s.length>0)return{diagnostics:e.concatenate(c,s),sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0}}}var u=Re().getEmitResolver(N.outFile||N.out?void 0:r,i);e.performance.mark("beforeEmit");var l=a?[]:e.getTransformers(N,o),_=e.emitFiles(u,Oe(n),r,a,l,o&&o.afterDeclarations);return e.performance.mark("afterEmit"),e.performance.measure("Emit","beforeEmit","afterEmit"),_}(_,t,r,n,i,a)})},getCurrentDirectory:function(){return Y},getNodeCount:function(){return Re().getNodeCount()},getIdentifierCount:function(){return Re().getIdentifierCount()},getSymbolCount:function(){return Re().getSymbolCount()},getTypeCount:function(){return Re().getTypeCount()},getFileProcessingDiagnostics:function(){return M},getResolvedTypeReferenceDirectives:function(){return O},isSourceFileFromExternalLibrary:Le,isSourceFileDefaultLibrary:function(t){if(t.hasNoDefaultLib)return!0;if(!N.noLib)return!1;var r=V.useCaseSensitiveFileNames()?e.equateStringsCaseSensitive:e.equateStringsCaseInsensitive;return N.lib?e.some(N.lib,function(n){return r(t.fileName,e.combinePaths(X,n))}):r(t.fileName,G())},dropDiagnosticsProducingTypeChecker:function(){y=void 0},getSourceFileFromReference:function(e,t){return rt(i(t.fileName,e.fileName),function(e){return de.get(we(e))})},getLibFileFromReference:function(t){var r=t.fileName.toLocaleLowerCase(),n=e.libMap.get(r);if(n)return Je(e.combinePaths(X,n))},sourceFileToPackageName:le,redirectTargetsSet:_e,isEmittedFile:function(t){if(N.noEmit)return!1;var r=we(t);if(ze(r))return!1;var n=N.outFile||N.out;if(n)return Ct(r,n)||Ct(r,e.removeFileExtension(n)+".d.ts");if(N.declarationDir&&e.containsPath(N.declarationDir,r,Y,!V.useCaseSensitiveFileNames()))return!0;if(N.outDir)return e.containsPath(N.outDir,r,Y,!V.useCaseSensitiveFileNames());if(e.fileExtensionIsOneOf(r,e.supportedJavascriptExtensions)||e.fileExtensionIs(r,".d.ts")){var i=e.removeFileExtension(r);return!!ze(i+".ts")||!!ze(i+".tsx")}return!1},getConfigFileParsingDiagnostics:function(){return A||e.emptyArray},getResolvedModuleWithFailedLookupLocationsFromCache:function(t,r){return K&&e.resolveModuleNameFromCache(t,r,K)},getProjectReferences:function(){if(fe)return fe}},function(){if(N.strictPropertyInitialization&&!N.strictNullChecks&&vt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks"),N.isolatedModules&&(N.declaration&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"declaration","isolatedModules"),N.noEmitOnError&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"noEmitOnError","isolatedModules"),N.out&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"out","isolatedModules"),N.outFile&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"outFile","isolatedModules")),N.inlineSourceMap&&(N.sourceMap&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),N.mapRoot&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap")),N.paths&&void 0===N.baseUrl&&vt(e.Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option,"paths"),N.composite&&!1===N.declaration&&vt(e.Diagnostics.Composite_projects_may_not_disable_declaration_emit,"declaration"),P)for(var t=0;t1})&&vt(e.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}if(!N.noEmit&&N.allowJs&&N.declaration&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"allowJs","declaration"),N.checkJs&&!N.allowJs&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs")),N.emitDeclarationOnly&&(N.declaration||vt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"emitDeclarationOnly","declaration"),N.noEmit&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit")),N.emitDecoratorMetadata&&!N.experimentalDecorators&&vt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators"),N.jsxFactory?(N.reactNamespace&&vt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),e.parseIsolatedEntityName(N.jsxFactory,g)||bt("jsxFactory",e.Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,N.jsxFactory)):N.reactNamespace&&!e.isIdentifierText(N.reactNamespace,g)&&bt("reactNamespace",e.Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,N.reactNamespace),!N.noEmit&&!N.suppressOutputPathCheck){var S=Oe(),D=e.createMap();e.forEachEmittedFile(S,function(e){N.emitDeclarationOnly||k(e.jsFilePath,D),k(e.declarationFilePath,D)})}function k(t,r){if(t){var n,i=we(t);de.has(i)&&(N.configFilePath||(n=e.chainDiagnosticMessages(void 0,e.Diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),n=e.chainDiagnosticMessages(n,e.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file,t),Tt(t,e.createCompilerDiagnosticFromMessageChain(n)));var a=V.useCaseSensitiveFileNames()?i:i.toLocaleLowerCase();r.has(a)?Tt(t,e.createCompilerDiagnostic(e.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,t)):r.set(a,!0)}}}(),e.performance.mark("afterProgram"),e.performance.measure("Program","beforeProgram","afterProgram"),_;function Pe(t){if(e.containsPath(X,t.fileName,!1)){var r=e.getBaseFileName(t.fileName);if("lib.d.ts"===r||"lib.es6.d.ts"===r)return 0;var n=e.removeSuffix(e.removePrefix(r,"lib."),".d.ts"),i=e.libs.indexOf(n);if(-1!==i)return i+1}return e.libs.length+2}function we(t){return e.toPath(t,Y,dt)}function Fe(){if(void 0===g){var t=e.filter(m,function(t){return e.sourceFileMayBeEmitted(t,N,Le)});N.rootDir&&ft(t,N.rootDir)?g=e.getNormalizedAbsolutePath(N.rootDir,Y):N.composite?ft(t,g=e.getDirectoryPath(e.normalizeSlashes(N.configFilePath))):g=function(e){for(var t=[],r=0,n=e;r0;){var s=n.text.slice(a[o-1],a[o]),c=r.exec(s);if(!c)return!0;if(c[3])return!1;o--}return!0}function Ge(e,t){return Qe(e,t,I,Xe)}function Xe(t,r){return qe(function(){var n=Re().getEmitResolver(t,r);return e.getDeclarationDiagnostics(Oe(e.noop),n,t)})}function Qe(t,r,n,i){var a=t?n.perFile&&n.perFile.get(t.path):n.allDiagnostics;if(a)return a;var o=i(t,r)||e.emptyArray;return t?(n.perFile||(n.perFile=e.createMap()),n.perFile.set(t.path,o)):n.allDiagnostics=o,o}function Ye(e,t){return e.isDeclarationFile?[]:Ge(e,t)}function $e(t,r,n){nt(e.normalizePath(t),r,n,void 0)}function Ze(e,t){return e.fileName===t.fileName}function et(e,t){return 71===e.kind?71===t.kind&&e.escapedText===t.escapedText:9===t.kind&&e.text===t.text}function tt(t){if(!t.imports){var r,n,i,a=e.isSourceFileJavaScript(t),o=e.isExternalModule(t);if(N.importHelpers&&(N.isolatedModules||o)&&!t.isDeclarationFile){var s=e.createLiteral(e.externalHelpersModuleNameText),c=e.createImportDeclaration(void 0,void 0,void 0,s);e.addEmitFlags(c,67108864),s.parent=c,c.parent=t,r=[s]}for(var u=0,l=t.statements;u0),g.path=r,g.resolvedPath=we(t),V.useCaseSensitiveFileNames()){var b=r.toLowerCase(),x=pe.get(b);x?it(t,x.fileName,a,o,s):pe.set(b,g)}H=H||g.hasNoDefaultLib&&!i,N.noResolve||(st(g,n),ct(g)),lt(g),pt(g),n?d.push(g):f.push(g)}return g}function ot(t){var r,n=we(t),i=e.getNormalizedAbsolutePath(t,n);return me.forEach(function(n,a){void 0===r&&0===i.indexOf(a)&&(r=e.changeExtension(t.replace(a,n),".d.ts"))}),r}function st(t,r){e.forEach(t.referencedFiles,function(e){nt(i(e.fileName,t.fileName),r,!1,void 0,t,e.pos,e.end)})}function ct(t){var r=e.map(t.typeReferenceDirectives,function(e){return e.fileName.toLocaleLowerCase()});if(r)for(var n=q(r,t.fileName),i=0;iL,d=l&&!k(N,o)&&!N.noResolve&&ar&&(Q.add(e.createDiagnosticForNodeInSourceFile(N.configFile,p.elements[r],n,i,a,o)),s=!1)}}s&&Q.add(e.createCompilerDiagnostic(n,i,a,o))}function yt(t,r,n,i){for(var a=!0,o=0,s=ht();o0)for(var a=t.getTypeChecker(),o=0,s=r.imports;o0)for(var d=0,p=r.referencedFiles;d0?o(l.outputFiles[0].text):u}return i.set(n.path,c),!u||c!==u}function o(t,r){if(!t.allFileNames){var n=r.getSourceFiles();t.allFileNames=n===e.emptyArray?e.emptyArray:n.map(function(e){return e.fileName})}return t.allFileNames}function s(t,r){return e.arrayFrom(e.mapDefinedIterator(t.referencedMap.entries(),function(e){var t=e[0];return e[1].has(r)?t:void 0}))}function c(t){for(var r=0,n=t.statements;r0;){var f=p.pop();if(!d.has(f)){var m=r.getSourceFileByPath(f);d.set(f,m),m&&a(t,r,m,i,o,l)&&p.push.apply(p,s(t,f))}}return e.arrayFrom(e.mapDefinedIterator(d.values(),function(e){return e}))}:function(e,t,r){var n=t.getCompilerOptions();return n&&(n.out||n.outFile)?[r]:u(e,t,r)})(t,r,p,d,o,l);return _||i(t,d),f},t.updateSignaturesFromCache=i,t.getAllDependencies=function(t,r,n){var i,a=r.getCompilerOptions();if(a.outFile||a.out)return o(t,r);if(!t.referencedMap||!e.isExternalModule(n)&&!c(n))return o(t,r);for(var s=e.createMap(),u=[n.path];u.length;){var l=u.pop();if(!s.has(l)){s.set(l,!0);var _=t.referencedMap.get(l);if(_)for(var d=_.keys(),p=d.next(),f=p.value,m=p.done;!m;f=(i=d.next()).value,m=i.done,i)u.push(f)}}return e.arrayFrom(e.mapDefinedIterator(s.keys(),function(e){var t=r.getSourceFileByPath(e);return t?t.fileName:e}))}}(e.BuilderState||(e.BuilderState={}))}(s||(s={})),function(e){function t(t,r,n){var i=e.BuilderState.create(t,r,n);i.program=t;var a=t.getCompilerOptions();a.outFile||a.out||(i.semanticDiagnosticsPerFile=e.createMap()),i.changedFilesSet=e.createMap();var o=e.BuilderState.canReuseOldState(i.referencedMap,n),s=o&&n.semanticDiagnosticsPerFile&&!!i.semanticDiagnosticsPerFile;o&&(n.currentChangedFilePath||e.Debug.assert(!(n.affectedFiles||n.currentAffectedFilesSignatures&&n.currentAffectedFilesSignatures.size),"Cannot reuse if only few affected files of currentChangedFile were iterated"),s&&e.Debug.assert(!e.forEachKey(n.changedFilesSet,function(e){return n.semanticDiagnosticsPerFile.has(e)}),"Semantic diagnostics shouldnt be available for changed files"),e.copyEntries(n.changedFilesSet,i.changedFilesSet));var c=i.referencedMap,u=o?n.referencedMap:void 0;return i.fileInfos.forEach(function(t,r){var a,l,_,d;if(!o||!(a=n.fileInfos.get(r))||a.version!==t.version||(_=l=c&&c.get(r),d=u&&u.get(r),_!==d&&(void 0===_||void 0===d||_.size!==d.size||e.forEachKey(_,function(e){return!d.has(e)})))||l&&e.forEachKey(l,function(e){return!i.fileInfos.has(e)&&n.fileInfos.has(e)}))i.changedFilesSet.set(r,!0);else if(s){var p=n.semanticDiagnosticsPerFile.get(r);p&&i.semanticDiagnosticsPerFile.set(r,p)}}),i}function r(t,r){e.Debug.assert(!r||!t.affectedFiles||t.affectedFiles[t.affectedFilesIndex-1]!==r||!t.semanticDiagnosticsPerFile.has(r.path))}function n(t,r,n){for(;;){var i=t.affectedFiles;if(i){for(var a=t.seenAffectedFiles,o=t.semanticDiagnosticsPerFile,s=t.affectedFilesIndex;s0;a--)if(0===(i=t.indexOf(e.directorySeparator,i)+1))return!1;return!0}function I(e,t){return F(t)||(e.ignore=!0),e}function O(t,r){return T(x,r)?{dir:b,dirPath:x}:M(e.getDirectoryPath(e.getNormalizedAbsolutePath(t,u())),e.getDirectoryPath(r))}function M(t,r){for(;e.stringContains(r,"/node_modules/");)t=e.getDirectoryPath(t),r=e.getDirectoryPath(r);if(P(r))return I({dir:t,dirPath:r},e.getDirectoryPath(r));var n,i,a=!0;if(void 0!==x)for(;!T(r,x);){var o=e.getDirectoryPath(r);if(o===r)break;a=!1,n=r,i=t,r=o,t=e.getDirectoryPath(t)}return I({dir:i||t,dirPath:n||r,nonRecursive:a},r)}function L(t){return e.fileExtensionIsOneOf(t,y)}function R(t,r){r.failedLookupLocations&&r.failedLookupLocations.length&&(r.refCount?r.refCount++:(r.refCount=1,e.isExternalModuleNameRelative(t)?B(r):c.add(t,r)))}function B(r){e.Debug.assert(!!r.refCount);for(var n=!1,i=0,a=r.failedLookupLocations;i1),h.set(s,l-1))),u===x?n=!0:U(u)}}n&&U(x)}}function U(e){v.get(e).refCount--}function q(e,t){var r=e.get(t);r&&(r.forEach(K),e.delete(t))}function V(e){q(_,e),q(m,e)}function W(t,r,n){var i=e.createMap();t.forEach(function(t,o){var s=e.getDirectoryPath(o),c=i.get(s);c||(c=e.createMap(),i.set(s,c)),t.forEach(function(t,i){c.has(i)||(c.set(i,!0),!t.isInvalidated&&r(t,n)&&(t.isInvalidated=!0,(a||(a=e.createMap())).set(o,!0)))})})}function H(r){var n;n=t.maxNumberOfFilesToIterateForInvalidation||e.maxNumberOfFilesToIterateForInvalidation,_.size>n||m.size>n?s=!0:(W(_,r,D),W(m,r,k))}function G(r,n){var i;if(n)i=function(e){return T(r,t.toPath(e))};else{var o=e.getDirectoryPath(r);if(w(r)||P(r)||w(o)||P(o))i=function(n){return t.toPath(n)===r||e.startsWith(t.toPath(n),r)};else{if(!L(r)&&!h.has(r))return!1;if(e.isEmittedFileOfProgram(t.getCurrentProgram(),r))return!1;i=function(e){return t.toPath(e)===r}}}var c=a&&a.size;return H(function(t){return e.some(t.failedLookupLocations,i)}),s||a&&a.size!==c}function X(){e.clearMap(S,e.closeFileWatcher)}function Q(e,r){return t.watchTypeRootsDirectory(r,function(n){var i=t.toPath(n);l&&l.addOrDeleteFileOrDirectory(n,i),t.onChangedAutomaticTypeDirectiveNames();var a=function(e,t){if(!s){if(T(x,t))return x;var r=M(e,t),n=r.dirPath;return!r.ignore&&v.has(n)?n:void 0}}(r,e);a&&G(i,a===i)&&t.onInvalidatedResolution()},1)}function Y(r){var n=e.getDirectoryPath(e.getDirectoryPath(r)),i=t.toPath(n);return i===x||F(i)}}}(s||(s={})),function(e){!function(t){function r(t,r,n,i){var a;return{moduleResolutionKind:e.getEmitModuleResolutionKind(t),addJsExtension:(a=r.imports,e.firstDefined(a,function(t){var r=t.text;return e.pathIsRelative(r)?e.fileExtensionIs(r,".js"):void 0})||!1),getCanonicalFileName:e.createGetCanonicalFileName(!i.useCaseSensitiveFileNames||i.useCaseSensitiveFileNames()),sourceDirectory:e.getDirectoryPath(n)}}function n(t,r,n,i){var a=r.addJsExtension,o=r.getCanonicalFileName,s=r.sourceDirectory;return function(t,r,n,i,a){var o=e.getEffectiveTypeRoots(t,r);return e.firstDefined(o,function(t){var r=e.toPath(t,void 0,n);if(e.startsWith(i,r))return u(i.substring(r.length+1),e.ModuleResolutionKind.NodeJs,a)})}(i,n,o,t,a)||function(t,r,n,i,a){if(e.getEmitModuleResolutionKind(t)!==e.ModuleResolutionKind.NodeJs)return;var o=function(e){var t,r=0,n=0,i=0;!function(e){e[e.BeforeNodeModules=0]="BeforeNodeModules",e[e.NodeModules=1]="NodeModules",e[e.Scope=2]="Scope",e[e.PackageContent=3]="PackageContent"}(t||(t={}));var a=0,o=0,s=0;for(;o>=0;)switch(a=o,o=e.indexOf("/",a+1),s){case 0:e.indexOf("/node_modules/",a)===a&&(r=a,n=o,s=1);break;case 1:case 2:1===s&&"@"===e.charAt(a+1)?s=2:(i=o,s=3);break;case 3:s=e.indexOf("/node_modules/",a)===a?1:3}return s>1?{topLevelNodeModulesIndex:r,topLevelPackageNameIndex:n,packageRootIndex:i,fileNameIndex:a}:void 0}(r);if(!o)return;var s=function(t){var r=t.substring(0,o.packageRootIndex),a=e.combinePaths(r,"package.json");if(n.fileExists(a)){var s=JSON.parse(n.readFile(a));if(s){var c=s.typings||s.types||s.main;if(c){var u=e.toPath(c,r,i);if(e.removeFileExtension(u)===e.removeFileExtension(i(t)))return r}}}var l=e.removeFileExtension(t);if("/index"===i(l.substring(o.fileNameIndex))&&!function(t,r){for(var n=0,i=e.getSupportedExtensions({allowJs:!0},[{extension:"node",isMixedContent:!1},{extension:"json",isMixedContent:!1,scriptKind:6}]);n=l.length+_.length&&e.startsWith(r,l)&&e.endsWith(r,_)){var d=r.substr(l.length,r.length-_.length);return i.replace("*",d)}}else if(c===r||c===t)return i}}(e.removeFileExtension(h),v,m);if(b)return[b]}if("non-relative"===i.importModuleSpecifierPreference)return[v];if(void 0!==i.importModuleSpecifierPreference&&e.Debug.assertNever(i.importModuleSpecifierPreference),_(h))return[y];var x=e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(p,f,d));return s(y)0?e.ExitStatus.DiagnosticsPresent_OutputsSkipped:a.length>0?e.ExitStatus.DiagnosticsPresent_OutputsGenerated:e.ExitStatus.Success}e.createDiagnosticReporter=r,e.nonClearingMessageCodes=[e.Diagnostics.Found_1_error_Watching_for_file_changes.code,e.Diagnostics.Found_0_errors_Watching_for_file_changes.code],e.screenStartingMessageCodes=[e.Diagnostics.Starting_compilation_in_watch_mode.code,e.Diagnostics.File_change_detected_Starting_incremental_compilation.code],e.createWatchStatusReporter=i,e.parseConfigFileWithSystem=function(t,r,n,i){var a=n;a.onUnRecoverableConfigFileDiagnostic=function(t){return c(e.sys,i,t)};var o=e.getParsedCommandLineOfConfigFile(t,r,a);return a.onUnRecoverableConfigFileDiagnostic=void 0,o},e.emitFilesAndReportErrors=a;var o={close:e.noop};function s(t,r,n,s){void 0===t&&(t=e.sys),r||(r=e.createEmitAndSemanticDiagnosticsBuilderProgram);var c=function(e){return t.write(e+t.newLine)},u=s||i(t);return{useCaseSensitiveFileNames:function(){return t.useCaseSensitiveFileNames},getNewLine:function(){return t.newLine},getCurrentDirectory:function(){return t.getCurrentDirectory()},getDefaultLibLocation:l,getDefaultLibFileName:function(t){return e.combinePaths(l(),e.getDefaultLibFileName(t))},fileExists:function(e){return t.fileExists(e)},readFile:function(e,r){return t.readFile(e,r)},directoryExists:function(e){return t.directoryExists(e)},getDirectories:function(e){return t.getDirectories(e)},readDirectory:function(e,r,n,i,a){return t.readDirectory(e,r,n,i,a)},realpath:t.realpath&&function(e){return t.realpath(e)},getEnvironmentVariable:t.getEnvironmentVariable&&function(e){return t.getEnvironmentVariable(e)},watchFile:t.watchFile?function(e,r,n){return t.watchFile(e,r,n)}:function(){return o},watchDirectory:t.watchDirectory?function(e,r,n){return t.watchDirectory(e,r,n)}:function(){return o},setTimeout:t.setTimeout?function(e,r){for(var n,i=[],a=2;ae.getRootLength(n)&&!r.directoryExists(n)){var i=e.getDirectoryPath(n);t(i),r.createDirectory(n)}}(e.getDirectoryPath(e.normalizePath(t))),r.writeFile(t,n,i),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}},getCurrentDirectory:g,useCaseSensitiveFileNames:function(){return f},getCanonicalFileName:L,getNewLine:function(){return N},fileExists:H,readFile:y,trace:A,directoryExists:C.directoryExists&&function(e){return C.directoryExists(e)},getDirectories:C.getDirectories&&function(e){return C.getDirectories(e)},realpath:r.realpath&&function(e){return r.realpath(e)},getEnvironmentVariable:r.getEnvironmentVariable?function(e){return r.getEnvironmentVariable(e)}:function(){return""},onReleaseOldSourceFile:function(e,t){var r=_.get(e.path);r&&(V(r)?(c||(c=[])).push(e.path):r.sourceFile===e&&(r.fileWatcher&&r.fileWatcher.close(),_.delete(e.path),B.removeResolutionsOfFile(e.path)))},createHash:r.createHash&&function(e){return r.createHash(e)},toPath:q,getCompilationSettings:function(){return D},watchDirectoryOfFailedLookupLocation:function(e,t,n){return M(r,e,t,n,"Failed Lookup Locations")},watchTypeRootsDirectory:function(e,t,n){return M(r,e,t,n,"Type roots")},getCachedDirectoryStructureHost:function(){return T},onInvalidatedResolution:$,onChangedAutomaticTypeDirectiveNames:function(){p=!0,$()},maxNumberOfFilesToIterateForInvalidation:r.maxNumberOfFilesToIterateForInvalidation,getCurrentProgram:z,writeLog:w},B=e.createResolutionCache(R,h?e.getDirectoryPath(e.getNormalizedAbsolutePath(h,m)):m,!1);R.resolveModuleNames=r.resolveModuleNames?function(e,t,n){return r.resolveModuleNames(e,t,n)}:function(e,t,r){return B.resolveModuleNames(e,t,r)},R.resolveTypeReferenceDirectives=r.resolveTypeReferenceDirectives?function(e,t){return r.resolveTypeReferenceDirectives(e,t)}:function(e,t){return B.resolveTypeReferenceDirectives(e,t)};var j=!!r.resolveModuleNames||!!r.resolveTypeReferenceDirectives;return K(),oe(),h?{getCurrentProgram:J,getProgram:K}:{getCurrentProgram:J,getProgram:K,updateRootFileNames:function(t){e.Debug.assert(!h,"Cannot update root file names with config file watch mode"),S=t,$()}};function J(){return n}function z(){return n&&n.getProgram()}function K(){w("Synchronizing program");var t=z();d&&(N=U(),t&&e.changesAffectModuleResolution(t.getCompilerOptions(),D)&&B.clear());var i=B.createHasInvalidatedResolution(j);return e.isProgramUptoDate(z(),S,D,Q,H,i,p)?k&&(n=x(void 0,void 0,R,n,l),k=!1):function(t,r){P!==e.WatchLogLevel.None&&(w("CreatingProgramWith::"),w(" roots: "+JSON.stringify(S)),w(" options: "+JSON.stringify(D)));var i=d||!t;if(d=!1,k=!1,B.startCachingPerDirectoryResolution(),R.hasInvalidatedResolution=r,R.hasChangedAutomaticTypeDirectiveNames=p,n=x(S,D,R,n,l),B.finishCachingPerDirectoryResolution(),e.updateMissingFilePathsWatch(n.getProgram(),a||(a=e.createMap()),ie),i&&B.updateTypeRootsWatch(),c){for(var o=0,s=c;oe?t:e}function u(t){return e.fileExtensionIs(t,".d.ts")}function l(t){var r=a(),n=a(),i=e.createMap();return{options:t,projectStatus:a(),unchangedOutputs:a(),invalidatedProjects:r,missingRoots:i,queuedProjects:n}}!function(e){e[e.None=0]="None",e[e.Success=1]="Success",e[e.DeclarationOutputUnchanged=2]="DeclarationOutputUnchanged",e[e.ConfigFileErrors=4]="ConfigFileErrors",e[e.SyntaxErrors=8]="SyntaxErrors",e[e.TypeErrors=16]="TypeErrors",e[e.DeclarationEmitErrors=32]="DeclarationEmitErrors",e[e.AnyErrors=60]="AnyErrors"}(t||(t={})),function(e){e[e.Unbuildable=0]="Unbuildable",e[e.UpToDate=1]="UpToDate",e[e.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",e[e.OutputMissing=3]="OutputMissing",e[e.OutOfDateWithSelf=4]="OutOfDateWithSelf",e[e.OutOfDateWithUpstream=5]="OutOfDateWithUpstream",e[e.UpstreamOutOfDate=6]="UpstreamOutOfDate",e[e.UpstreamBlocked=7]="UpstreamBlocked",e[e.ContainerOnly=8]="ContainerOnly"}(r=e.UpToDateStatusType||(e.UpToDateStatusType={})),e.createBuildContext=l;var _=[{name:"verbose",shortName:"v",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Enable_verbose_logging,type:"boolean"},{name:"dry",shortName:"d",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean"},{name:"force",shortName:"f",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean"},{name:"clean",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Delete_the_outputs_of_all_projects,type:"boolean"},{name:"watch",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Watch_input_files,type:"boolean"}];function d(o,s,_,d,p){if(!o.getModifiedTime||!o.setModifiedTime)throw new Error("Host must support timestamp APIs");var g,y,h,v=(g=o,y=a(),h=e.parseConfigHostFromCompilerHost(g),{parseConfigFile:function(t){var r=g.getSourceFile(t,100);if(void 0!==r){var n=e.parseJsonSourceFileConfigFileContent(r,h,e.getDirectoryPath(t));return n.options.configFilePath=t,y.setValue(t,n),n}},removeKey:function(e){y.removeKey(e)}}),b=l(d),x=e.createMap(),S={fileExists:function(e){return o.fileExists(e)},getModifiedTime:function(e){return o.getModifiedTime(e)},getUnchangedTime:function(e){return b.unchangedOutputs.getValueOrUndefined(e)},getLastStatus:function(e){return b.projectStatus.getValueOrUndefined(e)},setLastStatus:function(e,t){return b.projectStatus.setValue(e,t)},parseConfigFile:function(e){return v.parseConfigFile(e)}};return{buildAllProjects:function(){var n=k();if(void 0===n)return e.ExitStatus.DiagnosticsPresent_OutputsSkipped;var i=n.buildQueue;!function(t){if(!b.options.verbose)return;for(var r=[],n=0,i=t.buildQueue;ns&&(o=d,s=m)}var g=f(a);if(0===g.length)return{type:r.ContainerOnly};for(var y,h="(none)",v=i,b="(none)",x=n,S=n,D=!1,k=0,T=g;kx&&(x=E,b=C),u(C)){var N=t.getUnchangedTime?t.getUnchangedTime(C):void 0;S=void 0!==N?c(N,S):c(S,t.getModifiedTime(C))}}var A,P=!1,w=!1;if(a.projectReferences&&t.parseConfigFile)for(var F=0,I=a.projectReferences;F=0},t.findArgument=function(t){var r=e.sys.args.indexOf(t);return r>=0&&rn?3:46===e.charCodeAt(0)?4:95===e.charCodeAt(0)?5:/^@[^/]+\/[^/]+$/.test(e)?1:encodeURIComponent(e)!==e?6:0:2},t.renderPackageNameValidationFailure=function(t,r){switch(t){case 2:return"Package name '"+r+"' cannot be empty";case 3:return"Package name '"+r+"' should be less than "+n+" characters";case 4:return"Package name '"+r+"' cannot start with '.'";case 5:return"Package name '"+r+"' cannot start with '_'";case 1:return"Package '"+r+"' is scoped and currently is not supported";case 6:return"Package name '"+r+"' contains non URI safe characters";case 0:return e.Debug.fail();default:throw e.Debug.assertNever(t)}}}(e.JsTyping||(e.JsTyping={}))}(s||(s={})),function(e){function t(e){var t=parseInt(e,10);if(isNaN(t))throw new Error("Error in parseInt("+JSON.stringify(e)+")");return t}var r=/^(.*)-next.\d+/,n=/^(\d+)\.(\d+)\.0-next.(\d+)$/,i=/^(\d+)\.(\d+)\.(\d+)$/,a=function(){function e(e,t,r,n){this.major=e,this.minor=t,this.patch=r,this.isPrerelease=n}return e.parse=function(t){var n=r.test(t),i=e.tryParse(t,n);if(!i)throw new Error("Unexpected semver: "+t+" (isPrerelease: "+n+")");return i},e.fromRaw=function(t){return new e(t.major,t.minor,t.patch,t.isPrerelease)},e.tryParse=function(r,a){var o=(a?n:i).exec(r);return o?new e(t(o[1]),t(o[2]),t(o[3]),a):void 0},Object.defineProperty(e.prototype,"versionString",{get:function(){return this.isPrerelease?this.major+"."+this.minor+".0-next."+this.patch:this.major+"."+this.minor+"."+this.patch},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return this.major===e.major&&this.minor===e.minor&&this.patch===e.patch&&this.isPrerelease===e.isPrerelease},e.prototype.greaterThan=function(e){return this.major>e.major||this.major===e.major&&(this.minor>e.minor||this.minor===e.minor&&(!this.isPrerelease&&e.isPrerelease||this.isPrerelease===e.isPrerelease&&this.patch>e.patch))},e}();e.Semver=a}(s||(s={})),function(e){!function(e){var t=function(){function e(e){this.text=e}return e.prototype.getText=function(e,t){return 0===e&&t===this.text.length?this.text:this.text.substring(e,t)},e.prototype.getLength=function(){return this.text.length},e.prototype.getChangeRange=function(){},e}();e.fromString=function(e){return new t(e)}}(e.ScriptSnapshot||(e.ScriptSnapshot={})),e.emptyOptions={};var t=function(){return function(){}}();e.TextChange=t,function(e){e.none="none",e.definition="definition",e.reference="reference",e.writtenReference="writtenReference"}(e.HighlightSpanKind||(e.HighlightSpanKind={})),function(e){e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart"}(e.IndentStyle||(e.IndentStyle={})),function(e){e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral"}(e.SymbolDisplayPartKind||(e.SymbolDisplayPartKind={})),function(e){e.Comment="comment",e.Region="region",e.Code="code",e.Imports="imports"}(e.OutliningSpanKind||(e.OutliningSpanKind={})),function(e){e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration"}(e.OutputFileType||(e.OutputFileType={})),function(e){e[e.None=0]="None",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",e[e.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",e[e.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition"}(e.EndOfLineState||(e.EndOfLineState={})),function(e){e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.StringLiteral=7]="StringLiteral",e[e.RegExpLiteral=8]="RegExpLiteral"}(e.TokenClass||(e.TokenClass={})),function(e){e.unknown="",e.warning="warning",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.localClassElement="local class",e.interfaceElement="interface",e.typeElement="type",e.enumElement="enum",e.enumMemberElement="enum member",e.variableElement="var",e.localVariableElement="local var",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e.directory="directory",e.externalModuleName="external module name",e.jsxAttribute="JSX attribute",e.string="string"}(e.ScriptElementKind||(e.ScriptElementKind={})),function(e){e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e.abstractModifier="abstract",e.optionalModifier="optional"}(e.ScriptElementKindModifier||(e.ScriptElementKindModifier={})),function(e){e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAliasName="type alias name",e.parameterName="parameter name",e.docCommentTagName="doc comment tag name",e.jsxOpenTagName="jsx open tag name",e.jsxCloseTagName="jsx close tag name",e.jsxSelfClosingTagName="jsx self closing tag name",e.jsxAttribute="jsx attribute",e.jsxText="jsx text",e.jsxAttributeStringLiteralValue="jsx attribute string literal value"}(e.ClassificationTypeNames||(e.ClassificationTypeNames={})),function(e){e[e.comment=1]="comment",e[e.identifier=2]="identifier",e[e.keyword=3]="keyword",e[e.numericLiteral=4]="numericLiteral",e[e.operator=5]="operator",e[e.stringLiteral=6]="stringLiteral",e[e.regularExpressionLiteral=7]="regularExpressionLiteral",e[e.whiteSpace=8]="whiteSpace",e[e.text=9]="text",e[e.punctuation=10]="punctuation",e[e.className=11]="className",e[e.enumName=12]="enumName",e[e.interfaceName=13]="interfaceName",e[e.moduleName=14]="moduleName",e[e.typeParameterName=15]="typeParameterName",e[e.typeAliasName=16]="typeAliasName",e[e.parameterName=17]="parameterName",e[e.docCommentTagName=18]="docCommentTagName",e[e.jsxOpenTagName=19]="jsxOpenTagName",e[e.jsxCloseTagName=20]="jsxCloseTagName",e[e.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",e[e.jsxAttribute=22]="jsxAttribute",e[e.jsxText=23]="jsxText",e[e.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue"}(e.ClassificationType||(e.ClassificationType={}))}(s||(s={})),function(e){function t(t){switch(t.kind){case 149:case 235:case 184:case 152:case 151:case 273:case 274:case 154:case 153:case 155:case 156:case 157:case 237:case 194:case 195:case 272:case 265:return 1;case 148:case 239:case 240:case 166:return 2;case 301:return void 0===t.name?3:2;case 276:case 238:return 3;case 242:return e.isAmbientModule(t)?5:1===e.getModuleInstanceState(t)?5:4;case 241:case 250:case 251:case 246:case 247:case 252:case 253:return 7;case 277:return 5}return 7}function r(t){for(;146===t.parent.kind;)t=t.parent;return e.isInternalModuleImportEqualsDeclaration(t.parent)&&t.parent.moduleReference===t}function n(e,t){var r=i(e);return!!r&&!!r.parent&&r.parent.kind===t&&r.parent.expression===r}function i(e){return s(e)?e.parent:e}function a(t){return 71===t.kind&&e.isBreakOrContinueStatement(t.parent)&&t.parent.label===t}function o(t){return 71===t.kind&&e.isLabeledStatement(t.parent)&&t.parent.label===t}function s(e){return e&&e.parent&&187===e.parent.kind&&e.parent.name===e}e.scanner=e.createScanner(6,!0),function(e){e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All"}(e.SemanticMeaning||(e.SemanticMeaning={})),e.getMeaningFromDeclaration=t,e.getMeaningFromLocation=function(n){return 277===n.kind?1:252===n.parent.kind?7:r(n)?function(t){var r=146===t.kind?t:e.isQualifiedName(t.parent)&&t.parent.right===t?t.parent:void 0;return r&&246===r.parent.kind?7:4}(n):e.isDeclarationName(n)?t(n.parent):function(t){switch(e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),t.kind){case 99:return!e.isExpressionNode(t);case 176:return!0}switch(t.parent.kind){case 162:return!0;case 181:return!t.parent.isTypeOf;case 209:return!e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)}return!1}(n)?2:function(e){return function(e){var t=e,r=!0;if(146===t.parent.kind){for(;t.parent&&146===t.parent.kind;)t=t.parent;r=t.right===e}return 162===t.parent.kind&&!r}(e)||function(e){var t=e,r=!0;if(187===t.parent.kind){for(;t.parent&&187===t.parent.kind;)t=t.parent;r=t.name===e}if(!r&&209===t.parent.kind&&271===t.parent.parent.kind){var n=t.parent.parent.parent;return 238===n.kind&&108===t.parent.parent.token||239===n.kind&&85===t.parent.parent.token}return!1}(e)}(n)?4:e.isTypeParameterDeclaration(n.parent)?(e.Debug.assert(e.isJSDocTemplateTag(n.parent.parent)),2):e.isLiteralTypeNode(n.parent)?3:1},e.isInRightSideOfInternalImportEqualsDeclaration=r,e.isCallExpressionTarget=function(e){return n(e,189)},e.isNewExpressionTarget=function(e){return n(e,190)},e.climbPastPropertyAccess=i,e.getTargetLabel=function(e,t){for(;e;){if(231===e.kind&&e.label.escapedText===t)return e.label;e=e.parent}},e.isJumpStatementTarget=a,e.isLabelOfLabeledStatement=o,e.isLabelName=function(e){return o(e)||a(e)},e.isRightSideOfQualifiedName=function(e){return 146===e.parent.kind&&e.parent.right===e},e.isRightSideOfPropertyAccess=s,e.isNameOfModuleDeclaration=function(e){return 242===e.parent.kind&&e.parent.name===e},e.isNameOfFunctionDeclaration=function(t){return 71===t.kind&&e.isFunctionLike(t.parent)&&t.parent.name===t},e.isLiteralNameOfPropertyDeclarationOrIndexAccess=function(t){switch(t.parent.kind){case 152:case 151:case 273:case 276:case 154:case 153:case 156:case 157:case 242:return e.getNameOfDeclaration(t.parent)===t;case 188:return t.parent.argumentExpression===t;case 147:return!0;case 180:return 178===t.parent.parent.kind;default:return!1}},e.isExpressionOfExternalModuleImportEqualsDeclaration=function(t){return e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t},e.getContainerNode=function(t){for(e.isJSDocTypeAlias(t)&&(t=t.parent.parent);;){if(!(t=t.parent))return;switch(t.kind){case 277:case 154:case 153:case 237:case 194:case 156:case 157:case 238:case 239:case 241:case 242:return t}}},e.getNodeKind=function t(r){switch(r.kind){case 277:return e.isExternalModule(r)?"module":"script";case 242:return"module";case 238:case 207:return"class";case 239:return"interface";case 240:case 295:case 301:return"type";case 241:return"enum";case 235:return o(r);case 184:return o(e.getRootDeclaration(r));case 195:case 237:case 194:return"function";case 156:return"getter";case 157:return"setter";case 154:case 153:return"method";case 152:case 151:return"property";case 160:return"index";case 159:return"construct";case 158:return"call";case 155:return"constructor";case 148:return"type parameter";case 276:return"enum member";case 149:return e.hasModifier(r,92)?"property":"parameter";case 246:case 251:case 255:case 249:return"alias";case 202:var n=e.getSpecialPropertyAssignmentKind(r),i=r.right;switch(n){case 0:return"";case 1:case 2:var a=t(i);return""===a?"const":a;case 3:return e.isFunctionExpression(i)?"method":"property";case 4:return"property";case 5:return e.isFunctionExpression(i)?"method":"property";case 6:return"local class";default:return e.assertTypeIsNever(n),""}case 71:return e.isImportClause(r.parent)?"alias":"";default:return""}function o(t){return e.isVarConst(t)?"const":e.isLet(t)?"let":"var"}},e.isThis=function(t){switch(t.kind){case 99:return!0;case 71:return e.identifierIsThisKeyword(t)&&149===t.parent.kind;default:return!1}};var c=/^\/\/\/\s*=r.end}function d(e,t,r,n){return Math.max(e,r)t)break;var u=c.getEnd();if(t=t||!A(u,r)||k(u);if(_){var d=D(s,c,r);return d&&S(d,r)}return a(u)}}e.Debug.assert(void 0!==n||277===o.kind||e.isJSDocCommentContainingNode(o));if(s.length){var d=D(s,s.length,r);return d&&S(d,r)}}(n||r);return e.Debug.assert(!(a&&k(a))),a}function x(t){return e.isToken(t)&&!k(t)}function S(e,t){if(x(e))return e;var r=e.getChildren(t),n=D(r,r.length,t);return n&&S(n,t)}function D(t,r,n){for(var i=r-1;i>=0;i--){if(k(t[i]))e.Debug.assert(i>0,"`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(A(t[i],n))return t[i]}}function k(t){return e.isJsxText(t)&&t.containsOnlyWhiteSpaces}function T(e,t,r){for(var n=e.kind,i=0;;){var a=b(e.getFullStart(),r);if(!a)return;if((e=a).kind===t){if(0===i)return e;i--}else e.kind===n&&i++}}function C(t,r,n){var i=n.getTypeAtLocation(t);return(e.isNewExpression(t.parent)?i.getConstructSignatures():i.getCallSignatures()).filter(function(e){return!!e.typeParameters&&e.typeParameters.length>=r})}function E(t,r){for(var n=t,i=0,a=0;n;){switch(n.kind){case 27:if(!(n=b(n.getFullStart(),r))||!e.isIdentifier(n))return;if(!i)return e.isDeclarationName(n)?void 0:{called:n,nTypeArguments:a};i--;break;case 47:i=3;break;case 46:i=2;break;case 29:i++;break;case 18:if(!(n=T(n,17,r)))return;break;case 20:if(!(n=T(n,19,r)))return;break;case 22:if(!(n=T(n,21,r)))return;break;case 26:a++;break;case 36:case 71:case 9:case 8:case 101:case 86:case 103:case 85:case 128:case 23:case 49:case 55:case 56:break;default:if(e.isTypeNode(n))break;return}n=b(n.getFullStart(),r)}}function N(t,r,n){return e.formatting.getRangeOfEnclosingComment(t,r,void 0,n)}function A(e,t){return 0!==e.getWidth(t)}function P(e,t,r){var n=N(e,t,void 0);return!!n&&r===c.test(e.text.substring(n.pos,n.end))}function w(e,t){return{span:e,newText:t}}function F(e){return!!e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames()}function I(t,r,n,i){return e.createImportDeclaration(void 0,void 0,t||r?e.createImportClause(t,r&&r.length?e.createNamedImports(r):void 0):void 0,"string"==typeof n?O(n,i):n)}function O(t,r){return e.createLiteral(t,0===r)}function M(t,r){return e.isStringDoubleQuoted(t,r)?1:0}function L(t){return"default"!==t.escapedName?t.escapedName:e.firstDefined(t.declarations,function(t){var r=e.getNameOfDeclaration(t);return r&&71===r.kind?r.escapedText:void 0})}function R(t,r,n,i){var a=e.createMap();return function t(o){if(!(96&o.flags&&e.addToSeen(a,e.getSymbolId(o))))return;return e.firstDefined(o.declarations,function(a){return e.firstDefined(e.getAllSuperTypeNodes(a),function(a){var o=n.getTypeAtLocation(a),s=o&&o.symbol&&n.getPropertyOfType(o,r);return o&&s&&(e.firstDefined(n.getRootSymbols(s),i)||t(o.symbol))})})}(t)}e.getLineStartPositionForPosition=function(t,r){return e.getLineStarts(r)[r.getLineAndCharacterOfPosition(t).line]},e.rangeContainsRange=u,e.rangeContainsRangeExclusive=function(e,t){return l(e,t.pos)&&l(e,t.end)},e.rangeContainsPosition=function(e,t){return e.pos<=t&&t<=e.end},e.rangeContainsPositionExclusive=l,e.startEndContainsRange=_,e.rangeContainsStartEnd=function(e,t,r){return e.pos<=t&&e.end>=r},e.rangeOverlapsWithStartEnd=function(e,t,r){return d(e.pos,e.end,t,r)},e.nodeOverlapsWithStartEnd=function(e,t,r,n){return d(e.getStart(t),e.end,r,n)},e.startEndOverlapsWithStartEnd=d,e.positionBelongsToNode=function(t,r,n){return e.Debug.assert(t.pos<=r),rn.getStart(t)&&rt.end||e.pos===t.end;return i&&A(e,n)?r(e):void 0})}(r)},e.findPrecedingToken=b,e.isInString=function(t,r,n){if(void 0===n&&(n=b(r,t)),n&&e.isStringTextContainingNode(n)){var i=n.getStart(t),a=n.getEnd();if(in.getStart(t)},e.findPrecedingMatchingToken=T,e.isPossiblyTypeArgumentPosition=function t(r,n,i){var a=E(r,n);return void 0!==a&&(e.isPartOfTypeNode(a.called)||0!==C(a.called,a.nTypeArguments,i).length||t(a.called,n,i))},e.getPossibleGenericSignatures=C,e.getPossibleTypeArgumentsInfo=E,e.isInComment=N,e.hasDocComment=function(t,r){var n=h(t,r);return!!e.findAncestor(n,e.isJSDoc)},e.getNodeModifiers=function(t){var r=e.isDeclaration(t)?e.getCombinedModifierFlags(t):0,n=[];return 8&r&&n.push("private"),16&r&&n.push("protected"),4&r&&n.push("public"),32&r&&n.push("static"),128&r&&n.push("abstract"),1&r&&n.push("export"),4194304&t.flags&&n.push("declare"),n.length>0?n.join(","):""},e.getTypeArgumentOrTypeParameterList=function(t){return 162===t.kind||189===t.kind?t.typeArguments:e.isFunctionLike(t)||238===t.kind||239===t.kind?t.typeParameters:void 0},e.isComment=function(e){return 2===e||3===e},e.isStringOrRegularExpressionOrTemplateLiteral=function(t){return!(9!==t&&12!==t&&!e.isTemplateLiteralKind(t))},e.isPunctuation=function(e){return 17<=e&&e<=70},e.isInsideTemplateLiteral=function(t,r,n){return e.isTemplateLiteralKind(t.kind)&&t.getStart(n)=2||!!e.noEmit},e.hostUsesCaseSensitiveFileNames=F,e.hostGetCanonicalFileName=function(t){return e.createGetCanonicalFileName(F(t))},e.makeImportIfNecessary=function(e,t,r,n){return e||t&&t.length?I(e,t,r,n):void 0},e.makeImport=I,e.makeStringLiteral=O,function(e){e[e.Single=0]="Single",e[e.Double=1]="Double"}(e.QuotePreference||(e.QuotePreference={})),e.quotePreferenceFromString=M,e.getQuotePreference=function(t,r){if(r.quotePreference)return"single"===r.quotePreference?0:1;var n=t.imports&&e.find(t.imports,e.isStringLiteral);return n?M(n,t):1},e.symbolNameNoDefault=function(t){var r=L(t);return void 0===r?void 0:e.unescapeLeadingUnderscores(r)},e.symbolEscapedNameNoDefault=L,e.getPropertySymbolFromBindingElement=function(t,r){var n=t.getTypeAtLocation(r.parent),i=n&&t.getPropertyOfType(n,r.name.text);return i&&98304&i.flags?(e.Debug.assert(!!(33554432&i.flags)),i.target):i},e.getPropertySymbolsFromBaseTypes=R,e.isMemberSymbolInBaseType=function(e,t){return R(e.parent,e.name,t,function(e){return!0})||!1};var B=function(){function t(){this.map=e.createMap()}return t.prototype.add=function(t){this.map.set(String(e.getNodeId(t)),t)},t.prototype.has=function(t){return this.map.has(String(e.getNodeId(t)))},t.prototype.forEach=function(e){this.map.forEach(e)},t.prototype.some=function(t){return e.forEachEntry(this.map,t)||!1},t}();e.NodeSet=B;var j=function(){function t(){this.map=e.createMap()}return t.prototype.get=function(t){var r=this.map.get(String(e.getNodeId(t)));return r&&r.value},t.prototype.getOrUpdate=function(e,t){var r=this.get(e);if(r)return r;var n=t();return this.set(e,n),n},t.prototype.set=function(t,r){this.map.set(String(e.getNodeId(t)),{node:t,value:r})},t.prototype.has=function(t){return this.map.has(String(e.getNodeId(t)))},t.prototype.forEach=function(e){this.map.forEach(function(t){var r=t.node,n=t.value;return e(n,r)})},t}();function J(t,r,n){return e.textSpanContainsPosition(t,r.getStart(n))&&r.getEnd()<=e.textSpanEnd(t)}function z(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}e.NodeMap=j,e.getParentNodeInSpan=function(t,r,n){if(t)for(;t.parent;){if(e.isSourceFile(t.parent)||!J(n,t.parent,r))return t;t=t.parent}},e.findModifier=function(t,r){return t.modifiers&&e.find(t.modifiers,function(e){return e.kind===r})},e.insertImport=function(t,r,n){var i=e.findLast(r.statements,e.isAnyImportSyntax);i?t.insertNodeAfter(r,i,n):t.insertNodeAtTopOfFile(r,n,!0)},e.textSpansEqual=z,e.documentSpansEqual=function(e,t){return e.fileName===t.fileName&&z(e.textSpan,t.textSpan)}}(s||(s={})),function(e){function t(e){return e.declarations&&e.declarations.length>0&&149===e.declarations[0].kind}e.isFirstDeclarationOfSymbolParameter=t;var r=function(){var t,r,a,o,s=10*e.defaultMaximumTruncationLength;d();var u=function(t){return _(t,e.SymbolDisplayPartKind.text)};return{displayParts:function(){var r=t.length&&t[t.length-1].text;return o>s&&r&&"..."!==r&&(e.isWhiteSpaceLike(r.charCodeAt(r.length-1))||t.push(i(" ",e.SymbolDisplayPartKind.space)),t.push(i("...",e.SymbolDisplayPartKind.punctuation))),t},writeKeyword:function(t){return _(t,e.SymbolDisplayPartKind.keyword)},writeOperator:function(t){return _(t,e.SymbolDisplayPartKind.operator)},writePunctuation:function(t){return _(t,e.SymbolDisplayPartKind.punctuation)},writeSpace:function(t){return _(t,e.SymbolDisplayPartKind.space)},writeStringLiteral:function(t){return _(t,e.SymbolDisplayPartKind.stringLiteral)},writeParameter:function(t){return _(t,e.SymbolDisplayPartKind.parameterName)},writeProperty:function(t){return _(t,e.SymbolDisplayPartKind.propertyName)},writeLiteral:function(t){return _(t,e.SymbolDisplayPartKind.stringLiteral)},writeSymbol:function(e,r){if(o>s)return;l(),o+=e.length,t.push(n(e,r))},writeLine:function(){if(o>s)return;o+=1,t.push(c()),r=!0},write:u,writeTextOfNode:u,getText:function(){return""},getTextPos:function(){return 0},getColumn:function(){return 0},getLine:function(){return 0},isAtStartOfLine:function(){return!1},rawWrite:e.notImplemented,getIndent:function(){return a},increaseIndent:function(){a++},decreaseIndent:function(){a--},clear:d,trackSymbol:e.noop,reportInaccessibleThisError:e.noop,reportInaccessibleUniqueSymbolError:e.noop,reportPrivateInBaseOfClassExpression:e.noop};function l(){if(!(o>s)&&r){var n=e.getIndentString(a);n&&(o+=n.length,t.push(i(n,e.SymbolDisplayPartKind.space))),r=!1}}function _(e,r){o>s||(l(),o+=e.length,t.push(i(e,r)))}function d(){t=[],r=!0,a=0,o=0}}();function n(r,n){return i(r,function(r){var n=r.flags;if(3&n)return t(r)?e.SymbolDisplayPartKind.parameterName:e.SymbolDisplayPartKind.localName;if(4&n)return e.SymbolDisplayPartKind.propertyName;if(32768&n)return e.SymbolDisplayPartKind.propertyName;if(65536&n)return e.SymbolDisplayPartKind.propertyName;if(8&n)return e.SymbolDisplayPartKind.enumMemberName;if(16&n)return e.SymbolDisplayPartKind.functionName;if(32&n)return e.SymbolDisplayPartKind.className;if(64&n)return e.SymbolDisplayPartKind.interfaceName;if(384&n)return e.SymbolDisplayPartKind.enumName;if(1536&n)return e.SymbolDisplayPartKind.moduleName;if(8192&n)return e.SymbolDisplayPartKind.methodName;if(262144&n)return e.SymbolDisplayPartKind.typeParameterName;if(524288&n)return e.SymbolDisplayPartKind.aliasName;if(2097152&n)return e.SymbolDisplayPartKind.aliasName;return e.SymbolDisplayPartKind.text}(n))}function i(t,r){return{text:t,kind:e.SymbolDisplayPartKind[r]}}function a(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.keyword)}function o(t){return i(t,e.SymbolDisplayPartKind.text)}e.symbolPart=n,e.displayPart=i,e.spacePart=function(){return i(" ",e.SymbolDisplayPartKind.space)},e.keywordPart=a,e.punctuationPart=function(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.punctuation)},e.operatorPart=function(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.operator)},e.textOrKeywordPart=function(t){var r=e.stringToToken(t);return void 0===r?o(t):a(r)},e.textPart=o;var s="\r\n";function c(){return i("\n",e.SymbolDisplayPartKind.lineBreak)}function u(e){try{return e(r),r.displayParts()}finally{r.clear()}}function l(t){return e.isSingleOrDoubleQuote(t.charCodeAt(0))}function _(t,r){return e.ensureScriptKind(t,r&&r.getScriptKind&&r.getScriptKind(t))}function d(t,r){void 0===r&&(r=!0);var n=t&&function(t){var r=e.visitEachChild(t,d,e.nullTransformationContext);if(r===t){var n=e.getSynthesizedClone(t);return e.isStringLiteral(n)?n.textSourceNode=t:e.isNumericLiteral(n)&&(n.numericLiteralFlags=t.numericLiteralFlags),e.setTextRange(n,t)}return r.parent=void 0,r}(t);return n&&!r&&p(n),n}function p(e){f(e),m(e)}function f(e){g(e,512,y)}function m(t){g(t,1024,e.getLastChild)}function g(t,r,n){e.addEmitFlags(t,r);var i=n(t);i&&g(i,r,n)}function y(e){return e.forEachChild(function(e){return e})}function h(t,r){if(e.startsWith(t,r))return 0;var n=t.indexOf(" "+r);return-1===n&&(n=t.indexOf("."+r)),-1===n&&(n=t.indexOf('"'+r)),-1===n?-1:n+1}e.getNewLineOrDefaultFromHost=function(e,t){return t&&t.newLineCharacter||e.getNewLine&&e.getNewLine()||s},e.lineBreakPart=c,e.mapToDisplayParts=u,e.typeToDisplayParts=function(e,t,r,n){return void 0===n&&(n=0),u(function(i){e.writeType(t,r,17408|n,i)})},e.symbolToDisplayParts=function(e,t,r,n,i){return void 0===i&&(i=0),u(function(a){e.writeSymbol(t,r,n,8|i,a)})},e.signatureToDisplayParts=function(e,t,r,n){return void 0===n&&(n=0),n|=25632,u(function(i){e.writeSignature(t,r,n,void 0,i)})},e.isImportOrExportSpecifierName=function(e){return!!e.parent&&(251===e.parent.kind||255===e.parent.kind)&&e.parent.propertyName===e},e.stripQuotes=function(e){var t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&l(e)?e.substring(1,t-1):e},e.startsWithQuote=l,e.scriptKindIs=function(t,r){for(var n=[],i=2;i=0),o},e.copyComments=function(t,r,n,i,a){e.forEachLeadingCommentRange(n.text,t.pos,function(t,o,s,c){3===s?(t+=2,o-=2):t+=2,e.addSyntheticLeadingComment(r,i||s,n.text.slice(t,o),void 0!==a?a:c)})}}(s||(s={})),function(e){e.createClassifier=function(){var o=e.createScanner(6,!1);function s(i,s,c){var u=0,l=0,_=[],d=function(t){switch(t){case 3:return{prefix:'"\\\n'};case 2:return{prefix:"'\\\n"};case 1:return{prefix:"/*\n"};case 4:return{prefix:"`\n"};case 5:return{prefix:"}\n",pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return e.Debug.assertNever(t)}}(s),p=d.prefix,f=d.pushTemplate;i=p+i;var m=p.length;f&&_.push(14),o.setText(i);var g=0,y=[],h=0;do{u=o.scan(),e.isTrivia(u)||(x(),l=u);var v=o.getTextPos();if(n(o.getTokenPos(),v,m,a(u),y),v>=i.length){var b=r(o,u,e.lastOrUndefined(_));void 0!==b&&(g=b)}}while(1!==u);function x(){switch(u){case 41:case 63:t[l]||12!==o.reScanSlashToken()||(u=12);break;case 27:71===l&&h++;break;case 29:h>0&&h--;break;case 119:case 137:case 134:case 122:case 138:h>0&&!c&&(u=71);break;case 14:_.push(u);break;case 17:_.length>0&&_.push(u);break;case 18:if(_.length>0){var r=e.lastOrUndefined(_);14===r?16===(u=o.reScanTemplateToken())?_.pop():e.Debug.assertEqual(u,15,"Should have been a template middle."):(e.Debug.assertEqual(r,17,"Should have been an open brace"),_.pop())}break;default:if(!e.isKeyword(u))break;23===l?u=71:e.isKeyword(l)&&e.isKeyword(u)&&!function(t,r){if(!e.isAccessibilityModifier(t))return!0;switch(r){case 125:case 136:case 123:case 115:return!0;default:return!1}}(l,u)&&(u=71)}}return{endOfLineState:g,spans:y}}return{getClassificationsForLine:function(t,r,n){return function(t,r){for(var n=[],a=t.spans,o=0,s=0;s=0){var _=c-o;_>0&&n.push({length:_,classification:e.TokenClass.Whitespace})}n.push({length:u,classification:i(l)}),o=c+u}var d=r.length-o;return d>0&&n.push({length:d,classification:e.TokenClass.Whitespace}),{entries:n,finalLexState:t.endOfLineState}}(s(t,r,n),t)},getEncodedLexicalClassifications:s}};var t=e.arrayToNumericMap([71,9,8,12,99,43,44,20,22,18,101,86],function(e){return e},function(){return!0});function r(t,r,n){switch(r){case 9:if(!t.isUnterminated())return;for(var i=t.getTokenText(),a=i.length-1,o=0;92===i.charCodeAt(a-o);)o++;if(0==(1&o))return;return 34===i.charCodeAt(0)?3:2;case 3:return t.isUnterminated()?1:void 0;default:if(e.isTemplateLiteralKind(r)){if(!t.isUnterminated())return;switch(r){case 16:return 5;case 13:return 4;default:return e.Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+r)}}return 14===n?6:void 0}}function n(e,t,r,n,i){if(8!==n){0===e&&r>0&&(e+=r);var a=t-e;a>0&&i.push(e-r,a,n)}}function i(t){switch(t){case 1:return e.TokenClass.Comment;case 3:return e.TokenClass.Keyword;case 4:return e.TokenClass.NumberLiteral;case 5:return e.TokenClass.Operator;case 6:return e.TokenClass.StringLiteral;case 8:return e.TokenClass.Whitespace;case 10:return e.TokenClass.Punctuation;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return e.TokenClass.Identifier;default:return}}function a(t){if(e.isKeyword(t))return 3;if(function(e){switch(e){case 39:case 41:case 42:case 37:case 38:case 45:case 46:case 47:case 27:case 29:case 30:case 31:case 93:case 92:case 118:case 32:case 33:case 34:case 35:case 48:case 50:case 49:case 53:case 54:case 69:case 68:case 70:case 65:case 66:case 67:case 59:case 60:case 61:case 63:case 64:case 58:case 26:return!0;default:return!1}}(t)||function(e){switch(e){case 37:case 38:case 52:case 51:case 43:case 44:return!0;default:return!1}}(t))return 5;if(t>=17&&t<=70)return 10;switch(t){case 8:return 4;case 9:return 6;case 12:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 71:default:return e.isTemplateLiteralKind(t)?6:2}}function o(e,t){switch(t){case 242:case 238:case 239:case 237:e.throwIfCancellationRequested()}}function s(t,r,n,i,a){var s=[];return n.forEachChild(function c(u){if(u&&e.textSpanIntersectsWith(a,u.pos,u.getFullWidth())){if(o(r,u.kind),e.isIdentifier(u)&&!e.nodeIsMissing(u)&&i.has(u.escapedText)){var l=t.getSymbolAtLocation(u),_=l&&function t(r,n,i){var a=r.getFlags();return 0==(2885600&a)?void 0:32&a?11:384&a?12:524288&a?16:1536&a?4&n||1&n&&function(t){return e.some(t.declarations,function(t){return e.isModuleDeclaration(t)&&1===e.getModuleInstanceState(t)})}(r)?14:void 0:2097152&a?t(i.getAliasedSymbol(r),n,i):2&n?64&a?13:262144&a?15:void 0:void 0}(l,e.getMeaningFromLocation(u),t);_&&function(e,t,r){s.push(e),s.push(t-e),s.push(r)}(u.getStart(n),u.getEnd(),_)}u.forEachChild(c)}}),{spans:s,endOfLineState:0}}function c(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function u(t){e.Debug.assert(t.spans.length%3==0);for(var r=t.spans,n=[],i=0;i=0),a>0){var o=n||y(t.kind,t);o&&l(i,a,o)}return!0}function y(t,r){if(e.isKeyword(t))return 3;if((27===t||29===t)&&r&&e.getTypeArgumentOrTypeParameterList(r.parent))return 10;if(e.isPunctuation(t)){if(r){var n=r.parent;if(58===t&&(235===n.kind||152===n.kind||149===n.kind||265===n.kind))return 5;if(202===n.kind||200===n.kind||201===n.kind||203===n.kind)return 5}return 10}if(8===t)return 4;if(9===t)return 265===r.parent.kind?24:6;if(12===t)return 6;if(e.isTemplateLiteralKind(t))return 6;if(10===t)return 23;if(71===t){if(r)switch(r.parent.kind){case 238:return r.parent.name===r?11:void 0;case 148:return r.parent.name===r?15:void 0;case 239:return r.parent.name===r?13:void 0;case 241:return r.parent.name===r?12:void 0;case 242:return r.parent.name===r?14:void 0;case 149:return r.parent.name===r?e.isThisIdentifier(r)?3:17:void 0}return 2}}function h(n){if(n&&e.decodedTextSpanIntersectsWith(i,a,n.pos,n.getFullWidth())){o(t,n.kind);for(var s=0,c=n.getChildren(r);s=2&&46===e.charCodeAt(0)){var t=e.length>=3&&46===e.charCodeAt(1)?2:1,r=e.charCodeAt(t);return 47===r||92===r}return!1}(f)||e.isRootedDiskPath(f)){var h=i(u);return u.rootDirs?function(t,r,n,i,o,s,c,u){for(var l=s.project||c.getCurrentDirectory(),_=!(c.useCaseSensitiveFileNames&&c.useCaseSensitiveFileNames()),d=[],p=0,f=function(t,r,n,i){t=t.map(function(t){return e.normalizePath(e.isRootedDiskPath(t)?t:e.combinePaths(r,t))});var a=e.firstDefined(t,function(t){return e.containsPath(t,n,r,i)?n.substr(t.length):void 0});return e.deduplicate(t.map(function(t){return e.combinePaths(t,a)}),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive)}(t,l,n,_);p=e.pos&&r<=e.end});if(_){var d=t.text.slice(_.pos,r),p=u.exec(d);if(p){var f=p[1],m=p[2],g=p[3],y=e.getDirectoryPath(t.path),h="path"===m?a(g,y,e.getSupportedExtensions(i),!0,o,t.path):"types"===m?s(o,i,y):void 0;return h&&n(g,_.pos+f.length,h)}}};var u=/^(\/\/\/\s*"),kind:"class",kindModifiers:void 0,sortText:"0"};return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,entries:[D]}}var k=[];if(c(t,n)){var T=h(s,k,d,t,r,n.target,i,u,o,f,b,v,y);!function(t,r,n,i,a){e.getNameTable(t).forEach(function(t,o){if(t!==r){var s=e.unescapeLeadingUnderscores(o);e.addToSeen(n,s)&&e.isIdentifierText(s,i)&&!e.isStringANonContextualKeyword(s)&&a.push({name:s,kind:"warning",kindModifiers:"",sortText:"1"})}})}(t,d.pos,T,n.target,k)}else{if((!s||0===s.length)&&0===m)return;h(s,k,d,t,r,n.target,i,u,o,f,b,v,y)}var C,E=function(e){switch(e){case 0:case 3:case 2:return!0;default:return!1}}(u);0===m&&E||e.addRange(k,F[C=m]||(F[C]=I().filter(function(t){var r=e.stringToToken(t.name);switch(C){case 0:return 140!==r;case 1:return M(r);case 2:return O(r);case 3:return e.isParameterPropertyModifier(r);case 4:return!M(r);case 5:return e.isTypeKeyword(r);default:return e.Debug.assertNever(C)}})));for(var N=0,A=g;Ne.parameters.length)){var a=r.getParameterType(e,t.argumentIndex);return n=n||!!(4&a.flags),x(a,i)}}),isNewIdentifier:n}}(_,a):d()}case 247:case 253:case 257:return{kind:0,paths:t.PathCompletions.getStringLiteralCompletionsFromModuleNames(r,n,o,s,a)};default:return d()}function d(){return{kind:2,types:x(E(n,a)),isNewIdentifier:!1}}}function b(e){return e&&{kind:1,symbols:e.getApparentProperties(),hasIndexSignature:J(e)}}function x(t,r){return void 0===r&&(r=e.createMap()),t?(t=e.skipConstraint(t)).isUnion()?e.flatMap(t.types,function(e){return x(e,r)}):!t.isStringLiteral()||512&t.flags||!e.addToSeen(r,t.value)?e.emptyArray:[t]:e.emptyArray}function S(t,r,n,i,a){var o=t.getCompilerOptions(),s=P(t,r,n,c(n,o),i,{includeCompletionsForModuleExports:!0,includeCompletionsWithInsertText:!0},a);if(!s)return{type:"none"};if(0!==s.kind)return{type:"request",request:s};var u=s.symbols,l=s.literals,_=s.location,p=s.completionKind,f=s.symbolToOriginInfoMap,m=s.previousToken,g=s.isJsxInitializer,h=e.find(l,function(e){return d(e)===a.name});return void 0!==h?{type:"literal",literal:h}:e.firstDefined(u,function(t){var r=f[e.getSymbolId(t)],n=w(t,o.target,r,p);return n&&n.name===a.name&&y(r)===a.source?{type:"symbol",symbol:t,location:_,symbolToOriginInfoMap:f,previousToken:m,isJsxInitializer:g}:void 0})||{type:"none"}}function D(t,r,n){return r&&a(r)&&r.isDefaultExport&&"default"===t.escapedName?e.firstDefined(t.declarations,function(t){return e.isExportAssignment(t)&&e.isIdentifier(t.expression)?t.expression.text:void 0})||e.codefix.moduleSymbolToValidIdentifier(r.moduleSymbol,n):t.name}function k(t,r,n){return C(t,"",r,[e.displayPart(t,n)])}function T(t,r,n,i,a,o,s){var c=r.runWithCancellationToken(a,function(r){return e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(r,t,n,i,i,7)}),u=c.displayParts,l=c.documentation,_=c.symbolKind,d=c.tags;return C(t.name,e.SymbolDisplay.getSymbolModifiers(t),_,u,l,d,o,s)}function C(e,t,r,n,i,a,o,s){return{name:e,kindModifiers:t,kind:r,displayParts:n,documentation:i,tags:a,codeActions:o,source:s}}function E(e,t){var r=e.parent;switch(r.kind){case 190:return t.getContextualType(r);case 202:var n=r,i=n.left,a=n.operatorToken,o=n.right;return R(a.kind)?t.getTypeAtLocation(e===o?i:o):t.getContextualType(e);case 269:return r.expression===e?N(r,t):void 0;default:return t.getContextualType(e)}}function N(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}function A(t,r,n){var i=n.getAccessibleSymbolChain(t,r,67108863,!1);return i?e.first(i):t.parent&&(function(e){return e.declarations.some(function(e){return 277===e.kind})}(t.parent)?t:A(t.parent,r,n))}function P(t,r,n,i,a,o,s){var c=t.getTypeChecker(),u=e.timestamp(),l=e.getTokenAtPosition(n,a);r("getCompletionData: Get current token: "+(e.timestamp()-u)),u=e.timestamp();var _=e.isInComment(n,a,l);r("getCompletionData: Is inside comment: "+(e.timestamp()-u));var d=!1,p=!1;if(_){if(e.hasDocComment(n,a)){if(64===n.text.charCodeAt(a-1))return{kind:1};var f=e.getLineStartPositionForPosition(a,n);if(!n.text.substring(f,a).match(/[^\*|\s|(/\*\*)]/))return{kind:2}}var m=function(t,r){var n=e.findAncestor(t,e.isJSDoc);return n&&n.tags&&(e.rangeContainsPosition(n,r)?e.findLast(n.tags,function(e){return e.pos=t.pos;case 23:return 183===n;case 56:return 184===n;case 21:return 183===n;case 19:return 272===n||ie(n);case 17:return 241===n;case 27:return 238===n||207===n||239===n||240===n||e.isFunctionLikeKind(n);case 115:return 152===n&&!e.isClassLike(r.parent);case 24:return 149===n||!!r.parent&&183===r.parent.kind;case 114:case 112:case 113:return 149===n&&!e.isConstructorDeclaration(r.parent);case 118:return 251===n||255===n||249===n;case 125:case 136:if(j(t))return!1;case 75:case 83:case 109:case 89:case 104:case 91:case 110:case 76:case 116:case 139:return!0}if(M(L(t))&&j(t))return!1;if(ne(t)&&(!e.isIdentifier(t)||e.isParameterPropertyModifier(L(t))||ae(t)))return!1;switch(L(t)){case 117:case 120:case 75:case 76:case 124:case 83:case 89:case 109:case 110:case 112:case 113:case 114:case 115:case 104:case 116:return!0}return e.isDeclarationName(t)&&!e.isJsxAttribute(t.parent)&&!(e.isClassLike(t.parent)&&(t!==g||a>g.end))}(t)||function(e){if(8===e.kind){var t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(t)||function(e){if(10===e.kind)return!0;if(29===e.kind&&e.parent){if(260===e.parent.kind)return!0;if(261===e.parent.kind||259===e.parent.kind)return!!e.parent.parent&&258===e.parent.parent.kind}return!1}(t);return r("getCompletionsAtPosition: isCompletionListBlocker: "+(e.timestamp()-n)),i}(y))return void r("Returning an empty list because completion was requested in an invalid position.");var P=y.parent;if(23===y.kind)switch(x=!0,P.kind){case 187:b=(v=P).expression;break;case 146:b=P.left;break;case 181:case 212:b=P;break;default:return}else if(1===n.languageVariant){if(P&&187===P.kind&&(y=P,P=P.parent),l.parent===C)switch(l.kind){case 29:258!==l.parent.kind&&260!==l.parent.kind||(C=l);break;case 41:259===l.parent.kind&&(C=l)}switch(P.kind){case 261:41===y.kind&&(k=!0,C=y);break;case 202:if(!z(P))break;case 259:case 258:case 260:27===y.kind&&(S=!0,C=y);break;case 265:switch(g.kind){case 58:T=!0;break;case 71:P===g.parent||P.initializer||(T=g)}}}}var w=e.timestamp(),F=5,I=!1,K=0,U=[],q=[];if(x)!function(){F=2;var t=e.isLiteralImportTypeNode(b),r=d||t&&!b.isTypeOf||e.isPartOfTypeNode(b.parent),i=e.isInRightSideOfInternalImportEqualsDeclaration(b)||!r&&e.isPossiblyTypeArgumentPosition(y,n,c);if(e.isEntityName(b)||t){var a=c.getSymbolAtLocation(b);if(a&&1920&(a=e.skipAlias(a,c)).flags){for(var o=e.Debug.assertEachDefined(c.getExportsOfModule(a),"getExportsOfModule() should all be defined"),s=function(e){return c.isValidPropertyAccess(t?b:b.parent,e.name)},u=function(e){return te(e)},l=i?function(e){return u(e)||s(e)}:r?u:s,_=0,p=o;_0&&(U=function(t,r){if(0===r.length)return t;for(var n=e.createUnderscoreEscapedMap(),i=0,a=r;i=0&&!c(r,n[a],106);a--);return e.forEach(i(t.statement),function(e){o(t,e)&&c(r,e.getFirstToken(),72,77)}),r}function l(e){var t=s(e);if(t)switch(t.kind){case 223:case 224:case 225:case 221:case 222:return u(t);case 230:return _(t)}}function _(t){var r=[];return c(r,t.getFirstToken(),98),e.forEach(t.caseBlock.clauses,function(n){c(r,n.getFirstToken(),73,79),e.forEach(i(n),function(e){o(t,e)&&c(r,e.getFirstToken(),72)})}),r}function d(t,r){var n=[];(c(n,t.getFirstToken(),102),t.catchClause&&c(n,t.catchClause.getFirstToken(),74),t.finallyBlock)&&c(n,e.findChildOfKind(t,87,r),87);return n}function p(t,r){var i=function(t){for(var r=t;r.parent;){var n=r.parent;if(e.isFunctionBlock(n)||277===n.kind)return n;if(e.isTryStatement(n)&&n.tryBlock===r&&n.catchClause)return r;r=n}}(t);if(i){var a=[];return e.forEach(n(i),function(t){a.push(e.findChildOfKind(t,100,r))}),e.isFunctionBlock(i)&&e.forEachReturnStatement(i,function(t){a.push(e.findChildOfKind(t,96,r))}),a}}function f(t,r){var i=e.getContainingFunction(t);if(i){var a=[];return e.forEachReturnStatement(e.cast(i.body,e.isBlock),function(t){a.push(e.findChildOfKind(t,96,r))}),e.forEach(n(i.body),function(t){a.push(e.findChildOfKind(t,100,r))}),a}}function m(t){var r=e.getContainingFunction(t);if(r){var n=[];return r.modifiers&&r.modifiers.forEach(function(e){c(n,e,120)}),e.forEachChild(r,function(t){g(t,function(t){e.isAwaitExpression(t)&&c(n,t.getFirstToken(),121)})}),n}}function g(t,r){r(t),e.isFunctionLike(t)||e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isModuleDeclaration(t)||e.isTypeAliasDeclaration(t)||e.isTypeNode(t)||e.forEachChild(t,function(e){return g(e,r)})}t.getDocumentHighlights=function(t,n,i,a,o){var s=e.getTouchingPropertyName(i,a);if(s.parent&&(e.isJsxOpeningElement(s.parent)&&s.parent.tagName===s||e.isJsxClosingElement(s.parent))){var y=s.parent.parent,h=[y.openingElement,y.closingElement].map(function(e){return r(e.tagName,i)});return[{fileName:i.fileName,highlightSpans:h}]}return function(t,r,n,i,a){var o=e.arrayToSet(a,function(e){return e.fileName}),s=e.FindAllReferences.getReferenceEntriesForNode(t,r,n,a,i,void 0,o);if(s){var c=e.arrayToMultiMap(s.map(e.FindAllReferences.toHighlightSpan),function(e){return e.fileName},function(e){return e.span});return e.arrayFrom(c.entries(),function(t){var r=t[0],i=t[1];if(!o.has(r)){e.Debug.assert(n.redirectTargetsSet.has(r));var s=n.getSourceFile(r),c=e.find(a,function(e){return!!e.redirectInfo&&e.redirectInfo.redirectTarget===s});r=c.fileName,e.Debug.assert(o.has(r))}return{fileName:r,highlightSpans:i}})}}(a,s,t,n,o)||function(t,n){var i=function(t,n){switch(t.kind){case 90:case 82:return e.isIfStatement(t.parent)?function(t,n){for(var i=function(t,r){for(var n=[];e.isIfStatement(t.parent)&&t.parent.elseStatement===t;)t=t.parent;for(;;){var i=t.getChildren(r);c(n,i[0],90);for(var a=i.length-1;a>=0&&!c(n,i[a],82);a--);if(!t.elseStatement||!e.isIfStatement(t.elseStatement))break;t=t.elseStatement}return n}(t,n),a=[],o=0;o=s.end;_--)if(!e.isWhiteSpaceSingleLine(n.text.charCodeAt(_))){l=!1;break}if(l){a.push({fileName:n.fileName,textSpan:e.createTextSpanFromBounds(s.getStart(),u.end),kind:"reference"}),o++;continue}}a.push(r(i[o],n))}return a}(t.parent,n):void 0;case 96:return y(t.parent,e.isReturnStatement,f);case 100:return y(t.parent,e.isThrowStatement,p);case 102:case 74:case 87:var i=74===t.kind?t.parent.parent:t.parent;return y(i,e.isTryStatement,d);case 98:return y(t.parent,e.isSwitchStatement,_);case 73:case 79:return y(t.parent.parent.parent,e.isSwitchStatement,_);case 72:case 77:return y(t.parent,e.isBreakOrContinueStatement,l);case 88:case 106:case 81:return y(t.parent,function(t){return e.isIterationStatement(t,!0)},u);case 123:return s(e.isConstructorDeclaration,[123]);case 125:case 136:return s(e.isAccessor,[125,136]);case 121:return y(t.parent,e.isAwaitExpression,m);case 120:return h(m(t));case 116:return h(function(t){var r=e.getContainingFunction(t);if(r){var n=[];return e.forEachChild(r,function(t){g(t,function(t){e.isYieldExpression(t)&&c(n,t.getFirstToken(),116)})}),n}}(t));default:return e.isModifierKind(t.kind)&&(e.isDeclaration(t.parent)||e.isVariableStatement(t.parent))?h((a=t.kind,o=t.parent,e.mapDefined(function(t,r){var n=t.parent;switch(n.kind){case 243:case 277:case 216:case 269:case 270:return 128&r&&e.isClassDeclaration(t)?t.members.concat([t]):n.statements;case 155:case 154:case 237:return n.parameters.concat(e.isClassLike(n.parent)?n.parent.members:[]);case 238:case 207:var i=n.members;if(28&r){var a=e.find(n.members,e.isConstructorDeclaration);if(a)return i.concat(a.parameters)}else if(128&r)return i.concat([n]);return i;default:e.Debug.assertNever(n,"Invalid container kind.")}}(o,e.modifierToFlag(a)),function(t){return e.findModifier(t,a)}))):void 0}var a,o;function s(r,i){return y(t.parent,r,function(t){return e.mapDefined(t.symbol.declarations,function(t){return r(t)?e.find(t.getChildren(n),function(t){return e.contains(i,t.kind)}):void 0})})}function y(e,t,r){return t(e)?h(r(e,n)):void 0}function h(e){return e&&e.map(function(e){return r(e,n)})}}(t,n);return i&&[{fileName:n.fileName,highlightSpans:i}]}(s,i)}}(e.DocumentHighlights||(e.DocumentHighlights={}))}(s||(s={})),function(e){function t(t,r,n){void 0===r&&(r="");var i=e.createMap(),a=e.createGetCanonicalFileName(!!t);function o(e){return"_"+e.target+"|"+e.module+"|"+e.noResolve+"|"+e.jsx+"|"+e.allowJs+"|"+e.baseUrl+"|"+JSON.stringify(e.typeRoots)+"|"+JSON.stringify(e.rootDirs)+"|"+JSON.stringify(e.paths)}function s(t,r){var n=i.get(t);return!n&&r&&i.set(t,n=e.createMap()),n}function c(e,t,r,n,i,a,o){return l(e,t,r,n,i,a,!0,o)}function u(e,t,r,n,i,a,o){return l(e,t,r,n,i,a,!1,o)}function l(t,r,i,a,o,c,u,l){var _=s(a,!0),d=_.get(r),p=6===l?100:i.target;!d&&n&&((f=n.getDocument(a,r))&&(e.Debug.assert(u),d={sourceFile:f,languageServiceRefCount:0},_.set(r,d)));if(d)d.sourceFile.version!==c&&(d.sourceFile=e.updateLanguageServiceSourceFile(d.sourceFile,o,c,o.getChangeRange(d.sourceFile.scriptSnapshot)),n&&n.setDocument(a,r,d.sourceFile)),u&&d.languageServiceRefCount++;else{var f=e.createLanguageServiceSourceFile(t,o,p,c,!1,l);n&&n.setDocument(a,r,f),d={sourceFile:f,languageServiceRefCount:1},_.set(r,d)}return e.Debug.assert(0!==d.languageServiceRefCount),d.sourceFile}function _(t,r){var n=s(r,!1);e.Debug.assert(void 0!==n);var i=n.get(t);i.languageServiceRefCount--,e.Debug.assert(i.languageServiceRefCount>=0),0===i.languageServiceRefCount&&n.delete(t)}return{acquireDocument:function(t,n,i,s,u){return c(t,e.toPath(t,r,a),n,o(n),i,s,u)},acquireDocumentWithKey:c,updateDocument:function(t,n,i,s,c){return u(t,e.toPath(t,r,a),n,o(n),i,s,c)},updateDocumentWithKey:u,releaseDocument:function(t,n){return _(e.toPath(t,r,a),o(n))},releaseDocumentWithKey:_,getLanguageServiceRefCounts:function(t){return e.arrayFrom(i.entries(),function(e){var r=e[0],n=e[1].get(t);return[r,n&&n.languageServiceRefCount]})},reportStats:function(){var t=e.arrayFrom(i.keys()).filter(function(e){return e&&"_"===e.charAt(0)}).map(function(e){var t=[];return i.get(e).forEach(function(e,r){t.push({name:r,refCount:e.languageServiceRefCount})}),t.sort(function(e,t){return t.refCount-e.refCount}),{bucket:e,sourceFiles:t}});return JSON.stringify(t,void 0,2)},getKeyForCompilationSettings:o}}e.createDocumentRegistry=function(e,r){return t(e,r)},e.createDocumentRegistryInternal=t}(s||(s={})),function(e){!function(t){function r(t,r){return e.forEach(277===t.kind?t.statements:t.body.statements,function(t){return r(t)||c(t)&&e.forEach(t.body&&t.body.statements,r)})}function i(t,n){if(t.externalModuleIndicator||void 0!==t.imports)for(var i=0,a=t.imports;i=0&&!(c>n.end);){var u=c+s;0!==c&&e.isIdentifierPart(a.charCodeAt(c-1),6)||u!==o&&e.isIdentifierPart(a.charCodeAt(u),6)||i.push(c),c=a.indexOf(r,c+s+1)}return i}function f(r,n){var i=r.getSourceFile(),a=n.text,o=e.mapDefined(d(i,a,r),function(r){return r===n||e.isJumpStatementTarget(r)&&e.getTargetLabel(r,a)===n?t.nodeEntry(r):void 0});return[{definition:{type:"label",node:n},references:o}]}function m(e,t,r,n){return void 0===n&&(n=!0),r.cancellationToken.throwIfCancellationRequested(),g(e,e,t,r,n)}function g(e,t,r,n,i){if(n.markSearchedSymbols(t,r.allSearchSymbols))for(var a=0,o=p(t,r.text,e);a0)return n}switch(t.kind){case 277:var i=t;return e.isExternalModule(i)?'"'+e.escapeString(e.getBaseFileName(e.removeFileExtension(e.normalizePath(i.fileName))))+'"':"";case 195:case 237:case 194:case 238:case 207:return 512&e.getModifierFlags(t)?"default":I(t);case 155:return"constructor";case 159:return"new()";case 158:return"()";case 160:return"[]";default:return""}}function C(t){return{text:T(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:F(t.node),spans:N(t),nameSpan:t.name&&w(t.name),childItems:e.map(t.children,C)}}function E(t){return{text:T(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:F(t.node),spans:N(t),childItems:e.map(t.children,function(t){return{text:T(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:e.getNodeModifiers(t.node),spans:N(t),childItems:s,indent:0,bolded:!1,grayed:!1}})||s,indent:t.indent,bolded:!1,grayed:!1}}function N(e){var t=[w(e.node)];if(e.additionalNodes)for(var r=0,n=e.additionalNodes;r0?e.declarationNameToString(t.name):235===t.parent.kind?e.declarationNameToString(t.parent.name):202===t.parent.kind&&58===t.parent.operatorToken.kind?u(t.parent.left).replace(a,""):273===t.parent.kind&&t.parent.name?u(t.parent.name):512&e.getModifierFlags(t)?"default":e.isClassLike(t)?"":""}t.getNavigationBarItems=function(t,i){r=i,n=t;try{return e.map((a=d(t),o=[],function t(r){if(function(t){switch(l(t)){case 238:case 207:case 241:case 239:case 242:case 277:case 240:case 301:case 295:return!0;case 155:case 154:case 156:case 157:case 235:return r(t);case 195:case 237:case 194:return function(e){if(!e.node.body)return!1;switch(l(e.parent)){case 243:case 277:case 154:case 155:return!0;default:return r(e)}}(t);default:return!1}function r(t){return e.some(t.children,function(e){var t=l(e);return 235!==t&&184!==t})}}(r)&&(o.push(r),r.children))for(var n=0,i=r.children;n0?i[0]:c[0],x=0===v.length?d?void 0:e.createNamedImports(e.emptyArray):0===c.length?e.createNamedImports(v):e.updateNamedImports(c[0].importClause.namedBindings,v);return l.push(o(b,d,x)),l}function a(t){if(0===t.length)return t;var r=function(e){for(var t,r=[],n=0,i=e;n...");case 259:case 260:return function(e){if(0!==e.properties.length)return a(e.getStart(r),e.getEnd(),"code")}(t.attributes)}var i,s,c;function u(t,r){return void 0===r&&(r=17),l(t,!1,!e.isArrayLiteralExpression(t.parent),r)}function l(n,i,a,s){void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===s&&(s=17);var c=e.findChildOfKind(t,s,r),u=17===s?18:22,l=e.findChildOfKind(t,u,r);if(c&&l){var _=e.createTextSpanFromBounds(a?c.getFullStart():c.getStart(r),l.getEnd());return o(_,"code",e.createTextSpanFromNode(n,r),i)}}}(c,t);u&&n.push(u),s--,e.isIfStatement(c)&&c.elseStatement&&e.isIfStatement(c.elseStatement)?(p(c.expression),p(c.thenStatement),s++,p(c.elseStatement),s--):c.forEachChild(p),s++}}}(t,r,s),function(t,r){for(var i=[],a=t.getLineStarts(),s=0;s1&&o.push(a(c,u,"comment"))}}function a(t,r,n){return o(e.createTextSpanFromBounds(t,r),n)}function o(e,t,r,n,i){return void 0===r&&(r=e),void 0===n&&(n=!1),void 0===i&&(i="..."),{textSpan:e,kind:t,hintSpan:r,bannerText:i,autoCollapse:n}}}(e.OutliningElementsCollector||(e.OutliningElementsCollector={}))}(s||(s={})),function(e){var t;function r(e,t){return{kind:e,isCaseSensitive:t}}function n(e,t){var r=t.get(e);return r||t.set(e,r=h(e)),r}function i(i,a,o){var s=function(e,t){for(var r=e.length-t.length,n=function(r){if(T(t,function(t,n){return d(e.charCodeAt(n+r))===t}))return{value:r}},i=0;i<=r;i++){var a=n(i);if("object"===p(a))return a.value}return-1}(i,a.textLowerCase);if(0===s)return r(a.text.length===i.length?t.exact:t.prefix,e.startsWith(i,a.text));if(a.isLowerCase){if(-1===s)return;for(var _=0,f=n(i,o);_0)return r(t.substring,!0);if(a.characterSpans.length>0){var g=n(i,o),y=!!u(i,g,a,!1)||!u(i,g,a,!0)&&void 0;if(void 0!==y)return r(t.camelCase,y)}}}function a(e,t,r){if(T(t.totalTextChunk.text,function(e){return 32!==e&&42!==e})){var n=i(e,t.totalTextChunk,r);if(n)return n}for(var a,s=0,c=t.subWordTextChunks;s=65&&t<=90)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,6))return!1;var r=String.fromCharCode(t);return r===r.toUpperCase()}function _(t){if(t>=97&&t<=122)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,6))return!1;var r=String.fromCharCode(t);return r===r.toLowerCase()}function d(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function f(e){return e>=48&&e<=57}function m(e){return l(e)||_(e)||f(e)||95===e||36===e}function g(e){var t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:y(e)}}function y(e){return v(e,!1)}function h(e){return v(e,!0)}function v(t,r){for(var n=[],i=0,a=1;a0&&(t.push(g(e.substr(r,n))),n=0)}return n>0&&t.push(g(e.substr(r,n))),t}(t)};var t});if(!n.some(function(e){return!e.subWordTextChunks.length}))return{getFullMatch:function(t,i){return function(t,r,n,i){var s;if(a(r,e.last(n),i)&&!(n.length-1>t.length)){for(var c=n.length-2,u=t.length-1;c>=0;c-=1,u-=1)s=o(s,a(t[u],n[c],i));return s}}(t,i,n,r)},getMatchForLastSegmentOfPattern:function(t){return a(t,e.last(n),r)},patternContainsDots:n.length>1}},e.breakIntoCharacterSpans=y,e.breakIntoWordSpans=h}(s||(s={})),function(e){e.preProcessFile=function(t,r,n){void 0===r&&(r=!0),void 0===n&&(n=!1);var i,a,o,s={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},c=[],u=0,l=!1;function _(){return a=o,17===(o=e.scanner.scan())?u++:18===o&&u--,o}function d(){var t=e.scanner.getTokenValue(),r=e.scanner.getTokenPos();return{fileName:t,pos:r,end:r+t.length}}function p(){c.push(d()),f()}function f(){0===u&&(l=!0)}function m(){var t=e.scanner.getToken();return 124===t&&(129===(t=_())&&9===(t=_())&&(i||(i=[]),i.push({ref:d(),depth:u})),!0)}function g(){if(23===a)return!1;var t=e.scanner.getToken();if(91===t){if(19===(t=_())){if(9===(t=_()))return p(),!0}else{if(9===t)return p(),!0;if(71===t||e.isKeyword(t))if(143===(t=_())){if(9===(t=_()))return p(),!0}else if(58===t){if(h(!0))return!0}else{if(26!==t)return!0;t=_()}if(17===t){for(t=_();18!==t&&1!==t;)t=_();18===t&&143===(t=_())&&9===(t=_())&&p()}else 39===t&&118===(t=_())&&(71===(t=_())||e.isKeyword(t))&&143===(t=_())&&9===(t=_())&&p()}return!0}return!1}function y(){var t=e.scanner.getToken();if(84===t){if(f(),17===(t=_())){for(t=_();18!==t&&1!==t;)t=_();18===t&&143===(t=_())&&9===(t=_())&&p()}else if(39===t)143===(t=_())&&9===(t=_())&&p();else if(91===t&&(71===(t=_())||e.isKeyword(t))&&58===(t=_())&&h(!0))return!0;return!0}return!1}function h(t){var r=t?_():e.scanner.getToken();return 133===r&&(19===(r=_())&&9===(r=_())&&p(),!0)}function v(){var t=e.scanner.getToken();if(71===t&&"define"===e.scanner.getTokenValue()){if(19!==(t=_()))return!0;if(9===(t=_())){if(26!==(t=_()))return!0;t=_()}if(21!==t)return!0;for(t=_();22!==t&&1!==t;)9===t&&p(),t=_();return!0}return!1}if(r&&function(){for(e.scanner.setText(t),_();1!==e.scanner.getToken();)m()||g()||y()||n&&(h(!1)||v())||_();e.scanner.setText(void 0)}(),e.processCommentPragmas(s,t),e.processPragmasIntoFields(s,e.noop),l){if(i)for(var b=0,x=i;b=0&&i.length>a+1),i[a+1]}(i,t,n),e.Debug.assert(void 0!==s),c=0;else{if(!(s=e.findContainingList(t)))return;c=function(e,t){for(var r=0,n=0,i=e.getChildren();n0&&26===e.last(r).kind&&n++;return n}(s);return 0!==c&&e.Debug.assertLessThan(c,l),{kind:u,invocation:{kind:0,node:a},argumentsSpan:function(t,r){var n=t.getFullStart(),i=e.skipTrivia(r.text,t.getEnd(),!1);return e.createTextSpan(n,i-n)}(s,n),argumentIndex:c,argumentCount:l}}if(e.isNoSubstitutionTemplateLiteral(t)&&e.isTaggedTemplateExpression(i)){if(e.isInsideTemplateLiteral(t,r,n))return o(i,0,n)}else{if(e.isTemplateHead(t)&&191===i.parent.kind){var _=i,d=_.parent;return e.Debug.assert(204===_.kind),o(d,c=e.isInsideTemplateLiteral(t,r,n)?0:1,n)}if(e.isTemplateSpan(i)&&e.isTaggedTemplateExpression(i.parent.parent)){var p=i;d=i.parent.parent;if(e.isTemplateTail(t)&&!e.isInsideTemplateLiteral(t,r,n))return;return o(d,c=function(t,r,n,i){if(e.Debug.assert(n>=r.getStart(),"Assumed 'position' could not occur before node."),e.isTemplateLiteralToken(r))return e.isInsideTemplateLiteral(r,n,i)?0:t+2;return t+1}(p.parent.templateSpans.indexOf(p),t,r,n),n)}if(e.isJsxOpeningLikeElement(i)){var f=i.attributes.pos,m=e.skipTrivia(n.text,i.attributes.end,!1);return{kind:3,invocation:{kind:0,node:i},argumentsSpan:e.createTextSpan(f,m-f),argumentIndex:0,argumentCount:1}}var g=e.getPossibleTypeArgumentsInfo(t,n);if(g){var y=g.called,h=g.nTypeArguments;return{kind:0,invocation:a={kind:1,called:y},argumentsSpan:e.createTextSpanFromBounds(y.getStart(n),t.end),argumentIndex:h,argumentCount:h+1}}}}function o(t,r,n){var i=e.isNoSubstitutionTemplateLiteral(t.template)?1:t.template.templateSpans.length+1;return 0!==r&&e.Debug.assertLessThan(r,i),{kind:2,invocation:{kind:0,node:t},argumentsSpan:function(t,r){var n=t.template,i=n.getStart(),a=n.getEnd();if(204===n.kind){var o=e.last(n.templateSpans);0===o.literal.getFullWidth()&&(a=e.skipTrivia(r.text,a,!1))}return e.createTextSpan(i,a-i)}(t,n),argumentIndex:r,argumentCount:i}}function s(t){return 0===t.kind?e.getInvokedExpression(t.node):t.called}!function(e){e[e.TypeArguments=0]="TypeArguments",e[e.CallArguments=1]="CallArguments",e[e.TaggedTemplateArguments=2]="TaggedTemplateArguments",e[e.JSXAttributesArguments=3]="JSXAttributesArguments"}(r||(r={})),function(e){e[e.Call=0]="Call",e[e.TypeArgs=1]="TypeArgs"}(n||(n={})),t.getSignatureHelpItems=function(t,r,n,o,c){var l=t.getTypeChecker(),_=e.findTokenOnLeftOfPosition(r,n);if(_){var d=!!o&&"characterTyped"===o.kind;if(!d||!e.isInString(r,n,_)&&!e.isInComment(r,n)){var f=function(t,r,n){for(var i=function(t){e.Debug.assert(e.rangeContainsRange(t.parent,t),"Not a subspan",function(){return"Child: "+e.Debug.showSyntaxKind(t)+", parent: "+e.Debug.showSyntaxKind(t.parent)});var i=a(t,r,n);if(i)return{value:i}},o=t;!e.isBlock(o)&&!e.isSourceFile(o);o=o.parent){var s=i(o);if("object"===p(s))return s.value}}(_,n,r);if(f){c.throwIfCancellationRequested();var m=function(t,r,n,a,o){var s=t.invocation;if(0===s.kind){if(o){if(!e.isCallOrNewExpression(s.node))return;var c=s.node.getChildren(n);switch(a.kind){case 19:if(!e.contains(c,a))return;break;case 26:var u=e.findContainingList(a);if(!u||!e.contains(c,e.findContainingList(a)))return;break;case 27:if(!i(a,n,s.node.expression))return;break;default:return}}var l=[],_=r.getResolvedSignature(s.node,l,t.argumentCount);return 0===l.length?void 0:{candidates:l,resolvedSignature:_}}if(1===s.kind){if(o&&!i(a,n,s.called))return;var l=e.getPossibleGenericSignatures(s.called,t.argumentCount,r);return 0===l.length?void 0:{candidates:l,resolvedSignature:e.first(l)}}e.Debug.assertNever(s)}(f,l,r,_,d);return c.throwIfCancellationRequested(),m?l.runWithCancellationToken(c,function(e){return u(m.candidates,m.resolvedSignature,f,r,e)}):e.isSourceFileJavaScript(r)?function(t,r,n){var i=s(t.invocation),a=e.isIdentifier(i)?i:e.isPropertyAccessExpression(i)?i.name:void 0;if(a&&a.escapedText)for(var o=r.getTypeChecker(),c=function(e){var r=e.getNamedDeclarations(),i=r.get(a.text);if(i)for(var s=function(r){var i=r.symbol;if(i){var a=o.getTypeOfSymbolAtLocation(i,r);if(a){var s=a.getCallSignatures();if(s&&s.length)return{value:o.runWithCancellationToken(n,function(r){return u(s,s[0],t,e,r)})}}}},c=0,l=i;c0?e.map(u,b):e.emptyArray,s.push(e.punctuationPart(29));var l=e.mapToDisplayParts(function(r){var n=t.thisParameter?[a.symbolToParameterDeclaration(t.thisParameter,p,c)]:[],o=e.createNodeArray(n.concat(t.parameters.map(function(e){return a.symbolToParameterDeclaration(e,p,c)})));g.writeList(1296,o,i,r)});e.addRange(s,l)}else{n=t.hasRestParameter;var _=e.mapToDisplayParts(function(r){if(t.typeParameters&&t.typeParameters.length){var n=e.createNodeArray(t.typeParameters.map(function(e){return a.typeParameterToDeclaration(e,p)}));g.writeList(26896,n,i,r)}});e.addRange(o,_),o.push(e.punctuationPart(19)),r=e.map(t.parameters,v),s.push(e.punctuationPart(20))}var f=e.mapToDisplayParts(function(e){e.writePunctuation(":"),e.writeSpace(" ");var r=a.getTypePredicateOfSignature(t);r?a.writeTypePredicate(r,p,void 0,e):a.writeType(a.getReturnTypeOfSignature(t),p,void 0,e)});return e.addRange(s,f),{isVariadic:n,prefixDisplayParts:o,suffixDisplayParts:s,separatorDisplayParts:[e.punctuationPart(26),e.spacePart()],parameters:r,documentation:t.getDocumentationComment(a),tags:t.getJsDocTags()}});0!==_&&e.Debug.assertLessThan(_,o);var h=t.indexOf(r);return e.Debug.assert(-1!==h),{items:y,applicableSpan:u,selectedItemIndex:h,argumentIndex:_,argumentCount:o};function v(t){var r=e.mapToDisplayParts(function(e){var r=a.symbolToParameterDeclaration(t,p,c);g.writeNode(4,r,i,e)});return{name:t.name,documentation:t.getDocumentationComment(a),displayParts:r,isOptional:a.isOptionalParameter(t.valueDeclaration)}}function b(t){var r=e.mapToDisplayParts(function(e){var r=a.typeParameterToDeclaration(t,p);g.writeNode(4,r,i,e)});return{name:t.symbol.name,documentation:e.emptyArray,displayParts:r,isOptional:!1}}}}(e.SignatureHelp||(e.SignatureHelp={}))}(s||(s={})),function(e){var t=/^\/\/[@#] source[M]appingURL=(.+)\s*$/,r=/^\s*(\/\/[@#] .*)?$/,n=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/;e.getSourceMapper=function(i,a,o,s,c){var u;return{tryGetOriginalLocation:function t(r){if(e.isDeclarationFileName(r.fileName)){var n=d(r.fileName);if(n){var i=_(r.fileName,n).getOriginalPosition(r);return i===r?void 0:t(i)||i}}},tryGetGeneratedLocation:function(t){var r=c(),n=e.getDeclarationEmitOutputFilePathWorker(t.fileName,r.getCompilerOptions(),a,r.getCommonSourceDirectory(),i);if(void 0!==n){var o=d(n);if(o){var s=_(n,o).getGeneratedPosition(t);return s===t?void 0:s}}},toLineColumnOffset:function(t,r){var n=e.toPath(t,a,i);return(c().getSourceFile(n)||u.get(n)).getLineAndCharacterOfPosition(r)},clearCache:function(){u=e.createSourceFileLikeCache(s)}};function l(t,r,n){var a;try{a=JSON.parse(r)}catch(e){}return a&&a.sources&&a.file&&a.mappings?t.sourceMapper=e.sourcemaps.decode({readFile:function(e){return s.readFile(e)},fileExists:function(e){return s.fileExists(e)},getCanonicalFileName:i,log:o},n,a,c(),u):t.sourceMapper=e.sourcemaps.identitySourceMapper}function _(o,c){if(!s.readFile||!s.fileExists)return c.sourceMapper=e.sourcemaps.identitySourceMapper;if(c.sourceMapper)return c.sourceMapper;var _=function(n){var o=u.get(e.toPath(n,a,i));if(o)for(var s=e.getLineStarts(o),c=s.length-1;c>=0;c--){var l=o.text.substring(s[c],s[c+1]),_=t.exec(l);if(_)return _[1];if(!l.match(r))break}}(o);if(_){var d=n.exec(_);if(d){if(d[1]){var p=d[1];return l(c,e.base64decode(e.sys,p),o)}_=void 0}}var f=[];_&&f.push(_),f.push(o+".map");for(var m=0,g=f;m0&&o.push(e.createDiagnosticForNode(e.isVariableDeclaration(n.parent)?n.parent.name:n,e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration))}else{if(e.isVariableStatement(n)&&n.parent===r&&2&n.declarationList.flags&&1===n.declarationList.declarations.length){var u=n.declarationList.declarations[0].initializer;u&&e.isRequireCall(u,!0)&&o.push(e.createDiagnosticForNode(u,e.Diagnostics.require_call_may_be_converted_to_an_import))}e.codefix.parameterShouldGetTypeFromJSDoc(n)&&o.push(e.createDiagnosticForNode(n.name||n,e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types))}n.forEachChild(t)}(r),e.getAllowSyntheticDefaultImports(n.getCompilerOptions()))for(var c=0,u=r.imports;c0?e.getNodeModifiers(t.declarations[0]):"",n=t&&16777216&t.flags?"optional":"";return r&&n?r+","+n:r||n},t.getSymbolDisplayPartsDocumentationAndSymbolKind=function t(i,a,o,s,c,u,l){void 0===u&&(u=e.getMeaningFromLocation(c));var _,d,p,f,m,g,y=[],h=e.getCombinedLocalAndExportSymbolFlags(a),v=n(i,a,c),b=!1,x=99===c.kind&&e.isExpression(c);if(""!==v||32&h||2097152&h){"getter"!==v&&"setter"!==v||(v="property");var S=void 0;if(p=x?i.getTypeAtLocation(c):i.getTypeOfSymbolAtLocation(a.exportSymbol||a,c),c.parent&&187===c.parent.kind){var D=c.parent.name;(D===c||D&&0===D.getFullWidth())&&(c=c.parent)}var k=void 0;if(e.isCallOrNewExpression(c)?k=c:e.isCallExpressionTarget(c)||e.isNewExpressionTarget(c)?k=c.parent:c.parent&&e.isJsxOpeningLikeElement(c.parent)&&e.isFunctionLike(a.valueDeclaration)&&(k=c.parent),k){S=i.getResolvedSignature(k,[]);var T=190===k.kind||e.isCallExpression(k)&&97===k.expression.kind,C=T?p.getConstructSignatures():p.getCallSignatures();if(e.contains(C,S.target)||e.contains(C,S)||(S=C.length?C[0]:void 0),S){switch(T&&32&h?(v="constructor",H(p.symbol,v)):2097152&h?(G(v="alias"),y.push(e.spacePart()),T&&(y.push(e.keywordPart(94)),y.push(e.spacePart())),W(a)):H(a,v),v){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":y.push(e.punctuationPart(56)),y.push(e.spacePart()),16&e.getObjectFlags(p)||!p.symbol||(e.addRange(y,e.symbolToDisplayParts(i,p.symbol,s,void 0,5)),y.push(e.lineBreakPart())),T&&(y.push(e.keywordPart(94)),y.push(e.spacePart())),X(S,C,262144);break;default:X(S,C)}b=!0}}else if(e.isNameOfFunctionDeclaration(c)&&!(98304&h)||123===c.kind&&155===c.parent.kind){var E=c.parent;e.find(a.declarations,function(e){return e===(123===c.kind?E.parent:E)})&&(C=155===E.kind?p.getNonNullableType().getConstructSignatures():p.getNonNullableType().getCallSignatures(),S=i.isImplementationOfOverload(E)?C[0]:i.getSignatureFromDeclaration(E),155===E.kind?(v="constructor",H(p.symbol,v)):H(158!==E.kind||2048&p.symbol.flags||4096&p.symbol.flags?a:p.symbol,v),X(S,C),b=!0)}}if(32&h&&!b&&!x&&(q(),e.getDeclarationOfKind(a,207)?G("local class"):y.push(e.keywordPart(75)),y.push(e.spacePart()),W(a),Q(a,o)),64&h&&2&u&&(U(),y.push(e.keywordPart(109)),y.push(e.spacePart()),W(a),Q(a,o)),524288&h&&(U(),y.push(e.keywordPart(139)),y.push(e.spacePart()),W(a),Q(a,o),y.push(e.spacePart()),y.push(e.operatorPart(58)),y.push(e.spacePart()),e.addRange(y,e.typeToDisplayParts(i,i.getDeclaredTypeOfSymbol(a),s,8388608))),384&h&&(U(),e.some(a.declarations,function(t){return e.isEnumDeclaration(t)&&e.isEnumConst(t)})&&(y.push(e.keywordPart(76)),y.push(e.spacePart())),y.push(e.keywordPart(83)),y.push(e.spacePart()),W(a)),1536&h){U();var N=(J=e.getDeclarationOfKind(a,242))&&J.name&&71===J.name.kind;y.push(e.keywordPart(N?130:129)),y.push(e.spacePart()),W(a)}if(262144&h&&2&u)if(U(),y.push(e.punctuationPart(19)),y.push(e.textPart("type parameter")),y.push(e.punctuationPart(20)),y.push(e.spacePart()),W(a),a.parent)V(),W(a.parent,s),Q(a.parent,s);else{var A=e.getDeclarationOfKind(a,148);if(void 0===A)return e.Debug.fail();(J=A.parent)&&(e.isFunctionLikeKind(J.kind)?(V(),S=i.getSignatureFromDeclaration(J),159===J.kind?(y.push(e.keywordPart(94)),y.push(e.spacePart())):158!==J.kind&&J.name&&W(J.symbol),e.addRange(y,e.signatureToDisplayParts(i,S,o,32))):240===J.kind&&(V(),y.push(e.keywordPart(139)),y.push(e.spacePart()),W(J.symbol),Q(J.symbol,o)))}if(8&h&&(v="enum member",H(a,"enum member"),276===(J=a.declarations[0]).kind)){var P=i.getConstantValue(J);void 0!==P&&(y.push(e.spacePart()),y.push(e.operatorPart(58)),y.push(e.spacePart()),y.push(e.displayPart(e.getTextOfConstantValue(P),"number"==typeof P?e.SymbolDisplayPartKind.numericLiteral:e.SymbolDisplayPartKind.stringLiteral)))}if(2097152&h){if(U(),!b){var w=i.getAliasedSymbol(a);if(w!==a&&w.declarations&&w.declarations.length>0){var F=w.declarations[0],I=e.getNameOfDeclaration(F);if(I){var O=e.isModuleWithStringLiteralName(F)&&e.hasModifier(F,2),M="default"!==a.name&&!O,L=t(i,w,e.getSourceFileOfNode(F),F,I,u,M?a:w);y.push.apply(y,L.displayParts),y.push(e.lineBreakPart()),m=L.documentation,g=L.tags}}}switch(a.declarations[0].kind){case 245:y.push(e.keywordPart(84)),y.push(e.spacePart()),y.push(e.keywordPart(130));break;case 252:y.push(e.keywordPart(84)),y.push(e.spacePart()),y.push(e.keywordPart(a.declarations[0].isExportEquals?58:79));break;case 255:y.push(e.keywordPart(84));break;default:y.push(e.keywordPart(91))}y.push(e.spacePart()),W(a),e.forEach(a.declarations,function(t){if(246===t.kind){var r=t;if(e.isExternalModuleImportEqualsDeclaration(r))y.push(e.spacePart()),y.push(e.operatorPart(58)),y.push(e.spacePart()),y.push(e.keywordPart(133)),y.push(e.punctuationPart(19)),y.push(e.displayPart(e.getTextOfNode(e.getExternalModuleImportEqualsDeclarationExpression(r)),e.SymbolDisplayPartKind.stringLiteral)),y.push(e.punctuationPart(20));else{var n=i.getSymbolAtLocation(r.moduleReference);n&&(y.push(e.spacePart()),y.push(e.operatorPart(58)),y.push(e.spacePart()),W(n,s))}return!0}})}if(!b)if(""!==v){if(p)if(x?(U(),y.push(e.keywordPart(99))):H(a,v),"property"===v||"JSX attribute"===v||3&h||"local var"===v||x)if(y.push(e.punctuationPart(56)),y.push(e.spacePart()),p.symbol&&262144&p.symbol.flags){var R=e.mapToDisplayParts(function(t){var r=i.typeParameterToDeclaration(p,s);K().writeNode(4,r,e.getSourceFileOfNode(e.getParseTreeNode(s)),t)});e.addRange(y,R)}else e.addRange(y,e.typeToDisplayParts(i,p,s));else(16&h||8192&h||16384&h||131072&h||98304&h||"method"===v)&&(C=p.getNonNullableType().getCallSignatures()).length&&X(C[0],C)}else v=r(i,a,c);if(!_&&(_=a.getDocumentationComment(i),d=a.getJsDocTags(),0===_.length&&4&h&&a.parent&&e.forEach(a.parent.declarations,function(e){return 277===e.kind})))for(var B=0,j=a.declarations;B0))break}}return 0===_.length&&m&&(_=m),0===d.length&&g&&(d=g),{displayParts:y,documentation:_,symbolKind:v,tags:d};function K(){return f||(f=e.createPrinter({removeComments:!0})),f}function U(){y.length&&y.push(e.lineBreakPart()),q()}function q(){l&&(G("alias"),y.push(e.spacePart()))}function V(){y.push(e.spacePart()),y.push(e.keywordPart(92)),y.push(e.spacePart())}function W(t,r){l&&t===a&&(t=l);var n=e.symbolToDisplayParts(i,t,r||o,void 0,7);e.addRange(y,n),16777216&a.flags&&y.push(e.punctuationPart(55))}function H(t,r){U(),r&&(G(r),t&&!e.some(t.declarations,function(t){return e.isArrowFunction(t)||(e.isFunctionExpression(t)||e.isClassExpression(t))&&!t.name})&&(y.push(e.spacePart()),W(t)))}function G(t){switch(t){case"var":case"function":case"let":case"const":case"constructor":return void y.push(e.textOrKeywordPart(t));default:return y.push(e.punctuationPart(19)),y.push(e.textOrKeywordPart(t)),void y.push(e.punctuationPart(20))}}function X(t,r,n){void 0===n&&(n=0),e.addRange(y,e.signatureToDisplayParts(i,t,s,32|n)),r.length>1&&(y.push(e.spacePart()),y.push(e.punctuationPart(19)),y.push(e.operatorPart(37)),y.push(e.displayPart((r.length-1).toString(),e.SymbolDisplayPartKind.numericLiteral)),y.push(e.spacePart()),y.push(e.textPart(2===r.length?"overload":"overloads")),y.push(e.punctuationPart(20))),_=t.getDocumentationComment(i),d=t.getJsDocTags()}function Q(t,r){var n=e.mapToDisplayParts(function(n){var a=i.symbolToTypeParameterDeclarations(t,r);K().writeList(26896,a,e.getSourceFileOfNode(e.getParseTreeNode(r)),n)});e.addRange(y,n)}}}(e.SymbolDisplay||(e.SymbolDisplay={}))}(s||(s={})),function(e){function t(t,r){var i=[],a=r.compilerOptions?n(r.compilerOptions,i):e.getDefaultCompilerOptions();a.isolatedModules=!0,a.suppressOutputPathCheck=!0,a.allowNonTsExtensions=!0,a.noLib=!0,a.lib=void 0,a.types=void 0,a.noEmit=void 0,a.noEmitOnError=void 0,a.paths=void 0,a.rootDirs=void 0,a.declaration=void 0,a.declarationDir=void 0,a.out=void 0,a.outFile=void 0,a.noResolve=!0;var o=r.fileName||(a.jsx?"module.tsx":"module.ts"),s=e.createSourceFile(o,t,a.target);r.moduleName&&(s.moduleName=r.moduleName),r.renamedDependencies&&(s.renamedDependencies=e.createMapFromTemplate(r.renamedDependencies));var c,u,l=e.getNewLineCharacter(a),_={getSourceFile:function(t){return t===e.normalizePath(o)?s:void 0},writeFile:function(t,r){e.fileExtensionIs(t,".map")?(e.Debug.assertEqual(u,void 0,"Unexpected multiple source map outputs, file:",t),u=r):(e.Debug.assertEqual(c,void 0,"Unexpected multiple outputs, file:",t),c=r)},getDefaultLibFileName:function(){return"lib.d.ts"},useCaseSensitiveFileNames:function(){return!1},getCanonicalFileName:function(e){return e},getCurrentDirectory:function(){return""},getNewLine:function(){return l},fileExists:function(e){return e===o},readFile:function(){return""},directoryExists:function(){return!0},getDirectories:function(){return[]}},d=e.createProgram([o],a,_);return r.reportDiagnostics&&(e.addRange(i,d.getSyntacticDiagnostics(s)),e.addRange(i,d.getOptionsDiagnostics())),d.emit(void 0,void 0,void 0,void 0,r.transformers),void 0===c?e.Debug.fail("Output generation failed"):{outputText:c,diagnostics:i,sourceMapText:u}}var r;function n(t,n){r=r||e.filter(e.optionDeclarations,function(t){return"object"===p(t.type)&&!e.forEachEntry(t.type,function(e){return"number"!=typeof e})}),t=e.cloneCompilerOptions(t);for(var i=function(r){if(!e.hasProperty(t,r.name))return"continue";var i=t[r.name];e.isString(i)?t[r.name]=e.parseCustomTypeOption(r,i,n):e.forEachEntry(r.type,function(e){return e===i})||n.push(e.createCompilerDiagnosticForInvalidCustomType(r))},a=0,o=r;a>=a;return r}(f,p),0,n),c[u]=(d=1+((l=f)>>(_=p)&o),e.Debug.assert((d&o)===d,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),l&~(o<<_)|d<<_)}!function(e){e[e.IgnoreRulesSpecific=0]="IgnoreRulesSpecific",e[e.IgnoreRulesAny=1*a]="IgnoreRulesAny",e[e.ContextRulesSpecific=2*a]="ContextRulesSpecific",e[e.ContextRulesAny=3*a]="ContextRulesAny",e[e.NoContextRulesSpecific=4*a]="NoContextRulesSpecific",e[e.NoContextRulesAny=5*a]="NoContextRulesAny"}(i||(i={}))}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(t){var r,n,i,a,o;function s(t,r,n){var i=e.findPrecedingToken(t,n);return i&&i.kind===r&&t===i.getEnd()?i:void 0}function c(e){for(var t=e;t&&t.parent&&t.parent.end===e.end&&!u(t.parent,t);)t=t.parent;return t}function u(t,r){switch(t.kind){case 238:case 239:return e.rangeContainsRange(t.members,r);case 242:var n=t.body;return!!n&&243===n.kind&&e.rangeContainsRange(n.statements,r);case 277:case 216:case 243:return e.rangeContainsRange(t.statements,r);case 272:return e.rangeContainsRange(t.block.statements,r)}return!1}function l(t,r,n,i){return t?_({pos:e.getLineStartPositionForPosition(t.getStart(r),r),end:t.end},r,n,i):[]}function _(r,n,i,a){var o=function(t,r){return function n(i){var a=e.forEachChild(i,function(n){return e.startEndContainsRange(n.getStart(r),n.end,t)&&n});if(a){var o=n(a);if(o)return o}return i}(r)}(r,n);return t.getFormattingScanner(n.text,n.languageVariant,function(t,r,n){var i=t.getStart(n);if(i===r.pos&&t.end===r.end)return i;var a=e.findPrecedingToken(r.pos,n);return a?a.end>=r.pos?t.pos:a.end:t.pos}(o,r,n),r.end,function(s){return d(r,o,t.SmartIndenter.getIndentationForNode(o,r,n,i.options),function(e,r,n){for(var i,a=-1;e;){var o=n.getLineAndCharacterOfPosition(e.getStart(n)).line;if(-1!==a&&o!==a)break;if(t.SmartIndenter.shouldIndentChildNode(r,e,i,n))return r.indentSize;a=o,i=e,e=e.parent}return 0}(o,i.options,n),s,i,a,function(t,r){if(!t.length)return a;var n=t.filter(function(t){return e.rangeOverlapsWithStartEnd(r,t.start,t.start+t.length)}).sort(function(e,t){return e.start-t.start});if(!n.length)return a;var i=0;return function(t){for(;;){if(i>=n.length)return!1;var r=n[i];if(t.end<=r.start)return!1;if(e.startEndOverlapsWithStartEnd(t.pos,t.end,r.start,r.start+r.length))return!0;i++}};function a(){return!1}}(n.parseDiagnostics,r),n)})}function d(r,n,i,a,o,s,c,u,l){var _,d,f,m,g,y=s.options,h=s.getRule,v=new t.FormattingContext(l,c,y),b=[];if(o.advance(),o.isOnToken()){var x=l.getLineAndCharacterOfPosition(n.getStart(l)).line,S=x;n.decorators&&(S=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(n,l)).line),function n(i,a,s,c,d,p){if(!e.rangeOverlapsWithStartEnd(r,i.getStart(l),i.getEnd()))return;var f=T(i,s,d,p);var h=a;e.forEachChild(i,function(e){b(e,-1,i,f,s,c,!1)},function(t){!function(t,r,n,a){e.Debug.assert(e.isNodeArray(t));var s=function(e,t){switch(e.kind){case 155:case 237:case 194:case 154:case 153:case 195:if(e.typeParameters===t)return 27;if(e.parameters===t)return 19;break;case 189:case 190:if(e.typeArguments===t)return 27;if(e.arguments===t)return 19;break;case 162:if(e.typeArguments===t)return 27}return 0}(r,t),c=a,u=n;if(0!==s)for(;o.isOnToken();){var _=o.readTokenInfo(r);if(_.token.end>t.pos)break;if(_.token.kind===s){u=l.getLineAndCharacterOfPosition(_.token.pos).line;var d=k(_.token,u,-1,r,a,n);c=T(r,n,d.indentation,d.delta),x(_,r,c,r)}else x(_,r,a,r)}for(var p=-1,f=0;fi.end)break;x(v,i,f,i)}function b(a,s,c,u,_,d,p,f){var m=a.getStart(l),g=l.getLineAndCharacterOfPosition(m).line,v=g;a.decorators&&(v=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(a,l)).line);var b=-1;if(p&&e.rangeContainsRange(r,c)&&-1!==(b=function(r,n,i,a,o){if(e.rangeOverlapsWithStartEnd(a,r,n)||e.rangeContainsStartEnd(a,r,n)){if(-1!==o)return o}else{var s=l.getLineAndCharacterOfPosition(r).line,c=e.getLineStartPositionForPosition(r,l),u=t.SmartIndenter.findFirstNonWhitespaceColumn(c,r,l,y);if(s!==i||r===u){var _=t.SmartIndenter.getBaseIndentation(y);return _>u?_:u}}return-1}(m,a.end,_,r,s))&&(s=b),!e.rangeOverlapsWithStartEnd(r,a.pos,a.end))return a.endm)break;x(S,i,u,i)}if(!o.isOnToken())return s;if(e.isToken(a)&&10!==a.kind){var S=o.readTokenInfo(a);return e.Debug.assert(S.token.end===a.end,"Token end is child end"),x(S,i,u,a),s}var D=150===a.kind?g:d,T=k(a,g,b,i,u,D);if(n(a,h,g,v,T.indentation,T.delta),10===a.kind){var C={pos:a.getStart(),end:a.getEnd()};A(C,T.indentation,!0,!1)}return h=i,f&&185===c.kind&&-1===s&&(s=T.indentation),s}function x(t,n,i,a){e.Debug.assert(e.rangeContainsRange(n,t.token));var s=o.lastTrailingTriviaWasNewLine(),c=!1;t.leadingTrivia&&C(t.leadingTrivia,n,h,i);var d=0,p=e.rangeContainsRange(r,t.token),f=l.getLineAndCharacterOfPosition(t.token.pos);if(p){var y=u(t.token),v=_;if(d=E(t.token,f,n,h,i),!y)if(0===d){var b=v&&l.getLineAndCharacterOfPosition(v.end).line;c=s&&f.line!==b}else c=1===d}if(t.trailingTrivia&&C(t.trailingTrivia,n,h,i),c){var x=p&&!u(t.token)?i.getIndentationForToken(f.line,t.token.kind,a):-1,S=!0;if(t.leadingTrivia)for(var D=i.getIndentationForComment(t.token.kind,x,a),k=0,T=t.leadingTrivia;k0){var D=p(S,y);I(b,x.character,D)}else F(b,x.character)}}}}else i||N(r.pos,n,!1)}function P(t,r,n){for(var i=t;io)){var s=w(a,o);-1!==s&&(e.Debug.assert(s===a||!e.isWhiteSpaceSingleLine(l.text.charCodeAt(s-1))),F(s,o+1-s))}}}function w(t,r){for(var n=r;n>=t&&e.isWhiteSpaceSingleLine(l.text.charCodeAt(n));)n--;return n!==r?n+1:-1}function F(t,r){r&&b.push(e.createTextChangeFromStartLength(t,r,""))}function I(t,r,n){(r||n)&&b.push(e.createTextChangeFromStartLength(t,r,n))}}function p(t,r){if((!i||i.tabSize!==r.tabSize||i.indentSize!==r.indentSize)&&(i={tabSize:r.tabSize,indentSize:r.indentSize},a=o=void 0),r.convertTabsToSpaces){var n=void 0,s=Math.floor(t/r.indentSize),c=t%r.indentSize;return o||(o=[]),void 0===o[s]?(n=e.repeatString(" ",r.indentSize*s),o[s]=n):n=o[s],c?n+e.repeatString(" ",c):n}var u=Math.floor(t/r.tabSize),l=t-u*r.tabSize,_=void 0;return a||(a=[]),void 0===a[u]?a[u]=_=e.repeatString("\t",u):_=a[u],l?_+e.repeatString(" ",l):_}!function(e){e[e.Unknown=-1]="Unknown"}(r||(r={})),t.formatOnEnter=function(t,r,n){var i=r.getLineAndCharacterOfPosition(t).line;if(0===i)return[];for(var a=e.getEndLinePosition(i,r);e.isWhiteSpaceSingleLine(r.text.charCodeAt(a));)a--;return e.isLineBreak(r.text.charCodeAt(a))&&a--,_({pos:e.getStartPositionOfLine(i-1,r),end:a+1},r,n,2)},t.formatOnSemicolon=function(e,t,r){return l(c(s(e,25,t)),t,r,3)},t.formatOnOpeningCurly=function(t,r,n){var i=s(t,17,r);if(!i)return[];var a=c(i.parent);return _({pos:e.getLineStartPositionForPosition(a.getStart(r),r),end:t},r,n,4)},t.formatOnClosingCurly=function(e,t,r){return l(c(s(e,18,t)),t,r,5)},t.formatDocument=function(e,t){return _({pos:0,end:e.text.length},e,t,0)},t.formatSelection=function(t,r,n,i){return _({pos:e.getLineStartPositionForPosition(t,n),end:r},n,i,1)},t.formatNodeGivenIndentation=function(e,r,n,i,a,o){var s={pos:0,end:r.text.length};return t.getFormattingScanner(r.text,n,s.pos,s.end,function(t){return d(s,e,i,a,t,o,1,function(e){return!1},r)})},function(e){e[e.None=0]="None",e[e.LineAdded=1]="LineAdded",e[e.LineRemoved=2]="LineRemoved"}(n||(n={})),t.getRangeOfEnclosingComment=function(t,r,n,i){void 0===i&&(i=e.getTokenAtPosition(t,r));var a=e.findAncestor(i,e.isJSDoc);if(a&&(i=a.parent),!(i.getStart(t)<=r&&rr.end}if(p)if(-1!==(v=m(e,i,u)))return v+n;var y=s(l,e,i),h=y.line===t.line||d(l,e,t.line,i);if(p){var v;if(-1!==(v=c(e,l,t,h,i,u)))return v+n;if(-1!==(v=g(e,i,u)))return v+n}S(u,l,e,i,o)&&!h&&(n+=u.indentSize);var b=_(l,e,t.line,i);l=(e=l).parent,t=b?i.getLineAndCharacterOfPosition(e.getStart(i)):y}return n+a(u)}function s(e,t,r){var n=f(t,r),i=n?n.pos:e.getStart(r);return r.getLineAndCharacterOfPosition(i)}function c(t,r,n,i,a,o){return(e.isDeclaration(t)||e.isStatementButNotDeclaration(t))&&(277===r.kind||!i)?h(n,a,o):-1}function u(t,r,n,i){var a=e.findNextToken(t,r,i);return a?17===a.kind?1:18===a.kind&&n===l(a,i).line?2:0:0}function l(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function _(t,r,n,i){if(!e.isCallExpression(t)||!e.contains(t.arguments,r))return!1;var a=t.expression.getEnd();return e.getLineAndCharacterOfPosition(i,a).line===n}function d(t,r,n,i){if(220===t.kind&&t.elseStatement===r){var a=e.findChildOfKind(t,82,i);return e.Debug.assert(void 0!==a),l(a,i).line===n}return!1}function p(t,r,n){return t&&e.rangeContainsStartEnd(t,r,n)?t:void 0}function f(e,t){if(e.parent){var r=e.end;switch(e.parent.kind){case 162:return p(e.parent.typeArguments,e.getStart(t),r);case 186:return e.parent.properties;case 185:return e.parent.elements;case 237:case 194:case 195:case 154:case 153:case 158:case 155:case 164:case 159:var n=e.getStart(t);return p(e.parent.typeParameters,n,r)||p(e.parent.parameters,n,r);case 238:case 207:case 239:case 240:return p(e.parent.typeParameters,e.getStart(t),r);case 190:case 189:n=e.getStart(t);return p(e.parent.typeArguments,n,r)||p(e.parent.arguments,n,r);case 236:return p(e.parent.declarations,e.getStart(t),r);case 250:case 254:return p(e.parent.elements,e.getStart(t),r);case 182:case 183:return p(e.parent.elements,e.getStart(t),r)}}}function m(e,t,r){var n=f(e,t);if(n){var i=n.indexOf(e);if(-1!==i)return y(n,i,t,r)}return-1}function g(t,r,n){if(20===t.kind)return-1;if(t.parent&&e.isCallOrNewExpression(t.parent)&&t.parent.expression!==t){var i=t.parent.expression,a=function(e){for(;;)switch(e.kind){case 189:case 190:case 187:case 188:e=e.expression;break;default:return e}}(i);if(i===a)return-1;var o=r.getLineAndCharacterOfPosition(i.end),s=r.getLineAndCharacterOfPosition(a.end);return o.line===s.line?-1:h(o,r,n)}return-1}function y(t,r,n,i){e.Debug.assert(r>=0&&r=0;o--)if(26!==t[o].kind){if(n.getLineAndCharacterOfPosition(t[o].end).line!==a.line)return h(a,n,i);a=l(t[o],n)}return-1}function h(e,t,r){var n=t.getPositionOfLineAndCharacter(e.line,0);return b(n,n+e.character,t,r)}function v(t,r,n,i){for(var a=0,o=0,s=t;sn.text.length)return a(i);if(i.indentStyle===e.IndentStyle.None)return 0;var c=e.findPrecedingToken(r,n,void 0,!0),_=t.getRangeOfEnclosingComment(n,r,c||null);if(_&&3===_.kind)return function(t,r,n,i){var a=e.getLineAndCharacterOfPosition(t,r).line-1,o=e.getLineAndCharacterOfPosition(t,i.pos).line;if(e.Debug.assert(o>=0),a<=o)return b(e.getStartPositionOfLine(o,t),r,t,n);var s=e.getStartPositionOfLine(a,t),c=v(s,r,t,n),u=c.column,l=c.character;return 0===u?u:42===t.text.charCodeAt(s+l)?u-1:u}(n,r,i,_);if(!c)return a(i);if(e.isStringOrRegularExpressionOrTemplateLiteral(c.kind)&&c.getStart(n)<=r&&r0;){var a=t.text.charCodeAt(i);if(!e.isWhiteSpaceLike(a))break;i--}return b(e.getLineStartPositionForPosition(i,t),i,t,n)}(n,r,i);if(26===c.kind&&202!==c.parent.kind){var p=function(t,r,n){var i=e.findListItemInfo(t);return i&&i.listItemIndex>0?y(i.list.getChildren(),i.listItemIndex-1,r,n):-1}(c,n,i);if(-1!==p)return p}return function(t,r,n,i,s,c){for(var _,d=n;d;){if(e.positionBelongsToNode(d,r,t)&&S(c,d,_,t,!0)){var p=l(d,t),f=u(n,d,i,t),y=0!==f?s&&2===f?c.indentSize:0:i!==p.line?c.indentSize:0;return o(d,p,void 0,y,t,!0,c)}var h=m(d,t,c);if(-1!==h)return h;if(-1!==(h=g(d,t,c)))return h+c.indentSize;_=d,d=d.parent}return a(c)}(n,r,c,d,s,i)},r.getIndentationForNode=function(e,t,r,n){return o(e,r.getLineAndCharacterOfPosition(e.getStart(r)),t,0,r,!1,n)},r.getBaseIndentation=a,function(e){e[e.Unknown=0]="Unknown",e[e.OpenBrace=1]="OpenBrace",e[e.CloseBrace=2]="CloseBrace"}(i||(i={})),r.isArgumentAndStartLineOverlapsExpressionBeingCalled=_,r.childStartsOnTheSameLineWithElseInIfStatement=d,r.getContainingList=f,r.findFirstNonWhitespaceCharacterAndColumn=v,r.findFirstNonWhitespaceColumn=b,r.nodeWillIndentChild=x,r.shouldIndentChildNode=S}(t.SmartIndenter||(t.SmartIndenter={}))}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(t){function r(t){var r=t.__pos;return e.Debug.assert("number"==typeof r),r}function i(t,r){e.Debug.assert("number"==typeof r),t.__pos=r}function a(t){var r=t.__end;return e.Debug.assert("number"==typeof r),r}function o(t,r){e.Debug.assert("number"==typeof r),t.__end=r}var s,c;function u(t,r){return e.skipTrivia(t,r,!1,!0)}function l(e,t,r,n){return{pos:_(e,t,n,s.Start),end:d(e,r,n)}}function _(t,r,n,i){if(n.useNonAdjustedStartPosition)return r.getStart(t);var a=r.getFullStart(),o=r.getStart(t);if(a===o)return o;var c=e.getLineStartPositionForPosition(a,t);if(e.getLineStartPositionForPosition(o,t)===c)return i===s.Start?o:a;var l=a>0?1:0,_=e.getStartPositionOfLine(e.getLineOfLocalPosition(t,c)+l,t);return _=u(t.text,_),e.getStartPositionOfLine(e.getLineOfLocalPosition(t,_),t)}function d(t,r,n){var i=r.end;if(n.useNonAdjustedEndPosition||e.isExpression(r))return i;var a=e.skipTrivia(t.text,i,!0);return a!==i&&e.isLineBreak(t.text.charCodeAt(a-1))?a:i}function p(e,t){return!!t&&!!e.parent&&(26===t.kind||25===t.kind&&186===e.parent.kind)}!function(e){e[e.FullStart=0]="FullStart",e[e.Start=1]="Start"}(s=t.Position||(t.Position={})),t.useNonAdjustedPositions={useNonAdjustedStartPosition:!0,useNonAdjustedEndPosition:!0},function(e){e[e.Remove=0]="Remove",e[e.ReplaceWithSingleNode=1]="ReplaceWithSingleNode",e[e.ReplaceWithMultipleNodes=2]="ReplaceWithMultipleNodes",e[e.Text=3]="Text"}(c||(c={}));var f,m=function(){function r(t,r){this.newLineCharacter=t,this.formatContext=r,this.changes=[],this.newFiles=[],this.classesWithNodesInsertedAtStart=e.createMap(),this.deletedNodes=[]}return r.fromContext=function(t){return new r(e.getNewLineOrDefaultFromHost(t.host,t.formatContext.options),t.formatContext)},r.with=function(e,t){var n=r.fromContext(e);return t(n),n.getChanges()},r.prototype.deleteRange=function(e,t){return this.changes.push({kind:c.Remove,sourceFile:e,range:t}),this},r.prototype.delete=function(e,t){this.deletedNodes.push({sourceFile:e,node:t})},r.prototype.deleteModifier=function(t,r){this.deleteRange(t,{pos:r.getStart(t),end:e.skipTrivia(t.text,r.end,!0)})},r.prototype.deleteNodeRange=function(e,t,r,n){void 0===n&&(n={});var i=_(e,t,n,s.FullStart),a=d(e,r,n);return this.deleteRange(e,{pos:i,end:a}),this},r.prototype.deleteNodeRangeExcludingEnd=function(e,t,r,n){void 0===n&&(n={});var i=_(e,t,n,s.FullStart),a=void 0===r?e.text.length:_(e,r,n,s.FullStart);this.deleteRange(e,{pos:i,end:a})},r.prototype.replaceRange=function(e,t,r,n){return void 0===n&&(n={}),this.changes.push({kind:c.ReplaceWithSingleNode,sourceFile:e,range:t,options:n,node:r}),this},r.prototype.replaceNode=function(e,r,n,i){return void 0===i&&(i=t.useNonAdjustedPositions),this.replaceRange(e,l(e,r,r,i),n,i)},r.prototype.replaceNodeRange=function(e,r,n,i,a){void 0===a&&(a=t.useNonAdjustedPositions),this.replaceRange(e,l(e,r,n,a),i,a)},r.prototype.replaceRangeWithNodes=function(e,t,r,n){return void 0===n&&(n={}),this.changes.push({kind:c.ReplaceWithMultipleNodes,sourceFile:e,range:t,options:n,nodes:r}),this},r.prototype.replaceNodeWithNodes=function(e,r,n,i){return void 0===i&&(i=t.useNonAdjustedPositions),this.replaceRangeWithNodes(e,l(e,r,r,i),n,i)},r.prototype.replaceNodeRangeWithNodes=function(e,r,n,i,a){return void 0===a&&(a=t.useNonAdjustedPositions),this.replaceRangeWithNodes(e,l(e,r,n,a),i,a)},r.prototype.nextCommaToken=function(t,r){var n=e.findNextToken(r,r.parent,t);return n&&26===n.kind?n:void 0},r.prototype.replacePropertyAssignment=function(e,t,r){var n=this.nextCommaToken(e,t)?"":","+this.newLineCharacter;return this.replaceNode(e,t,r,{suffix:n})},r.prototype.insertNodeAt=function(t,r,n,i){void 0===i&&(i={}),this.replaceRange(t,e.createTextRange(r),n,i)},r.prototype.insertNodesAt=function(e,t,r,n){void 0===n&&(n={}),this.changes.push({kind:c.ReplaceWithMultipleNodes,sourceFile:e,options:n,nodes:r,range:{pos:t,end:t}})},r.prototype.insertNodeAtTopOfFile=function(t,r,n){var i=function(t){var r=t.text,n=e.getShebang(r),i=0;void 0!==n&&(i=n.length,u());var a=e.getLeadingCommentRanges(r,i);if(!a)return i;a.length&&3===a[0].kind&&e.isPinnedComment(r,a[0].pos)&&(i=a[0].end,u(),a=a.slice(1));for(var o=0,s=a;o"})},r.prototype.getOptionsForInsertNodeBefore=function(t,r){return e.isStatement(t)||e.isClassElement(t)?{suffix:r?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:e.isVariableDeclaration(t)?{suffix:", "}:e.isParameter(t)?{}:e.isStringLiteral(t)&&e.isImportDeclaration(t.parent)||e.isNamedImports(t)?{suffix:", "}:e.Debug.failBadSyntaxKind(t)},r.prototype.insertNodeAtConstructorStart=function(t,r,n){var i=e.firstOrUndefined(r.body.statements);i&&r.body.multiLine?this.insertNodeBefore(t,i,n):this.replaceConstructorBody(t,r,[n].concat(r.body.statements))},r.prototype.insertNodeAtConstructorEnd=function(t,r,n){var i=e.lastOrUndefined(r.body.statements);i&&r.body.multiLine?this.insertNodeAfter(t,i,n):this.replaceConstructorBody(t,r,r.body.statements.concat([n]))},r.prototype.replaceConstructorBody=function(t,r,n){this.replaceNode(t,r.body,e.createBlock(n,!0))},r.prototype.insertNodeAtEndOfScope=function(t,r,n){var i=_(t,r.getLastToken(),{},s.Start);this.replaceRange(t,{pos:i,end:i},n,{prefix:e.isLineBreak(t.text.charCodeAt(r.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})},r.prototype.insertNodeAtClassStart=function(t,r,i){var a=r.getStart(t),o=e.formatting.SmartIndenter.findFirstNonWhitespaceColumn(e.getLineStartPositionForPosition(a,t),a,t,this.formatContext.options)+this.formatContext.options.indentSize;this.insertNodeAt(t,r.members.pos,i,n({indentation:o},this.getInsertNodeAtClassStartPrefixSuffix(t,r)))},r.prototype.getInsertNodeAtClassStartPrefixSuffix=function(t,r){if(0===r.members.length){if(e.addToSeen(this.classesWithNodesInsertedAtStart,e.getNodeId(r),r)){var n=e.positionsAreOnSameLine.apply(void 0,y(r,t).concat([t]));return{prefix:this.newLineCharacter,suffix:n?this.newLineCharacter:""}}return{prefix:"",suffix:this.newLineCharacter}}return{prefix:this.newLineCharacter,suffix:""}},r.prototype.insertNodeAfterComma=function(e,t,r){var n=this.insertNodeAfterWorker(e,this.nextCommaToken(e,t)||t,r);this.insertNodeAt(e,n,r,this.getInsertNodeAfterOptions(e,t))},r.prototype.insertNodeAfter=function(e,t,r){var n=this.insertNodeAfterWorker(e,t,r);this.insertNodeAt(e,n,r,this.getInsertNodeAfterOptions(e,t))},r.prototype.insertNodeAtEndOfList=function(e,t,r){this.insertNodeAt(e,t.end,r,{prefix:", "})},r.prototype.insertNodesAfter=function(t,r,n){var i=this.insertNodeAfterWorker(t,r,e.first(n));this.insertNodesAt(t,i,n,this.getInsertNodeAfterOptions(t,r))},r.prototype.insertNodeAfterWorker=function(t,r,n){var i,a;return i=r,a=n,((e.isPropertySignature(i)||e.isPropertyDeclaration(i))&&e.isClassOrTypeElement(a)&&147===a.name.kind||e.isStatementButNotDeclaration(i)&&e.isStatementButNotDeclaration(a))&&59!==t.text.charCodeAt(r.end-1)&&this.replaceRange(t,e.createTextRange(r.end),e.createToken(25)),d(t,r,{})},r.prototype.getInsertNodeAfterOptions=function(t,r){var i=this.getInsertNodeAfterOptionsWorker(r);return n({},i,{prefix:r.end===t.end&&e.isStatement(r)?i.prefix?"\n"+i.prefix:"\n":i.prefix})},r.prototype.getInsertNodeAfterOptionsWorker=function(t){switch(t.kind){case 238:case 242:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 235:case 9:case 71:return{prefix:", "};case 273:return{suffix:","+this.newLineCharacter};case 84:return{prefix:" "};case 149:return{};default:return e.Debug.assert(e.isStatement(t)||e.isClassOrTypeElement(t)),{suffix:this.newLineCharacter}}},r.prototype.insertName=function(t,r,n){if(e.Debug.assert(!r.name),195===r.kind){var i=e.findChildOfKind(r,36,t),a=e.findChildOfKind(r,19,t);a?(this.insertNodesAt(t,a.getStart(t),[e.createToken(89),e.createIdentifier(n)],{joiner:" "}),k(this,t,i)):(this.insertText(t,e.first(r.parameters).getStart(t),"function "+n+"("),this.replaceRange(t,i,e.createToken(20))),216!==r.body.kind&&(this.insertNodesAt(t,r.body.getStart(t),[e.createToken(17),e.createToken(96)],{joiner:" ",suffix:" "}),this.insertNodesAt(t,r.body.end,[e.createToken(25),e.createToken(18)],{joiner:" "}))}else{var o=e.findChildOfKind(r,194===r.kind?89:75,t).end;this.insertNodeAt(t,o,e.createIdentifier(n),{prefix:" "})}},r.prototype.insertExportModifier=function(e,t){this.insertText(e,t.getStart(e),"export ")},r.prototype.insertNodeInListAfter=function(t,r,n,i){if(void 0===i&&(i=e.formatting.SmartIndenter.getContainingList(r,t)),!i)return e.Debug.fail("node is not a list element"),this;var a=e.indexOfNode(i,r);if(a<0)return this;var o=r.getEnd();if(a!==i.length-1){var s=e.getTokenAtPosition(t,r.end);if(s&&p(r,s)){var c=e.getLineAndCharacterOfPosition(t,u(t.text,i[a+1].getFullStart())),l=e.getLineAndCharacterOfPosition(t,s.end),_=void 0,d=void 0;l.line===c.line?(d=s.end,_=function(e){for(var t="",r=0;r=0;n--){var i=r[n],a=i.span,o=i.newText;t=""+t.substring(0,a.start)+o+t.substring(e.textSpanEnd(a))}return t}function v(t){var n=e.visitEachChild(t,v,e.nullTransformationContext,b,v),i=e.nodeIsSynthesized(n)?n:Object.create(n);return i.pos=r(t),i.end=a(t),i}function b(t,n,i,o,s){var c=e.visitNodes(t,n,i,o,s);if(!c)return c;var u=c===t?e.createNodeArray(c.slice(0)):c;return u.pos=r(t),u.end=a(t),u}t.ChangeTracker=m,function(t){function r(t,r,n){var i=new S(n),a="\n"===n?1:0;return e.createPrinter({newLine:a},i).writeNode(4,t,r,i),{text:i.getText(),node:v(t)}}t.getTextChangesFromChanges=function(t,n,i,a){return e.group(t,function(e){return e.sourceFile.path}).map(function(t){for(var o=t[0].sourceFile,s=e.stableSort(t,function(e,t){return e.range.pos-t.range.pos||e.range.end-t.range.end}),u=function(t){e.Debug.assert(s[t].range.end<=s[t+1].range.pos,"Changes overlap",function(){return JSON.stringify(s[t].range)+" and "+JSON.stringify(s[t+1].range)})},l=0;l1?[[a(n),o(n)],!0]:[[o(n)],!0]:[[a(n)],!1]}(l.arguments[0],r):void 0;return p?(i.replaceNodeWithNodes(t,n.parent,p[0]),p[1]):(i.replaceRangeWithText(t,e.createTextRange(u.getStart(t),l.pos),"export default"),!0)}i.delete(t,n.parent)}else e.isExportsOrModuleExportsOrAlias(t,u.expression)&&function(t,r,n,i){var a=r.left.name.text,o=i.get(a);if(void 0!==o){var s=[_(void 0,o,r.right),d([e.createExportSpecifier(o,a)])];n.replaceNodeWithNodes(t,r.parent,s)}else!function(t,r,n){var i=t.left,a=t.right,o=t.parent,s=i.name.text;if(!(e.isFunctionExpression(a)||e.isArrowFunction(a)||e.isClassExpression(a))||a.name&&a.name.text!==s)n.replaceNodeRangeWithNodes(r,i.expression,e.findChildOfKind(i,23,r),[e.createToken(84),e.createToken(76)],{joiner:" ",suffix:" "});else{n.replaceRange(r,{pos:i.getStart(r),end:a.getStart(r)},e.createToken(84),{suffix:" "}),a.name||n.insertName(r,a,s);var c=e.findChildOfKind(o,25,r);c&&n.delete(r,c)}}(r,t,n)}(t,n,i,s);var f,m;return!1}(r,i,h,p,g)}default:return!1}}function a(e){return d(void 0,e)}function o(t){return d([e.createExportSpecifier(void 0,"default")],t)}function s(e,t){for(;t.original.has(e)||t.additional.has(e);)e="_"+e;return t.additional.set(e,!0),e}function c(t,r,n){return e.createFunctionDeclaration(e.getSynthesizedDeepClones(n.decorators),e.concatenate(r,e.getSynthesizedDeepClones(n.modifiers)),e.getSynthesizedDeepClone(n.asteriskToken),t,e.getSynthesizedDeepClones(n.typeParameters),e.getSynthesizedDeepClones(n.parameters),e.getSynthesizedDeepClone(n.type),e.convertToFunctionBody(e.getSynthesizedDeepClone(n.body)))}function u(t,r,n,i){return"default"===r?e.makeImport(e.createIdentifier(t),void 0,n,i):e.makeImport(void 0,[l(r,t)],n,i)}function l(t,r){return e.createImportSpecifier(void 0!==t&&t!==r?e.createIdentifier(t):void 0,e.createIdentifier(r))}function _(t,r,n){return e.createVariableStatement(t,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,n)],2))}function d(t,r){return e.createExportDeclaration(void 0,void 0,t&&e.createNamedExports(t),void 0===r?void 0:e.createLiteral(r))}t.registerCodeFix({errorCodes:[e.Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module.code],getCodeActions:function(a){var o=a.sourceFile,c=a.program,u=a.preferences,l=e.textChanges.ChangeTracker.with(a,function(t){if(function(t,r,a,o,c){var u={original:(_=t,d=e.createMultiMap(),function t(r,n){e.isIdentifier(r)&&function(e){var t=e.parent;switch(t.kind){case 187:return t.name!==e;case 184:case 251:return t.propertyName!==e;default:return!0}}(r)&&n(r),r.forEachChild(function(e){return t(e,n)})}(_,function(e){return d.add(e.text,e)}),d),additional:e.createMap()},l=function(t,r,i){var a=e.createMap();return n(t,function(t){var n=t.name,o=n.text,c=n.originalKeywordKind;!a.has(o)&&(void 0!==c&&e.isNonContextualKeyword(c)||r.resolveName(t.name.text,t,67216319,!0))&&a.set(o,s("_"+o,i))}),a}(t,r,u);var _,d;!function(t,r,i){n(t,function(n,a){if(!a){var o=n.name.text;i.replaceNode(t,n,e.createIdentifier(r.get(o)||o))}})}(t,l,a);for(var p=!1,f=0,m=t.statements;fi&&t.delete(r,e.arguments[i])})}(t,r,n,a,i))}t.registerCodeFix({errorCodes:a,getCodeActions:function(a){var l=a.errorCode,d=a.sourceFile,p=a.program,f=p.getTypeChecker(),m=p.getSourceFiles(),g=e.getTokenAtPosition(d,a.span.start),y=o(g);if(y){var h=e.textChanges.ChangeTracker.with(a,function(e){return e.delete(d,y)});return[t.createCodeFixAction(r,h,[e.Diagnostics.Remove_import_from_0,e.showModuleSpecifier(y)],i,e.Diagnostics.Delete_all_unused_declarations)]}var v=e.textChanges.ChangeTracker.with(a,function(e){return s(g,e,d,f,m,!1)});if(v.length)return[t.createCodeFixAction(r,v,e.Diagnostics.Remove_destructuring,i,e.Diagnostics.Delete_all_unused_declarations)];var b=e.textChanges.ChangeTracker.with(a,function(e){return c(d,g,e)});if(b.length)return[t.createCodeFixAction(r,b,e.Diagnostics.Remove_variable_statement,i,e.Diagnostics.Delete_all_unused_declarations)];var x=[],S=e.textChanges.ChangeTracker.with(a,function(e){return _(d,g,e,f,m,!1)});if(S.length){var D=e.isComputedPropertyName(g.parent)?g.parent:g;x.push(t.createCodeFixAction(r,S,[e.Diagnostics.Remove_declaration_for_Colon_0,D.getText(d)],i,e.Diagnostics.Delete_all_unused_declarations))}var k=e.textChanges.ChangeTracker.with(a,function(e){return u(e,l,d,g)});return k.length&&x.push(t.createCodeFixAction(r,k,[e.Diagnostics.Prefix_0_with_an_underscore,g.getText(d)],n,e.Diagnostics.Prefix_all_unused_declarations_with_where_possible)),x},fixIds:[n,i],getAllCodeActions:function(r){var d=r.sourceFile,p=r.program,f=p.getTypeChecker(),m=p.getSourceFiles();return t.codeFixAll(r,a,function(t,a){var p=e.getTokenAtPosition(d,a.start);switch(r.fixId){case n:e.isIdentifier(p)&&l(p)&&u(t,a.code,d,p);break;case i:var g=o(p);g?t.delete(d,g):s(p,t,d,f,m,!0)||c(d,p,t)||_(d,p,t,f,m,!0);break;default:e.Debug.fail(JSON.stringify(r.fixId))}})}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixUnreachableCode",n=[e.Diagnostics.Unreachable_code_detected.code];function i(t,r,n,i){var a=e.getTokenAtPosition(r,n),o=e.findAncestor(a,e.isStatement);e.Debug.assert(o.getStart(r)===a.getStart(r));var s=(e.isBlock(o.parent)?o.parent:o).parent;if(!e.isBlock(o.parent)||o===e.first(o.parent.statements))switch(s.kind){case 220:if(s.elseStatement){if(e.isBlock(o.parent))break;return void t.replaceNode(r,o,e.createBlock(e.emptyArray))}case 222:case 223:return void t.delete(r,s)}if(e.isBlock(o.parent)){var c=n+i,u=e.Debug.assertDefined(function(e,t){for(var r,n=0,i=e;ng.length)v(a.getSignatureFromDeclaration(c[c.length-1]),d,l,i(o));else e.Debug.assert(c.length===g.length),s(function(t,r,a,o,s){for(var c=t[0],u=t[0].minArgumentCount,l=!1,_=0,d=t;_=c.parameters.length&&(!p.hasRestParameter||c.hasRestParameter)&&(c=p)}var f=c.parameters.length-(c.hasRestParameter?1:0),m=c.parameters.map(function(e){return e.name}),g=n(f,m,void 0,u,!1);if(l){var y=e.createArrayTypeNode(e.createKeywordTypeNode(119)),h=e.createParameter(void 0,void 0,e.createToken(24),m[f]||"rest",f>=u?e.createToken(55):void 0,y,void 0);g.push(h)}return function(t,r,n,a,o,s,c){return e.createMethod(void 0,t,void 0,r,n?e.createToken(55):void 0,a,o,s,i(c))}(o,r,a,void 0,g,void 0,s)}(g,l,f,d,o))}}function v(t,n,i,o){var c=function(t,r,n,i,a,o,s){var c=t.signatureToSignatureDeclaration(r,154,n,256);if(!c)return;return c.decorators=void 0,c.modifiers=i,c.name=a,c.questionToken=o?e.createToken(55):void 0,c.body=s,c}(a,t,r,n,i,f,o);c&&s(c)}}function n(t,r,n,i,a){for(var o=[],s=0;s=i?e.createToken(55):void 0,a?void 0:n&&n[s]||e.createKeywordTypeNode(119),void 0);o.push(c)}return o}function i(t){return e.createBlock([e.createThrow(e.createNew(e.createIdentifier("Error"),void 0,[e.createLiteral("Method not implemented.","single"===t.quotePreference)]))],!0)}t.createMissingMemberNodes=function(e,t,n,i,a){for(var o=e.symbol.members,s=0,c=t;st&&(n?a=e.concatenate(a,e.map(c.argumentTypes.slice(t),function(e){return i.getBaseTypeOfLiteralType(e)})):a.push(i.getBaseTypeOfLiteralType(c.argumentTypes[t])))}if(a.length){var u=i.getWidenedType(i.getUnionType(a,2));return n?i.createArrayType(u):u}}function o(t,r){for(var n=[],a=0;a0;if(e.isBlock(t)&&!s&&0===i.size)return{body:e.createBlock(t.statements,!0),returnValueProperty:void 0};var c=!1,u=e.createNodeArray(e.isBlock(t)?t.statements.slice(0):[e.isStatement(t)?t:e.createReturn(t)]);if(s||i.size){var l=e.visitNodes(u,function t(a){if(!c&&228===a.kind&&s){var u=f(r,n);return a.expression&&(o||(o="__return"),u.unshift(e.createPropertyAssignment(o,e.visitNode(a.expression,t)))),1===u.length?e.createReturn(u[0].name):e.createReturn(e.createObjectLiteral(u))}var l=c;c=c||e.isFunctionLikeDeclaration(a)||e.isClassLike(a);var _=i.get(e.getNodeId(a).toString()),d=_?e.getSynthesizedDeepClone(_):e.visitEachChild(a,t,e.nullTransformationContext);return c=l,d}).slice();if(s&&!a&&e.isStatement(t)){var _=f(r,n);1===_.length?l.push(e.createReturn(_[0].name)):l.push(e.createReturn(e.createObjectLiteral(_)))}return{body:e.createBlock(l,!0),returnValueProperty:o}}return{body:e.createBlock(u,!0),returnValueProperty:void 0}}(t,a,u,d,!!(o.facts&i.HasReturn)),A=N.body,P=N.returnValueProperty;if(e.suppressLeadingAndTrailingTrivia(A),e.isClassLike(r)){var w=v?[]:[e.createToken(112)];o.facts&i.InStaticRegion&&w.push(e.createToken(115)),o.facts&i.IsAsyncFunction&&w.push(e.createToken(120)),E=e.createMethod(void 0,w.length?w:void 0,o.facts&i.IsGenerator?e.createToken(39):void 0,b,void 0,k,x,c,A)}else E=e.createFunctionDeclaration(void 0,o.facts&i.IsAsyncFunction?[e.createToken(120)]:void 0,o.facts&i.IsGenerator?e.createToken(39):void 0,b,k,x,c,A);var F=e.textChanges.ChangeTracker.fromContext(s),I=function(t,r){return e.find(function(t){if(e.isFunctionLikeDeclaration(t)){var r=t.body;if(e.isBlock(r))return r.statements}else{if(e.isModuleBlock(t)||e.isSourceFile(t))return t.statements;if(e.isClassLike(t))return t.members;e.assertTypeIsNever(t)}return e.emptyArray}(r),function(r){return r.pos>=t&&e.isFunctionLikeDeclaration(r)&&!e.isConstructorDeclaration(r)})}((m(o.range)?e.last(o.range):o.range).end,r);I?F.insertNodeBefore(s.file,I,E,!0):F.insertNodeAtEndOfScope(s.file,r,E);var O=[],M=function(t,r,n){var a=e.createIdentifier(n);if(e.isClassLike(t)){var o=r.facts&i.InStaticRegion?e.createIdentifier(t.name.text):e.createThis();return e.createPropertyAccess(o,a)}return a}(r,o,h),L=e.createCall(M,T,S);if(o.facts&i.IsGenerator&&(L=e.createYield(e.createToken(39),L)),o.facts&i.IsAsyncFunction&&(L=e.createAwait(L)),a.length&&!u)if(e.Debug.assert(!P),e.Debug.assert(!(o.facts&i.HasReturn)),1===a.length){var R=a[0];O.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedDeepClone(R.name),e.getSynthesizedDeepClone(R.type),L)],R.parent.flags)))}else{for(var B=[],j=[],J=a[0].parent.flags,z=!1,K=0,U=a;K0);for(var a=!0,o=0,s=i;ot)return n||i[0];if(a&&!e.isPropertyDeclaration(c)){if(void 0!==n)return c;a=!1}n=c}return void 0===n?e.Debug.fail():n}(b,r);m.insertNodeBefore(o.file,x,h,!0),m.replaceNode(o.file,t,v)}else{var S=e.createVariableDeclaration(l,p,f),D=function(t,r){for(var n;void 0!==t&&t!==r;){if(e.isVariableDeclaration(t)&&t.initializer===n&&e.isVariableDeclarationList(t.parent)&&t.parent.declarations.length>1)return t;n=t,t=t.parent}}(t,r);if(D){m.insertNodeBefore(o.file,D,S);var v=e.createIdentifier(l);m.replaceNode(o.file,t,v)}else if(219===t.parent.kind&&r===e.findAncestor(t,_)){var k=e.createVariableStatement(void 0,e.createVariableDeclarationList([S],2));m.replaceNode(o.file,t.parent,k)}else{var k=e.createVariableStatement(void 0,e.createVariableDeclarationList([S],2)),x=function(t,r){var n;e.Debug.assert(!e.isClassLike(r));for(var i=t;i!==r;i=i.parent)_(i)&&(n=i);for(var i=(n||t).parent;;i=i.parent){if(g(i)){for(var a=void 0,o=0,s=i.statements;ot.pos)break;a=c}return!a&&e.isCaseClause(i)?(e.Debug.assert(e.isSwitchStatement(i.parent.parent)),i.parent.parent):e.Debug.assertDefined(a)}e.Debug.assert(i!==r,"Didn't encounter a block-like before encountering scope")}}(t,r);if(0===x.pos?m.insertNodeAtTopOfFile(o.file,k,!1):m.insertNodeBefore(o.file,x,k,!1),219===t.parent.kind)m.delete(o.file,t.parent);else{var v=e.createIdentifier(l);m.replaceNode(o.file,t,v)}}}var T=m.getChanges(),C=t.getSourceFile().fileName,E=e.getRenameLocation(T,C,l,!0);return{renameFilename:C,renameLocation:E,edits:T}}(e.isExpression(c)?c:c.statements[0].expression,o[n],u[n],t.facts,r)}(n,t,o)}e.Debug.fail("Unrecognized action name")}function l(t,r){var a=r.length;if(0===a)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractEmpty)]};var o=e.getParentNodeInSpan(e.getTokenAtPosition(t,r.start),t,r),s=e.getParentNodeInSpan(e.findTokenOnLeftOfPosition(t,e.textSpanEnd(r)),t,r),c=[],u=i.None;if(!o||!s)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};if(o.parent!==s.parent)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};if(o!==s){if(!g(o.parent))return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};for(var l=[],_=0,d=o.parent.statements;_=r.start+r.length)return(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractSuper)),!0}else u|=i.UsesThis}if(e.isFunctionLikeDeclaration(a)||e.isClassLike(a)){switch(a.kind){case 237:case 238:e.isSourceFile(a.parent)&&void 0===a.parent.externalModuleIndicator&&(o||(o=[])).push(e.createDiagnosticForNode(a,n.functionWillNotBeVisibleInTheNewScope))}return!1}var p=_;switch(a.kind){case 220:case 233:_=0;break;case 216:a.parent&&233===a.parent.kind&&a.parent.finallyBlock===a&&(_=4);break;case 269:_|=1;break;default:e.isIterationStatement(a,!1)&&(_|=3)}switch(a.kind){case 176:case 99:u|=i.UsesThis;break;case 231:var f=a.label;(l||(l=[])).push(f.escapedText),e.forEachChild(a,t),l.pop();break;case 227:case 226:var f=a.label;f?e.contains(l,f.escapedText)||(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):_&(227===a.kind?1:2)||(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break;case 199:u|=i.IsAsyncFunction;break;case 205:u|=i.IsGenerator;break;case 228:4&_?u|=i.HasReturn:(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingConditionalReturnStatement));break;default:e.forEachChild(a,t)}_=p}(t),o}}function _(t){return e.isFunctionLikeDeclaration(t)||e.isSourceFile(t)||e.isModuleBlock(t)||e.isClassLike(t)}function d(t,r){var a=r.file,o=function(t){var r=m(t.range)?e.first(t.range):t.range;if(t.facts&i.UsesThis){var n=e.getContainingClass(r);if(n){var a=e.findAncestor(r,e.isFunctionLikeDeclaration);return a?[a,n]:[n]}}for(var o=[];;)if(149===(r=r.parent).kind&&(r=e.findAncestor(r,function(t){return e.isFunctionLikeDeclaration(t)}).parent),_(r)&&(o.push(r),277===r.kind))return o}(t);return{scopes:o,readsAndWrites:function(t,r,a,o,s,c){var u,l,_=e.createMap(),d=[],p=[],f=[],g=[],y=[],h=e.createMap(),v=[],b=m(t.range)?1===t.range.length&&e.isExpressionStatement(t.range[0])?t.range[0].expression:void 0:t.range;if(void 0===b){var x=t.range,S=e.first(x).getStart(),D=e.last(x).end;l=e.createFileDiagnostic(o,S,D-S,n.expressionExpected)}else 36864&s.getTypeAtLocation(b).flags&&(l=e.createDiagnosticForNode(b,n.uselessConstantType));for(var k=0,T=r;k=u)return m;if(N.set(m,u),y){for(var h=0,v=d;h0){for(var O=e.createMap(),M=0,L=P;void 0!==L&&M=0)return;var i=e.isIdentifier(n)?V(n):s.getSymbolAtLocation(n);if(i){var a=e.find(y,function(e){return e.symbol===i});if(a)if(e.isVariableDeclaration(a)){var o=a.symbol.id.toString();h.has(o)||(v.push(a),h.set(o,!0))}else u=u||a}e.forEachChild(n,r)})}for(var K=function(r){var i=d[r];if(r>0&&(i.usages.size>0||i.typeParameterUsages.size>0)){var a=m(t.range)?t.range[0]:t.range;g[r].push(e.createDiagnosticForNode(a,n.cannotAccessVariablesFromNestedScopes))}var o,s=!1;if(d[r].usages.forEach(function(t){2===t.usage&&(s=!0,106500&t.symbol.flags&&t.symbol.valueDeclaration&&e.hasModifier(t.symbol.valueDeclaration,64)&&(o=t.symbol.valueDeclaration))}),e.Debug.assert(m(t.range)||0===v.length),s&&!m(t.range)){var c=e.createDiagnosticForNode(t.range,n.cannotWriteInExpression);f[r].push(c),g[r].push(c)}else if(o&&r>0){var c=e.createDiagnosticForNode(o,n.cannotExtractReadonlyPropertyInitializerOutsideConstructor);f[r].push(c),g[r].push(c)}else if(u){var c=e.createDiagnosticForNode(u,n.cannotExtractExportedEntity);f[r].push(c),g[r].push(c)}},U=0;Un.pos});if(-1!==a){var o=i[a];if(e.isNamedDeclaration(o)&&o.name&&e.rangeContainsRange(o.name,n))return{toMove:[i[a]],afterLast:i[a+1]};if(!(n.pos>o.getStart(r))){var s=e.findIndex(i,function(e){return e.end>n.end},a);if(-1===s||!(0===s||i[s].getStart(r)302});return n.kind<146?n:n.getFirstToken(t)}},r.prototype.getLastToken=function(t){this.assertHasRealPosition();var r=this.getChildren(t),n=e.lastOrUndefined(r);if(n)return n.kind<146?n:n.getLastToken(t)},r.prototype.forEachChild=function(t,r){return e.forEachChild(this,t,r)},r}();function i(r,n,i,a){for(e.scanner.setTextPos(n);n=n.length&&(t=this.getEnd()),t||(t=n[r+1]-1);var i=this.getFullText();return"\n"===i[t]&&"\r"===i[t-1]?t-1:t},r.prototype.getNamedDeclarations=function(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations},r.prototype.computeNamedDeclarations=function(){var t=e.createMultiMap();return this.forEachChild(function i(a){switch(a.kind){case 237:case 194:case 154:case 153:var o=a,s=n(o);if(s){var c=function(e){var r=t.get(e);r||t.set(e,r=[]);return r}(s),u=e.lastOrUndefined(c);u&&o.parent===u.parent&&o.symbol===u.symbol?o.body&&!u.body&&(c[c.length-1]=o):c.push(o)}e.forEachChild(a,i);break;case 238:case 207:case 239:case 240:case 241:case 242:case 246:case 255:case 251:case 248:case 249:case 156:case 157:case 166:r(a),e.forEachChild(a,i);break;case 149:if(!e.hasModifier(a,92))break;case 235:case 184:var l=a;if(e.isBindingPattern(l.name)){e.forEachChild(l.name,i);break}l.initializer&&i(l.initializer);case 276:case 152:case 151:r(a);break;case 253:a.exportClause&&e.forEach(a.exportClause.elements,i);break;case 247:var _=a.importClause;_&&(_.name&&r(_.name),_.namedBindings&&(249===_.namedBindings.kind?r(_.namedBindings):e.forEach(_.namedBindings.elements,i)));break;case 202:0!==e.getSpecialPropertyAssignmentKind(a)&&r(a);default:e.forEachChild(a,i)}}),t;function r(e){var r=n(e);r&&t.add(r,e)}function n(t){var r=e.getNonAssignedNameOfDeclaration(t);return r&&(e.isComputedPropertyName(r)&&e.isPropertyAccessExpression(r.expression)?r.expression.name.text:e.isPropertyName(r)?e.getNameFromPropertyName(r):void 0)}},r}(r),g=function(){function t(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r}return t.prototype.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(this,t)},t}();function y(t){var r=!0;for(var n in t)if(e.hasProperty(t,n)&&!h(n)){r=!1;break}if(r)return t;var i={};for(var n in t){if(e.hasProperty(t,n))i[h(n)?n:n.charAt(0).toLowerCase()+n.substr(1)]=t[n]}return i}function h(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function v(){return{target:1,jsx:1}}e.toEditorSettings=y,e.displayPartsToString=function(t){return t?e.map(t,function(e){return e.text}).join(""):""},e.getDefaultCompilerOptions=v,e.getSupportedCodeFixes=function(){return e.codefix.getSupportedErrorCodes()};var b=function(){function t(t,r){this.host=t,this.currentDirectory=t.getCurrentDirectory(),this.fileNameToEntry=e.createMap();for(var n=0,i=t.getScriptFileNames();n=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=t,this.hostCancellationToken.isCancellationRequested())},t.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new e.OperationCanceledException},t}();function N(t,r){var n=e.unescapeLeadingUnderscores(e.getTextOfPropertyName(r));if(n&&t){var i=[],a=t.getProperty(n);if(262144&t.flags)return e.forEach(t.types,function(e){var t=e.getProperty(n);t&&i.push(t)}),i;if(a)return i.push(a),i}}e.ThrottledCancellationToken=E,e.createLanguageService=function(t,r,i){var a;void 0===r&&(r=e.createDocumentRegistry(t.useCaseSensitiveFileNames&&t.useCaseSensitiveFileNames(),t.getCurrentDirectory())),void 0===i&&(i=!1);var o,s,c=new S(t),u=0,l=new C(t.getCancellationToken&&t.getCancellationToken()),_=t.getCurrentDirectory();function d(e){t.log&&t.log(e)}!e.localizedDiagnosticMessages&&t.getLocalizedDiagnosticMessages&&(e.localizedDiagnosticMessages=t.getLocalizedDiagnosticMessages());var p=e.hostUsesCaseSensitiveFileNames(t),f=e.createGetCanonicalFileName(p),m=e.getSourceMapper(f,_,d,t,function(){return o});function g(e){var t=o.getSourceFile(e);if(!t)throw new Error("Could not find file: '"+e+"'.");return t}function h(){if(e.Debug.assert(!i),t.getProjectVersion){var n=t.getProjectVersion();if(n){if(s===n&&!t.hasChangedAutomaticTypeDirectiveNames)return;s=n}}var a=t.getTypeRootsVersion?t.getTypeRootsVersion():0;u!==a&&(d("TypeRoots version has changed; provide new program"),o=void 0,u=a);var c=new b(t,f),g=c.getRootFileNames(),y=t.hasInvalidatedResolution||e.returnFalse;if(!e.isProgramUptoDate(o,g,c.compilationSettings(),function(e){return c.getVersion(e)},D,y,!!t.hasChangedAutomaticTypeDirectiveNames)){var h=c.compilationSettings(),v={getSourceFile:function(t,r,n,i){return k(t,e.toPath(t,_,f),0,0,i)},getSourceFileByPath:k,getCancellationToken:function(){return l},getCanonicalFileName:f,useCaseSensitiveFileNames:function(){return p},getNewLine:function(){return e.getNewLineCharacter(h,function(){return e.getNewLineOrDefaultFromHost(t)})},getDefaultLibFileName:function(e){return t.getDefaultLibFileName(e)},writeFile:e.noop,getCurrentDirectory:function(){return _},fileExists:D,readFile:function(r){var n=e.toPath(r,_,f),i=c&&c.getEntryByPath(n);return i?e.isString(i)?void 0:e.getSnapshotText(i.scriptSnapshot):t.readFile&&t.readFile(r)},realpath:t.realpath&&function(e){return t.realpath(e)},directoryExists:function(r){return e.directoryProbablyExists(r,t)},getDirectories:function(e){return t.getDirectories?t.getDirectories(e):[]},onReleaseOldSourceFile:function(e,t){var n=r.getKeyForCompilationSettings(t);r.releaseDocumentWithKey(e.path,n)},hasInvalidatedResolution:y,hasChangedAutomaticTypeDirectiveNames:t.hasChangedAutomaticTypeDirectiveNames};t.trace&&(v.trace=function(e){return t.trace(e)}),t.resolveModuleNames&&(v.resolveModuleNames=function(e,r,n){return t.resolveModuleNames(e,r,n)}),t.resolveTypeReferenceDirectives&&(v.resolveTypeReferenceDirectives=function(e,r){return t.resolveTypeReferenceDirectives(e,r)});var x=r.getKeyForCompilationSettings(h),S={rootNames:g,options:h,host:v,oldProgram:o,projectReferences:c.getProjectReferences()};return o=e.createProgram(S),c=void 0,m.clearCache(),void o.getTypeChecker()}function D(r){var n=e.toPath(r,_,f),i=c&&c.getEntryByPath(n);return i?!e.isString(i):!!t.fileExists&&t.fileExists(r)}function k(t,n,i,a,s){e.Debug.assert(void 0!==c,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");var u=c&&c.getOrCreateEntryByPath(t,n);if(u){if(!s){var l=o&&o.getSourceFileByPath(n);if(l)return e.Debug.assertEqual(u.scriptKind,l.scriptKind,"Registered script kind should match new script kind.",n),r.updateDocumentWithKey(t,n,h,x,u.scriptSnapshot,u.version,u.scriptKind)}return r.acquireDocumentWithKey(t,n,h,x,u.scriptSnapshot,u.version,u.scriptKind)}}}function v(){if(!i)return h(),o;e.Debug.assert(void 0===o)}function x(t,r,n){var i=e.normalizePath(t);e.Debug.assert(n.some(function(t){return e.normalizePath(t)===i})),h();var a=e.map(n,function(t){return e.Debug.assertDefined(o.getSourceFile(t))}),s=g(t);return e.DocumentHighlights.getDocumentHighlights(o,l,s,r,a)}function D(t,r,n){h();var i=n&&n.isForRename?o.getSourceFiles().filter(function(e){return!o.isSourceFileDefaultLibrary(e)}):o.getSourceFiles();return e.FindAllReferences.findReferencedEntries(o,l,i,t,r,n)}function k(r){var n=e.getScriptKind(r,t);return 3===n||4===n}var T=e.createMapFromTemplate(((a={})[17]=18,a[19]=20,a[21]=22,a[29]=27,a));function E(r){switch(r.type){case"install package":return t.installPackage?t.installPackage({fileName:e.toPath(r.file,_,f),packageName:r.packageName}):Promise.reject("Host does not implement `installPackage`");default:return e.Debug.fail()}}function N(r,n,i,a){var o="number"==typeof n?[n,void 0]:[n.pos,n.end];return{file:r,startPosition:o[0],endPosition:o[1],program:v(),host:t,formatContext:e.formatting.getFormatContext(a),cancellationToken:l,preferences:i}}return T.forEach(function(e,t){return T.set(e.toString(),Number(t))}),{dispose:function(){o&&(e.forEach(o.getSourceFiles(),function(e){return r.releaseDocument(e.fileName,o.getCompilerOptions())}),o=void 0),t=void 0},cleanupSemanticCache:function(){o=void 0},getSyntacticDiagnostics:function(e){return h(),o.getSyntacticDiagnostics(g(e),l).slice()},getSemanticDiagnostics:function(e){h();var t=g(e),r=o.getSemanticDiagnostics(t,l);if(!o.getCompilerOptions().declaration)return r.slice();var n=o.getDeclarationDiagnostics(t,l);return r.concat(n)},getSuggestionDiagnostics:function(t){return h(),e.computeSuggestionDiagnostics(g(t),o,l)},getCompilerOptionsDiagnostics:function(){return h(),o.getOptionsDiagnostics(l).concat(o.getGlobalDiagnostics(l))},getSyntacticClassifications:function(t,r){return e.getSyntacticClassifications(l,c.getCurrentSourceFile(t),r)},getSemanticClassifications:function(t,r){return k(t)?(h(),e.getSemanticClassifications(o.getTypeChecker(),l,g(t),o.getClassifiableNames(),r)):[]},getEncodedSyntacticClassifications:function(t,r){return e.getEncodedSyntacticClassifications(l,c.getCurrentSourceFile(t),r)},getEncodedSemanticClassifications:function(t,r){return k(t)?(h(),e.getEncodedSemanticClassifications(o.getTypeChecker(),l,g(t),o.getClassifiableNames(),r)):{spans:[],endOfLineState:0}},getCompletionsAtPosition:function(r,i,a){void 0===a&&(a=e.emptyOptions);var s=n({},e.identity(a),{includeCompletionsForModuleExports:a.includeCompletionsForModuleExports||a.includeExternalModuleExports,includeCompletionsWithInsertText:a.includeCompletionsWithInsertText||a.includeInsertTextCompletions});return h(),e.Completions.getCompletionsAtPosition(t,o,d,g(r),i,s,a.triggerCharacter)},getCompletionEntryDetails:function(r,n,i,a,s,c){return void 0===c&&(c=e.emptyOptions),h(),e.Completions.getCompletionEntryDetails(o,d,g(r),n,{name:i,source:s},t,a&&e.formatting.getFormatContext(a),c,l)},getCompletionEntrySymbol:function(t,r,n,i){return h(),e.Completions.getCompletionEntrySymbol(o,d,g(t),r,{name:n,source:i})},getSignatureHelpItems:function(t,r,n){var i=(void 0===n?e.emptyOptions:n).triggerReason;h();var a=g(t);return e.SignatureHelp.getSignatureHelpItems(o,a,r,i,l)},getQuickInfoAtPosition:function(t,r){h();var n=g(t),i=e.getTouchingPropertyName(n,r);if(i!==n){var a=o.getTypeChecker(),s=function(t,r){if((e.isIdentifier(t)||e.isStringLiteral(t))&&e.isPropertyAssignment(t.parent)&&t.parent.name===t){var n=r.getContextualType(t.parent.parent),i=n&&r.getPropertyOfType(n,e.getTextOfIdentifierOrLiteral(t));if(i)return i}return r.getSymbolAtLocation(t)}(i,a);if(s&&!a.isUnknownSymbol(s)){var c=a.runWithCancellationToken(l,function(t){return e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(t,s,n,e.getContainerNode(i),i)}),u=c.symbolKind,_=c.displayParts,d=c.documentation,p=c.tags;return{kind:u,kindModifiers:e.SymbolDisplay.getSymbolModifiers(s),textSpan:e.createTextSpanFromNode(i,n),displayParts:_,documentation:d,tags:p}}switch(i.kind){case 71:if(e.isLabelName(i))return;case 187:case 146:case 99:case 176:case 97:var f=a.getTypeAtLocation(i);return f&&{kind:"",kindModifiers:"",textSpan:e.createTextSpanFromNode(i,n),displayParts:a.runWithCancellationToken(l,function(t){return e.typeToDisplayParts(t,f,e.getContainerNode(i))}),documentation:f.symbol?f.symbol.getDocumentationComment(a):void 0,tags:f.symbol?f.symbol.getJsDocTags():void 0}}}},getDefinitionAtPosition:function(t,r){return h(),e.GoToDefinition.getDefinitionAtPosition(o,g(t),r)},getDefinitionAndBoundSpan:function(t,r){return h(),e.GoToDefinition.getDefinitionAndBoundSpan(o,g(t),r)},getImplementationAtPosition:function(t,r){return h(),e.FindAllReferences.getImplementationsAtPosition(o,l,o.getSourceFiles(),g(t),r)},getTypeDefinitionAtPosition:function(t,r){return h(),e.GoToDefinition.getTypeDefinitionAtPosition(o.getTypeChecker(),g(t),r)},getReferencesAtPosition:function(t,r){return h(),D(e.getTouchingPropertyName(g(t),r),r)},findReferences:function(t,r){return h(),e.FindAllReferences.findReferencedSymbols(o,l,o.getSourceFiles(),g(t),r)},getOccurrencesAtPosition:function(t,r){return e.flatMap(x(t,r,[t]),function(e){return e.highlightSpans.map(function(t){return{fileName:e.fileName,textSpan:t.textSpan,isWriteAccess:"writtenReference"===t.kind,isDefinition:!1,isInString:t.isInString}})})},getDocumentHighlights:x,getNameOrDottedNameSpan:function(t,r,n){var i=c.getCurrentSourceFile(t),a=e.getTouchingPropertyName(i,r);if(a!==i){switch(a.kind){case 187:case 146:case 9:case 86:case 101:case 95:case 97:case 99:case 176:case 71:break;default:return}for(var o=a;;)if(e.isRightSideOfPropertyAccess(o)||e.isRightSideOfQualifiedName(o))o=o.parent;else{if(!e.isNameOfModuleDeclaration(o))break;if(242!==o.parent.parent.kind||o.parent.parent.body!==o.parent)break;o=o.parent.parent.name}return e.createTextSpanFromBounds(o.getStart(),a.getEnd())}},getBreakpointStatementAtPosition:function(t,r){var n=c.getCurrentSourceFile(t);return e.BreakpointResolver.spanInSourceFileAtLocation(n,r)},getNavigateToItems:function(t,r,n,i){void 0===i&&(i=!1),h();var a=n?[g(n)]:o.getSourceFiles();return e.NavigateTo.getNavigateToItems(a,o.getTypeChecker(),l,t,r,i)},getRenameInfo:function(t,r){return h(),e.Rename.getRenameInfo(o,g(t),r)},findRenameLocations:function(t,r,n,i){h();var a=g(t),o=e.getTouchingPropertyName(a,r);if(e.isIdentifier(o)&&e.isJsxOpeningElement(o.parent)||e.isJsxClosingElement(o.parent)){var s=o.parent.parent;return[s.openingElement,s.closingElement].map(function(t){return{fileName:a.fileName,textSpan:e.createTextSpanFromNode(t.tagName,a)}})}var c=D(o,r,{findInStrings:n,findInComments:i,isForRename:!0});return c&&c.map(function(e){return{fileName:e.fileName,textSpan:e.textSpan}})},getNavigationBarItems:function(t){return e.NavigationBar.getNavigationBarItems(c.getCurrentSourceFile(t),l)},getNavigationTree:function(t){return e.NavigationBar.getNavigationTree(c.getCurrentSourceFile(t),l)},getOutliningSpans:function(t){var r=c.getCurrentSourceFile(t);return e.OutliningElementsCollector.collectElements(r,l)},getTodoComments:function(t,r){h();var n=g(t);l.throwIfCancellationRequested();var i,a,o=n.text,s=[];if(r.length>0&&(a=n.fileName,!e.stringContains(a,"/node_modules/")))for(var c=function(){var t="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/\/+\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",n="(?:"+e.map(r,function(e){return"("+e.text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+")"}).join("|")+")";return new RegExp(t+"("+n+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}(),u=void 0;u=c.exec(o);){l.throwIfCancellationRequested(),e.Debug.assert(u.length===r.length+3);var _=u[1],d=u.index+_.length;if(e.isInComment(n,d)){for(var p=void 0,f=0;f=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)){var m=u[2];s.push({descriptor:p,message:m,position:d})}}}return s},getBraceMatchingAtPosition:function(t,r){var n=c.getCurrentSourceFile(t),i=e.getTouchingToken(n,r),a=i.getStart(n)===r?T.get(i.kind.toString()):void 0,o=a&&e.findChildOfKind(i.parent,a,n);return o?[e.createTextSpanFromNode(i,n),e.createTextSpanFromNode(o,n)].sort(function(e,t){return e.start-t.start}):e.emptyArray},getIndentationAtPosition:function(t,r,n){var i=e.timestamp(),a=y(n),o=c.getCurrentSourceFile(t);d("getIndentationAtPosition: getCurrentSourceFile: "+(e.timestamp()-i)),i=e.timestamp();var s=e.formatting.SmartIndenter.getIndentation(r,o,a);return d("getIndentationAtPosition: computeIndentation : "+(e.timestamp()-i)),s},getFormattingEditsForRange:function(t,r,n,i){var a=c.getCurrentSourceFile(t);return e.formatting.formatSelection(r,n,a,e.formatting.getFormatContext(y(i)))},getFormattingEditsForDocument:function(t,r){return e.formatting.formatDocument(c.getCurrentSourceFile(t),e.formatting.getFormatContext(y(r)))},getFormattingEditsAfterKeystroke:function(t,r,n,i){var a=c.getCurrentSourceFile(t),o=e.formatting.getFormatContext(y(i));if(!e.isInComment(a,r))switch(n){case"{":return e.formatting.formatOnOpeningCurly(r,a,o);case"}":return e.formatting.formatOnClosingCurly(r,a,o);case";":return e.formatting.formatOnSemicolon(r,a,o);case"\n":return e.formatting.formatOnEnter(r,a,o)}return[]},getDocCommentTemplateAtPosition:function(r,n){return e.JsDoc.getDocCommentTemplateAtPosition(e.getNewLineOrDefaultFromHost(t),c.getCurrentSourceFile(r),n)},isValidBraceCompletionAtPosition:function(t,r,n){if(60===n)return!1;var i=c.getCurrentSourceFile(t);if(e.isInString(i,r))return!1;if(e.isInsideJsxElementOrAttribute(i,r))return 123===n;if(e.isInTemplateString(i,r))return!1;switch(n){case 39:case 34:case 96:return!e.isInComment(i,r)}return!0},getJsxClosingTagAtPosition:function(t,r){var n=c.getCurrentSourceFile(t),i=e.findPrecedingToken(r,n);if(i){var a=29===i.kind&&e.isJsxOpeningElement(i.parent)?i.parent.parent:e.isJsxText(i)?i.parent:void 0;return a&&function t(r){var n=r.openingElement,i=r.closingElement,a=r.parent;return!e.tagNamesAreEquivalent(n.tagName,i.tagName)||e.isJsxElement(a)&&e.tagNamesAreEquivalent(n.tagName,a.openingElement.tagName)&&t(a)}(a)?{newText:""}:void 0}},getSpanOfEnclosingComment:function(t,r,n){var i=c.getCurrentSourceFile(t),a=e.formatting.getRangeOfEnclosingComment(i,r);return!a||n&&3!==a.kind?void 0:e.createTextSpanFromRange(a)},getCodeFixesAtPosition:function(r,n,i,a,s,c){void 0===c&&(c=e.emptyOptions),h();var u=g(r),_=e.createTextSpanFromBounds(n,i),d=e.formatting.getFormatContext(s);return e.flatMap(e.deduplicate(a,e.equateValues,e.compareValues),function(r){return l.throwIfCancellationRequested(),e.codefix.getFixes({errorCode:r,sourceFile:u,span:_,program:o,host:t,cancellationToken:l,formatContext:d,preferences:c})})},getCombinedCodeFix:function(r,n,i,a){void 0===a&&(a=e.emptyOptions),h(),e.Debug.assert("file"===r.type);var s=g(r.fileName),c=e.formatting.getFormatContext(i);return e.codefix.getAllFixes({fixId:n,sourceFile:s,program:o,host:t,cancellationToken:l,formatContext:c,preferences:a})},applyCodeActionCommand:function(t,r){var n="string"==typeof t?r:t;return e.isArray(n)?Promise.all(n.map(E)):E(n)},organizeImports:function(r,n,i){void 0===i&&(i=e.emptyOptions),h(),e.Debug.assert("file"===r.type);var a=g(r.fileName),s=e.formatting.getFormatContext(n);return e.OrganizeImports.organizeImports(a,s,t,o,i)},getEditsForFileRename:function(r,n,i,a){return void 0===a&&(a=e.emptyOptions),e.getEditsForFileRename(v(),r,n,t,e.formatting.getFormatContext(i),a,m)},getEmitOutput:function(r,n){void 0===n&&(n=!1),h();var i=g(r),a=t.getCustomTransformers&&t.getCustomTransformers();return e.getFileEmitOutput(o,i,n,l,a)},getNonBoundSourceFile:function(e){return c.getCurrentSourceFile(e)},getProgram:v,getApplicableRefactors:function(t,r,n){void 0===n&&(n=e.emptyOptions),h();var i=g(t);return e.refactor.getApplicableRefactors(N(i,r,n))},getEditsForRefactor:function(t,r,n,i,a,o){void 0===o&&(o=e.emptyOptions),h();var s=g(t);return e.refactor.getEditsForRefactor(N(s,n,o,r),i,a)},toLineColumnOffset:m.toLineColumnOffset,getSourceMapper:function(){return m}}},e.getNameTable=function(t){return t.nameTable||function(t){var r=t.nameTable=e.createUnderscoreEscapedMap();t.forEachChild(function t(n){if(e.isIdentifier(n)&&n.escapedText||e.isStringOrNumericLiteral(n)&&function(t){return e.isDeclarationName(t)||257===t.parent.kind||function(e){return e&&e.parent&&188===e.parent.kind&&e.parent.argumentExpression===e}(t)||e.isLiteralComputedPropertyDeclarationName(t)}(n)){var i=e.getEscapedTextOfIdentifierOrLiteral(n);r.set(i,void 0===r.get(i)?n.pos:-1)}if(e.forEachChild(n,t),e.hasJSDocNodes(n))for(var a=0,o=n.jsDoc;ai){var a=e.findPrecedingToken(n.pos,t);if(!a||t.getLineAndCharacterOfPosition(a.getEnd()).line!==i)return;n=a}if(!(4194304&n.flags))return _(n)}function o(r,n){var i=r.decorators?e.skipTrivia(t.text,r.decorators.end):r.getStart(t);return e.createTextSpanFromBounds(i,(n||r).getEnd())}function s(r,n){return o(r,e.findNextToken(n,n.parent,t))}function c(e,r){return e&&i===t.getLineAndCharacterOfPosition(e.getStart(t)).line?_(e):_(r)}function u(r){return _(e.findPrecedingToken(r.pos,t))}function l(r){return _(e.findNextToken(r,r.parent,t))}function _(r){if(r){var n=r.parent;switch(r.kind){case 217:return x(r.declarationList.declarations[0]);case 235:case 152:case 151:return x(r);case 149:return function t(r){if(e.isBindingPattern(r.name))return T(r.name);if(function(t){return!!t.initializer||void 0!==t.dotDotDotToken||e.hasModifier(t,12)}(r))return o(r);var n=r.parent,i=n.parameters.indexOf(r);return e.Debug.assert(-1!==i),0!==i?t(n.parameters[i-1]):_(n.body)}(r);case 237:case 154:case 153:case 156:case 157:case 155:case 194:case 195:return function(e){if(e.body)return S(e)?o(e):_(e.body)}(r);case 216:if(e.isFunctionBlock(r))return h=(y=r).statements.length?y.statements[0]:y.getLastToken(),S(y.parent)?c(y.parent,h):_(h);case 243:return D(r);case 272:return D(r.block);case 219:return o(r.expression);case 228:return o(r.getChildAt(0),r.expression);case 222:return s(r,r.expression);case 221:return _(r.statement);case 234:return o(r.getChildAt(0));case 220:return s(r,r.expression);case 231:return _(r.statement);case 227:case 226:return o(r.getChildAt(0),r.label);case 223:return(g=r).initializer?k(g):g.condition?o(g.condition):g.incrementor?o(g.incrementor):void 0;case 224:return s(r,r.expression);case 225:return k(r);case 230:return s(r,r.expression);case 269:case 270:return _(r.statements[0]);case 233:return D(r.tryBlock);case 232:case 252:return o(r,r.expression);case 246:return o(r,r.moduleReference);case 247:case 253:return o(r,r.moduleSpecifier);case 242:if(1!==e.getModuleInstanceState(r))return;case 238:case 241:case 276:case 184:return o(r);case 229:return _(r.statement);case 150:return v=n.decorators,e.createTextSpanFromBounds(e.skipTrivia(t.text,v.pos),v.end);case 182:case 183:return T(r);case 239:case 240:return;case 25:case 1:return c(e.findPrecedingToken(r.pos,t));case 26:return u(r);case 17:return function(r){switch(r.parent.kind){case 241:var n=r.parent;return c(e.findPrecedingToken(r.pos,t,r.parent),n.members.length?n.members[0]:n.getLastToken(t));case 238:var i=r.parent;return c(e.findPrecedingToken(r.pos,t,r.parent),i.members.length?i.members[0]:i.getLastToken(t));case 244:return c(r.parent.parent,r.parent.clauses[0])}return _(r.parent)}(r);case 18:return function(t){switch(t.parent.kind){case 243:if(1!==e.getModuleInstanceState(t.parent.parent))return;case 241:case 238:return o(t);case 216:if(e.isFunctionBlock(t.parent))return o(t);case 272:return _(e.lastOrUndefined(t.parent.statements));case 244:var r=t.parent,n=e.lastOrUndefined(r.clauses);return n?_(e.lastOrUndefined(n.statements)):void 0;case 182:var i=t.parent;return _(e.lastOrUndefined(i.elements)||i);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var a=t.parent;return o(e.lastOrUndefined(a.properties)||a)}return _(t.parent)}}(r);case 22:return function(t){switch(t.parent.kind){case 183:var r=t.parent;return o(e.lastOrUndefined(r.elements)||r);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var n=t.parent;return o(e.lastOrUndefined(n.elements)||n)}return _(t.parent)}}(r);case 19:return function(e){return 221===e.parent.kind||189===e.parent.kind||190===e.parent.kind?u(e):193===e.parent.kind?l(e):_(e.parent)}(r);case 20:return function(e){switch(e.parent.kind){case 194:case 237:case 195:case 154:case 153:case 156:case 157:case 155:case 222:case 221:case 223:case 225:case 189:case 190:case 193:return u(e);default:return _(e.parent)}}(r);case 56:return function(t){return e.isFunctionLike(t.parent)||273===t.parent.kind||149===t.parent.kind?u(t):_(t.parent)}(r);case 29:case 27:return function(e){return 192===e.parent.kind?l(e):_(e.parent)}(r);case 106:return function(e){return 221===e.parent.kind?s(e,e.parent.expression):_(e.parent)}(r);case 82:case 74:case 87:return l(r);case 145:return function(e){return 225===e.parent.kind?l(e):_(e.parent)}(r);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(r))return C(r);if((71===r.kind||206===r.kind||273===r.kind||274===r.kind)&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(n))return o(r);if(202===r.kind){var i=r,a=i.left,d=i.operatorToken;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(a))return C(a);if(58===d.kind&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(r.parent))return o(r);if(26===d.kind)return _(a)}if(e.isExpressionNode(r))switch(n.kind){case 221:return u(r);case 150:return _(r.parent);case 223:case 225:return o(r);case 202:if(26===r.parent.operatorToken.kind)return o(r);break;case 195:if(r.parent.body===r)return o(r)}switch(r.parent.kind){case 273:if(r.parent.name===r&&!e.isArrayLiteralOrObjectLiteralDestructuringPattern(r.parent.parent))return _(r.parent.initializer);break;case 192:if(r.parent.type===r)return l(r.parent.type);break;case 235:case 149:var p=r.parent,f=p.initializer,m=p.type;if(f===r||m===r||e.isAssignmentOperator(r.kind))return u(r);break;case 202:if(a=r.parent.left,e.isArrayLiteralOrObjectLiteralDestructuringPattern(a)&&r!==a)return u(r);break;default:if(e.isFunctionLike(r.parent)&&r.parent.type===r)return u(r)}return _(r.parent)}}var g,y,h,v;function b(r){return e.isVariableDeclarationList(r.parent)&&r.parent.declarations[0]===r?o(e.findPrecedingToken(r.pos,t,r.parent),r):o(r)}function x(r){if(224===r.parent.parent.kind)return _(r.parent.parent);var n=r.parent;return e.isBindingPattern(r.name)?T(r.name):r.initializer||e.hasModifier(r,1)||225===n.parent.kind?b(r):e.isVariableDeclarationList(r.parent)&&r.parent.declarations[0]!==r?_(e.findPrecedingToken(r.pos,t,r.parent)):void 0}function S(t){return e.hasModifier(t,1)||238===t.parent.kind&&155!==t.kind}function D(r){switch(r.parent.kind){case 242:if(1!==e.getModuleInstanceState(r.parent))return;case 222:case 220:case 224:return c(r.parent,r.statements[0]);case 223:case 225:return c(e.findPrecedingToken(r.pos,t,r.parent),r.statements[0])}return _(r.statements[0])}function k(e){if(236!==e.initializer.kind)return _(e.initializer);var t=e.initializer;return t.declarations.length>0?_(t.declarations[0]):void 0}function T(t){var r=e.forEach(t.elements,function(e){return 208!==e.kind?e:void 0});return r?_(r):184===t.parent.kind?o(t.parent):b(t.parent)}function C(t){e.Debug.assert(183!==t.kind&&182!==t.kind);var r=185===t.kind?t.elements:t.properties,n=e.forEach(r,function(e){return 208!==e.kind?e:void 0});return n?_(n):o(202===t.parent.kind?t.parent:t)}}}}(e.BreakpointResolver||(e.BreakpointResolver={}))}(s||(s={})),function(e){e.transform=function(t,r,n){var i=[];n=e.fixupCompilerOptions(n,i);var a=e.isArray(t)?t:[t],o=e.transformNodes(void 0,void 0,n,a,r,!0);return o.diagnostics=e.concatenate(o.diagnostics,i),o}}(s||(s={}));var s,c,u=function(){return this}();!function(t){function r(e,t){e&&e.log("*INTERNAL ERROR* - Exception in typescript services: "+t.message)}var n=function(){function e(e){this.scriptSnapshotShim=e}return e.prototype.getText=function(e,t){return this.scriptSnapshotShim.getText(e,t)},e.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},e.prototype.getChangeRange=function(e){var r=e,n=this.scriptSnapshotShim.getChangeRange(r.scriptSnapshotShim);if(null===n)return null;var i=JSON.parse(n);return t.createTextChangeRange(t.createTextSpan(i.span.start,i.span.length),i.newLength)},e.prototype.dispose=function(){"dispose"in this.scriptSnapshotShim&&this.scriptSnapshotShim.dispose()},e}(),i=function(){function e(e){var r=this;this.shimHost=e,this.loggingEnabled=!1,this.tracingEnabled=!1,"getModuleResolutionsForFile"in this.shimHost&&(this.resolveModuleNames=function(e,n){var i=JSON.parse(r.shimHost.getModuleResolutionsForFile(n));return t.map(e,function(e){var r=t.getProperty(i,e);return r?{resolvedFileName:r,extension:t.extensionFromPath(r),isExternalLibraryImport:!1}:void 0})}),"directoryExists"in this.shimHost&&(this.directoryExists=function(e){return r.shimHost.directoryExists(e)}),"getTypeReferenceDirectiveResolutionsForFile"in this.shimHost&&(this.resolveTypeReferenceDirectives=function(e,n){var i=JSON.parse(r.shimHost.getTypeReferenceDirectiveResolutionsForFile(n));return t.map(e,function(e){return t.getProperty(i,e)})})}return e.prototype.log=function(e){this.loggingEnabled&&this.shimHost.log(e)},e.prototype.trace=function(e){this.tracingEnabled&&this.shimHost.trace(e)},e.prototype.error=function(e){this.shimHost.error(e)},e.prototype.getProjectVersion=function(){if(this.shimHost.getProjectVersion)return this.shimHost.getProjectVersion()},e.prototype.getTypeRootsVersion=function(){return this.shimHost.getTypeRootsVersion?this.shimHost.getTypeRootsVersion():0},e.prototype.useCaseSensitiveFileNames=function(){return!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames()},e.prototype.getCompilationSettings=function(){var e=this.shimHost.getCompilationSettings();if(null===e||""===e)throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");var t=JSON.parse(e);return t.allowNonTsExtensions=!0,t},e.prototype.getScriptFileNames=function(){var e=this.shimHost.getScriptFileNames();return this.files=JSON.parse(e)},e.prototype.getScriptSnapshot=function(e){var t=this.shimHost.getScriptSnapshot(e);return t&&new n(t)},e.prototype.getScriptKind=function(e){return"getScriptKind"in this.shimHost?this.shimHost.getScriptKind(e):0},e.prototype.getScriptVersion=function(e){return this.shimHost.getScriptVersion(e)},e.prototype.getLocalizedDiagnosticMessages=function(){var e=this.shimHost.getLocalizedDiagnosticMessages();if(null===e||""===e)return null;try{return JSON.parse(e)}catch(e){return this.log(e.description||"diagnosticMessages.generated.json has invalid JSON format"),null}},e.prototype.getCancellationToken=function(){var e=this.shimHost.getCancellationToken();return new t.ThrottledCancellationToken(e)},e.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},e.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},e.prototype.getDefaultLibFileName=function(e){return this.shimHost.getDefaultLibFileName(JSON.stringify(e))},e.prototype.readDirectory=function(e,r,n,i,a){var o=t.getFileMatcherPatterns(e,n,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(e,JSON.stringify(r),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},e.prototype.readFile=function(e,t){return this.shimHost.readFile(e,t)},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e}();t.LanguageServiceShimHostAdapter=i;var a=function(){function e(e){var t=this;this.shimHost=e,this.useCaseSensitiveFileNames=!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames(),"directoryExists"in this.shimHost&&(this.directoryExists=function(e){return t.shimHost.directoryExists(e)}),"realpath"in this.shimHost&&(this.realpath=function(e){return t.shimHost.realpath(e)})}return e.prototype.readDirectory=function(e,r,n,i,a){var o=t.getFileMatcherPatterns(e,n,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(e,JSON.stringify(r),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e.prototype.readFile=function(e){return this.shimHost.readFile(e)},e.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},e}();function s(e,t,r,n){return c(e,t,!0,r,n)}function c(e,n,i,a,o){try{var s=function(e,r,n,i){var a;i&&(e.log(r),a=t.timestamp());var o=n();if(i){var s=t.timestamp();if(e.log(r+" completed in "+(s-a)+" msec"),t.isString(o)){var c=o;c.length>128&&(c=c.substring(0,128)+"..."),e.log(" result.length="+c.length+", result='"+JSON.stringify(c)+"'")}}return o}(e,n,a,o);return i?JSON.stringify({result:s}):s}catch(i){return i instanceof t.OperationCanceledException?JSON.stringify({canceled:!0}):(r(e,i),i.description=n,JSON.stringify({error:i}))}}t.CoreServicesShimHostAdapter=a;var l=function(){function e(e){this.factory=e,e.registerShim(this)}return e.prototype.dispose=function(e){this.factory.unregisterShim(this)},e}();function _(e,r){return e.map(function(e){return function(e,r){return{message:t.flattenDiagnosticMessageText(e.messageText,r),start:e.start,length:e.length,category:t.diagnosticCategoryName(e),code:e.code,reportsUnnecessary:e.reportsUnnecessary}}(e,r)})}t.realizeDiagnostics=_;var d=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.host=r,i.languageService=n,i.logPerformance=!1,i.logger=i.host,i}return o(r,e),r.prototype.forwardJSONCall=function(e,t){return s(this.logger,e,t,this.logPerformance)},r.prototype.dispose=function(t){this.logger.log("dispose()"),this.languageService.dispose(),this.languageService=null,u&&u.CollectGarbage&&(u.CollectGarbage(),this.logger.log("CollectGarbage()")),this.logger=null,e.prototype.dispose.call(this,t)},r.prototype.refresh=function(e){this.forwardJSONCall("refresh("+e+")",function(){return null})},r.prototype.cleanupSemanticCache=function(){var e=this;this.forwardJSONCall("cleanupSemanticCache()",function(){return e.languageService.cleanupSemanticCache(),null})},r.prototype.realizeDiagnostics=function(e){return _(e,t.getNewLineOrDefaultFromHost(this.host))},r.prototype.getSyntacticClassifications=function(e,r,n){var i=this;return this.forwardJSONCall("getSyntacticClassifications('"+e+"', "+r+", "+n+")",function(){return i.languageService.getSyntacticClassifications(e,t.createTextSpan(r,n))})},r.prototype.getSemanticClassifications=function(e,r,n){var i=this;return this.forwardJSONCall("getSemanticClassifications('"+e+"', "+r+", "+n+")",function(){return i.languageService.getSemanticClassifications(e,t.createTextSpan(r,n))})},r.prototype.getEncodedSyntacticClassifications=function(e,r,n){var i=this;return this.forwardJSONCall("getEncodedSyntacticClassifications('"+e+"', "+r+", "+n+")",function(){return p(i.languageService.getEncodedSyntacticClassifications(e,t.createTextSpan(r,n)))})},r.prototype.getEncodedSemanticClassifications=function(e,r,n){var i=this;return this.forwardJSONCall("getEncodedSemanticClassifications('"+e+"', "+r+", "+n+")",function(){return p(i.languageService.getEncodedSemanticClassifications(e,t.createTextSpan(r,n)))})},r.prototype.getSyntacticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSyntacticDiagnostics('"+e+"')",function(){var r=t.languageService.getSyntacticDiagnostics(e);return t.realizeDiagnostics(r)})},r.prototype.getSemanticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSemanticDiagnostics('"+e+"')",function(){var r=t.languageService.getSemanticDiagnostics(e);return t.realizeDiagnostics(r)})},r.prototype.getSuggestionDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSuggestionDiagnostics('"+e+"')",function(){return t.realizeDiagnostics(t.languageService.getSuggestionDiagnostics(e))})},r.prototype.getCompilerOptionsDiagnostics=function(){var e=this;return this.forwardJSONCall("getCompilerOptionsDiagnostics()",function(){var t=e.languageService.getCompilerOptionsDiagnostics();return e.realizeDiagnostics(t)})},r.prototype.getQuickInfoAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getQuickInfoAtPosition('"+e+"', "+t+")",function(){return r.languageService.getQuickInfoAtPosition(e,t)})},r.prototype.getNameOrDottedNameSpan=function(e,t,r){var n=this;return this.forwardJSONCall("getNameOrDottedNameSpan('"+e+"', "+t+", "+r+")",function(){return n.languageService.getNameOrDottedNameSpan(e,t,r)})},r.prototype.getBreakpointStatementAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getBreakpointStatementAtPosition('"+e+"', "+t+")",function(){return r.languageService.getBreakpointStatementAtPosition(e,t)})},r.prototype.getSignatureHelpItems=function(e,t,r){var n=this;return this.forwardJSONCall("getSignatureHelpItems('"+e+"', "+t+")",function(){return n.languageService.getSignatureHelpItems(e,t,r)})},r.prototype.getDefinitionAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getDefinitionAtPosition('"+e+"', "+t+")",function(){return r.languageService.getDefinitionAtPosition(e,t)})},r.prototype.getDefinitionAndBoundSpan=function(e,t){var r=this;return this.forwardJSONCall("getDefinitionAndBoundSpan('"+e+"', "+t+")",function(){return r.languageService.getDefinitionAndBoundSpan(e,t)})},r.prototype.getTypeDefinitionAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getTypeDefinitionAtPosition('"+e+"', "+t+")",function(){return r.languageService.getTypeDefinitionAtPosition(e,t)})},r.prototype.getImplementationAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getImplementationAtPosition('"+e+"', "+t+")",function(){return r.languageService.getImplementationAtPosition(e,t)})},r.prototype.getRenameInfo=function(e,t){var r=this;return this.forwardJSONCall("getRenameInfo('"+e+"', "+t+")",function(){return r.languageService.getRenameInfo(e,t)})},r.prototype.findRenameLocations=function(e,t,r,n){var i=this;return this.forwardJSONCall("findRenameLocations('"+e+"', "+t+", "+r+", "+n+")",function(){return i.languageService.findRenameLocations(e,t,r,n)})},r.prototype.getBraceMatchingAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getBraceMatchingAtPosition('"+e+"', "+t+")",function(){return r.languageService.getBraceMatchingAtPosition(e,t)})},r.prototype.isValidBraceCompletionAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("isValidBraceCompletionAtPosition('"+e+"', "+t+", "+r+")",function(){return n.languageService.isValidBraceCompletionAtPosition(e,t,r)})},r.prototype.getSpanOfEnclosingComment=function(e,t,r){var n=this;return this.forwardJSONCall("getSpanOfEnclosingComment('"+e+"', "+t+")",function(){return n.languageService.getSpanOfEnclosingComment(e,t,r)})},r.prototype.getIndentationAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("getIndentationAtPosition('"+e+"', "+t+")",function(){var i=JSON.parse(r);return n.languageService.getIndentationAtPosition(e,t,i)})},r.prototype.getReferencesAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getReferencesAtPosition('"+e+"', "+t+")",function(){return r.languageService.getReferencesAtPosition(e,t)})},r.prototype.findReferences=function(e,t){var r=this;return this.forwardJSONCall("findReferences('"+e+"', "+t+")",function(){return r.languageService.findReferences(e,t)})},r.prototype.getOccurrencesAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getOccurrencesAtPosition('"+e+"', "+t+")",function(){return r.languageService.getOccurrencesAtPosition(e,t)})},r.prototype.getDocumentHighlights=function(e,r,n){var i=this;return this.forwardJSONCall("getDocumentHighlights('"+e+"', "+r+")",function(){var a=i.languageService.getDocumentHighlights(e,r,JSON.parse(n)),o=t.normalizeSlashes(e).toLowerCase();return t.filter(a,function(e){return t.normalizeSlashes(e.fileName).toLowerCase()===o})})},r.prototype.getCompletionsAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("getCompletionsAtPosition('"+e+"', "+t+", "+r+")",function(){return n.languageService.getCompletionsAtPosition(e,t,r)})},r.prototype.getCompletionEntryDetails=function(e,t,r,n,i,a){var o=this;return this.forwardJSONCall("getCompletionEntryDetails('"+e+"', "+t+", '"+r+"')",function(){var s=void 0===n?void 0:JSON.parse(n);return o.languageService.getCompletionEntryDetails(e,t,r,s,i,a)})},r.prototype.getFormattingEditsForRange=function(e,t,r,n){var i=this;return this.forwardJSONCall("getFormattingEditsForRange('"+e+"', "+t+", "+r+")",function(){var a=JSON.parse(n);return i.languageService.getFormattingEditsForRange(e,t,r,a)})},r.prototype.getFormattingEditsForDocument=function(e,t){var r=this;return this.forwardJSONCall("getFormattingEditsForDocument('"+e+"')",function(){var n=JSON.parse(t);return r.languageService.getFormattingEditsForDocument(e,n)})},r.prototype.getFormattingEditsAfterKeystroke=function(e,t,r,n){var i=this;return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"+e+"', "+t+", '"+r+"')",function(){var a=JSON.parse(n);return i.languageService.getFormattingEditsAfterKeystroke(e,t,r,a)})},r.prototype.getDocCommentTemplateAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getDocCommentTemplateAtPosition('"+e+"', "+t+")",function(){return r.languageService.getDocCommentTemplateAtPosition(e,t)})},r.prototype.getNavigateToItems=function(e,t,r){var n=this;return this.forwardJSONCall("getNavigateToItems('"+e+"', "+t+", "+r+")",function(){return n.languageService.getNavigateToItems(e,t,r)})},r.prototype.getNavigationBarItems=function(e){var t=this;return this.forwardJSONCall("getNavigationBarItems('"+e+"')",function(){return t.languageService.getNavigationBarItems(e)})},r.prototype.getNavigationTree=function(e){var t=this;return this.forwardJSONCall("getNavigationTree('"+e+"')",function(){return t.languageService.getNavigationTree(e)})},r.prototype.getOutliningSpans=function(e){var t=this;return this.forwardJSONCall("getOutliningSpans('"+e+"')",function(){return t.languageService.getOutliningSpans(e)})},r.prototype.getTodoComments=function(e,t){var r=this;return this.forwardJSONCall("getTodoComments('"+e+"')",function(){return r.languageService.getTodoComments(e,JSON.parse(t))})},r.prototype.getEmitOutput=function(e){var t=this;return this.forwardJSONCall("getEmitOutput('"+e+"')",function(){return t.languageService.getEmitOutput(e)})},r.prototype.getEmitOutputObject=function(e){var t=this;return c(this.logger,"getEmitOutput('"+e+"')",!1,function(){return t.languageService.getEmitOutput(e)},this.logPerformance)},r}(l);function p(e){return{spans:e.spans.join(","),endOfLineState:e.endOfLineState}}var f=function(e){function r(r,n){var i=e.call(this,r)||this;return i.logger=n,i.logPerformance=!1,i.classifier=t.createClassifier(),i}return o(r,e),r.prototype.getEncodedLexicalClassifications=function(e,t,r){var n=this;return void 0===r&&(r=!1),s(this.logger,"getEncodedLexicalClassifications",function(){return p(n.classifier.getEncodedLexicalClassifications(e,t,r))},this.logPerformance)},r.prototype.getClassificationsForLine=function(e,t,r){void 0===r&&(r=!1);for(var n=this.classifier.getClassificationsForLine(e,t,r),i="",a=0,o=n.entries;a",""":'"',"'":"'","`":"`"},function(e){return null==Xt?void 0:Xt[e]}),Yt=Object.prototype.toString,$t=Gt.Symbol,Zt=$t?$t.prototype:void 0,er=Zt?Zt.toString:void 0;function tr(e){if("string"==typeof e)return e;if(function(e){return"symbol"==p(e)||function(e){return!!e&&"object"==p(e)}(e)&&Yt.call(e)==Ut}(e))return er?er.call(e):"";var t=e+"";return"0"==t&&1/e==-Kt?"-0":t}var rr=function(e){var t;return(e=null==(t=e)?"":tr(t))&&Vt.test(e)?e.replace(qt,Qt):e},nr=zt.SyntaxKind,ir=[nr.EqualsToken,nr.PlusEqualsToken,nr.MinusEqualsToken,nr.AsteriskEqualsToken,nr.SlashEqualsToken,nr.PercentEqualsToken,nr.LessThanLessThanEqualsToken,nr.GreaterThanGreaterThanEqualsToken,nr.GreaterThanGreaterThanGreaterThanEqualsToken,nr.AmpersandEqualsToken,nr.BarEqualsToken,nr.CaretEqualsToken],ar=[nr.BarBarToken,nr.AmpersandAmpersandToken],or={};or[nr.OpenBraceToken]="{",or[nr.CloseBraceToken]="}",or[nr.OpenParenToken]="(",or[nr.CloseParenToken]=")",or[nr.OpenBracketToken]="[",or[nr.CloseBracketToken]="]",or[nr.DotToken]=".",or[nr.DotDotDotToken]="...",or[nr.SemicolonToken]=";",or[nr.CommaToken]=",",or[nr.LessThanToken]="<",or[nr.GreaterThanToken]=">",or[nr.LessThanEqualsToken]="<=",or[nr.GreaterThanEqualsToken]=">=",or[nr.EqualsEqualsToken]="==",or[nr.ExclamationEqualsToken]="!=",or[nr.EqualsEqualsEqualsToken]="===",or[nr.InstanceOfKeyword]="instanceof",or[nr.ExclamationEqualsEqualsToken]="!==",or[nr.EqualsGreaterThanToken]="=>",or[nr.PlusToken]="+",or[nr.MinusToken]="-",or[nr.AsteriskToken]="*",or[nr.AsteriskAsteriskToken]="**",or[nr.SlashToken]="/",or[nr.PercentToken]="%",or[nr.PlusPlusToken]="++",or[nr.MinusMinusToken]="--",or[nr.LessThanLessThanToken]="<<",or[nr.LessThanSlashToken]=">",or[nr.GreaterThanGreaterThanGreaterThanToken]=">>>",or[nr.AmpersandToken]="&",or[nr.BarToken]="|",or[nr.CaretToken]="^",or[nr.ExclamationToken]="!",or[nr.TildeToken]="~",or[nr.AmpersandAmpersandToken]="&&",or[nr.BarBarToken]="||",or[nr.QuestionToken]="?",or[nr.ColonToken]=":",or[nr.EqualsToken]="=",or[nr.PlusEqualsToken]="+=",or[nr.MinusEqualsToken]="-=",or[nr.AsteriskEqualsToken]="*=",or[nr.AsteriskAsteriskEqualsToken]="**=",or[nr.SlashEqualsToken]="/=",or[nr.PercentEqualsToken]="%=",or[nr.LessThanLessThanEqualsToken]="<<=",or[nr.GreaterThanGreaterThanEqualsToken]=">>=",or[nr.GreaterThanGreaterThanGreaterThanEqualsToken]=">>>=",or[nr.AmpersandEqualsToken]="&=",or[nr.BarEqualsToken]="|=",or[nr.CaretEqualsToken]="^=",or[nr.AtToken]="@",or[nr.InKeyword]="in",or[nr.UniqueKeyword]="unique",or[nr.KeyOfKeyword]="keyof",or[nr.NewKeyword]="new",or[nr.ImportKeyword]="import";var sr={SyntaxKind:nr,isAssignmentOperator:cr,isLogicalOperator:ur,getTextForTokenKind:function(e){return or[e]},isESTreeClassMember:function(e){return e.kind!==nr.SemicolonClassElement},hasModifier:function(e,t){return!!t.modifiers&&!!t.modifiers.length&&t.modifiers.some(function(t){return t.kind===e})},isComma:function(e){return e.kind===nr.CommaToken},getBinaryExpressionType:function(e){if(cr(e))return"AssignmentExpression";if(ur(e))return"LogicalExpression";return"BinaryExpression"},getLocFor:dr,getLoc:function(e,t){return dr(e.getStart(),e.end,t)},isToken:pr,isJSXToken:fr,getDeclarationKind:function(e){switch(e.kind){case nr.TypeAliasDeclaration:return"type";case nr.VariableDeclarationList:return e.flags&zt.NodeFlags.Let?"let":e.flags&zt.NodeFlags.Const?"const":"var";default:throw"Unable to determine declaration kind."}},getTSNodeAccessibility:function(e){var t=e.modifiers;if(!t)return null;for(var r=0;r=a&&r<=o&&(pr(i)?n=i:i.getChildren().forEach(e))}(e),n},isWithinTypeAnnotation:function(e){return e.parent.type===e||e.parent.types&&e.parent.types.indexOf(e)>-1},isTypeKeyword:function(e){switch(e){case nr.AnyKeyword:case nr.BooleanKeyword:case nr.NeverKeyword:case nr.NumberKeyword:case nr.ObjectKeyword:case nr.StringKeyword:case nr.SymbolKeyword:case nr.VoidKeyword:return!0;default:return!1}},isComment:lr,isJSDocComment:_r,createError:function(e,t,r){var n=e.getLineAndCharacterOfPosition(t);return{index:t,lineNumber:n.line+1,column:n.character,message:r}}};function cr(e){return ir.indexOf(e.kind)>-1}function ur(e){return ar.indexOf(e.kind)>-1}function lr(e){return e.kind===nr.SingleLineCommentTrivia||e.kind===nr.MultiLineCommentTrivia}function _r(e){return e.kind===nr.JSDocComment}function dr(e,t,r){var n=r.getLineAndCharacterOfPosition(e),i=r.getLineAndCharacterOfPosition(t);return{start:{line:n.line+1,column:n.character},end:{line:i.line+1,column:i.character}}}function pr(e){return e.kind>=nr.FirstToken&&e.kind<=nr.LastToken}function fr(e){return e.kind>=nr.JsxElement&&e.kind<=nr.JsxAttribute}function mr(e,t){return zt.findNextToken(e,t)}function gr(e,t){for(;e;){if(t(e))return e;e=e.parent}}function yr(e){return!!gr(e,fr)}function hr(e){if(e.originalKeywordKind)switch(e.originalKeywordKind){case nr.NullKeyword:return"Null";case nr.GetKeyword:case nr.SetKeyword:case nr.TypeKeyword:case nr.ModuleKeyword:return"Identifier";default:return"Keyword"}if(e.kind>=nr.FirstKeyword&&e.kind<=nr.LastFutureReservedWord)return e.kind===nr.FalseKeyword||e.kind===nr.TrueKeyword?"Boolean":"Keyword";if(e.kind>=nr.FirstPunctuation&&e.kind<=nr.LastBinaryOperator)return"Punctuator";if(e.kind>=nr.NoSubstitutionTemplateLiteral&&e.kind<=nr.TemplateTail)return"Template";switch(e.kind){case nr.NumericLiteral:return"Numeric";case nr.JsxText:return"JSXText";case nr.StringLiteral:return!e.parent||e.parent.kind!==nr.JsxAttribute&&e.parent.kind!==nr.JsxElement?"String":"JSXText";case nr.RegularExpressionLiteral:return"RegularExpression";case nr.Identifier:case nr.ConstructorKeyword:case nr.GetKeyword:case nr.SetKeyword:}if(e.parent){if(e.kind===nr.Identifier&&e.parent.kind===nr.PropertyAccessExpression&&yr(e))return"JSXIdentifier";if(fr(e.parent)){if(e.kind===nr.PropertyAccessExpression)return"JSXMemberExpression";if(e.kind===nr.Identifier)return"JSXIdentifier"}}return"Identifier"}function vr(e,t){var r=e.kind===nr.JsxText?e.getFullStart():e.getStart(),n=e.getEnd(),i=t.text.slice(r,n),a={type:hr(e),value:i,range:[r,n],loc:dr(r,n,t)};return"RegularExpression"===a.type&&(a.regex={pattern:i.slice(1,i.lastIndexOf("/")),flags:i.slice(i.lastIndexOf("/")+1)}),a}var br=sr.SyntaxKind;function xr(e,t,r){var n=e.getToken()===zt.SyntaxKind.MultiLineCommentTrivia,i={pos:e.getTokenPos(),end:e.getTextPos(),kind:e.getToken()},a=r.substring(i.pos,i.end),o=n?a.replace(/^\/\*/,"").replace(/\*\/$/,""):a.replace(/^\/\//,""),s=sr.getLocFor(i.pos,i.end,t);return function(e,t,r,n,i,a){var o={type:e?"Block":"Line",value:t};return"number"==typeof r&&(o.range=[r,n]),"object"===p(i)&&(o.loc={start:i,end:a}),o}(n,o,i.pos,i.end,s.start,s.end)}var Sr=function(e,t){var r=[],n=zt.createScanner(e.languageVersion,!1,0,t),i=n.scan();for(;i!==zt.SyntaxKind.EndOfFileToken;){var a=n.getTokenPos(),o=n.getTextPos(),s=null;switch(i){case zt.SyntaxKind.SingleLineCommentTrivia:case zt.SyntaxKind.MultiLineCommentTrivia:var c=xr(n,e,t);r.push(c);break;case zt.SyntaxKind.CloseBraceToken:if((s=sr.getNodeContainer(e,a,o)).kind===zt.SyntaxKind.TemplateMiddle||s.kind===zt.SyntaxKind.TemplateTail){i=n.reScanTemplateToken();continue}break;case zt.SyntaxKind.SlashToken:case zt.SyntaxKind.SlashEqualsToken:if((s=sr.getNodeContainer(e,a,o)).kind===zt.SyntaxKind.RegularExpressionLiteral){i=n.reScanSlashToken();continue}}i=n.scan()}return r};var Dr,kr=i(function(e){var t=Sr;e.exports=function(e,r){if(e.parseDiagnostics.length)throw n=e.parseDiagnostics[0],sr.createError(n.file,n.start,n.message||n.messageText);var n,i=function e(t){var r=t.node,n=t.parent,i=t.ast,a=t.additionalOptions||{};if(!r)return null;var o={type:"",range:[r.getStart(),r.end],loc:sr.getLoc(r,i)};function s(t){return e({node:t,parent:r,ast:i,additionalOptions:a})}function c(e){var t=s(e),r=e.getFullStart()-1,n=sr.getLocFor(r,e.end,i);return{type:b.TSTypeAnnotation,loc:n,range:[r,e.end],typeAnnotation:t}}function u(t){var r=t.pos-1,n=t.end+1;if(t&&t.length){var o=t[0].parent;if(o&&(o.kind===br.CallExpression||o.kind===br.TypeReference)){var c=t[t.length-1];n=sr.findNextToken(c,i).end}}return{type:b.TSTypeParameterInstantiation,range:[r,n],loc:sr.getLocFor(r,n,i),params:t.map(function(t){return sr.isTypeKeyword(t.kind)?{type:b["TS".concat(br[t.kind])],range:[t.getStart(),t.getEnd()],loc:sr.getLoc(t,i)}:t.kind===br.ImportType?e({node:t,parent:null,ast:i,additionalOptions:a}):{type:b.TSTypeReference,range:[t.getStart(),t.getEnd()],loc:sr.getLoc(t,i),typeName:s(t.typeName||t),typeParameters:t.typeArguments?u(t.typeArguments):void 0}})}}function l(t){var r=t[0],n=t[t.length-1],o=sr.findNextToken(n,i);return{type:b.TSTypeParameterDeclaration,range:[r.pos-1,o.end],loc:sr.getLocFor(r.pos-1,o.end,i),params:t.map(function(t){var r=t.name.text,n=t.constraint?e({node:t.constraint,parent:t,ast:i,additionalOptions:a}):void 0,o=t.default?e({node:t.default,parent:t,ast:i,additionalOptions:a}):t.default;return{type:b.TSTypeParameter,range:[t.getStart(),t.getEnd()],loc:sr.getLoc(t,i),name:r,constraint:n,default:o}})}}function _(e){return e&&e.length?e.map(function(e){var t=s(e.expression);return{type:b.Decorator,range:[e.getStart(),e.end],loc:sr.getLoc(e,i),expression:t}}):[]}function d(e){return e&&e.length?e.map(function(e){var t=s(e);return e.decorators&&e.decorators.length?Object.assign(t,{decorators:_(e.decorators)}):t}):[]}function f(e){var t=sr.convertToken(e,i);if(t.type===b.JSXMemberExpression){var n=r.tagName.expression.kind===br.PropertyAccessExpression;t.object=s(r.tagName.expression),t.property=s(r.tagName.name),t.object.type=n?b.JSXMemberExpression:b.JSXIdentifier,t.property.type=b.JSXIdentifier,e.expression.kind===br.ThisKeyword&&(t.object.name="this")}else t.type=b.JSXIdentifier,t.name=t.value;return delete t.value,t}function m(e){if(e&&e.length){for(var t={},r=0;r$.pos)&&($=sr.findNextToken(Z,i)),o.typeParameters=l(r.typeParameters)}if(r.modifiers&&r.modifiers.length){r.kind===br.ClassDeclaration&&sr.hasModifier(br.AbstractKeyword,r)&&(Y="TSAbstract".concat(Y));var ee=r.modifiers[r.modifiers.length-1];(!$||ee.pos>$.pos)&&($=sr.findNextToken(ee,i))}else $||($=r.getFirstToken());var te=sr.findNextToken($,i),re=Q.find(function(e){return e.token===br.ExtendsKeyword});if(re){if(re.types.length>1)throw sr.createError(i,re.types[1].pos,"Classes can only extend a single class.");re.types[0]&&re.types[0].typeArguments&&(o.superTypeParameters=u(re.types[0].typeArguments))}var ne=Q.find(function(e){return e.token===br.ImplementsKeyword});Object.assign(o,{type:Y,id:s(r.name),body:{type:b.ClassBody,body:[],range:[te.getStart(),o.range[1]],loc:sr.getLocFor(te.getStart(),r.end,i)},superClass:re&&re.types[0]?s(re.types[0].expression):null}),ne&&(o.implements=ne.types.map(function(e){var t=s(e.expression),r={type:b.ClassImplements,loc:t.loc,range:t.range,id:t};return e.typeArguments&&e.typeArguments.length&&(r.typeParameters=u(e.typeArguments)),r})),r.decorators&&(o.decorators=_(r.decorators));var ie=r.members.filter(sr.isESTreeClassMember);ie.length&&(o.body.body=ie.map(s)),o=sr.fixExports(r,o,i);break;case br.ModuleBlock:Object.assign(o,{type:b.TSModuleBlock,body:r.statements.map(s)});break;case br.ImportDeclaration:Object.assign(o,{type:b.ImportDeclaration,source:s(r.moduleSpecifier),specifiers:[]}),r.importClause&&(r.importClause.name&&o.specifiers.push(s(r.importClause)),r.importClause.namedBindings&&(r.importClause.namedBindings.kind===br.NamespaceImport?o.specifiers.push(s(r.importClause.namedBindings)):o.specifiers=o.specifiers.concat(r.importClause.namedBindings.elements.map(s))));break;case br.NamespaceImport:Object.assign(o,{type:b.ImportNamespaceSpecifier,local:s(r.name)});break;case br.ImportSpecifier:Object.assign(o,{type:b.ImportSpecifier,local:s(r.name),imported:s(r.propertyName||r.name)});break;case br.ImportClause:Object.assign(o,{type:b.ImportDefaultSpecifier,local:s(r.name)}),o.range[1]=r.name.end,o.loc=sr.getLocFor(o.range[0],o.range[1],i);break;case br.NamedImports:Object.assign(o,{type:b.ImportDefaultSpecifier,local:s(r.name)});break;case br.ExportDeclaration:r.exportClause?Object.assign(o,{type:b.ExportNamedDeclaration,source:s(r.moduleSpecifier),specifiers:r.exportClause.elements.map(s),declaration:null}):Object.assign(o,{type:b.ExportAllDeclaration,source:s(r.moduleSpecifier)});break;case br.ExportSpecifier:Object.assign(o,{type:b.ExportSpecifier,local:s(r.propertyName||r.name),exported:s(r.name)});break;case br.ExportAssignment:r.isExportEquals?Object.assign(o,{type:b.TSExportAssignment,expression:s(r.expression)}):Object.assign(o,{type:b.ExportDefaultDeclaration,declaration:s(r.expression)});break;case br.PrefixUnaryExpression:case br.PostfixUnaryExpression:var ae=sr.getTextForTokenKind(r.operator);Object.assign(o,{type:/^(?:\+\+|--)$/.test(ae)?b.UpdateExpression:b.UnaryExpression,operator:ae,prefix:r.kind===br.PrefixUnaryExpression,argument:s(r.operand)});break;case br.DeleteExpression:Object.assign(o,{type:b.UnaryExpression,operator:"delete",prefix:!0,argument:s(r.expression)});break;case br.VoidExpression:Object.assign(o,{type:b.UnaryExpression,operator:"void",prefix:!0,argument:s(r.expression)});break;case br.TypeOfExpression:Object.assign(o,{type:b.UnaryExpression,operator:"typeof",prefix:!0,argument:s(r.expression)});break;case br.TypeOperator:Object.assign(o,{type:b.TSTypeOperator,operator:sr.getTextForTokenKind(r.operator),typeAnnotation:s(r.type)});break;case br.BinaryExpression:if(sr.isComma(r.operatorToken)){Object.assign(o,{type:b.SequenceExpression,expressions:[]});var oe=s(r.left),se=s(r.right);oe.type===b.SequenceExpression?o.expressions=o.expressions.concat(oe.expressions):o.expressions.push(oe),se.type===b.SequenceExpression?o.expressions=o.expressions.concat(se.expressions):o.expressions.push(se)}else if(r.operatorToken&&r.operatorToken.kind===br.AsteriskAsteriskEqualsToken)Object.assign(o,{type:b.AssignmentExpression,operator:sr.getTextForTokenKind(r.operatorToken.kind),left:s(r.left),right:s(r.right)});else if(Object.assign(o,{type:sr.getBinaryExpressionType(r.operatorToken),operator:sr.getTextForTokenKind(r.operatorToken.kind),left:s(r.left),right:s(r.right)}),o.type===b.AssignmentExpression){var ce,ue=sr.findAncestorOfKind(r,br.ArrayLiteralExpression),le=ue&&sr.findAncestorOfKind(ue,br.BinaryExpression);le&&(ce=le.left===ue||sr.findChildOfKind(le.left,br.ArrayLiteralExpression,i)===ue),ce&&(delete o.operator,o.type=b.AssignmentPattern)}break;case br.PropertyAccessExpression:if(sr.isJSXToken(n)){var _e={type:b.MemberExpression,object:s(r.expression),property:s(r.name)},de=r.expression.kind===br.PropertyAccessExpression;r.expression.kind===br.ThisKeyword&&(_e.object.name="this"),_e.object.type=de?b.MemberExpression:b.JSXIdentifier,_e.property.type=b.JSXIdentifier,Object.assign(o,_e)}else Object.assign(o,{type:b.MemberExpression,object:s(r.expression),property:s(r.name),computed:!1});break;case br.ElementAccessExpression:Object.assign(o,{type:b.MemberExpression,object:s(r.expression),property:s(r.argumentExpression),computed:!0});break;case br.ConditionalExpression:Object.assign(o,{type:b.ConditionalExpression,test:s(r.condition),consequent:s(r.whenTrue),alternate:s(r.whenFalse)});break;case br.CallExpression:Object.assign(o,{type:b.CallExpression,callee:s(r.expression),arguments:r.arguments.map(s)}),r.typeArguments&&r.typeArguments.length&&(o.typeParameters=u(r.typeArguments));break;case br.NewExpression:Object.assign(o,{type:b.NewExpression,callee:s(r.expression),arguments:r.arguments?r.arguments.map(s):[]}),r.typeArguments&&r.typeArguments.length&&(o.typeParameters=u(r.typeArguments));break;case br.MetaProperty:var pe=sr.convertToken(r.getFirstToken(),i);Object.assign(o,{type:b.MetaProperty,meta:{type:b.Identifier,range:pe.range,loc:pe.loc,name:sr.getTextForTokenKind(r.keywordToken)},property:s(r.name)});break;case br.StringLiteral:Object.assign(o,{type:b.Literal,raw:i.text.slice(o.range[0],o.range[1])}),n.name&&n.name===r?o.value=r.text:o.value=sr.unescapeStringLiteralText(r.text);break;case br.NumericLiteral:Object.assign(o,{type:b.Literal,value:Number(r.text),raw:i.text.slice(o.range[0],o.range[1])});break;case br.RegularExpressionLiteral:var fe=r.text.slice(1,r.text.lastIndexOf("/")),me=r.text.slice(r.text.lastIndexOf("/")+1),ge=null;try{ge=new RegExp(fe,me)}catch(e){ge=null}Object.assign(o,{type:b.Literal,value:ge,raw:r.text,regex:{pattern:fe,flags:me}});break;case br.TrueKeyword:Object.assign(o,{type:b.Literal,value:!0,raw:"true"});break;case br.FalseKeyword:Object.assign(o,{type:b.Literal,value:!1,raw:"false"});break;case br.NullKeyword:sr.isWithinTypeAnnotation(r)?Object.assign(o,{type:b.TSNullKeyword}):Object.assign(o,{type:b.Literal,value:null,raw:"null"});break;case br.ImportKeyword:Object.assign(o,{type:b.Import});break;case br.EmptyStatement:case br.DebuggerStatement:Object.assign(o,{type:br[r.kind]});break;case br.JsxElement:Object.assign(o,{type:b.JSXElement,openingElement:s(r.openingElement),closingElement:s(r.closingElement),children:r.children.map(s)});break;case br.JsxSelfClosingElement:r.kind=br.JsxOpeningElement;var ye=s(r);ye.selfClosing=!0,Object.assign(o,{type:b.JSXElement,openingElement:ye,closingElement:null,children:[]});break;case br.JsxOpeningElement:Object.assign(o,{type:b.JSXOpeningElement,typeParameters:r.typeArguments?u(r.typeArguments):void 0,selfClosing:!1,name:f(r.tagName),attributes:r.attributes.properties.map(s)});break;case br.JsxClosingElement:Object.assign(o,{type:b.JSXClosingElement,name:f(r.tagName)});break;case br.JsxExpression:var he=i.getLineAndCharacterOfPosition(o.range[0]+1),ve=r.expression?s(r.expression):{type:b.JSXEmptyExpression,loc:{start:{line:he.line+1,column:he.character},end:{line:o.loc.end.line,column:o.loc.end.column-1}},range:[o.range[0]+1,o.range[1]-1]};Object.assign(o,{type:r.dotDotDotToken?b.JSXSpreadChild:b.JSXExpressionContainer,expression:ve});break;case br.JsxAttribute:var be=sr.convertToken(r.name,i);be.type=b.JSXIdentifier,be.name=be.value,delete be.value,Object.assign(o,{type:b.JSXAttribute,name:be,value:s(r.initializer)});break;case br.JsxText:var xe=r.getFullStart(),Se=r.getEnd(),De=a.useJSXTextNode?b.JSXText:b.Literal;Object.assign(o,{type:De,value:i.text.slice(xe,Se),raw:i.text.slice(xe,Se)}),o.loc=sr.getLocFor(xe,Se,i),o.range=[xe,Se];break;case br.JsxSpreadAttribute:Object.assign(o,{type:b.JSXSpreadAttribute,argument:s(r.expression)});break;case br.FirstNode:Object.assign(o,{type:b.TSQualifiedName,left:s(r.left),right:s(r.right)});break;case br.ParenthesizedExpression:return e({node:r.expression,parent:n,ast:i,additionalOptions:a});case br.TypeAliasDeclaration:var ke={type:b.VariableDeclarator,id:s(r.name),init:s(r.type),range:[r.name.getStart(),r.end]};ke.loc=sr.getLocFor(ke.range[0],ke.range[1],i),r.typeParameters&&r.typeParameters.length&&(ke.typeParameters=l(r.typeParameters)),Object.assign(o,{type:b.VariableDeclaration,kind:sr.getDeclarationKind(r),declarations:[ke]}),o=sr.fixExports(r,o,i);break;case br.MethodSignature:Object.assign(o,{type:b.TSMethodSignature,optional:sr.isOptional(r),computed:sr.isComputedProperty(r.name),key:s(r.name),params:d(r.parameters),typeAnnotation:r.type?c(r.type):null,readonly:sr.hasModifier(br.ReadonlyKeyword,r)||void 0,static:sr.hasModifier(br.StaticKeyword,r),export:sr.hasModifier(br.ExportKeyword,r)||void 0});var Te=sr.getTSNodeAccessibility(r);Te&&(o.accessibility=Te),r.typeParameters&&(o.typeParameters=l(r.typeParameters));break;case br.PropertySignature:Object.assign(o,{type:b.TSPropertySignature,optional:sr.isOptional(r)||void 0,computed:sr.isComputedProperty(r.name),key:s(r.name),typeAnnotation:r.type?c(r.type):void 0,initializer:s(r.initializer)||void 0,readonly:sr.hasModifier(br.ReadonlyKeyword,r)||void 0,static:sr.hasModifier(br.StaticKeyword,r)||void 0,export:sr.hasModifier(br.ExportKeyword,r)||void 0});var Ce=sr.getTSNodeAccessibility(r);Ce&&(o.accessibility=Ce);break;case br.IndexSignature:Object.assign(o,{type:b.TSIndexSignature,index:s(r.parameters[0]),typeAnnotation:r.type?c(r.type):null,readonly:sr.hasModifier(br.ReadonlyKeyword,r)||void 0,static:sr.hasModifier(br.StaticKeyword,r),export:sr.hasModifier(br.ExportKeyword,r)||void 0});var Ee=sr.getTSNodeAccessibility(r);Ee&&(o.accessibility=Ee);break;case br.ConstructSignature:Object.assign(o,{type:b.TSConstructSignature,params:d(r.parameters),typeAnnotation:r.type?c(r.type):null}),r.typeParameters&&(o.typeParameters=l(r.typeParameters));break;case br.InterfaceDeclaration:var Ne=r.heritageClauses||[],Ae=Ne.length?Ne[Ne.length-1]:r.name;if(r.typeParameters&&r.typeParameters.length){var Pe=r.typeParameters[r.typeParameters.length-1];(!Ae||Pe.pos>Ae.pos)&&(Ae=sr.findNextToken(Pe,i)),o.typeParameters=l(r.typeParameters)}var we=Ne.length>0,Fe=sr.hasModifier(br.AbstractKeyword,r),Ie=sr.findNextToken(Ae,i),Oe={type:b.TSInterfaceBody,body:r.members.map(function(e){return s(e)}),range:[Ie.getStart(),o.range[1]],loc:sr.getLocFor(Ie.getStart(),r.end,i)};Object.assign(o,{abstract:Fe,type:b.TSInterfaceDeclaration,body:Oe,id:s(r.name),heritage:we?Ne[0].types.map(function(e){var t=s(e.expression),r={type:b.TSInterfaceHeritage,loc:t.loc,range:t.range,id:t};return e.typeArguments&&e.typeArguments.length&&(r.typeParameters=u(e.typeArguments)),r}):[]}),r.decorators&&(o.decorators=_(r.decorators)),o=sr.fixExports(r,o,i);break;case br.FirstTypeNode:Object.assign(o,{type:b.TSTypePredicate,parameterName:s(r.parameterName),typeAnnotation:c(r.type)}),o.typeAnnotation.loc=o.typeAnnotation.typeAnnotation.loc,o.typeAnnotation.range=o.typeAnnotation.typeAnnotation.range;break;case br.ImportType:Object.assign(o,{type:b.TSImportType,isTypeOf:!!r.isTypeOf,parameter:s(r.argument),qualifier:s(r.qualifier),typeParameters:r.typeArguments?u(r.typeArguments):null});break;case br.EnumDeclaration:Object.assign(o,{type:b.TSEnumDeclaration,id:s(r.name),members:r.members.map(s)}),m(r.modifiers),o=sr.fixExports(r,o,i),r.decorators&&(o.decorators=_(r.decorators));break;case br.EnumMember:Object.assign(o,{type:b.TSEnumMember,id:s(r.name)}),r.initializer&&(o.initializer=s(r.initializer));break;case br.AbstractKeyword:Object.assign(o,{type:b.TSAbstractKeyword});break;case br.ModuleDeclaration:Object.assign(o,{type:b.TSModuleDeclaration,id:s(r.name)}),r.body&&(o.body=s(r.body)),m(r.modifiers),o=sr.fixExports(r,o,i);break;default:!function(){var e="TS".concat(br[r.kind]);if(a.errorOnUnknownASTType&&!b[e])throw new Error('Unknown AST_NODE_TYPE: "'.concat(e,'"'));o.type=e,Object.keys(r).filter(function(e){return!/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc)$/.test(e)}).forEach(function(e){if("type"===e)o.typeAnnotation=r.type?c(r.type):null;else if("typeArguments"===e)o.typeParameters=r.typeArguments?u(r.typeArguments):null;else if("typeParameters"===e)o.typeParameters=r.typeParameters?l(r.typeParameters):null;else if("decorators"===e){var t=_(r.decorators);t&&t.length&&(o.decorators=t)}else Array.isArray(r[e])?o[e]=r[e].map(s):r[e]&&"object"===p(r[e])?o[e]=s(r[e]):o[e]=r[e]})}()}return o}({node:e,parent:null,ast:e,additionalOptions:{errorOnUnknownASTType:r.errorOnUnknownASTType||!1,useJSXTextNode:r.useJSXTextNode||!1}});return r.tokens&&(i.tokens=sr.convertTokens(e)),r.comment&&(i.comments=t(e,r.code)),i}}),Tr=i(function(e,t){var r;t=e.exports=X,r="object"===p(H)&&H.env&&H.env.NODE_DEBUG&&/\bsemver\b/i.test(H.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],o=t.src=[],s=0,c=s++;o[c]="0|[1-9]\\d*";var u=s++;o[u]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var _=s++;o[_]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var d=s++;o[d]="("+o[u]+")\\.("+o[u]+")\\.("+o[u]+")";var f=s++;o[f]="(?:"+o[c]+"|"+o[l]+")";var m=s++;o[m]="(?:"+o[u]+"|"+o[l]+")";var g=s++;o[g]="(?:-("+o[f]+"(?:\\."+o[f]+")*))";var y=s++;o[y]="(?:-?("+o[m]+"(?:\\."+o[m]+")*))";var h=s++;o[h]="[0-9A-Za-z-]+";var v=s++;o[v]="(?:\\+("+o[h]+"(?:\\."+o[h]+")*))";var b=s++,x="v?"+o[_]+o[g]+"?"+o[v]+"?";o[b]="^"+x+"$";var S="[v=\\s]*"+o[d]+o[y]+"?"+o[v]+"?",D=s++;o[D]="^"+S+"$";var k=s++;o[k]="((?:<|>)?=?)";var T=s++;o[T]=o[u]+"|x|X|\\*";var C=s++;o[C]=o[c]+"|x|X|\\*";var E=s++;o[E]="[v=\\s]*("+o[C]+")(?:\\.("+o[C]+")(?:\\.("+o[C]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var N=s++;o[N]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[y]+")?"+o[v]+"?)?)?";var A=s++;o[A]="^"+o[k]+"\\s*"+o[E]+"$";var P=s++;o[P]="^"+o[k]+"\\s*"+o[N]+"$";var w=s++;o[w]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var F=s++;o[F]="(?:~>?)";var I=s++;o[I]="(\\s*)"+o[F]+"\\s+",a[I]=new RegExp(o[I],"g");var O=s++;o[O]="^"+o[F]+o[E]+"$";var M=s++;o[M]="^"+o[F]+o[N]+"$";var L=s++;o[L]="(?:\\^)";var R=s++;o[R]="(\\s*)"+o[L]+"\\s+",a[R]=new RegExp(o[R],"g");var B=s++;o[B]="^"+o[L]+o[E]+"$";var j=s++;o[j]="^"+o[L]+o[N]+"$";var J=s++;o[J]="^"+o[k]+"\\s*("+S+")$|^$";var z=s++;o[z]="^"+o[k]+"\\s*("+x+")$|^$";var K=s++;o[K]="(\\s*)"+o[k]+"\\s*("+S+"|"+o[E]+")",a[K]=new RegExp(o[K],"g");var U=s++;o[U]="^\\s*("+o[E]+")\\s+-\\s+("+o[E]+")\\s*$";var q=s++;o[q]="^\\s*("+o[N]+")\\s+-\\s+("+o[N]+")\\s*$";var V=s++;o[V]="(<|>)?=?\\s*\\*";for(var W=0;Wn)return null;if(!(t?a[D]:a[b]).test(e))return null;try{return new X(e,t)}catch(e){return null}}function X(e,t){if(e instanceof X){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof X))return new X(e,t);r("SemVer",e,t),this.loose=t;var o=e.trim().match(t?a[D]:a[b]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new X(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(te(e,t))return null;var r=G(e),n=G(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=Y;var Q=/^[0-9]+$/;function Y(e,t){var r=Q.test(e),n=Q.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:et?1:0}function $(e,t,r){return new X(e,r).compare(new X(t,r))}function Z(e,t,r){return $(e,t,r)>0}function ee(e,t,r){return $(e,t,r)<0}function te(e,t,r){return 0===$(e,t,r)}function re(e,t,r){return 0!==$(e,t,r)}function ne(e,t,r){return $(e,t,r)>=0}function ie(e,t,r){return $(e,t,r)<=0}function ae(e,t,r,n){var i;switch(t){case"===":"object"===p(e)&&(e=e.version),"object"===p(r)&&(r=r.version),i=e===r;break;case"!==":"object"===p(e)&&(e=e.version),"object"===p(r)&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=te(e,r,n);break;case"!=":i=re(e,r,n);break;case">":i=Z(e,r,n);break;case">=":i=ne(e,r,n);break;case"<":i=ee(e,r,n);break;case"<=":i=ie(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function oe(e,t){if(e instanceof oe){if(e.loose===t)return e;e=e.value}if(!(this instanceof oe))return new oe(e,t);r("comparator",e,t),this.loose=t,this.parse(e),this.semver===se?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return Y(t,e)},t.major=function(e,t){return new X(e,t).major},t.minor=function(e,t){return new X(e,t).minor},t.patch=function(e,t){return new X(e,t).patch},t.compare=$,t.compareLoose=function(e,t){return $(e,t,!0)},t.rcompare=function(e,t,r){return $(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=Z,t.lt=ee,t.eq=te,t.neq=re,t.gte=ne,t.lte=ie,t.cmp=ae,t.Comparator=oe;var se={};function ce(e,t){if(e instanceof ce)return e.loose===t?e:new ce(e.raw,t);if(e instanceof oe)return new ce(e.value,t);if(!(this instanceof ce))return new ce(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ue(e){return!e||"x"===e.toLowerCase()||"*"===e}function le(e,t,r,n,i,a,o,s,c,u,l,_,d){return((t=ue(r)?"":ue(n)?">="+r+".0.0":ue(i)?">="+r+"."+n+".0":">="+t)+" "+(s=ue(c)?"":ue(u)?"<"+(+c+1)+".0.0":ue(l)?"<"+c+"."+(+u+1)+".0":_?"<="+c+"."+u+"."+l+"-"+_:"<="+s)).trim()}function _e(e,t){for(var n=0;n0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function de(e,t,r){try{t=new ce(t,r)}catch(e){return!1}return t.test(e)}function pe(e,t,r,n){var i,a,o,s,c;switch(e=new X(e,n),t=new ce(t,n),r){case">":i=Z,a=ie,o=ee,s=">",c=">=";break;case"<":i=ee,a=ne,o=Z,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(de(e,t,n))return!1;for(var u=0;u=0.0.0")),l=l||e,_=_||e,i(e.semver,l.semver,n)?l=e:o(e.semver,_.semver,n)&&(_=e)}),l.operator===s||l.operator===c)return!1;if((!_.operator||_.operator===s)&&a(e,_.semver))return!1;if(_.operator===c&&o(e,_.semver))return!1}return!0}oe.prototype.parse=function(e){var t=this.loose?a[J]:a[z],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new X(r[2],this.loose):this.semver=se},oe.prototype.toString=function(){return this.value},oe.prototype.test=function(e){return r("Comparator.test",e,this.loose),this.semver===se||("string"==typeof e&&(e=new X(e,this.loose)),ae(e,this.operator,this.semver,this.loose))},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new ce(e.value,t),de(this.value,r,t);if(""===e.operator)return r=new ce(this.value,t),de(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ae(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ae(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||c},t.Range=ce,ce.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},ce.prototype.toString=function(){return this.range},ce.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),r("range",e,t);var n=t?a[q]:a[U];e=e.replace(n,le),r("hyphen replace",e),e=e.replace(a[K],"$1$2$3"),r("comparator trim",e,a[K]),e=(e=(e=e.replace(a[I],"$1~")).replace(a[R],"$1^")).split(/\s+/).join(" ");var i=t?a[J]:a[z],o=e.split(" ").map(function(e){return function(e,t){return r("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t?a[j]:a[B];return e.replace(n,function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),ue(n)?s="":ue(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":ue(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t?a[M]:a[O];return e.replace(n,function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),ue(n)?s="":ue(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":ue(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+n+"."+i+"."+a+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t?a[P]:a[A];return e.replace(n,function(t,n,i,a,o,s){r("xRange",e,t,n,i,a,o,s);var c=ue(i),u=c||ue(a),l=u||ue(o),_=l;return"="===n&&_&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&_?(u&&(a=0),l&&(o=0),">"===n?(n=">=",u?(i=+i+1,a=0,o=0):l&&(a=+a+1,o=0)):"<="===n&&(n="<",u?i=+i+1:a=+a+1),t=n+i+"."+a+"."+o):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),r("xRange return",t),t})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[V],"")}(e,t),r("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(o=o.filter(function(e){return!!e.match(i)})),o=o.map(function(e){return new oe(e,t)})},ce.prototype.intersects=function(e,t){if(!(e instanceof ce))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new ce(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},ce.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new X(e,this.loose));for(var t=0;t",r)},t.outside=pe,t.prerelease=function(e,t){var r=G(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new ce(e,r),t=new ce(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof X)return e;if("string"!=typeof e)return null;var t=e.match(a[w]);return null==t?null:G((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),Cr="typescript-estree",Er="A parser that converts TypeScript source code into an ESTree compatible form",Nr="https://github.com/JamesHenry/typescript-estree",Ar=["lib","parser.js"],Pr={node:">=6.14.0"},wr={url:"https://github.com/JamesHenry/typescript-estree/issues"},Fr={"babel-code-frame":"6.26.0",babylon:"7.0.0-beta.39","cz-conventional-changelog":"2.1.0",glob:"7.1.2",husky:"0.14.3",jest:"23.1.0","lint-staged":"7.3.0","lodash.isplainobject":"4.0.6","semantic-release":"^15.9.16",shelljs:"0.8.2",typescript:"~3.0.1","travis-deploy-once":"^5.0.8"},Ir=["ast","estree","ecmascript","javascript","typescript","parser","syntax"],Or={test:"npm run unit-tests && npm run ast-alignment-tests","unit-tests":"jest","ast-alignment-tests":"jest --config=./tests/ast-alignment/jest.config.js",precommit:"npm test && lint-staged",cz:"git-cz","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once"},Mr={"lodash.unescape":"4.0.1",semver:"5.5.0"},Lr={typescript:"*"},Rr={commitizen:{path:"./node_modules/cz-conventional-changelog"}},Br={testEnvironment:"node",testRegex:"tests/lib/.+\\.js$",testPathIgnorePatterns:[],collectCoverage:!0,coverageReporters:["text-summary"]},jr={name:Cr,description:Er,homepage:Nr,main:"parser.js",version:"1.0.0",files:Ar,engines:Pr,repository:"JamesHenry/typescript-estree",bugs:wr,license:"BSD-2-Clause",devDependencies:Fr,keywords:Ir,scripts:Or,dependencies:Mr,peerDependencies:Lr,config:Rr,jest:Br,"lint-staged":{}},Jr=Object.freeze({name:Cr,description:Er,homepage:Nr,main:"parser.js",version:"1.0.0",files:Ar,engines:Pr,repository:"JamesHenry/typescript-estree",bugs:wr,license:"BSD-2-Clause",devDependencies:Fr,keywords:Ir,scripts:Or,dependencies:Mr,peerDependencies:Lr,config:Rr,jest:Br,default:jr}),zr=Jr&&jr||Jr,Kr=zr.devDependencies.typescript,Ur=zt.version,qr=Tr.satisfies(Ur,Kr),Vr=!1;function Wr(e,t){var r=String;if("string"==typeof e||e instanceof String||(e=r(e)),Dr={tokens:null,range:!1,loc:!1,comment:!1,comments:[],tolerant:!1,errors:[],strict:!1,ecmaFeatures:{},useJSXTextNode:!1,log:console.log},void 0!==t&&(Dr.range="boolean"==typeof t.range&&t.range,Dr.loc="boolean"==typeof t.loc&&t.loc,Dr.loc&&null!==t.source&&void 0!==t.source&&(Dr.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(Dr.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(Dr.comment=!0,Dr.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(Dr.errors=[]),t.ecmaFeatures&&"object"===p(t.ecmaFeatures)&&(Dr.ecmaFeatures.jsx=t.ecmaFeatures.jsx),t.errorOnUnknownASTType&&(Dr.errorOnUnknownASTType=!0),"boolean"==typeof t.useJSXTextNode&&t.useJSXTextNode&&(Dr.useJSXTextNode=!0),"function"==typeof t.loggerFn?Dr.log=t.loggerFn:!1===t.loggerFn&&(Dr.log=Function.prototype)),!qr&&!Vr){var n=["=============","WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.","You may find that it works just fine, or you may not.","SUPPORTED TYPESCRIPT VERSIONS: ".concat(Kr),"YOUR TYPESCRIPT VERSION: ".concat(Ur),"Please only submit bug reports when using the officially supported version.","============="];Dr.log(n.join("\n\n")),Vr=!0}var i=Dr.ecmaFeatures.jsx?"estree.tsx":"estree.ts",a={fileExists:function(){return!0},getCanonicalFileName:function(){return i},getCurrentDirectory:function(){return""},getDefaultLibFileName:function(){return"lib.d.ts"},getNewLine:function(){return"\n"},getSourceFile:function(t){return zt.createSourceFile(t,e,zt.ScriptTarget.Latest,!0)},readFile:function(){return null},useCaseSensitiveFileNames:function(){return!0},writeFile:function(){return null}},o=zt.createProgram([i],{noResolve:!0,target:zt.ScriptTarget.Latest,jsx:Dr.ecmaFeatures.jsx?"preserve":void 0},a).getSourceFile(i);return Dr.code=e,kr(o,Dr)}var Hr={version:zr.version,parse:function(e,t){return Wr(e,t)},AST_NODE_TYPES:b},Gr=l;function Xr(e,t){return Hr.parse(e,{loc:!0,range:!0,tokens:!0,comment:!0,useJSXTextNode:!0,ecmaFeatures:{jsx:t},loggerFn:function(){}})}return{parsers:{typescript:Object.assign({parse:function(r,n,i){var a,o=function(e){return new RegExp(["(^[^\"'`]*)"].join(""),"m").test(e)}(r);try{a=Xr(r,o)}catch(t){try{a=Xr(r,!o)}catch(r){var s=t;if(void 0===s.lineNumber)throw s;throw e(s.message,{start:{line:s.lineNumber,column:s.column+1}})}}return delete a.tokens,t(r,a),v(a,Object.assign({},i,{originalText:r}))},astFormat:"estree",hasPragma:Gr},d)}}}); diff --git a/node_modules/prettier/parser-yaml.js b/node_modules/prettier/parser-yaml.js new file mode 100644 index 0000000..c0ad165 --- /dev/null +++ b/node_modules/prettier/parser-yaml.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.yaml=t())}(this,function(){"use strict";var e=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n};var t=function(e){return/^\s*#[^\n\S]*@(prettier|format)\s*?(\n|$)/.test(e)};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function _(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function b(e){return this instanceof b?(this.v=e,this):new b(e)}var w=Object.freeze({__extends:function(e,t){function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return g},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a=0;u--)(o=e[u])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":a(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?a(e.value):new n(function(t){t(e.value)}).then(i,s)}u((r=r.apply(e,t||[])).next())})},__generator:function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]1||s(e,t)})})}function s(e,t){try{(n=a[e](t)).value instanceof b?Promise.resolve(n.value.v).then(u,c):f(o[0][2],n)}catch(e){f(o[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:a?a(t):t}:a}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,a,(t=e[n](t)).done,t.value)})}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}}}),O=r(function(e,t){var n="\n",r="\r",a=function(){function e(e){this.string=e;for(var t=[0],a=0;athis.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length?null:n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();t.__esModule=!0,t.default=a});n(O);var E=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(t,n){o(this,e),this.start=t,this.end=n||t}return s(e,null,[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),s(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var n=this.start,r=this.end;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;for(var a=t;an);)++a;this.origStart=n+a;for(var o=a;a=r);)++a;return this.origEnd=r+a,o}}]),e}();t.default=n});n(E);var M=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Char=t.Type=void 0;var n,r=(n=E)&&n.__esModule?n:{default:n};function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i={ALIAS:"ALIAS",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"};t.Type=i;var u={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."};t.Char=u;var c=function(){function e(t,n,r){o(this,e),this.context=r||null,this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return s(e,null,[{key:"addStringTerminator",value:function(t,n,r){if("\n"===r[r.length-1])return r;var a=e.endOfWhiteSpace(t,n);return a>=t.length||"\n"===t[a]?r+"\n":r}},{key:"atDocumentBoundary",value:function(e,t,n){var r=e[t];if(!r)return!0;var a=e[t-1];if(a&&"\n"!==a)return!1;if(n){if(r!==n)return!1}else if(r!==u.DIRECTIVES_END&&r!==u.DOCUMENT_END)return!1;var o=e[t+1],i=e[t+2];if(o!==r||i!==r)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var n=e[t],r="<"===n,a=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];n&&-1===a.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var n=e[t];" "===n;)n=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var n=e[t];n&&"\n"!==n;)n=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var n=e[t];"\t"===n||" "===n;)n=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,n,r){var a=e.endOfIndent(t,r);if(a>r+n)return a;var o=e.endOfWhiteSpace(t,a),i=t[o];return i&&"\n"!==i?null:o}},{key:"atBlank",value:function(e,t){var n=e[t];return"\n"===n||"\t"===n||" "===n}},{key:"atCollectionItem",value:function(t,n){var r=t[n];return("?"===r||":"===r||"-"===r)&&e.atBlank(t,n+1)}},{key:"nextNodeIsIndented",value:function(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}},{key:"normalizeOffset",value:function(t,n){var r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}},{key:"foldNewline",value:function(t,n,r){for(var a=0,o=!1,i="",s=t[n+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":a=0,n+=1,i+="\n";break;case"\t":a<=r&&(o=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":a+=1,n+=1}s=t[n+1]}return i||(i=" "),s&&a<=r&&(o=!0),{fold:i,offset:n,error:o}}}]),s(e,[{key:"getPropValue",value:function(e,t,n){if(!this.context)return null;var r=this.context.src,a=this.props[e];return a&&r[a.start]===t?r.slice(a.start+(n?1:0),a.end):null}},{key:"commentHasRequiredWhitespace",value:function(t){var n=this.context.src;if(this.header&&t===this.header.end)return!1;if(this.valueRange){var r=this.valueRange.end;return t!==r||e.atBlank(n,r-1)}}},{key:"parseComment",value:function(t){var n=this.context.src;if(n[t]===u.COMMENT){var a=e.endOfLine(n,t+1),o=new r.default(t,a);return this.props.push(o),a}return t}},{key:"setOrigRanges",value:function(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange.setOrigRange(e,t),this.props.forEach(function(n){return n.setOrigRange(e,t)}),t}},{key:"toString",value:function(){var t=this.context.src,n=this.range,r=this.value;if(null!=r)return r;var a=t.slice(n.start,n.end);return e.addStringTerminator(t,n.end,a)}},{key:"anchor",get:function(){for(var e=0;e0?e.join("\n"):null}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t0&&(this.contents=this.directives,this.directives=[]),s}return o[s]?s+3:(i?this.error=new S.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),s)}},{key:"parseContents",value:function(e){var r=this.context,o=r.parseNode,s=r.src;this.contents||(this.contents=[]);for(var u=e;"-"===s[u-1];)u-=1;var c=a.default.endOfWhiteSpace(s,e),f=u===e;for(this.valueRange=new i.default(c);!a.default.atDocumentBoundary(s,c,a.Char.DOCUMENT_END);){switch(s[c]){case"\n":u=c+=1,f=!0;break;case"#":var l=new n.default;c=l.parse({src:s},c),this.contents.push(l);break;default:var d=a.default.endOfIndent(s,c),h=o({atLineStart:f,indent:-1,inFlow:!1,inCollection:!1,lineStart:u,parent:this},d);if(!h)return this.valueRange.end=d;this.contents.push(h),c=h.range.end,f=!1}c=t.startCommentOrEndBlankLine(s,c)}if(this.valueRange.end=c,s[c]&&s[c+=3]){if("#"===s[c=a.default.endOfWhiteSpace(s,c)]){var p=new n.default;c=p.parse({src:s},c),this.contents.push(p)}switch(s[c]){case"\n":c+=1;break;case void 0:break;default:this.error=new S.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return c}},{key:"parse",value:function(e,t){this.context=e;var n=65279===e.src.charCodeAt(t)?t+1:t;return n=this.parseDirectives(n),n=this.parseContents(n)}},{key:"setOrigRanges",value:function(e,n){return n=v(c(t.prototype),"setOrigRanges",this).call(this,e,n),this.directives.forEach(function(t){n=t.setOrigRanges(e,n)}),this.contents.forEach(function(t){n=t.setOrigRanges(e,n)}),n}},{key:"toString",value:function(){var e=this.contents,t=(this.context.src,this.directives),n=this.value;if(null!=n)return n;var r=t.join("");return e.length>0&&((t.length>0||e[0].type===a.Type.COMMENT)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}]),t}();t.default=l});n(T);var L=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(M),r=a(E);function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){function t(){return o(this,t),p(this,c(t).apply(this,arguments))}return u(t,n.default),s(t,[{key:"parse",value:function(e,t){this.context=e;var a=e.src,o=n.default.endOfIdentifier(a,t+1);return this.valueRange=new r.default(t+1,o),o=n.default.endOfWhiteSpace(a,o),o=this.parseComment(o)}}]),t}();t.default=i});n(L);var k=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Chomp=void 0;var n,r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(M),a=(n=E)&&n.__esModule?n:{default:n};var i={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"};t.Chomp=i;var f=function(e){function t(e,n){var r;return o(this,t),(r=p(this,c(t).call(this,e,n))).blockIndent=null,r.chomping=i.CLIP,r.header=null,r}return u(t,r.default),s(t,[{key:"parseBlockHeader",value:function(e){for(var t=this.context.src,n=e+1,r="";;){var o=t[n];switch(o){case"-":this.chomping=i.STRIP;break;case"+":this.chomping=i.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r+=o;break;default:return this.blockIndent=Number(r)||null,this.header=new a.default(e,n),n}n+=1}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,n=t.indent,o=(t.inFlow,t.src),i=e,s=this.blockIndent?n+this.blockIndent-1:n,u=1,c=o[i];"\n"===c&&(i+=1,!r.default.atDocumentBoundary(o,i));c=o[i]){var f=r.default.endOfBlockIndent(o,s,i);if(null===f)break;if(!this.blockIndent){var l=f-(i+n);if("\n"!==o[f]){if(lu&&(u=l)}i=r.default.endOfLine(o,f)}return this.valueRange=new a.default(e+1,i),i}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,a=this.parseBlockHeader(t);return a=r.default.endOfWhiteSpace(n,a),a=this.parseComment(a),a=this.parseBlockValue(a)}},{key:"setOrigRanges",value:function(e,n){return n=v(c(t.prototype),"setOrigRanges",this).call(this,e,n),this.header?this.header.setOrigRange(e,n):n}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,n=e.end,a=this.context,o=a.indent,s=a.src;if(this.valueRange.isEmpty())return"";for(var u=null,c=s[n-1];"\n"===c||"\t"===c||" "===c;){if((n-=1)<=t){if(this.chomping===i.KEEP)break;return""}"\n"===c&&(u=n),c=s[n-1]}var f=n+1;u&&(this.chomping===i.KEEP?(f=u,n=this.valueRange.end):n=u);for(var l=o+this.blockIndent,d=this.type===r.Type.BLOCK_FOLDED,h=!0,p="",v="",m=!1,g=t;gt+1&&(c=s-1);var h=this.node?this.node.valueRange.end:c;return this.valueRange=new a.default(t,h),c}},{key:"setOrigRanges",value:function(e,n){return n=v(c(t.prototype),"setOrigRanges",this).call(this,e,n),this.node?this.node.setOrigRanges(e,n):n}},{key:"toString",value:function(){var e=this.context.src,t=this.node,n=this.range,a=this.value;if(null!=a)return a;var o=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return r.default.addStringTerminator(e,n.end,o)}}]),t}();t.default=i});n(C);var N=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;i(C);var n=i(A),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(M),a=i(E);function i(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){var n;o(this,t),(n=p(this,c(t).call(this,e.type===r.Type.SEQ_ITEM?r.Type.SEQ:r.Type.MAP))).items=[e];for(var a=e.props.length-1;a>=0;--a)if(e.props[a].start=i.length){l=null;break}}if(s=f+1,f=r.default.endOfIndent(i,s),r.default.atBlank(i,f)){var p=r.default.endOfWhiteSpace(i,f),v=i[p];v&&"\n"!==v&&"#"!==v||(f=p)}l=i[f],d=!0}if(!l)break;if(f!==s+c&&(d||":"!==l)){s>t&&(f=s);break}if(u.type===r.Type.SEQ_ITEM!=("-"===l)){var m=!0;if("-"===l){var g=i[f+1];m=!g||"\n"===g||"\t"===g||" "===g}if(m){s>t&&(f=s);break}}var y=o({atLineStart:d,inCollection:!0,indent:c,lineStart:s,parent:this},f);if(!y)return f;if(this.items.push(y),this.valueRange.end=y.valueRange.end,d=!1,(l=i[f=r.default.normalizeOffset(i,y.range.end)])&&"\n"!==l&&"#"!==l){for(var _=f-1,b=i[_];" "===b||"\t"===b;)b=i[--_];"\n"===b&&(s=_+1,d=!0)}}return f}},{key:"setOrigRanges",value:function(e,n){return n=v(c(t.prototype),"setOrigRanges",this).call(this,e,n),this.items.forEach(function(t){n=t.setOrigRanges(e,n)}),n}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,a=this.value;if(null!=a)return a;for(var o=e.slice(n.start,t[0].range.start)+String(t[0]),i=1;i0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===r.Type.COMMENT&&this.nodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var o=e.parseNode,i=e.src,s=e.indent,u=e.lineStart,c=i[t];this.items=[{char:c,offset:t}];var f=r.default.endOfWhiteSpace(i,t+1);for(c=i[f];c&&"]"!==c&&"}"!==c;){switch(c){case"\n":u=f+1,(f=r.default.endOfIndent(i,u))-u<=s&&(this.error=new S.YAMLSemanticError(this,"Insufficient indentation in flow collection"));break;case",":this.items.push({char:c,offset:f}),f+=1;break;case"#":var l=new n.default;f=l.parse({src:i},f),this.items.push(l);break;case"?":case":":var d=i[f+1];if("\n"===d||"\t"===d||" "===d||","===d||":"===c&&this.prevNodeIsJsonLike()){this.items.push({char:c,offset:f}),f+=1;break}default:var h=o({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:u,parent:this},f);if(!h)return this.valueRange=new a.default(t,f),f;this.items.push(h),f=r.default.normalizeOffset(i,h.range.end)}c=i[f=r.default.endOfWhiteSpace(i,f)]}return this.valueRange=new a.default(t,f+1),c&&(this.items.push({char:c,offset:f}),f=r.default.endOfWhiteSpace(i,f+1),f=this.parseComment(f)),f}},{key:"setOrigRanges",value:function(e,n){return n=v(c(t.prototype),"setOrigRanges",this).call(this,e,n),this.items.forEach(function(t){n=t.setOrigRanges(e,n)}),n}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,a=this.value;if(null!=a)return a;var o=t.filter(function(e){return e instanceof r.default}),i="",s=n.start;return o.forEach(function(t){var n=e.slice(s,t.range.start);s=t.range.end,i+=n+String(t)}),i+=e.slice(s,n.end),r.default.addStringTerminator(e,n.end,i)}}]),t}();t.default=f});n(R);var x=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(M),r=a(E);function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){function t(){return o(this,t),p(this,c(t).apply(this,arguments))}return u(t,n.default),s(t,[{key:"parseBlockValue",value:function(e){for(var r=this.context,a=r.indent,o=r.inFlow,i=r.src,s=e,u=i[s];"\n"===u&&!n.default.atDocumentBoundary(i,s+1);u=i[s]){var c=n.default.endOfBlockIndent(i,a,s+1);if(null===c||"#"===i[c])break;s=t.endOfLine(i,c,o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}},{key:"parse",value:function(e,a){this.context=e;var o=e.inFlow,i=e.src,s=a,u=i[s];return u&&"#"!==u&&"\n"!==u&&(s=t.endOfLine(i,a,o)),this.valueRange=new r.default(a,s),s=n.default.endOfWhiteSpace(i,s),s=this.parseComment(s),this.hasComment&&!this.valueRange.isEmpty()||(s=this.parseBlockValue(s)),s}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,r=e.end,a=this.context.src,o=a[r-1];tf?a.slice(f,s+1):u)}else i+=u}return i}}],[{key:"endOfLine",value:function(e,t,n){for(var r=e[t],a=t;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){var o=e[a+1];if(":"===r&&("\n"===o||"\t"===o||" "===o||","===o))break;if((" "===r||"\t"===r)&&"#"===o)break;a+=1,r=o}return a}}]),t}();t.default=i});n(x);var I=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(M),r=a(E);function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){function t(){return o(this,t),p(this,c(t).apply(this,arguments))}return u(t,n.default),s(t,[{key:"parseCharCode",value:function(e,t,n){var r=this.context.src,a=r.substr(e,t),o=a.length===t&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;return isNaN(o)?(n.push(new S.YAMLSyntaxError(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(o)}},{key:"parse",value:function(e,a){this.context=e;var o=e.src,i=t.endOfQuote(o,a+1);return this.valueRange=new r.default(a,i),i=n.default.endOfWhiteSpace(o,i),i=this.parseComment(i)}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,a=t.end,o=this.context,i=o.indent,s=o.src;'"'!==s[a-1]&&e.push(new S.YAMLSyntaxError(this,'Missing closing "quote'));for(var u="",c=r+1;cd?s.slice(d,c+1):f)}else u+=f}return e.length>0?{errors:e,str:u}:u}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}}]),t}();t.default=i});n(I);var D=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(M),r=a(E);function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){function t(){return o(this,t),p(this,c(t).apply(this,arguments))}return u(t,n.default),s(t,[{key:"parse",value:function(e,a){this.context=e;var o=e.src,i=t.endOfQuote(o,a+1);return this.valueRange=new r.default(a,i),i=n.default.endOfWhiteSpace(o,i),i=this.parseComment(i)}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,a=t.end,o=this.context,i=o.indent,s=o.src;"'"!==s[a-1]&&e.push(new S.YAMLSyntaxError(this,"Missing closing 'quote"));for(var u="",c=r+1;cd?s.slice(d,c+1):f)}else u+=f}return e.length>0?{errors:e,str:u}:u}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}}]),t}();t.default=i});n(D);var j=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(L),r=p(k),a=p(N),i=p(C),u=p(R),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(M),f=p(x),l=p(I),d=p(D),h=p(E);function p(e){return e&&e.__esModule?e:{default:e}}var v=function(){function e(){var t,s,p,v=this,m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},y=g.atLineStart,_=g.inCollection,b=g.inFlow,w=g.indent,O=g.lineStart,E=g.parent;o(this,e),p=function(t,o){if(c.default.atDocumentBoundary(v.src,o))return null;var s,p=new e(v,t),m=p.parseProps(o),g=m.props,y=m.type,_=m.valueStart;switch(y){case c.Type.ALIAS:s=new n.default(y,g);break;case c.Type.BLOCK_FOLDED:case c.Type.BLOCK_LITERAL:s=new r.default(y,g);break;case c.Type.FLOW_MAP:case c.Type.FLOW_SEQ:s=new u.default(y,g);break;case c.Type.MAP_KEY:case c.Type.MAP_VALUE:case c.Type.SEQ_ITEM:s=new i.default(y,g);break;case c.Type.COMMENT:case c.Type.PLAIN:s=new f.default(y,g);break;case c.Type.QUOTE_DOUBLE:s=new l.default(y,g);break;case c.Type.QUOTE_SINGLE:s=new d.default(y,g);break;default:return s.error=new S.YAMLSyntaxError(s,"Unknown node type: ".concat(JSON.stringify(y))),s.range=new h.default(o,o+1),s}var b=s.parse(p,_),w="\n"===v.src[b]?b+1:b;if(w<=o&&(s.error=new Error("Node#parse consumed no characters"),s.error.parseEnd=w,s.error.source=s,w=o+1),s.range=new h.default(o,w),p.nodeStartsCollection(s)){s.error||p.atLineStart||p.parent.type!==c.Type.DOCUMENT||(s.error=new S.YAMLSyntaxError(s,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var O=new a.default(s);return b=O.parse(new e(p),b),O.range=new h.default(o,b),O}return s},(s="parseNode")in(t=this)?Object.defineProperty(t,s,{value:p,enumerable:!0,configurable:!0,writable:!0}):t[s]=p,this.atLineStart=null!=y?y:m.atLineStart||!1,this.inCollection=null!=_?_:m.inCollection||!1,this.inFlow=null!=b?b:m.inFlow||!1,this.indent=null!=w?w:m.indent,this.lineStart=null!=O?O:m.lineStart,this.parent=null!=E?E:m.parent||{},this.src=m.src}return s(e,null,[{key:"parseType",value:function(e,t,n){switch(e[t]){case"*":return c.Type.ALIAS;case">":return c.Type.BLOCK_FOLDED;case"|":return c.Type.BLOCK_LITERAL;case"{":return c.Type.FLOW_MAP;case"[":return c.Type.FLOW_SEQ;case"?":return!n&&c.default.atBlank(e,t+1)?c.Type.MAP_KEY:c.Type.PLAIN;case":":return!n&&c.default.atBlank(e,t+1)?c.Type.MAP_VALUE:c.Type.PLAIN;case"-":return!n&&c.default.atBlank(e,t+1)?c.Type.SEQ_ITEM:c.Type.PLAIN;case'"':return c.Type.QUOTE_DOUBLE;case"'":return c.Type.QUOTE_SINGLE;default:return c.Type.PLAIN}}}]),s(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,n=this.inFlow,r=this.src;if(t||n)return!1;if(e instanceof i.default)return!0;var a=e.range.end;return"\n"!==r[a]&&"\n"!==r[a-1]&&":"===r[a=c.default.endOfWhiteSpace(r,a)]}},{key:"parseProps",value:function(t){for(var n=this.inFlow,r=this.parent,a=this.src,o=[],i=!1,s=a[t=c.default.endOfWhiteSpace(a,t)];s===c.Char.ANCHOR||s===c.Char.COMMENT||s===c.Char.TAG||"\n"===s;){if("\n"===s){var u=t+1,f=c.default.endOfIndent(a,u),l=f-(u+this.indent),d=r.type===c.Type.SEQ_ITEM&&r.context.atLineStart;if(!c.default.nextNodeIsIndented(a[f],l,!d))break;this.atLineStart=!0,this.lineStart=u,i=!1,t=f}else if(s===c.Char.COMMENT){var p=c.default.endOfLine(a,t+1);o.push(new h.default(t,p)),t=p}else{var v=c.default.endOfIdentifier(a,t+1);s===c.Char.TAG&&","===a[v]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(a.slice(t+1,v+13))&&(v=c.default.endOfIdentifier(a,v+5)),o.push(new h.default(t,v)),i=!0,t=c.default.endOfWhiteSpace(a,v)}s=a[t]}return i&&":"===s&&c.default.atBlank(a,t+1)&&(t-=1),{props:o,type:e.parseType(a,t,n),valueStart:t}}},{key:"pretty",get:function(){var e={start:"".concat(this.lineStart," + ").concat(this.indent),in:[],parent:this.parent.type};return this.atLineStart||(e.start+=" + N"),this.inCollection&&e.in.push("collection"),this.inFlow&&e.in.push("flow"),e}}]),e}();t.default=v});n(j);var B=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,function(e,n){return e.length>1&&t.push(n),"\n"}));var a=new r.default({src:e}),o=[],i=0;for(;it.maxFlowStringSingleLineLength?"".concat(g,"\n ").concat(l).concat(_.join("\n ".concat(l)),"\n").concat(l).concat(y):"".concat(g," ").concat(_.join(" ")," ").concat(y)}else h=m.map(i).join("\n".concat(l));return this.comment&&(v||-1!==h.indexOf("\n")?h+="\n"+this.comment.replace(/^/gm,"".concat(l,"#")):h=(0,n.default)(h,l,this.comment),a&&a()),h}}]),t}();t.default=f,i(f,"maxFlowStringSingleLineLength",60)});n(Q);var W=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(Y),r=a(F);function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){function t(e){var n;return o(this,t),(n=p(this,c(t).call(this))).value=e,n}return u(t,r.default),s(t,[{key:"toJSON",value:function(e,t){return t?this.value:(0,n.default)(this.value,e,t)}},{key:"toString",value:function(){return String(this.value)}}]),t}();t.default=i});n(W);var V=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(U),r=d(Y),i=d(Q),f=d(F),l=d(W);function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(this,t),(n=p(this,c(t).call(this))).key=e,n.value=r,n.type="PAIR",n}return u(t,f.default),s(t,[{key:"toJSON",value:function(e,t){var n={},a=this.stringKey;return n[a]=(0,r.default)(this.value,a,t),n}},{key:"toString",value:function(e,t){if(!e||!e.doc)return JSON.stringify(this);var r=this.key,a=this.value,o=r instanceof f.default&&r.comment,s=!r||o||r instanceof i.default,u=e,c=u.doc,l=u.indent;e=Object.assign({},e,{implicitKey:!s,indent:l+" "});var d=c.schema.stringify(r,e,function(){o=null});o&&(d=(0,n.default)(d,e.indent,o)),e.implicitKey=!1;var h=c.schema.stringify(a,e,t),p=a&&a.commentBefore?" #".concat(a.commentBefore.replace(/\n+(?!\n|$)/g,"$&".concat(e.indent,"#"))):"";return s?"? ".concat(d,"\n").concat(l,":").concat(p?"".concat(p,"\n").concat(e.indent):" ").concat(h):a instanceof i.default?"".concat(d,":").concat(p,"\n").concat(e.indent).concat(h):"".concat(d,":").concat(p?"".concat(p,"\n").concat(e.indent):" ").concat(h)}},{key:"commentBefore",get:function(){return this.key&&this.key.commentBefore},set:function(e){null==this.key&&(this.key=new l.default(null)),this.key.commentBefore=e}},{key:"comment",get:function(){return this.value&&this.value.comment},set:function(e){null==this.value&&(this.value=new l.default(null)),this.value.comment=e}},{key:"stringKey",get:function(){var e=(0,r.default)(this.key);if(null===e)return"";if("object"===a(e))try{return JSON.stringify(e)}catch(e){}return String(e)}}]),t}();t.default=h});n(V);var K=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(Y),r=a(Q);function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){function t(){return o(this,t),p(this,c(t).apply(this,arguments))}return u(t,r.default),s(t,[{key:"toJSON",value:function(e,t){return this.items.map(function(e,r){return(0,n.default)(e,String(r),t)})}},{key:"toString",value:function(e,n){return e?v(c(t.prototype),"toString",this).call(this,e,{blockItem:function(e){var t=e.type,n=e.str;return"comment"===t?n:"- ".concat(n)},flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" "},n):JSON.stringify(this)}}]),t}();t.default=i});n(K);var $=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MERGE_KEY=void 0;var n=i(V),r=i(W),a=i(K);function i(e){return e&&e.__esModule?e:{default:e}}var f="<<";t.MERGE_KEY=f;var l=function(e){function t(e){var i;if(o(this,t),e instanceof n.default){var s=e.value;s instanceof a.default||((s=new a.default).items.push(e.value),s.range=e.value.range),(i=p(this,c(t).call(this,e.key,s))).range=e.range}else i=p(this,c(t).call(this,new r.default(f),new a.default));return i.type="MERGE_PAIR",p(i)}return u(t,n.default),s(t,[{key:"toString",value:function(e,n){var r=this.value;if(r.items.length>1)return v(c(t.prototype),"toString",this).call(this,e,n);this.value=r.items[0];var a=v(c(t.prototype),"toString",this).call(this,e,n);return this.value=r,a}}]),t}();t.default=l});n($);var q=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(Y),r=f(Q),a=f($),i=f(V);function f(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return o(this,t),p(this,c(t).apply(this,arguments))}return u(t,r.default),s(t,[{key:"toJSON",value:function(e,r){return this.items.reduce(function(e,o){if(o instanceof a.default)!function(){for(var n=Object.keys(e),a=o.value.items,i=a.length-1;i>=0;--i){var s=a[i].source;if(!(s instanceof t))throw new Error("Merge sources must be maps");!function(){var t=s.toJSON("",r);Object.keys(t).forEach(function(r){n.includes(r)||(e[r]=t[r])})}()}}();else{var i=o.stringKey,s=o.value;e[i]=(0,n.default)(s,i,r)}return e},{})}},{key:"toString",value:function(e,n){return e?(this.items.forEach(function(e){if(!(e instanceof i.default))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(e)," instead"))}),v(c(t.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},itemIndent:e.indent||""},n)):JSON.stringify(this)}}]),t}();t.default=l});n(q);var J=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(null==t)return new o.default(null);if("object"!==a(t))return s?new o.default(t):t;if(Array.isArray(t)){var u=new i.default;return u.items=t.map(function(t){return e(t,s)}),u}var c=new n.default;return c.items=Object.keys(t).map(function(n){var a=e(n,s),o=e(t[n],s);return new r.default(a,o)}),c};var n=s(q),r=s(V),o=s(W),i=s(K);function s(e){return e&&e.__esModule?e:{default:e}}});n(J);var G=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(Y),r=a(F);function a(e){return e&&e.__esModule?e:{default:e}}var i,f,l,d=function(e){function t(e){var n;return o(this,t),(n=p(this,c(t).call(this))).source=e,n.type=M.Type.ALIAS,n}return u(t,r.default),s(t,null,[{key:"stringify",value:function(e,t){var n=e.range,r=e.source,a=t.anchors,o=t.doc,i=t.implicitKey,s=Object.keys(a).find(function(e){return a[e]===r});if(s)return"*".concat(s).concat(i?" ":"");var u=o.anchors.getName(r)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(u," [").concat(n,"]"))}}]),s(t,[{key:"toJSON",value:function(e,t){return(0,n.default)(this.source,e,t)}},{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}}]),t}();t.default=d,l=!0,(f="default")in(i=d)?Object.defineProperty(i,f,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[f]=l});n(G);var H=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(G),r=c(q),a=c($),i=c(W),u=c(K);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){function e(){var t,n,r;o(this,e),r={},(n="map")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}return s(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new n.default(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new a.default,o=arguments.length,i=new Array(o),s=0;s=m)if(g)p.push(g),m=g+h,g=void 0;else if(a===r){for(;" "===y||"\t"===y;)y=w,w=e[b+=1],_=!0;p.push(b-2),v[b-2]=!0,m=b-2+h,g=void 0}else _=!0}y=w}_&&d&&d();if(0===p.length)return e;l&&l();for(var M=e.slice(0,p[0]),S=0;St)return!0;if(n-(a=r+1)<=t)return!1}return!0},o=function(e,t){var n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach(function(n){n.source||(n.source=t),e.errors.push(n)}),n.str):""};function i(e,t){var a=t.implicitKey,o=t.indent,i=r.doubleQuoted,s=i.jsonEncoding,u=i.minMultiLineLength,c=JSON.stringify(e);if(s)return c;for(var f="",l=0,d=0,h=c[d];h;h=c[++d])if(" "===h&&"\\"===c[d+1]&&"n"===c[d+2]&&(f+=c.slice(l,d)+"\\ ",l=d+=1,h="\\"),"\\"===h)switch(c[d+1]){case"u":f+=c.slice(l,d);var p=c.substr(d+2,4);switch(p){case"0000":f+="\\0";break;case"0007":f+="\\a";break;case"000b":f+="\\v";break;case"001b":f+="\\e";break;case"0085":f+="\\N";break;case"00a0":f+="\\_";break;case"2028":f+="\\L";break;case"2029":f+="\\P";break;default:"00"===p.substr(0,2)?f+="\\x"+p.substr(2):f+=c.substr(d,6)}l=(d+=5)+1;break;case"n":if(a||'"'===c[d+2]||c.length";if(!c)return h+"\n";var p="",v="";if(c=c.replace(/[\n\t ]*$/,function(e){var t=e.indexOf("\n");return-1===t?h+="-":c!==e&&t===e.length-1||(h+="+"),v=e.replace(/\n$/,""),""}).replace(/^[\n ]*/,function(e){-1!==e.indexOf(" ")&&(h+=l);var t=e.match(/ +$/);return t?(p=e.slice(0,-t[0].length),t[0]):(p=e,"")}),v&&(v=v.replace(/\n+(?!\n|$)/g,"$&".concat(f))),p&&(p=p.replace(/\n+/g,"$&".concat(f))),s&&(h+=" #"+s.replace(/ ?[\r\n]+/g," "),o&&o()),!c)return"".concat(h).concat(l,"\n").concat(f).concat(v);if(d)return c=c.replace(/\n+/g,"$&".concat(f)),"".concat(h,"\n").concat(f).concat(p).concat(c).concat(v);c=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(f));var m=(0,n.default)("".concat(p).concat(c).concat(v),f,n.FOLD_BLOCK,r.fold);return"".concat(h,"\n").concat(f).concat(m)}function c(e,t,a){var o=r.defaultType,c=t.implicitKey,f=t.inFlow,l=e,d=l.type,h=l.value;"string"!=typeof h&&(h=String(h),e=Object.assign({},e,{value:h}));var p=function(o){switch(o){case M.Type.BLOCK_FOLDED:case M.Type.BLOCK_LITERAL:return u(e,t,a);case M.Type.QUOTE_DOUBLE:return i(h,t);case M.Type.QUOTE_SINGLE:return s(h,t);case M.Type.PLAIN:return function(e,t,a){var o=e.comment,c=e.type,f=e.value,l=t.implicitKey,d=t.indent,h=t.inFlow,p=t.tags;if(l&&/[\n[\]{},]/.test(f)||h&&/[[\]{},]/.test(f))return i(f,t);if(!f||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t ]$/.test(f))return l||h||-1===f.indexOf("\n")?-1!==f.indexOf('"')&&-1===f.indexOf("'")?s(f,t):i(f,t):u(e,t,a);if(!l&&!h&&c!==M.Type.PLAIN&&-1!==f.indexOf("\n"))return u(e,t,a);var v=f.replace(/\n+/g,"$&\n".concat(d));if("string"!=typeof p.resolveScalar(v).value)return i(f,t);var m=l?v:(0,n.default)(v,d,n.FOLD_FLOW,r.fold);return!o||h||-1===m.indexOf("\n")&&-1===o.indexOf("\n")?m:(a&&a(),(0,U.addCommentBefore)(m,d,o))}(e,t,a);default:return null}};d!==M.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(h)?d=M.Type.QUOTE_DOUBLE:!c&&!f||d!==M.Type.BLOCK_FOLDED&&d!==M.Type.BLOCK_LITERAL||(d=M.Type.QUOTE_DOUBLE);var v=p(d);if(null===v&&null===(v=p(o)))throw new Error("Unsupported default string type ".concat(o));return v}t.resolve=o;var f={class:String,default:!0,tag:"tag:yaml.org,2002:str",resolve:o,stringify:c,options:r};t.str=f});n(X);var ee=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkKeyLength=function(e,t,n,r,a){if(!r||"number"!=typeof a)return;var o=t.items[n],i=o&&o.range&&o.range.start;if(!i)for(var s=n-1;s>=0;--s){var u=t.items[s];if(u&&u.range){i=u.range.end+2*(n-s);break}}if(i>a+1024){var c=String(r).substr(0,8)+"..."+String(r).substr(-8);e.push(new S.YAMLSemanticError(t,'The "'.concat(c,'" key is too long')))}},t.resolveComments=function(e,t){t.forEach(function(t){var n=t.comment,r=t.before,a=e.items[r];a?a.commentBefore?a.commentBefore+="\n"+n:a.commentBefore=n:e.comment?e.comment+="\n"+n:e.comment=n})}});n(ee);var te=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.type!==M.Type.MAP&&t.type!==M.Type.FLOW_MAP){var s="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new S.YAMLSyntaxError(t,s)),null}var u=t.type===M.Type.FLOW_MAP?function(e,t){for(var n=[],r=[],a=void 0,i=null,s=!1,u="{",c=0;c0){(f=new n.default(M.Type.PLAIN,[])).context={parent:c,src:c.context.src};var l=c.range.start+1;f.range={start:l,end:l},f.valueRange={start:l,end:l}}a.push(new o.default(i,e.resolveNode(f))),(0,ee.checkKeyLength)(e.errors,t,u,i,s),i=void 0,s=null;break;default:void 0!==i&&a.push(new o.default(i)),i=e.resolveNode(c),s=c.range.start,c.error&&e.errors.push(c.error);var d=t.items[u+1];if(!d||d.type!==M.Type.MAP_VALUE){e.errors.push(new S.YAMLSemanticError(c,"Implicit map keys need to be followed by map values"))}if(c.valueRangeContainsNewline){e.errors.push(new S.YAMLSemanticError(c,"Implicit map keys need to be on a single line"))}}}void 0!==i&&a.push(new o.default(i));return{comments:r,items:a}}(e,t),c=u.comments,f=u.items,l=new r.default;l.items=f,(0,ee.resolveComments)(l,c);for(var d=0;d>18&63]+se[a>>12&63]+se[a>>6&63]+se[63&a]);return o.join("")}function he(e){var t;fe||le();for(var n=e.length,r=n%3,a="",o=[],i=0,s=n-r;is?s:i+16383));return 1===r?(t=e[n-1],a+=se[t>>2],a+=se[t<<4&63],a+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],a+=se[t>>10],a+=se[t>>4&63],a+=se[t<<2&63],a+="="),o.push(a),o.join("")}function pe(e,t,n,r,a){var o,i,s=8*a-r-1,u=(1<>1,f=-7,l=n?a-1:0,d=n?-1:1,h=e[t+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=d,f-=8);for(i=o&(1<<-f)-1,o>>=-f,f+=r;f>0;i=256*i+e[t+l],l+=d,f-=8);if(0===o)o=1-c;else{if(o===u)return i?NaN:1/0*(h?-1:1);i+=Math.pow(2,r),o-=c}return(h?-1:1)*i*Math.pow(2,o-r)}function ve(e,t,n,r,a,o){var i,s,u,c=8*o-a-1,f=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=f):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),(t+=i+l>=1?d/u:d*Math.pow(2,1-l))*u>=2&&(i++,u/=2),i+l>=f?(s=0,i=f):i+l>=1?(s=(t*u-1)*Math.pow(2,a),i+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,a),i=0));a>=8;e[n+h]=255&s,h+=p,s/=256,a-=8);for(i=i<0;e[n+h]=255&i,h+=p,i/=256,c-=8);e[n+h-p]|=128*v}var me={}.toString,ge=Array.isArray||function(e){return"[object Array]"==me.call(e)};function ye(){return be.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _e(e,t){if(ye()=ye())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ye().toString(16)+" bytes");return 0|e}function Ae(e){return!(null==e||!e._isBuffer)}function Pe(e,t){if(Ae(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Xe(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return et(e).length;default:if(r)return Xe(e).length;t=(""+t).toLowerCase(),r=!0}}function Te(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Le(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=be.from(t,r)),Ae(t))return 0===t.length?-1:ke(e,t,n,r,a);if("number"==typeof t)return t&=255,be.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):ke(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function ke(e,t,n,r,a){var o,i=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var f=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var l=!0,d=0;da&&(r=a):r=a;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function je(e,t,n){return 0===t&&n===e.length?he(e):he(e.slice(t,n))}function Be(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[a+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[a+1],i=e[a+2],128==(192&o)&&128==(192&i)&&(u=(15&c)<<12|(63&o)<<6|63&i)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[a+1],i=e[a+2],s=e[a+3],128==(192&o)&&128==(192&i)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),a+=l}return function(e){var t=e.length;if(t<=Ye)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qe(this,t,n);case"utf8":case"utf-8":return Be(this,t,n);case"ascii":return Ue(this,t,n);case"latin1":case"binary":return Fe(this,t,n);case"base64":return je(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return We(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},be.prototype.equals=function(e){if(!Ae(e))throw new TypeError("Argument must be a Buffer");return this===e||0===be.compare(this,e)},be.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},be.prototype.compare=function(e,t,n,r,a){if(!Ae(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,a>>>=0,this===e)return 0;for(var o=a-r,i=n-t,s=Math.min(o,i),u=this.slice(r,a),c=e.slice(t,n),f=0;fa)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return Ce(this,e,t,n);case"utf8":case"utf-8":return Ne(this,e,t,n);case"ascii":return Re(this,e,t,n);case"latin1":case"binary":return xe(this,e,t,n);case"base64":return Ie(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},be.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ye=4096;function Ue(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function Ke(e,t,n,r,a,o){if(!Ae(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function $e(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);a>>8*(r?a:1-a)}function qe(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);a>>8*(r?a:3-a)&255}function Je(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Ge(e,t,n,r,a){return a||Je(e,0,n,4),ve(e,t,n,r,23,4),n+4}function He(e,t,n,r,a){return a||Je(e,0,n,8),ve(e,t,n,r,52,8),n+8}be.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(a*=256);)r+=this[e+--t]*a;return r},be.prototype.readUInt8=function(e,t){return t||Ve(e,1,this.length),this[e]},be.prototype.readUInt16LE=function(e,t){return t||Ve(e,2,this.length),this[e]|this[e+1]<<8},be.prototype.readUInt16BE=function(e,t){return t||Ve(e,2,this.length),this[e]<<8|this[e+1]},be.prototype.readUInt32LE=function(e,t){return t||Ve(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},be.prototype.readUInt32BE=function(e,t){return t||Ve(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},be.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Ve(e,t,this.length);for(var r=this[e],a=1,o=0;++o=(a*=128)&&(r-=Math.pow(2,8*t)),r},be.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Ve(e,t,this.length);for(var r=t,a=1,o=this[e+--r];r>0&&(a*=256);)o+=this[e+--r]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},be.prototype.readInt8=function(e,t){return t||Ve(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},be.prototype.readInt16LE=function(e,t){t||Ve(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},be.prototype.readInt16BE=function(e,t){t||Ve(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},be.prototype.readInt32LE=function(e,t){return t||Ve(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},be.prototype.readInt32BE=function(e,t){return t||Ve(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},be.prototype.readFloatLE=function(e,t){return t||Ve(e,4,this.length),pe(this,e,!0,23,4)},be.prototype.readFloatBE=function(e,t){return t||Ve(e,4,this.length),pe(this,e,!1,23,4)},be.prototype.readDoubleLE=function(e,t){return t||Ve(e,8,this.length),pe(this,e,!0,52,8)},be.prototype.readDoubleBE=function(e,t){return t||Ve(e,8,this.length),pe(this,e,!1,52,8)},be.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Ke(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},be.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,1,255,0),be.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},be.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):$e(this,e,t,!0),t+2},be.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):$e(this,e,t,!1),t+2},be.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):qe(this,e,t,!0),t+4},be.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):qe(this,e,t,!1),t+4},be.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);Ke(this,e,t,n,a-1,-a)}var o=0,i=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},be.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);Ke(this,e,t,n,a-1,-a)}var o=n-1,i=1,s=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+n},be.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,1,127,-128),be.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},be.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):$e(this,e,t,!0),t+2},be.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):$e(this,e,t,!1),t+2},be.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,4,2147483647,-2147483648),be.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):qe(this,e,t,!0),t+4},be.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Ke(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),be.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):qe(this,e,t,!1),t+4},be.prototype.writeFloatLE=function(e,t,n){return Ge(this,e,t,!0,n)},be.prototype.writeFloatBE=function(e,t,n){return Ge(this,e,t,!1,n)},be.prototype.writeDoubleLE=function(e,t,n){return He(this,e,t,!0,n)},be.prototype.writeDoubleBE=function(e,t,n){return He(this,e,t,!1,n)},be.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else if(o<1e3||!be.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function et(e){return function(e){var t,n,r,a,o,i;fe||le();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,i=new ce(3*s/4-o),r=o>0?s-4:s;var u=0;for(t=0,n=0;t>16&255,i[u++]=a>>8&255,i[u++]=255&a;return 2===o?(a=ue[e.charCodeAt(t)]<<2|ue[e.charCodeAt(t+1)]>>4,i[u++]=255&a):1===o&&(a=ue[e.charCodeAt(t)]<<10|ue[e.charCodeAt(t+1)]<<4|ue[e.charCodeAt(t+2)]>>2,i[u++]=a>>8&255,i[u++]=255&a),i}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ze,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function tt(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function nt(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var rt=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.binary=void 0;var n={class:Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:function(e,t){var n=(0,X.resolve)(e,t);return be.from(n,"base64")},options:{defaultType:M.Type.BLOCK_LITERAL,lineWidth:76},stringify:function(e,t,r){var a,o=e.comment,i=e.type,s=e.value;if(a=s instanceof be?s.toString("base64"):be.from(s.buffer).toString("base64"),i||(i=n.options.defaultType),i===M.Type.QUOTE_DOUBLE)s=a;else{for(var u=n.options.lineWidth,c=Math.ceil(a.length/u),f=new Array(c),l=0,d=0;l=60&&(t=Math.round((t-r[0])/60),r.unshift(t))),n+r.map(function(e){return e<10?"0"+String(e):String(e)}).join(":").replace(/000000\d*$/,"")},a={class:Number,default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,r){return n(t,r.replace(/_/g,""))},stringify:r};t.intTime=a;var o={class:Number,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(e,t,r){return n(t,r.replace(/_/g,""))},stringify:r};t.floatTime=o;var i={class:Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(e,t,r,a,o,i,s,u,c){u&&(u=(u+"00").substr(1,3));var f=Date.UTC(t,r-1,a,o||0,i||0,s||0,u||0);if(c&&"Z"!==c){var l=n(c[0],c.slice(1));Math.abs(l)<30&&(l*=60),f-=6e4*l}return new Date(f)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};t.timestamp=i;var s=[a,o,i];t.default=s});n(at);var ot=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.boolOptions=t.nullOptions=void 0;var n=o(rt),r=o(at),a=o(re);function o(e){return e&&e.__esModule?e:{default:e}}var i={nullStr:"null"};t.nullOptions=i;var s={trueStr:"true",falseStr:"false"};t.boolOptions=s;var u=a.default.concat([{class:null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:i,stringify:function(){return i.nullStr}},{class:Boolean,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:s,stringify:function(e){return e.value?s.trueStr:s.falseStr}},{class:Boolean,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:s,stringify:function(e){return e.value?s.trueStr:s.falseStr}},{class:Number,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^0b([0-1_]+)$/,resolve:function(e,t){return parseInt(t.replace(/_/g,""),2)},stringify:function(e){return"0b"+e.value.toString(2)}},{class:Number,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0([0-7_]+)$/,resolve:function(e,t){return parseInt(t.replace(/_/g,""),8)},stringify:function(e){var t=e.value;return(t<0?"-0":"0")+t.toString(8)}},{class:Number,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:function(e){return parseInt(e.replace(/_/g,""),10)},stringify:ae.stringifyNumber},{class:Number,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F_]+)$/,resolve:function(e,t){return parseInt(t.replace(/_/g,""),16)},stringify:function(e){var t=e.value;return(t<0?"-0x":"0x")+t.toString(16)}},{class:Number,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:ae.stringifyNumber},{class:Number,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?([0-9][0-9_]*)?\.[0-9_]*([eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:ae.stringifyNumber}],r.default,n.default);t.default=u});n(ot);var it=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DefaultTags=t.defaultPrefix=t.availableSchema=void 0;var n=v(J),r=v(G),i=v(Q),u=v(ae),c=v(re),f=v(oe),l=v(F),d=v(V),h=v(W),p=v(ot);function v(e){return e&&e.__esModule?e:{default:e}}var m={core:u.default,failsafe:c.default,json:f.default,"yaml-1.1":p.default};t.availableSchema=m;t.defaultPrefix="tag:yaml.org,2002:";var g={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};t.DefaultTags=g;var y=function(){function e(t){var n=t.merge,r=t.schema,a=t.tags;if(o(this,e),this.merge=!!n,this.name=r,this.schema=m[r],!this.schema){var i=Object.keys(m).map(function(e){return JSON.stringify(e)}).join(", ");throw new Error("Unknown schema; use ".concat(i,", or { tag, test, resolve }[]"))}Array.isArray(a)?this.schema=this.schema.concat(a):"function"==typeof a&&(this.schema=a(this.schema.slice()))}return s(e,null,[{key:"defaultStringifier",value:function(e){return JSON.stringify(e)}}]),s(e,[{key:"resolveScalar",value:function(e,t){t||(t=this.schema);for(var n=0;n0&&(t.resolved=this.resolveScalar(s,r))}}catch(n){n.source||(n.source=t),e.errors.push(n),t.resolved=null}return t.resolved?(n&&(t.resolved.tag=n),t.resolved):null}},{key:"resolveNodeWithFallback",value:function(e,t,n){var r=this.resolveNode(e,t,n);if(t.hasOwnProperty("resolved"))return r;var a,o=(a=t.type)===M.Type.FLOW_MAP||a===M.Type.MAP?g.MAP:function(e){var t=e.type;return t===M.Type.FLOW_SEQ||t===M.Type.SEQ}(t)?g.SEQ:g.STR;if(o){e.warnings.push(new S.YAMLWarning(t,"The tag ".concat(n," is unavailable, falling back to ").concat(o)));var i=this.resolveNode(e,t,o);return i.tag=n,i}return e.errors.push(new S.YAMLReferenceError(t,"The tag ".concat(n," is unavailable"))),null}},{key:"getTagObject",value:function(e){if(e instanceof r.default)return r.default;if(e.tag){var t=this.schema.find(function(t){var n=t.format;return t.tag===e.tag&&n===e.format});if(t||(t=this.schema.find(function(t){return t.tag===e.tag})),t)return t}if(null===e.value){var n=this.schema.find(function(e){return null===e.class&&!e.format});if(!n)throw new Error("Tag not resolved for null value");return n}var o=e;if(e.hasOwnProperty("value"))switch(a(e.value)){case"boolean":o=new Boolean;break;case"number":o=new Number;break;case"string":o=new String;break;default:o=e.value}var i=this.schema.find(function(t){return t.class&&o instanceof t.class&&t.format===e.format});if(i||(i=this.schema.find(function(e){return e.class&&o instanceof e.class&&!e.format})),!i){var s=o&&o.constructor?o.constructor.name:a(o);throw new Error("Tag not resolved for ".concat(s," value"))}return i}},{key:"stringifyProps",value:function(e,t,n){var r=n.anchors,a=n.doc,o=[],i=a.anchors.getName(e);return i&&(r[i]=e,o.push("&".concat(i))),e.tag&&e.tag!==t.tag?o.push(a.stringifyTag(e.tag)):t.default||o.push(a.stringifyTag(t.tag)),o.join(" ")}},{key:"stringify",value:function(t,r,a){if(t instanceof l.default||(t=(0,n.default)(t,!0)),r.tags=this,t instanceof d.default)return t.toString(r,a);var o=this.getTagObject(t),s=this.stringifyProps(t,o,r),u=o.stringify||e.defaultStringifier,c=u(t,r,a);return s?t instanceof i.default&&"{"!==c[0]&&"["!==c[0]?"".concat(s,"\n").concat(r.indent).concat(c):"".concat(s," ").concat(c):c}}]),e}();t.default=y});n(it);var st=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(U),r=d(H),a=d(z),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(it),u=d(G),c=d(Q),f=d(Y),l=d(W);function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var p,v,m,g=function(){function e(t){o(this,e),this.anchors=new r.default,this.commentBefore=null,this.comment=null,this.contents=null,this.errors=[],this.options=t,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return s(e,[{key:"getDefaults",value:function(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}},{key:"setSchema",value:function(){this.schema||(this.schema=new i.default(Object.assign({},this.getDefaults(),this.options)))}},{key:"parse",value:function(e){var t=this;this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");var n=e.directives,r=void 0===n?[]:n,a=e.contents,o=void 0===a?[]:a,i=e.error,s=e.valueRange;i&&(i.source||(i.source=this),this.errors.push(i));var u=[];r.forEach(function(e){var n=e.comment,r=e.name;switch(r){case"TAG":t.resolveTagDirective(e);break;case"YAML":case"YAML:1.0":t.resolveYamlDirective(e);break;default:if(r){var a="YAML only supports %TAG and %YAML directives, and not %".concat(r);t.warnings.push(new S.YAMLWarning(e,a))}}n&&u.push(n)}),this.range=s?[s.start,s.end]:null,this.setSchema(),this.anchors._cstAliases=[],this.commentBefore=u.join("\n")||null;var f={before:[],after:[]},l=[];switch(o.forEach(function(e){if(e.valueRange){if(1===l.length){t.errors.push(new S.YAMLSyntaxError(e,"Document is not valid YAML (bad indentation?)"))}l.push(t.resolveNode(e))}else if(e.comment){(0===l.length?f.before:f.after).push(e.comment)}}),l.length){case 0:this.contents=null,f.after=f.before;break;case 1:if(this.contents=l[0],this.contents){var d=f.before.join("\n")||null;if(d){var h=this.contents instanceof c.default&&this.contents.items[0]?this.contents.items[0]:this.contents;h.commentBefore=h.commentBefore?"".concat(d,"\n").concat(h.commentBefore):d}}else f.after=f.before.concat(f.after);break;default:this.contents=l,this.contents[0]?this.contents[0].commentBefore=f.before.join("\n")||null:f.after=f.before.concat(f.after)}return this.comment=f.after.join("\n")||null,this.anchors.resolveNodes(),this}},{key:"resolveTagDirective",value:function(e){var t=h(e.parameters,2),n=t[0],r=t[1];if(n&&r)if(this.tagPrefixes.every(function(e){return e.handle!==n}))this.tagPrefixes.push({handle:n,prefix:r});else{this.errors.push(new S.YAMLSemanticError(e,"The %TAG directive must only be given at most once per handle in the same document."))}else{this.errors.push(new S.YAMLSemanticError(e,"Insufficient parameters given for %TAG directive"))}}},{key:"resolveYamlDirective",value:function(t){var n=h(t.parameters,1)[0];if("YAML:1.0"===t.name&&(n="1.0"),this.version){this.errors.push(new S.YAMLSemanticError(t,"The %YAML directive must only be given at most once per document."))}if(n){if(!e.defaults[n]){var r=this.version||this.options.version,a="Document will be parsed as YAML ".concat(r," rather than YAML ").concat(n);this.warnings.push(new S.YAMLWarning(t,a))}this.version=n}else{this.errors.push(new S.YAMLSemanticError(t,"Insufficient parameters given for %YAML directive"))}}},{key:"resolveTagName",value:function(e){var t=e.tag,n=e.type,r=!1;if(t){var a=t.handle,o=t.suffix,s=t.verbatim;if(s){if("!"!==s&&"!!"!==s)return s;var u="Verbatim tags aren't resolved, so ".concat(s," is invalid.");this.errors.push(new S.YAMLSemanticError(e,u))}else if("!"!==a||o){var c=this.tagPrefixes.find(function(e){return e.handle===a});if(!c){var f=this.getDefaults().tagPrefixes;f&&(c=f.find(function(e){return e.handle===a}))}if(c){if(o){if("!"===a&&"1.0"===(this.version||this.options.version)){if("^"===o[0])return o;if(/[:/]/.test(o)){var l=o.match(/^([a-z0-9-]+)\/(.*)/i);return l?"tag:".concat(l[1],".yaml.org,2002:").concat(l[2]):"tag:".concat(o)}}return c.prefix+decodeURIComponent(o)}this.errors.push(new S.YAMLSemanticError(e,"The ".concat(a," tag has no suffix.")))}else{var d="The ".concat(a," tag handle is non-default and was not declared.");this.errors.push(new S.YAMLSemanticError(e,d))}}else r=!0}switch(n){case M.Type.BLOCK_FOLDED:case M.Type.BLOCK_LITERAL:case M.Type.QUOTE_DOUBLE:case M.Type.QUOTE_SINGLE:return i.DefaultTags.STR;case M.Type.FLOW_MAP:case M.Type.MAP:return i.DefaultTags.MAP;case M.Type.FLOW_SEQ:case M.Type.SEQ:return i.DefaultTags.SEQ;case M.Type.PLAIN:return r?i.DefaultTags.STR:null;default:return null}}},{key:"resolveNode",value:function(e){if(!e)return null;var t,n=this.anchors,r=this.errors,a=this.schema,o=!1,i=!1,s={before:[],after:[]};if((function(e){return e&&-1!==[M.Type.MAP_KEY,M.Type.MAP_VALUE,M.Type.SEQ_ITEM].indexOf(e.type)}(e.context.parent)?e.context.parent.props.concat(e.props):e.props).forEach(function(t,n){var a=t.start,u=t.end;switch(e.context.src[a]){case M.Char.COMMENT:if(!e.commentHasRequiredWhitespace(a)){r.push(new S.YAMLSemanticError(e,"Comments must be separated from other tokens by white space characters"))}var c=e.context.src.slice(a+1,u),f=e.header,l=e.valueRange;l&&(a>l.start||f&&a>f.start)?s.after.push(c):s.before.push(c);break;case M.Char.ANCHOR:if(o){r.push(new S.YAMLSemanticError(e,"A node can have at most one anchor"))}o=!0;break;case M.Char.TAG:if(i){r.push(new S.YAMLSemanticError(e,"A node can have at most one tag"))}i=!0}}),o){var c=e.anchor,f=n.getNode(c);f&&(n.map[n.newName(c)]=f),n.map[c]=e}if(e.type===M.Type.ALIAS){if(o||i){r.push(new S.YAMLSemanticError(e,"An alias node must not specify any properties"))}var l=e.rawValue,d=n.getNode(l);if(!d){var h="Aliased anchor not found: ".concat(l);return r.push(new S.YAMLReferenceError(e,h)),null}if(t=new u.default(d),n._cstAliases.push(t),!d.resolved){this.warnings.push(new S.YAMLWarning(e,"Alias node contains a circular reference, which cannot be resolved as JSON"))}}else{var p=this.resolveTagName(e);if(p)t=a.resolveNodeWithFallback(this,e,p);else{if(e.type!==M.Type.PLAIN){var v="Failed to resolve ".concat(e.type," node here");return r.push(new S.YAMLSyntaxError(e,v)),null}try{t=a.resolveScalar(e.strValue||"")}catch(t){return t.source||(t.source=e),r.push(t),null}}}if(t){t.range=[e.range.start,e.range.end],this.options.keepCstNodes&&(t.cstNode=e),this.options.keepNodeTypes&&(t.type=e.type);var m=s.before.join("\n");m&&(t.commentBefore=t.commentBefore?"".concat(t.commentBefore,"\n").concat(m):m);var g=s.after.join("\n");g&&(t.comment=t.comment?"".concat(t.comment,"\n").concat(g):g)}return e.resolved=t}},{key:"listNonDefaultTags",value:function(){return(0,a.default)(this.contents).filter(function(e){return 0!==e.indexOf(i.defaultPrefix)})}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var n=this.tagPrefixes.find(function(t){return t.handle===e});n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter(function(t){return t.handle!==e})}},{key:"stringifyTag",value:function(e){if("1.0"===(this.version||this.options.version)){var t=e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(t)return"!"+t[1];var n=e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?"!".concat(n[1],"/").concat(n[2]):"!".concat(e.replace(/^tag:/,""))}var r=this.tagPrefixes.find(function(t){return 0===e.indexOf(t.prefix)});if(!r){var a=this.getDefaults().tagPrefixes;r=a&&a.find(function(t){return 0===e.indexOf(t.prefix)})}if(!r)return"!"===e[0]?e:"!<".concat(e,">");var o=e.substr(r.prefix.length).replace(/[!,\[]{}]/g,function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]});return r.handle+o}},{key:"toJSON",value:function(e){var t=this.warnings.find(function(e){return/circular reference/.test(e.message)});if(t)throw new S.YAMLSemanticError(t.source,t.message);var n=this.options.keepBlobsInJSON&&("string"!=typeof e||!(this.contents instanceof l.default));return(0,f.default)(this.contents,e,n)}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");this.setSchema();var e=[];this.commentBefore&&e.push(this.commentBefore.replace(/^/gm,"#"));var t=!1;if(this.version){var r="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?r="%YAML:1.0":"1.1"===this.version&&(r="%YAML 1.1")),e.push(r),t=!0}var a=this.listNonDefaultTags();this.tagPrefixes.forEach(function(n){var r=n.handle,o=n.prefix;a.some(function(e){return 0===e.indexOf(o)})&&(e.push("%TAG ".concat(r," ").concat(o)),t=!0)}),t&&e.push("---");var o={anchors:{},doc:this,indent:""};if(this.contents){this.contents.commentBefore&&e.push(this.contents.commentBefore.replace(/^/gm,"#")),o.forceBlockIndent=!!this.comment;var i=this.contents.comment,s=this.schema.stringify(this.contents,o,function(){i=null});e.push((0,n.default)(s,"",i))}else void 0!==this.contents&&e.push(this.schema.stringify(this.contents,o));return this.comment&&e.push(this.comment.replace(/^/gm,"#")),e.join("\n")+"\n"}}]),e}();t.default=g,p=g,v="defaults",m={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:i.defaultPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:i.defaultPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:i.defaultPrefix}]}},v in p?Object.defineProperty(p,v,{value:m,enumerable:!0,configurable:!0,writable:!0}):p[v]=m});n(st);var ut=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(B),r=i(J),a=i(st);function i(e){return e&&e.__esModule?e:{default:e}}var s={keepNodeTypes:!0,keepBlobsInJSON:!0,tags:null,version:"1.2"},f=function(e){function t(e){return o(this,t),p(this,c(t).call(this,Object.assign({},s,e)))}return u(t,a.default),t}();function l(e,t){var r=(0,n.default)(e),a=new f(t).parse(r[0]);if(r.length>1){a.errors.unshift(new S.YAMLSemanticError(r[1],"Source contains multiple documents; please use YAML.parseAllDocuments()"))}return a}var d={createNode:r.default,defaultOptions:s,Document:f,parse:function(e,t){var n=l(e,t);if(n.warnings.forEach(function(e){return console.warn(e)}),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){return(0,n.default)(e).map(function(e){return new f(t).parse(e)})},parseCST:n.default,parseDocument:l,stringify:function(e,t){var n=new f(t);return n.contents=e,String(n)}};t.default=d});n(ut);var ct=r(function(e,t){t.__esModule=!0,t.defineParents=function e(t,n){void 0===n&&(n=null),"children"in t&&t.children.forEach(function(n){return e(n,t)}),"anchor"in t&&t.anchor&&e(t.anchor,t),"tag"in t&&t.tag&&e(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(function(n){return e(n,t)}),"middleComments"in t&&t.middleComments.forEach(function(n){return e(n,t)}),"indicatorComment"in t&&t.indicatorComment&&e(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&e(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(function(n){return e(n,t)}),Object.defineProperty(t,"_parent",{value:n,enumerable:!1})}});n(ct);var ft=r(function(e,t){t.__esModule=!0,t.getPointText=function(e){return e.line+":"+e.column}});n(ft);var lt=r(function(e,t){function n(e,t){if(t.position.end.offsete.position.start.column;case"mappingKey":case"mappingValue":return t.position.start.column>e._parent.position.start.column&&1===e.children.length&&"blockFolded"!==e.children[0].type&&"blockLiteral"!==e.children[0].type&&("mappingValue"===e.type||e.position.start.offset!==e.children[0].position.start.offset);default:return!1}}t.__esModule=!0,t.attachComments=function(e){ct.defineParents(e);var t=function(e){for(var t=Array.from(new Array(e.position.end.line),function(){return{}}),n=0,r=e.comments;n1&&"document"!==n.type&&"documentHead"!==n.type){var o=n.position.end,i=t[o.line-1].trailingAttachableNode;(!i||o.column>=i.position.end.column)&&(t[o.line-1].trailingAttachableNode=n)}if("root"!==n.type&&"document"!==n.type&&"documentHead"!==n.type&&"documentBody"!==n.type)for(var s=n.position,r=s.start,o=s.end,u=[o.line].concat(r.line===o.line?[]:r.line),c=0,f=u;c=d.position.end.column)&&(t[l-1].trailingNode=n)}"children"in n&&n.children.forEach(function(n){e(t,n)})}}(t,e),t}(e),r=e.children.slice();e.comments.sort(function(e,t){return e.position.start.offset-t.position.end.offset}).filter(function(e){return!e._parent}).forEach(function(e){for(;r.length>1&&e.position.start.line>r[0].position.end.line;)r.shift();!function(e,t,r){var a=e.position.start.line,o=t[a-1].trailingAttachableNode;if(o){if(o.trailingComment)throw new Error("Unexpected multiple trailing comment at "+ft.getPointText(e.position.start));return ct.defineParents(e,o),void(o.trailingComment=e)}for(var i=a;i>=r.position.start.line;i--){var s=t[i-1].trailingNode,u=void 0;if(s)u=s;else{if(i===a||!t[i-1].comment)continue;u=t[i-1].comment._parent}for(;;){if(n(u,e))return ct.defineParents(e,u),void u.endComments.push(e);if(!u._parent)break;u=u._parent}break}for(var i=a+1;i<=r.position.end.line;i++){var c=t[i-1].leadingAttachableNode;if(c)return ct.defineParents(e,c),void c.leadingComments.push(e)}var f=r.children[1];ct.defineParents(e,f),f.endComments.push(e)}(e,t,r[0])})}});n(lt);var dt=r(function(e,t){t.__esModule=!0,t.createNode=function(e,t){return{type:e,position:t}}});n(dt);var ht=r(function(e,t){t.__esModule=!0,t.createRoot=function(e,t,n){return w.__assign({},dt.createNode("root",e),{children:t,comments:n})}});n(ht);var pt=r(function(e,t){t.__esModule=!0,t.createLeadingCommentAttachable=function(){return{leadingComments:[]}}});n(pt);var vt=r(function(e,t){t.__esModule=!0,t.createTrailingCommentAttachable=function(e){return void 0===e&&(e=null),{trailingComment:e}}});n(vt);var mt=r(function(e,t){t.__esModule=!0,t.createCommentAttachable=function(){return w.__assign({},pt.createLeadingCommentAttachable(),vt.createTrailingCommentAttachable())}});n(mt);var gt=r(function(e,t){t.__esModule=!0,t.createAlias=function(e,t,n){return w.__assign({},dt.createNode("alias",e),mt.createCommentAttachable(),t,{value:n})}});n(gt);var yt=r(function(e,t){t.__esModule=!0,t.transformAlias=function(e,t){var n=e.cstNode;return gt.createAlias(t.transformRange({start:n.valueRange.start-1,end:n.valueRange.end}),t.transformContent(e),n.rawValue)}});n(yt);var _t=r(function(e,t){t.__esModule=!0,t.createBlockFolded=function(e){return w.__assign({},e,{type:"blockFolded"})}});n(_t);var bt=r(function(e,t){t.__esModule=!0,t.createBlockValue=function(e,t,n,r,a,o){return w.__assign({},dt.createNode("blockValue",e),pt.createLeadingCommentAttachable(),t,{chomping:n,indent:r,value:a,indicatorComment:o})}});n(bt);var wt=r(function(e,t){t.__esModule=!0,function(e){e.Tag="!",e.Anchor="&",e.Comment="#"}(t.PropLeadingCharacter||(t.PropLeadingCharacter={}))});n(wt);var Ot=r(function(e,t){t.__esModule=!0,t.createAnchor=function(e,t){return w.__assign({},dt.createNode("anchor",e),{value:t})}});n(Ot);var Et=r(function(e,t){t.__esModule=!0,t.createComment=function(e,t){return w.__assign({},dt.createNode("comment",e),{value:t})}});n(Et);var Mt=r(function(e,t){t.__esModule=!0,t.createContent=function(e,t,n){return{anchor:t,tag:e,middleComments:n}}});n(Mt);var St=r(function(e,t){t.__esModule=!0,t.createTag=function(e,t){return w.__assign({},dt.createNode("tag",e),{value:t})}});n(St);var At=r(function(e,t){t.__esModule=!0,t.transformContent=function(e,t,n){void 0===n&&(n=function(){return!1});for(var r=e.cstNode,a=[],o=null,i=null,s=null,u=0,c=r.props;u=0;u--){var c=e.contents[u];if("COMMENT"===c.type){var f=t.transformNode(c);n&&n.line===f.position.start.line?i.unshift(f):s?r.unshift(f):f.position.start.offset>=e.valueRange.end?o.unshift(f):a.unshift(f)}else s=!0}if(o.length>1)throw new Error("Unexpected multiple document trailing comments at "+ft.getPointText(o[1].position.start));if(i.length>1)throw new Error("Unexpected multiple documentHead trailing comments at "+ft.getPointText(i[1].position.start));return{comments:r,endComments:a,documentTrailingComment:Yt.getLast(o)||null,documentHeadTrailingComment:Yt.getLast(i)||null}}(a,t,n),i=o.comments,s=o.endComments,u=o.documentTrailingComment,c=o.documentHeadTrailingComment,f=t.transformNode(e.contents),l=function(e,t,n){var r=Ut.getMatchIndex(n.text.slice(e.valueRange.end),/^\.\.\./),a=-1===r?e.valueRange.end:Math.max(0,e.valueRange.end-1),o=n.transformRange({start:null!==t?t.position.start.offset:a,end:a}),i=-1===r?o.end:n.transformOffset(e.valueRange.end+3);return{position:o,documentEndPoint:i}}(a,f,t),d=l.position,h=l.documentEndPoint;return(r=t.comments).push.apply(r,i.concat(s)),{documentBody:Bt.createDocumentBody(d,f,s),documentEndPoint:h,documentTrailingComment:u,documentHeadTrailingComment:c}}});n(Ft);var Qt=r(function(e,t){t.__esModule=!0,t.createDocumentHead=function(e,t,n,r){return w.__assign({},dt.createNode("documentHead",e),jt.createEndCommentAttachable(n),vt.createTrailingCommentAttachable(r),{children:t})}});n(Qt);var Wt=r(function(e,t){t.__esModule=!0,t.transformDocumentHead=function(e,t){var n,r=e.cstNode,a=function(e,t){for(var n=[],r=[],a=[],o=!1,i=e.directives.length-1;i>=0;i--){var s=t.transformNode(e.directives[i]);"comment"===s.type?o?r.unshift(s):a.unshift(s):(o=!0,n.unshift(s))}return{directives:n,comments:r,endComments:a}}(r,t),o=a.directives,i=a.comments,s=a.endComments,u=function(e,t,n){var r=Ut.getMatchIndex(n.text.slice(0,e.valueRange.start),/---\s*$/),a=-1===r?{start:e.valueRange.start,end:e.valueRange.start}:{start:r,end:r+3};return 0!==t.length&&(a.start=t[0].position.start.offset),{position:n.transformRange(a),endMarkerPoint:-1===r?null:n.transformOffset(r)}}(r,o,t),c=u.position,f=u.endMarkerPoint;return(n=t.comments).push.apply(n,i.concat(s)),{createDocumentHeadWithTrailingComment:function(e){return e&&t.comments.push(e),Qt.createDocumentHead(c,o,s,e)},documentHeadEndMarkerPoint:f}}});n(Wt);var Vt=r(function(e,t){t.__esModule=!0,t.transformDocument=function(e,t){var n=Wt.transformDocumentHead(e,t),r=n.createDocumentHeadWithTrailingComment,a=n.documentHeadEndMarkerPoint,o=Ft.transformDocumentBody(e,t,a),i=o.documentBody,s=o.documentEndPoint,u=o.documentTrailingComment,c=r(o.documentHeadTrailingComment);return u&&t.comments.push(u),It.createDocument(Dt.createPosition(c.position.start,s),c,i,u)}});n(Vt);var Kt=r(function(e,t){t.__esModule=!0,t.createFlowCollection=function(e,t,n){return w.__assign({},dt.createNode("flowCollection",e),mt.createCommentAttachable(),t,{children:n})}});n(Kt);var $t=r(function(e,t){t.__esModule=!0,t.createFlowMapping=function(e,t,n){return w.__assign({},Kt.createFlowCollection(e,t,n),{type:"flowMapping"})}});n($t);var qt=r(function(e,t){t.__esModule=!0,t.createFlowMappingItem=function(e,t,n){return w.__assign({},dt.createNode("flowMappingItem",e),pt.createLeadingCommentAttachable(),{children:[t,n]})}});n(qt);var Jt=r(function(e,t){t.__esModule=!0,t.extractComments=function(e,t){for(var n=[],r=0,a=e;r=0;r--)if(n.test(e[r]))return r;return-1}});n(fn);var ln=r(function(e,t){t.__esModule=!0,t.transformPlain=function(e,t){var n=e.cstNode;return cn.createPlain(t.transformRange({start:n.valueRange.start,end:fn.findLastCharIndex(t.text,n.valueRange.end-1,/\S/)+1}),t.transformContent(e),n.strValue)}});n(ln);var dn=r(function(e,t){t.__esModule=!0,t.createQuoteDouble=function(e){return w.__assign({},e,{type:"quoteDouble"})}});n(dn);var hn=r(function(e,t){t.__esModule=!0,t.createQuoteValue=function(e,t,n){return w.__assign({},dt.createNode("quoteValue",e),t,mt.createCommentAttachable(),{value:n})}});n(hn);var pn=r(function(e,t){t.__esModule=!0,t.transformAstQuoteValue=function(e,t){var n=e.cstNode;return hn.createQuoteValue(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}});n(pn);var vn=r(function(e,t){t.__esModule=!0,t.transformQuoteDouble=function(e,t){return dn.createQuoteDouble(pn.transformAstQuoteValue(e,t))}});n(vn);var mn=r(function(e,t){t.__esModule=!0,t.createQuoteSingle=function(e){return w.__assign({},e,{type:"quoteSingle"})}});n(mn);var gn=r(function(e,t){t.__esModule=!0,t.transformQuoteSingle=function(e,t){return mn.createQuoteSingle(pn.transformAstQuoteValue(e,t))}});n(gn);var yn=r(function(e,t){t.__esModule=!0,t.createSequence=function(e,t,n){return w.__assign({},dt.createNode("sequence",e),pt.createLeadingCommentAttachable(),jt.createEndCommentAttachable(),t,{children:n})}});n(yn);var _n=r(function(e,t){t.__esModule=!0,t.createSequenceItem=function(e,t){return w.__assign({},dt.createNode("sequenceItem",e),mt.createCommentAttachable(),jt.createEndCommentAttachable(),{children:t?[t]:[]})}});n(_n);var bn=r(function(e,t){t.__esModule=!0,t.transformSeq=function(e,t){var n=Jt.extractComments(e.cstNode.items,t).map(function(n,r){Rt.extractPropComments(n,t);var a=t.transformNode(e.items[r]);return _n.createSequenceItem(Dt.createPosition(t.transformOffset(n.valueRange.start),null===a?t.transformOffset(n.valueRange.start+1):a.position.end),a)});return yn.createSequence(Dt.createPosition(n[0].position.start,Yt.getLast(n).position.end),t.transformContent(e),n)}});n(bn);var wn=r(function(e,t){t.__esModule=!0,t.transformNode=function(e,t){if(null===e)return null;switch(e.type){case"ALIAS":return yt.transformAlias(e,t);case"BLOCK_FOLDED":return Tt.transformBlockFolded(e,t);case"BLOCK_LITERAL":return kt.transformBlockLiteral(e,t);case"COMMENT":return Ct.transformComment(e,t);case"DIRECTIVE":return xt.transformDirective(e,t);case"DOCUMENT":return Vt.transformDocument(e,t);case"FLOW_MAP":return tn.transformFlowMap(e,t);case"FLOW_SEQ":return an.transformFlowSeq(e,t);case"MAP":return un.transformMap(e,t);case"PLAIN":return ln.transformPlain(e,t);case"QUOTE_DOUBLE":return vn.transformQuoteDouble(e,t);case"QUOTE_SINGLE":return gn.transformQuoteSingle(e,t);case"SEQ":return bn.transformSeq(e,t);default:throw new Error("Unexpected node type "+e.type)}}});n(wn);var On=r(function(e,t){t.__esModule=!0,t.createError=function(e,t,n){var r=new SyntaxError(e);return r.name="YAMLSyntaxError",r.source=t,r.position=n,r}});n(On);var En=r(function(e,t){t.__esModule=!0,t.transformError=function(e,t){var n=e.source.range||e.source.valueRange;return On.createError(e.message,t.text,t.transformRange(n))}});n(En);var Mn=r(function(e,t){t.__esModule=!0,t.createPoint=function(e,t,n){return{offset:e,line:t,column:n}}});n(Mn);var Sn=r(function(e,t){t.__esModule=!0,t.transformOffset=function(e,t){var n=t.locator.locationForIndex(e);if(null===n)throw new Error("Unexpected offset "+e);return Mn.createPoint(e,n.line+1,n.column+1)}});n(Sn);var An=r(function(e,t){t.__esModule=!0,t.transformRange=function(e,t){return Dt.createPosition(t.transformOffset(e.start),t.transformOffset(e.end))}});n(An);var Pn=r(function(e,t){t.__esModule=!0,t.removeFakeNodes=function e(t){if("children"in t){if(1===t.children.length){var n=t.children[0];if("plain"===n.type&&null===n.tag&&null===n.anchor&&""===n.value)return t.children.splice(0,1),t}t.children.forEach(e)}return t}});n(Pn);var Tn=r(function(e,t){t.__esModule=!0,t.createUpdater=function(e,t,n,r){var a=t(e);return function(t){r(a,t)&&n(e,a=t)}}});n(Tn);var Ln=r(function(e,t){function n(e){return e.start}function r(e,t){e.start=t}function a(e){return e.end}function o(e,t){e.end=t}function i(e,t){return t.offsete.offset}t.__esModule=!0,t.updatePositions=function e(t){if(null!==t&&"children"in t){var u=t.children;if(u.forEach(e),"document"===t.type){var c=t.children,f=c[0],l=c[1];f.position.start.offset===f.position.end.offset?f.position.start=f.position.end=l.position.start:l.position.start.offset===l.position.end.offset&&(l.position.start=l.position.end=f.position.end)}var d=Tn.createUpdater(t.position,n,r,i),h=Tn.createUpdater(t.position,a,o,s);"endComments"in t&&0!==t.endComments.length&&(d(t.endComments[0].position.start),h(Yt.getLast(t.endComments).position.end));var p=u.filter(function(e){return null!==e});if(0!==p.length){var v=p[0],m=Yt.getLast(p);d(v.position.start),h(m.position.end),"leadingComments"in v&&0!==v.leadingComments.length&&d(v.leadingComments[0].position.start),"tag"in v&&v.tag&&d(v.tag.position.start),"anchor"in v&&v.anchor&&d(v.anchor.position.start),"trailingComment"in m&&m.trailingComment&&h(m.trailingComment.position.end)}}}});n(Ln);var kn=r(function(e,t){t.__esModule=!0,t.parse=function(e){var t=ut.default.parseAllDocuments(e,{merge:!0,keepCstNodes:!0}),n=[],r={text:e,locator:new O.default(e),comments:n,transformOffset:function(e){return Sn.transformOffset(e,r)},transformRange:function(e){return An.transformRange(e,r)},transformNode:function(e){return wn.transformNode(e,r)},transformContent:function(e){return At.transformContent(e,r)}},a=t.find(function(e){return 0!==e.errors.length});if(a)throw En.transformError(a.errors[0],r);var o=ht.createRoot(r.transformRange({start:0,end:r.text.length}),t.map(r.transformNode),n);return lt.attachComments(o),Ln.updatePositions(o),Pn.removeFakeNodes(o),o}});n(kn);var Cn=r(function(e,t){t.__esModule=!0,w.__exportStar(kn,t)});return n(Cn),{parsers:{yaml:{astFormat:"yaml",parse:function(t){try{var n=Cn.parse(t);return delete n.comments,n}catch(t){throw t&&t.position?e(t.message,t.position):t}},hasPragma:t,locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset},preprocess:function(e){return-1===e.indexOf("\r")?e:e.replace(/\r\n?/g,"\n")}}}}}); diff --git a/node_modules/prettier/standalone.js b/node_modules/prettier/standalone.js new file mode 100644 index 0000000..10cf974 --- /dev/null +++ b/node_modules/prettier/standalone.js @@ -0,0 +1,30219 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.prettier = factory()); +}(this, (function () { 'use strict'; + +var name = "prettier"; +var version$1 = "1.15.2"; +var description = "Prettier is an opinionated code formatter"; +var bin = { + "prettier": "./bin/prettier.js" +}; +var repository = "prettier/prettier"; +var homepage = "https://prettier.io"; +var author = "James Long"; +var license = "MIT"; +var main = "./index.js"; +var engines = { + "node": ">=6" +}; +var dependencies = { + "@angular/compiler": "6.1.10", + "@babel/code-frame": "7.0.0-beta.46", + "@babel/parser": "7.1.5", + "@glimmer/syntax": "0.30.3", + "@iarna/toml": "2.0.0", + "angular-estree-parser": "1.1.5", + "angular-html-parser": "1.0.0", + "camelcase": "4.1.0", + "chalk": "2.1.0", + "cjk-regex": "2.0.0", + "cosmiconfig": "5.0.6", + "dashify": "0.2.2", + "dedent": "0.7.0", + "diff": "3.2.0", + "editorconfig": "0.15.2", + "editorconfig-to-prettier": "0.1.0", + "emoji-regex": "6.5.1", + "escape-string-regexp": "1.0.5", + "esutils": "2.0.2", + "find-parent-dir": "0.3.0", + "find-project-root": "1.1.1", + "flow-parser": "0.84.0", + "get-stream": "3.0.0", + "globby": "6.1.0", + "graphql": "0.13.2", + "html-element-attributes": "2.0.0", + "html-styles": "1.0.0", + "html-tag-names": "1.1.2", + "ignore": "3.3.7", + "jest-docblock": "23.2.0", + "json-stable-stringify": "1.0.1", + "leven": "2.1.0", + "lines-and-columns": "1.1.6", + "linguist-languages": "6.2.1-dev.20180706", + "lodash.uniqby": "4.7.0", + "mem": "1.1.0", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "n-readlines": "1.0.0", + "normalize-path": "3.0.0", + "parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee", + "postcss-less": "1.1.5", + "postcss-media-query-parser": "0.2.3", + "postcss-scss": "1.0.6", + "postcss-selector-parser": "2.2.3", + "postcss-values-parser": "1.5.0", + "regexp-util": "1.2.2", + "remark-math": "1.0.4", + "remark-parse": "5.0.0", + "resolve": "1.5.0", + "semver": "5.4.1", + "string-width": "2.1.1", + "typescript": "3.0.1", + "typescript-estree": "1.0.0", + "unicode-regex": "2.0.0", + "unified": "6.1.6", + "vnopts": "1.0.2", + "yaml": "1.0.0-rc.8", + "yaml-unist-parser": "1.0.0-rc.4" +}; +var devDependencies = { + "@babel/cli": "7.1.5", + "@babel/core": "7.1.5", + "@babel/preset-env": "7.1.5", + "babel-loader": "8.0.4", + "benchmark": "2.1.4", + "builtin-modules": "2.0.0", + "codecov": "2.2.0", + "cross-env": "5.0.5", + "eslint": "4.18.2", + "eslint-config-prettier": "2.9.0", + "eslint-friendly-formatter": "3.0.0", + "eslint-plugin-import": "2.9.0", + "eslint-plugin-prettier": "2.6.0", + "eslint-plugin-react": "7.7.0", + "execa": "0.10.0", + "jest": "23.3.0", + "jest-junit": "5.0.0", + "jest-snapshot-serializer-ansi": "1.0.0", + "jest-snapshot-serializer-raw": "1.1.0", + "jest-watch-typeahead": "0.1.0", + "mkdirp": "0.5.1", + "prettier": "1.15.1", + "prettylint": "1.0.0", + "rimraf": "2.6.2", + "rollup": "0.47.6", + "rollup-plugin-alias": "1.4.0", + "rollup-plugin-babel": "4.0.0-beta.4", + "rollup-plugin-commonjs": "8.2.6", + "rollup-plugin-json": "2.1.1", + "rollup-plugin-node-builtins": "2.0.0", + "rollup-plugin-node-globals": "1.1.0", + "rollup-plugin-node-resolve": "2.0.0", + "rollup-plugin-replace": "1.2.1", + "rollup-plugin-uglify": "3.0.0", + "shelljs": "0.8.1", + "snapshot-diff": "0.4.0", + "strip-ansi": "4.0.0", + "tempy": "0.2.1", + "webpack": "3.12.0" +}; +var resolutions = { + "@babel/code-frame": "7.0.0-beta.46" +}; +var scripts = { + "prepublishOnly": "echo \"Error: must publish from dist/\" && exit 1", + "prepare-release": "yarn && yarn build && yarn test:dist", + "test": "jest", + "test:dist": "node ./scripts/test-dist.js", + "test-integration": "jest tests_integration", + "perf-repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "perf-repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "perf-benchmark": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-benchmark --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", + "lint": "cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter", + "lint-docs": "prettylint {.,docs,website,website/blog}/*.md", + "build": "node --max-old-space-size=2048 ./scripts/build/build.js", + "build-docs": "node ./scripts/build-docs.js", + "check-deps": "node ./scripts/check-deps.js" +}; +var _package = { + name: name, + version: version$1, + description: description, + bin: bin, + repository: repository, + homepage: homepage, + author: author, + license: license, + main: main, + engines: engines, + dependencies: dependencies, + devDependencies: devDependencies, + resolutions: resolutions, + scripts: scripts +}; + +var _package$1 = Object.freeze({ + name: name, + version: version$1, + description: description, + bin: bin, + repository: repository, + homepage: homepage, + author: author, + license: license, + main: main, + engines: engines, + dependencies: dependencies, + devDependencies: devDependencies, + resolutions: resolutions, + scripts: scripts, + default: _package +}); + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + +function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var base = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports['default'] = + /*istanbul ignore end*/ + Diff; + + function Diff() {} + + Diff.prototype = { + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + diff: function diff(oldString, newString) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + var callback = options.callback; + + if (typeof options === 'function') { + callback = options; + options = {}; + } + + this.options = options; + var self = this; + + function done(value) { + if (callback) { + setTimeout(function () { + callback(undefined, value); + }, 0); + return true; + } else { + return value; + } + } // Allow subclasses to massage the input prior to running + + + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, + oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + // Identity per the equality and tokenizer + return done([{ + value: this.join(newString), + count: newString.length + }]); + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = + /*istanbul ignore start*/ + void 0; + + var addPath = bestPath[diagonalPath - 1], + removePath = bestPath[diagonalPath + 1], + _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen, + canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + + + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list + + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } + + _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done + + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } + + editLength++; + } // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced. + + + if (callback) { + (function exec() { + setTimeout(function () { + // This should not happen, but we want to be safe. + + /* istanbul ignore next */ + if (editLength > maxEditLength) { + return callback(); + } + + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + pushComponent: function pushComponent(components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; + } else { + components.push({ + count: 1, + added: added, + removed: removed + }); + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, + oldLen = oldString.length, + newPos = basePath.newPos, + oldPos = newPos - diagonalPath, + commonCount = 0; + + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + + basePath.newPos = newPos; + return oldPos; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + equals: function equals(left, right) { + return left === right; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + removeEmpty: function removeEmpty(array) { + var ret = []; + + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + + return ret; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + castInput: function castInput(value) { + return value; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + tokenize: function tokenize(value) { + return value.split(''); + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + join: function join(chars) { + return chars.join(''); + } + }; + + function buildValues(diff, components, newString, oldString, useLongestToken) { + var componentPos = 0, + componentLen = components.length, + newPos = 0, + oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = diff.join(value); + } else { + component.value = diff.join(newString.slice(newPos, newPos + component.count)); + } + + newPos += component.count; // Common case + + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; // Reverse add and remove so removes are output first to match common convention + // The diffing algorithm is tied to add then remove output and this is the simplest + // route to get the desired output with minimal overhead. + + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } // Special case handle for when one terminal is ignored. For this case we merge the + // terminal into the prior string and drop the change. + + + var lastComponent = components[componentLen - 1]; + + if (componentLen > 1 && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + + return components; + } + + function clonePath(path) { + return { + newPos: path.newPos, + components: path.components.slice(0) + }; + } +}); +unwrapExports(base); + +var character = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.characterDiff = undefined; + exports. + /*istanbul ignore end*/ + diffChars = diffChars; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var characterDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + characterDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + function diffChars(oldStr, newStr, callback) { + return characterDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(character); + +var params = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + generateOptions = generateOptions; + + function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } else if (options) { + for (var name in options) { + /* istanbul ignore else */ + if (options.hasOwnProperty(name)) { + defaults[name] = options[name]; + } + } + } + + return defaults; + } +}); +unwrapExports(params); + +var word = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.wordDiff = undefined; + exports. + /*istanbul ignore end*/ + diffWords = diffWords; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWordsWithSpace = diffWordsWithSpace; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode + // + // Ranges and exceptions: + // Latin-1 Supplement, 0080–00FF + // - U+00D7 × Multiplication sign + // - U+00F7 ÷ Division sign + // Latin Extended-A, 0100–017F + // Latin Extended-B, 0180–024F + // IPA Extensions, 0250–02AF + // Spacing Modifier Letters, 02B0–02FF + // - U+02C7 ˇ ˇ Caron + // - U+02D8 ˘ ˘ Breve + // - U+02D9 ˙ ˙ Dot Above + // - U+02DA ˚ ˚ Ring Above + // - U+02DB ˛ ˛ Ogonek + // - U+02DC ˜ ˜ Small Tilde + // - U+02DD ˝ ˝ Double Acute Accent + // Latin Extended Additional, 1E00–1EFF + + + var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; + var reWhitespace = /\S/; + var wordDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + wordDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + wordDiff.equals = function (left, right) { + return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); + }; + + wordDiff.tokenize = function (value) { + var tokens = value.split(/(\s+|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. + + for (var i = 0; i < tokens.length - 1; i++) { + // If we have an empty string in the next field and we have only word chars before and after, merge + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + + return tokens; + }; + + function diffWords(oldStr, newStr, callback) { + var options = + /*istanbul ignore start*/ + (0, params.generateOptions + /*istanbul ignore end*/ + )(callback, { + ignoreWhitespace: true + }); + return wordDiff.diff(oldStr, newStr, options); + } + + function diffWordsWithSpace(oldStr, newStr, callback) { + return wordDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(word); + +var line = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.lineDiff = undefined; + exports. + /*istanbul ignore end*/ + diffLines = diffLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffTrimmedLines = diffTrimmedLines; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var lineDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + lineDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + lineDiff.tokenize = function (value) { + var retLines = [], + linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line + + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } // Merge the content and line separators into single tokens + + + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + + retLines.push(line); + } + } + + return retLines; + }; + + function diffLines(oldStr, newStr, callback) { + return lineDiff.diff(oldStr, newStr, callback); + } + + function diffTrimmedLines(oldStr, newStr, callback) { + var options = + /*istanbul ignore start*/ + (0, params.generateOptions + /*istanbul ignore end*/ + )(callback, { + ignoreWhitespace: true + }); + return lineDiff.diff(oldStr, newStr, options); + } +}); +unwrapExports(line); + +var sentence = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.sentenceDiff = undefined; + exports. + /*istanbul ignore end*/ + diffSentences = diffSentences; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var sentenceDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + sentenceDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + sentenceDiff.tokenize = function (value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); + }; + + function diffSentences(oldStr, newStr, callback) { + return sentenceDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(sentence); + +var css = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.cssDiff = undefined; + exports. + /*istanbul ignore end*/ + diffCss = diffCss; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var cssDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + cssDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + cssDiff.tokenize = function (value) { + return value.split(/([{}:;,]|\s+)/); + }; + + function diffCss(oldStr, newStr, callback) { + return cssDiff.diff(oldStr, newStr, callback); + } +}); +unwrapExports(css); + +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); +} + +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !_isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct(Class, arguments, _getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return _setPrototypeOf(Wrapper, Class); + }; + + return _wrapNativeSuper(Class); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _getPrototypeOf(object); + if (object === null) break; + } + + return object; +} + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = _superPropBase(target, property); + + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} + +function _taggedTemplateLiteral(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); +} + +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); +} + +function _toArray(arr) { + return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); +} + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} + +function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + + return typeof key === "symbol" ? key : String(key); +} + +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + + keys.push(element.key); +} + +function _fromElementDescriptor(element) { + var obj = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + return obj; +} + +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + return _toArray(elementObjects).map(function (elementObject) { + var element = _toElementDescriptor(elementObject); + + _disallowProperty(elementObject, "finisher", "An element descriptor"); + + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} + +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + + if (kind !== "method" && kind !== "field") { + throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"'); + } + + var key = _toPropertyKey(elementObject.key); + + var placement = String(elementObject.placement); + + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"'); + } + + var descriptor = elementObject.descriptor; + + _disallowProperty(elementObject, "elements", "An element descriptor"); + + var element = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor) + }; + + if (kind !== "field") { + _disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + + element.initializer = elementObject.initializer; + } + + return element; +} + +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + + var finisher = _optionalCallableProperty(elementObject, "finisher"); + + var extras = _toElementDescriptors(elementObject.extras); + + return { + element: element, + finisher: finisher, + extras: extras + }; +} + +function _fromClassDescriptor(elements) { + var obj = { + kind: "class", + elements: elements.map(_fromElementDescriptor) + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + return obj; +} + +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + + if (kind !== "class") { + throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"'); + } + + _disallowProperty(obj, "key", "A class descriptor"); + + _disallowProperty(obj, "placement", "A class descriptor"); + + _disallowProperty(obj, "descriptor", "A class descriptor"); + + _disallowProperty(obj, "initializer", "A class descriptor"); + + _disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + + var elements = _toElementDescriptors(obj.elements); + + return { + elements: elements, + finisher: finisher + }; +} + +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } +} + +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} + +var json = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.jsonDiff = undefined; + + var _typeof$$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) { + return _typeof(obj); + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : _typeof(obj); + }; + + exports. + /*istanbul ignore end*/ + diffJson = diffJson; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + canonicalize = canonicalize; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault$$1(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault$$1(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var objectPrototypeToString = Object.prototype.toString; + var jsonDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + jsonDiff = new + /*istanbul ignore start*/ + _base2['default'](); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a + // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + + jsonDiff.useLongestToken = true; + jsonDiff.tokenize = + /*istanbul ignore start*/ + line.lineDiff. + /*istanbul ignore end*/ + tokenize; + + jsonDiff.castInput = function (value) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + undefinedReplacement = this.options.undefinedReplacement; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value), function (k, v) { + if (typeof v === 'undefined') { + return undefinedReplacement; + } + + return v; + }, ' '); + }; + + jsonDiff.equals = function (left, right) { + return ( + /*istanbul ignore start*/ + _base2['default']. + /*istanbul ignore end*/ + prototype.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')) + ); + }; + + function diffJson(oldObj, newObj, options) { + return jsonDiff.diff(oldObj, newObj, options); + } // This function handles the presence of circular references by bailing out when encountering an + // object that is already on the "stack" of items being processed. + + + function canonicalize(obj, stack, replacementStack) { + stack = stack || []; + replacementStack = replacementStack || []; + var i = + /*istanbul ignore start*/ + void 0; + + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + + var canonicalizedObj = + /*istanbul ignore start*/ + void 0; + + if ('[object Array]' === objectPrototypeToString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack); + } + + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + + if ( + /*istanbul ignore start*/ + (typeof + /*istanbul ignore end*/ + obj === 'undefined' ? 'undefined' : _typeof$$1(obj)) === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + var sortedKeys = [], + key = + /*istanbul ignore start*/ + void 0; + + for (key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(key)) { + sortedKeys.push(key); + } + } + + sortedKeys.sort(); + + for (i = 0; i < sortedKeys.length; i += 1) { + key = sortedKeys[i]; + canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack); + } + + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + + return canonicalizedObj; + } +}); +unwrapExports(json); + +var array = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.arrayDiff = undefined; + exports. + /*istanbul ignore end*/ + diffArrays = diffArrays; + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + var arrayDiff = + /*istanbul ignore start*/ + exports. + /*istanbul ignore end*/ + arrayDiff = new + /*istanbul ignore start*/ + _base2['default'](); + + arrayDiff.tokenize = arrayDiff.join = function (value) { + return value.slice(); + }; + + function diffArrays(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); + } +}); +unwrapExports(array); + +var parse = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + parsePatch = parsePatch; + + function parsePatch(uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], + list = [], + i = 0; + + function parseIndex() { + var index = {}; + list.push(index); // Parse diff metadata + + while (i < diffstr.length) { + var line = diffstr[i]; // File header found, end parsing diff metadata + + if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { + break; + } // Diff index + + + var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); + + if (header) { + index.index = header[1]; + } + + i++; + } // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + + + parseFileHeader(index); + parseFileHeader(index); // Parse hunks + + index.hunks = []; + + while (i < diffstr.length) { + var _line = diffstr[i]; + + if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { + break; + } else if (/^@@/.test(_line)) { + index.hunks.push(parseHunk()); + } else if (_line && options.strict) { + // Ignore unexpected content unless in strict mode + throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); + } else { + i++; + } + } + } // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + + + function parseFileHeader(index) { + var headerPattern = /^(---|\+\+\+)\s+([\S ]*)(?:\t(.*?)\s*)?$/; + var fileHeader = headerPattern.exec(diffstr[i]); + + if (fileHeader) { + var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; + index[keyPrefix + 'FileName'] = fileHeader[2]; + index[keyPrefix + 'Header'] = fileHeader[3]; + i++; + } + } // Parses a hunk + // This assumes that we are at the start of a hunk. + + + function parseHunk() { + var chunkHeaderIndex = i, + chunkHeaderLine = diffstr[i++], + chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + var hunk = { + oldStart: +chunkHeader[1], + oldLines: +chunkHeader[2] || 1, + newStart: +chunkHeader[3], + newLines: +chunkHeader[4] || 1, + lines: [], + linedelimiters: [] + }; + var addCount = 0, + removeCount = 0; + + for (; i < diffstr.length; i++) { + // Lines starting with '---' could be mistaken for the "remove line" operation + // But they could be the header for the next file. Therefore prune such cases out. + if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { + break; + } + + var operation = diffstr[i][0]; + + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + hunk.linedelimiters.push(delimiters[i] || '\n'); + + if (operation === '+') { + addCount++; + } else if (operation === '-') { + removeCount++; + } else if (operation === ' ') { + addCount++; + removeCount++; + } + } else { + break; + } + } // Handle the empty block count case + + + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } // Perform optional sanity checking + + + if (options.strict) { + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + } + + return hunk; + } + + while (i < diffstr.length) { + parseIndex(); + } + + return list; + } +}); +unwrapExports(parse); + +var distanceIterator = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + "use strict"; + + exports.__esModule = true; + + exports["default"] = + /*istanbul ignore end*/ + function (start, minLine, maxLine) { + var wantForward = true, + backwardExhausted = false, + forwardExhausted = false, + localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } else { + wantForward = false; + } // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + + + if (start + localOffset <= maxLine) { + return localOffset; + } + + forwardExhausted = true; + } + + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + + + if (minLine <= start - localOffset) { + return -localOffset++; + } + + backwardExhausted = true; + return iterator(); + } // We tried to fit hunk before text beginning and beyond text lenght, then + // hunk can't fit on the text. Return undefined + + }; + }; +}); +unwrapExports(distanceIterator); + +var apply = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + applyPatch = applyPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatches = applyPatches; + /*istanbul ignore start*/ + + var _distanceIterator2 = _interopRequireDefault(distanceIterator); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + /*istanbul ignore end*/ + + + function applyPatch(source, uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (0, parse.parsePatch + /*istanbul ignore end*/ + )(uniDiff); + } + + if (Array.isArray(uniDiff)) { + if (uniDiff.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + + uniDiff = uniDiff[0]; + } // Apply the diff to the input + + + var lines = source.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], + hunks = uniDiff.hunks, + compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) + /*istanbul ignore start*/ + { + return ( + /*istanbul ignore end*/ + line === patchContent + ); + }, + errorCount = 0, + fuzzFactor = options.fuzzFactor || 0, + minLine = 0, + offset = 0, + removeEOFNL = + /*istanbul ignore start*/ + void 0 + /*istanbul ignore end*/ + , + addEOFNL = + /*istanbul ignore start*/ + void 0; + /** + * Checks if the hunk exactly fits on the provided location + */ + + + function hunkFits(hunk, toPos) { + for (var j = 0; j < hunk.lines.length; j++) { + var line = hunk.lines[j], + operation = line[0], + content = line.substr(1); + + if (operation === ' ' || operation === '-') { + // Context sanity check + if (!compareLine(toPos + 1, lines[toPos], operation, content)) { + errorCount++; + + if (errorCount > fuzzFactor) { + return false; + } + } + + toPos++; + } + } + + return true; + } // Search best fit offsets for each hunk based on the previous ones + + + for (var i = 0; i < hunks.length; i++) { + var hunk = hunks[i], + maxLine = lines.length - hunk.oldLines, + localOffset = 0, + toPos = offset + hunk.oldStart - 1; + var iterator = + /*istanbul ignore start*/ + (0, _distanceIterator2['default'] + /*istanbul ignore end*/ + )(toPos, minLine, maxLine); + + for (; localOffset !== undefined; localOffset = iterator()) { + if (hunkFits(hunk, toPos + localOffset)) { + hunk.offset = offset += localOffset; + break; + } + } + + if (localOffset === undefined) { + return false; + } // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + + + minLine = hunk.offset + hunk.oldStart + hunk.oldLines; + } // Apply patch hunks + + + for (var _i = 0; _i < hunks.length; _i++) { + var _hunk = hunks[_i], + _toPos = _hunk.offset + _hunk.newStart - 1; + + if (_hunk.newLines == 0) { + _toPos++; + } + + for (var j = 0; j < _hunk.lines.length; j++) { + var line = _hunk.lines[j], + operation = line[0], + content = line.substr(1), + delimiter = _hunk.linedelimiters[j]; + + if (operation === ' ') { + _toPos++; + } else if (operation === '-') { + lines.splice(_toPos, 1); + delimiters.splice(_toPos, 1); + /* istanbul ignore else */ + } else if (operation === '+') { + lines.splice(_toPos, 0, content); + delimiters.splice(_toPos, 0, delimiter); + _toPos++; + } else if (operation === '\\') { + var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; + + if (previousOperation === '+') { + removeEOFNL = true; + } else if (previousOperation === '-') { + addEOFNL = true; + } + } + } + } // Handle EOFNL insertion/removal + + + if (removeEOFNL) { + while (!lines[lines.length - 1]) { + lines.pop(); + delimiters.pop(); + } + } else if (addEOFNL) { + lines.push(''); + delimiters.push('\n'); + } + + for (var _k = 0; _k < lines.length - 1; _k++) { + lines[_k] = lines[_k] + delimiters[_k]; + } + + return lines.join(''); + } // Wrapper that supports multiple file patches via callbacks. + + + function applyPatches(uniDiff, options) { + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (0, parse.parsePatch + /*istanbul ignore end*/ + )(uniDiff); + } + + var currentIndex = 0; + + function processIndex() { + var index = uniDiff[currentIndex++]; + + if (!index) { + return options.complete(); + } + + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + + var updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + + processIndex(); + }); + }); + } + + processIndex(); + } +}); +unwrapExports(apply); + +var create = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + structuredPatch = structuredPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createTwoFilesPatch = createTwoFilesPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createPatch = createPatch; + /*istanbul ignore start*/ + + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return Array.from(arr); + } + } + /*istanbul ignore end*/ + + + function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (!options) { + options = {}; + } + + if (typeof options.context === 'undefined') { + options.context = 4; + } + + var diff = + /*istanbul ignore start*/ + (0, line.diffLines + /*istanbul ignore end*/ + )(oldStr, newStr, options); + diff.push({ + value: '', + lines: [] + }); // Append an empty value to make cleanup easier + + function contextLines(lines) { + return lines.map(function (entry) { + return ' ' + entry; + }); + } + + var hunks = []; + var oldRangeStart = 0, + newRangeStart = 0, + curRange = [], + oldLine = 1, + newLine = 1; + /*istanbul ignore start*/ + + var _loop = function _loop( + /*istanbul ignore end*/ + i) { + var current = diff[i], + lines = current.lines || current.value.replace(/\n$/, '').split('\n'); + current.lines = lines; + + if (current.added || current.removed) { + /*istanbul ignore start*/ + var _curRange; + /*istanbul ignore end*/ + // If we have previous context, start with that + + + if (!oldRangeStart) { + var prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + + if (prev) { + curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } // Output our changes + + /*istanbul ignore start*/ + + + (_curRange = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + lines.map(function (entry) { + return (current.added ? '+' : '-') + entry; + }))); // Track the updated file position + + + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } + } else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= options.context * 2 && i < diff.length - 2) { + /*istanbul ignore start*/ + var _curRange2; + /*istanbul ignore end*/ + // Overlapping + + /*istanbul ignore start*/ + + + (_curRange2 = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange2 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + contextLines(lines))); + } else { + /*istanbul ignore start*/ + var _curRange3; + /*istanbul ignore end*/ + // end the range and output + + + var contextSize = Math.min(lines.length, options.context); + /*istanbul ignore start*/ + + (_curRange3 = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange3 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + contextLines(lines.slice(0, contextSize)))); + + var hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + + if (i >= diff.length - 2 && lines.length <= options.context) { + // EOF is inside this hunk + var oldEOFNewline = /\n$/.test(oldStr); + var newEOFNewline = /\n$/.test(newStr); + + if (lines.length == 0 && !oldEOFNewline) { + // special case: old has no eol and no trailing context; no-nl can end up before adds + curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); + } else if (!oldEOFNewline || !newEOFNewline) { + curRange.push('\\ No newline at end of file'); + } + } + + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + + oldLine += lines.length; + newLine += lines.length; + } + }; + + for (var i = 0; i < diff.length; i++) { + /*istanbul ignore start*/ + _loop( + /*istanbul ignore end*/ + i); + } + + return { + oldFileName: oldFileName, + newFileName: newFileName, + oldHeader: oldHeader, + newHeader: newHeader, + hunks: hunks + }; + } + + function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + var ret = []; + + if (oldFileName == newFileName) { + ret.push('Index: ' + oldFileName); + } + + ret.push('==================================================================='); + ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); + ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); + + for (var i = 0; i < diff.hunks.length; i++) { + var hunk = diff.hunks[i]; + ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); + ret.push.apply(ret, hunk.lines); + } + + return ret.join('\n') + '\n'; + } + + function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); + } +}); +unwrapExports(create); + +var dmp = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + "use strict"; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + convertChangesToDMP = convertChangesToDMP; // See: http://code.google.com/p/google-diff-match-patch/wiki/API + + function convertChangesToDMP(changes) { + var ret = [], + change = + /*istanbul ignore start*/ + void 0 + /*istanbul ignore end*/ + , + operation = + /*istanbul ignore start*/ + void 0; + + for (var i = 0; i < changes.length; i++) { + change = changes[i]; + + if (change.added) { + operation = 1; + } else if (change.removed) { + operation = -1; + } else { + operation = 0; + } + + ret.push([operation, change.value]); + } + + return ret; + } +}); +unwrapExports(dmp); + +var xml = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports. + /*istanbul ignore end*/ + convertChangesToXML = convertChangesToXML; + + function convertChangesToXML(changes) { + var ret = []; + + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + + ret.push(escapeHTML(change.value)); + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + } + + return ret.join(''); + } + + function escapeHTML(s) { + var n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; + } +}); +unwrapExports(xml); + +var lib = createCommonjsModule(function (module, exports) { + /*istanbul ignore start*/ + 'use strict'; + + exports.__esModule = true; + exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.diffArrays = exports.diffJson = exports.diffCss = exports.diffSentences = exports.diffTrimmedLines = exports.diffLines = exports.diffWordsWithSpace = exports.diffWords = exports.diffChars = exports.Diff = undefined; + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + var _base2 = _interopRequireDefault(base); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + 'default': obj + }; + } + + exports. + /*istanbul ignore end*/ + Diff = _base2['default']; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffChars = character.diffChars; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWords = word.diffWords; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffWordsWithSpace = word.diffWordsWithSpace; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffLines = line.diffLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffTrimmedLines = line.diffTrimmedLines; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffSentences = sentence.diffSentences; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffCss = css.diffCss; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffJson = json.diffJson; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + diffArrays = array.diffArrays; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + structuredPatch = create.structuredPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createTwoFilesPatch = create.createTwoFilesPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + createPatch = create.createPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatch = apply.applyPatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + applyPatches = apply.applyPatches; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + parsePatch = parse.parsePatch; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + convertChangesToDMP = dmp.convertChangesToDMP; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + convertChangesToXML = xml.convertChangesToXML; + /*istanbul ignore start*/ + + exports. + /*istanbul ignore end*/ + canonicalize = json.canonicalize; + /* See LICENSE file for terms of use */ + + /* + * Text diff implementation. + * + * This library supports the following APIS: + * JsDiff.diffChars: Character by character diff + * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace + * JsDiff.diffLines: Line based diff + * + * JsDiff.diffCss: Diff targeted at CSS content + * + * These methods are based on the implementation proposed in + * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). + * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 + */ +}); +unwrapExports(lib); + +var _shim_fs = {}; + +var _shim_fs$1 = Object.freeze({ + default: _shim_fs +}); + +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ +var normalizePath = function normalizePath(path, stripTrailing) { + if (typeof path !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path === '\\' || path === '/') return '/'; + var len = path.length; + if (len <= 1) return path; // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + + var prefix = ''; + + if (len > 4 && path[3] === '\\') { + var ch = path[2]; + + if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { + path = path.slice(2); + prefix = '//'; + } + } + + var segs = path.split(/[/\\]+/); + + if (stripTrailing !== false && segs[segs.length - 1] === '') { + segs.pop(); + } + + return prefix + segs.join('/'); +}; + +var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}; + +var lookup = []; +var revLookup = []; +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; +var inited = false; + +function init() { + inited = true; + var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; + } + + revLookup['-'.charCodeAt(0)] = 62; + revLookup['_'.charCodeAt(0)] = 63; +} + +function toByteArray(b64) { + if (!inited) { + init(); + } + + var i, j, l, tmp, placeHolders, arr; + var len = b64.length; + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4'); + } // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + + + placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; // base64 is 4/3 + up to two characters of the original data + + arr = new Arr(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars + + l = placeHolders > 0 ? len - 4 : len; + var L = 0; + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)]; + arr[L++] = tmp >> 16 & 0xFF; + arr[L++] = tmp >> 8 & 0xFF; + arr[L++] = tmp & 0xFF; + } + + if (placeHolders === 2) { + tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4; + arr[L++] = tmp & 0xFF; + } else if (placeHolders === 1) { + tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2; + arr[L++] = tmp >> 8 & 0xFF; + arr[L++] = tmp & 0xFF; + } + + return arr; +} + +function tripletToBase64(num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; +} + +function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2]; + output.push(tripletToBase64(tmp)); + } + + return output.join(''); +} + +function fromByteArray(uint8) { + if (!inited) { + init(); + } + + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + + var output = ''; + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + // go through the array every three bytes, we'll deal with trailing stuff later + + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength)); + } // pad the end with zeros, but make sure to not forget the extra bytes + + + if (extraBytes === 1) { + tmp = uint8[len - 1]; + output += lookup[tmp >> 2]; + output += lookup[tmp << 4 & 0x3F]; + output += '=='; + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + output += lookup[tmp >> 10]; + output += lookup[tmp >> 4 & 0x3F]; + output += lookup[tmp << 2 & 0x3F]; + output += '='; + } + + parts.push(output); + return parts.join(''); +} + +function read(buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? nBytes - 1 : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + i += d; + e = s & (1 << -nBits) - 1; + s >>= -nBits; + nBits += eLen; + + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : (s ? -1 : 1) * Infinity; + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); +} +function write(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; + var i = isLE ? 0 : nBytes - 1; + var d = isLE ? 1 : -1; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = e << mLen | m; + eLen += mLen; + + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; +} + +var toString = {}.toString; +var isArray$1 = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/* eslint-disable no-proto */ + +var INSPECT_MAX_BYTES = 50; +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ + +Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined ? global$1.TYPED_ARRAY_SUPPORT : true; +function kMaxLength() { + return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff; +} + +function createBuffer(that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length'); + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length); + that.__proto__ = Buffer.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length); + } + + that.length = length; + } + + return that; +} +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + + +function Buffer(arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length); + } // Common case. + + + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error('If encoding is specified then the first argument must be a string'); + } + + return allocUnsafe(this, arg); + } + + return from(this, arg, encodingOrOffset, length); +} +Buffer.poolSize = 8192; // not used by this implementation +// TODO: Legacy, not needed anymore. Remove in next major version. + +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype; + return arr; +}; + +function from(that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number'); + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length); + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset); + } + + return fromObject(that, value); +} +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ + + +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length); +}; + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype; + Buffer.__proto__ = Uint8Array; + + if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + // Object.defineProperty(Buffer, Symbol.species, { + // value: null, + // configurable: true + // }) + } +} + +function assertSize(size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number'); + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative'); + } +} + +function alloc(that, size, fill, encoding) { + assertSize(size); + + if (size <= 0) { + return createBuffer(that, size); + } + + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill); + } + + return createBuffer(that, size); +} +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ + + +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding); +}; + +function allocUnsafe(that, size) { + assertSize(size); + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); + + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0; + } + } + + return that; +} +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ + + +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size); +}; +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ + + +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size); +}; + +function fromString(that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding'); + } + + var length = byteLength(string, encoding) | 0; + that = createBuffer(that, length); + var actual = that.write(string, encoding); + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual); + } + + return that; +} + +function fromArrayLike(that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + that = createBuffer(that, length); + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255; + } + + return that; +} + +function fromArrayBuffer(that, array, byteOffset, length) { + array.byteLength; // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds'); + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds'); + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array); + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset); + } else { + array = new Uint8Array(array, byteOffset, length); + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array; + that.__proto__ = Buffer.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array); + } + + return that; +} + +function fromObject(that, obj) { + if (internalIsBuffer(obj)) { + var len = checked(obj.length) | 0; + that = createBuffer(that, len); + + if (that.length === 0) { + return that; + } + + obj.copy(that, 0, 0, len); + return that; + } + + if (obj) { + if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0); + } + + return fromArrayLike(that, obj); + } + + if (obj.type === 'Buffer' && isArray$1(obj.data)) { + return fromArrayLike(that, obj.data); + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'); +} + +function checked(length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes'); + } + + return length | 0; +} + + +Buffer.isBuffer = isBuffer; + +function internalIsBuffer(b) { + return !!(b != null && b._isBuffer); +} + +Buffer.compare = function compare(a, b) { + if (!internalIsBuffer(a) || !internalIsBuffer(b)) { + throw new TypeError('Arguments must be Buffers'); + } + + if (a === b) return 0; + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; +}; + +Buffer.isEncoding = function isEncoding(encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true; + + default: + return false; + } +}; + +Buffer.concat = function concat(list, length) { + if (!isArray$1(list)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + + if (list.length === 0) { + return Buffer.alloc(0); + } + + var i; + + if (length === undefined) { + length = 0; + + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + + var buffer = Buffer.allocUnsafe(length); + var pos = 0; + + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + + if (!internalIsBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + + buf.copy(buffer, pos); + pos += buf.length; + } + + return buffer; +}; + +function byteLength(string, encoding) { + if (internalIsBuffer(string)) { + return string.length; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength; + } + + if (typeof string !== 'string') { + string = '' + string; + } + + var len = string.length; + if (len === 0) return 0; // Use a for loop to avoid recursion + + var loweredCase = false; + + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len; + + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length; + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2; + + case 'hex': + return len >>> 1; + + case 'base64': + return base64ToBytes(string).length; + + default: + if (loweredCase) return utf8ToBytes(string).length; // assume utf8 + + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +} + +Buffer.byteLength = byteLength; + +function slowToString(encoding, start, end) { + var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + + if (start === undefined || start < 0) { + start = 0; + } // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + + + if (start > this.length) { + return ''; + } + + if (end === undefined || end > this.length) { + end = this.length; + } + + if (end <= 0) { + return ''; + } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + + + end >>>= 0; + start >>>= 0; + + if (end <= start) { + return ''; + } + + if (!encoding) encoding = 'utf8'; + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end); + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end); + + case 'ascii': + return asciiSlice(this, start, end); + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end); + + case 'base64': + return base64Slice(this, start, end); + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end); + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); + encoding = (encoding + '').toLowerCase(); + loweredCase = true; + } + } +} // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. + + +Buffer.prototype._isBuffer = true; + +function swap(b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; +} + +Buffer.prototype.swap16 = function swap16() { + var len = this.length; + + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits'); + } + + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + + return this; +}; + +Buffer.prototype.swap32 = function swap32() { + var len = this.length; + + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits'); + } + + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + + return this; +}; + +Buffer.prototype.swap64 = function swap64() { + var len = this.length; + + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits'); + } + + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + + return this; +}; + +Buffer.prototype.toString = function toString() { + var length = this.length | 0; + if (length === 0) return ''; + if (arguments.length === 0) return utf8Slice(this, 0, length); + return slowToString.apply(this, arguments); +}; + +Buffer.prototype.equals = function equals(b) { + if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer'); + if (this === b) return true; + return Buffer.compare(this, b) === 0; +}; + +Buffer.prototype.inspect = function inspect() { + var str = ''; + var max = INSPECT_MAX_BYTES; + + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); + if (this.length > max) str += ' ... '; + } + + return ''; +}; + +Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { + if (!internalIsBuffer(target)) { + throw new TypeError('Argument must be a Buffer'); + } + + if (start === undefined) { + start = 0; + } + + if (end === undefined) { + end = target ? target.length : 0; + } + + if (thisStart === undefined) { + thisStart = 0; + } + + if (thisEnd === undefined) { + thisEnd = this.length; + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index'); + } + + if (thisStart >= thisEnd && start >= end) { + return 0; + } + + if (thisStart >= thisEnd) { + return -1; + } + + if (start >= end) { + return 1; + } + + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + if (this === target) return 0; + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; +}; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf + + +function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1; // Normalize byteOffset + + if (typeof byteOffset === 'string') { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + + byteOffset = +byteOffset; // Coerce to Number. + + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : buffer.length - 1; + } // Normalize byteOffset: negative offsets start from the end of the buffer + + + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + + if (byteOffset >= buffer.length) { + if (dir) return -1;else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0;else return -1; + } // Normalize val + + + if (typeof val === 'string') { + val = Buffer.from(val, encoding); + } // Finally, search either indexOf (if dir is true) or lastIndexOf + + + if (internalIsBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1; + } + + return arrayIndexOf(buffer, val, byteOffset, encoding, dir); + } else if (typeof val === 'number') { + val = val & 0xFF; // Search for a byte value [0-255] + + if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); + } + } + + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); + } + + throw new TypeError('val must be string, number or Buffer'); +} + +function arrayIndexOf(arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + + if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1; + } + + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + + function read$$1(buf, i) { + if (indexSize === 1) { + return buf[i]; + } else { + return buf.readUInt16BE(i * indexSize); + } + } + + var i; + + if (dir) { + var foundIndex = -1; + + for (i = byteOffset; i < arrLength; i++) { + if (read$$1(arr, i) === read$$1(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + + for (i = byteOffset; i >= 0; i--) { + var found = true; + + for (var j = 0; j < valLength; j++) { + if (read$$1(arr, i + j) !== read$$1(val, j)) { + found = false; + break; + } + } + + if (found) return i; + } + } + + return -1; +} + +Buffer.prototype.includes = function includes(val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1; +}; + +Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true); +}; + +Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false); +}; + +function hexWrite(buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + + if (!length) { + length = remaining; + } else { + length = Number(length); + + if (length > remaining) { + length = remaining; + } + } // must be an even number of digits + + + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string'); + + if (length > strLen / 2) { + length = strLen / 2; + } + + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (isNaN(parsed)) return i; + buf[offset + i] = parsed; + } + + return i; +} + +function utf8Write(buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); +} + +function asciiWrite(buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length); +} + +function latin1Write(buf, string, offset, length) { + return asciiWrite(buf, string, offset, length); +} + +function base64Write(buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length); +} + +function ucs2Write(buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); +} + +Buffer.prototype.write = function write$$1(string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8'; + length = this.length; + offset = 0; // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset; + length = this.length; + offset = 0; // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0; + + if (isFinite(length)) { + length = length | 0; + if (encoding === undefined) encoding = 'utf8'; + } else { + encoding = length; + length = undefined; + } // legacy write(string, encoding, offset, length) - remove in v0.13 + + } else { + throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); + } + + var remaining = this.length - offset; + if (length === undefined || length > remaining) length = remaining; + + if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds'); + } + + if (!encoding) encoding = 'utf8'; + var loweredCase = false; + + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length); + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length); + + case 'ascii': + return asciiWrite(this, string, offset, length); + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length); + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length); + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length); + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +}; + +Buffer.prototype.toJSON = function toJSON() { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + }; +}; + +function base64Slice(buf, start, end) { + if (start === 0 && end === buf.length) { + return fromByteArray(buf); + } else { + return fromByteArray(buf.slice(start, end)); + } +} + +function utf8Slice(buf, start, end) { + end = Math.min(buf.length, end); + var res = []; + var i = start; + + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + + break; + + case 2: + secondByte = buf[i + 1]; + + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F; + + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint; + } + } + + break; + + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F; + + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint; + } + } + + break; + + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F; + + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint; + } + } + + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD; + bytesPerSequence = 1; + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000; + res.push(codePoint >>> 10 & 0x3FF | 0xD800); + codePoint = 0xDC00 | codePoint & 0x3FF; + } + + res.push(codePoint); + i += bytesPerSequence; + } + + return decodeCodePointsArray(res); +} // Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety + + +var MAX_ARGUMENTS_LENGTH = 0x1000; + +function decodeCodePointsArray(codePoints) { + var len = codePoints.length; + + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints); // avoid extra slice() + } // Decode in chunks to avoid "call stack size exceeded". + + + var res = ''; + var i = 0; + + while (i < len) { + res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); + } + + return res; +} + +function asciiSlice(buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F); + } + + return ret; +} + +function latin1Slice(buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + + return ret; +} + +function hexSlice(buf, start, end) { + var len = buf.length; + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; + var out = ''; + + for (var i = start; i < end; ++i) { + out += toHex(buf[i]); + } + + return out; +} + +function utf16leSlice(buf, start, end) { + var bytes = buf.slice(start, end); + var res = ''; + + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + + return res; +} + +Buffer.prototype.slice = function slice(start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; + } + + if (end < start) end = start; + var newBuf; + + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end); + newBuf.__proto__ = Buffer.prototype; + } else { + var sliceLen = end - start; + newBuf = new Buffer(sliceLen, undefined); + + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start]; + } + } + + return newBuf; +}; +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ + + +function checkOffset(offset, ext, length) { + if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); +} + +Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var val = this[offset]; + var mul = 1; + var i = 0; + + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + return val; +}; + +Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + checkOffset(offset, byteLength, this.length); + } + + var val = this[offset + --byteLength]; + var mul = 1; + + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; + } + + return val; +}; + +Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset]; +}; + +Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | this[offset + 1] << 8; +}; + +Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] << 8 | this[offset + 1]; +}; + +Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000; +}; + +Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); +}; + +Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var val = this[offset]; + var mul = 1; + var i = 0; + + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + mul *= 0x80; + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + return val; +}; + +Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; + } + + mul *= 0x80; + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + return val; +}; + +Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 0x80)) return this[offset]; + return (0xff - this[offset] + 1) * -1; +}; + +Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | this[offset + 1] << 8; + return val & 0x8000 ? val | 0xFFFF0000 : val; +}; + +Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | this[offset] << 8; + return val & 0x8000 ? val | 0xFFFF0000 : val; +}; + +Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; +}; + +Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; +}; + +Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, true, 23, 4); +}; + +Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, false, 23, 4); +}; + +Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, true, 52, 8); +}; + +Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, false, 52, 8); +}; + +function checkInt(buf, value, offset, ext, max, min) { + if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); + if (offset + ext > buf.length) throw new RangeError('Index out of range'); +} + +Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var mul = 1; + var i = 0; + this[offset] = value & 0xFF; + + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = value / mul & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xFF; + + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = value / mul & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + this[offset] = value & 0xff; + return offset + 1; +}; + +function objectWriteUInt16(buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1; + + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8; + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + } else { + objectWriteUInt16(this, value, offset, true); + } + + return offset + 2; +}; + +Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + } else { + objectWriteUInt16(this, value, offset, false); + } + + return offset + 2; +}; + +function objectWriteUInt32(buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1; + + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff; + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = value >>> 24; + this[offset + 2] = value >>> 16; + this[offset + 1] = value >>> 8; + this[offset] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, true); + } + + return offset + 4; +}; + +Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, false); + } + + return offset + 4; +}; + +Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xFF; + + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + + this[offset + i] = (value / mul >> 0) - sub & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xFF; + + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + + this[offset + i] = (value / mul >> 0) - sub & 0xFF; + } + + return offset + byteLength; +}; + +Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (value < 0) value = 0xff + value + 1; + this[offset] = value & 0xff; + return offset + 1; +}; + +Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + } else { + objectWriteUInt16(this, value, offset, true); + } + + return offset + 2; +}; + +Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + } else { + objectWriteUInt16(this, value, offset, false); + } + + return offset + 2; +}; + +Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + this[offset + 2] = value >>> 16; + this[offset + 3] = value >>> 24; + } else { + objectWriteUInt32(this, value, offset, true); + } + + return offset + 4; +}; + +Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, false); + } + + return offset + 4; +}; + +function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range'); + if (offset < 0) throw new RangeError('Index out of range'); +} + +function writeFloat(buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38); + } + + write(buf, value, offset, littleEndian, 23, 4); + return offset + 4; +} + +Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert); +}; + +Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert); +}; + +function writeDouble(buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308); + } + + write(buf, value, offset, littleEndian, 52, 8); + return offset + 8; +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert); +}; + +Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert); +}; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) + + +Buffer.prototype.copy = function copy(target, targetStart, start, end) { + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done + + if (end === start) return 0; + if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions + + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds'); + } + + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds'); + if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob? + + if (end > this.length) end = this.length; + + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + + var len = end - start; + var i; + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart); + } + + return len; +}; // Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) + + +Buffer.prototype.fill = function fill(val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === 'string') { + encoding = end; + end = this.length; + } + + if (val.length === 1) { + var code = val.charCodeAt(0); + + if (code < 256) { + val = code; + } + } + + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string'); + } + + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding); + } + } else if (typeof val === 'number') { + val = val & 255; + } // Invalid ranges are not set to a default, so can range check early. + + + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index'); + } + + if (end <= start) { + return this; + } + + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + if (!val) val = 0; + var i; + + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()); + var len = bytes.length; + + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + + return this; +}; // HELPER FUNCTIONS +// ================ + + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; + +function base64clean(str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' + + if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + + while (str.length % 4 !== 0) { + str = str + '='; + } + + return str; +} + +function stringtrim(str) { + if (str.trim) return str.trim(); + return str.replace(/^\s+|\s+$/g, ''); +} + +function toHex(n) { + if (n < 16) return '0' + n.toString(16); + return n.toString(16); +} + +function utf8ToBytes(string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); // is surrogate component + + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue; + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue; + } // valid lead + + + leadSurrogate = codePoint; + continue; + } // 2 leads in a row + + + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + leadSurrogate = codePoint; + continue; + } // valid surrogate pair + + + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + } + + leadSurrogate = null; // encode utf8 + + if (codePoint < 0x80) { + if ((units -= 1) < 0) break; + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break; + bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break; + bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break; + bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); + } else { + throw new Error('Invalid code point'); + } + } + + return bytes; +} + +function asciiToBytes(str) { + var byteArray = []; + + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF); + } + + return byteArray; +} + +function utf16leToBytes(str, units) { + var c, hi, lo; + var byteArray = []; + + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break; + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + + return byteArray; +} + +function base64ToBytes(str) { + return toByteArray(base64clean(str)); +} + +function blitBuffer(src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if (i + offset >= dst.length || i >= src.length) break; + dst[i + offset] = src[i]; + } + + return i; +} + +function isnan(val) { + return val !== val; // eslint-disable-line no-self-compare +} // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually + + +function isBuffer(obj) { + return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)); +} + +function isFastBuffer(obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj); +} // For Node v0.10 support. Remove this eventually. + + +function isSlowBuffer(obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)); +} + +var fs = ( _shim_fs$1 && _shim_fs ) || _shim_fs$1; + +/** + * @class + */ + + +var LineByLine = +/*#__PURE__*/ +function () { + function LineByLine(file, options) { + _classCallCheck(this, LineByLine); + + options = options || {}; + if (!options.readChunk) options.readChunk = 1024; + + if (!options.newLineCharacter) { + options.newLineCharacter = 0x0a; //linux line ending + } else { + options.newLineCharacter = options.newLineCharacter.charCodeAt(0); + } + + if (typeof file === 'number') { + this.fd = file; + } else { + this.fd = fs.openSync(file, 'r'); + } + + this.options = options; + this.newLineCharacter = options.newLineCharacter; + this.reset(); + } + + _createClass(LineByLine, [{ + key: "_searchInBuffer", + value: function _searchInBuffer(buffer, hexNeedle) { + var found = -1; + + for (var i = 0; i <= buffer.length; i++) { + var b_byte = buffer[i]; + + if (b_byte === hexNeedle) { + found = i; + break; + } + } + + return found; + } + }, { + key: "reset", + value: function reset() { + this.eofReached = false; + this.linesCache = []; + this.fdPosition = 0; + } + }, { + key: "close", + value: function close() { + fs.closeSync(this.fd); + this.fd = null; + } + }, { + key: "_extractLines", + value: function _extractLines(buffer) { + var line; + var lines = []; + var bufferPosition = 0; + var lastNewLineBufferPosition = 0; + + while (true) { + var bufferPositionValue = buffer[bufferPosition++]; + + if (bufferPositionValue === this.newLineCharacter) { + line = buffer.slice(lastNewLineBufferPosition, bufferPosition); + lines.push(line); + lastNewLineBufferPosition = bufferPosition; + } else if (!bufferPositionValue) { + break; + } + } + + var leftovers = buffer.slice(lastNewLineBufferPosition, bufferPosition); + + if (leftovers.length) { + lines.push(leftovers); + } + + return lines; + } + }, { + key: "_readChunk", + value: function _readChunk(lineLeftovers) { + var totalBytesRead = 0; + var bytesRead; + var buffers = []; + + do { + var readBuffer = new Buffer(this.options.readChunk); + bytesRead = fs.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition); + totalBytesRead = totalBytesRead + bytesRead; + this.fdPosition = this.fdPosition + bytesRead; + buffers.push(readBuffer); + } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1); + + var bufferData = Buffer.concat(buffers); + + if (bytesRead < this.options.readChunk) { + this.eofReached = true; + bufferData = bufferData.slice(0, totalBytesRead); + } + + if (totalBytesRead) { + this.linesCache = this._extractLines(bufferData); + + if (lineLeftovers) { + this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]); + } + } + + return totalBytesRead; + } + }, { + key: "next", + value: function next() { + if (!this.fd) return false; + var line = false; + + if (this.eofReached && this.linesCache.length === 0) { + return line; + } + + var bytesRead; + + if (!this.linesCache.length) { + bytesRead = this._readChunk(); + } + + if (this.linesCache.length) { + line = this.linesCache.shift(); + var lastLineCharacter = line[line.length - 1]; + + if (lastLineCharacter !== 0x0a) { + bytesRead = this._readChunk(line); + + if (bytesRead) { + line = this.linesCache.shift(); + } + } + } + + if (this.eofReached && this.linesCache.length === 0) { + this.close(); + } + + if (line && line[line.length - 1] === this.newLineCharacter) { + line = line.slice(0, line.length - 1); + } + + return line; + } + }]); + + return LineByLine; +}(); + +var readlines = LineByLine; + +var ConfigError = +/*#__PURE__*/ +function (_Error) { + _inherits(ConfigError, _Error); + + function ConfigError() { + _classCallCheck(this, ConfigError); + + return _possibleConstructorReturn(this, _getPrototypeOf(ConfigError).apply(this, arguments)); + } + + return ConfigError; +}(_wrapNativeSuper(Error)); + +var DebugError = +/*#__PURE__*/ +function (_Error2) { + _inherits(DebugError, _Error2); + + function DebugError() { + _classCallCheck(this, DebugError); + + return _possibleConstructorReturn(this, _getPrototypeOf(DebugError).apply(this, arguments)); + } + + return DebugError; +}(_wrapNativeSuper(Error)); + +var UndefinedParserError$1 = +/*#__PURE__*/ +function (_Error3) { + _inherits(UndefinedParserError, _Error3); + + function UndefinedParserError() { + _classCallCheck(this, UndefinedParserError); + + return _possibleConstructorReturn(this, _getPrototypeOf(UndefinedParserError).apply(this, arguments)); + } + + return UndefinedParserError; +}(_wrapNativeSuper(Error)); + +var errors = { + ConfigError: ConfigError, + DebugError: DebugError, + UndefinedParserError: UndefinedParserError$1 +}; + +// based off https://github.com/defunctzombie/node-process/blob/master/browser.js + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} + +function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); +} + +var cachedSetTimeout = defaultSetTimout; +var cachedClearTimeout = defaultClearTimeout; + +if (typeof global$1.setTimeout === 'function') { + cachedSetTimeout = setTimeout; +} + +if (typeof global$1.clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; +} + +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } // if setTimeout wasn't available but was latter defined + + + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } +} + +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } // if clearTimeout wasn't available but was latter defined + + + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } +} + +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + + draining = false; + + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + + while (len) { + currentQueue = queue; + queue = []; + + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + + queueIndex = -1; + len = queue.length; + } + + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +function nextTick(fun) { + var args = new Array(arguments.length - 1); + + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + + queue.push(new Item(fun, args)); + + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +} // v8 likes predictible objects + +function Item(fun, array) { + this.fun = fun; + this.array = array; +} + +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; + +var title = 'browser'; +var platform = 'browser'; +var browser = true; +var env = {}; +var argv = []; +var version$2 = ''; // empty string to avoid regexp issues + +var versions = {}; +var release = {}; +var config = {}; + +function noop() {} + +var on = noop; +var addListener = noop; +var once = noop; +var off = noop; +var removeListener = noop; +var removeAllListeners = noop; +var emit = noop; +function binding(name) { + throw new Error('process.binding is not supported'); +} +function cwd() { + return '/'; +} +function chdir(dir) { + throw new Error('process.chdir is not supported'); +} + +function umask() { + return 0; +} // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js + +var performance = global$1.performance || {}; + +var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function () { + return new Date().getTime(); +}; // generate timestamp or delta +// see http://nodejs.org/api/process.html#process_process_hrtime + + +function hrtime(previousTimestamp) { + var clocktime = performanceNow.call(performance) * 1e-3; + var seconds = Math.floor(clocktime); + var nanoseconds = Math.floor(clocktime % 1 * 1e9); + + if (previousTimestamp) { + seconds = seconds - previousTimestamp[0]; + nanoseconds = nanoseconds - previousTimestamp[1]; + + if (nanoseconds < 0) { + seconds--; + nanoseconds += 1e9; + } + } + + return [seconds, nanoseconds]; +} +var startTime = new Date(); +function uptime() { + var currentTime = new Date(); + var dif = currentTime - startTime; + return dif / 1000; +} +var process = { + nextTick: nextTick, + title: title, + browser: browser, + env: env, + argv: argv, + version: version$2, + versions: versions, + on: on, + addListener: addListener, + once: once, + off: off, + removeListener: removeListener, + removeAllListeners: removeAllListeners, + emit: emit, + binding: binding, + cwd: cwd, + chdir: chdir, + umask: umask, + hrtime: hrtime, + platform: platform, + release: release, + config: config, + uptime: uptime +}; + +var semver = createCommonjsModule(function (module, exports) { + exports = module.exports = SemVer; // The debug function is excluded entirely from the minified version. + + /* nomin */ + + var debug; + /* nomin */ + + if (_typeof(process) === 'object' && + /* nomin */ + process.env && + /* nomin */ + process.env.NODE_DEBUG && + /* nomin */ + /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ + debug = function debug() { + /* nomin */ + var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ + + args.unshift('SEMVER'); + /* nomin */ + + console.log.apply(console, args); + /* nomin */ + }; + /* nomin */ + else + /* nomin */ + debug = function debug() {}; // Note: this is the semver.org version of the spec that it implements + // Not necessarily the package version of this code. + + exports.SEMVER_SPEC_VERSION = '2.0.0'; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; // The actual regexps go on exports.re + + var re = exports.re = []; + var src = exports.src = []; + var R = 0; // The following Regular Expressions can be used for tokenizing, + // validating, and parsing SemVer version strings. + // ## Numeric Identifier + // A single `0`, or a non-zero digit followed by zero or more digits. + + var NUMERICIDENTIFIER = R++; + src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; + var NUMERICIDENTIFIERLOOSE = R++; + src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; // ## Non-numeric Identifier + // Zero or more digits, followed by a letter or hyphen, and then zero or + // more letters, digits, or hyphens. + + var NONNUMERICIDENTIFIER = R++; + src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; // ## Main Version + // Three dot-separated numeric identifiers. + + var MAINVERSION = R++; + src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')'; + var MAINVERSIONLOOSE = R++; + src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; // ## Pre-release Version Identifier + // A numeric identifier, or a non-numeric identifier. + + var PRERELEASEIDENTIFIER = R++; + src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')'; + var PRERELEASEIDENTIFIERLOOSE = R++; + src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')'; // ## Pre-release Version + // Hyphen, followed by one or more dot-separated pre-release version + // identifiers. + + var PRERELEASE = R++; + src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + var PRERELEASELOOSE = R++; + src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; // ## Build Metadata Identifier + // Any combination of digits, letters, or hyphens. + + var BUILDIDENTIFIER = R++; + src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; // ## Build Metadata + // Plus sign, followed by one or more period-separated build metadata + // identifiers. + + var BUILD = R++; + src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; // ## Full Version String + // A main version, followed optionally by a pre-release version and + // build metadata. + // Note that the only major, minor, patch, and pre-release sections of + // the version string are capturing groups. The build metadata is not a + // capturing group, because it should not ever be used in version + // comparison. + + var FULL = R++; + var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?'; + src[FULL] = '^' + FULLPLAIN + '$'; // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. + // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty + // common in the npm registry. + + var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?'; + var LOOSE = R++; + src[LOOSE] = '^' + LOOSEPLAIN + '$'; + var GTLT = R++; + src[GTLT] = '((?:<|>)?=?)'; // Something like "2.*" or "1.2.x". + // Note that "x.x" is a valid xRange identifer, meaning "any version" + // Only the first item is strictly required. + + var XRANGEIDENTIFIERLOOSE = R++; + src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; + var XRANGEIDENTIFIER = R++; + src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + var XRANGEPLAIN = R++; + src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGEPLAINLOOSE = R++; + src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?'; + var XRANGE = R++; + src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; + var XRANGELOOSE = R++; + src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; // Tilde ranges. + // Meaning is "reasonably at or greater than" + + var LONETILDE = R++; + src[LONETILDE] = '(?:~>?)'; + var TILDETRIM = R++; + src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; + re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); + var tildeTrimReplace = '$1~'; + var TILDE = R++; + src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; + var TILDELOOSE = R++; + src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; // Caret ranges. + // Meaning is "at least and backwards compatible with" + + var LONECARET = R++; + src[LONECARET] = '(?:\\^)'; + var CARETTRIM = R++; + src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; + re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); + var caretTrimReplace = '$1^'; + var CARET = R++; + src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; + var CARETLOOSE = R++; + src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; // A simple gt/lt/eq thing, or just "" to indicate "any version" + + var COMPARATORLOOSE = R++; + src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; + var COMPARATOR = R++; + src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; // An expression to strip any whitespace between the gtlt and the thing + // it modifies, so that `> 1.2.3` ==> `>1.2.3` + + var COMPARATORTRIM = R++; + src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; // this one has to use the /g flag + + re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); + var comparatorTrimReplace = '$1$2$3'; // Something like `1.2.3 - 1.2.4` + // Note that these all use the loose form, because they'll be + // checked against either the strict or loose comparator form + // later. + + var HYPHENRANGE = R++; + src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$'; + var HYPHENRANGELOOSE = R++; + src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$'; // Star ranges basically just allow anything at all. + + var STAR = R++; + src[STAR] = '(<|>)?=?\\s*\\*'; // Compile to actual regexp objects. + // All are flag-free, unless they were created above with a flag. + + for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) re[i] = new RegExp(src[i]); + } + + exports.parse = parse; + + function parse(version, loose) { + if (version instanceof SemVer) return version; + if (typeof version !== 'string') return null; + if (version.length > MAX_LENGTH) return null; + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } + } + + exports.valid = valid; + + function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; + } + + exports.clean = clean; + + function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; + } + + exports.SemVer = SemVer; + + function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) return version;else version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters'); + if (!(this instanceof SemVer)) return new SemVer(version, loose); + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + if (!m) throw new TypeError('Invalid Version: ' + version); + this.raw = version; // these are actually numbers + + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError('Invalid major version'); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError('Invalid minor version'); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError('Invalid patch version'); // numberify any prerelease numeric ids + + if (!m[4]) this.prerelease = [];else this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + + return id; + }); + this.build = m[5] ? m[5].split('.') : []; + this.format(); + } + + SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) this.version += '-' + this.prerelease.join('.'); + return this.version; + }; + + SemVer.prototype.toString = function () { + return this.version; + }; + + SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); + return this.compareMain(other) || this.comparePre(other); + }; + + SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + + SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); // NOT having a prerelease is > having one + + if (this.prerelease.length && !other.prerelease.length) return -1;else if (!this.prerelease.length && other.prerelease.length) return 1;else if (!this.prerelease.length && !other.prerelease.length) return 0; + var i = 0; + + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) return 0;else if (b === undefined) return 1;else if (a === undefined) return -1;else if (a === b) continue;else return compareIdentifiers(a, b); + } while (++i); + }; // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + + + SemVer.prototype.inc = function (release$$1, identifier) { + switch (release$$1) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + + case 'prerelease': + if (this.prerelease.length === 0) this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + + case 'pre': + if (this.prerelease.length === 0) this.prerelease = [0];else { + var i = this.prerelease.length; + + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0]; + } else this.prerelease = [identifier, 0]; + } + + break; + + default: + throw new Error('invalid increment argument: ' + release$$1); + } + + this.format(); + this.raw = this.version; + return this; + }; + + exports.inc = inc; + + function inc(version, release$$1, loose, identifier) { + if (typeof loose === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release$$1, identifier).version; + } catch (er) { + return null; + } + } + + exports.diff = diff; + + function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre' + key; + } + } + } + + return 'prerelease'; + } + + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } + } + + exports.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : a > b ? 1 : 0; + } + + exports.rcompareIdentifiers = rcompareIdentifiers; + + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + + exports.major = major; + + function major(a, loose) { + return new SemVer(a, loose).major; + } + + exports.minor = minor; + + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + + exports.patch = patch; + + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + + exports.compare = compare; + + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + + exports.compareLoose = compareLoose; + + function compareLoose(a, b) { + return compare(a, b, true); + } + + exports.rcompare = rcompare; + + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + + exports.sort = sort; + + function sort(list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose); + }); + } + + exports.rsort = rsort; + + function rsort(list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose); + }); + } + + exports.gt = gt; + + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + + exports.lt = lt; + + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + + exports.eq = eq; + + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + + exports.neq = neq; + + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + + exports.gte = gte; + + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + + exports.lte = lte; + + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + + exports.cmp = cmp; + + function cmp(a, op, b, loose) { + var ret; + + switch (op) { + case '===': + if (_typeof(a) === 'object') a = a.version; + if (_typeof(b) === 'object') b = b.version; + ret = a === b; + break; + + case '!==': + if (_typeof(a) === 'object') a = a.version; + if (_typeof(b) === 'object') b = b.version; + ret = a !== b; + break; + + case '': + case '=': + case '==': + ret = eq(a, b, loose); + break; + + case '!=': + ret = neq(a, b, loose); + break; + + case '>': + ret = gt(a, b, loose); + break; + + case '>=': + ret = gte(a, b, loose); + break; + + case '<': + ret = lt(a, b, loose); + break; + + case '<=': + ret = lte(a, b, loose); + break; + + default: + throw new TypeError('Invalid operator: ' + op); + } + + return ret; + } + + exports.Comparator = Comparator; + + function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) return comp;else comp = comp.value; + } + + if (!(this instanceof Comparator)) return new Comparator(comp, loose); + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + if (this.semver === ANY) this.value = '';else this.value = this.operator + this.semver.version; + debug('comp', this); + } + + var ANY = {}; + + Comparator.prototype.parse = function (comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + if (!m) throw new TypeError('Invalid comparator: ' + comp); + this.operator = m[1]; + if (this.operator === '=') this.operator = ''; // if it literally is just '>' or '' then allow anything. + + if (!m[2]) this.semver = ANY;else this.semver = new SemVer(m[2], this.loose); + }; + + Comparator.prototype.toString = function () { + return this.value; + }; + + Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.loose); + if (this.semver === ANY) return true; + if (typeof version === 'string') version = new SemVer(version, this.loose); + return cmp(version, this.operator, this.semver, this.loose); + }; + + Comparator.prototype.intersects = function (comp, loose) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, loose); + return satisfies(this.value, rangeTmp, loose); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, loose); + return satisfies(comp.semver, rangeTmp, loose); + } + + var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, loose) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<'); + var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, loose) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>'); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + + exports.Range = Range; + + function Range(range, loose) { + if (range instanceof Range) { + if (range.loose === loose) { + return range; + } else { + return new Range(range.raw, loose); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, loose); + } + + if (!(this instanceof Range)) return new Range(range, loose); + this.loose = loose; // First, split based on boolean or || + + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()); + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); + } + + Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; + }; + + Range.prototype.toString = function () { + return this.range; + }; + + Range.prototype.parseRange = function (range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); // `~ 1.2.3` => `~1.2.3` + + range = range.replace(re[TILDETRIM], tildeTrimReplace); // `^ 1.2.3` => `^1.2.3` + + range = range.replace(re[CARETTRIM], caretTrimReplace); // normalize spaces + + range = range.split(/\s+/).join(' '); // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe); + }); + } + + set = set.map(function (comp) { + return new Comparator(comp, loose); + }); + return set; + }; + + Range.prototype.intersects = function (range, loose) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, loose); + }); + }); + }); + }); + }; // Mostly just for testing and legacy API reasons + + + exports.toComparators = toComparators; + + function toComparators(range, loose) { + return new Range(range, loose).set.map(function (comp) { + return comp.map(function (c) { + return c.value; + }).join(' ').trim().split(' '); + }); + } // comprised of xranges, tildes, stars, and gtlt's at this point. + // already replaced the hyphen ranges + // turn into a set of JUST comparators. + + + function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; + } + + function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; + } // ~, ~> --> * (any, kinda silly) + // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 + // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 + // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 + // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 + // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 + + + function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, loose); + }).join(' '); + } + + function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + debug('tilde return', ret); + return ret; + }); + } // ^ --> * (any, kinda silly) + // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 + // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 + // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 + // ^1.2.3 --> >=1.2.3 <2.0.0 + // ^1.2.0 --> >=1.2.0 <2.0.0 + + + function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, loose); + }).join(' '); + } + + function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) { + if (M === '0') ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') pr = '-' + pr; + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + + if (M === '0') { + if (m === '0') ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0'; + } else ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0'; + } + debug('caret return', ret); + return ret; + }); + } + + function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, loose); + }).join(' '); + } + + function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === '=' && anyX) gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) m = 0; + if (xp) p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) M = +M + 1;else m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + return ret; + }); + } // Because * is AND-ed with everything else in the comparator, + // and '' means "any version", just remove the *s entirely. + + + function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); // Looseness is ignored here. star is always as loose as it gets! + + return comp.trim().replace(re[STAR], ''); + } // This function is passed to string.replace(re[HYPHENRANGE]) + // M, m, patch, prerelease, build + // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 + // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do + // 1.2 - 3.4 => >=1.2.0 <3.5.0 + + + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) from = '';else if (isX(fm)) from = '>=' + fM + '.0.0';else if (isX(fp)) from = '>=' + fM + '.' + fm + '.0';else from = '>=' + from; + if (isX(tM)) to = '';else if (isX(tm)) to = '<' + (+tM + 1) + '.0.0';else if (isX(tp)) to = '<' + tM + '.' + (+tm + 1) + '.0';else if (tpr) to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;else to = '<=' + to; + return (from + ' ' + to).trim(); + } // if ANY of the sets match ALL of its comparators, then pass + + + Range.prototype.test = function (version) { + if (!version) return false; + if (typeof version === 'string') version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) return true; + } + + return false; + }; + + function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } // Version has a -pre, but it's not one of the ones we like. + + + return false; + } + + return true; + } + + exports.satisfies = satisfies; + + function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + + return range.test(version); + } + + exports.maxSatisfying = maxSatisfying; + + function maxSatisfying(versions$$1, range, loose) { + var max = null; + var maxSV = null; + + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + + versions$$1.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, loose) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v; + maxSV = new SemVer(max, loose); + } + } + }); + return max; + } + + exports.minSatisfying = minSatisfying; + + function minSatisfying(versions$$1, range, loose) { + var min = null; + var minSV = null; + + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + + versions$$1.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, loose) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v; + minSV = new SemVer(min, loose); + } + } + }); + return min; + } + + exports.validRange = validRange; + + function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } + } // Determine if version is less than all the versions possible in the range + + + exports.ltr = ltr; + + function ltr(version, range, loose) { + return outside(version, range, '<', loose); + } // Determine if version is greater than all the versions possible in the range. + + + exports.gtr = gtr; + + function gtr(version, range, loose) { + return outside(version, range, '>', loose); + } + + exports.outside = outside; + + function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + var gtfn, ltefn, ltfn, comp, ecomp; + + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } // If it satisifes the range it is not outside + + + if (satisfies(version, range, loose)) { + return false; + } // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + var high = null; + var low = null; + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0'); + } + + high = high || comparator; + low = low || comparator; + + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); // If the edge version comparator has a operator then our version + // isn't outside it + + if (high.operator === comp || high.operator === ecomp) { + return false; + } // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + + + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + + return true; + } + + exports.prerelease = prerelease; + + function prerelease(version, loose) { + var parsed = parse(version, loose); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + + exports.intersects = intersects; + + function intersects(r1, r2, loose) { + r1 = new Range(r1, loose); + r2 = new Range(r2, loose); + return r1.intersects(r2); + } +}); + +var arrayify = function arrayify(object, keyName) { + return Object.keys(object).reduce(function (array, key) { + return array.concat(Object.assign(_defineProperty({}, keyName, key), object[key])); + }, []); +}; + +var dedent_1 = createCommonjsModule(function (module) { + "use strict"; + + function dedent(strings) { + var raw = void 0; + + if (typeof strings === "string") { + // dedent can be used as a plain function + raw = [strings]; + } else { + raw = strings.raw; + } // first, perform interpolation + + + var result = ""; + + for (var i = 0; i < raw.length; i++) { + result += raw[i]. // join lines when there is a suppressed newline + replace(/\\\n[ \t]*/g, ""). // handle escaped backticks + replace(/\\`/g, "`"); + + if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) { + result += arguments.length <= i + 1 ? undefined : arguments[i + 1]; + } + } // now strip indentation + + + var lines = result.split("\n"); + var mindent = null; + lines.forEach(function (l) { + var m = l.match(/^(\s+)\S+/); + + if (m) { + var indent = m[1].length; + + if (!mindent) { + // this is the first indented line + mindent = indent; + } else { + mindent = Math.min(mindent, indent); + } + } + }); + + if (mindent !== null) { + result = lines.map(function (l) { + return l[0] === " " ? l.slice(mindent) : l; + }).join("\n"); + } // dedent eats leading and trailing whitespace too + + + result = result.trim(); // handle escaped newlines at the end to ensure they don't get stripped too + + return result.replace(/\\n/g, "\n"); + } + + { + module.exports = dedent; + } +}); + +function _templateObject6() { + var data = _taggedTemplateLiteral(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]); + + _templateObject6 = function _templateObject6() { + return data; + }; + + return data; +} + +function _templateObject5() { + var data = _taggedTemplateLiteral(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]); + + _templateObject5 = function _templateObject5() { + return data; + }; + + return data; +} + +function _templateObject4() { + var data = _taggedTemplateLiteral(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]); + + _templateObject4 = function _templateObject4() { + return data; + }; + + return data; +} + +function _templateObject3() { + var data = _taggedTemplateLiteral(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = _taggedTemplateLiteral(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = _taggedTemplateLiteral(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +var CATEGORY_CONFIG = "Config"; +var CATEGORY_EDITOR = "Editor"; +var CATEGORY_FORMAT = "Format"; +var CATEGORY_OTHER = "Other"; +var CATEGORY_OUTPUT = "Output"; +var CATEGORY_GLOBAL = "Global"; +var CATEGORY_SPECIAL = "Special"; +/** + * @typedef {Object} OptionInfo + * @property {string} since - available since version + * @property {string} category + * @property {'int' | 'boolean' | 'choice' | 'path'} type + * @property {boolean} array - indicate it's an array of the specified type + * @property {boolean?} deprecated - deprecated since version + * @property {OptionRedirectInfo?} redirect - redirect deprecated option + * @property {string} description + * @property {string?} oppositeDescription - for `false` option + * @property {OptionValueInfo} default + * @property {OptionRangeInfo?} range - for type int + * @property {OptionChoiceInfo?} choices - for type choice + * @property {(value: any) => boolean} exception + * + * @typedef {number | boolean | string} OptionValue + * @typedef {OptionValue | [{ value: OptionValue[] }] | Array<{ since: string, value: OptionValue}>} OptionValueInfo + * + * @typedef {Object} OptionRedirectInfo + * @property {string} option + * @property {OptionValue} value + * + * @typedef {Object} OptionRangeInfo + * @property {number} start - recommended range start + * @property {number} end - recommended range end + * @property {number} step - recommended range step + * + * @typedef {Object} OptionChoiceInfo + * @property {boolean | string} value - boolean for the option that is originally boolean type + * @property {string?} description - undefined if redirect + * @property {string?} since - undefined if available since the first version of the option + * @property {string?} deprecated - deprecated since version + * @property {OptionValueInfo?} redirect - redirect deprecated value + * + * @property {string?} cliName + * @property {string?} cliCategory + * @property {string?} cliDescription + */ + +/** @type {{ [name: string]: OptionInfo } */ + +var options$2 = { + cursorOffset: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: -1, + range: { + start: -1, + end: Infinity, + step: 1 + }, + description: dedent_1(_templateObject()), + cliCategory: CATEGORY_EDITOR + }, + endOfLine: { + since: "1.15.0", + category: CATEGORY_GLOBAL, + type: "choice", + default: "auto", + description: "Which end of line characters to apply.", + choices: [{ + value: "auto", + description: dedent_1(_templateObject2()) + }, { + value: "lf", + description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" + }, { + value: "crlf", + description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" + }, { + value: "cr", + description: "Carriage Return character only (\\r), used very rarely" + }] + }, + filepath: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "path", + description: "Specify the input filepath. This will be used to do parser inference.", + cliName: "stdin-filepath", + cliCategory: CATEGORY_OTHER, + cliDescription: "Path to the file to pretend that stdin comes from." + }, + insertPragma: { + since: "1.8.0", + category: CATEGORY_SPECIAL, + type: "boolean", + default: false, + description: "Insert @format pragma into file's first docblock comment.", + cliCategory: CATEGORY_OTHER + }, + parser: { + since: "0.0.10", + category: CATEGORY_GLOBAL, + type: "choice", + default: [{ + since: "0.0.10", + value: "babylon" + }, { + since: "1.13.0", + value: undefined + }], + description: "Which parser to use.", + exception: function exception(value) { + return typeof value === "string" || typeof value === "function"; + }, + choices: [{ + value: "flow", + description: "Flow" + }, { + value: "babylon", + description: "JavaScript" + }, { + value: "typescript", + since: "1.4.0", + description: "TypeScript" + }, { + value: "css", + since: "1.7.1", + description: "CSS" + }, { + value: "postcss", + since: "1.4.0", + description: "CSS/Less/SCSS", + deprecated: "1.7.1", + redirect: "css" + }, { + value: "less", + since: "1.7.1", + description: "Less" + }, { + value: "scss", + since: "1.7.1", + description: "SCSS" + }, { + value: "json", + since: "1.5.0", + description: "JSON" + }, { + value: "json5", + since: "1.13.0", + description: "JSON5" + }, { + value: "json-stringify", + since: "1.13.0", + description: "JSON.stringify" + }, { + value: "graphql", + since: "1.5.0", + description: "GraphQL" + }, { + value: "markdown", + since: "1.8.0", + description: "Markdown" + }, { + value: "mdx", + since: "1.15.0", + description: "MDX" + }, { + value: "vue", + since: "1.10.0", + description: "Vue" + }, { + value: "yaml", + since: "1.14.0", + description: "YAML" + }, { + value: "glimmer", + since: null, + description: "Handlebars" + }, { + value: "html", + since: "1.15.0", + description: "HTML" + }, { + value: "angular", + since: "1.15.0", + description: "Angular" + }] + }, + plugins: { + since: "1.10.0", + type: "path", + array: true, + default: [{ + value: [] + }], + category: CATEGORY_GLOBAL, + description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", + exception: function exception(value) { + return typeof value === "string" || _typeof(value) === "object"; + }, + cliName: "plugin", + cliCategory: CATEGORY_CONFIG + }, + pluginSearchDirs: { + since: "1.13.0", + type: "path", + array: true, + default: [{ + value: [] + }], + category: CATEGORY_GLOBAL, + description: dedent_1(_templateObject3()), + exception: function exception(value) { + return typeof value === "string" || _typeof(value) === "object"; + }, + cliName: "plugin-search-dir", + cliCategory: CATEGORY_CONFIG + }, + printWidth: { + since: "0.0.0", + category: CATEGORY_GLOBAL, + type: "int", + default: 80, + description: "The line length where Prettier will try wrap.", + range: { + start: 0, + end: Infinity, + step: 1 + } + }, + rangeEnd: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: Infinity, + range: { + start: 0, + end: Infinity, + step: 1 + }, + description: dedent_1(_templateObject4()), + cliCategory: CATEGORY_EDITOR + }, + rangeStart: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "int", + default: 0, + range: { + start: 0, + end: Infinity, + step: 1 + }, + description: dedent_1(_templateObject5()), + cliCategory: CATEGORY_EDITOR + }, + requirePragma: { + since: "1.7.0", + category: CATEGORY_SPECIAL, + type: "boolean", + default: false, + description: dedent_1(_templateObject6()), + cliCategory: CATEGORY_OTHER + }, + tabWidth: { + type: "int", + category: CATEGORY_GLOBAL, + default: 2, + description: "Number of spaces per indentation level.", + range: { + start: 0, + end: Infinity, + step: 1 + } + }, + useFlowParser: { + since: "0.0.0", + category: CATEGORY_GLOBAL, + type: "boolean", + default: [{ + since: "0.0.0", + value: false + }, { + since: "1.15.0", + value: undefined + }], + deprecated: "0.0.10", + description: "Use flow parser.", + redirect: { + option: "parser", + value: "flow" + }, + cliName: "flow-parser" + }, + useTabs: { + since: "1.0.0", + category: CATEGORY_GLOBAL, + type: "boolean", + default: false, + description: "Indent with tabs instead of spaces." + } +}; +var coreOptions$1 = { + CATEGORY_CONFIG: CATEGORY_CONFIG, + CATEGORY_EDITOR: CATEGORY_EDITOR, + CATEGORY_FORMAT: CATEGORY_FORMAT, + CATEGORY_OTHER: CATEGORY_OTHER, + CATEGORY_OUTPUT: CATEGORY_OUTPUT, + CATEGORY_GLOBAL: CATEGORY_GLOBAL, + CATEGORY_SPECIAL: CATEGORY_SPECIAL, + options: options$2 +}; + +var require$$0 = ( _package$1 && _package ) || _package$1; + +var currentVersion = require$$0.version; +var coreOptions = coreOptions$1.options; + +function getSupportInfo$2(version, opts) { + opts = Object.assign({ + plugins: [], + showUnreleased: false, + showDeprecated: false, + showInternal: false + }, opts); + + if (!version) { + // pre-release version is smaller than the normal version in semver, + // we need to treat it as the normal one so as to test new features. + version = currentVersion.split("-", 1)[0]; + } + + var plugins = opts.plugins; + var options = arrayify(Object.assign(plugins.reduce(function (currentOptions, plugin) { + return Object.assign(currentOptions, plugin.options); + }, {}), coreOptions), "name").sort(function (a, b) { + return a.name === b.name ? 0 : a.name < b.name ? -1 : 1; + }).filter(filterSince).filter(filterDeprecated).map(mapDeprecated).map(mapInternal).map(function (option) { + var newOption = Object.assign({}, option); + + if (Array.isArray(newOption.default)) { + newOption.default = newOption.default.length === 1 ? newOption.default[0].value : newOption.default.filter(filterSince).sort(function (info1, info2) { + return semver.compare(info2.since, info1.since); + })[0].value; + } + + if (Array.isArray(newOption.choices)) { + newOption.choices = newOption.choices.filter(filterSince).filter(filterDeprecated).map(mapDeprecated); + } + + return newOption; + }).map(function (option) { + var filteredPlugins = plugins.filter(function (plugin) { + return plugin.defaultOptions && plugin.defaultOptions[option.name]; + }); + var pluginDefaults = filteredPlugins.reduce(function (reduced, plugin) { + reduced[plugin.name] = plugin.defaultOptions[option.name]; + return reduced; + }, {}); + return Object.assign(option, { + pluginDefaults: pluginDefaults + }); + }); + var usePostCssParser = semver.lt(version, "1.7.1"); + var languages = plugins.reduce(function (all, plugin) { + return all.concat(plugin.languages || []); + }, []).filter(filterSince).map(function (language) { + // Prevent breaking changes + if (language.name === "Markdown") { + return Object.assign({}, language, { + parsers: ["markdown"] + }); + } + + if (language.name === "TypeScript") { + return Object.assign({}, language, { + parsers: ["typescript"] + }); + } + + if (usePostCssParser && (language.name === "CSS" || language.group === "CSS")) { + return Object.assign({}, language, { + parsers: ["postcss"] + }); + } + + return language; + }); + return { + languages: languages, + options: options + }; + + function filterSince(object) { + return opts.showUnreleased || !("since" in object) || object.since && semver.gte(version, object.since); + } + + function filterDeprecated(object) { + return opts.showDeprecated || !("deprecated" in object) || object.deprecated && semver.lt(version, object.deprecated); + } + + function mapDeprecated(object) { + if (!object.deprecated || opts.showDeprecated) { + return object; + } + + var newObject = Object.assign({}, object); + delete newObject.deprecated; + delete newObject.redirect; + return newObject; + } + + function mapInternal(object) { + if (opts.showInternal) { + return object; + } + + var newObject = Object.assign({}, object); + delete newObject.cliName; + delete newObject.cliCategory; + delete newObject.cliDescription; + return newObject; + } +} + +var support = { + getSupportInfo: getSupportInfo$2 +}; + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +/* global Reflect, Promise */ +var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (b.hasOwnProperty(p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); +}; + +function __extends(d, b) { + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var _assign = function __assign() { + _assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + } + + return t; + }; + + return _assign.apply(this, arguments); +}; + +function __rest(s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) { + if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + } + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function (target, key) { + decorator(target, key, paramIndex); + }; +} +function __metadata(metadataKey, metadataValue) { + if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : new P(function (resolve) { + resolve(result.value); + }).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } +} +function __exportStar(m, exports) { + for (var p in m) { + if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } +} +function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], + i = 0; + if (m) return m.call(o); + return { + next: function next() { + if (o && i >= o.length) o = void 0; + return { + value: o && o[i++], + done: !o + }; + } + }; +} +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +} +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(__read(arguments[i])); + } + + return ar; +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), + i, + q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i; + + function verb(n) { + if (g[n]) i[n] = function (v) { + return new Promise(function (a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + + function fulfill(value) { + resume("next", value); + } + + function reject(value) { + resume("throw", value); + } + + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function () { + return this; + }, i; + + function verb(n, f) { + i[n] = o[n] ? function (v) { + return (p = !p) ? { + value: __await(o[n](v)), + done: n === "return" + } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], + i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { + return this; + }, i); + + function verb(n) { + i[n] = o[n] && function (v) { + return new Promise(function (resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function (v) { + resolve({ + value: v, + done: d + }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { + value: raw + }); + } else { + cooked.raw = raw; + } + + return cooked; +} + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) { + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result.default = mod; + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; +} + +var tslib_1 = Object.freeze({ + __extends: __extends, + get __assign () { return _assign; }, + __rest: __rest, + __decorate: __decorate, + __param: __param, + __metadata: __metadata, + __awaiter: __awaiter, + __generator: __generator, + __exportStar: __exportStar, + __values: __values, + __read: __read, + __spread: __spread, + __await: __await, + __asyncGenerator: __asyncGenerator, + __asyncDelegator: __asyncDelegator, + __asyncValues: __asyncValues, + __makeTemplateObject: __makeTemplateObject, + __importStar: __importStar, + __importDefault: __importDefault +}); + +var api = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.apiDescriptor = { + key: function key(_key) { + return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(_key) ? _key : JSON.stringify(_key); + }, + value: function value(_value) { + if (_value === null || _typeof(_value) !== 'object') { + return JSON.stringify(_value); + } + + if (Array.isArray(_value)) { + return "[".concat(_value.map(function (subValue) { + return exports.apiDescriptor.value(subValue); + }).join(', '), "]"); + } + + var keys = Object.keys(_value); + return keys.length === 0 ? '{}' : "{ ".concat(keys.map(function (key) { + return "".concat(exports.apiDescriptor.key(key), ": ").concat(exports.apiDescriptor.value(_value[key])); + }).join(', '), " }"); + }, + pair: function pair(_ref) { + var key = _ref.key, + value = _ref.value; + return exports.apiDescriptor.value(_defineProperty({}, key, value)); + } + }; +}); +unwrapExports(api); + +var descriptors = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(api, exports); +}); +unwrapExports(descriptors); + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +var escapeStringRegexp = function escapeStringRegexp(str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +var colorName = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + +var conversions = createCommonjsModule(function (module) { + /* MIT license */ + // NOTE: conversions should only return primitive values (i.e. arrays, or + // values that give correct `typeof` results). + // do not use box values types (i.e. Number(), String(), etc.) + var reverseKeywords = {}; + + for (var key in colorName) { + if (colorName.hasOwnProperty(key)) { + reverseKeywords[colorName[key]] = key; + } + } + + var convert = module.exports = { + rgb: { + channels: 3, + labels: 'rgb' + }, + hsl: { + channels: 3, + labels: 'hsl' + }, + hsv: { + channels: 3, + labels: 'hsv' + }, + hwb: { + channels: 3, + labels: 'hwb' + }, + cmyk: { + channels: 4, + labels: 'cmyk' + }, + xyz: { + channels: 3, + labels: 'xyz' + }, + lab: { + channels: 3, + labels: 'lab' + }, + lch: { + channels: 3, + labels: 'lch' + }, + hex: { + channels: 1, + labels: ['hex'] + }, + keyword: { + channels: 1, + labels: ['keyword'] + }, + ansi16: { + channels: 1, + labels: ['ansi16'] + }, + ansi256: { + channels: 1, + labels: ['ansi256'] + }, + hcg: { + channels: 3, + labels: ['h', 'c', 'g'] + }, + apple: { + channels: 3, + labels: ['r16', 'g16', 'b16'] + }, + gray: { + channels: 1, + labels: ['gray'] + } + }; // hide .channels and .labels properties + + for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', { + value: channels + }); + Object.defineProperty(convert[model], 'labels', { + value: labels + }); + } + } + + convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; + }; + + convert.rgb.hsv = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var v; + + if (max === 0) { + s = 0; + } else { + s = delta / max * 1000 / 10; + } + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + v = max / 255 * 1000 / 10; + return [h, s, v]; + }; + + convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; + }; + + convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; + }; + /** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ + + + function comparativeDistance(x, y) { + return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); + } + + convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in colorName) { + if (colorName.hasOwnProperty(keyword)) { + var value = colorName[keyword]; // Compute comparative distance + + var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest + + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; + }; + + convert.keyword.rgb = function (keyword) { + return colorName[keyword]; + }; + + convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; // assume sRGB + + r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; + g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; + b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; + var x = r * 0.4124 + g * 0.3576 + b * 0.1805; + var y = r * 0.2126 + g * 0.7152 + b * 0.0722; + var z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; + }; + + convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + + convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + rgb = [0, 0, 0]; + + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; + }; + + convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; + }; + + convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - s * f); + var t = 255 * v * (1 - s * (1 - f)); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + + case 1: + return [q, v, p]; + + case 2: + return [p, v, t]; + + case 3: + return [p, q, v]; + + case 4: + return [t, p, v]; + + case 5: + return [v, p, q]; + } + }; + + convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; + }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb + + + convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; // wh + bl cant be > 1 + + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; + break; + + case 1: + r = n; + g = v; + b = wh; + break; + + case 2: + r = wh; + g = v; + b = n; + break; + + case 3: + r = wh; + g = n; + b = v; + break; + + case 4: + r = n; + g = wh; + b = v; + break; + + case 5: + r = v; + g = wh; + b = n; + break; + } + + return [r * 255, g * 255, b * 255]; + }; + + convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; + }; + + convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.2040 + z * 1.0570; // assume sRGB + + r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92; + g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92; + b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; + }; + + convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + + convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; + }; + + convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + return [l, c, h]; + }; + + convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + return [l, a, b]; + }; + + convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; + }; + + convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); + }; + + convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round((r - 8) / 247 * 24) + 232; + } + + var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; + }; + + convert.ansi16.rgb = function (args) { + var color = args % 10; // handle greyscale + + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = (color & 1) * mult * 255; + var g = (color >> 1 & 1) * mult * 255; + var b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; + }; + + convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = rem % 6 / 5 * 255; + return [r, g, b]; + }; + + convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; + }; + + convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = integer >> 16 & 0xFF; + var g = integer >> 8 & 0xFF; + var b = integer & 0xFF; + return [r, g, b]; + }; + + convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = max - min; + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; + }; + + convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; + }; + + convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; + }; + + convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = h % 1 * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; + } + + mg = (1.0 - c) * g; + return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255]; + }; + + convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; + }; + + convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; + }; + + convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; + }; + + convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; + }; + + convert.apple.rgb = function (apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + + convert.rgb.apple = function (rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + + convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; + }; + + convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; + }; + + convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; + }; + + convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; + }; + + convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; + }; + + convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; + }; + + convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; +}); + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ +// https://jsperf.com/object-keys-vs-for-in-with-closure/3 + +var models$1 = Object.keys(conversions); + +function buildGraph() { + var graph = {}; + + for (var len = models$1.length, i = 0; i < len; i++) { + graph[models$1[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} // https://en.wikipedia.org/wiki/Breadth-first_search + + +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + var cur = graph[toModel].parent; + + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +var route = function route(fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + var models = Object.keys(graph); + + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + +var convert = {}; +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function wrappedFn(args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; // preserve .conversion property if there is one + + + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function wrappedFn(args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + + if (_typeof(result) === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; // preserve .conversion property if there is one + + + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + Object.defineProperty(convert[fromModel], 'channels', { + value: conversions[fromModel].channels + }); + Object.defineProperty(convert[fromModel], 'labels', { + value: conversions[fromModel].labels + }); + var routes = route(fromModel); + var routeModels = Object.keys(routes); + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); +var colorConvert = convert; + +var ansiStyles = createCommonjsModule(function (module) { + 'use strict'; + + var wrapAnsi16 = function wrapAnsi16(fn, offset) { + return function () { + var code = fn.apply(colorConvert, arguments); + return "\x1B[".concat(code + offset, "m"); + }; + }; + + var wrapAnsi256 = function wrapAnsi256(fn, offset) { + return function () { + var code = fn.apply(colorConvert, arguments); + return "\x1B[".concat(38 + offset, ";5;").concat(code, "m"); + }; + }; + + var wrapAnsi16m = function wrapAnsi16m(fn, offset) { + return function () { + var rgb = fn.apply(colorConvert, arguments); + return "\x1B[".concat(38 + offset, ";2;").concat(rgb[0], ";").concat(rgb[1], ";").concat(rgb[2], "m"); + }; + }; + + function assembleStyles() { + var codes = new Map(); + var styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; // Fix humans + + styles.color.grey = styles.color.gray; + + var _arr = Object.keys(styles); + + for (var _i = 0; _i < _arr.length; _i++) { + var groupName = _arr[_i]; + var group = styles[groupName]; + + var _arr3 = Object.keys(group); + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var styleName = _arr3[_i3]; + var style = group[styleName]; + styles[styleName] = { + open: "\x1B[".concat(style[0], "m"), + close: "\x1B[".concat(style[1], "m") + }; + group[styleName] = styles[styleName]; + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } + + var ansi2ansi = function ansi2ansi(n) { + return n; + }; + + var rgb2rgb = function rgb2rgb(r, g, b) { + return [r, g, b]; + }; + + styles.color.close = "\x1B[39m"; + styles.bgColor.close = "\x1B[49m"; + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + var _arr2 = Object.keys(colorConvert); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var key = _arr2[_i2]; + + if (_typeof(colorConvert[key]) !== 'object') { + continue; + } + + var suite = colorConvert[key]; + + if (key === 'ansi16') { + key = 'ansi'; + } + + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + + return styles; + } // Make the export immutable + + + Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles + }); +}); + +var os = { + EOL: "\n" +}; + +var os$1 = Object.freeze({ + default: os +}); + +var hasFlag = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (flag, argv$$1) { + argv$$1 = argv$$1 || process.argv; + var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--'; + var pos = argv$$1.indexOf(prefix + flag); + var terminatorPos = argv$$1.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; +}); + +var require$$1$1 = ( os$1 && os ) || os$1; + +var env$1 = process.env; +var forceColor; + +if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { + forceColor = true; +} + +if ('FORCE_COLOR' in env$1) { + forceColor = env$1.FORCE_COLOR.length === 0 || parseInt(env$1.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level: level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + var min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + var osRelease = require$$1$1.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env$1) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env$1; + }) || env$1.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env$1) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env$1.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env$1) { + var version = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env$1.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env$1.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) { + return 1; + } + + if ('COLORTERM' in env$1) { + return 1; + } + + if (env$1.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + var level = supportsColor(stream); + return translateLevel(level); +} + +var supportsColor_1 = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; + +var templates = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', "\x1B"], ['a', "\x07"]]); + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error("Invalid Chalk template style argument: ".concat(chunk, " (in style '").concat(name, "')")); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error("Unknown Chalk style: ".concat(styleName)); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse: inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = "Chalk template literal is missing ".concat(styles.length, " closing bracket").concat(styles.length === 1 ? '' : 's', " (`}`)"); + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var chalk = createCommonjsModule(function (module) { + 'use strict'; + + var stdoutColor = supportsColor_1.stdout; + var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + + var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + + var skipModels = new Set(['gray']); + var styles = Object.create(null); + + function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; + } + + function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); + } // Use bright blue on Windows as the normal blue color is illegible + + + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = "\x1B[94m"; + } + + var _arr = Object.keys(ansiStyles); + + var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get: function get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; + }; + + for (var _i = 0; _i < _arr.length; _i++) { + _loop(); + } + + styles.visible = { + get: function get() { + return build.call(this, this._styles || [], true, 'visible'); + } + }; + ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + + var _arr2 = Object.keys(ansiStyles.color.ansi); + + var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get: function get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open: open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; + }; + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; + } + + ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + + var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + + var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get: function get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open: open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; + }; + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; + } + + var proto = Object.defineProperties(function () {}, styles); + + function build(_styles, _empty, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + get: function get() { + return self.level; + }, + set: function set(level) { + self.level = level; + } + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get: function get() { + return self.enabled; + }, + set: function set(enabled) { + self.enabled = enabled; + } + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; + } + + function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, "".concat(code.close, "$&").concat(code.open)); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; + } + + function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates(chalk, parts.join('')); + } + + Object.defineProperties(Chalk.prototype, styles); + module.exports = Chalk(); // eslint-disable-line new-cap + + module.exports.supportsColor = stdoutColor; + module.exports.default = module.exports; // For TypeScript +}); + +var common = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.commonDeprecatedHandler = function (keyOrPair, redirectTo, _ref) { + var descriptor = _ref.descriptor; + var messages = ["".concat(chalk.default.yellow(typeof keyOrPair === 'string' ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair)), " is deprecated")]; + + if (redirectTo) { + messages.push("we now treat it as ".concat(chalk.default.blue(typeof redirectTo === 'string' ? descriptor.key(redirectTo) : descriptor.pair(redirectTo)))); + } + + return messages.join('; ') + '.'; + }; +}); +unwrapExports(common); + +var deprecated = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(common, exports); +}); +unwrapExports(deprecated); + +var common$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.commonInvalidHandler = function (key, value, utils) { + return ["Invalid ".concat(chalk.default.red(utils.descriptor.key(key)), " value."), "Expected ".concat(chalk.default.blue(utils.schemas[key].expected(utils)), ","), "but received ".concat(chalk.default.red(utils.descriptor.value(value)), ".")].join(' '); + }; +}); +unwrapExports(common$2); + +var invalid = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(common$2, exports); +}); +unwrapExports(invalid); + +/* eslint-disable no-nested-ternary */ +var arr = []; +var charCodeCache = []; + +var leven$1 = function leven(a, b) { + if (a === b) { + return 0; + } + + var swap = a; // Swapping the strings if `a` is longer than `b` so we know which one is the + // shortest & which one is the longest + + if (a.length > b.length) { + a = b; + b = swap; + } + + var aLen = a.length; + var bLen = b.length; + + if (aLen === 0) { + return bLen; + } + + if (bLen === 0) { + return aLen; + } // Performing suffix trimming: + // We can linearly drop suffix common to both strings since they + // don't increase distance at all + // Note: `~-` is the bitwise way to perform a `- 1` operation + + + while (aLen > 0 && a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen)) { + aLen--; + bLen--; + } + + if (aLen === 0) { + return bLen; + } // Performing prefix trimming + // We can linearly drop prefix common to both strings since they + // don't increase distance at all + + + var start = 0; + + while (start < aLen && a.charCodeAt(start) === b.charCodeAt(start)) { + start++; + } + + aLen -= start; + bLen -= start; + + if (aLen === 0) { + return bLen; + } + + var bCharCode; + var ret; + var tmp; + var tmp2; + var i = 0; + var j = 0; + + while (i < aLen) { + charCodeCache[start + i] = a.charCodeAt(start + i); + arr[i] = ++i; + } + + while (j < bLen) { + bCharCode = b.charCodeAt(start + j); + tmp = j++; + ret = j; + + for (i = 0; i < aLen; i++) { + tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1; + tmp = arr[i]; + ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2; + } + } + + return ret; +}; + +var leven_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.levenUnknownHandler = function (key, value, _ref) { + var descriptor = _ref.descriptor, + logger = _ref.logger, + schemas = _ref.schemas; + var messages = ["Ignored unknown option ".concat(chalk.default.yellow(descriptor.pair({ + key: key, + value: value + })), ".")]; + var suggestion = Object.keys(schemas).sort().find(function (knownKey) { + return leven$1(key, knownKey) < 3; + }); + + if (suggestion) { + messages.push("Did you mean ".concat(chalk.default.blue(descriptor.key(suggestion)), "?")); + } + + logger.warn(messages.join(' ')); + }; +}); +unwrapExports(leven_1); + +var unknown = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(leven_1, exports); +}); +unwrapExports(unknown); + +var handlers = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(deprecated, exports); + + tslib_1.__exportStar(invalid, exports); + + tslib_1.__exportStar(unknown, exports); +}); +unwrapExports(handlers); + +var schema = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + var HANDLER_KEYS = ['default', 'expected', 'validate', 'deprecated', 'forward', 'redirect', 'overlap', 'preprocess', 'postprocess']; + + function createSchema(SchemaConstructor, parameters) { + var schema = new SchemaConstructor(parameters); + var subSchema = Object.create(schema); + + for (var _i = 0; _i < HANDLER_KEYS.length; _i++) { + var handlerKey = HANDLER_KEYS[_i]; + + if (handlerKey in parameters) { + subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length); + } + } + + return subSchema; + } + + exports.createSchema = createSchema; + + var Schema = + /*#__PURE__*/ + function () { + function Schema(parameters) { + _classCallCheck(this, Schema); + + this.name = parameters.name; + } + + _createClass(Schema, [{ + key: "default", + value: function _default(_utils) { + return undefined; + } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length` + + }, { + key: "expected", + value: function expected(_utils) { + return 'nothing'; + } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length` + + }, { + key: "validate", + value: function validate(_value, _utils) { + return false; + } + }, { + key: "deprecated", + value: function deprecated(_value, _utils) { + return false; + } + }, { + key: "forward", + value: function forward(_value, _utils) { + return undefined; + } + }, { + key: "redirect", + value: function redirect(_value, _utils) { + return undefined; + } + }, { + key: "overlap", + value: function overlap(currentValue, _newValue, _utils) { + return currentValue; + } + }, { + key: "preprocess", + value: function preprocess(value, _utils) { + return value; + } + }, { + key: "postprocess", + value: function postprocess(value, _utils) { + return value; + } + }], [{ + key: "create", + value: function create(parameters) { + // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/5863 + return createSchema(this, parameters); + } + }]); + + return Schema; + }(); + + exports.Schema = Schema; + + function normalizeHandler(handler, superSchema, handlerArgumentsLength) { + return typeof handler === 'function' ? function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return handler.apply(void 0, _toConsumableArray(args.slice(0, handlerArgumentsLength - 1)).concat([superSchema], _toConsumableArray(args.slice(handlerArgumentsLength - 1)))); + } : function () { + return handler; + }; + } +}); +unwrapExports(schema); + +var alias = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var AliasSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(AliasSchema, _schema_1$Schema); + + function AliasSchema(parameters) { + var _this; + + _classCallCheck(this, AliasSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(AliasSchema).call(this, parameters)); + _this._sourceName = parameters.sourceName; + return _this; + } + + _createClass(AliasSchema, [{ + key: "expected", + value: function expected(utils) { + return utils.schemas[this._sourceName].expected(utils); + } + }, { + key: "validate", + value: function validate(value, utils) { + return utils.schemas[this._sourceName].validate(value, utils); + } + }, { + key: "redirect", + value: function redirect(_value, _utils) { + return this._sourceName; + } + }]); + + return AliasSchema; + }(schema.Schema); + + exports.AliasSchema = AliasSchema; +}); +unwrapExports(alias); + +var any = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var AnySchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(AnySchema, _schema_1$Schema); + + function AnySchema() { + _classCallCheck(this, AnySchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(AnySchema).apply(this, arguments)); + } + + _createClass(AnySchema, [{ + key: "expected", + value: function expected() { + return 'anything'; + } + }, { + key: "validate", + value: function validate() { + return true; + } + }]); + + return AnySchema; + }(schema.Schema); + + exports.AnySchema = AnySchema; +}); +unwrapExports(any); + +var array$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var ArraySchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(ArraySchema, _schema_1$Schema); + + function ArraySchema(_a) { + var _this; + + _classCallCheck(this, ArraySchema); + + var valueSchema = _a.valueSchema, + _a$name = _a.name, + name = _a$name === void 0 ? valueSchema.name : _a$name, + handlers = tslib_1.__rest(_a, ["valueSchema", "name"]); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ArraySchema).call(this, Object.assign({}, handlers, { + name: name + }))); + _this._valueSchema = valueSchema; + return _this; + } + + _createClass(ArraySchema, [{ + key: "expected", + value: function expected(utils) { + return "an array of ".concat(this._valueSchema.expected(utils)); + } + }, { + key: "validate", + value: function validate(value, utils) { + if (!Array.isArray(value)) { + return false; + } + + var invalidValues = []; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var subValue = _step.value; + var subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue); + + if (subValidateResult !== true) { + invalidValues.push(subValidateResult.value); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return invalidValues.length === 0 ? true : { + value: invalidValues + }; + } + }, { + key: "deprecated", + value: function deprecated(value, utils) { + var deprecatedResult = []; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var subValue = _step2.value; + var subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue); + + if (subDeprecatedResult !== false) { + deprecatedResult.push.apply(deprecatedResult, _toConsumableArray(subDeprecatedResult.map(function (_ref) { + var deprecatedValue = _ref.value; + return { + value: [deprecatedValue] + }; + }))); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return deprecatedResult; + } + }, { + key: "forward", + value: function forward(value, utils) { + var forwardResult = []; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = value[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var subValue = _step3.value; + var subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue); + forwardResult.push.apply(forwardResult, _toConsumableArray(subForwardResult.map(wrapTransferResult))); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + return forwardResult; + } + }, { + key: "redirect", + value: function redirect(value, utils) { + var remain = []; + var redirect = []; + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = value[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var subValue = _step4.value; + var subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue); + + if ('remain' in subRedirectResult) { + remain.push(subRedirectResult.remain); + } + + redirect.push.apply(redirect, _toConsumableArray(subRedirectResult.redirect.map(wrapTransferResult))); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + + return remain.length === 0 ? { + redirect: redirect + } : { + redirect: redirect, + remain: remain + }; + } + }, { + key: "overlap", + value: function overlap(currentValue, newValue) { + return currentValue.concat(newValue); + } + }]); + + return ArraySchema; + }(schema.Schema); + + exports.ArraySchema = ArraySchema; + + function wrapTransferResult(_ref2) { + var from = _ref2.from, + to = _ref2.to; + return { + from: [from], + to: to + }; + } +}); +unwrapExports(array$2); + +var boolean_1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var BooleanSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(BooleanSchema, _schema_1$Schema); + + function BooleanSchema() { + _classCallCheck(this, BooleanSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(BooleanSchema).apply(this, arguments)); + } + + _createClass(BooleanSchema, [{ + key: "expected", + value: function expected() { + return 'true or false'; + } + }, { + key: "validate", + value: function validate(value) { + return typeof value === 'boolean'; + } + }]); + + return BooleanSchema; + }(schema.Schema); + + exports.BooleanSchema = BooleanSchema; +}); +unwrapExports(boolean_1); + +var utils = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + function recordFromArray(array, mainKey) { + var record = Object.create(null); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var value = _step.value; + var key = value[mainKey]; // istanbul ignore next + + if (record[key]) { + throw new Error("Duplicate ".concat(mainKey, " ").concat(JSON.stringify(key))); + } // @ts-ignore + + + record[key] = value; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return record; + } + + exports.recordFromArray = recordFromArray; + + function mapFromArray(array, mainKey) { + var map = new Map(); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = array[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var value = _step2.value; + var key = value[mainKey]; // istanbul ignore next + + if (map.has(key)) { + throw new Error("Duplicate ".concat(mainKey, " ").concat(JSON.stringify(key))); + } + + map.set(key, value); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return map; + } + + exports.mapFromArray = mapFromArray; + + function createAutoChecklist() { + var map = Object.create(null); + return function (id) { + var idString = JSON.stringify(id); + + if (map[idString]) { + return true; + } + + map[idString] = true; + return false; + }; + } + + exports.createAutoChecklist = createAutoChecklist; + + function partition(array, predicate) { + var trueArray = []; + var falseArray = []; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = array[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var value = _step3.value; + + if (predicate(value)) { + trueArray.push(value); + } else { + falseArray.push(value); + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + return [trueArray, falseArray]; + } + + exports.partition = partition; + + function isInt(value) { + return value === Math.floor(value); + } + + exports.isInt = isInt; + + function comparePrimitive(a, b) { + if (a === b) { + return 0; + } + + var typeofA = _typeof(a); + + var typeofB = _typeof(b); + + var orders = ['undefined', 'object', 'boolean', 'number', 'string']; + + if (typeofA !== typeofB) { + return orders.indexOf(typeofA) - orders.indexOf(typeofB); + } + + if (typeofA !== 'string') { + return Number(a) - Number(b); + } + + return a.localeCompare(b); + } + + exports.comparePrimitive = comparePrimitive; + + function normalizeDefaultResult(result) { + return result === undefined ? {} : result; + } + + exports.normalizeDefaultResult = normalizeDefaultResult; + + function normalizeValidateResult(result, value) { + return result === true ? true : result === false ? { + value: value + } : result; + } + + exports.normalizeValidateResult = normalizeValidateResult; + + function normalizeDeprecatedResult(result, value) { + var doNotNormalizeTrue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{ + value: value + }] : 'value' in result ? [result] : result.length === 0 ? false : result; + } + + exports.normalizeDeprecatedResult = normalizeDeprecatedResult; + + function normalizeTransferResult(result, value) { + return typeof result === 'string' || 'key' in result ? { + from: value, + to: result + } : 'from' in result ? { + from: result.from, + to: result.to + } : { + from: value, + to: result.to + }; + } + + exports.normalizeTransferResult = normalizeTransferResult; + + function normalizeForwardResult(result, value) { + return result === undefined ? [] : Array.isArray(result) ? result.map(function (transferResult) { + return normalizeTransferResult(transferResult, value); + }) : [normalizeTransferResult(result, value)]; + } + + exports.normalizeForwardResult = normalizeForwardResult; + + function normalizeRedirectResult(result, value) { + var redirect = normalizeForwardResult(_typeof(result) === 'object' && 'redirect' in result ? result.redirect : result, value); + return redirect.length === 0 ? { + remain: value, + redirect: redirect + } : _typeof(result) === 'object' && 'remain' in result ? { + remain: result.remain, + redirect: redirect + } : { + redirect: redirect + }; + } + + exports.normalizeRedirectResult = normalizeRedirectResult; +}); +unwrapExports(utils); + +var choice = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var ChoiceSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(ChoiceSchema, _schema_1$Schema); + + function ChoiceSchema(parameters) { + var _this; + + _classCallCheck(this, ChoiceSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ChoiceSchema).call(this, parameters)); + _this._choices = utils.mapFromArray(parameters.choices.map(function (choice) { + return choice && _typeof(choice) === 'object' ? choice : { + value: choice + }; + }), 'value'); + return _this; + } + + _createClass(ChoiceSchema, [{ + key: "expected", + value: function expected(_ref) { + var _this2 = this; + + var descriptor = _ref.descriptor; + var choiceValues = Array.from(this._choices.keys()).map(function (value) { + return _this2._choices.get(value); + }).filter(function (choiceInfo) { + return !choiceInfo.deprecated; + }).map(function (choiceInfo) { + return choiceInfo.value; + }).sort(utils.comparePrimitive).map(descriptor.value); + var head = choiceValues.slice(0, -2); + var tail = choiceValues.slice(-2); + return head.concat(tail.join(' or ')).join(', '); + } + }, { + key: "validate", + value: function validate(value) { + return this._choices.has(value); + } + }, { + key: "deprecated", + value: function deprecated(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo && choiceInfo.deprecated ? { + value: value + } : false; + } + }, { + key: "forward", + value: function forward(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo ? choiceInfo.forward : undefined; + } + }, { + key: "redirect", + value: function redirect(value) { + var choiceInfo = this._choices.get(value); + + return choiceInfo ? choiceInfo.redirect : undefined; + } + }]); + + return ChoiceSchema; + }(schema.Schema); + + exports.ChoiceSchema = ChoiceSchema; +}); +unwrapExports(choice); + +var number = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var NumberSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(NumberSchema, _schema_1$Schema); + + function NumberSchema() { + _classCallCheck(this, NumberSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(NumberSchema).apply(this, arguments)); + } + + _createClass(NumberSchema, [{ + key: "expected", + value: function expected() { + return 'a number'; + } + }, { + key: "validate", + value: function validate(value, _utils) { + return typeof value === 'number'; + } + }]); + + return NumberSchema; + }(schema.Schema); + + exports.NumberSchema = NumberSchema; +}); +unwrapExports(number); + +var integer = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var IntegerSchema = + /*#__PURE__*/ + function (_number_1$NumberSchem) { + _inherits(IntegerSchema, _number_1$NumberSchem); + + function IntegerSchema() { + _classCallCheck(this, IntegerSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(IntegerSchema).apply(this, arguments)); + } + + _createClass(IntegerSchema, [{ + key: "expected", + value: function expected() { + return 'an integer'; + } + }, { + key: "validate", + value: function validate(value, utils$$2) { + return utils$$2.normalizeValidateResult(_get(_getPrototypeOf(IntegerSchema.prototype), "validate", this).call(this, value, utils$$2), value) === true && utils.isInt(value); + } + }]); + + return IntegerSchema; + }(number.NumberSchema); + + exports.IntegerSchema = IntegerSchema; +}); +unwrapExports(integer); + +var string = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var StringSchema = + /*#__PURE__*/ + function (_schema_1$Schema) { + _inherits(StringSchema, _schema_1$Schema); + + function StringSchema() { + _classCallCheck(this, StringSchema); + + return _possibleConstructorReturn(this, _getPrototypeOf(StringSchema).apply(this, arguments)); + } + + _createClass(StringSchema, [{ + key: "expected", + value: function expected() { + return 'a string'; + } + }, { + key: "validate", + value: function validate(value) { + return typeof value === 'string'; + } + }]); + + return StringSchema; + }(schema.Schema); + + exports.StringSchema = StringSchema; +}); +unwrapExports(string); + +var schemas = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(alias, exports); + + tslib_1.__exportStar(any, exports); + + tslib_1.__exportStar(array$2, exports); + + tslib_1.__exportStar(boolean_1, exports); + + tslib_1.__exportStar(choice, exports); + + tslib_1.__exportStar(integer, exports); + + tslib_1.__exportStar(number, exports); + + tslib_1.__exportStar(string, exports); +}); +unwrapExports(schemas); + +var defaults = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.defaultDescriptor = api.apiDescriptor; + exports.defaultUnknownHandler = leven_1.levenUnknownHandler; + exports.defaultInvalidHandler = invalid.commonInvalidHandler; + exports.defaultDeprecatedHandler = common.commonDeprecatedHandler; +}); +unwrapExports(defaults); + +var normalize$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.normalize = function (options, schemas, opts) { + return new Normalizer(schemas, opts).normalize(options); + }; + + var Normalizer = + /*#__PURE__*/ + function () { + function Normalizer(schemas, opts) { + _classCallCheck(this, Normalizer); + + // istanbul ignore next + var _ref = opts || {}, + _ref$logger = _ref.logger, + logger = _ref$logger === void 0 ? console : _ref$logger, + _ref$descriptor = _ref.descriptor, + descriptor = _ref$descriptor === void 0 ? defaults.defaultDescriptor : _ref$descriptor, + _ref$unknown = _ref.unknown, + unknown = _ref$unknown === void 0 ? defaults.defaultUnknownHandler : _ref$unknown, + _ref$invalid = _ref.invalid, + invalid = _ref$invalid === void 0 ? defaults.defaultInvalidHandler : _ref$invalid, + _ref$deprecated = _ref.deprecated, + deprecated = _ref$deprecated === void 0 ? defaults.defaultDeprecatedHandler : _ref$deprecated; + + this._utils = { + descriptor: descriptor, + logger: + /* istanbul ignore next */ + logger || { + warn: function warn() {} + }, + schemas: utils.recordFromArray(schemas, 'name'), + normalizeDefaultResult: utils.normalizeDefaultResult, + normalizeDeprecatedResult: utils.normalizeDeprecatedResult, + normalizeForwardResult: utils.normalizeForwardResult, + normalizeRedirectResult: utils.normalizeRedirectResult, + normalizeValidateResult: utils.normalizeValidateResult + }; + this._unknownHandler = unknown; + this._invalidHandler = invalid; + this._deprecatedHandler = deprecated; + this.cleanHistory(); + } + + _createClass(Normalizer, [{ + key: "cleanHistory", + value: function cleanHistory() { + this._hasDeprecationWarned = utils.createAutoChecklist(); + } + }, { + key: "normalize", + value: function normalize(options) { + var _this = this; + + var normalized = {}; + var restOptionsArray = [options]; + + var applyNormalization = function applyNormalization() { + while (restOptionsArray.length !== 0) { + var currentOptions = restOptionsArray.shift(); + + var transferredOptionsArray = _this._applyNormalization(currentOptions, normalized); + + restOptionsArray.push.apply(restOptionsArray, _toConsumableArray(transferredOptionsArray)); + } + }; + + applyNormalization(); + + var _arr = Object.keys(this._utils.schemas); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + var schema = this._utils.schemas[key]; + + if (!(key in normalized)) { + var defaultResult = utils.normalizeDefaultResult(schema.default(this._utils)); + + if ('value' in defaultResult) { + restOptionsArray.push(_defineProperty({}, key, defaultResult.value)); + } + } + } + + applyNormalization(); + + var _arr2 = Object.keys(this._utils.schemas); + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _key = _arr2[_i2]; + var _schema = this._utils.schemas[_key]; + + if (_key in normalized) { + normalized[_key] = _schema.postprocess(normalized[_key], this._utils); + } + } + + return normalized; + } + }, { + key: "_applyNormalization", + value: function _applyNormalization(options, normalized) { + var _this2 = this; + + var transferredOptionsArray = []; + + var _utils_1$partition = utils.partition(Object.keys(options), function (key) { + return key in _this2._utils.schemas; + }), + _utils_1$partition2 = _slicedToArray(_utils_1$partition, 2), + knownOptionNames = _utils_1$partition2[0], + unknownOptionNames = _utils_1$partition2[1]; + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + var _loop = function _loop() { + var key = _step.value; + var schema = _this2._utils.schemas[key]; + var value = schema.preprocess(options[key], _this2._utils); + var validateResult = utils.normalizeValidateResult(schema.validate(value, _this2._utils), value); + + if (validateResult !== true) { + var invalidValue = validateResult.value; + + var errorMessageOrError = _this2._invalidHandler(key, invalidValue, _this2._utils); + + throw typeof errorMessageOrError === 'string' ? new Error(errorMessageOrError) : + /* istanbul ignore next*/ + errorMessageOrError; + } + + var appendTransferredOptions = function appendTransferredOptions(_ref2) { + var from = _ref2.from, + to = _ref2.to; + transferredOptionsArray.push(typeof to === 'string' ? _defineProperty({}, to, from) : _defineProperty({}, to.key, to.value)); + }; + + var warnDeprecated = function warnDeprecated(_ref5) { + var currentValue = _ref5.value, + redirectTo = _ref5.redirectTo; + var deprecatedResult = utils.normalizeDeprecatedResult(schema.deprecated(currentValue, _this2._utils), value, + /* doNotNormalizeTrue */ + true); + + if (deprecatedResult === false) { + return; + } + + if (deprecatedResult === true) { + if (!_this2._hasDeprecationWarned(key)) { + _this2._utils.logger.warn(_this2._deprecatedHandler(key, redirectTo, _this2._utils)); + } + } else { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = deprecatedResult[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var deprecatedValue = _step3.value.value; + var pair = { + key: key, + value: deprecatedValue + }; + + if (!_this2._hasDeprecationWarned(pair)) { + var redirectToPair = typeof redirectTo === 'string' ? { + key: redirectTo, + value: deprecatedValue + } : redirectTo; + + _this2._utils.logger.warn(_this2._deprecatedHandler(pair, redirectToPair, _this2._utils)); + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + }; + + var forwardResult = utils.normalizeForwardResult(schema.forward(value, _this2._utils), value); + forwardResult.forEach(appendTransferredOptions); + var redirectResult = utils.normalizeRedirectResult(schema.redirect(value, _this2._utils), value); + redirectResult.redirect.forEach(appendTransferredOptions); + + if ('remain' in redirectResult) { + var remainingValue = redirectResult.remain; + normalized[key] = key in normalized ? schema.overlap(normalized[key], remainingValue, _this2._utils) : remainingValue; + warnDeprecated({ + value: remainingValue + }); + } + + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = redirectResult.redirect[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var _step4$value = _step4.value, + from = _step4$value.from, + to = _step4$value.to; + warnDeprecated({ + value: from, + redirectTo: to + }); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + }; + + for (var _iterator = knownOptionNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + _loop(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = unknownOptionNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var key = _step2.value; + var value = options[key]; + + var unknownResult = this._unknownHandler(key, value, this._utils); + + if (unknownResult) { + var _arr3 = Object.keys(unknownResult); + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var unknownKey = _arr3[_i3]; + + var unknownOption = _defineProperty({}, unknownKey, unknownResult[unknownKey]); + + if (unknownKey in this._utils.schemas) { + transferredOptionsArray.push(unknownOption); + } else { + Object.assign(normalized, unknownOption); + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return transferredOptionsArray; + } + }]); + + return Normalizer; + }(); + + exports.Normalizer = Normalizer; +}); +unwrapExports(normalize$1); + +var lib$1 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + tslib_1.__exportStar(descriptors, exports); + + tslib_1.__exportStar(handlers, exports); + + tslib_1.__exportStar(schemas, exports); + + tslib_1.__exportStar(normalize$1, exports); + + tslib_1.__exportStar(schema, exports); +}); +unwrapExports(lib$1); + +var hasFlag$3 = function hasFlag(flag, argv$$1) { + argv$$1 = argv$$1 || process.argv; + var terminatorPos = argv$$1.indexOf('--'); + var prefix = /^-{1,2}/.test(flag) ? '' : '--'; + var pos = argv$$1.indexOf(prefix + flag); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; + +var supportsColor$1 = createCommonjsModule(function (module) { + 'use strict'; + + var env$$1 = process.env; + + var support = function support(level) { + if (level === 0) { + return false; + } + + return { + level: level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + }; + + var supportLevel = function () { + if (hasFlag$3('no-color') || hasFlag$3('no-colors') || hasFlag$3('color=false')) { + return 0; + } + + if (hasFlag$3('color=16m') || hasFlag$3('color=full') || hasFlag$3('color=truecolor')) { + return 3; + } + + if (hasFlag$3('color=256')) { + return 2; + } + + if (hasFlag$3('color') || hasFlag$3('colors') || hasFlag$3('color=true') || hasFlag$3('color=always')) { + return 1; + } + + if (process.stdout && !process.stdout.isTTY) { + return 0; + } + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. + var osRelease = require$$1$1.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return 2; + } + + return 1; + } + + if ('CI' in env$$1) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env$$1; + }) || env$$1.CI_NAME === 'codeship') { + return 1; + } + + return 0; + } + + if ('TEAMCITY_VERSION' in env$$1) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$$1.TEAMCITY_VERSION) ? 1 : 0; + } + + if ('TERM_PROGRAM' in env$$1) { + var version = parseInt((env$$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env$$1.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Hyper': + return 3; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env$$1.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env$$1.TERM)) { + return 1; + } + + if ('COLORTERM' in env$$1) { + return 1; + } + + if (env$$1.TERM === 'dumb') { + return 0; + } + + return 0; + }(); + + if ('FORCE_COLOR' in env$$1) { + supportLevel = parseInt(env$$1.FORCE_COLOR, 10) === 0 ? 0 : supportLevel || 1; + } + + module.exports = process && support(supportLevel); +}); + +var templates$2 = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f0-9]{4}|x[a-f0-9]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[0-9a-f]{4}|x[0-9a-f]{2}|.)|([^\\])/gi; + var ESCAPES = { + n: '\n', + r: '\r', + t: '\t', + b: '\b', + f: '\f', + v: '\v', + 0: '\0', + '\\': '\\', + e: "\x1B", + a: "\x07" + }; + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES[c] || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error("Invalid Chalk template style argument: ".concat(chunk, " (in style '").concat(name, "')")); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error("Unknown Chalk style: ".concat(styleName)); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse: inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = "Chalk template literal is missing ".concat(styles.length, " closing bracket").concat(styles.length === 1 ? '' : 's', " (`}`)"); + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + +var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + +var skipModels = new Set(['gray']); +var styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = supportsColor$1 ? supportsColor$1.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); +} // Use bright blue on Windows as the normal blue color is illegible + + +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = "\x1B[94m"; +} + +var _arr = Object.keys(ansiStyles); + +var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get: function get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], key); + } + }; +}; + +for (var _i = 0; _i < _arr.length; _i++) { + _loop(); +} + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + +var _arr2 = Object.keys(ansiStyles.color.ansi); + +var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get: function get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open: open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model); + }; + } + }; +}; + +for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + +var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + +var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get: function get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open: open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model); + }; + } + }; +}; + +for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; +} + +var proto = Object.defineProperties(function () {}, styles); + +function build(_styles, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + get: function get() { + return self.level; + }, + set: function set(level) { + self.level = level; + } + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get: function get() { + return self.enabled; + }, + set: function set(enabled) { + self.enabled = enabled; + } + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, "".concat(code.close, "$&").concat(code.open)); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates$2(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); +var chalk$2 = Chalk(); // eslint-disable-line new-cap + +var supportsColor_1$2 = supportsColor$1; +chalk$2.supportsColor = supportsColor_1$2; + +var cliDescriptor = { + key: function key(_key) { + return _key.length === 1 ? "-".concat(_key) : "--".concat(_key); + }, + value: function value(_value) { + return lib$1.apiDescriptor.value(_value); + }, + pair: function pair(_ref) { + var key = _ref.key, + value = _ref.value; + return value === false ? "--no-".concat(key) : value === true ? cliDescriptor.key(key) : value === "" ? "".concat(cliDescriptor.key(key), " without an argument") : "".concat(cliDescriptor.key(key), "=").concat(value); + } +}; + +var FlagSchema = +/*#__PURE__*/ +function (_vnopts$ChoiceSchema) { + _inherits(FlagSchema, _vnopts$ChoiceSchema); + + function FlagSchema(_ref2) { + var _this; + + var name = _ref2.name, + flags = _ref2.flags; + + _classCallCheck(this, FlagSchema); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(FlagSchema).call(this, { + name: name, + choices: flags + })); + _this._flags = flags.slice().sort(); + return _this; + } + + _createClass(FlagSchema, [{ + key: "preprocess", + value: function preprocess(value, utils) { + if (typeof value === "string" && value.length !== 0 && this._flags.indexOf(value) === -1) { + var suggestion = this._flags.find(function (flag) { + return leven$1(flag, value) < 3; + }); + + if (suggestion) { + utils.logger.warn(["Unknown flag ".concat(chalk$2.yellow(utils.descriptor.value(value)), ","), "did you mean ".concat(chalk$2.blue(utils.descriptor.value(suggestion)), "?")].join(" ")); + return suggestion; + } + } + + return value; + } + }, { + key: "expected", + value: function expected() { + return "a flag"; + } + }]); + + return FlagSchema; +}(lib$1.ChoiceSchema); + +function normalizeOptions$1(options, optionInfos) { + var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + logger = _ref3.logger, + _ref3$isCLI = _ref3.isCLI, + isCLI = _ref3$isCLI === void 0 ? false : _ref3$isCLI, + _ref3$passThrough = _ref3.passThrough, + passThrough = _ref3$passThrough === void 0 ? false : _ref3$passThrough; + + var unknown = !passThrough ? lib$1.levenUnknownHandler : Array.isArray(passThrough) ? function (key, value) { + return passThrough.indexOf(key) === -1 ? undefined : _defineProperty({}, key, value); + } : function (key, value) { + return _defineProperty({}, key, value); + }; + var descriptor = isCLI ? cliDescriptor : lib$1.apiDescriptor; + var schemas = optionInfosToSchemas(optionInfos, { + isCLI: isCLI + }); + return lib$1.normalize(options, schemas, { + logger: logger, + unknown: unknown, + descriptor: descriptor + }); +} + +function optionInfosToSchemas(optionInfos, _ref6) { + var isCLI = _ref6.isCLI; + var schemas = []; + + if (isCLI) { + schemas.push(lib$1.AnySchema.create({ + name: "_" + })); + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = optionInfos[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var optionInfo = _step.value; + schemas.push(optionInfoToSchema(optionInfo, { + isCLI: isCLI, + optionInfos: optionInfos + })); + + if (optionInfo.alias && isCLI) { + schemas.push(lib$1.AliasSchema.create({ + name: optionInfo.alias, + sourceName: optionInfo.name + })); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return schemas; +} + +function optionInfoToSchema(optionInfo, _ref7) { + var isCLI = _ref7.isCLI, + optionInfos = _ref7.optionInfos; + var SchemaConstructor; + var parameters = { + name: optionInfo.name + }; + var handlers = {}; + + switch (optionInfo.type) { + case "int": + SchemaConstructor = lib$1.IntegerSchema; + + if (isCLI) { + parameters.preprocess = function (value) { + return Number(value); + }; + } + + break; + + case "choice": + SchemaConstructor = lib$1.ChoiceSchema; + parameters.choices = optionInfo.choices.map(function (choiceInfo) { + return _typeof(choiceInfo) === "object" && choiceInfo.redirect ? Object.assign({}, choiceInfo, { + redirect: { + to: { + key: optionInfo.name, + value: choiceInfo.redirect + } + } + }) : choiceInfo; + }); + break; + + case "boolean": + SchemaConstructor = lib$1.BooleanSchema; + break; + + case "flag": + SchemaConstructor = FlagSchema; + parameters.flags = optionInfos.map(function (optionInfo) { + return [].concat(optionInfo.alias || [], optionInfo.description ? optionInfo.name : [], optionInfo.oppositeDescription ? "no-".concat(optionInfo.name) : []); + }).reduce(function (a, b) { + return a.concat(b); + }, []); + break; + + case "path": + SchemaConstructor = lib$1.StringSchema; + break; + + default: + throw new Error("Unexpected type ".concat(optionInfo.type)); + } + + if (optionInfo.exception) { + parameters.validate = function (value, schema, utils) { + return optionInfo.exception(value) || schema.validate(value, utils); + }; + } else { + parameters.validate = function (value, schema, utils) { + return value === undefined || schema.validate(value, utils); + }; + } + + if (optionInfo.redirect) { + handlers.redirect = function (value) { + return !value ? undefined : { + to: { + key: optionInfo.redirect.option, + value: optionInfo.redirect.value + } + }; + }; + } + + if (optionInfo.deprecated) { + handlers.deprecated = true; + } // allow CLI overriding, e.g., prettier package.json --tab-width 1 --tab-width 2 + + + if (isCLI && !optionInfo.array) { + var originalPreprocess = parameters.preprocess || function (x) { + return x; + }; + + parameters.preprocess = function (value, schema, utils) { + return schema.preprocess(originalPreprocess(Array.isArray(value) ? value[value.length - 1] : value), utils); + }; + } + + return optionInfo.array ? lib$1.ArraySchema.create(Object.assign(isCLI ? { + preprocess: function preprocess(v) { + return [].concat(v); + } + } : {}, handlers, { + valueSchema: SchemaConstructor.create(parameters) + })) : SchemaConstructor.create(Object.assign({}, parameters, handlers)); +} + +function normalizeApiOptions(options, optionInfos, opts) { + return normalizeOptions$1(options, optionInfos, opts); +} + +function normalizeCliOptions(options, optionInfos, opts) { + return normalizeOptions$1(options, optionInfos, Object.assign({ + isCLI: true + }, opts)); +} + +var optionsNormalizer = { + normalizeApiOptions: normalizeApiOptions, + normalizeCliOptions: normalizeCliOptions +}; + +var _shim_path = {}; + +var _shim_path$1 = Object.freeze({ + default: _shim_path +}); + +var getLast = function getLast(arr) { + return arr.length > 0 ? arr[arr.length - 1] : null; +}; + +function locStart$1(node, opts) { + opts = opts || {}; // Handle nodes with decorators. They should start at the first decorator + + if (!opts.ignoreDecorators && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0) { + return locStart$1(node.declaration.decorators[0]); + } + + if (!opts.ignoreDecorators && node.decorators && node.decorators.length > 0) { + return locStart$1(node.decorators[0]); + } + + if (node.__location) { + return node.__location.startOffset; + } + + if (node.range) { + return node.range[0]; + } + + if (typeof node.start === "number") { + return node.start; + } + + if (node.loc) { + return node.loc.start; + } + + return null; +} + +function locEnd$1(node) { + var endNode = node.nodes && getLast(node.nodes); + + if (endNode && node.source && !node.source.end) { + node = endNode; + } + + if (node.__location) { + return node.__location.endOffset; + } + + var loc = node.range ? node.range[1] : typeof node.end === "number" ? node.end : null; + + if (node.typeAnnotation) { + return Math.max(loc, locEnd$1(node.typeAnnotation)); + } + + if (node.loc && !loc) { + return node.loc.end; + } + + return loc; +} + +var loc = { + locStart: locStart$1, + locEnd: locEnd$1 +}; + +var jsTokens = createCommonjsModule(function (module, exports) { + // Copyright 2014, 2015, 2016, 2017 Simon Lydell + // License: MIT. (See LICENSE.) + Object.defineProperty(exports, "__esModule", { + value: true + }); // This regex comes from regex.coffee, and is inserted here by generate-index.js + // (run `npm run build`). + + exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + + exports.matchToToken = function (match) { + var token = { + type: "invalid", + value: match[0] + }; + if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace"; + return token; + }; +}); +unwrapExports(jsTokens); + +var ast = createCommonjsModule(function (module) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + function isExpression(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'ArrayExpression': + case 'AssignmentExpression': + case 'BinaryExpression': + case 'CallExpression': + case 'ConditionalExpression': + case 'FunctionExpression': + case 'Identifier': + case 'Literal': + case 'LogicalExpression': + case 'MemberExpression': + case 'NewExpression': + case 'ObjectExpression': + case 'SequenceExpression': + case 'ThisExpression': + case 'UnaryExpression': + case 'UpdateExpression': + return true; + } + + return false; + } + + function isIterationStatement(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'DoWhileStatement': + case 'ForInStatement': + case 'ForStatement': + case 'WhileStatement': + return true; + } + + return false; + } + + function isStatement(node) { + if (node == null) { + return false; + } + + switch (node.type) { + case 'BlockStatement': + case 'BreakStatement': + case 'ContinueStatement': + case 'DebuggerStatement': + case 'DoWhileStatement': + case 'EmptyStatement': + case 'ExpressionStatement': + case 'ForInStatement': + case 'ForStatement': + case 'IfStatement': + case 'LabeledStatement': + case 'ReturnStatement': + case 'SwitchStatement': + case 'ThrowStatement': + case 'TryStatement': + case 'VariableDeclaration': + case 'WhileStatement': + case 'WithStatement': + return true; + } + + return false; + } + + function isSourceElement(node) { + return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; + } + + function trailingStatement(node) { + switch (node.type) { + case 'IfStatement': + if (node.alternate != null) { + return node.alternate; + } + + return node.consequent; + + case 'LabeledStatement': + case 'ForStatement': + case 'ForInStatement': + case 'WhileStatement': + case 'WithStatement': + return node.body; + } + + return null; + } + + function isProblematicIfStatement(node) { + var current; + + if (node.type !== 'IfStatement') { + return false; + } + + if (node.alternate == null) { + return false; + } + + current = node.consequent; + + do { + if (current.type === 'IfStatement') { + if (current.alternate == null) { + return true; + } + } + + current = trailingStatement(current); + } while (current); + + return false; + } + + module.exports = { + isExpression: isExpression, + isStatement: isStatement, + isIterationStatement: isIterationStatement, + isSourceElement: isSourceElement, + isProblematicIfStatement: isProblematicIfStatement, + trailingStatement: trailingStatement + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var code = createCommonjsModule(function (module) { + /* + Copyright (C) 2013-2014 Yusuke Suzuki + Copyright (C) 2014 Ivan Nikulin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; // See `tools/generate-identifier-regex.js`. + + ES5Regex = { + // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, + // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ + }; + ES6Regex = { + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + + function isDecimalDigit(ch) { + return 0x30 <= ch && ch <= 0x39; // 0..9 + } + + function isHexDigit(ch) { + return 0x30 <= ch && ch <= 0x39 || // 0..9 + 0x61 <= ch && ch <= 0x66 || // a..f + 0x41 <= ch && ch <= 0x46; // A..F + } + + function isOctalDigit(ch) { + return ch >= 0x30 && ch <= 0x37; // 0..7 + } // 7.2 White Space + + + NON_ASCII_WHITESPACES = [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF]; + + function isWhiteSpace(ch) { + return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0; + } // 7.3 Line Terminators + + + function isLineTerminator(ch) { + return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029; + } // 7.6 Identifier Names and Identifiers + + + function fromCodePoint(cp) { + if (cp <= 0xFFFF) { + return String.fromCharCode(cp); + } + + var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800); + var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00); + return cu1 + cu2; + } + + IDENTIFIER_START = new Array(0x80); + + for (ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || // a..z + ch >= 0x41 && ch <= 0x5A || // A..Z + ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) + } + + IDENTIFIER_PART = new Array(0x80); + + for (ch = 0; ch < 0x80; ++ch) { + IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || // a..z + ch >= 0x41 && ch <= 0x5A || // A..Z + ch >= 0x30 && ch <= 0x39 || // 0..9 + ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) + } + + function isIdentifierStartES5(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } + + function isIdentifierPartES5(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + + function isIdentifierStartES6(ch) { + return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); + } + + function isIdentifierPartES6(ch) { + return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); + } + + module.exports = { + isDecimalDigit: isDecimalDigit, + isHexDigit: isHexDigit, + isOctalDigit: isOctalDigit, + isWhiteSpace: isWhiteSpace, + isLineTerminator: isLineTerminator, + isIdentifierStartES5: isIdentifierStartES5, + isIdentifierPartES5: isIdentifierPartES5, + isIdentifierStartES6: isIdentifierStartES6, + isIdentifierPartES6: isIdentifierPartES6 + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var keyword = createCommonjsModule(function (module) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + var code$$1 = code; + + function isStrictModeReservedWordES6(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'let': + return true; + + default: + return false; + } + } + + function isKeywordES5(id, strict) { + // yield should not be treated as keyword under non-strict mode. + if (!strict && id === 'yield') { + return false; + } + + return isKeywordES6(id, strict); + } + + function isKeywordES6(id, strict) { + if (strict && isStrictModeReservedWordES6(id)) { + return true; + } + + switch (id.length) { + case 2: + return id === 'if' || id === 'in' || id === 'do'; + + case 3: + return id === 'var' || id === 'for' || id === 'new' || id === 'try'; + + case 4: + return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum'; + + case 5: + return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super'; + + case 6: + return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import'; + + case 7: + return id === 'default' || id === 'finally' || id === 'extends'; + + case 8: + return id === 'function' || id === 'continue' || id === 'debugger'; + + case 10: + return id === 'instanceof'; + + default: + return false; + } + } + + function isReservedWordES5(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); + } + + function isReservedWordES6(id, strict) { + return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + function isIdentifierNameES5(id) { + var i, iz, ch; + + if (id.length === 0) { + return false; + } + + ch = id.charCodeAt(0); + + if (!code$$1.isIdentifierStartES5(ch)) { + return false; + } + + for (i = 1, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + + if (!code$$1.isIdentifierPartES5(ch)) { + return false; + } + } + + return true; + } + + function decodeUtf16(lead, trail) { + return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + } + + function isIdentifierNameES6(id) { + var i, iz, ch, lowCh, check; + + if (id.length === 0) { + return false; + } + + check = code$$1.isIdentifierStartES6; + + for (i = 0, iz = id.length; i < iz; ++i) { + ch = id.charCodeAt(i); + + if (0xD800 <= ch && ch <= 0xDBFF) { + ++i; + + if (i >= iz) { + return false; + } + + lowCh = id.charCodeAt(i); + + if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) { + return false; + } + + ch = decodeUtf16(ch, lowCh); + } + + if (!check(ch)) { + return false; + } + + check = code$$1.isIdentifierPartES6; + } + + return true; + } + + function isIdentifierES5(id, strict) { + return isIdentifierNameES5(id) && !isReservedWordES5(id, strict); + } + + function isIdentifierES6(id, strict) { + return isIdentifierNameES6(id) && !isReservedWordES6(id, strict); + } + + module.exports = { + isKeywordES5: isKeywordES5, + isKeywordES6: isKeywordES6, + isReservedWordES5: isReservedWordES5, + isReservedWordES6: isReservedWordES6, + isRestrictedWord: isRestrictedWord, + isIdentifierNameES5: isIdentifierNameES5, + isIdentifierNameES6: isIdentifierNameES6, + isIdentifierES5: isIdentifierES5, + isIdentifierES6: isIdentifierES6 + }; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var utils$2 = createCommonjsModule(function (module, exports) { + /* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + (function () { + 'use strict'; + + exports.ast = ast; + exports.code = code; + exports.keyword = keyword; + })(); + /* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +var hasFlag$6 = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (flag, argv$$1) { + argv$$1 = argv$$1 || process.argv; + var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--'; + var pos = argv$$1.indexOf(prefix + flag); + var terminatorPos = argv$$1.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; +}); + +var env$2 = process.env; +var forceColor$1; + +if (hasFlag$6('no-color') || hasFlag$6('no-colors') || hasFlag$6('color=false')) { + forceColor$1 = false; +} else if (hasFlag$6('color') || hasFlag$6('colors') || hasFlag$6('color=true') || hasFlag$6('color=always')) { + forceColor$1 = true; +} + +if ('FORCE_COLOR' in env$2) { + forceColor$1 = env$2.FORCE_COLOR.length === 0 || parseInt(env$2.FORCE_COLOR, 10) !== 0; +} + +function translateLevel$1(level) { + if (level === 0) { + return false; + } + + return { + level: level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor$4(stream) { + if (forceColor$1 === false) { + return 0; + } + + if (hasFlag$6('color=16m') || hasFlag$6('color=full') || hasFlag$6('color=truecolor')) { + return 3; + } + + if (hasFlag$6('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor$1 !== true) { + return 0; + } + + var min = forceColor$1 ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + var osRelease = require$$1$1.release().split('.'); + + if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env$2) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { + return sign in env$2; + }) || env$2.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env$2) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$2.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env$2.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env$2) { + var version = parseInt((env$2.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env$2.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env$2.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env$2.TERM)) { + return 1; + } + + if ('COLORTERM' in env$2) { + return 1; + } + + if (env$2.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel$1(stream) { + var level = supportsColor$4(stream); + return translateLevel$1(level); +} + +var supportsColor_1$3 = { + supportsColor: getSupportLevel$1, + stdout: getSupportLevel$1(process.stdout), + stderr: getSupportLevel$1(process.stderr) +}; + +var templates$4 = createCommonjsModule(function (module) { + 'use strict'; + + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', "\x1B"], ['a', "\x07"]]); + + function unescape(c) { + if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; + } + + function parseArguments(name, args) { + var results = []; + var chunks = args.trim().split(/\s*,\s*/g); + var matches; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { + return escape ? unescape(escape) : chr; + })); + } else { + throw new Error("Invalid Chalk template style argument: ".concat(chunk, " (in style '").concat(name, "')")); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + var results = []; + var matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + var name = matches[1]; + + if (matches[2]) { + var args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; + } + + function buildStyle(chalk, styles) { + var enabled = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var layer = _step2.value; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var style = _step3.value; + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var current = chalk; + + var _arr = Object.keys(enabled); + + for (var _i = 0; _i < _arr.length; _i++) { + var styleName = _arr[_i]; + + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error("Unknown Chalk style: ".concat(styleName)); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; + } + + module.exports = function (chalk, tmp) { + var styles = []; + var chunks = []; + var chunk = []; // eslint-disable-next-line max-params + + tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + var str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ + inverse: inverse, + styles: parseStyle(style) + }); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join('')); + + if (styles.length > 0) { + var errMsg = "Chalk template literal is missing ".concat(styles.length, " closing bracket").concat(styles.length === 1 ? '' : 's', " (`}`)"); + throw new Error(errMsg); + } + + return chunks.join(''); + }; +}); + +var chalk$5 = createCommonjsModule(function (module) { + 'use strict'; + + var stdoutColor = supportsColor_1$3.stdout; + var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping + + var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such + + var skipModels = new Set(['gray']); + var styles = Object.create(null); + + function applyOptions(obj, options) { + options = options || {}; // Detect level if not set manually + + var scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; + } + + function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + var _chalk = {}; + applyOptions(_chalk, options); + + _chalk.template = function () { + var args = [].slice.call(arguments); + return chalkTag.apply(null, [_chalk.template].concat(args)); + }; + + Object.setPrototypeOf(_chalk, Chalk.prototype); + Object.setPrototypeOf(_chalk.template, _chalk); + _chalk.template.constructor = Chalk; + return _chalk.template; + } + + applyOptions(this, options); + } // Use bright blue on Windows as the normal blue color is illegible + + + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = "\x1B[94m"; + } + + var _arr = Object.keys(ansiStyles); + + var _loop = function _loop() { + var key = _arr[_i]; + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + styles[key] = { + get: function get() { + var codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; + }; + + for (var _i = 0; _i < _arr.length; _i++) { + _loop(); + } + + styles.visible = { + get: function get() { + return build.call(this, this._styles || [], true, 'visible'); + } + }; + ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); + + var _arr2 = Object.keys(ansiStyles.color.ansi); + + var _loop2 = function _loop2() { + var model = _arr2[_i2]; + + if (skipModels.has(model)) { + return "continue"; + } + + styles[model] = { + get: function get() { + var level = this.level; + return function () { + var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + var codes = { + open: open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; + }; + + for (var _i2 = 0; _i2 < _arr2.length; _i2++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; + } + + ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); + + var _arr3 = Object.keys(ansiStyles.bgColor.ansi); + + var _loop3 = function _loop3() { + var model = _arr3[_i3]; + + if (skipModels.has(model)) { + return "continue"; + } + + var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get: function get() { + var level = this.level; + return function () { + var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + var codes = { + open: open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; + }; + + for (var _i3 = 0; _i3 < _arr3.length; _i3++) { + var _ret2 = _loop3(); + + if (_ret2 === "continue") continue; + } + + var proto = Object.defineProperties(function () {}, styles); + + function build(_styles, _empty, key) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + var self = this; + Object.defineProperty(builder, 'level', { + enumerable: true, + get: function get() { + return self.level; + }, + set: function set(level) { + self.level = level; + } + }); + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get: function get() { + return self.enabled; + }, + set: function set(enabled) { + self.enabled = enabled; + } + }); // See below for fix regarding invisible grey/dim combination on Windows + + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; + } + + function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + + + var originalDim = ansiStyles.dim.open; + + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var code = _step.value; + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + + str = str.replace(/\r?\n/g, "".concat(code.close, "$&").concat(code.open)); + } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + ansiStyles.dim.open = originalDim; + return str; + } + + function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + var args = [].slice.call(arguments, 2); + var parts = [strings.raw[0]]; + + for (var i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates$4(chalk, parts.join('')); + } + + Object.defineProperties(Chalk.prototype, styles); + module.exports = Chalk(); // eslint-disable-line new-cap + + module.exports.supportsColor = stdoutColor; + module.exports.default = module.exports; // For TypeScript +}); + +var lib$3 = createCommonjsModule(function (module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.shouldHighlight = shouldHighlight; + exports.getChalk = getChalk; + exports.default = highlight; + + function _jsTokens() { + var data = _interopRequireWildcard(jsTokens); + + _jsTokens = function _jsTokens() { + return data; + }; + + return data; + } + + function _esutils() { + var data = _interopRequireDefault(utils$2); + + _esutils = function _esutils() { + return data; + }; + + return data; + } + + function _chalk() { + var data = _interopRequireDefault(chalk$5); + + _chalk = function _chalk() { + return data; + }; + + return data; + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; + + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + + newObj.default = obj; + return newObj; + } + } + + function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsx_tag: chalk.yellow, + punctuator: chalk.yellow, + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold + }; + } + + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + var JSX_TAG = /^[a-z][\w-]*$/i; + var BRACKET = /^[()[\]{}]$/; + + function getTokenType(match) { + var _match$slice = match.slice(-2), + offset = _match$slice[0], + text = _match$slice[1]; + + var token = (0, _jsTokens().matchToToken)(match); + + if (token.type === "name") { + if (_esutils().default.keyword.isReservedWordES6(token.value)) { + return "keyword"; + } + + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == ""), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return " " + maybeHighlight(defs.gutter, gutter) + line; + } + }).join("\n"); + + if (opts.message && !hasColumns) { + frame = "" + " ".repeat(numberMaxWidth + 1) + opts.message + "\n" + frame; + } + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } + } + + function _default(rawLines, lineNumber, colNumber, opts) { + if (opts === void 0) { + opts = {}; + } + + if (!deprecationWarningShown) { + deprecationWarningShown = true; + var message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + var deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + + colNumber = Math.max(colNumber, 0); + var location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); + } +}); +unwrapExports(lib$2); + +var path = ( _shim_path$1 && _shim_path ) || _shim_path$1; + +var ConfigError$1 = errors.ConfigError; +var locStart = loc.locStart; +var locEnd = loc.locEnd; // Use defineProperties()/getOwnPropertyDescriptor() to prevent +// triggering the parsers getters. + +var ownNames = Object.getOwnPropertyNames; +var ownDescriptor = Object.getOwnPropertyDescriptor; + +function getParsers(options) { + var parsers = {}; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = options.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var plugin = _step.value; + + if (!plugin.parsers) { + continue; + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = ownNames(plugin.parsers)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var name = _step2.value; + Object.defineProperty(parsers, name, ownDescriptor(plugin.parsers, name)); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return parsers; +} + +function resolveParser$1(opts, parsers) { + parsers = parsers || getParsers(opts); + + if (typeof opts.parser === "function") { + // Custom parser API always works with JavaScript. + return { + parse: opts.parser, + astFormat: "estree", + locStart: locStart, + locEnd: locEnd + }; + } + + if (typeof opts.parser === "string") { + if (parsers.hasOwnProperty(opts.parser)) { + return parsers[opts.parser]; + } + + try { + return { + parse: require(path.resolve(process.cwd(), opts.parser)), + astFormat: "estree", + locStart: locStart, + locEnd: locEnd + }; + } catch (err) { + /* istanbul ignore next */ + throw new ConfigError$1("Couldn't resolve parser \"".concat(opts.parser, "\"")); + } + } +} + +function parse$2(text, opts) { + var parsers = getParsers(opts); // Create a new object {parserName: parseFn}. Uses defineProperty() to only call + // the parsers getters when actually calling the parser `parse` function. + + var parsersForCustomParserApi = Object.keys(parsers).reduce(function (object, parserName) { + return Object.defineProperty(object, parserName, { + enumerable: true, + get: function get() { + return parsers[parserName].parse; + } + }); + }, {}); + var parser = resolveParser$1(opts, parsers); + + try { + if (parser.preprocess) { + text = parser.preprocess(text, opts); + } + + return { + text: text, + ast: parser.parse(text, parsersForCustomParserApi, opts) + }; + } catch (error) { + var loc$$1 = error.loc; + + if (loc$$1) { + var codeFrame = lib$2; + error.codeFrame = codeFrame.codeFrameColumns(text, loc$$1, { + highlightCode: true + }); + error.message += "\n" + error.codeFrame; + throw error; + } + /* istanbul ignore next */ + + + throw error.stack; + } +} + +var parser = { + parse: parse$2, + resolveParser: resolveParser$1 +}; + +var UndefinedParserError = errors.UndefinedParserError; +var getSupportInfo$1 = support.getSupportInfo; +var resolveParser = parser.resolveParser; +var hiddenDefaults = { + astFormat: "estree", + printer: {}, + originalText: undefined, + locStart: null, + locEnd: null +}; // Copy options and fill in default values. + +function normalize(options, opts) { + opts = opts || {}; + var rawOptions = Object.assign({}, options); + var supportOptions = getSupportInfo$1(null, { + plugins: options.plugins, + showUnreleased: true, + showDeprecated: true + }).options; + var defaults = supportOptions.reduce(function (reduced, optionInfo) { + return optionInfo.default !== undefined ? Object.assign(reduced, _defineProperty({}, optionInfo.name, optionInfo.default)) : reduced; + }, Object.assign({}, hiddenDefaults)); + + if (!rawOptions.parser) { + if (!rawOptions.filepath) { + var logger = opts.logger || console; + logger.warn("No parser and no filepath given, using 'babylon' the parser now " + "but this will throw an error in the future. " + "Please specify a parser or a filepath so one can be inferred."); + rawOptions.parser = "babylon"; + } else { + rawOptions.parser = inferParser(rawOptions.filepath, rawOptions.plugins); + + if (!rawOptions.parser) { + throw new UndefinedParserError("No parser could be inferred for file: ".concat(rawOptions.filepath)); + } + } + } + + var parser$$1 = resolveParser(optionsNormalizer.normalizeApiOptions(rawOptions, [supportOptions.find(function (x) { + return x.name === "parser"; + })], { + passThrough: true, + logger: false + })); + rawOptions.astFormat = parser$$1.astFormat; + rawOptions.locEnd = parser$$1.locEnd; + rawOptions.locStart = parser$$1.locStart; + var plugin = getPlugin(rawOptions); + rawOptions.printer = plugin.printers[rawOptions.astFormat]; + var pluginDefaults = supportOptions.filter(function (optionInfo) { + return optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name]; + }).reduce(function (reduced, optionInfo) { + return Object.assign(reduced, _defineProperty({}, optionInfo.name, optionInfo.pluginDefaults[plugin.name])); + }, {}); + var mixedDefaults = Object.assign({}, defaults, pluginDefaults); + Object.keys(mixedDefaults).forEach(function (k) { + if (rawOptions[k] == null) { + rawOptions[k] = mixedDefaults[k]; + } + }); + + if (rawOptions.parser === "json") { + rawOptions.trailingComma = "none"; + } + + return optionsNormalizer.normalizeApiOptions(rawOptions, supportOptions, Object.assign({ + passThrough: Object.keys(hiddenDefaults) + }, opts)); +} + +function getPlugin(options) { + var astFormat = options.astFormat; + + if (!astFormat) { + throw new Error("getPlugin() requires astFormat to be set"); + } + + var printerPlugin = options.plugins.find(function (plugin) { + return plugin.printers && plugin.printers[astFormat]; + }); + + if (!printerPlugin) { + throw new Error("Couldn't find plugin for AST format \"".concat(astFormat, "\"")); + } + + return printerPlugin; +} + +function getInterpreter(filepath) { + if (typeof filepath !== "string") { + return ""; + } + + var fd; + + try { + fd = fs.openSync(filepath, "r"); + } catch (err) { + return ""; + } + + try { + var liner = new readlines(fd); + var firstLine = liner.next().toString("utf8"); // #!/bin/env node, #!/usr/bin/env node + + var m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/); + + if (m1) { + return m1[1]; + } // #!/bin/node, #!/usr/bin/node, #!/usr/local/bin/node + + + var m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/); + + if (m2) { + return m2[1]; + } + + return ""; + } catch (err) { + // There are some weird cases where paths are missing, causing Jest + // failures. It's unclear what these correspond to in the real world. + return ""; + } finally { + try { + // There are some weird cases where paths are missing, causing Jest + // failures. It's unclear what these correspond to in the real world. + fs.closeSync(fd); + } catch (err) {// nop + } + } +} + +function inferParser(filepath, plugins) { + var filepathParts = normalizePath(filepath).split("/"); + var filename = filepathParts[filepathParts.length - 1].toLowerCase(); // If the file has no extension, we can try to infer the language from the + // interpreter in the shebang line, if any; but since this requires FS access, + // do it last. + + var language = getSupportInfo$1(null, { + plugins: plugins + }).languages.find(function (language) { + return language.since !== null && (language.extensions && language.extensions.some(function (extension) { + return filename.endsWith(extension); + }) || language.filenames && language.filenames.find(function (name) { + return name.toLowerCase() === filename; + }) || filename.indexOf(".") === -1 && language.interpreters && language.interpreters.indexOf(getInterpreter(filepath)) !== -1); + }); + return language && language.parsers[0]; +} + +var options = { + normalize: normalize, + hiddenDefaults: hiddenDefaults, + inferParser: inferParser +}; + +function massageAST(ast, options, parent) { + if (Array.isArray(ast)) { + return ast.map(function (e) { + return massageAST(e, options, parent); + }).filter(function (e) { + return e; + }); + } + + if (!ast || _typeof(ast) !== "object") { + return ast; + } + + var newObj = {}; + + var _arr = Object.keys(ast); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + + if (typeof ast[key] !== "function") { + newObj[key] = massageAST(ast[key], options, ast); + } + } + + if (options.printer.massageAstNode) { + var result = options.printer.massageAstNode(ast, newObj, parent); + + if (result === null) { + return undefined; + } + + if (result) { + return result; + } + } + + return newObj; +} + +var massageAst = massageAST; + +function assert() {} + +assert.ok = function () {}; + +assert.strictEqual = function () {}; + + + +var assert$2 = Object.freeze({ + default: assert +}); + +function concat$1(parts) { + return { + type: "concat", + parts: parts + }; +} + +function indent$1(contents) { + return { + type: "indent", + contents: contents + }; +} + +function align(n, contents) { + return { + type: "align", + contents: contents, + n: n + }; +} + +function group(contents, opts) { + opts = opts || {}; + + return { + type: "group", + id: opts.id, + contents: contents, + break: !!opts.shouldBreak, + expandedStates: opts.expandedStates + }; +} + +function dedentToRoot(contents) { + return align(-Infinity, contents); +} + +function markAsRoot(contents) { + return align({ + type: "root" + }, contents); +} + +function dedent$1(contents) { + return align(-1, contents); +} + +function conditionalGroup(states, opts) { + return group(states[0], Object.assign(opts || {}, { + expandedStates: states + })); +} + +function fill(parts) { + return { + type: "fill", + parts: parts + }; +} + +function ifBreak(breakContents, flatContents, opts) { + opts = opts || {}; + + return { + type: "if-break", + breakContents: breakContents, + flatContents: flatContents, + groupId: opts.groupId + }; +} + +function lineSuffix$1(contents) { + return { + type: "line-suffix", + contents: contents + }; +} + +var lineSuffixBoundary = { + type: "line-suffix-boundary" +}; +var breakParent$1 = { + type: "break-parent" +}; +var trim = { + type: "trim" +}; +var line$2 = { + type: "line" +}; +var softline = { + type: "line", + soft: true +}; +var hardline$1 = concat$1([{ + type: "line", + hard: true +}, breakParent$1]); +var literalline = concat$1([{ + type: "line", + hard: true, + literal: true +}, breakParent$1]); +var cursor$1 = { + type: "cursor", + placeholder: Symbol("cursor") +}; + +function join$1(sep, arr) { + var res = []; + + for (var i = 0; i < arr.length; i++) { + if (i !== 0) { + res.push(sep); + } + + res.push(arr[i]); + } + + return concat$1(res); +} + +function addAlignmentToDoc(doc, size, tabWidth) { + var aligned = doc; + + if (size > 0) { + // Use indent to add tabs for all the levels of tabs we need + for (var i = 0; i < Math.floor(size / tabWidth); ++i) { + aligned = indent$1(aligned); + } // Use align for all the spaces that are needed + + + aligned = align(size % tabWidth, aligned); // size is absolute from 0 and not relative to the current + // indentation, so we use -Infinity to reset the indentation to 0 + + aligned = align(-Infinity, aligned); + } + + return aligned; +} + +var docBuilders = { + concat: concat$1, + join: join$1, + line: line$2, + softline: softline, + hardline: hardline$1, + literalline: literalline, + group: group, + conditionalGroup: conditionalGroup, + fill: fill, + lineSuffix: lineSuffix$1, + lineSuffixBoundary: lineSuffixBoundary, + cursor: cursor$1, + breakParent: breakParent$1, + ifBreak: ifBreak, + trim: trim, + indent: indent$1, + align: align, + addAlignmentToDoc: addAlignmentToDoc, + markAsRoot: markAsRoot, + dedentToRoot: dedentToRoot, + dedent: dedent$1 +}; + +var ansiRegex = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function () { + var pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)", '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'].join('|'); + return new RegExp(pattern, 'g'); + }; +}); + +var stripAnsi = function stripAnsi(input) { + return typeof input === 'string' ? input.replace(ansiRegex(), '') : input; +}; + +var isFullwidthCodePoint = createCommonjsModule(function (module) { + 'use strict'; + /* eslint-disable yoda */ + + module.exports = function (x) { + if (Number.isNaN(x)) { + return false; + } // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + + + if (x >= 0x1100 && (x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + 0x2e80 <= x && x <= 0x3247 && x !== 0x303f || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + 0x3250 <= x && x <= 0x4dbf || // CJK Unified Ideographs .. Yi Radicals + 0x4e00 <= x && x <= 0xa4c6 || // Hangul Jamo Extended-A + 0xa960 <= x && x <= 0xa97c || // Hangul Syllables + 0xac00 <= x && x <= 0xd7a3 || // CJK Compatibility Ideographs + 0xf900 <= x && x <= 0xfaff || // Vertical Forms + 0xfe10 <= x && x <= 0xfe19 || // CJK Compatibility Forms .. Small Form Variants + 0xfe30 <= x && x <= 0xfe6b || // Halfwidth and Fullwidth Forms + 0xff01 <= x && x <= 0xff60 || 0xffe0 <= x && x <= 0xffe6 || // Kana Supplement + 0x1b000 <= x && x <= 0x1b001 || // Enclosed Ideographic Supplement + 0x1f200 <= x && x <= 0x1f251 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + 0x20000 <= x && x <= 0x3fffd)) { + return true; + } + + return false; + }; +}); + +var stringWidth = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (str) { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + str = stripAnsi(str); + var width = 0; + + for (var i = 0; i < str.length; i++) { + var code = str.codePointAt(i); // Ignore control characters + + if (code <= 0x1F || code >= 0x7F && code <= 0x9F) { + continue; + } // Ignore combining characters + + + if (code >= 0x300 && code <= 0x36F) { + continue; + } // Surrogates + + + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; + }; +}); + +var emojiRegex$1 = function emojiRegex() { + // https://mathiasbynens.be/notes/es-unicode-property-escapes#emoji + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]\uFE0F|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F/g; +}; + +var emojiRegex = emojiRegex$1(); // eslint-disable-next-line no-control-regex + +var notAsciiRegex = /[^\x20-\x7F]/; + +function isExportDeclaration(node) { + if (node) { + switch (node.type) { + case "ExportDefaultDeclaration": + case "ExportDefaultSpecifier": + case "DeclareExportDeclaration": + case "ExportNamedDeclaration": + case "ExportAllDeclaration": + return true; + } + } + + return false; +} + +function getParentExportDeclaration(path) { + var parentNode = path.getParentNode(); + + if (path.getName() === "declaration" && isExportDeclaration(parentNode)) { + return parentNode; + } + + return null; +} + +function getPenultimate(arr) { + if (arr.length > 1) { + return arr[arr.length - 2]; + } + + return null; +} + +function getLast$3(arr) { + if (arr.length > 0) { + return arr[arr.length - 1]; + } + + return null; +} + +function skip(chars) { + return function (text, index, opts) { + var backwards = opts && opts.backwards; // Allow `skip` functions to be threaded together without having + // to check for failures (did someone say monads?). + + if (index === false) { + return false; + } + + var length = text.length; + var cursor = index; + + while (cursor >= 0 && cursor < length) { + var c = text.charAt(cursor); + + if (chars instanceof RegExp) { + if (!chars.test(c)) { + return cursor; + } + } else if (chars.indexOf(c) === -1) { + return cursor; + } + + backwards ? cursor-- : cursor++; + } + + if (cursor === -1 || cursor === length) { + // If we reached the beginning or end of the file, return the + // out-of-bounds cursor. It's up to the caller to handle this + // correctly. We don't want to indicate `false` though if it + // actually skipped valid characters. + return cursor; + } + + return false; + }; +} + +var skipWhitespace = skip(/\s/); +var skipSpaces = skip(" \t"); +var skipToLineEnd = skip(",; \t"); +var skipEverythingButNewLine = skip(/[^\r\n]/); + +function skipInlineComment(text, index) { + if (index === false) { + return false; + } + + if (text.charAt(index) === "/" && text.charAt(index + 1) === "*") { + for (var i = index + 2; i < text.length; ++i) { + if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") { + return i + 2; + } + } + } + + return index; +} + +function skipTrailingComment(text, index) { + if (index === false) { + return false; + } + + if (text.charAt(index) === "/" && text.charAt(index + 1) === "/") { + return skipEverythingButNewLine(text, index); + } + + return index; +} // This one doesn't use the above helper function because it wants to +// test \r\n in order and `skip` doesn't support ordering and we only +// want to skip one newline. It's simple to implement. + + +function skipNewline$1(text, index, opts) { + var backwards = opts && opts.backwards; + + if (index === false) { + return false; + } + + var atIndex = text.charAt(index); + + if (backwards) { + if (text.charAt(index - 1) === "\r" && atIndex === "\n") { + return index - 2; + } + + if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") { + return index - 1; + } + } else { + if (atIndex === "\r" && text.charAt(index + 1) === "\n") { + return index + 2; + } + + if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") { + return index + 1; + } + } + + return index; +} + +function hasNewline$1(text, index, opts) { + opts = opts || {}; + var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + var idx2 = skipNewline$1(text, idx, opts); + return idx !== idx2; +} + +function hasNewlineInRange(text, start, end) { + for (var i = start; i < end; ++i) { + if (text.charAt(i) === "\n") { + return true; + } + } + + return false; +} // Note: this function doesn't ignore leading comments unlike isNextLineEmpty + + +function isPreviousLineEmpty$1(text, node, locStart) { + var idx = locStart(node) - 1; + idx = skipSpaces(text, idx, { + backwards: true + }); + idx = skipNewline$1(text, idx, { + backwards: true + }); + idx = skipSpaces(text, idx, { + backwards: true + }); + var idx2 = skipNewline$1(text, idx, { + backwards: true + }); + return idx !== idx2; +} + +function isNextLineEmptyAfterIndex(text, index) { + var oldIdx = null; + var idx = index; + + while (idx !== oldIdx) { + // We need to skip all the potential trailing inline comments + oldIdx = idx; + idx = skipToLineEnd(text, idx); + idx = skipInlineComment(text, idx); + idx = skipSpaces(text, idx); + } + + idx = skipTrailingComment(text, idx); + idx = skipNewline$1(text, idx); + return hasNewline$1(text, idx); +} + +function isNextLineEmpty(text, node, locEnd) { + return isNextLineEmptyAfterIndex(text, locEnd(node)); +} + +function getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, idx) { + var oldIdx = null; + + while (idx !== oldIdx) { + oldIdx = idx; + idx = skipSpaces(text, idx); + idx = skipInlineComment(text, idx); + idx = skipTrailingComment(text, idx); + idx = skipNewline$1(text, idx); + } + + return idx; +} + +function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) { + return getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, locEnd(node)); +} + +function getNextNonSpaceNonCommentCharacter(text, node, locEnd) { + return text.charAt(getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd)); +} + +function hasSpaces(text, index, opts) { + opts = opts || {}; + var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + return idx !== index; +} + +function setLocStart(node, index) { + if (node.range) { + node.range[0] = index; + } else { + node.start = index; + } +} + +function setLocEnd(node, index) { + if (node.range) { + node.range[1] = index; + } else { + node.end = index; + } +} + +var PRECEDENCE = {}; +[["|>"], ["||", "??"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].forEach(function (tier, i) { + tier.forEach(function (op) { + PRECEDENCE[op] = i; + }); +}); + +function getPrecedence(op) { + return PRECEDENCE[op]; +} + +var equalityOperators = { + "==": true, + "!=": true, + "===": true, + "!==": true +}; +var multiplicativeOperators = { + "*": true, + "/": true, + "%": true +}; +var bitshiftOperators = { + ">>": true, + ">>>": true, + "<<": true +}; + +function shouldFlatten(parentOp, nodeOp) { + if (getPrecedence(nodeOp) !== getPrecedence(parentOp)) { + return false; + } // ** is right-associative + // x ** y ** z --> x ** (y ** z) + + + if (parentOp === "**") { + return false; + } // x == y == z --> (x == y) == z + + + if (equalityOperators[parentOp] && equalityOperators[nodeOp]) { + return false; + } // x * y % z --> (x * y) % z + + + if (nodeOp === "%" && multiplicativeOperators[parentOp] || parentOp === "%" && multiplicativeOperators[nodeOp]) { + return false; + } // x * y / z --> (x * y) / z + // x / y * z --> (x / y) * z + + + if (nodeOp !== parentOp && multiplicativeOperators[nodeOp] && multiplicativeOperators[parentOp]) { + return false; + } // x << y << z --> (x << y) << z + + + if (bitshiftOperators[parentOp] && bitshiftOperators[nodeOp]) { + return false; + } + + return true; +} + +function isBitwiseOperator(operator) { + return !!bitshiftOperators[operator] || operator === "|" || operator === "^" || operator === "&"; +} // Tests if an expression starts with `{`, or (if forbidFunctionClassAndDoExpr +// holds) `function`, `class`, or `do {}`. Will be overzealous if there's +// already necessary grouping parentheses. + + +function startsWithNoLookaheadToken(node, forbidFunctionClassAndDoExpr) { + node = getLeftMost(node); + + switch (node.type) { + case "FunctionExpression": + case "ClassExpression": + case "DoExpression": + return forbidFunctionClassAndDoExpr; + + case "ObjectExpression": + return true; + + case "MemberExpression": + return startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr); + + case "TaggedTemplateExpression": + if (node.tag.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + + return startsWithNoLookaheadToken(node.tag, forbidFunctionClassAndDoExpr); + + case "CallExpression": + if (node.callee.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + + return startsWithNoLookaheadToken(node.callee, forbidFunctionClassAndDoExpr); + + case "ConditionalExpression": + return startsWithNoLookaheadToken(node.test, forbidFunctionClassAndDoExpr); + + case "UpdateExpression": + return !node.prefix && startsWithNoLookaheadToken(node.argument, forbidFunctionClassAndDoExpr); + + case "BindExpression": + return node.object && startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr); + + case "SequenceExpression": + return startsWithNoLookaheadToken(node.expressions[0], forbidFunctionClassAndDoExpr); + + case "TSAsExpression": + return startsWithNoLookaheadToken(node.expression, forbidFunctionClassAndDoExpr); + + default: + return false; + } +} + +function getLeftMost(node) { + if (node.left) { + return getLeftMost(node.left); + } + + return node; +} + +function getAlignmentSize(value, tabWidth, startIndex) { + startIndex = startIndex || 0; + var size = 0; + + for (var i = startIndex; i < value.length; ++i) { + if (value[i] === "\t") { + // Tabs behave in a way that they are aligned to the nearest + // multiple of tabWidth: + // 0 -> 4, 1 -> 4, 2 -> 4, 3 -> 4 + // 4 -> 8, 5 -> 8, 6 -> 8, 7 -> 8 ... + size = size + tabWidth - size % tabWidth; + } else { + size++; + } + } + + return size; +} + +function getIndentSize(value, tabWidth) { + var lastNewlineIndex = value.lastIndexOf("\n"); + + if (lastNewlineIndex === -1) { + return 0; + } + + return getAlignmentSize( // All the leading whitespaces + value.slice(lastNewlineIndex + 1).match(/^[ \t]*/)[0], tabWidth); +} + +function getPreferredQuote(raw, preferredQuote) { + // `rawContent` is the string exactly like it appeared in the input source + // code, without its enclosing quotes. + var rawContent = raw.slice(1, -1); + var double = { + quote: '"', + regex: /"/g + }; + var single = { + quote: "'", + regex: /'/g + }; + var preferred = preferredQuote === "'" ? single : double; + var alternate = preferred === single ? double : single; + var result = preferred.quote; // If `rawContent` contains at least one of the quote preferred for enclosing + // the string, we might want to enclose with the alternate quote instead, to + // minimize the number of escaped quotes. + + if (rawContent.includes(preferred.quote) || rawContent.includes(alternate.quote)) { + var numPreferredQuotes = (rawContent.match(preferred.regex) || []).length; + var numAlternateQuotes = (rawContent.match(alternate.regex) || []).length; + result = numPreferredQuotes > numAlternateQuotes ? alternate.quote : preferred.quote; + } + + return result; +} + +function printString(raw, options, isDirectiveLiteral) { + // `rawContent` is the string exactly like it appeared in the input source + // code, without its enclosing quotes. + var rawContent = raw.slice(1, -1); // Check for the alternate quote, to determine if we're allowed to swap + // the quotes on a DirectiveLiteral. + + var canChangeDirectiveQuotes = !rawContent.includes('"') && !rawContent.includes("'"); + var enclosingQuote = options.parser === "json" ? '"' : options.__isInHtmlAttribute ? "'" : getPreferredQuote(raw, options.singleQuote ? "'" : '"'); // Directives are exact code unit sequences, which means that you can't + // change the escape sequences they use. + // See https://github.com/prettier/prettier/issues/1555 + // and https://tc39.github.io/ecma262/#directive-prologue + + if (isDirectiveLiteral) { + if (canChangeDirectiveQuotes) { + return enclosingQuote + rawContent + enclosingQuote; + } + + return raw; + } // It might sound unnecessary to use `makeString` even if the string already + // is enclosed with `enclosingQuote`, but it isn't. The string could contain + // unnecessary escapes (such as in `"\'"`). Always using `makeString` makes + // sure that we consistently output the minimum amount of escaped quotes. + + + return makeString(rawContent, enclosingQuote, !(options.parser === "css" || options.parser === "less" || options.parser === "scss" || options.parentParser === "html" || options.parentParser === "vue" || options.parentParser === "angular")); +} + +function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) { + var otherQuote = enclosingQuote === '"' ? "'" : '"'; // Matches _any_ escape and unescaped quotes (both single and double). + + var regex = /\\([\s\S])|(['"])/g; // Escape and unescape single and double quotes as needed to be able to + // enclose `rawContent` with `enclosingQuote`. + + var newContent = rawContent.replace(regex, function (match, escaped, quote) { + // If we matched an escape, and the escaped character is a quote of the + // other type than we intend to enclose the string with, there's no need for + // it to be escaped, so return it _without_ the backslash. + if (escaped === otherQuote) { + return escaped; + } // If we matched an unescaped quote and it is of the _same_ type as we + // intend to enclose the string with, it must be escaped, so return it with + // a backslash. + + + if (quote === enclosingQuote) { + return "\\" + quote; + } + + if (quote) { + return quote; + } // Unescape any unnecessarily escaped character. + // Adapted from https://github.com/eslint/eslint/blob/de0b4ad7bd820ade41b1f606008bea68683dc11a/lib/rules/no-useless-escape.js#L27 + + + return unescapeUnnecessaryEscapes && /^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(escaped) ? escaped : "\\" + escaped; + }); + return enclosingQuote + newContent + enclosingQuote; +} + +function printNumber(rawNumber) { + return rawNumber.toLowerCase() // Remove unnecessary plus and zeroes from scientific notation. + .replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3") // Remove unnecessary scientific notation (1e0). + .replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1") // Make sure numbers always start with a digit. + .replace(/^([+-])?\./, "$10.") // Remove extraneous trailing decimal zeroes. + .replace(/(\.\d+?)0+(?=e|$)/, "$1") // Remove trailing dot. + .replace(/\.(?=e|$)/, ""); +} + +function getMaxContinuousCount(str, target) { + var results = str.match(new RegExp("(".concat(escapeStringRegexp(target), ")+"), "g")); + + if (results === null) { + return 0; + } + + return results.reduce(function (maxCount, result) { + return Math.max(maxCount, result.length / target.length); + }, 0); +} + +function getStringWidth$1(text) { + if (!text) { + return 0; + } // shortcut to avoid needless string `RegExp`s, replacements, and allocations within `string-width` + + + if (!notAsciiRegex.test(text)) { + return text.length; + } // emojis are considered 2-char width for consistency + // see https://github.com/sindresorhus/string-width/issues/11 + // for the reason why not implemented in `string-width` + + + return stringWidth(text.replace(emojiRegex, " ")); +} + +function hasIgnoreComment(path) { + var node = path.getValue(); + return hasNodeIgnoreComment(node); +} + +function hasNodeIgnoreComment(node) { + return node && node.comments && node.comments.length > 0 && node.comments.some(function (comment) { + return comment.value.trim() === "prettier-ignore"; + }); +} + +function matchAncestorTypes(path, types, index) { + index = index || 0; + types = types.slice(); + + while (types.length) { + var parent = path.getParentNode(index); + var type = types.shift(); + + if (!parent || parent.type !== type) { + return false; + } + + index++; + } + + return true; +} + +function addCommentHelper(node, comment) { + var comments = node.comments || (node.comments = []); + comments.push(comment); + comment.printed = false; // For some reason, TypeScript parses `// x` inside of JSXText as a comment + // We already "print" it via the raw text, we don't need to re-print it as a + // comment + + if (node.type === "JSXText") { + comment.printed = true; + } +} + +function addLeadingComment$1(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addDanglingComment$1(node, comment) { + comment.leading = false; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addTrailingComment$1(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} + +function isWithinParentArrayProperty(path, propertyName) { + var node = path.getValue(); + var parent = path.getParentNode(); + + if (parent == null) { + return false; + } + + if (!Array.isArray(parent[propertyName])) { + return false; + } + + var key = path.getName(); + return parent[propertyName][key] === node; +} + +var util = { + getStringWidth: getStringWidth$1, + getMaxContinuousCount: getMaxContinuousCount, + getPrecedence: getPrecedence, + shouldFlatten: shouldFlatten, + isBitwiseOperator: isBitwiseOperator, + isExportDeclaration: isExportDeclaration, + getParentExportDeclaration: getParentExportDeclaration, + getPenultimate: getPenultimate, + getLast: getLast$3, + getNextNonSpaceNonCommentCharacterIndexWithStartIndex: getNextNonSpaceNonCommentCharacterIndexWithStartIndex, + getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex, + getNextNonSpaceNonCommentCharacter: getNextNonSpaceNonCommentCharacter, + skip: skip, + skipWhitespace: skipWhitespace, + skipSpaces: skipSpaces, + skipToLineEnd: skipToLineEnd, + skipEverythingButNewLine: skipEverythingButNewLine, + skipInlineComment: skipInlineComment, + skipTrailingComment: skipTrailingComment, + skipNewline: skipNewline$1, + isNextLineEmptyAfterIndex: isNextLineEmptyAfterIndex, + isNextLineEmpty: isNextLineEmpty, + isPreviousLineEmpty: isPreviousLineEmpty$1, + hasNewline: hasNewline$1, + hasNewlineInRange: hasNewlineInRange, + hasSpaces: hasSpaces, + setLocStart: setLocStart, + setLocEnd: setLocEnd, + startsWithNoLookaheadToken: startsWithNoLookaheadToken, + getAlignmentSize: getAlignmentSize, + getIndentSize: getIndentSize, + getPreferredQuote: getPreferredQuote, + printString: printString, + printNumber: printNumber, + hasIgnoreComment: hasIgnoreComment, + hasNodeIgnoreComment: hasNodeIgnoreComment, + makeString: makeString, + matchAncestorTypes: matchAncestorTypes, + addLeadingComment: addLeadingComment$1, + addDanglingComment: addDanglingComment$1, + addTrailingComment: addTrailingComment$1, + isWithinParentArrayProperty: isWithinParentArrayProperty +}; + +function guessEndOfLine$1(text) { + var index = text.indexOf("\r"); + + if (index >= 0) { + return text.charAt(index + 1) === "\n" ? "crlf" : "cr"; + } + + return "lf"; +} + +function convertEndOfLineToChars$2(value) { + switch (value) { + case "cr": + return "\r"; + + case "crlf": + return "\r\n"; + + default: + return "\n"; + } +} + +var endOfLine = { + guessEndOfLine: guessEndOfLine$1, + convertEndOfLineToChars: convertEndOfLineToChars$2 +}; + +var getStringWidth = util.getStringWidth; +var convertEndOfLineToChars$1 = endOfLine.convertEndOfLineToChars; +var concat$2 = docBuilders.concat; +var fill$1 = docBuilders.fill; +var cursor$2 = docBuilders.cursor; +/** @type {{[groupId: PropertyKey]: MODE}} */ + +var groupModeMap; +var MODE_BREAK = 1; +var MODE_FLAT = 2; + +function rootIndent() { + return { + value: "", + length: 0, + queue: [] + }; +} + +function makeIndent(ind, options) { + return generateInd(ind, { + type: "indent" + }, options); +} + +function makeAlign(ind, n, options) { + return n === -Infinity ? ind.root || rootIndent() : n < 0 ? generateInd(ind, { + type: "dedent" + }, options) : !n ? ind : n.type === "root" ? Object.assign({}, ind, { + root: ind + }) : typeof n === "string" ? generateInd(ind, { + type: "stringAlign", + n: n + }, options) : generateInd(ind, { + type: "numberAlign", + n: n + }, options); +} + +function generateInd(ind, newPart, options) { + var queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : ind.queue.concat(newPart); + var value = ""; + var length = 0; + var lastTabs = 0; + var lastSpaces = 0; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = queue[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var part = _step.value; + + switch (part.type) { + case "indent": + flush(); + + if (options.useTabs) { + addTabs(1); + } else { + addSpaces(options.tabWidth); + } + + break; + + case "stringAlign": + flush(); + value += part.n; + length += part.n.length; + break; + + case "numberAlign": + lastTabs += 1; + lastSpaces += part.n; + break; + + /* istanbul ignore next */ + + default: + throw new Error("Unexpected type '".concat(part.type, "'")); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + flushSpaces(); + return Object.assign({}, ind, { + value: value, + length: length, + queue: queue + }); + + function addTabs(count) { + value += "\t".repeat(count); + length += options.tabWidth * count; + } + + function addSpaces(count) { + value += " ".repeat(count); + length += count; + } + + function flush() { + if (options.useTabs) { + flushTabs(); + } else { + flushSpaces(); + } + } + + function flushTabs() { + if (lastTabs > 0) { + addTabs(lastTabs); + } + + resetLast(); + } + + function flushSpaces() { + if (lastSpaces > 0) { + addSpaces(lastSpaces); + } + + resetLast(); + } + + function resetLast() { + lastTabs = 0; + lastSpaces = 0; + } +} + +function trim$1(out) { + if (out.length === 0) { + return 0; + } + + var trimCount = 0; // Trim whitespace at the end of line + + while (out.length > 0 && typeof out[out.length - 1] === "string" && out[out.length - 1].match(/^[ \t]*$/)) { + trimCount += out.pop().length; + } + + if (out.length && typeof out[out.length - 1] === "string") { + var trimmed = out[out.length - 1].replace(/[ \t]*$/, ""); + trimCount += out[out.length - 1].length - trimmed.length; + out[out.length - 1] = trimmed; + } + + return trimCount; +} + +function fits(next, restCommands, width, options, mustBeFlat) { + var restIdx = restCommands.length; + var cmds = [next]; // `out` is only used for width counting because `trim` requires to look + // backwards for space characters. + + var out = []; + + while (width >= 0) { + if (cmds.length === 0) { + if (restIdx === 0) { + return true; + } + + cmds.push(restCommands[restIdx - 1]); + restIdx--; + continue; + } + + var x = cmds.pop(); + var ind = x[0]; + var mode = x[1]; + var doc = x[2]; + + if (typeof doc === "string") { + out.push(doc); + width -= getStringWidth(doc); + } else { + switch (doc.type) { + case "concat": + for (var i = doc.parts.length - 1; i >= 0; i--) { + cmds.push([ind, mode, doc.parts[i]]); + } + + break; + + case "indent": + cmds.push([makeIndent(ind, options), mode, doc.contents]); + break; + + case "align": + cmds.push([makeAlign(ind, doc.n, options), mode, doc.contents]); + break; + + case "trim": + width += trim$1(out); + break; + + case "group": + if (mustBeFlat && doc.break) { + return false; + } + + cmds.push([ind, doc.break ? MODE_BREAK : mode, doc.contents]); + + if (doc.id) { + groupModeMap[doc.id] = cmds[cmds.length - 1][1]; + } + + break; + + case "fill": + for (var _i = doc.parts.length - 1; _i >= 0; _i--) { + cmds.push([ind, mode, doc.parts[_i]]); + } + + break; + + case "if-break": + { + var groupMode = doc.groupId ? groupModeMap[doc.groupId] : mode; + + if (groupMode === MODE_BREAK) { + if (doc.breakContents) { + cmds.push([ind, mode, doc.breakContents]); + } + } + + if (groupMode === MODE_FLAT) { + if (doc.flatContents) { + cmds.push([ind, mode, doc.flatContents]); + } + } + + break; + } + + case "line": + switch (mode) { + // fallthrough + case MODE_FLAT: + if (!doc.hard) { + if (!doc.soft) { + out.push(" "); + width -= 1; + } + + break; + } + + return true; + + case MODE_BREAK: + return true; + } + + break; + } + } + } + + return false; +} + +function printDocToString(doc, options) { + groupModeMap = {}; + var width = options.printWidth; + var newLine = convertEndOfLineToChars$1(options.endOfLine); + var pos = 0; // cmds is basically a stack. We've turned a recursive call into a + // while loop which is much faster. The while loop below adds new + // cmds to the array instead of recursively calling `print`. + + var cmds = [[rootIndent(), MODE_BREAK, doc]]; + var out = []; + var shouldRemeasure = false; + var lineSuffix = []; + + while (cmds.length !== 0) { + var x = cmds.pop(); + var ind = x[0]; + var mode = x[1]; + var _doc = x[2]; + + if (typeof _doc === "string") { + out.push(_doc); + pos += getStringWidth(_doc); + } else { + switch (_doc.type) { + case "cursor": + out.push(cursor$2.placeholder); + break; + + case "concat": + for (var i = _doc.parts.length - 1; i >= 0; i--) { + cmds.push([ind, mode, _doc.parts[i]]); + } + + break; + + case "indent": + cmds.push([makeIndent(ind, options), mode, _doc.contents]); + break; + + case "align": + cmds.push([makeAlign(ind, _doc.n, options), mode, _doc.contents]); + break; + + case "trim": + pos -= trim$1(out); + break; + + case "group": + switch (mode) { + case MODE_FLAT: + if (!shouldRemeasure) { + cmds.push([ind, _doc.break ? MODE_BREAK : MODE_FLAT, _doc.contents]); + break; + } + + // fallthrough + + case MODE_BREAK: + { + shouldRemeasure = false; + var next = [ind, MODE_FLAT, _doc.contents]; + var rem = width - pos; + + if (!_doc.break && fits(next, cmds, rem, options)) { + cmds.push(next); + } else { + // Expanded states are a rare case where a document + // can manually provide multiple representations of + // itself. It provides an array of documents + // going from the least expanded (most flattened) + // representation first to the most expanded. If a + // group has these, we need to manually go through + // these states and find the first one that fits. + if (_doc.expandedStates) { + var mostExpanded = _doc.expandedStates[_doc.expandedStates.length - 1]; + + if (_doc.break) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + break; + } else { + for (var _i2 = 1; _i2 < _doc.expandedStates.length + 1; _i2++) { + if (_i2 >= _doc.expandedStates.length) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + break; + } else { + var state = _doc.expandedStates[_i2]; + var cmd = [ind, MODE_FLAT, state]; + + if (fits(cmd, cmds, rem, options)) { + cmds.push(cmd); + break; + } + } + } + } + } else { + cmds.push([ind, MODE_BREAK, _doc.contents]); + } + } + + break; + } + } + + if (_doc.id) { + groupModeMap[_doc.id] = cmds[cmds.length - 1][1]; + } + + break; + // Fills each line with as much code as possible before moving to a new + // line with the same indentation. + // + // Expects doc.parts to be an array of alternating content and + // whitespace. The whitespace contains the linebreaks. + // + // For example: + // ["I", line, "love", line, "monkeys"] + // or + // [{ type: group, ... }, softline, { type: group, ... }] + // + // It uses this parts structure to handle three main layout cases: + // * The first two content items fit on the same line without + // breaking + // -> output the first content item and the whitespace "flat". + // * Only the first content item fits on the line without breaking + // -> output the first content item "flat" and the whitespace with + // "break". + // * Neither content item fits on the line without breaking + // -> output the first content item and the whitespace with "break". + + case "fill": + { + var _rem = width - pos; + + var parts = _doc.parts; + + if (parts.length === 0) { + break; + } + + var content = parts[0]; + var contentFlatCmd = [ind, MODE_FLAT, content]; + var contentBreakCmd = [ind, MODE_BREAK, content]; + var contentFits = fits(contentFlatCmd, [], _rem, options, true); + + if (parts.length === 1) { + if (contentFits) { + cmds.push(contentFlatCmd); + } else { + cmds.push(contentBreakCmd); + } + + break; + } + + var whitespace = parts[1]; + var whitespaceFlatCmd = [ind, MODE_FLAT, whitespace]; + var whitespaceBreakCmd = [ind, MODE_BREAK, whitespace]; + + if (parts.length === 2) { + if (contentFits) { + cmds.push(whitespaceFlatCmd); + cmds.push(contentFlatCmd); + } else { + cmds.push(whitespaceBreakCmd); + cmds.push(contentBreakCmd); + } + + break; + } // At this point we've handled the first pair (context, separator) + // and will create a new fill doc for the rest of the content. + // Ideally we wouldn't mutate the array here but coping all the + // elements to a new array would make this algorithm quadratic, + // which is unusable for large arrays (e.g. large texts in JSX). + + + parts.splice(0, 2); + var remainingCmd = [ind, mode, fill$1(parts)]; + var secondContent = parts[0]; + var firstAndSecondContentFlatCmd = [ind, MODE_FLAT, concat$2([content, whitespace, secondContent])]; + var firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], _rem, options, true); + + if (firstAndSecondContentFits) { + cmds.push(remainingCmd); + cmds.push(whitespaceFlatCmd); + cmds.push(contentFlatCmd); + } else if (contentFits) { + cmds.push(remainingCmd); + cmds.push(whitespaceBreakCmd); + cmds.push(contentFlatCmd); + } else { + cmds.push(remainingCmd); + cmds.push(whitespaceBreakCmd); + cmds.push(contentBreakCmd); + } + + break; + } + + case "if-break": + { + var groupMode = _doc.groupId ? groupModeMap[_doc.groupId] : mode; + + if (groupMode === MODE_BREAK) { + if (_doc.breakContents) { + cmds.push([ind, mode, _doc.breakContents]); + } + } + + if (groupMode === MODE_FLAT) { + if (_doc.flatContents) { + cmds.push([ind, mode, _doc.flatContents]); + } + } + + break; + } + + case "line-suffix": + lineSuffix.push([ind, mode, _doc.contents]); + break; + + case "line-suffix-boundary": + if (lineSuffix.length > 0) { + cmds.push([ind, mode, { + type: "line", + hard: true + }]); + } + + break; + + case "line": + switch (mode) { + case MODE_FLAT: + if (!_doc.hard) { + if (!_doc.soft) { + out.push(" "); + pos += 1; + } + + break; + } else { + // This line was forced into the output even if we + // were in flattened mode, so we need to tell the next + // group that no matter what, it needs to remeasure + // because the previous measurement didn't accurately + // capture the entire expression (this is necessary + // for nested groups) + shouldRemeasure = true; + } + + // fallthrough + + case MODE_BREAK: + if (lineSuffix.length) { + cmds.push([ind, mode, _doc]); + [].push.apply(cmds, lineSuffix.reverse()); + lineSuffix = []; + break; + } + + if (_doc.literal) { + if (ind.root) { + out.push(newLine, ind.root.value); + pos = ind.root.length; + } else { + out.push(newLine); + pos = 0; + } + } else { + pos -= trim$1(out); + out.push(newLine + ind.value); + pos = ind.length; + } + + break; + } + + break; + + default: + } + } + } + + var cursorPlaceholderIndex = out.indexOf(cursor$2.placeholder); + + if (cursorPlaceholderIndex !== -1) { + var otherCursorPlaceholderIndex = out.indexOf(cursor$2.placeholder, cursorPlaceholderIndex + 1); + var beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); + var aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join(""); + var afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join(""); + return { + formatted: beforeCursor + aroundCursor + afterCursor, + cursorNodeStart: beforeCursor.length, + cursorNodeText: aroundCursor + }; + } + + return { + formatted: out.join("") + }; +} + +var docPrinter = { + printDocToString: printDocToString +}; + +var traverseDocOnExitStackMarker = {}; + +function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { + var docsStack = [doc]; + + while (docsStack.length !== 0) { + var _doc = docsStack.pop(); + + if (_doc === traverseDocOnExitStackMarker) { + onExit(docsStack.pop()); + continue; + } + + var shouldRecurse = true; + + if (onEnter) { + if (onEnter(_doc) === false) { + shouldRecurse = false; + } + } + + if (onExit) { + docsStack.push(_doc); + docsStack.push(traverseDocOnExitStackMarker); + } + + if (shouldRecurse) { + // When there are multiple parts to process, + // the parts need to be pushed onto the stack in reverse order, + // so that they are processed in the original order + // when the stack is popped. + if (_doc.type === "concat" || _doc.type === "fill") { + for (var ic = _doc.parts.length, i = ic - 1; i >= 0; --i) { + docsStack.push(_doc.parts[i]); + } + } else if (_doc.type === "if-break") { + if (_doc.flatContents) { + docsStack.push(_doc.flatContents); + } + + if (_doc.breakContents) { + docsStack.push(_doc.breakContents); + } + } else if (_doc.type === "group" && _doc.expandedStates) { + if (shouldTraverseConditionalGroups) { + for (var _ic = _doc.expandedStates.length, _i = _ic - 1; _i >= 0; --_i) { + docsStack.push(_doc.expandedStates[_i]); + } + } else { + docsStack.push(_doc.contents); + } + } else if (_doc.contents) { + docsStack.push(_doc.contents); + } + } + } +} + +function mapDoc(doc, cb) { + if (doc.type === "concat" || doc.type === "fill") { + var parts = doc.parts.map(function (part) { + return mapDoc(part, cb); + }); + return cb(Object.assign({}, doc, { + parts: parts + })); + } else if (doc.type === "if-break") { + var breakContents = doc.breakContents && mapDoc(doc.breakContents, cb); + var flatContents = doc.flatContents && mapDoc(doc.flatContents, cb); + return cb(Object.assign({}, doc, { + breakContents: breakContents, + flatContents: flatContents + })); + } else if (doc.contents) { + var contents = mapDoc(doc.contents, cb); + return cb(Object.assign({}, doc, { + contents: contents + })); + } + + return cb(doc); +} + +function findInDoc(doc, fn, defaultValue) { + var result = defaultValue; + var hasStopped = false; + + function findInDocOnEnterFn(doc) { + var maybeResult = fn(doc); + + if (maybeResult !== undefined) { + hasStopped = true; + result = maybeResult; + } + + if (hasStopped) { + return false; + } + } + + traverseDoc(doc, findInDocOnEnterFn); + return result; +} + +function isEmpty(n) { + return typeof n === "string" && n.length === 0; +} + +function isLineNextFn(doc) { + if (typeof doc === "string") { + return false; + } + + if (doc.type === "line") { + return true; + } +} + +function isLineNext(doc) { + return findInDoc(doc, isLineNextFn, false); +} + +function willBreakFn(doc) { + if (doc.type === "group" && doc.break) { + return true; + } + + if (doc.type === "line" && doc.hard) { + return true; + } + + if (doc.type === "break-parent") { + return true; + } +} + +function willBreak(doc) { + return findInDoc(doc, willBreakFn, false); +} + +function breakParentGroup(groupStack) { + if (groupStack.length > 0) { + var parentGroup = groupStack[groupStack.length - 1]; // Breaks are not propagated through conditional groups because + // the user is expected to manually handle what breaks. + + if (!parentGroup.expandedStates) { + parentGroup.break = true; + } + } + + return null; +} + +function propagateBreaks(doc) { + var alreadyVisitedSet = new Set(); + var groupStack = []; + + function propagateBreaksOnEnterFn(doc) { + if (doc.type === "break-parent") { + breakParentGroup(groupStack); + } + + if (doc.type === "group") { + groupStack.push(doc); + + if (alreadyVisitedSet.has(doc)) { + return false; + } + + alreadyVisitedSet.add(doc); + } + } + + function propagateBreaksOnExitFn(doc) { + if (doc.type === "group") { + var group = groupStack.pop(); + + if (group.break) { + breakParentGroup(groupStack); + } + } + } + + traverseDoc(doc, propagateBreaksOnEnterFn, propagateBreaksOnExitFn, + /* shouldTraverseConditionalGroups */ + true); +} + +function removeLinesFn(doc) { + // Force this doc into flat mode by statically converting all + // lines into spaces (or soft lines into nothing). Hard lines + // should still output because there's too great of a chance + // of breaking existing assumptions otherwise. + if (doc.type === "line" && !doc.hard) { + return doc.soft ? "" : " "; + } else if (doc.type === "if-break") { + return doc.flatContents || ""; + } + + return doc; +} + +function removeLines(doc) { + return mapDoc(doc, removeLinesFn); +} + +function stripTrailingHardline(doc) { + // HACK remove ending hardline, original PR: #1984 + if (doc.type === "concat" && doc.parts.length !== 0) { + var lastPart = doc.parts[doc.parts.length - 1]; + + if (lastPart.type === "concat") { + if (lastPart.parts.length === 2 && lastPart.parts[0].hard && lastPart.parts[1].type === "break-parent") { + return { + type: "concat", + parts: doc.parts.slice(0, -1) + }; + } + + return { + type: "concat", + parts: doc.parts.slice(0, -1).concat(stripTrailingHardline(lastPart)) + }; + } + } + + return doc; +} + +var docUtils = { + isEmpty: isEmpty, + willBreak: willBreak, + isLineNext: isLineNext, + traverseDoc: traverseDoc, + mapDoc: mapDoc, + propagateBreaks: propagateBreaks, + removeLines: removeLines, + stripTrailingHardline: stripTrailingHardline +}; + +function flattenDoc(doc) { + if (doc.type === "concat") { + var res = []; + + for (var i = 0; i < doc.parts.length; ++i) { + var doc2 = doc.parts[i]; + + if (typeof doc2 !== "string" && doc2.type === "concat") { + [].push.apply(res, flattenDoc(doc2).parts); + } else { + var flattened = flattenDoc(doc2); + + if (flattened !== "") { + res.push(flattened); + } + } + } + + return Object.assign({}, doc, { + parts: res + }); + } else if (doc.type === "if-break") { + return Object.assign({}, doc, { + breakContents: doc.breakContents != null ? flattenDoc(doc.breakContents) : null, + flatContents: doc.flatContents != null ? flattenDoc(doc.flatContents) : null + }); + } else if (doc.type === "group") { + return Object.assign({}, doc, { + contents: flattenDoc(doc.contents), + expandedStates: doc.expandedStates ? doc.expandedStates.map(flattenDoc) : doc.expandedStates + }); + } else if (doc.contents) { + return Object.assign({}, doc, { + contents: flattenDoc(doc.contents) + }); + } + + return doc; +} + +function printDoc(doc) { + if (typeof doc === "string") { + return JSON.stringify(doc); + } + + if (doc.type === "line") { + if (doc.literal) { + return "literalline"; + } + + if (doc.hard) { + return "hardline"; + } + + if (doc.soft) { + return "softline"; + } + + return "line"; + } + + if (doc.type === "break-parent") { + return "breakParent"; + } + + if (doc.type === "trim") { + return "trim"; + } + + if (doc.type === "concat") { + return "[" + doc.parts.map(printDoc).join(", ") + "]"; + } + + if (doc.type === "indent") { + return "indent(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "align") { + return doc.n === -Infinity ? "dedentToRoot(" + printDoc(doc.contents) + ")" : doc.n < 0 ? "dedent(" + printDoc(doc.contents) + ")" : doc.n.type === "root" ? "markAsRoot(" + printDoc(doc.contents) + ")" : "align(" + JSON.stringify(doc.n) + ", " + printDoc(doc.contents) + ")"; + } + + if (doc.type === "if-break") { + return "ifBreak(" + printDoc(doc.breakContents) + (doc.flatContents ? ", " + printDoc(doc.flatContents) : "") + ")"; + } + + if (doc.type === "group") { + if (doc.expandedStates) { + return "conditionalGroup(" + "[" + doc.expandedStates.map(printDoc).join(",") + "])"; + } + + return (doc.break ? "wrappedGroup" : "group") + "(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "fill") { + return "fill" + "(" + doc.parts.map(printDoc).join(", ") + ")"; + } + + if (doc.type === "line-suffix") { + return "lineSuffix(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === "line-suffix-boundary") { + return "lineSuffixBoundary"; + } + + throw new Error("Unknown doc type " + doc.type); +} + +var docDebug = { + printDocToDebug: function printDocToDebug(doc) { + return printDoc(flattenDoc(doc)); + } +}; + +var doc = { + builders: docBuilders, + printer: docPrinter, + utils: docUtils, + debug: docDebug +}; + +var mapDoc$1 = doc.utils.mapDoc; + +function isNextLineEmpty$1(text, node, options) { + return util.isNextLineEmpty(text, node, options.locEnd); +} + +function isPreviousLineEmpty$2(text, node, options) { + return util.isPreviousLineEmpty(text, node, options.locStart); +} + +function getNextNonSpaceNonCommentCharacterIndex$1(text, node, options) { + return util.getNextNonSpaceNonCommentCharacterIndex(text, node, options.locEnd); +} + +var utilShared = { + getMaxContinuousCount: util.getMaxContinuousCount, + getStringWidth: util.getStringWidth, + getAlignmentSize: util.getAlignmentSize, + getIndentSize: util.getIndentSize, + skip: util.skip, + skipWhitespace: util.skipWhitespace, + skipSpaces: util.skipSpaces, + skipNewline: util.skipNewline, + skipToLineEnd: util.skipToLineEnd, + skipEverythingButNewLine: util.skipEverythingButNewLine, + skipInlineComment: util.skipInlineComment, + skipTrailingComment: util.skipTrailingComment, + hasNewline: util.hasNewline, + hasNewlineInRange: util.hasNewlineInRange, + hasSpaces: util.hasSpaces, + isNextLineEmpty: isNextLineEmpty$1, + isNextLineEmptyAfterIndex: util.isNextLineEmptyAfterIndex, + isPreviousLineEmpty: isPreviousLineEmpty$2, + getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$1, + mapDoc: mapDoc$1, + // TODO: remove in 2.0, we already exposed it in docUtils + makeString: util.makeString, + addLeadingComment: util.addLeadingComment, + addDanglingComment: util.addDanglingComment, + addTrailingComment: util.addTrailingComment +}; + +var assert$3 = ( assert$2 && assert ) || assert$2; + +var _require$$0$builders = doc.builders; +var concat = _require$$0$builders.concat; +var hardline = _require$$0$builders.hardline; +var breakParent = _require$$0$builders.breakParent; +var indent = _require$$0$builders.indent; +var lineSuffix = _require$$0$builders.lineSuffix; +var join = _require$$0$builders.join; +var cursor = _require$$0$builders.cursor; +var hasNewline = util.hasNewline; +var skipNewline = util.skipNewline; +var isPreviousLineEmpty = util.isPreviousLineEmpty; +var addLeadingComment = utilShared.addLeadingComment; +var addDanglingComment = utilShared.addDanglingComment; +var addTrailingComment = utilShared.addTrailingComment; +var childNodesCacheKey = Symbol("child-nodes"); + +function getSortedChildNodes(node, options, resultArray) { + if (!node) { + return; + } + + var printer = options.printer, + locStart = options.locStart, + locEnd = options.locEnd; + + if (resultArray) { + if (node && printer.canAttachComment && printer.canAttachComment(node)) { + // This reverse insertion sort almost always takes constant + // time because we almost always (maybe always?) append the + // nodes in order anyway. + var i; + + for (i = resultArray.length - 1; i >= 0; --i) { + if (locStart(resultArray[i]) <= locStart(node) && locEnd(resultArray[i]) <= locEnd(node)) { + break; + } + } + + resultArray.splice(i + 1, 0, node); + return; + } + } else if (node[childNodesCacheKey]) { + return node[childNodesCacheKey]; + } + + var childNodes; + + if (printer.getCommentChildNodes) { + childNodes = printer.getCommentChildNodes(node); + } else if (node && _typeof(node) === "object") { + childNodes = Object.keys(node).filter(function (n) { + return n !== "enclosingNode" && n !== "precedingNode" && n !== "followingNode"; + }).map(function (n) { + return node[n]; + }); + } + + if (!childNodes) { + return; + } + + if (!resultArray) { + Object.defineProperty(node, childNodesCacheKey, { + value: resultArray = [], + enumerable: false + }); + } + + childNodes.forEach(function (childNode) { + getSortedChildNodes(childNode, options, resultArray); + }); + return resultArray; +} // As efficiently as possible, decorate the comment object with +// .precedingNode, .enclosingNode, and/or .followingNode properties, at +// least one of which is guaranteed to be defined. + + +function decorateComment(node, comment, options) { + var locStart = options.locStart, + locEnd = options.locEnd; + var childNodes = getSortedChildNodes(node, options); + var precedingNode; + var followingNode; // Time to dust off the old binary search robes and wizard hat. + + var left = 0; + var right = childNodes.length; + + while (left < right) { + var middle = left + right >> 1; + var child = childNodes[middle]; + + if (locStart(child) - locStart(comment) <= 0 && locEnd(comment) - locEnd(child) <= 0) { + // The comment is completely contained by this child node. + comment.enclosingNode = child; + decorateComment(child, comment, options); + return; // Abandon the binary search at this level. + } + + if (locEnd(child) - locStart(comment) <= 0) { + // This child node falls completely before the comment. + // Because we will never consider this node or any nodes + // before it again, this node must be the closest preceding + // node we have encountered so far. + precedingNode = child; + left = middle + 1; + continue; + } + + if (locEnd(comment) - locStart(child) <= 0) { + // This child node falls completely after the comment. + // Because we will never consider this node or any nodes after + // it again, this node must be the closest following node we + // have encountered so far. + followingNode = child; + right = middle; + continue; + } + /* istanbul ignore next */ + + + throw new Error("Comment location overlaps with node location"); + } // We don't want comments inside of different expressions inside of the same + // template literal to move to another expression. + + + if (comment.enclosingNode && comment.enclosingNode.type === "TemplateLiteral") { + var quasis = comment.enclosingNode.quasis; + var commentIndex = findExpressionIndexForComment(quasis, comment, options); + + if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options) !== commentIndex) { + precedingNode = null; + } + + if (followingNode && findExpressionIndexForComment(quasis, followingNode, options) !== commentIndex) { + followingNode = null; + } + } + + if (precedingNode) { + comment.precedingNode = precedingNode; + } + + if (followingNode) { + comment.followingNode = followingNode; + } +} + +function attach(comments, ast, text, options) { + if (!Array.isArray(comments)) { + return; + } + + var tiesToBreak = []; + var locStart = options.locStart, + locEnd = options.locEnd; + comments.forEach(function (comment, i) { + if (options.parser === "json" || options.parser === "json5" || options.parser === "__js_expression" || options.parser === "__vue_expression") { + if (locStart(comment) - locStart(ast) <= 0) { + addLeadingComment(ast, comment); + return; + } + + if (locEnd(comment) - locEnd(ast) >= 0) { + addTrailingComment(ast, comment); + return; + } + } + + decorateComment(ast, comment, options); + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + var pluginHandleOwnLineComment = options.printer.handleComments && options.printer.handleComments.ownLine ? options.printer.handleComments.ownLine : function () { + return false; + }; + var pluginHandleEndOfLineComment = options.printer.handleComments && options.printer.handleComments.endOfLine ? options.printer.handleComments.endOfLine : function () { + return false; + }; + var pluginHandleRemainingComment = options.printer.handleComments && options.printer.handleComments.remaining ? options.printer.handleComments.remaining : function () { + return false; + }; + var isLastComment = comments.length - 1 === i; + + if (hasNewline(text, locStart(comment), { + backwards: true + })) { + // If a comment exists on its own line, prefer a leading comment. + // We also need to check if it's the first line of the file. + if (pluginHandleOwnLineComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (followingNode) { + // Always a leading comment. + addLeadingComment(followingNode, comment); + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } else if (hasNewline(text, locEnd(comment))) { + if (pluginHandleEndOfLineComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (precedingNode) { + // There is content before this comment on the same line, but + // none after it, so prefer a trailing comment of the previous node. + addTrailingComment(precedingNode, comment); + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } else { + if (pluginHandleRemainingComment(comment, text, options, ast, isLastComment)) {// We're good + } else if (precedingNode && followingNode) { + // Otherwise, text exists both before and after the comment on + // the same line. If there is both a preceding and following + // node, use a tie-breaking algorithm to determine if it should + // be attached to the next or previous node. In the last case, + // simply attach the right node; + var tieCount = tiesToBreak.length; + + if (tieCount > 0) { + var lastTie = tiesToBreak[tieCount - 1]; + + if (lastTie.followingNode !== comment.followingNode) { + breakTies(tiesToBreak, text, options); + } + } + + tiesToBreak.push(comment); + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + + /* istanbul ignore next */ + addDanglingComment(ast, comment); + } + } + }); + breakTies(tiesToBreak, text, options); + comments.forEach(function (comment) { + // These node references were useful for breaking ties, but we + // don't need them anymore, and they create cycles in the AST that + // may lead to infinite recursion if we don't delete them here. + delete comment.precedingNode; + delete comment.enclosingNode; + delete comment.followingNode; + }); +} + +function breakTies(tiesToBreak, text, options) { + var tieCount = tiesToBreak.length; + + if (tieCount === 0) { + return; + } + + var _tiesToBreak$ = tiesToBreak[0], + precedingNode = _tiesToBreak$.precedingNode, + followingNode = _tiesToBreak$.followingNode; + var gapEndPos = options.locStart(followingNode); // Iterate backwards through tiesToBreak, examining the gaps + // between the tied comments. In order to qualify as leading, a + // comment must be separated from followingNode by an unbroken series of + // gaps (or other comments). Gaps should only contain whitespace or open + // parentheses. + + var indexOfFirstLeadingComment; + + for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) { + var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert$3.strictEqual(comment.precedingNode, precedingNode); + assert$3.strictEqual(comment.followingNode, followingNode); + var gap = text.slice(options.locEnd(comment), gapEndPos).trim(); + + if (gap === "" || /^\(+$/.test(gap)) { + gapEndPos = options.locStart(comment); + } else { + // The gap string contained something other than whitespace or open + // parentheses. + break; + } + } + + tiesToBreak.forEach(function (comment, i) { + if (i < indexOfFirstLeadingComment) { + addTrailingComment(precedingNode, comment); + } else { + addLeadingComment(followingNode, comment); + } + }); + tiesToBreak.length = 0; +} + +function printComment(commentPath, options) { + var comment = commentPath.getValue(); + comment.printed = true; + return options.printer.printComment(commentPath, options); +} + +function findExpressionIndexForComment(quasis, comment, options) { + var startPos = options.locStart(comment) - 1; + + for (var i = 1; i < quasis.length; ++i) { + if (startPos < getQuasiRange(quasis[i]).start) { + return i - 1; + } + } // We haven't found it, it probably means that some of the locations are off. + // Let's just return the first one. + + /* istanbul ignore next */ + + + return 0; +} + +function getQuasiRange(expr) { + if (expr.start !== undefined) { + // Babylon + return { + start: expr.start, + end: expr.end + }; + } // Flow + + + return { + start: expr.range[0], + end: expr.range[1] + }; +} + +function printLeadingComment(commentPath, print, options) { + var comment = commentPath.getValue(); + var contents = printComment(commentPath, options); + + if (!contents) { + return ""; + } + + var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // Leading block comments should see if they need to stay on the + // same line or not. + + if (isBlock) { + return concat([contents, hasNewline(options.originalText, options.locEnd(comment)) ? hardline : " "]); + } + + return concat([contents, hardline]); +} + +function printTrailingComment(commentPath, print, options) { + var comment = commentPath.getValue(); + var contents = printComment(commentPath, options); + + if (!contents) { + return ""; + } + + var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // We don't want the line to break + // when the parentParentNode is a ClassDeclaration/-Expression + // And the parentNode is in the superClass property + + var parentNode = commentPath.getNode(1); + var parentParentNode = commentPath.getNode(2); + var isParentSuperClass = parentParentNode && (parentParentNode.type === "ClassDeclaration" || parentParentNode.type === "ClassExpression") && parentParentNode.superClass === parentNode; + + if (hasNewline(options.originalText, options.locStart(comment), { + backwards: true + })) { + // This allows comments at the end of nested structures: + // { + // x: 1, + // y: 2 + // // A comment + // } + // Those kinds of comments are almost always leading comments, but + // here it doesn't go "outside" the block and turns it into a + // trailing comment for `2`. We can simulate the above by checking + // if this a comment on its own line; normal trailing comments are + // always at the end of another expression. + var isLineBeforeEmpty = isPreviousLineEmpty(options.originalText, comment, options.locStart); + return lineSuffix(concat([hardline, isLineBeforeEmpty ? hardline : "", contents])); + } else if (isBlock || isParentSuperClass) { + // Trailing block comments never need a newline + return concat([" ", contents]); + } + + return concat([lineSuffix(" " + contents), !isBlock ? breakParent : ""]); +} + +function printDanglingComments(path, options, sameIndent, filter) { + var parts = []; + var node = path.getValue(); + + if (!node || !node.comments) { + return ""; + } + + path.each(function (commentPath) { + var comment = commentPath.getValue(); + + if (comment && !comment.leading && !comment.trailing && (!filter || filter(comment))) { + parts.push(printComment(commentPath, options)); + } + }, "comments"); + + if (parts.length === 0) { + return ""; + } + + if (sameIndent) { + return join(hardline, parts); + } + + return indent(concat([hardline, join(hardline, parts)])); +} + +function prependCursorPlaceholder(path, options, printed) { + if (path.getNode() === options.cursorNode && path.getValue()) { + return concat([cursor, printed, cursor]); + } + + return printed; +} + +function printComments(path, print, options, needsSemi) { + var value = path.getValue(); + var printed = print(path); + var comments = value && value.comments; + + if (!comments || comments.length === 0) { + return prependCursorPlaceholder(path, options, printed); + } + + var leadingParts = []; + var trailingParts = [needsSemi ? ";" : "", printed]; + path.each(function (commentPath) { + var comment = commentPath.getValue(); + var leading = comment.leading, + trailing = comment.trailing; + + if (leading) { + var contents = printLeadingComment(commentPath, print, options); + + if (!contents) { + return; + } + + leadingParts.push(contents); + var text = options.originalText; + + if (hasNewline(text, skipNewline(text, options.locEnd(comment)))) { + leadingParts.push(hardline); + } + } else if (trailing) { + trailingParts.push(printTrailingComment(commentPath, print, options)); + } + }, "comments"); + return prependCursorPlaceholder(path, options, concat(leadingParts.concat(trailingParts))); +} + +var comments = { + attach: attach, + printComments: printComments, + printDanglingComments: printDanglingComments, + getSortedChildNodes: getSortedChildNodes +}; + +function FastPath(value) { + assert$3.ok(this instanceof FastPath); + this.stack = [value]; +} // The name of the current property is always the penultimate element of +// this.stack, and always a String. + + +FastPath.prototype.getName = function getName() { + var s = this.stack; + var len = s.length; + + if (len > 1) { + return s[len - 2]; + } // Since the name is always a string, null is a safe sentinel value to + // return if we do not know the name of the (root) value. + + /* istanbul ignore next */ + + + return null; +}; // The value of the current property is always the final element of +// this.stack. + + +FastPath.prototype.getValue = function getValue() { + var s = this.stack; + return s[s.length - 1]; +}; + +function getNodeHelper(path, count) { + var s = path.stack; + + for (var i = s.length - 1; i >= 0; i -= 2) { + var value = s[i]; + + if (value && !Array.isArray(value) && --count < 0) { + return value; + } + } + + return null; +} + +FastPath.prototype.getNode = function getNode(count) { + return getNodeHelper(this, ~~count); +}; + +FastPath.prototype.getParentNode = function getParentNode(count) { + return getNodeHelper(this, ~~count + 1); +}; // Temporarily push properties named by string arguments given after the +// callback function onto this.stack, then call the callback with a +// reference to this (modified) FastPath object. Note that the stack will +// be restored to its original state after the callback is finished, so it +// is probably a mistake to retain a reference to the path. + + +FastPath.prototype.call = function call(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + var result = callback(this); + s.length = origLen; + return result; +}; // Similar to FastPath.prototype.call, except that the value obtained by +// accessing this.getValue()[name1][name2]... should be array-like. The +// callback will be called with a reference to this path object for each +// element of the array. + + +FastPath.prototype.each = function each(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + for (var _i = 0; _i < value.length; ++_i) { + if (_i in value) { + s.push(_i, value[_i]); // If the callback needs to know the value of i, call + // path.getName(), assuming path is the parameter name. + + callback(this); + s.length -= 2; + } + } + + s.length = origLen; +}; // Similar to FastPath.prototype.each, except that the results of the +// callback function invocations are stored in an array and returned at +// the end of the iteration. + + +FastPath.prototype.map = function map(callback +/*, name1, name2, ... */ +) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + var result = new Array(value.length); + + for (var _i2 = 0; _i2 < value.length; ++_i2) { + if (_i2 in value) { + s.push(_i2, value[_i2]); + result[_i2] = callback(this, _i2); + s.length -= 2; + } + } + + s.length = origLen; + return result; +}; + +var fastPath = FastPath; + +var normalize$3 = options.normalize; + +function printSubtree(path, print, options$$1, printAstToDoc) { + if (options$$1.printer.embed) { + return options$$1.printer.embed(path, print, function (text, partialNextOptions) { + return textToDoc(text, partialNextOptions, options$$1, printAstToDoc); + }, options$$1); + } +} + +function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc) { + var nextOptions = normalize$3(Object.assign({}, parentOptions, partialNextOptions, { + parentParser: parentOptions.parser, + originalText: text + }), { + passThrough: true + }); + var result = parser.parse(text, nextOptions); + var ast = result.ast; + text = result.text; + var astComments = ast.comments; + delete ast.comments; + comments.attach(astComments, ast, text, nextOptions); + return printAstToDoc(ast, nextOptions); +} + +var multiparser = { + printSubtree: printSubtree +}; + +var doc$2 = doc; +var docBuilders$2 = doc$2.builders; +var concat$3 = docBuilders$2.concat; +var hardline$2 = docBuilders$2.hardline; +var addAlignmentToDoc$1 = docBuilders$2.addAlignmentToDoc; +var docUtils$2 = doc$2.utils; +/** + * Takes an abstract syntax tree (AST) and recursively converts it to a + * document (series of printing primitives). + * + * This is done by descending down the AST recursively. The recursion + * involves two functions that call each other: + * + * 1. printGenerically(), which is defined as an inner function here. + * It basically takes care of node caching. + * 2. callPluginPrintFunction(), which checks for some options, and + * ultimately calls the print() function provided by the plugin. + * + * The plugin function will call printGenerically() again for child nodes + * of the current node, which will do its housekeeping, then call the + * plugin function again, and so on. + * + * All the while, these functions pass a "path" variable around, which + * is a stack-like data structure (FastPath) that maintains the current + * state of the recursion. It is called "path", because it represents + * the path to the current node through the Abstract Syntax Tree. + */ + +function printAstToDoc(ast, options) { + var alignmentSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var printer = options.printer; + + if (printer.preprocess) { + ast = printer.preprocess(ast, options); + } + + var cache = new Map(); + + function printGenerically(path, args) { + var node = path.getValue(); + var shouldCache = node && _typeof(node) === "object" && args === undefined; + + if (shouldCache && cache.has(node)) { + return cache.get(node); + } // We let JSXElement print its comments itself because it adds () around + // UnionTypeAnnotation has to align the child without the comments + + + var res; + + if (printer.willPrintOwnComments && printer.willPrintOwnComments(path)) { + res = callPluginPrintFunction(path, options, printGenerically, args); + } else { + // printComments will call the plugin print function and check for + // comments to print + res = comments.printComments(path, function (p) { + return callPluginPrintFunction(p, options, printGenerically, args); + }, options, args && args.needsSemi); + } + + if (shouldCache) { + cache.set(node, res); + } + + return res; + } + + var doc$$2 = printGenerically(new fastPath(ast)); + + if (alignmentSize > 0) { + // Add a hardline to make the indents take effect + // It should be removed in index.js format() + doc$$2 = addAlignmentToDoc$1(docUtils$2.removeLines(concat$3([hardline$2, doc$$2])), alignmentSize, options.tabWidth); + } + + docUtils$2.propagateBreaks(doc$$2); + return doc$$2; +} + +function callPluginPrintFunction(path, options, printPath, args) { + assert$3.ok(path instanceof fastPath); + var node = path.getValue(); + var printer = options.printer; // Escape hatch + + if (printer.hasPrettierIgnore && printer.hasPrettierIgnore(path)) { + return options.originalText.slice(options.locStart(node), options.locEnd(node)); + } + + if (node) { + try { + // Potentially switch to a different parser + var sub = multiparser.printSubtree(path, printPath, options, printAstToDoc); + + if (sub) { + return sub; + } + } catch (error) { + /* istanbul ignore if */ + if (commonjsGlobal.PRETTIER_DEBUG) { + throw error; + } // Continue with current parser + + } + } + + return printer.print(path, options, printPath, args); +} + +var astToDoc = printAstToDoc; + +function findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts) { + var resultStartNode = startNodeAndParents.node; + var resultEndNode = endNodeAndParents.node; + + if (resultStartNode === resultEndNode) { + return { + startNode: resultStartNode, + endNode: resultEndNode + }; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = endNodeAndParents.parentNodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var endParent = _step.value; + + if (endParent.type !== "Program" && endParent.type !== "File" && opts.locStart(endParent) >= opts.locStart(startNodeAndParents.node)) { + resultEndNode = endParent; + } else { + break; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = startNodeAndParents.parentNodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var startParent = _step2.value; + + if (startParent.type !== "Program" && startParent.type !== "File" && opts.locEnd(startParent) <= opts.locEnd(endNodeAndParents.node)) { + resultStartNode = startParent; + } else { + break; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return { + startNode: resultStartNode, + endNode: resultEndNode + }; +} + +function findNodeAtOffset(node, offset, options, predicate, parentNodes) { + predicate = predicate || function () { + return true; + }; + + parentNodes = parentNodes || []; + var start = options.locStart(node, options.locStart); + var end = options.locEnd(node, options.locEnd); + + if (start <= offset && offset <= end) { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = comments.getSortedChildNodes(node, options)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var childNode = _step3.value; + var childResult = findNodeAtOffset(childNode, offset, options, predicate, [node].concat(parentNodes)); + + if (childResult) { + return childResult; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + if (predicate(node)) { + return { + node: node, + parentNodes: parentNodes + }; + } + } +} // See https://www.ecma-international.org/ecma-262/5.1/#sec-A.5 + + +function isSourceElement(opts, node) { + if (node == null) { + return false; + } // JS and JS like to avoid repetitions + + + var jsSourceElements = ["FunctionDeclaration", "BlockStatement", "BreakStatement", "ContinueStatement", "DebuggerStatement", "DoWhileStatement", "EmptyStatement", "ExpressionStatement", "ForInStatement", "ForStatement", "IfStatement", "LabeledStatement", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "VariableDeclaration", "WhileStatement", "WithStatement", "ClassDeclaration", // ES 2015 + "ImportDeclaration", // Module + "ExportDefaultDeclaration", // Module + "ExportNamedDeclaration", // Module + "ExportAllDeclaration", // Module + "TypeAlias", // Flow + "InterfaceDeclaration", // Flow, TypeScript + "TypeAliasDeclaration", // TypeScript + "ExportAssignment", // TypeScript + "ExportDeclaration" // TypeScript + ]; + var jsonSourceElements = ["ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral"]; + var graphqlSourceElements = ["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]; + + switch (opts.parser) { + case "flow": + case "babylon": + case "typescript": + return jsSourceElements.indexOf(node.type) > -1; + + case "json": + return jsonSourceElements.indexOf(node.type) > -1; + + case "graphql": + return graphqlSourceElements.indexOf(node.kind) > -1; + + case "vue": + return node.tag !== "root"; + } + + return false; +} + +function calculateRange(text, opts, ast) { + // Contract the range so that it has non-whitespace characters at its endpoints. + // This ensures we can format a range that doesn't end on a node. + var rangeStringOrig = text.slice(opts.rangeStart, opts.rangeEnd); + var startNonWhitespace = Math.max(opts.rangeStart + rangeStringOrig.search(/\S/), opts.rangeStart); + var endNonWhitespace; + + for (endNonWhitespace = opts.rangeEnd; endNonWhitespace > opts.rangeStart; --endNonWhitespace) { + if (text[endNonWhitespace - 1].match(/\S/)) { + break; + } + } + + var startNodeAndParents = findNodeAtOffset(ast, startNonWhitespace, opts, function (node) { + return isSourceElement(opts, node); + }); + var endNodeAndParents = findNodeAtOffset(ast, endNonWhitespace, opts, function (node) { + return isSourceElement(opts, node); + }); + + if (!startNodeAndParents || !endNodeAndParents) { + return { + rangeStart: 0, + rangeEnd: 0 + }; + } + + var siblingAncestors = findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts); + var startNode = siblingAncestors.startNode, + endNode = siblingAncestors.endNode; + var rangeStart = Math.min(opts.locStart(startNode, opts.locStart), opts.locStart(endNode, opts.locStart)); + var rangeEnd = Math.max(opts.locEnd(startNode, opts.locEnd), opts.locEnd(endNode, opts.locEnd)); + return { + rangeStart: rangeStart, + rangeEnd: rangeEnd + }; +} + +var rangeUtil = { + calculateRange: calculateRange, + findNodeAtOffset: findNodeAtOffset +}; + +var normalizeOptions = options.normalize; +var guessEndOfLine = endOfLine.guessEndOfLine; +var convertEndOfLineToChars = endOfLine.convertEndOfLineToChars; +var _printDocToString = doc.printer.printDocToString; +var printDocToDebug = doc.debug.printDocToDebug; +var UTF8BOM = 0xfeff; +var CURSOR = Symbol("cursor"); + +function ensureAllCommentsPrinted(astComments) { + if (!astComments) { + return; + } + + for (var i = 0; i < astComments.length; ++i) { + if (astComments[i].value.trim() === "prettier-ignore") { + // If there's a prettier-ignore, we're not printing that sub-tree so we + // don't know if the comments was printed or not. + return; + } + } + + astComments.forEach(function (comment) { + if (!comment.printed) { + throw new Error('Comment "' + comment.value.trim() + '" was not printed. Please report this error!'); + } + + delete comment.printed; + }); +} + +function attachComments(text, ast, opts) { + var astComments = ast.comments; + + if (astComments) { + delete ast.comments; + comments.attach(astComments, ast, text, opts); + } + + ast.tokens = []; + opts.originalText = opts.parser === "yaml" ? text : text.trimRight(); + return astComments; +} + +function coreFormat(text, opts, addAlignmentSize) { + if (!text || !text.trim().length) { + return { + formatted: "", + cursorOffset: 0 + }; + } + + addAlignmentSize = addAlignmentSize || 0; + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + var originalText = text; + text = parsed.text; + + if (opts.cursorOffset >= 0) { + var nodeResult = rangeUtil.findNodeAtOffset(ast, opts.cursorOffset, opts); + + if (nodeResult && nodeResult.node) { + opts.cursorNode = nodeResult.node; + } + } + + var astComments = attachComments(text, ast, opts); + var doc$$1 = astToDoc(ast, opts, addAlignmentSize); + + if (opts.endOfLine === "auto") { + opts.endOfLine = guessEndOfLine(originalText); + } + + var result = _printDocToString(doc$$1, opts); + + ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline + + if (addAlignmentSize > 0) { + var trimmed = result.formatted.trim(); + + if (result.cursorNodeStart !== undefined) { + result.cursorNodeStart -= result.formatted.indexOf(trimmed); + } + + result.formatted = trimmed + convertEndOfLineToChars(opts.endOfLine); + } + + if (opts.cursorOffset >= 0) { + var oldCursorNodeStart; + var oldCursorNodeText; + var cursorOffsetRelativeToOldCursorNode; + var newCursorNodeStart; + var newCursorNodeText; + + if (opts.cursorNode && result.cursorNodeText) { + oldCursorNodeStart = opts.locStart(opts.cursorNode); + oldCursorNodeText = text.slice(oldCursorNodeStart, opts.locEnd(opts.cursorNode)); + cursorOffsetRelativeToOldCursorNode = opts.cursorOffset - oldCursorNodeStart; + newCursorNodeStart = result.cursorNodeStart; + newCursorNodeText = result.cursorNodeText; + } else { + oldCursorNodeStart = 0; + oldCursorNodeText = text; + cursorOffsetRelativeToOldCursorNode = opts.cursorOffset; + newCursorNodeStart = 0; + newCursorNodeText = result.formatted; + } + + if (oldCursorNodeText === newCursorNodeText) { + return { + formatted: result.formatted, + cursorOffset: newCursorNodeStart + cursorOffsetRelativeToOldCursorNode + }; + } // diff old and new cursor node texts, with a special cursor + // symbol inserted to find out where it moves to + + + var oldCursorNodeCharArray = oldCursorNodeText.split(""); + oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR); + var newCursorNodeCharArray = newCursorNodeText.split(""); + var cursorNodeDiff = lib.diffArrays(oldCursorNodeCharArray, newCursorNodeCharArray); + var cursorOffset = newCursorNodeStart; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = cursorNodeDiff[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var entry = _step.value; + + if (entry.removed) { + if (entry.value.indexOf(CURSOR) > -1) { + break; + } + } else { + cursorOffset += entry.count; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return { + formatted: result.formatted, + cursorOffset: cursorOffset + }; + } + + return { + formatted: result.formatted + }; +} + +function formatRange(text, opts) { + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + text = parsed.text; + var range = rangeUtil.calculateRange(text, opts, ast); + var rangeStart = range.rangeStart; + var rangeEnd = range.rangeEnd; + var rangeString = text.slice(rangeStart, rangeEnd); // Try to extend the range backwards to the beginning of the line. + // This is so we can detect indentation correctly and restore it. + // Use `Math.min` since `lastIndexOf` returns 0 when `rangeStart` is 0 + + var rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1); + var indentString = text.slice(rangeStart2, rangeStart); + var alignmentSize = util.getAlignmentSize(indentString, opts.tabWidth); + var rangeResult = coreFormat(rangeString, Object.assign({}, opts, { + rangeStart: 0, + rangeEnd: Infinity, + printWidth: opts.printWidth - alignmentSize, + // track the cursor offset only if it's within our range + cursorOffset: opts.cursorOffset >= rangeStart && opts.cursorOffset < rangeEnd ? opts.cursorOffset - rangeStart : -1 + }), alignmentSize); // Since the range contracts to avoid trailing whitespace, + // we need to remove the newline that was inserted by the `format` call. + + var rangeTrimmed = rangeResult.formatted.trimRight(); + var formatted = text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd); + var cursorOffset = opts.cursorOffset; + + if (opts.cursorOffset >= rangeEnd) { + // handle the case where the cursor was past the end of the range + cursorOffset = opts.cursorOffset - rangeEnd + (rangeStart + rangeTrimmed.length); + } else if (rangeResult.cursorOffset !== undefined) { + // handle the case where the cursor was in the range + cursorOffset = rangeResult.cursorOffset + rangeStart; + } // keep the cursor as it was if it was before the start of the range + + + return { + formatted: formatted, + cursorOffset: cursorOffset + }; +} + +function format(text, opts) { + var selectedParser = parser.resolveParser(opts); + var hasPragma = !selectedParser.hasPragma || selectedParser.hasPragma(text); + + if (opts.requirePragma && !hasPragma) { + return { + formatted: text + }; + } + + if (opts.rangeStart > 0 || opts.rangeEnd < text.length) { + return formatRange(text, opts); + } + + var hasUnicodeBOM = text.charCodeAt(0) === UTF8BOM; + + if (hasUnicodeBOM) { + text = text.substring(1); + } + + if (opts.insertPragma && opts.printer.insertPragma && !hasPragma) { + text = opts.printer.insertPragma(text); + } + + var result = coreFormat(text, opts); + + if (hasUnicodeBOM) { + result.formatted = String.fromCharCode(UTF8BOM) + result.formatted; + } + + return result; +} + +var core = { + formatWithCursor: function formatWithCursor(text, opts) { + opts = normalizeOptions(opts); + return format(text, opts); + }, + parse: function parse(text, opts, massage) { + opts = normalizeOptions(opts); + var parsed = parser.parse(text, opts); + + if (massage) { + parsed.ast = massageAst(parsed.ast, opts); + } + + return parsed; + }, + formatAST: function formatAST(ast, opts) { + opts = normalizeOptions(opts); + var doc$$1 = astToDoc(ast, opts); + return _printDocToString(doc$$1, opts); + }, + // Doesn't handle shebang for now + formatDoc: function formatDoc(doc$$1, opts) { + var debug = printDocToDebug(doc$$1); + opts = normalizeOptions(Object.assign({}, opts, { + parser: "babylon" + })); + return format(debug, opts).formatted; + }, + printToDoc: function printToDoc(text, opts) { + opts = normalizeOptions(opts); + var parsed = parser.parse(text, opts); + var ast = parsed.ast; + text = parsed.text; + attachComments(text, ast, opts); + return astToDoc(ast, opts); + }, + printDocToString: function printDocToString(doc$$1, opts) { + return _printDocToString(doc$$1, normalizeOptions(opts)); + } +}; + +var index$11 = ["a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "listing", "main", "map", "mark", "marquee", "math", "menu", "menuitem", "meta", "meter", "multicol", "nav", "nextid", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "pre", "progress", "q", "rb", "rbc", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp"]; + +var htmlTagNames = Object.freeze({ + default: index$11 +}); + +var htmlTagNames$1 = ( htmlTagNames && index$11 ) || htmlTagNames; + +function clean(ast, newObj, parent) { + ["raw", // front-matter + "raws", "sourceIndex", "source", "before", "after", "trailingComma"].forEach(function (name) { + delete newObj[name]; + }); + + if (ast.type === "yaml") { + delete newObj.value; + } // --insert-pragma + + + if (ast.type === "css-comment" && parent.type === "css-root" && parent.nodes.length !== 0 && ( // first non-front-matter comment + parent.nodes[0] === ast || (parent.nodes[0].type === "yaml" || parent.nodes[0].type === "toml") && parent.nodes[1] === ast)) { + /** + * something + * + * @format + */ + delete newObj.text; // standalone pragma + + if (/^\*\s*@(format|prettier)\s*$/.test(ast.text)) { + return null; + } + } + + if (ast.type === "media-query" || ast.type === "media-query-list" || ast.type === "media-feature-expression") { + delete newObj.value; + } + + if (ast.type === "css-rule") { + delete newObj.params; + } + + if (ast.type === "selector-combinator") { + newObj.value = newObj.value.replace(/\s+/g, " "); + } + + if (ast.type === "media-feature") { + newObj.value = newObj.value.replace(/ /g, ""); + } + + if (ast.type === "value-word" && (ast.isColor && ast.isHex || ["initial", "inherit", "unset", "revert"].indexOf(newObj.value.replace().toLowerCase()) !== -1) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo") { + newObj.value = newObj.value.toLowerCase(); + } + + if (ast.type === "css-decl") { + newObj.prop = newObj.prop.toLowerCase(); + } + + if (ast.type === "css-atrule" || ast.type === "css-import") { + newObj.name = newObj.name.toLowerCase(); + } + + if (ast.type === "value-number") { + newObj.unit = newObj.unit.toLowerCase(); + } + + if ((ast.type === "media-feature" || ast.type === "media-keyword" || ast.type === "media-type" || ast.type === "media-unknown" || ast.type === "media-url" || ast.type === "media-value" || ast.type === "selector-attribute" || ast.type === "selector-string" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "value-string") && newObj.value) { + newObj.value = cleanCSSStrings(newObj.value); + } + + if (ast.type === "selector-attribute") { + newObj.attribute = newObj.attribute.trim(); + + if (newObj.namespace) { + if (typeof newObj.namespace === "string") { + newObj.namespace = newObj.namespace.trim(); + + if (newObj.namespace.length === 0) { + newObj.namespace = true; + } + } + } + + if (newObj.value) { + newObj.value = newObj.value.trim().replace(/^['"]|['"]$/g, ""); + delete newObj.quoted; + } + } + + if ((ast.type === "media-value" || ast.type === "media-type" || ast.type === "value-number" || ast.type === "selector-root-invalid" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "selector-tag") && newObj.value) { + newObj.value = newObj.value.replace(/([\d.eE+-]+)([a-zA-Z]*)/g, function (match, numStr, unit) { + var num = Number(numStr); + return isNaN(num) ? match : num + unit.toLowerCase(); + }); + } + + if (ast.type === "selector-tag") { + var lowercasedValue = ast.value.toLowerCase(); + + if (htmlTagNames$1.indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + + if (["from", "to"].indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + } // Workaround when `postcss-values-parser` parse `not`, `and` or `or` keywords as `value-func` + + + if (ast.type === "css-atrule" && ast.name.toLowerCase() === "supports") { + delete newObj.value; + } // Workaround for SCSS nested properties + + + if (ast.type === "selector-unknown") { + delete newObj.value; + } +} + +function cleanCSSStrings(value) { + return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1"); +} + +var clean_1 = clean; + +var _require$$0$builders$1 = doc.builders; +var hardline$4 = _require$$0$builders$1.hardline; +var literalline$1 = _require$$0$builders$1.literalline; +var concat$5 = _require$$0$builders$1.concat; +var markAsRoot$1 = _require$$0$builders$1.markAsRoot; +var mapDoc$2 = doc.utils.mapDoc; + +function embed(path, print, textToDoc +/*, options */ +) { + var node = path.getValue(); + + if (node.type === "yaml") { + return markAsRoot$1(concat$5(["---", hardline$4, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, { + parser: "yaml" + })) : "", "---", hardline$4])); + } + + return null; + + function replaceNewlinesWithLiterallines(doc$$2) { + return mapDoc$2(doc$$2, function (currentDoc) { + return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$5(currentDoc.split(/(\n)/g).map(function (v, i) { + return i % 2 === 0 ? v : literalline$1; + })) : currentDoc; + }); + } +} + +var embed_1 = embed; + +var detectNewline = createCommonjsModule(function (module) { + 'use strict'; + + module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + var newlines = str.match(/(?:\r?\n)/g) || []; + + if (newlines.length === 0) { + return null; + } + + var crlf = newlines.filter(function (el) { + return el === '\r\n'; + }).length; + var lf = newlines.length - crlf; + return crlf > lf ? '\r\n' : '\n'; + }; + + module.exports.graceful = function (str) { + return module.exports(str) || '\n'; + }; +}); + +var build$1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports.extract = extract; + exports.strip = strip; + exports.parse = parse; + exports.parseWithComments = parseWithComments; + exports.print = print; + + var _detectNewline; + + function _load_detectNewline() { + return _detectNewline = _interopRequireDefault(detectNewline); + } + + var _os; + + function _load_os() { + return _os = require$$1$1; + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + /** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + + + var commentEndRe = /\*\/$/; + var commentStartRe = /^\/\*\*/; + var docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/; + var lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g; + var ltrimNewlineRe = /^(\r?\n)+/; + var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g; + var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; + var stringStartRe = /(\r?\n|^) *\* ?/g; + + function extract(contents) { + var match = contents.match(docblockRe); + return match ? match[0].trimLeft() : ''; + } + + function strip(contents) { + var match = contents.match(docblockRe); + return match && match[0] ? contents.substring(match[0].length) : contents; + } + + function parse(docblock) { + return parseWithComments(docblock).pragmas; + } + + function parseWithComments(docblock) { + var line = (0, (_detectNewline || _load_detectNewline()).default)(docblock) || (_os || _load_os()).EOL; + + docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives + + var prev = ''; + + while (prev !== docblock) { + prev = docblock; + docblock = docblock.replace(multilineRe, "".concat(line, "$1 $2").concat(line)); + } + + docblock = docblock.replace(ltrimNewlineRe, '').trimRight(); + var result = Object.create(null); + var comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').trimRight(); + var match; + + while (match = propertyRe.exec(docblock)) { + // strip linecomments from pragmas + var nextPragma = match[2].replace(lineCommentRe, ''); + + if (typeof result[match[1]] === 'string' || Array.isArray(result[match[1]])) { + result[match[1]] = [].concat(result[match[1]], nextPragma); + } else { + result[match[1]] = nextPragma; + } + } + + return { + comments: comments, + pragmas: result + }; + } + + function print(_ref) { + var _ref$comments = _ref.comments; + var comments = _ref$comments === undefined ? '' : _ref$comments; + var _ref$pragmas = _ref.pragmas; + var pragmas = _ref$pragmas === undefined ? {} : _ref$pragmas; + + var line = (0, (_detectNewline || _load_detectNewline()).default)(comments) || (_os || _load_os()).EOL; + + var head = '/**'; + var start = ' *'; + var tail = ' */'; + var keys = Object.keys(pragmas); + var printedObject = keys.map(function (key) { + return printKeyValues(key, pragmas[key]); + }).reduce(function (arr, next) { + return arr.concat(next); + }, []).map(function (keyValue) { + return start + ' ' + keyValue + line; + }).join(''); + + if (!comments) { + if (keys.length === 0) { + return ''; + } + + if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) { + var value = pragmas[keys[0]]; + return "".concat(head, " ").concat(printKeyValues(keys[0], value)[0]).concat(tail); + } + } + + var printedComments = comments.split(line).map(function (textLine) { + return "".concat(start, " ").concat(textLine); + }).join(line) + line; + return head + line + (comments ? printedComments : '') + (comments && keys.length ? start + line : '') + printedObject + tail; + } + + function printKeyValues(key, valueOrArray) { + return [].concat(valueOrArray).map(function (value) { + return "@".concat(key, " ").concat(value).trim(); + }); + } +}); +unwrapExports(build$1); + +function hasPragma$1(text) { + var pragmas = Object.keys(build$1.parse(build$1.extract(text))); + return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1; +} + +function insertPragma$2(text) { + var parsedDocblock = build$1.parseWithComments(build$1.extract(text)); + var pragmas = Object.assign({ + format: "" + }, parsedDocblock.pragmas); + var newDocblock = build$1.print({ + pragmas: pragmas, + comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines + + }).replace(/(\r\n|\r)/g, "\n"); // normalise newlines (mitigate use of os.EOL by jest-docblock) + + var strippedText = build$1.strip(text); + var separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n"; + return newDocblock + separatingNewlines + strippedText; +} + +var pragma$2 = { + hasPragma: hasPragma$1, + insertPragma: insertPragma$2 +}; + +var DELIMITER_MAP = { + "---": "yaml", + "+++": "toml" +}; + +function parse$3(text) { + var delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp).join("|"); + var match = text.match( // trailing spaces after delimiters are allowed + new RegExp("^(".concat(delimiterRegex, ")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)"))); + + if (match === null) { + return { + frontMatter: null, + content: text + }; + } + + var raw = match[0].replace(/\n$/, ""); + var delimiter = match[1]; + var value = match[2]; + return { + frontMatter: { + type: DELIMITER_MAP[delimiter], + value: value, + raw: raw + }, + content: match[0].replace(/[^\n]/g, " ") + text.slice(match[0].length) + }; +} + +var frontMatter = parse$3; + +function hasPragma(text) { + return pragma$2.hasPragma(frontMatter(text).content); +} + +function insertPragma$1(text) { + var _parseFrontMatter = frontMatter(text), + frontMatter$$1 = _parseFrontMatter.frontMatter, + content = _parseFrontMatter.content; + + return (frontMatter$$1 ? frontMatter$$1.raw + "\n\n" : "") + pragma$2.insertPragma(content); +} + +var pragma = { + hasPragma: hasPragma, + insertPragma: insertPragma$1 +}; + +var colorAdjusterFunctions = ["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"]; + +function getAncestorCounter(path, typeOrTypes) { + var types = [].concat(typeOrTypes); + var counter = -1; + var ancestorNode; + + while (ancestorNode = path.getParentNode(++counter)) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode$1(path, typeOrTypes) { + var counter = getAncestorCounter(path, typeOrTypes); + return counter === -1 ? null : path.getParentNode(counter); +} + +function getPropOfDeclNode$1(path) { + var declAncestorNode = getAncestorNode$1(path, "css-decl"); + return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase(); +} + +function isSCSS$1(parser, text) { + var hasExplicitParserChoice = parser === "less" || parser === "scss"; + var IS_POSSIBLY_SCSS = /(\w\s*: [^}:]+|#){|@import[^\n]+(url|,)/; + return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text); +} + +function isWideKeywords$1(value) { + return ["initial", "inherit", "unset", "revert"].indexOf(value.toLowerCase()) !== -1; +} + +function isKeyframeAtRuleKeywords$1(path, value) { + var atRuleAncestorNode = getAncestorNode$1(path, "css-atrule"); + return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].indexOf(value.toLowerCase()) !== -1; +} + +function maybeToLowerCase$1(value) { + return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase(); +} + +function insideValueFunctionNode$1(path, functionName) { + var funcAncestorNode = getAncestorNode$1(path, "value-func"); + return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName; +} + +function insideICSSRuleNode$1(path) { + var ruleAncestorNode = getAncestorNode$1(path, "css-rule"); + return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export")); +} + +function insideAtRuleNode$1(path, atRuleNameOrAtRuleNames) { + var atRuleNames = [].concat(atRuleNameOrAtRuleNames); + var atRuleAncestorNode = getAncestorNode$1(path, "css-atrule"); + return atRuleAncestorNode && atRuleNames.indexOf(atRuleAncestorNode.name.toLowerCase()) !== -1; +} + +function insideURLFunctionInImportAtRuleNode$1(path) { + var node = path.getValue(); + var atRuleAncestorNode = getAncestorNode$1(path, "css-atrule"); + return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2; +} + +function isURLFunctionNode$1(node) { + return node.type === "value-func" && node.value.toLowerCase() === "url"; +} + +function isLastNode$1(path, node) { + var parentNode = path.getParentNode(); + + if (!parentNode) { + return false; + } + + var nodes = parentNode.nodes; + return nodes && nodes.indexOf(node) === nodes.length - 1; +} + +function isHTMLTag$1(value) { + return htmlTagNames$1.indexOf(value.toLowerCase()) !== -1; +} + +function isDetachedRulesetDeclarationNode$1(node) { + // If a Less file ends up being parsed with the SCSS parser, Less + // variable declarations will be parsed as atrules with names ending + // with a colon, so keep the original case then. + if (!node.selector) { + return false; + } + + return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value); +} + +function isForKeywordNode$1(node) { + return node.type === "value-word" && ["from", "through", "end"].indexOf(node.value) !== -1; +} + +function isIfElseKeywordNode$1(node) { + return node.type === "value-word" && ["and", "or", "not"].indexOf(node.value) !== -1; +} + +function isEachKeywordNode$1(node) { + return node.type === "value-word" && node.value === "in"; +} + +function isMultiplicationNode$1(node) { + return node.type === "value-operator" && node.value === "*"; +} + +function isDivisionNode$1(node) { + return node.type === "value-operator" && node.value === "/"; +} + +function isAdditionNode$1(node) { + return node.type === "value-operator" && node.value === "+"; +} + +function isSubtractionNode$1(node) { + return node.type === "value-operator" && node.value === "-"; +} + +function isModuloNode(node) { + return node.type === "value-operator" && node.value === "%"; +} + +function isMathOperatorNode$1(node) { + return isMultiplicationNode$1(node) || isDivisionNode$1(node) || isAdditionNode$1(node) || isSubtractionNode$1(node) || isModuloNode(node); +} + +function isEqualityOperatorNode$1(node) { + return node.type === "value-word" && ["==", "!="].indexOf(node.value) !== -1; +} + +function isRelationalOperatorNode$1(node) { + return node.type === "value-word" && ["<", ">", "<=", ">="].indexOf(node.value) !== -1; +} + +function isSCSSControlDirectiveNode$1(node) { + return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].indexOf(node.name) !== -1; +} + +function isSCSSNestedPropertyNode(node) { + if (!node.selector) { + return false; + } + + return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":"); +} + +function isDetachedRulesetCallNode$1(node) { + return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params); +} + +function isTemplatePlaceholderNode$1(node) { + return node.name.startsWith("prettier-placeholder"); +} + +function isTemplatePropNode$1(node) { + return node.prop.startsWith("@prettier-placeholder"); +} + +function isPostcssSimpleVarNode$1(currentNode, nextNode) { + return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before; +} + +function hasComposesNode$1(node) { + return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes"; +} + +function hasParensAroundNode$1(node) { + return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null; +} + +function hasEmptyRawBefore$1(node) { + return node.raws && node.raws.before === ""; +} + +function isKeyValuePairNode$1(node) { + return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon"; +} + +function isKeyValuePairInParenGroupNode(node) { + return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode$1(node.groups[0]); +} + +function isSCSSMapItemNode$1(path) { + var node = path.getValue(); // Ignore empty item (i.e. `$key: ()`) + + if (node.groups.length === 0) { + return false; + } + + var parentParentNode = path.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`) + + if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) { + return false; + } + + var declNode = getAncestorNode$1(path, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`) + + if (declNode && declNode.prop && declNode.prop.startsWith("$")) { + return true; + } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`) + + + if (isKeyValuePairInParenGroupNode(parentParentNode)) { + return true; + } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`) + + + if (parentParentNode.type === "value-func") { + return true; + } + + return false; +} + +function isInlineValueCommentNode$1(node) { + return node.type === "value-comment" && node.inline; +} + +function isHashNode$1(node) { + return node.type === "value-word" && node.value === "#"; +} + +function isLeftCurlyBraceNode$1(node) { + return node.type === "value-word" && node.value === "{"; +} + +function isRightCurlyBraceNode$1(node) { + return node.type === "value-word" && node.value === "}"; +} + +function isWordNode$1(node) { + return ["value-word", "value-atword"].indexOf(node.type) !== -1; +} + +function isColonNode$1(node) { + return node.type === "value-colon"; +} + +function isMediaAndSupportsKeywords$1(node) { + return node.value && ["not", "and", "or"].indexOf(node.value.toLowerCase()) !== -1; +} + +function isColorAdjusterFuncNode$1(node) { + if (node.type !== "value-func") { + return false; + } + + return colorAdjusterFunctions.indexOf(node.value.toLowerCase()) !== -1; +} + +var utils$4 = { + getAncestorCounter: getAncestorCounter, + getAncestorNode: getAncestorNode$1, + getPropOfDeclNode: getPropOfDeclNode$1, + maybeToLowerCase: maybeToLowerCase$1, + insideValueFunctionNode: insideValueFunctionNode$1, + insideICSSRuleNode: insideICSSRuleNode$1, + insideAtRuleNode: insideAtRuleNode$1, + insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode$1, + isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords$1, + isHTMLTag: isHTMLTag$1, + isWideKeywords: isWideKeywords$1, + isSCSS: isSCSS$1, + isLastNode: isLastNode$1, + isSCSSControlDirectiveNode: isSCSSControlDirectiveNode$1, + isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode$1, + isRelationalOperatorNode: isRelationalOperatorNode$1, + isEqualityOperatorNode: isEqualityOperatorNode$1, + isMultiplicationNode: isMultiplicationNode$1, + isDivisionNode: isDivisionNode$1, + isAdditionNode: isAdditionNode$1, + isSubtractionNode: isSubtractionNode$1, + isModuloNode: isModuloNode, + isMathOperatorNode: isMathOperatorNode$1, + isEachKeywordNode: isEachKeywordNode$1, + isForKeywordNode: isForKeywordNode$1, + isURLFunctionNode: isURLFunctionNode$1, + isIfElseKeywordNode: isIfElseKeywordNode$1, + hasComposesNode: hasComposesNode$1, + hasParensAroundNode: hasParensAroundNode$1, + hasEmptyRawBefore: hasEmptyRawBefore$1, + isSCSSNestedPropertyNode: isSCSSNestedPropertyNode, + isDetachedRulesetCallNode: isDetachedRulesetCallNode$1, + isTemplatePlaceholderNode: isTemplatePlaceholderNode$1, + isTemplatePropNode: isTemplatePropNode$1, + isPostcssSimpleVarNode: isPostcssSimpleVarNode$1, + isKeyValuePairNode: isKeyValuePairNode$1, + isKeyValuePairInParenGroupNode: isKeyValuePairInParenGroupNode, + isSCSSMapItemNode: isSCSSMapItemNode$1, + isInlineValueCommentNode: isInlineValueCommentNode$1, + isHashNode: isHashNode$1, + isLeftCurlyBraceNode: isLeftCurlyBraceNode$1, + isRightCurlyBraceNode: isRightCurlyBraceNode$1, + isWordNode: isWordNode$1, + isColonNode: isColonNode$1, + isMediaAndSupportsKeywords: isMediaAndSupportsKeywords$1, + isColorAdjusterFuncNode: isColorAdjusterFuncNode$1 +}; + +var insertPragma = pragma.insertPragma; +var printNumber$1 = util.printNumber; +var printString$1 = util.printString; +var hasIgnoreComment$1 = util.hasIgnoreComment; +var hasNewline$2 = util.hasNewline; +var isNextLineEmpty$2 = utilShared.isNextLineEmpty; +var _require$$3$builders = doc.builders; +var concat$4 = _require$$3$builders.concat; +var join$2 = _require$$3$builders.join; +var line$3 = _require$$3$builders.line; +var hardline$3 = _require$$3$builders.hardline; +var softline$1 = _require$$3$builders.softline; +var group$1 = _require$$3$builders.group; +var fill$2 = _require$$3$builders.fill; +var indent$2 = _require$$3$builders.indent; +var dedent$2 = _require$$3$builders.dedent; +var ifBreak$1 = _require$$3$builders.ifBreak; +var removeLines$1 = doc.utils.removeLines; +var getAncestorNode = utils$4.getAncestorNode; +var getPropOfDeclNode = utils$4.getPropOfDeclNode; +var maybeToLowerCase = utils$4.maybeToLowerCase; +var insideValueFunctionNode = utils$4.insideValueFunctionNode; +var insideICSSRuleNode = utils$4.insideICSSRuleNode; +var insideAtRuleNode = utils$4.insideAtRuleNode; +var insideURLFunctionInImportAtRuleNode = utils$4.insideURLFunctionInImportAtRuleNode; +var isKeyframeAtRuleKeywords = utils$4.isKeyframeAtRuleKeywords; +var isHTMLTag = utils$4.isHTMLTag; +var isWideKeywords = utils$4.isWideKeywords; +var isSCSS = utils$4.isSCSS; +var isLastNode = utils$4.isLastNode; +var isSCSSControlDirectiveNode = utils$4.isSCSSControlDirectiveNode; +var isDetachedRulesetDeclarationNode = utils$4.isDetachedRulesetDeclarationNode; +var isRelationalOperatorNode = utils$4.isRelationalOperatorNode; +var isEqualityOperatorNode = utils$4.isEqualityOperatorNode; +var isMultiplicationNode = utils$4.isMultiplicationNode; +var isDivisionNode = utils$4.isDivisionNode; +var isAdditionNode = utils$4.isAdditionNode; +var isSubtractionNode = utils$4.isSubtractionNode; +var isMathOperatorNode = utils$4.isMathOperatorNode; +var isEachKeywordNode = utils$4.isEachKeywordNode; +var isForKeywordNode = utils$4.isForKeywordNode; +var isURLFunctionNode = utils$4.isURLFunctionNode; +var isIfElseKeywordNode = utils$4.isIfElseKeywordNode; +var hasComposesNode = utils$4.hasComposesNode; +var hasParensAroundNode = utils$4.hasParensAroundNode; +var hasEmptyRawBefore = utils$4.hasEmptyRawBefore; +var isKeyValuePairNode = utils$4.isKeyValuePairNode; +var isDetachedRulesetCallNode = utils$4.isDetachedRulesetCallNode; +var isTemplatePlaceholderNode = utils$4.isTemplatePlaceholderNode; +var isTemplatePropNode = utils$4.isTemplatePropNode; +var isPostcssSimpleVarNode = utils$4.isPostcssSimpleVarNode; +var isSCSSMapItemNode = utils$4.isSCSSMapItemNode; +var isInlineValueCommentNode = utils$4.isInlineValueCommentNode; +var isHashNode = utils$4.isHashNode; +var isLeftCurlyBraceNode = utils$4.isLeftCurlyBraceNode; +var isRightCurlyBraceNode = utils$4.isRightCurlyBraceNode; +var isWordNode = utils$4.isWordNode; +var isColonNode = utils$4.isColonNode; +var isMediaAndSupportsKeywords = utils$4.isMediaAndSupportsKeywords; +var isColorAdjusterFuncNode = utils$4.isColorAdjusterFuncNode; + +function shouldPrintComma(options) { + switch (options.trailingComma) { + case "all": + case "es5": + return true; + + case "none": + default: + return false; + } +} + +function genericPrint(path, options, print) { + var node = path.getValue(); + /* istanbul ignore if */ + + if (!node) { + return ""; + } + + if (typeof node === "string") { + return node; + } + + switch (node.type) { + case "yaml": + case "toml": + return concat$4([node.raw, hardline$3]); + + case "css-root": + { + var nodes = printNodeSequence(path, options, print); + + if (nodes.parts.length) { + return concat$4([nodes, hardline$3]); + } + + return nodes; + } + + case "css-comment": + { + if (node.raws.content) { + return node.raws.content // there's a bug in the less parser that trailing `\r`s are included in inline comments + .replace(/^(\/\/[^]+)\r+$/, "$1"); + } + + var text = options.originalText.slice(options.locStart(node), options.locEnd(node)); + var rawText = node.raws.text || node.text; // Workaround a bug where the location is off. + // https://github.com/postcss/postcss-scss/issues/63 + + if (text.indexOf(rawText) === -1) { + if (node.raws.inline) { + return concat$4(["// ", rawText]); + } + + return concat$4(["/* ", rawText, " */"]); + } + + return text; + } + + case "css-rule": + { + return concat$4([path.call(print, "selector"), node.important ? " !important" : "", node.nodes ? concat$4([" {", node.nodes.length > 0 ? indent$2(concat$4([hardline$3, printNodeSequence(path, options, print)])) : "", hardline$3, "}", isDetachedRulesetDeclarationNode(node) ? ";" : ""]) : ";"]); + } + + case "css-decl": + { + var parentNode = path.getParentNode(); + return concat$4([node.raws.before.replace(/[\s;]/g, ""), insideICSSRuleNode(path) ? node.prop : maybeToLowerCase(node.prop), node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), node.extend ? "" : " ", hasComposesNode(node) ? removeLines$1(path.call(print, "value")) : path.call(print, "value"), node.raws.important ? node.raws.important.replace(/\s*!\s*important/i, " !important") : node.important ? " !important" : "", node.raws.scssDefault ? node.raws.scssDefault.replace(/\s*!default/i, " !default") : node.scssDefault ? " !default" : "", node.raws.scssGlobal ? node.raws.scssGlobal.replace(/\s*!global/i, " !global") : node.scssGlobal ? " !global" : "", node.nodes ? concat$4([" {", indent$2(concat$4([softline$1, printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePropNode(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]); + } + + case "css-atrule": + { + var _parentNode = path.getParentNode(); + + return concat$4(["@", // If a Less file ends up being parsed with the SCSS parser, Less + // variable declarations will be parsed as at-rules with names ending + // with a colon, so keep the original case then. + isDetachedRulesetCallNode(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase(node.name), node.params ? concat$4([isDetachedRulesetCallNode(node) ? "" : isTemplatePlaceholderNode(node) && /^\s*\n/.test(node.raws.afterName) ? /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$4([hardline$3, hardline$3]) : hardline$3 : " ", path.call(print, "params")]) : "", node.selector ? indent$2(concat$4([" ", path.call(print, "selector")])) : "", node.value ? group$1(concat$4([" ", path.call(print, "value"), isSCSSControlDirectiveNode(node) ? hasParensAroundNode(node) ? " " : line$3 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$4([isSCSSControlDirectiveNode(node) ? "" : " ", "{", indent$2(concat$4([node.nodes.length > 0 ? softline$1 : "", printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePlaceholderNode(node) && !_parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]); + } + // postcss-media-query-parser + + case "media-query-list": + { + var parts = []; + path.each(function (childPath) { + var node = childPath.getValue(); + + if (node.type === "media-query" && node.value === "") { + return; + } + + parts.push(childPath.call(print)); + }, "nodes"); + return group$1(indent$2(join$2(line$3, parts))); + } + + case "media-query": + { + return concat$4([join$2(" ", path.map(print, "nodes")), isLastNode(path, node) ? "" : ","]); + } + + case "media-type": + { + return adjustNumbers(adjustStrings(node.value, options)); + } + + case "media-feature-expression": + { + if (!node.nodes) { + return node.value; + } + + return concat$4(["(", concat$4(path.map(print, "nodes")), ")"]); + } + + case "media-feature": + { + return maybeToLowerCase(adjustStrings(node.value.replace(/ +/g, " "), options)); + } + + case "media-colon": + { + return concat$4([node.value, " "]); + } + + case "media-value": + { + return adjustNumbers(adjustStrings(node.value, options)); + } + + case "media-keyword": + { + return adjustStrings(node.value, options); + } + + case "media-url": + { + return adjustStrings(node.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/gi, ")"), options); + } + + case "media-unknown": + { + return node.value; + } + // postcss-selector-parser + + case "selector-root": + { + return group$1(concat$4([insideAtRuleNode(path, "custom-selector") ? concat$4([getAncestorNode(path, "css-atrule").customSelector, line$3]) : "", join$2(concat$4([",", insideAtRuleNode(path, ["extend", "custom-selector", "nest"]) ? line$3 : hardline$3]), path.map(print, "nodes"))])); + } + + case "selector-selector": + { + return group$1(indent$2(concat$4(path.map(print, "nodes")))); + } + + case "selector-comment": + { + return node.value; + } + + case "selector-string": + { + return adjustStrings(node.value, options); + } + + case "selector-tag": + { + var _parentNode2 = path.getParentNode(); + + var index = _parentNode2 && _parentNode2.nodes.indexOf(node); + + var prevNode = index && _parentNode2.nodes[index - 1]; + return concat$4([node.namespace ? concat$4([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isHTMLTag(node.value) || isKeyframeAtRuleKeywords(path, node.value) ? node.value.toLowerCase() : node.value)]); + } + + case "selector-id": + { + return concat$4(["#", node.value]); + } + + case "selector-class": + { + return concat$4([".", adjustNumbers(adjustStrings(node.value, options))]); + } + + case "selector-attribute": + { + return concat$4(["[", node.namespace ? concat$4([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.attribute.trim(), node.operator ? node.operator : "", node.value ? quoteAttributeValue(adjustStrings(node.value.trim(), options), options) : "", node.insensitive ? " i" : "", "]"]); + } + + case "selector-combinator": + { + if (node.value === "+" || node.value === ">" || node.value === "~" || node.value === ">>>") { + var _parentNode3 = path.getParentNode(); + + var _leading = _parentNode3.type === "selector-selector" && _parentNode3.nodes[0] === node ? "" : line$3; + + return concat$4([_leading, node.value, isLastNode(path, node) ? "" : " "]); + } + + var leading = node.value.trim().startsWith("(") ? line$3 : ""; + var value = adjustNumbers(adjustStrings(node.value.trim(), options)) || line$3; + return concat$4([leading, value]); + } + + case "selector-universal": + { + return concat$4([node.namespace ? concat$4([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.value]); + } + + case "selector-pseudo": + { + return concat$4([maybeToLowerCase(node.value), node.nodes && node.nodes.length > 0 ? concat$4(["(", join$2(", ", path.map(print, "nodes")), ")"]) : ""]); + } + + case "selector-nesting": + { + return node.value; + } + + case "selector-unknown": + { + var ruleAncestorNode = getAncestorNode(path, "css-rule"); // Nested SCSS property + + if (ruleAncestorNode && ruleAncestorNode.isSCSSNesterProperty) { + return adjustNumbers(adjustStrings(maybeToLowerCase(node.value), options)); + } + + return node.value; + } + // postcss-values-parser + + case "value-value": + case "value-root": + { + return path.call(print, "group"); + } + + case "value-comment": + { + return concat$4([node.inline ? "//" : "/*", node.value, node.inline ? "" : "*/"]); + } + + case "value-comma_group": + { + var _parentNode4 = path.getParentNode(); + + var parentParentNode = path.getParentNode(1); + var declAncestorProp = getPropOfDeclNode(path); + var isGridValue = declAncestorProp && _parentNode4.type === "value-value" && (declAncestorProp === "grid" || declAncestorProp.startsWith("grid-template")); + var atRuleAncestorNode = getAncestorNode(path, "css-atrule"); + var isControlDirective = atRuleAncestorNode && isSCSSControlDirectiveNode(atRuleAncestorNode); + var printed = path.map(print, "groups"); + var _parts = []; + var insideURLFunction = insideValueFunctionNode(path, "url"); + var insideSCSSInterpolationInString = false; + var didBreak = false; + + for (var i = 0; i < node.groups.length; ++i) { + _parts.push(printed[i]); // Ignore value inside `url()` + + + if (insideURLFunction) { + continue; + } + + var iPrevNode = node.groups[i - 1]; + var iNode = node.groups[i]; + var iNextNode = node.groups[i + 1]; + var iNextNextNode = node.groups[i + 2]; // Ignore after latest node (i.e. before semicolon) + + if (!iNextNode) { + continue; + } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`) + + + var isStartSCSSinterpolationInString = iNode.type === "value-string" && iNode.value.startsWith("#{"); + var isEndingSCSSinterpolationInString = insideSCSSInterpolationInString && iNextNode.type === "value-string" && iNextNode.value.endsWith("}"); + + if (isStartSCSSinterpolationInString || isEndingSCSSinterpolationInString) { + insideSCSSInterpolationInString = !insideSCSSInterpolationInString; + continue; + } + + if (insideSCSSInterpolationInString) { + continue; + } // Ignore colon (i.e. `:`) + + + if (isColonNode(iNode) || isColonNode(iNextNode)) { + continue; + } // Ignore `@` in Less (i.e. `@@var;`) + + + if (iNode.type === "value-atword" && iNode.value === "") { + continue; + } // Ignore `~` in Less (i.e. `content: ~"^//* some horrible but needed css hack";`) + + + if (iNode.value === "~") { + continue; + } // Ignore `\` (i.e. `$variable: \@small;`) + + + if (iNode.value === "\\") { + continue; + } // Ignore `$$` (i.e. `background-color: $$(style)Color;`) + + + if (isPostcssSimpleVarNode(iNode, iNextNode)) { + continue; + } // Ignore spaces after `#` and after `{` and before `}` in SCSS interpolation (i.e. `#{variable}`) + + + if (isHashNode(iNode) || isLeftCurlyBraceNode(iNode) || isRightCurlyBraceNode(iNextNode) || isLeftCurlyBraceNode(iNextNode) && hasEmptyRawBefore(iNextNode) || isRightCurlyBraceNode(iNode) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`) + + + if (iNode.value === "--" && isHashNode(iNextNode)) { + continue; + } // Formatting math operations + + + var isMathOperator = isMathOperatorNode(iNode); + var isNextMathOperator = isMathOperatorNode(iNextNode); // Print spaces before and after math operators beside SCSS interpolation as is + // (i.e. `#{$var}+5`, `#{$var} +5`, `#{$var}+ 5`, `#{$var} + 5`) + // (i.e. `5+#{$var}`, `5 +#{$var}`, `5+ #{$var}`, `5 + #{$var}`) + + if ((isMathOperator && isHashNode(iNextNode) || isNextMathOperator && isRightCurlyBraceNode(iNode)) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Print spaces before and after addition and subtraction math operators as is in `calc` function + // due to the fact that it is not valid syntax + // (i.e. `calc(1px+1px)`, `calc(1px+ 1px)`, `calc(1px +1px)`, `calc(1px + 1px)`) + + + if (insideValueFunctionNode(path, "calc") && (isAdditionNode(iNode) || isAdditionNode(iNextNode) || isSubtractionNode(iNode) || isSubtractionNode(iNextNode)) && hasEmptyRawBefore(iNextNode)) { + continue; + } // Print spaces after `+` and `-` in color adjuster functions as is (e.g. `color(red l(+ 20%))`) + // Adjusters with signed numbers (e.g. `color(red l(+20%))`) output as-is. + + + var isColorAdjusterNode = (isAdditionNode(iNode) || isSubtractionNode(iNode)) && i === 0 && (iNextNode.type === "value-number" || iNextNode.isHex) && parentParentNode && isColorAdjusterFuncNode(parentParentNode) && !hasEmptyRawBefore(iNextNode); + var requireSpaceBeforeOperator = iNextNextNode && iNextNextNode.type === "value-func" || iNextNextNode && isWordNode(iNextNextNode) || iNode.type === "value-func" || isWordNode(iNode); + var requireSpaceAfterOperator = iNextNode.type === "value-func" || isWordNode(iNextNode) || iPrevNode && iPrevNode.type === "value-func" || iPrevNode && isWordNode(iPrevNode); // Formatting `/`, `+`, `-` sign + + if (!(isMultiplicationNode(iNextNode) || isMultiplicationNode(iNode)) && !insideValueFunctionNode(path, "calc") && !isColorAdjusterNode && (isDivisionNode(iNextNode) && !requireSpaceBeforeOperator || isDivisionNode(iNode) && !requireSpaceAfterOperator || isAdditionNode(iNextNode) && !requireSpaceBeforeOperator || isAdditionNode(iNode) && !requireSpaceAfterOperator || isSubtractionNode(iNextNode) || isSubtractionNode(iNode)) && (hasEmptyRawBefore(iNextNode) || isMathOperator && (!iPrevNode || iPrevNode && isMathOperatorNode(iPrevNode)))) { + continue; + } // Ignore inline comment, they already contain newline at end (i.e. `// Comment`) + // Add `hardline` after inline comment (i.e. `// comment\n foo: bar;`) + + + var isInlineComment = isInlineValueCommentNode(iNode); + + if (iPrevNode && isInlineValueCommentNode(iPrevNode) || isInlineComment || isInlineValueCommentNode(iNextNode)) { + if (isInlineComment) { + _parts.push(hardline$3); + } + + continue; + } // Handle keywords in SCSS control directive + + + if (isControlDirective && (isEqualityOperatorNode(iNextNode) || isRelationalOperatorNode(iNextNode) || isIfElseKeywordNode(iNextNode) || isEachKeywordNode(iNode) || isForKeywordNode(iNode))) { + _parts.push(" "); + + continue; + } // At-rule `namespace` should be in one line + + + if (atRuleAncestorNode && atRuleAncestorNode.name.toLowerCase() === "namespace") { + _parts.push(" "); + + continue; + } // Formatting `grid` property + + + if (isGridValue) { + if (iNode.source && iNextNode.source && iNode.source.start.line !== iNextNode.source.start.line) { + _parts.push(hardline$3); + + didBreak = true; + } else { + _parts.push(" "); + } + + continue; + } // Add `space` before next math operation + // Note: `grip` property have `/` delimiter and it is not math operation, so + // `grid` property handles above + + + if (isNextMathOperator) { + _parts.push(" "); + + continue; + } // Be default all values go through `line` + + + _parts.push(line$3); + } + + if (didBreak) { + _parts.unshift(hardline$3); + } + + if (isControlDirective) { + return group$1(indent$2(concat$4(_parts))); + } // Indent is not needed for import url when url is very long + // and node has two groups + // when type is value-comma_group + // example @import url("verylongurl") projection,tv + + + if (insideURLFunctionInImportAtRuleNode(path)) { + return group$1(fill$2(_parts)); + } + + return group$1(indent$2(fill$2(_parts))); + } + + case "value-paren_group": + { + var _parentNode5 = path.getParentNode(); + + if (_parentNode5 && isURLFunctionNode(_parentNode5) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) { + return concat$4([node.open ? path.call(print, "open") : "", join$2(",", path.map(print, "groups")), node.close ? path.call(print, "close") : ""]); + } + + if (!node.open) { + var _printed = path.map(print, "groups"); + + var res = []; + + for (var _i = 0; _i < _printed.length; _i++) { + if (_i !== 0) { + res.push(concat$4([",", line$3])); + } + + res.push(_printed[_i]); + } + + return group$1(indent$2(fill$2(res))); + } + + var isSCSSMapItem = isSCSSMapItemNode(path); + return group$1(concat$4([node.open ? path.call(print, "open") : "", indent$2(concat$4([softline$1, join$2(concat$4([",", line$3]), path.map(function (childPath) { + var node = childPath.getValue(); + var printed = print(childPath); // Key/Value pair in open paren already indented + + if (isKeyValuePairNode(node) && node.type === "value-comma_group" && node.groups && node.groups[2] && node.groups[2].type === "value-paren_group") { + printed.contents.contents.parts[1] = group$1(printed.contents.contents.parts[1]); + return group$1(dedent$2(printed)); + } + + return printed; + }, "groups"))])), ifBreak$1(isSCSS(options.parser, options.originalText) && isSCSSMapItem && shouldPrintComma(options) ? "," : ""), softline$1, node.close ? path.call(print, "close") : ""]), { + shouldBreak: isSCSSMapItem + }); + } + + case "value-func": + { + return concat$4([node.value, insideAtRuleNode(path, "supports") && isMediaAndSupportsKeywords(node) ? " " : "", path.call(print, "group")]); + } + + case "value-paren": + { + return node.value; + } + + case "value-number": + { + return concat$4([printCssNumber(node.value), maybeToLowerCase(node.unit)]); + } + + case "value-operator": + { + return node.value; + } + + case "value-word": + { + if (node.isColor && node.isHex || isWideKeywords(node.value)) { + return node.value.toLowerCase(); + } + + return node.value; + } + + case "value-colon": + { + return concat$4([node.value, // Don't add spaces on `:` in `url` function (i.e. `url(fbglyph: cross-outline, fig-white)`) + insideValueFunctionNode(path, "url") ? "" : line$3]); + } + + case "value-comma": + { + return concat$4([node.value, " "]); + } + + case "value-string": + { + return printString$1(node.raws.quote + node.value + node.raws.quote, options); + } + + case "value-atword": + { + return concat$4(["@", node.value]); + } + + case "value-unicode-range": + { + return node.value; + } + + case "value-unknown": + { + return node.value; + } + + default: + /* istanbul ignore next */ + throw new Error("Unknown postcss type ".concat(JSON.stringify(node.type))); + } +} + +function printNodeSequence(path, options, print) { + var node = path.getValue(); + var parts = []; + var i = 0; + path.map(function (pathChild) { + var prevNode = node.nodes[i - 1]; + + if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") { + var childNode = pathChild.getValue(); + parts.push(options.originalText.slice(options.locStart(childNode), options.locEnd(childNode))); + } else { + parts.push(pathChild.call(print)); + } + + if (i !== node.nodes.length - 1) { + if (node.nodes[i + 1].type === "css-comment" && !hasNewline$2(options.originalText, options.locStart(node.nodes[i + 1]), { + backwards: true + }) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml" || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else" && node.nodes[i].type !== "css-comment") { + parts.push(" "); + } else { + parts.push(hardline$3); + + if (isNextLineEmpty$2(options.originalText, pathChild.getValue(), options) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml") { + parts.push(hardline$3); + } + } + } + + i++; + }, "nodes"); + return concat$4(parts); +} + +var STRING_REGEX = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g; +var NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g; +var STANDARD_UNIT_REGEX = /[a-zA-Z]+/g; +var WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g; +var ADJUST_NUMBERS_REGEX = RegExp(STRING_REGEX.source + "|" + "(".concat(WORD_PART_REGEX.source, ")?") + "(".concat(NUMBER_REGEX.source, ")") + "(".concat(STANDARD_UNIT_REGEX.source, ")?"), "g"); + +function adjustStrings(value, options) { + return value.replace(STRING_REGEX, function (match) { + return printString$1(match, options); + }); +} + +function quoteAttributeValue(value, options) { + var quote = options.singleQuote ? "'" : '"'; + return value.includes('"') || value.includes("'") ? value : quote + value + quote; +} + +function adjustNumbers(value) { + return value.replace(ADJUST_NUMBERS_REGEX, function (match, quote, wordPart, number, unit) { + return !wordPart && number ? (wordPart || "") + printCssNumber(number) + maybeToLowerCase(unit || "") : match; + }); +} + +function printCssNumber(rawNumber) { + return printNumber$1(rawNumber) // Remove trailing `.0`. + .replace(/\.0(?=$|e)/, ""); +} + +var printerPostcss = { + print: genericPrint, + embed: embed_1, + insertPragma: insertPragma, + hasPrettierIgnore: hasIgnoreComment$1, + massageAstNode: clean_1 +}; + +var CATEGORY_COMMON = "Common"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var commonOptions = { + bracketSpacing: { + since: "0.0.0", + category: CATEGORY_COMMON, + type: "boolean", + default: true, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + singleQuote: { + since: "0.0.0", + category: CATEGORY_COMMON, + type: "boolean", + default: false, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + since: "1.8.2", + category: CATEGORY_COMMON, + type: "choice", + default: [{ + since: "1.8.2", + value: true + }, { + since: "1.9.0", + value: "preserve" + }], + description: "How to wrap prose.", + choices: [{ + since: "1.9.0", + value: "always", + description: "Wrap prose if it exceeds the print width." + }, { + since: "1.9.0", + value: "never", + description: "Do not wrap prose." + }, { + since: "1.9.0", + value: "preserve", + description: "Wrap prose as-is." + }, { + value: false, + deprecated: "1.9.0", + redirect: "never" + }, { + value: true, + deprecated: "1.9.0", + redirect: "always" + }] + } +}; + +var options$3 = { + singleQuote: commonOptions.singleQuote +}; + +var createLanguage = function createLanguage(linguistData, _ref) { + var extend = _ref.extend, + override = _ref.override; + var language = {}; + + for (var key in linguistData) { + var newKey = key === "languageId" ? "linguistLanguageId" : key; + language[newKey] = linguistData[key]; + } + + if (extend) { + for (var _key in extend) { + language[_key] = (language[_key] || []).concat(extend[_key]); + } + } + + for (var _key2 in override) { + language[_key2] = override[_key2]; + } + + return language; +}; + +var name$1 = "CSS"; +var type = "markup"; +var tmScope = "source.css"; +var aceMode = "css"; +var codemirrorMode = "css"; +var codemirrorMimeType = "text/css"; +var color = "#563d7c"; +var extensions = [".css"]; +var languageId = 50; +var css$2 = { + name: name$1, + type: type, + tmScope: tmScope, + aceMode: aceMode, + codemirrorMode: codemirrorMode, + codemirrorMimeType: codemirrorMimeType, + color: color, + extensions: extensions, + languageId: languageId +}; + +var css$3 = Object.freeze({ + name: name$1, + type: type, + tmScope: tmScope, + aceMode: aceMode, + codemirrorMode: codemirrorMode, + codemirrorMimeType: codemirrorMimeType, + color: color, + extensions: extensions, + languageId: languageId, + default: css$2 +}); + +var name$2 = "PostCSS"; +var type$1 = "markup"; +var tmScope$1 = "source.postcss"; +var group$2 = "CSS"; +var extensions$1 = [".pcss"]; +var aceMode$1 = "text"; +var languageId$1 = 262764437; +var postcss = { + name: name$2, + type: type$1, + tmScope: tmScope$1, + group: group$2, + extensions: extensions$1, + aceMode: aceMode$1, + languageId: languageId$1 +}; + +var postcss$1 = Object.freeze({ + name: name$2, + type: type$1, + tmScope: tmScope$1, + group: group$2, + extensions: extensions$1, + aceMode: aceMode$1, + languageId: languageId$1, + default: postcss +}); + +var name$3 = "Less"; +var type$2 = "markup"; +var group$3 = "CSS"; +var extensions$2 = [".less"]; +var tmScope$2 = "source.css.less"; +var aceMode$2 = "less"; +var codemirrorMode$1 = "css"; +var codemirrorMimeType$1 = "text/css"; +var languageId$2 = 198; +var less = { + name: name$3, + type: type$2, + group: group$3, + extensions: extensions$2, + tmScope: tmScope$2, + aceMode: aceMode$2, + codemirrorMode: codemirrorMode$1, + codemirrorMimeType: codemirrorMimeType$1, + languageId: languageId$2 +}; + +var less$1 = Object.freeze({ + name: name$3, + type: type$2, + group: group$3, + extensions: extensions$2, + tmScope: tmScope$2, + aceMode: aceMode$2, + codemirrorMode: codemirrorMode$1, + codemirrorMimeType: codemirrorMimeType$1, + languageId: languageId$2, + default: less +}); + +var name$4 = "SCSS"; +var type$3 = "markup"; +var tmScope$3 = "source.scss"; +var group$4 = "CSS"; +var aceMode$3 = "scss"; +var codemirrorMode$2 = "css"; +var codemirrorMimeType$2 = "text/x-scss"; +var extensions$3 = [".scss"]; +var languageId$3 = 329; +var scss = { + name: name$4, + type: type$3, + tmScope: tmScope$3, + group: group$4, + aceMode: aceMode$3, + codemirrorMode: codemirrorMode$2, + codemirrorMimeType: codemirrorMimeType$2, + extensions: extensions$3, + languageId: languageId$3 +}; + +var scss$1 = Object.freeze({ + name: name$4, + type: type$3, + tmScope: tmScope$3, + group: group$4, + aceMode: aceMode$3, + codemirrorMode: codemirrorMode$2, + codemirrorMimeType: codemirrorMimeType$2, + extensions: extensions$3, + languageId: languageId$3, + default: scss +}); + +var require$$0$16 = ( css$3 && css$2 ) || css$3; + +var require$$1$9 = ( postcss$1 && postcss ) || postcss$1; + +var require$$2$9 = ( less$1 && less ) || less$1; + +var require$$3$4 = ( scss$1 && scss ) || scss$1; + +var languages = [createLanguage(require$$0$16, { + override: { + since: "1.4.0", + parsers: ["css"], + vscodeLanguageIds: ["css"] + } +}), createLanguage(require$$1$9, { + override: { + since: "1.4.0", + parsers: ["css"], + vscodeLanguageIds: ["postcss"] + }, + extend: { + extensions: [".postcss"] + } +}), createLanguage(require$$2$9, { + override: { + since: "1.4.0", + parsers: ["less"], + vscodeLanguageIds: ["less"] + } +}), createLanguage(require$$3$4, { + override: { + since: "1.4.0", + parsers: ["scss"], + vscodeLanguageIds: ["scss"] + } +})]; +var printers = { + postcss: printerPostcss +}; +var languageCss = { + languages: languages, + options: options$3, + printers: printers +}; + +function hasPragma$2(text) { + return /^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(text); +} + +function insertPragma$4(text) { + return "# @format\n\n" + text; +} + +var pragma$4 = { + hasPragma: hasPragma$2, + insertPragma: insertPragma$4 +}; + +var _require$$0$builders$2 = doc.builders; +var concat$6 = _require$$0$builders$2.concat; +var join$3 = _require$$0$builders$2.join; +var hardline$5 = _require$$0$builders$2.hardline; +var line$4 = _require$$0$builders$2.line; +var softline$2 = _require$$0$builders$2.softline; +var group$5 = _require$$0$builders$2.group; +var indent$3 = _require$$0$builders$2.indent; +var ifBreak$2 = _require$$0$builders$2.ifBreak; +var hasIgnoreComment$2 = util.hasIgnoreComment; +var isNextLineEmpty$3 = utilShared.isNextLineEmpty; +var insertPragma$3 = pragma$4.insertPragma; + +function genericPrint$1(path, options, print) { + var n = path.getValue(); + + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + switch (n.kind) { + case "Document": + { + var parts = []; + path.map(function (pathChild, index) { + parts.push(concat$6([pathChild.call(print)])); + + if (index !== n.definitions.length - 1) { + parts.push(hardline$5); + + if (isNextLineEmpty$3(options.originalText, pathChild.getValue(), options)) { + parts.push(hardline$5); + } + } + }, "definitions"); + return concat$6([concat$6(parts), hardline$5]); + } + + case "OperationDefinition": + { + var hasOperation = options.originalText[options.locStart(n)] !== "{"; + var hasName = !!n.name; + return concat$6([hasOperation ? n.operation : "", hasOperation && hasName ? concat$6([" ", path.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "variableDefinitions"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? !hasOperation && !hasName ? "" : " " : "", path.call(print, "selectionSet")]); + } + + case "FragmentDefinition": + { + return concat$6(["fragment ", path.call(print, "name"), " on ", path.call(print, "typeCondition"), printDirectives(path, print, n), " ", path.call(print, "selectionSet")]); + } + + case "SelectionSet": + { + return concat$6(["{", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (selectionsPath) { + return printSequence(selectionsPath, options, print); + }, "selections"))])), hardline$5, "}"]); + } + + case "Field": + { + return group$5(concat$6([n.alias ? concat$6([path.call(print, "alias"), ": "]) : "", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? " " : "", path.call(print, "selectionSet")])); + } + + case "Name": + { + return n.value; + } + + case "StringValue": + { + if (n.block) { + return concat$6(['"""', hardline$5, join$3(hardline$5, n.value.replace(/"""/g, "\\$&").split("\n")), hardline$5, '"""']); + } + + return concat$6(['"', n.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']); + } + + case "IntValue": + case "FloatValue": + case "EnumValue": + { + return n.value; + } + + case "BooleanValue": + { + return n.value ? "true" : "false"; + } + + case "NullValue": + { + return "null"; + } + + case "Variable": + { + return concat$6(["$", path.call(print, "name")]); + } + + case "ListValue": + { + return group$5(concat$6(["[", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "values"))])), softline$2, "]"])); + } + + case "ObjectValue": + { + return group$5(concat$6(["{", options.bracketSpacing && n.fields.length > 0 ? " " : "", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "fields"))])), softline$2, ifBreak$2("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), "}"])); + } + + case "ObjectField": + case "Argument": + { + return concat$6([path.call(print, "name"), ": ", path.call(print, "value")]); + } + + case "Directive": + { + return concat$6(["@", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$2, ")"])) : ""]); + } + + case "NamedType": + { + return path.call(print, "name"); + } + + case "VariableDefinition": + { + return concat$6([path.call(print, "variable"), ": ", path.call(print, "type"), n.defaultValue ? concat$6([" = ", path.call(print, "defaultValue")]) : ""]); + } + + case "TypeExtensionDefinition": + { + return concat$6(["extend ", path.call(print, "definition")]); + } + + case "ObjectTypeExtension": + case "ObjectTypeDefinition": + { + return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "ObjectTypeExtension" ? "extend " : "", "type ", path.call(print, "name"), n.interfaces.length > 0 ? concat$6([" implements ", join$3(determineInterfaceSeparator(options.originalText.substr(options.locStart(n), options.locEnd(n))), path.map(print, "interfaces"))]) : "", printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$5, "}"]) : ""]); + } + + case "FieldDefinition": + { + return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$2, ")"])) : "", ": ", path.call(print, "type"), printDirectives(path, print, n)]); + } + + case "DirectiveDefinition": + { + return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", "directive ", "@", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) { + return printSequence(argsPath, options, print); + }, "arguments"))])), softline$2, ")"])) : "", concat$6([" on ", join$3(" | ", path.map(print, "locations"))])]); + } + + case "EnumTypeExtension": + case "EnumTypeDefinition": + { + return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "EnumTypeExtension" ? "extend " : "", "enum ", path.call(print, "name"), printDirectives(path, print, n), n.values.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (valuesPath) { + return printSequence(valuesPath, options, print); + }, "values"))])), hardline$5, "}"]) : ""]); + } + + case "EnumValueDefinition": + { + return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", path.call(print, "name"), printDirectives(path, print, n)]); + } + + case "InputValueDefinition": + { + return concat$6([path.call(print, "description"), n.description ? n.description.block ? hardline$5 : line$4 : "", path.call(print, "name"), ": ", path.call(print, "type"), n.defaultValue ? concat$6([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]); + } + + case "InputObjectTypeExtension": + case "InputObjectTypeDefinition": + { + return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$5, "}"]) : ""]); + } + + case "SchemaDefinition": + { + return concat$6(["schema", printDirectives(path, print, n), " {", n.operationTypes.length > 0 ? indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (opsPath) { + return printSequence(opsPath, options, print); + }, "operationTypes"))])) : "", hardline$5, "}"]); + } + + case "OperationTypeDefinition": + { + return concat$6([path.call(print, "operation"), ": ", path.call(print, "type")]); + } + + case "InterfaceTypeExtension": + case "InterfaceTypeDefinition": + { + return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) { + return printSequence(fieldsPath, options, print); + }, "fields"))])), hardline$5, "}"]) : ""]); + } + + case "FragmentSpread": + { + return concat$6(["...", path.call(print, "name"), printDirectives(path, print, n)]); + } + + case "InlineFragment": + { + return concat$6(["...", n.typeCondition ? concat$6([" on ", path.call(print, "typeCondition")]) : "", printDirectives(path, print, n), " ", path.call(print, "selectionSet")]); + } + + case "UnionTypeExtension": + case "UnionTypeDefinition": + { + return group$5(concat$6([path.call(print, "description"), n.description ? hardline$5 : "", group$5(concat$6([n.kind === "UnionTypeExtension" ? "extend " : "", "union ", path.call(print, "name"), printDirectives(path, print, n), n.types.length > 0 ? concat$6([" =", ifBreak$2("", " "), indent$3(concat$6([ifBreak$2(concat$6([line$4, " "])), join$3(concat$6([line$4, "| "]), path.map(print, "types"))]))]) : ""]))])); + } + + case "ScalarTypeExtension": + case "ScalarTypeDefinition": + { + return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", path.call(print, "name"), printDirectives(path, print, n)]); + } + + case "NonNullType": + { + return concat$6([path.call(print, "type"), "!"]); + } + + case "ListType": + { + return concat$6(["[", path.call(print, "type"), "]"]); + } + + default: + /* istanbul ignore next */ + throw new Error("unknown graphql type: " + JSON.stringify(n.kind)); + } +} + +function printDirectives(path, print, n) { + if (n.directives.length === 0) { + return ""; + } + + return concat$6([" ", group$5(indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", " "), softline$2]), path.map(print, "directives"))])))]); +} + +function printSequence(sequencePath, options, print) { + var count = sequencePath.getValue().length; + return sequencePath.map(function (path, i) { + var printed = print(path); + + if (isNextLineEmpty$3(options.originalText, path.getValue(), options) && i < count - 1) { + return concat$6([printed, hardline$5]); + } + + return printed; + }); +} + +function canAttachComment(node) { + return node.kind && node.kind !== "Comment"; +} + +function printComment$1(commentPath) { + var comment = commentPath.getValue(); + + if (comment.kind === "Comment") { + return "#" + comment.value.trimRight(); + } + + throw new Error("Not a comment: " + JSON.stringify(comment)); +} + +function determineInterfaceSeparator(originalSource) { + var start = originalSource.indexOf("implements"); + + if (start === -1) { + throw new Error("Must implement interfaces: " + originalSource); + } + + var end = originalSource.indexOf("{"); + + if (end === -1) { + end = originalSource.length; + } + + return originalSource.substr(start, end).includes("&") ? " & " : ", "; +} + +function clean$2(node, newNode +/*, parent*/ +) { + delete newNode.loc; + delete newNode.comments; +} + +var printerGraphql = { + print: genericPrint$1, + massageAstNode: clean$2, + hasPrettierIgnore: hasIgnoreComment$2, + insertPragma: insertPragma$3, + printComment: printComment$1, + canAttachComment: canAttachComment +}; + +var options$6 = { + bracketSpacing: commonOptions.bracketSpacing +}; + +var name$5 = "GraphQL"; +var type$4 = "data"; +var extensions$4 = [".graphql", ".gql"]; +var tmScope$4 = "source.graphql"; +var aceMode$4 = "text"; +var languageId$4 = 139; +var graphql = { + name: name$5, + type: type$4, + extensions: extensions$4, + tmScope: tmScope$4, + aceMode: aceMode$4, + languageId: languageId$4 +}; + +var graphql$1 = Object.freeze({ + name: name$5, + type: type$4, + extensions: extensions$4, + tmScope: tmScope$4, + aceMode: aceMode$4, + languageId: languageId$4, + default: graphql +}); + +var require$$0$17 = ( graphql$1 && graphql ) || graphql$1; + +var languages$1 = [createLanguage(require$$0$17, { + override: { + since: "1.5.0", + parsers: ["graphql"], + vscodeLanguageIds: ["graphql"] + } +})]; +var printers$1 = { + graphql: printerGraphql +}; +var languageGraphql = { + languages: languages$1, + options: options$6, + printers: printers$1 +}; + +var _require$$0$builders$3 = doc.builders; +var concat$7 = _require$$0$builders$3.concat; +var join$4 = _require$$0$builders$3.join; +var softline$3 = _require$$0$builders$3.softline; +var hardline$6 = _require$$0$builders$3.hardline; +var line$5 = _require$$0$builders$3.line; +var group$6 = _require$$0$builders$3.group; +var indent$4 = _require$$0$builders$3.indent; +var ifBreak$3 = _require$$0$builders$3.ifBreak; // http://w3c.github.io/html/single-page.html#void-elements + +var voidTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]; // Formatter based on @glimmerjs/syntax's built-in test formatter: +// https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/generation/print.ts + +function print(path, options, print) { + var n = path.getValue(); + /* istanbul ignore if*/ + + if (!n) { + return ""; + } + + switch (n.type) { + case "Program": + { + return group$6(join$4(softline$3, path.map(print, "body").filter(function (text) { + return text !== ""; + }))); + } + + case "ElementNode": + { + var tagFirstChar = n.tag[0]; + var isLocal = n.tag.indexOf(".") !== -1; + var isGlimmerComponent = tagFirstChar.toUpperCase() === tagFirstChar || isLocal; + var hasChildren = n.children.length > 0; + var isVoid = isGlimmerComponent && !hasChildren || voidTags.indexOf(n.tag) !== -1; + var closeTag = isVoid ? concat$7([" />", softline$3]) : ">"; + + var _getParams = function _getParams(path, print) { + return indent$4(concat$7([n.attributes.length ? line$5 : "", join$4(line$5, path.map(print, "attributes")), n.modifiers.length ? line$5 : "", join$4(line$5, path.map(print, "modifiers")), n.comments.length ? line$5 : "", join$4(line$5, path.map(print, "comments"))])); + }; // The problem here is that I want to not break at all if the children + // would not break but I need to force an indent, so I use a hardline. + + /** + * What happens now: + *
      + * Hello + *
      + * ==> + *
      Hello
      + * This is due to me using hasChildren to decide to put the hardline in. + * I would rather use a {DOES THE WHOLE THING NEED TO BREAK} + */ + + + return concat$7([group$6(concat$7(["<", n.tag, _getParams(path, print), n.blockParams.length ? " as |".concat(n.blockParams.join(" "), "|") : "", ifBreak$3(softline$3, ""), closeTag])), group$6(concat$7([indent$4(join$4(softline$3, [""].concat(path.map(print, "children")))), ifBreak$3(hasChildren ? hardline$6 : "", ""), !isVoid ? concat$7([""]) : ""]))]); + } + + case "BlockStatement": + { + var pp = path.getParentNode(1); + var isElseIf = pp && pp.inverse && pp.inverse.body[0] === n && pp.inverse.body[0].path.parts[0] === "if"; + var hasElseIf = n.inverse && n.inverse.body[0] && n.inverse.body[0].type === "BlockStatement" && n.inverse.body[0].path.parts[0] === "if"; + var indentElse = hasElseIf ? function (a) { + return a; + } : indent$4; + + if (n.inverse) { + return concat$7([isElseIf ? concat$7(["{{else ", printPathParams(path, print), "}}"]) : printOpenBlock(path, print), indent$4(concat$7([hardline$6, path.call(print, "program")])), n.inverse && !hasElseIf ? concat$7([hardline$6, "{{else}}"]) : "", n.inverse ? indentElse(concat$7([hardline$6, path.call(print, "inverse")])) : "", isElseIf ? "" : concat$7([hardline$6, printCloseBlock(path, print)])]); + } else if (isElseIf) { + return concat$7([concat$7(["{{else ", printPathParams(path, print), "}}"]), indent$4(concat$7([hardline$6, path.call(print, "program")]))]); + } + /** + * I want this boolean to be: if params are going to cause a break, + * not that it has params. + */ + + + var hasParams = n.params.length > 0 || n.hash.pairs.length > 0; + + var _hasChildren = n.program.body.length > 0; + + return concat$7([printOpenBlock(path, print), group$6(concat$7([indent$4(concat$7([softline$3, path.call(print, "program")])), hasParams && _hasChildren ? hardline$6 : softline$3, printCloseBlock(path, print)]))]); + } + + case "ElementModifierStatement": + case "MustacheStatement": + { + var _pp = path.getParentNode(1); + + var isConcat = _pp && _pp.type === "ConcatStatement"; + return group$6(concat$7([n.escaped === false ? "{{{" : "{{", printPathParams(path, print), isConcat ? "" : softline$3, n.escaped === false ? "}}}" : "}}"])); + } + + case "SubExpression": + { + var params = getParams(path, print); + var printedParams = params.length > 0 ? indent$4(concat$7([line$5, group$6(join$4(line$5, params))])) : ""; + return group$6(concat$7(["(", printPath(path, print), printedParams, softline$3, ")"])); + } + + case "AttrNode": + { + var isText = n.value.type === "TextNode"; + + if (isText && n.value.loc.start.column === n.value.loc.end.column) { + return concat$7([n.name]); + } + + var quote = isText ? '"' : ""; + return concat$7([n.name, "=", quote, path.call(print, "value"), quote]); + } + + case "ConcatStatement": + { + return concat$7(['"', group$6(indent$4(join$4(softline$3, path.map(function (partPath) { + return print(partPath); + }, "parts").filter(function (a) { + return a !== ""; + })))), '"']); + } + + case "Hash": + { + return concat$7([join$4(line$5, path.map(print, "pairs"))]); + } + + case "HashPair": + { + return concat$7([n.key, "=", path.call(print, "value")]); + } + + case "TextNode": + { + var leadingSpace = ""; + var trailingSpace = ""; // preserve a space inside of an attribute node where whitespace present, when next to mustache statement. + + var inAttrNode = path.stack.indexOf("attributes") >= 0; + + if (inAttrNode) { + var parentNode = path.getParentNode(0); + + var _isConcat = parentNode.type === "ConcatStatement"; + + if (_isConcat) { + var parts = parentNode.parts; + var partIndex = parts.indexOf(n); + + if (partIndex > 0) { + var partType = parts[partIndex - 1].type; + var isMustache = partType === "MustacheStatement"; + + if (isMustache) { + leadingSpace = " "; + } + } + + if (partIndex < parts.length - 1) { + var _partType = parts[partIndex + 1].type; + + var _isMustache = _partType === "MustacheStatement"; + + if (_isMustache) { + trailingSpace = " "; + } + } + } + } + + return n.chars.replace(/^\s+/, leadingSpace).replace(/\s+$/, trailingSpace); + } + + case "MustacheCommentStatement": + { + var dashes = n.value.indexOf("}}") > -1 ? "--" : ""; + return concat$7(["{{!", dashes, n.value, dashes, "}}"]); + } + + case "PathExpression": + { + return n.original; + } + + case "BooleanLiteral": + { + return String(n.value); + } + + case "CommentStatement": + { + return concat$7([""]); + } + + case "StringLiteral": + { + return printStringLiteral(n.value, options); + } + + case "NumberLiteral": + { + return String(n.value); + } + + case "UndefinedLiteral": + { + return "undefined"; + } + + case "NullLiteral": + { + return "null"; + } + + /* istanbul ignore next */ + + default: + throw new Error("unknown glimmer type: " + JSON.stringify(n.type)); + } +} +/** + * Prints a string literal with the correct surrounding quotes based on + * `options.singleQuote` and the number of escaped quotes contained in + * the string literal. This function is the glimmer equivalent of `printString` + * in `common/util`, but has differences because of the way escaped characters + * are treated in hbs string literals. + * @param {string} stringLiteral - the string literal value + * @param {object} options - the prettier options object + */ + + +function printStringLiteral(stringLiteral, options) { + var double = { + quote: '"', + regex: /"/g + }; + var single = { + quote: "'", + regex: /'/g + }; + var preferred = options.singleQuote ? single : double; + var alternate = preferred === single ? double : single; + var shouldUseAlternateQuote = false; // If `stringLiteral` contains at least one of the quote preferred for + // enclosing the string, we might want to enclose with the alternate quote + // instead, to minimize the number of escaped quotes. + + if (stringLiteral.includes(preferred.quote) || stringLiteral.includes(alternate.quote)) { + var numPreferredQuotes = (stringLiteral.match(preferred.regex) || []).length; + var numAlternateQuotes = (stringLiteral.match(alternate.regex) || []).length; + shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes; + } + + var enclosingQuote = shouldUseAlternateQuote ? alternate : preferred; + var escapedStringLiteral = stringLiteral.replace(enclosingQuote.regex, "\\".concat(enclosingQuote.quote)); + return "".concat(enclosingQuote.quote).concat(escapedStringLiteral).concat(enclosingQuote.quote); +} + +function printPath(path, print) { + return path.call(print, "path"); +} + +function getParams(path, print) { + var node = path.getValue(); + var parts = []; + + if (node.params.length > 0) { + parts = parts.concat(path.map(print, "params")); + } + + if (node.hash && node.hash.pairs.length > 0) { + parts.push(path.call(print, "hash")); + } + + return parts; +} + +function printPathParams(path, print) { + var parts = []; + parts.push(printPath(path, print)); + parts = parts.concat(getParams(path, print)); + return indent$4(group$6(join$4(line$5, parts))); +} + +function printBlockParams(path) { + var block = path.getValue(); + + if (!block.program || !block.program.blockParams.length) { + return ""; + } + + return concat$7([" as |", block.program.blockParams.join(" "), "|"]); +} + +function printOpenBlock(path, print) { + return group$6(concat$7(["{{#", printPathParams(path, print), printBlockParams(path), softline$3, "}}"])); +} + +function printCloseBlock(path, print) { + return concat$7(["{{/", path.call(print, "path"), "}}"]); +} + +function clean$3(ast, newObj) { + delete newObj.loc; // (Glimmer/HTML) ignore TextNode whitespace + + if (ast.type === "TextNode") { + if (ast.chars.replace(/\s+/, "") === "") { + return null; + } + + newObj.chars = ast.chars.replace(/^\s+/, "").replace(/\s+$/, ""); + } +} + +var printerGlimmer = { + print: print, + massageAstNode: clean$3 +}; + +var name$6 = "Handlebars"; +var type$5 = "markup"; +var group$7 = "HTML"; +var aliases = ["hbs", "htmlbars"]; +var extensions$5 = [".handlebars", ".hbs"]; +var tmScope$5 = "text.html.handlebars"; +var aceMode$5 = "handlebars"; +var languageId$5 = 155; +var handlebars = { + name: name$6, + type: type$5, + group: group$7, + aliases: aliases, + extensions: extensions$5, + tmScope: tmScope$5, + aceMode: aceMode$5, + languageId: languageId$5 +}; + +var handlebars$1 = Object.freeze({ + name: name$6, + type: type$5, + group: group$7, + aliases: aliases, + extensions: extensions$5, + tmScope: tmScope$5, + aceMode: aceMode$5, + languageId: languageId$5, + default: handlebars +}); + +var require$$0$18 = ( handlebars$1 && handlebars ) || handlebars$1; + +var languages$2 = [createLanguage(require$$0$18, { + override: { + since: null, + // unreleased + parsers: ["glimmer"], + vscodeLanguageIds: ["handlebars"] + } +})]; +var printers$2 = { + glimmer: printerGlimmer +}; +var languageHandlebars = { + languages: languages$2, + printers: printers$2 +}; + +var clean$4 = function clean(ast, newNode) { + delete newNode.sourceSpan; + delete newNode.startSourceSpan; + delete newNode.endSourceSpan; + delete newNode.nameSpan; + delete newNode.valueSpan; + + if (ast.type === "text" || ast.type === "comment") { + return null; + } // may be formatted by multiparser + + + if (ast.type === "yaml" || ast.type === "toml") { + return null; + } + + if (ast.type === "attribute") { + delete newNode.value; + } + + if (ast.type === "docType") { + delete newNode.value; + } +}; + +var a = ["accesskey", "charset", "coords", "download", "href", "hreflang", "name", "ping", "referrerpolicy", "rel", "rev", "shape", "tabindex", "target", "type"]; +var abbr = ["title"]; +var applet = ["align", "alt", "archive", "code", "codebase", "height", "hspace", "name", "object", "vspace", "width"]; +var area = ["accesskey", "alt", "coords", "download", "href", "hreflang", "nohref", "ping", "referrerpolicy", "rel", "shape", "tabindex", "target", "type"]; +var audio = ["autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src"]; +var base$2 = ["href", "target"]; +var basefont = ["color", "face", "size"]; +var bdo = ["dir"]; +var blockquote = ["cite"]; +var body = ["alink", "background", "bgcolor", "link", "text", "vlink"]; +var br = ["clear"]; +var button = ["accesskey", "autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "tabindex", "type", "value"]; +var canvas = ["height", "width"]; +var caption = ["align"]; +var col = ["align", "char", "charoff", "span", "valign", "width"]; +var colgroup = ["align", "char", "charoff", "span", "valign", "width"]; +var data = ["value"]; +var del = ["cite", "datetime"]; +var details = ["open"]; +var dfn = ["title"]; +var dialog = ["open"]; +var dir = ["compact"]; +var div = ["align"]; +var dl = ["compact"]; +var embed$3 = ["height", "src", "type", "width"]; +var fieldset = ["disabled", "form", "name"]; +var font = ["color", "face", "size"]; +var form = ["accept", "accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"]; +var frame = ["frameborder", "longdesc", "marginheight", "marginwidth", "name", "noresize", "scrolling", "src"]; +var frameset = ["cols", "rows"]; +var h1 = ["align"]; +var h2 = ["align"]; +var h3 = ["align"]; +var h4 = ["align"]; +var h5 = ["align"]; +var h6 = ["align"]; +var head = ["profile"]; +var hr = ["align", "noshade", "size", "width"]; +var html = ["manifest", "version"]; +var iframe = ["align", "allowfullscreen", "allowpaymentrequest", "allowusermedia", "frameborder", "height", "longdesc", "marginheight", "marginwidth", "name", "referrerpolicy", "sandbox", "scrolling", "src", "srcdoc", "width"]; +var img = ["align", "alt", "border", "crossorigin", "decoding", "height", "hspace", "ismap", "longdesc", "name", "referrerpolicy", "sizes", "src", "srcset", "usemap", "vspace", "width"]; +var input = ["accept", "accesskey", "align", "alt", "autocomplete", "autofocus", "checked", "dirname", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "ismap", "list", "max", "maxlength", "min", "minlength", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "tabindex", "title", "type", "usemap", "value", "width"]; +var ins = ["cite", "datetime"]; +var isindex = ["prompt"]; +var label = ["accesskey", "for", "form"]; +var legend = ["accesskey", "align"]; +var li = ["type", "value"]; +var link$1 = ["as", "charset", "color", "crossorigin", "href", "hreflang", "integrity", "media", "nonce", "referrerpolicy", "rel", "rev", "sizes", "target", "title", "type"]; +var map = ["name"]; +var menu = ["compact"]; +var meta = ["charset", "content", "http-equiv", "name", "scheme"]; +var meter = ["high", "low", "max", "min", "optimum", "value"]; +var object = ["align", "archive", "border", "classid", "codebase", "codetype", "data", "declare", "form", "height", "hspace", "name", "standby", "tabindex", "type", "typemustmatch", "usemap", "vspace", "width"]; +var ol = ["compact", "reversed", "start", "type"]; +var optgroup = ["disabled", "label"]; +var option = ["disabled", "label", "selected", "value"]; +var output = ["for", "form", "name"]; +var p = ["align"]; +var param = ["name", "type", "value", "valuetype"]; +var pre = ["width"]; +var progress = ["max", "value"]; +var q = ["cite"]; +var script = ["async", "charset", "crossorigin", "defer", "integrity", "language", "nomodule", "nonce", "referrerpolicy", "src", "type"]; +var select = ["autocomplete", "autofocus", "disabled", "form", "multiple", "name", "required", "size", "tabindex"]; +var slot = ["name"]; +var source = ["media", "sizes", "src", "srcset", "type"]; +var style = ["media", "nonce", "title", "type"]; +var table = ["align", "bgcolor", "border", "cellpadding", "cellspacing", "frame", "rules", "summary", "width"]; +var tbody = ["align", "char", "charoff", "valign"]; +var td = ["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"]; +var textarea = ["accesskey", "autocomplete", "autofocus", "cols", "dirname", "disabled", "form", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows", "tabindex", "wrap"]; +var tfoot = ["align", "char", "charoff", "valign"]; +var th = ["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"]; +var thead = ["align", "char", "charoff", "valign"]; +var time = ["datetime"]; +var tr = ["align", "bgcolor", "char", "charoff", "valign"]; +var track = ["default", "kind", "label", "src", "srclang"]; +var ul = ["compact", "type"]; +var video = ["autoplay", "controls", "crossorigin", "height", "loop", "muted", "playsinline", "poster", "preload", "src", "width"]; +var index$13 = { + a: a, + abbr: abbr, + applet: applet, + area: area, + audio: audio, + base: base$2, + basefont: basefont, + bdo: bdo, + blockquote: blockquote, + body: body, + br: br, + button: button, + canvas: canvas, + caption: caption, + col: col, + colgroup: colgroup, + data: data, + del: del, + details: details, + dfn: dfn, + dialog: dialog, + dir: dir, + div: div, + dl: dl, + embed: embed$3, + fieldset: fieldset, + font: font, + form: form, + frame: frame, + frameset: frameset, + h1: h1, + h2: h2, + h3: h3, + h4: h4, + h5: h5, + h6: h6, + head: head, + hr: hr, + html: html, + iframe: iframe, + img: img, + input: input, + ins: ins, + isindex: isindex, + label: label, + legend: legend, + li: li, + link: link$1, + map: map, + menu: menu, + meta: meta, + meter: meter, + object: object, + ol: ol, + optgroup: optgroup, + option: option, + output: output, + p: p, + param: param, + pre: pre, + progress: progress, + q: q, + script: script, + select: select, + slot: slot, + source: source, + style: style, + table: table, + tbody: tbody, + td: td, + textarea: textarea, + tfoot: tfoot, + th: th, + thead: thead, + time: time, + tr: tr, + track: track, + ul: ul, + video: video, + "*": ["accesskey", "autocapitalize", "class", "contenteditable", "dir", "draggable", "hidden", "id", "inputmode", "is", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "nonce", "slot", "spellcheck", "style", "tabindex", "title", "translate"] +}; + +var htmlElementAttributes = Object.freeze({ + a: a, + abbr: abbr, + applet: applet, + area: area, + audio: audio, + base: base$2, + basefont: basefont, + bdo: bdo, + blockquote: blockquote, + body: body, + br: br, + button: button, + canvas: canvas, + caption: caption, + col: col, + colgroup: colgroup, + data: data, + del: del, + details: details, + dfn: dfn, + dialog: dialog, + dir: dir, + div: div, + dl: dl, + embed: embed$3, + fieldset: fieldset, + font: font, + form: form, + frame: frame, + frameset: frameset, + h1: h1, + h2: h2, + h3: h3, + h4: h4, + h5: h5, + h6: h6, + head: head, + hr: hr, + html: html, + iframe: iframe, + img: img, + input: input, + ins: ins, + isindex: isindex, + label: label, + legend: legend, + li: li, + link: link$1, + map: map, + menu: menu, + meta: meta, + meter: meter, + object: object, + ol: ol, + optgroup: optgroup, + option: option, + output: output, + p: p, + param: param, + pre: pre, + progress: progress, + q: q, + script: script, + select: select, + slot: slot, + source: source, + style: style, + table: table, + tbody: tbody, + td: td, + textarea: textarea, + tfoot: tfoot, + th: th, + thead: thead, + time: time, + tr: tr, + track: track, + ul: ul, + video: video, + default: index$13 +}); + +const json$4 = {"CSS_DISPLAY_TAGS":{"area":"none","base":"none","basefont":"none","datalist":"none","head":"none","link":"none","meta":"none","noembed":"none","noframes":"none","param":"none","rp":"none","script":"none","source":"block","style":"none","template":"inline","track":"block","title":"none","html":"block","body":"block","address":"block","blockquote":"block","center":"block","div":"block","figure":"block","figcaption":"block","footer":"block","form":"block","header":"block","hr":"block","legend":"block","listing":"block","main":"block","p":"block","plaintext":"block","pre":"block","xmp":"block","slot":"contents","ruby":"ruby","rt":"ruby-text","article":"block","aside":"block","h1":"block","h2":"block","h3":"block","h4":"block","h5":"block","h6":"block","hgroup":"block","nav":"block","section":"block","dir":"block","dd":"block","dl":"block","dt":"block","ol":"block","ul":"block","li":"list-item","table":"table","caption":"table-caption","colgroup":"table-column-group","col":"table-column","thead":"table-header-group","tbody":"table-row-group","tfoot":"table-footer-group","tr":"table-row","td":"table-cell","th":"table-cell","fieldset":"block","button":"inline-block","video":"inline-block","audio":"inline-block"},"CSS_DISPLAY_DEFAULT":"inline","CSS_WHITE_SPACE_TAGS":{"listing":"pre","plaintext":"pre","pre":"pre","xmp":"pre","nobr":"nowrap","table":"initial","textarea":"pre-wrap"},"CSS_WHITE_SPACE_DEFAULT":"normal"}; + +var htmlElementAttributes$1 = ( htmlElementAttributes && index$13 ) || htmlElementAttributes; + +var concat$9 = doc.builders.concat; +var mapDoc$4 = doc.utils.mapDoc; +var CSS_DISPLAY_TAGS = json$4.CSS_DISPLAY_TAGS; +var CSS_DISPLAY_DEFAULT = json$4.CSS_DISPLAY_DEFAULT; +var CSS_WHITE_SPACE_TAGS = json$4.CSS_WHITE_SPACE_TAGS; +var CSS_WHITE_SPACE_DEFAULT = json$4.CSS_WHITE_SPACE_DEFAULT; +var HTML_TAGS = arrayToMap(htmlTagNames$1); +var HTML_ELEMENT_ATTRIBUTES = mapObject(htmlElementAttributes$1, arrayToMap); + +function arrayToMap(array) { + var map = Object.create(null); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var value = _step.value; + map[value] = true; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return map; +} + +function mapObject(object, fn) { + var newObject = Object.create(null); + + var _arr = Object.keys(object); + + for (var _i = 0; _i < _arr.length; _i++) { + var key = _arr[_i]; + newObject[key] = fn(object[key], key); + } + + return newObject; +} + +function shouldPreserveContent$1(node) { + if (node.type === "element" && node.fullName === "template" && node.attrMap.lang && node.attrMap.lang !== "html") { + return true; + } // unterminated node in ie conditional comment + // e.g. + + + if (node.type === "ieConditionalComment" && node.lastChild && !node.lastChild.isSelfClosing && !node.lastChild.endSourceSpan) { + return true; + } // incomplete html in ie conditional comment + // e.g. + + + if (node.type === "ieConditionalComment" && !node.complete) { + return true; + } // TODO: handle non-text children in
      +
      +
      +  if (isPreLikeNode$1(node) && node.children.some(function (child) {
      +    return child.type !== "text" && child.type !== "interpolation";
      +  })) {
      +    return true;
      +  }
      +
      +  return false;
      +}
      +
      +function hasPrettierIgnore$1(node) {
      +  if (node.type === "attribute" || node.type === "text") {
      +    return false;
      +  }
      +
      +  if (!node.parent) {
      +    return false;
      +  }
      +
      +  if (typeof node.index !== "number" || node.index === 0) {
      +    return false;
      +  }
      +
      +  var prevNode = node.parent.children[node.index - 1];
      +  return isPrettierIgnore(prevNode);
      +}
      +
      +function isPrettierIgnore(node) {
      +  return node.type === "comment" && node.value.trim() === "prettier-ignore";
      +}
      +
      +function getPrettierIgnoreAttributeCommentData$1(value) {
      +  var match = value.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);
      +
      +  if (!match) {
      +    return false;
      +  }
      +
      +  if (!match[1]) {
      +    return true;
      +  }
      +
      +  return match[1].split(/\s+/);
      +}
      +
      +function isScriptLikeTag$1(node) {
      +  return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
      +}
      +
      +function isFrontMatterNode(node) {
      +  return node.type === "yaml" || node.type === "toml";
      +}
      +
      +function canHaveInterpolation(node) {
      +  return node.children && !isScriptLikeTag$1(node);
      +}
      +
      +function isWhitespaceSensitiveNode(node) {
      +  return isScriptLikeTag$1(node) || node.type === "interpolation" || isIndentationSensitiveNode(node);
      +}
      +
      +function isIndentationSensitiveNode(node) {
      +  return getNodeCssStyleWhiteSpace(node).startsWith("pre");
      +}
      +
      +function isLeadingSpaceSensitiveNode(node) {
      +  if (isFrontMatterNode(node)) {
      +    return false;
      +  }
      +
      +  if ((node.type === "text" || node.type === "interpolation") && node.prev && (node.prev.type === "text" || node.prev.type === "interpolation")) {
      +    return true;
      +  }
      +
      +  if (!node.parent || node.parent.cssDisplay === "none") {
      +    return false;
      +  }
      +
      +  if (!node.prev && node.parent.type === "element" && node.parent.tagDefinition.ignoreFirstLf) {
      +    return false;
      +  }
      +
      +  if (isPreLikeNode$1(node.parent)) {
      +    return true;
      +  }
      +
      +  if (!node.prev && (node.parent.type === "root" || isScriptLikeTag$1(node.parent) || !isFirstChildLeadingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
      +    return false;
      +  }
      +
      +  if (node.prev && !isNextLeadingSpaceSensitiveCssDisplay(node.prev.cssDisplay)) {
      +    return false;
      +  }
      +
      +  return true;
      +}
      +
      +function isTrailingSpaceSensitiveNode(node) {
      +  if (isFrontMatterNode(node)) {
      +    return false;
      +  }
      +
      +  if ((node.type === "text" || node.type === "interpolation") && node.next && (node.next.type === "text" || node.next.type === "interpolation")) {
      +    return true;
      +  }
      +
      +  if (!node.parent || node.parent.cssDisplay === "none") {
      +    return false;
      +  }
      +
      +  if (isPreLikeNode$1(node.parent)) {
      +    return true;
      +  }
      +
      +  if (!node.next && (node.parent.type === "root" || isScriptLikeTag$1(node.parent) || !isLastChildTrailingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
      +    return false;
      +  }
      +
      +  if (node.next && !isPrevTrailingSpaceSensitiveCssDisplay(node.next.cssDisplay)) {
      +    return false;
      +  }
      +
      +  return true;
      +}
      +
      +function isDanglingSpaceSensitiveNode(node) {
      +  return isDanglingSpaceSensitiveCssDisplay(node.cssDisplay) && !isScriptLikeTag$1(node);
      +}
      +
      +function replaceNewlines$1(text, replacement) {
      +  return text.split(/(\n)/g).map(function (data, index) {
      +    return index % 2 === 1 ? replacement : data;
      +  });
      +}
      +
      +function replaceDocNewlines$1(doc$$2, replacement) {
      +  return mapDoc$4(doc$$2, function (currentDoc) {
      +    return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$9(replaceNewlines$1(currentDoc, replacement)) : currentDoc;
      +  });
      +}
      +
      +function forceNextEmptyLine$1(node) {
      +  return isFrontMatterNode(node) || node.next && node.sourceSpan.end.line + 1 < node.next.sourceSpan.start.line;
      +}
      +/** firstChild leadingSpaces and lastChild trailingSpaces */
      +
      +
      +function forceBreakContent$1(node) {
      +  return forceBreakChildren$1(node) || node.type === "element" && node.children.length !== 0 && (["body", "template", "script", "style"].indexOf(node.name) !== -1 || node.children.some(function (child) {
      +    return hasNonTextChild(child);
      +  }));
      +}
      +/** spaces between children */
      +
      +
      +function forceBreakChildren$1(node) {
      +  return node.type === "element" && node.children.length !== 0 && (["html", "head", "ul", "ol", "select"].indexOf(node.name) !== -1 || node.cssDisplay.startsWith("table") && node.cssDisplay !== "table-cell");
      +}
      +
      +function preferHardlineAsLeadingSpaces$1(node) {
      +  return preferHardlineAsSurroundingSpaces(node) || node.prev && preferHardlineAsTrailingSpaces(node.prev) || isCustomElementWithSurroundingLineBreak(node);
      +}
      +
      +function preferHardlineAsTrailingSpaces(node) {
      +  return preferHardlineAsSurroundingSpaces(node) || node.type === "element" && node.fullName === "br" || isCustomElementWithSurroundingLineBreak(node);
      +}
      +
      +function isCustomElementWithSurroundingLineBreak(node) {
      +  return isCustomElement(node) && hasSurroundingLineBreak(node);
      +}
      +
      +function isCustomElement(node) {
      +  return node.type === "element" && !node.namespace && (node.name.includes("-") || /[A-Z]/.test(node.name[0]));
      +}
      +
      +function hasSurroundingLineBreak(node) {
      +  return hasLeadingLineBreak(node) && hasTrailingLineBreak(node);
      +}
      +
      +function hasLeadingLineBreak(node) {
      +  return node.hasLeadingSpaces && (node.prev ? node.prev.sourceSpan.end.line < node.sourceSpan.start.line : node.parent.type === "root" || node.parent.startSourceSpan.end.line < node.sourceSpan.start.line);
      +}
      +
      +function hasTrailingLineBreak(node) {
      +  return node.hasTrailingSpaces && (node.next ? node.next.sourceSpan.start.line > node.sourceSpan.end.line : node.parent.type === "root" || node.parent.endSourceSpan.start.line > node.sourceSpan.end.line);
      +}
      +
      +function preferHardlineAsSurroundingSpaces(node) {
      +  switch (node.type) {
      +    case "ieConditionalComment":
      +    case "comment":
      +    case "directive":
      +      return true;
      +
      +    case "element":
      +      return ["script", "select"].indexOf(node.name) !== -1;
      +  }
      +
      +  return false;
      +}
      +
      +function getLastDescendant$1(node) {
      +  return node.lastChild ? getLastDescendant$1(node.lastChild) : node;
      +}
      +
      +function hasNonTextChild(node) {
      +  return node.children && node.children.some(function (child) {
      +    return child.type !== "text";
      +  });
      +}
      +
      +function inferScriptParser$1(node) {
      +  if (node.name === "script" && !node.attrMap.src) {
      +    if (!node.attrMap.lang && !node.attrMap.type || node.attrMap.type === "module" || node.attrMap.type === "text/javascript" || node.attrMap.type === "text/babel" || node.attrMap.type === "application/javascript") {
      +      return "babylon";
      +    }
      +
      +    if (node.attrMap.type === "application/x-typescript" || node.attrMap.lang === "ts" || node.attrMap.lang === "tsx") {
      +      return "typescript";
      +    }
      +
      +    if (node.attrMap.type === "text/markdown") {
      +      return "markdown";
      +    }
      +  }
      +
      +  if (node.name === "style") {
      +    if (!node.attrMap.lang || node.attrMap.lang === "postcss") {
      +      return "css";
      +    }
      +
      +    if (node.attrMap.lang === "scss") {
      +      return "scss";
      +    }
      +
      +    if (node.attrMap.lang === "less") {
      +      return "less";
      +    }
      +  }
      +
      +  return null;
      +}
      +
      +function isBlockLikeCssDisplay(cssDisplay) {
      +  return cssDisplay === "block" || cssDisplay === "list-item" || cssDisplay.startsWith("table");
      +}
      +
      +function isFirstChildLeadingSpaceSensitiveCssDisplay(cssDisplay) {
      +  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
      +}
      +
      +function isLastChildTrailingSpaceSensitiveCssDisplay(cssDisplay) {
      +  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
      +}
      +
      +function isPrevTrailingSpaceSensitiveCssDisplay(cssDisplay) {
      +  return !isBlockLikeCssDisplay(cssDisplay);
      +}
      +
      +function isNextLeadingSpaceSensitiveCssDisplay(cssDisplay) {
      +  return !isBlockLikeCssDisplay(cssDisplay);
      +}
      +
      +function isDanglingSpaceSensitiveCssDisplay(cssDisplay) {
      +  return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
      +}
      +
      +function isPreLikeNode$1(node) {
      +  return getNodeCssStyleWhiteSpace(node).startsWith("pre");
      +}
      +
      +function countParents$1(path) {
      +  var predicate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
      +    return true;
      +  };
      +  var counter = 0;
      +
      +  for (var i = path.stack.length - 1; i >= 0; i--) {
      +    var value = path.stack[i];
      +
      +    if (value && _typeof(value) === "object" && !Array.isArray(value) && predicate(value)) {
      +      counter++;
      +    }
      +  }
      +
      +  return counter;
      +}
      +
      +function hasParent(node, fn) {
      +  var current = node;
      +
      +  while (current) {
      +    if (fn(current)) {
      +      return true;
      +    }
      +
      +    current = current.parent;
      +  }
      +
      +  return false;
      +}
      +
      +function getNodeCssStyleDisplay(node, options) {
      +  if (node.prev && node.prev.type === "comment") {
      +    // 
      +    var match = node.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);
      +
      +    if (match) {
      +      return match[1];
      +    }
      +  }
      +
      +  var isInSvgForeignObject = false;
      +
      +  if (node.type === "element" && node.namespace === "svg") {
      +    if (hasParent(node, function (parent) {
      +      return parent.fullName === "svg:foreignObject";
      +    })) {
      +      isInSvgForeignObject = true;
      +    } else {
      +      return node.name === "svg" ? "inline-block" : "block";
      +    }
      +  }
      +
      +  switch (options.htmlWhitespaceSensitivity) {
      +    case "strict":
      +      return "inline";
      +
      +    case "ignore":
      +      return "block";
      +
      +    default:
      +      return node.type === "element" && (!node.namespace || isInSvgForeignObject) && CSS_DISPLAY_TAGS[node.name] || CSS_DISPLAY_DEFAULT;
      +  }
      +}
      +
      +function getNodeCssStyleWhiteSpace(node) {
      +  return node.type === "element" && !node.namespace && CSS_WHITE_SPACE_TAGS[node.name] || CSS_WHITE_SPACE_DEFAULT;
      +}
      +
      +function getCommentData$1(node) {
      +  var rightTrimmedValue = node.value.trimRight();
      +  var hasLeadingEmptyLine = /^[^\S\n]*?\n/.test(node.value);
      +
      +  if (hasLeadingEmptyLine) {
      +    /**
      +     *     
      +     */
      +    return dedentString$1(rightTrimmedValue.replace(/^\s*\n/, ""));
      +  }
      +  /**
      +   *     
      +   *
      +   *     
      +   *
      +   *     
      +   */
      +
      +
      +  if (!rightTrimmedValue.includes("\n")) {
      +    return rightTrimmedValue.trimLeft();
      +  }
      +
      +  var firstNewlineIndex = rightTrimmedValue.indexOf("\n");
      +  var dataWithoutLeadingLine = rightTrimmedValue.slice(firstNewlineIndex + 1);
      +  var minIndentationForDataWithoutLeadingLine = getMinIndentation(dataWithoutLeadingLine);
      +  var leadingSpaces = rightTrimmedValue.match(/^[^\n\S]*/)[0].length;
      +  var commentDataStartColumn = node.sourceSpan.start.col + "
      +   */
      +
      +  if (minIndentationForDataWithoutLeadingLine >= commentDataStartColumn) {
      +    return dedentString$1(" ".repeat(commentDataStartColumn) + rightTrimmedValue.slice(leadingSpaces));
      +  }
      +
      +  var leadingLineValue = rightTrimmedValue.slice(0, firstNewlineIndex);
      +  /**
      +   *     
      +   */
      +
      +  return leadingLineValue.trim() + "\n" + dedentString$1(dataWithoutLeadingLine, minIndentationForDataWithoutLeadingLine);
      +}
      +
      +function getMinIndentation(text) {
      +  var minIndentation = Infinity;
      +  var _iteratorNormalCompletion2 = true;
      +  var _didIteratorError2 = false;
      +  var _iteratorError2 = undefined;
      +
      +  try {
      +    for (var _iterator2 = text.split("\n")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
      +      var lineText = _step2.value;
      +
      +      if (lineText.length === 0) {
      +        continue;
      +      }
      +
      +      if (/\S/.test(lineText[0])) {
      +        return 0;
      +      }
      +
      +      var indentation = lineText.match(/^\s*/)[0].length;
      +
      +      if (lineText.length === indentation) {
      +        continue;
      +      }
      +
      +      if (indentation < minIndentation) {
      +        minIndentation = indentation;
      +      }
      +    }
      +  } catch (err) {
      +    _didIteratorError2 = true;
      +    _iteratorError2 = err;
      +  } finally {
      +    try {
      +      if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
      +        _iterator2.return();
      +      }
      +    } finally {
      +      if (_didIteratorError2) {
      +        throw _iteratorError2;
      +      }
      +    }
      +  }
      +
      +  return minIndentation === Infinity ? 0 : minIndentation;
      +}
      +
      +function dedentString$1(text) {
      +  var minIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMinIndentation(text);
      +  return minIndent === 0 ? text : text.split("\n").map(function (lineText) {
      +    return lineText.slice(minIndent);
      +  }).join("\n");
      +}
      +
      +function normalizeParts$1(parts) {
      +  var newParts = [];
      +  var restParts = parts.slice();
      +
      +  while (restParts.length !== 0) {
      +    var part = restParts.shift();
      +
      +    if (!part) {
      +      continue;
      +    }
      +
      +    if (part.type === "concat") {
      +      Array.prototype.unshift.apply(restParts, part.parts);
      +      continue;
      +    }
      +
      +    if (newParts.length !== 0 && typeof newParts[newParts.length - 1] === "string" && typeof part === "string") {
      +      newParts.push(newParts.pop() + part);
      +      continue;
      +    }
      +
      +    newParts.push(part);
      +  }
      +
      +  return newParts;
      +}
      +
      +function identity(x) {
      +  return x;
      +}
      +
      +function shouldNotPrintClosingTag$1(node) {
      +  return !node.isSelfClosing && !node.endSourceSpan && (hasPrettierIgnore$1(node) || shouldPreserveContent$1(node.parent));
      +}
      +
      +var utils_1$3 = {
      +  HTML_ELEMENT_ATTRIBUTES: HTML_ELEMENT_ATTRIBUTES,
      +  HTML_TAGS: HTML_TAGS,
      +  canHaveInterpolation: canHaveInterpolation,
      +  countParents: countParents$1,
      +  dedentString: dedentString$1,
      +  forceBreakChildren: forceBreakChildren$1,
      +  forceBreakContent: forceBreakContent$1,
      +  forceNextEmptyLine: forceNextEmptyLine$1,
      +  getCommentData: getCommentData$1,
      +  getLastDescendant: getLastDescendant$1,
      +  getNodeCssStyleDisplay: getNodeCssStyleDisplay,
      +  getNodeCssStyleWhiteSpace: getNodeCssStyleWhiteSpace,
      +  getPrettierIgnoreAttributeCommentData: getPrettierIgnoreAttributeCommentData$1,
      +  hasPrettierIgnore: hasPrettierIgnore$1,
      +  identity: identity,
      +  inferScriptParser: inferScriptParser$1,
      +  isDanglingSpaceSensitiveNode: isDanglingSpaceSensitiveNode,
      +  isFrontMatterNode: isFrontMatterNode,
      +  isIndentationSensitiveNode: isIndentationSensitiveNode,
      +  isLeadingSpaceSensitiveNode: isLeadingSpaceSensitiveNode,
      +  isPreLikeNode: isPreLikeNode$1,
      +  isScriptLikeTag: isScriptLikeTag$1,
      +  isTrailingSpaceSensitiveNode: isTrailingSpaceSensitiveNode,
      +  isWhitespaceSensitiveNode: isWhitespaceSensitiveNode,
      +  normalizeParts: normalizeParts$1,
      +  preferHardlineAsLeadingSpaces: preferHardlineAsLeadingSpaces$1,
      +  preferHardlineAsTrailingSpaces: preferHardlineAsTrailingSpaces,
      +  replaceDocNewlines: replaceDocNewlines$1,
      +  replaceNewlines: replaceNewlines$1,
      +  shouldNotPrintClosingTag: shouldNotPrintClosingTag$1,
      +  shouldPreserveContent: shouldPreserveContent$1
      +};
      +
      +var canHaveInterpolation$1 = utils_1$3.canHaveInterpolation;
      +var getNodeCssStyleDisplay$1 = utils_1$3.getNodeCssStyleDisplay;
      +var isDanglingSpaceSensitiveNode$1 = utils_1$3.isDanglingSpaceSensitiveNode;
      +var isIndentationSensitiveNode$1 = utils_1$3.isIndentationSensitiveNode;
      +var isLeadingSpaceSensitiveNode$1 = utils_1$3.isLeadingSpaceSensitiveNode;
      +var isTrailingSpaceSensitiveNode$1 = utils_1$3.isTrailingSpaceSensitiveNode;
      +var isWhitespaceSensitiveNode$1 = utils_1$3.isWhitespaceSensitiveNode;
      +var PREPROCESS_PIPELINE = [removeIgnorableFirstLf, mergeCdataIntoText, extractInterpolation, extractWhitespaces, addCssDisplay, addIsSelfClosing, addIsSpaceSensitive, mergeSimpleElementIntoText];
      +
      +function preprocess(ast, options) {
      +  for (var _i = 0; _i < PREPROCESS_PIPELINE.length; _i++) {
      +    var fn = PREPROCESS_PIPELINE[_i];
      +    ast = fn(ast, options);
      +  }
      +
      +  return ast;
      +}
      +
      +function removeIgnorableFirstLf(ast
      +/*, options */
      +) {
      +  return ast.map(function (node) {
      +    if (node.type === "element" && node.tagDefinition.ignoreFirstLf && node.children.length !== 0 && node.children[0].type === "text" && node.children[0].value[0] === "\n") {
      +      var text = node.children[0];
      +      return node.clone({
      +        children: text.value.length === 1 ? node.children.slice(1) : [].concat(text.clone({
      +          value: text.value.slice(1)
      +        }), node.children.slice(1))
      +      });
      +    }
      +
      +    return node;
      +  });
      +}
      +
      +function mergeNodeIntoText(ast, shouldMerge, getValue) {
      +  return ast.map(function (node) {
      +    if (node.children) {
      +      var shouldMergeResults = node.children.map(shouldMerge);
      +
      +      if (shouldMergeResults.some(Boolean)) {
      +        var newChildren = [];
      +
      +        for (var i = 0; i < node.children.length; i++) {
      +          var child = node.children[i];
      +
      +          if (child.type !== "text" && !shouldMergeResults[i]) {
      +            newChildren.push(child);
      +            continue;
      +          }
      +
      +          var newChild = child.type === "text" ? child : child.clone({
      +            type: "text",
      +            value: getValue(child)
      +          });
      +
      +          if (newChildren.length === 0 || newChildren[newChildren.length - 1].type !== "text") {
      +            newChildren.push(newChild);
      +            continue;
      +          }
      +
      +          var lastChild = newChildren.pop();
      +          var ParseSourceSpan = lastChild.sourceSpan.constructor;
      +          newChildren.push(lastChild.clone({
      +            value: lastChild.value + newChild.value,
      +            sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, newChild.sourceSpan.end)
      +          }));
      +        }
      +
      +        return node.clone({
      +          children: newChildren
      +        });
      +      }
      +    }
      +
      +    return node;
      +  });
      +}
      +
      +function mergeCdataIntoText(ast
      +/*, options */
      +) {
      +  return mergeNodeIntoText(ast, function (node) {
      +    return node.type === "cdata";
      +  }, function (node) {
      +    return "");
      +  });
      +}
      +
      +function mergeSimpleElementIntoText(ast
      +/*, options */
      +) {
      +  var isSimpleElement = function isSimpleElement(node) {
      +    return node.type === "element" && node.attrs.length === 0 && node.children.length === 1 && node.firstChild.type === "text" && // \xA0: non-breaking whitespace
      +    !/[^\S\xA0]/.test(node.children[0].value) && !node.firstChild.hasLeadingSpaces && !node.firstChild.hasTrailingSpaces && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces && node.prev && node.prev.type === "text" && node.next && node.next.type === "text";
      +  };
      +
      +  return ast.map(function (node) {
      +    if (node.children) {
      +      var isSimpleElementResults = node.children.map(isSimpleElement);
      +
      +      if (isSimpleElementResults.some(Boolean)) {
      +        var newChildren = [];
      +
      +        for (var i = 0; i < node.children.length; i++) {
      +          var child = node.children[i];
      +
      +          if (isSimpleElementResults[i]) {
      +            var lastChild = newChildren.pop();
      +            var nextChild = node.children[++i];
      +            var ParseSourceSpan = node.sourceSpan.constructor;
      +            var isTrailingSpaceSensitive = nextChild.isTrailingSpaceSensitive,
      +                hasTrailingSpaces = nextChild.hasTrailingSpaces;
      +            newChildren.push(lastChild.clone({
      +              value: lastChild.value + "<".concat(child.rawName, ">") + child.firstChild.value + "") + nextChild.value,
      +              sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, nextChild.sourceSpan.end),
      +              isTrailingSpaceSensitive: isTrailingSpaceSensitive,
      +              hasTrailingSpaces: hasTrailingSpaces
      +            }));
      +          } else {
      +            newChildren.push(child);
      +          }
      +        }
      +
      +        return node.clone({
      +          children: newChildren
      +        });
      +      }
      +    }
      +
      +    return node;
      +  });
      +}
      +
      +function extractInterpolation(ast, options) {
      +  if (options.parser === "html") {
      +    return ast;
      +  }
      +
      +  var interpolationRegex = /\{\{([\s\S]+?)\}\}/g;
      +  return ast.map(function (node) {
      +    if (!canHaveInterpolation$1(node)) {
      +      return node;
      +    }
      +
      +    var newChildren = [];
      +    var _iteratorNormalCompletion = true;
      +    var _didIteratorError = false;
      +    var _iteratorError = undefined;
      +
      +    try {
      +      for (var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      +        var child = _step.value;
      +
      +        if (child.type !== "text") {
      +          newChildren.push(child);
      +          continue;
      +        }
      +
      +        var ParseSourceSpan = child.sourceSpan.constructor;
      +        var startSourceSpan = child.sourceSpan.start;
      +        var endSourceSpan = null;
      +        var components = child.value.split(interpolationRegex);
      +
      +        for (var i = 0; i < components.length; i++, startSourceSpan = endSourceSpan) {
      +          var value = components[i];
      +
      +          if (i % 2 === 0) {
      +            endSourceSpan = startSourceSpan.moveBy(value.length);
      +
      +            if (value.length !== 0) {
      +              newChildren.push({
      +                type: "text",
      +                value: value,
      +                sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan)
      +              });
      +            }
      +
      +            continue;
      +          }
      +
      +          endSourceSpan = startSourceSpan.moveBy(value.length + 4); // `{{` + `}}`
      +
      +          newChildren.push({
      +            type: "interpolation",
      +            sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan),
      +            children: value.length === 0 ? [] : [{
      +              type: "text",
      +              value: value,
      +              sourceSpan: new ParseSourceSpan(startSourceSpan.moveBy(2), endSourceSpan.moveBy(-2))
      +            }]
      +          });
      +        }
      +      }
      +    } catch (err) {
      +      _didIteratorError = true;
      +      _iteratorError = err;
      +    } finally {
      +      try {
      +        if (!_iteratorNormalCompletion && _iterator.return != null) {
      +          _iterator.return();
      +        }
      +      } finally {
      +        if (_didIteratorError) {
      +          throw _iteratorError;
      +        }
      +      }
      +    }
      +
      +    return node.clone({
      +      children: newChildren
      +    });
      +  });
      +}
      +/**
      + * - add `hasLeadingSpaces` field
      + * - add `hasTrailingSpaces` field
      + * - add `hasDanglingSpaces` field for parent nodes
      + * - add `isWhitespaceSensitive`, `isIndentationSensitive` field for text nodes
      + * - remove insensitive whitespaces
      + */
      +
      +
      +function extractWhitespaces(ast
      +/*, options*/
      +) {
      +  var TYPE_WHITESPACE = "whitespace";
      +  return ast.map(function (node) {
      +    if (!node.children) {
      +      return node;
      +    }
      +
      +    if (node.children.length === 0 || node.children.length === 1 && node.children[0].type === "text" && node.children[0].value.trim().length === 0) {
      +      return node.clone({
      +        children: [],
      +        hasDanglingSpaces: node.children.length !== 0
      +      });
      +    }
      +
      +    var isWhitespaceSensitive = isWhitespaceSensitiveNode$1(node);
      +    var isIndentationSensitive = isIndentationSensitiveNode$1(node);
      +    return node.clone({
      +      children: node.children // extract whitespace nodes
      +      .reduce(function (newChildren, child) {
      +        if (child.type !== "text") {
      +          return newChildren.concat(child);
      +        }
      +
      +        if (isWhitespaceSensitive) {
      +          return newChildren.concat(Object.assign({}, child, {
      +            isWhitespaceSensitive: isWhitespaceSensitive,
      +            isIndentationSensitive: isIndentationSensitive
      +          }));
      +        }
      +
      +        var localChildren = [];
      +
      +        var _child$value$match = child.value.match(/^(\s*)([\s\S]*?)(\s*)$/),
      +            _child$value$match2 = _slicedToArray(_child$value$match, 4),
      +            leadingSpaces = _child$value$match2[1],
      +            text = _child$value$match2[2],
      +            trailingSpaces = _child$value$match2[3];
      +
      +        if (leadingSpaces) {
      +          localChildren.push({
      +            type: TYPE_WHITESPACE
      +          });
      +        }
      +
      +        var ParseSourceSpan = child.sourceSpan.constructor;
      +
      +        if (text) {
      +          localChildren.push({
      +            type: "text",
      +            value: text,
      +            sourceSpan: new ParseSourceSpan(child.sourceSpan.start.moveBy(leadingSpaces.length), child.sourceSpan.end.moveBy(-trailingSpaces.length))
      +          });
      +        }
      +
      +        if (trailingSpaces) {
      +          localChildren.push({
      +            type: TYPE_WHITESPACE
      +          });
      +        }
      +
      +        return newChildren.concat(localChildren);
      +      }, []) // set hasLeadingSpaces/hasTrailingSpaces and filter whitespace nodes
      +      .reduce(function (newChildren, child, i, children) {
      +        if (child.type === TYPE_WHITESPACE) {
      +          return newChildren;
      +        }
      +
      +        var hasLeadingSpaces = i !== 0 && children[i - 1].type === TYPE_WHITESPACE;
      +        var hasTrailingSpaces = i !== children.length - 1 && children[i + 1].type === TYPE_WHITESPACE;
      +        return newChildren.concat(Object.assign({}, child, {
      +          hasLeadingSpaces: hasLeadingSpaces,
      +          hasTrailingSpaces: hasTrailingSpaces
      +        }));
      +      }, [])
      +    });
      +  });
      +}
      +
      +function addIsSelfClosing(ast
      +/*, options */
      +) {
      +  return ast.map(function (node) {
      +    return Object.assign(node, {
      +      isSelfClosing: !node.children || node.type === "element" && (node.tagDefinition.isVoid || // self-closing
      +      node.startSourceSpan === node.endSourceSpan)
      +    });
      +  });
      +}
      +
      +function addCssDisplay(ast, options) {
      +  return ast.map(function (node) {
      +    return Object.assign(node, {
      +      cssDisplay: getNodeCssStyleDisplay$1(node, options)
      +    });
      +  });
      +}
      +/**
      + * - add `isLeadingSpaceSensitive` field
      + * - add `isTrailingSpaceSensitive` field
      + * - add `isDanglingSpaceSensitive` field for parent nodes
      + */
      +
      +
      +function addIsSpaceSensitive(ast
      +/*, options */
      +) {
      +  return ast.map(function (node) {
      +    if (!node.children) {
      +      return node;
      +    }
      +
      +    if (node.children.length === 0) {
      +      return node.clone({
      +        isDanglingSpaceSensitive: isDanglingSpaceSensitiveNode$1(node)
      +      });
      +    }
      +
      +    return node.clone({
      +      children: node.children.map(function (child) {
      +        return Object.assign({}, child, {
      +          isLeadingSpaceSensitive: isLeadingSpaceSensitiveNode$1(child),
      +          isTrailingSpaceSensitive: isTrailingSpaceSensitiveNode$1(child)
      +        });
      +      }).map(function (child, index, children) {
      +        return Object.assign({}, child, {
      +          isLeadingSpaceSensitive: index === 0 ? child.isLeadingSpaceSensitive : children[index - 1].isTrailingSpaceSensitive && child.isLeadingSpaceSensitive,
      +          isTrailingSpaceSensitive: index === children.length - 1 ? child.isTrailingSpaceSensitive : children[index + 1].isLeadingSpaceSensitive && child.isTrailingSpaceSensitive
      +        });
      +      })
      +    });
      +  });
      +}
      +
      +var preprocess_1 = preprocess;
      +
      +function hasPragma$3(text) {
      +  return /^\s*/.test(text);
      +}
      +
      +function insertPragma$6(text) {
      +  return "\n\n" + text.replace(/^\s*\n/, "");
      +}
      +
      +var pragma$6 = {
      +  hasPragma: hasPragma$3,
      +  insertPragma: insertPragma$6
      +};
      +
      +var _require$$0$builders$4 = doc.builders;
      +var concat$10 = _require$$0$builders$4.concat;
      +var group$9 = _require$$0$builders$4.group;
      +/**
      + *     v-for="... in ..."
      + *     v-for="... of ..."
      + *     v-for="(..., ...) in ..."
      + *     v-for="(..., ...) of ..."
      + */
      +
      +function printVueFor$1(value, textToDoc) {
      +  var _parseVueFor = parseVueFor(value),
      +      left = _parseVueFor.left,
      +      operator = _parseVueFor.operator,
      +      right = _parseVueFor.right;
      +
      +  return concat$10([group$9(textToDoc("function _(".concat(left, ") {}"), {
      +    parser: "babylon",
      +    __isVueForBindingLeft: true
      +  })), " ", operator, " ", textToDoc(right, {
      +    parser: "__js_expression"
      +  })]);
      +} // modified from https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/parser/index.js#L370-L387
      +
      +
      +function parseVueFor(value) {
      +  var forAliasRE = /([^]*?)\s+(in|of)\s+([^]*)/;
      +  var forIteratorRE = /,([^,}\]]*)(?:,([^,}\]]*))?$/;
      +  var stripParensRE = /^\(|\)$/g;
      +  var inMatch = value.match(forAliasRE);
      +
      +  if (!inMatch) {
      +    return;
      +  }
      +
      +  var res = {};
      +  res.for = inMatch[3].trim();
      +  var alias = inMatch[1].trim().replace(stripParensRE, "");
      +  var iteratorMatch = alias.match(forIteratorRE);
      +
      +  if (iteratorMatch) {
      +    res.alias = alias.replace(forIteratorRE, "");
      +    res.iterator1 = iteratorMatch[1].trim();
      +
      +    if (iteratorMatch[2]) {
      +      res.iterator2 = iteratorMatch[2].trim();
      +    }
      +  } else {
      +    res.alias = alias;
      +  }
      +
      +  return {
      +    left: "".concat([res.alias, res.iterator1, res.iterator2].filter(Boolean).join(",")),
      +    operator: inMatch[2],
      +    right: res.for
      +  };
      +}
      +
      +function printVueSlotScope$1(value, textToDoc) {
      +  return textToDoc("function _(".concat(value, ") {}"), {
      +    parser: "babylon",
      +    __isVueSlotScope: true
      +  });
      +}
      +
      +var syntaxVue = {
      +  printVueFor: printVueFor$1,
      +  printVueSlotScope: printVueSlotScope$1
      +};
      +
      +var parseSrcset = createCommonjsModule(function (module) {
      +  /**
      +   * Srcset Parser
      +   *
      +   * By Alex Bell |  MIT License
      +   *
      +   * JS Parser for the string value that appears in markup 
      +   *
      +   * @returns Array [{url: _, d: _, w: _, h:_}, ...]
      +   *
      +   * Based super duper closely on the reference algorithm at:
      +   * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute
      +   *
      +   * Most comments are copied in directly from the spec
      +   * (except for comments in parens).
      +   */
      +  (function (root, factory) {
      +    if (typeof undefined === 'function' && undefined.amd) {
      +      // AMD. Register as an anonymous module.
      +      undefined([], factory);
      +    } else if ('object' === 'object' && module.exports) {
      +      // Node. Does not work with strict CommonJS, but
      +      // only CommonJS-like environments that support module.exports,
      +      // like Node.
      +      module.exports = factory();
      +    } else {
      +      // Browser globals (root is window)
      +      root.parseSrcset = factory();
      +    }
      +  })(commonjsGlobal, function () {
      +    // 1. Let input be the value passed to this algorithm.
      +    return function (input, options) {
      +      var logger = options && options.logger || console; // UTILITY FUNCTIONS
      +      // Manual is faster than RegEx
      +      // http://bjorn.tipling.com/state-and-regular-expressions-in-javascript
      +      // http://jsperf.com/whitespace-character/5
      +
      +      function isSpace(c) {
      +        return c === " " || // space
      +        c === "\t" || // horizontal tab
      +        c === "\n" || // new line
      +        c === "\f" || // form feed
      +        c === "\r"; // carriage return
      +      }
      +
      +      function collectCharacters(regEx) {
      +        var chars,
      +            match = regEx.exec(input.substring(pos));
      +
      +        if (match) {
      +          chars = match[0];
      +          pos += chars.length;
      +          return chars;
      +        }
      +      }
      +
      +      var inputLength = input.length,
      +          // (Don't use \s, to avoid matching non-breaking space)
      +      regexLeadingSpaces = /^[ \t\n\r\u000c]+/,
      +          regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/,
      +          regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/,
      +          regexTrailingCommas = /[,]+$/,
      +          regexNonNegativeInteger = /^\d+$/,
      +          // ( Positive or negative or unsigned integers or decimals, without or without exponents.
      +      // Must include at least one digit.
      +      // According to spec tests any decimal point must be followed by a digit.
      +      // No leading plus sign is allowed.)
      +      // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number
      +      regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,
      +          url,
      +          descriptors,
      +          currentDescriptor,
      +          state,
      +          c,
      +          // 2. Let position be a pointer into input, initially pointing at the start
      +      //    of the string.
      +      pos = 0,
      +          // 3. Let candidates be an initially empty source set.
      +      candidates = []; // 4. Splitting loop: Collect a sequence of characters that are space
      +      //    characters or U+002C COMMA characters. If any U+002C COMMA characters
      +      //    were collected, that is a parse error.
      +
      +      while (true) {
      +        collectCharacters(regexLeadingCommasOrSpaces); // 5. If position is past the end of input, return candidates and abort these steps.
      +
      +        if (pos >= inputLength) {
      +          return candidates; // (we're done, this is the sole return path)
      +        } // 6. Collect a sequence of characters that are not space characters,
      +        //    and let that be url.
      +
      +
      +        url = collectCharacters(regexLeadingNotSpaces); // 7. Let descriptors be a new empty list.
      +
      +        descriptors = []; // 8. If url ends with a U+002C COMMA character (,), follow these substeps:
      +        //		(1). Remove all trailing U+002C COMMA characters from url. If this removed
      +        //         more than one character, that is a parse error.
      +
      +        if (url.slice(-1) === ",") {
      +          url = url.replace(regexTrailingCommas, ""); // (Jump ahead to step 9 to skip tokenization and just push the candidate).
      +
      +          parseDescriptors(); //	Otherwise, follow these substeps:
      +        } else {
      +          tokenize();
      +        } // (close else of step 8)
      +        // 16. Return to the step labeled splitting loop.
      +
      +      } // (Close of big while loop.)
      +
      +      /**
      +       * Tokenizes descriptor properties prior to parsing
      +       * Returns undefined.
      +       */
      +
      +
      +      function tokenize() {
      +        // 8.1. Descriptor tokeniser: Skip whitespace
      +        collectCharacters(regexLeadingSpaces); // 8.2. Let current descriptor be the empty string.
      +
      +        currentDescriptor = ""; // 8.3. Let state be in descriptor.
      +
      +        state = "in descriptor";
      +
      +        while (true) {
      +          // 8.4. Let c be the character at position.
      +          c = input.charAt(pos); //  Do the following depending on the value of state.
      +          //  For the purpose of this step, "EOF" is a special character representing
      +          //  that position is past the end of input.
      +          // In descriptor
      +
      +          if (state === "in descriptor") {
      +            // Do the following, depending on the value of c:
      +            // Space character
      +            // If current descriptor is not empty, append current descriptor to
      +            // descriptors and let current descriptor be the empty string.
      +            // Set state to after descriptor.
      +            if (isSpace(c)) {
      +              if (currentDescriptor) {
      +                descriptors.push(currentDescriptor);
      +                currentDescriptor = "";
      +                state = "after descriptor";
      +              } // U+002C COMMA (,)
      +              // Advance position to the next character in input. If current descriptor
      +              // is not empty, append current descriptor to descriptors. Jump to the step
      +              // labeled descriptor parser.
      +
      +            } else if (c === ",") {
      +              pos += 1;
      +
      +              if (currentDescriptor) {
      +                descriptors.push(currentDescriptor);
      +              }
      +
      +              parseDescriptors();
      +              return; // U+0028 LEFT PARENTHESIS (()
      +              // Append c to current descriptor. Set state to in parens.
      +            } else if (c === "(") {
      +              currentDescriptor = currentDescriptor + c;
      +              state = "in parens"; // EOF
      +              // If current descriptor is not empty, append current descriptor to
      +              // descriptors. Jump to the step labeled descriptor parser.
      +            } else if (c === "") {
      +              if (currentDescriptor) {
      +                descriptors.push(currentDescriptor);
      +              }
      +
      +              parseDescriptors();
      +              return; // Anything else
      +              // Append c to current descriptor.
      +            } else {
      +              currentDescriptor = currentDescriptor + c;
      +            } // (end "in descriptor"
      +            // In parens
      +
      +          } else if (state === "in parens") {
      +            // U+0029 RIGHT PARENTHESIS ())
      +            // Append c to current descriptor. Set state to in descriptor.
      +            if (c === ")") {
      +              currentDescriptor = currentDescriptor + c;
      +              state = "in descriptor"; // EOF
      +              // Append current descriptor to descriptors. Jump to the step labeled
      +              // descriptor parser.
      +            } else if (c === "") {
      +              descriptors.push(currentDescriptor);
      +              parseDescriptors();
      +              return; // Anything else
      +              // Append c to current descriptor.
      +            } else {
      +              currentDescriptor = currentDescriptor + c;
      +            } // After descriptor
      +
      +          } else if (state === "after descriptor") {
      +            // Do the following, depending on the value of c:
      +            // Space character: Stay in this state.
      +            if (isSpace(c)) {// EOF: Jump to the step labeled descriptor parser.
      +            } else if (c === "") {
      +              parseDescriptors();
      +              return; // Anything else
      +              // Set state to in descriptor. Set position to the previous character in input.
      +            } else {
      +              state = "in descriptor";
      +              pos -= 1;
      +            }
      +          } // Advance position to the next character in input.
      +
      +
      +          pos += 1; // Repeat this step.
      +        } // (close while true loop)
      +
      +      }
      +      /**
      +       * Adds descriptor properties to a candidate, pushes to the candidates array
      +       * @return undefined
      +       */
      +      // Declared outside of the while loop so that it's only created once.
      +
      +
      +      function parseDescriptors() {
      +        // 9. Descriptor parser: Let error be no.
      +        var pError = false,
      +            // 10. Let width be absent.
      +        // 11. Let density be absent.
      +        // 12. Let future-compat-h be absent. (We're implementing it now as h)
      +        w,
      +            d,
      +            h,
      +            i,
      +            candidate = {},
      +            desc,
      +            lastChar,
      +            value,
      +            intVal,
      +            floatVal; // 13. For each descriptor in descriptors, run the appropriate set of steps
      +        // from the following list:
      +
      +        for (i = 0; i < descriptors.length; i++) {
      +          desc = descriptors[i];
      +          lastChar = desc[desc.length - 1];
      +          value = desc.substring(0, desc.length - 1);
      +          intVal = parseInt(value, 10);
      +          floatVal = parseFloat(value); // If the descriptor consists of a valid non-negative integer followed by
      +          // a U+0077 LATIN SMALL LETTER W character
      +
      +          if (regexNonNegativeInteger.test(value) && lastChar === "w") {
      +            // If width and density are not both absent, then let error be yes.
      +            if (w || d) {
      +              pError = true;
      +            } // Apply the rules for parsing non-negative integers to the descriptor.
      +            // If the result is zero, let error be yes.
      +            // Otherwise, let width be the result.
      +
      +
      +            if (intVal === 0) {
      +              pError = true;
      +            } else {
      +              w = intVal;
      +            } // If the descriptor consists of a valid floating-point number followed by
      +            // a U+0078 LATIN SMALL LETTER X character
      +
      +          } else if (regexFloatingPoint.test(value) && lastChar === "x") {
      +            // If width, density and future-compat-h are not all absent, then let error
      +            // be yes.
      +            if (w || d || h) {
      +              pError = true;
      +            } // Apply the rules for parsing floating-point number values to the descriptor.
      +            // If the result is less than zero, let error be yes. Otherwise, let density
      +            // be the result.
      +
      +
      +            if (floatVal < 0) {
      +              pError = true;
      +            } else {
      +              d = floatVal;
      +            } // If the descriptor consists of a valid non-negative integer followed by
      +            // a U+0068 LATIN SMALL LETTER H character
      +
      +          } else if (regexNonNegativeInteger.test(value) && lastChar === "h") {
      +            // If height and density are not both absent, then let error be yes.
      +            if (h || d) {
      +              pError = true;
      +            } // Apply the rules for parsing non-negative integers to the descriptor.
      +            // If the result is zero, let error be yes. Otherwise, let future-compat-h
      +            // be the result.
      +
      +
      +            if (intVal === 0) {
      +              pError = true;
      +            } else {
      +              h = intVal;
      +            } // Anything else, Let error be yes.
      +
      +          } else {
      +            pError = true;
      +          }
      +        } // (close step 13 for loop)
      +        // 15. If error is still no, then append a new image source to candidates whose
      +        // URL is url, associated with a width width if not absent and a pixel
      +        // density density if not absent. Otherwise, there is a parse error.
      +
      +
      +        if (!pError) {
      +          candidate.url = url;
      +
      +          if (w) {
      +            candidate.w = w;
      +          }
      +
      +          if (d) {
      +            candidate.d = d;
      +          }
      +
      +          if (h) {
      +            candidate.h = h;
      +          }
      +
      +          candidates.push(candidate);
      +        } else if (logger && logger.error) {
      +          logger.error("Invalid srcset descriptor found in '" + input + "' at '" + desc + "'.");
      +        }
      +      } // (close parseDescriptors fn)
      +
      +    };
      +  });
      +});
      +
      +var _require$$0$builders$5 = doc.builders;
      +var concat$11 = _require$$0$builders$5.concat;
      +var ifBreak$5 = _require$$0$builders$5.ifBreak;
      +var join$6 = _require$$0$builders$5.join;
      +var line$7 = _require$$0$builders$5.line;
      +
      +function printImgSrcset$1(value) {
      +  var srcset = parseSrcset(value, {
      +    logger: {
      +      error: function error(message) {
      +        throw new Error(message);
      +      }
      +    }
      +  });
      +  var hasW = srcset.some(function (src) {
      +    return src.w;
      +  });
      +  var hasH = srcset.some(function (src) {
      +    return src.h;
      +  });
      +  var hasX = srcset.some(function (src) {
      +    return src.d;
      +  });
      +
      +  if (hasW + hasH + hasX !== 1) {
      +    throw new Error("Mixed descriptor in srcset is not supported");
      +  }
      +
      +  var key = hasW ? "w" : hasH ? "h" : "d";
      +  var unit = hasW ? "w" : hasH ? "h" : "x";
      +
      +  var getMax = function getMax(values) {
      +    return Math.max.apply(Math, values);
      +  };
      +
      +  var urls = srcset.map(function (src) {
      +    return src.url;
      +  });
      +  var maxUrlLength = getMax(urls.map(function (url) {
      +    return url.length;
      +  }));
      +  var descriptors = srcset.map(function (src) {
      +    return src[key];
      +  }).map(function (descriptor) {
      +    return descriptor ? descriptor.toString() : "";
      +  });
      +  var descriptorLeftLengths = descriptors.map(function (descriptor) {
      +    var index = descriptor.indexOf(".");
      +    return index === -1 ? descriptor.length : index;
      +  });
      +  var maxDescriptorLeftLength = getMax(descriptorLeftLengths);
      +  return join$6(concat$11([",", line$7]), urls.map(function (url, index) {
      +    var parts = [url];
      +    var descriptor = descriptors[index];
      +
      +    if (descriptor) {
      +      var urlPadding = maxUrlLength - url.length + 1;
      +      var descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[index];
      +      var alignment = " ".repeat(urlPadding + descriptorPadding);
      +      parts.push(ifBreak$5(alignment, " "), descriptor + unit);
      +    }
      +
      +    return concat$11(parts);
      +  }));
      +}
      +
      +var syntaxAttribute = {
      +  printImgSrcset: printImgSrcset$1
      +};
      +
      +var builders = doc.builders;
      +var _require$$0$utils = doc.utils;
      +var stripTrailingHardline$1 = _require$$0$utils.stripTrailingHardline;
      +var mapDoc$3 = _require$$0$utils.mapDoc;
      +var breakParent$2 = builders.breakParent;
      +var fill$3 = builders.fill;
      +var group$8 = builders.group;
      +var hardline$7 = builders.hardline;
      +var ifBreak$4 = builders.ifBreak;
      +var indent$5 = builders.indent;
      +var join$5 = builders.join;
      +var line$6 = builders.line;
      +var literalline$2 = builders.literalline;
      +var markAsRoot$2 = builders.markAsRoot;
      +var softline$4 = builders.softline;
      +var countParents = utils_1$3.countParents;
      +var dedentString = utils_1$3.dedentString;
      +var forceBreakChildren = utils_1$3.forceBreakChildren;
      +var forceBreakContent = utils_1$3.forceBreakContent;
      +var forceNextEmptyLine = utils_1$3.forceNextEmptyLine;
      +var getCommentData = utils_1$3.getCommentData;
      +var getLastDescendant = utils_1$3.getLastDescendant;
      +var getPrettierIgnoreAttributeCommentData = utils_1$3.getPrettierIgnoreAttributeCommentData;
      +var hasPrettierIgnore = utils_1$3.hasPrettierIgnore;
      +var inferScriptParser = utils_1$3.inferScriptParser;
      +var isPreLikeNode = utils_1$3.isPreLikeNode;
      +var isScriptLikeTag = utils_1$3.isScriptLikeTag;
      +var normalizeParts = utils_1$3.normalizeParts;
      +var preferHardlineAsLeadingSpaces = utils_1$3.preferHardlineAsLeadingSpaces;
      +var replaceDocNewlines = utils_1$3.replaceDocNewlines;
      +var replaceNewlines = utils_1$3.replaceNewlines;
      +var shouldNotPrintClosingTag = utils_1$3.shouldNotPrintClosingTag;
      +var shouldPreserveContent = utils_1$3.shouldPreserveContent;
      +var insertPragma$5 = pragma$6.insertPragma;
      +var printVueFor = syntaxVue.printVueFor;
      +var printVueSlotScope = syntaxVue.printVueSlotScope;
      +var printImgSrcset = syntaxAttribute.printImgSrcset;
      +
      +function concat$8(parts) {
      +  var newParts = normalizeParts(parts);
      +  return newParts.length === 0 ? "" : newParts.length === 1 ? newParts[0] : builders.concat(newParts);
      +}
      +
      +function embed$2(path, print, textToDoc, options) {
      +  var node = path.getValue();
      +
      +  switch (node.type) {
      +    case "text":
      +      {
      +        if (isScriptLikeTag(node.parent)) {
      +          var parser = inferScriptParser(node.parent);
      +
      +          if (parser) {
      +            var value = parser === "markdown" ? dedentString(node.value.replace(/^[^\S\n]*?\n/, "")) : node.value;
      +            return builders.concat([concat$8([breakParent$2, printOpeningTagPrefix(node), markAsRoot$2(stripTrailingHardline$1(textToDoc(value, {
      +              parser: parser
      +            }))), printClosingTagSuffix(node)])]);
      +          }
      +        } else if (node.parent.type === "interpolation") {
      +          return concat$8([indent$5(concat$8([line$6, textToDoc(node.value, options.parser === "angular" ? {
      +            parser: "__ng_interpolation",
      +            trailingComma: "none"
      +          } : options.parser === "vue" ? {
      +            parser: "__vue_expression"
      +          } : {
      +            parser: "__js_expression"
      +          })])), node.parent.next && needsToBorrowPrevClosingTagEndMarker(node.parent.next) ? " " : line$6]);
      +        }
      +
      +        break;
      +      }
      +
      +    case "attribute":
      +      {
      +        if (!node.value) {
      +          break;
      +        }
      +
      +        var embeddedAttributeValueDoc = printEmbeddedAttributeValue(node, function (code, opts) {
      +          return (// strictly prefer single quote to avoid unnecessary html entity escape
      +            textToDoc(code, Object.assign({
      +              __isInHtmlAttribute: true
      +            }, opts))
      +          );
      +        }, options);
      +
      +        if (embeddedAttributeValueDoc) {
      +          return concat$8([node.rawName, '="', mapDoc$3(embeddedAttributeValueDoc, function (doc$$2) {
      +            return typeof doc$$2 === "string" ? doc$$2.replace(/"/g, """) : doc$$2;
      +          }), '"']);
      +        }
      +
      +        break;
      +      }
      +
      +    case "yaml":
      +      return markAsRoot$2(concat$8(["---", hardline$7, node.value.trim().length === 0 ? "" : replaceDocNewlines(textToDoc(node.value, {
      +        parser: "yaml"
      +      }), literalline$2), "---"]));
      +  }
      +}
      +
      +function genericPrint$2(path, options, print) {
      +  var node = path.getValue();
      +
      +  switch (node.type) {
      +    case "root":
      +      // use original concat to not break stripTrailingHardline
      +      return builders.concat([group$8(printChildren(path, options, print)), hardline$7]);
      +
      +    case "element":
      +    case "ieConditionalComment":
      +      {
      +        /**
      +         * do not break:
      +         *
      +         *     
      {{ + * ~ + * interpolation + * }}
      + * ~ + * + * exception: break if the opening tag breaks + * + *
      {{ + * interpolation + * }}
      + */ + var shouldHugContent = node.children.length === 1 && node.firstChild.type === "interpolation" && node.firstChild.isLeadingSpaceSensitive && !node.firstChild.hasLeadingSpaces && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces; + var attrGroupId = Symbol("element-attr-group-id"); + return concat$8([group$8(concat$8([group$8(printOpeningTag(path, options, print), { + id: attrGroupId + }), node.children.length === 0 ? node.hasDanglingSpaces && node.isDanglingSpaceSensitive ? line$6 : "" : concat$8([forceBreakContent(node) ? breakParent$2 : "", function (childrenDoc) { + return shouldHugContent ? ifBreak$4(indent$5(childrenDoc), childrenDoc, { + groupId: attrGroupId + }) : isScriptLikeTag(node) && node.parent.type === "root" && options.parser === "vue" ? childrenDoc : indent$5(childrenDoc); + }(concat$8([shouldHugContent ? ifBreak$4(softline$4, "", { + groupId: attrGroupId + }) : node.firstChild.type === "text" && node.firstChild.isWhitespaceSensitive && node.firstChild.isIndentationSensitive ? node.children.length === 1 && node.firstChild.type === "text" && node.firstChild.value.indexOf("\n") === -1 || node.firstChild.sourceSpan.start.line === node.lastChild.sourceSpan.end.line ? "" : literalline$2 : node.firstChild.hasLeadingSpaces && node.firstChild.isLeadingSpaceSensitive ? line$6 : softline$4, printChildren(path, options, print)])), (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? " " : "" : shouldHugContent ? ifBreak$4(softline$4, "", { + groupId: attrGroupId + }) : node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? line$6 : node.type === "element" && isPreLikeNode(node) && node.lastChild.type === "text" && (node.lastChild.value.indexOf("\n") === -1 || new RegExp("\\n\\s{".concat(options.tabWidth * countParents(path, function (n) { + return n.parent && n.parent.type !== "root"; + }), "}$")).test(node.lastChild.value)) ? + /** + *
      + *
      +         *         something
      +         *       
      + * ~ + *
      + */ + "" : softline$4])])), printClosingTag(node)]); + } + + case "interpolation": + return concat$8([printOpeningTagStart(node), concat$8(path.map(print, "children")), printClosingTagEnd(node)]); + + case "text": + { + if (node.parent.type === "interpolation") { + // replace the trailing literalline with hardline for better readability + var trailingNewlineRegex = /\n[^\S\n]*?$/; + var hasTrailingNewline = trailingNewlineRegex.test(node.value); + var value = hasTrailingNewline ? node.value.replace(trailingNewlineRegex, "") : node.value; + return concat$8([concat$8(replaceNewlines(value, literalline$2)), hasTrailingNewline ? hardline$7 : ""]); + } + + return fill$3(normalizeParts([].concat(printOpeningTagPrefix(node), getTextValueParts(node), printClosingTagSuffix(node)))); + } + + case "docType": + return concat$8([group$8(concat$8([printOpeningTagStart(node), " ", node.value.replace(/^html\b/i, "html").replace(/\s+/g, " ")])), printClosingTagEnd(node)]); + + case "comment": + { + var _value = getCommentData(node); + + return concat$8([group$8(concat$8([printOpeningTagStart(node), _value.trim().length === 0 ? "" : concat$8([indent$5(concat$8([node.prev && needsToBorrowNextOpeningTagStartMarker(node.prev) ? breakParent$2 : "", line$6, concat$8(replaceNewlines(_value, hardline$7))])), (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? " " : line$6])])), printClosingTagEnd(node)]); + } + + case "attribute": + return concat$8([node.rawName, node.value === null ? "" : concat$8(['="', concat$8(replaceNewlines(node.value.replace(/"/g, """), literalline$2)), '"'])]); + + case "yaml": + case "toml": + return node.raw; + + default: + throw new Error("Unexpected node type ".concat(node.type)); + } +} + +function printChildren(path, options, print) { + var node = path.getValue(); + + if (forceBreakChildren(node)) { + return concat$8([breakParent$2, concat$8(path.map(function (childPath) { + var childNode = childPath.getValue(); + var prevBetweenLine = !childNode.prev ? "" : printBetweenLine(childNode.prev, childNode); + return concat$8([!prevBetweenLine ? "" : concat$8([prevBetweenLine, forceNextEmptyLine(childNode.prev) ? hardline$7 : ""]), printChild(childPath)]); + }, "children"))]); + } + + var groupIds = node.children.map(function () { + return Symbol(""); + }); + return concat$8(path.map(function (childPath, childIndex) { + var childNode = childPath.getValue(); + + if (childNode.type === "text") { + return printChild(childPath); + } + + var prevParts = []; + var leadingParts = []; + var trailingParts = []; + var nextParts = []; + var prevBetweenLine = childNode.prev ? printBetweenLine(childNode.prev, childNode) : ""; + var nextBetweenLine = childNode.next ? printBetweenLine(childNode, childNode.next) : ""; + + if (prevBetweenLine) { + if (forceNextEmptyLine(childNode.prev)) { + prevParts.push(hardline$7, hardline$7); + } else if (prevBetweenLine === hardline$7) { + prevParts.push(hardline$7); + } else { + if (childNode.prev.type === "text") { + leadingParts.push(prevBetweenLine); + } else { + leadingParts.push(ifBreak$4("", softline$4, { + groupId: groupIds[childIndex - 1] + })); + } + } + } + + if (nextBetweenLine) { + if (forceNextEmptyLine(childNode)) { + if (childNode.next.type === "text") { + nextParts.push(hardline$7, hardline$7); + } + } else if (nextBetweenLine === hardline$7) { + if (childNode.next.type === "text") { + nextParts.push(hardline$7); + } + } else { + trailingParts.push(nextBetweenLine); + } + } + + return concat$8([].concat(prevParts, group$8(concat$8([concat$8(leadingParts), group$8(concat$8([printChild(childPath), concat$8(trailingParts)]), { + id: groupIds[childIndex] + })])), nextParts)); + }, "children")); + + function printChild(childPath) { + var child = childPath.getValue(); + + if (hasPrettierIgnore(child)) { + return concat$8([].concat(printOpeningTagPrefix(child), replaceNewlines(options.originalText.slice(options.locStart(child) + (child.prev && needsToBorrowNextOpeningTagStartMarker(child.prev) ? printOpeningTagStartMarker(child).length : 0), options.locEnd(child) - (child.next && needsToBorrowPrevClosingTagEndMarker(child.next) ? printClosingTagEndMarker(child).length : 0)), literalline$2), printClosingTagSuffix(child))); + } + + if (shouldPreserveContent(child)) { + return concat$8([].concat(printOpeningTagPrefix(child), group$8(printOpeningTag(childPath, options, print)), replaceNewlines(options.originalText.slice(child.startSourceSpan.end.offset - (child.firstChild && needsToBorrowParentOpeningTagEndMarker(child.firstChild) ? printOpeningTagEndMarker(child).length : 0), child.endSourceSpan.start.offset + (child.lastChild && needsToBorrowParentClosingTagStartMarker(child.lastChild) ? printClosingTagStartMarker(child).length : 0)), literalline$2), printClosingTag(child), printClosingTagSuffix(child))); + } + + return print(childPath); + } + + function printBetweenLine(prevNode, nextNode) { + return needsToBorrowNextOpeningTagStartMarker(prevNode) && ( + /** + * 123
      + */ + nextNode.firstChild || + /** + * 123 + */ + nextNode.isSelfClosing || + /** + * 123123 + */ + prevNode.type === "element" && prevNode.isSelfClosing && needsToBorrowPrevClosingTagEndMarker(nextNode) ? "" : !nextNode.isLeadingSpaceSensitive || preferHardlineAsLeadingSpaces(nextNode) || + /** + * Want to write us a letter? Use ourmailing address. + */ + needsToBorrowPrevClosingTagEndMarker(nextNode) && prevNode.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild) && prevNode.lastChild.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild.lastChild) ? hardline$7 : nextNode.hasLeadingSpaces ? line$6 : softline$4; + } +} + +function printOpeningTag(path, options, print) { + var node = path.getValue(); + var forceNotToBreakAttrContent = node.type === "element" && node.fullName === "script" && node.attrs.length === 1 && node.attrs[0].fullName === "src" && node.children.length === 0; + return concat$8([printOpeningTagStart(node), !node.attrs || node.attrs.length === 0 ? node.isSelfClosing ? + /** + *
      + * ^ + */ + " " : "" : concat$8([indent$5(concat$8([forceNotToBreakAttrContent ? " " : line$6, join$5(line$6, function (ignoreAttributeData) { + var hasPrettierIgnoreAttribute = typeof ignoreAttributeData === "boolean" ? function () { + return ignoreAttributeData; + } : Array.isArray(ignoreAttributeData) ? function (attr) { + return ignoreAttributeData.indexOf(attr.rawName) !== -1; + } : function () { + return false; + }; + return path.map(function (attrPath) { + var attr = attrPath.getValue(); + return hasPrettierIgnoreAttribute(attr) ? concat$8(replaceNewlines(options.originalText.slice(options.locStart(attr), options.locEnd(attr)), literalline$2)) : print(attrPath); + }, "attrs"); + }(node.prev && node.prev.type === "comment" && getPrettierIgnoreAttributeCommentData(node.prev.value)))])), + /** + * 123456 + */ + node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) || + /** + * 123 + */ + node.isSelfClosing && needsToBorrowLastChildClosingTagEndMarker(node.parent) ? "" : node.isSelfClosing ? forceNotToBreakAttrContent ? " " : line$6 : forceNotToBreakAttrContent ? "" : softline$4]), node.isSelfClosing ? "" : printOpeningTagEnd(node)]); +} + +function printOpeningTagStart(node) { + return node.prev && needsToBorrowNextOpeningTagStartMarker(node.prev) ? "" : concat$8([printOpeningTagPrefix(node), printOpeningTagStartMarker(node)]); +} + +function printOpeningTagEnd(node) { + return node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) ? "" : printOpeningTagEndMarker(node); +} + +function printClosingTag(node) { + return concat$8([node.isSelfClosing ? "" : printClosingTagStart(node), printClosingTagEnd(node)]); +} + +function printClosingTagStart(node) { + return node.lastChild && needsToBorrowParentClosingTagStartMarker(node.lastChild) ? "" : concat$8([printClosingTagPrefix(node), printClosingTagStartMarker(node)]); +} + +function printClosingTagEnd(node) { + return (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? "" : concat$8([printClosingTagEndMarker(node), printClosingTagSuffix(node)]); +} + +function needsToBorrowNextOpeningTagStartMarker(node) { + /** + * 123

      + */ + return node.next && node.type === "text" && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces; +} + +function needsToBorrowParentOpeningTagEndMarker(node) { + /** + *

      123 + * ^ + * + *

      123 + * ^ + * + *

      + */ + return node.lastChild && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces && getLastDescendant(node.lastChild).type !== "text"; +} + +function needsToBorrowParentClosingTagStartMarker(node) { + /** + *

      + * 123

      + * + * 123
      + */ + return !node.next && !node.hasTrailingSpaces && node.isTrailingSpaceSensitive && getLastDescendant(node).type === "text"; +} + +function printOpeningTagPrefix(node) { + return needsToBorrowParentOpeningTagEndMarker(node) ? printOpeningTagEndMarker(node.parent) : needsToBorrowPrevClosingTagEndMarker(node) ? printClosingTagEndMarker(node.prev) : ""; +} + +function printClosingTagPrefix(node) { + return needsToBorrowLastChildClosingTagEndMarker(node) ? printClosingTagEndMarker(node.lastChild) : ""; +} + +function printClosingTagSuffix(node) { + return needsToBorrowParentClosingTagStartMarker(node) ? printClosingTagStartMarker(node.parent) : needsToBorrowNextOpeningTagStartMarker(node) ? printOpeningTagStartMarker(node.next) : ""; +} + +function printOpeningTagStartMarker(node) { + switch (node.type) { + case "comment": + return ""; + + case "ieConditionalComment": + return "[endif]-->"; + + case "interpolation": + return "}}"; + + case "element": + if (node.isSelfClosing) { + return "/>"; + } + + // fall through + + default: + return ">"; + } +} + +function getTextValueParts(node) { + var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.value; + return node.isWhitespaceSensitive ? node.isIndentationSensitive ? replaceNewlines(value, literalline$2) : replaceNewlines(dedentString(value.replace(/^\s*?\n|\n\s*?$/g, "")), hardline$7) : // non-breaking whitespace: 0xA0 + join$5(line$6, value.split(/[^\S\xA0]+/)).parts; +} + +function printEmbeddedAttributeValue(node, originalTextToDoc, options) { + var isKeyMatched = function isKeyMatched(patterns) { + return new RegExp(patterns.join("|")).test(node.fullName); + }; + + var getValue = function getValue() { + return node.value.replace(/"/g, '"').replace(/'/g, "'"); + }; + + var shouldHug = false; + + var __onHtmlBindingRoot = function __onHtmlBindingRoot(root) { + var rootNode = root.type === "NGRoot" ? root.node.type === "NGMicrosyntax" && root.node.body.length === 1 && root.node.body[0].type === "NGMicrosyntaxExpression" ? root.node.body[0].expression : root.node : root.type === "JsExpressionRoot" ? root.node : root; + + if (rootNode && (rootNode.type === "ObjectExpression" || rootNode.type === "ArrayExpression")) { + shouldHug = true; + } + }; + + var printHug = function printHug(doc$$2) { + return group$8(doc$$2); + }; + + var printExpand = function printExpand(doc$$2) { + return group$8(concat$8([indent$5(concat$8([softline$4, doc$$2])), softline$4])); + }; + + var printMaybeHug = function printMaybeHug(doc$$2) { + return shouldHug ? printHug(doc$$2) : printExpand(doc$$2); + }; + + var textToDoc = function textToDoc(code, opts) { + return originalTextToDoc(code, Object.assign({ + __onHtmlBindingRoot: __onHtmlBindingRoot + }, opts)); + }; + + if (node.fullName === "srcset" && (node.parent.fullName === "img" || node.parent.fullName === "source")) { + return printExpand(printImgSrcset(getValue())); + } + + if (options.parser === "vue") { + if (node.fullName === "v-for") { + return printVueFor(getValue(), textToDoc); + } + + if (node.fullName === "slot-scope") { + return printVueSlotScope(getValue(), textToDoc); + } + /** + * @click="jsStatement" + * @click="jsExpression" + * v-on:click="jsStatement" + * v-on:click="jsExpression" + */ + + + var vueEventBindingPatterns = ["^@", "^v-on:"]; + /** + * :class="vueExpression" + * v-bind:id="vueExpression" + */ + + var vueExpressionBindingPatterns = ["^:", "^v-bind:"]; + /** + * v-if="jsExpression" + */ + + var jsExpressionBindingPatterns = ["^v-"]; + + if (isKeyMatched(vueEventBindingPatterns)) { + // copied from https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/codegen/events.js#L3-L4 + var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/; + var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; + var value = getValue() // https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/helpers.js#L104 + .trim(); + return printMaybeHug(simplePathRE.test(value) || fnExpRE.test(value) ? textToDoc(value, { + parser: "__js_expression" + }) : stripTrailingHardline$1(textToDoc(value, { + parser: "babylon" + }))); + } + + if (isKeyMatched(vueExpressionBindingPatterns)) { + return printMaybeHug(textToDoc(getValue(), { + parser: "__vue_expression" + })); + } + + if (isKeyMatched(jsExpressionBindingPatterns)) { + return printMaybeHug(textToDoc(getValue(), { + parser: "__js_expression" + })); + } + } + + if (options.parser === "angular") { + var ngTextToDoc = function ngTextToDoc(code, opts) { + return (// angular does not allow trailing comma + textToDoc(code, Object.assign({ + trailingComma: "none" + }, opts)) + ); + }; + /** + * *directive="angularDirective" + */ + + + var ngDirectiveBindingPatterns = ["^\\*"]; + /** + * (click)="angularStatement" + * on-click="angularStatement" + */ + + var ngStatementBindingPatterns = ["^\\(.+\\)$", "^on-"]; + /** + * [target]="angularExpression" + * bind-target="angularExpression" + * [(target)]="angularExpression" + * bindon-target="angularExpression" + */ + + var ngExpressionBindingPatterns = ["^\\[.+\\]$", "^bind(on)?-"]; + + if (isKeyMatched(ngStatementBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_action" + })); + } + + if (isKeyMatched(ngExpressionBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_binding" + })); + } + + if (isKeyMatched(ngDirectiveBindingPatterns)) { + return printMaybeHug(ngTextToDoc(getValue(), { + parser: "__ng_directive" + })); + } + } + + return null; +} + +var printerHtml = { + preprocess: preprocess_1, + print: genericPrint$2, + insertPragma: insertPragma$5, + massageAstNode: clean$4, + embed: embed$2 +}; + +var CATEGORY_HTML = "HTML"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var options$9 = { + htmlWhitespaceSensitivity: { + since: "1.15.0", + category: CATEGORY_HTML, + type: "choice", + default: "css", + description: "How to handle whitespaces in HTML.", + choices: [{ + value: "css", + description: "Respect the default value of CSS display property." + }, { + value: "strict", + description: "Whitespaces are considered sensitive." + }, { + value: "ignore", + description: "Whitespaces are considered insensitive." + }] + } +}; + +var name$7 = "HTML"; +var type$6 = "markup"; +var tmScope$6 = "text.html.basic"; +var aceMode$6 = "html"; +var codemirrorMode$3 = "htmlmixed"; +var codemirrorMimeType$3 = "text/html"; +var color$1 = "#e34c26"; +var aliases$1 = ["xhtml"]; +var extensions$6 = [".html", ".htm", ".html.hl", ".inc", ".st", ".xht", ".xhtml"]; +var languageId$6 = 146; +var html$1 = { + name: name$7, + type: type$6, + tmScope: tmScope$6, + aceMode: aceMode$6, + codemirrorMode: codemirrorMode$3, + codemirrorMimeType: codemirrorMimeType$3, + color: color$1, + aliases: aliases$1, + extensions: extensions$6, + languageId: languageId$6 +}; + +var html$2 = Object.freeze({ + name: name$7, + type: type$6, + tmScope: tmScope$6, + aceMode: aceMode$6, + codemirrorMode: codemirrorMode$3, + codemirrorMimeType: codemirrorMimeType$3, + color: color$1, + aliases: aliases$1, + extensions: extensions$6, + languageId: languageId$6, + default: html$1 +}); + +var name$8 = "Vue"; +var type$7 = "markup"; +var color$2 = "#2c3e50"; +var extensions$7 = [".vue"]; +var tmScope$7 = "text.html.vue"; +var aceMode$7 = "html"; +var languageId$7 = 391; +var vue = { + name: name$8, + type: type$7, + color: color$2, + extensions: extensions$7, + tmScope: tmScope$7, + aceMode: aceMode$7, + languageId: languageId$7 +}; + +var vue$1 = Object.freeze({ + name: name$8, + type: type$7, + color: color$2, + extensions: extensions$7, + tmScope: tmScope$7, + aceMode: aceMode$7, + languageId: languageId$7, + default: vue +}); + +var require$$0$20 = ( html$2 && html$1 ) || html$2; + +var require$$1$11 = ( vue$1 && vue ) || vue$1; + +var languages$3 = [createLanguage(require$$0$20, { + override: { + name: "Angular", + since: "1.15.0", + parsers: ["angular"], + vscodeLanguageIds: ["html"], + extensions: [".component.html"], + filenames: [] + } +}), createLanguage(require$$0$20, { + override: { + since: "1.15.0", + parsers: ["html"], + vscodeLanguageIds: ["html"] + } +}), createLanguage(require$$1$11, { + override: { + since: "1.10.0", + parsers: ["vue"], + vscodeLanguageIds: ["vue"] + } +})]; +var printers$3 = { + html: printerHtml +}; +var languageHtml = { + languages: languages$3, + printers: printers$3, + options: options$9 +}; + +var _require$$0$builders$6 = doc.builders; +var indent$7 = _require$$0$builders$6.indent; +var join$8 = _require$$0$builders$6.join; +var hardline$9 = _require$$0$builders$6.hardline; +var softline$6 = _require$$0$builders$6.softline; +var literalline$4 = _require$$0$builders$6.literalline; +var concat$13 = _require$$0$builders$6.concat; +var group$11 = _require$$0$builders$6.group; +var dedentToRoot$1 = _require$$0$builders$6.dedentToRoot; +var _require$$0$utils$1 = doc.utils; +var mapDoc$5 = _require$$0$utils$1.mapDoc; +var stripTrailingHardline$2 = _require$$0$utils$1.stripTrailingHardline; + +function embed$4(path, print, textToDoc +/*, options */ +) { + var node = path.getValue(); + var parent = path.getParentNode(); + var parentParent = path.getParentNode(1); + + switch (node.type) { + case "TemplateLiteral": + { + var isCss = [isStyledJsx, isStyledComponents, isCssProp, isAngularComponentStyles].some(function (isIt) { + return isIt(path); + }); + + if (isCss) { + // Get full template literal with expressions replaced by placeholders + var rawQuasis = node.quasis.map(function (q) { + return q.value.raw; + }); + var placeholderID = 0; + var text = rawQuasis.reduce(function (prevVal, currVal, idx) { + return idx == 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal; + }, ""); + var doc$$2 = textToDoc(text, { + parser: "css" + }); + return transformCssDoc(doc$$2, path, print); + } + /* + * react-relay and graphql-tag + * graphql`...` + * graphql.experimental`...` + * gql`...` + * + * This intentionally excludes Relay Classic tags, as Prettier does not + * support Relay Classic formatting. + */ + + + if (isGraphQL(path)) { + var expressionDocs = node.expressions ? path.map(print, "expressions") : []; + var numQuasis = node.quasis.length; + + if (numQuasis === 1 && node.quasis[0].value.raw.trim() === "") { + return "``"; + } + + var parts = []; + + for (var i = 0; i < numQuasis; i++) { + var templateElement = node.quasis[i]; + var isFirst = i === 0; + var isLast = i === numQuasis - 1; + var _text = templateElement.value.cooked; // Bail out if any of the quasis have an invalid escape sequence + // (which would make the `cooked` value be `null` or `undefined`) + + if (typeof _text !== "string") { + return null; + } + + var lines = _text.split("\n"); + + var numLines = lines.length; + var expressionDoc = expressionDocs[i]; + var startsWithBlankLine = numLines > 2 && lines[0].trim() === "" && lines[1].trim() === ""; + var endsWithBlankLine = numLines > 2 && lines[numLines - 1].trim() === "" && lines[numLines - 2].trim() === ""; + var commentsAndWhitespaceOnly = lines.every(function (line) { + return /^\s*(?:#[^\r\n]*)?$/.test(line); + }); // Bail out if an interpolation occurs within a comment. + + if (!isLast && /#[^\r\n]*$/.test(lines[numLines - 1])) { + return null; + } + + var _doc = null; + + if (commentsAndWhitespaceOnly) { + _doc = printGraphqlComments(lines); + } else { + _doc = stripTrailingHardline$2(textToDoc(_text, { + parser: "graphql" + })); + } + + if (_doc) { + _doc = escapeTemplateCharacters(_doc, false); + + if (!isFirst && startsWithBlankLine) { + parts.push(""); + } + + parts.push(_doc); + + if (!isLast && endsWithBlankLine) { + parts.push(""); + } + } else if (!isFirst && !isLast && startsWithBlankLine) { + parts.push(""); + } + + if (expressionDoc) { + parts.push(concat$13(["${", expressionDoc, "}"])); + } + } + + return concat$13(["`", indent$7(concat$13([hardline$9, join$8(hardline$9, parts)])), hardline$9, "`"]); + } + + if (isHtml(path)) { + return printHtmlTemplateLiteral(path, print, textToDoc, "html"); + } + + if (isAngularComponentTemplate(path)) { + return printHtmlTemplateLiteral(path, print, textToDoc, "angular"); + } + + break; + } + + case "TemplateElement": + { + /** + * md`...` + * markdown`...` + */ + if (parentParent && parentParent.type === "TaggedTemplateExpression" && parent.quasis.length === 1 && parentParent.tag.type === "Identifier" && (parentParent.tag.name === "md" || parentParent.tag.name === "markdown")) { + var _text2 = parent.quasis[0].value.raw.replace(/((?:\\\\)*)\\`/g, function (_, backslashes) { + return "\\".repeat(backslashes.length / 2) + "`"; + }); + + var indentation = getIndentation(_text2); + var hasIndent = indentation !== ""; + return concat$13([hasIndent ? indent$7(concat$13([softline$6, printMarkdown(_text2.replace(new RegExp("^".concat(indentation), "gm"), ""))])) : concat$13([literalline$4, dedentToRoot$1(printMarkdown(_text2))]), softline$6]); + } + + break; + } + } + + function printMarkdown(text) { + var doc$$2 = textToDoc(text, { + parser: "markdown", + __inJsTemplate: true + }); + return stripTrailingHardline$2(escapeTemplateCharacters(doc$$2, true)); + } +} + +function getIndentation(str) { + var firstMatchedIndent = str.match(/^([^\S\n]*)\S/m); + return firstMatchedIndent === null ? "" : firstMatchedIndent[1]; +} + +function escapeTemplateCharacters(doc$$2, raw) { + return mapDoc$5(doc$$2, function (currentDoc) { + if (!currentDoc.parts) { + return currentDoc; + } + + var parts = []; + currentDoc.parts.forEach(function (part) { + if (typeof part === "string") { + parts.push(raw ? part.replace(/(\\*)`/g, "$1$1\\`") : part.replace(/([\\`]|\$\{)/g, "\\$1")); + } else { + parts.push(part); + } + }); + return Object.assign({}, currentDoc, { + parts: parts + }); + }); +} + +function transformCssDoc(quasisDoc, path, print) { + var parentNode = path.getValue(); + var isEmpty = parentNode.quasis.length === 1 && !parentNode.quasis[0].value.raw.trim(); + + if (isEmpty) { + return "``"; + } + + var expressionDocs = parentNode.expressions ? path.map(print, "expressions") : []; + var newDoc = replacePlaceholders(quasisDoc, expressionDocs); + /* istanbul ignore if */ + + if (!newDoc) { + throw new Error("Couldn't insert all the expressions"); + } + + return concat$13(["`", indent$7(concat$13([hardline$9, stripTrailingHardline$2(newDoc)])), softline$6, "`"]); +} // Search all the placeholders in the quasisDoc tree +// and replace them with the expression docs one by one +// returns a new doc with all the placeholders replaced, +// or null if it couldn't replace any expression + + +function replacePlaceholders(quasisDoc, expressionDocs) { + if (!expressionDocs || !expressionDocs.length) { + return quasisDoc; + } + + var expressions = expressionDocs.slice(); + var replaceCounter = 0; + var newDoc = mapDoc$5(quasisDoc, function (doc$$2) { + if (!doc$$2 || !doc$$2.parts || !doc$$2.parts.length) { + return doc$$2; + } + + var parts = doc$$2.parts; + var atIndex = parts.indexOf("@"); + var placeholderIndex = atIndex + 1; + + if (atIndex > -1 && typeof parts[placeholderIndex] === "string" && parts[placeholderIndex].startsWith("prettier-placeholder")) { + // If placeholder is split, join it + var at = parts[atIndex]; + var placeholder = parts[placeholderIndex]; + var rest = parts.slice(placeholderIndex + 1); + parts = parts.slice(0, atIndex).concat([at + placeholder]).concat(rest); + } + + var atPlaceholderIndex = parts.findIndex(function (part) { + return typeof part === "string" && part.startsWith("@prettier-placeholder"); + }); + + if (atPlaceholderIndex > -1) { + var _placeholder = parts[atPlaceholderIndex]; + + var _rest = parts.slice(atPlaceholderIndex + 1); + + var placeholderMatch = _placeholder.match(/@prettier-placeholder-(.+)-id([\s\S]*)/); + + var placeholderID = placeholderMatch[1]; // When the expression has a suffix appended, like: + // animation: linear ${time}s ease-out; + + var suffix = placeholderMatch[2]; + var expression = expressions[placeholderID]; + replaceCounter++; + parts = parts.slice(0, atPlaceholderIndex).concat(["${", expression, "}" + suffix]).concat(_rest); + } + + return Object.assign({}, doc$$2, { + parts: parts + }); + }); + return expressions.length === replaceCounter ? newDoc : null; +} + +function printGraphqlComments(lines) { + var parts = []; + var seenComment = false; + lines.map(function (textLine) { + return textLine.trim(); + }).forEach(function (textLine, i, array) { + // Lines are either whitespace only, or a comment (with poential whitespace + // around it). Drop whitespace-only lines. + if (textLine === "") { + return; + } + + if (array[i - 1] === "" && seenComment) { + // If a non-first comment is preceded by a blank (whitespace only) line, + // add in a blank line. + parts.push(concat$13([hardline$9, textLine])); + } else { + parts.push(textLine); + } + + seenComment = true; + }); // If `lines` was whitespace only, return `null`. + + return parts.length === 0 ? null : join$8(hardline$9, parts); +} +/** + * Template literal in this context: + * + */ + + +function isStyledJsx(path) { + var node = path.getValue(); + var parent = path.getParentNode(); + var parentParent = path.getParentNode(1); + return parentParent && node.quasis && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXElement" && parentParent.openingElement.name.name === "style" && parentParent.openingElement.attributes.some(function (attribute) { + return attribute.name.name === "jsx"; + }); +} +/** + * Angular Components can have: + * - Inline HTML template + * - Inline CSS styles + * + * ...which are both within template literals somewhere + * inside of the Component decorator factory. + * + * E.g. + * @Component({ + * template: `
      ...
      `, + * styles: [`h1 { color: blue; }`] + * }) + */ + + +function isAngularComponentStyles(path) { + return isPathMatch(path, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "ArrayExpression" && name === "elements"; + }, function (node, name) { + return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "styles" && name === "value"; + }].concat(getAngularComponentObjectExpressionPredicates())); +} + +function isAngularComponentTemplate(path) { + return isPathMatch(path, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "template" && name === "value"; + }].concat(getAngularComponentObjectExpressionPredicates())); +} + +function getAngularComponentObjectExpressionPredicates() { + return [function (node, name) { + return node.type === "ObjectExpression" && name === "properties"; + }, function (node, name) { + return node.type === "CallExpression" && node.callee.type === "Identifier" && node.callee.name === "Component" && name === "arguments"; + }, function (node, name) { + return node.type === "Decorator" && name === "expression"; + }]; +} +/** + * styled-components template literals + */ + + +function isStyledComponents(path) { + var parent = path.getParentNode(); + + if (!parent || parent.type !== "TaggedTemplateExpression") { + return false; + } + + var tag = parent.tag; + + switch (tag.type) { + case "MemberExpression": + return (// styled.foo`` + isStyledIdentifier(tag.object) || // Component.extend`` + isStyledExtend(tag) + ); + + case "CallExpression": + return (// styled(Component)`` + isStyledIdentifier(tag.callee) || tag.callee.type === "MemberExpression" && (tag.callee.object.type === "MemberExpression" && ( // styled.foo.attr({})`` + isStyledIdentifier(tag.callee.object.object) || // Component.extend.attr({)`` + isStyledExtend(tag.callee.object)) || // styled(Component).attr({})`` + tag.callee.object.type === "CallExpression" && isStyledIdentifier(tag.callee.object.callee)) + ); + + case "Identifier": + // css`` + return tag.name === "css"; + + default: + return false; + } +} +/** + * JSX element with CSS prop + */ + + +function isCssProp(path) { + var parent = path.getParentNode(); + var parentParent = path.getParentNode(1); + return parentParent && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" && parentParent.name.type === "JSXIdentifier" && parentParent.name.name === "css"; +} + +function isStyledIdentifier(node) { + return node.type === "Identifier" && node.name === "styled"; +} + +function isStyledExtend(node) { + return /^[A-Z]/.test(node.object.name) && node.property.name === "extend"; +} +/* + * react-relay and graphql-tag + * graphql`...` + * graphql.experimental`...` + * gql`...` + * GraphQL comment block + * + * This intentionally excludes Relay Classic tags, as Prettier does not + * support Relay Classic formatting. + */ + + +function isGraphQL(path) { + var node = path.getValue(); + var parent = path.getParentNode(); + return hasLanguageComment(node, "GraphQL") || parent && (parent.type === "TaggedTemplateExpression" && (parent.tag.type === "MemberExpression" && parent.tag.object.name === "graphql" && parent.tag.property.name === "experimental" || parent.tag.type === "Identifier" && (parent.tag.name === "gql" || parent.tag.name === "graphql")) || parent.type === "CallExpression" && parent.callee.type === "Identifier" && parent.callee.name === "graphql"); +} + +function hasLanguageComment(node, languageName) { + // This checks for a leading comment that is exactly `/* GraphQL */` + // In order to be in line with other implementations of this comment tag + // we will not trim the comment value and we will expect exactly one space on + // either side of the GraphQL string + // Also see ./clean.js + return node.leadingComments && node.leadingComments.some(function (comment) { + return comment.type === "CommentBlock" && comment.value === " ".concat(languageName, " "); + }); +} + +function isPathMatch(path, predicateStack) { + var stack = path.stack.slice(); + var name = null; + var node = stack.pop(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = predicateStack[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var predicate = _step.value; + + if (node === undefined) { + return false; + } // skip index/array + + + if (typeof name === "number") { + name = stack.pop(); + node = stack.pop(); + } + + if (!predicate(node, name)) { + return false; + } + + name = stack.pop(); + node = stack.pop(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return true; +} +/** + * - html`...` + * - HTML comment block + */ + + +function isHtml(path) { + var node = path.getValue(); + return hasLanguageComment(node, "HTML") || isPathMatch(path, [function (node) { + return node.type === "TemplateLiteral"; + }, function (node, name) { + return node.type === "TaggedTemplateExpression" && node.tag.type === "Identifier" && node.tag.name === "html" && name === "quasi"; + }]); +} + +function printHtmlTemplateLiteral(path, print, textToDoc, parser) { + var node = path.getValue(); + var placeholderPattern = "prettierhtmlplaceholder(\\d+)redlohecalplmthreitterp"; + var placeholders = node.expressions.map(function (_, i) { + return "prettierhtmlplaceholder".concat(i, "redlohecalplmthreitterp"); + }); + var text = node.quasis.map(function (quasi, index, quasis) { + return index === quasis.length - 1 ? quasi.value.raw : quasi.value.raw + placeholders[index]; + }).join(""); + var expressionDocs = path.map(print, "expressions"); + + if (expressionDocs.length === 0 && text.trim().length === 0) { + return "``"; + } + + var contentDoc = mapDoc$5(stripTrailingHardline$2(textToDoc(text, { + parser: parser + })), function (doc$$2) { + var placeholderRegex = new RegExp(placeholderPattern, "g"); + var hasPlaceholder = typeof doc$$2 === "string" && placeholderRegex.test(doc$$2); + + if (!hasPlaceholder) { + return doc$$2; + } + + var parts = []; + var components = doc$$2.split(placeholderRegex); + + for (var i = 0; i < components.length; i++) { + var component = components[i]; + + if (i % 2 === 0) { + if (component) { + parts.push(component); + } + + continue; + } + + var placeholderIndex = +component; + parts.push(concat$13(["${", group$11(concat$13([indent$7(concat$13([softline$6, expressionDocs[placeholderIndex]])), softline$6])), "}"])); + } + + return concat$13(parts); + }); + return group$11(concat$13(["`", indent$7(concat$13([hardline$9, group$11(contentDoc)])), softline$6, "`"])); +} + +var embed_1$2 = embed$4; + +function clean$7(ast, newObj, parent) { + ["range", "raw", "comments", "leadingComments", "trailingComments", "extra", "start", "end", "flags"].forEach(function (name) { + delete newObj[name]; + }); + + if (ast.type === "BigIntLiteral") { + newObj.value = newObj.value.toLowerCase(); + } // We remove extra `;` and add them when needed + + + if (ast.type === "EmptyStatement") { + return null; + } // We move text around, including whitespaces and add {" "} + + + if (ast.type === "JSXText") { + return null; + } + + if (ast.type === "JSXExpressionContainer" && ast.expression.type === "Literal" && ast.expression.value === " ") { + return null; + } // (TypeScript) Ignore `static` in `constructor(static p) {}` + // and `export` in `constructor(export p) {}` + + + if (ast.type === "TSParameterProperty" && ast.accessibility === null && !ast.readonly) { + return { + type: "Identifier", + name: ast.parameter.name, + typeAnnotation: newObj.parameter.typeAnnotation, + decorators: newObj.decorators + }; + } // (TypeScript) ignore empty `specifiers` array + + + if (ast.type === "TSNamespaceExportDeclaration" && ast.specifiers && ast.specifiers.length === 0) { + delete newObj.specifiers; + } // (TypeScript) bypass TSParenthesizedType + + + if (ast.type === "TSParenthesizedType" && ast.typeAnnotation.type === "TSTypeAnnotation") { + return newObj.typeAnnotation.typeAnnotation; + } // We convert
      to
      + + + if (ast.type === "JSXOpeningElement") { + delete newObj.selfClosing; + } + + if (ast.type === "JSXElement") { + delete newObj.closingElement; + } // We change {'key': value} into {key: value} + + + if ((ast.type === "Property" || ast.type === "ObjectProperty" || ast.type === "MethodDefinition" || ast.type === "ClassProperty" || ast.type === "TSPropertySignature" || ast.type === "ObjectTypeProperty") && _typeof(ast.key) === "object" && ast.key && (ast.key.type === "Literal" || ast.key.type === "StringLiteral" || ast.key.type === "Identifier")) { + delete newObj.key; + } + + if (ast.type === "OptionalMemberExpression" && ast.optional === false) { + newObj.type = "MemberExpression"; + delete newObj.optional; + } // Remove raw and cooked values from TemplateElement when it's CSS + // styled-jsx + + + if (ast.type === "JSXElement" && ast.openingElement.name.name === "style" && ast.openingElement.attributes.some(function (attr) { + return attr.name.name === "jsx"; + })) { + var templateLiterals = newObj.children.filter(function (child) { + return child.type === "JSXExpressionContainer" && child.expression.type === "TemplateLiteral"; + }).map(function (container) { + return container.expression; + }); + var quasis = templateLiterals.reduce(function (quasis, templateLiteral) { + return quasis.concat(templateLiteral.quasis); + }, []); + quasis.forEach(function (q) { + return delete q.value; + }); + } // CSS template literals in css prop + + + if (ast.type === "JSXAttribute" && ast.name.name === "css" && ast.value.type === "JSXExpressionContainer" && ast.value.expression.type === "TemplateLiteral") { + newObj.value.expression.quasis.forEach(function (q) { + return delete q.value; + }); + } // Angular Components: Inline HTML template and Inline CSS styles + + + var expression = ast.expression || ast.callee; + + if (ast.type === "Decorator" && expression.type === "CallExpression" && expression.callee.name === "Component" && expression.arguments.length === 1) { + var astProps = ast.expression.arguments[0].properties; + newObj.expression.arguments[0].properties.forEach(function (prop, index) { + var templateLiteral = null; + + switch (astProps[index].key.name) { + case "styles": + if (prop.value.type === "ArrayExpression") { + templateLiteral = prop.value.elements[0]; + } + + break; + + case "template": + if (prop.value.type === "TemplateLiteral") { + templateLiteral = prop.value; + } + + break; + } + + if (templateLiteral) { + templateLiteral.quasis.forEach(function (q) { + return delete q.value; + }); + } + }); + } // styled-components, graphql, markdown + + + if (ast.type === "TaggedTemplateExpression" && (ast.tag.type === "MemberExpression" || ast.tag.type === "Identifier" && (ast.tag.name === "gql" || ast.tag.name === "graphql" || ast.tag.name === "css" || ast.tag.name === "md" || ast.tag.name === "markdown" || ast.tag.name === "html") || ast.tag.type === "CallExpression")) { + newObj.quasi.quasis.forEach(function (quasi) { + return delete quasi.value; + }); + } + + if (ast.type === "TemplateLiteral") { + // This checks for a leading comment that is exactly `/* GraphQL */` + // In order to be in line with other implementations of this comment tag + // we will not trim the comment value and we will expect exactly one space on + // either side of the GraphQL string + // Also see ./embed.js + var hasLanguageComment = ast.leadingComments && ast.leadingComments.some(function (comment) { + return comment.type === "CommentBlock" && ["GraphQL", "HTML"].some(function (languageName) { + return comment.value === " ".concat(languageName, " "); + }); + }); + + if (hasLanguageComment || parent.type === "CallExpression" && parent.callee.name === "graphql") { + newObj.quasis.forEach(function (quasi) { + return delete quasi.value; + }); + } + } +} + +var clean_1$2 = clean$7; + +var addLeadingComment$2 = utilShared.addLeadingComment; +var addTrailingComment$2 = utilShared.addTrailingComment; +var addDanglingComment$2 = utilShared.addDanglingComment; + +function handleOwnLineComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleMemberExpressionComments(enclosingNode, followingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleImportSpecifierComments(enclosingNode, comment) || handleForComments(enclosingNode, precedingNode, comment) || handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) || handleAssignmentPatternComments(enclosingNode, comment) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options)) { + return true; + } + + return false; +} + +function handleEndOfLineComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) || handleImportSpecifierComments(enclosingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleLabeledStatementComments(enclosingNode, comment) || handleCallExpressionComments(precedingNode, enclosingNode, comment) || handlePropertyComments(enclosingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleTypeAliasComments(enclosingNode, followingNode, comment) || handleVariableDeclaratorComments(enclosingNode, followingNode, comment)) { + return true; + } + + return false; +} + +function handleRemainingComment(comment, text, options, ast, isLastComment) { + var precedingNode = comment.precedingNode, + enclosingNode = comment.enclosingNode, + followingNode = comment.followingNode; + + if (handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) || handleCommentInEmptyParens(text, enclosingNode, comment, options) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleCommentAfterArrowParams(text, enclosingNode, comment, options) || handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) || handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) || handleBreakAndContinueStatementComments(enclosingNode, comment)) { + return true; + } + + return false; +} + +function addBlockStatementFirstComment(node, comment) { + var body = node.body.filter(function (n) { + return n.type !== "EmptyStatement"; + }); + + if (body.length === 0) { + addDanglingComment$2(node, comment); + } else { + addLeadingComment$2(body[0], comment); + } +} + +function addBlockOrNotComment(node, comment) { + if (node.type === "BlockStatement") { + addBlockStatementFirstComment(node, comment); + } else { + addLeadingComment$2(node, comment); + } +} // There are often comments before the else clause of if statements like +// +// if (1) { ... } +// // comment +// else { ... } +// +// They are being attached as leading comments of the BlockExpression which +// is not well printed. What we want is to instead move the comment inside +// of the block and make it leadingComment of the first element of the block +// or dangling comment of the block if there is nothing inside +// +// if (1) { ... } +// else { +// // comment +// ... +// } + + +function handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + if (!enclosingNode || enclosingNode.type !== "IfStatement" || !followingNode) { + return false; + } // We unfortunately have no way using the AST or location of nodes to know + // if the comment is positioned before the condition parenthesis: + // if (a /* comment */) {} + // The only workaround I found is to look at the next character to see if + // it is a ). + + + var nextCharacter = util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd); + + if (nextCharacter === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Comments before `else`: + // - treat as trailing comments of the consequent, if it's a BlockStatement + // - treat as a dangling comment otherwise + + + if (precedingNode === enclosingNode.consequent && followingNode === enclosingNode.alternate) { + if (precedingNode.type === "BlockStatement") { + addTrailingComment$2(precedingNode, comment); + } else { + addDanglingComment$2(enclosingNode, comment); + } + + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + if (followingNode.type === "IfStatement") { + addBlockOrNotComment(followingNode.consequent, comment); + return true; + } // For comments positioned after the condition parenthesis in an if statement + // before the consequent without brackets on, such as + // if (a) /* comment */ true, + // we look at the next character to see if the following node + // is the consequent for the if statement + + + if (enclosingNode.consequent === followingNode) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + if (!enclosingNode || enclosingNode.type !== "WhileStatement" || !followingNode) { + return false; + } // We unfortunately have no way using the AST or location of nodes to know + // if the comment is positioned before the condition parenthesis: + // while (a /* comment */) {} + // The only workaround I found is to look at the next character to see if + // it is a ). + + + var nextCharacter = util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd); + + if (nextCharacter === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + return false; +} // Same as IfStatement but for TryStatement + + +function handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) { + if (!enclosingNode || enclosingNode.type !== "TryStatement" && enclosingNode.type !== "CatchClause" || !followingNode) { + return false; + } + + if (enclosingNode.type === "CatchClause" && precedingNode) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (followingNode.type === "BlockStatement") { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + + if (followingNode.type === "TryStatement") { + addBlockOrNotComment(followingNode.finalizer, comment); + return true; + } + + if (followingNode.type === "CatchClause") { + addBlockOrNotComment(followingNode.body, comment); + return true; + } + + return false; +} + +function handleMemberExpressionComments(enclosingNode, followingNode, comment) { + if (enclosingNode && enclosingNode.type === "MemberExpression" && followingNode && followingNode.type === "Identifier") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) { + var isSameLineAsPrecedingNode = precedingNode && !util.hasNewlineInRange(text, options.locEnd(precedingNode), options.locStart(comment)); + + if ((!precedingNode || !isSameLineAsPrecedingNode) && enclosingNode && enclosingNode.type === "ConditionalExpression" && followingNode) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ObjectProperty" || enclosingNode.type === "Property") && enclosingNode.shorthand && enclosingNode.key === precedingNode && enclosingNode.value.type === "AssignmentPattern") { + addTrailingComment$2(enclosingNode.value.left, comment); + return true; + } + + return false; +} + +function handleClassComments(enclosingNode, precedingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ClassDeclaration" || enclosingNode.type === "ClassExpression") && enclosingNode.decorators && enclosingNode.decorators.length > 0 && !(followingNode && followingNode.type === "Decorator")) { + if (!enclosingNode.decorators || enclosingNode.decorators.length === 0) { + addLeadingComment$2(enclosingNode, comment); + } else { + addTrailingComment$2(enclosingNode.decorators[enclosingNode.decorators.length - 1], comment); + } + + return true; + } + + return false; +} + +function handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) { + // This is only needed for estree parsers (flow, typescript) to attach + // after a method name: + // obj = { fn /*comment*/() {} }; + if (enclosingNode && precedingNode && (enclosingNode.type === "Property" || enclosingNode.type === "MethodDefinition") && precedingNode.type === "Identifier" && enclosingNode.key === precedingNode && // special Property case: { key: /*comment*/(value) }; + // comment should be attached to value instead of key + util.getNextNonSpaceNonCommentCharacter(text, precedingNode, options.locEnd) !== ":") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Print comments between decorators and class methods as a trailing comment + // on the decorator node instead of the method node + + + if (precedingNode && enclosingNode && precedingNode.type === "Decorator" && (enclosingNode.type === "ClassMethod" || enclosingNode.type === "ClassProperty" || enclosingNode.type === "TSAbstractClassProperty" || enclosingNode.type === "TSAbstractMethodDefinition" || enclosingNode.type === "MethodDefinition")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) { + if (util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== "(") { + return false; + } + + if (precedingNode && enclosingNode && (enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ClassMethod" || enclosingNode.type === "MethodDefinition" || enclosingNode.type === "ObjectMethod")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleCommentAfterArrowParams(text, enclosingNode, comment, options) { + if (!(enclosingNode && enclosingNode.type === "ArrowFunctionExpression")) { + return false; + } + + var index = utilShared.getNextNonSpaceNonCommentCharacterIndex(text, comment, options); + + if (text.substr(index, 2) === "=>") { + addDanglingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleCommentInEmptyParens(text, enclosingNode, comment, options) { + if (util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== ")") { + return false; + } // Only add dangling comments to fix the case when no params are present, + // i.e. a function without any argument. + + + if (enclosingNode && ((enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ArrowFunctionExpression" && (enclosingNode.body.type !== "CallExpression" || enclosingNode.body.arguments.length === 0) || enclosingNode.type === "ClassMethod" || enclosingNode.type === "ObjectMethod") && enclosingNode.params.length === 0 || (enclosingNode.type === "CallExpression" || enclosingNode.type === "NewExpression") && enclosingNode.arguments.length === 0)) { + addDanglingComment$2(enclosingNode, comment); + return true; + } + + if (enclosingNode && enclosingNode.type === "MethodDefinition" && enclosingNode.value.params.length === 0) { + addDanglingComment$2(enclosingNode.value, comment); + return true; + } + + return false; +} + +function handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) { + // Type definitions functions + if (precedingNode && precedingNode.type === "FunctionTypeParam" && enclosingNode && enclosingNode.type === "FunctionTypeAnnotation" && followingNode && followingNode.type !== "FunctionTypeParam") { + addTrailingComment$2(precedingNode, comment); + return true; + } // Real functions + + + if (precedingNode && (precedingNode.type === "Identifier" || precedingNode.type === "AssignmentPattern") && enclosingNode && (enclosingNode.type === "ArrowFunctionExpression" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "ObjectMethod" || enclosingNode.type === "ClassMethod") && util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) === ")") { + addTrailingComment$2(precedingNode, comment); + return true; + } + + if (enclosingNode && enclosingNode.type === "FunctionDeclaration" && followingNode && followingNode.type === "BlockStatement") { + var functionParamRightParenIndex = function () { + if (enclosingNode.params.length !== 0) { + return util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(util.getLast(enclosingNode.params))); + } + + var functionParamLeftParenIndex = util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(enclosingNode.id)); + return util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, functionParamLeftParenIndex + 1); + }(); + + if (options.locStart(comment) > functionParamRightParenIndex) { + addBlockStatementFirstComment(followingNode, comment); + return true; + } + } + + return false; +} + +function handleImportSpecifierComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "ImportSpecifier") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleLabeledStatementComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "LabeledStatement") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleBreakAndContinueStatementComments(enclosingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ContinueStatement" || enclosingNode.type === "BreakStatement") && !enclosingNode.label) { + addTrailingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleCallExpressionComments(precedingNode, enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "CallExpression" && precedingNode && enclosingNode.callee === precedingNode && enclosingNode.arguments.length > 0) { + addLeadingComment$2(enclosingNode.arguments[0], comment); + return true; + } + + return false; +} + +function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handlePropertyComments(enclosingNode, comment) { + if (enclosingNode && (enclosingNode.type === "Property" || enclosingNode.type === "ObjectProperty")) { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleOnlyComments(enclosingNode, ast, comment, isLastComment) { + // With Flow the enclosingNode is undefined so use the AST instead. + if (ast && ast.body && ast.body.length === 0) { + if (isLastComment) { + addDanglingComment$2(ast, comment); + } else { + addLeadingComment$2(ast, comment); + } + + return true; + } else if (enclosingNode && enclosingNode.type === "Program" && enclosingNode.body.length === 0 && enclosingNode.directives && enclosingNode.directives.length === 0) { + if (isLastComment) { + addDanglingComment$2(enclosingNode, comment); + } else { + addLeadingComment$2(enclosingNode, comment); + } + + return true; + } + + return false; +} + +function handleForComments(enclosingNode, precedingNode, comment) { + if (enclosingNode && (enclosingNode.type === "ForInStatement" || enclosingNode.type === "ForOfStatement")) { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) { + if (precedingNode && precedingNode.type === "ImportSpecifier" && enclosingNode && enclosingNode.type === "ImportDeclaration" && util.hasNewline(text, options.locEnd(comment))) { + addTrailingComment$2(precedingNode, comment); + return true; + } + + return false; +} + +function handleAssignmentPatternComments(enclosingNode, comment) { + if (enclosingNode && enclosingNode.type === "AssignmentPattern") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleTypeAliasComments(enclosingNode, followingNode, comment) { + if (enclosingNode && enclosingNode.type === "TypeAlias") { + addLeadingComment$2(enclosingNode, comment); + return true; + } + + return false; +} + +function handleVariableDeclaratorComments(enclosingNode, followingNode, comment) { + if (enclosingNode && (enclosingNode.type === "VariableDeclarator" || enclosingNode.type === "AssignmentExpression") && followingNode && (followingNode.type === "ObjectExpression" || followingNode.type === "ArrayExpression" || followingNode.type === "TemplateLiteral" || followingNode.type === "TaggedTemplateExpression")) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +function handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) { + if (!enclosingNode || enclosingNode.type !== "TSMappedType") { + return false; + } + + if (followingNode && followingNode.type === "TSTypeParameter" && followingNode.name) { + addLeadingComment$2(followingNode.name, comment); + return true; + } + + if (precedingNode && precedingNode.type === "TSTypeParameter" && precedingNode.constraint) { + addTrailingComment$2(precedingNode.constraint, comment); + return true; + } + + return false; +} + +function isBlockComment(comment) { + return comment.type === "Block" || comment.type === "CommentBlock"; +} + +var comments$3 = { + handleOwnLineComment: handleOwnLineComment, + handleEndOfLineComment: handleEndOfLineComment, + handleRemainingComment: handleRemainingComment, + isBlockComment: isBlockComment +}; + +// Flow annotation comments cannot be split across lines. For example: +// +// (this /* +// : any */).foo = 5; +// +// is not picked up by Flow (see https://github.com/facebook/flow/issues/7050), so +// removing the newline would create a type annotation that the user did not intend +// to create. + +var NON_LINE_TERMINATING_WHITE_SPACE = "(?:(?=.)\\s)"; +var FLOW_SHORTHAND_ANNOTATION = new RegExp("^".concat(NON_LINE_TERMINATING_WHITE_SPACE, "*:")); +var FLOW_ANNOTATION = new RegExp("^".concat(NON_LINE_TERMINATING_WHITE_SPACE, "*::")); + +function hasFlowShorthandAnnotationComment$2(node) { + // https://flow.org/en/docs/types/comments/ + // Syntax example: const r = new (window.Request /*: Class */)(""); + return node.extra && node.extra.parenthesized && node.trailingComments && node.trailingComments[0].value.match(FLOW_SHORTHAND_ANNOTATION); +} + +function hasFlowAnnotationComment$1(comments) { + return comments && comments[0].value.match(FLOW_ANNOTATION); +} + +function hasNode$1(node, fn) { + if (!node || _typeof(node) !== "object") { + return false; + } + + if (Array.isArray(node)) { + return node.some(function (value) { + return hasNode$1(value, fn); + }); + } + + var result = fn(node); + return typeof result === "boolean" ? result : Object.keys(node).some(function (key) { + return hasNode$1(node[key], fn); + }); +} + +var utils$6 = { + hasNode: hasNode$1, + hasFlowShorthandAnnotationComment: hasFlowShorthandAnnotationComment$2, + hasFlowAnnotationComment: hasFlowAnnotationComment$1 +}; + +var hasFlowShorthandAnnotationComment$1 = utils$6.hasFlowShorthandAnnotationComment; + +function hasClosureCompilerTypeCastComment(text, path, locStart, locEnd) { + // https://github.com/google/closure-compiler/wiki/Annotating-Types#type-casts + // Syntax example: var x = /** @type {string} */ (fruit); + var n = path.getValue(); + return util.getNextNonSpaceNonCommentCharacter(text, n, locEnd) === ")" && (hasTypeCastComment(n) || hasAncestorTypeCastComment(0)); // for sub-item: /** @type {array} */ (numberOrString).map(x => x); + + function hasAncestorTypeCastComment(index) { + var ancestor = path.getParentNode(index); + return ancestor && util.getNextNonSpaceNonCommentCharacter(text, ancestor, locEnd) !== ")" && /^[\s(]*$/.test(text.slice(locStart(ancestor), locStart(n))) ? hasTypeCastComment(ancestor) || hasAncestorTypeCastComment(index + 1) : false; + } + + function hasTypeCastComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.leading && comments$3.isBlockComment(comment) && comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/) && util.getNextNonSpaceNonCommentCharacter(text, comment, locEnd) === "("; + }); + } +} + +function needsParens(path, options) { + var parent = path.getParentNode(); + + if (!parent) { + return false; + } + + var name = path.getName(); + var node = path.getNode(); // If the value of this path is some child of a Node and not a Node + // itself, then it doesn't need parentheses. Only Node objects (in + // fact, only Expression nodes) need parentheses. + + if (path.getValue() !== node) { + return false; + } // Only statements don't need parentheses. + + + if (isStatement(node)) { + return false; + } // Closure compiler requires that type casted expressions to be surrounded by + // parentheses. + + + if (hasClosureCompilerTypeCastComment(options.originalText, path, options.locStart, options.locEnd)) { + return true; + } + + if ( // Preserve parens if we have a Flow annotation comment, unless we're using the Flow + // parser. The Flow parser turns Flow comments into type annotation nodes in its + // AST, which we handle separately. + options.parser !== "flow" && hasFlowShorthandAnnotationComment$1(path.getValue())) { + return true; + } // Identifiers never need parentheses. + + + if (node.type === "Identifier") { + return false; + } + + if (parent.type === "ParenthesizedExpression") { + return false; + } // Add parens around the extends clause of a class. It is needed for almost + // all expressions. + + + if ((parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node && (node.type === "ArrowFunctionExpression" || node.type === "AssignmentExpression" || node.type === "AwaitExpression" || node.type === "BinaryExpression" || node.type === "ConditionalExpression" || node.type === "LogicalExpression" || node.type === "NewExpression" || node.type === "ObjectExpression" || node.type === "ParenthesizedExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "UnaryExpression" || node.type === "UpdateExpression" || node.type === "YieldExpression")) { + return true; + } + + if (parent.type === "ArrowFunctionExpression" && parent.body === node && node.type !== "SequenceExpression" && // these have parens added anyway + util.startsWithNoLookaheadToken(node, + /* forbidFunctionClassAndDoExpr */ + false) || parent.type === "ExpressionStatement" && util.startsWithNoLookaheadToken(node, + /* forbidFunctionClassAndDoExpr */ + true)) { + return true; + } + + switch (node.type) { + case "CallExpression": + { + var firstParentNotMemberExpression = parent; + var i = 0; + + while (firstParentNotMemberExpression && firstParentNotMemberExpression.type === "MemberExpression") { + firstParentNotMemberExpression = path.getParentNode(++i); + } + + if (firstParentNotMemberExpression.type === "NewExpression" && firstParentNotMemberExpression.callee === path.getParentNode(i - 1)) { + return true; + } + + if (parent.type === "BindExpression" && parent.callee === node) { + return true; + } + + return false; + } + + case "SpreadElement": + case "SpreadProperty": + return parent.type === "MemberExpression" && name === "object" && parent.object === node; + + case "UpdateExpression": + if (parent.type === "UnaryExpression") { + return node.prefix && (node.operator === "++" && parent.operator === "+" || node.operator === "--" && parent.operator === "-"); + } + + // else fallthrough + + case "UnaryExpression": + switch (parent.type) { + case "UnaryExpression": + return node.operator === parent.operator && (node.operator === "+" || node.operator === "-"); + + case "BindExpression": + return true; + + case "MemberExpression": + return name === "object" && parent.object === node; + + case "TaggedTemplateExpression": + return true; + + case "NewExpression": + case "CallExpression": + return name === "callee" && parent.callee === node; + + case "BinaryExpression": + return parent.operator === "**" && name === "left"; + + case "TSNonNullExpression": + return true; + + default: + return false; + } + + case "BinaryExpression": + { + if (parent.type === "UpdateExpression") { + return true; + } + + var isLeftOfAForStatement = function isLeftOfAForStatement(node) { + var i = 0; + + while (node) { + var _parent = path.getParentNode(i++); + + if (!_parent) { + return false; + } + + if (_parent.type === "ForStatement" && _parent.init === node) { + return true; + } + + node = _parent; + } + + return false; + }; + + if (node.operator === "in" && isLeftOfAForStatement(node)) { + return true; + } + } + // fallthrough + + case "TSTypeAssertionExpression": + case "TSAsExpression": + case "LogicalExpression": + switch (parent.type) { + case "ConditionalExpression": + return node.type === "TSAsExpression"; + + case "CallExpression": + case "NewExpression": + return name === "callee" && parent.callee === node; + + case "ClassExpression": + case "ClassDeclaration": + case "TSAbstractClassDeclaration": + return name === "superClass" && parent.superClass === node; + + case "TSTypeAssertionExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BindExpression": + case "AwaitExpression": + case "TSAsExpression": + case "TSNonNullExpression": + case "UpdateExpression": + return true; + + case "MemberExpression": + return name === "object" && parent.object === node; + + case "AssignmentExpression": + return parent.left === node && (node.type === "TSTypeAssertionExpression" || node.type === "TSAsExpression"); + + case "Decorator": + return parent.expression === node && (node.type === "TSTypeAssertionExpression" || node.type === "TSAsExpression"); + + case "BinaryExpression": + case "LogicalExpression": + { + if (!node.operator && node.type !== "TSTypeAssertionExpression") { + return true; + } + + var po = parent.operator; + var pp = util.getPrecedence(po); + var no = node.operator; + var np = util.getPrecedence(no); + + if (pp > np) { + return true; + } + + if ((po === "||" || po === "??") && no === "&&") { + return true; + } + + if (pp === np && name === "right") { + assert$3.strictEqual(parent.right, node); + return true; + } + + if (pp === np && !util.shouldFlatten(po, no)) { + return true; + } + + if (pp < np && no === "%") { + return po === "+" || po === "-"; + } // Add parenthesis when working with bitwise operators + // It's not stricly needed but helps with code understanding + + + if (util.isBitwiseOperator(po)) { + return true; + } + + return false; + } + + default: + return false; + } + + case "TSParenthesizedType": + { + var grandParent = path.getParentNode(1); + + if ((parent.type === "TSTypeParameter" || parent.type === "TypeParameter" || parent.type === "VariableDeclarator" || parent.type === "TSTypeAnnotation" || parent.type === "GenericTypeAnnotation" || parent.type === "TSTypeReference") && node.typeAnnotation.type === "TSTypeAnnotation" && node.typeAnnotation.typeAnnotation.type !== "TSFunctionType" && grandParent.type !== "TSTypeOperator" && grandParent.type !== "TSOptionalType") { + return false; + } // Delegate to inner TSParenthesizedType + + + if (node.typeAnnotation.type === "TSParenthesizedType") { + return false; + } + + return true; + } + + case "SequenceExpression": + switch (parent.type) { + case "ReturnStatement": + return false; + + case "ForStatement": + // Although parentheses wouldn't hurt around sequence + // expressions in the head of for loops, traditional style + // dictates that e.g. i++, j++ should not be wrapped with + // parentheses. + return false; + + case "ExpressionStatement": + return name !== "expression"; + + case "ArrowFunctionExpression": + // We do need parentheses, but SequenceExpressions are handled + // specially when printing bodies of arrow functions. + return name !== "body"; + + default: + // Otherwise err on the side of overparenthesization, adding + // explicit exceptions above if this proves overzealous. + return true; + } + + case "YieldExpression": + if (parent.type === "UnaryExpression" || parent.type === "AwaitExpression" || parent.type === "TSAsExpression" || parent.type === "TSNonNullExpression") { + return true; + } + + // else fallthrough + + case "AwaitExpression": + switch (parent.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "BinaryExpression": + case "LogicalExpression": + case "SpreadElement": + case "SpreadProperty": + case "TSAsExpression": + case "TSNonNullExpression": + case "BindExpression": + return true; + + case "MemberExpression": + return parent.object === node; + + case "NewExpression": + case "CallExpression": + return parent.callee === node; + + case "ConditionalExpression": + return parent.test === node; + + default: + return false; + } + + case "ArrayTypeAnnotation": + return parent.type === "NullableTypeAnnotation"; + + case "IntersectionTypeAnnotation": + case "UnionTypeAnnotation": + return parent.type === "ArrayTypeAnnotation" || parent.type === "NullableTypeAnnotation" || parent.type === "IntersectionTypeAnnotation" || parent.type === "UnionTypeAnnotation"; + + case "NullableTypeAnnotation": + return parent.type === "ArrayTypeAnnotation"; + + case "FunctionTypeAnnotation": + { + var ancestor = parent.type === "NullableTypeAnnotation" ? path.getParentNode(1) : parent; + return ancestor.type === "UnionTypeAnnotation" || ancestor.type === "IntersectionTypeAnnotation" || ancestor.type === "ArrayTypeAnnotation" || // We should check ancestor's parent to know whether the parentheses + // are really needed, but since ??T doesn't make sense this check + // will almost never be true. + ancestor.type === "NullableTypeAnnotation"; + } + + case "StringLiteral": + case "NumericLiteral": + case "Literal": + if (typeof node.value === "string" && parent.type === "ExpressionStatement" && ( // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2 + // See corresponding workaround in printer.js case: "Literal" + options.parser !== "typescript" && !parent.directive || options.parser === "typescript" && options.originalText.substr(options.locStart(node) - 1, 1) === "(")) { + // To avoid becoming a directive + var _grandParent = path.getParentNode(1); + + return _grandParent.type === "Program" || _grandParent.type === "BlockStatement"; + } + + return parent.type === "MemberExpression" && typeof node.value === "number" && name === "object" && parent.object === node; + + case "AssignmentExpression": + { + var _grandParent2 = path.getParentNode(1); + + if (parent.type === "ArrowFunctionExpression" && parent.body === node) { + return true; + } else if (parent.type === "ClassProperty" && parent.key === node && parent.computed) { + return false; + } else if (parent.type === "TSPropertySignature" && parent.name === node) { + return false; + } else if (parent.type === "ForStatement" && (parent.init === node || parent.update === node)) { + return false; + } else if (parent.type === "ExpressionStatement") { + return node.left.type === "ObjectPattern"; + } else if (parent.type === "TSPropertySignature" && parent.key === node) { + return false; + } else if (parent.type === "AssignmentExpression") { + return false; + } else if (parent.type === "SequenceExpression" && _grandParent2 && _grandParent2.type === "ForStatement" && (_grandParent2.init === parent || _grandParent2.update === parent)) { + return false; + } else if (parent.type === "Property" && parent.value === node) { + return false; + } else if (parent.type === "NGChainedExpression") { + return false; + } + + return true; + } + + case "ConditionalExpression": + switch (parent.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + case "ExportDefaultDeclaration": + case "AwaitExpression": + case "JSXSpreadAttribute": + case "TSTypeAssertionExpression": + case "TypeCastExpression": + case "TSAsExpression": + case "TSNonNullExpression": + case "OptionalMemberExpression": + return true; + + case "NewExpression": + case "CallExpression": + return name === "callee" && parent.callee === node; + + case "ConditionalExpression": + return name === "test" && parent.test === node; + + case "MemberExpression": + return name === "object" && parent.object === node; + + default: + return false; + } + + case "FunctionExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee"; + // Not strictly necessary, but it's clearer to the reader if IIFEs are wrapped in parentheses. + + case "TaggedTemplateExpression": + return true; + // This is basically a kind of IIFE. + + case "ExportDefaultDeclaration": + return true; + + default: + return false; + } + + case "ArrowFunctionExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee"; + + case "NewExpression": + return name === "callee"; + + case "MemberExpression": + return name === "object"; + + case "TSAsExpression": + case "BindExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "BinaryExpression": + case "AwaitExpression": + case "TSTypeAssertionExpression": + return true; + + case "ConditionalExpression": + return name === "test"; + + default: + return false; + } + + case "ClassExpression": + return parent.type === "ExportDefaultDeclaration"; + + case "OptionalMemberExpression": + return parent.type === "MemberExpression"; + + case "MemberExpression": + if (parent.type === "BindExpression" && name === "callee" && parent.callee === node) { + var object = node.object; + + while (object) { + if (object.type === "CallExpression") { + return true; + } + + if (object.type !== "MemberExpression" && object.type !== "BindExpression") { + break; + } + + object = object.object; + } + } + + return false; + + case "BindExpression": + if (parent.type === "BindExpression" && name === "callee" && parent.callee === node || parent.type === "MemberExpression") { + return true; + } + + return false; + + case "NGPipeExpression": + if (parent.type === "NGRoot" || parent.type === "ObjectProperty" || parent.type === "ArrayExpression" || (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && parent.arguments[name] === node || parent.type === "NGPipeExpression" && name === "right" || parent.type === "MemberExpression" && name === "property" || parent.type === "AssignmentExpression") { + return false; + } + + return true; + } + + return false; +} + +function isStatement(node) { + return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "ForAwaitStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || node.type === "FunctionDeclaration" || node.type === "IfStatement" || node.type === "ImportDeclaration" || node.type === "InterfaceDeclaration" || node.type === "LabeledStatement" || node.type === "MethodDefinition" || node.type === "ReturnStatement" || node.type === "SwitchStatement" || node.type === "ThrowStatement" || node.type === "TryStatement" || node.type === "TSAbstractClassDeclaration" || node.type === "TSEnumDeclaration" || node.type === "TSImportEqualsDeclaration" || node.type === "TSInterfaceDeclaration" || node.type === "TSModuleDeclaration" || node.type === "TSNamespaceExportDeclaration" || node.type === "TypeAlias" || node.type === "VariableDeclaration" || node.type === "WhileStatement" || node.type === "WithStatement"; +} + +var needsParens_1 = needsParens; + +var _require$$0$builders$7 = doc.builders; +var concat$14 = _require$$0$builders$7.concat; +var join$9 = _require$$0$builders$7.join; +var line$9 = _require$$0$builders$7.line; + +function printHtmlBinding$1(path, options, print) { + var node = path.getValue(); + + if (options.__onHtmlBindingRoot && path.getName() === null) { + options.__onHtmlBindingRoot(node); + } + + if (node.type !== "File") { + return; + } + + if (options.__isVueForBindingLeft) { + return path.call(function (functionDeclarationPath) { + var _functionDeclarationP = functionDeclarationPath.getValue(), + params = _functionDeclarationP.params; + + return concat$14([params.length > 1 ? "(" : "", join$9(concat$14([",", line$9]), functionDeclarationPath.map(print, "params")), params.length > 1 ? ")" : ""]); + }, "program", "body", 0); + } + + if (options.__isVueSlotScope) { + return path.call(function (functionDeclarationPath) { + return join$9(concat$14([",", line$9]), functionDeclarationPath.map(print, "params")); + }, "program", "body", 0); + } +} + +var htmlBinding = { + printHtmlBinding: printHtmlBinding$1 +}; + +function preprocess$2(ast, options) { + switch (options.parser) { + case "json": + case "json5": + case "json-stringify": + case "__js_expression": + case "__vue_expression": + return Object.assign({}, ast, { + type: options.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot", + node: ast, + comments: [] + }); + + default: + return ast; + } +} + +var preprocess_1$2 = preprocess$2; + +var getParentExportDeclaration$1 = util.getParentExportDeclaration; +var isExportDeclaration$1 = util.isExportDeclaration; +var shouldFlatten$1 = util.shouldFlatten; +var getNextNonSpaceNonCommentCharacter$1 = util.getNextNonSpaceNonCommentCharacter; +var hasNewline$3 = util.hasNewline; +var hasNewlineInRange$1 = util.hasNewlineInRange; +var getLast$4 = util.getLast; +var getStringWidth$2 = util.getStringWidth; +var printString$2 = util.printString; +var printNumber$2 = util.printNumber; +var hasIgnoreComment$3 = util.hasIgnoreComment; +var skipWhitespace$1 = util.skipWhitespace; +var hasNodeIgnoreComment$1 = util.hasNodeIgnoreComment; +var getPenultimate$1 = util.getPenultimate; +var startsWithNoLookaheadToken$1 = util.startsWithNoLookaheadToken; +var getIndentSize$1 = util.getIndentSize; +var matchAncestorTypes$1 = util.matchAncestorTypes; +var getPreferredQuote$1 = util.getPreferredQuote; +var isNextLineEmpty$4 = utilShared.isNextLineEmpty; +var isNextLineEmptyAfterIndex$1 = utilShared.isNextLineEmptyAfterIndex; +var getNextNonSpaceNonCommentCharacterIndex$2 = utilShared.getNextNonSpaceNonCommentCharacterIndex; +var isIdentifierName = utils$2.keyword.isIdentifierNameES5; +var insertPragma$7 = pragma$2.insertPragma; +var printHtmlBinding = htmlBinding.printHtmlBinding; +var hasNode = utils$6.hasNode; +var hasFlowAnnotationComment = utils$6.hasFlowAnnotationComment; +var hasFlowShorthandAnnotationComment = utils$6.hasFlowShorthandAnnotationComment; +var _require$$6$builders = doc.builders; +var concat$12 = _require$$6$builders.concat; +var join$7 = _require$$6$builders.join; +var line$8 = _require$$6$builders.line; +var hardline$8 = _require$$6$builders.hardline; +var softline$5 = _require$$6$builders.softline; +var literalline$3 = _require$$6$builders.literalline; +var group$10 = _require$$6$builders.group; +var indent$6 = _require$$6$builders.indent; +var align$1 = _require$$6$builders.align; +var conditionalGroup$1 = _require$$6$builders.conditionalGroup; +var fill$4 = _require$$6$builders.fill; +var ifBreak$6 = _require$$6$builders.ifBreak; +var breakParent$3 = _require$$6$builders.breakParent; +var lineSuffixBoundary$1 = _require$$6$builders.lineSuffixBoundary; +var addAlignmentToDoc$2 = _require$$6$builders.addAlignmentToDoc; +var dedent$3 = _require$$6$builders.dedent; +var _require$$6$utils = doc.utils; +var willBreak$1 = _require$$6$utils.willBreak; +var isLineNext$1 = _require$$6$utils.isLineNext; +var isEmpty$1 = _require$$6$utils.isEmpty; +var removeLines$2 = _require$$6$utils.removeLines; +var printDocToString$1 = doc.printer.printDocToString; +var uid = 0; + +function shouldPrintComma$1(options, level) { + level = level || "es5"; + + switch (options.trailingComma) { + case "all": + if (level === "all") { + return true; + } + + // fallthrough + + case "es5": + if (level === "es5") { + return true; + } + + // fallthrough + + case "none": + default: + return false; + } +} + +function genericPrint$3(path, options, printPath, args) { + var node = path.getValue(); + var needsParens = false; + var linesWithoutParens = printPathNoParens(path, options, printPath, args); + + if (!node || isEmpty$1(linesWithoutParens)) { + return linesWithoutParens; + } + + var parentExportDecl = getParentExportDeclaration$1(path); + var decorators = []; + + if (node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "TSAbstractClassProperty" || node.type === "ClassPrivateProperty") {// their decorators are handled themselves + } else if (node.decorators && node.decorators.length > 0 && // If the parent node is an export declaration and the decorator + // was written before the export, the export will be responsible + // for printing the decorators. + !(parentExportDecl && options.locStart(parentExportDecl, { + ignoreDecorators: true + }) > options.locStart(node.decorators[0]))) { + var shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators(node, options); + var separator = shouldBreak ? hardline$8 : line$8; + path.each(function (decoratorPath) { + var decorator = decoratorPath.getValue(); + + if (decorator.expression) { + decorator = decorator.expression; + } else { + decorator = decorator.callee; + } + + decorators.push(printPath(decoratorPath), separator); + }, "decorators"); + + if (parentExportDecl) { + decorators.unshift(hardline$8); + } + } else if (isExportDeclaration$1(node) && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0 && // Only print decorators here if they were written before the export, + // otherwise they are printed by the node.declaration + options.locStart(node, { + ignoreDecorators: true + }) > options.locStart(node.declaration.decorators[0])) { + // Export declarations are responsible for printing any decorators + // that logically apply to node.declaration. + path.each(function (decoratorPath) { + var decorator = decoratorPath.getValue(); + var prefix = decorator.type === "Decorator" ? "" : "@"; + decorators.push(prefix, printPath(decoratorPath), hardline$8); + }, "declaration", "decorators"); + } else { + // Nodes with decorators can't have parentheses, so we can avoid + // computing pathNeedsParens() except in this case. + needsParens = needsParens_1(path, options); + } + + var parts = []; + + if (needsParens) { + parts.unshift("("); + } + + parts.push(linesWithoutParens); + + if (needsParens) { + var _node = path.getValue(); + + if (hasFlowShorthandAnnotationComment(_node)) { + parts.push(" /*"); + parts.push(_node.trailingComments[0].value.trimLeft()); + parts.push("*/"); + _node.trailingComments[0].printed = true; + } + + parts.push(")"); + } + + if (decorators.length > 0) { + return group$10(concat$12(decorators.concat(parts))); + } + + return concat$12(parts); +} + +function hasNewlineBetweenOrAfterDecorators(node, options) { + return hasNewlineInRange$1(options.originalText, options.locStart(node.decorators[0]), options.locEnd(getLast$4(node.decorators))) || hasNewline$3(options.originalText, options.locEnd(getLast$4(node.decorators))); +} + +function printDecorators(path, options, print) { + var node = path.getValue(); + return group$10(concat$12([join$7(line$8, path.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators(node, options) ? hardline$8 : line$8])); +} + +function hasPrettierIgnore$2(path) { + return hasIgnoreComment$3(path) || hasJsxIgnoreComment(path); +} + +function hasJsxIgnoreComment(path) { + var node = path.getValue(); + var parent = path.getParentNode(); + + if (!parent || !node || !isJSXNode(node) || !isJSXNode(parent)) { + return false; + } // Lookup the previous sibling, ignoring any empty JSXText elements + + + var index = parent.children.indexOf(node); + var prevSibling = null; + + for (var i = index; i > 0; i--) { + var candidate = parent.children[i - 1]; + + if (candidate.type === "JSXText" && !isMeaningfulJSXText(candidate)) { + continue; + } + + prevSibling = candidate; + break; + } + + return prevSibling && prevSibling.type === "JSXExpressionContainer" && prevSibling.expression.type === "JSXEmptyExpression" && prevSibling.expression.comments && prevSibling.expression.comments.find(function (comment) { + return comment.value.trim() === "prettier-ignore"; + }); +} +/** + * The following is the shared logic for + * ternary operators, namely ConditionalExpression + * and TSConditionalType + * @typedef {Object} OperatorOptions + * @property {() => Array} beforeParts - Parts to print before the `?`. + * @property {(breakClosingParen: boolean) => Array} afterParts - Parts to print after the conditional expression. + * @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode. + * @property {string} conditionalNodeType - The type of the conditional expression node, ie "ConditionalExpression" or "TSConditionalType". + * @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg "consequent". + * @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg "alternate". + * @property {string} testNodePropertyName - The property at which the test node can be found on the main node, eg "test". + * @property {boolean} breakNested - Whether to break all nested ternaries when one breaks. + * @param {FastPath} path - The path to the ConditionalExpression/TSConditionalType node. + * @param {Options} options - Prettier options + * @param {Function} print - Print function to call recursively + * @param {OperatorOptions} operatorOptions + * @returns Doc + */ + + +function printTernaryOperator(path, options, print, operatorOptions) { + var node = path.getValue(); + var testNode = node[operatorOptions.testNodePropertyName]; + var consequentNode = node[operatorOptions.consequentNodePropertyName]; + var alternateNode = node[operatorOptions.alternateNodePropertyName]; + var parts = []; // We print a ConditionalExpression in either "JSX mode" or "normal mode". + // See tests/jsx/conditional-expression.js for more info. + + var jsxMode = false; + var parent = path.getParentNode(); + var forceNoIndent = parent.type === operatorOptions.conditionalNodeType; // Find the outermost non-ConditionalExpression parent, and the outermost + // ConditionalExpression parent. We'll use these to determine if we should + // print in JSX mode. + + var currentParent; + var previousParent; + var i = 0; + + do { + previousParent = currentParent || node; + currentParent = path.getParentNode(i); + i++; + } while (currentParent && currentParent.type === operatorOptions.conditionalNodeType); + + var firstNonConditionalParent = currentParent || parent; + var lastConditionalParent = previousParent; + + if (operatorOptions.shouldCheckJsx && (isJSXNode(testNode) || isJSXNode(consequentNode) || isJSXNode(alternateNode) || conditionalExpressionChainContainsJSX(lastConditionalParent))) { + jsxMode = true; + forceNoIndent = true; // Even though they don't need parens, we wrap (almost) everything in + // parens when using ?: within JSX, because the parens are analogous to + // curly braces in an if statement. + + var wrap = function wrap(doc$$2) { + return concat$12([ifBreak$6("(", ""), indent$6(concat$12([softline$5, doc$$2])), softline$5, ifBreak$6(")", "")]); + }; // The only things we don't wrap are: + // * Nested conditional expressions in alternates + // * null + + + var isNull = function isNull(node) { + return node.type === "NullLiteral" || node.type === "Literal" && node.value === null; + }; + + parts.push(" ? ", isNull(consequentNode) ? path.call(print, operatorOptions.consequentNodePropertyName) : wrap(path.call(print, operatorOptions.consequentNodePropertyName)), " : ", alternateNode.type === operatorOptions.conditionalNodeType || isNull(alternateNode) ? path.call(print, operatorOptions.alternateNodePropertyName) : wrap(path.call(print, operatorOptions.alternateNodePropertyName))); + } else { + // normal mode + var part = concat$12([line$8, "? ", consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$6("", "(") : "", align$1(2, path.call(print, operatorOptions.consequentNodePropertyName)), consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$6("", ")") : "", line$8, ": ", alternateNode.type === operatorOptions.conditionalNodeType ? path.call(print, operatorOptions.alternateNodePropertyName) : align$1(2, path.call(print, operatorOptions.alternateNodePropertyName))]); + parts.push(parent.type !== operatorOptions.conditionalNodeType || parent[operatorOptions.alternateNodePropertyName] === node ? part : options.useTabs ? dedent$3(indent$6(part)) : align$1(Math.max(0, options.tabWidth - 2), part)); + } // We want a whole chain of ConditionalExpressions to all + // break if any of them break. That means we should only group around the + // outer-most ConditionalExpression. + + + var maybeGroup = function maybeGroup(doc$$2) { + return operatorOptions.breakNested ? parent === firstNonConditionalParent ? group$10(doc$$2) : doc$$2 : group$10(doc$$2); + }; // Break the closing paren to keep the chain right after it: + // (a + // ? b + // : c + // ).call() + + + var breakClosingParen = !jsxMode && (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && !parent.computed; + return maybeGroup(concat$12([].concat(function (testDoc) { + return ( + /** + * a + * ? b + * : multiline + * test + * node + * ^^ align(2) + * ? d + * : e + */ + parent.type === operatorOptions.conditionalNodeType && parent[operatorOptions.alternateNodePropertyName] === node ? align$1(2, testDoc) : testDoc + ); + }(concat$12(operatorOptions.beforeParts())), forceNoIndent ? concat$12(parts) : indent$6(concat$12(parts)), operatorOptions.afterParts(breakClosingParen)))); +} + +function getTypeScriptMappedTypeModifier(tokenNode, keyword) { + if (tokenNode.type === "TSPlusToken") { + return "+" + keyword; + } else if (tokenNode.type === "TSMinusToken") { + return "-" + keyword; + } + + return keyword; +} + +function printPathNoParens(path, options, print, args) { + var n = path.getValue(); + var semi = options.semi ? ";" : ""; + + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + var htmlBinding$$1 = printHtmlBinding(path, options, print); + + if (htmlBinding$$1) { + return htmlBinding$$1; + } + + var parts = []; + + switch (n.type) { + case "JsExpressionRoot": + return path.call(print, "node"); + + case "JsonRoot": + return concat$12([path.call(print, "node"), hardline$8]); + + case "File": + // Print @babel/parser's InterpreterDirective here so that + // leading comments on the `Program` node get printed after the hashbang. + if (n.program && n.program.interpreter) { + parts.push(path.call(function (programPath) { + return programPath.call(print, "interpreter"); + }, "program")); + } + + parts.push(path.call(print, "program")); + return concat$12(parts); + + case "Program": + // Babel 6 + if (n.directives) { + path.each(function (childPath) { + parts.push(print(childPath), semi, hardline$8); + + if (isNextLineEmpty$4(options.originalText, childPath.getValue(), options)) { + parts.push(hardline$8); + } + }, "directives"); + } + + parts.push(path.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body")); + parts.push(comments.printDanglingComments(path, options, + /* sameIndent */ + true)); // Only force a trailing newline if there were any contents. + + if (n.body.length || n.comments) { + parts.push(hardline$8); + } + + return concat$12(parts); + // Babel extension. + + case "EmptyStatement": + return ""; + + case "ExpressionStatement": + // Detect Flow-parsed directives + if (n.directive) { + return concat$12([nodeStr(n.expression, options, true), semi]); + } // Do not append semicolon after the only JSX element in a program + + + return concat$12([path.call(print, "expression"), isTheOnlyJSXElementInMarkdown(options, path) ? "" : semi]); + // Babel extension. + + case "ParenthesizedExpression": + return concat$12(["(", path.call(print, "expression"), ")"]); + + case "AssignmentExpression": + return printAssignment(n.left, path.call(print, "left"), concat$12([" ", n.operator]), n.right, path.call(print, "right"), options); + + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + { + var parent = path.getParentNode(); + var parentParent = path.getParentNode(1); + var isInsideParenthesis = n !== parent.body && (parent.type === "IfStatement" || parent.type === "WhileStatement" || parent.type === "DoWhileStatement"); + + var _parts = printBinaryishExpressions(path, print, options, + /* isNested */ + false, isInsideParenthesis); // if ( + // this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft + // ) { + // + // looks super weird, we want to break the children if the parent breaks + // + // if ( + // this.hasPlugin("dynamicImports") && + // this.lookahead().type === tt.parenLeft + // ) { + + + if (isInsideParenthesis) { + return concat$12(_parts); + } // Break between the parens in unaries or in a member expression, i.e. + // + // ( + // a && + // b && + // c + // ).call() + + + if (parent.type === "UnaryExpression" || (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && !parent.computed) { + return group$10(concat$12([indent$6(concat$12([softline$5, concat$12(_parts)])), softline$5])); + } // Avoid indenting sub-expressions in some cases where the first sub-expression is already + // indented accordingly. We should indent sub-expressions where the first case isn't indented. + + + var shouldNotIndent = parent.type === "ReturnStatement" || parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" || n.type !== "NGPipeExpression" && (parent.type === "NGRoot" && options.parser === "__ng_binding" || parent.type === "NGMicrosyntaxExpression" && parentParent.type === "NGMicrosyntax" && parentParent.body.length === 1) || n === parent.body && parent.type === "ArrowFunctionExpression" || n !== parent.body && parent.type === "ForStatement" || parent.type === "ConditionalExpression" && parentParent.type !== "ReturnStatement" && parentParent.type !== "CallExpression"; + var shouldIndentIfInlining = parent.type === "AssignmentExpression" || parent.type === "VariableDeclarator" || parent.type === "ClassProperty" || parent.type === "TSAbstractClassProperty" || parent.type === "ClassPrivateProperty" || parent.type === "ObjectProperty" || parent.type === "Property"; + var samePrecedenceSubExpression = isBinaryish(n.left) && shouldFlatten$1(n.operator, n.left.operator); + + if (shouldNotIndent || shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression || !shouldInlineLogicalExpression(n) && shouldIndentIfInlining) { + return group$10(concat$12(_parts)); + } + + if (_parts.length === 0) { + return ""; + } // If the right part is a JSX node, we include it in a separate group to + // prevent it breaking the whole chain, so we can print the expression like: + // + // foo && bar && ( + // + // + // + // ) + + + var hasJSX = isJSXNode(n.right); + var rest = concat$12(hasJSX ? _parts.slice(1, -1) : _parts.slice(1)); + var groupId = Symbol("logicalChain-" + ++uid); + var chain = group$10(concat$12([// Don't include the initial expression in the indentation + // level. The first item is guaranteed to be the first + // left-most expression. + _parts.length > 0 ? _parts[0] : "", indent$6(rest)]), { + id: groupId + }); + + if (!hasJSX) { + return chain; + } + + var jsxPart = getLast$4(_parts); + return group$10(concat$12([chain, ifBreak$6(indent$6(jsxPart), jsxPart, { + groupId: groupId + })])); + } + + case "AssignmentPattern": + return concat$12([path.call(print, "left"), " = ", path.call(print, "right")]); + + case "TSTypeAssertionExpression": + { + var shouldBreakAfterCast = !(n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression"); + var castGroup = group$10(concat$12(["<", indent$6(concat$12([softline$5, path.call(print, "typeAnnotation")])), softline$5, ">"])); + var exprContents = concat$12([ifBreak$6("("), indent$6(concat$12([softline$5, path.call(print, "expression")])), softline$5, ifBreak$6(")")]); + + if (shouldBreakAfterCast) { + return conditionalGroup$1([concat$12([castGroup, path.call(print, "expression")]), concat$12([castGroup, group$10(exprContents, { + shouldBreak: true + })]), concat$12([castGroup, path.call(print, "expression")])]); + } + + return group$10(concat$12([castGroup, path.call(print, "expression")])); + } + + case "OptionalMemberExpression": + case "MemberExpression": + { + var _parent = path.getParentNode(); + + var firstNonMemberParent; + var i = 0; + + do { + firstNonMemberParent = path.getParentNode(i); + i++; + } while (firstNonMemberParent && (firstNonMemberParent.type === "MemberExpression" || firstNonMemberParent.type === "OptionalMemberExpression" || firstNonMemberParent.type === "TSNonNullExpression")); + + var shouldInline = firstNonMemberParent && (firstNonMemberParent.type === "NewExpression" || firstNonMemberParent.type === "BindExpression" || firstNonMemberParent.type === "VariableDeclarator" && firstNonMemberParent.id.type !== "Identifier" || firstNonMemberParent.type === "AssignmentExpression" && firstNonMemberParent.left.type !== "Identifier") || n.computed || n.object.type === "Identifier" && n.property.type === "Identifier" && _parent.type !== "MemberExpression" && _parent.type !== "OptionalMemberExpression"; + return concat$12([path.call(print, "object"), shouldInline ? printMemberLookup(path, options, print) : group$10(indent$6(concat$12([softline$5, printMemberLookup(path, options, print)])))]); + } + + case "MetaProperty": + return concat$12([path.call(print, "meta"), ".", path.call(print, "property")]); + + case "BindExpression": + if (n.object) { + parts.push(path.call(print, "object")); + } + + parts.push(group$10(indent$6(concat$12([softline$5, printBindExpressionCallee(path, options, print)])))); + return concat$12(parts); + + case "Identifier": + { + return concat$12([n.name, printOptionalToken(path), printTypeAnnotation(path, options, print)]); + } + + case "SpreadElement": + case "SpreadElementPattern": + case "RestProperty": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + case "ObjectTypeSpreadProperty": + return concat$12(["...", path.call(print, "argument"), printTypeAnnotation(path, options, print)]); + + case "FunctionDeclaration": + case "FunctionExpression": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(printFunctionDeclaration(path, print, options)); + + if (!n.body) { + parts.push(semi); + } + + return concat$12(parts); + + case "ArrowFunctionExpression": + { + if (n.async) { + parts.push("async "); + } + + if (shouldPrintParamsWithoutParens(path, options)) { + parts.push(path.call(print, "params", 0)); + } else { + parts.push(group$10(concat$12([printFunctionParams(path, print, options, + /* expandLast */ + args && (args.expandLastArg || args.expandFirstArg), + /* printTypeParams */ + true), printReturnType(path, print, options)]))); + } + + var dangling = comments.printDanglingComments(path, options, + /* sameIndent */ + true, function (comment) { + var nextCharacter = getNextNonSpaceNonCommentCharacterIndex$2(options.originalText, comment, options); + return options.originalText.substr(nextCharacter, 2) === "=>"; + }); + + if (dangling) { + parts.push(" ", dangling); + } + + parts.push(" =>"); + var body = path.call(function (bodyPath) { + return print(bodyPath, args); + }, "body"); // We want to always keep these types of nodes on the same line + // as the arrow. + + if (!hasLeadingOwnLineComment(options.originalText, n.body, options) && (n.body.type === "ArrayExpression" || n.body.type === "ObjectExpression" || n.body.type === "BlockStatement" || isJSXNode(n.body) || isTemplateOnItsOwnLine(n.body, options.originalText, options) || n.body.type === "ArrowFunctionExpression" || n.body.type === "DoExpression")) { + return group$10(concat$12([concat$12(parts), " ", body])); + } // We handle sequence expressions as the body of arrows specially, + // so that the required parentheses end up on their own lines. + + + if (n.body.type === "SequenceExpression") { + return group$10(concat$12([concat$12(parts), group$10(concat$12([" (", indent$6(concat$12([softline$5, body])), softline$5, ")"]))])); + } // if the arrow function is expanded as last argument, we are adding a + // level of indentation and need to add a softline to align the closing ) + // with the opening (, or if it's inside a JSXExpression (e.g. an attribute) + // we should align the expression's closing } with the line with the opening {. + + + var shouldAddSoftLine = (args && args.expandLastArg || path.getParentNode().type === "JSXExpressionContainer") && !(n.comments && n.comments.length); + var printTrailingComma = args && args.expandLastArg && shouldPrintComma$1(options, "all"); // In order to avoid confusion between + // a => a ? a : a + // a <= a ? a : a + + var shouldAddParens = n.body.type === "ConditionalExpression" && !startsWithNoLookaheadToken$1(n.body, + /* forbidFunctionAndClass */ + false); + return group$10(concat$12([concat$12(parts), group$10(concat$12([indent$6(concat$12([line$8, shouldAddParens ? ifBreak$6("", "(") : "", body, shouldAddParens ? ifBreak$6("", ")") : ""])), shouldAddSoftLine ? concat$12([ifBreak$6(printTrailingComma ? "," : ""), softline$5]) : ""]))])); + } + + case "MethodDefinition": + case "TSAbstractMethodDefinition": + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.type === "TSAbstractMethodDefinition") { + parts.push("abstract "); + } + + parts.push(printMethod(path, options, print)); + return concat$12(parts); + + case "YieldExpression": + parts.push("yield"); + + if (n.delegate) { + parts.push("*"); + } + + if (n.argument) { + parts.push(" ", path.call(print, "argument")); + } + + return concat$12(parts); + + case "AwaitExpression": + return concat$12(["await ", path.call(print, "argument")]); + + case "ImportSpecifier": + if (n.importKind) { + parts.push(path.call(print, "importKind"), " "); + } + + parts.push(path.call(print, "imported")); + + if (n.local && n.local.name !== n.imported.name) { + parts.push(" as ", path.call(print, "local")); + } + + return concat$12(parts); + + case "ExportSpecifier": + parts.push(path.call(print, "local")); + + if (n.exported && n.exported.name !== n.local.name) { + parts.push(" as ", path.call(print, "exported")); + } + + return concat$12(parts); + + case "ImportNamespaceSpecifier": + parts.push("* as "); + + if (n.local) { + parts.push(path.call(print, "local")); + } else if (n.id) { + parts.push(path.call(print, "id")); + } + + return concat$12(parts); + + case "ImportDefaultSpecifier": + if (n.local) { + return path.call(print, "local"); + } + + return path.call(print, "id"); + + case "TSExportAssignment": + return concat$12(["export = ", path.call(print, "expression"), semi]); + + case "ExportDefaultDeclaration": + case "ExportNamedDeclaration": + return printExportDeclaration(path, options, print); + + case "ExportAllDeclaration": + parts.push("export "); + + if (n.exportKind === "type") { + parts.push("type "); + } + + parts.push("* from ", path.call(print, "source"), semi); + return concat$12(parts); + + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return path.call(print, "exported"); + + case "ImportDeclaration": + { + parts.push("import "); + + if (n.importKind && n.importKind !== "value") { + parts.push(n.importKind + " "); + } + + var standalones = []; + var grouped = []; + + if (n.specifiers && n.specifiers.length > 0) { + path.each(function (specifierPath) { + var value = specifierPath.getValue(); + + if (value.type === "ImportDefaultSpecifier" || value.type === "ImportNamespaceSpecifier") { + standalones.push(print(specifierPath)); + } else { + grouped.push(print(specifierPath)); + } + }, "specifiers"); + + if (standalones.length > 0) { + parts.push(join$7(", ", standalones)); + } + + if (standalones.length > 0 && grouped.length > 0) { + parts.push(", "); + } + + if (grouped.length === 1 && standalones.length === 0 && n.specifiers && !n.specifiers.some(function (node) { + return node.comments; + })) { + parts.push(concat$12(["{", options.bracketSpacing ? " " : "", concat$12(grouped), options.bracketSpacing ? " " : "", "}"])); + } else if (grouped.length >= 1) { + parts.push(group$10(concat$12(["{", indent$6(concat$12([options.bracketSpacing ? line$8 : softline$5, join$7(concat$12([",", line$8]), grouped)])), ifBreak$6(shouldPrintComma$1(options) ? "," : ""), options.bracketSpacing ? line$8 : softline$5, "}"]))); + } + + parts.push(" from "); + } else if (n.importKind && n.importKind === "type" || // import {} from 'x' + /{\s*}/.test(options.originalText.slice(options.locStart(n), options.locStart(n.source)))) { + parts.push("{} from "); + } + + parts.push(path.call(print, "source"), semi); + return concat$12(parts); + } + + case "Import": + return "import"; + + case "BlockStatement": + { + var naked = path.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); + var hasContent = n.body.find(function (node) { + return node.type !== "EmptyStatement"; + }); + var hasDirectives = n.directives && n.directives.length > 0; + + var _parent2 = path.getParentNode(); + + var _parentParent = path.getParentNode(1); + + if (!hasContent && !hasDirectives && !hasDanglingComments(n) && (_parent2.type === "ArrowFunctionExpression" || _parent2.type === "FunctionExpression" || _parent2.type === "FunctionDeclaration" || _parent2.type === "ObjectMethod" || _parent2.type === "ClassMethod" || _parent2.type === "ForStatement" || _parent2.type === "WhileStatement" || _parent2.type === "DoWhileStatement" || _parent2.type === "DoExpression" || _parent2.type === "CatchClause" && !_parentParent.finalizer)) { + return "{}"; + } + + parts.push("{"); // Babel 6 + + if (hasDirectives) { + path.each(function (childPath) { + parts.push(indent$6(concat$12([hardline$8, print(childPath), semi]))); + + if (isNextLineEmpty$4(options.originalText, childPath.getValue(), options)) { + parts.push(hardline$8); + } + }, "directives"); + } + + if (hasContent) { + parts.push(indent$6(concat$12([hardline$8, naked]))); + } + + parts.push(comments.printDanglingComments(path, options)); + parts.push(hardline$8, "}"); + return concat$12(parts); + } + + case "ReturnStatement": + parts.push("return"); + + if (n.argument) { + if (returnArgumentHasLeadingComment(options, n.argument)) { + parts.push(concat$12([" (", indent$6(concat$12([hardline$8, path.call(print, "argument")])), hardline$8, ")"])); + } else if (n.argument.type === "LogicalExpression" || n.argument.type === "BinaryExpression" || n.argument.type === "SequenceExpression") { + parts.push(group$10(concat$12([ifBreak$6(" (", " "), indent$6(concat$12([softline$5, path.call(print, "argument")])), softline$5, ifBreak$6(")")]))); + } else { + parts.push(" ", path.call(print, "argument")); + } + } + + if (hasDanglingComments(n)) { + parts.push(" ", comments.printDanglingComments(path, options, + /* sameIndent */ + true)); + } + + parts.push(semi); + return concat$12(parts); + + case "NewExpression": + case "OptionalCallExpression": + case "CallExpression": + { + var isNew = n.type === "NewExpression"; + var optional = printOptionalToken(path); + + if ( // We want to keep CommonJS- and AMD-style require calls, and AMD-style + // define calls, as a unit. + // e.g. `define(["some/lib", (lib) => {` + !isNew && n.callee.type === "Identifier" && (n.callee.name === "require" || n.callee.name === "define") || n.callee.type === "Import" || // Template literals as single arguments + n.arguments.length === 1 && isTemplateOnItsOwnLine(n.arguments[0], options.originalText, options) || // Keep test declarations on a single line + // e.g. `it('long name', () => {` + !isNew && isTestCall(n, path.getParentNode())) { + return concat$12([isNew ? "new " : "", path.call(print, "callee"), optional, printFunctionTypeParameters(path, options, print), concat$12(["(", join$7(", ", path.map(print, "arguments")), ")"])]); + } // Inline Flow annotation comments following Identifiers in Call nodes need to + // stay with the Identifier. For example: + // + // foo /*:: */(bar); + // + // Here, we ensure that such comments stay between the Identifier and the Callee. + + + var isIdentifierWithFlowAnnotation = n.callee.type === "Identifier" && hasFlowAnnotationComment(n.callee.trailingComments); + + if (isIdentifierWithFlowAnnotation) { + n.callee.trailingComments[0].printed = true; + } // We detect calls on member lookups and possibly print them in a + // special chain format. See `printMemberChain` for more info. + + + if (!isNew && isMemberish(n.callee)) { + return printMemberChain(path, options, print); + } + + return concat$12([isNew ? "new " : "", path.call(print, "callee"), optional, isIdentifierWithFlowAnnotation ? "/*:: ".concat(n.callee.trailingComments[0].value.substring(2).trim(), " */") : "", printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]); + } + + case "TSInterfaceDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(n.abstract ? "abstract " : "", printTypeScriptModifiers(path, options, print), "interface ", path.call(print, "id"), n.typeParameters ? path.call(print, "typeParameters") : "", " "); + + if (n.heritage.length) { + parts.push(group$10(indent$6(concat$12([softline$5, "extends ", (n.heritage.length === 1 ? identity$1 : indent$6)(join$7(concat$12([",", line$8]), path.map(print, "heritage"))), " "])))); + } + + parts.push(path.call(print, "body")); + return concat$12(parts); + + case "ObjectTypeInternalSlot": + return concat$12([n.static ? "static " : "", "[[", path.call(print, "id"), "]]", printOptionalToken(path), n.method ? "" : ": ", path.call(print, "value")]); + + case "ObjectExpression": + case "ObjectPattern": + case "ObjectTypeAnnotation": + case "TSInterfaceBody": + case "TSTypeLiteral": + { + var propertiesField; + + if (n.type === "TSTypeLiteral") { + propertiesField = "members"; + } else if (n.type === "TSInterfaceBody") { + propertiesField = "body"; + } else { + propertiesField = "properties"; + } + + var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; + var fields = []; + + if (isTypeAnnotation) { + fields.push("indexers", "callProperties", "internalSlots"); + } + + fields.push(propertiesField); + var firstProperty = fields.map(function (field) { + return n[field][0]; + }).sort(function (a, b) { + return options.locStart(a) - options.locStart(b); + })[0]; + + var _parent3 = path.getParentNode(0); + + var isFlowInterfaceLikeBody = isTypeAnnotation && _parent3 && (_parent3.type === "InterfaceDeclaration" || _parent3.type === "DeclareInterface" || _parent3.type === "DeclareClass") && path.getName() === "body"; + var shouldBreak = n.type === "TSInterfaceBody" || isFlowInterfaceLikeBody || n.type === "ObjectPattern" && _parent3.type !== "FunctionDeclaration" && _parent3.type !== "FunctionExpression" && _parent3.type !== "ArrowFunctionExpression" && _parent3.type !== "AssignmentPattern" && _parent3.type !== "CatchClause" && n.properties.some(function (property) { + return property.value && (property.value.type === "ObjectPattern" || property.value.type === "ArrayPattern"); + }) || n.type !== "ObjectPattern" && firstProperty && hasNewlineInRange$1(options.originalText, options.locStart(n), options.locStart(firstProperty)); + var separator = isFlowInterfaceLikeBody ? ";" : n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" ? ifBreak$6(semi, ";") : ","; + var leftBrace = n.exact ? "{|" : "{"; + var rightBrace = n.exact ? "|}" : "}"; // Unfortunately, things are grouped together in the ast can be + // interleaved in the source code. So we need to reorder them before + // printing them. + + var propsAndLoc = []; + fields.forEach(function (field) { + path.each(function (childPath) { + var node = childPath.getValue(); + propsAndLoc.push({ + node: node, + printed: print(childPath), + loc: options.locStart(node) + }); + }, field); + }); + var separatorParts = []; + var props = propsAndLoc.sort(function (a, b) { + return a.loc - b.loc; + }).map(function (prop) { + var result = concat$12(separatorParts.concat(group$10(prop.printed))); + separatorParts = [separator, line$8]; + + if ((prop.node.type === "TSPropertySignature" || prop.node.type === "TSMethodSignature") && hasNodeIgnoreComment$1(prop.node)) { + separatorParts.shift(); + } + + if (isNextLineEmpty$4(options.originalText, prop.node, options)) { + separatorParts.push(hardline$8); + } + + return result; + }); + + if (n.inexact) { + props.push(concat$12(separatorParts.concat(group$10("...")))); + } + + var lastElem = getLast$4(n[propertiesField]); + var canHaveTrailingSeparator = !(lastElem && (lastElem.type === "RestProperty" || lastElem.type === "RestElement" || hasNodeIgnoreComment$1(lastElem) || n.inexact)); + var content; + + if (props.length === 0 && !n.typeAnnotation) { + if (!hasDanglingComments(n)) { + return concat$12([leftBrace, rightBrace]); + } + + content = group$10(concat$12([leftBrace, comments.printDanglingComments(path, options), softline$5, rightBrace, printOptionalToken(path)])); + } else { + content = concat$12([leftBrace, indent$6(concat$12([options.bracketSpacing ? line$8 : softline$5, concat$12(props)])), ifBreak$6(canHaveTrailingSeparator && (separator !== "," || shouldPrintComma$1(options)) ? separator : ""), concat$12([options.bracketSpacing ? line$8 : softline$5, rightBrace]), printOptionalToken(path), printTypeAnnotation(path, options, print)]); + } // If we inline the object as first argument of the parent, we don't want + // to create another group so that the object breaks before the return + // type + + + var parentParentParent = path.getParentNode(2); + + if (n.type === "ObjectPattern" && _parent3 && shouldHugArguments(_parent3) && _parent3.params[0] === n || shouldHugType(n) && parentParentParent && shouldHugArguments(parentParentParent) && parentParentParent.params[0].typeAnnotation && parentParentParent.params[0].typeAnnotation.typeAnnotation === n) { + return content; + } + + return group$10(content, { + shouldBreak: shouldBreak + }); + } + // Babel 6 + + case "ObjectProperty": // Non-standard AST node type. + + case "Property": + if (n.method || n.kind === "get" || n.kind === "set") { + return printMethod(path, options, print); + } + + if (n.shorthand) { + parts.push(path.call(print, "value")); + } else { + var printedLeft; + + if (n.computed) { + printedLeft = concat$12(["[", path.call(print, "key"), "]"]); + } else { + printedLeft = printPropertyKey(path, options, print); + } + + parts.push(printAssignment(n.key, printedLeft, ":", n.value, path.call(print, "value"), options)); + } + + return concat$12(parts); + // Babel 6 + + case "ClassMethod": + if (n.decorators && n.decorators.length !== 0) { + parts.push(printDecorators(path, options, print)); + } + + if (n.static) { + parts.push("static "); + } + + parts = parts.concat(printObjectMethod(path, options, print)); + return concat$12(parts); + // Babel 6 + + case "ObjectMethod": + return printObjectMethod(path, options, print); + + case "Decorator": + return concat$12(["@", path.call(print, "expression"), path.call(print, "callee")]); + + case "ArrayExpression": + case "ArrayPattern": + if (n.elements.length === 0) { + if (!hasDanglingComments(n)) { + parts.push("[]"); + } else { + parts.push(group$10(concat$12(["[", comments.printDanglingComments(path, options), softline$5, "]"]))); + } + } else { + var _lastElem = getLast$4(n.elements); + + var canHaveTrailingComma = !(_lastElem && _lastElem.type === "RestElement"); // JavaScript allows you to have empty elements in an array which + // changes its length based on the number of commas. The algorithm + // is that if the last argument is null, we need to force insert + // a comma to ensure JavaScript recognizes it. + // [,].length === 1 + // [1,].length === 1 + // [1,,].length === 2 + // + // Note that getLast returns null if the array is empty, but + // we already check for an empty array just above so we are safe + + var needsForcedTrailingComma = canHaveTrailingComma && _lastElem === null; + parts.push(group$10(concat$12(["[", indent$6(concat$12([softline$5, printArrayItems(path, options, "elements", print)])), needsForcedTrailingComma ? "," : "", ifBreak$6(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma$1(options) ? "," : ""), comments.printDanglingComments(path, options, + /* sameIndent */ + true), softline$5, "]"]))); + } + + parts.push(printOptionalToken(path), printTypeAnnotation(path, options, print)); + return concat$12(parts); + + case "SequenceExpression": + { + var _parent4 = path.getParentNode(0); + + if (_parent4.type === "ExpressionStatement" || _parent4.type === "ForStatement") { + // For ExpressionStatements and for-loop heads, which are among + // the few places a SequenceExpression appears unparenthesized, we want + // to indent expressions after the first. + var _parts2 = []; + path.each(function (p) { + if (p.getName() === 0) { + _parts2.push(print(p)); + } else { + _parts2.push(",", indent$6(concat$12([line$8, print(p)]))); + } + }, "expressions"); + return group$10(concat$12(_parts2)); + } + + return group$10(concat$12([join$7(concat$12([",", line$8]), path.map(print, "expressions"))])); + } + + case "ThisExpression": + return "this"; + + case "Super": + return "super"; + + case "NullLiteral": + // Babel 6 Literal split + return "null"; + + case "RegExpLiteral": + // Babel 6 Literal split + return printRegex(n); + + case "NumericLiteral": + // Babel 6 Literal split + return printNumber$2(n.extra.raw); + + case "BigIntLiteral": + return concat$12([printNumber$2(n.extra.rawValue), "n"]); + + case "BooleanLiteral": // Babel 6 Literal split + + case "StringLiteral": // Babel 6 Literal split + + case "Literal": + { + if (n.regex) { + return printRegex(n.regex); + } + + if (typeof n.value === "number") { + return printNumber$2(n.raw); + } + + if (typeof n.value !== "string") { + return "" + n.value; + } // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2 + // See corresponding workaround in needs-parens.js + + + var grandParent = path.getParentNode(1); + var isTypeScriptDirective = options.parser === "typescript" && typeof n.value === "string" && grandParent && (grandParent.type === "Program" || grandParent.type === "BlockStatement"); + return nodeStr(n, options, isTypeScriptDirective); + } + + case "Directive": + return path.call(print, "value"); + // Babel 6 + + case "DirectiveLiteral": + return nodeStr(n, options); + + case "UnaryExpression": + parts.push(n.operator); + + if (/[a-z]$/.test(n.operator)) { + parts.push(" "); + } + + parts.push(path.call(print, "argument")); + return concat$12(parts); + + case "UpdateExpression": + parts.push(path.call(print, "argument"), n.operator); + + if (n.prefix) { + parts.reverse(); + } + + return concat$12(parts); + + case "ConditionalExpression": + return printTernaryOperator(path, options, print, { + beforeParts: function beforeParts() { + return [path.call(print, "test")]; + }, + afterParts: function afterParts(breakClosingParen) { + return [breakClosingParen ? softline$5 : ""]; + }, + shouldCheckJsx: true, + conditionalNodeType: "ConditionalExpression", + consequentNodePropertyName: "consequent", + alternateNodePropertyName: "alternate", + testNodePropertyName: "test", + breakNested: true + }); + + case "VariableDeclaration": + { + var printed = path.map(function (childPath) { + return print(childPath); + }, "declarations"); // We generally want to terminate all variable declarations with a + // semicolon, except when they in the () part of for loops. + + var parentNode = path.getParentNode(); + var isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement" || parentNode.type === "ForAwaitStatement"; + var hasValue = n.declarations.some(function (decl) { + return decl.init; + }); + var firstVariable; + + if (printed.length === 1 && !n.declarations[0].comments) { + firstVariable = printed[0]; + } else if (printed.length > 0) { + // Indent first var to comply with eslint one-var rule + firstVariable = indent$6(printed[0]); + } + + parts = [isNodeStartingWithDeclare(n, options) ? "declare " : "", n.kind, firstVariable ? concat$12([" ", firstVariable]) : "", indent$6(concat$12(printed.slice(1).map(function (p) { + return concat$12([",", hasValue && !isParentForLoop ? hardline$8 : line$8, p]); + })))]; + + if (!(isParentForLoop && parentNode.body !== n)) { + parts.push(semi); + } + + return group$10(concat$12(parts)); + } + + case "VariableDeclarator": + return printAssignment(n.id, concat$12([path.call(print, "id"), path.call(print, "typeParameters")]), " =", n.init, n.init && path.call(print, "init"), options); + + case "WithStatement": + return group$10(concat$12(["with (", path.call(print, "object"), ")", adjustClause(n.body, path.call(print, "body"))])); + + case "IfStatement": + { + var con = adjustClause(n.consequent, path.call(print, "consequent")); + var opening = group$10(concat$12(["if (", group$10(concat$12([indent$6(concat$12([softline$5, path.call(print, "test")])), softline$5])), ")", con])); + parts.push(opening); + + if (n.alternate) { + var commentOnOwnLine = hasTrailingComment(n.consequent) && n.consequent.comments.some(function (comment) { + return comment.trailing && !comments$3.isBlockComment(comment); + }) || needsHardlineAfterDanglingComment(n); + var elseOnSameLine = n.consequent.type === "BlockStatement" && !commentOnOwnLine; + parts.push(elseOnSameLine ? " " : hardline$8); + + if (hasDanglingComments(n)) { + parts.push(comments.printDanglingComments(path, options, true), commentOnOwnLine ? hardline$8 : " "); + } + + parts.push("else", group$10(adjustClause(n.alternate, path.call(print, "alternate"), n.alternate.type === "IfStatement"))); + } + + return concat$12(parts); + } + + case "ForStatement": + { + var _body = adjustClause(n.body, path.call(print, "body")); // We want to keep dangling comments above the loop to stay consistent. + // Any comment positioned between the for statement and the parentheses + // is going to be printed before the statement. + + + var _dangling = comments.printDanglingComments(path, options, + /* sameLine */ + true); + + var printedComments = _dangling ? concat$12([_dangling, softline$5]) : ""; + + if (!n.init && !n.test && !n.update) { + return concat$12([printedComments, group$10(concat$12(["for (;;)", _body]))]); + } + + return concat$12([printedComments, group$10(concat$12(["for (", group$10(concat$12([indent$6(concat$12([softline$5, path.call(print, "init"), ";", line$8, path.call(print, "test"), ";", line$8, path.call(print, "update")])), softline$5])), ")", _body]))]); + } + + case "WhileStatement": + return group$10(concat$12(["while (", group$10(concat$12([indent$6(concat$12([softline$5, path.call(print, "test")])), softline$5])), ")", adjustClause(n.body, path.call(print, "body"))])); + + case "ForInStatement": + // Note: esprima can't actually parse "for each (". + return group$10(concat$12([n.each ? "for each (" : "for (", path.call(print, "left"), " in ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))])); + + case "ForOfStatement": + case "ForAwaitStatement": + { + // Babylon 7 removed ForAwaitStatement in favor of ForOfStatement + // with `"await": true`: + // https://github.com/estree/estree/pull/138 + var isAwait = n.type === "ForAwaitStatement" || n.await; + return group$10(concat$12(["for", isAwait ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))])); + } + + case "DoWhileStatement": + { + var clause = adjustClause(n.body, path.call(print, "body")); + var doBody = group$10(concat$12(["do", clause])); + parts = [doBody]; + + if (n.body.type === "BlockStatement") { + parts.push(" "); + } else { + parts.push(hardline$8); + } + + parts.push("while ("); + parts.push(group$10(concat$12([indent$6(concat$12([softline$5, path.call(print, "test")])), softline$5])), ")", semi); + return concat$12(parts); + } + + case "DoExpression": + return concat$12(["do ", path.call(print, "body")]); + + case "BreakStatement": + parts.push("break"); + + if (n.label) { + parts.push(" ", path.call(print, "label")); + } + + parts.push(semi); + return concat$12(parts); + + case "ContinueStatement": + parts.push("continue"); + + if (n.label) { + parts.push(" ", path.call(print, "label")); + } + + parts.push(semi); + return concat$12(parts); + + case "LabeledStatement": + if (n.body.type === "EmptyStatement") { + return concat$12([path.call(print, "label"), ":;"]); + } + + return concat$12([path.call(print, "label"), ": ", path.call(print, "body")]); + + case "TryStatement": + return concat$12(["try ", path.call(print, "block"), n.handler ? concat$12([" ", path.call(print, "handler")]) : "", n.finalizer ? concat$12([" finally ", path.call(print, "finalizer")]) : ""]); + + case "CatchClause": + if (n.param) { + var hasComments = n.param.comments && n.param.comments.some(function (comment) { + return !comments$3.isBlockComment(comment) || comment.leading && hasNewline$3(options.originalText, options.locEnd(comment)) || comment.trailing && hasNewline$3(options.originalText, options.locStart(comment), { + backwards: true + }); + }); + var param = path.call(print, "param"); + return concat$12(["catch ", hasComments ? concat$12(["(", indent$6(concat$12([softline$5, param])), softline$5, ") "]) : concat$12(["(", param, ") "]), path.call(print, "body")]); + } + + return concat$12(["catch ", path.call(print, "body")]); + + case "ThrowStatement": + return concat$12(["throw ", path.call(print, "argument"), semi]); + // Note: ignoring n.lexical because it has no printing consequences. + + case "SwitchStatement": + return concat$12([group$10(concat$12(["switch (", indent$6(concat$12([softline$5, path.call(print, "discriminant")])), softline$5, ")"])), " {", n.cases.length > 0 ? indent$6(concat$12([hardline$8, join$7(hardline$8, path.map(function (casePath) { + var caseNode = casePath.getValue(); + return concat$12([casePath.call(print), n.cases.indexOf(caseNode) !== n.cases.length - 1 && isNextLineEmpty$4(options.originalText, caseNode, options) ? hardline$8 : ""]); + }, "cases"))])) : "", hardline$8, "}"]); + + case "SwitchCase": + { + if (n.test) { + parts.push("case ", path.call(print, "test"), ":"); + } else { + parts.push("default:"); + } + + var consequent = n.consequent.filter(function (node) { + return node.type !== "EmptyStatement"; + }); + + if (consequent.length > 0) { + var cons = path.call(function (consequentPath) { + return printStatementSequence(consequentPath, options, print); + }, "consequent"); + parts.push(consequent.length === 1 && consequent[0].type === "BlockStatement" ? concat$12([" ", cons]) : indent$6(concat$12([hardline$8, cons]))); + } + + return concat$12(parts); + } + // JSX extensions below. + + case "DebuggerStatement": + return concat$12(["debugger", semi]); + + case "JSXAttribute": + parts.push(path.call(print, "name")); + + if (n.value) { + var res; + + if (isStringLiteral(n.value)) { + var raw = rawText(n.value); // Unescape all quotes so we get an accurate preferred quote + + var final = raw.replace(/'/g, "'").replace(/"/g, '"'); + var quote = getPreferredQuote$1(final, options.jsxSingleQuote ? "'" : '"'); + + var _escape = quote === "'" ? "'" : """; + + final = final.slice(1, -1).replace(new RegExp(quote, "g"), _escape); + res = concat$12([quote, final, quote]); + } else { + res = path.call(print, "value"); + } + + parts.push("=", res); + } + + return concat$12(parts); + + case "JSXIdentifier": + return "" + n.name; + + case "JSXNamespacedName": + return join$7(":", [path.call(print, "namespace"), path.call(print, "name")]); + + case "JSXMemberExpression": + return join$7(".", [path.call(print, "object"), path.call(print, "property")]); + + case "TSQualifiedName": + return join$7(".", [path.call(print, "left"), path.call(print, "right")]); + + case "JSXSpreadAttribute": + case "JSXSpreadChild": + { + return concat$12(["{", path.call(function (p) { + var printed = concat$12(["...", print(p)]); + var n = p.getValue(); + + if (!n.comments || !n.comments.length) { + return printed; + } + + return concat$12([indent$6(concat$12([softline$5, comments.printComments(p, function () { + return printed; + }, options)])), softline$5]); + }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"]); + } + + case "JSXExpressionContainer": + { + var _parent5 = path.getParentNode(0); + + var preventInline = _parent5.type === "JSXAttribute" && n.expression.comments && n.expression.comments.length > 0; + + var _shouldInline = !preventInline && (n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "OptionalCallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "JSXEmptyExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode(_parent5) && (n.expression.type === "ConditionalExpression" || isBinaryish(n.expression))); + + if (_shouldInline) { + return group$10(concat$12(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"])); + } + + return group$10(concat$12(["{", indent$6(concat$12([softline$5, path.call(print, "expression")])), softline$5, lineSuffixBoundary$1, "}"])); + } + + case "JSXFragment": + case "TSJsxFragment": + case "JSXElement": + { + var elem = comments.printComments(path, function () { + return printJSXElement(path, options, print); + }, options); + return maybeWrapJSXElementInParens(path, elem); + } + + case "JSXOpeningElement": + { + var _n = path.getValue(); + + var nameHasComments = _n.name && _n.name.comments && _n.name.comments.length > 0; // Don't break self-closing elements with no attributes and no comments + + if (_n.selfClosing && !_n.attributes.length && !nameHasComments) { + return concat$12(["<", path.call(print, "name"), path.call(print, "typeParameters"), " />"]); + } // don't break up opening elements with a single long text attribute + + + if (_n.attributes && _n.attributes.length === 1 && _n.attributes[0].value && isStringLiteral(_n.attributes[0].value) && !_n.attributes[0].value.value.includes("\n") && // We should break for the following cases: + //
      + //
      + !nameHasComments && (!_n.attributes[0].comments || !_n.attributes[0].comments.length)) { + return group$10(concat$12(["<", path.call(print, "name"), path.call(print, "typeParameters"), " ", concat$12(path.map(print, "attributes")), _n.selfClosing ? " />" : ">"])); + } + + var lastAttrHasTrailingComments = _n.attributes.length && hasTrailingComment(getLast$4(_n.attributes)); + var bracketSameLine = // Simple tags (no attributes and no comment in tag name) should be + // kept unbroken regardless of `jsxBracketSameLine` + !_n.attributes.length && !nameHasComments || options.jsxBracketSameLine && ( // We should print the bracket in a new line for the following cases: + //
      + //
      + !nameHasComments || _n.attributes.length) && !lastAttrHasTrailingComments; // We should print the opening element expanded if any prop value is a + // string literal with newlines + + var _shouldBreak = _n.attributes && _n.attributes.some(function (attr) { + return attr.value && isStringLiteral(attr.value) && attr.value.value.includes("\n"); + }); + + return group$10(concat$12(["<", path.call(print, "name"), path.call(print, "typeParameters"), concat$12([indent$6(concat$12(path.map(function (attr) { + return concat$12([line$8, print(attr)]); + }, "attributes"))), _n.selfClosing ? line$8 : bracketSameLine ? ">" : softline$5]), _n.selfClosing ? "/>" : bracketSameLine ? "" : ">"]), { + shouldBreak: _shouldBreak + }); + } + + case "JSXClosingElement": + return concat$12([""]); + + case "JSXOpeningFragment": + case "JSXClosingFragment": + case "TSJsxOpeningFragment": + case "TSJsxClosingFragment": + { + var hasComment = n.comments && n.comments.length; + var hasOwnLineComment = hasComment && !n.comments.every(comments$3.isBlockComment); + var isOpeningFragment = n.type === "JSXOpeningFragment" || n.type === "TSJsxOpeningFragment"; + return concat$12([isOpeningFragment ? "<" : ""]); + } + + case "JSXText": + /* istanbul ignore next */ + throw new Error("JSXTest should be handled by JSXElement"); + + case "JSXEmptyExpression": + { + var requiresHardline = n.comments && !n.comments.every(comments$3.isBlockComment); + return concat$12([comments.printDanglingComments(path, options, + /* sameIndent */ + !requiresHardline), requiresHardline ? hardline$8 : ""]); + } + + case "ClassBody": + if (!n.comments && n.body.length === 0) { + return "{}"; + } + + return concat$12(["{", n.body.length > 0 ? indent$6(concat$12([hardline$8, path.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body")])) : comments.printDanglingComments(path, options), hardline$8, "}"]); + + case "ClassProperty": + case "TSAbstractClassProperty": + case "ClassPrivateProperty": + { + if (n.decorators && n.decorators.length !== 0) { + parts.push(printDecorators(path, options, print)); + } + + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.type === "TSAbstractClassProperty") { + parts.push("abstract "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + var variance = getFlowVariance(n); + + if (variance) { + parts.push(variance); + } + + if (n.computed) { + parts.push("[", path.call(print, "key"), "]"); + } else { + parts.push(printPropertyKey(path, options, print)); + } + + parts.push(printOptionalToken(path)); + parts.push(printTypeAnnotation(path, options, print)); + + if (n.value) { + parts.push(" =", printAssignmentRight(n.key, n.value, path.call(print, "value"), options)); + } + + parts.push(semi); + return group$10(concat$12(parts)); + } + + case "ClassDeclaration": + case "ClassExpression": + case "TSAbstractClassDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push(concat$12(printClass(path, options, print))); + return concat$12(parts); + + case "TSInterfaceHeritage": + parts.push(path.call(print, "id")); + + if (n.typeParameters) { + parts.push(path.call(print, "typeParameters")); + } + + return concat$12(parts); + + case "TemplateElement": + return join$7(literalline$3, n.value.raw.split(/\r?\n/g)); + + case "TemplateLiteral": + { + var expressions = path.map(print, "expressions"); + + var _parentNode = path.getParentNode(); + /** + * describe.each`table`(name, fn) + * describe.only.each`table`(name, fn) + * describe.skip.each`table`(name, fn) + * test.each`table`(name, fn) + * test.only.each`table`(name, fn) + * test.skip.each`table`(name, fn) + * + * Ref: https://github.com/facebook/jest/pull/6102 + */ + + + var jestEachTriggerRegex = /^[xf]?(describe|it|test)$/; + + if (_parentNode.type === "TaggedTemplateExpression" && _parentNode.quasi === n && _parentNode.tag.type === "MemberExpression" && _parentNode.tag.property.type === "Identifier" && _parentNode.tag.property.name === "each" && (_parentNode.tag.object.type === "Identifier" && jestEachTriggerRegex.test(_parentNode.tag.object.name) || _parentNode.tag.object.type === "MemberExpression" && _parentNode.tag.object.property.type === "Identifier" && (_parentNode.tag.object.property.name === "only" || _parentNode.tag.object.property.name === "skip") && _parentNode.tag.object.object.type === "Identifier" && jestEachTriggerRegex.test(_parentNode.tag.object.object.name))) { + /** + * a | b | expected + * ${1} | ${1} | ${2} + * ${1} | ${2} | ${3} + * ${2} | ${1} | ${3} + */ + var headerNames = n.quasis[0].value.raw.trim().split(/\s*\|\s*/); + + if (headerNames.length > 1 || headerNames.some(function (headerName) { + return headerName.length !== 0; + })) { + var stringifiedExpressions = expressions.map(function (doc$$2) { + return "${" + printDocToString$1(doc$$2, Object.assign({}, options, { + printWidth: Infinity + })).formatted + "}"; + }); + var tableBody = [{ + hasLineBreak: false, + cells: [] + }]; + + for (var _i = 1; _i < n.quasis.length; _i++) { + var row = tableBody[tableBody.length - 1]; + var correspondingExpression = stringifiedExpressions[_i - 1]; + row.cells.push(correspondingExpression); + + if (correspondingExpression.indexOf("\n") !== -1) { + row.hasLineBreak = true; + } + + if (n.quasis[_i].value.raw.indexOf("\n") !== -1) { + tableBody.push({ + hasLineBreak: false, + cells: [] + }); + } + } + + var maxColumnCount = tableBody.reduce(function (maxColumnCount, row) { + return Math.max(maxColumnCount, row.cells.length); + }, headerNames.length); + var maxColumnWidths = Array.from(new Array(maxColumnCount), function () { + return 0; + }); + var table = [{ + cells: headerNames + }].concat(tableBody.filter(function (row) { + return row.cells.length !== 0; + })); + table.filter(function (row) { + return !row.hasLineBreak; + }).forEach(function (row) { + row.cells.forEach(function (cell, index) { + maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth$2(cell)); + }); + }); + parts.push("`", indent$6(concat$12([hardline$8, join$7(hardline$8, table.map(function (row) { + return join$7(" | ", row.cells.map(function (cell, index) { + return row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth$2(cell)); + })); + }))])), hardline$8, "`"); + return concat$12(parts); + } + } + + parts.push("`"); + path.each(function (childPath) { + var i = childPath.getName(); + parts.push(print(childPath)); + + if (i < expressions.length) { + // For a template literal of the following form: + // `someQuery { + // ${call({ + // a, + // b, + // })} + // }` + // the expression is on its own line (there is a \n in the previous + // quasi literal), therefore we want to indent the JavaScript + // expression inside at the beginning of ${ instead of the beginning + // of the `. + var tabWidth = options.tabWidth; + var indentSize = getIndentSize$1(childPath.getValue().value.raw, tabWidth); + var _printed = expressions[i]; + + if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression") { + _printed = concat$12([indent$6(concat$12([softline$5, _printed])), softline$5]); + } + + var aligned = addAlignmentToDoc$2(_printed, indentSize, tabWidth); + parts.push(group$10(concat$12(["${", aligned, lineSuffixBoundary$1, "}"]))); + } + }, "quasis"); + parts.push("`"); + return concat$12(parts); + } + // These types are unprintable because they serve as abstract + // supertypes for other (printable) types. + + case "TaggedTemplateExpression": + return concat$12([path.call(print, "tag"), path.call(print, "typeParameters"), path.call(print, "quasi")]); + + case "Node": + case "Printable": + case "SourceLocation": + case "Position": + case "Statement": + case "Function": + case "Pattern": + case "Expression": + case "Declaration": + case "Specifier": + case "NamedSpecifier": + case "Comment": + case "MemberTypeAnnotation": // Flow + + case "Type": + /* istanbul ignore next */ + throw new Error("unprintable type: " + JSON.stringify(n.type)); + // Type Annotations for Facebook Flow, typically stripped out or + // transformed away before printing. + + case "TypeAnnotation": + case "TSTypeAnnotation": + if (n.typeAnnotation) { + return path.call(print, "typeAnnotation"); + } + /* istanbul ignore next */ + + + return ""; + + case "TSTupleType": + case "TupleTypeAnnotation": + { + var typesField = n.type === "TSTupleType" ? "elementTypes" : "types"; + return group$10(concat$12(["[", indent$6(concat$12([softline$5, printArrayItems(path, options, typesField, print)])), // TypeScript doesn't support trailing commas in tuple types + n.type === "TSTupleType" ? "" : ifBreak$6(shouldPrintComma$1(options) ? "," : ""), comments.printDanglingComments(path, options, + /* sameIndent */ + true), softline$5, "]"])); + } + + case "ExistsTypeAnnotation": + return "*"; + + case "EmptyTypeAnnotation": + return "empty"; + + case "AnyTypeAnnotation": + return "any"; + + case "MixedTypeAnnotation": + return "mixed"; + + case "ArrayTypeAnnotation": + return concat$12([path.call(print, "elementType"), "[]"]); + + case "BooleanTypeAnnotation": + return "boolean"; + + case "BooleanLiteralTypeAnnotation": + return "" + n.value; + + case "DeclareClass": + return printFlowDeclaration(path, printClass(path, options, print)); + + case "DeclareFunction": + // For TypeScript the DeclareFunction node shares the AST + // structure with FunctionDeclaration + if (n.params) { + return concat$12(["declare ", printFunctionDeclaration(path, print, options), semi]); + } + + return printFlowDeclaration(path, ["function ", path.call(print, "id"), n.predicate ? " " : "", path.call(print, "predicate"), semi]); + + case "DeclareModule": + return printFlowDeclaration(path, ["module ", path.call(print, "id"), " ", path.call(print, "body")]); + + case "DeclareModuleExports": + return printFlowDeclaration(path, ["module.exports", ": ", path.call(print, "typeAnnotation"), semi]); + + case "DeclareVariable": + return printFlowDeclaration(path, ["var ", path.call(print, "id"), semi]); + + case "DeclareExportAllDeclaration": + return concat$12(["declare export * from ", path.call(print, "source")]); + + case "DeclareExportDeclaration": + return concat$12(["declare ", printExportDeclaration(path, options, print)]); + + case "DeclareOpaqueType": + case "OpaqueType": + { + parts.push("opaque type ", path.call(print, "id"), path.call(print, "typeParameters")); + + if (n.supertype) { + parts.push(": ", path.call(print, "supertype")); + } + + if (n.impltype) { + parts.push(" = ", path.call(print, "impltype")); + } + + parts.push(semi); + + if (n.type === "DeclareOpaqueType") { + return printFlowDeclaration(path, parts); + } + + return concat$12(parts); + } + + case "FunctionTypeAnnotation": + case "TSFunctionType": + { + // FunctionTypeAnnotation is ambiguous: + // declare function foo(a: B): void; OR + // var A: (a: B) => void; + var _parent6 = path.getParentNode(0); + + var _parentParent2 = path.getParentNode(1); + + var _parentParentParent = path.getParentNode(2); + + var isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !((_parent6.type === "ObjectTypeProperty" || _parent6.type === "ObjectTypeInternalSlot") && !getFlowVariance(_parent6) && !_parent6.optional && options.locStart(_parent6) === options.locStart(n) || _parent6.type === "ObjectTypeCallProperty" || _parentParentParent && _parentParentParent.type === "DeclareFunction"); + var needsColon = isArrowFunctionTypeAnnotation && (_parent6.type === "TypeAnnotation" || _parent6.type === "TSTypeAnnotation"); // Sadly we can't put it inside of FastPath::needsColon because we are + // printing ":" as part of the expression and it would put parenthesis + // around :( + + var needsParens = needsColon && isArrowFunctionTypeAnnotation && (_parent6.type === "TypeAnnotation" || _parent6.type === "TSTypeAnnotation") && _parentParent2.type === "ArrowFunctionExpression"; + + if (isObjectTypePropertyAFunction(_parent6, options)) { + isArrowFunctionTypeAnnotation = true; + needsColon = true; + } + + if (needsParens) { + parts.push("("); + } + + parts.push(printFunctionParams(path, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true)); // The returnType is not wrapped in a TypeAnnotation, so the colon + // needs to be added separately. + + if (n.returnType || n.predicate || n.typeAnnotation) { + parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path.call(print, "returnType"), path.call(print, "predicate"), path.call(print, "typeAnnotation")); + } + + if (needsParens) { + parts.push(")"); + } + + return group$10(concat$12(parts)); + } + + case "TSRestType": + return concat$12(["...", path.call(print, "typeAnnotation")]); + + case "TSOptionalType": + return concat$12([path.call(print, "typeAnnotation"), "?"]); + + case "FunctionTypeParam": + return concat$12([path.call(print, "name"), printOptionalToken(path), n.name ? ": " : "", path.call(print, "typeAnnotation")]); + + case "GenericTypeAnnotation": + return concat$12([path.call(print, "id"), path.call(print, "typeParameters")]); + + case "DeclareInterface": + case "InterfaceDeclaration": + case "InterfaceTypeAnnotation": + { + if (n.type === "DeclareInterface" || isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + parts.push("interface"); + + if (n.type === "DeclareInterface" || n.type === "InterfaceDeclaration") { + parts.push(" ", path.call(print, "id"), path.call(print, "typeParameters")); + } + + if (n["extends"].length > 0) { + parts.push(group$10(indent$6(concat$12([line$8, "extends ", (n.extends.length === 1 ? identity$1 : indent$6)(join$7(concat$12([",", line$8]), path.map(print, "extends")))])))); + } + + parts.push(" ", path.call(print, "body")); + return group$10(concat$12(parts)); + } + + case "ClassImplements": + case "InterfaceExtends": + return concat$12([path.call(print, "id"), path.call(print, "typeParameters")]); + + case "TSIntersectionType": + case "IntersectionTypeAnnotation": + { + var types = path.map(print, "types"); + var result = []; + var wasIndented = false; + + for (var _i2 = 0; _i2 < types.length; ++_i2) { + if (_i2 === 0) { + result.push(types[_i2]); + } else if (isObjectType(n.types[_i2 - 1]) && isObjectType(n.types[_i2])) { + // If both are objects, don't indent + result.push(concat$12([" & ", wasIndented ? indent$6(types[_i2]) : types[_i2]])); + } else if (!isObjectType(n.types[_i2 - 1]) && !isObjectType(n.types[_i2])) { + // If no object is involved, go to the next line if it breaks + result.push(indent$6(concat$12([" &", line$8, types[_i2]]))); + } else { + // If you go from object to non-object or vis-versa, then inline it + if (_i2 > 1) { + wasIndented = true; + } + + result.push(" & ", _i2 > 1 ? indent$6(types[_i2]) : types[_i2]); + } + } + + return group$10(concat$12(result)); + } + + case "TSUnionType": + case "UnionTypeAnnotation": + { + // single-line variation + // A | B | C + // multi-line variation + // | A + // | B + // | C + var _parent7 = path.getParentNode(); + + var _parentParent3 = path.getParentNode(1); // If there's a leading comment, the parent is doing the indentation + + + var shouldIndent = _parent7.type !== "TypeParameterInstantiation" && _parent7.type !== "TSTypeParameterInstantiation" && _parent7.type !== "GenericTypeAnnotation" && _parent7.type !== "TSTypeReference" && !(_parent7.type === "FunctionTypeParam" && !_parent7.name) && _parentParent3.type !== "TSTypeAssertionExpression" && !((_parent7.type === "TypeAlias" || _parent7.type === "VariableDeclarator") && hasLeadingOwnLineComment(options.originalText, n, options)); // { + // a: string + // } | null | void + // should be inlined and not be printed in the multi-line variant + + var shouldHug = shouldHugType(n); // We want to align the children but without its comment, so it looks like + // | child1 + // // comment + // | child2 + + var _printed2 = path.map(function (typePath) { + var printedType = typePath.call(print); + + if (!shouldHug) { + printedType = align$1(2, printedType); + } + + return comments.printComments(typePath, function () { + return printedType; + }, options); + }, "types"); + + if (shouldHug) { + return join$7(" | ", _printed2); + } + + var code = concat$12([ifBreak$6(concat$12([shouldIndent ? line$8 : "", "| "])), join$7(concat$12([line$8, "| "]), _printed2)]); + var hasParens; + + if (n.type === "TSUnionType") { + var greatGrandParent = path.getParentNode(2); + var greatGreatGrandParent = path.getParentNode(3); + hasParens = greatGrandParent && greatGrandParent.type === "TSParenthesizedType" && greatGreatGrandParent && (greatGreatGrandParent.type === "TSUnionType" || greatGreatGrandParent.type === "TSIntersectionType"); + } else { + hasParens = needsParens_1(path, options); + } + + if (hasParens) { + return group$10(concat$12([indent$6(code), softline$5])); + } + + return group$10(shouldIndent ? indent$6(code) : code); + } + + case "NullableTypeAnnotation": + return concat$12(["?", path.call(print, "typeAnnotation")]); + + case "TSNullKeyword": + case "NullLiteralTypeAnnotation": + return "null"; + + case "ThisTypeAnnotation": + return "this"; + + case "NumberTypeAnnotation": + return "number"; + + case "ObjectTypeCallProperty": + if (n.static) { + parts.push("static "); + } + + parts.push(path.call(print, "value")); + return concat$12(parts); + + case "ObjectTypeIndexer": + { + var _variance = getFlowVariance(n); + + return concat$12([_variance || "", "[", path.call(print, "id"), n.id ? ": " : "", path.call(print, "key"), "]: ", path.call(print, "value")]); + } + + case "ObjectTypeProperty": + { + var _variance2 = getFlowVariance(n); + + var modifier = ""; + + if (n.proto) { + modifier = "proto "; + } else if (n.static) { + modifier = "static "; + } + + return concat$12([modifier, isGetterOrSetter(n) ? n.kind + " " : "", _variance2 || "", printPropertyKey(path, options, print), printOptionalToken(path), isFunctionNotation(n, options) ? "" : ": ", path.call(print, "value")]); + } + + case "QualifiedTypeIdentifier": + return concat$12([path.call(print, "qualification"), ".", path.call(print, "id")]); + + case "StringLiteralTypeAnnotation": + return nodeStr(n, options); + + case "NumberLiteralTypeAnnotation": + assert$3.strictEqual(_typeof(n.value), "number"); + + if (n.extra != null) { + return printNumber$2(n.extra.raw); + } + + return printNumber$2(n.raw); + + case "StringTypeAnnotation": + return "string"; + + case "DeclareTypeAlias": + case "TypeAlias": + { + if (n.type === "DeclareTypeAlias" || isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + var _printed3 = printAssignmentRight(n.id, n.right, path.call(print, "right"), options); + + parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", _printed3, semi); + return group$10(concat$12(parts)); + } + + case "TypeCastExpression": + { + var value = path.getValue(); // Flow supports a comment syntax for specifying type annotations: https://flow.org/en/docs/types/comments/. + // Unfortunately, its parser doesn't differentiate between comment annotations and regular + // annotations when producing an AST. So to preserve parentheses around type casts that use + // the comment syntax, we need to hackily read the source itself to see if the code contains + // a type annotation comment. + // + // Note that we're able to use the normal whitespace regex here because the Flow parser has + // already deemed this AST node to be a type cast. Only the Babylon parser needs the + // non-line-break whitespace regex, which is why hasFlowShorthandAnnotationComment() is + // implemented differently. + + var commentSyntax = value && value.typeAnnotation && value.typeAnnotation.range && options.originalText.substring(value.typeAnnotation.range[0]).match(/^\/\*\s*:/); + return concat$12(["(", path.call(print, "expression"), commentSyntax ? " /*" : "", ": ", path.call(print, "typeAnnotation"), commentSyntax ? " */" : "", ")"]); + } + + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": + { + var _value = path.getValue(); + + var commentStart = _value.range ? options.originalText.substring(0, _value.range[0]).lastIndexOf("/*") : -1; // As noted in the TypeCastExpression comments above, we're able to use a normal whitespace regex here + // because we know for sure that this is a type definition. + + var _commentSyntax = commentStart >= 0 && options.originalText.substring(commentStart).match(/^\/\*\s*::/); + + if (_commentSyntax) { + return concat$12(["/*:: ", printTypeParameters(path, options, print, "params"), " */"]); + } + + return printTypeParameters(path, options, print, "params"); + } + + case "TSTypeParameterDeclaration": + case "TSTypeParameterInstantiation": + return printTypeParameters(path, options, print, "params"); + + case "TSTypeParameter": + case "TypeParameter": + { + var _parent8 = path.getParentNode(); + + if (_parent8.type === "TSMappedType") { + parts.push("[", path.call(print, "name")); + + if (n.constraint) { + parts.push(" in ", path.call(print, "constraint")); + } + + parts.push("]"); + return concat$12(parts); + } + + var _variance3 = getFlowVariance(n); + + if (_variance3) { + parts.push(_variance3); + } + + parts.push(path.call(print, "name")); + + if (n.bound) { + parts.push(": "); + parts.push(path.call(print, "bound")); + } + + if (n.constraint) { + parts.push(" extends ", path.call(print, "constraint")); + } + + if (n["default"]) { + parts.push(" = ", path.call(print, "default")); + } + + return concat$12(parts); + } + + case "TypeofTypeAnnotation": + return concat$12(["typeof ", path.call(print, "argument")]); + + case "VoidTypeAnnotation": + return "void"; + + case "InferredPredicate": + return "%checks"; + // Unhandled types below. If encountered, nodes of these types should + // be either left alone or desugared into AST types that are fully + // supported by the pretty-printer. + + case "DeclaredPredicate": + return concat$12(["%checks(", path.call(print, "value"), ")"]); + + case "TSAbstractKeyword": + return "abstract"; + + case "TSAnyKeyword": + return "any"; + + case "TSAsyncKeyword": + return "async"; + + case "TSBooleanKeyword": + return "boolean"; + + case "TSConstKeyword": + return "const"; + + case "TSDeclareKeyword": + return "declare"; + + case "TSExportKeyword": + return "export"; + + case "TSNeverKeyword": + return "never"; + + case "TSNumberKeyword": + return "number"; + + case "TSObjectKeyword": + return "object"; + + case "TSProtectedKeyword": + return "protected"; + + case "TSPrivateKeyword": + return "private"; + + case "TSPublicKeyword": + return "public"; + + case "TSReadonlyKeyword": + return "readonly"; + + case "TSSymbolKeyword": + return "symbol"; + + case "TSStaticKeyword": + return "static"; + + case "TSStringKeyword": + return "string"; + + case "TSUndefinedKeyword": + return "undefined"; + + case "TSUnknownKeyword": + return "unknown"; + + case "TSVoidKeyword": + return "void"; + + case "TSAsExpression": + return concat$12([path.call(print, "expression"), " as ", path.call(print, "typeAnnotation")]); + + case "TSArrayType": + return concat$12([path.call(print, "elementType"), "[]"]); + + case "TSPropertySignature": + { + if (n.export) { + parts.push("export "); + } + + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + if (n.computed) { + parts.push("["); + } + + parts.push(printPropertyKey(path, options, print)); + + if (n.computed) { + parts.push("]"); + } + + parts.push(printOptionalToken(path)); + + if (n.typeAnnotation) { + parts.push(": "); + parts.push(path.call(print, "typeAnnotation")); + } // This isn't valid semantically, but it's in the AST so we can print it. + + + if (n.initializer) { + parts.push(" = ", path.call(print, "initializer")); + } + + return concat$12(parts); + } + + case "TSParameterProperty": + if (n.accessibility) { + parts.push(n.accessibility + " "); + } + + if (n.export) { + parts.push("export "); + } + + if (n.static) { + parts.push("static "); + } + + if (n.readonly) { + parts.push("readonly "); + } + + parts.push(path.call(print, "parameter")); + return concat$12(parts); + + case "TSTypeReference": + return concat$12([path.call(print, "typeName"), printTypeParameters(path, options, print, "typeParameters")]); + + case "TSTypeQuery": + return concat$12(["typeof ", path.call(print, "exprName")]); + + case "TSParenthesizedType": + { + return path.call(print, "typeAnnotation"); + } + + case "TSIndexSignature": + { + var _parent9 = path.getParentNode(); + + return concat$12([n.export ? "export " : "", n.accessibility ? concat$12([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", path.call(print, "index"), "]: ", path.call(print, "typeAnnotation"), _parent9.type === "ClassBody" ? semi : ""]); + } + + case "TSTypePredicate": + return concat$12([path.call(print, "parameterName"), " is ", path.call(print, "typeAnnotation")]); + + case "TSNonNullExpression": + return concat$12([path.call(print, "expression"), "!"]); + + case "TSThisType": + return "this"; + + case "TSImportType": + return concat$12([!n.isTypeOf ? "" : "typeof ", "import(", path.call(print, "parameter"), ")", !n.qualifier ? "" : concat$12([".", path.call(print, "qualifier")]), printTypeParameters(path, options, print, "typeParameters")]); + + case "TSLiteralType": + return path.call(print, "literal"); + + case "TSIndexedAccessType": + return concat$12([path.call(print, "objectType"), "[", path.call(print, "indexType"), "]"]); + + case "TSConstructSignature": + case "TSConstructorType": + case "TSCallSignature": + { + if (n.type !== "TSCallSignature") { + parts.push("new "); + } + + parts.push(group$10(printFunctionParams(path, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true))); + + if (n.typeAnnotation) { + var isType = n.type === "TSConstructorType"; + parts.push(isType ? " => " : ": ", path.call(print, "typeAnnotation")); + } + + return concat$12(parts); + } + + case "TSTypeOperator": + return concat$12([n.operator, " ", path.call(print, "typeAnnotation")]); + + case "TSMappedType": + return group$10(concat$12(["{", indent$6(concat$12([options.bracketSpacing ? line$8 : softline$5, n.readonlyToken ? concat$12([getTypeScriptMappedTypeModifier(n.readonlyToken, "readonly"), " "]) : "", printTypeScriptModifiers(path, options, print), path.call(print, "typeParameter"), n.questionToken ? getTypeScriptMappedTypeModifier(n.questionToken, "?") : "", ": ", path.call(print, "typeAnnotation")])), comments.printDanglingComments(path, options, + /* sameIndent */ + true), options.bracketSpacing ? line$8 : softline$5, "}"])); + + case "TSMethodSignature": + parts.push(n.accessibility ? concat$12([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path.call(print, "key"), n.computed ? "]" : "", printOptionalToken(path), printFunctionParams(path, print, options, + /* expandArg */ + false, + /* printTypeParams */ + true)); + + if (n.typeAnnotation) { + parts.push(": ", path.call(print, "typeAnnotation")); + } + + return group$10(concat$12(parts)); + + case "TSNamespaceExportDeclaration": + parts.push("export as namespace ", path.call(print, "name")); + + if (options.semi) { + parts.push(";"); + } + + return group$10(concat$12(parts)); + + case "TSEnumDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + + if (n.modifiers) { + parts.push(printTypeScriptModifiers(path, options, print)); + } + + if (n.const) { + parts.push("const "); + } + + parts.push("enum ", path.call(print, "id"), " "); + + if (n.members.length === 0) { + parts.push(group$10(concat$12(["{", comments.printDanglingComments(path, options), softline$5, "}"]))); + } else { + parts.push(group$10(concat$12(["{", indent$6(concat$12([hardline$8, printArrayItems(path, options, "members", print), shouldPrintComma$1(options, "es5") ? "," : ""])), comments.printDanglingComments(path, options, + /* sameIndent */ + true), hardline$8, "}"]))); + } + + return concat$12(parts); + + case "TSEnumMember": + parts.push(path.call(print, "id")); + + if (n.initializer) { + parts.push(" = ", path.call(print, "initializer")); + } + + return concat$12(parts); + + case "TSImportEqualsDeclaration": + parts.push(printTypeScriptModifiers(path, options, print), "import ", path.call(print, "name"), " = ", path.call(print, "moduleReference")); + + if (options.semi) { + parts.push(";"); + } + + return group$10(concat$12(parts)); + + case "TSExternalModuleReference": + return concat$12(["require(", path.call(print, "expression"), ")"]); + + case "TSModuleDeclaration": + { + var _parent10 = path.getParentNode(); + + var isExternalModule = isLiteral(n.id); + var parentIsDeclaration = _parent10.type === "TSModuleDeclaration"; + var bodyIsDeclaration = n.body && n.body.type === "TSModuleDeclaration"; + + if (parentIsDeclaration) { + parts.push("."); + } else { + if (n.declare === true) { + parts.push("declare "); + } + + parts.push(printTypeScriptModifiers(path, options, print)); + var textBetweenNodeAndItsId = options.originalText.slice(options.locStart(n), options.locStart(n.id)); // Global declaration looks like this: + // (declare)? global { ... } + + var isGlobalDeclaration = n.id.type === "Identifier" && n.id.name === "global" && !/namespace|module/.test(textBetweenNodeAndItsId); + + if (!isGlobalDeclaration) { + parts.push(isExternalModule || /\smodule\s/.test(textBetweenNodeAndItsId) ? "module " : "namespace "); + } + } + + parts.push(path.call(print, "id")); + + if (bodyIsDeclaration) { + parts.push(path.call(print, "body")); + } else if (n.body) { + parts.push(" {", indent$6(concat$12([line$8, path.call(function (bodyPath) { + return comments.printDanglingComments(bodyPath, options, true); + }, "body"), group$10(path.call(print, "body"))])), line$8, "}"); + } else { + parts.push(semi); + } + + return concat$12(parts); + } + + case "TSModuleBlock": + return path.call(function (bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); + + case "PrivateName": + return concat$12(["#", path.call(print, "id")]); + + case "TSConditionalType": + return printTernaryOperator(path, options, print, { + beforeParts: function beforeParts() { + return [path.call(print, "checkType"), " ", "extends", " ", path.call(print, "extendsType")]; + }, + afterParts: function afterParts() { + return []; + }, + shouldCheckJsx: false, + conditionalNodeType: "TSConditionalType", + consequentNodePropertyName: "trueType", + alternateNodePropertyName: "falseType", + testNodePropertyName: "checkType", + breakNested: true + }); + + case "TSInferType": + return concat$12(["infer", " ", path.call(print, "typeParameter")]); + + case "InterpreterDirective": + parts.push("#!", n.value, hardline$8); + + if (isNextLineEmpty$4(options.originalText, n, options)) { + parts.push(hardline$8); + } + + return concat$12(parts); + + case "NGRoot": + return concat$12([].concat(path.call(print, "node"), !n.node.comments || n.node.comments.length === 0 ? [] : concat$12([" //", n.node.comments[0].value.trimRight()]))); + + case "NGChainedExpression": + return group$10(join$7(concat$12([";", line$8]), path.map(function (childPath) { + return hasNgSideEffect(childPath) ? print(childPath) : concat$12(["(", print(childPath), ")"]); + }, "expressions"))); + + case "NGEmptyExpression": + return ""; + + case "NGQuotedExpression": + return concat$12([n.prefix, ":", n.value]); + + case "NGMicrosyntax": + return concat$12(path.map(function (childPath, index) { + return concat$12([index === 0 ? "" : isNgForOf(childPath) ? " " : concat$12([";", line$8]), print(childPath)]); + }, "body")); + + case "NGMicrosyntaxKey": + return /^[a-z_$][a-z0-9_$]*(-[a-z_$][a-z0-9_$])*$/i.test(n.name) ? n.name : JSON.stringify(n.name); + + case "NGMicrosyntaxExpression": + return concat$12([path.call(print, "expression"), n.alias === null ? "" : concat$12([" as ", path.call(print, "alias")])]); + + case "NGMicrosyntaxKeyedExpression": + return concat$12([path.call(print, "key"), isNgForOf(path) ? " " : ": ", path.call(print, "expression")]); + + case "NGMicrosyntaxLet": + return concat$12(["let ", path.call(print, "key"), n.value === null ? "" : concat$12([" = ", path.call(print, "value")])]); + + case "NGMicrosyntaxAs": + return concat$12([path.call(print, "key"), " as ", path.call(print, "alias")]); + + default: + /* istanbul ignore next */ + throw new Error("unknown type: " + JSON.stringify(n.type)); + } +} +/** prefer `let hero of heros` over `let hero; of: heros` */ + + +function isNgForOf(path) { + var node = path.getValue(); + var index = path.getName(); + var parentNode = path.getParentNode(); + return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null; +} +/** identify if an angular expression seems to have side effects */ + + +function hasNgSideEffect(path) { + return hasNode(path.getValue(), function (node) { + switch (node.type) { + case undefined: + return false; + + case "CallExpression": + case "OptionalCallExpression": + case "AssignmentExpression": + return true; + } + }); +} + +function printStatementSequence(path, options, print) { + var printed = []; + var bodyNode = path.getNode(); + var isClass = bodyNode.type === "ClassBody"; + path.map(function (stmtPath, i) { + var stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy + // "statements," it's safer simply to skip them. + + /* istanbul ignore if */ + + if (!stmt) { + return; + } // Skip printing EmptyStatement nodes to avoid leaving stray + // semicolons lying around. + + + if (stmt.type === "EmptyStatement") { + return; + } + + var stmtPrinted = print(stmtPath); + var text = options.originalText; + var parts = []; // in no-semi mode, prepend statement with semicolon if it might break ASI + // don't prepend the only JSX element in a program with semicolon + + if (!options.semi && !isClass && !isTheOnlyJSXElementInMarkdown(options, stmtPath) && stmtNeedsASIProtection(stmtPath, options)) { + if (stmt.comments && stmt.comments.some(function (comment) { + return comment.leading; + })) { + parts.push(print(stmtPath, { + needsSemi: true + })); + } else { + parts.push(";", stmtPrinted); + } + } else { + parts.push(stmtPrinted); + } + + if (!options.semi && isClass) { + if (classPropMayCauseASIProblems(stmtPath)) { + parts.push(";"); + } else if (stmt.type === "ClassProperty") { + var nextChild = bodyNode.body[i + 1]; + + if (classChildNeedsASIProtection(nextChild)) { + parts.push(";"); + } + } + } + + if (isNextLineEmpty$4(text, stmt, options) && !isLastStatement(stmtPath)) { + parts.push(hardline$8); + } + + printed.push(concat$12(parts)); + }); + return join$7(hardline$8, printed); +} + +function printPropertyKey(path, options, print) { + var node = path.getNode(); + var key = node.key; + + if (key.type === "Identifier" && !node.computed && options.parser === "json") { + // a -> "a" + return path.call(function (keyPath) { + return comments.printComments(keyPath, function () { + return JSON.stringify(key.name); + }, options); + }, "key"); + } + + if (isStringLiteral(key) && isIdentifierName(key.value) && !node.computed && options.parser !== "json" && !(options.parser === "typescript" && node.type === "ClassProperty")) { + // 'a' -> a + return path.call(function (keyPath) { + return comments.printComments(keyPath, function () { + return key.value; + }, options); + }, "key"); + } + + return path.call(print, "key"); +} + +function printMethod(path, options, print) { + var node = path.getNode(); + var semi = options.semi ? ";" : ""; + var kind = node.kind; + var parts = []; + + if (node.type === "ObjectMethod" || node.type === "ClassMethod") { + node.value = node; + } + + if (node.value.async) { + parts.push("async "); + } + + if (!kind || kind === "init" || kind === "method" || kind === "constructor") { + if (node.value.generator) { + parts.push("*"); + } + } else { + assert$3.ok(kind === "get" || kind === "set"); + parts.push(kind, " "); + } + + var key = printPropertyKey(path, options, print); + + if (node.computed) { + key = concat$12(["[", key, "]"]); + } + + parts.push(key, concat$12(path.call(function (valuePath) { + return [printFunctionTypeParameters(valuePath, options, print), group$10(concat$12([printFunctionParams(valuePath, print, options), printReturnType(valuePath, print, options)]))]; + }, "value"))); + + if (!node.value.body || node.value.body.length === 0) { + parts.push(semi); + } else { + parts.push(" ", path.call(print, "value", "body")); + } + + return concat$12(parts); +} + +function couldGroupArg(arg) { + return arg.type === "ObjectExpression" && (arg.properties.length > 0 || arg.comments) || arg.type === "ArrayExpression" && (arg.elements.length > 0 || arg.comments) || arg.type === "TSTypeAssertionExpression" || arg.type === "TSAsExpression" || arg.type === "FunctionExpression" || arg.type === "ArrowFunctionExpression" && !arg.returnType && (arg.body.type === "BlockStatement" || arg.body.type === "ArrowFunctionExpression" || arg.body.type === "ObjectExpression" || arg.body.type === "ArrayExpression" || arg.body.type === "CallExpression" || arg.body.type === "OptionalCallExpression" || arg.body.type === "ConditionalExpression" || isJSXNode(arg.body)); +} + +function shouldGroupLastArg(args) { + var lastArg = getLast$4(args); + var penultimateArg = getPenultimate$1(args); + return !hasLeadingComment(lastArg) && !hasTrailingComment(lastArg) && couldGroupArg(lastArg) && ( // If the last two arguments are of the same type, + // disable last element expansion. + !penultimateArg || penultimateArg.type !== lastArg.type); +} + +function shouldGroupFirstArg(args) { + if (args.length !== 2) { + return false; + } + + var firstArg = args[0]; + var secondArg = args[1]; + return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === "FunctionExpression" || firstArg.type === "ArrowFunctionExpression" && firstArg.body.type === "BlockStatement") && secondArg.type !== "FunctionExpression" && secondArg.type !== "ArrowFunctionExpression" && secondArg.type !== "ConditionalExpression" && !couldGroupArg(secondArg); +} + +function isSimpleFlowType(node) { + var flowTypeAnnotations = ["AnyTypeAnnotation", "NullLiteralTypeAnnotation", "GenericTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation", "BooleanTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringTypeAnnotation"]; + return node && flowTypeAnnotations.indexOf(node.type) !== -1 && !(node.type === "GenericTypeAnnotation" && node.typeParameters); +} + +var functionCompositionFunctionNames = new Set(["pipe", // RxJS, Ramda +"pipeP", // Ramda +"pipeK", // Ramda +"compose", // Ramda, Redux +"composeFlipped", // Not from any library, but common in Haskell, so supported +"composeP", // Ramda +"composeK", // Ramda +"flow", // Lodash +"flowRight", // Lodash +"connect", // Redux +"createSelector" // Reselect +]); + +function isFunctionCompositionFunction(node) { + switch (node.type) { + case "OptionalMemberExpression": + case "MemberExpression": + { + return isFunctionCompositionFunction(node.property); + } + + case "Identifier": + { + return functionCompositionFunctionNames.has(node.name); + } + + case "StringLiteral": + case "Literal": + { + return functionCompositionFunctionNames.has(node.value); + } + } +} + +function printArgumentsList(path, options, print) { + var node = path.getValue(); + var args = node.arguments; + + if (args.length === 0) { + return concat$12(["(", comments.printDanglingComments(path, options, + /* sameIndent */ + true), ")"]); + } + + var anyArgEmptyLine = false; + var hasEmptyLineFollowingFirstArg = false; + var lastArgIndex = args.length - 1; + var printedArguments = path.map(function (argPath, index) { + var arg = argPath.getNode(); + var parts = [print(argPath)]; + + if (index === lastArgIndex) {// do nothing + } else if (isNextLineEmpty$4(options.originalText, arg, options)) { + if (index === 0) { + hasEmptyLineFollowingFirstArg = true; + } + + anyArgEmptyLine = true; + parts.push(",", hardline$8, hardline$8); + } else { + parts.push(",", line$8); + } + + return concat$12(parts); + }, "arguments"); + var maybeTrailingComma = shouldPrintComma$1(options, "all") ? "," : ""; + + function allArgsBrokenOut() { + return group$10(concat$12(["(", indent$6(concat$12([line$8, concat$12(printedArguments)])), maybeTrailingComma, line$8, ")"]), { + shouldBreak: true + }); + } // We want to get + // pipe( + // x => x + 1, + // x => x - 1 + // ) + // here, but not + // process.stdout.pipe(socket) + + + if (isFunctionCompositionFunction(node.callee) && args.length > 1) { + return allArgsBrokenOut(); + } + + var shouldGroupFirst = shouldGroupFirstArg(args); + var shouldGroupLast = shouldGroupLastArg(args); + + if (shouldGroupFirst || shouldGroupLast) { + var shouldBreak = (shouldGroupFirst ? printedArguments.slice(1).some(willBreak$1) : printedArguments.slice(0, -1).some(willBreak$1)) || anyArgEmptyLine; // We want to print the last argument with a special flag + + var printedExpanded; + var i = 0; + path.each(function (argPath) { + if (shouldGroupFirst && i === 0) { + printedExpanded = [concat$12([argPath.call(function (p) { + return print(p, { + expandFirstArg: true + }); + }), printedArguments.length > 1 ? "," : "", hasEmptyLineFollowingFirstArg ? hardline$8 : line$8, hasEmptyLineFollowingFirstArg ? hardline$8 : ""])].concat(printedArguments.slice(1)); + } + + if (shouldGroupLast && i === args.length - 1) { + printedExpanded = printedArguments.slice(0, -1).concat(argPath.call(function (p) { + return print(p, { + expandLastArg: true + }); + })); + } + + i++; + }, "arguments"); + var somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1); + return concat$12([somePrintedArgumentsWillBreak ? breakParent$3 : "", conditionalGroup$1([concat$12([ifBreak$6(indent$6(concat$12(["(", softline$5, concat$12(printedExpanded)])), concat$12(["(", concat$12(printedExpanded)])), somePrintedArgumentsWillBreak ? concat$12([ifBreak$6(maybeTrailingComma), softline$5]) : "", ")"]), shouldGroupFirst ? concat$12(["(", group$10(printedExpanded[0], { + shouldBreak: true + }), concat$12(printedExpanded.slice(1)), ")"]) : concat$12(["(", concat$12(printedArguments.slice(0, -1)), group$10(getLast$4(printedExpanded), { + shouldBreak: true + }), ")"]), allArgsBrokenOut()], { + shouldBreak: shouldBreak + })]); + } + + return group$10(concat$12(["(", indent$6(concat$12([softline$5, concat$12(printedArguments)])), ifBreak$6(shouldPrintComma$1(options, "all") ? "," : ""), softline$5, ")"]), { + shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine + }); +} + +function printTypeAnnotation(path, options, print) { + var node = path.getValue(); + + if (!node.typeAnnotation) { + return ""; + } + + var parentNode = path.getParentNode(); + var isDefinite = node.definite || parentNode && parentNode.type === "VariableDeclarator" && parentNode.definite; + var isFunctionDeclarationIdentifier = parentNode.type === "DeclareFunction" && parentNode.id === node; + + if (isFlowAnnotationComment(options.originalText, node.typeAnnotation, options)) { + return concat$12([" /*: ", path.call(print, "typeAnnotation"), " */"]); + } + + return concat$12([isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", path.call(print, "typeAnnotation")]); +} + +function printFunctionTypeParameters(path, options, print) { + var fun = path.getValue(); + + if (fun.typeArguments) { + return path.call(print, "typeArguments"); + } + + if (fun.typeParameters) { + return path.call(print, "typeParameters"); + } + + return ""; +} + +function printFunctionParams(path, print, options, expandArg, printTypeParams) { + var fun = path.getValue(); + var paramsField = fun.parameters ? "parameters" : "params"; + var typeParams = printTypeParams ? printFunctionTypeParameters(path, options, print) : ""; + var printed = []; + + if (fun[paramsField]) { + printed = path.map(print, paramsField); + } + + if (fun.rest) { + printed.push(concat$12(["...", path.call(print, "rest")])); + } + + if (printed.length === 0) { + return concat$12([typeParams, "(", comments.printDanglingComments(path, options, + /* sameIndent */ + true, function (comment) { + return getNextNonSpaceNonCommentCharacter$1(options.originalText, comment, options.locEnd) === ")"; + }), ")"]); + } + + var lastParam = getLast$4(fun[paramsField]); // If the parent is a call with the first/last argument expansion and this is the + // params of the first/last argument, we dont want the arguments to break and instead + // want the whole expression to be on a new line. + // + // Good: Bad: + // verylongcall( verylongcall(( + // (a, b) => { a, + // } b, + // }) ) => { + // }) + + if (expandArg && !(fun[paramsField] && fun[paramsField].some(function (n) { + return n.comments; + }))) { + return group$10(concat$12([removeLines$2(typeParams), "(", join$7(", ", printed.map(removeLines$2)), ")"])); + } // Single object destructuring should hug + // + // function({ + // a, + // b, + // c + // }) {} + + + if (shouldHugArguments(fun)) { + return concat$12([typeParams, "(", join$7(", ", printed), ")"]); + } + + var parent = path.getParentNode(); // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})` + + if (isTestCall(parent)) { + return concat$12([typeParams, "(", join$7(", ", printed), ")"]); + } + + var isFlowShorthandWithOneArg = (isObjectTypePropertyAFunction(parent, options) || isTypeAnnotationAFunction(parent, options) || parent.type === "TypeAlias" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || parent.type === "IntersectionTypeAnnotation" || parent.type === "FunctionTypeAnnotation" && parent.returnType === fun) && fun[paramsField].length === 1 && fun[paramsField][0].name === null && fun[paramsField][0].typeAnnotation && fun.typeParameters === null && isSimpleFlowType(fun[paramsField][0].typeAnnotation) && !fun.rest; + + if (isFlowShorthandWithOneArg) { + if (options.arrowParens === "always") { + return concat$12(["(", concat$12(printed), ")"]); + } + + return concat$12(printed); + } + + var canHaveTrailingComma = !(lastParam && lastParam.type === "RestElement") && !fun.rest; + return concat$12([typeParams, "(", indent$6(concat$12([softline$5, join$7(concat$12([",", line$8]), printed)])), ifBreak$6(canHaveTrailingComma && shouldPrintComma$1(options, "all") ? "," : ""), softline$5, ")"]); +} + +function shouldPrintParamsWithoutParens(path, options) { + if (options.arrowParens === "always") { + return false; + } + + if (options.arrowParens === "avoid") { + var node = path.getValue(); + return canPrintParamsWithoutParens(node); + } // Fallback default; should be unreachable + + + return false; +} + +function canPrintParamsWithoutParens(node) { + return node.params.length === 1 && !node.rest && !node.typeParameters && !hasDanglingComments(node) && node.params[0].type === "Identifier" && !node.params[0].typeAnnotation && !node.params[0].comments && !node.params[0].optional && !node.predicate && !node.returnType; +} + +function printFunctionDeclaration(path, print, options) { + var n = path.getValue(); + var parts = []; + + if (n.async) { + parts.push("async "); + } + + parts.push("function"); + + if (n.generator) { + parts.push("*"); + } + + if (n.id) { + parts.push(" ", path.call(print, "id")); + } + + parts.push(printFunctionTypeParameters(path, options, print), group$10(concat$12([printFunctionParams(path, print, options), printReturnType(path, print, options)])), n.body ? " " : "", path.call(print, "body")); + return concat$12(parts); +} + +function printObjectMethod(path, options, print) { + var objMethod = path.getValue(); + var parts = []; + + if (objMethod.async) { + parts.push("async "); + } + + if (objMethod.generator) { + parts.push("*"); + } + + if (objMethod.method || objMethod.kind === "get" || objMethod.kind === "set") { + return printMethod(path, options, print); + } + + var key = printPropertyKey(path, options, print); + + if (objMethod.computed) { + parts.push("[", key, "]"); + } else { + parts.push(key); + } + + parts.push(printFunctionTypeParameters(path, options, print), group$10(concat$12([printFunctionParams(path, print, options), printReturnType(path, print, options)])), " ", path.call(print, "body")); + return concat$12(parts); +} + +function printReturnType(path, print, options) { + var n = path.getValue(); + var returnType = path.call(print, "returnType"); + + if (n.returnType && isFlowAnnotationComment(options.originalText, n.returnType, options)) { + return concat$12([" /*: ", returnType, " */"]); + } + + var parts = [returnType]; // prepend colon to TypeScript type annotation + + if (n.returnType && n.returnType.typeAnnotation) { + parts.unshift(": "); + } + + if (n.predicate) { + // The return type will already add the colon, but otherwise we + // need to do it ourselves + parts.push(n.returnType ? " " : ": ", path.call(print, "predicate")); + } + + return concat$12(parts); +} + +function printExportDeclaration(path, options, print) { + var decl = path.getValue(); + var semi = options.semi ? ";" : ""; + var parts = ["export "]; + var isDefault = decl["default"] || decl.type === "ExportDefaultDeclaration"; + + if (isDefault) { + parts.push("default "); + } + + parts.push(comments.printDanglingComments(path, options, + /* sameIndent */ + true)); + + if (needsHardlineAfterDanglingComment(decl)) { + parts.push(hardline$8); + } + + if (decl.declaration) { + parts.push(path.call(print, "declaration")); + + if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSAbstractClassDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction") { + parts.push(semi); + } + } else { + if (decl.specifiers && decl.specifiers.length > 0) { + var specifiers = []; + var defaultSpecifiers = []; + var namespaceSpecifiers = []; + path.each(function (specifierPath) { + var specifierType = path.getValue().type; + + if (specifierType === "ExportSpecifier") { + specifiers.push(print(specifierPath)); + } else if (specifierType === "ExportDefaultSpecifier") { + defaultSpecifiers.push(print(specifierPath)); + } else if (specifierType === "ExportNamespaceSpecifier") { + namespaceSpecifiers.push(concat$12(["* as ", print(specifierPath)])); + } + }, "specifiers"); + var isNamespaceFollowed = namespaceSpecifiers.length !== 0 && specifiers.length !== 0; + var isDefaultFollowed = defaultSpecifiers.length !== 0 && (namespaceSpecifiers.length !== 0 || specifiers.length !== 0); + parts.push(decl.exportKind === "type" ? "type " : "", concat$12(defaultSpecifiers), concat$12([isDefaultFollowed ? ", " : ""]), concat$12(namespaceSpecifiers), concat$12([isNamespaceFollowed ? ", " : ""]), specifiers.length !== 0 ? group$10(concat$12(["{", indent$6(concat$12([options.bracketSpacing ? line$8 : softline$5, join$7(concat$12([",", line$8]), specifiers)])), ifBreak$6(shouldPrintComma$1(options) ? "," : ""), options.bracketSpacing ? line$8 : softline$5, "}"])) : ""); + } else { + parts.push("{}"); + } + + if (decl.source) { + parts.push(" from ", path.call(print, "source")); + } + + parts.push(semi); + } + + return concat$12(parts); +} + +function printFlowDeclaration(path, parts) { + var parentExportDecl = getParentExportDeclaration$1(path); + + if (parentExportDecl) { + assert$3.strictEqual(parentExportDecl.type, "DeclareExportDeclaration"); + } else { + // If the parent node has type DeclareExportDeclaration, then it + // will be responsible for printing the "declare" token. Otherwise + // it needs to be printed with this non-exported declaration node. + parts.unshift("declare "); + } + + return concat$12(parts); +} + +function getFlowVariance(path) { + if (!path.variance) { + return null; + } // Babylon 7.0 currently uses variance node type, and flow should + // follow suit soon: + // https://github.com/babel/babel/issues/4722 + + + var variance = path.variance.kind || path.variance; + + switch (variance) { + case "plus": + return "+"; + + case "minus": + return "-"; + + default: + /* istanbul ignore next */ + return variance; + } +} + +function printTypeScriptModifiers(path, options, print) { + var n = path.getValue(); + + if (!n.modifiers || !n.modifiers.length) { + return ""; + } + + return concat$12([join$7(" ", path.map(print, "modifiers")), " "]); +} + +function printTypeParameters(path, options, print, paramsKey) { + var n = path.getValue(); + + if (!n[paramsKey]) { + return ""; + } // for TypeParameterDeclaration typeParameters is a single node + + + if (!Array.isArray(n[paramsKey])) { + return path.call(print, paramsKey); + } + + var grandparent = path.getNode(2); + var isParameterInTestCall = grandparent != null && isTestCall(grandparent); + var shouldInline = isParameterInTestCall || n[paramsKey].length === 0 || n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === "GenericTypeAnnotation" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === "TSTypeReference" && shouldHugType(n[paramsKey][0].typeName) || n[paramsKey][0].type === "NullableTypeAnnotation"); + + if (shouldInline) { + return concat$12(["<", join$7(", ", path.map(print, paramsKey)), ">"]); + } + + return group$10(concat$12(["<", indent$6(concat$12([softline$5, join$7(concat$12([",", line$8]), path.map(print, paramsKey))])), ifBreak$6(options.parser !== "typescript" && shouldPrintComma$1(options, "all") ? "," : ""), softline$5, ">"])); +} + +function printClass(path, options, print) { + var n = path.getValue(); + var parts = []; + + if (n.type === "TSAbstractClassDeclaration") { + parts.push("abstract "); + } + + parts.push("class"); + + if (n.id) { + parts.push(" ", path.call(print, "id")); + } + + parts.push(path.call(print, "typeParameters")); + var partsGroup = []; + + if (n.superClass) { + var printed = concat$12(["extends ", path.call(print, "superClass"), path.call(print, "superTypeParameters")]); // Keep old behaviour of extends in same line + // If there is only on extends and there are not comments + + if ((!n.implements || n.implements.length === 0) && (!n.superClass.comments || n.superClass.comments.length === 0)) { + parts.push(concat$12([" ", path.call(function (superClass) { + return comments.printComments(superClass, function () { + return printed; + }, options); + }, "superClass")])); + } else { + partsGroup.push(group$10(concat$12([line$8, path.call(function (superClass) { + return comments.printComments(superClass, function () { + return printed; + }, options); + }, "superClass")]))); + } + } else if (n.extends && n.extends.length > 0) { + parts.push(" extends ", join$7(", ", path.map(print, "extends"))); + } + + if (n["mixins"] && n["mixins"].length > 0) { + partsGroup.push(line$8, "mixins ", group$10(indent$6(join$7(concat$12([",", line$8]), path.map(print, "mixins"))))); + } + + if (n["implements"] && n["implements"].length > 0) { + partsGroup.push(line$8, "implements", group$10(indent$6(concat$12([line$8, join$7(concat$12([",", line$8]), path.map(print, "implements"))])))); + } + + if (partsGroup.length > 0) { + parts.push(group$10(indent$6(concat$12(partsGroup)))); + } + + if (n.body && n.body.comments && hasLeadingOwnLineComment(options.originalText, n.body, options)) { + parts.push(hardline$8); + } else { + parts.push(" "); + } + + parts.push(path.call(print, "body")); + return parts; +} + +function printOptionalToken(path) { + var node = path.getValue(); + + if (!node.optional) { + return ""; + } + + if (node.type === "OptionalCallExpression" || node.type === "OptionalMemberExpression" && node.computed) { + return "?."; + } + + return "?"; +} + +function printMemberLookup(path, options, print) { + var property = path.call(print, "property"); + var n = path.getValue(); + var optional = printOptionalToken(path); + + if (!n.computed) { + return concat$12([optional, ".", property]); + } + + if (!n.property || isNumericLiteral(n.property)) { + return concat$12([optional, "[", property, "]"]); + } + + return group$10(concat$12([optional, "[", indent$6(concat$12([softline$5, property])), softline$5, "]"])); +} + +function printBindExpressionCallee(path, options, print) { + return concat$12(["::", path.call(print, "callee")]); +} // We detect calls on member expressions specially to format a +// common pattern better. The pattern we are looking for is this: +// +// arr +// .map(x => x + 1) +// .filter(x => x > 10) +// .some(x => x % 2) +// +// The way it is structured in the AST is via a nested sequence of +// MemberExpression and CallExpression. We need to traverse the AST +// and make groups out of it to print it in the desired way. + + +function printMemberChain(path, options, print) { + // The first phase is to linearize the AST by traversing it down. + // + // a().b() + // has the following AST structure: + // CallExpression(MemberExpression(CallExpression(Identifier))) + // and we transform it into + // [Identifier, CallExpression, MemberExpression, CallExpression] + var printedNodes = []; // Here we try to retain one typed empty line after each call expression or + // the first group whether it is in parentheses or not + + function shouldInsertEmptyLineAfter(node) { + var originalText = options.originalText; + var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$2(originalText, node, options); + var nextChar = originalText.charAt(nextCharIndex); // if it is cut off by a parenthesis, we only account for one typed empty + // line after that parenthesis + + if (nextChar == ")") { + return isNextLineEmptyAfterIndex$1(originalText, nextCharIndex + 1, options); + } + + return isNextLineEmpty$4(originalText, node, options); + } + + function rec(path) { + var node = path.getValue(); + + if ((node.type === "CallExpression" || node.type === "OptionalCallExpression") && (isMemberish(node.callee) || node.callee.type === "CallExpression" || node.callee.type === "OptionalCallExpression")) { + printedNodes.unshift({ + node: node, + printed: concat$12([comments.printComments(path, function () { + return concat$12([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]); + }, options), shouldInsertEmptyLineAfter(node) ? hardline$8 : ""]) + }); + path.call(function (callee) { + return rec(callee); + }, "callee"); + } else if (isMemberish(node)) { + printedNodes.unshift({ + node: node, + needsParens: needsParens_1(path, options), + printed: comments.printComments(path, function () { + return node.type === "OptionalMemberExpression" || node.type === "MemberExpression" ? printMemberLookup(path, options, print) : printBindExpressionCallee(path, options, print); + }, options) + }); + path.call(function (object) { + return rec(object); + }, "object"); + } else if (node.type === "TSNonNullExpression") { + printedNodes.unshift({ + node: node, + printed: comments.printComments(path, function () { + return "!"; + }, options) + }); + path.call(function (expression) { + return rec(expression); + }, "expression"); + } else { + printedNodes.unshift({ + node: node, + printed: path.call(print) + }); + } + } // Note: the comments of the root node have already been printed, so we + // need to extract this first call without printing them as they would + // if handled inside of the recursive call. + + + var node = path.getValue(); + printedNodes.unshift({ + node: node, + printed: concat$12([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]) + }); + path.call(function (callee) { + return rec(callee); + }, "callee"); // Once we have a linear list of printed nodes, we want to create groups out + // of it. + // + // a().b.c().d().e + // will be grouped as + // [ + // [Identifier, CallExpression], + // [MemberExpression, MemberExpression, CallExpression], + // [MemberExpression, CallExpression], + // [MemberExpression], + // ] + // so that we can print it as + // a() + // .b.c() + // .d() + // .e + // The first group is the first node followed by + // - as many CallExpression as possible + // < fn()()() >.something() + // - as many array acessors as possible + // < fn()[0][1][2] >.something() + // - then, as many MemberExpression as possible but the last one + // < this.items >.something() + + var groups = []; + var currentGroup = [printedNodes[0]]; + var i = 1; + + for (; i < printedNodes.length; ++i) { + if (printedNodes[i].node.type === "TSNonNullExpression" || printedNodes[i].node.type === "OptionalCallExpression" || printedNodes[i].node.type === "CallExpression" || (printedNodes[i].node.type === "MemberExpression" || printedNodes[i].node.type === "OptionalMemberExpression") && printedNodes[i].node.computed && isNumericLiteral(printedNodes[i].node.property)) { + currentGroup.push(printedNodes[i]); + } else { + break; + } + } + + if (printedNodes[0].node.type !== "CallExpression" && printedNodes[0].node.type !== "OptionalCallExpression") { + for (; i + 1 < printedNodes.length; ++i) { + if (isMemberish(printedNodes[i].node) && isMemberish(printedNodes[i + 1].node)) { + currentGroup.push(printedNodes[i]); + } else { + break; + } + } + } + + groups.push(currentGroup); + currentGroup = []; // Then, each following group is a sequence of MemberExpression followed by + // a sequence of CallExpression. To compute it, we keep adding things to the + // group until we has seen a CallExpression in the past and reach a + // MemberExpression + + var hasSeenCallExpression = false; + + for (; i < printedNodes.length; ++i) { + if (hasSeenCallExpression && isMemberish(printedNodes[i].node)) { + // [0] should be appended at the end of the group instead of the + // beginning of the next one + if (printedNodes[i].node.computed && isNumericLiteral(printedNodes[i].node.property)) { + currentGroup.push(printedNodes[i]); + continue; + } + + groups.push(currentGroup); + currentGroup = []; + hasSeenCallExpression = false; + } + + if (printedNodes[i].node.type === "CallExpression" || printedNodes[i].node.type === "OptionalCallExpression") { + hasSeenCallExpression = true; + } + + currentGroup.push(printedNodes[i]); + + if (printedNodes[i].node.comments && printedNodes[i].node.comments.some(function (comment) { + return comment.trailing; + })) { + groups.push(currentGroup); + currentGroup = []; + hasSeenCallExpression = false; + } + } + + if (currentGroup.length > 0) { + groups.push(currentGroup); + } // There are cases like Object.keys(), Observable.of(), _.values() where + // they are the subject of all the chained calls and therefore should + // be kept on the same line: + // + // Object.keys(items) + // .filter(x => x) + // .map(x => x) + // + // In order to detect those cases, we use an heuristic: if the first + // node is an identifier with the name starting with a capital + // letter or just a sequence of _$. The rationale is that they are + // likely to be factories. + + + function isFactory(name) { + return /^[A-Z]|^[_$]+$/.test(name); + } // In case the Identifier is shorter than tab width, we can keep the + // first call in a single line, if it's an ExpressionStatement. + // + // d3.scaleLinear() + // .domain([0, 100]) + // .range([0, width]); + // + + + function isShort(name) { + return name.length <= options.tabWidth; + } + + function shouldNotWrap(groups) { + var parent = path.getParentNode(); + var isExpression = parent && parent.type === "ExpressionStatement"; + var hasComputed = groups[1].length && groups[1][0].node.computed; + + if (groups[0].length === 1) { + var firstNode = groups[0][0].node; + return firstNode.type === "ThisExpression" || firstNode.type === "Identifier" && (isFactory(firstNode.name) || isExpression && isShort(firstNode.name) || hasComputed); + } + + var lastNode = getLast$4(groups[0]).node; + return (lastNode.type === "MemberExpression" || lastNode.type === "OptionalMemberExpression") && lastNode.property.type === "Identifier" && (isFactory(lastNode.property.name) || hasComputed); + } + + var shouldMerge = groups.length >= 2 && !groups[1][0].node.comments && shouldNotWrap(groups); + + function printGroup(printedGroup) { + var result = []; + + for (var _i3 = 0; _i3 < printedGroup.length; _i3++) { + // Checks if the next node (i.e. the parent node) needs parens + // and print accordingly + if (printedGroup[_i3 + 1] && printedGroup[_i3 + 1].needsParens) { + result.push("(", printedGroup[_i3].printed, printedGroup[_i3 + 1].printed, ")"); + _i3++; + } else { + result.push(printedGroup[_i3].printed); + } + } + + return concat$12(result); + } + + function printIndentedGroup(groups) { + if (groups.length === 0) { + return ""; + } + + return indent$6(group$10(concat$12([hardline$8, join$7(hardline$8, groups.map(printGroup))]))); + } + + var printedGroups = groups.map(printGroup); + var oneLine = concat$12(printedGroups); + var cutoff = shouldMerge ? 3 : 2; + var flatGroups = groups.slice(0, cutoff).reduce(function (res, group) { + return res.concat(group); + }, []); + var hasComment = flatGroups.slice(1, -1).some(function (node) { + return hasLeadingComment(node.node); + }) || flatGroups.slice(0, -1).some(function (node) { + return hasTrailingComment(node.node); + }) || groups[cutoff] && hasLeadingComment(groups[cutoff][0].node); // If we only have a single `.`, we shouldn't do anything fancy and just + // render everything concatenated together. + + if (groups.length <= cutoff && !hasComment) { + return group$10(oneLine); + } // Find out the last node in the first group and check if it has an + // empty line after + + + var lastNodeBeforeIndent = getLast$4(shouldMerge ? groups.slice(1, 2)[0] : groups[0]).node; + var shouldHaveEmptyLineBeforeIndent = lastNodeBeforeIndent.type !== "CallExpression" && lastNodeBeforeIndent.type !== "OptionalCallExpression" && shouldInsertEmptyLineAfter(lastNodeBeforeIndent); + var expanded = concat$12([printGroup(groups[0]), shouldMerge ? concat$12(groups.slice(1, 2).map(printGroup)) : "", shouldHaveEmptyLineBeforeIndent ? hardline$8 : "", printIndentedGroup(groups.slice(shouldMerge ? 2 : 1))]); + var callExpressions = printedNodes.map(function (_ref) { + var node = _ref.node; + return node; + }).filter(isCallOrOptionalCallExpression); // We don't want to print in one line if there's: + // * A comment. + // * 3 or more chained calls. + // * Any group but the last one has a hard line. + // If the last group is a function it's okay to inline if it fits. + + if (hasComment || callExpressions.length >= 3 || printedGroups.slice(0, -1).some(willBreak$1) || + /** + * scopes.filter(scope => scope.value !== '').map((scope, i) => { + * // multi line content + * }) + */ + function (lastGroupDoc, lastGroupNode) { + return isCallOrOptionalCallExpression(lastGroupNode) && willBreak$1(lastGroupDoc); + }(getLast$4(printedGroups), getLast$4(getLast$4(groups)).node) && callExpressions.slice(0, -1).some(function (n) { + return n.arguments.some(isFunctionOrArrowExpression); + })) { + return group$10(expanded); + } + + return concat$12([// We only need to check `oneLine` because if `expanded` is chosen + // that means that the parent group has already been broken + // naturally + willBreak$1(oneLine) || shouldHaveEmptyLineBeforeIndent ? breakParent$3 : "", conditionalGroup$1([oneLine, expanded])]); +} + +function isCallOrOptionalCallExpression(node) { + return node.type === "CallExpression" || node.type === "OptionalCallExpression"; +} + +function isJSXNode(node) { + return node.type === "JSXElement" || node.type === "JSXFragment" || node.type === "TSJsxFragment"; +} + +function isEmptyJSXElement(node) { + if (node.children.length === 0) { + return true; + } + + if (node.children.length > 1) { + return false; + } // if there is one text child and does not contain any meaningful text + // we can treat the element as empty. + + + var child = node.children[0]; + return isLiteral(child) && !isMeaningfulJSXText(child); +} // Only space, newline, carriage return, and tab are treated as whitespace +// inside JSX. + + +var jsxWhitespaceChars = " \n\r\t"; +var containsNonJsxWhitespaceRegex = new RegExp("[^" + jsxWhitespaceChars + "]"); +var matchJsxWhitespaceRegex = new RegExp("([" + jsxWhitespaceChars + "]+)"); // Meaningful if it contains non-whitespace characters, +// or it contains whitespace without a new line. + +function isMeaningfulJSXText(node) { + return isLiteral(node) && (containsNonJsxWhitespaceRegex.test(rawText(node)) || !/\n/.test(rawText(node))); +} + +function conditionalExpressionChainContainsJSX(node) { + return Boolean(getConditionalChainContents(node).find(isJSXNode)); +} // If we have nested conditional expressions, we want to print them in JSX mode +// if there's at least one JSXElement somewhere in the tree. +// +// A conditional expression chain like this should be printed in normal mode, +// because there aren't JSXElements anywhere in it: +// +// isA ? "A" : isB ? "B" : isC ? "C" : "Unknown"; +// +// But a conditional expression chain like this should be printed in JSX mode, +// because there is a JSXElement in the last ConditionalExpression: +// +// isA ? "A" : isB ? "B" : isC ? "C" : Unknown; +// +// This type of ConditionalExpression chain is structured like this in the AST: +// +// ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ConditionalExpression { +// test: ..., +// consequent: ..., +// alternate: ..., +// } +// } +// } +// +// We want to traverse over that shape and convert it into a flat structure so +// that we can find if there's a JSXElement somewhere inside. + + +function getConditionalChainContents(node) { + // Given this code: + // + // // Using a ConditionalExpression as the consequent is uncommon, but should + // // be handled. + // A ? B : C ? D : E ? F ? G : H : I + // + // which has this AST: + // + // ConditionalExpression { + // test: Identifier(A), + // consequent: Identifier(B), + // alternate: ConditionalExpression { + // test: Identifier(C), + // consequent: Identifier(D), + // alternate: ConditionalExpression { + // test: Identifier(E), + // consequent: ConditionalExpression { + // test: Identifier(F), + // consequent: Identifier(G), + // alternate: Identifier(H), + // }, + // alternate: Identifier(I), + // } + // } + // } + // + // we should return this Array: + // + // [ + // Identifier(A), + // Identifier(B), + // Identifier(C), + // Identifier(D), + // Identifier(E), + // Identifier(F), + // Identifier(G), + // Identifier(H), + // Identifier(I) + // ]; + // + // This loses the information about whether each node was the test, + // consequent, or alternate, but we don't care about that here- we are only + // flattening this structure to find if there's any JSXElements inside. + var nonConditionalExpressions = []; + + function recurse(node) { + if (node.type === "ConditionalExpression") { + recurse(node.test); + recurse(node.consequent); + recurse(node.alternate); + } else { + nonConditionalExpressions.push(node); + } + } + + recurse(node); + return nonConditionalExpressions; +} // Detect an expression node representing `{" "}` + + +function isJSXWhitespaceExpression(node) { + return node.type === "JSXExpressionContainer" && isLiteral(node.expression) && node.expression.value === " " && !node.expression.comments; +} + +function separatorNoWhitespace(isFacebookTranslationTag, child, childNode, nextNode) { + if (isFacebookTranslationTag) { + return ""; + } + + if (childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement) { + return child.length === 1 ? softline$5 : hardline$8; + } + + return softline$5; +} + +function separatorWithWhitespace(isFacebookTranslationTag, child, childNode, nextNode) { + if (isFacebookTranslationTag) { + return hardline$8; + } + + if (child.length === 1) { + return childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement ? hardline$8 : softline$5; + } + + return hardline$8; +} // JSX Children are strange, mostly for two reasons: +// 1. JSX reads newlines into string values, instead of skipping them like JS +// 2. up to one whitespace between elements within a line is significant, +// but not between lines. +// +// Leading, trailing, and lone whitespace all need to +// turn themselves into the rather ugly `{' '}` when breaking. +// +// We print JSX using the `fill` doc primitive. +// This requires that we give it an array of alternating +// content and whitespace elements. +// To ensure this we add dummy `""` content elements as needed. + + +function printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag) { + var n = path.getValue(); + var children = []; // using `map` instead of `each` because it provides `i` + + path.map(function (childPath, i) { + var child = childPath.getValue(); + + if (isLiteral(child)) { + var text = rawText(child); // Contains a non-whitespace character + + if (isMeaningfulJSXText(child)) { + var words = text.split(matchJsxWhitespaceRegex); // Starts with whitespace + + if (words[0] === "") { + children.push(""); + words.shift(); + + if (/\n/.test(words[0])) { + var next = n.children[i + 1]; + children.push(separatorWithWhitespace(isFacebookTranslationTag, words[1], child, next)); + } else { + children.push(jsxWhitespace); + } + + words.shift(); + } + + var endWhitespace; // Ends with whitespace + + if (getLast$4(words) === "") { + words.pop(); + endWhitespace = words.pop(); + } // This was whitespace only without a new line. + + + if (words.length === 0) { + return; + } + + words.forEach(function (word, i) { + if (i % 2 === 1) { + children.push(line$8); + } else { + children.push(word); + } + }); + + if (endWhitespace !== undefined) { + if (/\n/.test(endWhitespace)) { + var _next = n.children[i + 1]; + children.push(separatorWithWhitespace(isFacebookTranslationTag, getLast$4(children), child, _next)); + } else { + children.push(jsxWhitespace); + } + } else { + var _next2 = n.children[i + 1]; + children.push(separatorNoWhitespace(isFacebookTranslationTag, getLast$4(children), child, _next2)); + } + } else if (/\n/.test(text)) { + // Keep (up to one) blank line between tags/expressions/text. + // Note: We don't keep blank lines between text elements. + if (text.match(/\n/g).length > 1) { + children.push(""); + children.push(hardline$8); + } + } else { + children.push(""); + children.push(jsxWhitespace); + } + } else { + var printedChild = print(childPath); + children.push(printedChild); + var _next3 = n.children[i + 1]; + + var directlyFollowedByMeaningfulText = _next3 && isMeaningfulJSXText(_next3); + + if (directlyFollowedByMeaningfulText) { + var firstWord = rawText(_next3).trim().split(matchJsxWhitespaceRegex)[0]; + children.push(separatorNoWhitespace(isFacebookTranslationTag, firstWord, child, _next3)); + } else { + children.push(hardline$8); + } + } + }, "children"); + return children; +} // JSX expands children from the inside-out, instead of the outside-in. +// This is both to break children before attributes, +// and to ensure that when children break, their parents do as well. +// +// Any element that is written without any newlines and fits on a single line +// is left that way. +// Not only that, any user-written-line containing multiple JSX siblings +// should also be kept on one line if possible, +// so each user-written-line is wrapped in its own group. +// +// Elements that contain newlines or don't fit on a single line (recursively) +// are fully-split, using hardline and shouldBreak: true. +// +// To support that case properly, all leading and trailing spaces +// are stripped from the list of children, and replaced with a single hardline. + + +function printJSXElement(path, options, print) { + var n = path.getValue(); // Turn
      into
      + + if (n.type === "JSXElement" && isEmptyJSXElement(n)) { + n.openingElement.selfClosing = true; + return path.call(print, "openingElement"); + } + + var openingLines = n.type === "JSXElement" ? path.call(print, "openingElement") : path.call(print, "openingFragment"); + var closingLines = n.type === "JSXElement" ? path.call(print, "closingElement") : path.call(print, "closingFragment"); + + if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) { + return concat$12([openingLines, concat$12(path.map(print, "children")), closingLines]); + } // Convert `{" "}` to text nodes containing a space. + // This makes it easy to turn them into `jsxWhitespace` which + // can then print as either a space or `{" "}` when breaking. + + + n.children = n.children.map(function (child) { + if (isJSXWhitespaceExpression(child)) { + return { + type: "JSXText", + value: " ", + raw: " " + }; + } + + return child; + }); + var containsTag = n.children.filter(isJSXNode).length > 0; + var containsMultipleExpressions = n.children.filter(function (child) { + return child.type === "JSXExpressionContainer"; + }).length > 1; + var containsMultipleAttributes = n.type === "JSXElement" && n.openingElement.attributes.length > 1; // Record any breaks. Should never go from true to false, only false to true. + + var forcedBreak = willBreak$1(openingLines) || containsTag || containsMultipleAttributes || containsMultipleExpressions; + var rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}'; + var jsxWhitespace = ifBreak$6(concat$12([rawJsxWhitespace, softline$5]), " "); + var isFacebookTranslationTag = n.openingElement && n.openingElement.name && n.openingElement.name.name === "fbt"; + var children = printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag); + var containsText = n.children.filter(function (child) { + return isMeaningfulJSXText(child); + }).length > 0; // We can end up we multiple whitespace elements with empty string + // content between them. + // We need to remove empty whitespace and softlines before JSX whitespace + // to get the correct output. + + for (var i = children.length - 2; i >= 0; i--) { + var isPairOfEmptyStrings = children[i] === "" && children[i + 1] === ""; + var isPairOfHardlines = children[i] === hardline$8 && children[i + 1] === "" && children[i + 2] === hardline$8; + var isLineFollowedByJSXWhitespace = (children[i] === softline$5 || children[i] === hardline$8) && children[i + 1] === "" && children[i + 2] === jsxWhitespace; + var isJSXWhitespaceFollowedByLine = children[i] === jsxWhitespace && children[i + 1] === "" && (children[i + 2] === softline$5 || children[i + 2] === hardline$8); + var isDoubleJSXWhitespace = children[i] === jsxWhitespace && children[i + 1] === "" && children[i + 2] === jsxWhitespace; + var isPairOfHardOrSoftLines = children[i] === softline$5 && children[i + 1] === "" && children[i + 2] === hardline$8 || children[i] === hardline$8 && children[i + 1] === "" && children[i + 2] === softline$5; + + if (isPairOfHardlines && containsText || isPairOfEmptyStrings || isLineFollowedByJSXWhitespace || isDoubleJSXWhitespace || isPairOfHardOrSoftLines) { + children.splice(i, 2); + } else if (isJSXWhitespaceFollowedByLine) { + children.splice(i + 1, 2); + } + } // Trim trailing lines (or empty strings) + + + while (children.length && (isLineNext$1(getLast$4(children)) || isEmpty$1(getLast$4(children)))) { + children.pop(); + } // Trim leading lines (or empty strings) + + + while (children.length && (isLineNext$1(children[0]) || isEmpty$1(children[0])) && (isLineNext$1(children[1]) || isEmpty$1(children[1]))) { + children.shift(); + children.shift(); + } // Tweak how we format children if outputting this element over multiple lines. + // Also detect whether we will force this element to output over multiple lines. + + + var multilineChildren = []; + children.forEach(function (child, i) { + // There are a number of situations where we need to ensure we display + // whitespace as `{" "}` when outputting this element over multiple lines. + if (child === jsxWhitespace) { + if (i === 1 && children[i - 1] === "") { + if (children.length === 2) { + // Solitary whitespace + multilineChildren.push(rawJsxWhitespace); + return; + } // Leading whitespace + + + multilineChildren.push(concat$12([rawJsxWhitespace, hardline$8])); + return; + } else if (i === children.length - 1) { + // Trailing whitespace + multilineChildren.push(rawJsxWhitespace); + return; + } else if (children[i - 1] === "" && children[i - 2] === hardline$8) { + // Whitespace after line break + multilineChildren.push(rawJsxWhitespace); + return; + } + } + + multilineChildren.push(child); + + if (willBreak$1(child)) { + forcedBreak = true; + } + }); // If there is text we use `fill` to fit as much onto each line as possible. + // When there is no text (just tags and expressions) we use `group` + // to output each on a separate line. + + var content = containsText ? fill$4(multilineChildren) : group$10(concat$12(multilineChildren), { + shouldBreak: true + }); + var multiLineElem = group$10(concat$12([openingLines, indent$6(concat$12([hardline$8, content])), hardline$8, closingLines])); + + if (forcedBreak) { + return multiLineElem; + } + + return conditionalGroup$1([group$10(concat$12([openingLines, concat$12(children), closingLines])), multiLineElem]); +} + +function maybeWrapJSXElementInParens(path, elem) { + var parent = path.getParentNode(); + + if (!parent) { + return elem; + } + + var NO_WRAP_PARENTS = { + ArrayExpression: true, + JSXAttribute: true, + JSXElement: true, + JSXExpressionContainer: true, + JSXFragment: true, + TSJsxFragment: true, + ExpressionStatement: true, + CallExpression: true, + OptionalCallExpression: true, + ConditionalExpression: true, + JsExpressionRoot: true + }; + + if (NO_WRAP_PARENTS[parent.type]) { + return elem; + } + + var shouldBreak = matchAncestorTypes$1(path, ["ArrowFunctionExpression", "CallExpression", "JSXExpressionContainer"]); + return group$10(concat$12([ifBreak$6("("), indent$6(concat$12([softline$5, elem])), softline$5, ifBreak$6(")")]), { + shouldBreak: shouldBreak + }); +} + +function isBinaryish(node) { + return node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression"; +} + +function isMemberish(node) { + return node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "BindExpression" && node.object; +} + +function shouldInlineLogicalExpression(node) { + if (node.type !== "LogicalExpression") { + return false; + } + + if (node.right.type === "ObjectExpression" && node.right.properties.length !== 0) { + return true; + } + + if (node.right.type === "ArrayExpression" && node.right.elements.length !== 0) { + return true; + } + + if (isJSXNode(node.right)) { + return true; + } + + return false; +} // For binary expressions to be consistent, we need to group +// subsequent operators with the same precedence level under a single +// group. Otherwise they will be nested such that some of them break +// onto new lines but not all. Operators with the same precedence +// level should either all break or not. Because we group them by +// precedence level and the AST is structured based on precedence +// level, things are naturally broken up correctly, i.e. `&&` is +// broken before `+`. + + +function printBinaryishExpressions(path, print, options, isNested, isInsideParenthesis) { + var parts = []; + var node = path.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same. + + if (isBinaryish(node)) { + // Put all operators with the same precedence level in the same + // group. The reason we only need to do this with the `left` + // expression is because given an expression like `1 + 2 - 3`, it + // is always parsed like `((1 + 2) - 3)`, meaning the `left` side + // is where the rest of the expression will exist. Binary + // expressions on the right side mean they have a difference + // precedence level and should be treated as a separate group, so + // print them normally. (This doesn't hold for the `**` operator, + // which is unique in that it is right-associative.) + if (shouldFlatten$1(node.operator, node.left.operator)) { + // Flatten them out by recursively calling this function. + parts = parts.concat(path.call(function (left) { + return printBinaryishExpressions(left, print, options, + /* isNested */ + true, isInsideParenthesis); + }, "left")); + } else { + parts.push(path.call(print, "left")); + } + + var shouldInline = shouldInlineLogicalExpression(node); + var lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options.parser === "__vue_expression") && !hasLeadingOwnLineComment(options.originalText, node.right, options); + var operator = node.type === "NGPipeExpression" ? "|" : node.operator; + var rightSuffix = node.type === "NGPipeExpression" && node.arguments.length !== 0 ? group$10(indent$6(concat$12([softline$5, ": ", join$7(concat$12([softline$5, ":", ifBreak$6(" ")]), path.map(print, "arguments").map(function (arg) { + return align$1(2, group$10(arg)); + }))]))) : ""; + var right = shouldInline ? concat$12([operator, " ", path.call(print, "right"), rightSuffix]) : concat$12([lineBeforeOperator ? softline$5 : "", operator, lineBeforeOperator ? " " : line$8, path.call(print, "right"), rightSuffix]); // If there's only a single binary expression, we want to create a group + // in order to avoid having a small right part like -1 be on its own line. + + var parent = path.getParentNode(); + var shouldGroup = !(isInsideParenthesis && node.type === "LogicalExpression") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type; + parts.push(" ", shouldGroup ? group$10(right) : right); // The root comments are already printed, but we need to manually print + // the other ones since we don't call the normal print on BinaryExpression, + // only for the left and right parts + + if (isNested && node.comments) { + parts = comments.printComments(path, function () { + return concat$12(parts); + }, options); + } + } else { + // Our stopping case. Simply print the node normally. + parts.push(path.call(print)); + } + + return parts; +} + +function printAssignmentRight(leftNode, rightNode, printedRight, options) { + if (hasLeadingOwnLineComment(options.originalText, rightNode, options)) { + return indent$6(concat$12([hardline$8, printedRight])); + } + + var canBreak = isBinaryish(rightNode) && !shouldInlineLogicalExpression(rightNode) || rightNode.type === "ConditionalExpression" && isBinaryish(rightNode.test) && !shouldInlineLogicalExpression(rightNode.test) || rightNode.type === "StringLiteralTypeAnnotation" || rightNode.type === "ClassExpression" && rightNode.decorators && rightNode.decorators.length || (leftNode.type === "Identifier" || isStringLiteral(leftNode) || leftNode.type === "MemberExpression") && (isStringLiteral(rightNode) || isMemberExpressionChain(rightNode)) && // do not put values on a separate line from the key in json + options.parser !== "json" && options.parser !== "json5"; + + if (canBreak) { + return group$10(indent$6(concat$12([line$8, printedRight]))); + } + + return concat$12([" ", printedRight]); +} + +function printAssignment(leftNode, printedLeft, operator, rightNode, printedRight, options) { + if (!rightNode) { + return printedLeft; + } + + var printed = printAssignmentRight(leftNode, rightNode, printedRight, options); + return group$10(concat$12([printedLeft, operator, printed])); +} + +function adjustClause(node, clause, forceSpace) { + if (node.type === "EmptyStatement") { + return ";"; + } + + if (node.type === "BlockStatement" || forceSpace) { + return concat$12([" ", clause]); + } + + return indent$6(concat$12([line$8, clause])); +} + +function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) { + var raw = rawText(node); + var isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral"; + return printString$2(raw, options, isDirectiveLiteral); +} + +function printRegex(node) { + var flags = node.flags.split("").sort().join(""); + return "/".concat(node.pattern, "/").concat(flags); +} + +function isLastStatement(path) { + var parent = path.getParentNode(); + + if (!parent) { + return true; + } + + var node = path.getValue(); + var body = (parent.body || parent.consequent).filter(function (stmt) { + return stmt.type !== "EmptyStatement"; + }); + return body && body[body.length - 1] === node; +} + +function hasLeadingComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.leading; + }); +} + +function hasTrailingComment(node) { + return node.comments && node.comments.some(function (comment) { + return comment.trailing; + }); +} + +function hasLeadingOwnLineComment(text, node, options) { + if (isJSXNode(node)) { + return hasNodeIgnoreComment$1(node); + } + + var res = node.comments && node.comments.some(function (comment) { + return comment.leading && hasNewline$3(text, options.locEnd(comment)); + }); + return res; +} + +function hasNakedLeftSide(node) { + return node.type === "AssignmentExpression" || node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression" || node.type === "ConditionalExpression" || node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "BindExpression" || node.type === "UpdateExpression" && !node.prefix || node.type === "TSNonNullExpression"; +} + +function isFlowAnnotationComment(text, typeAnnotation, options) { + var start = options.locStart(typeAnnotation); + var end = skipWhitespace$1(text, options.locEnd(typeAnnotation)); + return text.substr(start, 2) === "/*" && text.substr(end, 2) === "*/"; +} + +function getLeftSide(node) { + if (node.expressions) { + return node.expressions[0]; + } + + return node.left || node.test || node.callee || node.object || node.tag || node.argument || node.expression; +} + +function getLeftSidePathName(path, node) { + if (node.expressions) { + return ["expressions", 0]; + } + + if (node.left) { + return ["left"]; + } + + if (node.test) { + return ["test"]; + } + + if (node.object) { + return ["object"]; + } + + if (node.callee) { + return ["callee"]; + } + + if (node.tag) { + return ["tag"]; + } + + if (node.argument) { + return ["argument"]; + } + + if (node.expression) { + return ["expression"]; + } + + throw new Error("Unexpected node has no left side", node); +} + +function exprNeedsASIProtection(path, options) { + var node = path.getValue(); + var maybeASIProblem = needsParens_1(path, options) || node.type === "ParenthesizedExpression" || node.type === "TypeCastExpression" || node.type === "ArrowFunctionExpression" && !shouldPrintParamsWithoutParens(path, options) || node.type === "ArrayExpression" || node.type === "ArrayPattern" || node.type === "UnaryExpression" && node.prefix && (node.operator === "+" || node.operator === "-") || node.type === "TemplateLiteral" || node.type === "TemplateElement" || isJSXNode(node) || node.type === "BindExpression" && !node.object || node.type === "RegExpLiteral" || node.type === "Literal" && node.pattern || node.type === "Literal" && node.regex; + + if (maybeASIProblem) { + return true; + } + + if (!hasNakedLeftSide(node)) { + return false; + } + + return path.call.apply(path, [function (childPath) { + return exprNeedsASIProtection(childPath, options); + }].concat(getLeftSidePathName(path, node))); +} + +function stmtNeedsASIProtection(path, options) { + var node = path.getNode(); + + if (node.type !== "ExpressionStatement") { + return false; + } + + return path.call(function (childPath) { + return exprNeedsASIProtection(childPath, options); + }, "expression"); +} + +function classPropMayCauseASIProblems(path) { + var node = path.getNode(); + + if (node.type !== "ClassProperty") { + return false; + } + + var name = node.key && node.key.name; // this isn't actually possible yet with most parsers available today + // so isn't properly tested yet. + + if ((name === "static" || name === "get" || name === "set") && !node.value && !node.typeAnnotation) { + return true; + } +} + +function classChildNeedsASIProtection(node) { + if (!node) { + return; + } + + if (node.static || node.accessibility // TypeScript + ) { + return false; + } + + if (!node.computed) { + var name = node.key && node.key.name; + + if (name === "in" || name === "instanceof") { + return true; + } + } + + switch (node.type) { + case "ClassProperty": + case "TSAbstractClassProperty": + return node.computed; + + case "MethodDefinition": // Flow + + case "TSAbstractMethodDefinition": // TypeScript + + case "ClassMethod": + { + // Babylon + var isAsync = node.value ? node.value.async : node.async; + var isGenerator = node.value ? node.value.generator : node.generator; + + if (isAsync || node.kind === "get" || node.kind === "set") { + return false; + } + + if (node.computed || isGenerator) { + return true; + } + + return false; + } + + default: + /* istanbul ignore next */ + return false; + } +} // This recurses the return argument, looking for the first token +// (the leftmost leaf node) and, if it (or its parents) has any +// leadingComments, returns true (so it can be wrapped in parens). + + +function returnArgumentHasLeadingComment(options, argument) { + if (hasLeadingOwnLineComment(options.originalText, argument, options)) { + return true; + } + + if (hasNakedLeftSide(argument)) { + var leftMost = argument; + var newLeftMost; + + while (newLeftMost = getLeftSide(leftMost)) { + leftMost = newLeftMost; + + if (hasLeadingOwnLineComment(options.originalText, leftMost, options)) { + return true; + } + } + } + + return false; +} + +function isMemberExpressionChain(node) { + if (node.type !== "MemberExpression" && node.type !== "OptionalMemberExpression") { + return false; + } + + if (node.object.type === "Identifier") { + return true; + } + + return isMemberExpressionChain(node.object); +} // Hack to differentiate between the following two which have the same ast +// type T = { method: () => void }; +// type T = { method(): void }; + + +function isObjectTypePropertyAFunction(node, options) { + return (node.type === "ObjectTypeProperty" || node.type === "ObjectTypeInternalSlot") && node.value.type === "FunctionTypeAnnotation" && !node.static && !isFunctionNotation(node, options); +} // TODO: This is a bad hack and we need a better way to distinguish between +// arrow functions and otherwise + + +function isFunctionNotation(node, options) { + return isGetterOrSetter(node) || sameLocStart(node, node.value, options); +} + +function isGetterOrSetter(node) { + return node.kind === "get" || node.kind === "set"; +} + +function sameLocStart(nodeA, nodeB, options) { + return options.locStart(nodeA) === options.locStart(nodeB); +} // Hack to differentiate between the following two which have the same ast +// declare function f(a): void; +// var f: (a) => void; + + +function isTypeAnnotationAFunction(node, options) { + return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options); +} + +function isNodeStartingWithDeclare(node, options) { + if (!(options.parser === "flow" || options.parser === "typescript")) { + return false; + } + + return options.originalText.slice(0, options.locStart(node)).match(/declare[ \t]*$/) || options.originalText.slice(node.range[0], node.range[1]).startsWith("declare "); +} + +function shouldHugType(node) { + if (isSimpleFlowType(node) || isObjectType(node)) { + return true; + } + + if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") { + var voidCount = node.types.filter(function (n) { + return n.type === "VoidTypeAnnotation" || n.type === "TSVoidKeyword" || n.type === "NullLiteralTypeAnnotation" || n.type === "TSNullKeyword"; + }).length; + var objectCount = node.types.filter(function (n) { + return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral" || // This is a bit aggressive but captures Array<{x}> + n.type === "GenericTypeAnnotation" || n.type === "TSTypeReference"; + }).length; + + if (node.types.length - 1 === voidCount && objectCount > 0) { + return true; + } + } + + return false; +} + +function shouldHugArguments(fun) { + return fun && fun.params && fun.params.length === 1 && !fun.params[0].comments && (fun.params[0].type === "ObjectPattern" || fun.params[0].type === "ArrayPattern" || fun.params[0].type === "Identifier" && fun.params[0].typeAnnotation && (fun.params[0].typeAnnotation.type === "TypeAnnotation" || fun.params[0].typeAnnotation.type === "TSTypeAnnotation") && isObjectType(fun.params[0].typeAnnotation.typeAnnotation) || fun.params[0].type === "FunctionTypeParam" && isObjectType(fun.params[0].typeAnnotation) || fun.params[0].type === "AssignmentPattern" && (fun.params[0].left.type === "ObjectPattern" || fun.params[0].left.type === "ArrayPattern") && (fun.params[0].right.type === "Identifier" || fun.params[0].right.type === "ObjectExpression" && fun.params[0].right.properties.length === 0 || fun.params[0].right.type === "ArrayExpression" && fun.params[0].right.elements.length === 0)) && !fun.rest; +} + +function templateLiteralHasNewLines(template) { + return template.quasis.some(function (quasi) { + return quasi.value.raw.includes("\n"); + }); +} + +function isTemplateOnItsOwnLine(n, text, options) { + return (n.type === "TemplateLiteral" && templateLiteralHasNewLines(n) || n.type === "TaggedTemplateExpression" && templateLiteralHasNewLines(n.quasi)) && !hasNewline$3(text, options.locStart(n), { + backwards: true + }); +} + +function printArrayItems(path, options, printPath, print) { + var printedElements = []; + var separatorParts = []; + path.each(function (childPath) { + printedElements.push(concat$12(separatorParts)); + printedElements.push(group$10(print(childPath))); + separatorParts = [",", line$8]; + + if (childPath.getValue() && isNextLineEmpty$4(options.originalText, childPath.getValue(), options)) { + separatorParts.push(softline$5); + } + }, printPath); + return concat$12(printedElements); +} + +function hasDanglingComments(node) { + return node.comments && node.comments.some(function (comment) { + return !comment.leading && !comment.trailing; + }); +} + +function needsHardlineAfterDanglingComment(node) { + if (!node.comments) { + return false; + } + + var lastDanglingComment = getLast$4(node.comments.filter(function (comment) { + return !comment.leading && !comment.trailing; + })); + return lastDanglingComment && !comments$3.isBlockComment(lastDanglingComment); +} + +function isLiteral(node) { + return node.type === "BooleanLiteral" || node.type === "DirectiveLiteral" || node.type === "Literal" || node.type === "NullLiteral" || node.type === "NumericLiteral" || node.type === "RegExpLiteral" || node.type === "StringLiteral" || node.type === "TemplateLiteral" || node.type === "TSTypeLiteral" || node.type === "JSXText"; +} + +function isNumericLiteral(node) { + return node.type === "NumericLiteral" || node.type === "Literal" && typeof node.value === "number"; +} + +function isStringLiteral(node) { + return node.type === "StringLiteral" || node.type === "Literal" && typeof node.value === "string"; +} + +function isObjectType(n) { + return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral"; +} + +var unitTestRe = /^(skip|[fx]?(it|describe|test))$/; // eg; `describe("some string", (done) => {})` + +function isTestCall(n, parent) { + if (n.type !== "CallExpression") { + return false; + } + + if (n.arguments.length === 1) { + if (isAngularTestWrapper(n) && parent && isTestCall(parent)) { + return isFunctionOrArrowExpression(n.arguments[0]); + } + + if (isUnitTestSetUp(n)) { + return isAngularTestWrapper(n.arguments[0]); + } + } else if (n.arguments.length === 2 || n.arguments.length === 3) { + if ((n.callee.type === "Identifier" && unitTestRe.test(n.callee.name) || isSkipOrOnlyBlock(n)) && (isTemplateLiteral(n.arguments[0]) || isStringLiteral(n.arguments[0]))) { + // it("name", () => { ... }, 2500) + if (n.arguments[2] && !isNumericLiteral(n.arguments[2])) { + return false; + } + + return (n.arguments.length === 2 ? isFunctionOrArrowExpression(n.arguments[1]) : isFunctionOrArrowExpressionWithBody(n.arguments[1]) && n.arguments[1].params.length <= 1) || isAngularTestWrapper(n.arguments[1]); + } + } + + return false; +} + +function isSkipOrOnlyBlock(node) { + return (node.callee.type === "MemberExpression" || node.callee.type === "OptionalMemberExpression") && node.callee.object.type === "Identifier" && node.callee.property.type === "Identifier" && unitTestRe.test(node.callee.object.name) && (node.callee.property.name === "only" || node.callee.property.name === "skip"); +} + +function isTemplateLiteral(node) { + return node.type === "TemplateLiteral"; +} // `inject` is used in AngularJS 1.x, `async` in Angular 2+ +// example: https://docs.angularjs.org/guide/unit-testing#using-beforeall- + + +function isAngularTestWrapper(node) { + return (node.type === "CallExpression" || node.type === "OptionalCallExpression") && node.callee.type === "Identifier" && (node.callee.name === "async" || node.callee.name === "inject" || node.callee.name === "fakeAsync"); +} + +function isFunctionOrArrowExpression(node) { + return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression"; +} + +function isFunctionOrArrowExpressionWithBody(node) { + return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression" && node.body.type === "BlockStatement"; +} + +function isUnitTestSetUp(n) { + var unitTestSetUpRe = /^(before|after)(Each|All)$/; + return n.callee.type === "Identifier" && unitTestSetUpRe.test(n.callee.name) && n.arguments.length === 1; +} + +function isTheOnlyJSXElementInMarkdown(options, path) { + if (options.parentParser !== "markdown" && options.parentParser !== "mdx") { + return false; + } + + var node = path.getNode(); + + if (!node.expression || !isJSXNode(node.expression)) { + return false; + } + + var parent = path.getParentNode(); + return parent.type === "Program" && parent.body.length == 1; +} + +function willPrintOwnComments(path) { + var node = path.getValue(); + var parent = path.getParentNode(); + return (node && (isJSXNode(node) || hasFlowShorthandAnnotationComment(node) || parent && parent.type === "CallExpression" && (hasFlowAnnotationComment(node.leadingComments) || hasFlowAnnotationComment(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && !hasIgnoreComment$3(path); +} + +function canAttachComment$1(node) { + return node.type && node.type !== "CommentBlock" && node.type !== "CommentLine" && node.type !== "Line" && node.type !== "Block" && node.type !== "EmptyStatement" && node.type !== "TemplateElement" && node.type !== "Import" && !(node.callee && node.callee.type === "Import"); +} + +function printComment$2(commentPath, options) { + var comment = commentPath.getValue(); + + switch (comment.type) { + case "CommentBlock": + case "Block": + { + if (isIndentableBlockComment(comment)) { + var printed = printIndentableBlockComment(comment); // We need to prevent an edge case of a previous trailing comment + // printed as a `lineSuffix` which causes the comments to be + // interleaved. See https://github.com/prettier/prettier/issues/4412 + + if (comment.trailing && !hasNewline$3(options.originalText, options.locStart(comment), { + backwards: true + })) { + return concat$12([hardline$8, printed]); + } + + return printed; + } + + var isInsideFlowComment = options.originalText.substr(options.locEnd(comment) - 3, 3) === "*-/"; + return "/*" + comment.value + (isInsideFlowComment ? "*-/" : "*/"); + } + + case "CommentLine": + case "Line": + // Print shebangs with the proper comment characters + if (options.originalText.slice(options.locStart(comment)).startsWith("#!")) { + return "#!" + comment.value.trimRight(); + } + + return "//" + comment.value.trimRight(); + + default: + throw new Error("Not a comment: " + JSON.stringify(comment)); + } +} + +function isIndentableBlockComment(comment) { + // If the comment has multiple lines and every line starts with a star + // we can fix the indentation of each line. The stars in the `/*` and + // `*/` delimiters are not included in the comment value, so add them + // back first. + var lines = "*".concat(comment.value, "*").split("\n"); + return lines.length > 1 && lines.every(function (line) { + return line.trim()[0] === "*"; + }); +} + +function printIndentableBlockComment(comment) { + var lines = comment.value.split("\n"); + return concat$12(["/*", join$7(hardline$8, lines.map(function (line, index) { + return index === 0 ? line.trimRight() : " " + (index < lines.length - 1 ? line.trim() : line.trimLeft()); + })), "*/"]); +} + +function rawText(node) { + return node.extra ? node.extra.raw : node.raw; +} + +function identity$1(x) { + return x; +} + +var printerEstree = { + preprocess: preprocess_1$2, + print: genericPrint$3, + embed: embed_1$2, + insertPragma: insertPragma$7, + massageAstNode: clean_1$2, + hasPrettierIgnore: hasPrettierIgnore$2, + willPrintOwnComments: willPrintOwnComments, + canAttachComment: canAttachComment$1, + printComment: printComment$2, + isBlockComment: comments$3.isBlockComment, + handleComments: { + ownLine: comments$3.handleOwnLineComment, + endOfLine: comments$3.handleEndOfLineComment, + remaining: comments$3.handleRemainingComment + } +}; + +var _require$$0$builders$8 = doc.builders; +var concat$15 = _require$$0$builders$8.concat; +var hardline$10 = _require$$0$builders$8.hardline; +var indent$8 = _require$$0$builders$8.indent; +var join$10 = _require$$0$builders$8.join; + +function genericPrint$4(path, options, print) { + var node = path.getValue(); + + switch (node.type) { + case "JsonRoot": + return concat$15([path.call(print, "node"), hardline$10]); + + case "ArrayExpression": + return node.elements.length === 0 ? "[]" : concat$15(["[", indent$8(concat$15([hardline$10, join$10(concat$15([",", hardline$10]), path.map(print, "elements"))])), hardline$10, "]"]); + + case "ObjectExpression": + return node.properties.length === 0 ? "{}" : concat$15(["{", indent$8(concat$15([hardline$10, join$10(concat$15([",", hardline$10]), path.map(print, "properties"))])), hardline$10, "}"]); + + case "ObjectProperty": + return concat$15([path.call(print, "key"), ": ", path.call(print, "value")]); + + case "UnaryExpression": + return concat$15([node.operator === "+" ? "" : node.operator, path.call(print, "argument")]); + + case "NullLiteral": + return "null"; + + case "BooleanLiteral": + return node.value ? "true" : "false"; + + case "StringLiteral": + case "NumericLiteral": + return JSON.stringify(node.value); + + case "Identifier": + return JSON.stringify(node.name); + + default: + /* istanbul ignore next */ + throw new Error("unknown type: " + JSON.stringify(node.type)); + } +} + +function clean$9(node, newNode +/*, parent*/ +) { + delete newNode.start; + delete newNode.end; + delete newNode.extra; + delete newNode.loc; + delete newNode.comments; + + if (node.type === "Identifier") { + return { + type: "StringLiteral", + value: node.name + }; + } + + if (node.type === "UnaryExpression" && node.operator === "+") { + return newNode.argument; + } +} + +var printerEstreeJson = { + preprocess: preprocess_1$2, + print: genericPrint$4, + massageAstNode: clean$9 +}; + +var CATEGORY_JAVASCRIPT = "JavaScript"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js + +var options$12 = { + arrowParens: { + since: "1.9.0", + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "avoid", + description: "Include parentheses around a sole arrow function parameter.", + choices: [{ + value: "avoid", + description: "Omit parens when possible. Example: `x => x`" + }, { + value: "always", + description: "Always include parens. Example: `(x) => x`" + }] + }, + bracketSpacing: commonOptions.bracketSpacing, + jsxBracketSameLine: { + since: "0.17.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Put > on the last line instead of at a new line." + }, + semi: { + since: "1.0.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: true, + description: "Print semicolons.", + oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." + }, + singleQuote: commonOptions.singleQuote, + jsxSingleQuote: { + since: "1.15.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use single quotes in JSX." + }, + trailingComma: { + since: "0.0.0", + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: [{ + since: "0.0.0", + value: false + }, { + since: "0.19.0", + value: "none" + }], + description: "Print trailing commas wherever possible when multi-line.", + choices: [{ + value: "none", + description: "No trailing commas." + }, { + value: "es5", + description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" + }, { + value: "all", + description: "Trailing commas wherever possible (including function arguments)." + }, { + value: true, + deprecated: "0.19.0", + redirect: "es5" + }, { + value: false, + deprecated: "0.19.0", + redirect: "none" + }] + } +}; + +var name$9 = "JavaScript"; +var type$8 = "programming"; +var tmScope$8 = "source.js"; +var aceMode$8 = "javascript"; +var codemirrorMode$4 = "javascript"; +var codemirrorMimeType$4 = "text/javascript"; +var color$3 = "#f1e05a"; +var aliases$2 = ["js", "node"]; +var extensions$8 = [".js", "._js", ".bones", ".es", ".es6", ".frag", ".gs", ".jake", ".jsb", ".jscad", ".jsfl", ".jsm", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib"]; +var filenames = ["Jakefile"]; +var interpreters = ["node"]; +var languageId$8 = 183; +var javascript = { + name: name$9, + type: type$8, + tmScope: tmScope$8, + aceMode: aceMode$8, + codemirrorMode: codemirrorMode$4, + codemirrorMimeType: codemirrorMimeType$4, + color: color$3, + aliases: aliases$2, + extensions: extensions$8, + filenames: filenames, + interpreters: interpreters, + languageId: languageId$8 +}; + +var javascript$1 = Object.freeze({ + name: name$9, + type: type$8, + tmScope: tmScope$8, + aceMode: aceMode$8, + codemirrorMode: codemirrorMode$4, + codemirrorMimeType: codemirrorMimeType$4, + color: color$3, + aliases: aliases$2, + extensions: extensions$8, + filenames: filenames, + interpreters: interpreters, + languageId: languageId$8, + default: javascript +}); + +var name$10 = "JSX"; +var type$9 = "programming"; +var group$12 = "JavaScript"; +var extensions$9 = [".jsx"]; +var tmScope$9 = "source.js.jsx"; +var aceMode$9 = "javascript"; +var codemirrorMode$5 = "jsx"; +var codemirrorMimeType$5 = "text/jsx"; +var languageId$9 = 178; +var jsx = { + name: name$10, + type: type$9, + group: group$12, + extensions: extensions$9, + tmScope: tmScope$9, + aceMode: aceMode$9, + codemirrorMode: codemirrorMode$5, + codemirrorMimeType: codemirrorMimeType$5, + languageId: languageId$9 +}; + +var jsx$1 = Object.freeze({ + name: name$10, + type: type$9, + group: group$12, + extensions: extensions$9, + tmScope: tmScope$9, + aceMode: aceMode$9, + codemirrorMode: codemirrorMode$5, + codemirrorMimeType: codemirrorMimeType$5, + languageId: languageId$9, + default: jsx +}); + +var name$11 = "TypeScript"; +var type$10 = "programming"; +var color$4 = "#2b7489"; +var aliases$3 = ["ts"]; +var extensions$10 = [".ts", ".tsx"]; +var tmScope$10 = "source.ts"; +var aceMode$10 = "typescript"; +var codemirrorMode$6 = "javascript"; +var codemirrorMimeType$6 = "application/typescript"; +var languageId$10 = 378; +var typescript = { + name: name$11, + type: type$10, + color: color$4, + aliases: aliases$3, + extensions: extensions$10, + tmScope: tmScope$10, + aceMode: aceMode$10, + codemirrorMode: codemirrorMode$6, + codemirrorMimeType: codemirrorMimeType$6, + languageId: languageId$10 +}; + +var typescript$1 = Object.freeze({ + name: name$11, + type: type$10, + color: color$4, + aliases: aliases$3, + extensions: extensions$10, + tmScope: tmScope$10, + aceMode: aceMode$10, + codemirrorMode: codemirrorMode$6, + codemirrorMimeType: codemirrorMimeType$6, + languageId: languageId$10, + default: typescript +}); + +var name$12 = "JSON"; +var type$11 = "data"; +var tmScope$11 = "source.json"; +var group$13 = "JavaScript"; +var aceMode$11 = "json"; +var codemirrorMode$7 = "javascript"; +var codemirrorMimeType$7 = "application/json"; +var searchable = false; +var extensions$11 = [".json", ".avsc", ".geojson", ".gltf", ".JSON-tmLanguage", ".jsonl", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest"]; +var filenames$1 = [".arcconfig", ".htmlhintrc", ".tern-config", ".tern-project", "composer.lock", "mcmod.info"]; +var languageId$11 = 174; +var json$5 = { + name: name$12, + type: type$11, + tmScope: tmScope$11, + group: group$13, + aceMode: aceMode$11, + codemirrorMode: codemirrorMode$7, + codemirrorMimeType: codemirrorMimeType$7, + searchable: searchable, + extensions: extensions$11, + filenames: filenames$1, + languageId: languageId$11 +}; + +var json$6 = Object.freeze({ + name: name$12, + type: type$11, + tmScope: tmScope$11, + group: group$13, + aceMode: aceMode$11, + codemirrorMode: codemirrorMode$7, + codemirrorMimeType: codemirrorMimeType$7, + searchable: searchable, + extensions: extensions$11, + filenames: filenames$1, + languageId: languageId$11, + default: json$5 +}); + +var name$13 = "JSON with Comments"; +var type$12 = "data"; +var group$14 = "JSON"; +var tmScope$12 = "source.js"; +var aceMode$12 = "javascript"; +var codemirrorMode$8 = "javascript"; +var codemirrorMimeType$8 = "text/javascript"; +var aliases$4 = ["jsonc"]; +var extensions$12 = [".sublime-build", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"]; +var filenames$2 = [".babelrc", ".eslintrc.json", ".jscsrc", ".jshintrc", ".jslintrc", "tsconfig.json"]; +var languageId$12 = 423; +var jsonWithComments = { + name: name$13, + type: type$12, + group: group$14, + tmScope: tmScope$12, + aceMode: aceMode$12, + codemirrorMode: codemirrorMode$8, + codemirrorMimeType: codemirrorMimeType$8, + aliases: aliases$4, + extensions: extensions$12, + filenames: filenames$2, + languageId: languageId$12 +}; + +var jsonWithComments$1 = Object.freeze({ + name: name$13, + type: type$12, + group: group$14, + tmScope: tmScope$12, + aceMode: aceMode$12, + codemirrorMode: codemirrorMode$8, + codemirrorMimeType: codemirrorMimeType$8, + aliases: aliases$4, + extensions: extensions$12, + filenames: filenames$2, + languageId: languageId$12, + default: jsonWithComments +}); + +var name$14 = "JSON5"; +var type$13 = "data"; +var extensions$13 = [".json5"]; +var tmScope$13 = "source.js"; +var aceMode$13 = "javascript"; +var codemirrorMode$9 = "javascript"; +var codemirrorMimeType$9 = "application/json"; +var languageId$13 = 175; +var json5 = { + name: name$14, + type: type$13, + extensions: extensions$13, + tmScope: tmScope$13, + aceMode: aceMode$13, + codemirrorMode: codemirrorMode$9, + codemirrorMimeType: codemirrorMimeType$9, + languageId: languageId$13 +}; + +var json5$1 = Object.freeze({ + name: name$14, + type: type$13, + extensions: extensions$13, + tmScope: tmScope$13, + aceMode: aceMode$13, + codemirrorMode: codemirrorMode$9, + codemirrorMimeType: codemirrorMimeType$9, + languageId: languageId$13, + default: json5 +}); + +var require$$0$22 = ( javascript$1 && javascript ) || javascript$1; + +var require$$1$12 = ( jsx$1 && jsx ) || jsx$1; + +var require$$2$11 = ( typescript$1 && typescript ) || typescript$1; + +var require$$3$7 = ( json$6 && json$5 ) || json$6; + +var require$$4$4 = ( jsonWithComments$1 && jsonWithComments ) || jsonWithComments$1; + +var require$$5$1 = ( json5$1 && json5 ) || json5$1; + +var languages$4 = [createLanguage(require$$0$22, { + override: { + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascript"] + }, + extend: { + interpreters: ["nodejs"] + } +}), createLanguage(require$$0$22, { + override: { + name: "Flow", + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascript"], + aliases: [], + filenames: [], + extensions: [".js.flow"] + } +}), createLanguage(require$$1$12, { + override: { + since: "0.0.0", + parsers: ["babylon", "flow"], + vscodeLanguageIds: ["javascriptreact"] + } +}), createLanguage(require$$2$11, { + override: { + since: "1.4.0", + parsers: ["typescript"], + vscodeLanguageIds: ["typescript", "typescriptreact"] + } +}), createLanguage(require$$3$7, { + override: { + name: "JSON.stringify", + since: "1.13.0", + parsers: ["json-stringify"], + vscodeLanguageIds: ["json"], + extensions: [], + // .json file defaults to json instead of json-stringify + filenames: ["package.json", "package-lock.json", "composer.json"] + } +}), createLanguage(require$$3$7, { + override: { + since: "1.5.0", + parsers: ["json"], + vscodeLanguageIds: ["json"] + }, + extend: { + filenames: [".prettierrc"] + } +}), createLanguage(require$$4$4, { + override: { + since: "1.5.0", + parsers: ["json"], + vscodeLanguageIds: ["jsonc"] + }, + extend: { + filenames: [".eslintrc"] + } +}), createLanguage(require$$5$1, { + override: { + since: "1.13.0", + parsers: ["json5"], + vscodeLanguageIds: ["json5"] + } +})]; +var printers$4 = { + estree: printerEstree, + "estree-json": printerEstreeJson +}; +var languageJs = { + languages: languages$4, + options: options$12, + printers: printers$4 +}; + +const json$9 = {"cjkPattern":"[\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\u303f\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312e\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u32fe\\u3300-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fea\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]","kPattern":"[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]","punctuationPattern":"[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0af0\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166d-\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e49\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc9\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]"}; + +var cjkPattern = json$9.cjkPattern; +var kPattern = json$9.kPattern; +var punctuationPattern$1 = json$9.punctuationPattern; +var getLast$5 = util.getLast; +var kRegex = new RegExp(kPattern); +var punctuationRegex = new RegExp(punctuationPattern$1); +/** + * split text into whitespaces and words + * @param {string} text + * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>} + */ + +function splitText$1(text, options) { + var KIND_NON_CJK = "non-cjk"; + var KIND_CJ_LETTER = "cj-letter"; + var KIND_K_LETTER = "k-letter"; + var KIND_CJK_PUNCTUATION = "cjk-punctuation"; + var nodes = []; + (options.proseWrap === "preserve" ? text : text.replace(new RegExp("(".concat(cjkPattern, ")\n(").concat(cjkPattern, ")"), "g"), "$1$2")).split(/([ \t\n]+)/).forEach(function (token, index, tokens) { + // whitespace + if (index % 2 === 1) { + nodes.push({ + type: "whitespace", + value: /\n/.test(token) ? "\n" : " " + }); + return; + } // word separated by whitespace + + + if ((index === 0 || index === tokens.length - 1) && token === "") { + return; + } + + token.split(new RegExp("(".concat(cjkPattern, ")"))).forEach(function (innerToken, innerIndex, innerTokens) { + if ((innerIndex === 0 || innerIndex === innerTokens.length - 1) && innerToken === "") { + return; + } // non-CJK word + + + if (innerIndex % 2 === 0) { + if (innerToken !== "") { + appendNode({ + type: "word", + value: innerToken, + kind: KIND_NON_CJK, + hasLeadingPunctuation: punctuationRegex.test(innerToken[0]), + hasTrailingPunctuation: punctuationRegex.test(getLast$5(innerToken)) + }); + } + + return; + } // CJK character + + + appendNode(punctuationRegex.test(innerToken) ? { + type: "word", + value: innerToken, + kind: KIND_CJK_PUNCTUATION, + hasLeadingPunctuation: true, + hasTrailingPunctuation: true + } : { + type: "word", + value: innerToken, + kind: kRegex.test(innerToken) ? KIND_K_LETTER : KIND_CJ_LETTER, + hasLeadingPunctuation: false, + hasTrailingPunctuation: false + }); + }); + }); + return nodes; + + function appendNode(node) { + var lastNode = getLast$5(nodes); + + if (lastNode && lastNode.type === "word") { + if (lastNode.kind === KIND_NON_CJK && node.kind === KIND_CJ_LETTER && !lastNode.hasTrailingPunctuation || lastNode.kind === KIND_CJ_LETTER && node.kind === KIND_NON_CJK && !node.hasLeadingPunctuation) { + nodes.push({ + type: "whitespace", + value: " " + }); + } else if (!isBetween(KIND_NON_CJK, KIND_CJK_PUNCTUATION) && // disallow leading/trailing full-width whitespace + ![lastNode.value, node.value].some(function (value) { + return /\u3000/.test(value); + })) { + nodes.push({ + type: "whitespace", + value: "" + }); + } + } + + nodes.push(node); + + function isBetween(kind1, kind2) { + return lastNode.kind === kind1 && node.kind === kind2 || lastNode.kind === kind2 && node.kind === kind1; + } + } +} + +function getOrderedListItemInfo$1(orderListItem, originalText) { + var _originalText$slice$m = originalText.slice(orderListItem.position.start.offset, orderListItem.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/), + _originalText$slice$m2 = _slicedToArray(_originalText$slice$m, 4), + numberText = _originalText$slice$m2[1], + marker = _originalText$slice$m2[2], + leadingSpaces = _originalText$slice$m2[3]; + + return { + numberText: numberText, + marker: marker, + leadingSpaces: leadingSpaces + }; +} // workaround for https://github.com/remarkjs/remark/issues/351 +// leading and trailing newlines are stripped by remark + + +function getFencedCodeBlockValue$2(node, originalText) { + var text = originalText.slice(node.position.start.offset, node.position.end.offset); + var leadingSpaceCount = text.match(/^\s*/)[0].length; + var replaceRegex = new RegExp("^\\s{0,".concat(leadingSpaceCount, "}")); + var lineContents = text.replace(/\r\n?/g, "\n").split("\n"); + var markerStyle = text[leadingSpaceCount]; // ` or ~ + + var marker = text.slice(leadingSpaceCount).match(new RegExp("^[".concat(markerStyle, "]+")))[0]; // https://spec.commonmark.org/0.28/#example-104: Closing fences may be indented by 0-3 spaces + // https://spec.commonmark.org/0.28/#example-93: The closing code fence must be at least as long as the opening fence + + var hasEndMarker = new RegExp("^\\s{0,3}".concat(marker)).test(lineContents[lineContents.length - 1].slice(getIndent(lineContents.length - 1))); + return lineContents.slice(1, hasEndMarker ? -1 : undefined).map(function (x, i) { + return x.slice(getIndent(i + 1)).replace(replaceRegex, ""); + }).join("\n"); + + function getIndent(lineIndex) { + return node.position.indent[lineIndex - 1] - 1; + } +} + +function mapAst(ast, handler) { + return function preorder(node, index, parentStack) { + parentStack = parentStack || []; + var newNode = Object.assign({}, handler(node, index, parentStack)); + + if (newNode.children) { + newNode.children = newNode.children.map(function (child, index) { + return preorder(child, index, [newNode].concat(parentStack)); + }); + } + + return newNode; + }(ast, null, null); +} + +var utils$8 = { + mapAst: mapAst, + splitText: splitText$1, + punctuationPattern: punctuationPattern$1, + getFencedCodeBlockValue: getFencedCodeBlockValue$2, + getOrderedListItemInfo: getOrderedListItemInfo$1 +}; + +var _require$$0$builders$10 = doc.builders; +var hardline$12 = _require$$0$builders$10.hardline; +var literalline$6 = _require$$0$builders$10.literalline; +var concat$17 = _require$$0$builders$10.concat; +var markAsRoot$4 = _require$$0$builders$10.markAsRoot; +var mapDoc$7 = doc.utils.mapDoc; +var getFencedCodeBlockValue$1 = utils$8.getFencedCodeBlockValue; + +function embed$6(path, print, textToDoc, options) { + var node = path.getValue(); + + if (node.type === "code" && node.lang !== null) { + // only look for the first string so as to support [markdown-preview-enhanced](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk) + var langMatch = node.lang.match(/^[A-Za-z0-9_-]+/); + var lang = langMatch ? langMatch[0] : ""; + var parser = getParserName(lang); + + if (parser) { + var styleUnit = options.__inJsTemplate ? "~" : "`"; + var style = styleUnit.repeat(Math.max(3, util.getMaxContinuousCount(node.value, styleUnit) + 1)); + var doc$$2 = textToDoc(getFencedCodeBlockValue$1(node, options.originalText), { + parser: parser + }); + return markAsRoot$4(concat$17([style, node.lang, hardline$12, replaceNewlinesWithLiterallines(doc$$2), style])); + } + } + + if (node.type === "yaml") { + return markAsRoot$4(concat$17(["---", hardline$12, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, { + parser: "yaml" + })) : "", "---"])); + } // MDX + + + switch (node.type) { + case "importExport": + return textToDoc(node.value, { + parser: "babylon" + }); + + case "jsx": + return textToDoc(node.value, { + parser: "__js_expression" + }); + } + + return null; + + function getParserName(lang) { + var supportInfo = support.getSupportInfo(null, { + plugins: options.plugins + }); + var language = supportInfo.languages.find(function (language) { + return language.name.toLowerCase() === lang || language.aliases && language.aliases.indexOf(lang) !== -1 || language.extensions && language.extensions.find(function (ext) { + return ext.substring(1) === lang; + }); + }); + + if (language) { + return language.parsers[0]; + } + + return null; + } + + function replaceNewlinesWithLiterallines(doc$$2) { + return mapDoc$7(doc$$2, function (currentDoc) { + return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$17(currentDoc.split(/(\n)/g).map(function (v, i) { + return i % 2 === 0 ? v : literalline$6; + })) : currentDoc; + }); + } +} + +var embed_1$4 = embed$6; + +var pragma$8 = createCommonjsModule(function (module) { + "use strict"; + + var pragmas = ["format", "prettier"]; + + function startWithPragma(text) { + var pragma = "@(".concat(pragmas.join("|"), ")"); + var regex = new RegExp([""), "")].join("|"), "m"); + var matched = text.match(regex); + return matched && matched.index === 0; + } + + module.exports = { + startWithPragma: startWithPragma, + hasPragma: function hasPragma(text) { + return startWithPragma(frontMatter(text).content.trimLeft()); + }, + insertPragma: function insertPragma(text) { + var extracted = frontMatter(text); + var pragma = ""); + return extracted.frontMatter ? "".concat(extracted.frontMatter.raw, "\n\n").concat(pragma, "\n\n").concat(extracted.content) : "".concat(pragma, "\n\n").concat(extracted.content); + } + }; +}); + +var getOrderedListItemInfo$2 = utils$8.getOrderedListItemInfo; +var mapAst$1 = utils$8.mapAst; +var splitText$2 = utils$8.splitText; // 0x0 ~ 0x10ffff + +var isSingleCharRegex = /^([\u0000-\uffff]|[\ud800-\udbff][\udc00-\udfff])$/; + +function preprocess$4(ast, options) { + ast = restoreUnescapedCharacter(ast, options); + ast = mergeContinuousTexts(ast); + ast = transformInlineCode(ast); + ast = transformIndentedCodeblockAndMarkItsParentList(ast, options); + ast = markAlignedList(ast, options); + ast = splitTextIntoSentences(ast, options); + ast = transformImportExport(ast); + ast = mergeContinuousImportExport(ast); + return ast; +} + +function transformImportExport(ast) { + return mapAst$1(ast, function (node) { + if (node.type !== "import" && node.type !== "export") { + return node; + } + + return Object.assign({}, node, { + type: "importExport" + }); + }); +} + +function transformInlineCode(ast) { + return mapAst$1(ast, function (node) { + if (node.type !== "inlineCode") { + return node; + } + + return Object.assign({}, node, { + value: node.value.replace(/\s+/g, " ") + }); + }); +} + +function restoreUnescapedCharacter(ast, options) { + return mapAst$1(ast, function (node) { + return node.type !== "text" ? node : Object.assign({}, node, { + value: node.value !== "*" && node.value !== "_" && node.value !== "$" && // handle these cases in printer + isSingleCharRegex.test(node.value) && node.position.end.offset - node.position.start.offset !== node.value.length ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : node.value + }); + }); +} + +function mergeContinuousImportExport(ast) { + return mergeChildren(ast, function (prevNode, node) { + return prevNode.type === "importExport" && node.type === "importExport"; + }, function (prevNode, node) { + return { + type: "importExport", + value: prevNode.value + "\n\n" + node.value, + position: { + start: prevNode.position.start, + end: node.position.end + } + }; + }); +} + +function mergeChildren(ast, shouldMerge, mergeNode) { + return mapAst$1(ast, function (node) { + if (!node.children) { + return node; + } + + var children = node.children.reduce(function (current, child) { + var lastChild = current[current.length - 1]; + + if (lastChild && shouldMerge(lastChild, child)) { + current.splice(-1, 1, mergeNode(lastChild, child)); + } else { + current.push(child); + } + + return current; + }, []); + return Object.assign({}, node, { + children: children + }); + }); +} + +function mergeContinuousTexts(ast) { + return mergeChildren(ast, function (prevNode, node) { + return prevNode.type === "text" && node.type === "text"; + }, function (prevNode, node) { + return { + type: "text", + value: prevNode.value + node.value, + position: { + start: prevNode.position.start, + end: node.position.end + } + }; + }); +} + +function splitTextIntoSentences(ast, options) { + return mapAst$1(ast, function (node, index, _ref) { + var _ref2 = _slicedToArray(_ref, 1), + parentNode = _ref2[0]; + + if (node.type !== "text") { + return node; + } + + var value = node.value; + + if (parentNode.type === "paragraph") { + if (index === 0) { + value = value.trimLeft(); + } + + if (index === parentNode.children.length - 1) { + value = value.trimRight(); + } + } + + return { + type: "sentence", + position: node.position, + children: splitText$2(value, options) + }; + }); +} + +function transformIndentedCodeblockAndMarkItsParentList(ast, options) { + return mapAst$1(ast, function (node, index, parentStack) { + if (node.type === "code") { + // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it + var isIndented = /^\n?( {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset)); + node.isIndented = isIndented; + + if (isIndented) { + for (var i = 0; i < parentStack.length; i++) { + var parent = parentStack[i]; // no need to check checked items + + if (parent.hasIndentedCodeblock) { + break; + } + + if (parent.type === "list") { + parent.hasIndentedCodeblock = true; + } + } + } + } + + return node; + }); +} + +function markAlignedList(ast, options) { + return mapAst$1(ast, function (node, index, parentStack) { + if (node.type === "list" && node.children.length !== 0) { + // if one of its parents is not aligned, it's not possible to be aligned in sub-lists + for (var i = 0; i < parentStack.length; i++) { + var parent = parentStack[i]; + + if (parent.type === "list" && !parent.isAligned) { + node.isAligned = false; + return node; + } + } + + node.isAligned = isAligned(node); + } + + return node; + }); + + function getListItemStart(listItem) { + return listItem.children.length === 0 ? -1 : listItem.children[0].position.start.column - 1; + } + + function isAligned(list) { + if (!list.ordered) { + /** + * - 123 + * - 123 + */ + return true; + } + + var _list$children = _slicedToArray(list.children, 2), + firstItem = _list$children[0], + secondItem = _list$children[1]; + + var firstInfo = getOrderedListItemInfo$2(firstItem, options.originalText); + + if (firstInfo.leadingSpaces.length > 1) { + /** + * 1. 123 + * + * 1. 123 + * 1. 123 + */ + return true; + } + + var firstStart = getListItemStart(firstItem); + + if (firstStart === -1) { + /** + * 1. + * + * 1. + * 1. + */ + return false; + } + + if (list.children.length === 1) { + /** + * aligned: + * + * 11. 123 + * + * not aligned: + * + * 1. 123 + */ + return firstStart % options.tabWidth === 0; + } + + var secondStart = getListItemStart(secondItem); + + if (firstStart !== secondStart) { + /** + * 11. 123 + * 1. 123 + * + * 1. 123 + * 11. 123 + */ + return false; + } + + if (firstStart % options.tabWidth === 0) { + /** + * 11. 123 + * 12. 123 + */ + return true; + } + /** + * aligned: + * + * 11. 123 + * 1. 123 + * + * not aligned: + * + * 1. 123 + * 2. 123 + */ + + + var secondInfo = getOrderedListItemInfo$2(secondItem, options.originalText); + return secondInfo.leadingSpaces.length > 1; + } +} + +var preprocess_1$4 = preprocess$4; + +var _require$$0$builders$9 = doc.builders; +var concat$16 = _require$$0$builders$9.concat; +var join$11 = _require$$0$builders$9.join; +var line$10 = _require$$0$builders$9.line; +var literalline$5 = _require$$0$builders$9.literalline; +var markAsRoot$3 = _require$$0$builders$9.markAsRoot; +var hardline$11 = _require$$0$builders$9.hardline; +var softline$7 = _require$$0$builders$9.softline; +var fill$5 = _require$$0$builders$9.fill; +var align$2 = _require$$0$builders$9.align; +var indent$9 = _require$$0$builders$9.indent; +var group$15 = _require$$0$builders$9.group; +var mapDoc$6 = doc.utils.mapDoc; +var printDocToString$2 = doc.printer.printDocToString; +var getFencedCodeBlockValue = utils$8.getFencedCodeBlockValue; +var getOrderedListItemInfo = utils$8.getOrderedListItemInfo; +var splitText = utils$8.splitText; +var punctuationPattern = utils$8.punctuationPattern; +var TRAILING_HARDLINE_NODES = ["importExport"]; +var SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"]; +var SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"]; +var INLINE_NODE_TYPES = ["liquidNode", "inlineCode", "emphasis", "strong", "delete", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"]; +var INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat(["tableCell", "paragraph", "heading"]); + +function genericPrint$5(path, options, print) { + var node = path.getValue(); + + if (shouldRemainTheSameContent(path)) { + return concat$16(splitText(options.originalText.slice(node.position.start.offset, node.position.end.offset), options).map(function (node) { + return node.type === "word" ? node.value : node.value === "" ? "" : printLine(path, node.value, options); + })); + } + + switch (node.type) { + case "root": + if (node.children.length === 0) { + return ""; + } + + return concat$16([normalizeDoc(printRoot(path, options, print)), TRAILING_HARDLINE_NODES.indexOf(getLastDescendantNode(node).type) === -1 ? hardline$11 : ""]); + + case "paragraph": + return printChildren$1(path, options, print, { + postprocessor: fill$5 + }); + + case "sentence": + return printChildren$1(path, options, print); + + case "word": + return node.value.replace(/[*$]/g, "\\$&") // escape all `*` and `$` (math) + .replace(new RegExp(["(^|".concat(punctuationPattern, ")(_+)"), "(_+)(".concat(punctuationPattern, "|$)")].join("|"), "g"), function (_, text1, underscore1, underscore2, text2) { + return (underscore1 ? "".concat(text1).concat(underscore1) : "".concat(underscore2).concat(text2)).replace(/_/g, "\\_"); + }); + // escape all `_` except concating with non-punctuation, e.g. `1_2_3` is not considered emphasis + + case "whitespace": + { + var parentNode = path.getParentNode(); + var index = parentNode.children.indexOf(node); + var nextNode = parentNode.children[index + 1]; + var proseWrap = // leading char that may cause different syntax + nextNode && /^>|^([-+*]|#{1,6}|[0-9]+[.)])$/.test(nextNode.value) ? "never" : options.proseWrap; + return printLine(path, node.value, { + proseWrap: proseWrap + }); + } + + case "emphasis": + { + var _parentNode = path.getParentNode(); + + var _index = _parentNode.children.indexOf(node); + + var prevNode = _parentNode.children[_index - 1]; + var _nextNode = _parentNode.children[_index + 1]; + var hasPrevOrNextWord = // `1*2*3` is considered emphais but `1_2_3` is not + prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && util.getLast(prevNode.children).type === "word" && !util.getLast(prevNode.children).hasTrailingPunctuation || _nextNode && _nextNode.type === "sentence" && _nextNode.children.length > 0 && _nextNode.children[0].type === "word" && !_nextNode.children[0].hasLeadingPunctuation; + var style = hasPrevOrNextWord || getAncestorNode$2(path, "emphasis") ? "*" : "_"; + return concat$16([style, printChildren$1(path, options, print), style]); + } + + case "strong": + return concat$16(["**", printChildren$1(path, options, print), "**"]); + + case "delete": + return concat$16(["~~", printChildren$1(path, options, print), "~~"]); + + case "inlineCode": + { + var backtickCount = util.getMaxContinuousCount(node.value, "`"); + + var _style = backtickCount === 1 ? "``" : "`"; + + var gap = backtickCount ? " " : ""; + return concat$16([_style, gap, node.value, gap, _style]); + } + + case "link": + switch (options.originalText[node.position.start.offset]) { + case "<": + { + var mailto = "mailto:"; + var url = // is parsed as { url: "mailto:hello@example.com" } + node.url.startsWith(mailto) && options.originalText.slice(node.position.start.offset + 1, node.position.start.offset + 1 + mailto.length) !== mailto ? node.url.slice(mailto.length) : node.url; + return concat$16(["<", url, ">"]); + } + + case "[": + return concat$16(["[", printChildren$1(path, options, print), "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]); + + default: + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + } + + case "image": + return concat$16(["![", node.alt || "", "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]); + + case "blockquote": + return concat$16(["> ", align$2("> ", printChildren$1(path, options, print))]); + + case "heading": + return concat$16(["#".repeat(node.depth) + " ", printChildren$1(path, options, print)]); + + case "code": + { + if (node.isIndented) { + // indented code block + var alignment = " ".repeat(4); + return align$2(alignment, concat$16([alignment, replaceNewlinesWith(node.value, hardline$11)])); + } // fenced code block + + + var styleUnit = options.__inJsTemplate ? "~" : "`"; + + var _style2 = styleUnit.repeat(Math.max(3, util.getMaxContinuousCount(node.value, styleUnit) + 1)); + + return concat$16([_style2, node.lang || "", hardline$11, replaceNewlinesWith(getFencedCodeBlockValue(node, options.originalText), hardline$11), hardline$11, _style2]); + } + + case "yaml": + case "toml": + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + + case "html": + { + var _parentNode2 = path.getParentNode(); + + var value = _parentNode2.type === "root" && util.getLast(_parentNode2.children) === node ? node.value.trimRight() : node.value; + var isHtmlComment = /^$/.test(value); + return replaceNewlinesWith(value, isHtmlComment ? hardline$11 : markAsRoot$3(literalline$5)); + } + + case "list": + { + var nthSiblingIndex = getNthListSiblingIndex(node, path.getParentNode()); + var isGitDiffFriendlyOrderedList = node.ordered && node.children.length > 1 && +getOrderedListItemInfo(node.children[1], options.originalText).numberText === 1; + return printChildren$1(path, options, print, { + processor: function processor(childPath, index) { + var prefix = getPrefix(); + return concat$16([prefix, align$2(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))]); + + function getPrefix() { + var rawPrefix = node.ordered ? (index === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* "; + return node.isAligned || + /* workaround for https://github.com/remarkjs/remark/issues/315 */ + node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix; + } + } + }); + } + + case "thematicBreak": + { + var counter = getAncestorCounter$1(path, "list"); + + if (counter === -1) { + return "---"; + } + + var _nthSiblingIndex = getNthListSiblingIndex(path.getParentNode(counter), path.getParentNode(counter + 1)); + + return _nthSiblingIndex % 2 === 0 ? "***" : "---"; + } + + case "linkReference": + return concat$16(["[", printChildren$1(path, options, print), "]", node.referenceType === "full" ? concat$16(["[", node.identifier, "]"]) : node.referenceType === "collapsed" ? "[]" : ""]); + + case "imageReference": + switch (node.referenceType) { + case "full": + return concat$16(["![", node.alt || "", "][", node.identifier, "]"]); + + default: + return concat$16(["![", node.alt, "]", node.referenceType === "collapsed" ? "[]" : ""]); + } + + case "definition": + { + var lineOrSpace = options.proseWrap === "always" ? line$10 : " "; + return group$15(concat$16([concat$16(["[", node.identifier, "]:"]), indent$9(concat$16([lineOrSpace, printUrl(node.url), node.title === null ? "" : concat$16([lineOrSpace, printTitle(node.title, options, false)])]))])); + } + + case "footnote": + return concat$16(["[^", printChildren$1(path, options, print), "]"]); + + case "footnoteReference": + return concat$16(["[^", node.identifier, "]"]); + + case "footnoteDefinition": + { + var _nextNode2 = path.getParentNode().children[path.getName() + 1]; + var shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line); + return concat$16(["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren$1(path, options, print) : group$15(concat$16([align$2(" ".repeat(options.tabWidth), printChildren$1(path, options, print, { + processor: function processor(childPath, index) { + return index === 0 ? group$15(concat$16([softline$7, softline$7, childPath.call(print)])) : childPath.call(print); + } + })), _nextNode2 && _nextNode2.type === "footnoteDefinition" ? softline$7 : ""]))]); + } + + case "table": + return printTable(path, options, print); + + case "tableCell": + return printChildren$1(path, options, print); + + case "break": + return /\s/.test(options.originalText[node.position.start.offset]) ? concat$16([" ", markAsRoot$3(literalline$5)]) : concat$16(["\\", hardline$11]); + + case "liquidNode": + return replaceNewlinesWith(node.value, hardline$11); + // MDX + + case "importExport": + case "jsx": + return node.value; + // fallback to the original text if multiparser failed + + case "math": + return concat$16(["$$", hardline$11, node.value ? concat$16([replaceNewlinesWith(node.value, hardline$11), hardline$11]) : "", "$$"]); + + case "inlineMath": + { + // $$math$$ can be block math in some variants + // see https://github.com/Rokt33r/remark-math#double-dollars-in-inline + var _style3 = options.originalText[node.position.start.offset + 1] === "$" ? "$$" : "$"; + + return concat$16([_style3, node.value, _style3]); + } + + case "tableRow": // handled in "table" + + case "listItem": // handled in "list" + + default: + throw new Error("Unknown markdown type ".concat(JSON.stringify(node.type))); + } +} + +function printListItem(path, options, print, listPrefix) { + var node = path.getValue(); + var prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] "; + return concat$16([prefix, printChildren$1(path, options, print, { + processor: function processor(childPath, index) { + if (index === 0 && childPath.getValue().type !== "list") { + return align$2(" ".repeat(prefix.length), childPath.call(print)); + } + + var alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block + ); + return concat$16([alignment, align$2(alignment, childPath.call(print))]); + } + })]); +} + +function alignListPrefix(prefix, options) { + var additionalSpaces = getAdditionalSpaces(); + return prefix + " ".repeat(additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block + ); + + function getAdditionalSpaces() { + var restSpaces = prefix.length % options.tabWidth; + return restSpaces === 0 ? 0 : options.tabWidth - restSpaces; + } +} + +function getNthListSiblingIndex(node, parentNode) { + return getNthSiblingIndex(node, parentNode, function (siblingNode) { + return siblingNode.ordered === node.ordered; + }); +} + +function replaceNewlinesWith(str, doc$$2) { + return join$11(doc$$2, str.replace(/\r\n?/g, "\n").split("\n")); +} + +function getNthSiblingIndex(node, parentNode, condition) { + condition = condition || function () { + return true; + }; + + var index = -1; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = parentNode.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var childNode = _step.value; + + if (childNode.type === node.type && condition(childNode)) { + index++; + } else { + index = -1; + } + + if (childNode === node) { + return index; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +} + +function getAncestorCounter$1(path, typeOrTypes) { + var types = [].concat(typeOrTypes); + var counter = -1; + var ancestorNode; + + while (ancestorNode = path.getParentNode(++counter)) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode$2(path, typeOrTypes) { + var counter = getAncestorCounter$1(path, typeOrTypes); + return counter === -1 ? null : path.getParentNode(counter); +} + +function printLine(path, value, options) { + if (options.proseWrap === "preserve" && value === "\n") { + return hardline$11; + } + + var isBreakable = options.proseWrap === "always" && !getAncestorNode$2(path, SINGLE_LINE_NODE_TYPES); + return value !== "" ? isBreakable ? line$10 : " " : isBreakable ? softline$7 : ""; +} + +function printTable(path, options, print) { + var node = path.getValue(); + var contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } } + + path.map(function (rowPath) { + var rowContents = []; + rowPath.map(function (cellPath) { + rowContents.push(printDocToString$2(cellPath.call(print), options).formatted); + }, "children"); + contents.push(rowContents); + }, "children"); + var columnMaxWidths = contents.reduce(function (currentWidths, rowContents) { + return currentWidths.map(function (width, columnIndex) { + return Math.max(width, util.getStringWidth(rowContents[columnIndex])); + }); + }, contents[0].map(function () { + return 3; + }) // minimum width = 3 (---, :--, :-:, --:) + ); + return join$11(hardline$11, [printRow(contents[0]), printSeparator(), join$11(hardline$11, contents.slice(1).map(printRow))]); + + function printSeparator() { + return concat$16(["| ", join$11(" | ", columnMaxWidths.map(function (width, index) { + switch (node.align[index]) { + case "left": + return ":" + "-".repeat(width - 1); + + case "right": + return "-".repeat(width - 1) + ":"; + + case "center": + return ":" + "-".repeat(width - 2) + ":"; + + default: + return "-".repeat(width); + } + })), " |"]); + } + + function printRow(rowContents) { + return concat$16(["| ", join$11(" | ", rowContents.map(function (rowContent, columnIndex) { + switch (node.align[columnIndex]) { + case "right": + return alignRight(rowContent, columnMaxWidths[columnIndex]); + + case "center": + return alignCenter(rowContent, columnMaxWidths[columnIndex]); + + default: + return alignLeft(rowContent, columnMaxWidths[columnIndex]); + } + })), " |"]); + } + + function alignLeft(text, width) { + return concat$16([text, " ".repeat(width - util.getStringWidth(text))]); + } + + function alignRight(text, width) { + return concat$16([" ".repeat(width - util.getStringWidth(text)), text]); + } + + function alignCenter(text, width) { + var spaces = width - util.getStringWidth(text); + var left = Math.floor(spaces / 2); + var right = spaces - left; + return concat$16([" ".repeat(left), text, " ".repeat(right)]); + } +} + +function printRoot(path, options, print) { + /** @typedef {{ index: number, offset: number }} IgnorePosition */ + + /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */ + var ignoreRanges = []; + /** @type {IgnorePosition | null} */ + + var ignoreStart = null; + var children = path.getValue().children; + children.forEach(function (childNode, index) { + switch (isPrettierIgnore$1(childNode)) { + case "start": + if (ignoreStart === null) { + ignoreStart = { + index: index, + offset: childNode.position.end.offset + }; + } + + break; + + case "end": + if (ignoreStart !== null) { + ignoreRanges.push({ + start: ignoreStart, + end: { + index: index, + offset: childNode.position.start.offset + } + }); + ignoreStart = null; + } + + break; + + default: + // do nothing + break; + } + }); + return printChildren$1(path, options, print, { + processor: function processor(childPath, index) { + if (ignoreRanges.length !== 0) { + var ignoreRange = ignoreRanges[0]; + + if (index === ignoreRange.start.index) { + return concat$16([children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value]); + } + + if (ignoreRange.start.index < index && index < ignoreRange.end.index) { + return false; + } + + if (index === ignoreRange.end.index) { + ignoreRanges.shift(); + return false; + } + } + + return childPath.call(print); + } + }); +} + +function printChildren$1(path, options, print, events) { + events = events || {}; + var postprocessor = events.postprocessor || concat$16; + + var processor = events.processor || function (childPath) { + return childPath.call(print); + }; + + var node = path.getValue(); + var parts = []; + var lastChildNode; + path.map(function (childPath, index) { + var childNode = childPath.getValue(); + var result = processor(childPath, index); + + if (result !== false) { + var data = { + parts: parts, + prevNode: lastChildNode, + parentNode: node, + options: options + }; + + if (!shouldNotPrePrintHardline(childNode, data)) { + parts.push(hardline$11); + + if (lastChildNode && TRAILING_HARDLINE_NODES.indexOf(lastChildNode.type) !== -1) { + if (shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$11); + } + } else { + if (shouldPrePrintDoubleHardline(childNode, data) || shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$11); + } + + if (shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$11); + } + } + } + + parts.push(result); + lastChildNode = childNode; + } + }, "children"); + return postprocessor(parts); +} + +function getLastDescendantNode(node) { + var current = node; + + while (current.children && current.children.length !== 0) { + current = current.children[current.children.length - 1]; + } + + return current; +} +/** @return {false | 'next' | 'start' | 'end'} */ + + +function isPrettierIgnore$1(node) { + if (node.type !== "html") { + return false; + } + + var match = node.value.match(/^$/); + return match === null ? false : match[1] ? match[1] : "next"; +} + +function shouldNotPrePrintHardline(node, data) { + var isFirstNode = data.parts.length === 0; + var isInlineNode = INLINE_NODE_TYPES.indexOf(node.type) !== -1; + var isInlineHTML = node.type === "html" && INLINE_NODE_WRAPPER_TYPES.indexOf(data.parentNode.type) !== -1; + return isFirstNode || isInlineNode || isInlineHTML; +} + +function shouldPrePrintDoubleHardline(node, data) { + var isSequence = (data.prevNode && data.prevNode.type) === node.type; + var isSiblingNode = isSequence && SIBLING_NODE_TYPES.indexOf(node.type) !== -1; + var isInTightListItem = data.parentNode.type === "listItem" && !data.parentNode.loose; + var isPrevNodeLooseListItem = data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose; + var isPrevNodePrettierIgnore = isPrettierIgnore$1(data.prevNode) === "next"; + var isBlockHtmlWithoutBlankLineBetweenPrevHtml = node.type === "html" && data.prevNode && data.prevNode.type === "html" && data.prevNode.position.end.line + 1 === node.position.start.line; + return isPrevNodeLooseListItem || !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || isBlockHtmlWithoutBlankLineBetweenPrevHtml); +} + +function shouldPrePrintTripleHardline(node, data) { + var isPrevNodeList = data.prevNode && data.prevNode.type === "list"; + var isIndentedCode = node.type === "code" && node.isIndented; + return isPrevNodeList && isIndentedCode; +} + +function shouldRemainTheSameContent(path) { + var ancestorNode = getAncestorNode$2(path, ["linkReference", "imageReference"]); + return ancestorNode && (ancestorNode.type !== "linkReference" || ancestorNode.referenceType !== "full"); +} + +function normalizeDoc(doc$$2) { + return mapDoc$6(doc$$2, function (currentDoc) { + if (!currentDoc.parts) { + return currentDoc; + } + + if (currentDoc.type === "concat" && currentDoc.parts.length === 1) { + return currentDoc.parts[0]; + } + + var parts = []; + currentDoc.parts.forEach(function (part) { + if (part.type === "concat") { + parts.push.apply(parts, part.parts); + } else if (part !== "") { + parts.push(part); + } + }); + return Object.assign({}, currentDoc, { + parts: normalizeParts$2(parts) + }); + }); +} + +function printUrl(url, dangerousCharOrChars) { + var dangerousChars = [" "].concat(dangerousCharOrChars || []); + return new RegExp(dangerousChars.map(function (x) { + return "\\".concat(x); + }).join("|")).test(url) ? "<".concat(url, ">") : url; +} + +function printTitle(title, options, printSpace) { + if (printSpace == null) { + printSpace = true; + } + + if (!title) { + return ""; + } + + if (printSpace) { + return " " + printTitle(title, options, false); + } + + if (title.includes('"') && title.includes("'") && !title.includes(")")) { + return "(".concat(title, ")"); // avoid escaped quotes + } // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split + + + var singleCount = title.split("'").length - 1; + var doubleCount = title.split('"').length - 1; + var quote = singleCount > doubleCount ? '"' : doubleCount > singleCount ? "'" : options.singleQuote ? "'" : '"'; + title = title.replace(new RegExp("(".concat(quote, ")"), "g"), "\\$1"); + return "".concat(quote).concat(title).concat(quote); +} + +function normalizeParts$2(parts) { + return parts.reduce(function (current, part) { + var lastPart = util.getLast(current); + + if (typeof lastPart === "string" && typeof part === "string") { + current.splice(-1, 1, lastPart + part); + } else { + current.push(part); + } + + return current; + }, []); +} + +function clamp(value, min, max) { + return value < min ? min : value > max ? max : value; +} + +function clean$10(ast, newObj, parent) { + delete newObj.position; + delete newObj.raw; // front-matter + // for codeblock + + if (ast.type === "code" || ast.type === "yaml" || ast.type === "import" || ast.type === "export" || ast.type === "jsx") { + delete newObj.value; + } + + if (ast.type === "list") { + delete newObj.isAligned; + } // texts can be splitted or merged + + + if (ast.type === "text") { + return null; + } + + if (ast.type === "inlineCode") { + newObj.value = ast.value.replace(/[ \t\n]+/g, " "); + } // for insert pragma + + + if (parent && parent.type === "root" && parent.children.length > 0 && (parent.children[0] === ast || (parent.children[0].type === "yaml" || parent.children[0].type === "toml") && parent.children[1] === ast) && ast.type === "html" && pragma$8.startWithPragma(ast.value)) { + return null; + } +} + +function hasPrettierIgnore$3(path) { + var index = +path.getName(); + + if (index === 0) { + return false; + } + + var prevNode = path.getParentNode().children[index - 1]; + return isPrettierIgnore$1(prevNode) === "next"; +} + +var printerMarkdown = { + preprocess: preprocess_1$4, + print: genericPrint$5, + embed: embed_1$4, + massageAstNode: clean$10, + hasPrettierIgnore: hasPrettierIgnore$3, + insertPragma: pragma$8.insertPragma +}; + +var options$15 = { + proseWrap: commonOptions.proseWrap, + singleQuote: commonOptions.singleQuote +}; + +var name$15 = "Markdown"; +var type$14 = "prose"; +var aliases$5 = ["pandoc"]; +var aceMode$14 = "markdown"; +var codemirrorMode$10 = "gfm"; +var codemirrorMimeType$10 = "text/x-gfm"; +var wrap = true; +var extensions$14 = [".md", ".markdown", ".mdown", ".mdwn", ".mkd", ".mkdn", ".mkdown", ".ronn", ".workbook"]; +var tmScope$14 = "source.gfm"; +var languageId$14 = 222; +var markdown = { + name: name$15, + type: type$14, + aliases: aliases$5, + aceMode: aceMode$14, + codemirrorMode: codemirrorMode$10, + codemirrorMimeType: codemirrorMimeType$10, + wrap: wrap, + extensions: extensions$14, + tmScope: tmScope$14, + languageId: languageId$14 +}; + +var markdown$1 = Object.freeze({ + name: name$15, + type: type$14, + aliases: aliases$5, + aceMode: aceMode$14, + codemirrorMode: codemirrorMode$10, + codemirrorMimeType: codemirrorMimeType$10, + wrap: wrap, + extensions: extensions$14, + tmScope: tmScope$14, + languageId: languageId$14, + default: markdown +}); + +var require$$0$25 = ( markdown$1 && markdown ) || markdown$1; + +var languages$5 = [createLanguage(require$$0$25, { + override: { + since: "1.8.0", + parsers: ["remark"], + vscodeLanguageIds: ["markdown"] + }, + extend: { + filenames: ["README"] + } +}), createLanguage({ + name: "MDX", + extensions: [".mdx"] +}, // TODO: use linguist data +{ + override: { + since: "1.15.0", + parsers: ["mdx"], + vscodeLanguageIds: ["mdx"] + } +})]; +var printers$5 = { + mdast: printerMarkdown +}; +var languageMarkdown = { + languages: languages$5, + options: options$15, + printers: printers$5 +}; + +function isPragma$1(text) { + return /^\s*@(prettier|format)\s*$/.test(text); +} + +function hasPragma$4(text) { + return /^\s*#[^\n\S]*@(prettier|format)\s*?(\n|$)/.test(text); +} + +function insertPragma$9(text) { + return "# @format\n\n".concat(text); +} + +var pragma$11 = { + isPragma: isPragma$1, + hasPragma: hasPragma$4, + insertPragma: insertPragma$9 +}; + +function getLast$7(array) { + return array[array.length - 1]; +} + +function getAncestorCount$1(path, filter) { + var counter = 0; + var pathStackLength = path.stack.length - 1; + + for (var i = 0; i < pathStackLength; i++) { + var value = path.stack[i]; + + if (isNode$1(value) && filter(value)) { + counter++; + } + } + + return counter; +} +/** + * @param {any} value + * @param {string[]=} types + */ + + +function isNode$1(value, types) { + return value && typeof value.type === "string" && (!types || types.indexOf(value.type) !== -1); +} + +function mapNode$1(node, callback, parent) { + return callback("children" in node ? Object.assign({}, node, { + children: node.children.map(function (childNode) { + return mapNode$1(childNode, callback, node); + }) + }) : node, parent); +} + +function defineShortcut$1(x, key, getter) { + Object.defineProperty(x, key, { + get: getter, + enumerable: false + }); +} + +function isNextLineEmpty$6(node, text) { + var newlineCount = 0; + var textLength = text.length; + + for (var i = node.position.end.offset - 1; i < textLength; i++) { + var char = text[i]; + + if (char === "\n") { + newlineCount++; + } + + if (newlineCount === 1 && /\S/.test(char)) { + return false; + } + + if (newlineCount === 2) { + return true; + } + } + + return false; +} + +function isLastDescendantNode$1(path) { + var node = path.getValue(); + + switch (node.type) { + case "tag": + case "anchor": + case "comment": + return false; + } + + var pathStackLength = path.stack.length; + + for (var i = 1; i < pathStackLength; i++) { + var item = path.stack[i]; + var parentItem = path.stack[i - 1]; + + if (Array.isArray(parentItem) && typeof item === "number" && item !== parentItem.length - 1) { + return false; + } + } + + return true; +} + +function getLastDescendantNode$2(node) { + return "children" in node && node.children.length !== 0 ? getLastDescendantNode$2(getLast$7(node.children)) : node; +} + +function isPrettierIgnore$2(comment) { + return comment.value.trim() === "prettier-ignore"; +} + +function hasPrettierIgnore$5(path) { + var node = path.getValue(); + + if (node.type === "documentBody") { + var document = path.getParentNode(); + return hasEndComments$1(document.head) && isPrettierIgnore$2(getLast$7(document.head.endComments)); + } + + return hasLeadingComments$1(node) && isPrettierIgnore$2(getLast$7(node.leadingComments)); +} + +function isEmptyNode$1(node) { + return (!node.children || node.children.length === 0) && !hasComments(node); +} + +function hasComments(node) { + return hasLeadingComments$1(node) || hasMiddleComments$1(node) || hasIndicatorComment$1(node) || hasTrailingComment$2(node) || hasEndComments$1(node); +} + +function hasLeadingComments$1(node) { + return node && node.leadingComments && node.leadingComments.length !== 0; +} + +function hasMiddleComments$1(node) { + return node && node.middleComments && node.middleComments.length !== 0; +} + +function hasIndicatorComment$1(node) { + return node && node.indicatorComment; +} + +function hasTrailingComment$2(node) { + return node && node.trailingComment; +} + +function hasEndComments$1(node) { + return node && node.endComments && node.endComments.length !== 0; +} +/** + * " a b c d e f " -> [" a b", "c d", "e f "] + */ + + +function splitWithSingleSpace(text) { + var parts = []; + var lastPart = undefined; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = text.split(/( +)/g)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var part = _step.value; + + if (part !== " ") { + if (lastPart === " ") { + parts.push(part); + } else { + parts.push((parts.pop() || "") + part); + } + } else if (lastPart === undefined) { + parts.unshift(""); + } + + lastPart = part; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + if (lastPart === " ") { + parts.push((parts.pop() || "") + " "); + } + + if (parts[0] === "") { + parts.shift(); + parts.unshift(" " + (parts.shift() || "")); + } + + return parts; +} + +function getFlowScalarLineContents$1(nodeType, content, options) { + var rawLineContents = content.split("\n").map(function (lineContent, index, lineContents) { + return index === 0 && index === lineContents.length - 1 ? lineContent : index !== 0 && index !== lineContents.length - 1 ? lineContent.trim() : index === 0 ? lineContent.trimRight() : lineContent.trimLeft(); + }); + + if (options.proseWrap === "preserve") { + return rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : [lineContent]; + }); + } + + return rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent); + }).reduce(function (reduced, lineContentWords, index) { + return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !( // trailing backslash in quoteDouble should be preserved + nodeType === "quoteDouble" && getLast$7(getLast$7(reduced)).endsWith("\\")) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]); + }, []).map(function (lineContentWords) { + return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords; + }); +} + +function getBlockValueLineContents$1(node, _ref) { + var parentIndent = _ref.parentIndent, + isLastDescendant = _ref.isLastDescendant, + options = _ref.options; + var content = node.position.start.line === node.position.end.line ? "" : options.originalText.slice(node.position.start.offset, node.position.end.offset) // exclude open line `>` or `|` + .match(/^[^\n]*?\n([\s\S]*)$/)[1]; + var leadingSpaceCount = node.indent === null ? function (match) { + return match ? match[1].length : Infinity; + }(content.match(/^( *)\S/m)) : node.indent - 1 + parentIndent; + var rawLineContents = content.split("\n").map(function (lineContent) { + return lineContent.slice(leadingSpaceCount); + }); + + if (options.proseWrap === "preserve" || node.type === "blockLiteral") { + return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : [lineContent]; + })); + } + + return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) { + return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent); + }).reduce(function (reduced, lineContentWords, index) { + return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !/^\s/.test(lineContentWords[0]) && !/^\s|\s$/.test(getLast$7(reduced)) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]); + }, []).map(function (lineContentWords) { + return lineContentWords.reduce(function (reduced, word) { + return (// disallow trailing spaces + reduced.length !== 0 && /\s$/.test(getLast$7(reduced)) ? reduced.concat(reduced.pop() + " " + word) : reduced.concat(word) + ); + }, []); + }).map(function (lineContentWords) { + return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords; + })); + + function removeUnnecessaryTrailingNewlines(lineContents) { + if (node.chomping === "keep") { + return getLast$7(lineContents).length === 0 ? lineContents.slice(0, -1) : lineContents; + } + + var trailingNewlineCount = 0; + + for (var i = lineContents.length - 1; i >= 0; i--) { + if (lineContents[i].length === 0) { + trailingNewlineCount++; + } else { + break; + } + } + + return trailingNewlineCount === 0 ? lineContents : trailingNewlineCount >= 2 && !isLastDescendant ? // next empty line + lineContents.slice(0, -(trailingNewlineCount - 1)) : lineContents.slice(0, -trailingNewlineCount); + } +} + +var utils$10 = { + getLast: getLast$7, + getAncestorCount: getAncestorCount$1, + isNode: isNode$1, + isEmptyNode: isEmptyNode$1, + mapNode: mapNode$1, + defineShortcut: defineShortcut$1, + isNextLineEmpty: isNextLineEmpty$6, + isLastDescendantNode: isLastDescendantNode$1, + getBlockValueLineContents: getBlockValueLineContents$1, + getFlowScalarLineContents: getFlowScalarLineContents$1, + getLastDescendantNode: getLastDescendantNode$2, + hasPrettierIgnore: hasPrettierIgnore$5, + hasLeadingComments: hasLeadingComments$1, + hasMiddleComments: hasMiddleComments$1, + hasIndicatorComment: hasIndicatorComment$1, + hasTrailingComment: hasTrailingComment$2, + hasEndComments: hasEndComments$1 +}; + +var insertPragma$8 = pragma$11.insertPragma; +var isPragma = pragma$11.isPragma; +var getAncestorCount = utils$10.getAncestorCount; +var getBlockValueLineContents = utils$10.getBlockValueLineContents; +var getFlowScalarLineContents = utils$10.getFlowScalarLineContents; +var getLast$6 = utils$10.getLast; +var getLastDescendantNode$1 = utils$10.getLastDescendantNode; +var hasLeadingComments = utils$10.hasLeadingComments; +var hasMiddleComments = utils$10.hasMiddleComments; +var hasIndicatorComment = utils$10.hasIndicatorComment; +var hasTrailingComment$1 = utils$10.hasTrailingComment; +var hasEndComments = utils$10.hasEndComments; +var hasPrettierIgnore$4 = utils$10.hasPrettierIgnore; +var isLastDescendantNode = utils$10.isLastDescendantNode; +var isNextLineEmpty$5 = utils$10.isNextLineEmpty; +var isNode = utils$10.isNode; +var isEmptyNode = utils$10.isEmptyNode; +var defineShortcut = utils$10.defineShortcut; +var mapNode = utils$10.mapNode; +var docBuilders$3 = doc.builders; +var conditionalGroup$2 = docBuilders$3.conditionalGroup; +var breakParent$4 = docBuilders$3.breakParent; +var concat$18 = docBuilders$3.concat; +var dedent$4 = docBuilders$3.dedent; +var dedentToRoot$2 = docBuilders$3.dedentToRoot; +var fill$6 = docBuilders$3.fill; +var group$16 = docBuilders$3.group; +var hardline$13 = docBuilders$3.hardline; +var ifBreak$7 = docBuilders$3.ifBreak; +var join$12 = docBuilders$3.join; +var line$11 = docBuilders$3.line; +var lineSuffix$2 = docBuilders$3.lineSuffix; +var literalline$7 = docBuilders$3.literalline; +var markAsRoot$5 = docBuilders$3.markAsRoot; +var softline$8 = docBuilders$3.softline; + +function preprocess$6(ast) { + return mapNode(ast, defineShortcuts); +} + +function defineShortcuts(node) { + switch (node.type) { + case "document": + defineShortcut(node, "head", function () { + return node.children[0]; + }); + defineShortcut(node, "body", function () { + return node.children[1]; + }); + break; + + case "documentBody": + case "sequenceItem": + case "flowSequenceItem": + case "mappingKey": + case "mappingValue": + defineShortcut(node, "content", function () { + return node.children[0]; + }); + break; + + case "mappingItem": + case "flowMappingItem": + defineShortcut(node, "key", function () { + return node.children[0]; + }); + defineShortcut(node, "value", function () { + return node.children[1]; + }); + break; + } + + return node; +} + +function genericPrint$6(path, options, print) { + var node = path.getValue(); + var parentNode = path.getParentNode(); + var tag = !node.tag ? "" : path.call(print, "tag"); + var anchor = !node.anchor ? "" : path.call(print, "anchor"); + var nextEmptyLine = isNode(node, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !isLastDescendantNode(path) ? printNextEmptyLine(path, options.originalText) : ""; + return concat$18([node.type !== "mappingValue" && hasLeadingComments(node) ? concat$18([join$12(hardline$13, path.map(print, "leadingComments")), hardline$13]) : "", tag, tag && anchor ? " " : "", anchor, tag || anchor ? isNode(node, ["sequence", "mapping"]) && !hasMiddleComments(node) ? hardline$13 : " " : "", hasMiddleComments(node) ? concat$18([node.middleComments.length === 1 ? "" : hardline$13, join$12(hardline$13, path.map(print, "middleComments")), hardline$13]) : "", hasPrettierIgnore$4(path) ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : group$16(_print(node, parentNode, path, options, print)), hasTrailingComment$1(node) && !isNode(node, ["document", "documentHead"]) ? lineSuffix$2(concat$18([node.type === "mappingValue" && !node.content ? "" : " ", parentNode.type === "mappingKey" && path.getParentNode(2).type === "mapping" && isInlineNode(node) ? "" : breakParent$4, path.call(print, "trailingComment")])) : "", nextEmptyLine, hasEndComments(node) && !isNode(node, ["documentHead", "documentBody"]) ? align$3(node.type === "sequenceItem" ? 2 : 0, concat$18([hardline$13, join$12(hardline$13, path.map(print, "endComments"))])) : ""]); +} + +function _print(node, parentNode, path, options, print) { + switch (node.type) { + case "root": + return concat$18([join$12(hardline$13, path.map(function (childPath, index) { + var document = node.children[index]; + var nextDocument = node.children[index + 1]; + return concat$18([print(childPath), shouldPrintDocumentEndMarker(document, nextDocument) ? concat$18([hardline$13, "...", hasTrailingComment$1(document) ? concat$18([" ", path.call(print, "trailingComment")]) : ""]) : !nextDocument || hasTrailingComment$1(nextDocument.head) ? "" : concat$18([hardline$13, "---"])]); + }, "children")), node.children.length === 0 || function (lastDescendantNode) { + return isNode(lastDescendantNode, ["blockLiteral", "blockFolded"]) && lastDescendantNode.chomping === "keep"; + }(getLastDescendantNode$1(node)) ? "" : hardline$13]); + + case "document": + { + var nextDocument = parentNode.children[path.getName() + 1]; + return join$12(hardline$13, [shouldPrintDocumentHeadEndMarker(node, nextDocument) === "head" ? join$12(hardline$13, [node.head.children.length === 0 && node.head.endComments.length === 0 ? "" : path.call(print, "head"), concat$18(["---", hasTrailingComment$1(node.head) ? concat$18([" ", path.call(print, "head", "trailingComment")]) : ""])].filter(Boolean)) : "", shouldPrintDocumentBody(node) ? path.call(print, "body") : ""].filter(Boolean)); + } + + case "documentHead": + return join$12(hardline$13, [].concat(path.map(print, "children"), path.map(print, "endComments"))); + + case "documentBody": + { + var children = join$12(hardline$13, path.map(print, "children")).parts; + var endComments = join$12(hardline$13, path.map(print, "endComments")).parts; + var separator = children.length === 0 || endComments.length === 0 ? "" : function (lastDescendantNode) { + return isNode(lastDescendantNode, ["blockFolded", "blockLiteral"]) ? lastDescendantNode.chomping === "keep" ? // there's already a newline printed at the end of blockValue (chomping=keep, lastDescendant=true) + "" : // an extra newline for better readability + concat$18([hardline$13, hardline$13]) : hardline$13; + }(getLastDescendantNode$1(node)); + return concat$18([].concat(children, separator, endComments)); + } + + case "directive": + return concat$18(["%", join$12(" ", [node.name].concat(node.parameters))]); + + case "comment": + return concat$18(["#", node.value]); + + case "alias": + return concat$18(["*", node.value]); + + case "tag": + return options.originalText.slice(node.position.start.offset, node.position.end.offset); + + case "anchor": + return concat$18(["&", node.value]); + + case "plain": + return printFlowScalarContent(node.type, options.originalText.slice(node.position.start.offset, node.position.end.offset), options); + + case "quoteDouble": + case "quoteSingle": + { + var singleQuote = "'"; + var doubleQuote = '"'; + var raw = options.originalText.slice(node.position.start.offset + 1, node.position.end.offset - 1); + + if (node.type === "quoteSingle" && raw.includes("\\") || node.type === "quoteDouble" && /\\[^"]/.test(raw)) { + // only quoteDouble can use escape chars + // and quoteSingle do not need to escape backslashes + var originalQuote = node.type === "quoteDouble" ? doubleQuote : singleQuote; + return concat$18([originalQuote, printFlowScalarContent(node.type, raw, options), originalQuote]); + } else if (raw.includes(doubleQuote)) { + return concat$18([singleQuote, printFlowScalarContent(node.type, node.type === "quoteDouble" ? raw // double quote needs to be escaped by backslash in quoteDouble + .replace(/\\"/g, doubleQuote).replace(/'/g, singleQuote.repeat(2)) : raw, options), singleQuote]); + } + + if (raw.includes(singleQuote)) { + return concat$18([doubleQuote, printFlowScalarContent(node.type, node.type === "quoteSingle" ? // single quote needs to be escaped by 2 single quotes in quoteSingle + raw.replace(/''/g, singleQuote) : raw, options), doubleQuote]); + } + + var quote = options.singleQuote ? singleQuote : doubleQuote; + return concat$18([quote, printFlowScalarContent(node.type, raw, options), quote]); + } + + case "blockFolded": + case "blockLiteral": + { + var parentIndent = getAncestorCount(path, function (ancestorNode) { + return isNode(ancestorNode, ["sequence", "mapping"]); + }); + var isLastDescendant = isLastDescendantNode(path); + return concat$18([node.type === "blockFolded" ? ">" : "|", node.indent === null ? "" : node.indent.toString(), node.chomping === "clip" ? "" : node.chomping === "keep" ? "+" : "-", hasIndicatorComment(node) ? concat$18([" ", path.call(print, "indicatorComment")]) : "", (node.indent === null ? dedent$4 : dedentToRoot$2)(align$3(node.indent === null ? options.tabWidth : node.indent - 1 + parentIndent, concat$18(getBlockValueLineContents(node, { + parentIndent: parentIndent, + isLastDescendant: isLastDescendant, + options: options + }).reduce(function (reduced, lineWords, index, lineContents) { + return reduced.concat(index === 0 ? hardline$13 : "", fill$6(join$12(line$11, lineWords).parts), index !== lineContents.length - 1 ? lineWords.length === 0 ? hardline$13 : markAsRoot$5(literalline$7) : node.chomping === "keep" && isLastDescendant ? lineWords.length === 0 ? dedentToRoot$2(hardline$13) : dedentToRoot$2(literalline$7) : ""); + }, []))))]); + } + + case "sequence": + return join$12(hardline$13, path.map(print, "children")); + + case "sequenceItem": + return concat$18(["- ", align$3(2, !node.content ? "" : path.call(print, "content"))]); + + case "mappingKey": + return !node.content ? "" : path.call(print, "content"); + + case "mappingValue": + return !node.content ? "" : path.call(print, "content"); + + case "mapping": + return join$12(hardline$13, path.map(print, "children")); + + case "mappingItem": + case "flowMappingItem": + { + var isEmptyMappingKey = isEmptyNode(node.key); + var isEmptyMappingValue = isEmptyNode(node.value); + + if (isEmptyMappingKey && isEmptyMappingValue) { + return concat$18([": "]); + } + + var key = path.call(print, "key"); + var value = path.call(print, "value"); + + if (isEmptyMappingValue) { + return node.type === "flowMappingItem" && parentNode.type === "flowMapping" ? key : node.type === "mappingItem" && isAbsolutelyPrintedAsSingleLineNode(node.key.content, options) && !hasTrailingComment$1(node.key.content) && (!parentNode.tag || parentNode.tag.value !== "tag:yaml.org,2002:set") ? concat$18([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ":"]) : concat$18(["? ", align$3(2, key)]); + } + + if (isEmptyMappingKey) { + return concat$18([": ", align$3(2, value)]); + } + + var groupId = Symbol("mappingKey"); + var forceExplicitKey = hasLeadingComments(node.value) || !isInlineNode(node.key.content); + return forceExplicitKey ? concat$18(["? ", align$3(2, key), hardline$13, join$12("", path.map(print, "value", "leadingComments").map(function (comment) { + return concat$18([comment, hardline$13]); + })), ": ", align$3(2, value)]) : // force singleline + isSingleLineNode(node.key.content) && !hasLeadingComments(node.key.content) && !hasMiddleComments(node.key.content) && !hasTrailingComment$1(node.key.content) && !hasEndComments(node.key) && !hasLeadingComments(node.value.content) && !hasMiddleComments(node.value.content) && !hasEndComments(node.value) && isAbsolutelyPrintedAsSingleLineNode(node.value.content, options) ? concat$18([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ": ", value]) : conditionalGroup$2([concat$18([group$16(concat$18([ifBreak$7("? "), group$16(align$3(2, key), { + id: groupId + })])), ifBreak$7(concat$18([hardline$13, ": ", align$3(2, value)]), indent(concat$18([needsSpaceInFrontOfMappingValue(node) ? " " : "", ":", hasLeadingComments(node.value.content) || hasEndComments(node.value) && node.value.content && !isNode(node.value.content, ["mapping", "sequence"]) || parentNode.type === "mapping" && hasTrailingComment$1(node.key.content) && isInlineNode(node.value.content) || isNode(node.value.content, ["mapping", "sequence"]) && node.value.content.tag === null && node.value.content.anchor === null ? hardline$13 : !node.value.content ? "" : line$11, value])), { + groupId: groupId + })])]); + } + + case "flowMapping": + case "flowSequence": + { + var openMarker = node.type === "flowMapping" ? "{" : "["; + var closeMarker = node.type === "flowMapping" ? "}" : "]"; + var bracketSpacing = node.type === "flowMapping" && node.children.length !== 0 && options.bracketSpacing ? line$11 : softline$8; + + var isLastItemEmptyMappingItem = node.children.length !== 0 && function (lastItem) { + return lastItem.type === "flowMappingItem" && isEmptyNode(lastItem.key) && isEmptyNode(lastItem.value); + }(getLast$6(node.children)); + + return concat$18([openMarker, indent(concat$18([bracketSpacing, concat$18(path.map(function (childPath, index) { + return concat$18([print(childPath), index === node.children.length - 1 ? "" : concat$18([",", line$11, node.children[index].position.start.line !== node.children[index + 1].position.start.line ? printNextEmptyLine(childPath, options.originalText) : ""])]); + }, "children")), ifBreak$7(",", "")])), isLastItemEmptyMappingItem ? "" : bracketSpacing, closeMarker]); + } + + case "flowSequenceItem": + return path.call(print, "content"); + // istanbul ignore next + + default: + throw new Error("Unexpected node type ".concat(node.type)); + } + + function indent(doc$$2) { + return docBuilders$3.align(" ".repeat(options.tabWidth), doc$$2); + } +} + +function align$3(n, doc$$2) { + return typeof n === "number" && n > 0 ? docBuilders$3.align(" ".repeat(n), doc$$2) : docBuilders$3.align(n, doc$$2); +} + +function isInlineNode(node) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + case "alias": + case "flowMapping": + case "flowSequence": + return true; + + default: + return false; + } +} + +function isSingleLineNode(node) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + return node.position.start.line === node.position.end.line; + + case "alias": + return true; + + default: + return false; + } +} + +function shouldPrintDocumentBody(document) { + return document.body.children.length !== 0 || hasEndComments(document.body); +} + +function shouldPrintDocumentEndMarker(document, nextDocument) { + return ( + /** + *... # trailingComment + */ + hasTrailingComment$1(document) || nextDocument && ( + /** + * ... + * %DIRECTIVE + * --- + */ + nextDocument.head.children.length !== 0 || + /** + * ... + * # endComment + * --- + */ + hasEndComments(nextDocument.head)) + ); +} + +function shouldPrintDocumentHeadEndMarker(document, nextDocument) { + if ( + /** + * %DIRECTIVE + * --- + */ + document.head.children.length !== 0 || + /** + * # end comment + * --- + */ + hasEndComments(document.head) || + /** + * --- # trailing comment + */ + hasTrailingComment$1(document.head)) { + return "head"; + } + + if (shouldPrintDocumentEndMarker(document, nextDocument)) { + return false; + } + + return nextDocument ? "root" : false; +} + +function isAbsolutelyPrintedAsSingleLineNode(node, options) { + if (!node) { + return true; + } + + switch (node.type) { + case "plain": + case "quoteSingle": + case "quoteDouble": + break; + + case "alias": + return true; + + default: + return false; + } + + if (options.proseWrap === "preserve") { + return node.position.start.line === node.position.end.line; + } + + if ( // backslash-newline + /\\$/m.test(options.originalText.slice(node.position.start.offset, node.position.end.offset))) { + return false; + } + + switch (options.proseWrap) { + case "never": + return node.value.indexOf("\n") === -1; + + case "always": + return !/[\n ]/.test(node.value); + // istanbul ignore next + + default: + return false; + } +} + +function needsSpaceInFrontOfMappingValue(node) { + return node.key.content && node.key.content.type === "alias"; +} + +function printNextEmptyLine(path, originalText) { + var node = path.getValue(); + var root = path.stack[0]; + root.isNextEmptyLinePrintedChecklist = root.isNextEmptyLinePrintedChecklist || []; + + if (!root.isNextEmptyLinePrintedChecklist[node.position.end.line]) { + if (isNextLineEmpty$5(node, originalText)) { + root.isNextEmptyLinePrintedChecklist[node.position.end.line] = true; + return softline$8; + } + } + + return ""; +} + +function printFlowScalarContent(nodeType, content, options) { + var lineContents = getFlowScalarLineContents(nodeType, content, options); + return join$12(hardline$13, lineContents.map(function (lineContentWords) { + return fill$6(join$12(line$11, lineContentWords).parts); + })); +} + +function clean$11(node, newNode +/*, parent */ +) { + if (isNode(newNode)) { + delete newNode.position; + + switch (newNode.type) { + case "comment": + // insert pragma + if (isPragma(newNode.value)) { + return null; + } + + break; + + case "quoteDouble": + case "quoteSingle": + newNode.type = "quote"; + break; + } + } +} + +var printerYaml = { + preprocess: preprocess$6, + print: genericPrint$6, + massageAstNode: clean$11, + insertPragma: insertPragma$8 +}; + +var options$18 = { + bracketSpacing: commonOptions.bracketSpacing, + singleQuote: commonOptions.singleQuote, + proseWrap: commonOptions.proseWrap +}; + +var name$16 = "YAML"; +var type$15 = "data"; +var tmScope$15 = "source.yaml"; +var aliases$6 = ["yml"]; +var extensions$15 = [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yml.mysql"]; +var filenames$3 = [".clang-format", ".clang-tidy", ".gemrc", "glide.lock"]; +var aceMode$15 = "yaml"; +var codemirrorMode$11 = "yaml"; +var codemirrorMimeType$11 = "text/x-yaml"; +var languageId$15 = 407; +var yaml = { + name: name$16, + type: type$15, + tmScope: tmScope$15, + aliases: aliases$6, + extensions: extensions$15, + filenames: filenames$3, + aceMode: aceMode$15, + codemirrorMode: codemirrorMode$11, + codemirrorMimeType: codemirrorMimeType$11, + languageId: languageId$15 +}; + +var yaml$1 = Object.freeze({ + name: name$16, + type: type$15, + tmScope: tmScope$15, + aliases: aliases$6, + extensions: extensions$15, + filenames: filenames$3, + aceMode: aceMode$15, + codemirrorMode: codemirrorMode$11, + codemirrorMimeType: codemirrorMimeType$11, + languageId: languageId$15, + default: yaml +}); + +var require$$0$27 = ( yaml$1 && yaml ) || yaml$1; + +var languages$6 = [createLanguage(require$$0$27, { + override: { + since: "1.14.0", + parsers: ["yaml"], + vscodeLanguageIds: ["yaml"] + } +})]; +var languageYaml = { + languages: languages$6, + printers: { + yaml: printerYaml + }, + options: options$18 +}; + +var version = require$$0.version; +var getSupportInfo = support.getSupportInfo; +var internalPlugins = [languageCss, languageGraphql, languageHandlebars, languageHtml, languageJs, languageMarkdown, languageYaml]; + +var isArray = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) === "[object Array]"; +}; // Luckily `opts` is always the 2nd argument + + +function withPlugins(fn) { + return function () { + var args = Array.from(arguments); + var plugins = args[1] && args[1].plugins || []; + + if (!isArray(plugins)) { + plugins = Object.values(plugins); + } + + args[1] = Object.assign({}, args[1], { + plugins: internalPlugins.concat(plugins) + }); + return fn.apply(null, args); + }; +} + +var formatWithCursor = withPlugins(core.formatWithCursor); +var standalone$2 = { + formatWithCursor: formatWithCursor, + format: function format(text, opts) { + return formatWithCursor(text, opts).formatted; + }, + check: function check(text, opts) { + var formatted = formatWithCursor(text, opts).formatted; + return formatted === text; + }, + doc: doc, + getSupportInfo: withPlugins(getSupportInfo), + version: version, + util: utilShared, + __debug: { + parse: withPlugins(core.parse), + formatAST: withPlugins(core.formatAST), + formatDoc: withPlugins(core.formatDoc), + printToDoc: withPlugins(core.printToDoc), + printDocToString: withPlugins(core.printDocToString) + } +}; + +var standalone = standalone$2; + +return standalone; + +}))); diff --git a/node_modules/prettier/third-party.js b/node_modules/prettier/third-party.js new file mode 100644 index 0000000..de5079f --- /dev/null +++ b/node_modules/prettier/third-party.js @@ -0,0 +1,4973 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var stream = _interopDefault(require('stream')); +var os = _interopDefault(require('os')); +var path = _interopDefault(require('path')); +var util = _interopDefault(require('util')); +var fs = _interopDefault(require('fs')); + +function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); +} + + + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var bufferStream = createCommonjsModule(function (module) { + 'use strict'; + + var PassThrough = stream.PassThrough; + + module.exports = function (opts) { + opts = Object.assign({}, opts); + var array = opts.array; + var encoding = opts.encoding; + var buffer = encoding === 'buffer'; + var objectMode = false; + + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } + + if (buffer) { + encoding = null; + } + + var len = 0; + var ret = []; + var stream$$1 = new PassThrough({ + objectMode + }); + + if (encoding) { + stream$$1.setEncoding(encoding); + } + + stream$$1.on('data', function (chunk) { + ret.push(chunk); + + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); + + stream$$1.getBufferedValue = function () { + if (array) { + return ret; + } + + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; + + stream$$1.getBufferedLength = function () { + return len; + }; + + return stream$$1; + }; +}); + +function getStream(inputStream, opts) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + opts = Object.assign({ + maxBuffer: Infinity + }, opts); + var maxBuffer = opts.maxBuffer; + var stream$$1; + var clean; + var p = new Promise(function (resolve, reject) { + var error = function error(err) { + if (err) { + // null check + err.bufferedData = stream$$1.getBufferedValue(); + } + + reject(err); + }; + + stream$$1 = bufferStream(opts); + inputStream.once('error', error); + inputStream.pipe(stream$$1); + stream$$1.on('data', function () { + if (stream$$1.getBufferedLength() > maxBuffer) { + reject(new Error('maxBuffer exceeded')); + } + }); + stream$$1.once('error', error); + stream$$1.on('end', resolve); + + clean = function clean() { + // some streams doesn't implement the `stream.Readable` interface correctly + if (inputStream.unpipe) { + inputStream.unpipe(stream$$1); + } + }; + }); + p.then(clean, clean); + return p.then(function () { + return stream$$1.getBufferedValue(); + }); +} + +var getStream_1 = getStream; + +var buffer = function buffer(stream$$1, opts) { + return getStream(stream$$1, Object.assign({}, opts, { + encoding: 'buffer' + })); +}; + +var array = function array(stream$$1, opts) { + return getStream(stream$$1, Object.assign({}, opts, { + array: true + })); +}; + +getStream_1.buffer = buffer; +getStream_1.array = array; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _toArray(arr) { + return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} + +function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + + return typeof key === "symbol" ? key : String(key); +} + +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + + keys.push(element.key); +} + +function _fromElementDescriptor(element) { + var obj = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + return obj; +} + +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + return _toArray(elementObjects).map(function (elementObject) { + var element = _toElementDescriptor(elementObject); + + _disallowProperty(elementObject, "finisher", "An element descriptor"); + + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} + +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + + if (kind !== "method" && kind !== "field") { + throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"'); + } + + var key = _toPropertyKey(elementObject.key); + + var placement = String(elementObject.placement); + + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"'); + } + + var descriptor = elementObject.descriptor; + + _disallowProperty(elementObject, "elements", "An element descriptor"); + + var element = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor) + }; + + if (kind !== "field") { + _disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + + element.initializer = elementObject.initializer; + } + + return element; +} + +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + + var finisher = _optionalCallableProperty(elementObject, "finisher"); + + var extras = _toElementDescriptors(elementObject.extras); + + return { + element: element, + finisher: finisher, + extras: extras + }; +} + +function _fromClassDescriptor(elements) { + var obj = { + kind: "class", + elements: elements.map(_fromElementDescriptor) + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + return obj; +} + +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + + if (kind !== "class") { + throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"'); + } + + _disallowProperty(obj, "key", "A class descriptor"); + + _disallowProperty(obj, "placement", "A class descriptor"); + + _disallowProperty(obj, "descriptor", "A class descriptor"); + + _disallowProperty(obj, "initializer", "A class descriptor"); + + _disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + + var elements = _toElementDescriptors(obj.elements); + + return { + elements: elements, + finisher: finisher + }; +} + +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } +} + +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} + +var isArrayish = function isArrayish(obj) { + if (!obj) { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function; +}; + +var errorEx = function errorEx(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } + + message = message instanceof Error ? message.message : message || this.message; + Error.call(this, message); + Error.captureStackTrace(this, errorExError); + this.name = name; + Object.defineProperty(this, 'message', { + configurable: true, + enumerable: false, + get: function get() { + var newMessage = message.split(/\r?\n/g); + + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('message' in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + + return newMessage.join('\n'); + }, + set: function set(v) { + message = v; + } + }); + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + + stackDescriptor.get = function () { + var stack = stackGetter ? stackGetter.call(this).split(/\r?\n+/g) : stackValue.split(/\r?\n+/g); // starting in Node 7, the stack builder caches the message. + // just replace it. + + stack[0] = this.name + ': ' + this.message; + var lineCount = 1; + + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('line' in modifier) { + var line = modifier.line(this[key]); + + if (line) { + stack.splice(lineCount++, 0, ' ' + line); + } + } + + if ('stack' in modifier) { + modifier.stack(this[key], stack); + } + } + + return stack.join('\n'); + }; + + Object.defineProperty(this, 'stack', stackDescriptor); + }; + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } + + return errorExError; +}; + +errorEx.append = function (str, def) { + return { + message: function message(v, _message) { + v = v || def; + + if (v) { + _message[0] += ' ' + str.replace('%s', v.toString()); + } + + return _message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function line(v) { + v = v || def; + + if (v) { + return str.replace('%s', v.toString()); + } + + return null; + } + }; +}; + +var errorEx_1 = errorEx; + +var jsonParseBetterErrors = parseJson$2; + +function parseJson$2(txt, reviver, context) { + context = context || 20; + + try { + return JSON.parse(txt, reviver); + } catch (e) { + if (typeof txt !== 'string') { + var isEmptyArray = Array.isArray(txt) && txt.length === 0; + var errorMessage = 'Cannot parse ' + (isEmptyArray ? 'an empty array' : String(txt)); + throw new TypeError(errorMessage); + } + + var syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i); + var errIdx = syntaxErr ? +syntaxErr[1] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null; + + if (errIdx != null) { + var start = errIdx <= context ? 0 : errIdx - context; + var end = errIdx + context >= txt.length ? txt.length : errIdx + context; + e.message += ` while parsing near '${start === 0 ? '' : '...'}${txt.slice(start, end)}${end === txt.length ? '' : '...'}'`; + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'`; + } + + throw e; + } +} + +var parseJson = createCommonjsModule(function (module) { + 'use strict'; + + var JSONError = errorEx_1('JSONError', { + fileName: errorEx_1.append('in %s') + }); + + module.exports = function (input, reviver, filename) { + if (typeof reviver === 'string') { + filename = reviver; + reviver = null; + } + + try { + try { + return JSON.parse(input, reviver); + } catch (err) { + jsonParseBetterErrors(input, reviver); + throw err; + } + } catch (err) { + err.message = err.message.replace(/\n/g, ''); + var jsonErr = new JSONError(err); + + if (filename) { + jsonErr.fileName = filename; + } + + throw jsonErr; + } + }; +}); + +function isNothing(subject) { + return typeof subject === 'undefined' || subject === null; +} + +function isObject(subject) { + return typeof subject === 'object' && subject !== null; +} + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence;else if (isNothing(sequence)) return []; + return [sequence]; +} + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + +function repeat(string, count) { + var result = '', + cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + +function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; +} + +var isNothing_1 = isNothing; +var isObject_1 = isObject; +var toArray_1 = toArray; +var repeat_1 = repeat; +var isNegativeZero_1 = isNegativeZero; +var extend_1 = extend; +var common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 +}; + +// YAML error class. http://stackoverflow.com/questions/8458984 +// +function YAMLException$1(reason, mark) { + // Super constructor + Error.call(this); + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); // Include stack trace in error object + + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = new Error().stack || ''; + } +} // Inherit from Error + + +YAMLException$1.prototype = Object.create(Error.prototype); +YAMLException$1.prototype.constructor = YAMLException$1; + +YAMLException$1.prototype.toString = function toString(compact) { + var result = this.name + ': '; + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + +var exception = YAMLException$1; + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; +} + +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + if (!this.buffer) return null; + indent = indent || 4; + maxLength = maxLength || 75; + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + + if (this.position - start > maxLength / 2 - 1) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + + if (end - this.position > maxLength / 2 - 1) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + return common.repeat(' ', indent) + head + snippet + tail + '\n' + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + +Mark.prototype.toString = function toString(compact) { + var snippet, + where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; +}; + +var mark = Mark; + +var TYPE_CONSTRUCTOR_OPTIONS = ['kind', 'resolve', 'construct', 'instanceOf', 'predicate', 'represent', 'defaultStyle', 'styleAliases']; +var YAML_NODE_KINDS = ['scalar', 'sequence', 'mapping']; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type$1(tag, options) { + options = options || {}; + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); // TODO: Add tag format check. + + this.tag = tag; + this.kind = options['kind'] || null; + + this.resolve = options['resolve'] || function () { + return true; + }; + + this.construct = options['construct'] || function (data) { + return data; + }; + + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +var type = Type$1; + +/*eslint-disable max-len*/ + + +function compileList(schema, name, result) { + var exclude = []; + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + result.push(currentType); + }); + return result.filter(function (type$$1, index) { + return exclude.indexOf(index) === -1; + }); +} + +function compileMap() +/* lists... */ +{ + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, + index, + length; + + function collectType(type$$1) { + result[type$$1.kind][type$$1.tag] = result['fallback'][type$$1.tag] = type$$1; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + + return result; +} + +function Schema$1(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + this.implicit.forEach(function (type$$1) { + if (type$$1.loadKind && type$$1.loadKind !== 'scalar') { + throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); +} + +Schema$1.DEFAULT = null; + +Schema$1.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema$1.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new exception('Wrong number of arguments for Schema.create function'); + } + + schemas = common.toArray(schemas); + types = common.toArray(types); + + if (!schemas.every(function (schema) { + return schema instanceof Schema$1; + })) { + throw new exception('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type$$1) { + return type$$1 instanceof type; + })) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema$1({ + include: schemas, + explicit: types + }); +}; + +var schema = Schema$1; + +var str = new type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function construct(data) { + return data !== null ? data : ''; + } +}); + +var seq = new type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function construct(data) { + return data !== null ? data : []; + } +}); + +var map = new type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function construct(data) { + return data !== null ? data : {}; + } +}); + +var failsafe = new schema({ + explicit: [str, seq, map] +}); + +function resolveYamlNull(data) { + if (data === null) return true; + var max = data.length; + return max === 1 && data === '~' || max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +var _null = new type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function canonical() { + return '~'; + }, + lowercase: function lowercase() { + return 'null'; + }, + uppercase: function uppercase() { + return 'NULL'; + }, + camelcase: function camelcase() { + return 'Null'; + } + }, + defaultStyle: 'lowercase' +}); + +function resolveYamlBoolean(data) { + if (data === null) return false; + var max = data.length; + return max === 4 && (data === 'true' || data === 'True' || data === 'TRUE') || max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'); +} + +function constructYamlBoolean(data) { + return data === 'true' || data === 'True' || data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +var bool = new type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function lowercase(object) { + return object ? 'true' : 'false'; + }, + uppercase: function uppercase(object) { + return object ? 'TRUE' : 'FALSE'; + }, + camelcase: function camelcase(object) { + return object ? 'True' : 'False'; + } + }, + defaultStyle: 'lowercase' +}); + +function isHexCode(c) { + return 0x30 + /* 0 */ + <= c && c <= 0x39 + /* 9 */ + || 0x41 + /* A */ + <= c && c <= 0x46 + /* F */ + || 0x61 + /* a */ + <= c && c <= 0x66 + /* f */ + ; +} + +function isOctCode(c) { + return 0x30 + /* 0 */ + <= c && c <= 0x37 + /* 7 */ + ; +} + +function isDecCode(c) { + return 0x30 + /* 0 */ + <= c && c <= 0x39 + /* 9 */ + ; +} + +function resolveYamlInteger(data) { + if (data === null) return false; + var max = data.length, + index = 0, + hasDigits = false, + ch; + if (!max) return false; + ch = data[index]; // sign + + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + + return hasDigits && ch !== '_'; + } + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + + return hasDigits && ch !== '_'; + } // base 8 + + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + + return hasDigits && ch !== '_'; + } // base 10 (except 0) or base 60 + // value should not start with `_`; + + + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + + hasDigits = true; + } // Should have digits and should not end with `_` + + + if (!hasDigits || ch === '_') return false; // if !base60 - done; + + if (ch !== ':') return true; // base60 almost not used, no needs to optimize + + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} + +function constructYamlInteger(data) { + var value = data, + sign = 1, + ch, + base, + digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return Object.prototype.toString.call(object) === '[object Number]' && object % 1 === 0 && !common.isNegativeZero(object); +} + +var int_1 = new type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function binary(object) { + return '0b' + object.toString(2); + }, + octal: function octal(object) { + return '0' + object.toString(8); + }, + decimal: function decimal(object) { + return object.toString(10); + }, + hexadecimal: function hexadecimal(object) { + return '0x' + object.toString(16).toUpperCase(); + } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [2, 'bin'], + octal: [8, 'oct'], + decimal: [10, 'dec'], + hexadecimal: [16, 'hex'] + } +}); + +var YAML_FLOAT_PATTERN = new RegExp( // 2.5e4, 2.5 and integers +'^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + // .2e4, .2 +// special case, seems not from spec +'|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + // 20:59 +'|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + // .inf +'|[-+]?\\.(?:inf|Inf|INF)' + // .nan +'|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign, base, digits; + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === '.nan') { + return NaN; + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + value = 0.0; + base = 1; + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + + return sign * parseFloat(value, 10); +} + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': + return '.nan'; + + case 'uppercase': + return '.NAN'; + + case 'camelcase': + return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': + return '.inf'; + + case 'uppercase': + return '.INF'; + + case 'camelcase': + return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': + return '-.inf'; + + case 'uppercase': + return '-.INF'; + + case 'camelcase': + return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return Object.prototype.toString.call(object) === '[object Number]' && (object % 1 !== 0 || common.isNegativeZero(object)); +} + +var float_1 = new type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + +var json = new schema({ + include: [failsafe], + implicit: [_null, bool, int_1, float_1] +}); + +var core = new schema({ + include: [json] +}); + +var YAML_DATE_REGEXP = new RegExp('^([0-9][0-9][0-9][0-9])' + // [1] year +'-([0-9][0-9])' + // [2] month +'-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp('^([0-9][0-9][0-9][0-9])' + // [1] year +'-([0-9][0-9]?)' + // [2] month +'-([0-9][0-9]?)' + // [3] day +'(?:[Tt]|[ \\t]+)' + // ... +'([0-9][0-9]?)' + // [4] hour +':([0-9][0-9])' + // [5] minute +':([0-9][0-9])' + // [6] second +'(?:\\.([0-9]*))?' + // [7] fraction +'(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour +'(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, + year, + month, + day, + hour, + minute, + second, + fraction = 0, + delta = null, + tz_hour, + tz_minute, + date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) throw new Error('Date resolve error'); // match: [1] year [2] month [3] day + + year = +match[1]; + month = +match[2] - 1; // JS month starts with 0 + + day = +match[3]; + + if (!match[4]) { + // no hour + return new Date(Date.UTC(year, month, day)); + } // match: [4] hour [5] minute [6] second [7] fraction + + + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + + if (match[7]) { + fraction = match[7].slice(0, 3); + + while (fraction.length < 3) { + // milli-seconds + fraction += '0'; + } + + fraction = +fraction; + } // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; +} + +function representYamlTimestamp(object +/*, style*/ +) { + return object.toISOString(); +} + +var timestamp = new type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +var merge = new type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + +/*eslint-disable no-bitwise*/ + + +var NodeBuffer; + +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = commonjsRequire; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} // [ 64, 65, 66 ] -> [ padding, CR, LF ] + + +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + +function resolveYamlBinary(data) { + if (data === null) return false; + var code, + idx, + bitlen = 0, + max = data.length, + map = BASE64_MAP; // Convert one by one. + + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); // Skip CR/LF + + if (code > 64) continue; // Fail on illegal characters + + if (code < 0) return false; + bitlen += 6; + } // If there are any bits left, source was corrupted + + + return bitlen % 8 === 0; +} + +function constructYamlBinary(data) { + var idx, + tailbits, + input = data.replace(/[\r\n=]/g, ''), + // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 0xFF); + result.push(bits >> 8 & 0xFF); + result.push(bits & 0xFF); + } + + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } // Dump tail + + + tailbits = max % 4 * 6; + + if (tailbits === 0) { + result.push(bits >> 16 & 0xFF); + result.push(bits >> 8 & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push(bits >> 10 & 0xFF); + result.push(bits >> 2 & 0xFF); + } else if (tailbits === 12) { + result.push(bits >> 4 & 0xFF); + } // Wrap into Buffer for NodeJS and leave Array for browser + + + if (NodeBuffer) { + // Support node 6.+ Buffer API when available + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + + return result; +} + +function representYamlBinary(object +/*, style*/ +) { + var result = '', + bits = 0, + idx, + tail, + max = object.length, + map = BASE64_MAP; // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 0x3F]; + result += map[bits >> 12 & 0x3F]; + result += map[bits >> 6 & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } // Dump tail + + + tail = max % 3; + + if (tail === 0) { + result += map[bits >> 18 & 0x3F]; + result += map[bits >> 12 & 0x3F]; + result += map[bits >> 6 & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[bits >> 10 & 0x3F]; + result += map[bits >> 4 & 0x3F]; + result += map[bits << 2 & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 0x3F]; + result += map[bits << 4 & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} + +var binary = new type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + +var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + var objectKeys = [], + index, + length, + pair, + pairKey, + pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty$1.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true;else return false; + } + } + + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +var omap = new type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + +var _toString$1 = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + var index, + length, + pair, + keys, + result, + object = data; + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString$1.call(pair) !== '[object Object]') return false; + keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + var index, + length, + pair, + keys, + result, + object = data; + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + + return result; +} + +var pairs = new type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + +var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + var key, + object = data; + + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +var set$1 = new type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + +var default_safe = new schema({ + include: [core], + implicit: [timestamp, merge], + explicit: [binary, omap, pairs, set$1] +}); + +function resolveJavascriptUndefined() { + return true; +} + +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} + +function representJavascriptUndefined() { + return ''; +} + +function isUndefined(object) { + return typeof object === 'undefined'; +} + +var _undefined = new type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); + +function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + if (modifiers.length > 3) return false; // if expression starts with /, is should be properly terminated + + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; +} + +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; // `/foo/gim` - tail can be maximum 4 chars + + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); +} + +function representJavascriptRegExp(object +/*, style*/ +) { + var result = '/' + object.source + '/'; + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + return result; +} + +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; +} + +var regexp = new type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); + +var esprima; // Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// + +try { + // workaround to exclude package from browserify list. + var _require$1 = commonjsRequire; + esprima = _require$1('esprima'); +} catch (_) { + /*global window */ + if (typeof window !== 'undefined') esprima = window.esprima; +} + +function resolveJavascriptFunction(data) { + if (data === null) return false; + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { + range: true + }); + + if (ast.type !== 'Program' || ast.body.length !== 1 || ast.body[0].type !== 'ExpressionStatement' || ast.body[0].expression.type !== 'FunctionExpression') { + return false; + } + + return true; + } catch (err) { + return false; + } +} + +function constructJavascriptFunction(data) { + /*jslint evil:true*/ + var source = '(' + data + ')', + ast = esprima.parse(source, { + range: true + }), + params = [], + body; + + if (ast.type !== 'Program' || ast.body.length !== 1 || ast.body[0].type !== 'ExpressionStatement' || ast.body[0].expression.type !== 'FunctionExpression') { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + body = ast.body[0].expression.body.range; // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + + /*eslint-disable no-new-func*/ + + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); +} + +function representJavascriptFunction(object +/*, style*/ +) { + return object.toString(); +} + +function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; +} + +var _function = new type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); + +var default_full = schema.DEFAULT = new schema({ + include: [default_safe], + explicit: [_undefined, regexp, _function] +}); + +/*eslint-disable max-len,no-use-before-define*/ + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + +function is_EOL(c) { + return c === 0x0A + /* LF */ + || c === 0x0D + /* CR */ + ; +} + +function is_WHITE_SPACE(c) { + return c === 0x09 + /* Tab */ + || c === 0x20 + /* Space */ + ; +} + +function is_WS_OR_EOL(c) { + return c === 0x09 + /* Tab */ + || c === 0x20 + /* Space */ + || c === 0x0A + /* LF */ + || c === 0x0D + /* CR */ + ; +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C + /* , */ + || c === 0x5B + /* [ */ + || c === 0x5D + /* ] */ + || c === 0x7B + /* { */ + || c === 0x7D + /* } */ + ; +} + +function fromHexCode(c) { + var lc; + + if (0x30 + /* 0 */ + <= c && c <= 0x39 + /* 9 */ + ) { + return c - 0x30; + } + /*eslint-disable no-bitwise*/ + + + lc = c | 0x20; + + if (0x61 + /* a */ + <= lc && lc <= 0x66 + /* f */ + ) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78 + /* x */ + ) { + return 2; + } + + if (c === 0x75 + /* u */ + ) { + return 4; + } + + if (c === 0x55 + /* U */ + ) { + return 8; + } + + return 0; +} + +function fromDecimalCode(c) { + if (0x30 + /* 0 */ + <= c && c <= 0x39 + /* 9 */ + ) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return c === 0x30 + /* 0 */ + ? '\x00' : c === 0x61 + /* a */ + ? '\x07' : c === 0x62 + /* b */ + ? '\x08' : c === 0x74 + /* t */ + ? '\x09' : c === 0x09 + /* Tab */ + ? '\x09' : c === 0x6E + /* n */ + ? '\x0A' : c === 0x76 + /* v */ + ? '\x0B' : c === 0x66 + /* f */ + ? '\x0C' : c === 0x72 + /* r */ + ? '\x0D' : c === 0x65 + /* e */ + ? '\x1B' : c === 0x20 + /* Space */ + ? ' ' : c === 0x22 + /* " */ + ? '\x22' : c === 0x2F + /* / */ + ? '/' : c === 0x5C + /* \ */ + ? '\x5C' : c === 0x4E + /* N */ + ? '\x85' : c === 0x5F + /* _ */ + ? '\xA0' : c === 0x4C + /* L */ + ? '\u2028' : c === 0x50 + /* P */ + ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + + + return String.fromCharCode((c - 0x010000 >> 10) + 0xD800, (c - 0x010000 & 0x03FF) + 0xDC00); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access + +var simpleEscapeMap = new Array(256); + +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + +function State(input, options) { + this.input = input; + this.filename = options['filename'] || null; + this.schema = options['schema'] || default_full; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.documents = []; + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ +} + +function generateError(state, message) { + return new exception(message, new mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart)); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + +var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = minor < 2; + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + TAG: function handleTagDirective(state, name, args) { + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } +}; + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + + if (!(_character === 0x09 || 0x20 <= _character && _character <= 0x10FFFF)) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A + /* LF */ + ) { + state.position++; + } else if (ch === 0x0D + /* CR */ + ) { + state.position++; + + if (state.input.charCodeAt(state.position) === 0x0A + /* LF */ + ) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23 + /* # */ + ) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A + /* LF */ + && ch !== 0x0D + /* CR */ + && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20 + /* Space */ + ) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + ch = state.input.charCodeAt(_position); // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + + if ((ch === 0x2D + /* - */ + || ch === 0x2E + /* . */ + ) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 0x23 + /* # */ + || ch === 0x26 + /* & */ + || ch === 0x2A + /* * */ + || ch === 0x21 + /* ! */ + || ch === 0x7C + /* | */ + || ch === 0x3E + /* > */ + || ch === 0x27 + /* ' */ + || ch === 0x22 + /* " */ + || ch === 0x25 + /* % */ + || ch === 0x40 + /* @ */ + || ch === 0x60 + /* ` */ + ) { + return false; + } + + if (ch === 0x3F + /* ? */ + || ch === 0x2D + /* - */ + ) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A + /* : */ + ) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 0x23 + /* # */ + ) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27 + /* ' */ + ) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27 + /* ' */ + ) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27 + /* ' */ + ) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22 + /* " */ + ) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22 + /* " */ + ) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 0x5C + /* \ */ + ) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B + /* [ */ + ) { + terminator = 0x5D; + /* ] */ + + isMapping = false; + _result = []; + } else if (ch === 0x7B + /* { */ + ) { + terminator = 0x7D; + /* } */ + + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F + /* ? */ + ) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A + /* : */ + ) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C + /* , */ + ) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C + /* | */ + ) { + folding = false; + } else if (ch === 0x3E + /* > */ + ) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B + /* + */ + || ch === 0x2D + /* - */ + ) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 0x2B + /* + */ + ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + + if (ch === 0x23 + /* # */ + ) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 0x20 + /* Space */ + ) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } // End of the scalar. + + + if (state.lineIndent < textIndent) { + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } // Break this `while` cycle and go to the funciton's epilogue. + + + break; + } // Folded style: use fancy rules to handle line breaks. + + + if (folding) { + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; // except for the first content line (cf. Example 8.1) + + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { + // i.e. only if we have already read some scalar content. + state.result += ' '; + } // Several line breaks - perceive as different lines. + + } else { + state.result += common.repeat('\n', emptyLines); + } // Literal style: just add exact number of line breaks between content lines. + + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (ch !== 0x2D + /* - */ + ) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + + _result.push(state.result); + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + _pos = state.position; // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + + if ((ch === 0x3F + /* ? */ + || ch === 0x3A + /* : */ + ) && is_WS_OR_EOL(following)) { + if (ch === 0x3F + /* ? */ + ) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A + /* : */ + ) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } else { + break; // Reading is done. Go to the epilogue. + } // + // Common reading code for both explicit and implicit notations. + // + + + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && ch !== 0) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } // + // Epilogue. + // + // Special case: last mapping's node contains only the key in explicit notation. + + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } // Expose the resulting mapping. + + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + if (ch !== 0x21 + /* ! */ + ) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C + /* < */ + ) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 0x21 + /* ! */ + ) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 0x3E + /* > */ + ); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 0x21 + /* ! */ + ) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, ch; + + ch = state.input.charCodeAt(state.position); + if (ch !== 0x26 + /* & */ + ) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, ch; + + ch = state.input.charCodeAt(state.position); + if (ch !== 0x2A + /* * */ + ) return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, + // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only assigned to plain scalars. So, it isn't + // needed to check for 'kind' conformity. + + if (type.resolve(state.result)) { + // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { + // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25 + /* % */ + ) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23 + /* # */ + ) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + + break; + } + + if (is_EOL(ch)) break; + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 0x2D + /* - */ + && state.input.charCodeAt(state.position + 1) === 0x2D + /* - */ + && state.input.charCodeAt(state.position + 2) === 0x2D + /* - */ + ) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 0x2E + /* . */ + ) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + + return; + } + + if (state.position < state.length - 1) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A + /* LF */ + && input.charCodeAt(input.length - 1) !== 0x0D + /* CR */ + ) { + input += '\n'; + } // Strip BOM + + + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); // Use 0 as string terminator. That significantly simplifies bounds check. + + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20 + /* Space */ + ) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < state.length - 1) { + readDocument(state); + } + + return state.documents; +} + +function loadAll$1(input, iterator, options) { + var documents = loadDocuments(input, options), + index, + length; + + if (typeof iterator !== 'function') { + return documents; + } + + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + +function load$1(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + + throw new exception('expected a single document in the stream, but found more'); +} + +function safeLoadAll$1(input, output, options) { + if (typeof output === 'function') { + loadAll$1(input, output, common.extend({ + schema: default_safe + }, options)); + } else { + return loadAll$1(input, common.extend({ + schema: default_safe + }, options)); + } +} + +function safeLoad$1(input, options) { + return load$1(input, common.extend({ + schema: default_safe + }, options)); +} + +var loadAll_1 = loadAll$1; +var load_1 = load$1; +var safeLoadAll_1 = safeLoadAll$1; +var safeLoad_1 = safeLoad$1; +var loader = { + loadAll: loadAll_1, + load: load_1, + safeLoadAll: safeLoadAll_1, + safeLoad: safeLoad_1 +}; + +/*eslint-disable no-use-before-define*/ + + +var _toString$2 = Object.prototype.toString; +var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; +var CHAR_TAB = 0x09; +/* Tab */ + +var CHAR_LINE_FEED = 0x0A; +/* LF */ + +var CHAR_SPACE = 0x20; +/* Space */ + +var CHAR_EXCLAMATION = 0x21; +/* ! */ + +var CHAR_DOUBLE_QUOTE = 0x22; +/* " */ + +var CHAR_SHARP = 0x23; +/* # */ + +var CHAR_PERCENT = 0x25; +/* % */ + +var CHAR_AMPERSAND = 0x26; +/* & */ + +var CHAR_SINGLE_QUOTE = 0x27; +/* ' */ + +var CHAR_ASTERISK = 0x2A; +/* * */ + +var CHAR_COMMA = 0x2C; +/* , */ + +var CHAR_MINUS = 0x2D; +/* - */ + +var CHAR_COLON = 0x3A; +/* : */ + +var CHAR_GREATER_THAN = 0x3E; +/* > */ + +var CHAR_QUESTION = 0x3F; +/* ? */ + +var CHAR_COMMERCIAL_AT = 0x40; +/* @ */ + +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; +/* [ */ + +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; +/* ] */ + +var CHAR_GRAVE_ACCENT = 0x60; +/* ` */ + +var CHAR_LEFT_CURLY_BRACKET = 0x7B; +/* { */ + +var CHAR_VERTICAL_LINE = 0x7C; +/* | */ + +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; +/* } */ + +var ESCAPE_SEQUENCES = {}; +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; +var DEPRECATED_BOOLEANS_SYNTAX = ['y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF']; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + if (map === null) return {}; + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty$3.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + +function State$1(options) { + this.schema = options['schema'] || default_full; + this.indent = Math.max(1, options['indent'] || 2); + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']; + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ''; + this.duplicates = []; + this.usedDuplicates = null; +} // Indents every line in a string. Empty lines (\n only) are not indented. + + +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} // [33] s-white ::= s-space | s-tab + + +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} // Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. + + +function isPrintable(c) { + return 0x00020 <= c && c <= 0x00007E || 0x000A1 <= c && c <= 0x00D7FF && c !== 0x2028 && c !== 0x2029 || 0x0E000 <= c && c <= 0x00FFFD && c !== 0xFEFF + /* BOM */ + || 0x10000 <= c && c <= 0x10FFFF; +} // Simplified test for values allowed after the first character in plain style. + + +function isPlainSafe(c) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF // - c-flow-indicator + && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET // - ":" - "#" + && c !== CHAR_COLON && c !== CHAR_SHARP; +} // Simplified test for values allowed as the first character in plain style. + + +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"” + && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE // | “%” | “@” | “`”) + && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; +} + +var STYLE_PLAIN = 1; +var STYLE_SINGLE = 2; +var STYLE_LITERAL = 3; +var STYLE_FOLDED = 4; +var STYLE_DOUBLE = 5; // Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). + +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + + var plain = isPlainSafeFirst(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + + plain = plain && isPlainSafe(char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; // Check if any line can be folded. + + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. + i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== ' '; + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + + plain = plain && isPlainSafe(char); + } // in case the end is missing a \n + + + hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== ' '; + } // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + + + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) ? STYLE_PLAIN : STYLE_SINGLE; + } // Edge case: block indentation indicator can only have one digit. + + + if (string[0] === ' ' && indentPerLevel > 9) { + return STYLE_DOUBLE; + } // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + + + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} // Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. + + +function writeScalar(state, string, level, iskey) { + state.dump = function () { + if (string.length === 0) { + return "''"; + } + + if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); // Without knowing if keys are implicit/explicit, assume implicit for safety. + + var singleLineOnly = iskey // No block styles in flow mode. + || state.flowLevel > -1 && level >= state.flowLevel; + + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + + default: + throw new exception('impossible error: invalid scalar style'); + } + }(); +} // Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. + + +function blockHeader(string, indentPerLevel) { + var indentIndicator = string[0] === ' ' ? String(indentPerLevel) : ''; // note the special case: the string '\n' counts as a "trailing" empty line. + + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : clip ? '' : '-'; + return indentIndicator + chomp + '\n'; +} // (See the note for writeScalar.) + + +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} // Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. + + +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; // first line (possibly an empty line) + + var result = function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }(); // If we haven't reached the first content line yet, don't add an extra \n. + + + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; // rest of the lines + + var match; + + while (match = lineRe.exec(string)) { + var prefix = match[1], + line = match[2]; + moreIndented = line[0] === ' '; + result += prefix + (!prevMoreIndented && !moreIndented && line !== '' ? '\n' : '') + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} // Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. + + +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; // Since a more-indented line adds a \n, breaks can't be followed by a space. + + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + + var match; // start is an inclusive index. end, curr, and next are exclusive. + + var start = 0, + end, + curr = 0, + next = 0; + var result = ''; // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + + while (match = breakRe.exec(line)) { + next = match.index; // maintain invariant: curr - start <= width + + if (next - start > width) { + end = curr > start ? curr : next; // derive end <= length-2 + + result += '\n' + line.slice(start, end); // skip the space that was output as \n + + start = end + 1; // derive start <= length-1 + } + + curr = next; + } // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + + + result += '\n'; // Insert a break if the remainder is too long and there is a break available. + + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} // Escapes a double-quoted string. + + +function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + + if (char >= 0xD800 && char <= 0xDBFF + /* high surrogate */ + ) { + nextChar = string.charCodeAt(i + 1); + + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF + /* low surrogate */ + ) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); // Advance index one extra since we already used that char here. + + i++; + continue; + } + } + + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char); + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = state.condenseFlow ? '"' : ''; + if (index !== 0) pairBuffer += ', '; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; // Both key and value are valid. + + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; // Allow sorting keys so that the output file is deterministic + + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new exception('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = state.tag !== null && state.tag !== '?' || state.dump && state.dump.length > 1024; + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; // Both key and value are valid. + + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === 'object' && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString$2.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty$3.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} // Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// + + +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString$2.call(state.dump); + + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if (state.tag !== null && state.tag !== '?' || duplicate || state.indent !== 2 && level > 0) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + + if (type === '[object Object]') { + if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && state.dump.length !== 0) { + writeBlockSequence(state, level, state.dump, compact); + + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new exception('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump$1(input, options) { + options = options || {}; + var state = new State$1(options); + if (!state.noRefs) getDuplicateReferences(input, state); + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + return ''; +} + +function safeDump$1(input, options) { + return dump$1(input, common.extend({ + schema: default_safe + }, options)); +} + +var dump_1 = dump$1; +var safeDump_1 = safeDump$1; +var dumper = { + dump: dump_1, + safeDump: safeDump_1 +}; + +function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; +} + +var Type = type; +var Schema = schema; +var FAILSAFE_SCHEMA = failsafe; +var JSON_SCHEMA = json; +var CORE_SCHEMA = core; +var DEFAULT_SAFE_SCHEMA = default_safe; +var DEFAULT_FULL_SCHEMA = default_full; +var load = loader.load; +var loadAll = loader.loadAll; +var safeLoad = loader.safeLoad; +var safeLoadAll = loader.safeLoadAll; +var dump = dumper.dump; +var safeDump = dumper.safeDump; +var YAMLException = exception; // Deprecated schema names from JS-YAML 2.0.x + +var MINIMAL_SCHEMA = failsafe; +var SAFE_SCHEMA = default_safe; +var DEFAULT_SCHEMA = default_full; // Deprecated functions from JS-YAML 1.x.x + +var scan = deprecated('scan'); +var parse = deprecated('parse'); +var compose = deprecated('compose'); +var addConstructor = deprecated('addConstructor'); +var jsYaml$2 = { + Type: Type, + Schema: Schema, + FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, + JSON_SCHEMA: JSON_SCHEMA, + CORE_SCHEMA: CORE_SCHEMA, + DEFAULT_SAFE_SCHEMA: DEFAULT_SAFE_SCHEMA, + DEFAULT_FULL_SCHEMA: DEFAULT_FULL_SCHEMA, + load: load, + loadAll: loadAll, + safeLoad: safeLoad, + safeLoadAll: safeLoadAll, + dump: dump, + safeDump: safeDump, + YAMLException: YAMLException, + MINIMAL_SCHEMA: MINIMAL_SCHEMA, + SAFE_SCHEMA: SAFE_SCHEMA, + DEFAULT_SCHEMA: DEFAULT_SCHEMA, + scan: scan, + parse: parse, + compose: compose, + addConstructor: addConstructor +}; + +var jsYaml = jsYaml$2; + +function loadJs(filepath) { + var result = require(filepath); + + return result; +} + +function loadJson(filepath, content) { + try { + return parseJson(content); + } catch (err) { + err.message = `JSON Error in ${filepath}:\n${err.message}`; + throw err; + } +} + +function loadYaml(filepath, content) { + return jsYaml.safeLoad(content, { + filename: filepath + }); +} + +var loaders = { + loadJs, + loadJson, + loadYaml +}; + +function readFile(filepath, options) { + options = options || {}; + var throwNotFound = options.throwNotFound || false; + return new Promise(function (resolve, reject) { + fs.readFile(filepath, 'utf8', function (err, content) { + if (err && err.code === 'ENOENT' && !throwNotFound) { + return resolve(null); + } + + if (err) return reject(err); + resolve(content); + }); + }); +} + +readFile.sync = function readFileSync(filepath, options) { + options = options || {}; + var throwNotFound = options.throwNotFound || false; + + try { + return fs.readFileSync(filepath, 'utf8'); + } catch (err) { + if (err.code === 'ENOENT' && !throwNotFound) { + return null; + } + + throw err; + } +}; + +var readFile_1 = readFile; + +// +function cacheWrapper(cache, key, fn) { + if (!cache) { + return fn(); + } + + var cached = cache.get(key); + + if (cached !== undefined) { + return cached; + } + + var result = fn(); + cache.set(key, result); + return result; +} + +var cacheWrapper_1 = cacheWrapper; + +/** + * async + */ + + +function isDirectory(filepath, cb) { + if (typeof cb !== 'function') { + throw new Error('expected a callback function'); + } + + if (typeof filepath !== 'string') { + cb(new Error('expected filepath to be a string')); + return; + } + + fs.stat(filepath, function (err, stats) { + if (err) { + if (err.code === 'ENOENT') { + cb(null, false); + return; + } + + cb(err); + return; + } + + cb(null, stats.isDirectory()); + }); +} +/** + * sync + */ + + +isDirectory.sync = function isDirectorySync(filepath) { + if (typeof filepath !== 'string') { + throw new Error('expected filepath to be a string'); + } + + try { + var stat = fs.statSync(filepath); + return stat.isDirectory(); + } catch (err) { + if (err.code === 'ENOENT') { + return false; + } else { + throw err; + } + } + + return false; +}; +/** + * Expose `isDirectory` + */ + + +var isDirectory_1 = isDirectory; + +function getDirectory(filepath) { + return new Promise(function (resolve, reject) { + return isDirectory_1(filepath, function (err, filepathIsDirectory) { + if (err) { + return reject(err); + } + + return resolve(filepathIsDirectory ? filepath : path.dirname(filepath)); + }); + }); +} + +getDirectory.sync = function getDirectorySync(filepath) { + return isDirectory_1.sync(filepath) ? filepath : path.dirname(filepath); +}; + +var getDirectory_1 = getDirectory; + +var MODE_SYNC = 'sync'; // An object value represents a config object. +// null represents that the loader did not find anything relevant. +// undefined represents that the loader found something relevant +// but it was empty. + +var Explorer = +/*#__PURE__*/ +function () { + function Explorer(options) { + _classCallCheck(this, Explorer); + + this.loadCache = options.cache ? new Map() : null; + this.loadSyncCache = options.cache ? new Map() : null; + this.searchCache = options.cache ? new Map() : null; + this.searchSyncCache = options.cache ? new Map() : null; + this.config = options; + this.validateConfig(); + } + + _createClass(Explorer, [{ + key: "clearLoadCache", + value: function clearLoadCache() { + if (this.loadCache) { + this.loadCache.clear(); + } + + if (this.loadSyncCache) { + this.loadSyncCache.clear(); + } + } + }, { + key: "clearSearchCache", + value: function clearSearchCache() { + if (this.searchCache) { + this.searchCache.clear(); + } + + if (this.searchSyncCache) { + this.searchSyncCache.clear(); + } + } + }, { + key: "clearCaches", + value: function clearCaches() { + this.clearLoadCache(); + this.clearSearchCache(); + } + }, { + key: "validateConfig", + value: function validateConfig() { + var config = this.config; + config.searchPlaces.forEach(function (place) { + var loaderKey = path.extname(place) || 'noExt'; + var loader = config.loaders[loaderKey]; + + if (!loader) { + throw new Error(`No loader specified for ${getExtensionDescription(place)}, so searchPlaces item "${place}" is invalid`); + } + }); + } + }, { + key: "search", + value: function search(searchFrom) { + var _this = this; + + searchFrom = searchFrom || process.cwd(); + return getDirectory_1(searchFrom).then(function (dir) { + return _this.searchFromDirectory(dir); + }); + } + }, { + key: "searchFromDirectory", + value: function searchFromDirectory(dir) { + var _this2 = this; + + var absoluteDir = path.resolve(process.cwd(), dir); + + var run = function run() { + return _this2.searchDirectory(absoluteDir).then(function (result) { + var nextDir = _this2.nextDirectoryToSearch(absoluteDir, result); + + if (nextDir) { + return _this2.searchFromDirectory(nextDir); + } + + return _this2.config.transform(result); + }); + }; + + if (this.searchCache) { + return cacheWrapper_1(this.searchCache, absoluteDir, run); + } + + return run(); + } + }, { + key: "searchSync", + value: function searchSync(searchFrom) { + searchFrom = searchFrom || process.cwd(); + var dir = getDirectory_1.sync(searchFrom); + return this.searchFromDirectorySync(dir); + } + }, { + key: "searchFromDirectorySync", + value: function searchFromDirectorySync(dir) { + var _this3 = this; + + var absoluteDir = path.resolve(process.cwd(), dir); + + var run = function run() { + var result = _this3.searchDirectorySync(absoluteDir); + + var nextDir = _this3.nextDirectoryToSearch(absoluteDir, result); + + if (nextDir) { + return _this3.searchFromDirectorySync(nextDir); + } + + return _this3.config.transform(result); + }; + + if (this.searchSyncCache) { + return cacheWrapper_1(this.searchSyncCache, absoluteDir, run); + } + + return run(); + } + }, { + key: "searchDirectory", + value: function searchDirectory(dir) { + var _this4 = this; + + return this.config.searchPlaces.reduce(function (prevResultPromise, place) { + return prevResultPromise.then(function (prevResult) { + if (_this4.shouldSearchStopWithResult(prevResult)) { + return prevResult; + } + + return _this4.loadSearchPlace(dir, place); + }); + }, Promise.resolve(null)); + } + }, { + key: "searchDirectorySync", + value: function searchDirectorySync(dir) { + var result = null; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this.config.searchPlaces[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var place = _step.value; + result = this.loadSearchPlaceSync(dir, place); + if (this.shouldSearchStopWithResult(result)) break; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return result; + } + }, { + key: "shouldSearchStopWithResult", + value: function shouldSearchStopWithResult(result) { + if (result === null) return false; + if (result.isEmpty && this.config.ignoreEmptySearchPlaces) return false; + return true; + } + }, { + key: "loadSearchPlace", + value: function loadSearchPlace(dir, place) { + var _this5 = this; + + var filepath = path.join(dir, place); + return readFile_1(filepath).then(function (content) { + return _this5.createCosmiconfigResult(filepath, content); + }); + } + }, { + key: "loadSearchPlaceSync", + value: function loadSearchPlaceSync(dir, place) { + var filepath = path.join(dir, place); + var content = readFile_1.sync(filepath); + return this.createCosmiconfigResultSync(filepath, content); + } + }, { + key: "nextDirectoryToSearch", + value: function nextDirectoryToSearch(currentDir, currentResult) { + if (this.shouldSearchStopWithResult(currentResult)) { + return null; + } + + var nextDir = nextDirUp(currentDir); + + if (nextDir === currentDir || currentDir === this.config.stopDir) { + return null; + } + + return nextDir; + } + }, { + key: "loadPackageProp", + value: function loadPackageProp(filepath, content) { + var parsedContent = loaders.loadJson(filepath, content); + var packagePropValue = parsedContent[this.config.packageProp]; + return packagePropValue || null; + } + }, { + key: "getLoaderEntryForFile", + value: function getLoaderEntryForFile(filepath) { + if (path.basename(filepath) === 'package.json') { + var loader = this.loadPackageProp.bind(this); + return { + sync: loader, + async: loader + }; + } + + var loaderKey = path.extname(filepath) || 'noExt'; + return this.config.loaders[loaderKey] || {}; + } + }, { + key: "getSyncLoaderForFile", + value: function getSyncLoaderForFile(filepath) { + var entry = this.getLoaderEntryForFile(filepath); + + if (!entry.sync) { + throw new Error(`No sync loader specified for ${getExtensionDescription(filepath)}`); + } + + return entry.sync; + } + }, { + key: "getAsyncLoaderForFile", + value: function getAsyncLoaderForFile(filepath) { + var entry = this.getLoaderEntryForFile(filepath); + var loader = entry.async || entry.sync; + + if (!loader) { + throw new Error(`No async loader specified for ${getExtensionDescription(filepath)}`); + } + + return loader; + } + }, { + key: "loadFileContent", + value: function loadFileContent(mode, filepath, content) { + if (content === null) { + return null; + } + + if (content.trim() === '') { + return undefined; + } + + var loader = mode === MODE_SYNC ? this.getSyncLoaderForFile(filepath) : this.getAsyncLoaderForFile(filepath); + return loader(filepath, content); + } + }, { + key: "loadedContentToCosmiconfigResult", + value: function loadedContentToCosmiconfigResult(filepath, loadedContent) { + if (loadedContent === null) { + return null; + } + + if (loadedContent === undefined) { + return { + filepath, + config: undefined, + isEmpty: true + }; + } + + return { + config: loadedContent, + filepath + }; + } + }, { + key: "createCosmiconfigResult", + value: function createCosmiconfigResult(filepath, content) { + var _this6 = this; + + return Promise.resolve().then(function () { + return _this6.loadFileContent('async', filepath, content); + }).then(function (loaderResult) { + return _this6.loadedContentToCosmiconfigResult(filepath, loaderResult); + }); + } + }, { + key: "createCosmiconfigResultSync", + value: function createCosmiconfigResultSync(filepath, content) { + var loaderResult = this.loadFileContent('sync', filepath, content); + return this.loadedContentToCosmiconfigResult(filepath, loaderResult); + } + }, { + key: "validateFilePath", + value: function validateFilePath(filepath) { + if (!filepath) { + throw new Error('load and loadSync must pass a non-empty string'); + } + } + }, { + key: "load", + value: function load(filepath) { + var _this7 = this; + + return Promise.resolve().then(function () { + _this7.validateFilePath(filepath); + + var absoluteFilePath = path.resolve(process.cwd(), filepath); + return cacheWrapper_1(_this7.loadCache, absoluteFilePath, function () { + return readFile_1(absoluteFilePath, { + throwNotFound: true + }).then(function (content) { + return _this7.createCosmiconfigResult(absoluteFilePath, content); + }).then(_this7.config.transform); + }); + }); + } + }, { + key: "loadSync", + value: function loadSync(filepath) { + var _this8 = this; + + this.validateFilePath(filepath); + var absoluteFilePath = path.resolve(process.cwd(), filepath); + return cacheWrapper_1(this.loadSyncCache, absoluteFilePath, function () { + var content = readFile_1.sync(absoluteFilePath, { + throwNotFound: true + }); + + var result = _this8.createCosmiconfigResultSync(absoluteFilePath, content); + + return _this8.config.transform(result); + }); + } + }]); + + return Explorer; +}(); + +var createExplorer = function createExplorer(options) { + var explorer = new Explorer(options); + return { + search: explorer.search.bind(explorer), + searchSync: explorer.searchSync.bind(explorer), + load: explorer.load.bind(explorer), + loadSync: explorer.loadSync.bind(explorer), + clearLoadCache: explorer.clearLoadCache.bind(explorer), + clearSearchCache: explorer.clearSearchCache.bind(explorer), + clearCaches: explorer.clearCaches.bind(explorer) + }; +}; + +function nextDirUp(dir) { + return path.dirname(dir); +} + +function getExtensionDescription(filepath) { + var ext = path.extname(filepath); + return ext ? `extension "${ext}"` : 'files without extensions'; +} + +var dist = cosmiconfig; + +function cosmiconfig(moduleName, options) { + options = options || {}; + var defaults = { + packageProp: moduleName, + searchPlaces: ['package.json', `.${moduleName}rc`, `.${moduleName}rc.json`, `.${moduleName}rc.yaml`, `.${moduleName}rc.yml`, `.${moduleName}rc.js`, `${moduleName}.config.js`], + ignoreEmptySearchPlaces: true, + stopDir: os.homedir(), + cache: true, + transform: identity + }; + var normalizedOptions = Object.assign({}, defaults, options, { + loaders: normalizeLoaders(options.loaders) + }); + return createExplorer(normalizedOptions); +} + +cosmiconfig.loadJs = loaders.loadJs; +cosmiconfig.loadJson = loaders.loadJson; +cosmiconfig.loadYaml = loaders.loadYaml; + +function normalizeLoaders(rawLoaders) { + var defaults = { + '.js': { + sync: loaders.loadJs, + async: loaders.loadJs + }, + '.json': { + sync: loaders.loadJson, + async: loaders.loadJson + }, + '.yaml': { + sync: loaders.loadYaml, + async: loaders.loadYaml + }, + '.yml': { + sync: loaders.loadYaml, + async: loaders.loadYaml + }, + noExt: { + sync: loaders.loadYaml, + async: loaders.loadYaml + } + }; + + if (!rawLoaders) { + return defaults; + } + + return Object.keys(rawLoaders).reduce(function (result, ext) { + var entry = rawLoaders && rawLoaders[ext]; + + if (typeof entry === 'function') { + result[ext] = { + sync: entry, + async: entry + }; + } else { + result[ext] = entry; + } + + return result; + }, defaults); +} + +function identity(x) { + return x; +} + +var findParentDir$1 = createCommonjsModule(function (module, exports) { + 'use strict'; + + var exists = fs.exists || path.exists, + existsSync = fs.existsSync || path.existsSync; + + function splitPath(path$$2) { + var parts = path$$2.split(/(\/|\\)/); + if (!parts.length) return parts; // when path starts with a slash, the first part is empty string + + return !parts[0].length ? parts.slice(1) : parts; + } + + exports = module.exports = function (currentFullPath, clue, cb) { + function testDir(parts) { + if (parts.length === 0) return cb(null, null); + var p = parts.join(''); + exists(path.join(p, clue), function (itdoes) { + if (itdoes) return cb(null, p); + testDir(parts.slice(0, -1)); + }); + } + + testDir(splitPath(currentFullPath)); + }; + + exports.sync = function (currentFullPath, clue) { + function testDir(parts) { + if (parts.length === 0) return null; + var p = parts.join(''); + var itdoes = existsSync(path.join(p, clue)); + return itdoes ? p : testDir(parts.slice(0, -1)); + } + + return testDir(splitPath(currentFullPath)); + }; +}); + +var findParentDir = findParentDir$1.sync; +var thirdParty = { + getStream: getStream_1, + cosmiconfig: dist, + findParentDir +}; + +module.exports = thirdParty; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..76d4725 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,12 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "prettier": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.15.2.tgz", + "integrity": "sha512-YgPLFFA0CdKL4Eg2IHtUSjzj/BWgszDHiNQAe0VAIBse34148whfdzLagRL+QiKS+YfK5ftB6X4v/MBw8yCoug==", + "dev": true + } + } +} diff --git a/website/README.md b/website/README.md index ec9d863..5faca94 100644 --- a/website/README.md +++ b/website/README.md @@ -1,4 +1,4 @@ -# opex +# Orca This README outlines specifics about the website for the aquarium controller. The purpose of the website is to act as a cloud controller / storage device to store data. Eventually the Raspberry-Pi will allow for full functionality without internet support once we choose to implement an LCD or local webhost for access. @@ -23,7 +23,7 @@ You will need the following things properly installed on your computer. >### Installation > >* `git clone ` this repository ->* `cd opex` +>* `cd orca` >* `npm install` or `yarn install` > >### Running / Development diff --git a/website/package-lock.json b/website/package-lock.json index 136c806..404c3aa 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -1,5 +1,5 @@ { - "name": "opex-controller", + "name": "orca-controller", "version": "1.0.0", "lockfileVersion": 1, "requires": true, diff --git a/website/package.json b/website/package.json index 4be3974..9e1d56e 100644 --- a/website/package.json +++ b/website/package.json @@ -1,7 +1,7 @@ { - "name": "opex-controller", + "name": "Orca-controller", "version": "1.0.0", - "description": "The standalone controller for the Opex System", + "description": "The standalone controller for the Orca System", "author": { "name": "Mike S.", "email": "", @@ -57,10 +57,10 @@ "proxy": "http://localhost:3000/", "repository": { "type": "git", - "url": "https://github.com/bhcmoney/opex.git" + "url": "https://github.com/bhcmoney/orca.git" }, "bugs": { - "url": "https://github.com/bhcmoney/opex/issues" + "url": "https://github.com/bhcmoney/orca/issues" }, "keywords": [ "node", diff --git a/website/public/manifest.json b/website/public/manifest.json index c937944..42b91e0 100644 --- a/website/public/manifest.json +++ b/website/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "Opex", - "name": "Opex - Open Source Aquarium Controller", + "short_name": "Orca", + "name": "Orca - Open source Reef Controller Assistant", "icons": [ { "src": "favicon.ico",