From 8fd0906450b0bfbec12b3ac004cb1d168dd1976c Mon Sep 17 00:00:00 2001 From: Weilanwl <1273753708@qq.com> Date: Mon, 1 Apr 2019 23:03:08 +0800 Subject: [PATCH] v2.1.3 --- Colorui-UniApp/App.vue | 162 +- Colorui-UniApp/Readme.md | 44 +- Colorui-UniApp/colorui/main.css | 274 +- Colorui-UniApp/manifest.json | 5 +- Colorui-UniApp/node_modules/.bin/prettier | 15 + Colorui-UniApp/node_modules/.bin/prettier.cmd | 7 + .../node_modules/prettier/README.md | 96 + .../node_modules/prettier/bin-prettier.js | 36684 ++++++++++++++ Colorui-UniApp/node_modules/prettier/index.js | 29708 +++++++++++ .../node_modules/prettier/package.json | 86 + .../node_modules/prettier/parser-babylon.js | 1 + .../node_modules/prettier/parser-flow.js | 1 + .../node_modules/prettier/parser-glimmer.js | 1946 + .../node_modules/prettier/parser-graphql.js | 1 + .../node_modules/prettier/parser-markdown.js | 1 + .../node_modules/prettier/parser-parse5.js | 1 + .../node_modules/prettier/parser-postcss.js | 40612 ++++++++++++++++ .../prettier/parser-typescript.js | 1 + .../node_modules/prettier/parser-vue.js | 1 + .../node_modules/prettier/third-party.js | 5495 +++ Colorui-UniApp/package-lock.json | 11 + Colorui-UniApp/pages.json | 78 +- Colorui-UniApp/pages/basics/background.vue | 9 +- Colorui-UniApp/pages/basics/button.vue | 4 +- Colorui-UniApp/pages/basics/home.vue | 2 +- Colorui-UniApp/pages/component/form.vue | 35 +- Colorui-UniApp/pages/component/home.vue | 2 +- Colorui-UniApp/pages/component/swiper.vue | 10 +- Colorui-UniApp/pages/plugin/home.vue | 2 +- Colorui-UniApp/pages/plugin/indexes.vue | 2 +- Colorui-UniApp/pages/plugin/verticalnav.vue | 4 + 31 files changed, 115010 insertions(+), 290 deletions(-) create mode 100644 Colorui-UniApp/node_modules/.bin/prettier create mode 100644 Colorui-UniApp/node_modules/.bin/prettier.cmd create mode 100644 Colorui-UniApp/node_modules/prettier/README.md create mode 100644 Colorui-UniApp/node_modules/prettier/bin-prettier.js create mode 100644 Colorui-UniApp/node_modules/prettier/index.js create mode 100644 Colorui-UniApp/node_modules/prettier/package.json create mode 100644 Colorui-UniApp/node_modules/prettier/parser-babylon.js create mode 100644 Colorui-UniApp/node_modules/prettier/parser-flow.js create mode 100644 Colorui-UniApp/node_modules/prettier/parser-glimmer.js create mode 100644 Colorui-UniApp/node_modules/prettier/parser-graphql.js create mode 100644 Colorui-UniApp/node_modules/prettier/parser-markdown.js create mode 100644 Colorui-UniApp/node_modules/prettier/parser-parse5.js create mode 100644 Colorui-UniApp/node_modules/prettier/parser-postcss.js create mode 100644 Colorui-UniApp/node_modules/prettier/parser-typescript.js create mode 100644 Colorui-UniApp/node_modules/prettier/parser-vue.js create mode 100644 Colorui-UniApp/node_modules/prettier/third-party.js create mode 100644 Colorui-UniApp/package-lock.json diff --git a/Colorui-UniApp/App.vue b/Colorui-UniApp/App.vue index d82a4b3..763e269 100644 --- a/Colorui-UniApp/App.vue +++ b/Colorui-UniApp/App.vue @@ -13,91 +13,97 @@ }; // #endif - // #ifdef MP + // #ifdef MP-WEIXIN Vue.prototype.StatusBar = e.statusBarHeight; let custom = wx.getMenuButtonBoundingClientRect(); Vue.prototype.Custom = custom; Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight; - // #endif + // #endif - Vue.prototype.ColorList = [{ - title: '嫣红', - name: 'red', - color: '#e54d42' - }, - { - title: '桔橙', - name: 'orange', - color: '#f37b1d' - }, - { - title: '明黄', - name: 'yellow', - color: '#fbbd08' - }, - { - title: '橄榄', - name: 'olive', - color: '#8dc63f' - }, - { - title: '森绿', - name: 'green', - color: '#39b54a' - }, - { - title: '天青', - name: 'cyan', - color: '#1cbbb4' - }, - { - title: '海蓝', - name: 'blue', - color: '#0081ff' - }, - { - title: '姹紫', - name: 'purple', - color: '#6739b6' - }, - { - title: '木槿', - name: 'mauve', - color: '#9c26b0' - }, - { - title: '桃粉', - name: 'pink', - color: '#e03997' - }, - { - title: '棕褐', - name: 'brown', - color: '#a5673f' - }, - { - title: '玄灰', - name: 'grey', - color: '#8799a3' - }, - { - title: '草灰', - name: 'gray', - color: '#aaaaaa' - }, - { - title: '墨黑', - name: 'black', - color: '#333333' - }, - { - title: '雅白', - name: 'white', - color: '#ffffff' - }, - ] + // #ifdef MP-ALIPAY + Vue.prototype.StatusBar = e.statusBarHeight; + Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight; + // #endif } }) + + Vue.prototype.ColorList = [{ + title: '嫣红', + name: 'red', + color: '#e54d42' + }, + { + title: '桔橙', + name: 'orange', + color: '#f37b1d' + }, + { + title: '明黄', + name: 'yellow', + color: '#fbbd08' + }, + { + title: '橄榄', + name: 'olive', + color: '#8dc63f' + }, + { + title: '森绿', + name: 'green', + color: '#39b54a' + }, + { + title: '天青', + name: 'cyan', + color: '#1cbbb4' + }, + { + title: '海蓝', + name: 'blue', + color: '#0081ff' + }, + { + title: '姹紫', + name: 'purple', + color: '#6739b6' + }, + { + title: '木槿', + name: 'mauve', + color: '#9c26b0' + }, + { + title: '桃粉', + name: 'pink', + color: '#e03997' + }, + { + title: '棕褐', + name: 'brown', + color: '#a5673f' + }, + { + title: '玄灰', + name: 'grey', + color: '#8799a3' + }, + { + title: '草灰', + name: 'gray', + color: '#aaaaaa' + }, + { + title: '墨黑', + name: 'black', + color: '#333333' + }, + { + title: '雅白', + name: 'white', + color: '#ffffff' + }, + ] + }, onShow: function() { console.log('App Show') diff --git a/Colorui-UniApp/Readme.md b/Colorui-UniApp/Readme.md index e86ae00..0c65808 100644 --- a/Colorui-UniApp/Readme.md +++ b/Colorui-UniApp/Readme.md @@ -1,26 +1,33 @@ -

+

ColorUI简介

+## 前言 +ColorUI是一个css库!!!在你引入样式后可以根据class来调用组件,一些含有交互的操作我也有简单写,可以为你开发提供一些思路。插件市场版本如果和更新日志不一样,请移步Github下载。有组件需求或者Bug提交也可以移步到issues。 + +## 交流 +微信群:加入微信群请先添加开发者微信,备注UniApp插件市场。QQ群:240787041 或扫描二维码。 + +## 素材 +ColorUI在语雀有个群友共同在维护的知识库,里面有一些群友改的模板和UI素材供开发使用哦! +[语雀-ColorUI群资源](https://www.yuque.com/colorui) + ## 开始使用 下载源码解压,复制根目录的 `/colorui` 文件夹到你的根目录 `App.vue` 引入关键Css `main.css` `icon.css` ``` ``` ------- +------ ## 使用自定义导航栏 -`main.js` 引入 `cu-custom` 组件 -``` -import cuCustom from './colorui/components/cu-custom.vue' -Vue.component('cu-custom',cuCustom) -``` +导航栏作为常用组件有做简单封装,当然你也可以直接复制代码结构自己修改,达到个性化目的。 + `App.vue` 获得系统信息 ``` onLaunch: function() { @@ -34,7 +41,7 @@ onLaunch: function() { Vue.prototype.CustomBar = e.statusBarHeight + 45; }; // #endif - + // #ifdef MP Vue.prototype.StatusBar = e.statusBarHeight; let custom = wx.getMenuButtonBoundingClientRect(); @@ -45,12 +52,21 @@ onLaunch: function() { }) }, ``` + `pages.json` 配置取消系统导航栏 ``` "globalStyle": { "navigationStyle": "custom" }, ``` +复制代码结构可以直接使用,注意全局变量的获取。 + +使用封装,在`main.js` 引入 `cu-custom` 组件。 +``` +import cuCustom from './colorui/components/cu-custom.vue' +Vue.component('cu-custom',cuCustom) +``` + `page.vue` 页面可以直接调用了 ``` @@ -70,19 +86,27 @@ onLaunch: function() { | content | 中间区域 | | right | 右侧区域(小程序端可使用范围很窄!) | + ------ + ## 使用自定义Tabbar 这部分暂时没有封装,思路可以参考下我的源码,原理是一个主页面引入多个页面,在主页面进行切换显示。这样可以解决切换时闪烁的问题。 + ------ + ## 更新日志 + * 2019年4月01日 v2.1.3 + * 优化代码,支持支付宝小程序 + * textarea 样式还原 + * 2019年3月28日 v2.1.2 * 修复列表组件样式 * 优化主样式代码 - + * 2019年3月27日 v2.1.1 * 新增多种扩展 * 优化堆叠轮播图 diff --git a/Colorui-UniApp/colorui/main.css b/Colorui-UniApp/colorui/main.css index 5b392ab..da60465 100644 --- a/Colorui-UniApp/colorui/main.css +++ b/Colorui-UniApp/colorui/main.css @@ -1,11 +1,14 @@ /* - ColorUi for uniApp v2.1.2 | by 文晓港 2019年3月28日23:58:47 + ColorUi for uniApp v2.1.3 | by 文晓港 2019年4月1日22:58:47 仅供学习交流,如作它用所承受的法律责任一概与作者无关 使用ColorUi开发扩展与插件时,请注明基于ColorUi开发 (QQ交流群:240787041) 文档:http://www.color-ui.com/ */ +html { + max-width: 750px; +} /* ================== 初始化 @@ -30,7 +33,19 @@ body { --grey: #8799a3; --gray: #aaaaaa; --black: #333333; - --white: #ffffff; + --white: #ffffff; + --redLight: #fadbd9; + --orangeLight: #fde6d2; + --yellowLight: #fef2ce; + --oliveLight: #e8f4d9; + --greenLight: #d7f0db; + --cyanLight: #d2f1f0; + --blueLight: #cce6ff; + --purpleLight: #e1d7f0; + --mauveLight: #ebd4ef; + --pinkLight: #f9d7ea; + --brownLight: #ede1d9; + --greyLight: #e7ebed; --gradualRed: linear-gradient(45deg, #f43f3b, #ec008c); --gradualOrange: linear-gradient(45deg, #ff9700, #ed1c24); --gradualGreen: linear-gradient(45deg, #39b54a, #8dc63f); @@ -119,17 +134,20 @@ switch::before { font-family: "cuIcon"; content: "\e645"; position: absolute; - color: var(--white) !important; + color: var(--white) !important; top: 0%; left: 0upx; font-size: 26upx; line-height: 26px; - width: 26px; + width: 50%; text-align: center; pointer-events: none; transform: scale(0, 0); transition: all 0.3s ease-in-out 0s; z-index: 9; + bottom: 0; + height: 26px; + margin: auto; } switch::before { @@ -149,12 +167,13 @@ switch.checked::before { transform: scale(0, 0); } +/* #ifndef MP-ALIPAY */ radio::before, checkbox::before { font-family: "cuIcon"; content: "\e645"; position: absolute; - color: var(--white) !important; + color: var(--white) !important; top: 50%; margin-top: -8px; right: 5px; @@ -166,6 +185,22 @@ checkbox::before { z-index: 9; } +radio .wx-radio-input, +checkbox .wx-checkbox-input, +radio .uni-radio-input, +checkbox .uni-checkbox-input { + margin: 0; + width: 24px; + height: 24px; +} + +checkbox.round .wx-checkbox-input, +checkbox.round .uni-checkbox-input { + border-radius: 100upx; +} + +/* #endif */ + switch[checked]::before { transform: scale(0, 0); } @@ -211,19 +246,7 @@ radio-group { display: inline-block; } -radio .wx-radio-input, -checkbox .wx-checkbox-input, -radio .uni-radio-input, -checkbox .uni-checkbox-input { - margin: 0; - width: 24px; - height: 24px; -} -checkbox.round .wx-checkbox-input, -checkbox.round .uni-checkbox-input { - border-radius: 100upx; -} switch.radius .wx-switch-input::after, switch.radius .wx-switch-input, @@ -261,11 +284,11 @@ radio.radio .uni-radio-input-checked::after { margin: auto; border-radius: 200upx; /* #ifndef MP */ - border: 7px solid var(--white) !important; + border: 7px solid var(--white) !important; /* #endif */ /* #ifdef MP */ - border: 8px solid var(--white) !important; + border: 8px solid var(--white) !important; /* #endif */ } @@ -424,7 +447,7 @@ radio.white[checked] .wx-radio-input, switch.white.checked .uni-switch-input, checkbox.white.checked .uni-checkbox-input, radio.white.checked .uni-radio-input { - border-color: var(--white) !important; + border-color: var(--white) !important; } switch.red[checked] .wx-switch-input.wx-switch-input-checked, @@ -434,7 +457,7 @@ switch.red.checked .uni-switch-input.uni-switch-input-checked, checkbox.red.checked .uni-checkbox-input, radio.red.checked .uni-radio-input { background-color: var(--red) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.orange[checked] .wx-switch-input, @@ -444,7 +467,7 @@ switch.orange.checked .uni-switch-input, checkbox.orange.checked .uni-checkbox-input, radio.orange.checked .uni-radio-input { background-color: var(--orange) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.yellow[checked] .wx-switch-input, @@ -464,7 +487,7 @@ switch.olive.checked .uni-switch-input, checkbox.olive.checked .uni-checkbox-input, radio.olive.checked .uni-radio-input { background-color: var(--olive) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.green[checked] .wx-switch-input, @@ -480,7 +503,7 @@ checkbox.checked .uni-checkbox-input, radio.green.checked .uni-radio-input, radio.checked .uni-radio-input { background-color: var(--green) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.cyan[checked] .wx-switch-input, @@ -490,7 +513,7 @@ switch.cyan.checked .uni-switch-input, checkbox.cyan.checked .uni-checkbox-input, radio.cyan.checked .uni-radio-input { background-color: var(--cyan) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.blue[checked] .wx-switch-input, @@ -500,7 +523,7 @@ switch.blue.checked .uni-switch-input, checkbox.blue.checked .uni-checkbox-input, radio.blue.checked .uni-radio-input { background-color: var(--blue) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.purple[checked] .wx-switch-input, @@ -510,7 +533,7 @@ switch.purple.checked .uni-switch-input, checkbox.purple.checked .uni-checkbox-input, radio.purple.checked .uni-radio-input { background-color: var(--purple) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.mauve[checked] .wx-switch-input, @@ -520,7 +543,7 @@ switch.mauve.checked .uni-switch-input, checkbox.mauve.checked .uni-checkbox-input, radio.mauve.checked .uni-radio-input { background-color: var(--mauve) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.pink[checked] .wx-switch-input, @@ -530,7 +553,7 @@ switch.pink.checked .uni-switch-input, checkbox.pink.checked .uni-checkbox-input, radio.pink.checked .uni-radio-input { background-color: var(--pink) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.brown[checked] .wx-switch-input, @@ -540,7 +563,7 @@ switch.brown.checked .uni-switch-input, checkbox.brown.checked .uni-checkbox-input, radio.brown.checked .uni-radio-input { background-color: var(--brown) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.grey[checked] .wx-switch-input, @@ -550,7 +573,7 @@ switch.grey.checked .uni-switch-input, checkbox.grey.checked .uni-checkbox-input, radio.grey.checked .uni-radio-input { background-color: var(--grey) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.gray[checked] .wx-switch-input, @@ -570,7 +593,7 @@ switch.black.checked .uni-switch-input, checkbox.black.checked .uni-checkbox-input, radio.black.checked .uni-radio-input { background-color: var(--black) !important; - color: var(--white) !important; + color: var(--white) !important; } switch.white[checked] .wx-switch-input, @@ -579,7 +602,7 @@ radio.white[checked] .wx-radio-input, switch.white.checked .uni-switch-input, checkbox.white.checked .uni-checkbox-input, radio.white.checked .uni-radio-input { - background-color: var(--white) !important; + background-color: var(--white) !important; color: #666 !important; } @@ -758,6 +781,7 @@ radio.white.checked .uni-radio-input { .cu-btn { position: relative; + border: 0upx; display: inline-flex; align-items: center; justify-content: center; @@ -865,7 +889,7 @@ button.icon.lg { .cu-btn[disabled] { opacity: 0.6; - color: var(--white); + color: var(--white); } /* ================== @@ -981,7 +1005,7 @@ button.icon.lg { font-size: 20upx; padding: 0upx 10upx; height: 28upx; - color: var(--white); + color: var(--white); } .cu-tag.badge:not([class*="bg-"]) { @@ -1016,7 +1040,7 @@ button.icon.lg { justify-content: center; align-items: center; background-color: #ccc; - color: var(--white); + color: var(--white); white-space: nowrap; position: relative; width: 64upx; @@ -1101,7 +1125,7 @@ button.icon.lg { justify-items: flex-end; justify-content: space-around; font-size: 20upx; - color: var(--white); + color: var(--white); transition: width 0.6s ease; } @@ -1198,7 +1222,7 @@ button.icon.lg { margin: auto; width: 260upx; height: 260upx; - background-color: var(--white); + background-color: var(--white); border-radius: 10upx; box-shadow: 0 0 0upx 2000upx rgba(0, 0, 0, 0.5); display: flex; @@ -1222,7 +1246,7 @@ button.icon.lg { .cu-load.load-modal::after { content: ""; position: absolute; - background-color: var(--white); + background-color: var(--white); border-radius: 50%; width: 200upx; height: 200upx; @@ -1348,7 +1372,7 @@ button.icon.lg { display: flex; padding-right: 10upx; height: 140upx; - background-color: var(--white); + background-color: var(--white); justify-content: flex-end; align-items: center } @@ -1417,7 +1441,7 @@ button.icon.lg { display: flex; padding: 0 30upx; min-height: 100upx; - background-color: var(--white); + background-color: var(--white); justify-content: space-between; align-items: center } @@ -1481,7 +1505,7 @@ button.icon.lg { } .cu-list.menu>.cu-item .cu-avatar-group .cu-avatar { - border-color: var(--white) + border-color: var(--white) } .cu-list.menu>.cu-item .content>view:first-child { @@ -1579,7 +1603,7 @@ button.icon.lg { } .cu-list.grid { - background-color: var(--white); + background-color: var(--white); text-align: center } @@ -1779,6 +1803,7 @@ button.icon.lg { height: 64upx; line-height: 64upx; font-size: 26upx; + background-color: transparent; } .cu-bar .search-form [class*="icon"] { @@ -1958,7 +1983,7 @@ button.icon.lg { .cu-bar.input { padding-right: 20upx; - background-color: var(--white); + background-color: var(--white); } .cu-bar.input input { @@ -1997,6 +2022,13 @@ button.icon.lg { width: calc(100% - 440upx); } +/* #ifdef MP-ALIPAY */ +.cu-custom .cu-bar .action .icon-back { + opacity: 0; +} + +/* #endif */ + .cu-custom .cu-bar .content image { height: 60upx; width: 240upx; @@ -2004,9 +2036,12 @@ button.icon.lg { .cu-custom .cu-bar { min-height: 0px; - /* #ifdef MP */ + /* #ifdef MP-WEIXIN */ padding-right: 220upx; /* #endif */ + /* #ifdef MP-ALIPAY */ + padding-right: 150upx; + /* #endif */ box-shadow: 0upx 0upx 0upx; z-index: 9999; } @@ -2030,7 +2065,7 @@ button.icon.lg { transform-origin: 0 0; pointer-events: none; box-sizing: border-box; - border: 1upx solid var(--white); + border: 1upx solid var(--white); opacity: 0.5; } @@ -2048,7 +2083,7 @@ button.icon.lg { pointer-events: none; box-sizing: border-box; opacity: 0.6; - background-color: var(--white); + background-color: var(--white); } .cu-custom .cu-bar .border-custom text { @@ -2089,7 +2124,7 @@ button.icon.lg { .cu-timeline { display: block; - background-color: var(--white); + background-color: var(--white); } .cu-timeline .cu-time { @@ -2130,7 +2165,7 @@ button.icon.lg { position: absolute; top: 36upx; z-index: 9; - background-color: var(--white); + background-color: var(--white); width: 50upx; height: 50upx; text-align: center; @@ -2144,7 +2179,7 @@ button.icon.lg { } .cu-timeline>.cu-item[class*="icon"]::before { - background-color: var(--white); + background-color: var(--white); width: 50upx; height: 50upx; text-align: center; @@ -2214,7 +2249,7 @@ button.icon.lg { } .cu-chat .cu-item>.main .content:not([class*="bg-"]) { - background-color: var(--white); + background-color: var(--white); color: #666; } @@ -2292,7 +2327,7 @@ button.icon.lg { padding: 8upx 12upx; background-color: rgba(0, 0, 0, 0.2); border-radius: 6upx; - color: var(--white); + color: var(--white); max-width: 400upx; line-height: 1.4; } @@ -2308,7 +2343,7 @@ button.icon.lg { .cu-card>.cu-item { display: block; - background-color: var(--white); + background-color: var(--white); overflow: hidden; border-radius: 10upx; margin: 30upx; @@ -2361,7 +2396,7 @@ button.icon.lg { .cu-card.dynamic>.cu-item { display: block; - background-color: var(--white); + background-color: var(--white); overflow: hidden; } @@ -2439,7 +2474,7 @@ button.icon.lg { ==================== */ .cu-form-group { - background-color: var(--white); + background-color: var(--white); padding: 1upx 30upx; display: flex; align-items: center; @@ -2473,13 +2508,6 @@ button.icon.lg { box-sizing: border-box; } -.cu-form-group.top .title { - height: 1em; - line-height: 1; - align-self: flex-start; - margin-top: 16px; -} - .cu-form-group textarea { margin: 32upx 0 30upx; height: 4.6em; @@ -2488,28 +2516,12 @@ button.icon.lg { flex: 1; font-size: 28upx; padding: 0; - box-sizing: content-box; - display: inline-block; - vertical-align: top; } -.cu-form-group textarea .placeholder { - color: transparent; -} - -.cu-form-group textarea::after { - content: attr(data-placeholder); - color: gray; - position: absolute; - top: 0; - left: 0; - pointer-events: none; - transition: 0.2s; - opacity: 1; -} - -.cu-form-group textarea.value::after { - opacity: 0; +.cu-form-group.align-start .title { + height: 1em; + margin-top: 32upx; + line-height: 1em; } .cu-form-group picker { @@ -2648,33 +2660,53 @@ button.icon.lg { /* ================== 轮播 ==================== */ +swiper .a-swiper-dot { + display: inline-block; + width: 16upx; + height: 16upx; + background: rgba(0, 0, 0, .3); + border-radius: 50%; + vertical-align: middle; +} + +swiper .wx-swiper-dots, +swiper .a-swiper-dots, +swiper .uni-swiper-dots { + display: flex; + align-items: center; + width: 100%; + justify-content: center; +} swiper.square-dot .wx-swiper-dot, +swiper.square-dot .a-swiper-dot, swiper.square-dot .uni-swiper-dot { - background-color: var(--white); + background-color: var(--white); opacity: 0.4; width: 10upx; height: 10upx; border-radius: 20upx; - transition: all 0.3s ease-in-out 0s; + margin: 0 8upx !important; } swiper.square-dot .wx-swiper-dot.wx-swiper-dot-active, +swiper.square-dot .a-swiper-dot.a-swiper-dot-active, swiper.square-dot .uni-swiper-dot.uni-swiper-dot-active { opacity: 1; width: 30upx; } swiper.round-dot .wx-swiper-dot, +swiper.round-dot .a-swiper-dot, swiper.round-dot .uni-swiper-dot { width: 10upx; height: 10upx; - top: -4upx; - transition: all 0.3s ease-in-out 0s; position: relative; + margin: 4upx 8upx !important; } swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active::after, +swiper.round-dot .a-swiper-dot.a-swiper-dot-active::after, swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active::after { content: ""; position: absolute; @@ -2685,15 +2717,15 @@ swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active::after { right: 0; bottom: 0; margin: auto; - background-color: var(--white); + background-color: var(--white); border-radius: 20upx; } swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active, +swiper.round-dot .a-swiper-dot.a-swiper-dot-active, swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active { width: 18upx; height: 18upx; - top: 0upx; } .screen-swiper { @@ -2712,7 +2744,7 @@ swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active { } .card-swiper { - height: 420upx; + height: 420upx !important; } .card-swiper swiper-item { @@ -2885,19 +2917,19 @@ scroll-view.cu-steps .cu-item { .cu-steps .cu-item[class*="text-"] .num::before { transform: translateY(-40upx); - color: var(--white); + color: var(--white); } .cu-steps .cu-item .num::after { transform: translateY(40upx); - color: var(--white); + color: var(--white); transition: all 0.3s ease-in-out 0s; } .cu-steps .cu-item[class*="text-"] .num::after { content: "\e645"; font-family: 'cuIcon'; - color: var(--white); + color: var(--white); transform: translateY(0upx); } @@ -3513,7 +3545,7 @@ scroll-view.cu-steps .cu-item { .line-gray::after, .lines-gray::after { - border-color: var(--grey); + border-color: var(--gray); } .line-black::after, @@ -3523,17 +3555,17 @@ scroll-view.cu-steps .cu-item { .line-white::after, .lines-white::after { - border-color: var(--white); + border-color: var(--white); } .bg-red { background-color: var(--red); - color: var(--white); + color: var(--white); } .bg-orange { background-color: var(--orange); - color: var(--white); + color: var(--white); } .bg-yellow { @@ -3543,47 +3575,47 @@ scroll-view.cu-steps .cu-item { .bg-olive { background-color: var(--olive); - color: var(--white); + color: var(--white); } .bg-green { background-color: var(--green); - color: var(--white); + color: var(--white); } .bg-cyan { background-color: var(--cyan); - color: var(--white); + color: var(--white); } .bg-blue { background-color: var(--blue); - color: var(--white); + color: var(--white); } .bg-purple { background-color: var(--purple); - color: var(--white); + color: var(--white); } .bg-mauve { background-color: var(--mauve); - color: var(--white); + color: var(--white); } .bg-pink { background-color: var(--pink); - color: var(--white); + color: var(--white); } .bg-brown { background-color: var(--brown); - color: var(--white); + color: var(--white); } .bg-grey { background-color: var(--grey); - color: var(--white); + color: var(--white); } .bg-gray { @@ -3593,22 +3625,22 @@ scroll-view.cu-steps .cu-item { .bg-black { background-color: var(--black); - color: var(--white); + color: var(--white); } .bg-white { - background-color: var(--white); + background-color: var(--white); color: #666; } .bg-shadeTop { background-image: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.01)); - color: var(--white); + color: var(--white); } .bg-shadeBottom { background-image: linear-gradient(rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 1)); - color: var(--white); + color: var(--white); } .bg-red.light { @@ -3671,44 +3703,34 @@ scroll-view.cu-steps .cu-item { background-color: #e7ebed; } -.bg-gray.light { - color: #666; - background-color: #fadbd9; -} - -.bg-gray.light { - color: #888; - background-color: #f1f1f1; -} - .bg-gradual-red { background-image: var(--gradualRed); - color: var(--white); + color: var(--white); } .bg-gradual-orange { background-image: var(--gradualOrange); - color: var(--white); + color: var(--white); } .bg-gradual-green { background-image: var(--gradualGreen); - color: var(--white); + color: var(--white); } .bg-gradual-purple { background-image: var(--gradualPurple); - color: var(--white); + color: var(--white); } .bg-gradual-pink { background-image: var(--gradualPink); - color: var(--white); + color: var(--white); } .bg-gradual-blue { background-image: var(--gradualBlue); - color: var(--white); + color: var(--white); } .shadow[class*="-red"] { @@ -3981,7 +4003,7 @@ scroll-view.cu-steps .cu-item { .text-white, .line-white, .lines-white { - color: var(--white); + color: var(--white); } .text-shadow { diff --git a/Colorui-UniApp/manifest.json b/Colorui-UniApp/manifest.json index 306c886..2cf7d54 100644 --- a/Colorui-UniApp/manifest.json +++ b/Colorui-UniApp/manifest.json @@ -3,7 +3,7 @@ "appid" : "__UNI__239DC72", "description" : "", "versionName" : "1.0.0", - "versionCode" : "100", + "versionCode" : 213, "transformPx" : false, "app-plus" : { /* 5+App特有相关 */ @@ -50,7 +50,8 @@ /* 小程序特有相关 */ "appid" : "", "setting" : { - "urlCheck" : true + "urlCheck" : false, + "es6" : true } }, "h5" : { diff --git a/Colorui-UniApp/node_modules/.bin/prettier b/Colorui-UniApp/node_modules/.bin/prettier new file mode 100644 index 0000000..4c8ec82 --- /dev/null +++ b/Colorui-UniApp/node_modules/.bin/prettier @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../prettier/bin-prettier.js" "$@" + ret=$? +else + node "$basedir/../prettier/bin-prettier.js" "$@" + ret=$? +fi +exit $ret diff --git a/Colorui-UniApp/node_modules/.bin/prettier.cmd b/Colorui-UniApp/node_modules/.bin/prettier.cmd new file mode 100644 index 0000000..a6e910c --- /dev/null +++ b/Colorui-UniApp/node_modules/.bin/prettier.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\prettier\bin-prettier.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\prettier\bin-prettier.js" %* +) \ No newline at end of file diff --git a/Colorui-UniApp/node_modules/prettier/README.md b/Colorui-UniApp/node_modules/prettier/README.md new file mode 100644 index 0000000..05b70bb --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/README.md @@ -0,0 +1,96 @@ +![Prettier Banner](https://raw.githubusercontent.com/prettier/prettier-logo/master/images/prettier-banner-light.png) + +

Opinionated Code Formatter

+ +

+ + JavaScript + · Flow + · TypeScript + · CSS + · SCSS + · Less + · JSX + · Vue + · GraphQL + · JSON + · Markdown + · + Your favorite language? + + +

+ +

+ + Gitter + + + Travis + + + Codecov + + + npm version + + + monthly downloads + + + code style: prettier + + + Follow+Prettier+on+Twitter + +

+ +## Intro + +Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. + +### Input + + +```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/Colorui-UniApp/node_modules/prettier/bin-prettier.js b/Colorui-UniApp/node_modules/prettier/bin-prettier.js new file mode 100644 index 0000000..bd404e5 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/bin-prettier.js @@ -0,0 +1,36684 @@ +#!/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 path = _interopDefault(require('path')); +var util = _interopDefault(require('util')); +var url = _interopDefault(require('url')); +var assert = _interopDefault(require('assert')); +var os = _interopDefault(require('os')); +var thirdParty = require('./third-party'); +var thirdParty__default = thirdParty['default']; +var events = _interopDefault(require('events')); +var readline = _interopDefault(require('readline')); + +var name = "prettier"; +var version$1 = "1.12.1"; +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":">=4"}; +var dependencies = {"@babel/code-frame":"7.0.0-beta.40","@glimmer/syntax":"0.30.3","babylon":"7.0.0-beta.34","camelcase":"4.1.0","chalk":"2.1.0","cjk-regex":"1.0.2","cosmiconfig":"3.1.0","dashify":"0.2.2","dedent":"0.7.0","diff":"3.2.0","editorconfig":"0.15.0","editorconfig-to-prettier":"0.0.6","emoji-regex":"6.5.1","escape-string-regexp":"1.0.5","esutils":"2.0.2","find-project-root":"1.1.1","flow-parser":"0.69","get-stream":"3.0.0","globby":"6.1.0","graphql":"0.13.2","gray-matter":"3.1.1","html-tag-names":"1.1.2","ignore":"3.3.7","jest-docblock":"22.2.2","json-stable-stringify":"1.0.1","leven":"2.1.0","mem":"1.1.0","minimatch":"3.0.4","minimist":"1.2.0","parse5":"3.0.3","postcss-less":"1.1.5","postcss-media-query-parser":"0.2.3","postcss-scss":"1.0.5","postcss-selector-parser":"2.2.3","postcss-values-parser":"1.5.0","read-pkg-up":"3.0.0","remark-frontmatter":"1.1.0","remark-parse":"5.0.0","resolve":"1.5.0","semver":"5.4.1","string-width":"2.1.1","typescript":"2.8.0-rc","typescript-eslint-parser":"14.0.0","unicode-regex":"1.0.1","unified":"6.1.6"}; +var devDependencies = {"babel-cli":"6.24.1","babel-preset-es2015":"6.24.1","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","jest":"21.1.0","mkdirp":"0.5.1","prettier":"1.12.0","prettylint":"1.0.0","rimraf":"2.6.2","rollup":"0.47.6","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","shelljs":"0.8.1","snapshot-diff":"0.2.2","strip-ansi":"4.0.0","tempy":"0.2.1","uglify-es":"3.3.9","webpack":"2.6.1"}; +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","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 ./scripts/build/build.js","build-docs":"node ./scripts/build/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, + 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, + scripts: scripts, + default: _package +}); + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); +} + +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 ansiRegex = createCommonjsModule(function (module) { +'use strict'; + +module.exports = () => { + const 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 = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; + +var isFullwidthCodePoint = createCommonjsModule(function (module) { +'use strict'; +/* eslint-disable yoda */ +module.exports = 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 = str => { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + str = stripAnsi(str); + + let width = 0; + + for (let i = 0; i < str.length; i++) { + const 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 () { + // 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(?:\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4B\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 matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +var escapeStringRegexp = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +var punctuation_ranges = [ + // http://www.unicode.org/charts/PDF/U3000.pdf CJK Symbols and Punctuation + [0x3000, 0x303f], + // http://www.unicode.org/charts/PDF/UAC00.pdf Hangul Syllables + [0xac00, 0xd7af], + // http://www.unicode.org/charts/PDF/UFE10.pdf Vertical Forms + [0xfe10, 0xfe1f], + // http://www.unicode.org/charts/PDF/UFE30.pdf CJK Compatibility Forms + // http://www.unicode.org/charts/PDF/UFE50.pdf Small Form Variants + [0xfe30, 0xfe6f], + // http://www.unicode.org/charts/PDF/UFF00.pdf Halfwidth and Fullwidth Forms + [0xff00, 0xff60], + [0xffe0, 0xffef], +]; +var character_ranges = [ + // http://www.unicode.org/charts/PDF/U1100.pdf Hangul Jamo + [0x1100, 0x11ff], + // http://www.unicode.org/charts/PDF/U2E80.pdf CJK Radicals Supplement + // http://www.unicode.org/charts/PDF/U2F00.pdf Kangxi Radicals + [0x2e80, 0x2fdf], + // http://www.unicode.org/charts/PDF/U3040.pdf Hiragana + // http://www.unicode.org/charts/PDF/U30A0.pdf Katakana + // http://www.unicode.org/charts/PDF/U3100.pdf Bopomofo + // http://www.unicode.org/charts/PDF/U3130.pdf Hangul Compatibility Jamo + [0x3040, 0x318f], + // http://www.unicode.org/charts/PDF/U3200.pdf Enclosed CJK Letters and Months + // http://www.unicode.org/charts/PDF/U3300.pdf CJK Compatibility + // http://www.unicode.org/charts/PDF/U3400.pdf CJK Unified Ideographs Extension A + [0x3200, 0x4dbf], + // http://www.unicode.org/charts/PDF/U4E00.pdf CJK Unified Ideographs (Han) + [0x4e00, 0x9fff], + // http://www.unicode.org/charts/PDF/UA960.pdf Hangul Jamo Extended-A + [0xa960, 0xa97f], + // http://www.unicode.org/charts/PDF/UF900.pdf CJK Compatibility Ideographs + [0xf900, 0xfaff], +]; +function get_regex() { + return create_regex(character_ranges.concat(punctuation_ranges)); +} +// istanbul ignore next +// tslint:disable-next-line:no-namespace +(function (get_regex) { + function punctuations() { + return create_regex(punctuation_ranges); + } + get_regex.punctuations = punctuations; + function characters() { + return create_regex(character_ranges); + } + get_regex.characters = characters; +})(get_regex || (get_regex = {})); +function create_regex(ranges) { + return new RegExp("[" + ranges.map(get_bracket_content).reduce(function (a, b) { return a + b; }) + "]", 'g'); +} +function get_bracket_content(range) { + return get_escaped_unicode(range[0]) + "-" + get_escaped_unicode(range[1]); +} +function get_escaped_unicode(num) { + return "\\u" + num.toString(16); +} +var lib = get_regex; + +var data_generated = createCommonjsModule(function (module, exports) { +"use strict"; +exports.__esModule = true; +exports.get_data = function () { return ({ "Pc": [[95, 95], [8255, 8256], [8276, 8276], [65075, 65076], [65101, 65103], [65343, 65343]], "Pe": [[41, 41], [93, 93], [125, 125], [3899, 3899], [3901, 3901], [5788, 5788], [8262, 8262], [8318, 8318], [8334, 8334], [8969, 8969], [8971, 8971], [9002, 9002], [10089, 10089], [10091, 10091], [10093, 10093], [10095, 10095], [10097, 10097], [10099, 10099], [10101, 10101], [10182, 10182], [10215, 10215], [10217, 10217], [10219, 10219], [10221, 10221], [10223, 10223], [10628, 10628], [10630, 10630], [10632, 10632], [10634, 10634], [10636, 10636], [10638, 10638], [10640, 10640], [10642, 10642], [10644, 10644], [10646, 10646], [10648, 10648], [10713, 10713], [10715, 10715], [10749, 10749], [11811, 11811], [11813, 11813], [11815, 11815], [11817, 11817], [12297, 12297], [12299, 12299], [12301, 12301], [12303, 12303], [12305, 12305], [12309, 12309], [12311, 12311], [12313, 12313], [12315, 12315], [12318, 12319], [64830, 64830], [65048, 65048], [65078, 65078], [65080, 65080], [65082, 65082], [65084, 65084], [65086, 65086], [65088, 65088], [65090, 65090], [65092, 65092], [65096, 65096], [65114, 65114], [65116, 65116], [65118, 65118], [65289, 65289], [65341, 65341], [65373, 65373], [65376, 65376], [65379, 65379]], "Ps": [[40, 40], [91, 91], [123, 123], [3898, 3898], [3900, 3900], [5787, 5787], [8218, 8218], [8222, 8222], [8261, 8261], [8317, 8317], [8333, 8333], [8968, 8968], [8970, 8970], [9001, 9001], [10088, 10088], [10090, 10090], [10092, 10092], [10094, 10094], [10096, 10096], [10098, 10098], [10100, 10100], [10181, 10181], [10214, 10214], [10216, 10216], [10218, 10218], [10220, 10220], [10222, 10222], [10627, 10627], [10629, 10629], [10631, 10631], [10633, 10633], [10635, 10635], [10637, 10637], [10639, 10639], [10641, 10641], [10643, 10643], [10645, 10645], [10647, 10647], [10712, 10712], [10714, 10714], [10748, 10748], [11810, 11810], [11812, 11812], [11814, 11814], [11816, 11816], [11842, 11842], [12296, 12296], [12298, 12298], [12300, 12300], [12302, 12302], [12304, 12304], [12308, 12308], [12310, 12310], [12312, 12312], [12314, 12314], [12317, 12317], [64831, 64831], [65047, 65047], [65077, 65077], [65079, 65079], [65081, 65081], [65083, 65083], [65085, 65085], [65087, 65087], [65089, 65089], [65091, 65091], [65095, 65095], [65113, 65113], [65115, 65115], [65117, 65117], [65288, 65288], [65339, 65339], [65371, 65371], [65375, 65375], [65378, 65378]], "Lm": [[688, 705], [710, 721], [736, 740], [748, 748], [750, 750], [884, 884], [890, 890], [1369, 1369], [1600, 1600], [1765, 1766], [2036, 2037], [2042, 2042], [2074, 2074], [2084, 2084], [2088, 2088], [2417, 2417], [3654, 3654], [3782, 3782], [4348, 4348], [6103, 6103], [6211, 6211], [6823, 6823], [7288, 7293], [7468, 7530], [7544, 7544], [7579, 7615], [8305, 8305], [8319, 8319], [8336, 8348], [11388, 11389], [11631, 11631], [11823, 11823], [12293, 12293], [12337, 12341], [12347, 12347], [12445, 12446], [12540, 12542], [40981, 40981], [42232, 42237], [42508, 42508], [42623, 42623], [42652, 42653], [42775, 42783], [42864, 42864], [42888, 42888], [43000, 43001], [43471, 43471], [43494, 43494], [43632, 43632], [43741, 43741], [43763, 43764], [43868, 43871], [65392, 65392], [65438, 65439]], "Mc": [[2307, 2307], [2363, 2363], [2366, 2368], [2377, 2380], [2382, 2383], [2434, 2435], [2494, 2496], [2503, 2504], [2507, 2508], [2519, 2519], [2563, 2563], [2622, 2624], [2691, 2691], [2750, 2752], [2761, 2761], [2763, 2764], [2818, 2819], [2878, 2878], [2880, 2880], [2887, 2888], [2891, 2892], [2903, 2903], [3006, 3007], [3009, 3010], [3014, 3016], [3018, 3020], [3031, 3031], [3073, 3075], [3137, 3140], [3202, 3203], [3262, 3262], [3264, 3268], [3271, 3272], [3274, 3275], [3285, 3286], [3330, 3331], [3390, 3392], [3398, 3400], [3402, 3404], [3415, 3415], [3458, 3459], [3535, 3537], [3544, 3551], [3570, 3571], [3902, 3903], [3967, 3967], [4139, 4140], [4145, 4145], [4152, 4152], [4155, 4156], [4182, 4183], [4194, 4196], [4199, 4205], [4227, 4228], [4231, 4236], [4239, 4239], [4250, 4252], [6070, 6070], [6078, 6085], [6087, 6088], [6435, 6438], [6441, 6443], [6448, 6449], [6451, 6456], [6681, 6682], [6741, 6741], [6743, 6743], [6753, 6753], [6755, 6756], [6765, 6770], [6916, 6916], [6965, 6965], [6971, 6971], [6973, 6977], [6979, 6980], [7042, 7042], [7073, 7073], [7078, 7079], [7082, 7082], [7143, 7143], [7146, 7148], [7150, 7150], [7154, 7155], [7204, 7211], [7220, 7221], [7393, 7393], [7410, 7411], [7415, 7415], [12334, 12335], [43043, 43044], [43047, 43047], [43136, 43137], [43188, 43203], [43346, 43347], [43395, 43395], [43444, 43445], [43450, 43451], [43453, 43456], [43567, 43568], [43571, 43572], [43597, 43597], [43643, 43643], [43645, 43645], [43755, 43755], [43758, 43759], [43765, 43765], [44003, 44004], [44006, 44007], [44009, 44010], [44012, 44012]], "Zp": [[8233, 8233]], "Sc": [[36, 36], [162, 165], [1423, 1423], [1547, 1547], [2546, 2547], [2555, 2555], [2801, 2801], [3065, 3065], [3647, 3647], [6107, 6107], [8352, 8383], [43064, 43064], [65020, 65020], [65129, 65129], [65284, 65284], [65504, 65505], [65509, 65510]], "Me": [[1160, 1161], [6846, 6846], [8413, 8416], [8418, 8420], [42608, 42610]], "Sk": [[94, 94], [96, 96], [168, 168], [175, 175], [180, 180], [184, 184], [706, 709], [722, 735], [741, 747], [749, 749], [751, 767], [885, 885], [900, 901], [8125, 8125], [8127, 8129], [8141, 8143], [8157, 8159], [8173, 8175], [8189, 8190], [12443, 12444], [42752, 42774], [42784, 42785], [42889, 42890], [43867, 43867], [64434, 64449], [65342, 65342], [65344, 65344], [65507, 65507]], "Cs": [[55296, 55296], [56191, 56192], [56319, 56320], [57343, 57343]], "Nl": [[5870, 5872], [8544, 8578], [8581, 8584], [12295, 12295], [12321, 12329], [12344, 12346], [42726, 42735]], "So": [[166, 166], [169, 169], [174, 174], [176, 176], [1154, 1154], [1421, 1422], [1550, 1551], [1758, 1758], [1769, 1769], [1789, 1790], [2038, 2038], [2554, 2554], [2928, 2928], [3059, 3064], [3066, 3066], [3199, 3199], [3407, 3407], [3449, 3449], [3841, 3843], [3859, 3859], [3861, 3863], [3866, 3871], [3892, 3892], [3894, 3894], [3896, 3896], [4030, 4037], [4039, 4044], [4046, 4047], [4053, 4056], [4254, 4255], [5008, 5017], [6464, 6464], [6622, 6655], [7009, 7018], [7028, 7036], [8448, 8449], [8451, 8454], [8456, 8457], [8468, 8468], [8470, 8471], [8478, 8483], [8485, 8485], [8487, 8487], [8489, 8489], [8494, 8494], [8506, 8507], [8522, 8522], [8524, 8525], [8527, 8527], [8586, 8587], [8597, 8601], [8604, 8607], [8609, 8610], [8612, 8613], [8615, 8621], [8623, 8653], [8656, 8657], [8659, 8659], [8661, 8691], [8960, 8967], [8972, 8991], [8994, 9000], [9003, 9083], [9085, 9114], [9140, 9179], [9186, 9254], [9280, 9290], [9372, 9449], [9472, 9654], [9656, 9664], [9666, 9719], [9728, 9838], [9840, 10087], [10132, 10175], [10240, 10495], [11008, 11055], [11077, 11078], [11085, 11123], [11126, 11157], [11160, 11193], [11197, 11208], [11210, 11218], [11244, 11247], [11493, 11498], [11904, 11929], [11931, 12019], [12032, 12245], [12272, 12283], [12292, 12292], [12306, 12307], [12320, 12320], [12342, 12343], [12350, 12351], [12688, 12689], [12694, 12703], [12736, 12771], [12800, 12830], [12842, 12871], [12880, 12880], [12896, 12927], [12938, 12976], [12992, 13054], [13056, 13311], [19904, 19967], [42128, 42182], [43048, 43051], [43062, 43063], [43065, 43065], [43639, 43641], [65021, 65021], [65508, 65508], [65512, 65512], [65517, 65518], [65532, 65533]], "Lt": [[453, 453], [456, 456], [459, 459], [498, 498], [8072, 8079], [8088, 8095], [8104, 8111], [8124, 8124], [8140, 8140], [8188, 8188]], "Zl": [[8232, 8232]], "Lo": [[170, 170], [186, 186], [443, 443], [448, 451], [660, 660], [1488, 1514], [1520, 1522], [1568, 1599], [1601, 1610], [1646, 1647], [1649, 1747], [1749, 1749], [1774, 1775], [1786, 1788], [1791, 1791], [1808, 1808], [1810, 1839], [1869, 1957], [1969, 1969], [1994, 2026], [2048, 2069], [2112, 2136], [2144, 2154], [2208, 2228], [2230, 2237], [2308, 2361], [2365, 2365], [2384, 2384], [2392, 2401], [2418, 2432], [2437, 2444], [2447, 2448], [2451, 2472], [2474, 2480], [2482, 2482], [2486, 2489], [2493, 2493], [2510, 2510], [2524, 2525], [2527, 2529], [2544, 2545], [2556, 2556], [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], [2809, 2809], [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, 3129], [3133, 3133], [3160, 3162], [3168, 3169], [3200, 3200], [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], [3412, 3414], [3423, 3425], [3450, 3455], [3461, 3478], [3482, 3505], [3507, 3515], [3517, 3517], [3520, 3526], [3585, 3632], [3634, 3635], [3648, 3653], [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], [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], [4304, 4346], [4349, 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], [5121, 5740], [5743, 5759], [5761, 5786], [5792, 5866], [5873, 5880], [5888, 5900], [5902, 5905], [5920, 5937], [5952, 5969], [5984, 5996], [5998, 6000], [6016, 6067], [6108, 6108], [6176, 6210], [6212, 6263], [6272, 6276], [6279, 6312], [6314, 6314], [6320, 6389], [6400, 6430], [6480, 6509], [6512, 6516], [6528, 6571], [6576, 6601], [6656, 6678], [6688, 6740], [6917, 6963], [6981, 6987], [7043, 7072], [7086, 7087], [7098, 7141], [7168, 7203], [7245, 7247], [7258, 7287], [7401, 7404], [7406, 7409], [7413, 7414], [8501, 8504], [11568, 11623], [11648, 11670], [11680, 11686], [11688, 11694], [11696, 11702], [11704, 11710], [11712, 11718], [11720, 11726], [11728, 11734], [11736, 11742], [12294, 12294], [12348, 12348], [12353, 12438], [12447, 12447], [12449, 12538], [12543, 12543], [12549, 12590], [12593, 12686], [12704, 12730], [12784, 12799], [13312, 13312], [19893, 19893], [19968, 19968], [40938, 40938], [40960, 40980], [40982, 42124], [42192, 42231], [42240, 42507], [42512, 42527], [42538, 42539], [42606, 42606], [42656, 42725], [42895, 42895], [42999, 42999], [43003, 43009], [43011, 43013], [43015, 43018], [43020, 43042], [43072, 43123], [43138, 43187], [43250, 43255], [43259, 43259], [43261, 43261], [43274, 43301], [43312, 43334], [43360, 43388], [43396, 43442], [43488, 43492], [43495, 43503], [43514, 43518], [43520, 43560], [43584, 43586], [43588, 43595], [43616, 43631], [43633, 43638], [43642, 43642], [43646, 43695], [43697, 43697], [43701, 43702], [43705, 43709], [43712, 43712], [43714, 43714], [43739, 43740], [43744, 43754], [43762, 43762], [43777, 43782], [43785, 43790], [43793, 43798], [43808, 43814], [43816, 43822], [43968, 44002], [44032, 44032], [55203, 55203], [55216, 55238], [55243, 55291], [63744, 64109], [64112, 64217], [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], [65382, 65391], [65393, 65437], [65440, 65470], [65474, 65479], [65482, 65487], [65490, 65495], [65498, 65500]], "Mn": [[768, 879], [1155, 1159], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1552, 1562], [1611, 1631], [1648, 1648], [1750, 1756], [1759, 1764], [1767, 1768], [1770, 1773], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2093], [2137, 2139], [2260, 2273], [2275, 2306], [2362, 2362], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2391], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2641, 2641], [2672, 2673], [2677, 2677], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2810, 2815], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2884], [2893, 2893], [2902, 2902], [2914, 2915], [2946, 2946], [3008, 3008], [3021, 3021], [3072, 3072], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3170, 3171], [3201, 3201], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3328, 3329], [3387, 3388], [3393, 3396], [3405, 3405], [3426, 3427], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3981, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4151], [4153, 4154], [4157, 4158], [4184, 4185], [4190, 4192], [4209, 4212], [4226, 4226], [4229, 4230], [4237, 4237], [4253, 4253], [4957, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6277, 6278], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6683, 6683], [6742, 6742], [6744, 6750], [6752, 6752], [6754, 6754], [6757, 6764], [6771, 6780], [6783, 6783], [6832, 6845], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7040, 7041], [7074, 7077], [7080, 7081], [7083, 7085], [7142, 7142], [7144, 7145], [7149, 7149], [7151, 7153], [7212, 7219], [7222, 7223], [7376, 7378], [7380, 7392], [7394, 7400], [7405, 7405], [7412, 7412], [7416, 7417], [7616, 7673], [7675, 7679], [8400, 8412], [8417, 8417], [8421, 8432], [11503, 11505], [11647, 11647], [11744, 11775], [12330, 12333], [12441, 12442], [42607, 42607], [42612, 42621], [42654, 42655], [42736, 42737], [43010, 43010], [43014, 43014], [43019, 43019], [43045, 43046], [43204, 43205], [43232, 43249], [43302, 43309], [43335, 43345], [43392, 43394], [43443, 43443], [43446, 43449], [43452, 43452], [43493, 43493], [43561, 43566], [43569, 43570], [43573, 43574], [43587, 43587], [43596, 43596], [43644, 43644], [43696, 43696], [43698, 43700], [43703, 43704], [43710, 43711], [43713, 43713], [43756, 43757], [43766, 43766], [44005, 44005], [44008, 44008], [44013, 44013], [64286, 64286], [65024, 65039], [65056, 65071]], "Po": [[33, 35], [37, 39], [42, 42], [44, 44], [46, 47], [58, 59], [63, 64], [92, 92], [161, 161], [167, 167], [182, 183], [191, 191], [894, 894], [903, 903], [1370, 1375], [1417, 1417], [1472, 1472], [1475, 1475], [1478, 1478], [1523, 1524], [1545, 1546], [1548, 1549], [1563, 1563], [1566, 1567], [1642, 1645], [1748, 1748], [1792, 1805], [2039, 2041], [2096, 2110], [2142, 2142], [2404, 2405], [2416, 2416], [2557, 2557], [2800, 2800], [3572, 3572], [3663, 3663], [3674, 3675], [3844, 3858], [3860, 3860], [3973, 3973], [4048, 4052], [4057, 4058], [4170, 4175], [4347, 4347], [4960, 4968], [5741, 5742], [5867, 5869], [5941, 5942], [6100, 6102], [6104, 6106], [6144, 6149], [6151, 6154], [6468, 6469], [6686, 6687], [6816, 6822], [6824, 6829], [7002, 7008], [7164, 7167], [7227, 7231], [7294, 7295], [7360, 7367], [7379, 7379], [8214, 8215], [8224, 8231], [8240, 8248], [8251, 8254], [8257, 8259], [8263, 8273], [8275, 8275], [8277, 8286], [11513, 11516], [11518, 11519], [11632, 11632], [11776, 11777], [11782, 11784], [11787, 11787], [11790, 11798], [11800, 11801], [11803, 11803], [11806, 11807], [11818, 11822], [11824, 11833], [11836, 11839], [11841, 11841], [11843, 11849], [12289, 12291], [12349, 12349], [12539, 12539], [42238, 42239], [42509, 42511], [42611, 42611], [42622, 42622], [42738, 42743], [43124, 43127], [43214, 43215], [43256, 43258], [43260, 43260], [43310, 43311], [43359, 43359], [43457, 43469], [43486, 43487], [43612, 43615], [43742, 43743], [43760, 43761], [44011, 44011], [65040, 65046], [65049, 65049], [65072, 65072], [65093, 65094], [65097, 65100], [65104, 65106], [65108, 65111], [65119, 65121], [65128, 65128], [65130, 65131], [65281, 65283], [65285, 65287], [65290, 65290], [65292, 65292], [65294, 65295], [65306, 65307], [65311, 65312], [65340, 65340], [65377, 65377], [65380, 65381]], "Co": [[57344, 57344], [63743, 63743]], "Sm": [[43, 43], [60, 62], [124, 124], [126, 126], [172, 172], [177, 177], [215, 215], [247, 247], [1014, 1014], [1542, 1544], [8260, 8260], [8274, 8274], [8314, 8316], [8330, 8332], [8472, 8472], [8512, 8516], [8523, 8523], [8592, 8596], [8602, 8603], [8608, 8608], [8611, 8611], [8614, 8614], [8622, 8622], [8654, 8655], [8658, 8658], [8660, 8660], [8692, 8959], [8992, 8993], [9084, 9084], [9115, 9139], [9180, 9185], [9655, 9655], [9665, 9665], [9720, 9727], [9839, 9839], [10176, 10180], [10183, 10213], [10224, 10239], [10496, 10626], [10649, 10711], [10716, 10747], [10750, 11007], [11056, 11076], [11079, 11084], [64297, 64297], [65122, 65122], [65124, 65126], [65291, 65291], [65308, 65310], [65372, 65372], [65374, 65374], [65506, 65506], [65513, 65516]], "Pf": [[187, 187], [8217, 8217], [8221, 8221], [8250, 8250], [11779, 11779], [11781, 11781], [11786, 11786], [11789, 11789], [11805, 11805], [11809, 11809]], "Cc": [[0, 31], [127, 159]], "Pi": [[171, 171], [8216, 8216], [8219, 8220], [8223, 8223], [8249, 8249], [11778, 11778], [11780, 11780], [11785, 11785], [11788, 11788], [11804, 11804], [11808, 11808]], "Lu": [[65, 90], [192, 214], [216, 222], [256, 256], [258, 258], [260, 260], [262, 262], [264, 264], [266, 266], [268, 268], [270, 270], [272, 272], [274, 274], [276, 276], [278, 278], [280, 280], [282, 282], [284, 284], [286, 286], [288, 288], [290, 290], [292, 292], [294, 294], [296, 296], [298, 298], [300, 300], [302, 302], [304, 304], [306, 306], [308, 308], [310, 310], [313, 313], [315, 315], [317, 317], [319, 319], [321, 321], [323, 323], [325, 325], [327, 327], [330, 330], [332, 332], [334, 334], [336, 336], [338, 338], [340, 340], [342, 342], [344, 344], [346, 346], [348, 348], [350, 350], [352, 352], [354, 354], [356, 356], [358, 358], [360, 360], [362, 362], [364, 364], [366, 366], [368, 368], [370, 370], [372, 372], [374, 374], [376, 377], [379, 379], [381, 381], [385, 386], [388, 388], [390, 391], [393, 395], [398, 401], [403, 404], [406, 408], [412, 413], [415, 416], [418, 418], [420, 420], [422, 423], [425, 425], [428, 428], [430, 431], [433, 435], [437, 437], [439, 440], [444, 444], [452, 452], [455, 455], [458, 458], [461, 461], [463, 463], [465, 465], [467, 467], [469, 469], [471, 471], [473, 473], [475, 475], [478, 478], [480, 480], [482, 482], [484, 484], [486, 486], [488, 488], [490, 490], [492, 492], [494, 494], [497, 497], [500, 500], [502, 504], [506, 506], [508, 508], [510, 510], [512, 512], [514, 514], [516, 516], [518, 518], [520, 520], [522, 522], [524, 524], [526, 526], [528, 528], [530, 530], [532, 532], [534, 534], [536, 536], [538, 538], [540, 540], [542, 542], [544, 544], [546, 546], [548, 548], [550, 550], [552, 552], [554, 554], [556, 556], [558, 558], [560, 560], [562, 562], [570, 571], [573, 574], [577, 577], [579, 582], [584, 584], [586, 586], [588, 588], [590, 590], [880, 880], [882, 882], [886, 886], [895, 895], [902, 902], [904, 906], [908, 908], [910, 911], [913, 929], [931, 939], [975, 975], [978, 980], [984, 984], [986, 986], [988, 988], [990, 990], [992, 992], [994, 994], [996, 996], [998, 998], [1000, 1000], [1002, 1002], [1004, 1004], [1006, 1006], [1012, 1012], [1015, 1015], [1017, 1018], [1021, 1071], [1120, 1120], [1122, 1122], [1124, 1124], [1126, 1126], [1128, 1128], [1130, 1130], [1132, 1132], [1134, 1134], [1136, 1136], [1138, 1138], [1140, 1140], [1142, 1142], [1144, 1144], [1146, 1146], [1148, 1148], [1150, 1150], [1152, 1152], [1162, 1162], [1164, 1164], [1166, 1166], [1168, 1168], [1170, 1170], [1172, 1172], [1174, 1174], [1176, 1176], [1178, 1178], [1180, 1180], [1182, 1182], [1184, 1184], [1186, 1186], [1188, 1188], [1190, 1190], [1192, 1192], [1194, 1194], [1196, 1196], [1198, 1198], [1200, 1200], [1202, 1202], [1204, 1204], [1206, 1206], [1208, 1208], [1210, 1210], [1212, 1212], [1214, 1214], [1216, 1217], [1219, 1219], [1221, 1221], [1223, 1223], [1225, 1225], [1227, 1227], [1229, 1229], [1232, 1232], [1234, 1234], [1236, 1236], [1238, 1238], [1240, 1240], [1242, 1242], [1244, 1244], [1246, 1246], [1248, 1248], [1250, 1250], [1252, 1252], [1254, 1254], [1256, 1256], [1258, 1258], [1260, 1260], [1262, 1262], [1264, 1264], [1266, 1266], [1268, 1268], [1270, 1270], [1272, 1272], [1274, 1274], [1276, 1276], [1278, 1278], [1280, 1280], [1282, 1282], [1284, 1284], [1286, 1286], [1288, 1288], [1290, 1290], [1292, 1292], [1294, 1294], [1296, 1296], [1298, 1298], [1300, 1300], [1302, 1302], [1304, 1304], [1306, 1306], [1308, 1308], [1310, 1310], [1312, 1312], [1314, 1314], [1316, 1316], [1318, 1318], [1320, 1320], [1322, 1322], [1324, 1324], [1326, 1326], [1329, 1366], [4256, 4293], [4295, 4295], [4301, 4301], [5024, 5109], [7680, 7680], [7682, 7682], [7684, 7684], [7686, 7686], [7688, 7688], [7690, 7690], [7692, 7692], [7694, 7694], [7696, 7696], [7698, 7698], [7700, 7700], [7702, 7702], [7704, 7704], [7706, 7706], [7708, 7708], [7710, 7710], [7712, 7712], [7714, 7714], [7716, 7716], [7718, 7718], [7720, 7720], [7722, 7722], [7724, 7724], [7726, 7726], [7728, 7728], [7730, 7730], [7732, 7732], [7734, 7734], [7736, 7736], [7738, 7738], [7740, 7740], [7742, 7742], [7744, 7744], [7746, 7746], [7748, 7748], [7750, 7750], [7752, 7752], [7754, 7754], [7756, 7756], [7758, 7758], [7760, 7760], [7762, 7762], [7764, 7764], [7766, 7766], [7768, 7768], [7770, 7770], [7772, 7772], [7774, 7774], [7776, 7776], [7778, 7778], [7780, 7780], [7782, 7782], [7784, 7784], [7786, 7786], [7788, 7788], [7790, 7790], [7792, 7792], [7794, 7794], [7796, 7796], [7798, 7798], [7800, 7800], [7802, 7802], [7804, 7804], [7806, 7806], [7808, 7808], [7810, 7810], [7812, 7812], [7814, 7814], [7816, 7816], [7818, 7818], [7820, 7820], [7822, 7822], [7824, 7824], [7826, 7826], [7828, 7828], [7838, 7838], [7840, 7840], [7842, 7842], [7844, 7844], [7846, 7846], [7848, 7848], [7850, 7850], [7852, 7852], [7854, 7854], [7856, 7856], [7858, 7858], [7860, 7860], [7862, 7862], [7864, 7864], [7866, 7866], [7868, 7868], [7870, 7870], [7872, 7872], [7874, 7874], [7876, 7876], [7878, 7878], [7880, 7880], [7882, 7882], [7884, 7884], [7886, 7886], [7888, 7888], [7890, 7890], [7892, 7892], [7894, 7894], [7896, 7896], [7898, 7898], [7900, 7900], [7902, 7902], [7904, 7904], [7906, 7906], [7908, 7908], [7910, 7910], [7912, 7912], [7914, 7914], [7916, 7916], [7918, 7918], [7920, 7920], [7922, 7922], [7924, 7924], [7926, 7926], [7928, 7928], [7930, 7930], [7932, 7932], [7934, 7934], [7944, 7951], [7960, 7965], [7976, 7983], [7992, 7999], [8008, 8013], [8025, 8025], [8027, 8027], [8029, 8029], [8031, 8031], [8040, 8047], [8120, 8123], [8136, 8139], [8152, 8155], [8168, 8172], [8184, 8187], [8450, 8450], [8455, 8455], [8459, 8461], [8464, 8466], [8469, 8469], [8473, 8477], [8484, 8484], [8486, 8486], [8488, 8488], [8490, 8493], [8496, 8499], [8510, 8511], [8517, 8517], [8579, 8579], [11264, 11310], [11360, 11360], [11362, 11364], [11367, 11367], [11369, 11369], [11371, 11371], [11373, 11376], [11378, 11378], [11381, 11381], [11390, 11392], [11394, 11394], [11396, 11396], [11398, 11398], [11400, 11400], [11402, 11402], [11404, 11404], [11406, 11406], [11408, 11408], [11410, 11410], [11412, 11412], [11414, 11414], [11416, 11416], [11418, 11418], [11420, 11420], [11422, 11422], [11424, 11424], [11426, 11426], [11428, 11428], [11430, 11430], [11432, 11432], [11434, 11434], [11436, 11436], [11438, 11438], [11440, 11440], [11442, 11442], [11444, 11444], [11446, 11446], [11448, 11448], [11450, 11450], [11452, 11452], [11454, 11454], [11456, 11456], [11458, 11458], [11460, 11460], [11462, 11462], [11464, 11464], [11466, 11466], [11468, 11468], [11470, 11470], [11472, 11472], [11474, 11474], [11476, 11476], [11478, 11478], [11480, 11480], [11482, 11482], [11484, 11484], [11486, 11486], [11488, 11488], [11490, 11490], [11499, 11499], [11501, 11501], [11506, 11506], [42560, 42560], [42562, 42562], [42564, 42564], [42566, 42566], [42568, 42568], [42570, 42570], [42572, 42572], [42574, 42574], [42576, 42576], [42578, 42578], [42580, 42580], [42582, 42582], [42584, 42584], [42586, 42586], [42588, 42588], [42590, 42590], [42592, 42592], [42594, 42594], [42596, 42596], [42598, 42598], [42600, 42600], [42602, 42602], [42604, 42604], [42624, 42624], [42626, 42626], [42628, 42628], [42630, 42630], [42632, 42632], [42634, 42634], [42636, 42636], [42638, 42638], [42640, 42640], [42642, 42642], [42644, 42644], [42646, 42646], [42648, 42648], [42650, 42650], [42786, 42786], [42788, 42788], [42790, 42790], [42792, 42792], [42794, 42794], [42796, 42796], [42798, 42798], [42802, 42802], [42804, 42804], [42806, 42806], [42808, 42808], [42810, 42810], [42812, 42812], [42814, 42814], [42816, 42816], [42818, 42818], [42820, 42820], [42822, 42822], [42824, 42824], [42826, 42826], [42828, 42828], [42830, 42830], [42832, 42832], [42834, 42834], [42836, 42836], [42838, 42838], [42840, 42840], [42842, 42842], [42844, 42844], [42846, 42846], [42848, 42848], [42850, 42850], [42852, 42852], [42854, 42854], [42856, 42856], [42858, 42858], [42860, 42860], [42862, 42862], [42873, 42873], [42875, 42875], [42877, 42878], [42880, 42880], [42882, 42882], [42884, 42884], [42886, 42886], [42891, 42891], [42893, 42893], [42896, 42896], [42898, 42898], [42902, 42902], [42904, 42904], [42906, 42906], [42908, 42908], [42910, 42910], [42912, 42912], [42914, 42914], [42916, 42916], [42918, 42918], [42920, 42920], [42922, 42926], [42928, 42932], [42934, 42934], [65313, 65338]], "Pd": [[45, 45], [1418, 1418], [1470, 1470], [5120, 5120], [6150, 6150], [8208, 8213], [11799, 11799], [11802, 11802], [11834, 11835], [11840, 11840], [12316, 12316], [12336, 12336], [12448, 12448], [65073, 65074], [65112, 65112], [65123, 65123], [65293, 65293]], "Cf": [[173, 173], [1536, 1541], [1564, 1564], [1757, 1757], [1807, 1807], [2274, 2274], [6158, 6158], [8203, 8207], [8234, 8238], [8288, 8292], [8294, 8303], [65279, 65279], [65529, 65531]], "Nd": [[48, 57], [1632, 1641], [1776, 1785], [1984, 1993], [2406, 2415], [2534, 2543], [2662, 2671], [2790, 2799], [2918, 2927], [3046, 3055], [3174, 3183], [3302, 3311], [3430, 3439], [3558, 3567], [3664, 3673], [3792, 3801], [3872, 3881], [4160, 4169], [4240, 4249], [6112, 6121], [6160, 6169], [6470, 6479], [6608, 6617], [6784, 6793], [6800, 6809], [6992, 7001], [7088, 7097], [7232, 7241], [7248, 7257], [42528, 42537], [43216, 43225], [43264, 43273], [43472, 43481], [43504, 43513], [43600, 43609], [44016, 44025], [65296, 65305]], "Ll": [[97, 122], [181, 181], [223, 246], [248, 255], [257, 257], [259, 259], [261, 261], [263, 263], [265, 265], [267, 267], [269, 269], [271, 271], [273, 273], [275, 275], [277, 277], [279, 279], [281, 281], [283, 283], [285, 285], [287, 287], [289, 289], [291, 291], [293, 293], [295, 295], [297, 297], [299, 299], [301, 301], [303, 303], [305, 305], [307, 307], [309, 309], [311, 312], [314, 314], [316, 316], [318, 318], [320, 320], [322, 322], [324, 324], [326, 326], [328, 329], [331, 331], [333, 333], [335, 335], [337, 337], [339, 339], [341, 341], [343, 343], [345, 345], [347, 347], [349, 349], [351, 351], [353, 353], [355, 355], [357, 357], [359, 359], [361, 361], [363, 363], [365, 365], [367, 367], [369, 369], [371, 371], [373, 373], [375, 375], [378, 378], [380, 380], [382, 384], [387, 387], [389, 389], [392, 392], [396, 397], [402, 402], [405, 405], [409, 411], [414, 414], [417, 417], [419, 419], [421, 421], [424, 424], [426, 427], [429, 429], [432, 432], [436, 436], [438, 438], [441, 442], [445, 447], [454, 454], [457, 457], [460, 460], [462, 462], [464, 464], [466, 466], [468, 468], [470, 470], [472, 472], [474, 474], [476, 477], [479, 479], [481, 481], [483, 483], [485, 485], [487, 487], [489, 489], [491, 491], [493, 493], [495, 496], [499, 499], [501, 501], [505, 505], [507, 507], [509, 509], [511, 511], [513, 513], [515, 515], [517, 517], [519, 519], [521, 521], [523, 523], [525, 525], [527, 527], [529, 529], [531, 531], [533, 533], [535, 535], [537, 537], [539, 539], [541, 541], [543, 543], [545, 545], [547, 547], [549, 549], [551, 551], [553, 553], [555, 555], [557, 557], [559, 559], [561, 561], [563, 569], [572, 572], [575, 576], [578, 578], [583, 583], [585, 585], [587, 587], [589, 589], [591, 659], [661, 687], [881, 881], [883, 883], [887, 887], [891, 893], [912, 912], [940, 974], [976, 977], [981, 983], [985, 985], [987, 987], [989, 989], [991, 991], [993, 993], [995, 995], [997, 997], [999, 999], [1001, 1001], [1003, 1003], [1005, 1005], [1007, 1011], [1013, 1013], [1016, 1016], [1019, 1020], [1072, 1119], [1121, 1121], [1123, 1123], [1125, 1125], [1127, 1127], [1129, 1129], [1131, 1131], [1133, 1133], [1135, 1135], [1137, 1137], [1139, 1139], [1141, 1141], [1143, 1143], [1145, 1145], [1147, 1147], [1149, 1149], [1151, 1151], [1153, 1153], [1163, 1163], [1165, 1165], [1167, 1167], [1169, 1169], [1171, 1171], [1173, 1173], [1175, 1175], [1177, 1177], [1179, 1179], [1181, 1181], [1183, 1183], [1185, 1185], [1187, 1187], [1189, 1189], [1191, 1191], [1193, 1193], [1195, 1195], [1197, 1197], [1199, 1199], [1201, 1201], [1203, 1203], [1205, 1205], [1207, 1207], [1209, 1209], [1211, 1211], [1213, 1213], [1215, 1215], [1218, 1218], [1220, 1220], [1222, 1222], [1224, 1224], [1226, 1226], [1228, 1228], [1230, 1231], [1233, 1233], [1235, 1235], [1237, 1237], [1239, 1239], [1241, 1241], [1243, 1243], [1245, 1245], [1247, 1247], [1249, 1249], [1251, 1251], [1253, 1253], [1255, 1255], [1257, 1257], [1259, 1259], [1261, 1261], [1263, 1263], [1265, 1265], [1267, 1267], [1269, 1269], [1271, 1271], [1273, 1273], [1275, 1275], [1277, 1277], [1279, 1279], [1281, 1281], [1283, 1283], [1285, 1285], [1287, 1287], [1289, 1289], [1291, 1291], [1293, 1293], [1295, 1295], [1297, 1297], [1299, 1299], [1301, 1301], [1303, 1303], [1305, 1305], [1307, 1307], [1309, 1309], [1311, 1311], [1313, 1313], [1315, 1315], [1317, 1317], [1319, 1319], [1321, 1321], [1323, 1323], [1325, 1325], [1327, 1327], [1377, 1415], [5112, 5117], [7296, 7304], [7424, 7467], [7531, 7543], [7545, 7578], [7681, 7681], [7683, 7683], [7685, 7685], [7687, 7687], [7689, 7689], [7691, 7691], [7693, 7693], [7695, 7695], [7697, 7697], [7699, 7699], [7701, 7701], [7703, 7703], [7705, 7705], [7707, 7707], [7709, 7709], [7711, 7711], [7713, 7713], [7715, 7715], [7717, 7717], [7719, 7719], [7721, 7721], [7723, 7723], [7725, 7725], [7727, 7727], [7729, 7729], [7731, 7731], [7733, 7733], [7735, 7735], [7737, 7737], [7739, 7739], [7741, 7741], [7743, 7743], [7745, 7745], [7747, 7747], [7749, 7749], [7751, 7751], [7753, 7753], [7755, 7755], [7757, 7757], [7759, 7759], [7761, 7761], [7763, 7763], [7765, 7765], [7767, 7767], [7769, 7769], [7771, 7771], [7773, 7773], [7775, 7775], [7777, 7777], [7779, 7779], [7781, 7781], [7783, 7783], [7785, 7785], [7787, 7787], [7789, 7789], [7791, 7791], [7793, 7793], [7795, 7795], [7797, 7797], [7799, 7799], [7801, 7801], [7803, 7803], [7805, 7805], [7807, 7807], [7809, 7809], [7811, 7811], [7813, 7813], [7815, 7815], [7817, 7817], [7819, 7819], [7821, 7821], [7823, 7823], [7825, 7825], [7827, 7827], [7829, 7837], [7839, 7839], [7841, 7841], [7843, 7843], [7845, 7845], [7847, 7847], [7849, 7849], [7851, 7851], [7853, 7853], [7855, 7855], [7857, 7857], [7859, 7859], [7861, 7861], [7863, 7863], [7865, 7865], [7867, 7867], [7869, 7869], [7871, 7871], [7873, 7873], [7875, 7875], [7877, 7877], [7879, 7879], [7881, 7881], [7883, 7883], [7885, 7885], [7887, 7887], [7889, 7889], [7891, 7891], [7893, 7893], [7895, 7895], [7897, 7897], [7899, 7899], [7901, 7901], [7903, 7903], [7905, 7905], [7907, 7907], [7909, 7909], [7911, 7911], [7913, 7913], [7915, 7915], [7917, 7917], [7919, 7919], [7921, 7921], [7923, 7923], [7925, 7925], [7927, 7927], [7929, 7929], [7931, 7931], [7933, 7933], [7935, 7943], [7952, 7957], [7968, 7975], [7984, 7991], [8000, 8005], [8016, 8023], [8032, 8039], [8048, 8061], [8064, 8071], [8080, 8087], [8096, 8103], [8112, 8116], [8118, 8119], [8126, 8126], [8130, 8132], [8134, 8135], [8144, 8147], [8150, 8151], [8160, 8167], [8178, 8180], [8182, 8183], [8458, 8458], [8462, 8463], [8467, 8467], [8495, 8495], [8500, 8500], [8505, 8505], [8508, 8509], [8518, 8521], [8526, 8526], [8580, 8580], [11312, 11358], [11361, 11361], [11365, 11366], [11368, 11368], [11370, 11370], [11372, 11372], [11377, 11377], [11379, 11380], [11382, 11387], [11393, 11393], [11395, 11395], [11397, 11397], [11399, 11399], [11401, 11401], [11403, 11403], [11405, 11405], [11407, 11407], [11409, 11409], [11411, 11411], [11413, 11413], [11415, 11415], [11417, 11417], [11419, 11419], [11421, 11421], [11423, 11423], [11425, 11425], [11427, 11427], [11429, 11429], [11431, 11431], [11433, 11433], [11435, 11435], [11437, 11437], [11439, 11439], [11441, 11441], [11443, 11443], [11445, 11445], [11447, 11447], [11449, 11449], [11451, 11451], [11453, 11453], [11455, 11455], [11457, 11457], [11459, 11459], [11461, 11461], [11463, 11463], [11465, 11465], [11467, 11467], [11469, 11469], [11471, 11471], [11473, 11473], [11475, 11475], [11477, 11477], [11479, 11479], [11481, 11481], [11483, 11483], [11485, 11485], [11487, 11487], [11489, 11489], [11491, 11492], [11500, 11500], [11502, 11502], [11507, 11507], [11520, 11557], [11559, 11559], [11565, 11565], [42561, 42561], [42563, 42563], [42565, 42565], [42567, 42567], [42569, 42569], [42571, 42571], [42573, 42573], [42575, 42575], [42577, 42577], [42579, 42579], [42581, 42581], [42583, 42583], [42585, 42585], [42587, 42587], [42589, 42589], [42591, 42591], [42593, 42593], [42595, 42595], [42597, 42597], [42599, 42599], [42601, 42601], [42603, 42603], [42605, 42605], [42625, 42625], [42627, 42627], [42629, 42629], [42631, 42631], [42633, 42633], [42635, 42635], [42637, 42637], [42639, 42639], [42641, 42641], [42643, 42643], [42645, 42645], [42647, 42647], [42649, 42649], [42651, 42651], [42787, 42787], [42789, 42789], [42791, 42791], [42793, 42793], [42795, 42795], [42797, 42797], [42799, 42801], [42803, 42803], [42805, 42805], [42807, 42807], [42809, 42809], [42811, 42811], [42813, 42813], [42815, 42815], [42817, 42817], [42819, 42819], [42821, 42821], [42823, 42823], [42825, 42825], [42827, 42827], [42829, 42829], [42831, 42831], [42833, 42833], [42835, 42835], [42837, 42837], [42839, 42839], [42841, 42841], [42843, 42843], [42845, 42845], [42847, 42847], [42849, 42849], [42851, 42851], [42853, 42853], [42855, 42855], [42857, 42857], [42859, 42859], [42861, 42861], [42863, 42863], [42865, 42872], [42874, 42874], [42876, 42876], [42879, 42879], [42881, 42881], [42883, 42883], [42885, 42885], [42887, 42887], [42892, 42892], [42894, 42894], [42897, 42897], [42899, 42901], [42903, 42903], [42905, 42905], [42907, 42907], [42909, 42909], [42911, 42911], [42913, 42913], [42915, 42915], [42917, 42917], [42919, 42919], [42921, 42921], [42933, 42933], [42935, 42935], [43002, 43002], [43824, 43866], [43872, 43877], [43888, 43967], [64256, 64262], [64275, 64279], [65345, 65370]], "No": [[178, 179], [185, 185], [188, 190], [2548, 2553], [2930, 2935], [3056, 3058], [3192, 3198], [3416, 3422], [3440, 3448], [3882, 3891], [4969, 4988], [6128, 6137], [6618, 6618], [8304, 8304], [8308, 8313], [8320, 8329], [8528, 8543], [8585, 8585], [9312, 9371], [9450, 9471], [10102, 10131], [11517, 11517], [12690, 12693], [12832, 12841], [12872, 12879], [12881, 12895], [12928, 12937], [12977, 12991], [43056, 43061]], "Zs": [[32, 32], [160, 160], [5760, 5760], [8192, 8202], [8239, 8239], [8287, 8287], [12288, 12288]] }); }; +}); + +unwrapExports(data_generated); + +var utils = createCommonjsModule(function (module, exports) { +"use strict"; +exports.__esModule = true; +function normalize_ranges(ranges) { + return ranges + .sort(function (_a, _b) { + var start1 = _a[0]; + var start2 = _b[0]; + return start1 - start2; + }) + .reduce(function (current, tuple, index) { + if (index === 0) { + return [tuple]; + } + var _a = current[current.length - 1], last_start = _a[0], last_end = _a[1]; + var start = tuple[0], end = tuple[1]; + return last_end + 1 === start + ? current.slice(0, -1).concat([[last_start, end]]) : current.concat([tuple]); + }, []); +} +exports.normalize_ranges = normalize_ranges; +function build_regex(ranges, flag) { + var pattern = ranges + .map(function (_a) { + var start = _a[0], end = _a[1]; + return start === end + ? "\\u" + get_hex(start) + : "\\u" + get_hex(start) + "-\\u" + get_hex(end); + }) + .join(''); + return new RegExp("[" + pattern + "]", flag); +} +exports.build_regex = build_regex; +function get_hex(char_code) { + var hex = char_code.toString(16); + while (hex.length < 4) { + hex = "0" + hex; + } + return hex; +} +}); + +unwrapExports(utils); + +var lib$2 = function (categories, flag) { + var data = data_generated.get_data(); + var ranges = categories.reduce(function (current, category) { return current.concat(data[category]); }, []); + return utils.build_regex(utils.normalize_ranges(ranges), flag); +}; + +const emojiRegex = emojiRegex$1(); + + + + +const cjkPattern = lib().source; + +// http://spec.commonmark.org/0.25/#ascii-punctuation-character +const asciiPunctuationCharRange = escapeStringRegexp( + "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" +); + +// http://spec.commonmark.org/0.25/#punctuation-character +const punctuationCharRange = `${asciiPunctuationCharRange}${lib$2([ + "Pc", + "Pd", + "Pe", + "Pf", + "Pi", + "Po", + "Ps" +]).source.slice(1, -1)}`; // remove bracket expression `[` and `]` + +const punctuationRegex = new RegExp(`[${punctuationCharRange}]`); + +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) { + const 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(arr) { + if (arr.length > 0) { + return arr[arr.length - 1]; + } + return null; +} + +function skip(chars) { + return (text, index, opts) => { + const 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; + } + + const length = text.length; + let cursor = index; + while (cursor >= 0 && cursor < length) { + const 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; + }; +} + +const skipWhitespace = skip(/\s/); +const skipSpaces = skip(" \t"); +const skipToLineEnd = skip(",; \t"); +const skipEverythingButNewLine = skip(/[^\r\n]/); + +function skipInlineComment(text, index) { + if (index === false) { + return false; + } + + if (text.charAt(index) === "/" && text.charAt(index + 1) === "*") { + for (let 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(text, index, opts) { + const backwards = opts && opts.backwards; + if (index === false) { + return false; + } + + const 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(text, index, opts) { + opts = opts || {}; + const idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + const idx2 = skipNewline(text, idx, opts); + return idx !== idx2; +} + +function hasNewlineInRange(text, start, end) { + for (let 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(text, node, locStart) { + let idx = locStart(node) - 1; + idx = skipSpaces(text, idx, { backwards: true }); + idx = skipNewline(text, idx, { backwards: true }); + idx = skipSpaces(text, idx, { backwards: true }); + const idx2 = skipNewline(text, idx, { backwards: true }); + return idx !== idx2; +} + +function isNextLineEmptyAfterIndex(text, index) { + let oldIdx = null; + let 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(text, idx); + return hasNewline(text, idx); +} + +function isNextLineEmpty(text, node, locEnd) { + return isNextLineEmptyAfterIndex(text, locEnd(node)); +} + +function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) { + let oldIdx = null; + let idx = locEnd(node); + while (idx !== oldIdx) { + oldIdx = idx; + idx = skipSpaces(text, idx); + idx = skipInlineComment(text, idx); + idx = skipTrailingComment(text, idx); + idx = skipNewline(text, idx); + } + return idx; +} + +function getNextNonSpaceNonCommentCharacter(text, node, locEnd) { + return text.charAt( + getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) + ); +} + +function hasSpaces(text, index, opts) { + opts = opts || {}; + const idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + return idx !== index; +} + +// Super inefficient, needs to be cached. +function lineColumnToIndex(lineColumn, text) { + let index = 0; + for (let i = 0; i < lineColumn.line - 1; ++i) { + index = text.indexOf("\n", index) + 1; + if (index === -1) { + return -1; + } + } + return index + lineColumn.column; +} + +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; + } +} + +const PRECEDENCE = {}; +[ + ["|>"], + ["||", "??"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"], + ["**"] +].forEach((tier, i) => { + tier.forEach(op => { + PRECEDENCE[op] = i; + }); +}); + +function getPrecedence(op) { + return PRECEDENCE[op]; +} + +const equalityOperators = { + "==": true, + "!=": true, + "===": true, + "!==": true +}; +const multiplicativeOperators = { + "*": true, + "/": true, + "%": true +}; +const 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 + 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 forbidFunctionAndClass holds) `function` or `class`. +// Will be overzealous if there's already necessary grouping parentheses. +function startsWithNoLookaheadToken(node, forbidFunctionAndClass) { + node = getLeftMost(node); + switch (node.type) { + // Hack. Remove after https://github.com/eslint/typescript-eslint-parser/issues/331 + case "ObjectPattern": + return !forbidFunctionAndClass; + case "FunctionExpression": + case "ClassExpression": + return forbidFunctionAndClass; + case "ObjectExpression": + return true; + case "MemberExpression": + return startsWithNoLookaheadToken(node.object, forbidFunctionAndClass); + case "TaggedTemplateExpression": + if (node.tag.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + return startsWithNoLookaheadToken(node.tag, forbidFunctionAndClass); + case "CallExpression": + if (node.callee.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + return startsWithNoLookaheadToken(node.callee, forbidFunctionAndClass); + case "ConditionalExpression": + return startsWithNoLookaheadToken(node.test, forbidFunctionAndClass); + case "UpdateExpression": + return ( + !node.prefix && + startsWithNoLookaheadToken(node.argument, forbidFunctionAndClass) + ); + case "BindExpression": + return ( + node.object && + startsWithNoLookaheadToken(node.object, forbidFunctionAndClass) + ); + case "SequenceExpression": + return startsWithNoLookaheadToken( + node.expressions[0], + forbidFunctionAndClass + ); + case "TSAsExpression": + return startsWithNoLookaheadToken( + node.expression, + forbidFunctionAndClass + ); + default: + return false; + } +} + +function getLeftMost(node) { + if (node.left) { + return getLeftMost(node.left); + } + return node; +} + +function hasBlockComments(node) { + return node.comments && node.comments.some(isBlockComment); +} + +function isBlockComment(comment) { + return comment.type === "Block" || comment.type === "CommentBlock"; +} + +function hasClosureCompilerTypeCastComment(text, node, locEnd) { + // https://github.com/google/closure-compiler/wiki/Annotating-Types#type-casts + // Syntax example: var x = /** @type {string} */ (fruit); + return ( + node.comments && + node.comments.some( + comment => + comment.leading && + isBlockComment(comment) && + comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/) && + getNextNonSpaceNonCommentCharacter(text, comment, locEnd) === "(" + ) + ); +} + +function getAlignmentSize(value, tabWidth, startIndex) { + startIndex = startIndex || 0; + + let size = 0; + for (let 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) { + const lastNewlineIndex = value.lastIndexOf("\n"); + if (lastNewlineIndex === -1) { + return 0; + } + + return getAlignmentSize( + // All the leading whitespaces + value.slice(lastNewlineIndex + 1).match(/^[ \t]*/)[0], + tabWidth + ); +} + +function printString(raw, options, isDirectiveLiteral) { + // `rawContent` is the string exactly like it appeared in the input source + // code, without its enclosing quotes. + const rawContent = raw.slice(1, -1); + + const double = { quote: '"', regex: /"/g }; + const single = { quote: "'", regex: /'/g }; + + const preferred = options.singleQuote ? single : double; + const alternate = preferred === single ? double : single; + + let shouldUseAlternateQuote = false; + let canChangeDirectiveQuotes = false; + + // 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. + // Also check for the alternate quote, to determine if we're allowed to swap + // the quotes on a DirectiveLiteral. + if ( + rawContent.includes(preferred.quote) || + rawContent.includes(alternate.quote) + ) { + const numPreferredQuotes = (rawContent.match(preferred.regex) || []).length; + const numAlternateQuotes = (rawContent.match(alternate.regex) || []).length; + + shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes; + } else { + canChangeDirectiveQuotes = true; + } + + const enclosingQuote = + options.parser === "json" + ? double.quote + : shouldUseAlternateQuote + ? alternate.quote + : preferred.quote; + + // 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" + ) + ); +} + +function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) { + const otherQuote = enclosingQuote === '"' ? "'" : '"'; + + // Matches _any_ escape and unescaped quotes (both single and double). + const regex = /\\([\s\S])|(['"])/g; + + // Escape and unescape single and double quotes as needed to be able to + // enclose `rawContent` with `enclosingQuote`. + const newContent = rawContent.replace(regex, (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) { + const results = str.match( + new RegExp(`(${escapeStringRegexp(target)})+`, "g") + ); + + if (results === null) { + return 0; + } + + return results.reduce( + (maxCount, result) => Math.max(maxCount, result.length / target.length), + 0 + ); +} + +/** + * split text into whitespaces and words + * @param {string} text + * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>} + */ +function splitText(text) { + const KIND_NON_CJK = "non-cjk"; + const KIND_CJK_CHARACTER = "cjk-character"; + const KIND_CJK_PUNCTUATION = "cjk-punctuation"; + + const nodes = []; + + text + .replace(new RegExp(`(${cjkPattern})\n(${cjkPattern})`, "g"), "$1$2") + .split(/([ \t\n]+)/) + .forEach((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((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(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: KIND_CJK_CHARACTER, + hasLeadingPunctuation: false, + hasTrailingPunctuation: false + } + ); + }); + }); + + return nodes; + + function appendNode(node) { + const lastNode = getLast(nodes); + if (lastNode && lastNode.type === "word") { + if ( + (lastNode.kind === KIND_NON_CJK && + node.kind === KIND_CJK_CHARACTER && + !lastNode.hasTrailingPunctuation) || + (lastNode.kind === KIND_CJK_CHARACTER && + 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(value => /\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 getStringWidth(text) { + if (!text) { + return 0; + } + + // 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) { + const node = path$$1.getValue(); + return hasNodeIgnoreComment(node); +} + +function hasNodeIgnoreComment(node) { + return ( + node && + node.comments && + node.comments.length > 0 && + node.comments.some(comment => comment.value.trim() === "prettier-ignore") + ); +} + +function arrayify(object, keyName) { + return Object.keys(object).reduce( + (array, key) => + array.concat(Object.assign({ [keyName]: key }, object[key])), + [] + ); +} + +function addCommentHelper(node, comment) { + const 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(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addDanglingComment(node, comment) { + comment.leading = false; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addTrailingComment(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} + +var util$1 = { + arrayify, + punctuationRegex, + punctuationCharRange, + getStringWidth, + splitText, + getMaxContinuousCount, + getPrecedence, + shouldFlatten, + isBitwiseOperator, + isExportDeclaration, + getParentExportDeclaration, + getPenultimate, + getLast, + getNextNonSpaceNonCommentCharacterIndex, + getNextNonSpaceNonCommentCharacter, + skipWhitespace, + skipSpaces, + skipNewline, + isNextLineEmptyAfterIndex, + isNextLineEmpty, + isPreviousLineEmpty, + hasNewline, + hasNewlineInRange, + hasSpaces, + setLocStart, + setLocEnd, + startsWithNoLookaheadToken, + hasBlockComments, + isBlockComment, + hasClosureCompilerTypeCastComment, + getAlignmentSize, + getIndentSize, + printString, + printNumber, + hasIgnoreComment, + hasNodeIgnoreComment, + lineColumnToIndex, + makeString, + addLeadingComment, + addDanglingComment, + addTrailingComment +}; + +function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { + function traverseDocRec(doc) { + let shouldRecurse = true; + if (onEnter) { + if (onEnter(doc) === false) { + shouldRecurse = false; + } + } + + if (shouldRecurse) { + if (doc.type === "concat" || doc.type === "fill") { + for (let i = 0; i < doc.parts.length; i++) { + traverseDocRec(doc.parts[i]); + } + } else if (doc.type === "if-break") { + if (doc.breakContents) { + traverseDocRec(doc.breakContents); + } + if (doc.flatContents) { + traverseDocRec(doc.flatContents); + } + } else if (doc.type === "group" && doc.expandedStates) { + if (shouldTraverseConditionalGroups) { + doc.expandedStates.forEach(traverseDocRec); + } else { + traverseDocRec(doc.contents); + } + } else if (doc.contents) { + traverseDocRec(doc.contents); + } + } + + if (onExit) { + onExit(doc); + } + } + + traverseDocRec(doc); +} + +function mapDoc(doc, cb) { + if (doc.type === "concat" || doc.type === "fill") { + const parts = doc.parts.map(part => mapDoc(part, cb)); + return cb(Object.assign({}, doc, { parts })); + } else if (doc.type === "if-break") { + const breakContents = doc.breakContents && mapDoc(doc.breakContents, cb); + const flatContents = doc.flatContents && mapDoc(doc.flatContents, cb); + return cb(Object.assign({}, doc, { breakContents, flatContents })); + } else if (doc.contents) { + const contents = mapDoc(doc.contents, cb); + return cb(Object.assign({}, doc, { contents })); + } + return cb(doc); +} + +function findInDoc(doc, fn, defaultValue) { + let result = defaultValue; + let hasStopped = false; + traverseDoc(doc, doc => { + const maybeResult = fn(doc); + if (maybeResult !== undefined) { + hasStopped = true; + result = maybeResult; + } + if (hasStopped) { + return false; + } + }); + return result; +} + +function isEmpty(n) { + return typeof n === "string" && n.length === 0; +} + +function isLineNext(doc) { + return findInDoc( + doc, + doc => { + if (typeof doc === "string") { + return false; + } + if (doc.type === "line") { + return true; + } + }, + false + ); +} + +function willBreak(doc) { + return findInDoc( + doc, + doc => { + if (doc.type === "group" && doc.break) { + return true; + } + if (doc.type === "line" && doc.hard) { + return true; + } + if (doc.type === "break-parent") { + return true; + } + }, + false + ); +} + +function breakParentGroup(groupStack) { + if (groupStack.length > 0) { + const 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) { + const alreadyVisited = new Map(); + const groupStack = []; + traverseDoc( + doc, + doc => { + if (doc.type === "break-parent") { + breakParentGroup(groupStack); + } + if (doc.type === "group") { + groupStack.push(doc); + if (alreadyVisited.has(doc)) { + return false; + } + alreadyVisited.set(doc, true); + } + }, + doc => { + if (doc.type === "group") { + const group = groupStack.pop(); + if (group.break) { + breakParentGroup(groupStack); + } + } + }, + /* shouldTraverseConditionalGroups */ true + ); +} + +function removeLines(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. + return mapDoc(doc, d => { + if (d.type === "line" && !d.hard) { + return d.soft ? "" : " "; + } else if (d.type === "if-break") { + return d.flatContents || ""; + } + return d; + }); +} + +function stripTrailingHardline(doc) { + // HACK remove ending hardline, original PR: #1984 + if ( + doc.type === "concat" && + doc.parts.length === 2 && + doc.parts[1].type === "concat" && + doc.parts[1].parts.length === 2 && + doc.parts[1].parts[0].hard && + doc.parts[1].parts[1].type === "break-parent" + ) { + return doc.parts[0]; + } + return doc; +} + +var docUtils = { + isEmpty, + willBreak, + isLineNext, + traverseDoc, + mapDoc, + propagateBreaks, + removeLines, + stripTrailingHardline +}; + +function isNextLineEmpty$1(text, node, options) { + return util$1.isNextLineEmpty(text, node, options.locEnd); +} + +function getNextNonSpaceNonCommentCharacterIndex$1(text, node, options) { + return util$1.getNextNonSpaceNonCommentCharacterIndex( + text, + node, + options.locEnd + ); +} + +var utilShared = { + isNextLineEmpty: isNextLineEmpty$1, + isNextLineEmptyAfterIndex: util$1.isNextLineEmptyAfterIndex, + getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$1, + mapDoc: docUtils.mapDoc, // 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 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 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() { + /* 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() {}; + +// 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 assert$1 = 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$1 = 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$1 = 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$1 = true; +var util$4 = true; +var v8 = ">= 1"; +var vm = true; +var zlib = true; +var core$1 = { + assert: assert$1, + 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$1, + http: http, + http2: http2, + https: https, + _http_server: _http_server, + _linklist: _linklist, + module: module$1, + net: net, + os: os$1, + path: path$1, + 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$1, + util: util$4, + v8: v8, + vm: vm, + zlib: zlib +}; + +var core$2 = Object.freeze({ + assert: assert$1, + 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$1, + http: http, + http2: http2, + https: https, + _http_server: _http_server, + _linklist: _linklist, + module: module$1, + net: net, + os: os$1, + path: path$1, + 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$1, + util: util$4, + v8: v8, + vm: vm, + zlib: zlib, + default: core$1 +}); + +var data = ( core$2 && core$1 ) || core$2; + +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 = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = versionIncluded(data[mod]); + } +} +var core_1 = core; + +var caller = function () { + // 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 = 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(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(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 = function (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 = createCommonjsModule(function (module, exports) { +async.core = core_1; +async.isCore = function isCore(x) { return core_1[x]; }; +async.sync = sync; + +exports = async; +module.exports = async; +}); + +var pathExists = createCommonjsModule(function (module) { +'use strict'; + + +module.exports = fp => new Promise(resolve => { + fs.access(fp, err => { + resolve(!err); + }); +}); + +module.exports.sync = fp => { + try { + fs.accessSync(fp); + return true; + } catch (err) { + return false; + } +}; +}); + +var pLimit = createCommonjsModule(function (module) { +'use strict'; +module.exports = concurrency => { + if (concurrency < 1) { + throw new TypeError('Expected `concurrency` to be a number from 1 and up'); + } + + const queue = []; + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.length > 0) { + queue.shift()(); + } + }; + + return fn => new Promise((resolve, reject) => { + const run = () => { + activeCount++; + + fn().then( + val => { + resolve(val); + next(); + }, + err => { + reject(err); + next(); + } + ); + }; + + if (activeCount < concurrency) { + run(); + } else { + queue.push(run); + } + }); +}; +}); + +var pLocate = createCommonjsModule(function (module) { +'use strict'; + + +class EndError extends Error { + constructor(value) { + super(); + this.value = value; + } +} + +// the input can also be a promise, so we `Promise.all()` them both +const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); + +module.exports = (iterable, tester, opts) => { + opts = Object.assign({ + concurrency: Infinity, + preserveOrder: true + }, opts); + + const limit = pLimit(opts.concurrency); + + // start all the promises concurrently with optional limit + const items = Array.from(iterable).map(el => [el, limit(() => Promise.resolve(el).then(tester))]); + + // check the promises either serially or concurrently + const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); + + return Promise.all(items.map(el => checkLimit(() => finder(el)))) + .then(() => {}) + .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); +}; +}); + +var locatePath = createCommonjsModule(function (module) { +'use strict'; + + + + +module.exports = (iterable, opts) => { + opts = Object.assign({ + cwd: process.cwd() + }, opts); + + return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts); +}; + +module.exports.sync = (iterable, opts) => { + opts = Object.assign({ + cwd: process.cwd() + }, opts); + + for (const el of iterable) { + if (pathExists.sync(path.resolve(opts.cwd, el))) { + return el; + } + } +}; +}); + +var findUp = createCommonjsModule(function (module) { +'use strict'; + + + +module.exports = (filename, opts) => { + opts = opts || {}; + + const startDir = path.resolve(opts.cwd || ''); + const root = path.parse(startDir).root; + + const filenames = [].concat(filename); + + return new Promise(resolve => { + (function find(dir) { + locatePath(filenames, {cwd: dir}).then(file => { + if (file) { + resolve(path.join(dir, file)); + } else if (dir === root) { + resolve(null); + } else { + find(path.dirname(dir)); + } + }); + })(startDir); + }); +}; + +module.exports.sync = (filename, opts) => { + opts = opts || {}; + + let dir = path.resolve(opts.cwd || ''); + const root = path.parse(dir).root; + + const filenames = [].concat(filename); + + // eslint-disable-next-line no-constant-condition + while (true) { + const file = locatePath.sync(filenames, {cwd: dir}); + + if (file) { + return path.join(dir, file); + } else if (dir === root) { + return null; + } + + dir = path.dirname(dir); + } +}; +}); + +var stripBom = createCommonjsModule(function (module) { +'use strict'; +module.exports = x => { + if (typeof x !== 'string') { + throw new TypeError('Expected a string, got ' + typeof x); + } + + // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string + // conversion translates it to FEFF (UTF-16 BOM) + if (x.charCodeAt(0) === 0xFEFF) { + return x.slice(1); + } + + return x; +}; +}); + +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 () { + 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 (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 (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (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) { + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i); + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null; + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context; + const 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'; + + + +const JSONError = errorEx_1('JSONError', { + fileName: errorEx_1.append('in %s') +}); + +module.exports = (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, ''); + + const jsonErr = new JSONError(err); + if (filename) { + jsonErr.fileName = filename; + } + + throw jsonErr; + } +}; +}); + +var pify = createCommonjsModule(function (module) { +'use strict'; + +const processFn = (fn, opts) => function () { + const P = opts.promiseModule; + const args = new Array(arguments.length); + + for (let i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P((resolve, reject) => { + if (opts.errorFirst) { + args.push(function (err, result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + if (err) { + results.unshift(err); + reject(results); + } else { + resolve(results); + } + } else if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + args.push(function (result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 0; i < arguments.length; i++) { + results[i] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + } + + fn.apply(this, args); + }); +}; + +module.exports = (obj, opts) => { + opts = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, opts); + + const filter = key => { + const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + let ret; + if (typeof obj === 'function') { + ret = function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, opts).apply(this, arguments); + }; + } else { + ret = Object.create(Object.getPrototypeOf(obj)); + } + + for (const key in obj) { // eslint-disable-line guard-for-in + const x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; + } + + return ret; +}; +}); + +const parse$1 = (data, fp) => parseJson(stripBom(data), path.relative('.', fp)); + +var loadJsonFile = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse$1(data, fp)); +var sync$2 = fp => parse$1(fs.readFileSync(fp, 'utf8'), fp); + +loadJsonFile.sync = sync$2; + +var pify$3 = createCommonjsModule(function (module) { +'use strict'; + +const processFn = (fn, opts) => function () { + const P = opts.promiseModule; + const args = new Array(arguments.length); + + for (let i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P((resolve, reject) => { + if (opts.errorFirst) { + args.push(function (err, result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + if (err) { + results.unshift(err); + reject(results); + } else { + resolve(results); + } + } else if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + args.push(function (result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 0; i < arguments.length; i++) { + results[i] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + } + + fn.apply(this, args); + }); +}; + +module.exports = (obj, opts) => { + opts = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, opts); + + const filter = key => { + const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + let ret; + if (typeof obj === 'function') { + ret = function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, opts).apply(this, arguments); + }; + } else { + ret = Object.create(Object.getPrototypeOf(obj)); + } + + for (const key in obj) { // eslint-disable-line guard-for-in + const x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; + } + + return ret; +}; +}); + +function type(fn, fn2, fp) { + if (typeof fp !== 'string') { + return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`)); + } + + return pify$3(fs[fn])(fp) + .then(stats => stats[fn2]()) + .catch(err => { + if (err.code === 'ENOENT') { + return false; + } + + throw err; + }); +} + +function typeSync(fn, fn2, fp) { + if (typeof fp !== 'string') { + throw new TypeError(`Expected a string, got ${typeof fp}`); + } + + try { + return fs[fn](fp)[fn2](); + } catch (err) { + if (err.code === 'ENOENT') { + return false; + } + + throw err; + } +} + +var file = type.bind(null, 'stat', 'isFile'); +var dir = type.bind(null, 'stat', 'isDirectory'); +var symlink = type.bind(null, 'lstat', 'isSymbolicLink'); +var fileSync = typeSync.bind(null, 'statSync', 'isFile'); +var dirSync = typeSync.bind(null, 'statSync', 'isDirectory'); +var symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); + +var pathType = { + file: file, + dir: dir, + symlink: symlink, + fileSync: fileSync, + dirSync: dirSync, + symlinkSync: symlinkSync +}; + +var parser$1 = createCommonjsModule(function (module, exports) { +/* parser generated by jison 0.4.17 */ +/* + Returns a Parser object of the following structure: + + Parser: { + yy: {} + } + + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } + + + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + + + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var spdxparse = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, +productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ + +var $0 = $$.length - 1; +switch (yystate) { +case 1: +return this.$ = $$[$0-1] +break; +case 2: case 4: case 5: +this.$ = {license: yytext}; +break; +case 3: +this.$ = {license: $$[$0-1], plus: true}; +break; +case 6: +this.$ = $$[$0]; +break; +case 7: +this.$ = {exception: $$[$0]}; +this.$.license = $$[$0-2].license; +if ($$[$0-2].hasOwnProperty('plus')) { + this.$.plus = $$[$0-2].plus; +} +break; +case 8: +this.$ = {conjunction: 'and', left: $$[$0-2], right: $$[$0]}; +break; +case 9: +this.$ = {conjunction: 'or', left: $$[$0-2], right: $$[$0]}; +break; +case 10: +this.$ = $$[$0-1]; +break; +} +}, +table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], +defaultActions: {8:[2,1]}, +parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + function _parseError (msg, hash) { + this.message = msg; + this.hash = hash; + } + _parseError.prototype = Error; + + throw new _parseError(str, hash); + } +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; + } + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + _token_stack: + var lex = function () { + var token; + token = lexer.lex() || EOF; + if (typeof token !== 'number') { + token = self.symbols_[token] || token; + } + return token; + }; + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +}}; +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ + +EOF:1, + +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, + +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + + this._input = this._input.slice(1); + return ch; + }, + +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = 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); + + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, + +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + + } + return this; + }, + +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, + +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, + +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function (match, indexed_rule) { + var token, + lines, + backup; + + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + return false; // rule action called reject() implying the next rule should be tested instead. + } + return false; + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + +// return next match that has a token +lex:function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin(condition) { + this.conditionStack.push(condition); + }, + +// pop the previously active lexer condition state off the condition stack +popState:function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + +// alias for begin(condition) +pushState:function pushState(condition) { + this.begin(condition); + }, + +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0:return 5 +break; +case 1:/* skip whitespace */ +break; +case 2:return 8 +break; +case 3:return 16 +break; +case 4:return 17 +break; +case 5:return 11 +break; +case 6:return 10 +break; +case 7:return 9 +break; +case 8:return 14 +break; +case 9:return 15 +break; +case 10:return 12 +break; +case 11:return 7 +break; +case 12:return 7 +break; +case 13:return 7 +break; +case 14:return 7 +break; +case 15:return 7 +break; +case 16:return 7 +break; +case 17:return 7 +break; +case 18:return 7 +break; +case 19:return 7 +break; +case 20:return 7 +break; +case 21:return 7 +break; +case 22:return 7 +break; +case 23:return 7 +break; +case 24:return 13 +break; +case 25:return 13 +break; +case 26:return 13 +break; +case 27:return 13 +break; +case 28:return 13 +break; +case 29:return 13 +break; +case 30:return 13 +break; +case 31:return 13 +break; +case 32:return 7 +break; +case 33:return 13 +break; +case 34:return 7 +break; +case 35:return 13 +break; +case 36:return 7 +break; +case 37:return 13 +break; +case 38:return 13 +break; +case 39:return 7 +break; +case 40:return 13 +break; +case 41:return 13 +break; +case 42:return 13 +break; +case 43:return 13 +break; +case 44:return 13 +break; +case 45:return 7 +break; +case 46:return 13 +break; +case 47:return 7 +break; +case 48:return 7 +break; +case 49:return 7 +break; +case 50:return 7 +break; +case 51:return 7 +break; +case 52:return 7 +break; +case 53:return 7 +break; +case 54:return 7 +break; +case 55:return 7 +break; +case 56:return 7 +break; +case 57:return 7 +break; +case 58:return 7 +break; +case 59:return 7 +break; +case 60:return 7 +break; +case 61:return 7 +break; +case 62:return 7 +break; +case 63:return 13 +break; +case 64:return 7 +break; +case 65:return 7 +break; +case 66:return 13 +break; +case 67:return 7 +break; +case 68:return 7 +break; +case 69:return 7 +break; +case 70:return 7 +break; +case 71:return 7 +break; +case 72:return 7 +break; +case 73:return 13 +break; +case 74:return 7 +break; +case 75:return 13 +break; +case 76:return 7 +break; +case 77:return 7 +break; +case 78:return 7 +break; +case 79:return 7 +break; +case 80:return 7 +break; +case 81:return 7 +break; +case 82:return 7 +break; +case 83:return 7 +break; +case 84:return 7 +break; +case 85:return 7 +break; +case 86:return 7 +break; +case 87:return 7 +break; +case 88:return 7 +break; +case 89:return 7 +break; +case 90:return 7 +break; +case 91:return 7 +break; +case 92:return 7 +break; +case 93:return 7 +break; +case 94:return 7 +break; +case 95:return 7 +break; +case 96:return 7 +break; +case 97:return 7 +break; +case 98:return 7 +break; +case 99:return 7 +break; +case 100:return 7 +break; +case 101:return 7 +break; +case 102:return 7 +break; +case 103:return 7 +break; +case 104:return 7 +break; +case 105:return 7 +break; +case 106:return 7 +break; +case 107:return 7 +break; +case 108:return 7 +break; +case 109:return 7 +break; +case 110:return 7 +break; +case 111:return 7 +break; +case 112:return 7 +break; +case 113:return 7 +break; +case 114:return 7 +break; +case 115:return 7 +break; +case 116:return 7 +break; +case 117:return 7 +break; +case 118:return 7 +break; +case 119:return 7 +break; +case 120:return 7 +break; +case 121:return 7 +break; +case 122:return 7 +break; +case 123:return 7 +break; +case 124:return 7 +break; +case 125:return 7 +break; +case 126:return 7 +break; +case 127:return 7 +break; +case 128:return 7 +break; +case 129:return 7 +break; +case 130:return 7 +break; +case 131:return 7 +break; +case 132:return 7 +break; +case 133:return 7 +break; +case 134:return 7 +break; +case 135:return 7 +break; +case 136:return 7 +break; +case 137:return 7 +break; +case 138:return 7 +break; +case 139:return 7 +break; +case 140:return 7 +break; +case 141:return 7 +break; +case 142:return 7 +break; +case 143:return 7 +break; +case 144:return 7 +break; +case 145:return 7 +break; +case 146:return 7 +break; +case 147:return 7 +break; +case 148:return 7 +break; +case 149:return 7 +break; +case 150:return 7 +break; +case 151:return 7 +break; +case 152:return 7 +break; +case 153:return 7 +break; +case 154:return 7 +break; +case 155:return 7 +break; +case 156:return 7 +break; +case 157:return 7 +break; +case 158:return 7 +break; +case 159:return 7 +break; +case 160:return 7 +break; +case 161:return 7 +break; +case 162:return 7 +break; +case 163:return 7 +break; +case 164:return 7 +break; +case 165:return 7 +break; +case 166:return 7 +break; +case 167:return 7 +break; +case 168:return 7 +break; +case 169:return 7 +break; +case 170:return 7 +break; +case 171:return 7 +break; +case 172:return 7 +break; +case 173:return 7 +break; +case 174:return 7 +break; +case 175:return 7 +break; +case 176:return 7 +break; +case 177:return 7 +break; +case 178:return 7 +break; +case 179:return 7 +break; +case 180:return 7 +break; +case 181:return 7 +break; +case 182:return 7 +break; +case 183:return 7 +break; +case 184:return 7 +break; +case 185:return 7 +break; +case 186:return 7 +break; +case 187:return 7 +break; +case 188:return 7 +break; +case 189:return 7 +break; +case 190:return 7 +break; +case 191:return 7 +break; +case 192:return 7 +break; +case 193:return 7 +break; +case 194:return 7 +break; +case 195:return 7 +break; +case 196:return 7 +break; +case 197:return 7 +break; +case 198:return 7 +break; +case 199:return 7 +break; +case 200:return 7 +break; +case 201:return 7 +break; +case 202:return 7 +break; +case 203:return 7 +break; +case 204:return 7 +break; +case 205:return 7 +break; +case 206:return 7 +break; +case 207:return 7 +break; +case 208:return 7 +break; +case 209:return 7 +break; +case 210:return 7 +break; +case 211:return 7 +break; +case 212:return 7 +break; +case 213:return 7 +break; +case 214:return 7 +break; +case 215:return 7 +break; +case 216:return 7 +break; +case 217:return 7 +break; +case 218:return 7 +break; +case 219:return 7 +break; +case 220:return 7 +break; +case 221:return 7 +break; +case 222:return 7 +break; +case 223:return 7 +break; +case 224:return 7 +break; +case 225:return 7 +break; +case 226:return 7 +break; +case 227:return 7 +break; +case 228:return 7 +break; +case 229:return 7 +break; +case 230:return 7 +break; +case 231:return 7 +break; +case 232:return 7 +break; +case 233:return 7 +break; +case 234:return 7 +break; +case 235:return 7 +break; +case 236:return 7 +break; +case 237:return 7 +break; +case 238:return 7 +break; +case 239:return 7 +break; +case 240:return 7 +break; +case 241:return 7 +break; +case 242:return 7 +break; +case 243:return 7 +break; +case 244:return 7 +break; +case 245:return 7 +break; +case 246:return 7 +break; +case 247:return 7 +break; +case 248:return 7 +break; +case 249:return 7 +break; +case 250:return 7 +break; +case 251:return 7 +break; +case 252:return 7 +break; +case 253:return 7 +break; +case 254:return 7 +break; +case 255:return 7 +break; +case 256:return 7 +break; +case 257:return 7 +break; +case 258:return 7 +break; +case 259:return 7 +break; +case 260:return 7 +break; +case 261:return 7 +break; +case 262:return 7 +break; +case 263:return 7 +break; +case 264:return 7 +break; +case 265:return 7 +break; +case 266:return 7 +break; +case 267:return 7 +break; +case 268:return 7 +break; +case 269:return 7 +break; +case 270:return 7 +break; +case 271:return 7 +break; +case 272:return 7 +break; +case 273:return 7 +break; +case 274:return 7 +break; +case 275:return 7 +break; +case 276:return 7 +break; +case 277:return 7 +break; +case 278:return 7 +break; +case 279:return 7 +break; +case 280:return 7 +break; +case 281:return 7 +break; +case 282:return 7 +break; +case 283:return 7 +break; +case 284:return 7 +break; +case 285:return 7 +break; +case 286:return 7 +break; +case 287:return 7 +break; +case 288:return 7 +break; +case 289:return 7 +break; +case 290:return 7 +break; +case 291:return 7 +break; +case 292:return 7 +break; +case 293:return 7 +break; +case 294:return 7 +break; +case 295:return 7 +break; +case 296:return 7 +break; +case 297:return 7 +break; +case 298:return 7 +break; +case 299:return 7 +break; +case 300:return 7 +break; +case 301:return 7 +break; +case 302:return 7 +break; +case 303:return 7 +break; +case 304:return 7 +break; +case 305:return 7 +break; +case 306:return 7 +break; +case 307:return 7 +break; +case 308:return 7 +break; +case 309:return 7 +break; +case 310:return 7 +break; +case 311:return 7 +break; +case 312:return 7 +break; +case 313:return 7 +break; +case 314:return 7 +break; +case 315:return 7 +break; +case 316:return 7 +break; +case 317:return 7 +break; +case 318:return 7 +break; +case 319:return 7 +break; +case 320:return 7 +break; +case 321:return 7 +break; +case 322:return 7 +break; +case 323:return 7 +break; +case 324:return 7 +break; +case 325:return 7 +break; +case 326:return 7 +break; +case 327:return 7 +break; +case 328:return 7 +break; +case 329:return 7 +break; +case 330:return 7 +break; +case 331:return 7 +break; +case 332:return 7 +break; +case 333:return 7 +break; +case 334:return 7 +break; +case 335:return 7 +break; +case 336:return 7 +break; +case 337:return 7 +break; +case 338:return 7 +break; +case 339:return 7 +break; +case 340:return 7 +break; +case 341:return 7 +break; +case 342:return 7 +break; +case 343:return 7 +break; +case 344:return 7 +break; +case 345:return 7 +break; +case 346:return 7 +break; +case 347:return 7 +break; +case 348:return 7 +break; +case 349:return 7 +break; +case 350:return 7 +break; +case 351:return 7 +break; +case 352:return 7 +break; +case 353:return 7 +break; +case 354:return 7 +break; +case 355:return 7 +break; +case 356:return 7 +break; +case 357:return 7 +break; +case 358:return 7 +break; +case 359:return 7 +break; +case 360:return 7 +break; +case 361:return 7 +break; +case 362:return 7 +break; +case 363:return 7 +break; +case 364:return 7 +break; +} +}, +rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:BSD-3-Clause-No-Nuclear-License-2014)/,/^(?:BSD-3-Clause-No-Nuclear-Warranty)/,/^(?:GPL-2\.0-with-classpath-exception)/,/^(?:GPL-3\.0-with-autoconf-exception)/,/^(?:GPL-2\.0-with-autoconf-exception)/,/^(?:BSD-3-Clause-No-Nuclear-License)/,/^(?:MPL-2\.0-no-copyleft-exception)/,/^(?:GPL-2\.0-with-bison-exception)/,/^(?:GPL-2\.0-with-font-exception)/,/^(?:GPL-2\.0-with-GCC-exception)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:GPL-3\.0-with-GCC-exception)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:Classpath-exception-2\.0)/,/^(?:WxWindows-exception-3\.1)/,/^(?:freertos-exception-2\.0)/,/^(?:Autoconf-exception-3\.0)/,/^(?:i2p-gpl-java-exception)/,/^(?:gnu-javamail-exception)/,/^(?:Nokia-Qt-exception-1\.1)/,/^(?:Autoconf-exception-2\.0)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:u-boot-exception-2\.0)/,/^(?:zlib-acknowledgement)/,/^(?:Bison-exception-2\.2)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:CLISP-exception-2\.0)/,/^(?:eCos-exception-2\.0)/,/^(?:BSD-3-Clause-Clear)/,/^(?:Font-exception-2\.0)/,/^(?:FLTK-exception-2\.0)/,/^(?:GCC-exception-2\.0)/,/^(?:Qwt-exception-1\.0)/,/^(?:Libtool-exception)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:GCC-exception-3\.1)/,/^(?:Artistic-1\.0-Perl)/,/^(?:Artistic-1\.0-cl8)/,/^(?:CC-BY-NC-SA-2\.5)/,/^(?:MIT-advertising)/,/^(?:BSD-Source-Code)/,/^(?:CC-BY-NC-SA-4\.0)/,/^(?:LiLiQ-Rplus-1\.1)/,/^(?:CC-BY-NC-SA-3\.0)/,/^(?:BSD-4-Clause-UC)/,/^(?:CC-BY-NC-SA-2\.0)/,/^(?:CC-BY-NC-SA-1\.0)/,/^(?:CC-BY-NC-ND-4\.0)/,/^(?:CC-BY-NC-ND-3\.0)/,/^(?:CC-BY-NC-ND-2\.5)/,/^(?:CC-BY-NC-ND-2\.0)/,/^(?:CC-BY-NC-ND-1\.0)/,/^(?:LZMA-exception)/,/^(?:BitTorrent-1\.1)/,/^(?:CrystalStacker)/,/^(?:FLTK-exception)/,/^(?:SugarCRM-1\.1\.3)/,/^(?:BSD-Protection)/,/^(?:BitTorrent-1\.0)/,/^(?:HaskellReport)/,/^(?:Interbase-1\.0)/,/^(?:StandardML-NJ)/,/^(?:mif-exception)/,/^(?:Frameworx-1\.0)/,/^(?:389-exception)/,/^(?:CC-BY-NC-2\.0)/,/^(?:CC-BY-NC-2\.5)/,/^(?:CC-BY-NC-3\.0)/,/^(?:CC-BY-NC-4\.0)/,/^(?:W3C-19980720)/,/^(?:CC-BY-SA-1\.0)/,/^(?:CC-BY-SA-2\.0)/,/^(?:CC-BY-SA-2\.5)/,/^(?:CC-BY-ND-2\.0)/,/^(?:CC-BY-SA-4\.0)/,/^(?:CC-BY-SA-3\.0)/,/^(?:Artistic-1\.0)/,/^(?:Artistic-2\.0)/,/^(?:CC-BY-ND-2\.5)/,/^(?:CC-BY-ND-3\.0)/,/^(?:CC-BY-ND-4\.0)/,/^(?:CC-BY-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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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (typeof commonjsRequire !== 'undefined' && 'object' !== 'undefined') { +exports.parser = spdxparse; +exports.Parser = spdxparse.Parser; +exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; +exports.main = function commonjsMain(args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); + } + var source = fs.readFileSync(path.normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if ('object' !== 'undefined' && commonjsRequire.main === module) { + exports.main(process.argv.slice(1)); +} +} +}); + +var parser = parser$1.parser; + +var spdxExpressionParse = function (argument) { + return parser.parse(argument) +}; + +var spdxLicenseIds = [ + "Glide", + "Abstyles", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "AMPAS", + "APL-1.0", + "Adobe-Glyph", + "APAFML", + "Adobe-2006", + "AGPL-1.0", + "Afmparse", + "Aladdin", + "ADSL", + "AMDPLPA", + "ANTLR-PD", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "AML", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "Artistic-1.0", + "Artistic-1.0-Perl", + "Artistic-1.0-cl8", + "Artistic-2.0", + "AAL", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "BSL-1.0", + "Borceux", + "BSD-2-Clause", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "BSD-3-Clause", + "BSD-3-Clause-Clear", + "BSD-4-Clause", + "BSD-Protection", + "BSD-Source-Code", + "BSD-3-Clause-Attribution", + "0BSD", + "BSD-4-Clause-UC", + "bzip2-1.0.5", + "bzip2-1.0.6", + "Caldera", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-2.1", + "CECILL-B", + "CECILL-C", + "ClArtistic", + "MIT-CMU", + "CNRI-Jython", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "CPOL-1.02", + "CDDL-1.0", + "CDDL-1.1", + "CPAL-1.0", + "CPL-1.0", + "CATOSL-1.1", + "Condor-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-3.0", + "CC-BY-4.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-4.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-4.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-4.0", + "CC0-1.0", + "Crossword", + "CrystalStacker", + "CUA-OPL-1.0", + "Cube", + "curl", + "D-FSL-1.0", + "diffmark", + "WTFPL", + "DOC", + "Dotseqn", + "DSDP", + "dvipdfm", + "EPL-1.0", + "ECL-1.0", + "ECL-2.0", + "eGenix", + "EFL-1.0", + "EFL-2.0", + "MIT-advertising", + "MIT-enna", + "Entessa", + "ErlPL-1.1", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "Eurosym", + "Fair", + "MIT-feh", + "Frameworx-1.0", + "FreeImage", + "FTL", + "FSFAP", + "FSFUL", + "FSFULLR", + "Giftware", + "GL2PS", + "Glulxe", + "AGPL-3.0", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-2.0", + "GPL-3.0", + "LGPL-2.1", + "LGPL-3.0", + "LGPL-2.0", + "gnuplot", + "gSOAP-1.3b", + "HaskellReport", + "HPND", + "IBM-pibs", + "IPL-1.0", + "ICU", + "ImageMagick", + "iMatix", + "Imlib2", + "IJG", + "Info-ZIP", + "Intel-ACPI", + "Intel", + "Interbase-1.0", + "IPA", + "ISC", + "JasPer-2.0", + "JSON", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a", + "LPPL-1.3c", + "Latex2e", + "BSD-3-Clause-LBNL", + "Leptonica", + "LGPLLR", + "Libpng", + "libtiff", + "LAL-1.2", + "LAL-1.3", + "LiLiQ-P-1.1", + "LiLiQ-Rplus-1.1", + "LiLiQ-R-1.1", + "LPL-1.02", + "LPL-1.0", + "MakeIndex", + "MTLL", + "MS-PL", + "MS-RL", + "MirOS", + "MITNFA", + "MIT", + "Motosoto", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "mpich2", + "Multics", + "Mup", + "NASA-1.3", + "Naumen", + "NBPL-1.0", + "NetCDF", + "NGPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "Newsletr", + "NLPL", + "Nokia", + "NPOSL-3.0", + "NLOD-1.0", + "Noweb", + "NRL", + "NTP", + "Nunit", + "OCLC-2.0", + "ODbL-1.0", + "PDDL-1.0", + "OCCT-PL", + "OGTSL", + "OLDAP-2.2.2", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OML", + "OPL-1.0", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OpenSSL", + "OSET-PL-2.1", + "PHP-3.0", + "PHP-3.01", + "Plexus", + "PostgreSQL", + "psfrag", + "psutils", + "Python-2.0", + "QPL-1.0", + "Qhull", + "Rdisc", + "RPSL-1.0", + "RPL-1.1", + "RPL-1.5", + "RHeCos-1.1", + "RSCPL", + "RSA-MD", + "Ruby", + "SAX-PD", + "Saxpath", + "SCEA", + "SWL", + "SMPPL", + "Sendmail", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "OFL-1.0", + "OFL-1.1", + "SimPL-2.0", + "Sleepycat", + "SNIA", + "Spencer-86", + "Spencer-94", + "Spencer-99", + "SMLNJ", + "SugarCRM-1.1.3", + "SISSL", + "SISSL-1.2", + "SPL-1.0", + "Watcom-1.0", + "TCL", + "Unlicense", + "TMate", + "TORQUE-1.1", + "TOSL", + "Unicode-TOU", + "UPL-1.0", + "NCSA", + "Vim", + "VOSTROM", + "VSL-1.0", + "W3C-19980720", + "W3C", + "Wsuipa", + "Xnet", + "X11", + "Xerox", + "XFree86-1.1", + "xinetd", + "xpp", + "XSkat", + "YPL-1.0", + "YPL-1.1", + "Zed", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "Zlib", + "zlib-acknowledgement", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1", + "BSD-3-Clause-No-Nuclear-License", + "BSD-3-Clause-No-Nuclear-Warranty", + "BSD-3-Clause-No-Nuclear-License-2014", + "eCos-2.0", + "GPL-2.0-with-autoconf-exception", + "GPL-2.0-with-bison-exception", + "GPL-2.0-with-classpath-exception", + "GPL-2.0-with-font-exception", + "GPL-2.0-with-GCC-exception", + "GPL-3.0-with-autoconf-exception", + "GPL-3.0-with-GCC-exception", + "StandardML-NJ", + "WXwindows" +] +; + +var spdxLicenseIds$1 = Object.freeze({ + default: spdxLicenseIds +}); + +var licenseIDs = ( spdxLicenseIds$1 && spdxLicenseIds ) || spdxLicenseIds$1; + +function valid(string) { + return licenseIDs.indexOf(string) > -1; +} + +// Common transpositions of license identifier acronyms +var transpositions = [ + ['APGL', 'AGPL'], + ['Gpl', 'GPL'], + ['GLP', 'GPL'], + ['APL', 'Apache'], + ['ISD', 'ISC'], + ['GLP', 'GPL'], + ['IST', 'ISC'], + ['Claude', 'Clause'], + [' or later', '+'], + [' International', ''], + ['GNU', 'GPL'], + ['GUN', 'GPL'], + ['+', ''], + ['GNU GPL', 'GPL'], + ['GNU/GPL', 'GPL'], + ['GNU GLP', 'GPL'], + ['GNU General Public License', 'GPL'], + ['Gnu public license', 'GPL'], + ['GNU Public License', 'GPL'], + ['GNU GENERAL PUBLIC LICENSE', 'GPL'], + ['MTI', 'MIT'], + ['Mozilla Public License', 'MPL'], + ['WTH', 'WTF'], + ['-License', ''] +]; + +var TRANSPOSED = 0; +var CORRECT = 1; + +// Simple corrections to nearly valid identifiers. +var transforms = [ + // e.g. 'mit' + function(argument) { + return argument.toUpperCase(); + }, + // e.g. 'MIT ' + function(argument) { + return argument.trim(); + }, + // e.g. 'M.I.T.' + function(argument) { + return argument.replace(/\./g, ''); + }, + // e.g. 'Apache- 2.0' + function(argument) { + return argument.replace(/\s+/g, ''); + }, + // e.g. 'CC BY 4.0'' + function(argument) { + return argument.replace(/\s+/g, '-'); + }, + // e.g. 'LGPLv2.1' + function(argument) { + return argument.replace('v', '-'); + }, + // e.g. 'Apache 2.0' + function(argument) { + return argument.replace(/,?\s*(\d)/, '-$1'); + }, + // e.g. 'GPL 2' + function(argument) { + return argument.replace(/,?\s*(\d)/, '-$1.0'); + }, + // e.g. 'Apache Version 2.0' + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2'); + }, + // e.g. 'Apache Version 2' + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0'); + }, + // e.g. 'ZLIB' + function(argument) { + return argument[0].toUpperCase() + argument.slice(1); + }, + // e.g. 'MPL/2.0' + function(argument) { + return argument.replace('/', '-'); + }, + // e.g. 'Apache 2' + function(argument) { + return argument + .replace(/\s*V\s*(\d)/, '-$1') + .replace(/(\d)$/, '$1.0'); + }, + // e.g. 'GPL-2.0-' + function(argument) { + return argument.slice(0, argument.length - 1); + }, + // e.g. 'GPL2' + function(argument) { + return argument.replace(/(\d)$/, '-$1.0'); + }, + // e.g. 'BSD 3' + function(argument) { + return argument.replace(/(-| )?(\d)$/, '-$2-Clause'); + }, + // e.g. 'BSD clause 3' + function(argument) { + return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause'); + }, + // e.g. 'BY-NC-4.0' + function(argument) { + return 'CC-' + argument; + }, + // e.g. 'BY-NC' + function(argument) { + return 'CC-' + argument + '-4.0'; + }, + // e.g. 'Attribution-NonCommercial' + function(argument) { + return argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, ''); + }, + // e.g. 'Attribution-NonCommercial' + function(argument) { + return 'CC-' + + argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, '') + + '-4.0'; + } +]; + +// If all else fails, guess that strings containing certain substrings +// meant to identify certain licenses. +var lastResorts = [ + ['UNLI', 'Unlicense'], + ['WTF', 'WTFPL'], + ['2 CLAUSE', 'BSD-2-Clause'], + ['2-CLAUSE', 'BSD-2-Clause'], + ['3 CLAUSE', 'BSD-3-Clause'], + ['3-CLAUSE', 'BSD-3-Clause'], + ['AFFERO', 'AGPL-3.0'], + ['AGPL', 'AGPL-3.0'], + ['APACHE', 'Apache-2.0'], + ['ARTISTIC', 'Artistic-2.0'], + ['Affero', 'AGPL-3.0'], + ['BEER', 'Beerware'], + ['BOOST', 'BSL-1.0'], + ['BSD', 'BSD-2-Clause'], + ['ECLIPSE', 'EPL-1.0'], + ['FUCK', 'WTFPL'], + ['GNU', 'GPL-3.0'], + ['LGPL', 'LGPL-3.0'], + ['GPL', 'GPL-3.0'], + ['MIT', 'MIT'], + ['MPL', 'MPL-2.0'], + ['X11', 'X11'], + ['ZLIB', 'Zlib'] +]; + +var SUBSTRING = 0; +var IDENTIFIER = 1; + +var validTransformation = function(identifier) { + for (var i = 0; i < transforms.length; i++) { + var transformed = transforms[i](identifier); + if (transformed !== identifier && valid(transformed)) { + return transformed; + } + } + return null; +}; + +var validLastResort = function(identifier) { + var upperCased = identifier.toUpperCase(); + for (var i = 0; i < lastResorts.length; i++) { + var lastResort = lastResorts[i]; + if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { + return lastResort[IDENTIFIER]; + } + } + return null; +}; + +var anyCorrection = function(identifier, check) { + for (var i = 0; i < transpositions.length; i++) { + var transposition = transpositions[i]; + var transposed = transposition[TRANSPOSED]; + if (identifier.indexOf(transposed) > -1) { + var corrected = identifier.replace( + transposed, + transposition[CORRECT] + ); + var checked = check(corrected); + if (checked !== null) { + return checked; + } + } + } + return null; +}; + +var spdxCorrect = function(identifier) { + identifier = identifier.replace(/\+$/, ''); + if (valid(identifier)) { + return identifier; + } + var transformed = validTransformation(identifier); + if (transformed !== null) { + return transformed; + } + transformed = anyCorrection(identifier, function(argument) { + if (valid(argument)) { + return argument; + } + return validTransformation(argument); + }); + if (transformed !== null) { + return transformed; + } + transformed = validLastResort(identifier); + if (transformed !== null) { + return transformed; + } + transformed = anyCorrection(identifier, validLastResort); + if (transformed !== null) { + return transformed; + } + return null; +}; + +var genericWarning = ( + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "' +); + +var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + +function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; +} + +function usesLicenseRef(ast) { + if (ast.hasOwnProperty('license')) { + var license = ast.license; + return ( + startsWith('LicenseRef', license) || + startsWith('DocumentRef', license) + ); + } else { + return ( + usesLicenseRef(ast.left) || + usesLicenseRef(ast.right) + ); + } +} + +var validateNpmPackageLicense = function(argument) { + var ast; + + try { + ast = spdxExpressionParse(argument); + } catch (e) { + var match; + if ( + argument === 'UNLICENSED' || + argument === 'UNLICENCED' + ) { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + var corrected = spdxCorrect(argument); + if (corrected) { + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + return result; + } + } + + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } +}; + +var gitHostInfo = createCommonjsModule(function (module) { +'use strict'; + +var gitHosts = module.exports = { + github: { + // First two are insecure and generally shouldn't be used any more, but + // they are still supported. + 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'github.com', + 'treepath': 'tree', + 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + }, + bitbucket: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'bitbucket.org', + 'treepath': 'src', + 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' + }, + gitlab: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gitlab.com', + 'treepath': 'tree', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}' + }, + gist: { + 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gist.github.com', + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/, + 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', + 'bugstemplate': 'https://{domain}/{project}', + 'gittemplate': 'git://{domain}/{project}.git{#committish}', + 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{project}{/committish}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + } +}; + +var gitHostDefaults = { + 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', + 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', + 'shortcuttemplate': '{type}:{user}/{project}{#committish}', + 'pathtemplate': '{user}/{project}{#committish}', + 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/ +}; + +Object.keys(gitHosts).forEach(function (name) { + Object.keys(gitHostDefaults).forEach(function (key) { + if (gitHosts[name][key]) return + gitHosts[name][key] = gitHostDefaults[key]; + }); + gitHosts[name].protocols_re = RegExp('^(' + + gitHosts[name].protocols.map(function (protocol) { + return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') + }).join('|') + '):$'); +}); +}); + +var gitHost = createCommonjsModule(function (module) { +'use strict'; + +var extend = Object.assign || util._extend; + +var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { + var gitHostInfo$$1 = this; + gitHostInfo$$1.type = type; + Object.keys(gitHostInfo[type]).forEach(function (key) { + gitHostInfo$$1[key] = gitHostInfo[type][key]; + }); + gitHostInfo$$1.user = user; + gitHostInfo$$1.auth = auth; + gitHostInfo$$1.project = project; + gitHostInfo$$1.committish = committish; + gitHostInfo$$1.default = defaultRepresentation; + gitHostInfo$$1.opts = opts || {}; +}; +GitHost.prototype = {}; + +GitHost.prototype.hash = function () { + return this.committish ? '#' + this.committish : '' +}; + +GitHost.prototype._fill = function (template, opts) { + if (!template) return + var vars = extend({}, opts); + opts = extend(extend({}, this.opts), opts); + var self = this; + Object.keys(this).forEach(function (key) { + if (self[key] != null && vars[key] == null) vars[key] = self[key]; + }); + var rawAuth = vars.auth; + var rawComittish = vars.committish; + Object.keys(vars).forEach(function (key) { + vars[key] = encodeURIComponent(vars[key]); + }); + vars['auth@'] = rawAuth ? rawAuth + '@' : ''; + if (opts.noCommittish) { + vars['#committish'] = ''; + vars['/tree/committish'] = ''; + vars['/comittish'] = ''; + vars.comittish = ''; + } else { + vars['#committish'] = rawComittish ? '#' + rawComittish : ''; + vars['/tree/committish'] = vars.committish + ? '/' + vars.treepath + '/' + vars.committish + : ''; + vars['/committish'] = vars.committish ? '/' + vars.committish : ''; + vars.committish = vars.committish || 'master'; + } + var res = template; + Object.keys(vars).forEach(function (key) { + res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]); + }); + if (opts.noGitPlus) { + return res.replace(/^git[+]/, '') + } else { + return res + } +}; + +GitHost.prototype.ssh = function (opts) { + return this._fill(this.sshtemplate, opts) +}; + +GitHost.prototype.sshurl = function (opts) { + return this._fill(this.sshurltemplate, opts) +}; + +GitHost.prototype.browse = function (opts) { + return this._fill(this.browsetemplate, opts) +}; + +GitHost.prototype.docs = function (opts) { + return this._fill(this.docstemplate, opts) +}; + +GitHost.prototype.bugs = function (opts) { + return this._fill(this.bugstemplate, opts) +}; + +GitHost.prototype.https = function (opts) { + return this._fill(this.httpstemplate, opts) +}; + +GitHost.prototype.git = function (opts) { + return this._fill(this.gittemplate, opts) +}; + +GitHost.prototype.shortcut = function (opts) { + return this._fill(this.shortcuttemplate, opts) +}; + +GitHost.prototype.path = function (opts) { + return this._fill(this.pathtemplate, opts) +}; + +GitHost.prototype.tarball = function (opts) { + return this._fill(this.tarballtemplate, opts) +}; + +GitHost.prototype.file = function (P, opts) { + return this._fill(this.filetemplate, extend({ + path: P.replace(/^[/]+/g, '') + }, opts)) +}; + +GitHost.prototype.getDefaultRepresentation = function () { + return this.default +}; + +GitHost.prototype.toString = function (opts) { + return (this[this.default] || this.sshurl).call(this, opts) +}; +}); + +var hostedGitInfo = createCommonjsModule(function (module) { +'use strict'; + + +var GitHost = module.exports = gitHost; + +var protocolToRepresentationMap = { + 'git+ssh': 'sshurl', + 'git+https': 'https', + 'ssh': 'sshurl', + 'git': 'git' +}; + +function protocolToRepresentation (protocol) { + if (protocol.substr(-1) === ':') protocol = protocol.slice(0, -1); + return protocolToRepresentationMap[protocol] || protocol +} + +var authProtocols = { + 'git:': true, + 'https:': true, + 'git+https:': true, + 'http:': true, + 'git+http:': true +}; + +module.exports.fromUrl = function (giturl, opts) { + if (giturl == null || giturl === '') return + var url$$1 = fixupUnqualifiedGist( + isGitHubShorthand(giturl) ? 'github:' + giturl : giturl + ); + var parsed = parseGitUrl(url$$1); + var shortcutMatch = url$$1.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')); + var matches = Object.keys(gitHostInfo).map(function (gitHostName) { + try { + var gitHostInfo$$1 = gitHostInfo[gitHostName]; + var auth = null; + if (parsed.auth && authProtocols[parsed.protocol]) { + auth = decodeURIComponent(parsed.auth); + } + var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null; + var user = null; + var project = null; + var defaultRepresentation = null; + if (shortcutMatch && shortcutMatch[1] === gitHostName) { + user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]); + project = decodeURIComponent(shortcutMatch[3]); + defaultRepresentation = 'shortcut'; + } else { + if (parsed.host !== gitHostInfo$$1.domain) return + if (!gitHostInfo$$1.protocols_re.test(parsed.protocol)) return + if (!parsed.path) return + var pathmatch = gitHostInfo$$1.pathmatch; + var matched = parsed.path.match(pathmatch); + if (!matched) return + if (matched[1] != null) user = decodeURIComponent(matched[1].replace(/^:/, '')); + if (matched[2] != null) project = decodeURIComponent(matched[2]); + defaultRepresentation = protocolToRepresentation(parsed.protocol); + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) + } catch (ex) { + if (!(ex instanceof URIError)) throw ex + } + }).filter(function (gitHostInfo$$1) { return gitHostInfo$$1 }); + if (matches.length !== 1) return + return matches[0] +}; + +function isGitHubShorthand (arg) { + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) +} + +function fixupUnqualifiedGist (giturl) { + // necessary for round-tripping gists + var parsed = url.parse(giturl); + if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { + return parsed.protocol + '/' + parsed.host + } else { + return giturl + } +} + +function parseGitUrl (giturl) { + if (typeof giturl !== 'string') giturl = '' + giturl; + var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/); + if (!matched) return url.parse(giturl) + return { + protocol: 'git+ssh:', + slashes: true, + auth: matched[1], + host: matched[2], + port: null, + hostname: matched[2], + hash: matched[4], + search: null, + query: null, + pathname: '/' + matched[3], + path: '/' + matched[3], + href: 'git+ssh://' + matched[1] + '@' + matched[2] + + '/' + matched[3] + (matched[4] || '') + } +} +}); + +var blacklist = [ + 'freelist', + 'sys' +]; + +var builtinModules = Object.keys(process.binding('natives')).filter(function (el) { + return !/^_|^internal|\//.test(el) && blacklist.indexOf(el) === -1; +}).sort(); + +var isBuiltinModule = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return builtinModules.indexOf(str) !== -1; +}; + +var extract_description = extractDescription; + +// Extracts description from contents of a readme file in markdown format +function extractDescription (d) { + if (!d) return; + if (d === "ERROR: No README data found!") return; + // the first block of text before the first heading + // that isn't the first line heading + d = d.trim().split('\n'); + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); + var l = d.length; + for (var e = s + 1; e < l && d[e].trim(); e ++); + return d.slice(s, e).join(' ').trim() +} + +var topLevel = {"dependancies":"dependencies","dependecies":"dependencies","depdenencies":"dependencies","devEependencies":"devDependencies","depends":"dependencies","dev-dependencies":"devDependencies","devDependences":"devDependencies","devDepenencies":"devDependencies","devdependencies":"devDependencies","repostitory":"repository","repo":"repository","prefereGlobal":"preferGlobal","hompage":"homepage","hampage":"homepage","autohr":"author","autor":"author","contributers":"contributors","publicationConfig":"publishConfig","script":"scripts"}; +var bugs = {"web":"url","name":"url"}; +var script = {"server":"start","tests":"test"}; +var typos = { + topLevel: topLevel, + bugs: bugs, + script: script +}; + +var typos$1 = Object.freeze({ + topLevel: topLevel, + bugs: bugs, + script: script, + default: typos +}); + +var typos$2 = ( typos$1 && typos ) || typos$1; + +var fixer_1 = createCommonjsModule(function (module) { +var depTypes = ["dependencies","devDependencies","optionalDependencies"]; + + + + +var fixer = module.exports = { + // default warning function + warn: function() {}, + + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0]; + } + if (!data.repository) return this.warn("missingRepository") + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + }; + } + var r = data.repository.url || ""; + if (r) { + var hosted = hostedGitInfo.fromUrl(r); + if (hosted) { + r = data.repository.url + = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString(); + } + } + + if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r); + } + } + +, fixTypos: function(data) { + Object.keys(typos$2.topLevel).forEach(function (d) { + if (data.hasOwnProperty(d)) { + this.warn("typo", d, typos$2.topLevel[d]); + } + }, this); + } + +, fixScriptsField: function(data) { + if (!data.scripts) return + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts"); + delete data.scripts; + return + } + Object.keys(data.scripts).forEach(function (k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript"); + delete data.scripts[k]; + } else if (typos$2.script[k] && !data.scripts[typos$2.script[k]]) { + this.warn("typo", k, typos$2.script[k], "scripts"); + } + }, this); + } + +, fixFilesField: function(data) { + var files = data.files; + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles"); + delete data.files; + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file); + return false + } else { + return true + } + }, this); + } + } + +, fixBinField: function(data) { + if (!data.bin) return; + if (typeof data.bin === "string") { + var b = {}; + var match; + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin; + } else { + b[data.name] = data.bin; + } + data.bin = b; + } + } + +, fixManField: function(data) { + if (!data.man) return; + if (typeof data.man === "string") { + data.man = [ data.man ]; + } + } +, fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies"; + var bd = "bundleDependencies"; + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd]; + delete data[bdd]; + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies"); + delete data[bd]; + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd) { + if (!bd || typeof bd !== 'string') { + this.warn("nonStringBundleDependency", bd); + return false + } else { + if (!data.dependencies) { + data.dependencies = {}; + } + if (!data.dependencies.hasOwnProperty(bd)) { + this.warn("nonDependencyBundleDependency", bd); + data.dependencies[bd] = "*"; + } + return true + } + }, this); + } + } + +, fixDependencies: function(data, strict) { + var loose = !strict; + objectifyDeps(data, this.warn); + addOptionalDepsToDeps(data, this.warn); + this.fixBundleDependenciesField(data) + + ;['dependencies','devDependencies'].forEach(function(deps) { + if (!(deps in data)) return + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps); + delete data[deps]; + return + } + Object.keys(data[deps]).forEach(function (d) { + var r = data[deps][d]; + if (typeof r !== 'string') { + this.warn("nonStringDependency", d, JSON.stringify(r)); + delete data[deps][d]; + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]); + if (hosted) data[deps][d] = hosted.toString(); + }, this); + }, this); + } + +, fixModulesField: function (data) { + if (data.modules) { + this.warn("deprecatedModules"); + delete data.modules; + } + } + +, fixKeywordsField: function (data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/); + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords; + this.warn("nonArrayKeywords"); + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false + } else { + return true + } + }, this); + } + } + +, fixVersionField: function(data, strict) { + // allow "loose" semver 1.0 versions in non-strict mode + // enforce strict semver 2.0 compliance in strict mode + var loose = !strict; + if (!data.version) { + data.version = ""; + return true + } + if (!semver.valid(data.version, loose)) { + throw new Error('Invalid version: "'+ data.version + '"') + } + data.version = semver.clean(data.version, loose); + return true + } + +, fixPeople: function(data) { + modifyPeople(data, unParsePerson); + modifyPeople(data, parsePerson); + } + +, fixNameField: function(data, options) { + if (typeof options === "boolean") options = {strict: options}; + else if (typeof options === "undefined") options = {}; + var strict = options.strict; + if (!data.name && !strict) { + data.name = ""; + return + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string.") + } + if (!strict) + data.name = data.name.trim(); + ensureValidName(data.name, strict, options.allowLegacyCase); + if (isBuiltinModule(data.name)) + this.warn("conflictingName", data.name); + } + + +, fixDescriptionField: function (data) { + if (data.description && typeof data.description !== 'string') { + this.warn("nonStringDescription"); + delete data.description; + } + if (data.readme && !data.description) + data.description = extract_description(data.readme); + if(data.description === undefined) delete data.description; + if (!data.description) this.warn("missingDescription"); + } + +, fixReadmeField: function (data) { + if (!data.readme) { + this.warn("missingReadme"); + data.readme = "ERROR: No README data found!"; + } + } + +, fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url); + if(hosted && hosted.bugs()) { + data.bugs = {url: hosted.bugs()}; + } + } + else if(data.bugs) { + var emailRe = /^.+@.*\..+$/; + if(typeof data.bugs == "string") { + if(emailRe.test(data.bugs)) + data.bugs = {email:data.bugs}; + else if(url.parse(data.bugs).protocol) + data.bugs = {url: data.bugs}; + else + this.warn("nonEmailUrlBugsString"); + } + else { + bugsTypos(data.bugs, this.warn); + var oldBugs = data.bugs; + data.bugs = {}; + if(oldBugs.url) { + if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) + data.bugs.url = oldBugs.url; + else + this.warn("nonUrlBugsUrlField"); + } + if(oldBugs.email) { + if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) + data.bugs.email = oldBugs.email; + else + this.warn("nonEmailBugsEmailField"); + } + } + if(!data.bugs.email && !data.bugs.url) { + delete data.bugs; + this.warn("emptyNormalizedBugs"); + } + } + } + +, fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url); + if (hosted && hosted.docs()) data.homepage = hosted.docs(); + } + if (!data.homepage) return + + if(typeof data.homepage !== "string") { + this.warn("nonUrlHomepage"); + return delete data.homepage + } + if(!url.parse(data.homepage).protocol) { + this.warn("missingProtocolHomepage"); + data.homepage = "http://" + data.homepage; + } + } + +, fixLicenseField: function(data) { + if (!data.license) { + return this.warn("missingLicense") + } else{ + if ( + typeof(data.license) !== 'string' || + data.license.length < 1 + ) { + this.warn("invalidLicense"); + } else { + if (!validateNpmPackageLicense(data.license).validForNewPackages) + this.warn("invalidLicense"); + } + } + } +}; + +function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== '@') return false + + var rest = spec.slice(1).split('/'); + if (rest.length !== 2) return false + + return rest[0] && rest[1] && + rest[0] === encodeURIComponent(rest[0]) && + rest[1] === encodeURIComponent(rest[1]) +} + +function isCorrectlyEncodedName(spec) { + return !spec.match(/[\/@\s\+%:]/) && + spec === encodeURIComponent(spec) +} + +function ensureValidName (name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || + !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || + (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || + name.toLowerCase() === "node_modules" || + name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)) + } +} + +function modifyPeople (data, fn) { + if (data.author) data.author = fn(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(fn); + }); + return data +} + +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || ""; + var u = person.url || person.web; + var url$$1 = u ? (" ("+u+")") : ""; + var e = person.email || person.mail; + var email = e ? (" <"+e+">") : ""; + return name+email+url$$1 +} + +function parsePerson (person) { + if (typeof person !== "string") return person + var name = person.match(/^([^\(<]+)/); + var url$$1 = person.match(/\(([^\)]+)\)/); + var email = person.match(/<([^>]+)>/); + var obj = {}; + if (name && name[0].trim()) obj.name = name[0].trim(); + if (email) obj.email = email[1]; + if (url$$1) obj.url = url$$1[1]; + return obj +} + +function addOptionalDepsToDeps (data, warn) { + var o = data.optionalDependencies; + if (!o) return; + var d = data.dependencies || {}; + Object.keys(o).forEach(function (k) { + d[k] = o[k]; + }); + data.dependencies = d; +} + +function depObjectify (deps, type, warn) { + if (!deps) return {} + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/); + } + if (!Array.isArray(deps)) return deps + warn("deprecatedArrayDependencies", type); + var o = {}; + deps.filter(function (d) { + return typeof d === "string" + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/); + var dn = d.shift(); + var dv = d.join(""); + dv = dv.trim(); + dv = dv.replace(/^@/, ""); + o[dn] = dv; + }); + return o +} + +function objectifyDeps (data, warn) { + depTypes.forEach(function (type) { + if (!data[type]) return; + data[type] = depObjectify(data[type], type, warn); + }); +} + +function bugsTypos(bugs, warn) { + if (!bugs) return + Object.keys(bugs).forEach(function (k) { + if (typos$2.bugs[k]) { + warn("typo", k, typos$2.bugs[k], "bugs"); + bugs[typos$2.bugs[k]] = bugs[k]; + delete bugs[k]; + } + }); +} +}); + +var repositories = "'repositories' (plural) Not supported. Please pick one as the 'repository' field"; +var missingRepository = "No repository field."; +var brokenGitUrl = "Probably broken git url: %s"; +var nonObjectScripts = "scripts must be an object"; +var nonStringScript = "script values must be string commands"; +var nonArrayFiles = "Invalid 'files' member"; +var invalidFilename = "Invalid filename in 'files' list: %s"; +var nonArrayBundleDependencies = "Invalid 'bundleDependencies' list. Must be array of package names"; +var nonStringBundleDependency = "Invalid bundleDependencies member: %s"; +var nonDependencyBundleDependency = "Non-dependency in bundleDependencies: %s"; +var nonObjectDependencies = "%s field must be an object"; +var nonStringDependency = "Invalid dependency: %s %s"; +var deprecatedArrayDependencies = "specifying %s as array is deprecated"; +var deprecatedModules = "modules field is deprecated"; +var nonArrayKeywords = "keywords should be an array of strings"; +var nonStringKeyword = "keywords should be an array of strings"; +var conflictingName = "%s is also the name of a node core module."; +var nonStringDescription = "'description' field should be a string"; +var missingDescription = "No description"; +var missingReadme = "No README data"; +var missingLicense = "No license field."; +var nonEmailUrlBugsString = "Bug string field must be url, email, or {email,url}"; +var nonUrlBugsUrlField = "bugs.url field must be a string url. Deleted."; +var nonEmailBugsEmailField = "bugs.email field must be a string email. Deleted."; +var emptyNormalizedBugs = "Normalized value of bugs field is an empty object. Deleted."; +var nonUrlHomepage = "homepage field must be a string url. Deleted."; +var invalidLicense = "license should be a valid SPDX license expression"; +var missingProtocolHomepage = "homepage field must start with a protocol."; +var typo = "%s should probably be %s."; +var warning_messages = { + repositories: repositories, + missingRepository: missingRepository, + brokenGitUrl: brokenGitUrl, + nonObjectScripts: nonObjectScripts, + nonStringScript: nonStringScript, + nonArrayFiles: nonArrayFiles, + invalidFilename: invalidFilename, + nonArrayBundleDependencies: nonArrayBundleDependencies, + nonStringBundleDependency: nonStringBundleDependency, + nonDependencyBundleDependency: nonDependencyBundleDependency, + nonObjectDependencies: nonObjectDependencies, + nonStringDependency: nonStringDependency, + deprecatedArrayDependencies: deprecatedArrayDependencies, + deprecatedModules: deprecatedModules, + nonArrayKeywords: nonArrayKeywords, + nonStringKeyword: nonStringKeyword, + conflictingName: conflictingName, + nonStringDescription: nonStringDescription, + missingDescription: missingDescription, + missingReadme: missingReadme, + missingLicense: missingLicense, + nonEmailUrlBugsString: nonEmailUrlBugsString, + nonUrlBugsUrlField: nonUrlBugsUrlField, + nonEmailBugsEmailField: nonEmailBugsEmailField, + emptyNormalizedBugs: emptyNormalizedBugs, + nonUrlHomepage: nonUrlHomepage, + invalidLicense: invalidLicense, + missingProtocolHomepage: missingProtocolHomepage, + typo: typo +}; + +var warning_messages$1 = Object.freeze({ + repositories: repositories, + missingRepository: missingRepository, + brokenGitUrl: brokenGitUrl, + nonObjectScripts: nonObjectScripts, + nonStringScript: nonStringScript, + nonArrayFiles: nonArrayFiles, + invalidFilename: invalidFilename, + nonArrayBundleDependencies: nonArrayBundleDependencies, + nonStringBundleDependency: nonStringBundleDependency, + nonDependencyBundleDependency: nonDependencyBundleDependency, + nonObjectDependencies: nonObjectDependencies, + nonStringDependency: nonStringDependency, + deprecatedArrayDependencies: deprecatedArrayDependencies, + deprecatedModules: deprecatedModules, + nonArrayKeywords: nonArrayKeywords, + nonStringKeyword: nonStringKeyword, + conflictingName: conflictingName, + nonStringDescription: nonStringDescription, + missingDescription: missingDescription, + missingReadme: missingReadme, + missingLicense: missingLicense, + nonEmailUrlBugsString: nonEmailUrlBugsString, + nonUrlBugsUrlField: nonUrlBugsUrlField, + nonEmailBugsEmailField: nonEmailBugsEmailField, + emptyNormalizedBugs: emptyNormalizedBugs, + nonUrlHomepage: nonUrlHomepage, + invalidLicense: invalidLicense, + missingProtocolHomepage: missingProtocolHomepage, + typo: typo, + default: warning_messages +}); + +var messages = ( warning_messages$1 && warning_messages ) || warning_messages$1; + +var make_warning = function() { + var args = Array.prototype.slice.call(arguments, 0); + var warningName = args.shift(); + if (warningName == "typo") { + return makeTypoWarning.apply(null,args) + } + else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'"; + args.unshift(msgTemplate); + return util.format.apply(null, args) + } +}; + +function makeTypoWarning (providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']"; + probableName = field + "['" + probableName + "']"; + } + return util.format(messages.typo, providedName, probableName) +} + +var normalize_1 = normalize; + + +normalize.fixer = fixer_1; + + + +var fieldsToFix = ['name','version','description','repository','modules','scripts' + ,'files','bin','man','bugs','keywords','readme','homepage','license']; +var otherThingsToFix = ['dependencies','people', 'typos']; + +var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field" +}); +// two ways to do this in CoffeeScript on only one line, sub-70 chars: +// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" +// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) +thingsToFix = thingsToFix.concat(otherThingsToFix); + +function normalize (data, warn, strict) { + if(warn === true) warn = null, strict = true; + if(!strict) strict = false; + if(!warn || data.private) warn = function(msg) { /* noop */ }; + + if (data.scripts && + data.scripts.install === "node-gyp rebuild" && + !data.scripts.preinstall) { + data.gypfile = true; + } + fixer_1.warn = function() { warn(make_warning.apply(null, arguments)); }; + thingsToFix.forEach(function(thingName) { + fixer_1["fix" + ucFirst(thingName)](data, strict); + }); + data._id = data.name + "@" + data.version; +} + +function ucFirst (string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} + +var readPkg = createCommonjsModule(function (module) { +'use strict'; + + + + +module.exports = (fp, opts) => { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + + return pathType.dir(fp) + .then(isDir => { + if (isDir) { + fp = path.join(fp, 'package.json'); + } + + return loadJsonFile(fp); + }) + .then(x => { + if (opts.normalize !== false) { + normalize_1(x); + } + + return x; + }); +}; + +module.exports.sync = (fp, opts) => { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; + + const x = loadJsonFile.sync(fp); + + if (opts.normalize !== false) { + normalize_1(x); + } + + return x; +}; +}); + +var readPkgUp = createCommonjsModule(function (module) { +'use strict'; + + + +module.exports = opts => { + return findUp('package.json', opts).then(fp => { + if (!fp) { + return {}; + } + + return readPkg(fp, opts).then(pkg => ({pkg, path: fp})); + }); +}; + +module.exports.sync = opts => { + const fp = findUp.sync('package.json', opts); + + if (!fp) { + return {}; + } + + return { + pkg: readPkg.sync(fp, opts), + path: fp + }; +}; +}); + +function assertDoc(val) { + /* istanbul ignore if */ + if ( + !(typeof val === "string" || (val != null && typeof val.type === "string")) + ) { + throw new Error( + "Value " + JSON.stringify(val) + " is not a valid document" + ); + } +} + +function concat$2(parts) { + if (process.env.NODE_ENV !== "production") { + parts.forEach(assertDoc); + } + + // We cannot do this until we change `printJSXElement` to not + // access the internals of a document directly. + // if(parts.length === 1) { + // // If it's a single document, no need to concat it. + // return parts[0]; + // } + return { type: "concat", parts }; +} + +function indent$2(contents) { + if (process.env.NODE_ENV !== "production") { + assertDoc(contents); + } + + return { type: "indent", contents }; +} + +function align$1(n, contents) { + if (process.env.NODE_ENV !== "production") { + assertDoc(contents); + } + + return { type: "align", contents, n }; +} + +function group$1(contents, opts) { + opts = opts || {}; + + if (process.env.NODE_ENV !== "production") { + assertDoc(contents); + } + + return { + type: "group", + contents: contents, + break: !!opts.shouldBreak, + expandedStates: opts.expandedStates + }; +} + +function dedentToRoot(contents) { + return align$1(-Infinity, contents); +} + +function markAsRoot(contents) { + return align$1({ type: "root" }, contents); +} + +function dedent$1(contents) { + return align$1(-1, contents); +} + +function conditionalGroup$1(states, opts) { + return group$1( + states[0], + Object.assign(opts || {}, { expandedStates: states }) + ); +} + +function fill$1(parts) { + if (process.env.NODE_ENV !== "production") { + parts.forEach(assertDoc); + } + + return { type: "fill", parts }; +} + +function ifBreak$1(breakContents, flatContents) { + if (process.env.NODE_ENV !== "production") { + if (breakContents) { + assertDoc(breakContents); + } + if (flatContents) { + assertDoc(flatContents); + } + } + + return { type: "if-break", breakContents, flatContents }; +} + +function lineSuffix$1(contents) { + if (process.env.NODE_ENV !== "production") { + assertDoc(contents); + } + return { type: "line-suffix", contents }; +} + +const lineSuffixBoundary$1 = { type: "line-suffix-boundary" }; +const breakParent$2 = { type: "break-parent" }; +const line$1 = { type: "line" }; +const softline$1 = { type: "line", soft: true }; +const hardline$2 = concat$2([{ type: "line", hard: true }, breakParent$2]); +const literalline$1 = concat$2([ + { type: "line", hard: true, literal: true }, + breakParent$2 +]); +const cursor$1 = { type: "cursor", placeholder: Symbol("cursor") }; + +function join$2(sep, arr) { + const res = []; + + for (let i = 0; i < arr.length; i++) { + if (i !== 0) { + res.push(sep); + } + + res.push(arr[i]); + } + + return concat$2(res); +} + +function addAlignmentToDoc$1(doc, size, tabWidth) { + let aligned = doc; + if (size > 0) { + // Use indent to add tabs for all the levels of tabs we need + for (let i = 0; i < Math.floor(size / tabWidth); ++i) { + aligned = indent$2(aligned); + } + // Use align for all the spaces that are needed + aligned = align$1(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$1(-Infinity, aligned); + } + return aligned; +} + +var docBuilders$2 = { + concat: concat$2, + join: join$2, + line: line$1, + softline: softline$1, + hardline: hardline$2, + literalline: literalline$1, + group: group$1, + conditionalGroup: conditionalGroup$1, + fill: fill$1, + lineSuffix: lineSuffix$1, + lineSuffixBoundary: lineSuffixBoundary$1, + cursor: cursor$1, + breakParent: breakParent$2, + ifBreak: ifBreak$1, + indent: indent$2, + align: align$1, + addAlignmentToDoc: addAlignmentToDoc$1, + markAsRoot, + dedentToRoot, + dedent: dedent$1 +}; + +const concat$3 = docBuilders$2.concat; +const fill$2 = docBuilders$2.fill; +const cursor$2 = docBuilders$2.cursor; + +const MODE_BREAK = 1; +const 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) { + const queue = + newPart.type === "dedent" + ? ind.queue.slice(0, -1) + : ind.queue.concat(newPart); + + let value = ""; + let length = 0; + let lastTabs = 0; + let lastSpaces = 0; + + for (const part of queue) { + 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}'`); + } + } + + 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 fits(next, restCommands, width, options, mustBeFlat) { + let restIdx = restCommands.length; + const cmds = [next]; + while (width >= 0) { + if (cmds.length === 0) { + if (restIdx === 0) { + return true; + } + cmds.push(restCommands[restIdx - 1]); + + restIdx--; + + continue; + } + + const x = cmds.pop(); + const ind = x[0]; + const mode = x[1]; + const doc = x[2]; + + if (typeof doc === "string") { + width -= util$1.getStringWidth(doc); + } else { + switch (doc.type) { + case "concat": + for (let 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 "group": + if (mustBeFlat && doc.break) { + return false; + } + cmds.push([ind, doc.break ? MODE_BREAK : mode, doc.contents]); + + break; + case "fill": + for (let i = doc.parts.length - 1; i >= 0; i--) { + cmds.push([ind, mode, doc.parts[i]]); + } + + break; + case "if-break": + if (mode === MODE_BREAK) { + if (doc.breakContents) { + cmds.push([ind, mode, doc.breakContents]); + } + } + if (mode === 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) { + width -= 1; + } + + break; + } + return true; + + case MODE_BREAK: + return true; + } + break; + } + } + } + return false; +} + +function printDocToString$1(doc, options) { + const width = options.printWidth; + const newLine = options.newLine || "\n"; + let 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`. + const cmds = [[rootIndent(), MODE_BREAK, doc]]; + const out = []; + let shouldRemeasure = false; + let lineSuffix = []; + + while (cmds.length !== 0) { + const x = cmds.pop(); + const ind = x[0]; + const mode = x[1]; + const doc = x[2]; + + if (typeof doc === "string") { + out.push(doc); + + pos += util$1.getStringWidth(doc); + } else { + switch (doc.type) { + case "cursor": + out.push(cursor$2.placeholder); + + break; + case "concat": + for (let 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 "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; + + const next = [ind, MODE_FLAT, doc.contents]; + const 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) { + const mostExpanded = + doc.expandedStates[doc.expandedStates.length - 1]; + + if (doc.break) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + + break; + } else { + for (let i = 1; i < doc.expandedStates.length + 1; i++) { + if (i >= doc.expandedStates.length) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + + break; + } else { + const state = doc.expandedStates[i]; + const cmd = [ind, MODE_FLAT, state]; + + if (fits(cmd, cmds, rem, options)) { + cmds.push(cmd); + + break; + } + } + } + } + } else { + cmds.push([ind, MODE_BREAK, doc.contents]); + } + } + + break; + } + } + 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": { + const rem = width - pos; + + const parts = doc.parts; + if (parts.length === 0) { + break; + } + + const content = parts[0]; + const contentFlatCmd = [ind, MODE_FLAT, content]; + const contentBreakCmd = [ind, MODE_BREAK, content]; + const contentFits = fits(contentFlatCmd, [], rem, options, true); + + if (parts.length === 1) { + if (contentFits) { + cmds.push(contentFlatCmd); + } else { + cmds.push(contentBreakCmd); + } + break; + } + + const whitespace = parts[1]; + const whitespaceFlatCmd = [ind, MODE_FLAT, whitespace]; + const 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); + const remainingCmd = [ind, mode, fill$2(parts)]; + + const secondContent = parts[0]; + + const firstAndSecondContentFlatCmd = [ + ind, + MODE_FLAT, + concat$3([content, whitespace, secondContent]) + ]; + const 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": + if (mode === MODE_BREAK) { + if (doc.breakContents) { + cmds.push([ind, mode, doc.breakContents]); + } + } + if (mode === 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 { + if (out.length > 0) { + // Trim whitespace at the end of line + while ( + out.length > 0 && + out[out.length - 1].match(/^[^\S\n]*$/) + ) { + out.pop(); + } + + if ( + out.length && + (options.parser !== "markdown" || + // preserve markdown's `break` node (two trailing spaces) + !/\S {2}$/.test(out[out.length - 1])) + ) { + out[out.length - 1] = out[out.length - 1].replace( + /[^\S\n]*$/, + "" + ); + } + } + + out.push(newLine + ind.value); + pos = ind.length; + } + break; + } + break; + default: + } + } + } + + const cursorPlaceholderIndex = out.indexOf(cursor$2.placeholder); + if (cursorPlaceholderIndex !== -1) { + const beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); + const afterCursor = out.slice(cursorPlaceholderIndex + 1).join(""); + + return { + formatted: beforeCursor + afterCursor, + cursor: beforeCursor.length + }; + } + + return { formatted: out.join("") }; +} + +var docPrinter = { printDocToString: printDocToString$1 }; + +function flattenDoc(doc) { + if (doc.type === "concat") { + const res = []; + + for (let i = 0; i < doc.parts.length; ++i) { + const doc2 = doc.parts[i]; + if (typeof doc2 !== "string" && doc2.type === "concat") { + [].push.apply(res, flattenDoc(doc2).parts); + } else { + const 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.literalline) { + return "literalline"; + } + if (doc.hard) { + return "hardline"; + } + if (doc.soft) { + return "softline"; + } + return "line"; + } + + if (doc.type === "break-parent") { + return "breakParent"; + } + + 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(doc) { + return printDoc(flattenDoc(doc)); + } +}; + +var doc = { + builders: docBuilders$2, + printer: docPrinter, + utils: docUtils, + debug: docDebug +}; + +const docBuilders$1 = doc.builders; +const concat$1 = docBuilders$1.concat; +const hardline$1 = docBuilders$1.hardline; +const breakParent$1 = docBuilders$1.breakParent; +const indent$1 = docBuilders$1.indent; +const lineSuffix = docBuilders$1.lineSuffix; +const join$1 = docBuilders$1.join; +const cursor = docBuilders$1.cursor; + + +const childNodesCacheKey = Symbol("child-nodes"); + +const addLeadingComment$1 = utilShared.addLeadingComment; +const addTrailingComment$1 = utilShared.addTrailingComment; +const addDanglingComment$1 = utilShared.addDanglingComment; + +function getSortedChildNodes(node, text, options, resultArray) { + if (!node) { + return; + } + const printer = options.printer; + const locStart = options.locStart; + const 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. + let 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]; + } + + let childNodes; + + if (printer.getCommentChildNodes) { + childNodes = printer.getCommentChildNodes(node); + } else if (node && typeof node === "object") { + childNodes = Object.keys(node) + .filter( + n => + n !== "enclosingNode" && + n !== "precedingNode" && + n !== "followingNode" + ) + .map(n => node[n]); + } + + if (!childNodes) { + return; + } + + if (!resultArray) { + Object.defineProperty(node, childNodesCacheKey, { + value: (resultArray = []), + enumerable: false + }); + } + + childNodes.forEach(childNode => { + getSortedChildNodes(childNode, text, 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, text, options) { + const locStart = options.locStart; + const locEnd = options.locEnd; + const childNodes = getSortedChildNodes(node, text, options); + let precedingNode; + let followingNode; + // Time to dust off the old binary search robes and wizard hat. + let left = 0; + let right = childNodes.length; + while (left < right) { + const middle = (left + right) >> 1; + const 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, text, 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" + ) { + const quasis = comment.enclosingNode.quasis; + const 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; + } + + const tiesToBreak = []; + const locStart = options.locStart; + const locEnd = options.locEnd; + + comments.forEach((comment, i) => { + if (options.parser === "json" && locStart(comment) - locStart(ast) <= 0) { + addLeadingComment$1(ast, comment); + return; + } + + decorateComment(ast, comment, text, options); + + const precedingNode = comment.precedingNode; + const enclosingNode = comment.enclosingNode; + const followingNode = comment.followingNode; + + const pluginHandleOwnLineComment = + options.printer.handleComments && options.printer.handleComments.ownLine + ? options.printer.handleComments.ownLine + : () => false; + const pluginHandleEndOfLineComment = + options.printer.handleComments && options.printer.handleComments.endOfLine + ? options.printer.handleComments.endOfLine + : () => false; + const pluginHandleRemainingComment = + options.printer.handleComments && options.printer.handleComments.remaining + ? options.printer.handleComments.remaining + : () => false; + + const isLastComment = comments.length - 1 === i; + + if (util$1.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$1(followingNode, comment); + } else if (precedingNode) { + addTrailingComment$1(precedingNode, comment); + } else if (enclosingNode) { + addDanglingComment$1(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + /* istanbul ignore next */ + addDanglingComment$1(ast, comment); + } + } else if (util$1.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$1(precedingNode, comment); + } else if (followingNode) { + addLeadingComment$1(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment$1(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + /* istanbul ignore next */ + addDanglingComment$1(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; + const tieCount = tiesToBreak.length; + if (tieCount > 0) { + const lastTie = tiesToBreak[tieCount - 1]; + if (lastTie.followingNode !== comment.followingNode) { + breakTies(tiesToBreak, text, options); + } + } + tiesToBreak.push(comment); + } else if (precedingNode) { + addTrailingComment$1(precedingNode, comment); + } else if (followingNode) { + addLeadingComment$1(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment$1(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + /* istanbul ignore next */ + addDanglingComment$1(ast, comment); + } + } + }); + + breakTies(tiesToBreak, text, options); + + comments.forEach(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) { + const tieCount = tiesToBreak.length; + if (tieCount === 0) { + return; + } + + const precedingNode = tiesToBreak[0].precedingNode; + const followingNode = tiesToBreak[0].followingNode; + let 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. + let indexOfFirstLeadingComment; + for ( + indexOfFirstLeadingComment = tieCount; + indexOfFirstLeadingComment > 0; + --indexOfFirstLeadingComment + ) { + const comment = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert.strictEqual(comment.precedingNode, precedingNode); + assert.strictEqual(comment.followingNode, followingNode); + + const 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((comment, i) => { + if (i < indexOfFirstLeadingComment) { + addTrailingComment$1(precedingNode, comment); + } else { + addLeadingComment$1(followingNode, comment); + } + }); + + tiesToBreak.length = 0; +} + +function printComment$1(commentPath, options) { + const comment = commentPath.getValue(); + comment.printed = true; + return options.printer.printComment(commentPath, options); +} + +function findExpressionIndexForComment(quasis, comment, options) { + const startPos = options.locStart(comment) - 1; + + for (let 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) { + const comment = commentPath.getValue(); + const contents = printComment$1(commentPath, options); + if (!contents) { + return ""; + } + const isBlock = util$1.isBlockComment(comment); + + // Leading block comments should see if they need to stay on the + // same line or not. + if (isBlock) { + return concat$1([ + contents, + util$1.hasNewline(options.originalText, options.locEnd(comment)) + ? hardline$1 + : " " + ]); + } + + return concat$1([contents, hardline$1]); +} + +function printTrailingComment(commentPath, print, options) { + const comment = commentPath.getValue(); + const contents = printComment$1(commentPath, options); + if (!contents) { + return ""; + } + const isBlock = util$1.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 + const parentNode = commentPath.getNode(1); + const parentParentNode = commentPath.getNode(2); + const isParentSuperClass = + parentParentNode && + (parentParentNode.type === "ClassDeclaration" || + parentParentNode.type === "ClassExpression") && + parentParentNode.superClass === parentNode; + + if ( + util$1.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. + + const isLineBeforeEmpty = util$1.isPreviousLineEmpty( + options.originalText, + comment, + options.locStart + ); + + return lineSuffix( + concat$1([hardline$1, isLineBeforeEmpty ? hardline$1 : "", contents]) + ); + } else if (isBlock || isParentSuperClass) { + // Trailing block comments never need a newline + return concat$1([" ", contents]); + } + + return concat$1([lineSuffix(" " + contents), !isBlock ? breakParent$1 : ""]); +} + +function printDanglingComments(path$$1, options, sameIndent, filter) { + const parts = []; + const node = path$$1.getValue(); + + if (!node || !node.comments) { + return ""; + } + + path$$1.each(commentPath => { + const comment = commentPath.getValue(); + if ( + comment && + !comment.leading && + !comment.trailing && + (!filter || filter(comment)) + ) { + parts.push(printComment$1(commentPath, options)); + } + }, "comments"); + + if (parts.length === 0) { + return ""; + } + + if (sameIndent) { + return join$1(hardline$1, parts); + } + return indent$1(concat$1([hardline$1, join$1(hardline$1, parts)])); +} + +function prependCursorPlaceholder(path$$1, options, printed) { + if (path$$1.getNode() === options.cursorNode && path$$1.getValue()) { + return concat$1([cursor, printed]); + } + return printed; +} + +function printComments(path$$1, print, options, needsSemi) { + const value = path$$1.getValue(); + const printed = print(path$$1); + const comments = value && value.comments; + + if (!comments || comments.length === 0) { + return prependCursorPlaceholder(path$$1, options, printed); + } + + const leadingParts = []; + const trailingParts = [needsSemi ? ";" : "", printed]; + + path$$1.each(commentPath => { + const comment = commentPath.getValue(); + const leading = comment.leading; + const trailing = comment.trailing; + + if (leading) { + const contents = printLeadingComment(commentPath, print, options); + if (!contents) { + return; + } + leadingParts.push(contents); + + const text = options.originalText; + if ( + util$1.hasNewline( + text, + util$1.skipNewline(text, options.locEnd(comment)) + ) + ) { + leadingParts.push(hardline$1); + } + } else if (trailing) { + trailingParts.push(printTrailingComment(commentPath, print, options)); + } + }, "comments"); + + return prependCursorPlaceholder( + path$$1, + options, + concat$1(leadingParts.concat(trailingParts)) + ); +} + +var comments = { + attach, + printComments, + printDanglingComments, + getSortedChildNodes +}; + +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\u0A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\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-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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-\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B7\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 : */ +}); + +const doc$2 = doc; +const docUtils$4 = doc$2.utils; +const docBuilders$5 = doc$2.builders; +const indent$3 = docBuilders$5.indent; +const join$3 = docBuilders$5.join; +const hardline$3 = docBuilders$5.hardline; +const softline$2 = docBuilders$5.softline; +const literalline$2 = docBuilders$5.literalline; +const concat$4 = docBuilders$5.concat; +const dedentToRoot$1 = docBuilders$5.dedentToRoot; + +function embed(path$$1, print, textToDoc /*, options */) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + const parentParent = path$$1.getParentNode(1); + + switch (node.type) { + case "TemplateLiteral": { + const isCss = [isStyledJsx, isStyledComponents, isCssProp].some(isIt => + isIt(path$$1) + ); + + if (isCss) { + // Get full template literal with expressions replaced by placeholders + const rawQuasis = node.quasis.map(q => q.value.raw); + let placeholderID = 0; + const text = rawQuasis.reduce((prevVal, currVal, idx) => { + return idx == 0 + ? currVal + : prevVal + + "@prettier-placeholder-" + + placeholderID++ + + "-id" + + currVal; + }, ""); + const 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 ( + 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")) + ) { + const expressionDocs = node.expressions + ? path$$1.map(print, "expressions") + : []; + + const numQuasis = node.quasis.length; + + if (numQuasis === 1 && node.quasis[0].value.raw.trim() === "") { + return "``"; + } + + const parts = []; + + for (let i = 0; i < numQuasis; i++) { + const templateElement = node.quasis[i]; + const isFirst = i === 0; + const isLast = i === numQuasis - 1; + const 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; + } + + const lines = text.split("\n"); + const numLines = lines.length; + const expressionDoc = expressionDocs[i]; + + const startsWithBlankLine = + numLines > 2 && lines[0].trim() === "" && lines[1].trim() === ""; + const endsWithBlankLine = + numLines > 2 && + lines[numLines - 1].trim() === "" && + lines[numLines - 2].trim() === ""; + + const commentsAndWhitespaceOnly = lines.every(line => + /^\s*(?:#[^\r\n]*)?$/.test(line) + ); + + // Bail out if an interpolation occurs within a comment. + if (!isLast && /#[^\r\n]*$/.test(lines[numLines - 1])) { + return null; + } + + let doc$$2 = null; + + if (commentsAndWhitespaceOnly) { + doc$$2 = printGraphqlComments(lines); + } else { + try { + doc$$2 = docUtils$4.stripTrailingHardline( + textToDoc(text, { parser: "graphql" }) + ); + } catch (error) { + if (process.env.PRETTIER_DEBUG) { + throw error; + } + // Bail if any part fails to parse. + return null; + } + } + + if (doc$$2) { + doc$$2 = escapeBackticks(doc$$2); + if (!isFirst && startsWithBlankLine) { + parts.push(""); + } + parts.push(doc$$2); + if (!isLast && endsWithBlankLine) { + parts.push(""); + } + } else if (!isFirst && !isLast && startsWithBlankLine) { + parts.push(""); + } + + if (expressionDoc) { + parts.push(concat$4(["${", expressionDoc, "}"])); + } + } + + return concat$4([ + "`", + indent$3(concat$4([hardline$3, join$3(hardline$3, parts)])), + hardline$3, + "`" + ]); + } + + 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"))) + ) { + const text = parent.quasis[0].value.cooked; + const indentation = getIndentation(text); + const hasIndent = indentation !== ""; + return concat$4([ + hasIndent + ? indent$3( + concat$4([ + softline$2, + printMarkdown( + text.replace(new RegExp(`^${indentation}`, "gm"), "") + ) + ]) + ) + : concat$4([literalline$2, dedentToRoot$1(printMarkdown(text))]), + softline$2 + ]); + } + + break; + } + } + + function printMarkdown(text) { + const doc$$2 = textToDoc(text, { parser: "markdown", __inJsTemplate: true }); + return docUtils$4.stripTrailingHardline(escapeBackticks(doc$$2)); + } +} + +function getIndentation(str) { + const firstMatchedIndent = str.match(/^([^\S\n]*)\S/m); + return firstMatchedIndent === null ? "" : firstMatchedIndent[1]; +} + +function escapeBackticks(doc$$2) { + return docUtils$4.mapDoc(doc$$2, currentDoc => { + if (!currentDoc.parts) { + return currentDoc; + } + + const parts = []; + + currentDoc.parts.forEach(part => { + if (typeof part === "string") { + parts.push(part.replace(/`/g, "\\`")); + } else { + parts.push(part); + } + }); + + return Object.assign({}, currentDoc, { parts }); + }); +} + +function transformCssDoc(quasisDoc, path$$1, print) { + const parentNode = path$$1.getValue(); + + const isEmpty = + parentNode.quasis.length === 1 && !parentNode.quasis[0].value.raw.trim(); + if (isEmpty) { + return "``"; + } + + const expressionDocs = parentNode.expressions + ? path$$1.map(print, "expressions") + : []; + const newDoc = replacePlaceholders(quasisDoc, expressionDocs); + /* istanbul ignore if */ + if (!newDoc) { + throw new Error("Couldn't insert all the expressions"); + } + return concat$4([ + "`", + indent$3(concat$4([hardline$3, docUtils$4.stripTrailingHardline(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; + } + + const expressions = expressionDocs.slice(); + let replaceCounter = 0; + const newDoc = docUtils$4.mapDoc(quasisDoc, doc$$2 => { + if (!doc$$2 || !doc$$2.parts || !doc$$2.parts.length) { + return doc$$2; + } + let parts = doc$$2.parts; + const atIndex = parts.indexOf("@"); + const placeholderIndex = atIndex + 1; + if ( + atIndex > -1 && + typeof parts[placeholderIndex] === "string" && + parts[placeholderIndex].startsWith("prettier-placeholder") + ) { + // If placeholder is split, join it + const at = parts[atIndex]; + const placeholder = parts[placeholderIndex]; + const rest = parts.slice(placeholderIndex + 1); + parts = parts + .slice(0, atIndex) + .concat([at + placeholder]) + .concat(rest); + } + const atPlaceholderIndex = parts.findIndex( + part => + typeof part === "string" && part.startsWith("@prettier-placeholder") + ); + if (atPlaceholderIndex > -1) { + const placeholder = parts[atPlaceholderIndex]; + const rest = parts.slice(atPlaceholderIndex + 1); + const placeholderMatch = placeholder.match( + /@prettier-placeholder-(.+)-id([\s\S]*)/ + ); + const placeholderID = placeholderMatch[1]; + // When the expression has a suffix appended, like: + // animation: linear ${time}s ease-out; + const suffix = placeholderMatch[2]; + const 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) { + const parts = []; + let seenComment = false; + + lines.map(textLine => textLine.trim()).forEach((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$4([hardline$3, textLine])); + } else { + parts.push(textLine); + } + + seenComment = true; + }); + + // If `lines` was whitespace only, return `null`. + return parts.length === 0 ? null : join$3(hardline$3, parts); +} + +/** + * Template literal in this context: + * + */ +function isStyledJsx(path$$1) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + const parentParent = path$$1.getParentNode(1); + return ( + parentParent && + node.quasis && + parent.type === "JSXExpressionContainer" && + parentParent.type === "JSXElement" && + parentParent.openingElement.name.name === "style" && + parentParent.openingElement.attributes.some( + attribute => attribute.name.name === "jsx" + ) + ); +} + +/** + * styled-components template literals + */ +function isStyledComponents(path$$1) { + const parent = path$$1.getParentNode(); + + if (!parent || parent.type !== "TaggedTemplateExpression") { + return false; + } + + const tag = parent.tag; + + switch (tag.type) { + case "MemberExpression": + return ( + // styled.foo`` + isStyledIdentifier(tag.object) || + // Component.extend`` + (/^[A-Z]/.test(tag.object.name) && tag.property.name === "extend") + ); + + case "CallExpression": + return ( + // styled(Component)`` + isStyledIdentifier(tag.callee) || + (tag.callee.type === "MemberExpression" && + // styled.foo.attr({})`` + ((tag.callee.object.type === "MemberExpression" && + isStyledIdentifier(tag.callee.object.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) { + const parent = path$$1.getParentNode(); + const 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"; +} + +var embed_1 = embed; + +function clean(ast, newObj, parent) { + // 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 === "MethodDefinition" || + ast.type === "ClassProperty" || + ast.type === "TSPropertySignature" || + ast.type === "ObjectTypeProperty") && + typeof ast.key === "object" && + ast.key && + (ast.key.type === "Literal" || ast.key.type === "Identifier") + ) { + delete newObj.key; + } + + // 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(attr => attr.name.name === "jsx") + ) { + const templateLiterals = newObj.children + .filter( + child => + child.type === "JSXExpressionContainer" && + child.expression.type === "TemplateLiteral" + ) + .map(container => container.expression); + + const quasis = templateLiterals.reduce( + (quasis, templateLiteral) => quasis.concat(templateLiteral.quasis), + [] + ); + + quasis.forEach(q => 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(q => 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.type === "CallExpression") + ) { + newObj.quasi.quasis.forEach(quasi => delete quasi.value); + } + if ( + ast.type === "TemplateLiteral" && + parent.type === "CallExpression" && + parent.callee.name === "graphql" + ) { + newObj.quasis.forEach(quasi => 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 = 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. + * + * + */const commentEndRe = /\*\/$/;const commentStartRe = /^\/\*\*/;const docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;const lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g;const ltrimRe = /^\s*/;const rtrimRe = /\s*$/;const ltrimNewlineRe = /^(\r?\n)+/;const multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g;const propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g;const stringStartRe = /(\r?\n|^) *\* ?/g;function extract(contents) {const match = contents.match(docblockRe);return match ? match[0].replace(ltrimRe, '') || '' : '';}function strip(contents) {const match = contents.match(docblockRe);return match && match[0] ? contents.substring(match[0].length) : contents;}function parse(docblock) {return parseWithComments(docblock).pragmas;}function parseWithComments(docblock) {const line = (0, (_detectNewline || _load_detectNewline()).default)(docblock) || (_os || _load_os()).EOL;docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives + let prev = '';while (prev !== docblock) {prev = docblock;docblock = docblock.replace(multilineRe, `${line}$1 $2${line}`);}docblock = docblock.replace(ltrimNewlineRe, '').replace(rtrimRe, '');const result = Object.create(null);const comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').replace(rtrimRe, '');let match;while (match = propertyRe.exec(docblock)) {// strip linecomments from pragmas + const 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;let comments = _ref$comments === undefined ? '' : _ref$comments;var _ref$pragmas = _ref.pragmas;let pragmas = _ref$pragmas === undefined ? {} : _ref$pragmas;const line = (0, (_detectNewline || _load_detectNewline()).default)(comments) || (_os || _load_os()).EOL;const head = '/**'; + const start = ' *'; + const tail = ' */'; + + const keys = Object.keys(pragmas); + + const printedObject = keys. + map(key => printKeyValues(key, pragmas[key])). + reduce((arr, next) => arr.concat(next), []). + map(keyValue => start + ' ' + keyValue + line). + join(''); + + if (!comments) { + if (keys.length === 0) { + return ''; + } + if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) { + const value = pragmas[keys[0]]; + return `${head} ${printKeyValues(keys[0], value)[0]}${tail}`; + } + } + + const printedComments = + comments. + split(line). + map(textLine => `${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(value => `@${key} ${value}`.trim()); +} +}); + +unwrapExports(build); + +function hasPragma$1(text) { + const pragmas = Object.keys(build.parse(build.extract(text))); + return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1; +} + +function insertPragma$1(text) { + const parsedDocblock = build.parseWithComments(build.extract(text)); + const pragmas = Object.assign({ format: "" }, parsedDocblock.pragmas); + const newDocblock = build.print({ + pragmas, + comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines + }); + const strippedText = build.strip(text); + const separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n"; + return newDocblock + separatingNewlines + strippedText; +} + +var pragma = { + hasPragma: hasPragma$1, + insertPragma: insertPragma$1 +}; + +const addLeadingComment$2 = utilShared.addLeadingComment; +const addTrailingComment$2 = utilShared.addTrailingComment; +const addDanglingComment$2 = utilShared.addDanglingComment; + +function handleOwnLineComment(comment, text, options, ast, isLastComment) { + const precedingNode = comment.precedingNode; + const enclosingNode = comment.enclosingNode; + const followingNode = comment.followingNode; + if ( + handleLastFunctionArgComments( + text, + precedingNode, + enclosingNode, + followingNode, + comment, + options + ) || + handleMemberExpressionComments(enclosingNode, followingNode, comment) || + handleIfStatementComments( + text, + precedingNode, + enclosingNode, + followingNode, + comment, + options + ) || + handleTryStatementComments(enclosingNode, 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) { + const precedingNode = comment.precedingNode; + const enclosingNode = comment.enclosingNode; + const 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 + ) || + 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) { + const precedingNode = comment.precedingNode; + const enclosingNode = comment.enclosingNode; + const followingNode = comment.followingNode; + if ( + handleIfStatementComments( + 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 + ) || + handleBreakAndContinueStatementComments(enclosingNode, comment) + ) { + return true; + } + return false; +} + +function addBlockStatementFirstComment(node, comment) { + const body = node.body.filter(n => 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 ). + const 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 with or without brackets on, such as + // if (a) /* comment */ {} or if (a) /* comment */ true, + // we look at the next character to see if it is a { or if the following node + // is the consequent for the if statement + if (nextCharacter === "{" || enclosingNode.consequent === followingNode) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +// Same as IfStatement but for TryStatement +function handleTryStatementComments(enclosingNode, followingNode, comment) { + if ( + !enclosingNode || + enclosingNode.type !== "TryStatement" || + !followingNode + ) { + return false; + } + + 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 +) { + const 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; + } + + const 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.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; + } + 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 && + 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" && + followingNode && + (followingNode.type === "ObjectExpression" || + followingNode.type === "ArrayExpression") + ) { + addLeadingComment$2(followingNode, comment); + return true; + } + return false; +} + +var comments$2 = { + handleOwnLineComment, + handleEndOfLineComment, + handleRemainingComment +}; + +function needsParens(path$$1, options) { + const parent = path$$1.getParentNode(); + if (!parent) { + return false; + } + + const name = path$$1.getName(); + const 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 ( + util$1.hasClosureCompilerTypeCastComment( + options.originalText, + node, + options.locEnd + ) + ) { + 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, + /* forbidFunctionAndClass */ false + )) || + (parent.type === "ExpressionStatement" && + util$1.startsWithNoLookaheadToken(node, /* forbidFunctionAndClass */ true)) + ) { + return true; + } + + switch (node.type) { + case "CallExpression": { + let firstParentNotMemberExpression = parent; + let 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; + } + 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 "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; + } + + const isLeftOfAForStatement = node => { + let i = 0; + while (node) { + const 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 "ClassDeclaration": + case "TSAbstractClassDeclaration": + return name === "superClass" && parent.superClass === node; + case "TSTypeAssertionExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "ExperimentalSpreadProperty": + 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; + } + + const po = parent.operator; + const pp = util$1.getPrecedence(po); + const no = node.operator; + const 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; + } + + // Add parenthesis when working with binary 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": { + const 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") + ) { + 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 "ExperimentalSpreadProperty": + case "TSAsExpression": + case "TSNonNullExpression": + 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": + return ( + parent.type === "UnionTypeAnnotation" || + parent.type === "IntersectionTypeAnnotation" || + parent.type === "ArrayTypeAnnotation" + ); + + case "StringLiteral": + case "NumericLiteral": + case "Literal": + if ( + typeof node.value === "string" && + parent.type === "ExpressionStatement" && + // TypeScript workaround for eslint/typescript-eslint-parser#267 + // 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 + const 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": { + const grandParent = 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" && + grandParent && + grandParent.type === "ForStatement" && + (grandParent.init === parent || grandParent.update === parent) + ) { + return false; + } + return true; + } + case "ConditionalExpression": + switch (parent.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "ExperimentalSpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + case "ExportDefaultDeclaration": + case "AwaitExpression": + case "JSXSpreadAttribute": + case "TSTypeAssertionExpression": + case "TypeCastExpression": + case "TSAsExpression": + case "TSNonNullExpression": + 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"; + } + + 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; + +// TODO(azz): anything that imports from main shouldn't be in a `language-*` dir. + + + +const isIdentifierName = utils$2.keyword.isIdentifierNameES6; + + +const insertPragma = pragma.insertPragma; + + + + +const docBuilders = doc.builders; +const concat = docBuilders.concat; +const join = docBuilders.join; +const line = docBuilders.line; +const hardline = docBuilders.hardline; +const softline = docBuilders.softline; +const literalline = docBuilders.literalline; +const group = docBuilders.group; +const indent = docBuilders.indent; +const align = docBuilders.align; +const conditionalGroup = docBuilders.conditionalGroup; +const fill = docBuilders.fill; +const ifBreak = docBuilders.ifBreak; +const breakParent = docBuilders.breakParent; +const lineSuffixBoundary = docBuilders.lineSuffixBoundary; +const addAlignmentToDoc = docBuilders.addAlignmentToDoc; +const dedent = docBuilders.dedent; + +const docUtils$3 = doc.utils; +const willBreak$1 = docUtils$3.willBreak; +const isLineNext$1 = docUtils$3.isLineNext; +const isEmpty$1 = docUtils$3.isEmpty; + +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) { + const node = path$$1.getValue(); + let needsParens = false; + const linesWithoutParens = printPathNoParens(path$$1, options, printPath, args); + + if (!node || isEmpty$1(linesWithoutParens)) { + return linesWithoutParens; + } + + const decorators = []; + if ( + node.decorators && + node.decorators.length > 0 && + // If the parent node is an export declaration, it will be + // responsible for printing node.decorators. + !util$1.getParentExportDeclaration(path$$1) + ) { + let separator = hardline; + path$$1.each(decoratorPath => { + let prefix = "@"; + let decorator = decoratorPath.getValue(); + if (decorator.expression) { + decorator = decorator.expression; + prefix = ""; + } + + if ( + node.decorators.length === 1 && + node.type !== "ClassDeclaration" && + node.type !== "MethodDefinition" && + node.type !== "ClassMethod" && + (decorator.type === "Identifier" || + decorator.type === "MemberExpression" || + (decorator.type === "CallExpression" && + (decorator.arguments.length === 0 || + (decorator.arguments.length === 1 && + (isStringLiteral(decorator.arguments[0]) || + decorator.arguments[0].type === "Identifier" || + decorator.arguments[0].type === "MemberExpression"))))) + ) { + separator = line; + } + + decorators.push(prefix, printPath(decoratorPath), separator); + }, "decorators"); + } else if ( + util$1.isExportDeclaration(node) && + node.declaration && + node.declaration.decorators + ) { + // Export declarations are responsible for printing any decorators + // that logically apply to node.declaration. + path$$1.each( + decoratorPath => { + const decorator = decoratorPath.getValue(); + const prefix = decorator.type === "Decorator" ? "" : "@"; + decorators.push(prefix, printPath(decoratorPath), hardline); + }, + "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); + } + + const parts = []; + if (needsParens) { + parts.unshift("("); + } + + parts.push(linesWithoutParens); + + if (needsParens) { + parts.push(")"); + } + + if (decorators.length > 0) { + return group(concat(decorators.concat(parts))); + } + return concat(parts); +} + +function hasPrettierIgnore(path$$1) { + return util$1.hasIgnoreComment(path$$1) || hasJsxIgnoreComment(path$$1); +} + +function hasJsxIgnoreComment(path$$1) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + if (!parent || !node || !isJSXNode(node) || !isJSXNode(parent)) { + return false; + } + + // Lookup the previous sibling, ignoring any empty JSXText elements + const index = parent.children.indexOf(node); + let prevSibling = null; + for (let i = index; i > 0; i--) { + const 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( + comment => comment.value.trim() === "prettier-ignore" + ) + ); +} + +// The following is the shared logic for +// ternary operators, namely ConditionalExpression +// and TSConditionalType +function formatTernaryOperator(path$$1, options, print, operatorOptions) { + const n = path$$1.getValue(); + const parts = []; + const operatorOpts = Object.assign( + { + beforeParts: () => [""], + afterParts: () => [""], + shouldCheckJsx: true, + operatorName: "ConditionalExpression", + consequentNode: "consequent", + alternateNode: "alternate", + testNode: "test", + breakNested: true + }, + operatorOptions || {} + ); + + // We print a ConditionalExpression in either "JSX mode" or "normal mode". + // See tests/jsx/conditional-expression.js for more info. + let jsxMode = false; + const parent = path$$1.getParentNode(); + let forceNoIndent = parent.type === operatorOpts.operatorName; + + // Find the outermost non-ConditionalExpression parent, and the outermost + // ConditionalExpression parent. We'll use these to determine if we should + // print in JSX mode. + let currentParent; + let previousParent; + let i = 0; + do { + previousParent = currentParent || n; + currentParent = path$$1.getParentNode(i); + i++; + } while (currentParent && currentParent.type === operatorOpts.operatorName); + const firstNonConditionalParent = currentParent || parent; + const lastConditionalParent = previousParent; + + if ( + (operatorOpts.shouldCheckJsx && isJSXNode(n[operatorOpts.testNode])) || + isJSXNode(n[operatorOpts.consequentNode]) || + isJSXNode(n[operatorOpts.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. + const wrap = doc$$1 => + concat([ + ifBreak("(", ""), + indent(concat([softline, doc$$1])), + softline, + ifBreak(")", "") + ]); + + // The only things we don't wrap are: + // * Nested conditional expressions in alternates + // * null + const isNull = node => + node.type === "NullLiteral" || + (node.type === "Literal" && node.value === null); + + parts.push( + " ? ", + isNull(n[operatorOpts.consequentNode]) + ? path$$1.call(print, operatorOpts.consequentNode) + : wrap(path$$1.call(print, operatorOpts.consequentNode)), + " : ", + n[operatorOpts.alternateNode].type === operatorOpts.operatorName || + isNull(n[operatorOpts.alternateNode]) + ? path$$1.call(print, operatorOpts.alternateNode) + : wrap(path$$1.call(print, operatorOpts.alternateNode)) + ); + } else { + // normal mode + const part = concat([ + line, + "? ", + n[operatorOpts.consequentNode].type === operatorOpts.operatorName + ? ifBreak("", "(") + : "", + align(2, path$$1.call(print, operatorOpts.consequentNode)), + n[operatorOpts.consequentNode].type === operatorOpts.operatorName + ? ifBreak("", ")") + : "", + line, + ": ", + align(2, path$$1.call(print, operatorOpts.alternateNode)) + ]); + parts.push( + parent.type === operatorOpts.operatorName + ? options.useTabs + ? dedent(indent(part)) + : align(Math.max(0, options.tabWidth - 2), part) + : 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. + const maybeGroup = doc$$1 => + operatorOpts.breakNested + ? parent === firstNonConditionalParent + ? group(doc$$1) + : doc$$1 + : group(doc$$1); // Always group in normal mode. + + // Break the closing paren to keep the chain right after it: + // (a + // ? b + // : c + // ).call() + const breakClosingParen = + !jsxMode && parent.type === "MemberExpression" && !parent.computed; + + return maybeGroup( + concat( + [].concat( + operatorOpts.beforeParts(), + forceNoIndent ? concat(parts) : indent(concat(parts)), + operatorOpts.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) { + const n = path$$1.getValue(); + const semi = options.semi ? ";" : ""; + + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + let parts = []; + switch (n.type) { + case "File": + return path$$1.call(print, "program"); + case "Program": + // Babel 6 + if (n.directives) { + path$$1.each(childPath => { + parts.push(print(childPath), semi, hardline); + if ( + utilShared.isNextLineEmpty( + options.originalText, + childPath.getValue(), + options + ) + ) { + parts.push(hardline); + } + }, "directives"); + } + + parts.push( + path$$1.call(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); + } + + return concat(parts); + // Babel extension. + case "EmptyStatement": + return ""; + case "ExpressionStatement": + // Detect Flow-parsed directives + if (n.directive) { + return concat([nodeStr(n.expression, options, true), semi]); + } + // Do not append semicolon after the only JSX element in a program + return concat([ + path$$1.call(print, "expression"), + isTheOnlyJSXElementInMarkdown(options, path$$1) ? "" : semi + ]); // Babel extension. + case "ParenthesizedExpression": + return concat(["(", path$$1.call(print, "expression"), ")"]); + case "AssignmentExpression": + return printAssignment( + n.left, + path$$1.call(print, "left"), + concat([" ", n.operator]), + n.right, + path$$1.call(print, "right"), + options + ); + case "BinaryExpression": + case "LogicalExpression": { + const parent = path$$1.getParentNode(); + const parentParent = path$$1.getParentNode(1); + const isInsideParenthesis = + n !== parent.body && + (parent.type === "IfStatement" || + parent.type === "WhileStatement" || + parent.type === "DoWhileStatement"); + + const 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(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.computed) + ) { + return group( + concat([indent(concat([softline, concat(parts)])), softline]) + ); + } + + // 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. + const shouldNotIndent = + parent.type === "ReturnStatement" || + (parent.type === "JSXExpressionContainer" && + parentParent.type === "JSXAttribute") || + (n === parent.body && parent.type === "ArrowFunctionExpression") || + (n !== parent.body && parent.type === "ForStatement") || + (parent.type === "ConditionalExpression" && + parentParent.type !== "ReturnStatement"); + + const shouldIndentIfInlining = + parent.type === "AssignmentExpression" || + parent.type === "VariableDeclarator" || + parent.type === "ClassProperty" || + parent.type === "TSAbstractClassProperty" || + parent.type === "ClassPrivateProperty" || + parent.type === "ObjectProperty" || + parent.type === "Property"; + + const samePrecedenceSubExpression = + isBinaryish(n.left) && + util$1.shouldFlatten(n.operator, n.left.operator); + + if ( + shouldNotIndent || + (shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression) || + (!shouldInlineLogicalExpression(n) && shouldIndentIfInlining) + ) { + return group(concat(parts)); + } + + const rest = concat(parts.slice(1)); + + return group( + concat([ + // 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(rest) + ]) + ); + } + case "AssignmentPattern": + return concat([ + path$$1.call(print, "left"), + " = ", + path$$1.call(print, "right") + ]); + case "TSTypeAssertionExpression": + return concat([ + "<", + path$$1.call(print, "typeAnnotation"), + ">", + path$$1.call(print, "expression") + ]); + case "MemberExpression": { + const parent = path$$1.getParentNode(); + let firstNonMemberParent; + let i = 0; + do { + firstNonMemberParent = path$$1.getParentNode(i); + i++; + } while ( + firstNonMemberParent && + (firstNonMemberParent.type === "MemberExpression" || + firstNonMemberParent.type === "TSNonNullExpression") + ); + + const shouldInline = + (firstNonMemberParent && + (firstNonMemberParent.type === "NewExpression" || + (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"); + + return concat([ + path$$1.call(print, "object"), + shouldInline + ? printMemberLookup(path$$1, options, print) + : group( + indent( + concat([softline, printMemberLookup(path$$1, options, print)]) + ) + ) + ]); + } + case "MetaProperty": + return concat([ + path$$1.call(print, "meta"), + ".", + path$$1.call(print, "property") + ]); + case "BindExpression": + if (n.object) { + parts.push(path$$1.call(print, "object")); + } + + parts.push(printBindExpressionCallee(path$$1, options, print)); + + return concat(parts); + case "Identifier": { + return concat([ + n.name, + printOptionalToken(path$$1), + printTypeAnnotation(path$$1, options, print) + ]); + } + case "SpreadElement": + case "SpreadElementPattern": + case "RestProperty": + case "ExperimentalRestProperty": + case "ExperimentalSpreadProperty": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + case "ObjectTypeSpreadProperty": + return concat([ + "...", + 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(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( + concat([ + printFunctionParams( + path$$1, + print, + options, + /* expandLast */ args && + (args.expandLastArg || args.expandFirstArg), + /* printTypeParams */ true + ), + printReturnType(path$$1, print, options) + ]) + ) + ); + } + + const dangling = comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ true, + comment => { + const nextCharacter = utilShared.getNextNonSpaceNonCommentCharacterIndex( + options.originalText, + comment, + options + ); + return options.originalText.substr(nextCharacter, 2) === "=>"; + } + ); + if (dangling) { + parts.push(" ", dangling); + } + + parts.push(" =>"); + + const body = path$$1.call(bodyPath => 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") + ) { + return group(concat([concat(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( + concat([ + concat(parts), + group( + concat([" (", indent(concat([softline, body])), softline, ")"]) + ) + ]) + ); + } + + // 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 {. + const shouldAddSoftLine = + ((args && args.expandLastArg) || + path$$1.getParentNode().type === "JSXExpressionContainer") && + !(n.comments && n.comments.length); + + const printTrailingComma = + args && args.expandLastArg && shouldPrintComma(options, "all"); + + // In order to avoid confusion between + // a => a ? a : a + // a <= a ? a : a + const shouldAddParens = + n.body.type === "ConditionalExpression" && + !util$1.startsWithNoLookaheadToken( + n.body, + /* forbidFunctionAndClass */ false + ); + + return group( + concat([ + concat(parts), + group( + concat([ + indent( + concat([ + line, + shouldAddParens ? ifBreak("", "(") : "", + body, + shouldAddParens ? ifBreak("", ")") : "" + ]) + ), + shouldAddSoftLine + ? concat([ifBreak(printTrailingComma ? "," : ""), softline]) + : "" + ]) + ) + ]) + ); + } + 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(parts); + case "YieldExpression": + parts.push("yield"); + + if (n.delegate) { + parts.push("*"); + } + if (n.argument) { + parts.push(" ", path$$1.call(print, "argument")); + } + + return concat(parts); + case "AwaitExpression": + return concat(["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(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(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(parts); + case "ImportDefaultSpecifier": + if (n.local) { + return path$$1.call(print, "local"); + } + + return path$$1.call(print, "id"); + case "TSExportAssignment": + return concat(["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(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 + " "); + } + + const standalones = []; + const grouped = []; + if (n.specifiers && n.specifiers.length > 0) { + path$$1.each(specifierPath => { + const 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(", ", standalones)); + } + + if (standalones.length > 0 && grouped.length > 0) { + parts.push(", "); + } + + if ( + grouped.length === 1 && + standalones.length === 0 && + n.specifiers && + !n.specifiers.some(node => node.comments) + ) { + parts.push( + concat([ + "{", + options.bracketSpacing ? " " : "", + concat(grouped), + options.bracketSpacing ? " " : "", + "}" + ]) + ); + } else if (grouped.length >= 1) { + parts.push( + group( + concat([ + "{", + indent( + concat([ + options.bracketSpacing ? line : softline, + join(concat([",", line]), grouped) + ]) + ), + ifBreak(shouldPrintComma(options) ? "," : ""), + options.bracketSpacing ? line : softline, + "}" + ]) + ) + ); + } + + 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(parts); + } + + case "Import": + return "import"; + case "BlockStatement": { + const naked = path$$1.call(bodyPath => { + return printStatementSequence(bodyPath, options, print); + }, "body"); + + const hasContent = n.body.find(node => node.type !== "EmptyStatement"); + const hasDirectives = n.directives && n.directives.length > 0; + + const parent = path$$1.getParentNode(); + const parentParent = path$$1.getParentNode(1); + if ( + !hasContent && + !hasDirectives && + !hasDanglingComments(n) && + (parent.type === "ArrowFunctionExpression" || + parent.type === "FunctionExpression" || + parent.type === "FunctionDeclaration" || + parent.type === "ObjectMethod" || + parent.type === "ClassMethod" || + parent.type === "ForStatement" || + parent.type === "WhileStatement" || + parent.type === "DoWhileStatement" || + (parent.type === "CatchClause" && !parentParent.finalizer)) + ) { + return "{}"; + } + + parts.push("{"); + + // Babel 6 + if (hasDirectives) { + path$$1.each(childPath => { + parts.push(indent(concat([hardline, print(childPath), semi]))); + if ( + utilShared.isNextLineEmpty( + options.originalText, + childPath.getValue(), + options + ) + ) { + parts.push(hardline); + } + }, "directives"); + } + + if (hasContent) { + parts.push(indent(concat([hardline, naked]))); + } + + parts.push(comments.printDanglingComments(path$$1, options)); + parts.push(hardline, "}"); + + return concat(parts); + } + case "ReturnStatement": + parts.push("return"); + + if (n.argument) { + if (returnArgumentHasLeadingComment(options, n.argument)) { + parts.push( + concat([ + " (", + indent(concat([hardline, path$$1.call(print, "argument")])), + hardline, + ")" + ]) + ); + } else if ( + n.argument.type === "LogicalExpression" || + n.argument.type === "BinaryExpression" || + n.argument.type === "SequenceExpression" + ) { + parts.push( + group( + concat([ + ifBreak(" (", " "), + indent(concat([softline, path$$1.call(print, "argument")])), + softline, + ifBreak(")") + ]) + ) + ); + } 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(parts); + case "NewExpression": + case "CallExpression": { + const isNew = n.type === "NewExpression"; + + const 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([ + isNew ? "new " : "", + path$$1.call(print, "callee"), + optional, + path$$1.call(print, "typeParameters"), + concat(["(", join(", ", path$$1.map(print, "arguments")), ")"]) + ]); + } + + // 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([ + isNew ? "new " : "", + path$$1.call(print, "callee"), + optional, + 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( + indent( + concat([ + softline, + "extends ", + indent(join(concat([",", line]), path$$1.map(print, "heritage"))), + " " + ]) + ) + ) + ); + } + + parts.push(path$$1.call(print, "body")); + + return concat(parts); + case "ObjectExpression": + case "ObjectPattern": + case "ObjectTypeAnnotation": + case "TSInterfaceBody": + case "TSTypeLiteral": { + const isTypeAnnotation = n.type === "ObjectTypeAnnotation"; + const parent = path$$1.getParentNode(0); + const shouldBreak = + n.type === "TSInterfaceBody" || + (n.type === "ObjectPattern" && + parent.type !== "FunctionDeclaration" && + parent.type !== "FunctionExpression" && + parent.type !== "ArrowFunctionExpression" && + parent.type !== "AssignmentPattern" && + n.properties.some( + property => + property.value && + (property.value.type === "ObjectPattern" || + property.value.type === "ArrayPattern") + )) || + (n.type !== "ObjectPattern" && + util$1.hasNewlineInRange( + options.originalText, + options.locStart(n), + options.locEnd(n) + )); + const isFlowInterfaceLikeBody = + isTypeAnnotation && + parent && + (parent.type === "InterfaceDeclaration" || + parent.type === "DeclareInterface" || + parent.type === "DeclareClass") && + path$$1.getName() === "body"; + const separator = isFlowInterfaceLikeBody + ? ";" + : n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" + ? ifBreak(semi, ";") + : ","; + const fields = []; + const leftBrace = n.exact ? "{|" : "{"; + const rightBrace = n.exact ? "|}" : "}"; + + let propertiesField; + + if (n.type === "TSTypeLiteral") { + propertiesField = "members"; + } else if (n.type === "TSInterfaceBody") { + propertiesField = "body"; + } else { + propertiesField = "properties"; + } + + if (isTypeAnnotation) { + fields.push("indexers", "callProperties"); + } + fields.push(propertiesField); + + // Unfortunately, things are grouped together in the ast can be + // interleaved in the source code. So we need to reorder them before + // printing them. + const propsAndLoc = []; + fields.forEach(field => { + path$$1.each(childPath => { + const node = childPath.getValue(); + propsAndLoc.push({ + node: node, + printed: print(childPath), + loc: options.locStart(node) + }); + }, field); + }); + + let separatorParts = []; + const props = propsAndLoc.sort((a, b) => a.loc - b.loc).map(prop => { + const result = concat(separatorParts.concat(group(prop.printed))); + separatorParts = [separator, line]; + if ( + prop.node.type === "TSPropertySignature" && + util$1.hasNodeIgnoreComment(prop.node) + ) { + separatorParts.shift(); + } + if ( + utilShared.isNextLineEmpty(options.originalText, prop.node, options) + ) { + separatorParts.push(hardline); + } + return result; + }); + + const lastElem = util$1.getLast(n[propertiesField]); + + const canHaveTrailingSeparator = !( + lastElem && + (lastElem.type === "RestProperty" || + lastElem.type === "RestElement" || + lastElem.type === "ExperimentalRestProperty" || + util$1.hasNodeIgnoreComment(lastElem)) + ); + + let content; + if (props.length === 0 && !n.typeAnnotation) { + if (!hasDanglingComments(n)) { + return concat([leftBrace, rightBrace]); + } + + content = group( + concat([ + leftBrace, + comments.printDanglingComments(path$$1, options), + softline, + rightBrace, + printOptionalToken(path$$1) + ]) + ); + } else { + content = concat([ + leftBrace, + indent( + concat([options.bracketSpacing ? line : softline, concat(props)]) + ), + ifBreak( + canHaveTrailingSeparator && + (separator !== "," || shouldPrintComma(options)) + ? separator + : "" + ), + concat([options.bracketSpacing ? line : softline, 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 + const parentParentParent = path$$1.getParentNode(2); + if ( + (n.type === "ObjectPattern" && + parent && + shouldHugArguments(parent) && + parent.params[0] === n) || + (shouldHugType(n) && + parentParentParent && + shouldHugArguments(parentParentParent) && + parentParentParent.params[0].typeAnnotation && + parentParentParent.params[0].typeAnnotation.typeAnnotation === n) + ) { + return content; + } + + return group(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 { + let printedLeft; + if (n.computed) { + printedLeft = concat(["[", 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(parts); // Babel 6 + case "ClassMethod": + if (n.static) { + parts.push("static "); + } + + parts = parts.concat(printObjectMethod(path$$1, options, print)); + + return concat(parts); // Babel 6 + case "ObjectMethod": + return printObjectMethod(path$$1, options, print); + case "Decorator": + return concat(["@", path$$1.call(print, "expression")]); + case "ArrayExpression": + case "ArrayPattern": + if (n.elements.length === 0) { + if (!hasDanglingComments(n)) { + parts.push("[]"); + } else { + parts.push( + group( + concat([ + "[", + comments.printDanglingComments(path$$1, options), + softline, + "]" + ]) + ) + ); + } + } else { + const lastElem = util$1.getLast(n.elements); + const 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 privateUtil.getLast returns null if the array is empty, but + // we already check for an empty array just above so we are safe + const needsForcedTrailingComma = + canHaveTrailingComma && lastElem === null; + + parts.push( + group( + concat([ + "[", + indent( + concat([ + softline, + printArrayItems(path$$1, options, "elements", print) + ]) + ), + needsForcedTrailingComma ? "," : "", + ifBreak( + canHaveTrailingComma && + !needsForcedTrailingComma && + shouldPrintComma(options) + ? "," + : "" + ), + comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ true + ), + softline, + "]" + ]) + ) + ); + } + + parts.push( + printOptionalToken(path$$1), + printTypeAnnotation(path$$1, options, print) + ); + + return concat(parts); + case "SequenceExpression": { + const parent = path$$1.getParentNode(0); + if ( + parent.type === "ExpressionStatement" || + parent.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. + const parts = []; + path$$1.each(p => { + if (p.getName() === 0) { + parts.push(print(p)); + } else { + parts.push(",", indent(concat([line, print(p)]))); + } + }, "expressions"); + return group(concat(parts)); + } + return group( + concat([join(concat([",", line]), 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 util$1.printNumber(n.extra.raw); + 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 util$1.printNumber(n.raw); + } + if (typeof n.value !== "string") { + return "" + n.value; + } + // TypeScript workaround for eslint/typescript-eslint-parser#267 + // See corresponding workaround in needs-parens.js + const grandParent = path$$1.getParentNode(1); + const 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(parts); + case "UpdateExpression": + parts.push(path$$1.call(print, "argument"), n.operator); + + if (n.prefix) { + parts.reverse(); + } + + return concat(parts); + case "ConditionalExpression": + return formatTernaryOperator(path$$1, options, print, { + beforeParts: () => [path$$1.call(print, "test")], + afterParts: breakClosingParen => [breakClosingParen ? softline : ""] + }); + case "VariableDeclaration": { + const printed = path$$1.map(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. + const parentNode = path$$1.getParentNode(); + + const isParentForLoop = + parentNode.type === "ForStatement" || + parentNode.type === "ForInStatement" || + parentNode.type === "ForOfStatement" || + parentNode.type === "ForAwaitStatement"; + + const hasValue = n.declarations.some(decl => decl.init); + + let firstVariable; + if (printed.length === 1) { + firstVariable = printed[0]; + } else if (printed.length > 1) { + // Indent first var to comply with eslint one-var rule + firstVariable = indent(printed[0]); + } + + parts = [ + isNodeStartingWithDeclare(n, options) ? "declare " : "", + n.kind, + firstVariable ? concat([" ", firstVariable]) : "", + indent( + concat( + printed + .slice(1) + .map(p => + concat([",", hasValue && !isParentForLoop ? hardline : line, p]) + ) + ) + ) + ]; + + if (!(isParentForLoop && parentNode.body !== n)) { + parts.push(semi); + } + + return group(concat(parts)); + } + case "VariableDeclarator": + return printAssignment( + n.id, + concat([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]), + " =", + n.init, + n.init && path$$1.call(print, "init"), + options + ); + case "WithStatement": + return group( + concat([ + "with (", + path$$1.call(print, "object"), + ")", + adjustClause(n.body, path$$1.call(print, "body")) + ]) + ); + case "IfStatement": { + const con = adjustClause(n.consequent, path$$1.call(print, "consequent")); + const opening = group( + concat([ + "if (", + group( + concat([ + indent(concat([softline, path$$1.call(print, "test")])), + softline + ]) + ), + ")", + con + ]) + ); + + parts.push(opening); + + if (n.alternate) { + const commentOnOwnLine = + (hasTrailingComment(n.consequent) && + n.consequent.comments.some( + comment => + comment.trailing && !util$1.isBlockComment(comment) + )) || + needsHardlineAfterDanglingComment(n); + const elseOnSameLine = + n.consequent.type === "BlockStatement" && !commentOnOwnLine; + parts.push(elseOnSameLine ? " " : hardline); + + if (hasDanglingComments(n)) { + parts.push( + comments.printDanglingComments(path$$1, options, true), + commentOnOwnLine ? hardline : " " + ); + } + + parts.push( + "else", + group( + adjustClause( + n.alternate, + path$$1.call(print, "alternate"), + n.alternate.type === "IfStatement" + ) + ) + ); + } + + return concat(parts); + } + case "ForStatement": { + const 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. + const dangling = comments.printDanglingComments( + path$$1, + options, + /* sameLine */ true + ); + const printedComments = dangling ? concat([dangling, softline]) : ""; + + if (!n.init && !n.test && !n.update) { + return concat([printedComments, group(concat(["for (;;)", body]))]); + } + + return concat([ + printedComments, + group( + concat([ + "for (", + group( + concat([ + indent( + concat([ + softline, + path$$1.call(print, "init"), + ";", + line, + path$$1.call(print, "test"), + ";", + line, + path$$1.call(print, "update") + ]) + ), + softline + ]) + ), + ")", + body + ]) + ) + ]); + } + case "WhileStatement": + return group( + concat([ + "while (", + group( + concat([ + indent(concat([softline, path$$1.call(print, "test")])), + softline + ]) + ), + ")", + adjustClause(n.body, path$$1.call(print, "body")) + ]) + ); + case "ForInStatement": + // Note: esprima can't actually parse "for each (". + return group( + concat([ + 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 + const isAwait = n.type === "ForAwaitStatement" || n.await; + + return group( + concat([ + "for", + isAwait ? " await" : "", + " (", + path$$1.call(print, "left"), + " of ", + path$$1.call(print, "right"), + ")", + adjustClause(n.body, path$$1.call(print, "body")) + ]) + ); + } + + case "DoWhileStatement": { + const clause = adjustClause(n.body, path$$1.call(print, "body")); + const doBody = group(concat(["do", clause])); + parts = [doBody]; + + if (n.body.type === "BlockStatement") { + parts.push(" "); + } else { + parts.push(hardline); + } + parts.push("while ("); + + parts.push( + group( + concat([ + indent(concat([softline, path$$1.call(print, "test")])), + softline + ]) + ), + ")", + semi + ); + + return concat(parts); + } + case "DoExpression": + return concat(["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(parts); + case "ContinueStatement": + parts.push("continue"); + + if (n.label) { + parts.push(" ", path$$1.call(print, "label")); + } + + parts.push(semi); + + return concat(parts); + case "LabeledStatement": + if (n.body.type === "EmptyStatement") { + return concat([path$$1.call(print, "label"), ":;"]); + } + + return concat([ + path$$1.call(print, "label"), + ": ", + path$$1.call(print, "body") + ]); + case "TryStatement": + return concat([ + "try ", + path$$1.call(print, "block"), + n.handler ? concat([" ", path$$1.call(print, "handler")]) : "", + n.finalizer ? concat([" finally ", path$$1.call(print, "finalizer")]) : "" + ]); + case "CatchClause": + return concat([ + "catch ", + n.param ? concat(["(", path$$1.call(print, "param"), ") "]) : "", + path$$1.call(print, "body") + ]); + case "ThrowStatement": + return concat(["throw ", path$$1.call(print, "argument"), semi]); + // Note: ignoring n.lexical because it has no printing consequences. + case "SwitchStatement": + return concat([ + group( + concat([ + "switch (", + indent(concat([softline, path$$1.call(print, "discriminant")])), + softline, + ")" + ]) + ), + " {", + n.cases.length > 0 + ? indent( + concat([ + hardline, + join( + hardline, + path$$1.map(casePath => { + const caseNode = casePath.getValue(); + return concat([ + casePath.call(print), + n.cases.indexOf(caseNode) !== n.cases.length - 1 && + utilShared.isNextLineEmpty( + options.originalText, + caseNode, + options + ) + ? hardline + : "" + ]); + }, "cases") + ) + ]) + ) + : "", + hardline, + "}" + ]); + case "SwitchCase": { + if (n.test) { + parts.push("case ", path$$1.call(print, "test"), ":"); + } else { + parts.push("default:"); + } + + const consequent = n.consequent.filter( + node => node.type !== "EmptyStatement" + ); + + if (consequent.length > 0) { + const cons = path$$1.call(consequentPath => { + return printStatementSequence(consequentPath, options, print); + }, "consequent"); + + parts.push( + consequent.length === 1 && consequent[0].type === "BlockStatement" + ? concat([" ", cons]) + : indent(concat([hardline, cons])) + ); + } + + return concat(parts); + } + // JSX extensions below. + case "DebuggerStatement": + return concat(["debugger", semi]); + case "JSXAttribute": + parts.push(path$$1.call(print, "name")); + + if (n.value) { + let res; + if (isStringLiteral(n.value)) { + const value = rawText(n.value); + res = '"' + value.slice(1, -1).replace(/"/g, """) + '"'; + } else { + res = path$$1.call(print, "value"); + } + parts.push("=", res); + } + + return concat(parts); + case "JSXIdentifier": + // Can be removed when this is fixed: + // https://github.com/eslint/typescript-eslint-parser/issues/337 + if (!n.name) { + return "this"; + } + return "" + n.name; + case "JSXNamespacedName": + return join(":", [ + path$$1.call(print, "namespace"), + path$$1.call(print, "name") + ]); + case "JSXMemberExpression": + return join(".", [ + path$$1.call(print, "object"), + path$$1.call(print, "property") + ]); + case "TSQualifiedName": + return join(".", [path$$1.call(print, "left"), path$$1.call(print, "right")]); + case "JSXSpreadAttribute": + case "JSXSpreadChild": { + return concat([ + "{", + path$$1.call(p => { + const printed = concat(["...", print(p)]); + const n = p.getValue(); + if (!n.comments || !n.comments.length) { + return printed; + } + return concat([ + indent( + concat([ + softline, + comments.printComments(p, () => printed, options) + ]) + ), + softline + ]); + }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), + "}" + ]); + } + case "JSXExpressionContainer": { + const parent = path$$1.getParentNode(0); + + const preventInline = + parent.type === "JSXAttribute" && + n.expression.comments && + n.expression.comments.length > 0; + + const shouldInline = + !preventInline && + (n.expression.type === "ArrayExpression" || + n.expression.type === "ObjectExpression" || + n.expression.type === "ArrowFunctionExpression" || + n.expression.type === "CallExpression" || + n.expression.type === "FunctionExpression" || + n.expression.type === "JSXEmptyExpression" || + n.expression.type === "TemplateLiteral" || + n.expression.type === "TaggedTemplateExpression" || + n.expression.type === "DoExpression" || + (isJSXNode(parent) && + (n.expression.type === "ConditionalExpression" || + isBinaryish(n.expression)))); + + if (shouldInline) { + return group( + concat(["{", path$$1.call(print, "expression"), lineSuffixBoundary, "}"]) + ); + } + + return group( + concat([ + "{", + indent(concat([softline, path$$1.call(print, "expression")])), + softline, + lineSuffixBoundary, + "}" + ]) + ); + } + case "JSXFragment": + case "TSJsxFragment": + case "JSXElement": { + const elem = comments.printComments( + path$$1, + () => printJSXElement(path$$1, options, print), + options + ); + return maybeWrapJSXElementInParens(path$$1, elem); + } + case "JSXOpeningElement": { + const n = path$$1.getValue(); + + const 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(["<", path$$1.call(print, "name"), " />"]); + } + + // 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( + concat([ + "<", + path$$1.call(print, "name"), + " ", + concat(path$$1.map(print, "attributes")), + n.selfClosing ? " />" : ">" + ]) + ); + } + + const lastAttrHasTrailingComments = + n.attributes.length && + hasTrailingComment(util$1.getLast(n.attributes)); + + const bracketSameLine = + 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 + const shouldBreak = + n.attributes && + n.attributes.some( + attr => + attr.value && + isStringLiteral(attr.value) && + attr.value.value.includes("\n") + ); + + return group( + concat([ + "<", + path$$1.call(print, "name"), + concat([ + indent( + concat( + path$$1.map(attr => concat([line, print(attr)]), "attributes") + ) + ), + n.selfClosing ? line : bracketSameLine ? ">" : softline + ]), + n.selfClosing ? "/>" : bracketSameLine ? "" : ">" + ]), + { shouldBreak } + ); + } + case "JSXClosingElement": + return concat([""]); + case "JSXOpeningFragment": + case "JSXClosingFragment": + case "TSJsxOpeningFragment": + case "TSJsxClosingFragment": { + const hasComment = n.comments && n.comments.length; + const hasOwnLineComment = + hasComment && !n.comments.every(util$1.isBlockComment); + const isOpeningFragment = + n.type === "JSXOpeningFragment" || n.type === "TSJsxOpeningFragment"; + return concat([ + isOpeningFragment ? "<" : "" + ]); + } + case "JSXText": + /* istanbul ignore next */ + throw new Error("JSXTest should be handled by JSXElement"); + case "JSXEmptyExpression": { + const requiresHardline = + n.comments && !n.comments.every(util$1.isBlockComment); + + return concat([ + comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ !requiresHardline + ), + requiresHardline ? hardline : "" + ]); + } + case "ClassBody": + if (!n.comments && n.body.length === 0) { + return "{}"; + } + + return concat([ + "{", + n.body.length > 0 + ? indent( + concat([ + hardline, + path$$1.call(bodyPath => { + return printStatementSequence(bodyPath, options, print); + }, "body") + ]) + ) + : comments.printDanglingComments(path$$1, options), + hardline, + "}" + ]); + case "ClassProperty": + case "TSAbstractClassProperty": + case "ClassPrivateProperty": { + 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 "); + } + const 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(printTypeAnnotation(path$$1, options, print)); + if (n.value) { + parts.push( + " =", + printAssignmentRight( + n.value, + path$$1.call(print, "value"), + false, // canBreak + options + ) + ); + } + + parts.push(semi); + + return concat(parts); + } + case "ClassDeclaration": + case "ClassExpression": + case "TSAbstractClassDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + parts.push(concat(printClass(path$$1, options, print))); + return concat(parts); + case "TSInterfaceHeritage": + parts.push(path$$1.call(print, "id")); + + if (n.typeParameters) { + parts.push(path$$1.call(print, "typeParameters")); + } + + return concat(parts); + case "TemplateElement": + return join(literalline, n.value.raw.split(/\r?\n/g)); + case "TemplateLiteral": { + const expressions = path$$1.map(print, "expressions"); + + parts.push("`"); + + path$$1.each(childPath => { + const 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 `. + const tabWidth = options.tabWidth; + const indentSize = util$1.getIndentSize( + childPath.getValue().value.raw, + tabWidth + ); + + let printed = expressions[i]; + + if ( + (n.expressions[i].comments && n.expressions[i].comments.length) || + n.expressions[i].type === "MemberExpression" || + n.expressions[i].type === "ConditionalExpression" + ) { + printed = concat([indent(concat([softline, printed])), softline]); + } + + const aligned = addAlignmentToDoc(printed, indentSize, tabWidth); + + parts.push(group(concat(["${", aligned, lineSuffixBoundary, "}"]))); + } + }, "quasis"); + + parts.push("`"); + + return concat(parts); + } + // These types are unprintable because they serve as abstract + // supertypes for other (printable) types. + case "TaggedTemplateExpression": + return concat([path$$1.call(print, "tag"), 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": { + const typesField = n.type === "TSTupleType" ? "elementTypes" : "types"; + return group( + concat([ + "[", + indent( + concat([ + softline, + printArrayItems(path$$1, options, typesField, print) + ]) + ), + // TypeScript doesn't support trailing commas in tuple types + n.type === "TSTupleType" + ? "" + : ifBreak(shouldPrintComma(options) ? "," : ""), + comments.printDanglingComments(path$$1, options, /* sameIndent */ true), + softline, + "]" + ]) + ); + } + + case "ExistsTypeAnnotation": + return "*"; + case "EmptyTypeAnnotation": + return "empty"; + case "AnyTypeAnnotation": + return "any"; + case "MixedTypeAnnotation": + return "mixed"; + case "ArrayTypeAnnotation": + return concat([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([ + "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(["declare export * from ", path$$1.call(print, "source")]); + case "DeclareExportDeclaration": + return concat(["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(parts); + } + + case "FunctionTypeAnnotation": + case "TSFunctionType": { + // FunctionTypeAnnotation is ambiguous: + // declare function foo(a: B): void; OR + // var A: (a: B) => void; + const parent = path$$1.getParentNode(0); + const parentParent = path$$1.getParentNode(1); + const parentParentParent = path$$1.getParentNode(2); + let isArrowFunctionTypeAnnotation = + n.type === "TSFunctionType" || + !( + (parent.type === "ObjectTypeProperty" && + !getFlowVariance(parent) && + !parent.optional && + options.locStart(parent) === options.locStart(n)) || + parent.type === "ObjectTypeCallProperty" || + (parentParentParent && parentParentParent.type === "DeclareFunction") + ); + + let needsColon = + isArrowFunctionTypeAnnotation && + (parent.type === "TypeAnnotation" || + parent.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 :( + const needsParens = + needsColon && + isArrowFunctionTypeAnnotation && + (parent.type === "TypeAnnotation" || + parent.type === "TSTypeAnnotation") && + parentParent.type === "ArrowFunctionExpression"; + + if (isObjectTypePropertyAFunction(parent, 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(concat(parts)); + } + case "FunctionTypeParam": + return concat([ + path$$1.call(print, "name"), + printOptionalToken(path$$1), + n.name ? ": " : "", + path$$1.call(print, "typeAnnotation") + ]); + case "GenericTypeAnnotation": + return concat([ + path$$1.call(print, "id"), + path$$1.call(print, "typeParameters") + ]); + case "DeclareInterface": + case "InterfaceDeclaration": { + if ( + n.type === "DeclareInterface" || + isNodeStartingWithDeclare(n, options) + ) { + parts.push("declare "); + } + + parts.push( + "interface ", + path$$1.call(print, "id"), + path$$1.call(print, "typeParameters") + ); + + if (n["extends"].length > 0) { + parts.push( + group( + indent( + concat([line, "extends ", join(", ", path$$1.map(print, "extends"))]) + ) + ) + ); + } + + parts.push(" "); + parts.push(path$$1.call(print, "body")); + + return group(concat(parts)); + } + case "ClassImplements": + case "InterfaceExtends": + return concat([ + path$$1.call(print, "id"), + path$$1.call(print, "typeParameters") + ]); + case "TSIntersectionType": + case "IntersectionTypeAnnotation": { + const types = path$$1.map(print, "types"); + const result = []; + let wasIndented = false; + for (let i = 0; i < types.length; ++i) { + if (i === 0) { + result.push(types[i]); + } else if (isObjectType(n.types[i - 1]) && isObjectType(n.types[i])) { + // If both are objects, don't indent + result.push( + concat([" & ", wasIndented ? indent(types[i]) : types[i]]) + ); + } else if (!isObjectType(n.types[i - 1]) && !isObjectType(n.types[i])) { + // If no object is involved, go to the next line if it breaks + result.push(indent(concat([" &", line, types[i]]))); + } else { + // If you go from object to non-object or vis-versa, then inline it + if (i > 1) { + wasIndented = true; + } + result.push(" & ", i > 1 ? indent(types[i]) : types[i]); + } + } + return group(concat(result)); + } + case "TSUnionType": + case "UnionTypeAnnotation": { + // single-line variation + // A | B | C + + // multi-line variation + // | A + // | B + // | C + + const parent = path$$1.getParentNode(); + + // If there's a leading comment, the parent is doing the indentation + const shouldIndent = + parent.type !== "TypeParameterInstantiation" && + parent.type !== "TSTypeParameterInstantiation" && + parent.type !== "GenericTypeAnnotation" && + parent.type !== "TSTypeReference" && + !(parent.type === "FunctionTypeParam" && !parent.name) && + !( + (parent.type === "TypeAlias" || + parent.type === "VariableDeclarator") && + hasLeadingOwnLineComment(options.originalText, n, options) + ); + + // { + // a: string + // } | null | void + // should be inlined and not be printed in the multi-line variant + const shouldHug = shouldHugType(n); + + // We want to align the children but without its comment, so it looks like + // | child1 + // // comment + // | child2 + const printed = path$$1.map(typePath => { + let printedType = typePath.call(print); + if (!shouldHug) { + printedType = align(2, printedType); + } + return comments.printComments(typePath, () => printedType, options); + }, "types"); + + if (shouldHug) { + return join(" | ", printed); + } + + const code = concat([ + ifBreak(concat([shouldIndent ? line : "", "| "])), + join(concat([line, "| "]), printed) + ]); + + let hasParens; + + if (n.type === "TSUnionType") { + const greatGrandParent = path$$1.getParentNode(2); + const 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(concat([indent(code), softline])); + } + + return group(shouldIndent ? indent(code) : code); + } + case "NullableTypeAnnotation": + return concat(["?", 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(parts); + case "ObjectTypeIndexer": { + const variance = getFlowVariance(n); + return concat([ + variance || "", + "[", + path$$1.call(print, "id"), + n.id ? ": " : "", + path$$1.call(print, "key"), + "]: ", + path$$1.call(print, "value") + ]); + } + case "ObjectTypeProperty": { + const variance = getFlowVariance(n); + + return concat([ + n.static ? "static " : "", + isGetterOrSetter(n) ? n.kind + " " : "", + variance || "", + printPropertyKey(path$$1, options, print), + printOptionalToken(path$$1), + isFunctionNotation(n, options) ? "" : ": ", + path$$1.call(print, "value") + ]); + } + case "QualifiedTypeIdentifier": + return concat([ + 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 util$1.printNumber(n.extra.raw); + } + return util$1.printNumber(n.raw); + + case "StringTypeAnnotation": + return "string"; + case "DeclareTypeAlias": + case "TypeAlias": { + if ( + n.type === "DeclareTypeAlias" || + isNodeStartingWithDeclare(n, options) + ) { + parts.push("declare "); + } + + const canBreak = n.right.type === "StringLiteralTypeAnnotation"; + + const printed = printAssignmentRight( + n.right, + path$$1.call(print, "right"), + canBreak, + options + ); + + parts.push( + "type ", + path$$1.call(print, "id"), + path$$1.call(print, "typeParameters"), + " =", + printed, + semi + ); + + return group(concat(parts)); + } + case "TypeCastExpression": + return concat([ + "(", + path$$1.call(print, "expression"), + ": ", + path$$1.call(print, "typeAnnotation"), + ")" + ]); + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": + case "TSTypeParameterDeclaration": + case "TSTypeParameterInstantiation": + return printTypeParameters(path$$1, options, print, "params"); + + case "TSTypeParameter": + case "TypeParameter": { + const parent = path$$1.getParentNode(); + if (parent.type === "TSMappedType") { + parts.push(path$$1.call(print, "name")); + if (n.constraint) { + parts.push(" in ", path$$1.call(print, "constraint")); + } + return concat(parts); + } + + const variance = getFlowVariance(n); + + if (variance) { + parts.push(variance); + } + + 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(parts); + } + case "TypeofTypeAnnotation": + return concat(["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(["%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 "TSVoidKeyword": + return "void"; + case "TSAsExpression": + return concat([ + path$$1.call(print, "expression"), + " as ", + path$$1.call(print, "typeAnnotation") + ]); + case "TSArrayType": + return concat([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(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(parts); + case "TSTypeReference": + return concat([ + path$$1.call(print, "typeName"), + printTypeParameters(path$$1, options, print, "typeParameters") + ]); + case "TSTypeQuery": + return concat(["typeof ", path$$1.call(print, "exprName")]); + case "TSParenthesizedType": { + return path$$1.call(print, "typeAnnotation"); + } + case "TSIndexSignature": { + const parent = path$$1.getParentNode(); + + return concat([ + n.export ? "export " : "", + n.accessibility ? concat([n.accessibility, " "]) : "", + n.static ? "static " : "", + n.readonly ? "readonly " : "", + "[", + path$$1.call(print, "index"), + "]: ", + path$$1.call(print, "typeAnnotation"), + parent.type === "ClassBody" ? semi : "" + ]); + } + case "TSTypePredicate": + return concat([ + path$$1.call(print, "parameterName"), + " is ", + path$$1.call(print, "typeAnnotation") + ]); + case "TSNonNullExpression": + return concat([path$$1.call(print, "expression"), "!"]); + case "TSThisType": + return "this"; + case "TSLastTypeNode": + return path$$1.call(print, "literal"); + case "TSIndexedAccessType": + return concat([ + 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( + printFunctionParams( + path$$1, + print, + options, + /* expandArg */ false, + /* printTypeParams */ true + ) + ) + ); + + if (n.typeAnnotation) { + const isType = n.type === "TSConstructorType"; + parts.push(isType ? " => " : ": ", path$$1.call(print, "typeAnnotation")); + } + return concat(parts); + } + case "TSTypeOperator": + return concat([n.operator, " ", path$$1.call(print, "typeAnnotation")]); + case "TSMappedType": + return group( + concat([ + "{", + indent( + concat([ + options.bracketSpacing ? line : softline, + n.readonlyToken + ? concat([ + 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 : softline, + "}" + ]) + ); + case "TSMethodSignature": + parts.push( + n.accessibility ? concat([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(concat(parts)); + case "TSNamespaceExportDeclaration": + parts.push("export as namespace ", path$$1.call(print, "name")); + + if (options.semi) { + parts.push(";"); + } + + return group(concat(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( + concat([ + "{", + comments.printDanglingComments(path$$1, options), + softline, + "}" + ]) + ) + ); + } else { + parts.push( + group( + concat([ + "{", + indent( + concat([ + hardline, + printArrayItems(path$$1, options, "members", print), + shouldPrintComma(options, "es5") ? "," : "" + ]) + ), + comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ true + ), + hardline, + "}" + ]) + ) + ); + } + + return concat(parts); + case "TSEnumMember": + parts.push(path$$1.call(print, "id")); + if (n.initializer) { + parts.push(" = ", path$$1.call(print, "initializer")); + } + return concat(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(concat(parts)); + case "TSExternalModuleReference": + return concat(["require(", path$$1.call(print, "expression"), ")"]); + case "TSModuleDeclaration": { + const parent = path$$1.getParentNode(); + const isExternalModule = isLiteral(n.id); + const parentIsDeclaration = parent.type === "TSModuleDeclaration"; + const 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)); + + // Global declaration looks like this: + // (declare)? global { ... } + const isGlobalDeclaration = + n.id.type === "Identifier" && + n.id.name === "global" && + !/namespace|module/.test( + options.originalText.slice( + options.locStart(n), + options.locStart(n.id) + ) + ); + + if (!isGlobalDeclaration) { + parts.push(isExternalModule ? "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( + concat([ + line, + path$$1.call( + bodyPath => + comments.printDanglingComments(bodyPath, options, true), + "body" + ), + group(path$$1.call(print, "body")) + ]) + ), + line, + "}" + ); + } else { + parts.push(semi); + } + + return concat(parts); + } + case "TSModuleBlock": + return path$$1.call(bodyPath => { + return printStatementSequence(bodyPath, options, print); + }, "body"); + + case "PrivateName": + return concat(["#", path$$1.call(print, "id")]); + + case "TSConditionalType": + return formatTernaryOperator(path$$1, options, print, { + beforeParts: () => [ + path$$1.call(print, "checkType"), + " ", + "extends", + " ", + path$$1.call(print, "extendsType") + ], + shouldCheckJsx: false, + operatorName: "TSConditionalType", + consequentNode: "trueType", + alternateNode: "falseType", + testNode: "checkType", + breakNested: false + }); + + case "TSInferType": + return concat(["infer", " ", path$$1.call(print, "typeParameter")]); + + default: + /* istanbul ignore next */ + throw new Error("unknown type: " + JSON.stringify(n.type)); + } +} + +function printStatementSequence(path$$1, options, print) { + const printed = []; + + const bodyNode = path$$1.getNode(); + const isClass = bodyNode.type === "ClassBody"; + + path$$1.map((stmtPath, i) => { + const 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; + } + + const stmtPrinted = print(stmtPath); + const text = options.originalText; + const 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(comment => 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") { + const nextChild = bodyNode.body[i + 1]; + if (classChildNeedsASIProtection(nextChild)) { + parts.push(";"); + } + } + } + + if ( + utilShared.isNextLineEmpty(text, stmt, options) && + !isLastStatement(stmtPath) + ) { + parts.push(hardline); + } + + printed.push(concat(parts)); + }); + + return join(hardline, printed); +} + +function printPropertyKey(path$$1, options, print) { + const node = path$$1.getNode(); + const key = node.key; + + if ( + isStringLiteral(key) && + isIdentifierName(key.value) && + !node.computed && + options.parser !== "json" + ) { + // 'a' -> a + return path$$1.call( + keyPath => comments.printComments(keyPath, () => key.value, options), + "key" + ); + } + return path$$1.call(print, "key"); +} + +function printMethod(path$$1, options, print) { + const node = path$$1.getNode(); + const semi = options.semi ? ";" : ""; + const kind = node.kind; + const 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, " "); + } + + let key = printPropertyKey(path$$1, options, print); + + if (node.computed) { + key = concat(["[", key, "]"]); + } + + parts.push( + key, + concat( + path$$1.call( + valuePath => [ + printFunctionTypeParameters(valuePath, options, print), + group( + concat([ + 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(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.body.type === "BlockStatement" || + arg.body.type === "ArrowFunctionExpression" || + arg.body.type === "ObjectExpression" || + arg.body.type === "ArrayExpression" || + arg.body.type === "CallExpression" || + isJSXNode(arg.body))) + ); +} + +function shouldGroupLastArg(args) { + const lastArg = util$1.getLast(args); + const penultimateArg = util$1.getPenultimate(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; + } + + const firstArg = args[0]; + const secondArg = args[1]; + return ( + (!firstArg.comments || !firstArg.comments.length) && + (firstArg.type === "FunctionExpression" || + (firstArg.type === "ArrowFunctionExpression" && + firstArg.body.type === "BlockStatement")) && + !couldGroupArg(secondArg) + ); +} + +function printArgumentsList(path$$1, options, print) { + const args = path$$1.getValue().arguments; + + if (args.length === 0) { + return concat([ + "(", + comments.printDanglingComments(path$$1, options, /* sameIndent */ true), + ")" + ]); + } + + let anyArgEmptyLine = false; + let hasEmptyLineFollowingFirstArg = false; + const lastArgIndex = args.length - 1; + const printedArguments = path$$1.map((argPath, index) => { + const arg = argPath.getNode(); + const parts = [print(argPath)]; + + if (index === lastArgIndex) { + // do nothing + } else if (utilShared.isNextLineEmpty(options.originalText, arg, options)) { + if (index === 0) { + hasEmptyLineFollowingFirstArg = true; + } + + anyArgEmptyLine = true; + parts.push(",", hardline, hardline); + } else { + parts.push(",", line); + } + + return concat(parts); + }, "arguments"); + + const shouldGroupFirst = shouldGroupFirstArg(args); + const shouldGroupLast = shouldGroupLastArg(args); + if (shouldGroupFirst || shouldGroupLast) { + const 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 + let printedExpanded; + let i = 0; + path$$1.each(argPath => { + if (shouldGroupFirst && i === 0) { + printedExpanded = [ + concat([ + argPath.call(p => print(p, { expandFirstArg: true })), + printedArguments.length > 1 ? "," : "", + hasEmptyLineFollowingFirstArg ? hardline : line, + hasEmptyLineFollowingFirstArg ? hardline : "" + ]) + ].concat(printedArguments.slice(1)); + } + if (shouldGroupLast && i === args.length - 1) { + printedExpanded = printedArguments + .slice(0, -1) + .concat(argPath.call(p => print(p, { expandLastArg: true }))); + } + i++; + }, "arguments"); + + const somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1); + + const maybeTrailingComma = shouldPrintComma(options, "all") ? "," : ""; + + return concat([ + somePrintedArgumentsWillBreak ? breakParent : "", + conditionalGroup( + [ + concat([ + ifBreak( + indent(concat(["(", softline, concat(printedExpanded)])), + concat(["(", concat(printedExpanded)]) + ), + somePrintedArgumentsWillBreak + ? concat([ifBreak(maybeTrailingComma), softline]) + : "", + ")" + ]), + shouldGroupFirst + ? concat([ + "(", + group(printedExpanded[0], { shouldBreak: true }), + concat(printedExpanded.slice(1)), + ")" + ]) + : concat([ + "(", + concat(printedArguments.slice(0, -1)), + group(util$1.getLast(printedExpanded), { + shouldBreak: true + }), + ")" + ]), + group( + concat([ + "(", + indent(concat([line, concat(printedArguments)])), + maybeTrailingComma, + line, + ")" + ]), + { shouldBreak: true } + ) + ], + { shouldBreak } + ) + ]); + } + + return group( + concat([ + "(", + indent(concat([softline, concat(printedArguments)])), + ifBreak(shouldPrintComma(options, "all") ? "," : ""), + softline, + ")" + ]), + { shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine } + ); +} + +function printTypeAnnotation(path$$1, options, print) { + const node = path$$1.getValue(); + if (!node.typeAnnotation) { + return ""; + } + + const parentNode = path$$1.getParentNode(); + const isDefinite = + node.definite || + (parentNode && + parentNode.type === "VariableDeclarator" && + parentNode.definite); + + const isFunctionDeclarationIdentifier = + parentNode.type === "DeclareFunction" && parentNode.id === node; + + if ( + isFlowAnnotationComment(options.originalText, node.typeAnnotation, options) + ) { + return concat([" /*: ", path$$1.call(print, "typeAnnotation"), " */"]); + } + + return concat([ + isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", + path$$1.call(print, "typeAnnotation") + ]); +} + +function printFunctionTypeParameters(path$$1, options, print) { + const fun = path$$1.getValue(); + if (fun.typeParameters) { + return path$$1.call(print, "typeParameters"); + } + return ""; +} + +function printFunctionParams(path$$1, print, options, expandArg, printTypeParams) { + const fun = path$$1.getValue(); + const paramsField = fun.parameters ? "parameters" : "params"; + + const typeParams = printTypeParams + ? printFunctionTypeParameters(path$$1, options, print) + : ""; + + let printed = []; + if (fun[paramsField]) { + printed = path$$1.map(print, paramsField); + } + + if (fun.rest) { + printed.push(concat(["...", path$$1.call(print, "rest")])); + } + + if (printed.length === 0) { + return concat([ + typeParams, + "(", + comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ true, + comment => + util$1.getNextNonSpaceNonCommentCharacter( + options.originalText, + comment, + options.locEnd + ) === ")" + ), + ")" + ]); + } + + const lastParam = util$1.getLast(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(n => n.comments)) + ) { + return group( + concat([ + docUtils$3.removeLines(typeParams), + "(", + join(", ", printed.map(docUtils$3.removeLines)), + ")" + ]) + ); + } + + // Single object destructuring should hug + // + // function({ + // a, + // b, + // c + // }) {} + if (shouldHugArguments(fun)) { + return concat([typeParams, "(", join(", ", printed), ")"]); + } + + const parent = path$$1.getParentNode(); + + // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})` + if (parent.type === "CallExpression" && isTestCall(parent)) { + return concat([typeParams, "(", join(", ", printed), ")"]); + } + + const flowTypeAnnotations = [ + "AnyTypeAnnotation", + "NullLiteralTypeAnnotation", + "GenericTypeAnnotation", + "ThisTypeAnnotation", + "NumberTypeAnnotation", + "VoidTypeAnnotation", + "EmptyTypeAnnotation", + "MixedTypeAnnotation", + "BooleanTypeAnnotation", + "BooleanLiteralTypeAnnotation", + "StringTypeAnnotation" + ]; + + const 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 && + flowTypeAnnotations.indexOf(fun[paramsField][0].typeAnnotation.type) !== + -1 && + !( + fun[paramsField][0].typeAnnotation.type === "GenericTypeAnnotation" && + fun[paramsField][0].typeAnnotation.typeParameters + ) && + !fun.rest; + + if (isFlowShorthandWithOneArg) { + if (options.arrowParens === "always") { + return concat(["(", concat(printed), ")"]); + } + return concat(printed); + } + + const canHaveTrailingComma = + !(lastParam && lastParam.type === "RestElement") && !fun.rest; + + return concat([ + typeParams, + "(", + indent(concat([softline, join(concat([",", line]), printed)])), + ifBreak( + canHaveTrailingComma && shouldPrintComma(options, "all") ? "," : "" + ), + softline, + ")" + ]); +} + +function shouldPrintParamsWithoutParens(path$$1, options) { + if (options.arrowParens === "always") { + return false; + } + + if (options.arrowParens === "avoid") { + const 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) { + const n = path$$1.getValue(); + const 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( + concat([ + printFunctionParams(path$$1, print, options), + printReturnType(path$$1, print, options) + ]) + ), + n.body ? " " : "", + path$$1.call(print, "body") + ); + + return concat(parts); +} + +function printObjectMethod(path$$1, options, print) { + const objMethod = path$$1.getValue(); + const 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); + } + + const key = printPropertyKey(path$$1, options, print); + + if (objMethod.computed) { + parts.push("[", key, "]"); + } else { + parts.push(key); + } + + parts.push( + printFunctionTypeParameters(path$$1, options, print), + group( + concat([ + printFunctionParams(path$$1, print, options), + printReturnType(path$$1, print, options) + ]) + ), + " ", + path$$1.call(print, "body") + ); + + return concat(parts); +} + +function printReturnType(path$$1, print, options) { + const n = path$$1.getValue(); + const returnType = path$$1.call(print, "returnType"); + + if ( + n.returnType && + isFlowAnnotationComment(options.originalText, n.returnType, options) + ) { + return concat([" /*: ", returnType, " */"]); + } + + const 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(parts); +} + +function printExportDeclaration(path$$1, options, print) { + const decl = path$$1.getValue(); + const semi = options.semi ? ";" : ""; + const parts = ["export "]; + + const 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); + } + + 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) { + const specifiers = []; + const defaultSpecifiers = []; + const namespaceSpecifiers = []; + path$$1.each(specifierPath => { + const 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(["* as ", print(specifierPath)])); + } + }, "specifiers"); + + const isNamespaceFollowed = + namespaceSpecifiers.length !== 0 && specifiers.length !== 0; + + const isDefaultFollowed = + defaultSpecifiers.length !== 0 && + (namespaceSpecifiers.length !== 0 || specifiers.length !== 0); + + parts.push( + decl.exportKind === "type" ? "type " : "", + concat(defaultSpecifiers), + concat([isDefaultFollowed ? ", " : ""]), + concat(namespaceSpecifiers), + concat([isNamespaceFollowed ? ", " : ""]), + specifiers.length !== 0 + ? group( + concat([ + "{", + indent( + concat([ + options.bracketSpacing ? line : softline, + join(concat([",", line]), specifiers) + ]) + ), + ifBreak(shouldPrintComma(options) ? "," : ""), + options.bracketSpacing ? line : softline, + "}" + ]) + ) + : "" + ); + } else { + parts.push("{}"); + } + + if (decl.source) { + parts.push(" from ", path$$1.call(print, "source")); + } + + parts.push(semi); + } + + return concat(parts); +} + +function printFlowDeclaration(path$$1, parts) { + const parentExportDecl = util$1.getParentExportDeclaration(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(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 + const 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) { + const n = path$$1.getValue(); + if (!n.modifiers || !n.modifiers.length) { + return ""; + } + return concat([join(" ", path$$1.map(print, "modifiers")), " "]); +} + +function printTypeParameters(path$$1, options, print, paramsKey) { + const 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); + } + + const grandparent = path$$1.getNode(2); + + const isParameterInTestCall = + grandparent != null && + grandparent.type === "CallExpression" && + isTestCall(grandparent); + + const 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(["<", join(", ", path$$1.map(print, paramsKey)), ">"]); + } + + return group( + concat([ + "<", + indent( + concat([ + softline, + join(concat([",", line]), path$$1.map(print, paramsKey)) + ]) + ), + ifBreak( + options.parser !== "typescript" && shouldPrintComma(options, "all") + ? "," + : "" + ), + softline, + ">" + ]) + ); +} + +function printClass(path$$1, options, print) { + const n = path$$1.getValue(); + const 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")); + + const partsGroup = []; + if (n.superClass) { + const printed = concat([ + "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([ + " ", + path$$1.call( + superClass => + comments.printComments(superClass, () => printed, options), + "superClass" + ) + ]) + ); + } else { + partsGroup.push( + group( + concat([ + line, + path$$1.call( + superClass => + comments.printComments(superClass, () => printed, options), + "superClass" + ) + ]) + ) + ); + } + } else if (n.extends && n.extends.length > 0) { + parts.push(" extends ", join(", ", path$$1.map(print, "extends"))); + } + + if (n["implements"] && n["implements"].length > 0) { + partsGroup.push( + line, + "implements", + group( + indent( + concat([ + line, + join(concat([",", line]), path$$1.map(print, "implements")) + ]) + ) + ) + ); + } + + if (n["mixins"] && n["mixins"].length > 0) { + partsGroup.push( + line, + "mixins ", + group(indent(join(concat([",", line]), path$$1.map(print, "mixins")))) + ); + } + + if (partsGroup.length > 0) { + parts.push(group(indent(concat(partsGroup)))); + } + + if ( + n.body && + n.body.comments && + hasLeadingOwnLineComment(options.originalText, n.body, options) + ) { + parts.push(hardline); + } else { + parts.push(" "); + } + parts.push(path$$1.call(print, "body")); + + return parts; +} + +function printOptionalToken(path$$1) { + const node = path$$1.getValue(); + if (!node.optional) { + return ""; + } + if ( + node.type === "CallExpression" || + (node.type === "MemberExpression" && node.computed) + ) { + return "?."; + } + return "?"; +} + +function printMemberLookup(path$$1, options, print) { + const property = path$$1.call(print, "property"); + const n = path$$1.getValue(); + const optional = printOptionalToken(path$$1); + + if (!n.computed) { + return concat([optional, ".", property]); + } + + if (!n.property || isNumericLiteral(n.property)) { + return concat([optional, "[", property, "]"]); + } + + return group( + concat([optional, "[", indent(concat([softline, property])), softline, "]"]) + ); +} + +function printBindExpressionCallee(path$$1, options, print) { + return concat(["::", 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] + const 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) { + const originalText = options.originalText; + const nextCharIndex = utilShared.getNextNonSpaceNonCommentCharacterIndex( + originalText, + node, + options + ); + const 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 utilShared.isNextLineEmptyAfterIndex( + originalText, + nextCharIndex + 1, + options + ); + } + + return utilShared.isNextLineEmpty(originalText, node, options); + } + + function rec(path$$1) { + const node = path$$1.getValue(); + if ( + node.type === "CallExpression" && + (isMemberish(node.callee) || node.callee.type === "CallExpression") + ) { + printedNodes.unshift({ + node: node, + printed: concat([ + comments.printComments( + path$$1, + () => + concat([ + printOptionalToken(path$$1), + printFunctionTypeParameters(path$$1, options, print), + printArgumentsList(path$$1, options, print) + ]), + options + ), + shouldInsertEmptyLineAfter(node) ? hardline : "" + ]) + }); + path$$1.call(callee => rec(callee), "callee"); + } else if (isMemberish(node)) { + printedNodes.unshift({ + node: node, + printed: comments.printComments( + path$$1, + () => + node.type === "MemberExpression" + ? printMemberLookup(path$$1, options, print) + : printBindExpressionCallee(path$$1, options, print), + options + ) + }); + path$$1.call(object => rec(object), "object"); + } else if (node.type === "TSNonNullExpression") { + printedNodes.unshift({ + node: node, + printed: comments.printComments(path$$1, () => "!", options) + }); + path$$1.call(expression => 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. + const node = path$$1.getValue(); + printedNodes.unshift({ + node, + printed: concat([ + printOptionalToken(path$$1), + printFunctionTypeParameters(path$$1, options, print), + printArgumentsList(path$$1, options, print) + ]) + }); + path$$1.call(callee => 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() + const groups = []; + let currentGroup = [printedNodes[0]]; + let i = 1; + for (; i < printedNodes.length; ++i) { + if ( + printedNodes[i].node.type === "TSNonNullExpression" || + printedNodes[i].node.type === "CallExpression" || + (printedNodes[i].node.type === "MemberExpression" && + printedNodes[i].node.computed && + isNumericLiteral(printedNodes[i].node.property)) + ) { + currentGroup.push(printedNodes[i]); + } else { + break; + } + } + if (printedNodes[0].node.type !== "CallExpression") { + 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 + let 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") { + hasSeenCallExpression = true; + } + currentGroup.push(printedNodes[i]); + + if ( + printedNodes[i].node.comments && + printedNodes[i].node.comments.some(comment => 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 just an identifier with the name starting with a capital + // letter, just a sequence of _$ or this. The rationale is that they are + // likely to be factories. + function isFactory(name) { + return name.match(/(^[A-Z])|^[_$]+$/); + } + const shouldMerge = + groups.length >= 2 && + !groups[1][0].node.comments && + ((groups[0].length === 1 && + (groups[0][0].node.type === "ThisExpression" || + (groups[0][0].node.type === "Identifier" && + (isFactory(groups[0][0].node.name) || + (groups[1].length && groups[1][0].node.computed))))) || + (groups[0].length > 1 && + groups[0][groups[0].length - 1].node.type === "MemberExpression" && + groups[0][groups[0].length - 1].node.property.type === "Identifier" && + (isFactory(groups[0][groups[0].length - 1].node.property.name) || + (groups[1].length && groups[1][0].node.computed)))); + + function printGroup(printedGroup) { + return concat(printedGroup.map(tuple => tuple.printed)); + } + + function printIndentedGroup(groups) { + if (groups.length === 0) { + return ""; + } + return indent( + group(concat([hardline, join(hardline, groups.map(printGroup))])) + ); + } + + const printedGroups = groups.map(printGroup); + const oneLine = concat(printedGroups); + + const cutoff = shouldMerge ? 3 : 2; + const flatGroups = groups + .slice(0, cutoff) + .reduce((res, group) => res.concat(group), []); + + const hasComment = + flatGroups.slice(1, -1).some(node => hasLeadingComment(node.node)) || + flatGroups.slice(0, -1).some(node => 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(oneLine); + } + + // Find out the last node in the first group and check if it has an + // empty line after + const lastNodeBeforeIndent = util$1.getLast( + shouldMerge ? groups.slice(1, 2)[0] : groups[0] + ).node; + const shouldHaveEmptyLineBeforeIndent = + lastNodeBeforeIndent.type !== "CallExpression" && + shouldInsertEmptyLineAfter(lastNodeBeforeIndent); + + const expanded = concat([ + printGroup(groups[0]), + shouldMerge ? concat(groups.slice(1, 2).map(printGroup)) : "", + shouldHaveEmptyLineBeforeIndent ? hardline : "", + printIndentedGroup(groups.slice(shouldMerge ? 2 : 1)) + ]); + + const callExpressionCount = printedNodes.filter( + tuple => tuple.node.type === "CallExpression" + ).length; + + // 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 || + callExpressionCount >= 3 || + printedGroups.slice(0, -1).some(willBreak$1) + ) { + return group(expanded); + } + + return concat([ + // 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 : "", + conditionalGroup([oneLine, expanded]) + ]); +} + +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. + const child = node.children[0]; + return isLiteral(child) && !isMeaningfulJSXText(child); +} + +// Only space, newline, carriage return, and tab are treated as whitespace +// inside JSX. +const jsxWhitespaceChars = " \n\r\t"; +const containsNonJsxWhitespaceRegex = new RegExp( + "[^" + jsxWhitespaceChars + "]" +); +const 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. + const 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 + ); +} + +// 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) { + const n = path$$1.getValue(); + const children = []; + + // using `map` instead of `each` because it provides `i` + path$$1.map((childPath, i) => { + const child = childPath.getValue(); + if (isLiteral(child)) { + const text = rawText(child); + + // Contains a non-whitespace character + if (isMeaningfulJSXText(child)) { + const words = text.split(matchJsxWhitespaceRegex); + + // Starts with whitespace + if (words[0] === "") { + children.push(""); + words.shift(); + if (/\n/.test(words[0])) { + children.push(hardline); + } else { + children.push(jsxWhitespace); + } + words.shift(); + } + + let endWhitespace; + // Ends with whitespace + if (util$1.getLast(words) === "") { + words.pop(); + endWhitespace = words.pop(); + } + + // This was whitespace only without a new line. + if (words.length === 0) { + return; + } + + words.forEach((word, i) => { + if (i % 2 === 1) { + children.push(line); + } else { + children.push(word); + } + }); + + if (endWhitespace !== undefined) { + if (/\n/.test(endWhitespace)) { + children.push(hardline); + } else { + children.push(jsxWhitespace); + } + } else { + // Ideally this would be a `hardline` to allow a break between + // tags and text. + // Unfortunately Facebook have a custom translation pipeline + // (https://github.com/prettier/prettier/issues/1581#issuecomment-300975032) + // that uses the JSX syntax, but does not follow the React whitespace + // rules. + // Ensuring that we never have a break between tags and text in JSX + // will allow Facebook to adopt Prettier without too much of an + // adverse effect on formatting algorithm. + children.push(""); + } + } 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); + } + } else { + children.push(""); + children.push(jsxWhitespace); + } + } else { + const printedChild = print(childPath); + children.push(printedChild); + + const next = n.children[i + 1]; + const directlyFollowedByMeaningfulText = + next && isMeaningfulJSXText(next) && !/^[ \n\r\t]/.test(rawText(next)); + if (directlyFollowedByMeaningfulText) { + // Potentially this could be a hardline as well. + // See the comment above about the Facebook translation pipeline as + // to why this is an empty string. + children.push(""); + } else { + children.push(hardline); + } + } + }, "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) { + const n = path$$1.getValue(); + + // Turn
into
+ if (n.type === "JSXElement" && isEmptyJSXElement(n)) { + n.openingElement.selfClosing = true; + return path$$1.call(print, "openingElement"); + } + + const openingLines = + n.type === "JSXElement" + ? path$$1.call(print, "openingElement") + : path$$1.call(print, "openingFragment"); + const 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([ + openingLines, + concat(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(child => { + if (isJSXWhitespaceExpression(child)) { + return { + type: "JSXText", + value: " ", + raw: " " + }; + } + return child; + }); + + const containsTag = n.children.filter(isJSXNode).length > 0; + const containsMultipleExpressions = + n.children.filter(child => child.type === "JSXExpressionContainer").length > + 1; + const containsMultipleAttributes = + n.type === "JSXElement" && n.openingElement.attributes.length > 1; + + // Record any breaks. Should never go from true to false, only false to true. + let forcedBreak = + willBreak$1(openingLines) || + containsTag || + containsMultipleAttributes || + containsMultipleExpressions; + + const rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}'; + const jsxWhitespace = ifBreak(concat([rawJsxWhitespace, softline]), " "); + + const children = printJSXChildren(path$$1, options, print, jsxWhitespace); + + const containsText = + n.children.filter(child => 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 (let i = children.length - 2; i >= 0; i--) { + const isPairOfEmptyStrings = children[i] === "" && children[i + 1] === ""; + const isPairOfHardlines = + children[i] === hardline && + children[i + 1] === "" && + children[i + 2] === hardline; + const isLineFollowedByJSXWhitespace = + (children[i] === softline || children[i] === hardline) && + children[i + 1] === "" && + children[i + 2] === jsxWhitespace; + const isJSXWhitespaceFollowedByLine = + children[i] === jsxWhitespace && + children[i + 1] === "" && + (children[i + 2] === softline || children[i + 2] === hardline); + const isDoubleJSXWhitespace = + children[i] === jsxWhitespace && + children[i + 1] === "" && + children[i + 2] === jsxWhitespace; + + if ( + (isPairOfHardlines && containsText) || + isPairOfEmptyStrings || + isLineFollowedByJSXWhitespace || + isDoubleJSXWhitespace + ) { + children.splice(i, 2); + } else if (isJSXWhitespaceFollowedByLine) { + children.splice(i + 1, 2); + } + } + + // Trim trailing lines (or empty strings) + while ( + children.length && + (isLineNext$1(util$1.getLast(children)) || + isEmpty$1(util$1.getLast(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. + const multilineChildren = []; + children.forEach((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([rawJsxWhitespace, hardline])); + return; + } else if (i === children.length - 1) { + // Trailing whitespace + multilineChildren.push(rawJsxWhitespace); + return; + } else if (children[i - 1] === "" && children[i - 2] === hardline) { + // 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. + const content = containsText + ? fill(multilineChildren) + : group(concat(multilineChildren), { shouldBreak: true }); + + const multiLineElem = group( + concat([ + openingLines, + indent(concat([hardline, content])), + hardline, + closingLines + ]) + ); + + if (forcedBreak) { + return multiLineElem; + } + + return conditionalGroup([ + group(concat([openingLines, concat(children), closingLines])), + multiLineElem + ]); +} + +function maybeWrapJSXElementInParens(path$$1, elem) { + const parent = path$$1.getParentNode(); + if (!parent) { + return elem; + } + + const NO_WRAP_PARENTS = { + ArrayExpression: true, + JSXAttribute: true, + JSXElement: true, + JSXExpressionContainer: true, + JSXFragment: true, + TSJsxFragment: true, + ExpressionStatement: true, + CallExpression: true, + ConditionalExpression: true + }; + if (NO_WRAP_PARENTS[parent.type]) { + return elem; + } + + return group( + concat([ + ifBreak("("), + indent(concat([softline, elem])), + softline, + ifBreak(")") + ]) + ); +} + +function isBinaryish(node) { + return node.type === "BinaryExpression" || node.type === "LogicalExpression"; +} + +function isMemberish(node) { + return ( + node.type === "MemberExpression" || + (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 +) { + let parts = []; + const 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 (util$1.shouldFlatten(node.operator, node.left.operator)) { + // Flatten them out by recursively calling this function. + parts = parts.concat( + path$$1.call( + left => + printBinaryishExpressions( + left, + print, + options, + /* isNested */ true, + isInsideParenthesis + ), + "left" + ) + ); + } else { + parts.push(path$$1.call(print, "left")); + } + + const shouldInline = shouldInlineLogicalExpression(node); + const lineBeforeOperator = node.operator === "|>"; + + const right = shouldInline + ? concat([node.operator, " ", path$$1.call(print, "right")]) + : concat([ + lineBeforeOperator ? softline : "", + node.operator, + lineBeforeOperator ? " " : line, + path$$1.call(print, "right") + ]); + + // 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. + const parent = path$$1.getParentNode(); + const shouldGroup = + !(isInsideParenthesis && node.type === "LogicalExpression") && + parent.type !== node.type && + node.left.type !== node.type && + node.right.type !== node.type; + + parts.push(" ", shouldGroup ? group(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, () => concat(parts), options); + } + } else { + // Our stopping case. Simply print the node normally. + parts.push(path$$1.call(print)); + } + + return parts; +} + +function printAssignmentRight(rightNode, printedRight, canBreak, options) { + if (hasLeadingOwnLineComment(options.originalText, rightNode, options)) { + return indent(concat([hardline, printedRight])); + } + + if (canBreak) { + return indent(concat([line, printedRight])); + } + + return concat([" ", printedRight]); +} + +function printAssignment( + leftNode, + printedLeft, + operator, + rightNode, + printedRight, + options +) { + if (!rightNode) { + return printedLeft; + } + + const canBreak = + (isBinaryish(rightNode) && !shouldInlineLogicalExpression(rightNode)) || + (rightNode.type === "ConditionalExpression" && + isBinaryish(rightNode.test) && + !shouldInlineLogicalExpression(rightNode.test)) || + ((leftNode.type === "Identifier" || + isStringLiteral(leftNode) || + leftNode.type === "MemberExpression") && + (isStringLiteral(rightNode) || isMemberExpressionChain(rightNode))); + + const printed = printAssignmentRight( + rightNode, + printedRight, + canBreak, + options + ); + + return group(concat([printedLeft, operator, printed])); +} + +function adjustClause(node, clause, forceSpace) { + if (node.type === "EmptyStatement") { + return ";"; + } + + if (node.type === "BlockStatement" || forceSpace) { + return concat([" ", clause]); + } + + return indent(concat([line, clause])); +} + +function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) { + const raw = rawText(node); + const isDirectiveLiteral = + isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral"; + return util$1.printString(raw, options, isDirectiveLiteral); +} + +function printRegex(node) { + const flags = node.flags + .split("") + .sort() + .join(""); + return `/${node.pattern}/${flags}`; +} + +function isLastStatement(path$$1) { + const parent = path$$1.getParentNode(); + if (!parent) { + return true; + } + const node = path$$1.getValue(); + const body = (parent.body || parent.consequent).filter( + stmt => stmt.type !== "EmptyStatement" + ); + return body && body[body.length - 1] === node; +} + +function hasLeadingComment(node) { + return node.comments && node.comments.some(comment => comment.leading); +} + +function hasTrailingComment(node) { + return node.comments && node.comments.some(comment => comment.trailing); +} + +function hasLeadingOwnLineComment(text, node, options) { + if (isJSXNode(node)) { + return util$1.hasNodeIgnoreComment(node); + } + + const res = + node.comments && + node.comments.some( + comment => + comment.leading && util$1.hasNewline(text, options.locEnd(comment)) + ); + return res; +} + +function hasNakedLeftSide(node) { + return ( + node.type === "AssignmentExpression" || + node.type === "BinaryExpression" || + node.type === "LogicalExpression" || + node.type === "ConditionalExpression" || + node.type === "CallExpression" || + node.type === "MemberExpression" || + node.type === "SequenceExpression" || + node.type === "TaggedTemplateExpression" || + (node.type === "BindExpression" && !node.object) || + (node.type === "UpdateExpression" && !node.prefix) + ); +} + +function isFlowAnnotationComment(text, typeAnnotation, options) { + const start = options.locStart(typeAnnotation); + const end = util$1.skipWhitespace(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.callee) { + return ["callee"]; + } + if (node.object) { + return ["object"]; + } + 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) { + const node = path$$1.getValue(); + + const 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.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, + [childPath => exprNeedsASIProtection(childPath, options)].concat( + getLeftSidePathName(path$$1, node) + ) + ); +} + +function stmtNeedsASIProtection(path$$1, options) { + const node = path$$1.getNode(); + + if (node.type !== "ExpressionStatement") { + return false; + } + + return path$$1.call( + childPath => exprNeedsASIProtection(childPath, options), + "expression" + ); +} + +function classPropMayCauseASIProblems(path$$1) { + const node = path$$1.getNode(); + + if (node.type !== "ClassProperty") { + return false; + } + + const 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.computed) { + const 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 + const isAsync = node.value ? node.value.async : node.async; + const isGenerator = node.value ? node.value.generator : node.generator; + if ( + isAsync || + node.static || + 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)) { + let leftMost = argument; + let newLeftMost; + while ((newLeftMost = getLeftSide(leftMost))) { + leftMost = newLeftMost; + + if (hasLeadingOwnLineComment(options.originalText, leftMost, options)) { + return true; + } + } + } + + return false; +} + +function isMemberExpressionChain(node) { + if (node.type !== "MemberExpression") { + 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.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 (isObjectType(node)) { + return true; + } + + if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") { + const voidCount = node.types.filter( + n => + n.type === "VoidTypeAnnotation" || + n.type === "TSVoidKeyword" || + n.type === "NullLiteralTypeAnnotation" || + n.type === "TSNullKeyword" + ).length; + + const objectCount = node.types.filter( + n => + 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(quasi => quasi.value.raw.includes("\n")); +} + +function isTemplateOnItsOwnLine(n, text, options) { + return ( + ((n.type === "TemplateLiteral" && templateLiteralHasNewLines(n)) || + (n.type === "TaggedTemplateExpression" && + templateLiteralHasNewLines(n.quasi))) && + !util$1.hasNewline(text, options.locStart(n), { backwards: true }) + ); +} + +function printArrayItems(path$$1, options, printPath, print) { + const printedElements = []; + let separatorParts = []; + + path$$1.each(childPath => { + printedElements.push(concat(separatorParts)); + printedElements.push(group(print(childPath))); + + separatorParts = [",", line]; + if ( + childPath.getValue() && + utilShared.isNextLineEmpty( + options.originalText, + childPath.getValue(), + options + ) + ) { + separatorParts.push(softline); + } + }, printPath); + + return concat(printedElements); +} + +function hasDanglingComments(node) { + return ( + node.comments && + node.comments.some(comment => !comment.leading && !comment.trailing) + ); +} + +function needsHardlineAfterDanglingComment(node) { + if (!node.comments) { + return false; + } + const lastDanglingComment = util$1.getLast( + node.comments.filter(comment => !comment.leading && !comment.trailing) + ); + return ( + lastDanglingComment && !util$1.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"; +} + +// eg; `describe("some string", (done) => {})` +function isTestCall(n, parent) { + const unitTestRe = /^(skip|(f|x)?(it|describe|test))$/; + + if (n.arguments.length === 1) { + if ( + n.callee.type === "Identifier" && + n.callee.name === "async" && + parent && + parent.type === "CallExpression" && + isTestCall(parent) + ) { + return isFunctionOrArrowExpression(n.arguments[0].type); + } + + if (isUnitTestSetUp(n)) { + return ( + isFunctionOrArrowExpression(n.arguments[0].type) || + isIdentiferAsync(n.arguments[0]) + ); + } + } else if (n.arguments.length === 2) { + if ( + ((n.callee.type === "Identifier" && unitTestRe.test(n.callee.name)) || + isSkipOrOnlyBlock(n)) && + (isTemplateLiteral(n.arguments[0]) || isStringLiteral(n.arguments[0])) + ) { + return ( + (isFunctionOrArrowExpression(n.arguments[1].type) && + n.arguments[1].params.length <= 1) || + isIdentiferAsync(n.arguments[1]) + ); + } + } + return false; +} + +function isSkipOrOnlyBlock(node) { + const unitTestRe = /^(skip|(f|x)?(it|describe|test))$/; + return ( + node.callee.type === "MemberExpression" && + 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"; +} + +function isIdentiferAsync(node) { + return ( + node.type === "CallExpression" && + node.callee.type === "Identifier" && + node.callee.name === "async" + ); +} + +function isFunctionOrArrowExpression(type) { + return type === "FunctionExpression" || type === "ArrowFunctionExpression"; +} + +function isUnitTestSetUp(n) { + const 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") { + return false; + } + + const node = path$$1.getNode(); + + if (!node.expression || !isJSXNode(node.expression)) { + return false; + } + + const parent = path$$1.getParentNode(); + + return parent.type === "Program" && parent.body.length == 1; +} + +function willPrintOwnComments(path$$1) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + + return ( + ((node && isJSXNode(node)) || + (parent && + (parent.type === "JSXSpreadAttribute" || + parent.type === "JSXSpreadChild" || + parent.type === "UnionTypeAnnotation" || + parent.type === "TSUnionType" || + ((parent.type === "ClassDeclaration" || + parent.type === "ClassExpression") && + parent.superClass === node)))) && + !util$1.hasIgnoreComment(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(commentPath, options) { + const comment = commentPath.getValue(); + + switch (comment.type) { + case "CommentBlock": + case "Block": { + if (isJsDocComment(comment)) { + return printJsDocComment(comment); + } + + const 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 isJsDocComment(comment) { + const lines = comment.value.split("\n"); + return ( + lines.length > 1 && + lines.slice(0, lines.length - 1).every(line => line.trim()[0] === "*") + ); +} + +function printJsDocComment(comment) { + const lines = comment.value.split("\n"); + + return concat([ + "/*", + join( + hardline, + lines.map( + (line, index) => + (index > 0 ? " " : "") + + (index < lines.length - 1 ? line.trim() : line.trimLeft()) + ) + ), + "*/" + ]); +} + +function rawText(node) { + return node.extra ? node.extra.raw : node.raw; +} + +var printerEstree = { + print: genericPrint, + embed: embed_1, + insertPragma, + massageAstNode: clean_1, + hasPrettierIgnore, + willPrintOwnComments, + canAttachComment, + printComment, + handleComments: { + ownLine: comments$2.handleOwnLineComment, + endOfLine: comments$2.handleEndOfLineComment, + remaining: comments$2.handleRemainingComment + } +}; + +const CATEGORY_JAVASCRIPT = "JavaScript"; + +// format based on https://github.com/prettier/prettier/blob/master/src/common/support.js +var options = { + 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: { + since: "0.0.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: true, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + 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: { + since: "0.0.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use single quotes instead of double quotes." + }, + 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" } + ] + } +}; + +const hasPragma = pragma.hasPragma; + + + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const locStart = function(node) { + // Handle nodes with decorators. They should start at the first decorator + if ( + node.declaration && + node.declaration.decorators && + node.declaration.decorators.length > 0 + ) { + return locStart(node.declaration.decorators[0]); + } + if (node.decorators && node.decorators.length > 0) { + return locStart(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; +}; + +const locEnd = function(node) { + const endNode = node.nodes && util$1.getLast(node.nodes); + if (endNode && node.source && !node.source.end) { + node = endNode; + } + + let loc; + if (node.range) { + loc = node.range[1]; + } else if (typeof node.end === "number") { + loc = node.end; + } + + if (node.__location) { + return node.__location.endOffset; + } + if (node.typeAnnotation) { + return Math.max(loc, locEnd(node.typeAnnotation)); + } + + if (node.loc && !loc) { + return node.loc.end; + } + + return loc; +}; + +const languages = [ + { + name: "JavaScript", + since: "0.0.0", + parsers: ["babylon", "flow"], + group: "JavaScript", + tmScope: "source.js", + aceMode: "javascript", + codemirrorMode: "javascript", + codemirrorMimeType: "text/javascript", + aliases: ["js", "node"], + extensions: [ + ".js", + "._js", + ".bones", + ".es", + ".es6", + ".frag", + ".gs", + ".jake", + ".jsb", + ".jscad", + ".jsfl", + ".jsm", + ".jss", + ".mjs", + ".njs", + ".pac", + ".sjs", + ".ssjs", + ".xsjs", + ".xsjslib" + ], + filenames: ["Jakefile"], + linguistLanguageId: 183, + vscodeLanguageIds: ["javascript"] + }, + { + name: "JSX", + since: "0.0.0", + parsers: ["babylon", "flow"], + group: "JavaScript", + extensions: [".jsx"], + tmScope: "source.js.jsx", + aceMode: "javascript", + codemirrorMode: "jsx", + codemirrorMimeType: "text/jsx", + liguistLanguageId: 178, + vscodeLanguageIds: ["javascriptreact"] + }, + { + name: "TypeScript", + since: "1.4.0", + parsers: ["typescript-eslint"], + group: "JavaScript", + aliases: ["ts"], + extensions: [".ts", ".tsx"], + tmScope: "source.ts", + aceMode: "typescript", + codemirrorMode: "javascript", + codemirrorMimeType: "application/typescript", + liguistLanguageId: 378, + vscodeLanguageIds: ["typescript", "typescriptreact"] + }, + { + name: "JSON", + since: "1.5.0", + parsers: ["json"], + group: "JavaScript", + tmScope: "source.json", + aceMode: "json", + codemirrorMode: "javascript", + codemirrorMimeType: "application/json", + extensions: [ + ".json", + ".json5", + ".geojson", + ".JSON-tmLanguage", + ".topojson" + ], + filenames: [ + ".arcconfig", + ".jshintrc", + ".babelrc", + ".eslintrc", + ".prettierrc", + "composer.lock", + "mcmod.info" + ], + linguistLanguageId: 174, + vscodeLanguageIds: ["json", "jsonc"] + } +]; + +const typescript = { + get parse() { + return require("./parser-typescript"); + }, + astFormat: "estree", + hasPragma, + locStart, + locEnd +}; + +const babylon = { + get parse() { + return require("./parser-babylon"); + }, + astFormat: "estree", + hasPragma, + locStart, + locEnd +}; + +const parsers = { + babylon, + json: Object.assign({}, babylon, { + hasPragma() { + return false; + } + }), + flow: { + get parse() { + return require("./parser-flow"); + }, + astFormat: "estree", + hasPragma, + locStart, + locEnd + }, + "typescript-eslint": typescript, + // TODO: Delete this in 2.0 + typescript +}; + +const printers = { + estree: printerEstree +}; + +var languageJs = { + languages, + options, + parsers, + printers, + locStart, + locEnd +}; + +var index$1 = [ + "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$1 +}); + +var htmlTagNames$1 = ( htmlTagNames && index$1 ) || htmlTagNames; + +function clean$2(ast, newObj) { + 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-root-invalid" || + 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 === "css-import" && newObj.importPath) { + newObj.importPath = cleanCSSStrings(newObj.importPath); + } + + 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, + (match, numStr, unit) => { + const num = Number(numStr); + return isNaN(num) ? match : num + unit.toLowerCase(); + } + ); + } + + if (ast.type === "media-url") { + newObj.value = newObj.value + .replace(/^url\(\s+/gi, "url(") + .replace(/\s+\)$/gi, ")"); + } + + if (ast.type === "selector-tag") { + const lowercasedValue = ast.value.toLowerCase(); + + if (htmlTagNames$1.indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + + if (["from", "to"].indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + } +} + +function cleanCSSStrings(value) { + return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1"); +} + +var clean_1$2 = clean$2; + +const docBuilders$6 = doc.builders; +const concat$5 = docBuilders$6.concat; +const join$4 = docBuilders$6.join; +const line$2 = docBuilders$6.line; +const hardline$4 = docBuilders$6.hardline; +const softline$3 = docBuilders$6.softline; +const group$2 = docBuilders$6.group; +const fill$3 = docBuilders$6.fill; +const indent$4 = docBuilders$6.indent; + +const removeLines$1 = doc.utils.removeLines; + +function genericPrint$1(path$$1, options, print) { + const node = path$$1.getValue(); + + /* istanbul ignore if */ + if (!node) { + return ""; + } + + if (typeof node === "string") { + return node; + } + + switch (node.type) { + case "css-comment-yaml": + return node.value; + case "css-root": { + const nodes = printNodeSequence(path$$1, options, print); + + if (nodes.parts.length) { + return concat$5([nodes, hardline$4]); + } + + return nodes; + } + case "css-comment": { + if (node.raws.content) { + return node.raws.content; + } + const text = options.originalText.slice( + options.locStart(node), + options.locEnd(node) + ); + const 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$5(["// ", rawText]); + } + return concat$5(["/* ", rawText, " */"]); + } + return text; + } + case "css-rule": { + return concat$5([ + path$$1.call(print, "selector"), + node.important ? " !important" : "", + node.nodes + ? concat$5([ + " {", + node.nodes.length > 0 + ? indent$4( + concat$5([hardline$4, printNodeSequence(path$$1, options, print)]) + ) + : "", + hardline$4, + "}", + isDetachedRulesetDeclaration(node) ? ";" : "" + ]) + : ";" + ]); + } + case "css-decl": { + // When the following less construct &:extend(.foo); is parsed with scss, + // it will put a space after `:` and break it. Ideally we should parse + // less files with less, but we can hardcode this to work with scss as + // well. + const isValueExtend = + node.value.type === "value-root" && + node.value.group.type === "value-value" && + node.value.group.group.type === "value-func" && + node.value.group.group.value === "extend"; + const isComposed = + node.value.type === "value-root" && + node.value.group.type === "value-value" && + node.prop === "composes"; + const ruleAncestorNode = getAncestorNode(path$$1, "css-rule"); + const isiCSS = + ruleAncestorNode && + ruleAncestorNode.raws.selector && + (ruleAncestorNode.raws.selector.startsWith(":import") || + ruleAncestorNode.raws.selector.startsWith(":export")); + + return concat$5([ + node.raws.before.replace(/[\s;]/g, ""), + isiCSS ? node.prop : maybeToLowerCase(node.prop), + node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), + isValueExtend ? "" : " ", + isComposed + ? removeLines$1(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$5([ + " {", + indent$4( + concat$5([softline$3, printNodeSequence(path$$1, options, print)]) + ), + softline$3, + "}" + ]) + : ";" + ]); + } + case "css-atrule": { + const hasParams = + node.params && + !(node.params.type === "media-query-list" && node.params.value === ""); + const isDetachedRulesetCall = hasParams && /^\(\s*\)$/.test(node.params); + const hasParensAround = + node.value && + node.value.group.group.type === "value-paren_group" && + node.value.group.group.open !== null && + node.value.group.group.close !== null; + + return concat$5([ + "@", + // 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. + isDetachedRulesetCall || node.name.endsWith(":") + ? node.name + : maybeToLowerCase(node.name), + hasParams + ? concat$5([ + isDetachedRulesetCall ? "" : " ", + path$$1.call(print, "params") + ]) + : "", + node.selector + ? indent$4(concat$5([" ", path$$1.call(print, "selector")])) + : "", + node.value + ? group$2( + concat$5([ + " ", + path$$1.call(print, "value"), + isControlDirectiveNode(node) + ? hasParensAround + ? " " + : line$2 + : "" + ]) + ) + : node.name === "else" + ? " " + : "", + node.nodes + ? concat$5([ + isControlDirectiveNode(node) ? "" : " ", + "{", + indent$4( + concat$5([ + node.nodes.length > 0 ? softline$3 : "", + printNodeSequence(path$$1, options, print) + ]) + ), + softline$3, + "}" + ]) + : ";" + ]); + } + case "css-import": { + return concat$5([ + "@", + maybeToLowerCase(node.name), + " ", + node.directives ? concat$5([node.directives, " "]) : "", + adjustStrings(node.importPath, options), + node.nodes.length > 0 + ? concat$5([ + " {", + indent$4( + concat$5([softline$3, printNodeSequence(path$$1, options, print)]) + ), + softline$3, + "}" + ]) + : ";" + ]); + } + // postcss-media-query-parser + case "media-query-list": { + const parts = []; + path$$1.each(childPath => { + const node = childPath.getValue(); + if (node.type === "media-query" && node.value === "") { + return; + } + parts.push(childPath.call(print)); + }, "nodes"); + + return group$2(indent$4(join$4(line$2, parts))); + } + case "media-query": { + return concat$5([ + join$4(" ", path$$1.map(print, "nodes")), + isLastNode(path$$1, node) ? "" : "," + ]); + } + case "media-type": { + const atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + if ( + atRuleAncestorNode && + atRuleAncestorNode.name.toLowerCase() === "charset" + ) { + return node.value; + } + return adjustNumbers(adjustStrings(node.value, options)); + } + case "media-feature-expression": { + if (!node.nodes) { + return node.value; + } + return concat$5(["(", concat$5(path$$1.map(print, "nodes")), ")"]); + } + case "media-feature": { + return maybeToLowerCase( + adjustStrings(node.value.replace(/ +/g, " "), options) + ); + } + case "media-colon": { + return concat$5([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 adjustStrings(node.value, options); + } + // postcss-selector-parser + case "selector-root-invalid": { + // This is likely a SCSS nested property: `background: { color: red; }`. + return adjustNumbers( + adjustStrings(maybeToLowerCase(node.value), options) + ); + } + case "selector-root": { + const atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + const insideAtRuleNode = + atRuleAncestorNode && + ["extend", "custom-selector", "nest"].indexOf( + atRuleAncestorNode.name + ) !== -1; + + return group$2( + concat$5([ + atRuleAncestorNode && atRuleAncestorNode.name === "custom-selector" + ? concat$5([atRuleAncestorNode.customSelector, line$2]) + : "", + join$4( + concat$5([",", insideAtRuleNode ? line$2 : hardline$4]), + path$$1.map(print, "nodes") + ) + ]) + ); + } + case "selector-comment": { + return node.value; + } + case "selector-string": { + return adjustStrings(node.value, options); + } + case "selector-tag": { + const parentNode = path$$1.getParentNode(); + const index = parentNode && parentNode.nodes.indexOf(node); + const prevNode = index && parentNode.nodes[index - 1]; + + return concat$5([ + node.namespace + ? concat$5([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$5(["#", node.value]); + } + case "selector-class": { + return concat$5([".", adjustNumbers(adjustStrings(node.value, options))]); + } + case "selector-attribute": { + return concat$5([ + "[", + node.namespace + ? concat$5([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 === ">>>" + ) { + const parentNode = path$$1.getParentNode(); + const leading = + parentNode.type === "selector-selector" && + parentNode.nodes[0] === node + ? "" + : line$2; + return concat$5([leading, node.value, isLastNode(path$$1, node) ? "" : " "]); + } + const leading = node.value.trim().startsWith("(") ? line$2 : ""; + const value = + adjustNumbers(adjustStrings(node.value.trim(), options)) || line$2; + return concat$5([leading, value]); + } + case "selector-universal": { + return concat$5([ + node.namespace + ? concat$5([node.namespace === true ? "" : node.namespace.trim(), "|"]) + : "", + adjustNumbers(node.value) + ]); + } + case "selector-selector": { + return group$2(indent$4(concat$5(path$$1.map(print, "nodes")))); + } + case "selector-pseudo": { + return concat$5([ + maybeToLowerCase(node.value), + node.nodes && node.nodes.length > 0 + ? concat$5(["(", join$4(", ", path$$1.map(print, "nodes")), ")"]) + : "" + ]); + } + case "selector-nesting": { + return node.value; + } + // postcss-values-parser + case "value-root": { + return path$$1.call(print, "group"); + } + case "value-comment": { + return concat$5([ + node.inline ? "//" : "/*", + node.value, + node.inline ? "" : "*/" + ]); + } + case "value-comma_group": { + const parentNode = path$$1.getParentNode(); + const declAncestorNode = getAncestorNode(path$$1, "css-decl"); + const declAncestorProp = + declAncestorNode && + declAncestorNode.prop && + declAncestorNode.prop.toLowerCase(); + const isGridValue = + declAncestorProp && + parentNode.type === "value-value" && + (declAncestorProp === "grid" || + declAncestorProp.startsWith("grid-template")); + const atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + const isControlDirective = + atRuleAncestorNode && isControlDirectiveNode(atRuleAncestorNode); + + const printed = path$$1.map(print, "groups"); + const parts = []; + const functionAncestorNode = getAncestorNode(path$$1, "value-func"); + const insideInFunction = + functionAncestorNode && functionAncestorNode.value; + const insideURLFunction = + insideInFunction && functionAncestorNode.value.toLowerCase() === "url"; + + let didBreak = false; + for (let i = 0; i < node.groups.length; ++i) { + parts.push(printed[i]); + + // Ignore value inside `url()` + if (insideURLFunction) { + continue; + } + + const iPrevNode = node.groups[i - 1]; + const iNode = node.groups[i]; + const iNextNode = node.groups[i + 1]; + const iNextNextNode = node.groups[i + 2]; + + // Ignore after latest node (i.e. before semicolon) + if (!iNextNode) { + continue; + } + + // Ignore colon + if (iNode.value === ":") { + 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; + } + + if ( + (iPrevNode && + iPrevNode.type === "value-comment" && + iPrevNode.inline) || + (iNextNode.type === "value-comment" && iNextNode.inline) + ) { + continue; + } + + const isHash = iNode.type === "value-word" && iNode.value === "#"; + const isLeftCurlyBrace = + iNode.type === "value-word" && iNode.value === "{"; + const isNextLeftCurlyBrace = + iNextNode.type === "value-word" && iNextNode.value === "{"; + const isRightCurlyBrace = + iNode.type === "value-word" && iNode.value === "}"; + const isNextRightCurlyBrace = + iNextNode.type === "value-word" && iNextNode.value === "}"; + + // Ignore interpolation in SCSS (i.e. ``#{variable}``) + if ( + isHash || + isLeftCurlyBrace || + isNextRightCurlyBrace || + (isNextLeftCurlyBrace && + iNextNode.raws && + iNextNode.raws.before === "") || + (isRightCurlyBrace && iNextNode.raws && iNextNode.raws.before === "") + ) { + continue; + } + + const isNextHash = + iNextNode.type === "value-word" && iNextNode.value === "#"; + + const isMathOperator = isMathOperatorNode(iNode); + const isNextMathOperator = isMathOperatorNode(iNextNode); + + const isMultiplication = + !isNextHash && isMathOperator && iNode.value === "*"; + const isNextMultiplication = + !isRightCurlyBrace && isNextMathOperator && iNextNode.value === "*"; + + const isDivision = !isNextHash && isMathOperator && iNode.value === "/"; + const isNextDivision = + !isRightCurlyBrace && isNextMathOperator && iNextNode.value === "/"; + + const isAddition = !isNextHash && isMathOperator && iNode.value === "+"; + const isNextAddition = + !isRightCurlyBrace && isNextMathOperator && iNextNode.value === "+"; + + const isPrevFunction = iPrevNode && iPrevNode.type === "value-func"; + const isFunction = iNode.type === "value-func"; + const isNextFunction = iNextNode.type === "value-func"; + const isNextNextFunction = + iNextNextNode && iNextNextNode.type === "value-func"; + + const isPrevWord = + iPrevNode && + ["value-word", "value-atword"].indexOf(iPrevNode.type) !== -1; + const isWord = + ["value-word", "value-atword"].indexOf(iNode.type) !== -1; + const isNextWord = + ["value-word", "value-atword"].indexOf(iNextNode.type) !== -1; + const isNextNextWord = + iNextNextNode && + ["value-word", "value-atword"].indexOf(iNextNextNode.type) !== -1; + + // Math operators + const insideCalcFunction = + insideInFunction && + functionAncestorNode.value.toLowerCase() === "calc"; + + const hasSpaceBeforeOperator = + isNextNextFunction || isNextNextWord || isFunction || isWord; + + const hasSpaceAfterOperator = + isNextFunction || isNextWord || isPrevFunction || isPrevWord; + + if ( + (isMathOperator || isNextMathOperator) && + // Multiplication + !isMultiplication && + !isNextMultiplication && + // Division + !(isNextDivision && (hasSpaceBeforeOperator || insideCalcFunction)) && + !(isDivision && (hasSpaceAfterOperator || insideCalcFunction)) && + // Addition + !(isNextAddition && hasSpaceBeforeOperator) && + !(isAddition && hasSpaceAfterOperator) + ) { + const isNextParenGroup = isParenGroupNode(iNextNode); + const isNextValueNumber = iNextNode.type === "value-number"; + + if ( + (iNextNode.raws && iNextNode.raws.before === "") || + (isMathOperator && + (isNextParenGroup || + isNextWord || + isNextValueNumber || + isMathOperatorNode(iNextNode)) && + (!iPrevNode || (iPrevNode && isMathOperatorNode(iPrevNode)))) + ) { + continue; + } + } + + const isEqualityOperator = + isControlDirective && isEqualityOperatorNode(iNode); + const isRelationalOperator = + isControlDirective && isRelationalOperatorNode(iNode); + const isNextEqualityOperator = + isControlDirective && isEqualityOperatorNode(iNextNode); + const isNextRelationalOperator = + isControlDirective && isRelationalOperatorNode(iNextNode); + const isNextIfElseKeyword = + isControlDirective && isIfElseKeywordNode(iNextNode); + const isEachKeyword = isControlDirective && isEachKeywordNode(iNode); + const isNextEachKeyword = + isControlDirective && isEachKeywordNode(iNextNode); + const isForKeyword = + atRuleAncestorNode && + atRuleAncestorNode.name === "for" && + isForKeywordNode(iNode); + const isNextForKeyword = + isControlDirective && isForKeywordNode(iNextNode); + const IsNextColon = iNextNode.value === ":"; + + if (isGridValue) { + if (iNode.source.start.line !== iNextNode.source.start.line) { + parts.push(hardline$4); + didBreak = true; + } else { + parts.push(" "); + } + } else if (iNode.type === "value-comment" && iNode.inline) { + parts.push(hardline$4); + } else if ( + isNextMathOperator || + isNextEqualityOperator || + isNextRelationalOperator || + isNextIfElseKeyword || + isForKeyword || + isEachKeyword + ) { + parts.push(" "); + } else if ( + !IsNextColon || + isEqualityOperator || + isRelationalOperator || + isNextForKeyword || + isNextEachKeyword + ) { + parts.push(line$2); + } + } + + if (didBreak) { + parts.unshift(hardline$4); + } + + if (isControlDirective) { + return group$2(indent$4(concat$5(parts))); + } + + return group$2(indent$4(fill$3(parts))); + } + case "value-paren_group": { + const parentNode = path$$1.getParentNode(); + const isURLCall = + parentNode && + parentNode.type === "value-func" && + parentNode.value === "url"; + + if ( + isURLCall && + (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$5([ + node.open ? path$$1.call(print, "open") : "", + join$4(",", path$$1.map(print, "groups")), + node.close ? path$$1.call(print, "close") : "" + ]); + } + + if (!node.open) { + const printed = path$$1.map(print, "groups"); + const res = []; + + for (let i = 0; i < printed.length; i++) { + if (i !== 0) { + res.push(concat$5([",", line$2])); + } + res.push(printed[i]); + } + return group$2(indent$4(fill$3(res))); + } + + const declNode = path$$1.getParentNode(2); + const isMap = + declNode && + declNode.type === "css-decl" && + declNode.prop.startsWith("$"); + + return group$2( + concat$5([ + node.open ? path$$1.call(print, "open") : "", + indent$4( + concat$5([ + softline$3, + join$4( + concat$5([",", isMap ? hardline$4 : line$2]), + path$$1.map(print, "groups") + ) + ]) + ), + softline$3, + node.close ? path$$1.call(print, "close") : "" + ]) + ); + } + case "value-value": { + return path$$1.call(print, "group"); + } + case "value-func": { + return concat$5([node.value, path$$1.call(print, "group")]); + } + case "value-paren": { + return node.value; + } + case "value-number": { + return concat$5([printNumber$1(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$5([node.value, insideURLFunctionNode(path$$1) ? "" : line$2]); + } + case "value-comma": { + return concat$5([node.value, " "]); + } + case "value-string": { + return util$1.printString( + node.raws.quote + node.value + node.raws.quote, + options + ); + } + case "value-atword": { + return concat$5(["@", node.value]); + } + case "value-unicode-range": { + return node.value; + } + default: + /* istanbul ignore next */ + throw new Error(`Unknown postcss type ${JSON.stringify(node.type)}`); + } +} + +function isLastNode(path$$1, node) { + const parentNode = path$$1.getParentNode(); + if (!parentNode) { + return false; + } + const nodes = parentNode.nodes; + return nodes && nodes.indexOf(node) === nodes.length - 1; +} + +function isDetachedRulesetDeclaration(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. + return ( + node.selector && + node.selector.type !== "selector-root-invalid" && + ((typeof node.selector === "string" && /^@.+:.*$/.test(node.selector)) || + (node.selector.value && /^@.+:.*$/.test(node.selector.value))) + ); +} + +function isKeyframeAtRuleKeywords(path$$1, value) { + const atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + return ( + atRuleAncestorNode && + atRuleAncestorNode.name && + atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && + ["from", "to"].indexOf(value.toLowerCase()) !== -1 + ); +} + +function isHTMLTag(value) { + return htmlTagNames$1.indexOf(value.toLowerCase()) !== -1; +} + +function insideURLFunctionNode(path$$1) { + const funcAncestorNode = getAncestorNode(path$$1, "value-func"); + return ( + funcAncestorNode && + funcAncestorNode.value && + funcAncestorNode.value === "url" + ); +} + +function isParenGroupNode(node) { + return node.type && node.type === "value-paren_group"; +} + +function isForKeywordNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["from", "through", "end"].indexOf(node.value) !== -1 + ); +} + +function isIfElseKeywordNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["and", "or", "not"].indexOf(node.value) !== -1 + ); +} + +function isEachKeywordNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["in"].indexOf(node.value) !== -1 + ); +} + +function isMathOperatorNode(node) { + return ( + node.type && + node.type === "value-operator" && + node.value && + ["+", "-", "/", "*", "%"].indexOf(node.value) !== -1 + ); +} + +function isEqualityOperatorNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["==", "!="].indexOf(node.value) !== -1 + ); +} + +function isRelationalOperatorNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["<", ">", "<=", ">="].indexOf(node.value) !== -1 + ); +} + +function isControlDirectiveNode(node) { + return ( + node.type && + node.type === "css-atrule" && + node.name && + (node.name === "if" || + node.name === "else" || + node.name === "for" || + node.name === "each" || + node.name === "while") + ); +} + +function getAncestorCounter(path$$1, typeOrTypes) { + const types = [].concat(typeOrTypes); + + let counter = -1; + let ancestorNode; + + while ((ancestorNode = path$$1.getParentNode(++counter))) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode(path$$1, typeOrTypes) { + const counter = getAncestorCounter(path$$1, typeOrTypes); + return counter === -1 ? null : path$$1.getParentNode(counter); +} + +function printNodeSequence(path$$1, options, print) { + const node = path$$1.getValue(); + const parts = []; + let i = 0; + path$$1.map(pathChild => { + const prevNode = node.nodes[i - 1]; + if ( + prevNode && + prevNode.type === "css-comment" && + prevNode.text.trim() === "prettier-ignore" + ) { + const 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" && + !util$1.hasNewline( + options.originalText, + options.locStart(node.nodes[i + 1]), + { backwards: true } + )) || + (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$4); + if ( + utilShared.isNextLineEmpty( + options.originalText, + pathChild.getValue(), + options + ) + ) { + parts.push(hardline$4); + } + } + } + i++; + }, "nodes"); + + return concat$5(parts); +} + +const STRING_REGEX = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g; +const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g; +const STANDARD_UNIT_REGEX = /[a-zA-Z]+/g; +const WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g; +const 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, match => + util$1.printString(match, options) + ); +} + +function quoteAttributeValue(value, options) { + const quote = options.singleQuote ? "'" : '"'; + return value.includes('"') || value.includes("'") + ? value + : quote + value + quote; +} + +function adjustNumbers(value) { + return value.replace( + ADJUST_NUMBERS_REGEX, + (match, quote, wordPart, number, unit) => + !wordPart && number + ? (wordPart || "") + printNumber$1(number) + maybeToLowerCase(unit || "") + : match + ); +} + +function printNumber$1(rawNumber) { + return ( + util$1 + .printNumber(rawNumber) + // Remove trailing `.0`. + .replace(/\.0(?=$|e)/, "") + ); +} + +function maybeToLowerCase(value) { + return value.includes("$") || + value.includes("@") || + value.includes("#") || + value.startsWith("%") || + value.startsWith("--") || + value.startsWith(":--") || + (value.includes("(") && value.includes(")")) + ? value + : value.toLowerCase(); +} + +function isWideKeywords(value) { + return ( + ["initial", "inherit", "unset", "revert"].indexOf( + value.replace().toLowerCase() + ) !== -1 + ); +} + +var printerPostcss = { + print: genericPrint$1, + hasPrettierIgnore: util$1.hasIgnoreComment, + massageAstNode: clean_1$2 +}; + +// format based on https://github.com/prettier/prettier/blob/master/src/common/support.js +var options$2 = { + singleQuote: options.singleQuote +}; + +const lineColumnToIndex$1 = util$1.lineColumnToIndex; +const getLast$1 = util$1.getLast; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$1 = [ + { + name: "CSS", + since: "1.4.0", + parsers: ["css"], + group: "CSS", + tmScope: "source.css", + aceMode: "css", + codemirrorMode: "css", + codemirrorMimeType: "text/css", + extensions: [".css", ".pcss", ".postcss"], + liguistLanguageId: 50, + vscodeLanguageIds: ["css", "postcss"] + }, + { + name: "Less", + since: "1.4.0", + parsers: ["less"], + group: "CSS", + extensions: [".less"], + tmScope: "source.css.less", + aceMode: "less", + codemirrorMode: "css", + codemirrorMimeType: "text/css", + liguistLanguageId: 198, + vscodeLanguageIds: ["less"] + }, + { + name: "SCSS", + since: "1.4.0", + parsers: ["scss"], + group: "CSS", + tmScope: "source.scss", + aceMode: "scss", + codemirrorMode: "css", + codemirrorMimeType: "text/x-scss", + extensions: [".scss"], + liguistLanguageId: 329, + vscodeLanguageIds: ["scss"] + } +]; + +const postcss = { + get parse() { + return require("./parser-postcss"); + }, + astFormat: "postcss", + locEnd: function(node) { + const endNode = node.nodes && getLast$1(node.nodes); + if (endNode && node.source && !node.source.end) { + node = endNode; + } + if (node.source) { + return lineColumnToIndex$1(node.source.end, node.source.input.css); + } + return null; + }, + locStart: function(node) { + if (node.source) { + return lineColumnToIndex$1(node.source.start, node.source.input.css) - 1; + } + return null; + } +}; + +// TODO: switch these to just `postcss` and use `language` instead. +const parsers$1 = { + css: postcss, + less: postcss, + scss: postcss +}; + +const printers$1 = { + postcss: printerPostcss +}; + +var languageCss = { + languages: languages$1, + options: options$2, + parsers: parsers$1, + printers: printers$1 +}; + +const concat$6 = docBuilders$2.concat; +const join$5 = docBuilders$2.join; +const softline$4 = docBuilders$2.softline; +const hardline$5 = docBuilders$2.hardline; +const line$3 = docBuilders$2.line; +const group$3 = docBuilders$2.group; +const indent$5 = docBuilders$2.indent; +const ifBreak$2 = docBuilders$2.ifBreak; + +// http://w3c.github.io/html/single-page.html#void-elements +const 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) { + const n = path$$1.getValue(); + + /* istanbul ignore if*/ + if (!n) { + return ""; + } + + switch (n.type) { + case "Program": { + return group$3( + join$5(softline$4, path$$1.map(print, "body").filter(text => text !== "")) + ); + } + case "ElementNode": { + const isVoid = voidTags.indexOf(n.tag) !== -1; + const closeTag = isVoid ? concat$6([" />", softline$4]) : ">"; + const hasChildren = n.children.length > 0; + const getParams = (path$$1, print) => + indent$5( + concat$6([ + n.attributes.length ? line$3 : "", + join$5(line$3, path$$1.map(print, "attributes")), + + n.modifiers.length ? line$3 : "", + join$5(line$3, path$$1.map(print, "modifiers")), + + n.comments.length ? line$3 : "", + join$5(line$3, 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$6([ + group$3( + concat$6([ + "<", + n.tag, + getParams(path$$1, print), + ifBreak$2(softline$4, ""), + closeTag + ]) + ), + group$3( + concat$6([ + indent$5(join$5(softline$4, [""].concat(path$$1.map(print, "children")))), + ifBreak$2(hasChildren ? hardline$5 : "", ""), + !isVoid ? concat$6([""]) : "" + ]) + ) + ]); + } + case "BlockStatement": { + const pp = path$$1.getParentNode(1); + const isElseIf = + pp && + pp.inverse && + pp.inverse.body[0] === n && + pp.inverse.body[0].path.parts[0] === "if"; + const hasElseIf = + n.inverse && + n.inverse.body[0] && + n.inverse.body[0].type === "BlockStatement" && + n.inverse.body[0].path.parts[0] === "if"; + const indentElse = hasElseIf ? a => a : indent$5; + if (n.inverse) { + return concat$6([ + isElseIf + ? concat$6(["{{else ", printPathParams(path$$1, print), "}}"]) + : printOpenBlock(path$$1, print), + indent$5(concat$6([hardline$5, path$$1.call(print, "program")])), + n.inverse && !hasElseIf ? concat$6([hardline$5, "{{else}}"]) : "", + n.inverse + ? indentElse(concat$6([hardline$5, path$$1.call(print, "inverse")])) + : "", + isElseIf ? "" : concat$6([hardline$5, printCloseBlock(path$$1, print)]) + ]); + } else if (isElseIf) { + return concat$6([ + concat$6(["{{else ", printPathParams(path$$1, print), "}}"]), + indent$5(concat$6([hardline$5, path$$1.call(print, "program")])) + ]); + } + /** + * I want this boolean to be: if params are going to cause a break, + * not that it has params. + */ + const hasParams = n.params.length > 0 || n.hash.pairs.length > 0; + const hasChildren = n.program.body.length > 0; + return concat$6([ + printOpenBlock(path$$1, print), + group$3( + concat$6([ + indent$5(concat$6([softline$4, path$$1.call(print, "program")])), + hasParams && hasChildren ? hardline$5 : "", + printCloseBlock(path$$1, print) + ]) + ) + ]); + } + case "ElementModifierStatement": + case "MustacheStatement": { + const pp = path$$1.getParentNode(1); + const isConcat = pp && pp.type === "ConcatStatement"; + return group$3( + concat$6([ + /*n.escaped ? "{{{" : */ "{{", + printPathParams(path$$1, print), + isConcat ? "" : softline$4, + /*.escaped ? "}}}" :*/ "}}" + ]) + ); + } + case "SubExpression": { + return group$3( + concat$6([ + "(", + printPath(path$$1, print), + indent$5(concat$6([line$3, group$3(join$5(line$3, getParams(path$$1, print)))])), + softline$4, + ")" + ]) + ); + } + case "AttrNode": { + const quote = n.value.type === "TextNode" ? '"' : ""; + return concat$6([n.name, "=", quote, path$$1.call(print, "value"), quote]); + } + case "ConcatStatement": { + return concat$6([ + '"', + group$3( + indent$5( + join$5( + softline$4, + path$$1 + .map(partPath => print(partPath), "parts") + .filter(a => a !== "") + ) + ) + ), + '"' + ]); + } + case "Hash": { + return concat$6([join$5(line$3, path$$1.map(print, "pairs"))]); + } + case "HashPair": { + return concat$6([n.key, "=", path$$1.call(print, "value")]); + } + case "TextNode": { + return n.chars.replace(/^\s+/, "").replace(/\s+$/, ""); + } + case "MustacheCommentStatement": { + const dashes = n.value.indexOf("}}") > -1 ? "--" : ""; + return concat$6(["{{!", dashes, n.value, dashes, "}}"]); + } + case "PathExpression": { + return n.original; + } + case "BooleanLiteral": { + return String(n.value); + } + case "CommentStatement": { + return concat$6([""]); + } + case "StringLiteral": { + return `"${n.value}"`; + } + 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)); + } +} + +function printPath(path$$1, print) { + return path$$1.call(print, "path"); +} + +function getParams(path$$1, print) { + const node = path$$1.getValue(); + let 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) { + let parts = []; + + parts.push(printPath(path$$1, print)); + parts = parts.concat(getParams(path$$1, print)); + + return indent$5(group$3(join$5(line$3, parts))); +} + +function printBlockParams(path$$1) { + const block = path$$1.getValue(); + if (!block.program || !block.program.blockParams.length) { + return ""; + } + return concat$6([" as |", block.program.blockParams.join(" "), "|"]); +} + +function printOpenBlock(path$$1, print) { + return group$3( + concat$6([ + "{{#", + printPathParams(path$$1, print), + printBlockParams(path$$1, print), + softline$4, + "}}" + ]) + ); +} + +function printCloseBlock(path$$1, print) { + return concat$6(["{{/", path$$1.call(print, "path"), "}}"]); +} + +function clean$4(ast, newObj) { + // (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$4 +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$2 = [ + { + type: "markup", + group: "HTML", + aliases: ["hbs", "htmlbars"], + extensions: [".handlebars", ".hbs"], + tm_scope: "text.html.handlebars", + ace_mode: "handlebars", + language_id: 155, + since: null // unreleased + } +]; + +const parsers$2 = { + glimmer: { + get parse() { + return require("./parser-glimmer"); + }, + astFormat: "glimmer", + locEnd: function(node) { + return node.loc && node.loc.end; + }, + locStart: function(node) { + return node.loc && node.loc.start; + } + } +}; + +const printers$2 = { + glimmer: printerGlimmer +}; + +var languageHandlebars = { + languages: languages$2, + parsers: parsers$2, + printers: printers$2 +}; + +const docBuilders$7 = doc.builders; +const concat$7 = docBuilders$7.concat; +const join$6 = docBuilders$7.join; +const hardline$6 = docBuilders$7.hardline; +const line$4 = docBuilders$7.line; +const softline$5 = docBuilders$7.softline; +const group$4 = docBuilders$7.group; +const indent$6 = docBuilders$7.indent; +const ifBreak$3 = docBuilders$7.ifBreak; + + + +function genericPrint$2(path$$1, options, print) { + const n = path$$1.getValue(); + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + switch (n.kind) { + case "Document": { + return concat$7([ + join$6(concat$7([hardline$6, hardline$6]), path$$1.map(print, "definitions")), + hardline$6 + ]); + } + case "OperationDefinition": { + const hasOperation = options.originalText[options.locStart(n)] !== "{"; + const hasName = !!n.name; + return concat$7([ + hasOperation ? n.operation : "", + hasOperation && hasName ? concat$7([" ", path$$1.call(print, "name")]) : "", + n.variableDefinitions && n.variableDefinitions.length + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), 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$7([ + "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$7([ + "{", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + selectionsPath => printSequence(selectionsPath, options, print), + "selections" + ) + ) + ]) + ), + hardline$6, + "}" + ]); + } + case "Field": { + return group$4( + concat$7([ + n.alias ? concat$7([path$$1.call(print, "alias"), ": "]) : "", + path$$1.call(print, "name"), + n.arguments.length > 0 + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.call( + argsPath => 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$7([ + '"""', + hardline$6, + join$6(hardline$6, n.value.replace(/"""/g, "\\$&").split("\n")), + hardline$6, + '"""' + ]); + } + return concat$7(['"', n.value.replace(/["\\]/g, "\\$&"), '"']); + } + case "IntValue": + case "FloatValue": + case "EnumValue": { + return n.value; + } + case "BooleanValue": { + return n.value ? "true" : "false"; + } + case "NullValue": { + return "null"; + } + case "Variable": { + return concat$7(["$", path$$1.call(print, "name")]); + } + case "ListValue": { + return group$4( + concat$7([ + "[", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.map(print, "values") + ) + ]) + ), + softline$5, + "]" + ]) + ); + } + case "ObjectValue": { + return group$4( + concat$7([ + "{", + options.bracketSpacing && n.fields.length > 0 ? " " : "", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.map(print, "fields") + ) + ]) + ), + softline$5, + ifBreak$3("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), + "}" + ]) + ); + } + case "ObjectField": + case "Argument": { + return concat$7([ + path$$1.call(print, "name"), + ": ", + path$$1.call(print, "value") + ]); + } + + case "Directive": { + return concat$7([ + "@", + path$$1.call(print, "name"), + n.arguments.length > 0 + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.call( + argsPath => printSequence(argsPath, options, print), + "arguments" + ) + ) + ]) + ), + softline$5, + ")" + ]) + ) + : "" + ]); + } + + case "NamedType": { + return path$$1.call(print, "name"); + } + + case "VariableDefinition": { + return concat$7([ + path$$1.call(print, "variable"), + ": ", + path$$1.call(print, "type"), + n.defaultValue ? concat$7([" = ", path$$1.call(print, "defaultValue")]) : "" + ]); + } + + case "TypeExtensionDefinition": { + return concat$7(["extend ", path$$1.call(print, "definition")]); + } + + case "ObjectTypeExtension": + case "ObjectTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "ObjectTypeExtension" ? "extend " : "", + "type ", + path$$1.call(print, "name"), + n.interfaces.length > 0 + ? concat$7([ + " implements ", + join$6( + 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$7([ + " {", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + fieldsPath => printSequence(fieldsPath, options, print), + "fields" + ) + ) + ]) + ), + hardline$6, + "}" + ]) + : "" + ]); + } + + case "FieldDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + path$$1.call(print, "name"), + n.arguments.length > 0 + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.call( + argsPath => printSequence(argsPath, options, print), + "arguments" + ) + ) + ]) + ), + softline$5, + ")" + ]) + ) + : "", + ": ", + path$$1.call(print, "type"), + printDirectives(path$$1, print, n) + ]); + } + + case "DirectiveDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + "directive ", + "@", + path$$1.call(print, "name"), + n.arguments.length > 0 + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.call( + argsPath => printSequence(argsPath, options, print), + "arguments" + ) + ) + ]) + ), + softline$5, + ")" + ]) + ) + : "", + concat$7([" on ", join$6(" | ", path$$1.map(print, "locations"))]) + ]); + } + + case "EnumTypeExtension": + case "EnumTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "EnumTypeExtension" ? "extend " : "", + "enum ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n), + + n.values.length > 0 + ? concat$7([ + " {", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + valuesPath => printSequence(valuesPath, options, print), + "values" + ) + ) + ]) + ), + hardline$6, + "}" + ]) + : "" + ]); + } + + case "EnumValueDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n) + ]); + } + + case "InputValueDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? (n.description.block ? hardline$6 : line$4) : "", + path$$1.call(print, "name"), + ": ", + path$$1.call(print, "type"), + n.defaultValue ? concat$7([" = ", path$$1.call(print, "defaultValue")]) : "", + printDirectives(path$$1, print, n) + ]); + } + + case "InputObjectTypeExtension": + case "InputObjectTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "InputObjectTypeExtension" ? "extend " : "", + "input ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n), + n.fields.length > 0 + ? concat$7([ + " {", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + fieldsPath => printSequence(fieldsPath, options, print), + "fields" + ) + ) + ]) + ), + hardline$6, + "}" + ]) + : "" + ]); + } + + case "SchemaDefinition": { + return concat$7([ + "schema", + printDirectives(path$$1, print, n), + " {", + n.operationTypes.length > 0 + ? indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + opsPath => printSequence(opsPath, options, print), + "operationTypes" + ) + ) + ]) + ) + : "", + hardline$6, + "}" + ]); + } + + case "OperationTypeDefinition": { + return concat$7([ + path$$1.call(print, "operation"), + ": ", + path$$1.call(print, "type") + ]); + } + + case "InterfaceTypeExtension": + case "InterfaceTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "InterfaceTypeExtension" ? "extend " : "", + "interface ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n), + + n.fields.length > 0 + ? concat$7([ + " {", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + fieldsPath => printSequence(fieldsPath, options, print), + "fields" + ) + ) + ]) + ), + hardline$6, + "}" + ]) + : "" + ]); + } + + case "FragmentSpread": { + return concat$7([ + "...", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n) + ]); + } + + case "InlineFragment": { + return concat$7([ + "...", + n.typeCondition + ? concat$7([" on ", path$$1.call(print, "typeCondition")]) + : "", + printDirectives(path$$1, print, n), + " ", + path$$1.call(print, "selectionSet") + ]); + } + + case "UnionTypeExtension": + case "UnionTypeDefinition": { + return group$4( + concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + group$4( + concat$7([ + n.kind === "UnionTypeExtension" ? "extend " : "", + "union ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n), + n.types.length > 0 + ? concat$7([ + " =", + ifBreak$3("", " "), + indent$6( + concat$7([ + ifBreak$3(concat$7([line$4, " "])), + join$6(concat$7([line$4, "| "]), path$$1.map(print, "types")) + ]) + ) + ]) + : "" + ]) + ) + ]) + ); + } + + case "ScalarTypeExtension": + case "ScalarTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "ScalarTypeExtension" ? "extend " : "", + "scalar ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n) + ]); + } + + case "NonNullType": { + return concat$7([path$$1.call(print, "type"), "!"]); + } + + case "ListType": { + return concat$7(["[", 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$7([ + " ", + group$4( + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", " "), softline$5]), + path$$1.map(print, "directives") + ) + ]) + ) + ) + ]); +} + +function printSequence(sequencePath, options, print) { + const count = sequencePath.getValue().length; + + return sequencePath.map((path$$1, i) => { + const printed = print(path$$1); + + if ( + utilShared.isNextLineEmpty( + options.originalText, + path$$1.getValue(), + options + ) && + i < count - 1 + ) { + return concat$7([printed, hardline$6]); + } + + return printed; + }); +} + +function canAttachComment$1(node) { + return node.kind && node.kind !== "Comment"; +} + +function printComment$2(commentPath) { + const comment = commentPath.getValue(); + + switch (comment.kind) { + case "Comment": + return "#" + comment.value.trimRight(); + default: + throw new Error("Not a comment: " + JSON.stringify(comment)); + } +} + +function determineInterfaceSeparator(originalSource) { + const start = originalSource.indexOf("implements"); + if (start === -1) { + throw new Error("Must implement interfaces: " + originalSource); + } + let end = originalSource.indexOf("{"); + if (end === -1) { + end = originalSource.length; + } + return originalSource.substr(start, end).includes("&") ? " & " : ", "; +} + +var printerGraphql = { + print: genericPrint$2, + hasPrettierIgnore: util$1.hasIgnoreComment, + printComment: printComment$2, + canAttachComment: canAttachComment$1 +}; + +// format based on https://github.com/prettier/prettier/blob/master/src/common/support.js +var options$5 = { + bracketSpacing: options.bracketSpacing +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$3 = [ + { + name: "GraphQL", + since: "1.5.0", + parsers: ["graphql"], + extensions: [".graphql", ".gql"], + tmScope: "source.graphql", + aceMode: "text", + liguistLanguageId: 139, + vscodeLanguageIds: ["graphql"] + } +]; + +const parsers$3 = { + graphql: { + get parse() { + return require("./parser-graphql"); + }, + astFormat: "graphql", + locStart: function(node) { + if (typeof node.start === "number") { + return node.start; + } + return node.loc && node.loc.start; + }, + locEnd: function(node) { + if (typeof node.end === "number") { + return node.end; + } + return node.loc && node.loc.end; + } + } +}; + +const printers$3 = { + graphql: printerGraphql +}; + +var languageGraphql = { + languages: languages$3, + options: options$5, + parsers: parsers$3, + printers: printers$3 +}; + +const docBuilders$9 = doc.builders; +const hardline$8 = docBuilders$9.hardline; +const literalline$3 = docBuilders$9.literalline; +const concat$9 = docBuilders$9.concat; +const markAsRoot$1 = docBuilders$9.markAsRoot; + +function embed$2(path$$1, print, textToDoc, options) { + const 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) + const lang = node.lang.split(/\s/, 1)[0]; + const parser = getParserName(lang); + if (parser) { + const styleUnit = options.__inJsTemplate ? "~" : "`"; + const style = styleUnit.repeat( + Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1) + ); + const doc$$2 = textToDoc(node.value, { parser }); + return markAsRoot$1( + concat$9([ + style, + node.lang, + hardline$8, + replaceNewlinesWithLiterallines(doc$$2), + style + ]) + ); + } + } + + return null; + + function getParserName(lang) { + const supportInfo = support.getSupportInfo(null, { + plugins: options.plugins, + pluginsLoaded: true + }); + const language = supportInfo.languages.find( + language => + language.name.toLowerCase() === lang || + (language.extensions && + language.extensions.find(ext => ext.substring(1) === lang)) + ); + if (language) { + return language.parsers[0]; + } + + return null; + } + + function replaceNewlinesWithLiterallines(doc$$2) { + return docUtils.mapDoc( + doc$$2, + currentDoc => + typeof currentDoc === "string" && currentDoc.includes("\n") + ? concat$9( + currentDoc + .split(/(\n)/g) + .map((v, i) => (i % 2 === 0 ? v : literalline$3)) + ) + : currentDoc + ); + } +} + +var embed_1$2 = embed$2; + +var pragma$2 = createCommonjsModule(function (module) { +"use strict"; + +const pragmas = ["format", "prettier"]; + +function startWithPragma(text) { + const pragma = `@(${pragmas.join("|")})`; + const regex = new RegExp( + [ + ``, + `` + ].join("|"), + "m" + ); + const matched = text.match(regex); + return matched && matched.index === 0; +} + +function extract(text) { + // yaml (---) and toml (+++) + const matched = text.match( + /^((---|\+\+\+)(?:\n[\s\S]*?\n|\n)\2(?:\n|$))?([\s\S]*)/ + ); + const frontMatter = matched[1]; + const mainContent = matched[3]; + return { frontMatter, mainContent }; +} + +module.exports = { + startWithPragma, + hasPragma: text => startWithPragma(extract(text).mainContent.trimLeft()), + insertPragma: text => { + const extracted = extract(text); + const pragma = ``; + return extracted.frontMatter + ? `${extracted.frontMatter}\n\n${pragma}\n\n${extracted.mainContent}` + : `${pragma}\n\n${extracted.mainContent}`; + } +}; +}); + +const docBuilders$8 = doc.builders; +const concat$8 = docBuilders$8.concat; +const join$7 = docBuilders$8.join; +const line$5 = docBuilders$8.line; +const hardline$7 = docBuilders$8.hardline; +const softline$6 = docBuilders$8.softline; +const fill$4 = docBuilders$8.fill; +const align$2 = docBuilders$8.align; +const group$5 = docBuilders$8.group; +const printDocToString$2 = doc.printer.printDocToString; + +const SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"]; + +const SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"]; + +const INLINE_NODE_TYPES = [ + "inlineCode", + "emphasis", + "strong", + "delete", + "link", + "linkReference", + "image", + "imageReference", + "footnote", + "footnoteReference", + "sentence", + "whitespace", + "word", + "break" +]; + +const INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat([ + "tableCell", + "paragraph", + "heading" +]); + +function genericPrint$3(path$$1, options, print) { + const node = path$$1.getValue(); + + if (shouldRemainTheSameContent(path$$1)) { + return concat$8( + util$1 + .splitText( + options.originalText.slice( + node.position.start.offset, + node.position.end.offset + ) + ) + .map( + node => + node.type === "word" + ? node.value + : node.value === "" + ? "" + : printLine(path$$1, node.value, options) + ) + ); + } + + switch (node.type) { + case "root": + return concat$8([normalizeDoc(printRoot(path$$1, options, print)), hardline$7]); + 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 `*` + .replace( + new RegExp( + [ + `(^|[${util$1.punctuationCharRange}])(_+)`, + `(_+)([${util$1.punctuationCharRange}]|$)` + ].join("|"), + "g" + ), + (_, text1, underscore1, underscore2, text2) => + (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": { + const parentNode = path$$1.getParentNode(); + const index = parentNode.children.indexOf(node); + const nextNode = parentNode.children[index + 1]; + + const 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": { + const parentNode = path$$1.getParentNode(); + const index = parentNode.children.indexOf(node); + const prevNode = parentNode.children[index - 1]; + const nextNode = parentNode.children[index + 1]; + const 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); + const style = + hasPrevOrNextWord || getAncestorNode$1(path$$1, "emphasis") ? "*" : "_"; + return concat$8([style, printChildren(path$$1, options, print), style]); + } + case "strong": + return concat$8(["**", printChildren(path$$1, options, print), "**"]); + case "delete": + return concat$8(["~~", printChildren(path$$1, options, print), "~~"]); + case "inlineCode": { + const backtickCount = util$1.getMaxContinuousCount(node.value, "`"); + const style = backtickCount === 1 ? "``" : "`"; + const gap = backtickCount ? " " : ""; + return concat$8([style, gap, node.value, gap, style]); + } + case "link": + switch (options.originalText[node.position.start.offset]) { + case "<": + return concat$8(["<", node.url, ">"]); + case "[": + return concat$8([ + "[", + 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$8([ + "![", + node.alt || "", + "](", + printUrl(node.url, ")"), + printTitle(node.title, options), + ")" + ]); + case "blockquote": + return concat$8(["> ", align$2("> ", printChildren(path$$1, options, print))]); + case "heading": + return concat$8([ + "#".repeat(node.depth) + " ", + printChildren(path$$1, options, print) + ]); + case "code": { + if ( + // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it + /^\n?( {4,}|\t)/.test( + options.originalText.slice( + node.position.start.offset, + node.position.end.offset + ) + ) + ) { + // indented code block + const alignment = " ".repeat(4); + return align$2( + alignment, + concat$8([alignment, join$7(hardline$7, node.value.split("\n"))]) + ); + } + + // fenced code block + const styleUnit = options.__inJsTemplate ? "~" : "`"; + const style = styleUnit.repeat( + Math.max( + 3, + util$1.getMaxContinuousCount(node.value, styleUnit) + 1 + ) + ); + return concat$8([ + style, + node.lang || "", + hardline$7, + join$7(hardline$7, node.value.split("\n")), + hardline$7, + style + ]); + } + case "yaml": + case "toml": { + const style = node.type === "yaml" ? "---" : "+++"; + return node.value + ? concat$8([style, hardline$7, node.value, hardline$7, style]) + : concat$8([style, hardline$7, style]); + } + case "html": { + const parentNode = path$$1.getParentNode(); + return replaceNewlinesWithHardlines( + parentNode.type === "root" && + util$1.getLast(parentNode.children) === node + ? node.value.trimRight() + : node.value + ); + } + case "list": { + const nthSiblingIndex = getNthListSiblingIndex( + node, + path$$1.getParentNode() + ); + + const isGitDiffFriendlyOrderedList = + node.ordered && + node.children.length > 1 && + /^\s*1(\.|\))/.test( + options.originalText.slice( + node.children[1].position.start.offset, + node.children[1].position.end.offset + ) + ); + + return printChildren(path$$1, options, print, { + processor: (childPath, index) => { + const prefix = getPrefix(); + return concat$8([ + prefix, + align$2( + " ".repeat(prefix.length), + printListItem(childPath, options, print, prefix) + ) + ]); + + function getPrefix() { + const rawPrefix = node.ordered + ? (index === 0 + ? node.start + : isGitDiffFriendlyOrderedList + ? 1 + : node.start + index) + + (nthSiblingIndex % 2 === 0 ? ". " : ") ") + : nthSiblingIndex % 2 === 0 + ? "* " + : "- "; + + // do not print trailing spaces for empty list item since it might be treated as `break` node + // by [doc-printer](https://github.com/prettier/prettier/blob/1.10.2/src/doc/doc-printer.js#L395-L405), + // we don't want to preserve unnecessary trailing spaces. + const listItem = childPath.getValue(); + return listItem.children.length + ? alignListPrefix(rawPrefix, options) + : rawPrefix; + } + } + }); + } + case "thematicBreak": { + const counter = getAncestorCounter$1(path$$1, "list"); + if (counter === -1) { + return "---"; + } + const nthSiblingIndex = getNthListSiblingIndex( + path$$1.getParentNode(counter), + path$$1.getParentNode(counter + 1) + ); + return nthSiblingIndex % 2 === 0 ? "---" : "***"; + } + case "linkReference": + return concat$8([ + "[", + printChildren(path$$1, options, print), + "]", + node.referenceType === "full" + ? concat$8(["[", node.identifier, "]"]) + : node.referenceType === "collapsed" + ? "[]" + : "" + ]); + case "imageReference": + switch (node.referenceType) { + case "full": + return concat$8(["![", node.alt || "", "][", node.identifier, "]"]); + default: + return concat$8([ + "![", + node.alt, + "]", + node.referenceType === "collapsed" ? "[]" : "" + ]); + } + case "definition": + return concat$8([ + "[", + node.identifier, + "]: ", + printUrl(node.url), + printTitle(node.title, options) + ]); + case "footnote": + return concat$8(["[^", printChildren(path$$1, options, print), "]"]); + case "footnoteReference": + return concat$8(["[^", node.identifier, "]"]); + case "footnoteDefinition": { + const nextNode = path$$1.getParentNode().children[path$$1.getName() + 1]; + return concat$8([ + "[^", + node.identifier, + "]: ", + group$5( + concat$8([ + align$2( + " ".repeat(options.tabWidth), + printChildren(path$$1, options, print, { + processor: (childPath, index) => + index === 0 + ? group$5(concat$8([softline$6, softline$6, childPath.call(print)])) + : childPath.call(print) + }) + ), + nextNode && nextNode.type === "footnoteDefinition" ? softline$6 : "" + ]) + ) + ]); + } + case "table": + return printTable(path$$1, options, print); + case "tableCell": + return printChildren(path$$1, options, print); + case "break": + return concat$8([ + /\s/.test(options.originalText[node.position.start.offset]) + ? " " + : "\\", + hardline$7 + ]); + 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) { + const node = path$$1.getValue(); + const prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] "; + return concat$8([ + prefix, + printChildren(path$$1, options, print, { + processor: (childPath, index) => { + if (index === 0 && childPath.getValue().type !== "list") { + return align$2(" ".repeat(prefix.length), childPath.call(print)); + } + + const alignment = " ".repeat( + clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block + ); + return concat$8([alignment, align$2(alignment, childPath.call(print))]); + } + }) + ]); +} + +function alignListPrefix(prefix, options) { + const additionalSpaces = getAdditionalSpaces(); + return ( + prefix + + " ".repeat( + additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block + ) + ); + + function getAdditionalSpaces() { + const restSpaces = prefix.length % options.tabWidth; + return restSpaces === 0 ? 0 : options.tabWidth - restSpaces; + } +} + +function getNthListSiblingIndex(node, parentNode) { + return getNthSiblingIndex( + node, + parentNode, + siblingNode => siblingNode.ordered === node.ordered + ); +} + +function replaceNewlinesWithHardlines(str) { + return join$7(hardline$7, str.split("\n")); +} + +function getNthSiblingIndex(node, parentNode, condition) { + condition = condition || (() => true); + + let index = -1; + + for (const childNode of parentNode.children) { + if (childNode.type === node.type && condition(childNode)) { + index++; + } else { + index = -1; + } + + if (childNode === node) { + return index; + } + } +} + +function getAncestorCounter$1(path$$1, typeOrTypes) { + const types = [].concat(typeOrTypes); + + let counter = -1; + let ancestorNode; + + while ((ancestorNode = path$$1.getParentNode(++counter))) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode$1(path$$1, typeOrTypes) { + const 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$7; + } + + const isBreakable = + options.proseWrap === "always" && + !getAncestorNode$1(path$$1, SINGLE_LINE_NODE_TYPES); + return value !== "" + ? isBreakable + ? line$5 + : " " + : isBreakable + ? softline$6 + : ""; +} + +function printTable(path$$1, options, print) { + const node = path$$1.getValue(); + const contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } } + + path$$1.map(rowPath => { + const rowContents = []; + + rowPath.map(cellPath => { + rowContents.push( + printDocToString$2(cellPath.call(print), options).formatted + ); + }, "children"); + + contents.push(rowContents); + }, "children"); + + const columnMaxWidths = contents.reduce( + (currentWidths, rowContents) => + currentWidths.map((width, columnIndex) => + Math.max(width, util$1.getStringWidth(rowContents[columnIndex])) + ), + contents[0].map(() => 3) // minimum width = 3 (---, :--, :-:, --:) + ); + + return join$7(hardline$7, [ + printRow(contents[0]), + printSeparator(), + join$7(hardline$7, contents.slice(1).map(printRow)) + ]); + + function printSeparator() { + return concat$8([ + "| ", + join$7( + " | ", + columnMaxWidths.map((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$8([ + "| ", + join$7( + " | ", + rowContents.map((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$8([text, " ".repeat(width - util$1.getStringWidth(text))]); + } + + function alignRight(text, width) { + return concat$8([" ".repeat(width - util$1.getStringWidth(text)), text]); + } + + function alignCenter(text, width) { + const spaces = width - util$1.getStringWidth(text); + const left = Math.floor(spaces / 2); + const right = spaces - left; + return concat$8([" ".repeat(left), text, " ".repeat(right)]); + } +} + +function printRoot(path$$1, options, print) { + /** @typedef {{ index: number, offset: number }} IgnorePosition */ + /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */ + const ignoreRanges = []; + + /** @type {IgnorePosition | null} */ + let ignoreStart = null; + + const children = path$$1.getValue().children; + children.forEach((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: (childPath, index) => { + if (ignoreRanges.length !== 0) { + const ignoreRange = ignoreRanges[0]; + + if (index === ignoreRange.start.index) { + return concat$8([ + 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 || {}; + + const postprocessor = events$$1.postprocessor || concat$8; + const processor = events$$1.processor || (childPath => childPath.call(print)); + + const node = path$$1.getValue(); + const parts = []; + + let lastChildNode; + + path$$1.map((childPath, index) => { + const childNode = childPath.getValue(); + + const result = processor(childPath, index); + if (result !== false) { + const data = { + parts, + prevNode: lastChildNode, + parentNode: node, + options + }; + + if (!shouldNotPrePrintHardline(childNode, data)) { + parts.push(hardline$7); + + if ( + shouldPrePrintDoubleHardline(childNode, data) || + shouldPrePrintTripleHardline(childNode, data) + ) { + parts.push(hardline$7); + } + + if (shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$7); + } + } + + parts.push(result); + + lastChildNode = childNode; + } + }, "children"); + + return postprocessor(parts); +} + +/** @return {false | 'next' | 'start' | 'end'} */ +function isPrettierIgnore(node) { + if (node.type !== "html") { + return false; + } + const match = node.value.match( + /^$/ + ); + return match === null ? false : match[1] ? match[1] : "next"; +} + +function shouldNotPrePrintHardline(node, data) { + const isFirstNode = data.parts.length === 0; + const isInlineNode = INLINE_NODE_TYPES.indexOf(node.type) !== -1; + + const isInlineHTML = + node.type === "html" && + INLINE_NODE_WRAPPER_TYPES.indexOf(data.parentNode.type) !== -1; + + return isFirstNode || isInlineNode || isInlineHTML; +} + +function shouldPrePrintDoubleHardline(node, data) { + const isSequence = (data.prevNode && data.prevNode.type) === node.type; + const isSiblingNode = + isSequence && SIBLING_NODE_TYPES.indexOf(node.type) !== -1; + + const isInTightListItem = + data.parentNode.type === "listItem" && !data.parentNode.loose; + + const isPrevNodeLooseListItem = + data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose; + + const isPrevNodePrettierIgnore = isPrettierIgnore(data.prevNode) === "next"; + + return ( + isPrevNodeLooseListItem || + !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore) + ); +} + +function shouldPrePrintTripleHardline(node, data) { + const isPrevNodeList = data.prevNode && data.prevNode.type === "list"; + const isIndentedCode = + node.type === "code" && + /\s/.test(data.options.originalText[node.position.start.offset]); + + return isPrevNodeList && isIndentedCode; +} + +function shouldRemainTheSameContent(path$$1) { + const ancestorNode = getAncestorNode$1(path$$1, [ + "linkReference", + "imageReference" + ]); + + return ( + ancestorNode && + (ancestorNode.type !== "linkReference" || + ancestorNode.referenceType !== "full") + ); +} + +function normalizeDoc(doc$$2) { + return docUtils.mapDoc(doc$$2, currentDoc => { + if (!currentDoc.parts) { + return currentDoc; + } + + if (currentDoc.type === "concat" && currentDoc.parts.length === 1) { + return currentDoc.parts[0]; + } + + const parts = []; + + currentDoc.parts.forEach(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$$1, dangerousCharOrChars) { + const dangerousChars = [" "].concat(dangerousCharOrChars || []); + return new RegExp(dangerousChars.map(x => `\\${x}`).join("|")).test(url$$1) + ? `<${url$$1}>` + : url$$1; +} + +function printTitle(title, options) { + if (!title) { + return ""; + } + if (title.includes('"') && title.includes("'") && !title.includes(")")) { + return ` (${title})`; // avoid escaped quotes + } + // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split + const singleCount = title.split("'").length - 1; + const doubleCount = title.split('"').length - 1; + const 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((current, part) => { + const 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$5(ast, newObj, parent) { + // for codeblock + if (ast.type === "code") { + delete newObj.value; + } + // for whitespace: "\n" and " " are considered the same + if (ast.type === "whitespace" && ast.value === "\n") { + newObj.value = " "; + } + // for insert pragma + if ( + parent && + parent.type === "root" && + (parent.children[0] === ast || + ((parent.children[0].type === "yaml" || + parent.children[0].type === "toml") && + parent.children[1] === ast)) && + ast.type === "html" && + pragma$2.startWithPragma(ast.value) + ) { + return null; + } +} + +function hasPrettierIgnore$1(path$$1) { + const index = +path$$1.getName(); + + if (index === 0) { + return false; + } + + const prevNode = path$$1.getParentNode().children[index - 1]; + return isPrettierIgnore(prevNode) === "next"; +} + +var printerMarkdown = { + print: genericPrint$3, + embed: embed_1$2, + massageAstNode: clean$5, + hasPrettierIgnore: hasPrettierIgnore$1, + insertPragma: pragma$2.insertPragma +}; + +const CATEGORY_MARKDOWN = "Markdown"; + +// format based on https://github.com/prettier/prettier/blob/master/src/common/support.js +var options$8 = { + proseWrap: { + since: "1.8.2", + category: CATEGORY_MARKDOWN, + type: "choice", + default: [ + { since: "1.8.2", value: true }, + { since: "1.9.0", value: "preserve" } + ], + description: "How to wrap prose. (markdown)", + 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" } + ] + }, + singleQuote: options.singleQuote +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$4 = [ + { + name: "Markdown", + since: "1.8.0", + parsers: ["remark"], + aliases: ["pandoc"], + aceMode: "markdown", + codemirrorMode: "gfm", + codemirrorMimeType: "text/x-gfm", + wrap: true, + extensions: [ + ".md", + ".markdown", + ".mdown", + ".mdwn", + ".mkd", + ".mkdn", + ".mkdown", + ".ron", + ".workbook" + ], + filenames: ["README"], + tmScope: "source.gfm", + linguistLanguageId: 222, + vscodeLanguageIds: ["markdown"] + } +]; + +const remark = { + get parse() { + return require("./parser-markdown"); + }, + astFormat: "mdast", + hasPragma: pragma$2.hasPragma, + locStart: node => node.position.start.offset, + locEnd: node => node.position.end.offset +}; + +const parsers$4 = { + remark, + // TODO: Delete this in 2.0 + markdown: remark +}; + +const printers$4 = { + mdast: printerMarkdown +}; + +var languageMarkdown = { + languages: languages$4, + options: options$8, + parsers: parsers$4, + printers: printers$4 +}; + +const docUtils$5 = doc.utils; +const docBuilders$11 = doc.builders; +const hardline$10 = docBuilders$11.hardline; +const concat$11 = docBuilders$11.concat; + +function embed$4(path$$1, print, textToDoc, options) { + const node = path$$1.getValue(); + + switch (node.type) { + case "text": { + const parent = path$$1.getParentNode(); + // Inline JavaScript + if ( + parent.type === "script" && + ((!parent.attribs.lang && !parent.attribs.lang) || + parent.attribs.type === "text/javascript" || + parent.attribs.type === "application/javascript") + ) { + const parser = options.parser === "flow" ? "flow" : "babylon"; + const doc$$2 = textToDoc(getText(options, node), { parser }); + return concat$11([hardline$10, doc$$2]); + } + + // Inline TypeScript + if ( + parent.type === "script" && + (parent.attribs.type === "application/x-typescript" || + parent.attribs.lang === "ts") + ) { + const doc$$2 = textToDoc( + getText(options, node), + { parser: "typescript" }, + options + ); + return concat$11([hardline$10, doc$$2]); + } + + // Inline Styles + if (parent.type === "style") { + const doc$$2 = textToDoc(getText(options, node), { parser: "css" }); + return concat$11([hardline$10, docUtils$5.stripTrailingHardline(doc$$2)]); + } + + break; + } + + case "attribute": { + /* + * Vue binding sytax: JS expressions + * :class="{ 'some-key': value }" + * v-bind:id="'list-' + id" + * v-if="foo && !bar" + * @click="someFunction()" + */ + if (/(^@)|(^v-)|:/.test(node.key) && !/^\w+$/.test(node.value)) { + const doc$$2 = textToDoc(node.value, { + parser: parseJavaScriptExpression, + // Use singleQuote since HTML attributes use double-quotes. + // TODO(azz): We still need to do an entity escape on the attribute. + singleQuote: true + }); + return concat$11([ + node.key, + '="', + util$1.hasNewlineInRange(node.value, 0, node.value.length) + ? doc$$2 + : docUtils$5.removeLines(doc$$2), + '"' + ]); + } + } + } +} + +function parseJavaScriptExpression(text, parsers) { + // Force parsing as an expression + const ast = parsers.babylon(`(${text})`); + // Extract expression from the declaration + return { + type: "File", + program: ast.program.body[0].expression + }; +} + +function getText(options, node) { + return options.originalText.slice( + options.locStart(node), + options.locEnd(node) + ); +} + +var embed_1$4 = embed$4; + +const docBuilders$10 = doc.builders; +const concat$10 = docBuilders$10.concat; +const join$8 = docBuilders$10.join; +const hardline$9 = docBuilders$10.hardline; +const line$6 = docBuilders$10.line; +const softline$7 = docBuilders$10.softline; +const group$6 = docBuilders$10.group; +const indent$7 = docBuilders$10.indent; + +// http://w3c.github.io/html/single-page.html#void-elements +const voidTags$1 = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true +}; + +function genericPrint$4(path$$1, options, print) { + const n = path$$1.getValue(); + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + switch (n.type) { + case "root": { + return printChildren$1(path$$1, print); + } + case "directive": { + return concat$10(["<", n.data, ">", hardline$9]); + } + case "text": { + return n.data.replace(/\s+/g, " ").trim(); + } + case "script": + case "style": + case "tag": { + const selfClose = voidTags$1[n.name] ? ">" : " />"; + const children = printChildren$1(path$$1, print); + + const hasNewline = util$1.hasNewlineInRange( + options.originalText, + options.locStart(n), + options.locEnd(n) + ); + + return group$6( + concat$10([ + hasNewline ? hardline$9 : "", + "<", + n.name, + printAttributes(path$$1, print), + + n.children.length ? ">" : selfClose, + + n.name.toLowerCase() === "html" + ? concat$10([hardline$9, children]) + : indent$7(children), + n.children.length ? concat$10([softline$7, ""]) : hardline$9 + ]) + ); + } + case "comment": { + return concat$10([""]); + } + case "attribute": { + if (!n.value) { + return n.key; + } + return concat$10([n.key, '="', n.value, '"']); + } + + default: + /* istanbul ignore next */ + throw new Error("unknown htmlparser2 type: " + n.type); + } +} + +function printAttributes(path$$1, print) { + const node = path$$1.getValue(); + + return concat$10([ + node.attributes.length ? " " : "", + indent$7(join$8(line$6, path$$1.map(print, "attributes"))) + ]); +} + +function printChildren$1(path$$1, print) { + const children = []; + path$$1.each(childPath => { + const child = childPath.getValue(); + if (child.type !== "text") { + children.push(hardline$9); + } + children.push(childPath.call(print)); + }, "children"); + return concat$10(children); +} + +var printerHtmlparser2 = { + print: genericPrint$4, + embed: embed_1$4, + hasPrettierIgnore: util$1.hasIgnoreComment +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$5 = [ + { + name: "HTML", + since: null, // unreleased + parsers: ["parse5"], + group: "HTML", + tmScope: "text.html.basic", + aceMode: "html", + codemirrorMode: "htmlmixed", + codemirrorMimeType: "text/html", + aliases: ["xhtml"], + extensions: [".html", ".htm", ".html.hl", ".inc", ".st", ".xht", ".xhtml"], + linguistLanguageId: 146, + vscodeLanguageIds: ["html"] + } +]; + +const parsers$5 = { + parse5: { + get parse() { + return require("./parser-parse5"); + }, + astFormat: "htmlparser2", + locEnd: function(node) { + return node.__location && node.__location.endOffset; + }, + locStart: function(node) { + return node.__location && node.__location.startOffset; + } + } +}; + +const printers$5 = { + htmlparser2: printerHtmlparser2 +}; + +var languageHtml = { + languages: languages$5, + parsers: parsers$5, + printers: printers$5 +}; + +const docBuilders$13 = doc.builders; +const concat$13 = docBuilders$13.concat; +const hardline$12 = docBuilders$13.hardline; + +function embed$6(path$$1, print, textToDoc, options) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + if (!parent || parent.tag !== "root" || node.unary) { + return null; + } + + let parser; + + if (node.tag === "style") { + const langAttr = node.attrs.find(attr => attr.name === "lang"); + if (!langAttr || langAttr.value === "postcss") { + parser = "css"; + } else if (langAttr.value === "scss") { + parser = "scss"; + } else if (langAttr.value === "less") { + parser = "less"; + } + } + + if (node.tag === "script") { + const langAttr = node.attrs.find(attr => attr.name === "lang"); + if (!langAttr) { + parser = "babylon"; + } else if (langAttr.value === "ts" || langAttr.value === "tsx") { + parser = "typescript"; + } + } + + if (!parser) { + return null; + } + + return concat$13([ + options.originalText.slice(node.start, node.contentStart), + hardline$12, + textToDoc(options.originalText.slice(node.contentStart, node.contentEnd), { + parser + }), + options.originalText.slice(node.contentEnd, node.end) + ]); +} + +var embed_1$6 = embed$6; + +const docBuilders$12 = doc.builders; +const concat$12 = docBuilders$12.concat; +const hardline$11 = docBuilders$12.hardline; + +function genericPrint$5(path$$1, options, print) { + const n = path$$1.getValue(); + const res = []; + let index = n.start; + + path$$1.each(childPath => { + const child = childPath.getValue(); + res.push(options.originalText.slice(index, child.start)); + res.push(childPath.call(print)); + index = child.end; + }, "children"); + + // If there are no children, we just print the node from start to end. + // Otherwise, index should point to the end of the last child, and we + // need to print the closing tag. + res.push(options.originalText.slice(index, n.end)); + + // Only force a trailing newline if there were any contents. + if (n.tag === "root" && n.children.length) { + res.push(hardline$11); + } + + return concat$12(res); +} + +const clean$6 = (ast, newObj) => { + delete newObj.contentStart; + delete newObj.contentEnd; +}; + +var printerVue = { + print: genericPrint$5, + embed: embed_1$6, + massageAstNode: clean$6 +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$6 = [ + { + name: "Vue", + since: "1.10.0", + parsers: ["vue"], + group: "HTML", + tmScope: "text.html.vue", + aceMode: "html", + codemirrorMode: "htmlmixed", + codemirrorMimeType: "text/html", + extensions: [".vue"], + linguistLanguageId: 146, + vscodeLanguageIds: ["vue"] + } +]; + +const parsers$6 = { + vue: { + get parse() { + return require("./parser-vue"); + }, + astFormat: "vue" + } +}; + +const printers$6 = { + vue: printerVue +}; + +var languageVue = { + languages: languages$6, + parsers: parsers$6, + printers: printers$6 +}; + +function loadPlugins(plugins) { + plugins = plugins || []; + + const internalPlugins = [ + languageJs, + languageCss, + languageHandlebars, + languageGraphql, + languageMarkdown, + languageHtml, + languageVue + ]; + + const externalPlugins = plugins + .concat( + getPluginsFromPackage( + readPkgUp.sync({ + normalize: false + }).pkg + ) + ) + .map(plugin => { + if (typeof plugin !== "string") { + return plugin; + } + + const pluginPath = resolve.sync(plugin, { basedir: process.cwd() }); + return Object.assign({ name: plugin }, require(pluginPath)); + }); + + return deduplicate(internalPlugins.concat(externalPlugins)); +} + +function getPluginsFromPackage(pkg) { + if (!pkg) { + return []; + } + const deps = Object.assign({}, pkg.dependencies, pkg.devDependencies); + return Object.keys(deps).filter( + dep => + dep.startsWith("prettier-plugin-") || dep.startsWith("@prettier/plugin-") + ); +} + +function deduplicate(items) { + const uniqItems = []; + for (const item of items) { + if (uniqItems.indexOf(item) < 0) { + uniqItems.push(item); + } + } + return uniqItems; +} + +var loadPlugins_1 = loadPlugins; + +const CATEGORY_CONFIG = "Config"; +const CATEGORY_EDITOR = "Editor"; +const CATEGORY_FORMAT = "Format"; +const CATEGORY_OTHER = "Other"; +const CATEGORY_OUTPUT = "Output"; + +const categoryOrder = [ + CATEGORY_OUTPUT, + CATEGORY_FORMAT, + CATEGORY_CONFIG, + CATEGORY_EDITOR, + 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. + */ +const options$11 = { + 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: CATEGORY_CONFIG, + description: + "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).", + oppositeDescription: "Do not look for a configuration file." + }, + "config-precedence": { + type: "choice", + category: 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-check": { + type: "boolean" + }, + "debug-print-doc": { + type: "boolean" + }, + editorconfig: { + type: "boolean", + category: 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: CATEGORY_CONFIG, + description: + "Find and print the path to a configuration file for the given input file." + }, + help: { + type: "flag", + alias: "h", + description: dedent_1` + Show CLI usage, or details about the given flag. + Example: --help write + ` + }, + "ignore-path": { + type: "path", + category: CATEGORY_CONFIG, + default: ".prettierignore", + description: "Path to a file with patterns describing files to ignore." + }, + "list-different": { + type: "boolean", + category: 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: CATEGORY_CONFIG, + description: "Process files inside 'node_modules' directory." + }, + write: { + type: "boolean", + category: CATEGORY_OUTPUT, + description: "Edit files in-place. (Beware!)" + } +}; + +const 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 = { + CATEGORY_CONFIG, + CATEGORY_EDITOR, + CATEGORY_FORMAT, + CATEGORY_OTHER, + CATEGORY_OUTPUT, + categoryOrder, + options: options$11, + usageSummary +}; + +var require$$0$11 = ( _package$1 && _package ) || _package$1; + +const currentVersion = require$$0$11.version; + + + +const CATEGORY_GLOBAL = "Global"; +const 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 } */ +const supportOptions = { + 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: constant.CATEGORY_EDITOR + }, + filepath: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "path", + default: undefined, + description: + "Specify the input filepath. This will be used to do parser inference.", + cliName: "stdin-filepath", + cliCategory: constant.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: constant.CATEGORY_OTHER + }, + parser: { + since: "0.0.10", + category: CATEGORY_GLOBAL, + type: "choice", + default: "babylon", + description: "Which parser to use.", + exception: value => + 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: "graphql", since: "1.5.0", description: "GraphQL" }, + { value: "markdown", since: "1.8.0", description: "Markdown" }, + { value: "vue", since: "1.10.0", description: "Vue" } + ] + }, + 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: value => typeof value === "string" || typeof value === "object", + cliName: "plugin", + cliCategory: constant.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: constant.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: constant.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: constant.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: false, + 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." + } +}; + +function getSupportInfo$1(version, opts) { + opts = Object.assign( + { + plugins: [], + pluginsLoaded: false, + showUnreleased: false, + showDeprecated: false, + showInternal: false + }, + opts + ); + + if (!version) { + version = currentVersion; + } + + const plugins = opts.pluginsLoaded ? opts.plugins : loadPlugins_1(opts.plugins); + + const options = util$1 + .arrayify( + Object.assign( + plugins.reduce( + (currentOptions, plugin) => + Object.assign(currentOptions, plugin.options), + {} + ), + supportOptions + ), + "name" + ) + .sort((a, b) => (a.name === b.name ? 0 : a.name < b.name ? -1 : 1)) + .filter(filterSince) + .filter(filterDeprecated) + .map(mapDeprecated) + .map(mapInternal) + .map(option => { + const newOption = Object.assign({}, option); + + if (Array.isArray(newOption.default)) { + newOption.default = + newOption.default.length === 1 + ? newOption.default[0].value + : newOption.default + .filter(filterSince) + .sort((info1, info2) => + 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(option => { + const filteredPlugins = plugins.filter( + plugin => plugin.defaultOptions && plugin.defaultOptions[option.name] + ); + const pluginDefaults = filteredPlugins.reduce((reduced, plugin) => { + reduced[plugin.name] = plugin.defaultOptions[option.name]; + return reduced; + }, {}); + return Object.assign(option, { pluginDefaults }); + }); + + const usePostCssParser = semver.lt(version, "1.7.1"); + + const languages = plugins + .reduce((all, plugin) => all.concat(plugin.languages), []) + .filter( + language => + language.since + ? semver.gte(version, language.since) + : language.since !== null + ) + .map(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.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; + } + const newObject = Object.assign({}, object); + delete newObject.deprecated; + delete newObject.redirect; + return newObject; + } + function mapInternal(object) { + if (opts.showInternal) { + return object; + } + const newObject = Object.assign({}, object); + delete newObject.cliName; + delete newObject.cliCategory; + delete newObject.cliDescription; + return newObject; + } +} + +var support = { + getSupportInfo: getSupportInfo$1 +}; + +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() { + const s = this.stack; + const 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() { + const s = this.stack; + return s[s.length - 1]; +}; + +function getNodeHelper(path$$1, count) { + const s = path$$1.stack; + + for (let i = s.length - 1; i >= 0; i -= 2) { + const 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, ... */) { + const s = this.stack; + const origLen = s.length; + let value = s[origLen - 1]; + const argc = arguments.length; + for (let i = 1; i < argc; ++i) { + const name = arguments[i]; + value = value[name]; + s.push(name, value); + } + const 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, ... */) { + const s = this.stack; + const origLen = s.length; + let value = s[origLen - 1]; + const argc = arguments.length; + + for (let i = 1; i < argc; ++i) { + const name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + for (let 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, ... */) { + const s = this.stack; + const origLen = s.length; + let value = s[origLen - 1]; + const argc = arguments.length; + + for (let i = 1; i < argc; ++i) { + const name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + const result = new Array(value.length); + + for (let i = 0; i < value.length; ++i) { + if (i in value) { + s.push(i, value[i]); + result[i] = callback(this, i); + s.length -= 2; + } + } + + s.length = origLen; + + return result; +}; + +var fastPath = FastPath; + +/* eslint-disable no-nested-ternary */ +var arr = []; +var charCodeCache = []; + +var leven = function (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; +}; + +function apiDescriptor(name, value) { + return arguments.length === 1 + ? JSON.stringify(name) + : `\`{ ${apiDescriptor(name)}: ${JSON.stringify(value)} }\``; +} + +function cliDescriptor(name, value) { + return value === false + ? `\`--no-${name}\`` + : value === true || arguments.length === 1 + ? `\`--${name}\`` + : value === "" + ? `\`--${name}\` without an argument` + : `\`--${name}=${value}\``; +} + +var optionsDescriptor = { + apiDescriptor, + cliDescriptor +}; + +function validateOption(value, optionInfo, opts) { + opts = opts || {}; + const descriptor = opts.descriptor || optionsDescriptor.apiDescriptor; + + if ( + typeof optionInfo.exception === "function" && + optionInfo.exception(value) + ) { + return; + } + + try { + validateOptionType(value, optionInfo); + } catch (error) { + throw new Error( + `Invalid \`${descriptor(optionInfo.name)}\` value. ${ + error.message + }, but received \`${JSON.stringify(value)}\`.` + ); + } +} + +function validateOptionType(value, optionInfo) { + if (optionInfo.array) { + if (!Array.isArray(value)) { + throw new Error(`Expected an array`); + } + value.forEach(v => + validateOptionType(v, Object.assign({}, optionInfo, { array: false })) + ); + } else { + switch (optionInfo.type) { + case "int": + validateIntOption(value); + break; + case "boolean": + validateBooleanOption(value); + break; + case "choice": + validateChoiceOption(value, optionInfo.choices); + break; + } + } +} + +function validateBooleanOption(value) { + if (typeof value !== "boolean") { + throw new Error(`Expected a boolean`); + } +} + +function validateIntOption(value) { + if ( + !( + typeof value === "number" && + Math.floor(value) === value && + value >= 0 && + value !== Infinity + ) + ) { + throw new Error(`Expected an integer`); + } +} + +function validateChoiceOption(value, choiceInfos) { + if (!choiceInfos.some(choiceInfo => choiceInfo.value === value)) { + const choices = choiceInfos + .filter(choiceInfo => !choiceInfo.deprecated) + .map(choiceInfo => JSON.stringify(choiceInfo.value)) + .sort(); + const head = choices.slice(0, -2); + const tail = choices.slice(-2); + throw new Error(`Expected ${head.concat(tail.join(" or ")).join(", ")}`); + } +} + +var optionsValidator = { validateOption }; + +function normalizeOptions$1(options, optionInfos, opts) { + opts = opts || {}; + const logger = + opts.logger === false + ? { warn() {} } + : opts.logger !== undefined + ? opts.logger + : console; + const descriptor = opts.descriptor || optionsDescriptor.apiDescriptor; + const passThrough = opts.passThrough || []; + + const optionInfoMap = optionInfos.reduce( + (reduced, optionInfo) => + Object.assign(reduced, { [optionInfo.name]: optionInfo }), + {} + ); + const normalizedOptions = Object.keys(options).reduce((newOptions, key) => { + const optionInfo = optionInfoMap[key]; + + let optionName = key; + let optionValue = options[key]; + + if (!optionInfo) { + if (passThrough === true || passThrough.indexOf(optionName) !== -1) { + newOptions[optionName] = optionValue; + } else { + logger.warn( + createUnknownOptionMessage( + optionName, + optionValue, + optionInfos, + descriptor + ) + ); + } + return newOptions; + } + + if (!optionInfo.deprecated) { + optionValue = normalizeOption(optionValue, optionInfo); + } else if (typeof optionInfo.redirect === "string") { + logger.warn(createRedirectOptionMessage(optionInfo, descriptor)); + optionName = optionInfo.redirect; + } else if (optionValue) { + logger.warn(createRedirectOptionMessage(optionInfo, descriptor)); + optionValue = optionInfo.redirect.value; + optionName = optionInfo.redirect.option; + } + + if (optionInfo.choices) { + const choiceInfo = optionInfo.choices.find( + choice => choice.value === optionValue + ); + if (choiceInfo && choiceInfo.deprecated) { + logger.warn( + createRedirectChoiceMessage(optionInfo, choiceInfo, descriptor) + ); + optionValue = choiceInfo.redirect; + } + } + + if (optionInfo.array && !Array.isArray(optionValue)) { + optionValue = [optionValue]; + } + + if (optionValue !== optionInfo.default) { + optionsValidator.validateOption(optionValue, optionInfoMap[optionName], { + descriptor + }); + } + + newOptions[optionName] = optionValue; + return newOptions; + }, {}); + + return normalizedOptions; +} + +function normalizeOption(option, optionInfo) { + return optionInfo.type === "int" ? Number(option) : option; +} + +function createUnknownOptionMessage(key, value, optionInfos, descriptor) { + const messages = [`Ignored unknown option ${descriptor(key, value)}.`]; + + const suggestedOptionInfo = optionInfos.find( + optionInfo => leven(optionInfo.name, key) < 3 + ); + if (suggestedOptionInfo) { + messages.push(`Did you mean ${JSON.stringify(suggestedOptionInfo.name)}?`); + } + + return messages.join(" "); +} + +function createRedirectOptionMessage(optionInfo, descriptor) { + return `${descriptor( + optionInfo.name + )} is deprecated. Prettier now treats it as ${ + typeof optionInfo.redirect === "string" + ? descriptor(optionInfo.redirect) + : descriptor(optionInfo.redirect.option, optionInfo.redirect.value) + }.`; +} + +function createRedirectChoiceMessage(optionInfo, choiceInfo, descriptor) { + return `${descriptor( + optionInfo.name, + choiceInfo.value + )} is deprecated. Prettier now treats it as ${descriptor( + optionInfo.name, + choiceInfo.redirect + )}.`; +} + +function normalizeApiOptions(options, optionInfos, opts) { + return normalizeOptions$1( + options, + optionInfos, + Object.assign({ descriptor: optionsDescriptor.apiDescriptor }, opts) + ); +} + +function normalizeCliOptions(options, optionInfos, opts) { + const args = options["_"] || []; + + const newOptions = normalizeOptions$1( + Object.keys(options).reduce( + (reduced, key) => + Object.assign( + reduced, + key.length === 1 // omit alias + ? null + : { [key]: options[key] } + ), + {} + ), + optionInfos, + Object.assign({ descriptor: optionsDescriptor.cliDescriptor }, opts) + ); + newOptions["_"] = args; + + return newOptions; +} + +var optionsNormalizer = { + normalizeApiOptions, + normalizeCliOptions +}; + +class ConfigError$1 extends Error {} +class DebugError extends Error {} + +var errors = { + ConfigError: ConfigError$1, + DebugError +}; + +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 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 (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 (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 (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'; + + +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +function assembleStyles() { + const 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; + + Object.keys(styles).forEach(groupName => { + const group = styles[groupName]; + + Object.keys(group).forEach(styleName => { + const style = group[styleName]; + + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + const rgb2rgb = (r, g, b) => [r, g, b]; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = {}; + styles.color.ansi256 = {}; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + + styles.bgColor.ansi = {}; + styles.bgColor.ansi256 = {}; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + for (const key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } + + const suite = colorConvert[key]; + + 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; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); +}); + +var hasFlag = function (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 = createCommonjsModule(function (module) { +'use strict'; + + + +const env = process.env; + +const support = level => { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +}; + +let supportLevel = (() => { + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('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. + const osRelease = os.release().split('.'); + if ( + Number(process.version.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return 2; + } + + return 1; + } + + if ('CI' in env) { + if ('TRAVIS' in env || env.CI === 'Travis' || 'CIRCLECI' in env) { + 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) { + const 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 (/^(screen|xterm)-256(?:color)?/.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|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 = createCommonjsModule(function (module) { +'use strict'; +const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; +const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; +const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; +const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + +const 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) { + const results = []; + const chunks = args.trim().split(/\s*,\s*/g); + let matches; + + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if ((matches = chunk.match(STRING_REGEX))) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + + return results; +} + +function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + + const results = []; + let matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; +} + +function buildStyle(chalk, styles) { + const enabled = {}; + + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + + let current = chalk; + for (const styleName of Object.keys(enabled)) { + 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 = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + + // eslint-disable-next-line max-params + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + const 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) { + const 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'; + + + + + + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = supportsColor ? supportsColor.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) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const 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'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const 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 + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let 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. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // 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 + 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(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let 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 = supportsColor; +module.exports.default = module.exports; // For TypeScript +}); + +var lib$5 = createCommonjsModule(function (module, exports) { +"use strict"; + +exports.__esModule = true; +exports.shouldHighlight = shouldHighlight; +exports.getChalk = getChalk; +exports.default = highlight; + +var _jsTokens = _interopRequireWildcard(jsTokens); + +var _esutils = _interopRequireDefault(utils$2); + +var _chalk = _interopRequireDefault(chalk); + +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$$1) { + return { + keyword: chalk$$1.cyan, + capitalized: chalk$$1.yellow, + jsx_tag: chalk$$1.yellow, + punctuator: chalk$$1.yellow, + number: chalk$$1.magenta, + string: chalk$$1.green, + regex: chalk$$1.magenta, + comment: chalk$$1.grey, + invalid: chalk$$1.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 deprecationError = new Error("Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."); + deprecationError.name = "DeprecationWarning"; + + if (process.emitWarning) { + process.emitWarning(deprecationError); + } else { + console.warn(deprecationError); + } + } + + colNumber = Math.max(colNumber, 0); + var location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); +} +}); + +unwrapExports(lib$4); + +const ConfigError = errors.ConfigError; + + +const locStart$1 = languageJs.locStart; +const locEnd$1 = languageJs.locEnd; + +function getParsers(options) { + return options.plugins.reduce( + (parsers, plugin) => Object.assign({}, parsers, plugin.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$1, + locEnd: locEnd$1 + }; + } + + 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$1, + locEnd: locEnd$1 + }; + } catch (err) { + /* istanbul ignore next */ + throw new ConfigError(`Couldn't resolve parser "${opts.parser}"`); + } + } + /* istanbul ignore next */ + return parsers.babylon; +} + +function parse$3(text, opts) { + const parsers = getParsers(opts); + + // Copy the "parse" function from parser to a new object whose values are + // functions. Use defineProperty()/getOwnPropertyDescriptor() such that we + // don't invoke the parser.parse getters. + const parsersForCustomParserApi = Object.keys(parsers).reduce( + (object, parserName) => + Object.defineProperty( + object, + parserName, + Object.getOwnPropertyDescriptor(parsers[parserName], "parse") + ), + {} + ); + + const parser = resolveParser$1(opts, parsers); + + try { + if (parser.preprocess) { + text = parser.preprocess(text, opts); + } + + return { + text, + ast: parser.parse(text, parsersForCustomParserApi, opts) + }; + } catch (error) { + const loc = error.loc; + + if (loc) { + const codeFrame = lib$4; + error.codeFrame = codeFrame.codeFrameColumns(text, loc, { + highlightCode: true + }); + error.message += "\n" + error.codeFrame; + throw error; + } + + /* istanbul ignore next */ + throw error.stack; + } +} + +var parser$3 = { parse: parse$3, resolveParser: resolveParser$1 }; + +function getPlugin(options) { + const astFormat = options.astFormat; + + if (!astFormat) { + throw new Error("getPlugin() requires astFormat to be set"); + } + const printerPlugin = options.plugins.find( + plugin => plugin.printers[astFormat] + ); + if (!printerPlugin) { + throw new Error(`Couldn't find plugin for AST format "${astFormat}"`); + } + + return printerPlugin; +} + +var getPlugin_1 = getPlugin; + +const getSupportInfo$2 = support.getSupportInfo; + + +const resolveParser = parser$3.resolveParser; + + +const hiddenDefaults = { + astFormat: "estree", + printer: {}, + locStart: null, + locEnd: null +}; + +// Copy options and fill in default values. +function normalize$2(options, opts) { + opts = opts || {}; + + const rawOptions = Object.assign({}, options); + + const plugins = loadPlugins_1(rawOptions.plugins); + rawOptions.plugins = plugins; + + const supportOptions = getSupportInfo$2(null, { + plugins, + pluginsLoaded: true, + showUnreleased: true, + showDeprecated: true + }).options; + const defaults = supportOptions.reduce( + (reduced, optionInfo) => + Object.assign(reduced, { [optionInfo.name]: optionInfo.default }), + Object.assign({}, hiddenDefaults) + ); + + if (opts.inferParser !== false) { + if ( + rawOptions.filepath && + (!rawOptions.parser || rawOptions.parser === defaults.parser) + ) { + const inferredParser = inferParser( + rawOptions.filepath, + rawOptions.plugins + ); + if (inferredParser) { + rawOptions.parser = inferredParser; + } + } + } + + const parser = resolveParser( + !rawOptions.parser + ? rawOptions + : // handle deprecated parsers + optionsNormalizer.normalizeApiOptions( + rawOptions, + [supportOptions.find(x => x.name === "parser")], + { passThrough: true, logger: false } + ) + ); + rawOptions.astFormat = parser.astFormat; + rawOptions.locEnd = parser.locEnd; + rawOptions.locStart = parser.locStart; + + const plugin = getPlugin_1(rawOptions); + rawOptions.printer = plugin.printers[rawOptions.astFormat]; + + const pluginDefaults = supportOptions + .filter( + optionInfo => + optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name] + ) + .reduce( + (reduced, optionInfo) => + Object.assign(reduced, { + [optionInfo.name]: optionInfo.pluginDefaults[plugin.name] + }), + {} + ); + + const mixedDefaults = Object.assign({}, defaults, pluginDefaults); + + Object.keys(mixedDefaults).forEach(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 inferParser(filepath, plugins) { + const extension = path.extname(filepath); + const filename = path.basename(filepath).toLowerCase(); + + const language = getSupportInfo$2(null, { + plugins, + pluginsLoaded: true + }).languages.find( + language => + language.since !== null && + (language.extensions.indexOf(extension) > -1 || + (language.filenames && + language.filenames.find(name => name.toLowerCase() === filename))) + ); + + return language && language.parsers[0]; +} + +var options$12 = { normalize: normalize$2, hiddenDefaults }; + +const normalize$1 = options$12.normalize; + + +function printSubtree(path$$1, print, options) { + if (options.printer.embed) { + return options.printer.embed( + path$$1, + print, + (text, partialNextOptions) => + textToDoc(text, partialNextOptions, options), + options + ); + } +} + +function textToDoc(text, partialNextOptions, parentOptions) { + const nextOptions = normalize$1( + Object.assign({}, parentOptions, partialNextOptions, { + parentParser: parentOptions.parser, + originalText: text + }), + { passThrough: true, inferParser: false } + ); + + const result = parser$3.parse(text, nextOptions); + const ast = result.ast; + text = result.text; + + const astComments = ast.comments; + delete ast.comments; + comments.attach(astComments, ast, text, nextOptions); + return astToDoc(ast, nextOptions); +} + +var multiparser = { + printSubtree +}; + +const doc$3 = doc; +const docBuilders$14 = doc$3.builders; +const concat$14 = docBuilders$14.concat; +const hardline$13 = docBuilders$14.hardline; +const addAlignmentToDoc$2 = docBuilders$14.addAlignmentToDoc; +const docUtils$6 = doc$3.utils; + +function printAstToDoc(ast, options, addAlignmentSize) { + addAlignmentSize = addAlignmentSize || 0; + + const printer = options.printer; + const cache = new Map(); + + function printGenerically(path$$1, args) { + const node = path$$1.getValue(); + + const 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 + let res; + if (printer.willPrintOwnComments && printer.willPrintOwnComments(path$$1)) { + res = genericPrint$6(path$$1, options, printGenerically, args); + } else { + res = comments.printComments( + path$$1, + p => genericPrint$6(p, options, printGenerically, args), + options, + args && args.needsSemi + ); + } + + if (shouldCache) { + cache.set(node, res); + } + + return res; + } + + let doc$$2 = printGenerically(new fastPath(ast)); + if (addAlignmentSize > 0) { + // Add a hardline to make the indents take effect + // It should be removed in index.js format() + doc$$2 = addAlignmentToDoc$2( + docUtils$6.removeLines(concat$14([hardline$13, doc$$2])), + addAlignmentSize, + options.tabWidth + ); + } + docUtils$6.propagateBreaks(doc$$2); + + if (options.parser === "json") { + doc$$2 = concat$14([doc$$2, hardline$13]); + } + + return doc$$2; +} + +function genericPrint$6(path$$1, options, printPath, args) { + assert.ok(path$$1 instanceof fastPath); + + const node = path$$1.getValue(); + const 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 + const sub = multiparser.printSubtree(path$$1, printPath, options); + 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; + +var concatMap = function (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; + +var path$3 = { sep: '/' }; +try { + path$3 = path; +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.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; +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) + } + + 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$3.sep !== '/') { + pattern = pattern.split(path$3.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.prototype.debug = function () {}; + +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) 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.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.prototype.braceExpand = braceExpand; + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + 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.prototype.parse = parse$4; +var SUBPARSE = {}; +function parse$4 (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(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) { + 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(pattern, options); + list = list.filter(function (f) { + return mm.match(f) + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list +}; + +Minimatch.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$3.sep !== '/') { + f = f.split(path$3.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.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 mimicFn = (to, from) => { + // TODO: use `Reflect.ownKeys()` when targeting Node.js 6 + for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } +}; + +var mem = createCommonjsModule(function (module) { +'use strict'; + + +const cacheStore = new WeakMap(); + +const defaultCacheKey = function (x) { + if (arguments.length === 1 && (x === null || x === undefined || (typeof x !== 'function' && typeof x !== 'object'))) { + return x; + } + + return JSON.stringify(arguments); +}; + +module.exports = (fn, opts) => { + opts = Object.assign({ + cacheKey: defaultCacheKey, + cache: new Map() + }, opts); + + const memoized = function () { + const cache = cacheStore.get(memoized); + const key = opts.cacheKey.apply(null, arguments); + + if (cache.has(key)) { + const c = cache.get(key); + + if (typeof opts.maxAge !== 'number' || Date.now() < c.maxAge) { + return c.data; + } + } + + const 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 = fn => { + const 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() { + /* 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() {}; + +// 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, 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) +} + +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 = 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(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 () { + return this._data.size + }, + set: function (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.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.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 = 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 (key) { + return Symbol.for(key) + }; +} else { + makeSymbol = function (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 (mL) { + if (!mL || !(typeof mL === 'number') || mL <= 0) { + mL = Infinity; + } + this[MAX] = mL; + trim(this); + }, + get: function () { + return this[MAX] + }, + enumerable: true +}); + +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function (allowStale) { + this[ALLOW_STALE] = !!allowStale; + }, + get: function () { + return this[ALLOW_STALE] + }, + enumerable: true +}); + +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function (mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0; + } + this[MAX_AGE] = mA; + trim(this); + }, + get: function () { + return this[MAX_AGE] + }, + enumerable: true +}); + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function (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(this); + }, + get: function () { return this[LENGTH_CALCULATOR] }, + enumerable: true +}); + +Object.defineProperty(LRUCache.prototype, 'length', { + get: function () { return this[LENGTH] }, + enumerable: true +}); + +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function () { 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(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(); // 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(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(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(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(this, node); + return node.value +}; + +LRUCache.prototype.del = function (key) { + del(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(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 (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(self, walker); + walker = prev; + } + } +} + +function del (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() { 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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, 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 }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); + +/** + * 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.readFile(file, 'utf8', function (err, data) { + if (err) { + reject(err); + return; + } + resolve(parseString(data)); + }); + })]; + }); + }); +} +exports.parse = parse; +function parseSync(file) { + return parseString(fs.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$1 = "editorconfig"; +var version$2 = "0.15.0"; +var description$1 = "EditorConfig File Locator and Interpreter for Node.js"; +var keywords = ["editorconfig","core"]; +var main$1 = "index.js"; +var bin$1 = {"editorconfig":"bin/editorconfig"}; +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 tslint.json","copy":"cpy package.json .npmignore LICENSE README.md CHANGELOG.md dist && cpy src/bin/* dist/bin && cpy src/lib/fnmatch*.* dist/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$1 = "https://github.com/editorconfig/editorconfig-core-js/issues"; +var author$1 = "EditorConfig Team"; +var license$1 = "MIT"; +var dependencies$1 = {"@types/commander":"^2.11.0","@types/semver":"^5.4.0","commander":"^2.11.0","lru-cache":"^4.1.1","semver":"^5.4.1","sigmund":"^1.0.1"}; +var devDependencies$1 = {"@types/mocha":"^2.2.43","cpy-cli":"^1.0.1","eclint":"^2.4.3","mocha":"^4.0.1","rimraf":"^2.6.2","should":"^13.1.2","tslint":"^5.7.0","typescript":"^2.5.3"}; +var _package$2 = { + name: name$1, + version: version$2, + description: description$1, + keywords: keywords, + main: main$1, + bin: bin$1, + contributors: contributors, + directories: directories, + scripts: scripts$1, + repository: repository$1, + bugs: bugs$1, + author: author$1, + license: license$1, + dependencies: dependencies$1, + devDependencies: devDependencies$1 +}; + +var _package$3 = Object.freeze({ + name: name$1, + version: version$2, + description: description$1, + keywords: keywords, + main: main$1, + bin: bin$1, + contributors: contributors, + directories: directories, + scripts: scripts$1, + repository: repository$1, + bugs: bugs$1, + author: author$1, + license: license$1, + dependencies: dependencies$1, + devDependencies: devDependencies$1, + default: _package$2 +}); + +var pkg = ( _package$3 && _package$2 ) || _package$3; + +var editorconfig = 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() { 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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, 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 }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); + + + + + +exports.parseString = ini.parseString; +// tslint:disable-next-line:no-var-requires + +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(filepath, glob, matchOptions); +} +function getConfigFileNames(filepath, options) { + var paths = []; + do { + filepath = path.dirname(filepath); + paths.push(path.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$3.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 || pkg.version, + root: path.resolve(options.root || path.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.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.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.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.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.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(editorconfig); + +var editorconfigToPrettier = editorConfigToPrettier; + +function editorConfigToPrettier(editorConfig) { + if (!editorConfig || Object.keys(editorConfig).length === 0) { + return null; + } + + const 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; + } + + 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"; + + + + + + + + +const maybeParse = (filePath, config, parse) => { + const root = findProjectRoot(path.dirname(path.resolve(filePath))); + return filePath && parse(filePath, { root }); +}; + +const editorconfigAsyncNoCache = (filePath, config) => { + return Promise.resolve(maybeParse(filePath, config, editorconfig.parse)).then( + editorconfigToPrettier + ); +}; +const editorconfigAsyncWithCache = mem(editorconfigAsyncNoCache); + +const editorconfigSyncNoCache = (filePath, config) => { + return editorconfigToPrettier( + maybeParse(filePath, config, editorconfig.parseSync) + ); +}; +const editorconfigSyncWithCache = mem(editorconfigSyncNoCache); + +function getLoadFunction(opts) { + if (!opts.editorconfig) { + 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 thirdParty$1 = ( thirdParty && thirdParty__default ) || thirdParty; + +var resolveConfig_1 = createCommonjsModule(function (module) { +"use strict"; + + + + + + + + +const getExplorerMemoized = mem(opts => + thirdParty$1.cosmiconfig("prettier", { + sync: opts.sync, + cache: opts.cache, + rcExtensions: true, + transform: result => { + if (result && result.config) { + delete result.config.$schema; + } + return result; + } + }) +); + +/** @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); + const loadOpts = { + cache: !!opts.useCache, + sync: !!sync, + editorconfig: !!opts.editorconfig + }; + const load = getLoadFunction(loadOpts); + const loadEditorConfig = resolveConfigEditorconfig.getLoadFunction(loadOpts); + const arr = [load, loadEditorConfig].map(l => l(filePath, opts.config)); + + const unwrapAndMerge = arr => { + const result = arr[0]; + const editorConfigured = arr[1]; + const merged = Object.assign( + {}, + editorConfigured, + mergeOverrides(Object.assign({}, result), filePath) + ); + + if (!result && !editorConfigured) { + return null; + } + + return merged; + }; + + if (loadOpts.sync) { + return unwrapAndMerge(arr); + } + + return Promise.all(arr).then(unwrapAndMerge); +} + +const resolveConfig = (filePath, opts) => _resolveConfig(filePath, opts, false); + +resolveConfig.sync = (filePath, opts) => _resolveConfig(filePath, opts, true); + +function clearCache() { + mem.clear(getExplorerMemoized); + resolveConfigEditorconfig.clearCache(); +} + +function resolveConfigFile(filePath) { + const load = getLoadFunction({ sync: false }); + return load(filePath).then(result => { + return result ? result.filepath : null; + }); +} + +resolveConfigFile.sync = filePath => { + const load = getLoadFunction({ sync: true }); + const result = load(filePath); + return result ? result.filepath : null; +}; + +function mergeOverrides(configResult, filePath) { + const options = Object.assign({}, configResult.config); + if (filePath && options.overrides) { + const relativeFilePath = path.relative( + path.dirname(configResult.filepath), + filePath + ); + for (const override of options.overrides) { + if ( + pathMatchesGlobs( + relativeFilePath, + override.files, + override.excludeFiles + ) + ) { + Object.assign(options, override.options); + } + } + } + + 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) { + const patternList = [].concat(patterns); + const excludedPatternList = [].concat(excludedPatterns || []); + const opts = { matchBase: true }; + + return ( + patternList.some(pattern => minimatch_1(filePath, pattern, opts)) && + !excludedPatternList.some(excludedPattern => + minimatch_1(filePath, excludedPattern, opts) + ) + ); +} + +module.exports = { + resolveConfig, + resolveConfigFile, + clearCache +}; +}); + +const version = require$$0$11.version; + + + +const getSupportInfo = support.getSupportInfo; + + + +const normalizeOptions = options$12.normalize; + + + + + +const printDocToString = doc.printer.printDocToString; +const printDocToDebug = doc.debug.printDocToDebug; + +function guessLineEnding(text) { + const index = text.indexOf("\n"); + if (index >= 0 && text.charAt(index - 1) === "\r") { + return "\r\n"; + } + return "\n"; +} + +function attachComments(text, ast, opts) { + const astComments = ast.comments; + if (astComments) { + delete ast.comments; + comments.attach(astComments, ast, text, opts); + } + ast.tokens = []; + opts.originalText = text.trimRight(); + return astComments; +} + +function ensureAllCommentsPrinted(astComments) { + if (!astComments) { + return; + } + + for (let 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(comment => { + if (!comment.printed) { + throw new Error( + 'Comment "' + + comment.value.trim() + + '" was not printed. Please report this error!' + ); + } + delete comment.printed; + }); +} + +function formatWithCursor(text, opts, addAlignmentSize) { + const selectedParser = parser$3.resolveParser(opts); + const hasPragma = !selectedParser.hasPragma || selectedParser.hasPragma(text); + if (opts.requirePragma && !hasPragma) { + return { formatted: text }; + } + + const UTF8BOM = 0xfeff; + const hasUnicodeBOM = text.charCodeAt(0) === UTF8BOM; + if (hasUnicodeBOM) { + text = text.substring(1); + } + + if ( + opts.insertPragma && + opts.printer.insertPragma && + !hasPragma && + opts.rangeStart === 0 && + opts.rangeEnd === Infinity + ) { + text = opts.printer.insertPragma(text); + } + + addAlignmentSize = addAlignmentSize || 0; + + const result = parser$3.parse(text, opts); + const ast = result.ast; + text = result.text; + + const formattedRangeOnly = formatRange(text, opts, ast); + if (formattedRangeOnly) { + return { formatted: formattedRangeOnly }; + } + + let cursorOffset; + if (opts.cursorOffset >= 0) { + const cursorNodeAndParents = findNodeAtOffset(ast, opts.cursorOffset, opts); + const cursorNode = cursorNodeAndParents.node; + if (cursorNode) { + cursorOffset = opts.cursorOffset - opts.locStart(cursorNode); + opts.cursorNode = cursorNode; + } + } + + const astComments = attachComments(text, ast, opts); + const doc$$1 = astToDoc(ast, opts, addAlignmentSize); + opts.newLine = guessLineEnding(text); + const toStringResult = printDocToString(doc$$1, opts); + let str = toStringResult.formatted; + if (hasUnicodeBOM) { + str = String.fromCharCode(UTF8BOM) + str; + } + const cursorOffsetResult = toStringResult.cursor; + ensureAllCommentsPrinted(astComments); + // Remove extra leading indentation as well as the added indentation after last newline + if (addAlignmentSize > 0) { + return { formatted: str.trim() + opts.newLine }; + } + + if (cursorOffset !== undefined) { + return { + formatted: str, + cursorOffset: cursorOffsetResult + cursorOffset + }; + } + + return { formatted: str }; +} + +function format(text, opts, addAlignmentSize) { + return formatWithCursor(text, opts, addAlignmentSize).formatted; +} + +function findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts) { + let resultStartNode = startNodeAndParents.node; + let resultEndNode = endNodeAndParents.node; + + if (resultStartNode === resultEndNode) { + return { + startNode: resultStartNode, + endNode: resultEndNode + }; + } + + for (const endParent of endNodeAndParents.parentNodes) { + if ( + endParent.type !== "Program" && + endParent.type !== "File" && + opts.locStart(endParent) >= opts.locStart(startNodeAndParents.node) + ) { + resultEndNode = endParent; + } else { + break; + } + } + + for (const startParent of startNodeAndParents.parentNodes) { + if ( + startParent.type !== "Program" && + startParent.type !== "File" && + opts.locEnd(startParent) <= opts.locEnd(endNodeAndParents.node) + ) { + resultStartNode = startParent; + } else { + break; + } + } + + return { + startNode: resultStartNode, + endNode: resultEndNode + }; +} + +function findNodeAtOffset(node, offset, options, predicate, parentNodes) { + predicate = predicate || (() => true); + parentNodes = parentNodes || []; + const start = options.locStart(node, options.locStart); + const end = options.locEnd(node, options.locEnd); + if (start <= offset && offset <= end) { + for (const childNode of comments.getSortedChildNodes( + node, + undefined /* text */, + options + )) { + const childResult = findNodeAtOffset( + childNode, + offset, + options, + predicate, + [node].concat(parentNodes) + ); + if (childResult) { + return childResult; + } + } + + 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 + const 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 + ]; + const jsonSourceElements = [ + "ObjectExpression", + "ArrayExpression", + "StringLiteral", + "NumericLiteral", + "BooleanLiteral", + "NullLiteral" + ]; + const 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; + } + 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. + const rangeStringOrig = text.slice(opts.rangeStart, opts.rangeEnd); + const startNonWhitespace = Math.max( + opts.rangeStart + rangeStringOrig.search(/\S/), + opts.rangeStart + ); + let endNonWhitespace; + for ( + endNonWhitespace = opts.rangeEnd; + endNonWhitespace > opts.rangeStart; + --endNonWhitespace + ) { + if (text[endNonWhitespace - 1].match(/\S/)) { + break; + } + } + + const startNodeAndParents = findNodeAtOffset( + ast, + startNonWhitespace, + opts, + node => isSourceElement(opts, node) + ); + const endNodeAndParents = findNodeAtOffset( + ast, + endNonWhitespace, + opts, + node => isSourceElement(opts, node) + ); + + if (!startNodeAndParents || !endNodeAndParents) { + return { + rangeStart: 0, + rangeEnd: 0 + }; + } + + const siblingAncestors = findSiblingAncestors( + startNodeAndParents, + endNodeAndParents, + opts + ); + const startNode = siblingAncestors.startNode; + const endNode = siblingAncestors.endNode; + const rangeStart = Math.min( + opts.locStart(startNode, opts.locStart), + opts.locStart(endNode, opts.locStart) + ); + const rangeEnd = Math.max( + opts.locEnd(startNode, opts.locEnd), + opts.locEnd(endNode, opts.locEnd) + ); + + return { + rangeStart: rangeStart, + rangeEnd: rangeEnd + }; +} + +function formatRange(text, opts, ast) { + if (opts.rangeStart <= 0 && text.length <= opts.rangeEnd) { + return; + } + + const range = calculateRange(text, opts, ast); + const rangeStart = range.rangeStart; + const rangeEnd = range.rangeEnd; + const 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 + const rangeStart2 = Math.min( + rangeStart, + text.lastIndexOf("\n", rangeStart) + 1 + ); + const indentString = text.slice(rangeStart2, rangeStart); + + const alignmentSize = util$1.getAlignmentSize( + indentString, + opts.tabWidth + ); + + const rangeFormatted = format( + rangeString, + Object.assign({}, opts, { + rangeStart: 0, + rangeEnd: Infinity, + printWidth: opts.printWidth - alignmentSize + }), + alignmentSize + ); + + // Since the range contracts to avoid trailing whitespace, + // we need to remove the newline that was inserted by the `format` call. + const rangeTrimmed = rangeFormatted.trimRight(); + + return text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd); +} + +var prettier$2 = { + formatWithCursor: function(text, opts) { + return formatWithCursor(text, normalizeOptions(opts)); + }, + + format: function(text, opts) { + return format(text, normalizeOptions(opts)); + }, + + check: function(text, opts) { + try { + const formatted = format(text, normalizeOptions(opts)); + return formatted === text; + } catch (e) { + return false; + } + }, + + doc, + + resolveConfig: resolveConfig_1.resolveConfig, + clearConfigCache: resolveConfig_1.clearCache, + + getSupportInfo, + + version, + + util: utilShared, + + /* istanbul ignore next */ + __debug: { + parse: function(text, opts) { + opts = normalizeOptions(opts); + return parser$3.parse(text, opts); + }, + formatAST: function(ast, opts) { + opts = normalizeOptions(opts); + const doc$$1 = astToDoc(ast, opts); + const str = printDocToString(doc$$1, opts); + return str; + }, + // Doesn't handle shebang for now + formatDoc: function(doc$$1, opts) { + opts = normalizeOptions(opts); + const debug = printDocToDebug(doc$$1); + const str = format(debug, opts); + return str; + }, + printToDoc: function(text, opts) { + opts = normalizeOptions(opts); + const result = parser$3.parse(text, opts); + const ast = result.ast; + text = result.text; + attachComments(text, ast, opts); + const doc$$1 = astToDoc(ast, opts); + return doc$$1; + }, + printDocToString: function(doc$$1, opts) { + opts = normalizeOptions(opts); + const str = printDocToString(doc$$1, opts); + return str; + } + } +}; + +var at; +var ch; +var escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + }; +var text; +var error = function (m) { + // Call error when something is wrong. + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text + }; + }; +var next = function (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 = function () { + // 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 = function () { + // 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 () { + +// Skip whitespace. + + while (ch && ch <= ' ') { + next(); + } + }; +var word = function () { + +// 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 = function () { + +// 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 = function () { + +// Parse an object value. + + var key, + object = {}; + + if (ch === '{') { + next('{'); + white(); + if (ch === '}') { + next('}'); + return object; // empty object + } + while (ch) { + key = string(); + 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 () { + +// Parse a JSON value. It could be an object, an array, a string, a number, +// or a word. + + white(); + switch (ch) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && ch <= '9' ? number() : word(); + } +}; + +// Return the json_parse function. It will have access to all of the above +// functions and variables. + +var parse$6 = function (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$8; +var meta = { // 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[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$8; + 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 (value, replacer, space) { + var i; + gap = ''; + indent$8 = ''; + + // 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$8 += ' '; + } + } + // If the space parameter is a string, it will be used as the indent string. + else if (typeof space === 'string') { + indent$8 = 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$5 = parse$6; +var stringify = stringify$1; + +var jsonify = { + parse: parse$5, + stringify: stringify +}; + +var json = typeof JSON !== 'undefined' ? JSON : jsonify; + +var jsonStableStringify = function (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.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.stringify(null); + out.push(indent + space + item); + } + return '[' + out.join(',') + indent + ']'; + } + else { + if (seen.indexOf(node) !== -1) { + if (cycles) return json.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.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) { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + + for (let i = 0; i < str.length; i++) { + const 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 (str) { + if (arguments.length > 1) { + str = Array.from(arguments) + .map(x => x.trim()) + .filter(x => 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; + } + + const hasUpperCase = str !== str.toLowerCase(); + + if (hasUpperCase) { + str = preserveCamelCase(str); + } + + return str + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, (m, p1) => 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 PENDING = 'pending'; +var SETTLED = 'settled'; +var FULFILLED = 'fulfilled'; +var REJECTED = 'rejected'; +var NOOP = function () {}; +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$3(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$3(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$3(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$3(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 (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 (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 () { + return arrayUniq([].concat.apply([], arguments)); +}; + +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty$1 = 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$1.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; +}; + +// 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 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(); +} + +// Regexp that finds the next partion of a (partial) path +// 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$3 = process.version; +var ok = /^v[0-5]\./.test(version$3); + + +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 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.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; +} +}); + +var inherits = createCommonjsModule(function (module) { +try { + var util$$2 = util; + if (typeof util$$2.inherits !== 'function') throw ''; + module.exports = util$$2.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 = { + 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$4 = globSync; +globSync.GlobSync = GlobSync$1; + + + + +var setopts$1 = common.setopts; +var ownProp$1 = common.ownProp; +var childrenIgnored$1 = common.childrenIgnored; +var isIgnored$1 = common.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.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.mark(this, p) +}; + +GlobSync$1.prototype._makeAbs = function (f) { + return common.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 () { + return once(this) + }, + configurable: true + }); + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }); +}); + +function once (fn) { + var f = function () { + 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 () { + 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 +} + +// Approach: +// +// 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.setopts; +var ownProp = common.ownProp; + + +var childrenIgnored = common.childrenIgnored; +var isIgnored = common.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$4(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = sync$4; +var GlobSync = glob.GlobSync = sync$4.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.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.mark(this, p) +}; + +Glob.prototype._makeAbs = function (f) { + return common.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 (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 (key) { + var match = function (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 (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$3 = function (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 (patterns, opts) { + return [].concat(patterns).some(function (pattern) { + return glob_1.hasMagic(pattern, opts); + }); +}; + +globby.sync = sync$3; +globby.generateGlobTasks = generateGlobTasks_1; +globby.hasMagic = hasMagic; + +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; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var ignore = function () { + 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(this, IgnoreBase); + + this._rules = []; + this[KEY_IGNORE] = true; + this._initCache(); + } + + _createClass(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$1 = 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$1.call(this, path$$1, slices); + }; +} + +var ansiStyles$3 = createCommonjsModule(function (module) { +'use strict'; + + +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +function assembleStyles() { + const 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; + + Object.keys(styles).forEach(groupName => { + const group = styles[groupName]; + + Object.keys(group).forEach(styleName => { + const style = group[styleName]; + + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + const rgb2rgb = (r, g, b) => [r, g, b]; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = {}; + styles.color.ansi256 = {}; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + + styles.bgColor.ansi = {}; + styles.bgColor.ansi256 = {}; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + for (const key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } + + const suite = colorConvert[key]; + + 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; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); +}); + +var hasFlag$3 = function (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$3 = createCommonjsModule(function (module) { +'use strict'; + + + +const env = process.env; + +const support = level => { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +}; + +let supportLevel = (() => { + 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. + const osRelease = os.release().split('.'); + if ( + Number(process.version.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return 2; + } + + return 1; + } + + if ('CI' in env) { + if ('TRAVIS' in env || env.CI === 'Travis' || 'CIRCLECI' in env) { + 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) { + const 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 (/^(screen|xterm)-256(?:color)?/.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|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'; +const TEMPLATE_REGEX = /(?:\\(u[a-f0-9]{4}|x[a-f0-9]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; +const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; +const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; +const ESCAPE_REGEX = /\\(u[0-9a-f]{4}|x[0-9a-f]{2}|.)|([^\\])/gi; + +const 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) { + const results = []; + const chunks = args.trim().split(/\s*,\s*/g); + let matches; + + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if ((matches = chunk.match(STRING_REGEX))) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + + return results; +} + +function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + + const results = []; + let matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; +} + +function buildStyle(chalk, styles) { + const enabled = {}; + + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + + let current = chalk; + for (const styleName of Object.keys(enabled)) { + 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 = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + + // eslint-disable-next-line max-params + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + const 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) { + const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); +}; +}); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = supportsColor$3 ? supportsColor$3.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) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const 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$3.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles$3)) { + ansiStyles$3[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles$3[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles$3[key]; + return build$1.call(this, this._styles ? this._styles.concat(codes) : [codes], key); + } + }; +} + +ansiStyles$3.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles$3.color.close), 'g'); +for (const model of Object.keys(ansiStyles$3.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles$3.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles$3.color.close, + closeRe: ansiStyles$3.color.closeRe + }; + return build$1.call(this, this._styles ? this._styles.concat(codes) : [codes], model); + }; + } + }; +} + +ansiStyles$3.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles$3.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles$3.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles$3.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles$3.bgColor.close, + closeRe: ansiStyles$3.bgColor.closeRe + }; + return build$1.call(this, this._styles ? this._styles.concat(codes) : [codes], model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build$1(_styles, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + + const 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 + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let 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. + const originalDim = ansiStyles$3.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles$3.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // 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 + ansiStyles$3.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(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let 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 = supportsColor$3; + +chalk$2.supportsColor = supportsColor_1; + +var minimist = function (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); +} + +const PLACEHOLDER = null; + +/** + * unspecified boolean flag without default value is parsed as `undefined` instead of `false` + */ +var minimist_1 = function(args, options) { + const boolean = options.boolean || []; + const defaults = options.default || {}; + + const booleanWithoutDefault = boolean.filter(key => !(key in defaults)); + const newDefaults = Object.assign( + {}, + defaults, + booleanWithoutDefault.reduce( + (reduced, key) => Object.assign(reduced, { [key]: PLACEHOLDER }), + {} + ) + ); + + const parsed = minimist( + args, + Object.assign({}, options, { default: newDefaults }) + ); + + return Object.keys(parsed).reduce((reduced, key) => { + if (parsed[key] !== PLACEHOLDER) { + reduced[key] = parsed[key]; + } + return reduced; + }, {}); +}; + +function cleanAST$1(ast, options) { + return JSON.stringify(massageAST(ast, options), null, 2); +} + +function massageAST(ast, options, parent) { + if (Array.isArray(ast)) { + return ast.map(e => massageAST(e, options, parent)).filter(e => e); + } + + if (!ast || typeof ast !== "object") { + return ast; + } + + const newObj = {}; + for (const key in ast) { + if (typeof ast[key] !== "function") { + newObj[key] = massageAST(ast[key], options, ast); + } + } + + [ + "loc", + "range", + "raw", + "comments", + "leadingComments", + "trailingComments", + "extra", + "start", + "end", + "tokens", + "flags", + "raws", + "sourceIndex", + "id", + "source", + "before", + "after", + "trailingComma", + "parent", + "prev", + "position" + ].forEach(name => { + delete newObj[name]; + }); + + if (options.printer.massageAstNode) { + const result = options.printer.massageAstNode(ast, newObj, parent); + if (result === null) { + return undefined; + } + if (result) { + return result; + } + } + + return newObj; +} + +var cleanAst = { cleanAST: cleanAST$1, massageAST }; + +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$1 = 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$1); + +var line$7 = 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$7); + +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$1 = 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$7.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$1); + +var array$1 = 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$1); + +var parse$8 = 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$8); + +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$8.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$8.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$7.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$6 = 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$1.diffWords; +/*istanbul ignore start*/exports. /*istanbul ignore end*/diffWordsWithSpace = word$1.diffWordsWithSpace; +/*istanbul ignore start*/exports. /*istanbul ignore end*/diffLines = line$7.diffLines; +/*istanbul ignore start*/exports. /*istanbul ignore end*/diffTrimmedLines = line$7.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$1.diffJson; +/*istanbul ignore start*/exports. /*istanbul ignore end*/diffArrays = array$1.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$8.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$1.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$6); + +const cleanAST = cleanAst.cleanAST; + + + + + + +const getSupportInfo$3 = support.getSupportInfo; + + +const OPTION_USAGE_THRESHOLD = 25; +const CHOICE_USAGE_MARGIN = 3; +const CHOICE_USAGE_INDENTATION = 2; + +function getOptions(argv, detailedOptions) { + return detailedOptions.filter(option => option.forwardToApi).reduce( + (current, option) => + Object.assign(current, { + [option.forwardToApi]: argv[option.name] + }), + {} + ); +} + +function cliifyOptions(object, apiDetailedOptionMap) { + return Object.keys(object || {}).reduce((output, key) => { + const apiOption = apiDetailedOptionMap[key]; + const cliKey = apiOption ? apiOption.name : key; + + output[dashify(cliKey)] = object[key]; + return output; + }, {}); +} + +function diff(a, b) { + return lib$6.createTwoFilesPatch("", "", a, b, "", "", { + context: 2 + }); +} + +function handleError(context, filename, error) { + const isParseError = Boolean(error && error.loc); + const 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, filePath) { + const configFile = resolveConfig_1.resolveConfigFile.sync(filePath); + if (configFile) { + context.logger.log(path.relative(process.cwd(), configFile)); + } else { + process.exit(1); + } +} + +function writeOutput(result, options) { + // Don't use `console.log` here since it adds an extra newline at the end. + process.stdout.write(result.formatted); + + if (options.cursorOffset >= 0) { + process.stderr.write(result.cursorOffset + "\n"); + } +} + +function listDifferent(context, input, options, filename) { + if (!context.argv["list-different"]) { + return; + } + + options = Object.assign({}, options, { filepath: filename }); + + if (!prettier$2.check(input, options)) { + if (!context.argv["write"]) { + context.logger.log(filename); + } + process.exitCode = 1; + } + + return true; +} + +function format$1(context, input, opt) { + if (context.argv["debug-print-doc"]) { + const doc = prettier$2.__debug.printToDoc(input, opt); + return { formatted: prettier$2.__debug.formatDoc(doc) }; + } + + if (context.argv["debug-check"]) { + const pp = prettier$2.format(input, opt); + const pppp = prettier$2.format(pp, opt); + if (pp !== pppp) { + throw new errors.DebugError( + "prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp) + ); + } else { + const normalizedOpts = options$12.normalize(opt); + const ast = cleanAST( + prettier$2.__debug.parse(input, opt).ast, + normalizedOpts + ); + const past = cleanAST( + prettier$2.__debug.parse(pp, opt).ast, + normalizedOpts + ); + + if (ast !== past) { + const MAX_AST_SIZE = 2097152; // 2MB + const 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: opt.filepath || "(stdin)\n" }; + } + + 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}'` + ); + + const options = resolveConfig_1.resolveConfig.sync(filePath, { + editorconfig: context.argv["editorconfig"], + config: context.argv["config"] + }); + + context.logger.debug("loaded options `" + JSON.stringify(options) + "`"); + return options; + } catch (error) { + context.logger.error("Invalid configuration file: " + error.message); + process.exit(2); + } +} + +function getOptionsForFile(context, filepath) { + const options = getOptionsOrDie(context, filepath); + + const hasPlugins = options && options.plugins; + if (hasPlugins) { + pushContextPlugins(context, options.plugins); + } + + const appliedOptions = Object.assign( + { filepath }, + applyConfigPrecedence( + context, + options && + optionsNormalizer.normalizeApiOptions(options, 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) { + const minimistOptions = createMinimistOptions(context.detailedOptions); + const 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) { + try { + switch (context.argv["config-precedence"]) { + case "cli-override": + return parseArgsToOptions(context, options); + case "file-override": + return Object.assign({}, parseArgsToOptions(context), options); + case "prefer-file": + return options || parseArgsToOptions(context); + } + } catch (error) { + context.logger.error(error.toString()); + process.exit(2); + } +} + +function formatStdin(context) { + const filepath = context.argv["stdin-filepath"] + ? path.resolve(process.cwd(), context.argv["stdin-filepath"]) + : process.cwd(); + + const ignorer = createIgnorer(context); + const relativeFilepath = path.relative(process.cwd(), filepath); + + thirdParty$1.getStream(process.stdin).then(input => { + if (relativeFilepath && ignorer.filter([relativeFilepath]).length === 0) { + writeOutput({ formatted: input }, {}); + return; + } + + const options = getOptionsForFile(context, filepath); + + if (listDifferent(context, input, options, "(stdin)")) { + return; + } + + try { + writeOutput(format$1(context, input, options), options); + } catch (error) { + handleError(context, "stdin", error); + } + }); +} + +function createIgnorer(context) { + const ignoreFilePath = path.resolve(context.argv["ignore-path"]); + let ignoreText = ""; + + try { + ignoreText = fs.readFileSync(ignoreFilePath, "utf8"); + } catch (readError) { + if (readError.code !== "ENOENT") { + context.logger.error( + `Unable to read ${ignoreFilePath}: ` + readError.message + ); + process.exit(2); + } + } + + return ignore().add(ignoreText); +} + +function eachFilename(context, patterns, callback) { + const ignoreNodeModules = context.argv["with-node-modules"] !== true; + if (ignoreNodeModules) { + patterns = patterns.concat(["!**/node_modules/**", "!./node_modules/**"]); + } + + try { + const filePaths = globby + .sync(patterns, { dot: true, nodir: true }) + .map(filePath => 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(filePath => + callback(filePath, getOptionsForFile(context, 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 + const ignorer = createIgnorer(context); + + eachFilename(context, context.filePatterns, (filename, options) => { + const 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 }); + } + + let 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({ formatted: input }, options); + return; + } + + listDifferent(context, input, options, filename); + + const start = Date.now(); + + let result; + let output; + + try { + result = format$1( + context, + input, + Object.assign({}, options, { filepath: filename }) + ); + output = result.formatted; + } catch (error) { + // Add newline to split errors from filename line. + process.stdout.write("\n"); + + handleError(context, filename, error); + return; + } + + 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 (output === input) { + if (!context.argv["list-different"]) { + context.logger.log(`${chalk$2.grey(filename)} ${Date.now() - start}ms`); + } + } else { + if (context.argv["list-different"]) { + context.logger.log(filename); + } else { + 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["debug-check"]) { + if (output) { + context.logger.log(output); + } else { + process.exitCode = 2; + } + } else if (!context.argv["list-different"]) { + writeOutput(result, options); + } + }); +} + +function getOptionsWithOpposites(options) { + // Add --no-foo after --foo. + const optionsWithOpposites = options.map(option => [ + 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) { + const options = getOptionsWithOpposites(context.detailedOptions).filter( + // remove unnecessary option (e.g. `semi`, `color`, etc.), which is only used for --help + option => + !( + option.type === "boolean" && + option.oppositeDescription && + !option.name.startsWith("no-") + ) + ); + + const groupedOptions = groupBy(options, option => option.category); + + const firstCategories = constant.categoryOrder.slice(0, -1); + const lastCategories = constant.categoryOrder.slice(-1); + const restCategories = Object.keys(groupedOptions).filter( + category => + firstCategories.indexOf(category) === -1 && + lastCategories.indexOf(category) === -1 + ); + const allCategories = firstCategories.concat(restCategories, lastCategories); + + const optionsUsage = allCategories.map(category => { + const categoryOptions = groupedOptions[category] + .map(option => createOptionUsage(context, option, OPTION_USAGE_THRESHOLD)) + .join("\n"); + return `${category} options:\n\n${indent$9(categoryOptions, 2)}`; + }); + + return [constant.usageSummary].concat(optionsUsage, [""]).join("\n\n"); +} + +function createOptionUsage(context, option, threshold) { + const header = createOptionUsageHeader(option); + const 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) { + const name = `--${option.name}`; + const alias = option.alias ? `-${option.alias},` : null; + const type = createOptionUsageType(option); + return [alias, name, type].filter(Boolean).join(" "); +} + +function createOptionUsageRow(header, content, threshold) { + const separator = + header.length >= threshold + ? `\n${" ".repeat(threshold)}` + : " ".repeat(threshold - header.length); + + const 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(choice => !choice.deprecated) + .map(choice => choice.value) + .join("|")}>`; + default: + return `<${option.type}>`; + } +} + +function flattenArray(array) { + return [].concat.apply([], array); +} + +function getOptionWithLevenSuggestion(context, options, optionName) { + // support aliases + const optionNameContainers = flattenArray( + options.map((option, index) => [ + { value: option.name, index }, + option.alias ? { value: option.alias, index } : null + ]) + ).filter(Boolean); + + const optionNameContainer = optionNameContainers.find( + optionNameContainer => optionNameContainer.value === optionName + ); + + if (optionNameContainer !== undefined) { + return options[optionNameContainer.index]; + } + + const suggestedOptionNameContainer = optionNameContainers.find( + optionNameContainer => leven(optionNameContainer.value, optionName) < 3 + ); + + if (suggestedOptionNameContainer !== undefined) { + const suggestedOptionName = suggestedOptionNameContainer.value; + context.logger.warn( + `Unknown option name "${optionName}", did you mean "${suggestedOptionName}"?` + ); + + return options[suggestedOptionNameContainer.index]; + } + + context.logger.warn(`Unknown option name "${optionName}"`); + return options.find(option => option.name === "help"); +} + +function createChoiceUsages(choices, margin, indentation) { + const activeChoices = choices.filter(choice => !choice.deprecated); + const threshold = + activeChoices + .map(choice => choice.value.length) + .reduce((current, length) => Math.max(current, length), 0) + margin; + return activeChoices.map(choice => + indent$9( + createOptionUsageRow(choice.value, choice.description, threshold), + indentation + ) + ); +} + +function createDetailedUsage(context, optionName) { + const option = getOptionWithLevenSuggestion( + context, + getOptionsWithOpposites(context.detailedOptions), + optionName + ); + + const header = createOptionUsageHeader(option); + const description = `\n\n${indent$9(option.description, 2)}`; + + const choices = + option.type !== "choice" + ? "" + : `\n\nValid options:\n\n${createChoiceUsages( + option.choices, + CHOICE_USAGE_MARGIN, + CHOICE_USAGE_INDENTATION + ).join("\n")}`; + + const optionDefaultValue = getOptionDefaultValue(context, option.name); + const defaults = + optionDefaultValue !== undefined + ? `\n\nDefault: ${createDefaultValueDisplay(optionDefaultValue)}` + : ""; + + const pluginDefaults = + option.pluginDefaults && Object.keys(option.pluginDefaults).length + ? `\nPlugin defaults:${Object.keys(option.pluginDefaults).map( + key => + `\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; + } + + const option = context.detailedOptionMap[optionName]; + + if (option.default !== undefined) { + return option.default; + } + + const optionCamelName = camelcase(optionName); + if (optionCamelName in context.apiDefaultOptions) { + return context.apiDefaultOptions[optionCamelName]; + } + + return undefined; +} + +function indent$9(str, spaces) { + return str.replace(/^/gm, " ".repeat(spaces)); +} + +function groupBy(array, getKey) { + return array.reduce((obj, item) => { + const key = getKey(item); + const 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( + (reduced, key) => 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 () => {}; + } + + const prefix = color ? `[${chalk$2[color](loggerName)}] ` : ""; + return function(message, opts) { + opts = Object.assign({ newline: true }, opts); + const 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: constant.CATEGORY_OTHER }, option, { + choices: + option.choices && + option.choices.map(choice => { + const 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((normalized, name) => { + const option = detailedOptionMap[name]; + return Object.assign(normalized, { + [name]: normalizeDetailedOption(name, option) + }); + }, {}); +} + +function createMinimistOptions(detailedOptions) { + return { + boolean: detailedOptions + .filter(option => option.type === "boolean") + .map(option => option.name), + string: detailedOptions + .filter(option => option.type !== "boolean") + .map(option => option.name), + default: detailedOptions + .filter(option => !option.deprecated) + .filter(option => !option.forwardToApi || option.name === "plugin") + .filter(option => option.default !== undefined) + .reduce( + (current, option) => + Object.assign({ [option.name]: option.default }, current), + {} + ), + alias: detailedOptions + .filter(option => option.alias !== undefined) + .reduce( + (current, option) => + Object.assign({ [option.name]: option.alias }, current), + {} + ) + }; +} + +function createApiDetailedOptionMap(detailedOptions) { + return detailedOptions.reduce( + (current, option) => + option.forwardToApi && option.forwardToApi !== option.name + ? Object.assign(current, { [option.forwardToApi]: option }) + : current, + {} + ); +} + +function createDetailedOptionMap(supportOptions) { + return supportOptions.reduce((reduced, option) => { + const newOption = Object.assign({}, option, { + name: option.cliName || dashify(option.name), + description: option.cliDescription || option.description, + category: option.cliCategory || constant.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) { + const context = { args }; + + updateContextArgv(context); + normalizeContextArgv(context, ["loglevel", "plugin"]); + + context.logger = createLogger(context.argv["loglevel"]); + + updateContextArgv(context, context.argv["plugin"]); + + 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) { + const supportOptions = getSupportInfo$3(null, { + showDeprecated: true, + showUnreleased: true, + showInternal: true, + plugins + }).options; + + const detailedOptionMap = normalizeDetailedOptionMap( + Object.assign({}, createDetailedOptionMap(supportOptions), constant.options) + ); + + const detailedOptions = util$1.arrayify(detailedOptionMap, "name"); + + const apiDefaultOptions = supportOptions + .filter(optionInfo => !optionInfo.deprecated) + .reduce( + (reduced, optionInfo) => + Object.assign(reduced, { [optionInfo.name]: optionInfo.default }), + Object.assign({}, options$12.hiddenDefaults) + ); + + context.supportOptions = supportOptions; + context.detailedOptions = detailedOptions; + context.detailedOptionMap = detailedOptionMap; + context.apiDefaultOptions = apiDefaultOptions; +} + +function pushContextPlugins(context, plugins) { + context._supportOptions = context.supportOptions; + context._detailedOptions = context.detailedOptions; + context._detailedOptionMap = context.detailedOptionMap; + context._apiDefaultOptions = context.apiDefaultOptions; + updateContextOptions(context, plugins); +} + +function popContextPlugins(context) { + context.supportOptions = context._supportOptions; + context.detailedOptions = context._detailedOptions; + context.detailedOptionMap = context._detailedOptionMap; + context.apiDefaultOptions = context._apiDefaultOptions; +} + +function updateContextArgv(context, plugins) { + pushContextPlugins(context, plugins); + + const minimistOptions = createMinimistOptions(context.detailedOptions); + const argv = minimist_1(context.args, minimistOptions); + + context.argv = argv; + context.filePatterns = argv["_"]; +} + +function normalizeContextArgv(context, keys) { + const detailedOptions = !keys + ? context.detailedOptions + : context.detailedOptions.filter( + option => keys.indexOf(option.name) !== -1 + ); + const argv = !keys ? context.argv : pick(context.argv, keys); + + context.argv = optionsNormalizer.normalizeCliOptions(argv, detailedOptions, { + logger: context.logger + }); +} +//------------------------------context-util-end-------------------------------- + +var util_1 = { + createContext, + createDetailedOptionMap, + createDetailedUsage, + createUsage, + format: format$1, + formatFiles, + formatStdin, + initContext, + logResolvedConfigPathOrDie, + normalizeDetailedOptionMap +}; + +function run(args) { + const context = util_1.createContext(args); + + try { + util_1.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["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_1.createDetailedUsage(context, context.argv["help"]) + : util_1.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); + } + + const hasFilePatterns = context.filePatterns.length !== 0; + const useStdin = + context.argv["stdin"] || (!hasFilePatterns && !process.stdin.isTTY); + + if (context.argv["find-config-path"]) { + util_1.logResolvedConfigPathOrDie( + context, + context.argv["find-config-path"] + ); + } else if (useStdin) { + util_1.formatStdin(context); + } else if (hasFilePatterns) { + util_1.formatFiles(context); + } else { + context.logger.log(util_1.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/Colorui-UniApp/node_modules/prettier/index.js b/Colorui-UniApp/node_modules/prettier/index.js new file mode 100644 index 0000000..b6233b2 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/index.js @@ -0,0 +1,29708 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var fs = _interopDefault(require('fs')); +var path = _interopDefault(require('path')); +var util = _interopDefault(require('util')); +var url = _interopDefault(require('url')); +var assert = _interopDefault(require('assert')); +var os = _interopDefault(require('os')); +var thirdParty = require('./third-party'); +var thirdParty__default = thirdParty['default']; + +var name = "prettier"; +var version$1 = "1.12.1"; +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":">=4"}; +var dependencies = {"@babel/code-frame":"7.0.0-beta.40","@glimmer/syntax":"0.30.3","babylon":"7.0.0-beta.34","camelcase":"4.1.0","chalk":"2.1.0","cjk-regex":"1.0.2","cosmiconfig":"3.1.0","dashify":"0.2.2","dedent":"0.7.0","diff":"3.2.0","editorconfig":"0.15.0","editorconfig-to-prettier":"0.0.6","emoji-regex":"6.5.1","escape-string-regexp":"1.0.5","esutils":"2.0.2","find-project-root":"1.1.1","flow-parser":"0.69","get-stream":"3.0.0","globby":"6.1.0","graphql":"0.13.2","gray-matter":"3.1.1","html-tag-names":"1.1.2","ignore":"3.3.7","jest-docblock":"22.2.2","json-stable-stringify":"1.0.1","leven":"2.1.0","mem":"1.1.0","minimatch":"3.0.4","minimist":"1.2.0","parse5":"3.0.3","postcss-less":"1.1.5","postcss-media-query-parser":"0.2.3","postcss-scss":"1.0.5","postcss-selector-parser":"2.2.3","postcss-values-parser":"1.5.0","read-pkg-up":"3.0.0","remark-frontmatter":"1.1.0","remark-parse":"5.0.0","resolve":"1.5.0","semver":"5.4.1","string-width":"2.1.1","typescript":"2.8.0-rc","typescript-eslint-parser":"14.0.0","unicode-regex":"1.0.1","unified":"6.1.6"}; +var devDependencies = {"babel-cli":"6.24.1","babel-preset-es2015":"6.24.1","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","jest":"21.1.0","mkdirp":"0.5.1","prettier":"1.12.0","prettylint":"1.0.0","rimraf":"2.6.2","rollup":"0.47.6","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","shelljs":"0.8.1","snapshot-diff":"0.2.2","strip-ansi":"4.0.0","tempy":"0.2.1","uglify-es":"3.3.9","webpack":"2.6.1"}; +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","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 ./scripts/build/build.js","build-docs":"node ./scripts/build/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, + 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, + scripts: scripts, + default: _package +}); + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); +} + +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 ansiRegex = createCommonjsModule(function (module) { +'use strict'; + +module.exports = () => { + const 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 = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; + +var isFullwidthCodePoint = createCommonjsModule(function (module) { +'use strict'; +/* eslint-disable yoda */ +module.exports = 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 = str => { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + str = stripAnsi(str); + + let width = 0; + + for (let i = 0; i < str.length; i++) { + const 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 () { + // 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\uDFA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[\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 matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +var escapeStringRegexp = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +var punctuation_ranges = [ + // http://www.unicode.org/charts/PDF/U3000.pdf CJK Symbols and Punctuation + [0x3000, 0x303f], + // http://www.unicode.org/charts/PDF/UAC00.pdf Hangul Syllables + [0xac00, 0xd7af], + // http://www.unicode.org/charts/PDF/UFE10.pdf Vertical Forms + [0xfe10, 0xfe1f], + // http://www.unicode.org/charts/PDF/UFE30.pdf CJK Compatibility Forms + // http://www.unicode.org/charts/PDF/UFE50.pdf Small Form Variants + [0xfe30, 0xfe6f], + // http://www.unicode.org/charts/PDF/UFF00.pdf Halfwidth and Fullwidth Forms + [0xff00, 0xff60], + [0xffe0, 0xffef], +]; +var character_ranges = [ + // http://www.unicode.org/charts/PDF/U1100.pdf Hangul Jamo + [0x1100, 0x11ff], + // http://www.unicode.org/charts/PDF/U2E80.pdf CJK Radicals Supplement + // http://www.unicode.org/charts/PDF/U2F00.pdf Kangxi Radicals + [0x2e80, 0x2fdf], + // http://www.unicode.org/charts/PDF/U3040.pdf Hiragana + // http://www.unicode.org/charts/PDF/U30A0.pdf Katakana + // http://www.unicode.org/charts/PDF/U3100.pdf Bopomofo + // http://www.unicode.org/charts/PDF/U3130.pdf Hangul Compatibility Jamo + [0x3040, 0x318f], + // http://www.unicode.org/charts/PDF/U3200.pdf Enclosed CJK Letters and Months + // http://www.unicode.org/charts/PDF/U3300.pdf CJK Compatibility + // http://www.unicode.org/charts/PDF/U3400.pdf CJK Unified Ideographs Extension A + [0x3200, 0x4dbf], + // http://www.unicode.org/charts/PDF/U4E00.pdf CJK Unified Ideographs (Han) + [0x4e00, 0x9fff], + // http://www.unicode.org/charts/PDF/UA960.pdf Hangul Jamo Extended-A + [0xa960, 0xa97f], + // http://www.unicode.org/charts/PDF/UF900.pdf CJK Compatibility Ideographs + [0xf900, 0xfaff], +]; +function get_regex() { + return create_regex(character_ranges.concat(punctuation_ranges)); +} +// istanbul ignore next +// tslint:disable-next-line:no-namespace +(function (get_regex) { + function punctuations() { + return create_regex(punctuation_ranges); + } + get_regex.punctuations = punctuations; + function characters() { + return create_regex(character_ranges); + } + get_regex.characters = characters; +})(get_regex || (get_regex = {})); +function create_regex(ranges) { + return new RegExp("[" + ranges.map(get_bracket_content).reduce(function (a, b) { return a + b; }) + "]", 'g'); +} +function get_bracket_content(range) { + return get_escaped_unicode(range[0]) + "-" + get_escaped_unicode(range[1]); +} +function get_escaped_unicode(num) { + return "\\u" + num.toString(16); +} +var lib = get_regex; + +var data_generated = createCommonjsModule(function (module, exports) { +"use strict"; +exports.__esModule = true; +exports.get_data = function () { return ({ "Pc": [[95, 95], [8255, 8256], [8276, 8276], [65075, 65076], [65101, 65103], [65343, 65343]], "Pe": [[41, 41], [93, 93], [125, 125], [3899, 3899], [3901, 3901], [5788, 5788], [8262, 8262], [8318, 8318], [8334, 8334], [8969, 8969], [8971, 8971], [9002, 9002], [10089, 10089], [10091, 10091], [10093, 10093], [10095, 10095], [10097, 10097], [10099, 10099], [10101, 10101], [10182, 10182], [10215, 10215], [10217, 10217], [10219, 10219], [10221, 10221], [10223, 10223], [10628, 10628], [10630, 10630], [10632, 10632], [10634, 10634], [10636, 10636], [10638, 10638], [10640, 10640], [10642, 10642], [10644, 10644], [10646, 10646], [10648, 10648], [10713, 10713], [10715, 10715], [10749, 10749], [11811, 11811], [11813, 11813], [11815, 11815], [11817, 11817], [12297, 12297], [12299, 12299], [12301, 12301], [12303, 12303], [12305, 12305], [12309, 12309], [12311, 12311], [12313, 12313], [12315, 12315], [12318, 12319], [64830, 64830], [65048, 65048], [65078, 65078], [65080, 65080], [65082, 65082], [65084, 65084], [65086, 65086], [65088, 65088], [65090, 65090], [65092, 65092], [65096, 65096], [65114, 65114], [65116, 65116], [65118, 65118], [65289, 65289], [65341, 65341], [65373, 65373], [65376, 65376], [65379, 65379]], "Ps": [[40, 40], [91, 91], [123, 123], [3898, 3898], [3900, 3900], [5787, 5787], [8218, 8218], [8222, 8222], [8261, 8261], [8317, 8317], [8333, 8333], [8968, 8968], [8970, 8970], [9001, 9001], [10088, 10088], [10090, 10090], [10092, 10092], [10094, 10094], [10096, 10096], [10098, 10098], [10100, 10100], [10181, 10181], [10214, 10214], [10216, 10216], [10218, 10218], [10220, 10220], [10222, 10222], [10627, 10627], [10629, 10629], [10631, 10631], [10633, 10633], [10635, 10635], [10637, 10637], [10639, 10639], [10641, 10641], [10643, 10643], [10645, 10645], [10647, 10647], [10712, 10712], [10714, 10714], [10748, 10748], [11810, 11810], [11812, 11812], [11814, 11814], [11816, 11816], [11842, 11842], [12296, 12296], [12298, 12298], [12300, 12300], [12302, 12302], [12304, 12304], [12308, 12308], [12310, 12310], [12312, 12312], [12314, 12314], [12317, 12317], [64831, 64831], [65047, 65047], [65077, 65077], [65079, 65079], [65081, 65081], [65083, 65083], [65085, 65085], [65087, 65087], [65089, 65089], [65091, 65091], [65095, 65095], [65113, 65113], [65115, 65115], [65117, 65117], [65288, 65288], [65339, 65339], [65371, 65371], [65375, 65375], [65378, 65378]], "Lm": [[688, 705], [710, 721], [736, 740], [748, 748], [750, 750], [884, 884], [890, 890], [1369, 1369], [1600, 1600], [1765, 1766], [2036, 2037], [2042, 2042], [2074, 2074], [2084, 2084], [2088, 2088], [2417, 2417], [3654, 3654], [3782, 3782], [4348, 4348], [6103, 6103], [6211, 6211], [6823, 6823], [7288, 7293], [7468, 7530], [7544, 7544], [7579, 7615], [8305, 8305], [8319, 8319], [8336, 8348], [11388, 11389], [11631, 11631], [11823, 11823], [12293, 12293], [12337, 12341], [12347, 12347], [12445, 12446], [12540, 12542], [40981, 40981], [42232, 42237], [42508, 42508], [42623, 42623], [42652, 42653], [42775, 42783], [42864, 42864], [42888, 42888], [43000, 43001], [43471, 43471], [43494, 43494], [43632, 43632], [43741, 43741], [43763, 43764], [43868, 43871], [65392, 65392], [65438, 65439]], "Mc": [[2307, 2307], [2363, 2363], [2366, 2368], [2377, 2380], [2382, 2383], [2434, 2435], [2494, 2496], [2503, 2504], [2507, 2508], [2519, 2519], [2563, 2563], [2622, 2624], [2691, 2691], [2750, 2752], [2761, 2761], [2763, 2764], [2818, 2819], [2878, 2878], [2880, 2880], [2887, 2888], [2891, 2892], [2903, 2903], [3006, 3007], [3009, 3010], [3014, 3016], [3018, 3020], [3031, 3031], [3073, 3075], [3137, 3140], [3202, 3203], [3262, 3262], [3264, 3268], [3271, 3272], [3274, 3275], [3285, 3286], [3330, 3331], [3390, 3392], [3398, 3400], [3402, 3404], [3415, 3415], [3458, 3459], [3535, 3537], [3544, 3551], [3570, 3571], [3902, 3903], [3967, 3967], [4139, 4140], [4145, 4145], [4152, 4152], [4155, 4156], [4182, 4183], [4194, 4196], [4199, 4205], [4227, 4228], [4231, 4236], [4239, 4239], [4250, 4252], [6070, 6070], [6078, 6085], [6087, 6088], [6435, 6438], [6441, 6443], [6448, 6449], [6451, 6456], [6681, 6682], [6741, 6741], [6743, 6743], [6753, 6753], [6755, 6756], [6765, 6770], [6916, 6916], [6965, 6965], [6971, 6971], [6973, 6977], [6979, 6980], [7042, 7042], [7073, 7073], [7078, 7079], [7082, 7082], [7143, 7143], [7146, 7148], [7150, 7150], [7154, 7155], [7204, 7211], [7220, 7221], [7393, 7393], [7410, 7411], [7415, 7415], [12334, 12335], [43043, 43044], [43047, 43047], [43136, 43137], [43188, 43203], [43346, 43347], [43395, 43395], [43444, 43445], [43450, 43451], [43453, 43456], [43567, 43568], [43571, 43572], [43597, 43597], [43643, 43643], [43645, 43645], [43755, 43755], [43758, 43759], [43765, 43765], [44003, 44004], [44006, 44007], [44009, 44010], [44012, 44012]], "Zp": [[8233, 8233]], "Sc": [[36, 36], [162, 165], [1423, 1423], [1547, 1547], [2546, 2547], [2555, 2555], [2801, 2801], [3065, 3065], [3647, 3647], [6107, 6107], [8352, 8383], [43064, 43064], [65020, 65020], [65129, 65129], [65284, 65284], [65504, 65505], [65509, 65510]], "Me": [[1160, 1161], [6846, 6846], [8413, 8416], [8418, 8420], [42608, 42610]], "Sk": [[94, 94], [96, 96], [168, 168], [175, 175], [180, 180], [184, 184], [706, 709], [722, 735], [741, 747], [749, 749], [751, 767], [885, 885], [900, 901], [8125, 8125], [8127, 8129], [8141, 8143], [8157, 8159], [8173, 8175], [8189, 8190], [12443, 12444], [42752, 42774], [42784, 42785], [42889, 42890], [43867, 43867], [64434, 64449], [65342, 65342], [65344, 65344], [65507, 65507]], "Cs": [[55296, 55296], [56191, 56192], [56319, 56320], [57343, 57343]], "Nl": [[5870, 5872], [8544, 8578], [8581, 8584], [12295, 12295], [12321, 12329], [12344, 12346], [42726, 42735]], "So": [[166, 166], [169, 169], [174, 174], [176, 176], [1154, 1154], [1421, 1422], [1550, 1551], [1758, 1758], [1769, 1769], [1789, 1790], [2038, 2038], [2554, 2554], [2928, 2928], [3059, 3064], [3066, 3066], [3199, 3199], [3407, 3407], [3449, 3449], [3841, 3843], [3859, 3859], [3861, 3863], [3866, 3871], [3892, 3892], [3894, 3894], [3896, 3896], [4030, 4037], [4039, 4044], [4046, 4047], [4053, 4056], [4254, 4255], [5008, 5017], [6464, 6464], [6622, 6655], [7009, 7018], [7028, 7036], [8448, 8449], [8451, 8454], [8456, 8457], [8468, 8468], [8470, 8471], [8478, 8483], [8485, 8485], [8487, 8487], [8489, 8489], [8494, 8494], [8506, 8507], [8522, 8522], [8524, 8525], [8527, 8527], [8586, 8587], [8597, 8601], [8604, 8607], [8609, 8610], [8612, 8613], [8615, 8621], [8623, 8653], [8656, 8657], [8659, 8659], [8661, 8691], [8960, 8967], [8972, 8991], [8994, 9000], [9003, 9083], [9085, 9114], [9140, 9179], [9186, 9254], [9280, 9290], [9372, 9449], [9472, 9654], [9656, 9664], [9666, 9719], [9728, 9838], [9840, 10087], [10132, 10175], [10240, 10495], [11008, 11055], [11077, 11078], [11085, 11123], [11126, 11157], [11160, 11193], [11197, 11208], [11210, 11218], [11244, 11247], [11493, 11498], [11904, 11929], [11931, 12019], [12032, 12245], [12272, 12283], [12292, 12292], [12306, 12307], [12320, 12320], [12342, 12343], [12350, 12351], [12688, 12689], [12694, 12703], [12736, 12771], [12800, 12830], [12842, 12871], [12880, 12880], [12896, 12927], [12938, 12976], [12992, 13054], [13056, 13311], [19904, 19967], [42128, 42182], [43048, 43051], [43062, 43063], [43065, 43065], [43639, 43641], [65021, 65021], [65508, 65508], [65512, 65512], [65517, 65518], [65532, 65533]], "Lt": [[453, 453], [456, 456], [459, 459], [498, 498], [8072, 8079], [8088, 8095], [8104, 8111], [8124, 8124], [8140, 8140], [8188, 8188]], "Zl": [[8232, 8232]], "Lo": [[170, 170], [186, 186], [443, 443], [448, 451], [660, 660], [1488, 1514], [1520, 1522], [1568, 1599], [1601, 1610], [1646, 1647], [1649, 1747], [1749, 1749], [1774, 1775], [1786, 1788], [1791, 1791], [1808, 1808], [1810, 1839], [1869, 1957], [1969, 1969], [1994, 2026], [2048, 2069], [2112, 2136], [2144, 2154], [2208, 2228], [2230, 2237], [2308, 2361], [2365, 2365], [2384, 2384], [2392, 2401], [2418, 2432], [2437, 2444], [2447, 2448], [2451, 2472], [2474, 2480], [2482, 2482], [2486, 2489], [2493, 2493], [2510, 2510], [2524, 2525], [2527, 2529], [2544, 2545], [2556, 2556], [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], [2809, 2809], [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, 3129], [3133, 3133], [3160, 3162], [3168, 3169], [3200, 3200], [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], [3412, 3414], [3423, 3425], [3450, 3455], [3461, 3478], [3482, 3505], [3507, 3515], [3517, 3517], [3520, 3526], [3585, 3632], [3634, 3635], [3648, 3653], [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], [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], [4304, 4346], [4349, 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], [5121, 5740], [5743, 5759], [5761, 5786], [5792, 5866], [5873, 5880], [5888, 5900], [5902, 5905], [5920, 5937], [5952, 5969], [5984, 5996], [5998, 6000], [6016, 6067], [6108, 6108], [6176, 6210], [6212, 6263], [6272, 6276], [6279, 6312], [6314, 6314], [6320, 6389], [6400, 6430], [6480, 6509], [6512, 6516], [6528, 6571], [6576, 6601], [6656, 6678], [6688, 6740], [6917, 6963], [6981, 6987], [7043, 7072], [7086, 7087], [7098, 7141], [7168, 7203], [7245, 7247], [7258, 7287], [7401, 7404], [7406, 7409], [7413, 7414], [8501, 8504], [11568, 11623], [11648, 11670], [11680, 11686], [11688, 11694], [11696, 11702], [11704, 11710], [11712, 11718], [11720, 11726], [11728, 11734], [11736, 11742], [12294, 12294], [12348, 12348], [12353, 12438], [12447, 12447], [12449, 12538], [12543, 12543], [12549, 12590], [12593, 12686], [12704, 12730], [12784, 12799], [13312, 13312], [19893, 19893], [19968, 19968], [40938, 40938], [40960, 40980], [40982, 42124], [42192, 42231], [42240, 42507], [42512, 42527], [42538, 42539], [42606, 42606], [42656, 42725], [42895, 42895], [42999, 42999], [43003, 43009], [43011, 43013], [43015, 43018], [43020, 43042], [43072, 43123], [43138, 43187], [43250, 43255], [43259, 43259], [43261, 43261], [43274, 43301], [43312, 43334], [43360, 43388], [43396, 43442], [43488, 43492], [43495, 43503], [43514, 43518], [43520, 43560], [43584, 43586], [43588, 43595], [43616, 43631], [43633, 43638], [43642, 43642], [43646, 43695], [43697, 43697], [43701, 43702], [43705, 43709], [43712, 43712], [43714, 43714], [43739, 43740], [43744, 43754], [43762, 43762], [43777, 43782], [43785, 43790], [43793, 43798], [43808, 43814], [43816, 43822], [43968, 44002], [44032, 44032], [55203, 55203], [55216, 55238], [55243, 55291], [63744, 64109], [64112, 64217], [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], [65382, 65391], [65393, 65437], [65440, 65470], [65474, 65479], [65482, 65487], [65490, 65495], [65498, 65500]], "Mn": [[768, 879], [1155, 1159], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1552, 1562], [1611, 1631], [1648, 1648], [1750, 1756], [1759, 1764], [1767, 1768], [1770, 1773], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2093], [2137, 2139], [2260, 2273], [2275, 2306], [2362, 2362], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2391], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2641, 2641], [2672, 2673], [2677, 2677], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2810, 2815], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2884], [2893, 2893], [2902, 2902], [2914, 2915], [2946, 2946], [3008, 3008], [3021, 3021], [3072, 3072], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3170, 3171], [3201, 3201], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3328, 3329], [3387, 3388], [3393, 3396], [3405, 3405], [3426, 3427], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3981, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4151], [4153, 4154], [4157, 4158], [4184, 4185], [4190, 4192], [4209, 4212], [4226, 4226], [4229, 4230], [4237, 4237], [4253, 4253], [4957, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6277, 6278], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6683, 6683], [6742, 6742], [6744, 6750], [6752, 6752], [6754, 6754], [6757, 6764], [6771, 6780], [6783, 6783], [6832, 6845], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7040, 7041], [7074, 7077], [7080, 7081], [7083, 7085], [7142, 7142], [7144, 7145], [7149, 7149], [7151, 7153], [7212, 7219], [7222, 7223], [7376, 7378], [7380, 7392], [7394, 7400], [7405, 7405], [7412, 7412], [7416, 7417], [7616, 7673], [7675, 7679], [8400, 8412], [8417, 8417], [8421, 8432], [11503, 11505], [11647, 11647], [11744, 11775], [12330, 12333], [12441, 12442], [42607, 42607], [42612, 42621], [42654, 42655], [42736, 42737], [43010, 43010], [43014, 43014], [43019, 43019], [43045, 43046], [43204, 43205], [43232, 43249], [43302, 43309], [43335, 43345], [43392, 43394], [43443, 43443], [43446, 43449], [43452, 43452], [43493, 43493], [43561, 43566], [43569, 43570], [43573, 43574], [43587, 43587], [43596, 43596], [43644, 43644], [43696, 43696], [43698, 43700], [43703, 43704], [43710, 43711], [43713, 43713], [43756, 43757], [43766, 43766], [44005, 44005], [44008, 44008], [44013, 44013], [64286, 64286], [65024, 65039], [65056, 65071]], "Po": [[33, 35], [37, 39], [42, 42], [44, 44], [46, 47], [58, 59], [63, 64], [92, 92], [161, 161], [167, 167], [182, 183], [191, 191], [894, 894], [903, 903], [1370, 1375], [1417, 1417], [1472, 1472], [1475, 1475], [1478, 1478], [1523, 1524], [1545, 1546], [1548, 1549], [1563, 1563], [1566, 1567], [1642, 1645], [1748, 1748], [1792, 1805], [2039, 2041], [2096, 2110], [2142, 2142], [2404, 2405], [2416, 2416], [2557, 2557], [2800, 2800], [3572, 3572], [3663, 3663], [3674, 3675], [3844, 3858], [3860, 3860], [3973, 3973], [4048, 4052], [4057, 4058], [4170, 4175], [4347, 4347], [4960, 4968], [5741, 5742], [5867, 5869], [5941, 5942], [6100, 6102], [6104, 6106], [6144, 6149], [6151, 6154], [6468, 6469], [6686, 6687], [6816, 6822], [6824, 6829], [7002, 7008], [7164, 7167], [7227, 7231], [7294, 7295], [7360, 7367], [7379, 7379], [8214, 8215], [8224, 8231], [8240, 8248], [8251, 8254], [8257, 8259], [8263, 8273], [8275, 8275], [8277, 8286], [11513, 11516], [11518, 11519], [11632, 11632], [11776, 11777], [11782, 11784], [11787, 11787], [11790, 11798], [11800, 11801], [11803, 11803], [11806, 11807], [11818, 11822], [11824, 11833], [11836, 11839], [11841, 11841], [11843, 11849], [12289, 12291], [12349, 12349], [12539, 12539], [42238, 42239], [42509, 42511], [42611, 42611], [42622, 42622], [42738, 42743], [43124, 43127], [43214, 43215], [43256, 43258], [43260, 43260], [43310, 43311], [43359, 43359], [43457, 43469], [43486, 43487], [43612, 43615], [43742, 43743], [43760, 43761], [44011, 44011], [65040, 65046], [65049, 65049], [65072, 65072], [65093, 65094], [65097, 65100], [65104, 65106], [65108, 65111], [65119, 65121], [65128, 65128], [65130, 65131], [65281, 65283], [65285, 65287], [65290, 65290], [65292, 65292], [65294, 65295], [65306, 65307], [65311, 65312], [65340, 65340], [65377, 65377], [65380, 65381]], "Co": [[57344, 57344], [63743, 63743]], "Sm": [[43, 43], [60, 62], [124, 124], [126, 126], [172, 172], [177, 177], [215, 215], [247, 247], [1014, 1014], [1542, 1544], [8260, 8260], [8274, 8274], [8314, 8316], [8330, 8332], [8472, 8472], [8512, 8516], [8523, 8523], [8592, 8596], [8602, 8603], [8608, 8608], [8611, 8611], [8614, 8614], [8622, 8622], [8654, 8655], [8658, 8658], [8660, 8660], [8692, 8959], [8992, 8993], [9084, 9084], [9115, 9139], [9180, 9185], [9655, 9655], [9665, 9665], [9720, 9727], [9839, 9839], [10176, 10180], [10183, 10213], [10224, 10239], [10496, 10626], [10649, 10711], [10716, 10747], [10750, 11007], [11056, 11076], [11079, 11084], [64297, 64297], [65122, 65122], [65124, 65126], [65291, 65291], [65308, 65310], [65372, 65372], [65374, 65374], [65506, 65506], [65513, 65516]], "Pf": [[187, 187], [8217, 8217], [8221, 8221], [8250, 8250], [11779, 11779], [11781, 11781], [11786, 11786], [11789, 11789], [11805, 11805], [11809, 11809]], "Cc": [[0, 31], [127, 159]], "Pi": [[171, 171], [8216, 8216], [8219, 8220], [8223, 8223], [8249, 8249], [11778, 11778], [11780, 11780], [11785, 11785], [11788, 11788], [11804, 11804], [11808, 11808]], "Lu": [[65, 90], [192, 214], [216, 222], [256, 256], [258, 258], [260, 260], [262, 262], [264, 264], [266, 266], [268, 268], [270, 270], [272, 272], [274, 274], [276, 276], [278, 278], [280, 280], [282, 282], [284, 284], [286, 286], [288, 288], [290, 290], [292, 292], [294, 294], [296, 296], [298, 298], [300, 300], [302, 302], [304, 304], [306, 306], [308, 308], [310, 310], [313, 313], [315, 315], [317, 317], [319, 319], [321, 321], [323, 323], [325, 325], [327, 327], [330, 330], [332, 332], [334, 334], [336, 336], [338, 338], [340, 340], [342, 342], [344, 344], [346, 346], [348, 348], [350, 350], [352, 352], [354, 354], [356, 356], [358, 358], [360, 360], [362, 362], [364, 364], [366, 366], [368, 368], [370, 370], [372, 372], [374, 374], [376, 377], [379, 379], [381, 381], [385, 386], [388, 388], [390, 391], [393, 395], [398, 401], [403, 404], [406, 408], [412, 413], [415, 416], [418, 418], [420, 420], [422, 423], [425, 425], [428, 428], [430, 431], [433, 435], [437, 437], [439, 440], [444, 444], [452, 452], [455, 455], [458, 458], [461, 461], [463, 463], [465, 465], [467, 467], [469, 469], [471, 471], [473, 473], [475, 475], [478, 478], [480, 480], [482, 482], [484, 484], [486, 486], [488, 488], [490, 490], [492, 492], [494, 494], [497, 497], [500, 500], [502, 504], [506, 506], [508, 508], [510, 510], [512, 512], [514, 514], [516, 516], [518, 518], [520, 520], [522, 522], [524, 524], [526, 526], [528, 528], [530, 530], [532, 532], [534, 534], [536, 536], [538, 538], [540, 540], [542, 542], [544, 544], [546, 546], [548, 548], [550, 550], [552, 552], [554, 554], [556, 556], [558, 558], [560, 560], [562, 562], [570, 571], [573, 574], [577, 577], [579, 582], [584, 584], [586, 586], [588, 588], [590, 590], [880, 880], [882, 882], [886, 886], [895, 895], [902, 902], [904, 906], [908, 908], [910, 911], [913, 929], [931, 939], [975, 975], [978, 980], [984, 984], [986, 986], [988, 988], [990, 990], [992, 992], [994, 994], [996, 996], [998, 998], [1000, 1000], [1002, 1002], [1004, 1004], [1006, 1006], [1012, 1012], [1015, 1015], [1017, 1018], [1021, 1071], [1120, 1120], [1122, 1122], [1124, 1124], [1126, 1126], [1128, 1128], [1130, 1130], [1132, 1132], [1134, 1134], [1136, 1136], [1138, 1138], [1140, 1140], [1142, 1142], [1144, 1144], [1146, 1146], [1148, 1148], [1150, 1150], [1152, 1152], [1162, 1162], [1164, 1164], [1166, 1166], [1168, 1168], [1170, 1170], [1172, 1172], [1174, 1174], [1176, 1176], [1178, 1178], [1180, 1180], [1182, 1182], [1184, 1184], [1186, 1186], [1188, 1188], [1190, 1190], [1192, 1192], [1194, 1194], [1196, 1196], [1198, 1198], [1200, 1200], [1202, 1202], [1204, 1204], [1206, 1206], [1208, 1208], [1210, 1210], [1212, 1212], [1214, 1214], [1216, 1217], [1219, 1219], [1221, 1221], [1223, 1223], [1225, 1225], [1227, 1227], [1229, 1229], [1232, 1232], [1234, 1234], [1236, 1236], [1238, 1238], [1240, 1240], [1242, 1242], [1244, 1244], [1246, 1246], [1248, 1248], [1250, 1250], [1252, 1252], [1254, 1254], [1256, 1256], [1258, 1258], [1260, 1260], [1262, 1262], [1264, 1264], [1266, 1266], [1268, 1268], [1270, 1270], [1272, 1272], [1274, 1274], [1276, 1276], [1278, 1278], [1280, 1280], [1282, 1282], [1284, 1284], [1286, 1286], [1288, 1288], [1290, 1290], [1292, 1292], [1294, 1294], [1296, 1296], [1298, 1298], [1300, 1300], [1302, 1302], [1304, 1304], [1306, 1306], [1308, 1308], [1310, 1310], [1312, 1312], [1314, 1314], [1316, 1316], [1318, 1318], [1320, 1320], [1322, 1322], [1324, 1324], [1326, 1326], [1329, 1366], [4256, 4293], [4295, 4295], [4301, 4301], [5024, 5109], [7680, 7680], [7682, 7682], [7684, 7684], [7686, 7686], [7688, 7688], [7690, 7690], [7692, 7692], [7694, 7694], [7696, 7696], [7698, 7698], [7700, 7700], [7702, 7702], [7704, 7704], [7706, 7706], [7708, 7708], [7710, 7710], [7712, 7712], [7714, 7714], [7716, 7716], [7718, 7718], [7720, 7720], [7722, 7722], [7724, 7724], [7726, 7726], [7728, 7728], [7730, 7730], [7732, 7732], [7734, 7734], [7736, 7736], [7738, 7738], [7740, 7740], [7742, 7742], [7744, 7744], [7746, 7746], [7748, 7748], [7750, 7750], [7752, 7752], [7754, 7754], [7756, 7756], [7758, 7758], [7760, 7760], [7762, 7762], [7764, 7764], [7766, 7766], [7768, 7768], [7770, 7770], [7772, 7772], [7774, 7774], [7776, 7776], [7778, 7778], [7780, 7780], [7782, 7782], [7784, 7784], [7786, 7786], [7788, 7788], [7790, 7790], [7792, 7792], [7794, 7794], [7796, 7796], [7798, 7798], [7800, 7800], [7802, 7802], [7804, 7804], [7806, 7806], [7808, 7808], [7810, 7810], [7812, 7812], [7814, 7814], [7816, 7816], [7818, 7818], [7820, 7820], [7822, 7822], [7824, 7824], [7826, 7826], [7828, 7828], [7838, 7838], [7840, 7840], [7842, 7842], [7844, 7844], [7846, 7846], [7848, 7848], [7850, 7850], [7852, 7852], [7854, 7854], [7856, 7856], [7858, 7858], [7860, 7860], [7862, 7862], [7864, 7864], [7866, 7866], [7868, 7868], [7870, 7870], [7872, 7872], [7874, 7874], [7876, 7876], [7878, 7878], [7880, 7880], [7882, 7882], [7884, 7884], [7886, 7886], [7888, 7888], [7890, 7890], [7892, 7892], [7894, 7894], [7896, 7896], [7898, 7898], [7900, 7900], [7902, 7902], [7904, 7904], [7906, 7906], [7908, 7908], [7910, 7910], [7912, 7912], [7914, 7914], [7916, 7916], [7918, 7918], [7920, 7920], [7922, 7922], [7924, 7924], [7926, 7926], [7928, 7928], [7930, 7930], [7932, 7932], [7934, 7934], [7944, 7951], [7960, 7965], [7976, 7983], [7992, 7999], [8008, 8013], [8025, 8025], [8027, 8027], [8029, 8029], [8031, 8031], [8040, 8047], [8120, 8123], [8136, 8139], [8152, 8155], [8168, 8172], [8184, 8187], [8450, 8450], [8455, 8455], [8459, 8461], [8464, 8466], [8469, 8469], [8473, 8477], [8484, 8484], [8486, 8486], [8488, 8488], [8490, 8493], [8496, 8499], [8510, 8511], [8517, 8517], [8579, 8579], [11264, 11310], [11360, 11360], [11362, 11364], [11367, 11367], [11369, 11369], [11371, 11371], [11373, 11376], [11378, 11378], [11381, 11381], [11390, 11392], [11394, 11394], [11396, 11396], [11398, 11398], [11400, 11400], [11402, 11402], [11404, 11404], [11406, 11406], [11408, 11408], [11410, 11410], [11412, 11412], [11414, 11414], [11416, 11416], [11418, 11418], [11420, 11420], [11422, 11422], [11424, 11424], [11426, 11426], [11428, 11428], [11430, 11430], [11432, 11432], [11434, 11434], [11436, 11436], [11438, 11438], [11440, 11440], [11442, 11442], [11444, 11444], [11446, 11446], [11448, 11448], [11450, 11450], [11452, 11452], [11454, 11454], [11456, 11456], [11458, 11458], [11460, 11460], [11462, 11462], [11464, 11464], [11466, 11466], [11468, 11468], [11470, 11470], [11472, 11472], [11474, 11474], [11476, 11476], [11478, 11478], [11480, 11480], [11482, 11482], [11484, 11484], [11486, 11486], [11488, 11488], [11490, 11490], [11499, 11499], [11501, 11501], [11506, 11506], [42560, 42560], [42562, 42562], [42564, 42564], [42566, 42566], [42568, 42568], [42570, 42570], [42572, 42572], [42574, 42574], [42576, 42576], [42578, 42578], [42580, 42580], [42582, 42582], [42584, 42584], [42586, 42586], [42588, 42588], [42590, 42590], [42592, 42592], [42594, 42594], [42596, 42596], [42598, 42598], [42600, 42600], [42602, 42602], [42604, 42604], [42624, 42624], [42626, 42626], [42628, 42628], [42630, 42630], [42632, 42632], [42634, 42634], [42636, 42636], [42638, 42638], [42640, 42640], [42642, 42642], [42644, 42644], [42646, 42646], [42648, 42648], [42650, 42650], [42786, 42786], [42788, 42788], [42790, 42790], [42792, 42792], [42794, 42794], [42796, 42796], [42798, 42798], [42802, 42802], [42804, 42804], [42806, 42806], [42808, 42808], [42810, 42810], [42812, 42812], [42814, 42814], [42816, 42816], [42818, 42818], [42820, 42820], [42822, 42822], [42824, 42824], [42826, 42826], [42828, 42828], [42830, 42830], [42832, 42832], [42834, 42834], [42836, 42836], [42838, 42838], [42840, 42840], [42842, 42842], [42844, 42844], [42846, 42846], [42848, 42848], [42850, 42850], [42852, 42852], [42854, 42854], [42856, 42856], [42858, 42858], [42860, 42860], [42862, 42862], [42873, 42873], [42875, 42875], [42877, 42878], [42880, 42880], [42882, 42882], [42884, 42884], [42886, 42886], [42891, 42891], [42893, 42893], [42896, 42896], [42898, 42898], [42902, 42902], [42904, 42904], [42906, 42906], [42908, 42908], [42910, 42910], [42912, 42912], [42914, 42914], [42916, 42916], [42918, 42918], [42920, 42920], [42922, 42926], [42928, 42932], [42934, 42934], [65313, 65338]], "Pd": [[45, 45], [1418, 1418], [1470, 1470], [5120, 5120], [6150, 6150], [8208, 8213], [11799, 11799], [11802, 11802], [11834, 11835], [11840, 11840], [12316, 12316], [12336, 12336], [12448, 12448], [65073, 65074], [65112, 65112], [65123, 65123], [65293, 65293]], "Cf": [[173, 173], [1536, 1541], [1564, 1564], [1757, 1757], [1807, 1807], [2274, 2274], [6158, 6158], [8203, 8207], [8234, 8238], [8288, 8292], [8294, 8303], [65279, 65279], [65529, 65531]], "Nd": [[48, 57], [1632, 1641], [1776, 1785], [1984, 1993], [2406, 2415], [2534, 2543], [2662, 2671], [2790, 2799], [2918, 2927], [3046, 3055], [3174, 3183], [3302, 3311], [3430, 3439], [3558, 3567], [3664, 3673], [3792, 3801], [3872, 3881], [4160, 4169], [4240, 4249], [6112, 6121], [6160, 6169], [6470, 6479], [6608, 6617], [6784, 6793], [6800, 6809], [6992, 7001], [7088, 7097], [7232, 7241], [7248, 7257], [42528, 42537], [43216, 43225], [43264, 43273], [43472, 43481], [43504, 43513], [43600, 43609], [44016, 44025], [65296, 65305]], "Ll": [[97, 122], [181, 181], [223, 246], [248, 255], [257, 257], [259, 259], [261, 261], [263, 263], [265, 265], [267, 267], [269, 269], [271, 271], [273, 273], [275, 275], [277, 277], [279, 279], [281, 281], [283, 283], [285, 285], [287, 287], [289, 289], [291, 291], [293, 293], [295, 295], [297, 297], [299, 299], [301, 301], [303, 303], [305, 305], [307, 307], [309, 309], [311, 312], [314, 314], [316, 316], [318, 318], [320, 320], [322, 322], [324, 324], [326, 326], [328, 329], [331, 331], [333, 333], [335, 335], [337, 337], [339, 339], [341, 341], [343, 343], [345, 345], [347, 347], [349, 349], [351, 351], [353, 353], [355, 355], [357, 357], [359, 359], [361, 361], [363, 363], [365, 365], [367, 367], [369, 369], [371, 371], [373, 373], [375, 375], [378, 378], [380, 380], [382, 384], [387, 387], [389, 389], [392, 392], [396, 397], [402, 402], [405, 405], [409, 411], [414, 414], [417, 417], [419, 419], [421, 421], [424, 424], [426, 427], [429, 429], [432, 432], [436, 436], [438, 438], [441, 442], [445, 447], [454, 454], [457, 457], [460, 460], [462, 462], [464, 464], [466, 466], [468, 468], [470, 470], [472, 472], [474, 474], [476, 477], [479, 479], [481, 481], [483, 483], [485, 485], [487, 487], [489, 489], [491, 491], [493, 493], [495, 496], [499, 499], [501, 501], [505, 505], [507, 507], [509, 509], [511, 511], [513, 513], [515, 515], [517, 517], [519, 519], [521, 521], [523, 523], [525, 525], [527, 527], [529, 529], [531, 531], [533, 533], [535, 535], [537, 537], [539, 539], [541, 541], [543, 543], [545, 545], [547, 547], [549, 549], [551, 551], [553, 553], [555, 555], [557, 557], [559, 559], [561, 561], [563, 569], [572, 572], [575, 576], [578, 578], [583, 583], [585, 585], [587, 587], [589, 589], [591, 659], [661, 687], [881, 881], [883, 883], [887, 887], [891, 893], [912, 912], [940, 974], [976, 977], [981, 983], [985, 985], [987, 987], [989, 989], [991, 991], [993, 993], [995, 995], [997, 997], [999, 999], [1001, 1001], [1003, 1003], [1005, 1005], [1007, 1011], [1013, 1013], [1016, 1016], [1019, 1020], [1072, 1119], [1121, 1121], [1123, 1123], [1125, 1125], [1127, 1127], [1129, 1129], [1131, 1131], [1133, 1133], [1135, 1135], [1137, 1137], [1139, 1139], [1141, 1141], [1143, 1143], [1145, 1145], [1147, 1147], [1149, 1149], [1151, 1151], [1153, 1153], [1163, 1163], [1165, 1165], [1167, 1167], [1169, 1169], [1171, 1171], [1173, 1173], [1175, 1175], [1177, 1177], [1179, 1179], [1181, 1181], [1183, 1183], [1185, 1185], [1187, 1187], [1189, 1189], [1191, 1191], [1193, 1193], [1195, 1195], [1197, 1197], [1199, 1199], [1201, 1201], [1203, 1203], [1205, 1205], [1207, 1207], [1209, 1209], [1211, 1211], [1213, 1213], [1215, 1215], [1218, 1218], [1220, 1220], [1222, 1222], [1224, 1224], [1226, 1226], [1228, 1228], [1230, 1231], [1233, 1233], [1235, 1235], [1237, 1237], [1239, 1239], [1241, 1241], [1243, 1243], [1245, 1245], [1247, 1247], [1249, 1249], [1251, 1251], [1253, 1253], [1255, 1255], [1257, 1257], [1259, 1259], [1261, 1261], [1263, 1263], [1265, 1265], [1267, 1267], [1269, 1269], [1271, 1271], [1273, 1273], [1275, 1275], [1277, 1277], [1279, 1279], [1281, 1281], [1283, 1283], [1285, 1285], [1287, 1287], [1289, 1289], [1291, 1291], [1293, 1293], [1295, 1295], [1297, 1297], [1299, 1299], [1301, 1301], [1303, 1303], [1305, 1305], [1307, 1307], [1309, 1309], [1311, 1311], [1313, 1313], [1315, 1315], [1317, 1317], [1319, 1319], [1321, 1321], [1323, 1323], [1325, 1325], [1327, 1327], [1377, 1415], [5112, 5117], [7296, 7304], [7424, 7467], [7531, 7543], [7545, 7578], [7681, 7681], [7683, 7683], [7685, 7685], [7687, 7687], [7689, 7689], [7691, 7691], [7693, 7693], [7695, 7695], [7697, 7697], [7699, 7699], [7701, 7701], [7703, 7703], [7705, 7705], [7707, 7707], [7709, 7709], [7711, 7711], [7713, 7713], [7715, 7715], [7717, 7717], [7719, 7719], [7721, 7721], [7723, 7723], [7725, 7725], [7727, 7727], [7729, 7729], [7731, 7731], [7733, 7733], [7735, 7735], [7737, 7737], [7739, 7739], [7741, 7741], [7743, 7743], [7745, 7745], [7747, 7747], [7749, 7749], [7751, 7751], [7753, 7753], [7755, 7755], [7757, 7757], [7759, 7759], [7761, 7761], [7763, 7763], [7765, 7765], [7767, 7767], [7769, 7769], [7771, 7771], [7773, 7773], [7775, 7775], [7777, 7777], [7779, 7779], [7781, 7781], [7783, 7783], [7785, 7785], [7787, 7787], [7789, 7789], [7791, 7791], [7793, 7793], [7795, 7795], [7797, 7797], [7799, 7799], [7801, 7801], [7803, 7803], [7805, 7805], [7807, 7807], [7809, 7809], [7811, 7811], [7813, 7813], [7815, 7815], [7817, 7817], [7819, 7819], [7821, 7821], [7823, 7823], [7825, 7825], [7827, 7827], [7829, 7837], [7839, 7839], [7841, 7841], [7843, 7843], [7845, 7845], [7847, 7847], [7849, 7849], [7851, 7851], [7853, 7853], [7855, 7855], [7857, 7857], [7859, 7859], [7861, 7861], [7863, 7863], [7865, 7865], [7867, 7867], [7869, 7869], [7871, 7871], [7873, 7873], [7875, 7875], [7877, 7877], [7879, 7879], [7881, 7881], [7883, 7883], [7885, 7885], [7887, 7887], [7889, 7889], [7891, 7891], [7893, 7893], [7895, 7895], [7897, 7897], [7899, 7899], [7901, 7901], [7903, 7903], [7905, 7905], [7907, 7907], [7909, 7909], [7911, 7911], [7913, 7913], [7915, 7915], [7917, 7917], [7919, 7919], [7921, 7921], [7923, 7923], [7925, 7925], [7927, 7927], [7929, 7929], [7931, 7931], [7933, 7933], [7935, 7943], [7952, 7957], [7968, 7975], [7984, 7991], [8000, 8005], [8016, 8023], [8032, 8039], [8048, 8061], [8064, 8071], [8080, 8087], [8096, 8103], [8112, 8116], [8118, 8119], [8126, 8126], [8130, 8132], [8134, 8135], [8144, 8147], [8150, 8151], [8160, 8167], [8178, 8180], [8182, 8183], [8458, 8458], [8462, 8463], [8467, 8467], [8495, 8495], [8500, 8500], [8505, 8505], [8508, 8509], [8518, 8521], [8526, 8526], [8580, 8580], [11312, 11358], [11361, 11361], [11365, 11366], [11368, 11368], [11370, 11370], [11372, 11372], [11377, 11377], [11379, 11380], [11382, 11387], [11393, 11393], [11395, 11395], [11397, 11397], [11399, 11399], [11401, 11401], [11403, 11403], [11405, 11405], [11407, 11407], [11409, 11409], [11411, 11411], [11413, 11413], [11415, 11415], [11417, 11417], [11419, 11419], [11421, 11421], [11423, 11423], [11425, 11425], [11427, 11427], [11429, 11429], [11431, 11431], [11433, 11433], [11435, 11435], [11437, 11437], [11439, 11439], [11441, 11441], [11443, 11443], [11445, 11445], [11447, 11447], [11449, 11449], [11451, 11451], [11453, 11453], [11455, 11455], [11457, 11457], [11459, 11459], [11461, 11461], [11463, 11463], [11465, 11465], [11467, 11467], [11469, 11469], [11471, 11471], [11473, 11473], [11475, 11475], [11477, 11477], [11479, 11479], [11481, 11481], [11483, 11483], [11485, 11485], [11487, 11487], [11489, 11489], [11491, 11492], [11500, 11500], [11502, 11502], [11507, 11507], [11520, 11557], [11559, 11559], [11565, 11565], [42561, 42561], [42563, 42563], [42565, 42565], [42567, 42567], [42569, 42569], [42571, 42571], [42573, 42573], [42575, 42575], [42577, 42577], [42579, 42579], [42581, 42581], [42583, 42583], [42585, 42585], [42587, 42587], [42589, 42589], [42591, 42591], [42593, 42593], [42595, 42595], [42597, 42597], [42599, 42599], [42601, 42601], [42603, 42603], [42605, 42605], [42625, 42625], [42627, 42627], [42629, 42629], [42631, 42631], [42633, 42633], [42635, 42635], [42637, 42637], [42639, 42639], [42641, 42641], [42643, 42643], [42645, 42645], [42647, 42647], [42649, 42649], [42651, 42651], [42787, 42787], [42789, 42789], [42791, 42791], [42793, 42793], [42795, 42795], [42797, 42797], [42799, 42801], [42803, 42803], [42805, 42805], [42807, 42807], [42809, 42809], [42811, 42811], [42813, 42813], [42815, 42815], [42817, 42817], [42819, 42819], [42821, 42821], [42823, 42823], [42825, 42825], [42827, 42827], [42829, 42829], [42831, 42831], [42833, 42833], [42835, 42835], [42837, 42837], [42839, 42839], [42841, 42841], [42843, 42843], [42845, 42845], [42847, 42847], [42849, 42849], [42851, 42851], [42853, 42853], [42855, 42855], [42857, 42857], [42859, 42859], [42861, 42861], [42863, 42863], [42865, 42872], [42874, 42874], [42876, 42876], [42879, 42879], [42881, 42881], [42883, 42883], [42885, 42885], [42887, 42887], [42892, 42892], [42894, 42894], [42897, 42897], [42899, 42901], [42903, 42903], [42905, 42905], [42907, 42907], [42909, 42909], [42911, 42911], [42913, 42913], [42915, 42915], [42917, 42917], [42919, 42919], [42921, 42921], [42933, 42933], [42935, 42935], [43002, 43002], [43824, 43866], [43872, 43877], [43888, 43967], [64256, 64262], [64275, 64279], [65345, 65370]], "No": [[178, 179], [185, 185], [188, 190], [2548, 2553], [2930, 2935], [3056, 3058], [3192, 3198], [3416, 3422], [3440, 3448], [3882, 3891], [4969, 4988], [6128, 6137], [6618, 6618], [8304, 8304], [8308, 8313], [8320, 8329], [8528, 8543], [8585, 8585], [9312, 9371], [9450, 9471], [10102, 10131], [11517, 11517], [12690, 12693], [12832, 12841], [12872, 12879], [12881, 12895], [12928, 12937], [12977, 12991], [43056, 43061]], "Zs": [[32, 32], [160, 160], [5760, 5760], [8192, 8202], [8239, 8239], [8287, 8287], [12288, 12288]] }); }; +}); + +unwrapExports(data_generated); + +var utils = createCommonjsModule(function (module, exports) { +"use strict"; +exports.__esModule = true; +function normalize_ranges(ranges) { + return ranges + .sort(function (_a, _b) { + var start1 = _a[0]; + var start2 = _b[0]; + return start1 - start2; + }) + .reduce(function (current, tuple, index) { + if (index === 0) { + return [tuple]; + } + var _a = current[current.length - 1], last_start = _a[0], last_end = _a[1]; + var start = tuple[0], end = tuple[1]; + return last_end + 1 === start + ? current.slice(0, -1).concat([[last_start, end]]) : current.concat([tuple]); + }, []); +} +exports.normalize_ranges = normalize_ranges; +function build_regex(ranges, flag) { + var pattern = ranges + .map(function (_a) { + var start = _a[0], end = _a[1]; + return start === end + ? "\\u" + get_hex(start) + : "\\u" + get_hex(start) + "-\\u" + get_hex(end); + }) + .join(''); + return new RegExp("[" + pattern + "]", flag); +} +exports.build_regex = build_regex; +function get_hex(char_code) { + var hex = char_code.toString(16); + while (hex.length < 4) { + hex = "0" + hex; + } + return hex; +} +}); + +unwrapExports(utils); + +var lib$2 = function (categories, flag) { + var data = data_generated.get_data(); + var ranges = categories.reduce(function (current, category) { return current.concat(data[category]); }, []); + return utils.build_regex(utils.normalize_ranges(ranges), flag); +}; + +const emojiRegex = emojiRegex$1(); + + + + +const cjkPattern = lib().source; + +// http://spec.commonmark.org/0.25/#ascii-punctuation-character +const asciiPunctuationCharRange = escapeStringRegexp( + "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" +); + +// http://spec.commonmark.org/0.25/#punctuation-character +const punctuationCharRange = `${asciiPunctuationCharRange}${lib$2([ + "Pc", + "Pd", + "Pe", + "Pf", + "Pi", + "Po", + "Ps" +]).source.slice(1, -1)}`; // remove bracket expression `[` and `]` + +const punctuationRegex = new RegExp(`[${punctuationCharRange}]`); + +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) { + const 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(arr) { + if (arr.length > 0) { + return arr[arr.length - 1]; + } + return null; +} + +function skip(chars) { + return (text, index, opts) => { + const 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; + } + + const length = text.length; + let cursor = index; + while (cursor >= 0 && cursor < length) { + const 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; + }; +} + +const skipWhitespace = skip(/\s/); +const skipSpaces = skip(" \t"); +const skipToLineEnd = skip(",; \t"); +const skipEverythingButNewLine = skip(/[^\r\n]/); + +function skipInlineComment(text, index) { + if (index === false) { + return false; + } + + if (text.charAt(index) === "/" && text.charAt(index + 1) === "*") { + for (let 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(text, index, opts) { + const backwards = opts && opts.backwards; + if (index === false) { + return false; + } + + const 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(text, index, opts) { + opts = opts || {}; + const idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + const idx2 = skipNewline(text, idx, opts); + return idx !== idx2; +} + +function hasNewlineInRange(text, start, end) { + for (let 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(text, node, locStart) { + let idx = locStart(node) - 1; + idx = skipSpaces(text, idx, { backwards: true }); + idx = skipNewline(text, idx, { backwards: true }); + idx = skipSpaces(text, idx, { backwards: true }); + const idx2 = skipNewline(text, idx, { backwards: true }); + return idx !== idx2; +} + +function isNextLineEmptyAfterIndex(text, index) { + let oldIdx = null; + let 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(text, idx); + return hasNewline(text, idx); +} + +function isNextLineEmpty(text, node, locEnd) { + return isNextLineEmptyAfterIndex(text, locEnd(node)); +} + +function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) { + let oldIdx = null; + let idx = locEnd(node); + while (idx !== oldIdx) { + oldIdx = idx; + idx = skipSpaces(text, idx); + idx = skipInlineComment(text, idx); + idx = skipTrailingComment(text, idx); + idx = skipNewline(text, idx); + } + return idx; +} + +function getNextNonSpaceNonCommentCharacter(text, node, locEnd) { + return text.charAt( + getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) + ); +} + +function hasSpaces(text, index, opts) { + opts = opts || {}; + const idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); + return idx !== index; +} + +// Super inefficient, needs to be cached. +function lineColumnToIndex(lineColumn, text) { + let index = 0; + for (let i = 0; i < lineColumn.line - 1; ++i) { + index = text.indexOf("\n", index) + 1; + if (index === -1) { + return -1; + } + } + return index + lineColumn.column; +} + +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; + } +} + +const PRECEDENCE = {}; +[ + ["|>"], + ["||", "??"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"], + ["**"] +].forEach((tier, i) => { + tier.forEach(op => { + PRECEDENCE[op] = i; + }); +}); + +function getPrecedence(op) { + return PRECEDENCE[op]; +} + +const equalityOperators = { + "==": true, + "!=": true, + "===": true, + "!==": true +}; +const multiplicativeOperators = { + "*": true, + "/": true, + "%": true +}; +const 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 + 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 forbidFunctionAndClass holds) `function` or `class`. +// Will be overzealous if there's already necessary grouping parentheses. +function startsWithNoLookaheadToken(node, forbidFunctionAndClass) { + node = getLeftMost(node); + switch (node.type) { + // Hack. Remove after https://github.com/eslint/typescript-eslint-parser/issues/331 + case "ObjectPattern": + return !forbidFunctionAndClass; + case "FunctionExpression": + case "ClassExpression": + return forbidFunctionAndClass; + case "ObjectExpression": + return true; + case "MemberExpression": + return startsWithNoLookaheadToken(node.object, forbidFunctionAndClass); + case "TaggedTemplateExpression": + if (node.tag.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + return startsWithNoLookaheadToken(node.tag, forbidFunctionAndClass); + case "CallExpression": + if (node.callee.type === "FunctionExpression") { + // IIFEs are always already parenthesized + return false; + } + return startsWithNoLookaheadToken(node.callee, forbidFunctionAndClass); + case "ConditionalExpression": + return startsWithNoLookaheadToken(node.test, forbidFunctionAndClass); + case "UpdateExpression": + return ( + !node.prefix && + startsWithNoLookaheadToken(node.argument, forbidFunctionAndClass) + ); + case "BindExpression": + return ( + node.object && + startsWithNoLookaheadToken(node.object, forbidFunctionAndClass) + ); + case "SequenceExpression": + return startsWithNoLookaheadToken( + node.expressions[0], + forbidFunctionAndClass + ); + case "TSAsExpression": + return startsWithNoLookaheadToken( + node.expression, + forbidFunctionAndClass + ); + default: + return false; + } +} + +function getLeftMost(node) { + if (node.left) { + return getLeftMost(node.left); + } + return node; +} + +function hasBlockComments(node) { + return node.comments && node.comments.some(isBlockComment); +} + +function isBlockComment(comment) { + return comment.type === "Block" || comment.type === "CommentBlock"; +} + +function hasClosureCompilerTypeCastComment(text, node, locEnd) { + // https://github.com/google/closure-compiler/wiki/Annotating-Types#type-casts + // Syntax example: var x = /** @type {string} */ (fruit); + return ( + node.comments && + node.comments.some( + comment => + comment.leading && + isBlockComment(comment) && + comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/) && + getNextNonSpaceNonCommentCharacter(text, comment, locEnd) === "(" + ) + ); +} + +function getAlignmentSize(value, tabWidth, startIndex) { + startIndex = startIndex || 0; + + let size = 0; + for (let 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) { + const lastNewlineIndex = value.lastIndexOf("\n"); + if (lastNewlineIndex === -1) { + return 0; + } + + return getAlignmentSize( + // All the leading whitespaces + value.slice(lastNewlineIndex + 1).match(/^[ \t]*/)[0], + tabWidth + ); +} + +function printString(raw, options, isDirectiveLiteral) { + // `rawContent` is the string exactly like it appeared in the input source + // code, without its enclosing quotes. + const rawContent = raw.slice(1, -1); + + const double = { quote: '"', regex: /"/g }; + const single = { quote: "'", regex: /'/g }; + + const preferred = options.singleQuote ? single : double; + const alternate = preferred === single ? double : single; + + let shouldUseAlternateQuote = false; + let canChangeDirectiveQuotes = false; + + // 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. + // Also check for the alternate quote, to determine if we're allowed to swap + // the quotes on a DirectiveLiteral. + if ( + rawContent.includes(preferred.quote) || + rawContent.includes(alternate.quote) + ) { + const numPreferredQuotes = (rawContent.match(preferred.regex) || []).length; + const numAlternateQuotes = (rawContent.match(alternate.regex) || []).length; + + shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes; + } else { + canChangeDirectiveQuotes = true; + } + + const enclosingQuote = + options.parser === "json" + ? double.quote + : shouldUseAlternateQuote + ? alternate.quote + : preferred.quote; + + // 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" + ) + ); +} + +function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) { + const otherQuote = enclosingQuote === '"' ? "'" : '"'; + + // Matches _any_ escape and unescaped quotes (both single and double). + const regex = /\\([\s\S])|(['"])/g; + + // Escape and unescape single and double quotes as needed to be able to + // enclose `rawContent` with `enclosingQuote`. + const newContent = rawContent.replace(regex, (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) { + const results = str.match( + new RegExp(`(${escapeStringRegexp(target)})+`, "g") + ); + + if (results === null) { + return 0; + } + + return results.reduce( + (maxCount, result) => Math.max(maxCount, result.length / target.length), + 0 + ); +} + +/** + * split text into whitespaces and words + * @param {string} text + * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>} + */ +function splitText(text) { + const KIND_NON_CJK = "non-cjk"; + const KIND_CJK_CHARACTER = "cjk-character"; + const KIND_CJK_PUNCTUATION = "cjk-punctuation"; + + const nodes = []; + + text + .replace(new RegExp(`(${cjkPattern})\n(${cjkPattern})`, "g"), "$1$2") + .split(/([ \t\n]+)/) + .forEach((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((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(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: KIND_CJK_CHARACTER, + hasLeadingPunctuation: false, + hasTrailingPunctuation: false + } + ); + }); + }); + + return nodes; + + function appendNode(node) { + const lastNode = getLast(nodes); + if (lastNode && lastNode.type === "word") { + if ( + (lastNode.kind === KIND_NON_CJK && + node.kind === KIND_CJK_CHARACTER && + !lastNode.hasTrailingPunctuation) || + (lastNode.kind === KIND_CJK_CHARACTER && + 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(value => /\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 getStringWidth(text) { + if (!text) { + return 0; + } + + // 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) { + const node = path$$1.getValue(); + return hasNodeIgnoreComment(node); +} + +function hasNodeIgnoreComment(node) { + return ( + node && + node.comments && + node.comments.length > 0 && + node.comments.some(comment => comment.value.trim() === "prettier-ignore") + ); +} + +function arrayify(object, keyName) { + return Object.keys(object).reduce( + (array, key) => + array.concat(Object.assign({ [keyName]: key }, object[key])), + [] + ); +} + +function addCommentHelper(node, comment) { + const 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(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addDanglingComment(node, comment) { + comment.leading = false; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addTrailingComment(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} + +var util$1 = { + arrayify, + punctuationRegex, + punctuationCharRange, + getStringWidth, + splitText, + getMaxContinuousCount, + getPrecedence, + shouldFlatten, + isBitwiseOperator, + isExportDeclaration, + getParentExportDeclaration, + getPenultimate, + getLast, + getNextNonSpaceNonCommentCharacterIndex, + getNextNonSpaceNonCommentCharacter, + skipWhitespace, + skipSpaces, + skipNewline, + isNextLineEmptyAfterIndex, + isNextLineEmpty, + isPreviousLineEmpty, + hasNewline, + hasNewlineInRange, + hasSpaces, + setLocStart, + setLocEnd, + startsWithNoLookaheadToken, + hasBlockComments, + isBlockComment, + hasClosureCompilerTypeCastComment, + getAlignmentSize, + getIndentSize, + printString, + printNumber, + hasIgnoreComment, + hasNodeIgnoreComment, + lineColumnToIndex, + makeString, + addLeadingComment, + addDanglingComment, + addTrailingComment +}; + +function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { + function traverseDocRec(doc) { + let shouldRecurse = true; + if (onEnter) { + if (onEnter(doc) === false) { + shouldRecurse = false; + } + } + + if (shouldRecurse) { + if (doc.type === "concat" || doc.type === "fill") { + for (let i = 0; i < doc.parts.length; i++) { + traverseDocRec(doc.parts[i]); + } + } else if (doc.type === "if-break") { + if (doc.breakContents) { + traverseDocRec(doc.breakContents); + } + if (doc.flatContents) { + traverseDocRec(doc.flatContents); + } + } else if (doc.type === "group" && doc.expandedStates) { + if (shouldTraverseConditionalGroups) { + doc.expandedStates.forEach(traverseDocRec); + } else { + traverseDocRec(doc.contents); + } + } else if (doc.contents) { + traverseDocRec(doc.contents); + } + } + + if (onExit) { + onExit(doc); + } + } + + traverseDocRec(doc); +} + +function mapDoc(doc, cb) { + if (doc.type === "concat" || doc.type === "fill") { + const parts = doc.parts.map(part => mapDoc(part, cb)); + return cb(Object.assign({}, doc, { parts })); + } else if (doc.type === "if-break") { + const breakContents = doc.breakContents && mapDoc(doc.breakContents, cb); + const flatContents = doc.flatContents && mapDoc(doc.flatContents, cb); + return cb(Object.assign({}, doc, { breakContents, flatContents })); + } else if (doc.contents) { + const contents = mapDoc(doc.contents, cb); + return cb(Object.assign({}, doc, { contents })); + } + return cb(doc); +} + +function findInDoc(doc, fn, defaultValue) { + let result = defaultValue; + let hasStopped = false; + traverseDoc(doc, doc => { + const maybeResult = fn(doc); + if (maybeResult !== undefined) { + hasStopped = true; + result = maybeResult; + } + if (hasStopped) { + return false; + } + }); + return result; +} + +function isEmpty(n) { + return typeof n === "string" && n.length === 0; +} + +function isLineNext(doc) { + return findInDoc( + doc, + doc => { + if (typeof doc === "string") { + return false; + } + if (doc.type === "line") { + return true; + } + }, + false + ); +} + +function willBreak(doc) { + return findInDoc( + doc, + doc => { + if (doc.type === "group" && doc.break) { + return true; + } + if (doc.type === "line" && doc.hard) { + return true; + } + if (doc.type === "break-parent") { + return true; + } + }, + false + ); +} + +function breakParentGroup(groupStack) { + if (groupStack.length > 0) { + const 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) { + const alreadyVisited = new Map(); + const groupStack = []; + traverseDoc( + doc, + doc => { + if (doc.type === "break-parent") { + breakParentGroup(groupStack); + } + if (doc.type === "group") { + groupStack.push(doc); + if (alreadyVisited.has(doc)) { + return false; + } + alreadyVisited.set(doc, true); + } + }, + doc => { + if (doc.type === "group") { + const group = groupStack.pop(); + if (group.break) { + breakParentGroup(groupStack); + } + } + }, + /* shouldTraverseConditionalGroups */ true + ); +} + +function removeLines(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. + return mapDoc(doc, d => { + if (d.type === "line" && !d.hard) { + return d.soft ? "" : " "; + } else if (d.type === "if-break") { + return d.flatContents || ""; + } + return d; + }); +} + +function stripTrailingHardline(doc) { + // HACK remove ending hardline, original PR: #1984 + if ( + doc.type === "concat" && + doc.parts.length === 2 && + doc.parts[1].type === "concat" && + doc.parts[1].parts.length === 2 && + doc.parts[1].parts[0].hard && + doc.parts[1].parts[1].type === "break-parent" + ) { + return doc.parts[0]; + } + return doc; +} + +var docUtils = { + isEmpty, + willBreak, + isLineNext, + traverseDoc, + mapDoc, + propagateBreaks, + removeLines, + stripTrailingHardline +}; + +function isNextLineEmpty$1(text, node, options) { + return util$1.isNextLineEmpty(text, node, options.locEnd); +} + +function getNextNonSpaceNonCommentCharacterIndex$1(text, node, options) { + return util$1.getNextNonSpaceNonCommentCharacterIndex( + text, + node, + options.locEnd + ); +} + +var utilShared = { + isNextLineEmpty: isNextLineEmpty$1, + isNextLineEmptyAfterIndex: util$1.isNextLineEmptyAfterIndex, + getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$1, + mapDoc: docUtils.mapDoc, // 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 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 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() { + /* 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() {}; + +// 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 assert$1 = 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 = true; +var freelist = "< 6"; +var fs$1 = 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$1 = 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$1 = true; +var util$3 = true; +var v8 = ">= 1"; +var vm = true; +var zlib = true; +var core$1 = { + assert: assert$1, + 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, + freelist: freelist, + fs: fs$1, + http: http, + http2: http2, + https: https, + _http_server: _http_server, + _linklist: _linklist, + module: module$1, + net: net, + os: os$1, + path: path$1, + 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$1, + util: util$3, + v8: v8, + vm: vm, + zlib: zlib +}; + +var core$2 = Object.freeze({ + assert: assert$1, + 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, + freelist: freelist, + fs: fs$1, + http: http, + http2: http2, + https: https, + _http_server: _http_server, + _linklist: _linklist, + module: module$1, + net: net, + os: os$1, + path: path$1, + 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$1, + util: util$3, + v8: v8, + vm: vm, + zlib: zlib, + default: core$1 +}); + +var data = ( core$2 && core$1 ) || core$2; + +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 = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = versionIncluded(data[mod]); + } +} +var core_1 = core; + +var caller = function () { + // 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 = 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(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(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 = function (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 = createCommonjsModule(function (module, exports) { +async.core = core_1; +async.isCore = function isCore(x) { return core_1[x]; }; +async.sync = sync; + +exports = async; +module.exports = async; +}); + +var pathExists = createCommonjsModule(function (module) { +'use strict'; + + +module.exports = fp => new Promise(resolve => { + fs.access(fp, err => { + resolve(!err); + }); +}); + +module.exports.sync = fp => { + try { + fs.accessSync(fp); + return true; + } catch (err) { + return false; + } +}; +}); + +var pLimit = createCommonjsModule(function (module) { +'use strict'; +module.exports = concurrency => { + if (concurrency < 1) { + throw new TypeError('Expected `concurrency` to be a number from 1 and up'); + } + + const queue = []; + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.length > 0) { + queue.shift()(); + } + }; + + return fn => new Promise((resolve, reject) => { + const run = () => { + activeCount++; + + fn().then( + val => { + resolve(val); + next(); + }, + err => { + reject(err); + next(); + } + ); + }; + + if (activeCount < concurrency) { + run(); + } else { + queue.push(run); + } + }); +}; +}); + +var pLocate = createCommonjsModule(function (module) { +'use strict'; + + +class EndError extends Error { + constructor(value) { + super(); + this.value = value; + } +} + +// the input can also be a promise, so we `Promise.all()` them both +const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); + +module.exports = (iterable, tester, opts) => { + opts = Object.assign({ + concurrency: Infinity, + preserveOrder: true + }, opts); + + const limit = pLimit(opts.concurrency); + + // start all the promises concurrently with optional limit + const items = Array.from(iterable).map(el => [el, limit(() => Promise.resolve(el).then(tester))]); + + // check the promises either serially or concurrently + const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); + + return Promise.all(items.map(el => checkLimit(() => finder(el)))) + .then(() => {}) + .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); +}; +}); + +var locatePath = createCommonjsModule(function (module) { +'use strict'; + + + + +module.exports = (iterable, opts) => { + opts = Object.assign({ + cwd: process.cwd() + }, opts); + + return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts); +}; + +module.exports.sync = (iterable, opts) => { + opts = Object.assign({ + cwd: process.cwd() + }, opts); + + for (const el of iterable) { + if (pathExists.sync(path.resolve(opts.cwd, el))) { + return el; + } + } +}; +}); + +var findUp = createCommonjsModule(function (module) { +'use strict'; + + + +module.exports = (filename, opts) => { + opts = opts || {}; + + const startDir = path.resolve(opts.cwd || ''); + const root = path.parse(startDir).root; + + const filenames = [].concat(filename); + + return new Promise(resolve => { + (function find(dir) { + locatePath(filenames, {cwd: dir}).then(file => { + if (file) { + resolve(path.join(dir, file)); + } else if (dir === root) { + resolve(null); + } else { + find(path.dirname(dir)); + } + }); + })(startDir); + }); +}; + +module.exports.sync = (filename, opts) => { + opts = opts || {}; + + let dir = path.resolve(opts.cwd || ''); + const root = path.parse(dir).root; + + const filenames = [].concat(filename); + + // eslint-disable-next-line no-constant-condition + while (true) { + const file = locatePath.sync(filenames, {cwd: dir}); + + if (file) { + return path.join(dir, file); + } else if (dir === root) { + return null; + } + + dir = path.dirname(dir); + } +}; +}); + +var stripBom = createCommonjsModule(function (module) { +'use strict'; +module.exports = x => { + if (typeof x !== 'string') { + throw new TypeError('Expected a string, got ' + typeof x); + } + + // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string + // conversion translates it to FEFF (UTF-16 BOM) + if (x.charCodeAt(0) === 0xFEFF) { + return x.slice(1); + } + + return x; +}; +}); + +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 () { + 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 (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 (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (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) { + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i); + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null; + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context; + const 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'; + + + +const JSONError = errorEx_1('JSONError', { + fileName: errorEx_1.append('in %s') +}); + +module.exports = (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, ''); + + const jsonErr = new JSONError(err); + if (filename) { + jsonErr.fileName = filename; + } + + throw jsonErr; + } +}; +}); + +var pify = createCommonjsModule(function (module) { +'use strict'; + +const processFn = (fn, opts) => function () { + const P = opts.promiseModule; + const args = new Array(arguments.length); + + for (let i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P((resolve, reject) => { + if (opts.errorFirst) { + args.push(function (err, result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + if (err) { + results.unshift(err); + reject(results); + } else { + resolve(results); + } + } else if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + args.push(function (result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 0; i < arguments.length; i++) { + results[i] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + } + + fn.apply(this, args); + }); +}; + +module.exports = (obj, opts) => { + opts = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, opts); + + const filter = key => { + const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + let ret; + if (typeof obj === 'function') { + ret = function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, opts).apply(this, arguments); + }; + } else { + ret = Object.create(Object.getPrototypeOf(obj)); + } + + for (const key in obj) { // eslint-disable-line guard-for-in + const x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; + } + + return ret; +}; +}); + +const parse$1 = (data, fp) => parseJson(stripBom(data), path.relative('.', fp)); + +var loadJsonFile = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse$1(data, fp)); +var sync$2 = fp => parse$1(fs.readFileSync(fp, 'utf8'), fp); + +loadJsonFile.sync = sync$2; + +var pify$3 = createCommonjsModule(function (module) { +'use strict'; + +const processFn = (fn, opts) => function () { + const P = opts.promiseModule; + const args = new Array(arguments.length); + + for (let i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P((resolve, reject) => { + if (opts.errorFirst) { + args.push(function (err, result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + if (err) { + results.unshift(err); + reject(results); + } else { + resolve(results); + } + } else if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + args.push(function (result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 0; i < arguments.length; i++) { + results[i] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + } + + fn.apply(this, args); + }); +}; + +module.exports = (obj, opts) => { + opts = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, opts); + + const filter = key => { + const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + let ret; + if (typeof obj === 'function') { + ret = function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, opts).apply(this, arguments); + }; + } else { + ret = Object.create(Object.getPrototypeOf(obj)); + } + + for (const key in obj) { // eslint-disable-line guard-for-in + const x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; + } + + return ret; +}; +}); + +function type(fn, fn2, fp) { + if (typeof fp !== 'string') { + return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`)); + } + + return pify$3(fs[fn])(fp) + .then(stats => stats[fn2]()) + .catch(err => { + if (err.code === 'ENOENT') { + return false; + } + + throw err; + }); +} + +function typeSync(fn, fn2, fp) { + if (typeof fp !== 'string') { + throw new TypeError(`Expected a string, got ${typeof fp}`); + } + + try { + return fs[fn](fp)[fn2](); + } catch (err) { + if (err.code === 'ENOENT') { + return false; + } + + throw err; + } +} + +var file = type.bind(null, 'stat', 'isFile'); +var dir = type.bind(null, 'stat', 'isDirectory'); +var symlink = type.bind(null, 'lstat', 'isSymbolicLink'); +var fileSync = typeSync.bind(null, 'statSync', 'isFile'); +var dirSync = typeSync.bind(null, 'statSync', 'isDirectory'); +var symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); + +var pathType = { + file: file, + dir: dir, + symlink: symlink, + fileSync: fileSync, + dirSync: dirSync, + symlinkSync: symlinkSync +}; + +var parser$1 = createCommonjsModule(function (module, exports) { +/* parser generated by jison 0.4.17 */ +/* + Returns a Parser object of the following structure: + + Parser: { + yy: {} + } + + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } + + + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + + + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var spdxparse = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, +productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ + +var $0 = $$.length - 1; +switch (yystate) { +case 1: +return this.$ = $$[$0-1] +break; +case 2: case 4: case 5: +this.$ = {license: yytext}; +break; +case 3: +this.$ = {license: $$[$0-1], plus: true}; +break; +case 6: +this.$ = $$[$0]; +break; +case 7: +this.$ = {exception: $$[$0]}; +this.$.license = $$[$0-2].license; +if ($$[$0-2].hasOwnProperty('plus')) { + this.$.plus = $$[$0-2].plus; +} +break; +case 8: +this.$ = {conjunction: 'and', left: $$[$0-2], right: $$[$0]}; +break; +case 9: +this.$ = {conjunction: 'or', left: $$[$0-2], right: $$[$0]}; +break; +case 10: +this.$ = $$[$0-1]; +break; +} +}, +table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], +defaultActions: {8:[2,1]}, +parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + function _parseError (msg, hash) { + this.message = msg; + this.hash = hash; + } + _parseError.prototype = Error; + + throw new _parseError(str, hash); + } +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; + } + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + _token_stack: + var lex = function () { + var token; + token = lexer.lex() || EOF; + if (typeof token !== 'number') { + token = self.symbols_[token] || token; + } + return token; + }; + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +}}; +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ + +EOF:1, + +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, + +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + + this._input = this._input.slice(1); + return ch; + }, + +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = 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); + + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, + +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + + } + return this; + }, + +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, + +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, + +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function (match, indexed_rule) { + var token, + lines, + backup; + + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + return false; // rule action called reject() implying the next rule should be tested instead. + } + return false; + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + +// return next match that has a token +lex:function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin(condition) { + this.conditionStack.push(condition); + }, + +// pop the previously active lexer condition state off the condition stack +popState:function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + +// alias for begin(condition) +pushState:function pushState(condition) { + this.begin(condition); + }, + +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0:return 5 +break; +case 1:/* skip whitespace */ +break; +case 2:return 8 +break; +case 3:return 16 +break; +case 4:return 17 +break; +case 5:return 11 +break; +case 6:return 10 +break; +case 7:return 9 +break; +case 8:return 14 +break; +case 9:return 15 +break; +case 10:return 12 +break; +case 11:return 7 +break; +case 12:return 7 +break; +case 13:return 7 +break; +case 14:return 7 +break; +case 15:return 7 +break; +case 16:return 7 +break; +case 17:return 7 +break; +case 18:return 7 +break; +case 19:return 7 +break; +case 20:return 7 +break; +case 21:return 7 +break; +case 22:return 7 +break; +case 23:return 7 +break; +case 24:return 13 +break; +case 25:return 13 +break; +case 26:return 13 +break; +case 27:return 13 +break; +case 28:return 13 +break; +case 29:return 13 +break; +case 30:return 13 +break; +case 31:return 13 +break; +case 32:return 7 +break; +case 33:return 13 +break; +case 34:return 7 +break; +case 35:return 13 +break; +case 36:return 7 +break; +case 37:return 13 +break; +case 38:return 13 +break; +case 39:return 7 +break; +case 40:return 13 +break; +case 41:return 13 +break; +case 42:return 13 +break; +case 43:return 13 +break; +case 44:return 13 +break; +case 45:return 7 +break; +case 46:return 13 +break; +case 47:return 7 +break; +case 48:return 7 +break; +case 49:return 7 +break; +case 50:return 7 +break; +case 51:return 7 +break; +case 52:return 7 +break; +case 53:return 7 +break; +case 54:return 7 +break; +case 55:return 7 +break; +case 56:return 7 +break; +case 57:return 7 +break; +case 58:return 7 +break; +case 59:return 7 +break; +case 60:return 7 +break; +case 61:return 7 +break; +case 62:return 7 +break; +case 63:return 13 +break; +case 64:return 7 +break; +case 65:return 7 +break; +case 66:return 13 +break; +case 67:return 7 +break; +case 68:return 7 +break; +case 69:return 7 +break; +case 70:return 7 +break; +case 71:return 7 +break; +case 72:return 7 +break; +case 73:return 13 +break; +case 74:return 7 +break; +case 75:return 13 +break; +case 76:return 7 +break; +case 77:return 7 +break; +case 78:return 7 +break; +case 79:return 7 +break; +case 80:return 7 +break; +case 81:return 7 +break; +case 82:return 7 +break; +case 83:return 7 +break; +case 84:return 7 +break; +case 85:return 7 +break; +case 86:return 7 +break; +case 87:return 7 +break; +case 88:return 7 +break; +case 89:return 7 +break; +case 90:return 7 +break; +case 91:return 7 +break; +case 92:return 7 +break; +case 93:return 7 +break; +case 94:return 7 +break; +case 95:return 7 +break; +case 96:return 7 +break; +case 97:return 7 +break; +case 98:return 7 +break; +case 99:return 7 +break; +case 100:return 7 +break; +case 101:return 7 +break; +case 102:return 7 +break; +case 103:return 7 +break; +case 104:return 7 +break; +case 105:return 7 +break; +case 106:return 7 +break; +case 107:return 7 +break; +case 108:return 7 +break; +case 109:return 7 +break; +case 110:return 7 +break; +case 111:return 7 +break; +case 112:return 7 +break; +case 113:return 7 +break; +case 114:return 7 +break; +case 115:return 7 +break; +case 116:return 7 +break; +case 117:return 7 +break; +case 118:return 7 +break; +case 119:return 7 +break; +case 120:return 7 +break; +case 121:return 7 +break; +case 122:return 7 +break; +case 123:return 7 +break; +case 124:return 7 +break; +case 125:return 7 +break; +case 126:return 7 +break; +case 127:return 7 +break; +case 128:return 7 +break; +case 129:return 7 +break; +case 130:return 7 +break; +case 131:return 7 +break; +case 132:return 7 +break; +case 133:return 7 +break; +case 134:return 7 +break; +case 135:return 7 +break; +case 136:return 7 +break; +case 137:return 7 +break; +case 138:return 7 +break; +case 139:return 7 +break; +case 140:return 7 +break; +case 141:return 7 +break; +case 142:return 7 +break; +case 143:return 7 +break; +case 144:return 7 +break; +case 145:return 7 +break; +case 146:return 7 +break; +case 147:return 7 +break; +case 148:return 7 +break; +case 149:return 7 +break; +case 150:return 7 +break; +case 151:return 7 +break; +case 152:return 7 +break; +case 153:return 7 +break; +case 154:return 7 +break; +case 155:return 7 +break; +case 156:return 7 +break; +case 157:return 7 +break; +case 158:return 7 +break; +case 159:return 7 +break; +case 160:return 7 +break; +case 161:return 7 +break; +case 162:return 7 +break; +case 163:return 7 +break; +case 164:return 7 +break; +case 165:return 7 +break; +case 166:return 7 +break; +case 167:return 7 +break; +case 168:return 7 +break; +case 169:return 7 +break; +case 170:return 7 +break; +case 171:return 7 +break; +case 172:return 7 +break; +case 173:return 7 +break; +case 174:return 7 +break; +case 175:return 7 +break; +case 176:return 7 +break; +case 177:return 7 +break; +case 178:return 7 +break; +case 179:return 7 +break; +case 180:return 7 +break; +case 181:return 7 +break; +case 182:return 7 +break; +case 183:return 7 +break; +case 184:return 7 +break; +case 185:return 7 +break; +case 186:return 7 +break; +case 187:return 7 +break; +case 188:return 7 +break; +case 189:return 7 +break; +case 190:return 7 +break; +case 191:return 7 +break; +case 192:return 7 +break; +case 193:return 7 +break; +case 194:return 7 +break; +case 195:return 7 +break; +case 196:return 7 +break; +case 197:return 7 +break; +case 198:return 7 +break; +case 199:return 7 +break; +case 200:return 7 +break; +case 201:return 7 +break; +case 202:return 7 +break; +case 203:return 7 +break; +case 204:return 7 +break; +case 205:return 7 +break; +case 206:return 7 +break; +case 207:return 7 +break; +case 208:return 7 +break; +case 209:return 7 +break; +case 210:return 7 +break; +case 211:return 7 +break; +case 212:return 7 +break; +case 213:return 7 +break; +case 214:return 7 +break; +case 215:return 7 +break; +case 216:return 7 +break; +case 217:return 7 +break; +case 218:return 7 +break; +case 219:return 7 +break; +case 220:return 7 +break; +case 221:return 7 +break; +case 222:return 7 +break; +case 223:return 7 +break; +case 224:return 7 +break; +case 225:return 7 +break; +case 226:return 7 +break; +case 227:return 7 +break; +case 228:return 7 +break; +case 229:return 7 +break; +case 230:return 7 +break; +case 231:return 7 +break; +case 232:return 7 +break; +case 233:return 7 +break; +case 234:return 7 +break; +case 235:return 7 +break; +case 236:return 7 +break; +case 237:return 7 +break; +case 238:return 7 +break; +case 239:return 7 +break; +case 240:return 7 +break; +case 241:return 7 +break; +case 242:return 7 +break; +case 243:return 7 +break; +case 244:return 7 +break; +case 245:return 7 +break; +case 246:return 7 +break; +case 247:return 7 +break; +case 248:return 7 +break; +case 249:return 7 +break; +case 250:return 7 +break; +case 251:return 7 +break; +case 252:return 7 +break; +case 253:return 7 +break; +case 254:return 7 +break; +case 255:return 7 +break; +case 256:return 7 +break; +case 257:return 7 +break; +case 258:return 7 +break; +case 259:return 7 +break; +case 260:return 7 +break; +case 261:return 7 +break; +case 262:return 7 +break; +case 263:return 7 +break; +case 264:return 7 +break; +case 265:return 7 +break; +case 266:return 7 +break; +case 267:return 7 +break; +case 268:return 7 +break; +case 269:return 7 +break; +case 270:return 7 +break; +case 271:return 7 +break; +case 272:return 7 +break; +case 273:return 7 +break; +case 274:return 7 +break; +case 275:return 7 +break; +case 276:return 7 +break; +case 277:return 7 +break; +case 278:return 7 +break; +case 279:return 7 +break; +case 280:return 7 +break; +case 281:return 7 +break; +case 282:return 7 +break; +case 283:return 7 +break; +case 284:return 7 +break; +case 285:return 7 +break; +case 286:return 7 +break; +case 287:return 7 +break; +case 288:return 7 +break; +case 289:return 7 +break; +case 290:return 7 +break; +case 291:return 7 +break; +case 292:return 7 +break; +case 293:return 7 +break; +case 294:return 7 +break; +case 295:return 7 +break; +case 296:return 7 +break; +case 297:return 7 +break; +case 298:return 7 +break; +case 299:return 7 +break; +case 300:return 7 +break; +case 301:return 7 +break; +case 302:return 7 +break; +case 303:return 7 +break; +case 304:return 7 +break; +case 305:return 7 +break; +case 306:return 7 +break; +case 307:return 7 +break; +case 308:return 7 +break; +case 309:return 7 +break; +case 310:return 7 +break; +case 311:return 7 +break; +case 312:return 7 +break; +case 313:return 7 +break; +case 314:return 7 +break; +case 315:return 7 +break; +case 316:return 7 +break; +case 317:return 7 +break; +case 318:return 7 +break; +case 319:return 7 +break; +case 320:return 7 +break; +case 321:return 7 +break; +case 322:return 7 +break; +case 323:return 7 +break; +case 324:return 7 +break; +case 325:return 7 +break; +case 326:return 7 +break; +case 327:return 7 +break; +case 328:return 7 +break; +case 329:return 7 +break; +case 330:return 7 +break; +case 331:return 7 +break; +case 332:return 7 +break; +case 333:return 7 +break; +case 334:return 7 +break; +case 335:return 7 +break; +case 336:return 7 +break; +case 337:return 7 +break; +case 338:return 7 +break; +case 339:return 7 +break; +case 340:return 7 +break; +case 341:return 7 +break; +case 342:return 7 +break; +case 343:return 7 +break; +case 344:return 7 +break; +case 345:return 7 +break; +case 346:return 7 +break; +case 347:return 7 +break; +case 348:return 7 +break; +case 349:return 7 +break; +case 350:return 7 +break; +case 351:return 7 +break; +case 352:return 7 +break; +case 353:return 7 +break; +case 354:return 7 +break; +case 355:return 7 +break; +case 356:return 7 +break; +case 357:return 7 +break; +case 358:return 7 +break; +case 359:return 7 +break; +case 360:return 7 +break; +case 361:return 7 +break; +case 362:return 7 +break; +case 363:return 7 +break; +case 364:return 7 +break; +} +}, +rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:BSD-3-Clause-No-Nuclear-License-2014)/,/^(?:BSD-3-Clause-No-Nuclear-Warranty)/,/^(?:GPL-2\.0-with-classpath-exception)/,/^(?:GPL-3\.0-with-autoconf-exception)/,/^(?:GPL-2\.0-with-autoconf-exception)/,/^(?:BSD-3-Clause-No-Nuclear-License)/,/^(?:MPL-2\.0-no-copyleft-exception)/,/^(?:GPL-2\.0-with-bison-exception)/,/^(?:GPL-2\.0-with-font-exception)/,/^(?:GPL-2\.0-with-GCC-exception)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:GPL-3\.0-with-GCC-exception)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:Classpath-exception-2\.0)/,/^(?:WxWindows-exception-3\.1)/,/^(?:freertos-exception-2\.0)/,/^(?:Autoconf-exception-3\.0)/,/^(?:i2p-gpl-java-exception)/,/^(?:gnu-javamail-exception)/,/^(?:Nokia-Qt-exception-1\.1)/,/^(?:Autoconf-exception-2\.0)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:u-boot-exception-2\.0)/,/^(?:zlib-acknowledgement)/,/^(?:Bison-exception-2\.2)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:CLISP-exception-2\.0)/,/^(?:eCos-exception-2\.0)/,/^(?:BSD-3-Clause-Clear)/,/^(?:Font-exception-2\.0)/,/^(?:FLTK-exception-2\.0)/,/^(?:GCC-exception-2\.0)/,/^(?:Qwt-exception-1\.0)/,/^(?:Libtool-exception)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:GCC-exception-3\.1)/,/^(?:Artistic-1\.0-Perl)/,/^(?:Artistic-1\.0-cl8)/,/^(?:CC-BY-NC-SA-2\.5)/,/^(?:MIT-advertising)/,/^(?:BSD-Source-Code)/,/^(?:CC-BY-NC-SA-4\.0)/,/^(?:LiLiQ-Rplus-1\.1)/,/^(?:CC-BY-NC-SA-3\.0)/,/^(?:BSD-4-Clause-UC)/,/^(?:CC-BY-NC-SA-2\.0)/,/^(?:CC-BY-NC-SA-1\.0)/,/^(?:CC-BY-NC-ND-4\.0)/,/^(?:CC-BY-NC-ND-3\.0)/,/^(?:CC-BY-NC-ND-2\.5)/,/^(?:CC-BY-NC-ND-2\.0)/,/^(?:CC-BY-NC-ND-1\.0)/,/^(?:LZMA-exception)/,/^(?:BitTorrent-1\.1)/,/^(?:CrystalStacker)/,/^(?:FLTK-exception)/,/^(?:SugarCRM-1\.1\.3)/,/^(?:BSD-Protection)/,/^(?:BitTorrent-1\.0)/,/^(?:HaskellReport)/,/^(?:Interbase-1\.0)/,/^(?:StandardML-NJ)/,/^(?:mif-exception)/,/^(?:Frameworx-1\.0)/,/^(?:389-exception)/,/^(?:CC-BY-NC-2\.0)/,/^(?:CC-BY-NC-2\.5)/,/^(?:CC-BY-NC-3\.0)/,/^(?:CC-BY-NC-4\.0)/,/^(?:W3C-19980720)/,/^(?:CC-BY-SA-1\.0)/,/^(?:CC-BY-SA-2\.0)/,/^(?:CC-BY-SA-2\.5)/,/^(?:CC-BY-ND-2\.0)/,/^(?:CC-BY-SA-4\.0)/,/^(?:CC-BY-SA-3\.0)/,/^(?:Artistic-1\.0)/,/^(?:Artistic-2\.0)/,/^(?:CC-BY-ND-2\.5)/,/^(?:CC-BY-ND-3\.0)/,/^(?:CC-BY-ND-4\.0)/,/^(?:CC-BY-ND-1\.0)/,/^(?:BSD-4-Clause)/,/^(?:BSD-3-Clause)/,/^(?:BSD-2-Clause)/,/^(?:CC-BY-NC-1\.0)/,/^(?:bzip2-1\.0\.6)/,/^(?:Unicode-TOU)/,/^(?:CNRI-Jython)/,/^(?:ImageMagick)/,/^(?:Adobe-Glyph)/,/^(?:CUA-OPL-1\.0)/,/^(?:OLDAP-2\.2\.2)/,/^(?:LiLiQ-R-1\.1)/,/^(?:bz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^(?:Naumen)/,/^(?:SMPPL)/,/^(?:Nunit)/,/^(?:FSFUL)/,/^(?:GL2PS)/,/^(?:SMLNJ)/,/^(?:Rdisc)/,/^(?:Noweb)/,/^(?:Nokia)/,/^(?:SISSL)/,/^(?:Qhull)/,/^(?:Intel)/,/^(?:Glide)/,/^(?:Xerox)/,/^(?:AMPAS)/,/^(?:WTFPL)/,/^(?:MS-PL)/,/^(?:XSkat)/,/^(?:MS-RL)/,/^(?:MirOS)/,/^(?:RSCPL)/,/^(?:TMate)/,/^(?:OGTSL)/,/^(?:FSFAP)/,/^(?:NCSA)/,/^(?:Zlib)/,/^(?:SCEA)/,/^(?:SNIA)/,/^(?:NGPL)/,/^(?:NOSL)/,/^(?:ADSL)/,/^(?:MTLL)/,/^(?:NLPL)/,/^(?:Ruby)/,/^(?:JSON)/,/^(?:Barr)/,/^(?:0BSD)/,/^(?:Xnet)/,/^(?:Cube)/,/^(?:curl)/,/^(?:DSDP)/,/^(?:Fair)/,/^(?:HPND)/,/^(?:TOSL)/,/^(?:IJG)/,/^(?:SWL)/,/^(?:Vim)/,/^(?:FTL)/,/^(?:ICU)/,/^(?:OML)/,/^(?:NRL)/,/^(?:DOC)/,/^(?:TCL)/,/^(?:W3C)/,/^(?:NTP)/,/^(?:IPA)/,/^(?:ISC)/,/^(?:X11)/,/^(?:AAL)/,/^(?:AML)/,/^(?:xpp)/,/^(?:Zed)/,/^(?:MIT)/,/^(?:Mup)/], +conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (typeof commonjsRequire !== 'undefined' && 'object' !== 'undefined') { +exports.parser = spdxparse; +exports.Parser = spdxparse.Parser; +exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; +exports.main = function commonjsMain(args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); + } + var source = fs.readFileSync(path.normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if ('object' !== 'undefined' && commonjsRequire.main === module) { + exports.main(process.argv.slice(1)); +} +} +}); + +var parser = parser$1.parser; + +var spdxExpressionParse = function (argument) { + return parser.parse(argument) +}; + +var spdxLicenseIds = [ + "Glide", + "Abstyles", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "AMPAS", + "APL-1.0", + "Adobe-Glyph", + "APAFML", + "Adobe-2006", + "AGPL-1.0", + "Afmparse", + "Aladdin", + "ADSL", + "AMDPLPA", + "ANTLR-PD", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "AML", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "Artistic-1.0", + "Artistic-1.0-Perl", + "Artistic-1.0-cl8", + "Artistic-2.0", + "AAL", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "BSL-1.0", + "Borceux", + "BSD-2-Clause", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "BSD-3-Clause", + "BSD-3-Clause-Clear", + "BSD-4-Clause", + "BSD-Protection", + "BSD-Source-Code", + "BSD-3-Clause-Attribution", + "0BSD", + "BSD-4-Clause-UC", + "bzip2-1.0.5", + "bzip2-1.0.6", + "Caldera", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-2.1", + "CECILL-B", + "CECILL-C", + "ClArtistic", + "MIT-CMU", + "CNRI-Jython", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "CPOL-1.02", + "CDDL-1.0", + "CDDL-1.1", + "CPAL-1.0", + "CPL-1.0", + "CATOSL-1.1", + "Condor-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-3.0", + "CC-BY-4.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-4.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-4.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-4.0", + "CC0-1.0", + "Crossword", + "CrystalStacker", + "CUA-OPL-1.0", + "Cube", + "curl", + "D-FSL-1.0", + "diffmark", + "WTFPL", + "DOC", + "Dotseqn", + "DSDP", + "dvipdfm", + "EPL-1.0", + "ECL-1.0", + "ECL-2.0", + "eGenix", + "EFL-1.0", + "EFL-2.0", + "MIT-advertising", + "MIT-enna", + "Entessa", + "ErlPL-1.1", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "Eurosym", + "Fair", + "MIT-feh", + "Frameworx-1.0", + "FreeImage", + "FTL", + "FSFAP", + "FSFUL", + "FSFULLR", + "Giftware", + "GL2PS", + "Glulxe", + "AGPL-3.0", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-2.0", + "GPL-3.0", + "LGPL-2.1", + "LGPL-3.0", + "LGPL-2.0", + "gnuplot", + "gSOAP-1.3b", + "HaskellReport", + "HPND", + "IBM-pibs", + "IPL-1.0", + "ICU", + "ImageMagick", + "iMatix", + "Imlib2", + "IJG", + "Info-ZIP", + "Intel-ACPI", + "Intel", + "Interbase-1.0", + "IPA", + "ISC", + "JasPer-2.0", + "JSON", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a", + "LPPL-1.3c", + "Latex2e", + "BSD-3-Clause-LBNL", + "Leptonica", + "LGPLLR", + "Libpng", + "libtiff", + "LAL-1.2", + "LAL-1.3", + "LiLiQ-P-1.1", + "LiLiQ-Rplus-1.1", + "LiLiQ-R-1.1", + "LPL-1.02", + "LPL-1.0", + "MakeIndex", + "MTLL", + "MS-PL", + "MS-RL", + "MirOS", + "MITNFA", + "MIT", + "Motosoto", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "mpich2", + "Multics", + "Mup", + "NASA-1.3", + "Naumen", + "NBPL-1.0", + "NetCDF", + "NGPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "Newsletr", + "NLPL", + "Nokia", + "NPOSL-3.0", + "NLOD-1.0", + "Noweb", + "NRL", + "NTP", + "Nunit", + "OCLC-2.0", + "ODbL-1.0", + "PDDL-1.0", + "OCCT-PL", + "OGTSL", + "OLDAP-2.2.2", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OML", + "OPL-1.0", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OpenSSL", + "OSET-PL-2.1", + "PHP-3.0", + "PHP-3.01", + "Plexus", + "PostgreSQL", + "psfrag", + "psutils", + "Python-2.0", + "QPL-1.0", + "Qhull", + "Rdisc", + "RPSL-1.0", + "RPL-1.1", + "RPL-1.5", + "RHeCos-1.1", + "RSCPL", + "RSA-MD", + "Ruby", + "SAX-PD", + "Saxpath", + "SCEA", + "SWL", + "SMPPL", + "Sendmail", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "OFL-1.0", + "OFL-1.1", + "SimPL-2.0", + "Sleepycat", + "SNIA", + "Spencer-86", + "Spencer-94", + "Spencer-99", + "SMLNJ", + "SugarCRM-1.1.3", + "SISSL", + "SISSL-1.2", + "SPL-1.0", + "Watcom-1.0", + "TCL", + "Unlicense", + "TMate", + "TORQUE-1.1", + "TOSL", + "Unicode-TOU", + "UPL-1.0", + "NCSA", + "Vim", + "VOSTROM", + "VSL-1.0", + "W3C-19980720", + "W3C", + "Wsuipa", + "Xnet", + "X11", + "Xerox", + "XFree86-1.1", + "xinetd", + "xpp", + "XSkat", + "YPL-1.0", + "YPL-1.1", + "Zed", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "Zlib", + "zlib-acknowledgement", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1", + "BSD-3-Clause-No-Nuclear-License", + "BSD-3-Clause-No-Nuclear-Warranty", + "BSD-3-Clause-No-Nuclear-License-2014", + "eCos-2.0", + "GPL-2.0-with-autoconf-exception", + "GPL-2.0-with-bison-exception", + "GPL-2.0-with-classpath-exception", + "GPL-2.0-with-font-exception", + "GPL-2.0-with-GCC-exception", + "GPL-3.0-with-autoconf-exception", + "GPL-3.0-with-GCC-exception", + "StandardML-NJ", + "WXwindows" +] +; + +var spdxLicenseIds$1 = Object.freeze({ + default: spdxLicenseIds +}); + +var licenseIDs = ( spdxLicenseIds$1 && spdxLicenseIds ) || spdxLicenseIds$1; + +function valid(string) { + return licenseIDs.indexOf(string) > -1; +} + +// Common transpositions of license identifier acronyms +var transpositions = [ + ['APGL', 'AGPL'], + ['Gpl', 'GPL'], + ['GLP', 'GPL'], + ['APL', 'Apache'], + ['ISD', 'ISC'], + ['GLP', 'GPL'], + ['IST', 'ISC'], + ['Claude', 'Clause'], + [' or later', '+'], + [' International', ''], + ['GNU', 'GPL'], + ['GUN', 'GPL'], + ['+', ''], + ['GNU GPL', 'GPL'], + ['GNU/GPL', 'GPL'], + ['GNU GLP', 'GPL'], + ['GNU General Public License', 'GPL'], + ['Gnu public license', 'GPL'], + ['GNU Public License', 'GPL'], + ['GNU GENERAL PUBLIC LICENSE', 'GPL'], + ['MTI', 'MIT'], + ['Mozilla Public License', 'MPL'], + ['WTH', 'WTF'], + ['-License', ''] +]; + +var TRANSPOSED = 0; +var CORRECT = 1; + +// Simple corrections to nearly valid identifiers. +var transforms = [ + // e.g. 'mit' + function(argument) { + return argument.toUpperCase(); + }, + // e.g. 'MIT ' + function(argument) { + return argument.trim(); + }, + // e.g. 'M.I.T.' + function(argument) { + return argument.replace(/\./g, ''); + }, + // e.g. 'Apache- 2.0' + function(argument) { + return argument.replace(/\s+/g, ''); + }, + // e.g. 'CC BY 4.0'' + function(argument) { + return argument.replace(/\s+/g, '-'); + }, + // e.g. 'LGPLv2.1' + function(argument) { + return argument.replace('v', '-'); + }, + // e.g. 'Apache 2.0' + function(argument) { + return argument.replace(/,?\s*(\d)/, '-$1'); + }, + // e.g. 'GPL 2' + function(argument) { + return argument.replace(/,?\s*(\d)/, '-$1.0'); + }, + // e.g. 'Apache Version 2.0' + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2'); + }, + // e.g. 'Apache Version 2' + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0'); + }, + // e.g. 'ZLIB' + function(argument) { + return argument[0].toUpperCase() + argument.slice(1); + }, + // e.g. 'MPL/2.0' + function(argument) { + return argument.replace('/', '-'); + }, + // e.g. 'Apache 2' + function(argument) { + return argument + .replace(/\s*V\s*(\d)/, '-$1') + .replace(/(\d)$/, '$1.0'); + }, + // e.g. 'GPL-2.0-' + function(argument) { + return argument.slice(0, argument.length - 1); + }, + // e.g. 'GPL2' + function(argument) { + return argument.replace(/(\d)$/, '-$1.0'); + }, + // e.g. 'BSD 3' + function(argument) { + return argument.replace(/(-| )?(\d)$/, '-$2-Clause'); + }, + // e.g. 'BSD clause 3' + function(argument) { + return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause'); + }, + // e.g. 'BY-NC-4.0' + function(argument) { + return 'CC-' + argument; + }, + // e.g. 'BY-NC' + function(argument) { + return 'CC-' + argument + '-4.0'; + }, + // e.g. 'Attribution-NonCommercial' + function(argument) { + return argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, ''); + }, + // e.g. 'Attribution-NonCommercial' + function(argument) { + return 'CC-' + + argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, '') + + '-4.0'; + } +]; + +// If all else fails, guess that strings containing certain substrings +// meant to identify certain licenses. +var lastResorts = [ + ['UNLI', 'Unlicense'], + ['WTF', 'WTFPL'], + ['2 CLAUSE', 'BSD-2-Clause'], + ['2-CLAUSE', 'BSD-2-Clause'], + ['3 CLAUSE', 'BSD-3-Clause'], + ['3-CLAUSE', 'BSD-3-Clause'], + ['AFFERO', 'AGPL-3.0'], + ['AGPL', 'AGPL-3.0'], + ['APACHE', 'Apache-2.0'], + ['ARTISTIC', 'Artistic-2.0'], + ['Affero', 'AGPL-3.0'], + ['BEER', 'Beerware'], + ['BOOST', 'BSL-1.0'], + ['BSD', 'BSD-2-Clause'], + ['ECLIPSE', 'EPL-1.0'], + ['FUCK', 'WTFPL'], + ['GNU', 'GPL-3.0'], + ['LGPL', 'LGPL-3.0'], + ['GPL', 'GPL-3.0'], + ['MIT', 'MIT'], + ['MPL', 'MPL-2.0'], + ['X11', 'X11'], + ['ZLIB', 'Zlib'] +]; + +var SUBSTRING = 0; +var IDENTIFIER = 1; + +var validTransformation = function(identifier) { + for (var i = 0; i < transforms.length; i++) { + var transformed = transforms[i](identifier); + if (transformed !== identifier && valid(transformed)) { + return transformed; + } + } + return null; +}; + +var validLastResort = function(identifier) { + var upperCased = identifier.toUpperCase(); + for (var i = 0; i < lastResorts.length; i++) { + var lastResort = lastResorts[i]; + if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { + return lastResort[IDENTIFIER]; + } + } + return null; +}; + +var anyCorrection = function(identifier, check) { + for (var i = 0; i < transpositions.length; i++) { + var transposition = transpositions[i]; + var transposed = transposition[TRANSPOSED]; + if (identifier.indexOf(transposed) > -1) { + var corrected = identifier.replace( + transposed, + transposition[CORRECT] + ); + var checked = check(corrected); + if (checked !== null) { + return checked; + } + } + } + return null; +}; + +var spdxCorrect = function(identifier) { + identifier = identifier.replace(/\+$/, ''); + if (valid(identifier)) { + return identifier; + } + var transformed = validTransformation(identifier); + if (transformed !== null) { + return transformed; + } + transformed = anyCorrection(identifier, function(argument) { + if (valid(argument)) { + return argument; + } + return validTransformation(argument); + }); + if (transformed !== null) { + return transformed; + } + transformed = validLastResort(identifier); + if (transformed !== null) { + return transformed; + } + transformed = anyCorrection(identifier, validLastResort); + if (transformed !== null) { + return transformed; + } + return null; +}; + +var genericWarning = ( + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "' +); + +var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + +function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; +} + +function usesLicenseRef(ast) { + if (ast.hasOwnProperty('license')) { + var license = ast.license; + return ( + startsWith('LicenseRef', license) || + startsWith('DocumentRef', license) + ); + } else { + return ( + usesLicenseRef(ast.left) || + usesLicenseRef(ast.right) + ); + } +} + +var validateNpmPackageLicense = function(argument) { + var ast; + + try { + ast = spdxExpressionParse(argument); + } catch (e) { + var match; + if ( + argument === 'UNLICENSED' || + argument === 'UNLICENCED' + ) { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + var corrected = spdxCorrect(argument); + if (corrected) { + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + return result; + } + } + + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } +}; + +var gitHostInfo = createCommonjsModule(function (module) { +'use strict'; + +var gitHosts = module.exports = { + github: { + // First two are insecure and generally shouldn't be used any more, but + // they are still supported. + 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'github.com', + 'treepath': 'tree', + 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + }, + bitbucket: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'bitbucket.org', + 'treepath': 'src', + 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' + }, + gitlab: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gitlab.com', + 'treepath': 'tree', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}' + }, + gist: { + 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gist.github.com', + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/, + 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', + 'bugstemplate': 'https://{domain}/{project}', + 'gittemplate': 'git://{domain}/{project}.git{#committish}', + 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{project}{/committish}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + } +}; + +var gitHostDefaults = { + 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', + 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', + 'shortcuttemplate': '{type}:{user}/{project}{#committish}', + 'pathtemplate': '{user}/{project}{#committish}', + 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/ +}; + +Object.keys(gitHosts).forEach(function (name) { + Object.keys(gitHostDefaults).forEach(function (key) { + if (gitHosts[name][key]) return + gitHosts[name][key] = gitHostDefaults[key]; + }); + gitHosts[name].protocols_re = RegExp('^(' + + gitHosts[name].protocols.map(function (protocol) { + return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') + }).join('|') + '):$'); +}); +}); + +var gitHost = createCommonjsModule(function (module) { +'use strict'; + +var extend = Object.assign || util._extend; + +var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { + var gitHostInfo$$1 = this; + gitHostInfo$$1.type = type; + Object.keys(gitHostInfo[type]).forEach(function (key) { + gitHostInfo$$1[key] = gitHostInfo[type][key]; + }); + gitHostInfo$$1.user = user; + gitHostInfo$$1.auth = auth; + gitHostInfo$$1.project = project; + gitHostInfo$$1.committish = committish; + gitHostInfo$$1.default = defaultRepresentation; + gitHostInfo$$1.opts = opts || {}; +}; +GitHost.prototype = {}; + +GitHost.prototype.hash = function () { + return this.committish ? '#' + this.committish : '' +}; + +GitHost.prototype._fill = function (template, opts) { + if (!template) return + var vars = extend({}, opts); + opts = extend(extend({}, this.opts), opts); + var self = this; + Object.keys(this).forEach(function (key) { + if (self[key] != null && vars[key] == null) vars[key] = self[key]; + }); + var rawAuth = vars.auth; + var rawComittish = vars.committish; + Object.keys(vars).forEach(function (key) { + vars[key] = encodeURIComponent(vars[key]); + }); + vars['auth@'] = rawAuth ? rawAuth + '@' : ''; + if (opts.noCommittish) { + vars['#committish'] = ''; + vars['/tree/committish'] = ''; + vars['/comittish'] = ''; + vars.comittish = ''; + } else { + vars['#committish'] = rawComittish ? '#' + rawComittish : ''; + vars['/tree/committish'] = vars.committish + ? '/' + vars.treepath + '/' + vars.committish + : ''; + vars['/committish'] = vars.committish ? '/' + vars.committish : ''; + vars.committish = vars.committish || 'master'; + } + var res = template; + Object.keys(vars).forEach(function (key) { + res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]); + }); + if (opts.noGitPlus) { + return res.replace(/^git[+]/, '') + } else { + return res + } +}; + +GitHost.prototype.ssh = function (opts) { + return this._fill(this.sshtemplate, opts) +}; + +GitHost.prototype.sshurl = function (opts) { + return this._fill(this.sshurltemplate, opts) +}; + +GitHost.prototype.browse = function (opts) { + return this._fill(this.browsetemplate, opts) +}; + +GitHost.prototype.docs = function (opts) { + return this._fill(this.docstemplate, opts) +}; + +GitHost.prototype.bugs = function (opts) { + return this._fill(this.bugstemplate, opts) +}; + +GitHost.prototype.https = function (opts) { + return this._fill(this.httpstemplate, opts) +}; + +GitHost.prototype.git = function (opts) { + return this._fill(this.gittemplate, opts) +}; + +GitHost.prototype.shortcut = function (opts) { + return this._fill(this.shortcuttemplate, opts) +}; + +GitHost.prototype.path = function (opts) { + return this._fill(this.pathtemplate, opts) +}; + +GitHost.prototype.tarball = function (opts) { + return this._fill(this.tarballtemplate, opts) +}; + +GitHost.prototype.file = function (P, opts) { + return this._fill(this.filetemplate, extend({ + path: P.replace(/^[/]+/g, '') + }, opts)) +}; + +GitHost.prototype.getDefaultRepresentation = function () { + return this.default +}; + +GitHost.prototype.toString = function (opts) { + return (this[this.default] || this.sshurl).call(this, opts) +}; +}); + +var hostedGitInfo = createCommonjsModule(function (module) { +'use strict'; + + +var GitHost = module.exports = gitHost; + +var protocolToRepresentationMap = { + 'git+ssh': 'sshurl', + 'git+https': 'https', + 'ssh': 'sshurl', + 'git': 'git' +}; + +function protocolToRepresentation (protocol) { + if (protocol.substr(-1) === ':') protocol = protocol.slice(0, -1); + return protocolToRepresentationMap[protocol] || protocol +} + +var authProtocols = { + 'git:': true, + 'https:': true, + 'git+https:': true, + 'http:': true, + 'git+http:': true +}; + +module.exports.fromUrl = function (giturl, opts) { + if (giturl == null || giturl === '') return + var url$$1 = fixupUnqualifiedGist( + isGitHubShorthand(giturl) ? 'github:' + giturl : giturl + ); + var parsed = parseGitUrl(url$$1); + var shortcutMatch = url$$1.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')); + var matches = Object.keys(gitHostInfo).map(function (gitHostName) { + try { + var gitHostInfo$$1 = gitHostInfo[gitHostName]; + var auth = null; + if (parsed.auth && authProtocols[parsed.protocol]) { + auth = decodeURIComponent(parsed.auth); + } + var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null; + var user = null; + var project = null; + var defaultRepresentation = null; + if (shortcutMatch && shortcutMatch[1] === gitHostName) { + user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]); + project = decodeURIComponent(shortcutMatch[3]); + defaultRepresentation = 'shortcut'; + } else { + if (parsed.host !== gitHostInfo$$1.domain) return + if (!gitHostInfo$$1.protocols_re.test(parsed.protocol)) return + if (!parsed.path) return + var pathmatch = gitHostInfo$$1.pathmatch; + var matched = parsed.path.match(pathmatch); + if (!matched) return + if (matched[1] != null) user = decodeURIComponent(matched[1].replace(/^:/, '')); + if (matched[2] != null) project = decodeURIComponent(matched[2]); + defaultRepresentation = protocolToRepresentation(parsed.protocol); + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) + } catch (ex) { + if (!(ex instanceof URIError)) throw ex + } + }).filter(function (gitHostInfo$$1) { return gitHostInfo$$1 }); + if (matches.length !== 1) return + return matches[0] +}; + +function isGitHubShorthand (arg) { + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) +} + +function fixupUnqualifiedGist (giturl) { + // necessary for round-tripping gists + var parsed = url.parse(giturl); + if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { + return parsed.protocol + '/' + parsed.host + } else { + return giturl + } +} + +function parseGitUrl (giturl) { + if (typeof giturl !== 'string') giturl = '' + giturl; + var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/); + if (!matched) return url.parse(giturl) + return { + protocol: 'git+ssh:', + slashes: true, + auth: matched[1], + host: matched[2], + port: null, + hostname: matched[2], + hash: matched[4], + search: null, + query: null, + pathname: '/' + matched[3], + path: '/' + matched[3], + href: 'git+ssh://' + matched[1] + '@' + matched[2] + + '/' + matched[3] + (matched[4] || '') + } +} +}); + +var blacklist = [ + 'freelist', + 'sys' +]; + +var builtinModules = Object.keys(process.binding('natives')).filter(function (el) { + return !/^_|^internal|\//.test(el) && blacklist.indexOf(el) === -1; +}).sort(); + +var isBuiltinModule = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return builtinModules.indexOf(str) !== -1; +}; + +var extract_description = extractDescription; + +// Extracts description from contents of a readme file in markdown format +function extractDescription (d) { + if (!d) return; + if (d === "ERROR: No README data found!") return; + // the first block of text before the first heading + // that isn't the first line heading + d = d.trim().split('\n'); + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); + var l = d.length; + for (var e = s + 1; e < l && d[e].trim(); e ++); + return d.slice(s, e).join(' ').trim() +} + +var topLevel = {"dependancies":"dependencies","dependecies":"dependencies","depdenencies":"dependencies","devEependencies":"devDependencies","depends":"dependencies","dev-dependencies":"devDependencies","devDependences":"devDependencies","devDepenencies":"devDependencies","devdependencies":"devDependencies","repostitory":"repository","repo":"repository","prefereGlobal":"preferGlobal","hompage":"homepage","hampage":"homepage","autohr":"author","autor":"author","contributers":"contributors","publicationConfig":"publishConfig","script":"scripts"}; +var bugs = {"web":"url","name":"url"}; +var script = {"server":"start","tests":"test"}; +var typos = { + topLevel: topLevel, + bugs: bugs, + script: script +}; + +var typos$1 = Object.freeze({ + topLevel: topLevel, + bugs: bugs, + script: script, + default: typos +}); + +var typos$2 = ( typos$1 && typos ) || typos$1; + +var fixer_1 = createCommonjsModule(function (module) { +var depTypes = ["dependencies","devDependencies","optionalDependencies"]; + + + + +var fixer = module.exports = { + // default warning function + warn: function() {}, + + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0]; + } + if (!data.repository) return this.warn("missingRepository") + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + }; + } + var r = data.repository.url || ""; + if (r) { + var hosted = hostedGitInfo.fromUrl(r); + if (hosted) { + r = data.repository.url + = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString(); + } + } + + if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r); + } + } + +, fixTypos: function(data) { + Object.keys(typos$2.topLevel).forEach(function (d) { + if (data.hasOwnProperty(d)) { + this.warn("typo", d, typos$2.topLevel[d]); + } + }, this); + } + +, fixScriptsField: function(data) { + if (!data.scripts) return + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts"); + delete data.scripts; + return + } + Object.keys(data.scripts).forEach(function (k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript"); + delete data.scripts[k]; + } else if (typos$2.script[k] && !data.scripts[typos$2.script[k]]) { + this.warn("typo", k, typos$2.script[k], "scripts"); + } + }, this); + } + +, fixFilesField: function(data) { + var files = data.files; + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles"); + delete data.files; + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file); + return false + } else { + return true + } + }, this); + } + } + +, fixBinField: function(data) { + if (!data.bin) return; + if (typeof data.bin === "string") { + var b = {}; + var match; + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin; + } else { + b[data.name] = data.bin; + } + data.bin = b; + } + } + +, fixManField: function(data) { + if (!data.man) return; + if (typeof data.man === "string") { + data.man = [ data.man ]; + } + } +, fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies"; + var bd = "bundleDependencies"; + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd]; + delete data[bdd]; + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies"); + delete data[bd]; + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd) { + if (!bd || typeof bd !== 'string') { + this.warn("nonStringBundleDependency", bd); + return false + } else { + if (!data.dependencies) { + data.dependencies = {}; + } + if (!data.dependencies.hasOwnProperty(bd)) { + this.warn("nonDependencyBundleDependency", bd); + data.dependencies[bd] = "*"; + } + return true + } + }, this); + } + } + +, fixDependencies: function(data, strict) { + var loose = !strict; + objectifyDeps(data, this.warn); + addOptionalDepsToDeps(data, this.warn); + this.fixBundleDependenciesField(data) + + ;['dependencies','devDependencies'].forEach(function(deps) { + if (!(deps in data)) return + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps); + delete data[deps]; + return + } + Object.keys(data[deps]).forEach(function (d) { + var r = data[deps][d]; + if (typeof r !== 'string') { + this.warn("nonStringDependency", d, JSON.stringify(r)); + delete data[deps][d]; + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]); + if (hosted) data[deps][d] = hosted.toString(); + }, this); + }, this); + } + +, fixModulesField: function (data) { + if (data.modules) { + this.warn("deprecatedModules"); + delete data.modules; + } + } + +, fixKeywordsField: function (data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/); + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords; + this.warn("nonArrayKeywords"); + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false + } else { + return true + } + }, this); + } + } + +, fixVersionField: function(data, strict) { + // allow "loose" semver 1.0 versions in non-strict mode + // enforce strict semver 2.0 compliance in strict mode + var loose = !strict; + if (!data.version) { + data.version = ""; + return true + } + if (!semver.valid(data.version, loose)) { + throw new Error('Invalid version: "'+ data.version + '"') + } + data.version = semver.clean(data.version, loose); + return true + } + +, fixPeople: function(data) { + modifyPeople(data, unParsePerson); + modifyPeople(data, parsePerson); + } + +, fixNameField: function(data, options) { + if (typeof options === "boolean") options = {strict: options}; + else if (typeof options === "undefined") options = {}; + var strict = options.strict; + if (!data.name && !strict) { + data.name = ""; + return + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string.") + } + if (!strict) + data.name = data.name.trim(); + ensureValidName(data.name, strict, options.allowLegacyCase); + if (isBuiltinModule(data.name)) + this.warn("conflictingName", data.name); + } + + +, fixDescriptionField: function (data) { + if (data.description && typeof data.description !== 'string') { + this.warn("nonStringDescription"); + delete data.description; + } + if (data.readme && !data.description) + data.description = extract_description(data.readme); + if(data.description === undefined) delete data.description; + if (!data.description) this.warn("missingDescription"); + } + +, fixReadmeField: function (data) { + if (!data.readme) { + this.warn("missingReadme"); + data.readme = "ERROR: No README data found!"; + } + } + +, fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url); + if(hosted && hosted.bugs()) { + data.bugs = {url: hosted.bugs()}; + } + } + else if(data.bugs) { + var emailRe = /^.+@.*\..+$/; + if(typeof data.bugs == "string") { + if(emailRe.test(data.bugs)) + data.bugs = {email:data.bugs}; + else if(url.parse(data.bugs).protocol) + data.bugs = {url: data.bugs}; + else + this.warn("nonEmailUrlBugsString"); + } + else { + bugsTypos(data.bugs, this.warn); + var oldBugs = data.bugs; + data.bugs = {}; + if(oldBugs.url) { + if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) + data.bugs.url = oldBugs.url; + else + this.warn("nonUrlBugsUrlField"); + } + if(oldBugs.email) { + if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) + data.bugs.email = oldBugs.email; + else + this.warn("nonEmailBugsEmailField"); + } + } + if(!data.bugs.email && !data.bugs.url) { + delete data.bugs; + this.warn("emptyNormalizedBugs"); + } + } + } + +, fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url); + if (hosted && hosted.docs()) data.homepage = hosted.docs(); + } + if (!data.homepage) return + + if(typeof data.homepage !== "string") { + this.warn("nonUrlHomepage"); + return delete data.homepage + } + if(!url.parse(data.homepage).protocol) { + this.warn("missingProtocolHomepage"); + data.homepage = "http://" + data.homepage; + } + } + +, fixLicenseField: function(data) { + if (!data.license) { + return this.warn("missingLicense") + } else{ + if ( + typeof(data.license) !== 'string' || + data.license.length < 1 + ) { + this.warn("invalidLicense"); + } else { + if (!validateNpmPackageLicense(data.license).validForNewPackages) + this.warn("invalidLicense"); + } + } + } +}; + +function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== '@') return false + + var rest = spec.slice(1).split('/'); + if (rest.length !== 2) return false + + return rest[0] && rest[1] && + rest[0] === encodeURIComponent(rest[0]) && + rest[1] === encodeURIComponent(rest[1]) +} + +function isCorrectlyEncodedName(spec) { + return !spec.match(/[\/@\s\+%:]/) && + spec === encodeURIComponent(spec) +} + +function ensureValidName (name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || + !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || + (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || + name.toLowerCase() === "node_modules" || + name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)) + } +} + +function modifyPeople (data, fn) { + if (data.author) data.author = fn(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(fn); + }); + return data +} + +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || ""; + var u = person.url || person.web; + var url$$1 = u ? (" ("+u+")") : ""; + var e = person.email || person.mail; + var email = e ? (" <"+e+">") : ""; + return name+email+url$$1 +} + +function parsePerson (person) { + if (typeof person !== "string") return person + var name = person.match(/^([^\(<]+)/); + var url$$1 = person.match(/\(([^\)]+)\)/); + var email = person.match(/<([^>]+)>/); + var obj = {}; + if (name && name[0].trim()) obj.name = name[0].trim(); + if (email) obj.email = email[1]; + if (url$$1) obj.url = url$$1[1]; + return obj +} + +function addOptionalDepsToDeps (data, warn) { + var o = data.optionalDependencies; + if (!o) return; + var d = data.dependencies || {}; + Object.keys(o).forEach(function (k) { + d[k] = o[k]; + }); + data.dependencies = d; +} + +function depObjectify (deps, type, warn) { + if (!deps) return {} + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/); + } + if (!Array.isArray(deps)) return deps + warn("deprecatedArrayDependencies", type); + var o = {}; + deps.filter(function (d) { + return typeof d === "string" + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/); + var dn = d.shift(); + var dv = d.join(""); + dv = dv.trim(); + dv = dv.replace(/^@/, ""); + o[dn] = dv; + }); + return o +} + +function objectifyDeps (data, warn) { + depTypes.forEach(function (type) { + if (!data[type]) return; + data[type] = depObjectify(data[type], type, warn); + }); +} + +function bugsTypos(bugs, warn) { + if (!bugs) return + Object.keys(bugs).forEach(function (k) { + if (typos$2.bugs[k]) { + warn("typo", k, typos$2.bugs[k], "bugs"); + bugs[typos$2.bugs[k]] = bugs[k]; + delete bugs[k]; + } + }); +} +}); + +var repositories = "'repositories' (plural) Not supported. Please pick one as the 'repository' field"; +var missingRepository = "No repository field."; +var brokenGitUrl = "Probably broken git url: %s"; +var nonObjectScripts = "scripts must be an object"; +var nonStringScript = "script values must be string commands"; +var nonArrayFiles = "Invalid 'files' member"; +var invalidFilename = "Invalid filename in 'files' list: %s"; +var nonArrayBundleDependencies = "Invalid 'bundleDependencies' list. Must be array of package names"; +var nonStringBundleDependency = "Invalid bundleDependencies member: %s"; +var nonDependencyBundleDependency = "Non-dependency in bundleDependencies: %s"; +var nonObjectDependencies = "%s field must be an object"; +var nonStringDependency = "Invalid dependency: %s %s"; +var deprecatedArrayDependencies = "specifying %s as array is deprecated"; +var deprecatedModules = "modules field is deprecated"; +var nonArrayKeywords = "keywords should be an array of strings"; +var nonStringKeyword = "keywords should be an array of strings"; +var conflictingName = "%s is also the name of a node core module."; +var nonStringDescription = "'description' field should be a string"; +var missingDescription = "No description"; +var missingReadme = "No README data"; +var missingLicense = "No license field."; +var nonEmailUrlBugsString = "Bug string field must be url, email, or {email,url}"; +var nonUrlBugsUrlField = "bugs.url field must be a string url. Deleted."; +var nonEmailBugsEmailField = "bugs.email field must be a string email. Deleted."; +var emptyNormalizedBugs = "Normalized value of bugs field is an empty object. Deleted."; +var nonUrlHomepage = "homepage field must be a string url. Deleted."; +var invalidLicense = "license should be a valid SPDX license expression"; +var missingProtocolHomepage = "homepage field must start with a protocol."; +var typo = "%s should probably be %s."; +var warning_messages = { + repositories: repositories, + missingRepository: missingRepository, + brokenGitUrl: brokenGitUrl, + nonObjectScripts: nonObjectScripts, + nonStringScript: nonStringScript, + nonArrayFiles: nonArrayFiles, + invalidFilename: invalidFilename, + nonArrayBundleDependencies: nonArrayBundleDependencies, + nonStringBundleDependency: nonStringBundleDependency, + nonDependencyBundleDependency: nonDependencyBundleDependency, + nonObjectDependencies: nonObjectDependencies, + nonStringDependency: nonStringDependency, + deprecatedArrayDependencies: deprecatedArrayDependencies, + deprecatedModules: deprecatedModules, + nonArrayKeywords: nonArrayKeywords, + nonStringKeyword: nonStringKeyword, + conflictingName: conflictingName, + nonStringDescription: nonStringDescription, + missingDescription: missingDescription, + missingReadme: missingReadme, + missingLicense: missingLicense, + nonEmailUrlBugsString: nonEmailUrlBugsString, + nonUrlBugsUrlField: nonUrlBugsUrlField, + nonEmailBugsEmailField: nonEmailBugsEmailField, + emptyNormalizedBugs: emptyNormalizedBugs, + nonUrlHomepage: nonUrlHomepage, + invalidLicense: invalidLicense, + missingProtocolHomepage: missingProtocolHomepage, + typo: typo +}; + +var warning_messages$1 = Object.freeze({ + repositories: repositories, + missingRepository: missingRepository, + brokenGitUrl: brokenGitUrl, + nonObjectScripts: nonObjectScripts, + nonStringScript: nonStringScript, + nonArrayFiles: nonArrayFiles, + invalidFilename: invalidFilename, + nonArrayBundleDependencies: nonArrayBundleDependencies, + nonStringBundleDependency: nonStringBundleDependency, + nonDependencyBundleDependency: nonDependencyBundleDependency, + nonObjectDependencies: nonObjectDependencies, + nonStringDependency: nonStringDependency, + deprecatedArrayDependencies: deprecatedArrayDependencies, + deprecatedModules: deprecatedModules, + nonArrayKeywords: nonArrayKeywords, + nonStringKeyword: nonStringKeyword, + conflictingName: conflictingName, + nonStringDescription: nonStringDescription, + missingDescription: missingDescription, + missingReadme: missingReadme, + missingLicense: missingLicense, + nonEmailUrlBugsString: nonEmailUrlBugsString, + nonUrlBugsUrlField: nonUrlBugsUrlField, + nonEmailBugsEmailField: nonEmailBugsEmailField, + emptyNormalizedBugs: emptyNormalizedBugs, + nonUrlHomepage: nonUrlHomepage, + invalidLicense: invalidLicense, + missingProtocolHomepage: missingProtocolHomepage, + typo: typo, + default: warning_messages +}); + +var messages = ( warning_messages$1 && warning_messages ) || warning_messages$1; + +var make_warning = function() { + var args = Array.prototype.slice.call(arguments, 0); + var warningName = args.shift(); + if (warningName == "typo") { + return makeTypoWarning.apply(null,args) + } + else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'"; + args.unshift(msgTemplate); + return util.format.apply(null, args) + } +}; + +function makeTypoWarning (providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']"; + probableName = field + "['" + probableName + "']"; + } + return util.format(messages.typo, providedName, probableName) +} + +var normalize_1 = normalize; + + +normalize.fixer = fixer_1; + + + +var fieldsToFix = ['name','version','description','repository','modules','scripts' + ,'files','bin','man','bugs','keywords','readme','homepage','license']; +var otherThingsToFix = ['dependencies','people', 'typos']; + +var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field" +}); +// two ways to do this in CoffeeScript on only one line, sub-70 chars: +// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" +// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) +thingsToFix = thingsToFix.concat(otherThingsToFix); + +function normalize (data, warn, strict) { + if(warn === true) warn = null, strict = true; + if(!strict) strict = false; + if(!warn || data.private) warn = function(msg) { /* noop */ }; + + if (data.scripts && + data.scripts.install === "node-gyp rebuild" && + !data.scripts.preinstall) { + data.gypfile = true; + } + fixer_1.warn = function() { warn(make_warning.apply(null, arguments)); }; + thingsToFix.forEach(function(thingName) { + fixer_1["fix" + ucFirst(thingName)](data, strict); + }); + data._id = data.name + "@" + data.version; +} + +function ucFirst (string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} + +var readPkg = createCommonjsModule(function (module) { +'use strict'; + + + + +module.exports = (fp, opts) => { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + + return pathType.dir(fp) + .then(isDir => { + if (isDir) { + fp = path.join(fp, 'package.json'); + } + + return loadJsonFile(fp); + }) + .then(x => { + if (opts.normalize !== false) { + normalize_1(x); + } + + return x; + }); +}; + +module.exports.sync = (fp, opts) => { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; + + const x = loadJsonFile.sync(fp); + + if (opts.normalize !== false) { + normalize_1(x); + } + + return x; +}; +}); + +var readPkgUp = createCommonjsModule(function (module) { +'use strict'; + + + +module.exports = opts => { + return findUp('package.json', opts).then(fp => { + if (!fp) { + return {}; + } + + return readPkg(fp, opts).then(pkg => ({pkg, path: fp})); + }); +}; + +module.exports.sync = opts => { + const fp = findUp.sync('package.json', opts); + + if (!fp) { + return {}; + } + + return { + pkg: readPkg.sync(fp, opts), + path: fp + }; +}; +}); + +function concat$2(parts) { + return { type: "concat", parts }; +} + +function indent$2(contents) { + return { type: "indent", contents }; +} + +function align$1(n, contents) { + return { type: "align", contents, n }; +} + +function group$1(contents, opts) { + opts = opts || {}; + + return { + type: "group", + contents: contents, + break: !!opts.shouldBreak, + expandedStates: opts.expandedStates + }; +} + +function dedentToRoot(contents) { + return align$1(-Infinity, contents); +} + +function markAsRoot(contents) { + return align$1({ type: "root" }, contents); +} + +function dedent$1(contents) { + return align$1(-1, contents); +} + +function conditionalGroup$1(states, opts) { + return group$1( + states[0], + Object.assign(opts || {}, { expandedStates: states }) + ); +} + +function fill$1(parts) { + return { type: "fill", parts }; +} + +function ifBreak$1(breakContents, flatContents) { + return { type: "if-break", breakContents, flatContents }; +} + +function lineSuffix$1(contents) { + return { type: "line-suffix", contents }; +} + +const lineSuffixBoundary$1 = { type: "line-suffix-boundary" }; +const breakParent$2 = { type: "break-parent" }; +const line$1 = { type: "line" }; +const softline$1 = { type: "line", soft: true }; +const hardline$2 = concat$2([{ type: "line", hard: true }, breakParent$2]); +const literalline$1 = concat$2([ + { type: "line", hard: true, literal: true }, + breakParent$2 +]); +const cursor$1 = { type: "cursor", placeholder: Symbol("cursor") }; + +function join$2(sep, arr) { + const res = []; + + for (let i = 0; i < arr.length; i++) { + if (i !== 0) { + res.push(sep); + } + + res.push(arr[i]); + } + + return concat$2(res); +} + +function addAlignmentToDoc$1(doc, size, tabWidth) { + let aligned = doc; + if (size > 0) { + // Use indent to add tabs for all the levels of tabs we need + for (let i = 0; i < Math.floor(size / tabWidth); ++i) { + aligned = indent$2(aligned); + } + // Use align for all the spaces that are needed + aligned = align$1(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$1(-Infinity, aligned); + } + return aligned; +} + +var docBuilders$2 = { + concat: concat$2, + join: join$2, + line: line$1, + softline: softline$1, + hardline: hardline$2, + literalline: literalline$1, + group: group$1, + conditionalGroup: conditionalGroup$1, + fill: fill$1, + lineSuffix: lineSuffix$1, + lineSuffixBoundary: lineSuffixBoundary$1, + cursor: cursor$1, + breakParent: breakParent$2, + ifBreak: ifBreak$1, + indent: indent$2, + align: align$1, + addAlignmentToDoc: addAlignmentToDoc$1, + markAsRoot, + dedentToRoot, + dedent: dedent$1 +}; + +const concat$3 = docBuilders$2.concat; +const fill$2 = docBuilders$2.fill; +const cursor$2 = docBuilders$2.cursor; + +const MODE_BREAK = 1; +const 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) { + const queue = + newPart.type === "dedent" + ? ind.queue.slice(0, -1) + : ind.queue.concat(newPart); + + let value = ""; + let length = 0; + let lastTabs = 0; + let lastSpaces = 0; + + for (const part of queue) { + 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}'`); + } + } + + 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 fits(next, restCommands, width, options, mustBeFlat) { + let restIdx = restCommands.length; + const cmds = [next]; + while (width >= 0) { + if (cmds.length === 0) { + if (restIdx === 0) { + return true; + } + cmds.push(restCommands[restIdx - 1]); + + restIdx--; + + continue; + } + + const x = cmds.pop(); + const ind = x[0]; + const mode = x[1]; + const doc = x[2]; + + if (typeof doc === "string") { + width -= util$1.getStringWidth(doc); + } else { + switch (doc.type) { + case "concat": + for (let 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 "group": + if (mustBeFlat && doc.break) { + return false; + } + cmds.push([ind, doc.break ? MODE_BREAK : mode, doc.contents]); + + break; + case "fill": + for (let i = doc.parts.length - 1; i >= 0; i--) { + cmds.push([ind, mode, doc.parts[i]]); + } + + break; + case "if-break": + if (mode === MODE_BREAK) { + if (doc.breakContents) { + cmds.push([ind, mode, doc.breakContents]); + } + } + if (mode === 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) { + width -= 1; + } + + break; + } + return true; + + case MODE_BREAK: + return true; + } + break; + } + } + } + return false; +} + +function printDocToString$1(doc, options) { + const width = options.printWidth; + const newLine = options.newLine || "\n"; + let 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`. + const cmds = [[rootIndent(), MODE_BREAK, doc]]; + const out = []; + let shouldRemeasure = false; + let lineSuffix = []; + + while (cmds.length !== 0) { + const x = cmds.pop(); + const ind = x[0]; + const mode = x[1]; + const doc = x[2]; + + if (typeof doc === "string") { + out.push(doc); + + pos += util$1.getStringWidth(doc); + } else { + switch (doc.type) { + case "cursor": + out.push(cursor$2.placeholder); + + break; + case "concat": + for (let 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 "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; + + const next = [ind, MODE_FLAT, doc.contents]; + const 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) { + const mostExpanded = + doc.expandedStates[doc.expandedStates.length - 1]; + + if (doc.break) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + + break; + } else { + for (let i = 1; i < doc.expandedStates.length + 1; i++) { + if (i >= doc.expandedStates.length) { + cmds.push([ind, MODE_BREAK, mostExpanded]); + + break; + } else { + const state = doc.expandedStates[i]; + const cmd = [ind, MODE_FLAT, state]; + + if (fits(cmd, cmds, rem, options)) { + cmds.push(cmd); + + break; + } + } + } + } + } else { + cmds.push([ind, MODE_BREAK, doc.contents]); + } + } + + break; + } + } + 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": { + const rem = width - pos; + + const parts = doc.parts; + if (parts.length === 0) { + break; + } + + const content = parts[0]; + const contentFlatCmd = [ind, MODE_FLAT, content]; + const contentBreakCmd = [ind, MODE_BREAK, content]; + const contentFits = fits(contentFlatCmd, [], rem, options, true); + + if (parts.length === 1) { + if (contentFits) { + cmds.push(contentFlatCmd); + } else { + cmds.push(contentBreakCmd); + } + break; + } + + const whitespace = parts[1]; + const whitespaceFlatCmd = [ind, MODE_FLAT, whitespace]; + const 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); + const remainingCmd = [ind, mode, fill$2(parts)]; + + const secondContent = parts[0]; + + const firstAndSecondContentFlatCmd = [ + ind, + MODE_FLAT, + concat$3([content, whitespace, secondContent]) + ]; + const 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": + if (mode === MODE_BREAK) { + if (doc.breakContents) { + cmds.push([ind, mode, doc.breakContents]); + } + } + if (mode === 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 { + if (out.length > 0) { + // Trim whitespace at the end of line + while ( + out.length > 0 && + out[out.length - 1].match(/^[^\S\n]*$/) + ) { + out.pop(); + } + + if ( + out.length && + (options.parser !== "markdown" || + // preserve markdown's `break` node (two trailing spaces) + !/\S {2}$/.test(out[out.length - 1])) + ) { + out[out.length - 1] = out[out.length - 1].replace( + /[^\S\n]*$/, + "" + ); + } + } + + out.push(newLine + ind.value); + pos = ind.length; + } + break; + } + break; + default: + } + } + } + + const cursorPlaceholderIndex = out.indexOf(cursor$2.placeholder); + if (cursorPlaceholderIndex !== -1) { + const beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); + const afterCursor = out.slice(cursorPlaceholderIndex + 1).join(""); + + return { + formatted: beforeCursor + afterCursor, + cursor: beforeCursor.length + }; + } + + return { formatted: out.join("") }; +} + +var docPrinter = { printDocToString: printDocToString$1 }; + +function flattenDoc(doc) { + if (doc.type === "concat") { + const res = []; + + for (let i = 0; i < doc.parts.length; ++i) { + const doc2 = doc.parts[i]; + if (typeof doc2 !== "string" && doc2.type === "concat") { + [].push.apply(res, flattenDoc(doc2).parts); + } else { + const 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.literalline) { + return "literalline"; + } + if (doc.hard) { + return "hardline"; + } + if (doc.soft) { + return "softline"; + } + return "line"; + } + + if (doc.type === "break-parent") { + return "breakParent"; + } + + 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(doc) { + return printDoc(flattenDoc(doc)); + } +}; + +var doc = { + builders: docBuilders$2, + printer: docPrinter, + utils: docUtils, + debug: docDebug +}; + +const docBuilders$1 = doc.builders; +const concat$1 = docBuilders$1.concat; +const hardline$1 = docBuilders$1.hardline; +const breakParent$1 = docBuilders$1.breakParent; +const indent$1 = docBuilders$1.indent; +const lineSuffix = docBuilders$1.lineSuffix; +const join$1 = docBuilders$1.join; +const cursor = docBuilders$1.cursor; + + +const childNodesCacheKey = Symbol("child-nodes"); + +const addLeadingComment$1 = utilShared.addLeadingComment; +const addTrailingComment$1 = utilShared.addTrailingComment; +const addDanglingComment$1 = utilShared.addDanglingComment; + +function getSortedChildNodes(node, text, options, resultArray) { + if (!node) { + return; + } + const printer = options.printer; + const locStart = options.locStart; + const 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. + let 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]; + } + + let childNodes; + + if (printer.getCommentChildNodes) { + childNodes = printer.getCommentChildNodes(node); + } else if (node && typeof node === "object") { + childNodes = Object.keys(node) + .filter( + n => + n !== "enclosingNode" && + n !== "precedingNode" && + n !== "followingNode" + ) + .map(n => node[n]); + } + + if (!childNodes) { + return; + } + + if (!resultArray) { + Object.defineProperty(node, childNodesCacheKey, { + value: (resultArray = []), + enumerable: false + }); + } + + childNodes.forEach(childNode => { + getSortedChildNodes(childNode, text, 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, text, options) { + const locStart = options.locStart; + const locEnd = options.locEnd; + const childNodes = getSortedChildNodes(node, text, options); + let precedingNode; + let followingNode; + // Time to dust off the old binary search robes and wizard hat. + let left = 0; + let right = childNodes.length; + while (left < right) { + const middle = (left + right) >> 1; + const 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, text, 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" + ) { + const quasis = comment.enclosingNode.quasis; + const 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; + } + + const tiesToBreak = []; + const locStart = options.locStart; + const locEnd = options.locEnd; + + comments.forEach((comment, i) => { + if (options.parser === "json" && locStart(comment) - locStart(ast) <= 0) { + addLeadingComment$1(ast, comment); + return; + } + + decorateComment(ast, comment, text, options); + + const precedingNode = comment.precedingNode; + const enclosingNode = comment.enclosingNode; + const followingNode = comment.followingNode; + + const pluginHandleOwnLineComment = + options.printer.handleComments && options.printer.handleComments.ownLine + ? options.printer.handleComments.ownLine + : () => false; + const pluginHandleEndOfLineComment = + options.printer.handleComments && options.printer.handleComments.endOfLine + ? options.printer.handleComments.endOfLine + : () => false; + const pluginHandleRemainingComment = + options.printer.handleComments && options.printer.handleComments.remaining + ? options.printer.handleComments.remaining + : () => false; + + const isLastComment = comments.length - 1 === i; + + if (util$1.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$1(followingNode, comment); + } else if (precedingNode) { + addTrailingComment$1(precedingNode, comment); + } else if (enclosingNode) { + addDanglingComment$1(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + /* istanbul ignore next */ + addDanglingComment$1(ast, comment); + } + } else if (util$1.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$1(precedingNode, comment); + } else if (followingNode) { + addLeadingComment$1(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment$1(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + /* istanbul ignore next */ + addDanglingComment$1(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; + const tieCount = tiesToBreak.length; + if (tieCount > 0) { + const lastTie = tiesToBreak[tieCount - 1]; + if (lastTie.followingNode !== comment.followingNode) { + breakTies(tiesToBreak, text, options); + } + } + tiesToBreak.push(comment); + } else if (precedingNode) { + addTrailingComment$1(precedingNode, comment); + } else if (followingNode) { + addLeadingComment$1(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment$1(enclosingNode, comment); + } else { + // There are no nodes, let's attach it to the root of the ast + /* istanbul ignore next */ + addDanglingComment$1(ast, comment); + } + } + }); + + breakTies(tiesToBreak, text, options); + + comments.forEach(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) { + const tieCount = tiesToBreak.length; + if (tieCount === 0) { + return; + } + + const precedingNode = tiesToBreak[0].precedingNode; + const followingNode = tiesToBreak[0].followingNode; + let 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. + let indexOfFirstLeadingComment; + for ( + indexOfFirstLeadingComment = tieCount; + indexOfFirstLeadingComment > 0; + --indexOfFirstLeadingComment + ) { + const comment = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert.strictEqual(comment.precedingNode, precedingNode); + assert.strictEqual(comment.followingNode, followingNode); + + const 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((comment, i) => { + if (i < indexOfFirstLeadingComment) { + addTrailingComment$1(precedingNode, comment); + } else { + addLeadingComment$1(followingNode, comment); + } + }); + + tiesToBreak.length = 0; +} + +function printComment$1(commentPath, options) { + const comment = commentPath.getValue(); + comment.printed = true; + return options.printer.printComment(commentPath, options); +} + +function findExpressionIndexForComment(quasis, comment, options) { + const startPos = options.locStart(comment) - 1; + + for (let 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) { + const comment = commentPath.getValue(); + const contents = printComment$1(commentPath, options); + if (!contents) { + return ""; + } + const isBlock = util$1.isBlockComment(comment); + + // Leading block comments should see if they need to stay on the + // same line or not. + if (isBlock) { + return concat$1([ + contents, + util$1.hasNewline(options.originalText, options.locEnd(comment)) + ? hardline$1 + : " " + ]); + } + + return concat$1([contents, hardline$1]); +} + +function printTrailingComment(commentPath, print, options) { + const comment = commentPath.getValue(); + const contents = printComment$1(commentPath, options); + if (!contents) { + return ""; + } + const isBlock = util$1.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 + const parentNode = commentPath.getNode(1); + const parentParentNode = commentPath.getNode(2); + const isParentSuperClass = + parentParentNode && + (parentParentNode.type === "ClassDeclaration" || + parentParentNode.type === "ClassExpression") && + parentParentNode.superClass === parentNode; + + if ( + util$1.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. + + const isLineBeforeEmpty = util$1.isPreviousLineEmpty( + options.originalText, + comment, + options.locStart + ); + + return lineSuffix( + concat$1([hardline$1, isLineBeforeEmpty ? hardline$1 : "", contents]) + ); + } else if (isBlock || isParentSuperClass) { + // Trailing block comments never need a newline + return concat$1([" ", contents]); + } + + return concat$1([lineSuffix(" " + contents), !isBlock ? breakParent$1 : ""]); +} + +function printDanglingComments(path$$1, options, sameIndent, filter) { + const parts = []; + const node = path$$1.getValue(); + + if (!node || !node.comments) { + return ""; + } + + path$$1.each(commentPath => { + const comment = commentPath.getValue(); + if ( + comment && + !comment.leading && + !comment.trailing && + (!filter || filter(comment)) + ) { + parts.push(printComment$1(commentPath, options)); + } + }, "comments"); + + if (parts.length === 0) { + return ""; + } + + if (sameIndent) { + return join$1(hardline$1, parts); + } + return indent$1(concat$1([hardline$1, join$1(hardline$1, parts)])); +} + +function prependCursorPlaceholder(path$$1, options, printed) { + if (path$$1.getNode() === options.cursorNode && path$$1.getValue()) { + return concat$1([cursor, printed]); + } + return printed; +} + +function printComments(path$$1, print, options, needsSemi) { + const value = path$$1.getValue(); + const printed = print(path$$1); + const comments = value && value.comments; + + if (!comments || comments.length === 0) { + return prependCursorPlaceholder(path$$1, options, printed); + } + + const leadingParts = []; + const trailingParts = [needsSemi ? ";" : "", printed]; + + path$$1.each(commentPath => { + const comment = commentPath.getValue(); + const leading = comment.leading; + const trailing = comment.trailing; + + if (leading) { + const contents = printLeadingComment(commentPath, print, options); + if (!contents) { + return; + } + leadingParts.push(contents); + + const text = options.originalText; + if ( + util$1.hasNewline( + text, + util$1.skipNewline(text, options.locEnd(comment)) + ) + ) { + leadingParts.push(hardline$1); + } + } else if (trailing) { + trailingParts.push(printTrailingComment(commentPath, print, options)); + } + }, "comments"); + + return prependCursorPlaceholder( + path$$1, + options, + concat$1(leadingParts.concat(trailingParts)) + ); +} + +var comments = { + attach, + printComments, + printDanglingComments, + getSortedChildNodes +}; + +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-\uA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\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 : */ +}); + +const doc$2 = doc; +const docUtils$4 = doc$2.utils; +const docBuilders$5 = doc$2.builders; +const indent$3 = docBuilders$5.indent; +const join$3 = docBuilders$5.join; +const hardline$3 = docBuilders$5.hardline; +const softline$2 = docBuilders$5.softline; +const literalline$2 = docBuilders$5.literalline; +const concat$4 = docBuilders$5.concat; +const dedentToRoot$1 = docBuilders$5.dedentToRoot; + +function embed(path$$1, print, textToDoc /*, options */) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + const parentParent = path$$1.getParentNode(1); + + switch (node.type) { + case "TemplateLiteral": { + const isCss = [isStyledJsx, isStyledComponents, isCssProp].some(isIt => + isIt(path$$1) + ); + + if (isCss) { + // Get full template literal with expressions replaced by placeholders + const rawQuasis = node.quasis.map(q => q.value.raw); + let placeholderID = 0; + const text = rawQuasis.reduce((prevVal, currVal, idx) => { + return idx == 0 + ? currVal + : prevVal + + "@prettier-placeholder-" + + placeholderID++ + + "-id" + + currVal; + }, ""); + const 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 ( + 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")) + ) { + const expressionDocs = node.expressions + ? path$$1.map(print, "expressions") + : []; + + const numQuasis = node.quasis.length; + + if (numQuasis === 1 && node.quasis[0].value.raw.trim() === "") { + return "``"; + } + + const parts = []; + + for (let i = 0; i < numQuasis; i++) { + const templateElement = node.quasis[i]; + const isFirst = i === 0; + const isLast = i === numQuasis - 1; + const 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; + } + + const lines = text.split("\n"); + const numLines = lines.length; + const expressionDoc = expressionDocs[i]; + + const startsWithBlankLine = + numLines > 2 && lines[0].trim() === "" && lines[1].trim() === ""; + const endsWithBlankLine = + numLines > 2 && + lines[numLines - 1].trim() === "" && + lines[numLines - 2].trim() === ""; + + const commentsAndWhitespaceOnly = lines.every(line => + /^\s*(?:#[^\r\n]*)?$/.test(line) + ); + + // Bail out if an interpolation occurs within a comment. + if (!isLast && /#[^\r\n]*$/.test(lines[numLines - 1])) { + return null; + } + + let doc$$2 = null; + + if (commentsAndWhitespaceOnly) { + doc$$2 = printGraphqlComments(lines); + } else { + try { + doc$$2 = docUtils$4.stripTrailingHardline( + textToDoc(text, { parser: "graphql" }) + ); + } catch (error) { + if (process.env.PRETTIER_DEBUG) { + throw error; + } + // Bail if any part fails to parse. + return null; + } + } + + if (doc$$2) { + doc$$2 = escapeBackticks(doc$$2); + if (!isFirst && startsWithBlankLine) { + parts.push(""); + } + parts.push(doc$$2); + if (!isLast && endsWithBlankLine) { + parts.push(""); + } + } else if (!isFirst && !isLast && startsWithBlankLine) { + parts.push(""); + } + + if (expressionDoc) { + parts.push(concat$4(["${", expressionDoc, "}"])); + } + } + + return concat$4([ + "`", + indent$3(concat$4([hardline$3, join$3(hardline$3, parts)])), + hardline$3, + "`" + ]); + } + + 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"))) + ) { + const text = parent.quasis[0].value.cooked; + const indentation = getIndentation(text); + const hasIndent = indentation !== ""; + return concat$4([ + hasIndent + ? indent$3( + concat$4([ + softline$2, + printMarkdown( + text.replace(new RegExp(`^${indentation}`, "gm"), "") + ) + ]) + ) + : concat$4([literalline$2, dedentToRoot$1(printMarkdown(text))]), + softline$2 + ]); + } + + break; + } + } + + function printMarkdown(text) { + const doc$$2 = textToDoc(text, { parser: "markdown", __inJsTemplate: true }); + return docUtils$4.stripTrailingHardline(escapeBackticks(doc$$2)); + } +} + +function getIndentation(str) { + const firstMatchedIndent = str.match(/^([^\S\n]*)\S/m); + return firstMatchedIndent === null ? "" : firstMatchedIndent[1]; +} + +function escapeBackticks(doc$$2) { + return docUtils$4.mapDoc(doc$$2, currentDoc => { + if (!currentDoc.parts) { + return currentDoc; + } + + const parts = []; + + currentDoc.parts.forEach(part => { + if (typeof part === "string") { + parts.push(part.replace(/`/g, "\\`")); + } else { + parts.push(part); + } + }); + + return Object.assign({}, currentDoc, { parts }); + }); +} + +function transformCssDoc(quasisDoc, path$$1, print) { + const parentNode = path$$1.getValue(); + + const isEmpty = + parentNode.quasis.length === 1 && !parentNode.quasis[0].value.raw.trim(); + if (isEmpty) { + return "``"; + } + + const expressionDocs = parentNode.expressions + ? path$$1.map(print, "expressions") + : []; + const newDoc = replacePlaceholders(quasisDoc, expressionDocs); + /* istanbul ignore if */ + if (!newDoc) { + throw new Error("Couldn't insert all the expressions"); + } + return concat$4([ + "`", + indent$3(concat$4([hardline$3, docUtils$4.stripTrailingHardline(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; + } + + const expressions = expressionDocs.slice(); + let replaceCounter = 0; + const newDoc = docUtils$4.mapDoc(quasisDoc, doc$$2 => { + if (!doc$$2 || !doc$$2.parts || !doc$$2.parts.length) { + return doc$$2; + } + let parts = doc$$2.parts; + const atIndex = parts.indexOf("@"); + const placeholderIndex = atIndex + 1; + if ( + atIndex > -1 && + typeof parts[placeholderIndex] === "string" && + parts[placeholderIndex].startsWith("prettier-placeholder") + ) { + // If placeholder is split, join it + const at = parts[atIndex]; + const placeholder = parts[placeholderIndex]; + const rest = parts.slice(placeholderIndex + 1); + parts = parts + .slice(0, atIndex) + .concat([at + placeholder]) + .concat(rest); + } + const atPlaceholderIndex = parts.findIndex( + part => + typeof part === "string" && part.startsWith("@prettier-placeholder") + ); + if (atPlaceholderIndex > -1) { + const placeholder = parts[atPlaceholderIndex]; + const rest = parts.slice(atPlaceholderIndex + 1); + const placeholderMatch = placeholder.match( + /@prettier-placeholder-(.+)-id([\s\S]*)/ + ); + const placeholderID = placeholderMatch[1]; + // When the expression has a suffix appended, like: + // animation: linear ${time}s ease-out; + const suffix = placeholderMatch[2]; + const 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) { + const parts = []; + let seenComment = false; + + lines.map(textLine => textLine.trim()).forEach((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$4([hardline$3, textLine])); + } else { + parts.push(textLine); + } + + seenComment = true; + }); + + // If `lines` was whitespace only, return `null`. + return parts.length === 0 ? null : join$3(hardline$3, parts); +} + +/** + * Template literal in this context: + * + */ +function isStyledJsx(path$$1) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + const parentParent = path$$1.getParentNode(1); + return ( + parentParent && + node.quasis && + parent.type === "JSXExpressionContainer" && + parentParent.type === "JSXElement" && + parentParent.openingElement.name.name === "style" && + parentParent.openingElement.attributes.some( + attribute => attribute.name.name === "jsx" + ) + ); +} + +/** + * styled-components template literals + */ +function isStyledComponents(path$$1) { + const parent = path$$1.getParentNode(); + + if (!parent || parent.type !== "TaggedTemplateExpression") { + return false; + } + + const tag = parent.tag; + + switch (tag.type) { + case "MemberExpression": + return ( + // styled.foo`` + isStyledIdentifier(tag.object) || + // Component.extend`` + (/^[A-Z]/.test(tag.object.name) && tag.property.name === "extend") + ); + + case "CallExpression": + return ( + // styled(Component)`` + isStyledIdentifier(tag.callee) || + (tag.callee.type === "MemberExpression" && + // styled.foo.attr({})`` + ((tag.callee.object.type === "MemberExpression" && + isStyledIdentifier(tag.callee.object.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) { + const parent = path$$1.getParentNode(); + const 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"; +} + +var embed_1 = embed; + +function clean(ast, newObj, parent) { + // 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 === "MethodDefinition" || + ast.type === "ClassProperty" || + ast.type === "TSPropertySignature" || + ast.type === "ObjectTypeProperty") && + typeof ast.key === "object" && + ast.key && + (ast.key.type === "Literal" || ast.key.type === "Identifier") + ) { + delete newObj.key; + } + + // 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(attr => attr.name.name === "jsx") + ) { + const templateLiterals = newObj.children + .filter( + child => + child.type === "JSXExpressionContainer" && + child.expression.type === "TemplateLiteral" + ) + .map(container => container.expression); + + const quasis = templateLiterals.reduce( + (quasis, templateLiteral) => quasis.concat(templateLiteral.quasis), + [] + ); + + quasis.forEach(q => 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(q => 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.type === "CallExpression") + ) { + newObj.quasi.quasis.forEach(quasi => delete quasi.value); + } + if ( + ast.type === "TemplateLiteral" && + parent.type === "CallExpression" && + parent.callee.name === "graphql" + ) { + newObj.quasis.forEach(quasi => 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 = 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. + * + * + */const commentEndRe = /\*\/$/;const commentStartRe = /^\/\*\*/;const docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;const lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g;const ltrimRe = /^\s*/;const rtrimRe = /\s*$/;const ltrimNewlineRe = /^(\r?\n)+/;const multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g;const propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g;const stringStartRe = /(\r?\n|^) *\* ?/g;function extract(contents) {const match = contents.match(docblockRe);return match ? match[0].replace(ltrimRe, '') || '' : '';}function strip(contents) {const match = contents.match(docblockRe);return match && match[0] ? contents.substring(match[0].length) : contents;}function parse(docblock) {return parseWithComments(docblock).pragmas;}function parseWithComments(docblock) {const line = (0, (_detectNewline || _load_detectNewline()).default)(docblock) || (_os || _load_os()).EOL;docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives + let prev = '';while (prev !== docblock) {prev = docblock;docblock = docblock.replace(multilineRe, `${line}$1 $2${line}`);}docblock = docblock.replace(ltrimNewlineRe, '').replace(rtrimRe, '');const result = Object.create(null);const comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').replace(rtrimRe, '');let match;while (match = propertyRe.exec(docblock)) {// strip linecomments from pragmas + const 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;let comments = _ref$comments === undefined ? '' : _ref$comments;var _ref$pragmas = _ref.pragmas;let pragmas = _ref$pragmas === undefined ? {} : _ref$pragmas;const line = (0, (_detectNewline || _load_detectNewline()).default)(comments) || (_os || _load_os()).EOL;const head = '/**'; + const start = ' *'; + const tail = ' */'; + + const keys = Object.keys(pragmas); + + const printedObject = keys. + map(key => printKeyValues(key, pragmas[key])). + reduce((arr, next) => arr.concat(next), []). + map(keyValue => start + ' ' + keyValue + line). + join(''); + + if (!comments) { + if (keys.length === 0) { + return ''; + } + if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) { + const value = pragmas[keys[0]]; + return `${head} ${printKeyValues(keys[0], value)[0]}${tail}`; + } + } + + const printedComments = + comments. + split(line). + map(textLine => `${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(value => `@${key} ${value}`.trim()); +} +}); + +unwrapExports(build); + +function hasPragma$1(text) { + const pragmas = Object.keys(build.parse(build.extract(text))); + return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1; +} + +function insertPragma$1(text) { + const parsedDocblock = build.parseWithComments(build.extract(text)); + const pragmas = Object.assign({ format: "" }, parsedDocblock.pragmas); + const newDocblock = build.print({ + pragmas, + comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines + }); + const strippedText = build.strip(text); + const separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n"; + return newDocblock + separatingNewlines + strippedText; +} + +var pragma = { + hasPragma: hasPragma$1, + insertPragma: insertPragma$1 +}; + +const addLeadingComment$2 = utilShared.addLeadingComment; +const addTrailingComment$2 = utilShared.addTrailingComment; +const addDanglingComment$2 = utilShared.addDanglingComment; + +function handleOwnLineComment(comment, text, options, ast, isLastComment) { + const precedingNode = comment.precedingNode; + const enclosingNode = comment.enclosingNode; + const followingNode = comment.followingNode; + if ( + handleLastFunctionArgComments( + text, + precedingNode, + enclosingNode, + followingNode, + comment, + options + ) || + handleMemberExpressionComments(enclosingNode, followingNode, comment) || + handleIfStatementComments( + text, + precedingNode, + enclosingNode, + followingNode, + comment, + options + ) || + handleTryStatementComments(enclosingNode, 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) { + const precedingNode = comment.precedingNode; + const enclosingNode = comment.enclosingNode; + const 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 + ) || + 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) { + const precedingNode = comment.precedingNode; + const enclosingNode = comment.enclosingNode; + const followingNode = comment.followingNode; + if ( + handleIfStatementComments( + 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 + ) || + handleBreakAndContinueStatementComments(enclosingNode, comment) + ) { + return true; + } + return false; +} + +function addBlockStatementFirstComment(node, comment) { + const body = node.body.filter(n => 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 ). + const 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 with or without brackets on, such as + // if (a) /* comment */ {} or if (a) /* comment */ true, + // we look at the next character to see if it is a { or if the following node + // is the consequent for the if statement + if (nextCharacter === "{" || enclosingNode.consequent === followingNode) { + addLeadingComment$2(followingNode, comment); + return true; + } + + return false; +} + +// Same as IfStatement but for TryStatement +function handleTryStatementComments(enclosingNode, followingNode, comment) { + if ( + !enclosingNode || + enclosingNode.type !== "TryStatement" || + !followingNode + ) { + return false; + } + + 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 +) { + const 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; + } + + const 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.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; + } + 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 && + 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" && + followingNode && + (followingNode.type === "ObjectExpression" || + followingNode.type === "ArrayExpression") + ) { + addLeadingComment$2(followingNode, comment); + return true; + } + return false; +} + +var comments$2 = { + handleOwnLineComment, + handleEndOfLineComment, + handleRemainingComment +}; + +function needsParens(path$$1, options) { + const parent = path$$1.getParentNode(); + if (!parent) { + return false; + } + + const name = path$$1.getName(); + const 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 ( + util$1.hasClosureCompilerTypeCastComment( + options.originalText, + node, + options.locEnd + ) + ) { + 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, + /* forbidFunctionAndClass */ false + )) || + (parent.type === "ExpressionStatement" && + util$1.startsWithNoLookaheadToken(node, /* forbidFunctionAndClass */ true)) + ) { + return true; + } + + switch (node.type) { + case "CallExpression": { + let firstParentNotMemberExpression = parent; + let 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; + } + 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 "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; + } + + const isLeftOfAForStatement = node => { + let i = 0; + while (node) { + const 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 "ClassDeclaration": + case "TSAbstractClassDeclaration": + return name === "superClass" && parent.superClass === node; + case "TSTypeAssertionExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "ExperimentalSpreadProperty": + 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; + } + + const po = parent.operator; + const pp = util$1.getPrecedence(po); + const no = node.operator; + const 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; + } + + // Add parenthesis when working with binary 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": { + const 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") + ) { + 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 "ExperimentalSpreadProperty": + case "TSAsExpression": + case "TSNonNullExpression": + 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": + return ( + parent.type === "UnionTypeAnnotation" || + parent.type === "IntersectionTypeAnnotation" || + parent.type === "ArrayTypeAnnotation" + ); + + case "StringLiteral": + case "NumericLiteral": + case "Literal": + if ( + typeof node.value === "string" && + parent.type === "ExpressionStatement" && + // TypeScript workaround for eslint/typescript-eslint-parser#267 + // 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 + const 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": { + const grandParent = 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" && + grandParent && + grandParent.type === "ForStatement" && + (grandParent.init === parent || grandParent.update === parent) + ) { + return false; + } + return true; + } + case "ConditionalExpression": + switch (parent.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "ExperimentalSpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + case "ExportDefaultDeclaration": + case "AwaitExpression": + case "JSXSpreadAttribute": + case "TSTypeAssertionExpression": + case "TypeCastExpression": + case "TSAsExpression": + case "TSNonNullExpression": + 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"; + } + + 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; + +// TODO(azz): anything that imports from main shouldn't be in a `language-*` dir. + + + +const isIdentifierName = utils$2.keyword.isIdentifierNameES6; + + +const insertPragma = pragma.insertPragma; + + + + +const docBuilders = doc.builders; +const concat = docBuilders.concat; +const join = docBuilders.join; +const line = docBuilders.line; +const hardline = docBuilders.hardline; +const softline = docBuilders.softline; +const literalline = docBuilders.literalline; +const group = docBuilders.group; +const indent = docBuilders.indent; +const align = docBuilders.align; +const conditionalGroup = docBuilders.conditionalGroup; +const fill = docBuilders.fill; +const ifBreak = docBuilders.ifBreak; +const breakParent = docBuilders.breakParent; +const lineSuffixBoundary = docBuilders.lineSuffixBoundary; +const addAlignmentToDoc = docBuilders.addAlignmentToDoc; +const dedent = docBuilders.dedent; + +const docUtils$3 = doc.utils; +const willBreak$1 = docUtils$3.willBreak; +const isLineNext$1 = docUtils$3.isLineNext; +const isEmpty$1 = docUtils$3.isEmpty; + +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) { + const node = path$$1.getValue(); + let needsParens = false; + const linesWithoutParens = printPathNoParens(path$$1, options, printPath, args); + + if (!node || isEmpty$1(linesWithoutParens)) { + return linesWithoutParens; + } + + const decorators = []; + if ( + node.decorators && + node.decorators.length > 0 && + // If the parent node is an export declaration, it will be + // responsible for printing node.decorators. + !util$1.getParentExportDeclaration(path$$1) + ) { + let separator = hardline; + path$$1.each(decoratorPath => { + let prefix = "@"; + let decorator = decoratorPath.getValue(); + if (decorator.expression) { + decorator = decorator.expression; + prefix = ""; + } + + if ( + node.decorators.length === 1 && + node.type !== "ClassDeclaration" && + node.type !== "MethodDefinition" && + node.type !== "ClassMethod" && + (decorator.type === "Identifier" || + decorator.type === "MemberExpression" || + (decorator.type === "CallExpression" && + (decorator.arguments.length === 0 || + (decorator.arguments.length === 1 && + (isStringLiteral(decorator.arguments[0]) || + decorator.arguments[0].type === "Identifier" || + decorator.arguments[0].type === "MemberExpression"))))) + ) { + separator = line; + } + + decorators.push(prefix, printPath(decoratorPath), separator); + }, "decorators"); + } else if ( + util$1.isExportDeclaration(node) && + node.declaration && + node.declaration.decorators + ) { + // Export declarations are responsible for printing any decorators + // that logically apply to node.declaration. + path$$1.each( + decoratorPath => { + const decorator = decoratorPath.getValue(); + const prefix = decorator.type === "Decorator" ? "" : "@"; + decorators.push(prefix, printPath(decoratorPath), hardline); + }, + "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); + } + + const parts = []; + if (needsParens) { + parts.unshift("("); + } + + parts.push(linesWithoutParens); + + if (needsParens) { + parts.push(")"); + } + + if (decorators.length > 0) { + return group(concat(decorators.concat(parts))); + } + return concat(parts); +} + +function hasPrettierIgnore(path$$1) { + return util$1.hasIgnoreComment(path$$1) || hasJsxIgnoreComment(path$$1); +} + +function hasJsxIgnoreComment(path$$1) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + if (!parent || !node || !isJSXNode(node) || !isJSXNode(parent)) { + return false; + } + + // Lookup the previous sibling, ignoring any empty JSXText elements + const index = parent.children.indexOf(node); + let prevSibling = null; + for (let i = index; i > 0; i--) { + const 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( + comment => comment.value.trim() === "prettier-ignore" + ) + ); +} + +// The following is the shared logic for +// ternary operators, namely ConditionalExpression +// and TSConditionalType +function formatTernaryOperator(path$$1, options, print, operatorOptions) { + const n = path$$1.getValue(); + const parts = []; + const operatorOpts = Object.assign( + { + beforeParts: () => [""], + afterParts: () => [""], + shouldCheckJsx: true, + operatorName: "ConditionalExpression", + consequentNode: "consequent", + alternateNode: "alternate", + testNode: "test", + breakNested: true + }, + operatorOptions || {} + ); + + // We print a ConditionalExpression in either "JSX mode" or "normal mode". + // See tests/jsx/conditional-expression.js for more info. + let jsxMode = false; + const parent = path$$1.getParentNode(); + let forceNoIndent = parent.type === operatorOpts.operatorName; + + // Find the outermost non-ConditionalExpression parent, and the outermost + // ConditionalExpression parent. We'll use these to determine if we should + // print in JSX mode. + let currentParent; + let previousParent; + let i = 0; + do { + previousParent = currentParent || n; + currentParent = path$$1.getParentNode(i); + i++; + } while (currentParent && currentParent.type === operatorOpts.operatorName); + const firstNonConditionalParent = currentParent || parent; + const lastConditionalParent = previousParent; + + if ( + (operatorOpts.shouldCheckJsx && isJSXNode(n[operatorOpts.testNode])) || + isJSXNode(n[operatorOpts.consequentNode]) || + isJSXNode(n[operatorOpts.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. + const wrap = doc$$1 => + concat([ + ifBreak("(", ""), + indent(concat([softline, doc$$1])), + softline, + ifBreak(")", "") + ]); + + // The only things we don't wrap are: + // * Nested conditional expressions in alternates + // * null + const isNull = node => + node.type === "NullLiteral" || + (node.type === "Literal" && node.value === null); + + parts.push( + " ? ", + isNull(n[operatorOpts.consequentNode]) + ? path$$1.call(print, operatorOpts.consequentNode) + : wrap(path$$1.call(print, operatorOpts.consequentNode)), + " : ", + n[operatorOpts.alternateNode].type === operatorOpts.operatorName || + isNull(n[operatorOpts.alternateNode]) + ? path$$1.call(print, operatorOpts.alternateNode) + : wrap(path$$1.call(print, operatorOpts.alternateNode)) + ); + } else { + // normal mode + const part = concat([ + line, + "? ", + n[operatorOpts.consequentNode].type === operatorOpts.operatorName + ? ifBreak("", "(") + : "", + align(2, path$$1.call(print, operatorOpts.consequentNode)), + n[operatorOpts.consequentNode].type === operatorOpts.operatorName + ? ifBreak("", ")") + : "", + line, + ": ", + align(2, path$$1.call(print, operatorOpts.alternateNode)) + ]); + parts.push( + parent.type === operatorOpts.operatorName + ? options.useTabs + ? dedent(indent(part)) + : align(Math.max(0, options.tabWidth - 2), part) + : 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. + const maybeGroup = doc$$1 => + operatorOpts.breakNested + ? parent === firstNonConditionalParent + ? group(doc$$1) + : doc$$1 + : group(doc$$1); // Always group in normal mode. + + // Break the closing paren to keep the chain right after it: + // (a + // ? b + // : c + // ).call() + const breakClosingParen = + !jsxMode && parent.type === "MemberExpression" && !parent.computed; + + return maybeGroup( + concat( + [].concat( + operatorOpts.beforeParts(), + forceNoIndent ? concat(parts) : indent(concat(parts)), + operatorOpts.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) { + const n = path$$1.getValue(); + const semi = options.semi ? ";" : ""; + + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + let parts = []; + switch (n.type) { + case "File": + return path$$1.call(print, "program"); + case "Program": + // Babel 6 + if (n.directives) { + path$$1.each(childPath => { + parts.push(print(childPath), semi, hardline); + if ( + utilShared.isNextLineEmpty( + options.originalText, + childPath.getValue(), + options + ) + ) { + parts.push(hardline); + } + }, "directives"); + } + + parts.push( + path$$1.call(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); + } + + return concat(parts); + // Babel extension. + case "EmptyStatement": + return ""; + case "ExpressionStatement": + // Detect Flow-parsed directives + if (n.directive) { + return concat([nodeStr(n.expression, options, true), semi]); + } + // Do not append semicolon after the only JSX element in a program + return concat([ + path$$1.call(print, "expression"), + isTheOnlyJSXElementInMarkdown(options, path$$1) ? "" : semi + ]); // Babel extension. + case "ParenthesizedExpression": + return concat(["(", path$$1.call(print, "expression"), ")"]); + case "AssignmentExpression": + return printAssignment( + n.left, + path$$1.call(print, "left"), + concat([" ", n.operator]), + n.right, + path$$1.call(print, "right"), + options + ); + case "BinaryExpression": + case "LogicalExpression": { + const parent = path$$1.getParentNode(); + const parentParent = path$$1.getParentNode(1); + const isInsideParenthesis = + n !== parent.body && + (parent.type === "IfStatement" || + parent.type === "WhileStatement" || + parent.type === "DoWhileStatement"); + + const 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(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.computed) + ) { + return group( + concat([indent(concat([softline, concat(parts)])), softline]) + ); + } + + // 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. + const shouldNotIndent = + parent.type === "ReturnStatement" || + (parent.type === "JSXExpressionContainer" && + parentParent.type === "JSXAttribute") || + (n === parent.body && parent.type === "ArrowFunctionExpression") || + (n !== parent.body && parent.type === "ForStatement") || + (parent.type === "ConditionalExpression" && + parentParent.type !== "ReturnStatement"); + + const shouldIndentIfInlining = + parent.type === "AssignmentExpression" || + parent.type === "VariableDeclarator" || + parent.type === "ClassProperty" || + parent.type === "TSAbstractClassProperty" || + parent.type === "ClassPrivateProperty" || + parent.type === "ObjectProperty" || + parent.type === "Property"; + + const samePrecedenceSubExpression = + isBinaryish(n.left) && + util$1.shouldFlatten(n.operator, n.left.operator); + + if ( + shouldNotIndent || + (shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression) || + (!shouldInlineLogicalExpression(n) && shouldIndentIfInlining) + ) { + return group(concat(parts)); + } + + const rest = concat(parts.slice(1)); + + return group( + concat([ + // 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(rest) + ]) + ); + } + case "AssignmentPattern": + return concat([ + path$$1.call(print, "left"), + " = ", + path$$1.call(print, "right") + ]); + case "TSTypeAssertionExpression": + return concat([ + "<", + path$$1.call(print, "typeAnnotation"), + ">", + path$$1.call(print, "expression") + ]); + case "MemberExpression": { + const parent = path$$1.getParentNode(); + let firstNonMemberParent; + let i = 0; + do { + firstNonMemberParent = path$$1.getParentNode(i); + i++; + } while ( + firstNonMemberParent && + (firstNonMemberParent.type === "MemberExpression" || + firstNonMemberParent.type === "TSNonNullExpression") + ); + + const shouldInline = + (firstNonMemberParent && + (firstNonMemberParent.type === "NewExpression" || + (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"); + + return concat([ + path$$1.call(print, "object"), + shouldInline + ? printMemberLookup(path$$1, options, print) + : group( + indent( + concat([softline, printMemberLookup(path$$1, options, print)]) + ) + ) + ]); + } + case "MetaProperty": + return concat([ + path$$1.call(print, "meta"), + ".", + path$$1.call(print, "property") + ]); + case "BindExpression": + if (n.object) { + parts.push(path$$1.call(print, "object")); + } + + parts.push(printBindExpressionCallee(path$$1, options, print)); + + return concat(parts); + case "Identifier": { + return concat([ + n.name, + printOptionalToken(path$$1), + printTypeAnnotation(path$$1, options, print) + ]); + } + case "SpreadElement": + case "SpreadElementPattern": + case "RestProperty": + case "ExperimentalRestProperty": + case "ExperimentalSpreadProperty": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + case "ObjectTypeSpreadProperty": + return concat([ + "...", + 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(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( + concat([ + printFunctionParams( + path$$1, + print, + options, + /* expandLast */ args && + (args.expandLastArg || args.expandFirstArg), + /* printTypeParams */ true + ), + printReturnType(path$$1, print, options) + ]) + ) + ); + } + + const dangling = comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ true, + comment => { + const nextCharacter = utilShared.getNextNonSpaceNonCommentCharacterIndex( + options.originalText, + comment, + options + ); + return options.originalText.substr(nextCharacter, 2) === "=>"; + } + ); + if (dangling) { + parts.push(" ", dangling); + } + + parts.push(" =>"); + + const body = path$$1.call(bodyPath => 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") + ) { + return group(concat([concat(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( + concat([ + concat(parts), + group( + concat([" (", indent(concat([softline, body])), softline, ")"]) + ) + ]) + ); + } + + // 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 {. + const shouldAddSoftLine = + ((args && args.expandLastArg) || + path$$1.getParentNode().type === "JSXExpressionContainer") && + !(n.comments && n.comments.length); + + const printTrailingComma = + args && args.expandLastArg && shouldPrintComma(options, "all"); + + // In order to avoid confusion between + // a => a ? a : a + // a <= a ? a : a + const shouldAddParens = + n.body.type === "ConditionalExpression" && + !util$1.startsWithNoLookaheadToken( + n.body, + /* forbidFunctionAndClass */ false + ); + + return group( + concat([ + concat(parts), + group( + concat([ + indent( + concat([ + line, + shouldAddParens ? ifBreak("", "(") : "", + body, + shouldAddParens ? ifBreak("", ")") : "" + ]) + ), + shouldAddSoftLine + ? concat([ifBreak(printTrailingComma ? "," : ""), softline]) + : "" + ]) + ) + ]) + ); + } + 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(parts); + case "YieldExpression": + parts.push("yield"); + + if (n.delegate) { + parts.push("*"); + } + if (n.argument) { + parts.push(" ", path$$1.call(print, "argument")); + } + + return concat(parts); + case "AwaitExpression": + return concat(["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(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(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(parts); + case "ImportDefaultSpecifier": + if (n.local) { + return path$$1.call(print, "local"); + } + + return path$$1.call(print, "id"); + case "TSExportAssignment": + return concat(["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(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 + " "); + } + + const standalones = []; + const grouped = []; + if (n.specifiers && n.specifiers.length > 0) { + path$$1.each(specifierPath => { + const 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(", ", standalones)); + } + + if (standalones.length > 0 && grouped.length > 0) { + parts.push(", "); + } + + if ( + grouped.length === 1 && + standalones.length === 0 && + n.specifiers && + !n.specifiers.some(node => node.comments) + ) { + parts.push( + concat([ + "{", + options.bracketSpacing ? " " : "", + concat(grouped), + options.bracketSpacing ? " " : "", + "}" + ]) + ); + } else if (grouped.length >= 1) { + parts.push( + group( + concat([ + "{", + indent( + concat([ + options.bracketSpacing ? line : softline, + join(concat([",", line]), grouped) + ]) + ), + ifBreak(shouldPrintComma(options) ? "," : ""), + options.bracketSpacing ? line : softline, + "}" + ]) + ) + ); + } + + 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(parts); + } + + case "Import": + return "import"; + case "BlockStatement": { + const naked = path$$1.call(bodyPath => { + return printStatementSequence(bodyPath, options, print); + }, "body"); + + const hasContent = n.body.find(node => node.type !== "EmptyStatement"); + const hasDirectives = n.directives && n.directives.length > 0; + + const parent = path$$1.getParentNode(); + const parentParent = path$$1.getParentNode(1); + if ( + !hasContent && + !hasDirectives && + !hasDanglingComments(n) && + (parent.type === "ArrowFunctionExpression" || + parent.type === "FunctionExpression" || + parent.type === "FunctionDeclaration" || + parent.type === "ObjectMethod" || + parent.type === "ClassMethod" || + parent.type === "ForStatement" || + parent.type === "WhileStatement" || + parent.type === "DoWhileStatement" || + (parent.type === "CatchClause" && !parentParent.finalizer)) + ) { + return "{}"; + } + + parts.push("{"); + + // Babel 6 + if (hasDirectives) { + path$$1.each(childPath => { + parts.push(indent(concat([hardline, print(childPath), semi]))); + if ( + utilShared.isNextLineEmpty( + options.originalText, + childPath.getValue(), + options + ) + ) { + parts.push(hardline); + } + }, "directives"); + } + + if (hasContent) { + parts.push(indent(concat([hardline, naked]))); + } + + parts.push(comments.printDanglingComments(path$$1, options)); + parts.push(hardline, "}"); + + return concat(parts); + } + case "ReturnStatement": + parts.push("return"); + + if (n.argument) { + if (returnArgumentHasLeadingComment(options, n.argument)) { + parts.push( + concat([ + " (", + indent(concat([hardline, path$$1.call(print, "argument")])), + hardline, + ")" + ]) + ); + } else if ( + n.argument.type === "LogicalExpression" || + n.argument.type === "BinaryExpression" || + n.argument.type === "SequenceExpression" + ) { + parts.push( + group( + concat([ + ifBreak(" (", " "), + indent(concat([softline, path$$1.call(print, "argument")])), + softline, + ifBreak(")") + ]) + ) + ); + } 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(parts); + case "NewExpression": + case "CallExpression": { + const isNew = n.type === "NewExpression"; + + const 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([ + isNew ? "new " : "", + path$$1.call(print, "callee"), + optional, + path$$1.call(print, "typeParameters"), + concat(["(", join(", ", path$$1.map(print, "arguments")), ")"]) + ]); + } + + // 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([ + isNew ? "new " : "", + path$$1.call(print, "callee"), + optional, + 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( + indent( + concat([ + softline, + "extends ", + indent(join(concat([",", line]), path$$1.map(print, "heritage"))), + " " + ]) + ) + ) + ); + } + + parts.push(path$$1.call(print, "body")); + + return concat(parts); + case "ObjectExpression": + case "ObjectPattern": + case "ObjectTypeAnnotation": + case "TSInterfaceBody": + case "TSTypeLiteral": { + const isTypeAnnotation = n.type === "ObjectTypeAnnotation"; + const parent = path$$1.getParentNode(0); + const shouldBreak = + n.type === "TSInterfaceBody" || + (n.type === "ObjectPattern" && + parent.type !== "FunctionDeclaration" && + parent.type !== "FunctionExpression" && + parent.type !== "ArrowFunctionExpression" && + parent.type !== "AssignmentPattern" && + n.properties.some( + property => + property.value && + (property.value.type === "ObjectPattern" || + property.value.type === "ArrayPattern") + )) || + (n.type !== "ObjectPattern" && + util$1.hasNewlineInRange( + options.originalText, + options.locStart(n), + options.locEnd(n) + )); + const isFlowInterfaceLikeBody = + isTypeAnnotation && + parent && + (parent.type === "InterfaceDeclaration" || + parent.type === "DeclareInterface" || + parent.type === "DeclareClass") && + path$$1.getName() === "body"; + const separator = isFlowInterfaceLikeBody + ? ";" + : n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" + ? ifBreak(semi, ";") + : ","; + const fields = []; + const leftBrace = n.exact ? "{|" : "{"; + const rightBrace = n.exact ? "|}" : "}"; + + let propertiesField; + + if (n.type === "TSTypeLiteral") { + propertiesField = "members"; + } else if (n.type === "TSInterfaceBody") { + propertiesField = "body"; + } else { + propertiesField = "properties"; + } + + if (isTypeAnnotation) { + fields.push("indexers", "callProperties"); + } + fields.push(propertiesField); + + // Unfortunately, things are grouped together in the ast can be + // interleaved in the source code. So we need to reorder them before + // printing them. + const propsAndLoc = []; + fields.forEach(field => { + path$$1.each(childPath => { + const node = childPath.getValue(); + propsAndLoc.push({ + node: node, + printed: print(childPath), + loc: options.locStart(node) + }); + }, field); + }); + + let separatorParts = []; + const props = propsAndLoc.sort((a, b) => a.loc - b.loc).map(prop => { + const result = concat(separatorParts.concat(group(prop.printed))); + separatorParts = [separator, line]; + if ( + prop.node.type === "TSPropertySignature" && + util$1.hasNodeIgnoreComment(prop.node) + ) { + separatorParts.shift(); + } + if ( + utilShared.isNextLineEmpty(options.originalText, prop.node, options) + ) { + separatorParts.push(hardline); + } + return result; + }); + + const lastElem = util$1.getLast(n[propertiesField]); + + const canHaveTrailingSeparator = !( + lastElem && + (lastElem.type === "RestProperty" || + lastElem.type === "RestElement" || + lastElem.type === "ExperimentalRestProperty" || + util$1.hasNodeIgnoreComment(lastElem)) + ); + + let content; + if (props.length === 0 && !n.typeAnnotation) { + if (!hasDanglingComments(n)) { + return concat([leftBrace, rightBrace]); + } + + content = group( + concat([ + leftBrace, + comments.printDanglingComments(path$$1, options), + softline, + rightBrace, + printOptionalToken(path$$1) + ]) + ); + } else { + content = concat([ + leftBrace, + indent( + concat([options.bracketSpacing ? line : softline, concat(props)]) + ), + ifBreak( + canHaveTrailingSeparator && + (separator !== "," || shouldPrintComma(options)) + ? separator + : "" + ), + concat([options.bracketSpacing ? line : softline, 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 + const parentParentParent = path$$1.getParentNode(2); + if ( + (n.type === "ObjectPattern" && + parent && + shouldHugArguments(parent) && + parent.params[0] === n) || + (shouldHugType(n) && + parentParentParent && + shouldHugArguments(parentParentParent) && + parentParentParent.params[0].typeAnnotation && + parentParentParent.params[0].typeAnnotation.typeAnnotation === n) + ) { + return content; + } + + return group(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 { + let printedLeft; + if (n.computed) { + printedLeft = concat(["[", 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(parts); // Babel 6 + case "ClassMethod": + if (n.static) { + parts.push("static "); + } + + parts = parts.concat(printObjectMethod(path$$1, options, print)); + + return concat(parts); // Babel 6 + case "ObjectMethod": + return printObjectMethod(path$$1, options, print); + case "Decorator": + return concat(["@", path$$1.call(print, "expression")]); + case "ArrayExpression": + case "ArrayPattern": + if (n.elements.length === 0) { + if (!hasDanglingComments(n)) { + parts.push("[]"); + } else { + parts.push( + group( + concat([ + "[", + comments.printDanglingComments(path$$1, options), + softline, + "]" + ]) + ) + ); + } + } else { + const lastElem = util$1.getLast(n.elements); + const 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 privateUtil.getLast returns null if the array is empty, but + // we already check for an empty array just above so we are safe + const needsForcedTrailingComma = + canHaveTrailingComma && lastElem === null; + + parts.push( + group( + concat([ + "[", + indent( + concat([ + softline, + printArrayItems(path$$1, options, "elements", print) + ]) + ), + needsForcedTrailingComma ? "," : "", + ifBreak( + canHaveTrailingComma && + !needsForcedTrailingComma && + shouldPrintComma(options) + ? "," + : "" + ), + comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ true + ), + softline, + "]" + ]) + ) + ); + } + + parts.push( + printOptionalToken(path$$1), + printTypeAnnotation(path$$1, options, print) + ); + + return concat(parts); + case "SequenceExpression": { + const parent = path$$1.getParentNode(0); + if ( + parent.type === "ExpressionStatement" || + parent.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. + const parts = []; + path$$1.each(p => { + if (p.getName() === 0) { + parts.push(print(p)); + } else { + parts.push(",", indent(concat([line, print(p)]))); + } + }, "expressions"); + return group(concat(parts)); + } + return group( + concat([join(concat([",", line]), 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 util$1.printNumber(n.extra.raw); + 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 util$1.printNumber(n.raw); + } + if (typeof n.value !== "string") { + return "" + n.value; + } + // TypeScript workaround for eslint/typescript-eslint-parser#267 + // See corresponding workaround in needs-parens.js + const grandParent = path$$1.getParentNode(1); + const 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(parts); + case "UpdateExpression": + parts.push(path$$1.call(print, "argument"), n.operator); + + if (n.prefix) { + parts.reverse(); + } + + return concat(parts); + case "ConditionalExpression": + return formatTernaryOperator(path$$1, options, print, { + beforeParts: () => [path$$1.call(print, "test")], + afterParts: breakClosingParen => [breakClosingParen ? softline : ""] + }); + case "VariableDeclaration": { + const printed = path$$1.map(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. + const parentNode = path$$1.getParentNode(); + + const isParentForLoop = + parentNode.type === "ForStatement" || + parentNode.type === "ForInStatement" || + parentNode.type === "ForOfStatement" || + parentNode.type === "ForAwaitStatement"; + + const hasValue = n.declarations.some(decl => decl.init); + + let firstVariable; + if (printed.length === 1) { + firstVariable = printed[0]; + } else if (printed.length > 1) { + // Indent first var to comply with eslint one-var rule + firstVariable = indent(printed[0]); + } + + parts = [ + isNodeStartingWithDeclare(n, options) ? "declare " : "", + n.kind, + firstVariable ? concat([" ", firstVariable]) : "", + indent( + concat( + printed + .slice(1) + .map(p => + concat([",", hasValue && !isParentForLoop ? hardline : line, p]) + ) + ) + ) + ]; + + if (!(isParentForLoop && parentNode.body !== n)) { + parts.push(semi); + } + + return group(concat(parts)); + } + case "VariableDeclarator": + return printAssignment( + n.id, + concat([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]), + " =", + n.init, + n.init && path$$1.call(print, "init"), + options + ); + case "WithStatement": + return group( + concat([ + "with (", + path$$1.call(print, "object"), + ")", + adjustClause(n.body, path$$1.call(print, "body")) + ]) + ); + case "IfStatement": { + const con = adjustClause(n.consequent, path$$1.call(print, "consequent")); + const opening = group( + concat([ + "if (", + group( + concat([ + indent(concat([softline, path$$1.call(print, "test")])), + softline + ]) + ), + ")", + con + ]) + ); + + parts.push(opening); + + if (n.alternate) { + const commentOnOwnLine = + (hasTrailingComment(n.consequent) && + n.consequent.comments.some( + comment => + comment.trailing && !util$1.isBlockComment(comment) + )) || + needsHardlineAfterDanglingComment(n); + const elseOnSameLine = + n.consequent.type === "BlockStatement" && !commentOnOwnLine; + parts.push(elseOnSameLine ? " " : hardline); + + if (hasDanglingComments(n)) { + parts.push( + comments.printDanglingComments(path$$1, options, true), + commentOnOwnLine ? hardline : " " + ); + } + + parts.push( + "else", + group( + adjustClause( + n.alternate, + path$$1.call(print, "alternate"), + n.alternate.type === "IfStatement" + ) + ) + ); + } + + return concat(parts); + } + case "ForStatement": { + const 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. + const dangling = comments.printDanglingComments( + path$$1, + options, + /* sameLine */ true + ); + const printedComments = dangling ? concat([dangling, softline]) : ""; + + if (!n.init && !n.test && !n.update) { + return concat([printedComments, group(concat(["for (;;)", body]))]); + } + + return concat([ + printedComments, + group( + concat([ + "for (", + group( + concat([ + indent( + concat([ + softline, + path$$1.call(print, "init"), + ";", + line, + path$$1.call(print, "test"), + ";", + line, + path$$1.call(print, "update") + ]) + ), + softline + ]) + ), + ")", + body + ]) + ) + ]); + } + case "WhileStatement": + return group( + concat([ + "while (", + group( + concat([ + indent(concat([softline, path$$1.call(print, "test")])), + softline + ]) + ), + ")", + adjustClause(n.body, path$$1.call(print, "body")) + ]) + ); + case "ForInStatement": + // Note: esprima can't actually parse "for each (". + return group( + concat([ + 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 + const isAwait = n.type === "ForAwaitStatement" || n.await; + + return group( + concat([ + "for", + isAwait ? " await" : "", + " (", + path$$1.call(print, "left"), + " of ", + path$$1.call(print, "right"), + ")", + adjustClause(n.body, path$$1.call(print, "body")) + ]) + ); + } + + case "DoWhileStatement": { + const clause = adjustClause(n.body, path$$1.call(print, "body")); + const doBody = group(concat(["do", clause])); + parts = [doBody]; + + if (n.body.type === "BlockStatement") { + parts.push(" "); + } else { + parts.push(hardline); + } + parts.push("while ("); + + parts.push( + group( + concat([ + indent(concat([softline, path$$1.call(print, "test")])), + softline + ]) + ), + ")", + semi + ); + + return concat(parts); + } + case "DoExpression": + return concat(["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(parts); + case "ContinueStatement": + parts.push("continue"); + + if (n.label) { + parts.push(" ", path$$1.call(print, "label")); + } + + parts.push(semi); + + return concat(parts); + case "LabeledStatement": + if (n.body.type === "EmptyStatement") { + return concat([path$$1.call(print, "label"), ":;"]); + } + + return concat([ + path$$1.call(print, "label"), + ": ", + path$$1.call(print, "body") + ]); + case "TryStatement": + return concat([ + "try ", + path$$1.call(print, "block"), + n.handler ? concat([" ", path$$1.call(print, "handler")]) : "", + n.finalizer ? concat([" finally ", path$$1.call(print, "finalizer")]) : "" + ]); + case "CatchClause": + return concat([ + "catch ", + n.param ? concat(["(", path$$1.call(print, "param"), ") "]) : "", + path$$1.call(print, "body") + ]); + case "ThrowStatement": + return concat(["throw ", path$$1.call(print, "argument"), semi]); + // Note: ignoring n.lexical because it has no printing consequences. + case "SwitchStatement": + return concat([ + group( + concat([ + "switch (", + indent(concat([softline, path$$1.call(print, "discriminant")])), + softline, + ")" + ]) + ), + " {", + n.cases.length > 0 + ? indent( + concat([ + hardline, + join( + hardline, + path$$1.map(casePath => { + const caseNode = casePath.getValue(); + return concat([ + casePath.call(print), + n.cases.indexOf(caseNode) !== n.cases.length - 1 && + utilShared.isNextLineEmpty( + options.originalText, + caseNode, + options + ) + ? hardline + : "" + ]); + }, "cases") + ) + ]) + ) + : "", + hardline, + "}" + ]); + case "SwitchCase": { + if (n.test) { + parts.push("case ", path$$1.call(print, "test"), ":"); + } else { + parts.push("default:"); + } + + const consequent = n.consequent.filter( + node => node.type !== "EmptyStatement" + ); + + if (consequent.length > 0) { + const cons = path$$1.call(consequentPath => { + return printStatementSequence(consequentPath, options, print); + }, "consequent"); + + parts.push( + consequent.length === 1 && consequent[0].type === "BlockStatement" + ? concat([" ", cons]) + : indent(concat([hardline, cons])) + ); + } + + return concat(parts); + } + // JSX extensions below. + case "DebuggerStatement": + return concat(["debugger", semi]); + case "JSXAttribute": + parts.push(path$$1.call(print, "name")); + + if (n.value) { + let res; + if (isStringLiteral(n.value)) { + const value = rawText(n.value); + res = '"' + value.slice(1, -1).replace(/"/g, """) + '"'; + } else { + res = path$$1.call(print, "value"); + } + parts.push("=", res); + } + + return concat(parts); + case "JSXIdentifier": + // Can be removed when this is fixed: + // https://github.com/eslint/typescript-eslint-parser/issues/337 + if (!n.name) { + return "this"; + } + return "" + n.name; + case "JSXNamespacedName": + return join(":", [ + path$$1.call(print, "namespace"), + path$$1.call(print, "name") + ]); + case "JSXMemberExpression": + return join(".", [ + path$$1.call(print, "object"), + path$$1.call(print, "property") + ]); + case "TSQualifiedName": + return join(".", [path$$1.call(print, "left"), path$$1.call(print, "right")]); + case "JSXSpreadAttribute": + case "JSXSpreadChild": { + return concat([ + "{", + path$$1.call(p => { + const printed = concat(["...", print(p)]); + const n = p.getValue(); + if (!n.comments || !n.comments.length) { + return printed; + } + return concat([ + indent( + concat([ + softline, + comments.printComments(p, () => printed, options) + ]) + ), + softline + ]); + }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), + "}" + ]); + } + case "JSXExpressionContainer": { + const parent = path$$1.getParentNode(0); + + const preventInline = + parent.type === "JSXAttribute" && + n.expression.comments && + n.expression.comments.length > 0; + + const shouldInline = + !preventInline && + (n.expression.type === "ArrayExpression" || + n.expression.type === "ObjectExpression" || + n.expression.type === "ArrowFunctionExpression" || + n.expression.type === "CallExpression" || + n.expression.type === "FunctionExpression" || + n.expression.type === "JSXEmptyExpression" || + n.expression.type === "TemplateLiteral" || + n.expression.type === "TaggedTemplateExpression" || + n.expression.type === "DoExpression" || + (isJSXNode(parent) && + (n.expression.type === "ConditionalExpression" || + isBinaryish(n.expression)))); + + if (shouldInline) { + return group( + concat(["{", path$$1.call(print, "expression"), lineSuffixBoundary, "}"]) + ); + } + + return group( + concat([ + "{", + indent(concat([softline, path$$1.call(print, "expression")])), + softline, + lineSuffixBoundary, + "}" + ]) + ); + } + case "JSXFragment": + case "TSJsxFragment": + case "JSXElement": { + const elem = comments.printComments( + path$$1, + () => printJSXElement(path$$1, options, print), + options + ); + return maybeWrapJSXElementInParens(path$$1, elem); + } + case "JSXOpeningElement": { + const n = path$$1.getValue(); + + const 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(["<", path$$1.call(print, "name"), " />"]); + } + + // 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( + concat([ + "<", + path$$1.call(print, "name"), + " ", + concat(path$$1.map(print, "attributes")), + n.selfClosing ? " />" : ">" + ]) + ); + } + + const lastAttrHasTrailingComments = + n.attributes.length && + hasTrailingComment(util$1.getLast(n.attributes)); + + const bracketSameLine = + 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 + const shouldBreak = + n.attributes && + n.attributes.some( + attr => + attr.value && + isStringLiteral(attr.value) && + attr.value.value.includes("\n") + ); + + return group( + concat([ + "<", + path$$1.call(print, "name"), + concat([ + indent( + concat( + path$$1.map(attr => concat([line, print(attr)]), "attributes") + ) + ), + n.selfClosing ? line : bracketSameLine ? ">" : softline + ]), + n.selfClosing ? "/>" : bracketSameLine ? "" : ">" + ]), + { shouldBreak } + ); + } + case "JSXClosingElement": + return concat([""]); + case "JSXOpeningFragment": + case "JSXClosingFragment": + case "TSJsxOpeningFragment": + case "TSJsxClosingFragment": { + const hasComment = n.comments && n.comments.length; + const hasOwnLineComment = + hasComment && !n.comments.every(util$1.isBlockComment); + const isOpeningFragment = + n.type === "JSXOpeningFragment" || n.type === "TSJsxOpeningFragment"; + return concat([ + isOpeningFragment ? "<" : "" + ]); + } + case "JSXText": + /* istanbul ignore next */ + throw new Error("JSXTest should be handled by JSXElement"); + case "JSXEmptyExpression": { + const requiresHardline = + n.comments && !n.comments.every(util$1.isBlockComment); + + return concat([ + comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ !requiresHardline + ), + requiresHardline ? hardline : "" + ]); + } + case "ClassBody": + if (!n.comments && n.body.length === 0) { + return "{}"; + } + + return concat([ + "{", + n.body.length > 0 + ? indent( + concat([ + hardline, + path$$1.call(bodyPath => { + return printStatementSequence(bodyPath, options, print); + }, "body") + ]) + ) + : comments.printDanglingComments(path$$1, options), + hardline, + "}" + ]); + case "ClassProperty": + case "TSAbstractClassProperty": + case "ClassPrivateProperty": { + 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 "); + } + const 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(printTypeAnnotation(path$$1, options, print)); + if (n.value) { + parts.push( + " =", + printAssignmentRight( + n.value, + path$$1.call(print, "value"), + false, // canBreak + options + ) + ); + } + + parts.push(semi); + + return concat(parts); + } + case "ClassDeclaration": + case "ClassExpression": + case "TSAbstractClassDeclaration": + if (isNodeStartingWithDeclare(n, options)) { + parts.push("declare "); + } + parts.push(concat(printClass(path$$1, options, print))); + return concat(parts); + case "TSInterfaceHeritage": + parts.push(path$$1.call(print, "id")); + + if (n.typeParameters) { + parts.push(path$$1.call(print, "typeParameters")); + } + + return concat(parts); + case "TemplateElement": + return join(literalline, n.value.raw.split(/\r?\n/g)); + case "TemplateLiteral": { + const expressions = path$$1.map(print, "expressions"); + + parts.push("`"); + + path$$1.each(childPath => { + const 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 `. + const tabWidth = options.tabWidth; + const indentSize = util$1.getIndentSize( + childPath.getValue().value.raw, + tabWidth + ); + + let printed = expressions[i]; + + if ( + (n.expressions[i].comments && n.expressions[i].comments.length) || + n.expressions[i].type === "MemberExpression" || + n.expressions[i].type === "ConditionalExpression" + ) { + printed = concat([indent(concat([softline, printed])), softline]); + } + + const aligned = addAlignmentToDoc(printed, indentSize, tabWidth); + + parts.push(group(concat(["${", aligned, lineSuffixBoundary, "}"]))); + } + }, "quasis"); + + parts.push("`"); + + return concat(parts); + } + // These types are unprintable because they serve as abstract + // supertypes for other (printable) types. + case "TaggedTemplateExpression": + return concat([path$$1.call(print, "tag"), 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": { + const typesField = n.type === "TSTupleType" ? "elementTypes" : "types"; + return group( + concat([ + "[", + indent( + concat([ + softline, + printArrayItems(path$$1, options, typesField, print) + ]) + ), + // TypeScript doesn't support trailing commas in tuple types + n.type === "TSTupleType" + ? "" + : ifBreak(shouldPrintComma(options) ? "," : ""), + comments.printDanglingComments(path$$1, options, /* sameIndent */ true), + softline, + "]" + ]) + ); + } + + case "ExistsTypeAnnotation": + return "*"; + case "EmptyTypeAnnotation": + return "empty"; + case "AnyTypeAnnotation": + return "any"; + case "MixedTypeAnnotation": + return "mixed"; + case "ArrayTypeAnnotation": + return concat([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([ + "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(["declare export * from ", path$$1.call(print, "source")]); + case "DeclareExportDeclaration": + return concat(["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(parts); + } + + case "FunctionTypeAnnotation": + case "TSFunctionType": { + // FunctionTypeAnnotation is ambiguous: + // declare function foo(a: B): void; OR + // var A: (a: B) => void; + const parent = path$$1.getParentNode(0); + const parentParent = path$$1.getParentNode(1); + const parentParentParent = path$$1.getParentNode(2); + let isArrowFunctionTypeAnnotation = + n.type === "TSFunctionType" || + !( + (parent.type === "ObjectTypeProperty" && + !getFlowVariance(parent) && + !parent.optional && + options.locStart(parent) === options.locStart(n)) || + parent.type === "ObjectTypeCallProperty" || + (parentParentParent && parentParentParent.type === "DeclareFunction") + ); + + let needsColon = + isArrowFunctionTypeAnnotation && + (parent.type === "TypeAnnotation" || + parent.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 :( + const needsParens = + needsColon && + isArrowFunctionTypeAnnotation && + (parent.type === "TypeAnnotation" || + parent.type === "TSTypeAnnotation") && + parentParent.type === "ArrowFunctionExpression"; + + if (isObjectTypePropertyAFunction(parent, 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(concat(parts)); + } + case "FunctionTypeParam": + return concat([ + path$$1.call(print, "name"), + printOptionalToken(path$$1), + n.name ? ": " : "", + path$$1.call(print, "typeAnnotation") + ]); + case "GenericTypeAnnotation": + return concat([ + path$$1.call(print, "id"), + path$$1.call(print, "typeParameters") + ]); + case "DeclareInterface": + case "InterfaceDeclaration": { + if ( + n.type === "DeclareInterface" || + isNodeStartingWithDeclare(n, options) + ) { + parts.push("declare "); + } + + parts.push( + "interface ", + path$$1.call(print, "id"), + path$$1.call(print, "typeParameters") + ); + + if (n["extends"].length > 0) { + parts.push( + group( + indent( + concat([line, "extends ", join(", ", path$$1.map(print, "extends"))]) + ) + ) + ); + } + + parts.push(" "); + parts.push(path$$1.call(print, "body")); + + return group(concat(parts)); + } + case "ClassImplements": + case "InterfaceExtends": + return concat([ + path$$1.call(print, "id"), + path$$1.call(print, "typeParameters") + ]); + case "TSIntersectionType": + case "IntersectionTypeAnnotation": { + const types = path$$1.map(print, "types"); + const result = []; + let wasIndented = false; + for (let i = 0; i < types.length; ++i) { + if (i === 0) { + result.push(types[i]); + } else if (isObjectType(n.types[i - 1]) && isObjectType(n.types[i])) { + // If both are objects, don't indent + result.push( + concat([" & ", wasIndented ? indent(types[i]) : types[i]]) + ); + } else if (!isObjectType(n.types[i - 1]) && !isObjectType(n.types[i])) { + // If no object is involved, go to the next line if it breaks + result.push(indent(concat([" &", line, types[i]]))); + } else { + // If you go from object to non-object or vis-versa, then inline it + if (i > 1) { + wasIndented = true; + } + result.push(" & ", i > 1 ? indent(types[i]) : types[i]); + } + } + return group(concat(result)); + } + case "TSUnionType": + case "UnionTypeAnnotation": { + // single-line variation + // A | B | C + + // multi-line variation + // | A + // | B + // | C + + const parent = path$$1.getParentNode(); + + // If there's a leading comment, the parent is doing the indentation + const shouldIndent = + parent.type !== "TypeParameterInstantiation" && + parent.type !== "TSTypeParameterInstantiation" && + parent.type !== "GenericTypeAnnotation" && + parent.type !== "TSTypeReference" && + !(parent.type === "FunctionTypeParam" && !parent.name) && + !( + (parent.type === "TypeAlias" || + parent.type === "VariableDeclarator") && + hasLeadingOwnLineComment(options.originalText, n, options) + ); + + // { + // a: string + // } | null | void + // should be inlined and not be printed in the multi-line variant + const shouldHug = shouldHugType(n); + + // We want to align the children but without its comment, so it looks like + // | child1 + // // comment + // | child2 + const printed = path$$1.map(typePath => { + let printedType = typePath.call(print); + if (!shouldHug) { + printedType = align(2, printedType); + } + return comments.printComments(typePath, () => printedType, options); + }, "types"); + + if (shouldHug) { + return join(" | ", printed); + } + + const code = concat([ + ifBreak(concat([shouldIndent ? line : "", "| "])), + join(concat([line, "| "]), printed) + ]); + + let hasParens; + + if (n.type === "TSUnionType") { + const greatGrandParent = path$$1.getParentNode(2); + const 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(concat([indent(code), softline])); + } + + return group(shouldIndent ? indent(code) : code); + } + case "NullableTypeAnnotation": + return concat(["?", 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(parts); + case "ObjectTypeIndexer": { + const variance = getFlowVariance(n); + return concat([ + variance || "", + "[", + path$$1.call(print, "id"), + n.id ? ": " : "", + path$$1.call(print, "key"), + "]: ", + path$$1.call(print, "value") + ]); + } + case "ObjectTypeProperty": { + const variance = getFlowVariance(n); + + return concat([ + n.static ? "static " : "", + isGetterOrSetter(n) ? n.kind + " " : "", + variance || "", + printPropertyKey(path$$1, options, print), + printOptionalToken(path$$1), + isFunctionNotation(n, options) ? "" : ": ", + path$$1.call(print, "value") + ]); + } + case "QualifiedTypeIdentifier": + return concat([ + 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 util$1.printNumber(n.extra.raw); + } + return util$1.printNumber(n.raw); + + case "StringTypeAnnotation": + return "string"; + case "DeclareTypeAlias": + case "TypeAlias": { + if ( + n.type === "DeclareTypeAlias" || + isNodeStartingWithDeclare(n, options) + ) { + parts.push("declare "); + } + + const canBreak = n.right.type === "StringLiteralTypeAnnotation"; + + const printed = printAssignmentRight( + n.right, + path$$1.call(print, "right"), + canBreak, + options + ); + + parts.push( + "type ", + path$$1.call(print, "id"), + path$$1.call(print, "typeParameters"), + " =", + printed, + semi + ); + + return group(concat(parts)); + } + case "TypeCastExpression": + return concat([ + "(", + path$$1.call(print, "expression"), + ": ", + path$$1.call(print, "typeAnnotation"), + ")" + ]); + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": + case "TSTypeParameterDeclaration": + case "TSTypeParameterInstantiation": + return printTypeParameters(path$$1, options, print, "params"); + + case "TSTypeParameter": + case "TypeParameter": { + const parent = path$$1.getParentNode(); + if (parent.type === "TSMappedType") { + parts.push(path$$1.call(print, "name")); + if (n.constraint) { + parts.push(" in ", path$$1.call(print, "constraint")); + } + return concat(parts); + } + + const variance = getFlowVariance(n); + + if (variance) { + parts.push(variance); + } + + 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(parts); + } + case "TypeofTypeAnnotation": + return concat(["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(["%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 "TSVoidKeyword": + return "void"; + case "TSAsExpression": + return concat([ + path$$1.call(print, "expression"), + " as ", + path$$1.call(print, "typeAnnotation") + ]); + case "TSArrayType": + return concat([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(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(parts); + case "TSTypeReference": + return concat([ + path$$1.call(print, "typeName"), + printTypeParameters(path$$1, options, print, "typeParameters") + ]); + case "TSTypeQuery": + return concat(["typeof ", path$$1.call(print, "exprName")]); + case "TSParenthesizedType": { + return path$$1.call(print, "typeAnnotation"); + } + case "TSIndexSignature": { + const parent = path$$1.getParentNode(); + + return concat([ + n.export ? "export " : "", + n.accessibility ? concat([n.accessibility, " "]) : "", + n.static ? "static " : "", + n.readonly ? "readonly " : "", + "[", + path$$1.call(print, "index"), + "]: ", + path$$1.call(print, "typeAnnotation"), + parent.type === "ClassBody" ? semi : "" + ]); + } + case "TSTypePredicate": + return concat([ + path$$1.call(print, "parameterName"), + " is ", + path$$1.call(print, "typeAnnotation") + ]); + case "TSNonNullExpression": + return concat([path$$1.call(print, "expression"), "!"]); + case "TSThisType": + return "this"; + case "TSLastTypeNode": + return path$$1.call(print, "literal"); + case "TSIndexedAccessType": + return concat([ + 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( + printFunctionParams( + path$$1, + print, + options, + /* expandArg */ false, + /* printTypeParams */ true + ) + ) + ); + + if (n.typeAnnotation) { + const isType = n.type === "TSConstructorType"; + parts.push(isType ? " => " : ": ", path$$1.call(print, "typeAnnotation")); + } + return concat(parts); + } + case "TSTypeOperator": + return concat([n.operator, " ", path$$1.call(print, "typeAnnotation")]); + case "TSMappedType": + return group( + concat([ + "{", + indent( + concat([ + options.bracketSpacing ? line : softline, + n.readonlyToken + ? concat([ + 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 : softline, + "}" + ]) + ); + case "TSMethodSignature": + parts.push( + n.accessibility ? concat([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(concat(parts)); + case "TSNamespaceExportDeclaration": + parts.push("export as namespace ", path$$1.call(print, "name")); + + if (options.semi) { + parts.push(";"); + } + + return group(concat(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( + concat([ + "{", + comments.printDanglingComments(path$$1, options), + softline, + "}" + ]) + ) + ); + } else { + parts.push( + group( + concat([ + "{", + indent( + concat([ + hardline, + printArrayItems(path$$1, options, "members", print), + shouldPrintComma(options, "es5") ? "," : "" + ]) + ), + comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ true + ), + hardline, + "}" + ]) + ) + ); + } + + return concat(parts); + case "TSEnumMember": + parts.push(path$$1.call(print, "id")); + if (n.initializer) { + parts.push(" = ", path$$1.call(print, "initializer")); + } + return concat(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(concat(parts)); + case "TSExternalModuleReference": + return concat(["require(", path$$1.call(print, "expression"), ")"]); + case "TSModuleDeclaration": { + const parent = path$$1.getParentNode(); + const isExternalModule = isLiteral(n.id); + const parentIsDeclaration = parent.type === "TSModuleDeclaration"; + const 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)); + + // Global declaration looks like this: + // (declare)? global { ... } + const isGlobalDeclaration = + n.id.type === "Identifier" && + n.id.name === "global" && + !/namespace|module/.test( + options.originalText.slice( + options.locStart(n), + options.locStart(n.id) + ) + ); + + if (!isGlobalDeclaration) { + parts.push(isExternalModule ? "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( + concat([ + line, + path$$1.call( + bodyPath => + comments.printDanglingComments(bodyPath, options, true), + "body" + ), + group(path$$1.call(print, "body")) + ]) + ), + line, + "}" + ); + } else { + parts.push(semi); + } + + return concat(parts); + } + case "TSModuleBlock": + return path$$1.call(bodyPath => { + return printStatementSequence(bodyPath, options, print); + }, "body"); + + case "PrivateName": + return concat(["#", path$$1.call(print, "id")]); + + case "TSConditionalType": + return formatTernaryOperator(path$$1, options, print, { + beforeParts: () => [ + path$$1.call(print, "checkType"), + " ", + "extends", + " ", + path$$1.call(print, "extendsType") + ], + shouldCheckJsx: false, + operatorName: "TSConditionalType", + consequentNode: "trueType", + alternateNode: "falseType", + testNode: "checkType", + breakNested: false + }); + + case "TSInferType": + return concat(["infer", " ", path$$1.call(print, "typeParameter")]); + + default: + /* istanbul ignore next */ + throw new Error("unknown type: " + JSON.stringify(n.type)); + } +} + +function printStatementSequence(path$$1, options, print) { + const printed = []; + + const bodyNode = path$$1.getNode(); + const isClass = bodyNode.type === "ClassBody"; + + path$$1.map((stmtPath, i) => { + const 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; + } + + const stmtPrinted = print(stmtPath); + const text = options.originalText; + const 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(comment => 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") { + const nextChild = bodyNode.body[i + 1]; + if (classChildNeedsASIProtection(nextChild)) { + parts.push(";"); + } + } + } + + if ( + utilShared.isNextLineEmpty(text, stmt, options) && + !isLastStatement(stmtPath) + ) { + parts.push(hardline); + } + + printed.push(concat(parts)); + }); + + return join(hardline, printed); +} + +function printPropertyKey(path$$1, options, print) { + const node = path$$1.getNode(); + const key = node.key; + + if ( + isStringLiteral(key) && + isIdentifierName(key.value) && + !node.computed && + options.parser !== "json" + ) { + // 'a' -> a + return path$$1.call( + keyPath => comments.printComments(keyPath, () => key.value, options), + "key" + ); + } + return path$$1.call(print, "key"); +} + +function printMethod(path$$1, options, print) { + const node = path$$1.getNode(); + const semi = options.semi ? ";" : ""; + const kind = node.kind; + const 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, " "); + } + + let key = printPropertyKey(path$$1, options, print); + + if (node.computed) { + key = concat(["[", key, "]"]); + } + + parts.push( + key, + concat( + path$$1.call( + valuePath => [ + printFunctionTypeParameters(valuePath, options, print), + group( + concat([ + 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(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.body.type === "BlockStatement" || + arg.body.type === "ArrowFunctionExpression" || + arg.body.type === "ObjectExpression" || + arg.body.type === "ArrayExpression" || + arg.body.type === "CallExpression" || + isJSXNode(arg.body))) + ); +} + +function shouldGroupLastArg(args) { + const lastArg = util$1.getLast(args); + const penultimateArg = util$1.getPenultimate(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; + } + + const firstArg = args[0]; + const secondArg = args[1]; + return ( + (!firstArg.comments || !firstArg.comments.length) && + (firstArg.type === "FunctionExpression" || + (firstArg.type === "ArrowFunctionExpression" && + firstArg.body.type === "BlockStatement")) && + !couldGroupArg(secondArg) + ); +} + +function printArgumentsList(path$$1, options, print) { + const args = path$$1.getValue().arguments; + + if (args.length === 0) { + return concat([ + "(", + comments.printDanglingComments(path$$1, options, /* sameIndent */ true), + ")" + ]); + } + + let anyArgEmptyLine = false; + let hasEmptyLineFollowingFirstArg = false; + const lastArgIndex = args.length - 1; + const printedArguments = path$$1.map((argPath, index) => { + const arg = argPath.getNode(); + const parts = [print(argPath)]; + + if (index === lastArgIndex) { + // do nothing + } else if (utilShared.isNextLineEmpty(options.originalText, arg, options)) { + if (index === 0) { + hasEmptyLineFollowingFirstArg = true; + } + + anyArgEmptyLine = true; + parts.push(",", hardline, hardline); + } else { + parts.push(",", line); + } + + return concat(parts); + }, "arguments"); + + const shouldGroupFirst = shouldGroupFirstArg(args); + const shouldGroupLast = shouldGroupLastArg(args); + if (shouldGroupFirst || shouldGroupLast) { + const 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 + let printedExpanded; + let i = 0; + path$$1.each(argPath => { + if (shouldGroupFirst && i === 0) { + printedExpanded = [ + concat([ + argPath.call(p => print(p, { expandFirstArg: true })), + printedArguments.length > 1 ? "," : "", + hasEmptyLineFollowingFirstArg ? hardline : line, + hasEmptyLineFollowingFirstArg ? hardline : "" + ]) + ].concat(printedArguments.slice(1)); + } + if (shouldGroupLast && i === args.length - 1) { + printedExpanded = printedArguments + .slice(0, -1) + .concat(argPath.call(p => print(p, { expandLastArg: true }))); + } + i++; + }, "arguments"); + + const somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1); + + const maybeTrailingComma = shouldPrintComma(options, "all") ? "," : ""; + + return concat([ + somePrintedArgumentsWillBreak ? breakParent : "", + conditionalGroup( + [ + concat([ + ifBreak( + indent(concat(["(", softline, concat(printedExpanded)])), + concat(["(", concat(printedExpanded)]) + ), + somePrintedArgumentsWillBreak + ? concat([ifBreak(maybeTrailingComma), softline]) + : "", + ")" + ]), + shouldGroupFirst + ? concat([ + "(", + group(printedExpanded[0], { shouldBreak: true }), + concat(printedExpanded.slice(1)), + ")" + ]) + : concat([ + "(", + concat(printedArguments.slice(0, -1)), + group(util$1.getLast(printedExpanded), { + shouldBreak: true + }), + ")" + ]), + group( + concat([ + "(", + indent(concat([line, concat(printedArguments)])), + maybeTrailingComma, + line, + ")" + ]), + { shouldBreak: true } + ) + ], + { shouldBreak } + ) + ]); + } + + return group( + concat([ + "(", + indent(concat([softline, concat(printedArguments)])), + ifBreak(shouldPrintComma(options, "all") ? "," : ""), + softline, + ")" + ]), + { shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine } + ); +} + +function printTypeAnnotation(path$$1, options, print) { + const node = path$$1.getValue(); + if (!node.typeAnnotation) { + return ""; + } + + const parentNode = path$$1.getParentNode(); + const isDefinite = + node.definite || + (parentNode && + parentNode.type === "VariableDeclarator" && + parentNode.definite); + + const isFunctionDeclarationIdentifier = + parentNode.type === "DeclareFunction" && parentNode.id === node; + + if ( + isFlowAnnotationComment(options.originalText, node.typeAnnotation, options) + ) { + return concat([" /*: ", path$$1.call(print, "typeAnnotation"), " */"]); + } + + return concat([ + isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", + path$$1.call(print, "typeAnnotation") + ]); +} + +function printFunctionTypeParameters(path$$1, options, print) { + const fun = path$$1.getValue(); + if (fun.typeParameters) { + return path$$1.call(print, "typeParameters"); + } + return ""; +} + +function printFunctionParams(path$$1, print, options, expandArg, printTypeParams) { + const fun = path$$1.getValue(); + const paramsField = fun.parameters ? "parameters" : "params"; + + const typeParams = printTypeParams + ? printFunctionTypeParameters(path$$1, options, print) + : ""; + + let printed = []; + if (fun[paramsField]) { + printed = path$$1.map(print, paramsField); + } + + if (fun.rest) { + printed.push(concat(["...", path$$1.call(print, "rest")])); + } + + if (printed.length === 0) { + return concat([ + typeParams, + "(", + comments.printDanglingComments( + path$$1, + options, + /* sameIndent */ true, + comment => + util$1.getNextNonSpaceNonCommentCharacter( + options.originalText, + comment, + options.locEnd + ) === ")" + ), + ")" + ]); + } + + const lastParam = util$1.getLast(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(n => n.comments)) + ) { + return group( + concat([ + docUtils$3.removeLines(typeParams), + "(", + join(", ", printed.map(docUtils$3.removeLines)), + ")" + ]) + ); + } + + // Single object destructuring should hug + // + // function({ + // a, + // b, + // c + // }) {} + if (shouldHugArguments(fun)) { + return concat([typeParams, "(", join(", ", printed), ")"]); + } + + const parent = path$$1.getParentNode(); + + // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})` + if (parent.type === "CallExpression" && isTestCall(parent)) { + return concat([typeParams, "(", join(", ", printed), ")"]); + } + + const flowTypeAnnotations = [ + "AnyTypeAnnotation", + "NullLiteralTypeAnnotation", + "GenericTypeAnnotation", + "ThisTypeAnnotation", + "NumberTypeAnnotation", + "VoidTypeAnnotation", + "EmptyTypeAnnotation", + "MixedTypeAnnotation", + "BooleanTypeAnnotation", + "BooleanLiteralTypeAnnotation", + "StringTypeAnnotation" + ]; + + const 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 && + flowTypeAnnotations.indexOf(fun[paramsField][0].typeAnnotation.type) !== + -1 && + !( + fun[paramsField][0].typeAnnotation.type === "GenericTypeAnnotation" && + fun[paramsField][0].typeAnnotation.typeParameters + ) && + !fun.rest; + + if (isFlowShorthandWithOneArg) { + if (options.arrowParens === "always") { + return concat(["(", concat(printed), ")"]); + } + return concat(printed); + } + + const canHaveTrailingComma = + !(lastParam && lastParam.type === "RestElement") && !fun.rest; + + return concat([ + typeParams, + "(", + indent(concat([softline, join(concat([",", line]), printed)])), + ifBreak( + canHaveTrailingComma && shouldPrintComma(options, "all") ? "," : "" + ), + softline, + ")" + ]); +} + +function shouldPrintParamsWithoutParens(path$$1, options) { + if (options.arrowParens === "always") { + return false; + } + + if (options.arrowParens === "avoid") { + const 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) { + const n = path$$1.getValue(); + const 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( + concat([ + printFunctionParams(path$$1, print, options), + printReturnType(path$$1, print, options) + ]) + ), + n.body ? " " : "", + path$$1.call(print, "body") + ); + + return concat(parts); +} + +function printObjectMethod(path$$1, options, print) { + const objMethod = path$$1.getValue(); + const 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); + } + + const key = printPropertyKey(path$$1, options, print); + + if (objMethod.computed) { + parts.push("[", key, "]"); + } else { + parts.push(key); + } + + parts.push( + printFunctionTypeParameters(path$$1, options, print), + group( + concat([ + printFunctionParams(path$$1, print, options), + printReturnType(path$$1, print, options) + ]) + ), + " ", + path$$1.call(print, "body") + ); + + return concat(parts); +} + +function printReturnType(path$$1, print, options) { + const n = path$$1.getValue(); + const returnType = path$$1.call(print, "returnType"); + + if ( + n.returnType && + isFlowAnnotationComment(options.originalText, n.returnType, options) + ) { + return concat([" /*: ", returnType, " */"]); + } + + const 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(parts); +} + +function printExportDeclaration(path$$1, options, print) { + const decl = path$$1.getValue(); + const semi = options.semi ? ";" : ""; + const parts = ["export "]; + + const 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); + } + + 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) { + const specifiers = []; + const defaultSpecifiers = []; + const namespaceSpecifiers = []; + path$$1.each(specifierPath => { + const 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(["* as ", print(specifierPath)])); + } + }, "specifiers"); + + const isNamespaceFollowed = + namespaceSpecifiers.length !== 0 && specifiers.length !== 0; + + const isDefaultFollowed = + defaultSpecifiers.length !== 0 && + (namespaceSpecifiers.length !== 0 || specifiers.length !== 0); + + parts.push( + decl.exportKind === "type" ? "type " : "", + concat(defaultSpecifiers), + concat([isDefaultFollowed ? ", " : ""]), + concat(namespaceSpecifiers), + concat([isNamespaceFollowed ? ", " : ""]), + specifiers.length !== 0 + ? group( + concat([ + "{", + indent( + concat([ + options.bracketSpacing ? line : softline, + join(concat([",", line]), specifiers) + ]) + ), + ifBreak(shouldPrintComma(options) ? "," : ""), + options.bracketSpacing ? line : softline, + "}" + ]) + ) + : "" + ); + } else { + parts.push("{}"); + } + + if (decl.source) { + parts.push(" from ", path$$1.call(print, "source")); + } + + parts.push(semi); + } + + return concat(parts); +} + +function printFlowDeclaration(path$$1, parts) { + const parentExportDecl = util$1.getParentExportDeclaration(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(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 + const 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) { + const n = path$$1.getValue(); + if (!n.modifiers || !n.modifiers.length) { + return ""; + } + return concat([join(" ", path$$1.map(print, "modifiers")), " "]); +} + +function printTypeParameters(path$$1, options, print, paramsKey) { + const 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); + } + + const grandparent = path$$1.getNode(2); + + const isParameterInTestCall = + grandparent != null && + grandparent.type === "CallExpression" && + isTestCall(grandparent); + + const 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(["<", join(", ", path$$1.map(print, paramsKey)), ">"]); + } + + return group( + concat([ + "<", + indent( + concat([ + softline, + join(concat([",", line]), path$$1.map(print, paramsKey)) + ]) + ), + ifBreak( + options.parser !== "typescript" && shouldPrintComma(options, "all") + ? "," + : "" + ), + softline, + ">" + ]) + ); +} + +function printClass(path$$1, options, print) { + const n = path$$1.getValue(); + const 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")); + + const partsGroup = []; + if (n.superClass) { + const printed = concat([ + "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([ + " ", + path$$1.call( + superClass => + comments.printComments(superClass, () => printed, options), + "superClass" + ) + ]) + ); + } else { + partsGroup.push( + group( + concat([ + line, + path$$1.call( + superClass => + comments.printComments(superClass, () => printed, options), + "superClass" + ) + ]) + ) + ); + } + } else if (n.extends && n.extends.length > 0) { + parts.push(" extends ", join(", ", path$$1.map(print, "extends"))); + } + + if (n["implements"] && n["implements"].length > 0) { + partsGroup.push( + line, + "implements", + group( + indent( + concat([ + line, + join(concat([",", line]), path$$1.map(print, "implements")) + ]) + ) + ) + ); + } + + if (n["mixins"] && n["mixins"].length > 0) { + partsGroup.push( + line, + "mixins ", + group(indent(join(concat([",", line]), path$$1.map(print, "mixins")))) + ); + } + + if (partsGroup.length > 0) { + parts.push(group(indent(concat(partsGroup)))); + } + + if ( + n.body && + n.body.comments && + hasLeadingOwnLineComment(options.originalText, n.body, options) + ) { + parts.push(hardline); + } else { + parts.push(" "); + } + parts.push(path$$1.call(print, "body")); + + return parts; +} + +function printOptionalToken(path$$1) { + const node = path$$1.getValue(); + if (!node.optional) { + return ""; + } + if ( + node.type === "CallExpression" || + (node.type === "MemberExpression" && node.computed) + ) { + return "?."; + } + return "?"; +} + +function printMemberLookup(path$$1, options, print) { + const property = path$$1.call(print, "property"); + const n = path$$1.getValue(); + const optional = printOptionalToken(path$$1); + + if (!n.computed) { + return concat([optional, ".", property]); + } + + if (!n.property || isNumericLiteral(n.property)) { + return concat([optional, "[", property, "]"]); + } + + return group( + concat([optional, "[", indent(concat([softline, property])), softline, "]"]) + ); +} + +function printBindExpressionCallee(path$$1, options, print) { + return concat(["::", 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] + const 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) { + const originalText = options.originalText; + const nextCharIndex = utilShared.getNextNonSpaceNonCommentCharacterIndex( + originalText, + node, + options + ); + const 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 utilShared.isNextLineEmptyAfterIndex( + originalText, + nextCharIndex + 1, + options + ); + } + + return utilShared.isNextLineEmpty(originalText, node, options); + } + + function rec(path$$1) { + const node = path$$1.getValue(); + if ( + node.type === "CallExpression" && + (isMemberish(node.callee) || node.callee.type === "CallExpression") + ) { + printedNodes.unshift({ + node: node, + printed: concat([ + comments.printComments( + path$$1, + () => + concat([ + printOptionalToken(path$$1), + printFunctionTypeParameters(path$$1, options, print), + printArgumentsList(path$$1, options, print) + ]), + options + ), + shouldInsertEmptyLineAfter(node) ? hardline : "" + ]) + }); + path$$1.call(callee => rec(callee), "callee"); + } else if (isMemberish(node)) { + printedNodes.unshift({ + node: node, + printed: comments.printComments( + path$$1, + () => + node.type === "MemberExpression" + ? printMemberLookup(path$$1, options, print) + : printBindExpressionCallee(path$$1, options, print), + options + ) + }); + path$$1.call(object => rec(object), "object"); + } else if (node.type === "TSNonNullExpression") { + printedNodes.unshift({ + node: node, + printed: comments.printComments(path$$1, () => "!", options) + }); + path$$1.call(expression => 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. + const node = path$$1.getValue(); + printedNodes.unshift({ + node, + printed: concat([ + printOptionalToken(path$$1), + printFunctionTypeParameters(path$$1, options, print), + printArgumentsList(path$$1, options, print) + ]) + }); + path$$1.call(callee => 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() + const groups = []; + let currentGroup = [printedNodes[0]]; + let i = 1; + for (; i < printedNodes.length; ++i) { + if ( + printedNodes[i].node.type === "TSNonNullExpression" || + printedNodes[i].node.type === "CallExpression" || + (printedNodes[i].node.type === "MemberExpression" && + printedNodes[i].node.computed && + isNumericLiteral(printedNodes[i].node.property)) + ) { + currentGroup.push(printedNodes[i]); + } else { + break; + } + } + if (printedNodes[0].node.type !== "CallExpression") { + 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 + let 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") { + hasSeenCallExpression = true; + } + currentGroup.push(printedNodes[i]); + + if ( + printedNodes[i].node.comments && + printedNodes[i].node.comments.some(comment => 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 just an identifier with the name starting with a capital + // letter, just a sequence of _$ or this. The rationale is that they are + // likely to be factories. + function isFactory(name) { + return name.match(/(^[A-Z])|^[_$]+$/); + } + const shouldMerge = + groups.length >= 2 && + !groups[1][0].node.comments && + ((groups[0].length === 1 && + (groups[0][0].node.type === "ThisExpression" || + (groups[0][0].node.type === "Identifier" && + (isFactory(groups[0][0].node.name) || + (groups[1].length && groups[1][0].node.computed))))) || + (groups[0].length > 1 && + groups[0][groups[0].length - 1].node.type === "MemberExpression" && + groups[0][groups[0].length - 1].node.property.type === "Identifier" && + (isFactory(groups[0][groups[0].length - 1].node.property.name) || + (groups[1].length && groups[1][0].node.computed)))); + + function printGroup(printedGroup) { + return concat(printedGroup.map(tuple => tuple.printed)); + } + + function printIndentedGroup(groups) { + if (groups.length === 0) { + return ""; + } + return indent( + group(concat([hardline, join(hardline, groups.map(printGroup))])) + ); + } + + const printedGroups = groups.map(printGroup); + const oneLine = concat(printedGroups); + + const cutoff = shouldMerge ? 3 : 2; + const flatGroups = groups + .slice(0, cutoff) + .reduce((res, group) => res.concat(group), []); + + const hasComment = + flatGroups.slice(1, -1).some(node => hasLeadingComment(node.node)) || + flatGroups.slice(0, -1).some(node => 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(oneLine); + } + + // Find out the last node in the first group and check if it has an + // empty line after + const lastNodeBeforeIndent = util$1.getLast( + shouldMerge ? groups.slice(1, 2)[0] : groups[0] + ).node; + const shouldHaveEmptyLineBeforeIndent = + lastNodeBeforeIndent.type !== "CallExpression" && + shouldInsertEmptyLineAfter(lastNodeBeforeIndent); + + const expanded = concat([ + printGroup(groups[0]), + shouldMerge ? concat(groups.slice(1, 2).map(printGroup)) : "", + shouldHaveEmptyLineBeforeIndent ? hardline : "", + printIndentedGroup(groups.slice(shouldMerge ? 2 : 1)) + ]); + + const callExpressionCount = printedNodes.filter( + tuple => tuple.node.type === "CallExpression" + ).length; + + // 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 || + callExpressionCount >= 3 || + printedGroups.slice(0, -1).some(willBreak$1) + ) { + return group(expanded); + } + + return concat([ + // 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 : "", + conditionalGroup([oneLine, expanded]) + ]); +} + +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. + const child = node.children[0]; + return isLiteral(child) && !isMeaningfulJSXText(child); +} + +// Only space, newline, carriage return, and tab are treated as whitespace +// inside JSX. +const jsxWhitespaceChars = " \n\r\t"; +const containsNonJsxWhitespaceRegex = new RegExp( + "[^" + jsxWhitespaceChars + "]" +); +const 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. + const 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 + ); +} + +// 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) { + const n = path$$1.getValue(); + const children = []; + + // using `map` instead of `each` because it provides `i` + path$$1.map((childPath, i) => { + const child = childPath.getValue(); + if (isLiteral(child)) { + const text = rawText(child); + + // Contains a non-whitespace character + if (isMeaningfulJSXText(child)) { + const words = text.split(matchJsxWhitespaceRegex); + + // Starts with whitespace + if (words[0] === "") { + children.push(""); + words.shift(); + if (/\n/.test(words[0])) { + children.push(hardline); + } else { + children.push(jsxWhitespace); + } + words.shift(); + } + + let endWhitespace; + // Ends with whitespace + if (util$1.getLast(words) === "") { + words.pop(); + endWhitespace = words.pop(); + } + + // This was whitespace only without a new line. + if (words.length === 0) { + return; + } + + words.forEach((word, i) => { + if (i % 2 === 1) { + children.push(line); + } else { + children.push(word); + } + }); + + if (endWhitespace !== undefined) { + if (/\n/.test(endWhitespace)) { + children.push(hardline); + } else { + children.push(jsxWhitespace); + } + } else { + // Ideally this would be a `hardline` to allow a break between + // tags and text. + // Unfortunately Facebook have a custom translation pipeline + // (https://github.com/prettier/prettier/issues/1581#issuecomment-300975032) + // that uses the JSX syntax, but does not follow the React whitespace + // rules. + // Ensuring that we never have a break between tags and text in JSX + // will allow Facebook to adopt Prettier without too much of an + // adverse effect on formatting algorithm. + children.push(""); + } + } 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); + } + } else { + children.push(""); + children.push(jsxWhitespace); + } + } else { + const printedChild = print(childPath); + children.push(printedChild); + + const next = n.children[i + 1]; + const directlyFollowedByMeaningfulText = + next && isMeaningfulJSXText(next) && !/^[ \n\r\t]/.test(rawText(next)); + if (directlyFollowedByMeaningfulText) { + // Potentially this could be a hardline as well. + // See the comment above about the Facebook translation pipeline as + // to why this is an empty string. + children.push(""); + } else { + children.push(hardline); + } + } + }, "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) { + const n = path$$1.getValue(); + + // Turn
into
+ if (n.type === "JSXElement" && isEmptyJSXElement(n)) { + n.openingElement.selfClosing = true; + return path$$1.call(print, "openingElement"); + } + + const openingLines = + n.type === "JSXElement" + ? path$$1.call(print, "openingElement") + : path$$1.call(print, "openingFragment"); + const 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([ + openingLines, + concat(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(child => { + if (isJSXWhitespaceExpression(child)) { + return { + type: "JSXText", + value: " ", + raw: " " + }; + } + return child; + }); + + const containsTag = n.children.filter(isJSXNode).length > 0; + const containsMultipleExpressions = + n.children.filter(child => child.type === "JSXExpressionContainer").length > + 1; + const containsMultipleAttributes = + n.type === "JSXElement" && n.openingElement.attributes.length > 1; + + // Record any breaks. Should never go from true to false, only false to true. + let forcedBreak = + willBreak$1(openingLines) || + containsTag || + containsMultipleAttributes || + containsMultipleExpressions; + + const rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}'; + const jsxWhitespace = ifBreak(concat([rawJsxWhitespace, softline]), " "); + + const children = printJSXChildren(path$$1, options, print, jsxWhitespace); + + const containsText = + n.children.filter(child => 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 (let i = children.length - 2; i >= 0; i--) { + const isPairOfEmptyStrings = children[i] === "" && children[i + 1] === ""; + const isPairOfHardlines = + children[i] === hardline && + children[i + 1] === "" && + children[i + 2] === hardline; + const isLineFollowedByJSXWhitespace = + (children[i] === softline || children[i] === hardline) && + children[i + 1] === "" && + children[i + 2] === jsxWhitespace; + const isJSXWhitespaceFollowedByLine = + children[i] === jsxWhitespace && + children[i + 1] === "" && + (children[i + 2] === softline || children[i + 2] === hardline); + const isDoubleJSXWhitespace = + children[i] === jsxWhitespace && + children[i + 1] === "" && + children[i + 2] === jsxWhitespace; + + if ( + (isPairOfHardlines && containsText) || + isPairOfEmptyStrings || + isLineFollowedByJSXWhitespace || + isDoubleJSXWhitespace + ) { + children.splice(i, 2); + } else if (isJSXWhitespaceFollowedByLine) { + children.splice(i + 1, 2); + } + } + + // Trim trailing lines (or empty strings) + while ( + children.length && + (isLineNext$1(util$1.getLast(children)) || + isEmpty$1(util$1.getLast(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. + const multilineChildren = []; + children.forEach((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([rawJsxWhitespace, hardline])); + return; + } else if (i === children.length - 1) { + // Trailing whitespace + multilineChildren.push(rawJsxWhitespace); + return; + } else if (children[i - 1] === "" && children[i - 2] === hardline) { + // 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. + const content = containsText + ? fill(multilineChildren) + : group(concat(multilineChildren), { shouldBreak: true }); + + const multiLineElem = group( + concat([ + openingLines, + indent(concat([hardline, content])), + hardline, + closingLines + ]) + ); + + if (forcedBreak) { + return multiLineElem; + } + + return conditionalGroup([ + group(concat([openingLines, concat(children), closingLines])), + multiLineElem + ]); +} + +function maybeWrapJSXElementInParens(path$$1, elem) { + const parent = path$$1.getParentNode(); + if (!parent) { + return elem; + } + + const NO_WRAP_PARENTS = { + ArrayExpression: true, + JSXAttribute: true, + JSXElement: true, + JSXExpressionContainer: true, + JSXFragment: true, + TSJsxFragment: true, + ExpressionStatement: true, + CallExpression: true, + ConditionalExpression: true + }; + if (NO_WRAP_PARENTS[parent.type]) { + return elem; + } + + return group( + concat([ + ifBreak("("), + indent(concat([softline, elem])), + softline, + ifBreak(")") + ]) + ); +} + +function isBinaryish(node) { + return node.type === "BinaryExpression" || node.type === "LogicalExpression"; +} + +function isMemberish(node) { + return ( + node.type === "MemberExpression" || + (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 +) { + let parts = []; + const 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 (util$1.shouldFlatten(node.operator, node.left.operator)) { + // Flatten them out by recursively calling this function. + parts = parts.concat( + path$$1.call( + left => + printBinaryishExpressions( + left, + print, + options, + /* isNested */ true, + isInsideParenthesis + ), + "left" + ) + ); + } else { + parts.push(path$$1.call(print, "left")); + } + + const shouldInline = shouldInlineLogicalExpression(node); + const lineBeforeOperator = node.operator === "|>"; + + const right = shouldInline + ? concat([node.operator, " ", path$$1.call(print, "right")]) + : concat([ + lineBeforeOperator ? softline : "", + node.operator, + lineBeforeOperator ? " " : line, + path$$1.call(print, "right") + ]); + + // 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. + const parent = path$$1.getParentNode(); + const shouldGroup = + !(isInsideParenthesis && node.type === "LogicalExpression") && + parent.type !== node.type && + node.left.type !== node.type && + node.right.type !== node.type; + + parts.push(" ", shouldGroup ? group(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, () => concat(parts), options); + } + } else { + // Our stopping case. Simply print the node normally. + parts.push(path$$1.call(print)); + } + + return parts; +} + +function printAssignmentRight(rightNode, printedRight, canBreak, options) { + if (hasLeadingOwnLineComment(options.originalText, rightNode, options)) { + return indent(concat([hardline, printedRight])); + } + + if (canBreak) { + return indent(concat([line, printedRight])); + } + + return concat([" ", printedRight]); +} + +function printAssignment( + leftNode, + printedLeft, + operator, + rightNode, + printedRight, + options +) { + if (!rightNode) { + return printedLeft; + } + + const canBreak = + (isBinaryish(rightNode) && !shouldInlineLogicalExpression(rightNode)) || + (rightNode.type === "ConditionalExpression" && + isBinaryish(rightNode.test) && + !shouldInlineLogicalExpression(rightNode.test)) || + ((leftNode.type === "Identifier" || + isStringLiteral(leftNode) || + leftNode.type === "MemberExpression") && + (isStringLiteral(rightNode) || isMemberExpressionChain(rightNode))); + + const printed = printAssignmentRight( + rightNode, + printedRight, + canBreak, + options + ); + + return group(concat([printedLeft, operator, printed])); +} + +function adjustClause(node, clause, forceSpace) { + if (node.type === "EmptyStatement") { + return ";"; + } + + if (node.type === "BlockStatement" || forceSpace) { + return concat([" ", clause]); + } + + return indent(concat([line, clause])); +} + +function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) { + const raw = rawText(node); + const isDirectiveLiteral = + isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral"; + return util$1.printString(raw, options, isDirectiveLiteral); +} + +function printRegex(node) { + const flags = node.flags + .split("") + .sort() + .join(""); + return `/${node.pattern}/${flags}`; +} + +function isLastStatement(path$$1) { + const parent = path$$1.getParentNode(); + if (!parent) { + return true; + } + const node = path$$1.getValue(); + const body = (parent.body || parent.consequent).filter( + stmt => stmt.type !== "EmptyStatement" + ); + return body && body[body.length - 1] === node; +} + +function hasLeadingComment(node) { + return node.comments && node.comments.some(comment => comment.leading); +} + +function hasTrailingComment(node) { + return node.comments && node.comments.some(comment => comment.trailing); +} + +function hasLeadingOwnLineComment(text, node, options) { + if (isJSXNode(node)) { + return util$1.hasNodeIgnoreComment(node); + } + + const res = + node.comments && + node.comments.some( + comment => + comment.leading && util$1.hasNewline(text, options.locEnd(comment)) + ); + return res; +} + +function hasNakedLeftSide(node) { + return ( + node.type === "AssignmentExpression" || + node.type === "BinaryExpression" || + node.type === "LogicalExpression" || + node.type === "ConditionalExpression" || + node.type === "CallExpression" || + node.type === "MemberExpression" || + node.type === "SequenceExpression" || + node.type === "TaggedTemplateExpression" || + (node.type === "BindExpression" && !node.object) || + (node.type === "UpdateExpression" && !node.prefix) + ); +} + +function isFlowAnnotationComment(text, typeAnnotation, options) { + const start = options.locStart(typeAnnotation); + const end = util$1.skipWhitespace(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.callee) { + return ["callee"]; + } + if (node.object) { + return ["object"]; + } + 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) { + const node = path$$1.getValue(); + + const 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.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, + [childPath => exprNeedsASIProtection(childPath, options)].concat( + getLeftSidePathName(path$$1, node) + ) + ); +} + +function stmtNeedsASIProtection(path$$1, options) { + const node = path$$1.getNode(); + + if (node.type !== "ExpressionStatement") { + return false; + } + + return path$$1.call( + childPath => exprNeedsASIProtection(childPath, options), + "expression" + ); +} + +function classPropMayCauseASIProblems(path$$1) { + const node = path$$1.getNode(); + + if (node.type !== "ClassProperty") { + return false; + } + + const 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.computed) { + const 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 + const isAsync = node.value ? node.value.async : node.async; + const isGenerator = node.value ? node.value.generator : node.generator; + if ( + isAsync || + node.static || + 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)) { + let leftMost = argument; + let newLeftMost; + while ((newLeftMost = getLeftSide(leftMost))) { + leftMost = newLeftMost; + + if (hasLeadingOwnLineComment(options.originalText, leftMost, options)) { + return true; + } + } + } + + return false; +} + +function isMemberExpressionChain(node) { + if (node.type !== "MemberExpression") { + 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.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 (isObjectType(node)) { + return true; + } + + if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") { + const voidCount = node.types.filter( + n => + n.type === "VoidTypeAnnotation" || + n.type === "TSVoidKeyword" || + n.type === "NullLiteralTypeAnnotation" || + n.type === "TSNullKeyword" + ).length; + + const objectCount = node.types.filter( + n => + 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(quasi => quasi.value.raw.includes("\n")); +} + +function isTemplateOnItsOwnLine(n, text, options) { + return ( + ((n.type === "TemplateLiteral" && templateLiteralHasNewLines(n)) || + (n.type === "TaggedTemplateExpression" && + templateLiteralHasNewLines(n.quasi))) && + !util$1.hasNewline(text, options.locStart(n), { backwards: true }) + ); +} + +function printArrayItems(path$$1, options, printPath, print) { + const printedElements = []; + let separatorParts = []; + + path$$1.each(childPath => { + printedElements.push(concat(separatorParts)); + printedElements.push(group(print(childPath))); + + separatorParts = [",", line]; + if ( + childPath.getValue() && + utilShared.isNextLineEmpty( + options.originalText, + childPath.getValue(), + options + ) + ) { + separatorParts.push(softline); + } + }, printPath); + + return concat(printedElements); +} + +function hasDanglingComments(node) { + return ( + node.comments && + node.comments.some(comment => !comment.leading && !comment.trailing) + ); +} + +function needsHardlineAfterDanglingComment(node) { + if (!node.comments) { + return false; + } + const lastDanglingComment = util$1.getLast( + node.comments.filter(comment => !comment.leading && !comment.trailing) + ); + return ( + lastDanglingComment && !util$1.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"; +} + +// eg; `describe("some string", (done) => {})` +function isTestCall(n, parent) { + const unitTestRe = /^(skip|(f|x)?(it|describe|test))$/; + + if (n.arguments.length === 1) { + if ( + n.callee.type === "Identifier" && + n.callee.name === "async" && + parent && + parent.type === "CallExpression" && + isTestCall(parent) + ) { + return isFunctionOrArrowExpression(n.arguments[0].type); + } + + if (isUnitTestSetUp(n)) { + return ( + isFunctionOrArrowExpression(n.arguments[0].type) || + isIdentiferAsync(n.arguments[0]) + ); + } + } else if (n.arguments.length === 2) { + if ( + ((n.callee.type === "Identifier" && unitTestRe.test(n.callee.name)) || + isSkipOrOnlyBlock(n)) && + (isTemplateLiteral(n.arguments[0]) || isStringLiteral(n.arguments[0])) + ) { + return ( + (isFunctionOrArrowExpression(n.arguments[1].type) && + n.arguments[1].params.length <= 1) || + isIdentiferAsync(n.arguments[1]) + ); + } + } + return false; +} + +function isSkipOrOnlyBlock(node) { + const unitTestRe = /^(skip|(f|x)?(it|describe|test))$/; + return ( + node.callee.type === "MemberExpression" && + 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"; +} + +function isIdentiferAsync(node) { + return ( + node.type === "CallExpression" && + node.callee.type === "Identifier" && + node.callee.name === "async" + ); +} + +function isFunctionOrArrowExpression(type) { + return type === "FunctionExpression" || type === "ArrowFunctionExpression"; +} + +function isUnitTestSetUp(n) { + const 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") { + return false; + } + + const node = path$$1.getNode(); + + if (!node.expression || !isJSXNode(node.expression)) { + return false; + } + + const parent = path$$1.getParentNode(); + + return parent.type === "Program" && parent.body.length == 1; +} + +function willPrintOwnComments(path$$1) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + + return ( + ((node && isJSXNode(node)) || + (parent && + (parent.type === "JSXSpreadAttribute" || + parent.type === "JSXSpreadChild" || + parent.type === "UnionTypeAnnotation" || + parent.type === "TSUnionType" || + ((parent.type === "ClassDeclaration" || + parent.type === "ClassExpression") && + parent.superClass === node)))) && + !util$1.hasIgnoreComment(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(commentPath, options) { + const comment = commentPath.getValue(); + + switch (comment.type) { + case "CommentBlock": + case "Block": { + if (isJsDocComment(comment)) { + return printJsDocComment(comment); + } + + const 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 isJsDocComment(comment) { + const lines = comment.value.split("\n"); + return ( + lines.length > 1 && + lines.slice(0, lines.length - 1).every(line => line.trim()[0] === "*") + ); +} + +function printJsDocComment(comment) { + const lines = comment.value.split("\n"); + + return concat([ + "/*", + join( + hardline, + lines.map( + (line, index) => + (index > 0 ? " " : "") + + (index < lines.length - 1 ? line.trim() : line.trimLeft()) + ) + ), + "*/" + ]); +} + +function rawText(node) { + return node.extra ? node.extra.raw : node.raw; +} + +var printerEstree = { + print: genericPrint, + embed: embed_1, + insertPragma, + massageAstNode: clean_1, + hasPrettierIgnore, + willPrintOwnComments, + canAttachComment, + printComment, + handleComments: { + ownLine: comments$2.handleOwnLineComment, + endOfLine: comments$2.handleEndOfLineComment, + remaining: comments$2.handleRemainingComment + } +}; + +const CATEGORY_JAVASCRIPT = "JavaScript"; + +// format based on https://github.com/prettier/prettier/blob/master/src/common/support.js +var options = { + 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: { + since: "0.0.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: true, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + 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: { + since: "0.0.0", + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use single quotes instead of double quotes." + }, + 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" } + ] + } +}; + +const hasPragma = pragma.hasPragma; + + + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const locStart = function(node) { + // Handle nodes with decorators. They should start at the first decorator + if ( + node.declaration && + node.declaration.decorators && + node.declaration.decorators.length > 0 + ) { + return locStart(node.declaration.decorators[0]); + } + if (node.decorators && node.decorators.length > 0) { + return locStart(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; +}; + +const locEnd = function(node) { + const endNode = node.nodes && util$1.getLast(node.nodes); + if (endNode && node.source && !node.source.end) { + node = endNode; + } + + let loc; + if (node.range) { + loc = node.range[1]; + } else if (typeof node.end === "number") { + loc = node.end; + } + + if (node.__location) { + return node.__location.endOffset; + } + if (node.typeAnnotation) { + return Math.max(loc, locEnd(node.typeAnnotation)); + } + + if (node.loc && !loc) { + return node.loc.end; + } + + return loc; +}; + +const languages = [ + { + name: "JavaScript", + since: "0.0.0", + parsers: ["babylon", "flow"], + group: "JavaScript", + tmScope: "source.js", + aceMode: "javascript", + codemirrorMode: "javascript", + codemirrorMimeType: "text/javascript", + aliases: ["js", "node"], + extensions: [ + ".js", + "._js", + ".bones", + ".es", + ".es6", + ".frag", + ".gs", + ".jake", + ".jsb", + ".jscad", + ".jsfl", + ".jsm", + ".jss", + ".mjs", + ".njs", + ".pac", + ".sjs", + ".ssjs", + ".xsjs", + ".xsjslib" + ], + filenames: ["Jakefile"], + linguistLanguageId: 183, + vscodeLanguageIds: ["javascript"] + }, + { + name: "JSX", + since: "0.0.0", + parsers: ["babylon", "flow"], + group: "JavaScript", + extensions: [".jsx"], + tmScope: "source.js.jsx", + aceMode: "javascript", + codemirrorMode: "jsx", + codemirrorMimeType: "text/jsx", + liguistLanguageId: 178, + vscodeLanguageIds: ["javascriptreact"] + }, + { + name: "TypeScript", + since: "1.4.0", + parsers: ["typescript-eslint"], + group: "JavaScript", + aliases: ["ts"], + extensions: [".ts", ".tsx"], + tmScope: "source.ts", + aceMode: "typescript", + codemirrorMode: "javascript", + codemirrorMimeType: "application/typescript", + liguistLanguageId: 378, + vscodeLanguageIds: ["typescript", "typescriptreact"] + }, + { + name: "JSON", + since: "1.5.0", + parsers: ["json"], + group: "JavaScript", + tmScope: "source.json", + aceMode: "json", + codemirrorMode: "javascript", + codemirrorMimeType: "application/json", + extensions: [ + ".json", + ".json5", + ".geojson", + ".JSON-tmLanguage", + ".topojson" + ], + filenames: [ + ".arcconfig", + ".jshintrc", + ".babelrc", + ".eslintrc", + ".prettierrc", + "composer.lock", + "mcmod.info" + ], + linguistLanguageId: 174, + vscodeLanguageIds: ["json", "jsonc"] + } +]; + +const typescript = { + get parse() { + return require("./parser-typescript"); + }, + astFormat: "estree", + hasPragma, + locStart, + locEnd +}; + +const babylon = { + get parse() { + return require("./parser-babylon"); + }, + astFormat: "estree", + hasPragma, + locStart, + locEnd +}; + +const parsers = { + babylon, + json: Object.assign({}, babylon, { + hasPragma() { + return false; + } + }), + flow: { + get parse() { + return require("./parser-flow"); + }, + astFormat: "estree", + hasPragma, + locStart, + locEnd + }, + "typescript-eslint": typescript, + // TODO: Delete this in 2.0 + typescript +}; + +const printers = { + estree: printerEstree +}; + +var languageJs = { + languages, + options, + parsers, + printers, + locStart, + locEnd +}; + +var index$1 = [ + "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$1 +}); + +var htmlTagNames$1 = ( htmlTagNames && index$1 ) || htmlTagNames; + +function clean$2(ast, newObj) { + 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-root-invalid" || + 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 === "css-import" && newObj.importPath) { + newObj.importPath = cleanCSSStrings(newObj.importPath); + } + + 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, + (match, numStr, unit) => { + const num = Number(numStr); + return isNaN(num) ? match : num + unit.toLowerCase(); + } + ); + } + + if (ast.type === "media-url") { + newObj.value = newObj.value + .replace(/^url\(\s+/gi, "url(") + .replace(/\s+\)$/gi, ")"); + } + + if (ast.type === "selector-tag") { + const lowercasedValue = ast.value.toLowerCase(); + + if (htmlTagNames$1.indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + + if (["from", "to"].indexOf(lowercasedValue) !== -1) { + newObj.value = lowercasedValue; + } + } +} + +function cleanCSSStrings(value) { + return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1"); +} + +var clean_1$2 = clean$2; + +const docBuilders$6 = doc.builders; +const concat$5 = docBuilders$6.concat; +const join$4 = docBuilders$6.join; +const line$2 = docBuilders$6.line; +const hardline$4 = docBuilders$6.hardline; +const softline$3 = docBuilders$6.softline; +const group$2 = docBuilders$6.group; +const fill$3 = docBuilders$6.fill; +const indent$4 = docBuilders$6.indent; + +const removeLines$1 = doc.utils.removeLines; + +function genericPrint$1(path$$1, options, print) { + const node = path$$1.getValue(); + + /* istanbul ignore if */ + if (!node) { + return ""; + } + + if (typeof node === "string") { + return node; + } + + switch (node.type) { + case "css-comment-yaml": + return node.value; + case "css-root": { + const nodes = printNodeSequence(path$$1, options, print); + + if (nodes.parts.length) { + return concat$5([nodes, hardline$4]); + } + + return nodes; + } + case "css-comment": { + if (node.raws.content) { + return node.raws.content; + } + const text = options.originalText.slice( + options.locStart(node), + options.locEnd(node) + ); + const 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$5(["// ", rawText]); + } + return concat$5(["/* ", rawText, " */"]); + } + return text; + } + case "css-rule": { + return concat$5([ + path$$1.call(print, "selector"), + node.important ? " !important" : "", + node.nodes + ? concat$5([ + " {", + node.nodes.length > 0 + ? indent$4( + concat$5([hardline$4, printNodeSequence(path$$1, options, print)]) + ) + : "", + hardline$4, + "}", + isDetachedRulesetDeclaration(node) ? ";" : "" + ]) + : ";" + ]); + } + case "css-decl": { + // When the following less construct &:extend(.foo); is parsed with scss, + // it will put a space after `:` and break it. Ideally we should parse + // less files with less, but we can hardcode this to work with scss as + // well. + const isValueExtend = + node.value.type === "value-root" && + node.value.group.type === "value-value" && + node.value.group.group.type === "value-func" && + node.value.group.group.value === "extend"; + const isComposed = + node.value.type === "value-root" && + node.value.group.type === "value-value" && + node.prop === "composes"; + const ruleAncestorNode = getAncestorNode(path$$1, "css-rule"); + const isiCSS = + ruleAncestorNode && + ruleAncestorNode.raws.selector && + (ruleAncestorNode.raws.selector.startsWith(":import") || + ruleAncestorNode.raws.selector.startsWith(":export")); + + return concat$5([ + node.raws.before.replace(/[\s;]/g, ""), + isiCSS ? node.prop : maybeToLowerCase(node.prop), + node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), + isValueExtend ? "" : " ", + isComposed + ? removeLines$1(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$5([ + " {", + indent$4( + concat$5([softline$3, printNodeSequence(path$$1, options, print)]) + ), + softline$3, + "}" + ]) + : ";" + ]); + } + case "css-atrule": { + const hasParams = + node.params && + !(node.params.type === "media-query-list" && node.params.value === ""); + const isDetachedRulesetCall = hasParams && /^\(\s*\)$/.test(node.params); + const hasParensAround = + node.value && + node.value.group.group.type === "value-paren_group" && + node.value.group.group.open !== null && + node.value.group.group.close !== null; + + return concat$5([ + "@", + // 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. + isDetachedRulesetCall || node.name.endsWith(":") + ? node.name + : maybeToLowerCase(node.name), + hasParams + ? concat$5([ + isDetachedRulesetCall ? "" : " ", + path$$1.call(print, "params") + ]) + : "", + node.selector + ? indent$4(concat$5([" ", path$$1.call(print, "selector")])) + : "", + node.value + ? group$2( + concat$5([ + " ", + path$$1.call(print, "value"), + isControlDirectiveNode(node) + ? hasParensAround + ? " " + : line$2 + : "" + ]) + ) + : node.name === "else" + ? " " + : "", + node.nodes + ? concat$5([ + isControlDirectiveNode(node) ? "" : " ", + "{", + indent$4( + concat$5([ + node.nodes.length > 0 ? softline$3 : "", + printNodeSequence(path$$1, options, print) + ]) + ), + softline$3, + "}" + ]) + : ";" + ]); + } + case "css-import": { + return concat$5([ + "@", + maybeToLowerCase(node.name), + " ", + node.directives ? concat$5([node.directives, " "]) : "", + adjustStrings(node.importPath, options), + node.nodes.length > 0 + ? concat$5([ + " {", + indent$4( + concat$5([softline$3, printNodeSequence(path$$1, options, print)]) + ), + softline$3, + "}" + ]) + : ";" + ]); + } + // postcss-media-query-parser + case "media-query-list": { + const parts = []; + path$$1.each(childPath => { + const node = childPath.getValue(); + if (node.type === "media-query" && node.value === "") { + return; + } + parts.push(childPath.call(print)); + }, "nodes"); + + return group$2(indent$4(join$4(line$2, parts))); + } + case "media-query": { + return concat$5([ + join$4(" ", path$$1.map(print, "nodes")), + isLastNode(path$$1, node) ? "" : "," + ]); + } + case "media-type": { + const atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + if ( + atRuleAncestorNode && + atRuleAncestorNode.name.toLowerCase() === "charset" + ) { + return node.value; + } + return adjustNumbers(adjustStrings(node.value, options)); + } + case "media-feature-expression": { + if (!node.nodes) { + return node.value; + } + return concat$5(["(", concat$5(path$$1.map(print, "nodes")), ")"]); + } + case "media-feature": { + return maybeToLowerCase( + adjustStrings(node.value.replace(/ +/g, " "), options) + ); + } + case "media-colon": { + return concat$5([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 adjustStrings(node.value, options); + } + // postcss-selector-parser + case "selector-root-invalid": { + // This is likely a SCSS nested property: `background: { color: red; }`. + return adjustNumbers( + adjustStrings(maybeToLowerCase(node.value), options) + ); + } + case "selector-root": { + const atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + const insideAtRuleNode = + atRuleAncestorNode && + ["extend", "custom-selector", "nest"].indexOf( + atRuleAncestorNode.name + ) !== -1; + + return group$2( + concat$5([ + atRuleAncestorNode && atRuleAncestorNode.name === "custom-selector" + ? concat$5([atRuleAncestorNode.customSelector, line$2]) + : "", + join$4( + concat$5([",", insideAtRuleNode ? line$2 : hardline$4]), + path$$1.map(print, "nodes") + ) + ]) + ); + } + case "selector-comment": { + return node.value; + } + case "selector-string": { + return adjustStrings(node.value, options); + } + case "selector-tag": { + const parentNode = path$$1.getParentNode(); + const index = parentNode && parentNode.nodes.indexOf(node); + const prevNode = index && parentNode.nodes[index - 1]; + + return concat$5([ + node.namespace + ? concat$5([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$5(["#", node.value]); + } + case "selector-class": { + return concat$5([".", adjustNumbers(adjustStrings(node.value, options))]); + } + case "selector-attribute": { + return concat$5([ + "[", + node.namespace + ? concat$5([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 === ">>>" + ) { + const parentNode = path$$1.getParentNode(); + const leading = + parentNode.type === "selector-selector" && + parentNode.nodes[0] === node + ? "" + : line$2; + return concat$5([leading, node.value, isLastNode(path$$1, node) ? "" : " "]); + } + const leading = node.value.trim().startsWith("(") ? line$2 : ""; + const value = + adjustNumbers(adjustStrings(node.value.trim(), options)) || line$2; + return concat$5([leading, value]); + } + case "selector-universal": { + return concat$5([ + node.namespace + ? concat$5([node.namespace === true ? "" : node.namespace.trim(), "|"]) + : "", + adjustNumbers(node.value) + ]); + } + case "selector-selector": { + return group$2(indent$4(concat$5(path$$1.map(print, "nodes")))); + } + case "selector-pseudo": { + return concat$5([ + maybeToLowerCase(node.value), + node.nodes && node.nodes.length > 0 + ? concat$5(["(", join$4(", ", path$$1.map(print, "nodes")), ")"]) + : "" + ]); + } + case "selector-nesting": { + return node.value; + } + // postcss-values-parser + case "value-root": { + return path$$1.call(print, "group"); + } + case "value-comment": { + return concat$5([ + node.inline ? "//" : "/*", + node.value, + node.inline ? "" : "*/" + ]); + } + case "value-comma_group": { + const parentNode = path$$1.getParentNode(); + const declAncestorNode = getAncestorNode(path$$1, "css-decl"); + const declAncestorProp = + declAncestorNode && + declAncestorNode.prop && + declAncestorNode.prop.toLowerCase(); + const isGridValue = + declAncestorProp && + parentNode.type === "value-value" && + (declAncestorProp === "grid" || + declAncestorProp.startsWith("grid-template")); + const atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + const isControlDirective = + atRuleAncestorNode && isControlDirectiveNode(atRuleAncestorNode); + + const printed = path$$1.map(print, "groups"); + const parts = []; + const functionAncestorNode = getAncestorNode(path$$1, "value-func"); + const insideInFunction = + functionAncestorNode && functionAncestorNode.value; + const insideURLFunction = + insideInFunction && functionAncestorNode.value.toLowerCase() === "url"; + + let didBreak = false; + for (let i = 0; i < node.groups.length; ++i) { + parts.push(printed[i]); + + // Ignore value inside `url()` + if (insideURLFunction) { + continue; + } + + const iPrevNode = node.groups[i - 1]; + const iNode = node.groups[i]; + const iNextNode = node.groups[i + 1]; + const iNextNextNode = node.groups[i + 2]; + + // Ignore after latest node (i.e. before semicolon) + if (!iNextNode) { + continue; + } + + // Ignore colon + if (iNode.value === ":") { + 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; + } + + if ( + (iPrevNode && + iPrevNode.type === "value-comment" && + iPrevNode.inline) || + (iNextNode.type === "value-comment" && iNextNode.inline) + ) { + continue; + } + + const isHash = iNode.type === "value-word" && iNode.value === "#"; + const isLeftCurlyBrace = + iNode.type === "value-word" && iNode.value === "{"; + const isNextLeftCurlyBrace = + iNextNode.type === "value-word" && iNextNode.value === "{"; + const isRightCurlyBrace = + iNode.type === "value-word" && iNode.value === "}"; + const isNextRightCurlyBrace = + iNextNode.type === "value-word" && iNextNode.value === "}"; + + // Ignore interpolation in SCSS (i.e. ``#{variable}``) + if ( + isHash || + isLeftCurlyBrace || + isNextRightCurlyBrace || + (isNextLeftCurlyBrace && + iNextNode.raws && + iNextNode.raws.before === "") || + (isRightCurlyBrace && iNextNode.raws && iNextNode.raws.before === "") + ) { + continue; + } + + const isNextHash = + iNextNode.type === "value-word" && iNextNode.value === "#"; + + const isMathOperator = isMathOperatorNode(iNode); + const isNextMathOperator = isMathOperatorNode(iNextNode); + + const isMultiplication = + !isNextHash && isMathOperator && iNode.value === "*"; + const isNextMultiplication = + !isRightCurlyBrace && isNextMathOperator && iNextNode.value === "*"; + + const isDivision = !isNextHash && isMathOperator && iNode.value === "/"; + const isNextDivision = + !isRightCurlyBrace && isNextMathOperator && iNextNode.value === "/"; + + const isAddition = !isNextHash && isMathOperator && iNode.value === "+"; + const isNextAddition = + !isRightCurlyBrace && isNextMathOperator && iNextNode.value === "+"; + + const isPrevFunction = iPrevNode && iPrevNode.type === "value-func"; + const isFunction = iNode.type === "value-func"; + const isNextFunction = iNextNode.type === "value-func"; + const isNextNextFunction = + iNextNextNode && iNextNextNode.type === "value-func"; + + const isPrevWord = + iPrevNode && + ["value-word", "value-atword"].indexOf(iPrevNode.type) !== -1; + const isWord = + ["value-word", "value-atword"].indexOf(iNode.type) !== -1; + const isNextWord = + ["value-word", "value-atword"].indexOf(iNextNode.type) !== -1; + const isNextNextWord = + iNextNextNode && + ["value-word", "value-atword"].indexOf(iNextNextNode.type) !== -1; + + // Math operators + const insideCalcFunction = + insideInFunction && + functionAncestorNode.value.toLowerCase() === "calc"; + + const hasSpaceBeforeOperator = + isNextNextFunction || isNextNextWord || isFunction || isWord; + + const hasSpaceAfterOperator = + isNextFunction || isNextWord || isPrevFunction || isPrevWord; + + if ( + (isMathOperator || isNextMathOperator) && + // Multiplication + !isMultiplication && + !isNextMultiplication && + // Division + !(isNextDivision && (hasSpaceBeforeOperator || insideCalcFunction)) && + !(isDivision && (hasSpaceAfterOperator || insideCalcFunction)) && + // Addition + !(isNextAddition && hasSpaceBeforeOperator) && + !(isAddition && hasSpaceAfterOperator) + ) { + const isNextParenGroup = isParenGroupNode(iNextNode); + const isNextValueNumber = iNextNode.type === "value-number"; + + if ( + (iNextNode.raws && iNextNode.raws.before === "") || + (isMathOperator && + (isNextParenGroup || + isNextWord || + isNextValueNumber || + isMathOperatorNode(iNextNode)) && + (!iPrevNode || (iPrevNode && isMathOperatorNode(iPrevNode)))) + ) { + continue; + } + } + + const isEqualityOperator = + isControlDirective && isEqualityOperatorNode(iNode); + const isRelationalOperator = + isControlDirective && isRelationalOperatorNode(iNode); + const isNextEqualityOperator = + isControlDirective && isEqualityOperatorNode(iNextNode); + const isNextRelationalOperator = + isControlDirective && isRelationalOperatorNode(iNextNode); + const isNextIfElseKeyword = + isControlDirective && isIfElseKeywordNode(iNextNode); + const isEachKeyword = isControlDirective && isEachKeywordNode(iNode); + const isNextEachKeyword = + isControlDirective && isEachKeywordNode(iNextNode); + const isForKeyword = + atRuleAncestorNode && + atRuleAncestorNode.name === "for" && + isForKeywordNode(iNode); + const isNextForKeyword = + isControlDirective && isForKeywordNode(iNextNode); + const IsNextColon = iNextNode.value === ":"; + + if (isGridValue) { + if (iNode.source.start.line !== iNextNode.source.start.line) { + parts.push(hardline$4); + didBreak = true; + } else { + parts.push(" "); + } + } else if (iNode.type === "value-comment" && iNode.inline) { + parts.push(hardline$4); + } else if ( + isNextMathOperator || + isNextEqualityOperator || + isNextRelationalOperator || + isNextIfElseKeyword || + isForKeyword || + isEachKeyword + ) { + parts.push(" "); + } else if ( + !IsNextColon || + isEqualityOperator || + isRelationalOperator || + isNextForKeyword || + isNextEachKeyword + ) { + parts.push(line$2); + } + } + + if (didBreak) { + parts.unshift(hardline$4); + } + + if (isControlDirective) { + return group$2(indent$4(concat$5(parts))); + } + + return group$2(indent$4(fill$3(parts))); + } + case "value-paren_group": { + const parentNode = path$$1.getParentNode(); + const isURLCall = + parentNode && + parentNode.type === "value-func" && + parentNode.value === "url"; + + if ( + isURLCall && + (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$5([ + node.open ? path$$1.call(print, "open") : "", + join$4(",", path$$1.map(print, "groups")), + node.close ? path$$1.call(print, "close") : "" + ]); + } + + if (!node.open) { + const printed = path$$1.map(print, "groups"); + const res = []; + + for (let i = 0; i < printed.length; i++) { + if (i !== 0) { + res.push(concat$5([",", line$2])); + } + res.push(printed[i]); + } + return group$2(indent$4(fill$3(res))); + } + + const declNode = path$$1.getParentNode(2); + const isMap = + declNode && + declNode.type === "css-decl" && + declNode.prop.startsWith("$"); + + return group$2( + concat$5([ + node.open ? path$$1.call(print, "open") : "", + indent$4( + concat$5([ + softline$3, + join$4( + concat$5([",", isMap ? hardline$4 : line$2]), + path$$1.map(print, "groups") + ) + ]) + ), + softline$3, + node.close ? path$$1.call(print, "close") : "" + ]) + ); + } + case "value-value": { + return path$$1.call(print, "group"); + } + case "value-func": { + return concat$5([node.value, path$$1.call(print, "group")]); + } + case "value-paren": { + return node.value; + } + case "value-number": { + return concat$5([printNumber$1(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$5([node.value, insideURLFunctionNode(path$$1) ? "" : line$2]); + } + case "value-comma": { + return concat$5([node.value, " "]); + } + case "value-string": { + return util$1.printString( + node.raws.quote + node.value + node.raws.quote, + options + ); + } + case "value-atword": { + return concat$5(["@", node.value]); + } + case "value-unicode-range": { + return node.value; + } + default: + /* istanbul ignore next */ + throw new Error(`Unknown postcss type ${JSON.stringify(node.type)}`); + } +} + +function isLastNode(path$$1, node) { + const parentNode = path$$1.getParentNode(); + if (!parentNode) { + return false; + } + const nodes = parentNode.nodes; + return nodes && nodes.indexOf(node) === nodes.length - 1; +} + +function isDetachedRulesetDeclaration(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. + return ( + node.selector && + node.selector.type !== "selector-root-invalid" && + ((typeof node.selector === "string" && /^@.+:.*$/.test(node.selector)) || + (node.selector.value && /^@.+:.*$/.test(node.selector.value))) + ); +} + +function isKeyframeAtRuleKeywords(path$$1, value) { + const atRuleAncestorNode = getAncestorNode(path$$1, "css-atrule"); + return ( + atRuleAncestorNode && + atRuleAncestorNode.name && + atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && + ["from", "to"].indexOf(value.toLowerCase()) !== -1 + ); +} + +function isHTMLTag(value) { + return htmlTagNames$1.indexOf(value.toLowerCase()) !== -1; +} + +function insideURLFunctionNode(path$$1) { + const funcAncestorNode = getAncestorNode(path$$1, "value-func"); + return ( + funcAncestorNode && + funcAncestorNode.value && + funcAncestorNode.value === "url" + ); +} + +function isParenGroupNode(node) { + return node.type && node.type === "value-paren_group"; +} + +function isForKeywordNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["from", "through", "end"].indexOf(node.value) !== -1 + ); +} + +function isIfElseKeywordNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["and", "or", "not"].indexOf(node.value) !== -1 + ); +} + +function isEachKeywordNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["in"].indexOf(node.value) !== -1 + ); +} + +function isMathOperatorNode(node) { + return ( + node.type && + node.type === "value-operator" && + node.value && + ["+", "-", "/", "*", "%"].indexOf(node.value) !== -1 + ); +} + +function isEqualityOperatorNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["==", "!="].indexOf(node.value) !== -1 + ); +} + +function isRelationalOperatorNode(node) { + return ( + node.type && + node.type === "value-word" && + node.value && + ["<", ">", "<=", ">="].indexOf(node.value) !== -1 + ); +} + +function isControlDirectiveNode(node) { + return ( + node.type && + node.type === "css-atrule" && + node.name && + (node.name === "if" || + node.name === "else" || + node.name === "for" || + node.name === "each" || + node.name === "while") + ); +} + +function getAncestorCounter(path$$1, typeOrTypes) { + const types = [].concat(typeOrTypes); + + let counter = -1; + let ancestorNode; + + while ((ancestorNode = path$$1.getParentNode(++counter))) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode(path$$1, typeOrTypes) { + const counter = getAncestorCounter(path$$1, typeOrTypes); + return counter === -1 ? null : path$$1.getParentNode(counter); +} + +function printNodeSequence(path$$1, options, print) { + const node = path$$1.getValue(); + const parts = []; + let i = 0; + path$$1.map(pathChild => { + const prevNode = node.nodes[i - 1]; + if ( + prevNode && + prevNode.type === "css-comment" && + prevNode.text.trim() === "prettier-ignore" + ) { + const 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" && + !util$1.hasNewline( + options.originalText, + options.locStart(node.nodes[i + 1]), + { backwards: true } + )) || + (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$4); + if ( + utilShared.isNextLineEmpty( + options.originalText, + pathChild.getValue(), + options + ) + ) { + parts.push(hardline$4); + } + } + } + i++; + }, "nodes"); + + return concat$5(parts); +} + +const STRING_REGEX = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g; +const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g; +const STANDARD_UNIT_REGEX = /[a-zA-Z]+/g; +const WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g; +const 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, match => + util$1.printString(match, options) + ); +} + +function quoteAttributeValue(value, options) { + const quote = options.singleQuote ? "'" : '"'; + return value.includes('"') || value.includes("'") + ? value + : quote + value + quote; +} + +function adjustNumbers(value) { + return value.replace( + ADJUST_NUMBERS_REGEX, + (match, quote, wordPart, number, unit) => + !wordPart && number + ? (wordPart || "") + printNumber$1(number) + maybeToLowerCase(unit || "") + : match + ); +} + +function printNumber$1(rawNumber) { + return ( + util$1 + .printNumber(rawNumber) + // Remove trailing `.0`. + .replace(/\.0(?=$|e)/, "") + ); +} + +function maybeToLowerCase(value) { + return value.includes("$") || + value.includes("@") || + value.includes("#") || + value.startsWith("%") || + value.startsWith("--") || + value.startsWith(":--") || + (value.includes("(") && value.includes(")")) + ? value + : value.toLowerCase(); +} + +function isWideKeywords(value) { + return ( + ["initial", "inherit", "unset", "revert"].indexOf( + value.replace().toLowerCase() + ) !== -1 + ); +} + +var printerPostcss = { + print: genericPrint$1, + hasPrettierIgnore: util$1.hasIgnoreComment, + massageAstNode: clean_1$2 +}; + +// format based on https://github.com/prettier/prettier/blob/master/src/common/support.js +var options$2 = { + singleQuote: options.singleQuote +}; + +const lineColumnToIndex$1 = util$1.lineColumnToIndex; +const getLast$1 = util$1.getLast; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$1 = [ + { + name: "CSS", + since: "1.4.0", + parsers: ["css"], + group: "CSS", + tmScope: "source.css", + aceMode: "css", + codemirrorMode: "css", + codemirrorMimeType: "text/css", + extensions: [".css", ".pcss", ".postcss"], + liguistLanguageId: 50, + vscodeLanguageIds: ["css", "postcss"] + }, + { + name: "Less", + since: "1.4.0", + parsers: ["less"], + group: "CSS", + extensions: [".less"], + tmScope: "source.css.less", + aceMode: "less", + codemirrorMode: "css", + codemirrorMimeType: "text/css", + liguistLanguageId: 198, + vscodeLanguageIds: ["less"] + }, + { + name: "SCSS", + since: "1.4.0", + parsers: ["scss"], + group: "CSS", + tmScope: "source.scss", + aceMode: "scss", + codemirrorMode: "css", + codemirrorMimeType: "text/x-scss", + extensions: [".scss"], + liguistLanguageId: 329, + vscodeLanguageIds: ["scss"] + } +]; + +const postcss = { + get parse() { + return require("./parser-postcss"); + }, + astFormat: "postcss", + locEnd: function(node) { + const endNode = node.nodes && getLast$1(node.nodes); + if (endNode && node.source && !node.source.end) { + node = endNode; + } + if (node.source) { + return lineColumnToIndex$1(node.source.end, node.source.input.css); + } + return null; + }, + locStart: function(node) { + if (node.source) { + return lineColumnToIndex$1(node.source.start, node.source.input.css) - 1; + } + return null; + } +}; + +// TODO: switch these to just `postcss` and use `language` instead. +const parsers$1 = { + css: postcss, + less: postcss, + scss: postcss +}; + +const printers$1 = { + postcss: printerPostcss +}; + +var languageCss = { + languages: languages$1, + options: options$2, + parsers: parsers$1, + printers: printers$1 +}; + +const concat$6 = docBuilders$2.concat; +const join$5 = docBuilders$2.join; +const softline$4 = docBuilders$2.softline; +const hardline$5 = docBuilders$2.hardline; +const line$3 = docBuilders$2.line; +const group$3 = docBuilders$2.group; +const indent$5 = docBuilders$2.indent; +const ifBreak$2 = docBuilders$2.ifBreak; + +// http://w3c.github.io/html/single-page.html#void-elements +const 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) { + const n = path$$1.getValue(); + + /* istanbul ignore if*/ + if (!n) { + return ""; + } + + switch (n.type) { + case "Program": { + return group$3( + join$5(softline$4, path$$1.map(print, "body").filter(text => text !== "")) + ); + } + case "ElementNode": { + const isVoid = voidTags.indexOf(n.tag) !== -1; + const closeTag = isVoid ? concat$6([" />", softline$4]) : ">"; + const hasChildren = n.children.length > 0; + const getParams = (path$$1, print) => + indent$5( + concat$6([ + n.attributes.length ? line$3 : "", + join$5(line$3, path$$1.map(print, "attributes")), + + n.modifiers.length ? line$3 : "", + join$5(line$3, path$$1.map(print, "modifiers")), + + n.comments.length ? line$3 : "", + join$5(line$3, 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$6([ + group$3( + concat$6([ + "<", + n.tag, + getParams(path$$1, print), + ifBreak$2(softline$4, ""), + closeTag + ]) + ), + group$3( + concat$6([ + indent$5(join$5(softline$4, [""].concat(path$$1.map(print, "children")))), + ifBreak$2(hasChildren ? hardline$5 : "", ""), + !isVoid ? concat$6([""]) : "" + ]) + ) + ]); + } + case "BlockStatement": { + const pp = path$$1.getParentNode(1); + const isElseIf = + pp && + pp.inverse && + pp.inverse.body[0] === n && + pp.inverse.body[0].path.parts[0] === "if"; + const hasElseIf = + n.inverse && + n.inverse.body[0] && + n.inverse.body[0].type === "BlockStatement" && + n.inverse.body[0].path.parts[0] === "if"; + const indentElse = hasElseIf ? a => a : indent$5; + if (n.inverse) { + return concat$6([ + isElseIf + ? concat$6(["{{else ", printPathParams(path$$1, print), "}}"]) + : printOpenBlock(path$$1, print), + indent$5(concat$6([hardline$5, path$$1.call(print, "program")])), + n.inverse && !hasElseIf ? concat$6([hardline$5, "{{else}}"]) : "", + n.inverse + ? indentElse(concat$6([hardline$5, path$$1.call(print, "inverse")])) + : "", + isElseIf ? "" : concat$6([hardline$5, printCloseBlock(path$$1, print)]) + ]); + } else if (isElseIf) { + return concat$6([ + concat$6(["{{else ", printPathParams(path$$1, print), "}}"]), + indent$5(concat$6([hardline$5, path$$1.call(print, "program")])) + ]); + } + /** + * I want this boolean to be: if params are going to cause a break, + * not that it has params. + */ + const hasParams = n.params.length > 0 || n.hash.pairs.length > 0; + const hasChildren = n.program.body.length > 0; + return concat$6([ + printOpenBlock(path$$1, print), + group$3( + concat$6([ + indent$5(concat$6([softline$4, path$$1.call(print, "program")])), + hasParams && hasChildren ? hardline$5 : "", + printCloseBlock(path$$1, print) + ]) + ) + ]); + } + case "ElementModifierStatement": + case "MustacheStatement": { + const pp = path$$1.getParentNode(1); + const isConcat = pp && pp.type === "ConcatStatement"; + return group$3( + concat$6([ + /*n.escaped ? "{{{" : */ "{{", + printPathParams(path$$1, print), + isConcat ? "" : softline$4, + /*.escaped ? "}}}" :*/ "}}" + ]) + ); + } + case "SubExpression": { + return group$3( + concat$6([ + "(", + printPath(path$$1, print), + indent$5(concat$6([line$3, group$3(join$5(line$3, getParams(path$$1, print)))])), + softline$4, + ")" + ]) + ); + } + case "AttrNode": { + const quote = n.value.type === "TextNode" ? '"' : ""; + return concat$6([n.name, "=", quote, path$$1.call(print, "value"), quote]); + } + case "ConcatStatement": { + return concat$6([ + '"', + group$3( + indent$5( + join$5( + softline$4, + path$$1 + .map(partPath => print(partPath), "parts") + .filter(a => a !== "") + ) + ) + ), + '"' + ]); + } + case "Hash": { + return concat$6([join$5(line$3, path$$1.map(print, "pairs"))]); + } + case "HashPair": { + return concat$6([n.key, "=", path$$1.call(print, "value")]); + } + case "TextNode": { + return n.chars.replace(/^\s+/, "").replace(/\s+$/, ""); + } + case "MustacheCommentStatement": { + const dashes = n.value.indexOf("}}") > -1 ? "--" : ""; + return concat$6(["{{!", dashes, n.value, dashes, "}}"]); + } + case "PathExpression": { + return n.original; + } + case "BooleanLiteral": { + return String(n.value); + } + case "CommentStatement": { + return concat$6([""]); + } + case "StringLiteral": { + return `"${n.value}"`; + } + 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)); + } +} + +function printPath(path$$1, print) { + return path$$1.call(print, "path"); +} + +function getParams(path$$1, print) { + const node = path$$1.getValue(); + let 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) { + let parts = []; + + parts.push(printPath(path$$1, print)); + parts = parts.concat(getParams(path$$1, print)); + + return indent$5(group$3(join$5(line$3, parts))); +} + +function printBlockParams(path$$1) { + const block = path$$1.getValue(); + if (!block.program || !block.program.blockParams.length) { + return ""; + } + return concat$6([" as |", block.program.blockParams.join(" "), "|"]); +} + +function printOpenBlock(path$$1, print) { + return group$3( + concat$6([ + "{{#", + printPathParams(path$$1, print), + printBlockParams(path$$1, print), + softline$4, + "}}" + ]) + ); +} + +function printCloseBlock(path$$1, print) { + return concat$6(["{{/", path$$1.call(print, "path"), "}}"]); +} + +function clean$4(ast, newObj) { + // (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$4 +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$2 = [ + { + type: "markup", + group: "HTML", + aliases: ["hbs", "htmlbars"], + extensions: [".handlebars", ".hbs"], + tm_scope: "text.html.handlebars", + ace_mode: "handlebars", + language_id: 155, + since: null // unreleased + } +]; + +const parsers$2 = { + glimmer: { + get parse() { + return require("./parser-glimmer"); + }, + astFormat: "glimmer", + locEnd: function(node) { + return node.loc && node.loc.end; + }, + locStart: function(node) { + return node.loc && node.loc.start; + } + } +}; + +const printers$2 = { + glimmer: printerGlimmer +}; + +var languageHandlebars = { + languages: languages$2, + parsers: parsers$2, + printers: printers$2 +}; + +const docBuilders$7 = doc.builders; +const concat$7 = docBuilders$7.concat; +const join$6 = docBuilders$7.join; +const hardline$6 = docBuilders$7.hardline; +const line$4 = docBuilders$7.line; +const softline$5 = docBuilders$7.softline; +const group$4 = docBuilders$7.group; +const indent$6 = docBuilders$7.indent; +const ifBreak$3 = docBuilders$7.ifBreak; + + + +function genericPrint$2(path$$1, options, print) { + const n = path$$1.getValue(); + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + switch (n.kind) { + case "Document": { + return concat$7([ + join$6(concat$7([hardline$6, hardline$6]), path$$1.map(print, "definitions")), + hardline$6 + ]); + } + case "OperationDefinition": { + const hasOperation = options.originalText[options.locStart(n)] !== "{"; + const hasName = !!n.name; + return concat$7([ + hasOperation ? n.operation : "", + hasOperation && hasName ? concat$7([" ", path$$1.call(print, "name")]) : "", + n.variableDefinitions && n.variableDefinitions.length + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), 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$7([ + "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$7([ + "{", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + selectionsPath => printSequence(selectionsPath, options, print), + "selections" + ) + ) + ]) + ), + hardline$6, + "}" + ]); + } + case "Field": { + return group$4( + concat$7([ + n.alias ? concat$7([path$$1.call(print, "alias"), ": "]) : "", + path$$1.call(print, "name"), + n.arguments.length > 0 + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.call( + argsPath => 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$7([ + '"""', + hardline$6, + join$6(hardline$6, n.value.replace(/"""/g, "\\$&").split("\n")), + hardline$6, + '"""' + ]); + } + return concat$7(['"', n.value.replace(/["\\]/g, "\\$&"), '"']); + } + case "IntValue": + case "FloatValue": + case "EnumValue": { + return n.value; + } + case "BooleanValue": { + return n.value ? "true" : "false"; + } + case "NullValue": { + return "null"; + } + case "Variable": { + return concat$7(["$", path$$1.call(print, "name")]); + } + case "ListValue": { + return group$4( + concat$7([ + "[", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.map(print, "values") + ) + ]) + ), + softline$5, + "]" + ]) + ); + } + case "ObjectValue": { + return group$4( + concat$7([ + "{", + options.bracketSpacing && n.fields.length > 0 ? " " : "", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.map(print, "fields") + ) + ]) + ), + softline$5, + ifBreak$3("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), + "}" + ]) + ); + } + case "ObjectField": + case "Argument": { + return concat$7([ + path$$1.call(print, "name"), + ": ", + path$$1.call(print, "value") + ]); + } + + case "Directive": { + return concat$7([ + "@", + path$$1.call(print, "name"), + n.arguments.length > 0 + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.call( + argsPath => printSequence(argsPath, options, print), + "arguments" + ) + ) + ]) + ), + softline$5, + ")" + ]) + ) + : "" + ]); + } + + case "NamedType": { + return path$$1.call(print, "name"); + } + + case "VariableDefinition": { + return concat$7([ + path$$1.call(print, "variable"), + ": ", + path$$1.call(print, "type"), + n.defaultValue ? concat$7([" = ", path$$1.call(print, "defaultValue")]) : "" + ]); + } + + case "TypeExtensionDefinition": { + return concat$7(["extend ", path$$1.call(print, "definition")]); + } + + case "ObjectTypeExtension": + case "ObjectTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "ObjectTypeExtension" ? "extend " : "", + "type ", + path$$1.call(print, "name"), + n.interfaces.length > 0 + ? concat$7([ + " implements ", + join$6( + 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$7([ + " {", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + fieldsPath => printSequence(fieldsPath, options, print), + "fields" + ) + ) + ]) + ), + hardline$6, + "}" + ]) + : "" + ]); + } + + case "FieldDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + path$$1.call(print, "name"), + n.arguments.length > 0 + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.call( + argsPath => printSequence(argsPath, options, print), + "arguments" + ) + ) + ]) + ), + softline$5, + ")" + ]) + ) + : "", + ": ", + path$$1.call(print, "type"), + printDirectives(path$$1, print, n) + ]); + } + + case "DirectiveDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + "directive ", + "@", + path$$1.call(print, "name"), + n.arguments.length > 0 + ? group$4( + concat$7([ + "(", + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", ", "), softline$5]), + path$$1.call( + argsPath => printSequence(argsPath, options, print), + "arguments" + ) + ) + ]) + ), + softline$5, + ")" + ]) + ) + : "", + concat$7([" on ", join$6(" | ", path$$1.map(print, "locations"))]) + ]); + } + + case "EnumTypeExtension": + case "EnumTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "EnumTypeExtension" ? "extend " : "", + "enum ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n), + + n.values.length > 0 + ? concat$7([ + " {", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + valuesPath => printSequence(valuesPath, options, print), + "values" + ) + ) + ]) + ), + hardline$6, + "}" + ]) + : "" + ]); + } + + case "EnumValueDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n) + ]); + } + + case "InputValueDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? (n.description.block ? hardline$6 : line$4) : "", + path$$1.call(print, "name"), + ": ", + path$$1.call(print, "type"), + n.defaultValue ? concat$7([" = ", path$$1.call(print, "defaultValue")]) : "", + printDirectives(path$$1, print, n) + ]); + } + + case "InputObjectTypeExtension": + case "InputObjectTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "InputObjectTypeExtension" ? "extend " : "", + "input ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n), + n.fields.length > 0 + ? concat$7([ + " {", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + fieldsPath => printSequence(fieldsPath, options, print), + "fields" + ) + ) + ]) + ), + hardline$6, + "}" + ]) + : "" + ]); + } + + case "SchemaDefinition": { + return concat$7([ + "schema", + printDirectives(path$$1, print, n), + " {", + n.operationTypes.length > 0 + ? indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + opsPath => printSequence(opsPath, options, print), + "operationTypes" + ) + ) + ]) + ) + : "", + hardline$6, + "}" + ]); + } + + case "OperationTypeDefinition": { + return concat$7([ + path$$1.call(print, "operation"), + ": ", + path$$1.call(print, "type") + ]); + } + + case "InterfaceTypeExtension": + case "InterfaceTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "InterfaceTypeExtension" ? "extend " : "", + "interface ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n), + + n.fields.length > 0 + ? concat$7([ + " {", + indent$6( + concat$7([ + hardline$6, + join$6( + hardline$6, + path$$1.call( + fieldsPath => printSequence(fieldsPath, options, print), + "fields" + ) + ) + ]) + ), + hardline$6, + "}" + ]) + : "" + ]); + } + + case "FragmentSpread": { + return concat$7([ + "...", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n) + ]); + } + + case "InlineFragment": { + return concat$7([ + "...", + n.typeCondition + ? concat$7([" on ", path$$1.call(print, "typeCondition")]) + : "", + printDirectives(path$$1, print, n), + " ", + path$$1.call(print, "selectionSet") + ]); + } + + case "UnionTypeExtension": + case "UnionTypeDefinition": { + return group$4( + concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + group$4( + concat$7([ + n.kind === "UnionTypeExtension" ? "extend " : "", + "union ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n), + n.types.length > 0 + ? concat$7([ + " =", + ifBreak$3("", " "), + indent$6( + concat$7([ + ifBreak$3(concat$7([line$4, " "])), + join$6(concat$7([line$4, "| "]), path$$1.map(print, "types")) + ]) + ) + ]) + : "" + ]) + ) + ]) + ); + } + + case "ScalarTypeExtension": + case "ScalarTypeDefinition": { + return concat$7([ + path$$1.call(print, "description"), + n.description ? hardline$6 : "", + n.kind === "ScalarTypeExtension" ? "extend " : "", + "scalar ", + path$$1.call(print, "name"), + printDirectives(path$$1, print, n) + ]); + } + + case "NonNullType": { + return concat$7([path$$1.call(print, "type"), "!"]); + } + + case "ListType": { + return concat$7(["[", 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$7([ + " ", + group$4( + indent$6( + concat$7([ + softline$5, + join$6( + concat$7([ifBreak$3("", " "), softline$5]), + path$$1.map(print, "directives") + ) + ]) + ) + ) + ]); +} + +function printSequence(sequencePath, options, print) { + const count = sequencePath.getValue().length; + + return sequencePath.map((path$$1, i) => { + const printed = print(path$$1); + + if ( + utilShared.isNextLineEmpty( + options.originalText, + path$$1.getValue(), + options + ) && + i < count - 1 + ) { + return concat$7([printed, hardline$6]); + } + + return printed; + }); +} + +function canAttachComment$1(node) { + return node.kind && node.kind !== "Comment"; +} + +function printComment$2(commentPath) { + const comment = commentPath.getValue(); + + switch (comment.kind) { + case "Comment": + return "#" + comment.value.trimRight(); + default: + throw new Error("Not a comment: " + JSON.stringify(comment)); + } +} + +function determineInterfaceSeparator(originalSource) { + const start = originalSource.indexOf("implements"); + if (start === -1) { + throw new Error("Must implement interfaces: " + originalSource); + } + let end = originalSource.indexOf("{"); + if (end === -1) { + end = originalSource.length; + } + return originalSource.substr(start, end).includes("&") ? " & " : ", "; +} + +var printerGraphql = { + print: genericPrint$2, + hasPrettierIgnore: util$1.hasIgnoreComment, + printComment: printComment$2, + canAttachComment: canAttachComment$1 +}; + +// format based on https://github.com/prettier/prettier/blob/master/src/common/support.js +var options$5 = { + bracketSpacing: options.bracketSpacing +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$3 = [ + { + name: "GraphQL", + since: "1.5.0", + parsers: ["graphql"], + extensions: [".graphql", ".gql"], + tmScope: "source.graphql", + aceMode: "text", + liguistLanguageId: 139, + vscodeLanguageIds: ["graphql"] + } +]; + +const parsers$3 = { + graphql: { + get parse() { + return require("./parser-graphql"); + }, + astFormat: "graphql", + locStart: function(node) { + if (typeof node.start === "number") { + return node.start; + } + return node.loc && node.loc.start; + }, + locEnd: function(node) { + if (typeof node.end === "number") { + return node.end; + } + return node.loc && node.loc.end; + } + } +}; + +const printers$3 = { + graphql: printerGraphql +}; + +var languageGraphql = { + languages: languages$3, + options: options$5, + parsers: parsers$3, + printers: printers$3 +}; + +const docBuilders$9 = doc.builders; +const hardline$8 = docBuilders$9.hardline; +const literalline$3 = docBuilders$9.literalline; +const concat$9 = docBuilders$9.concat; +const markAsRoot$1 = docBuilders$9.markAsRoot; + +function embed$2(path$$1, print, textToDoc, options) { + const 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) + const lang = node.lang.split(/\s/, 1)[0]; + const parser = getParserName(lang); + if (parser) { + const styleUnit = options.__inJsTemplate ? "~" : "`"; + const style = styleUnit.repeat( + Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1) + ); + const doc$$2 = textToDoc(node.value, { parser }); + return markAsRoot$1( + concat$9([ + style, + node.lang, + hardline$8, + replaceNewlinesWithLiterallines(doc$$2), + style + ]) + ); + } + } + + return null; + + function getParserName(lang) { + const supportInfo = support.getSupportInfo(null, { + plugins: options.plugins, + pluginsLoaded: true + }); + const language = supportInfo.languages.find( + language => + language.name.toLowerCase() === lang || + (language.extensions && + language.extensions.find(ext => ext.substring(1) === lang)) + ); + if (language) { + return language.parsers[0]; + } + + return null; + } + + function replaceNewlinesWithLiterallines(doc$$2) { + return docUtils.mapDoc( + doc$$2, + currentDoc => + typeof currentDoc === "string" && currentDoc.includes("\n") + ? concat$9( + currentDoc + .split(/(\n)/g) + .map((v, i) => (i % 2 === 0 ? v : literalline$3)) + ) + : currentDoc + ); + } +} + +var embed_1$2 = embed$2; + +var pragma$2 = createCommonjsModule(function (module) { +"use strict"; + +const pragmas = ["format", "prettier"]; + +function startWithPragma(text) { + const pragma = `@(${pragmas.join("|")})`; + const regex = new RegExp( + [ + ``, + `` + ].join("|"), + "m" + ); + const matched = text.match(regex); + return matched && matched.index === 0; +} + +function extract(text) { + // yaml (---) and toml (+++) + const matched = text.match( + /^((---|\+\+\+)(?:\n[\s\S]*?\n|\n)\2(?:\n|$))?([\s\S]*)/ + ); + const frontMatter = matched[1]; + const mainContent = matched[3]; + return { frontMatter, mainContent }; +} + +module.exports = { + startWithPragma, + hasPragma: text => startWithPragma(extract(text).mainContent.trimLeft()), + insertPragma: text => { + const extracted = extract(text); + const pragma = ``; + return extracted.frontMatter + ? `${extracted.frontMatter}\n\n${pragma}\n\n${extracted.mainContent}` + : `${pragma}\n\n${extracted.mainContent}`; + } +}; +}); + +const docBuilders$8 = doc.builders; +const concat$8 = docBuilders$8.concat; +const join$7 = docBuilders$8.join; +const line$5 = docBuilders$8.line; +const hardline$7 = docBuilders$8.hardline; +const softline$6 = docBuilders$8.softline; +const fill$4 = docBuilders$8.fill; +const align$2 = docBuilders$8.align; +const group$5 = docBuilders$8.group; +const printDocToString$2 = doc.printer.printDocToString; + +const SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"]; + +const SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"]; + +const INLINE_NODE_TYPES = [ + "inlineCode", + "emphasis", + "strong", + "delete", + "link", + "linkReference", + "image", + "imageReference", + "footnote", + "footnoteReference", + "sentence", + "whitespace", + "word", + "break" +]; + +const INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat([ + "tableCell", + "paragraph", + "heading" +]); + +function genericPrint$3(path$$1, options, print) { + const node = path$$1.getValue(); + + if (shouldRemainTheSameContent(path$$1)) { + return concat$8( + util$1 + .splitText( + options.originalText.slice( + node.position.start.offset, + node.position.end.offset + ) + ) + .map( + node => + node.type === "word" + ? node.value + : node.value === "" + ? "" + : printLine(path$$1, node.value, options) + ) + ); + } + + switch (node.type) { + case "root": + return concat$8([normalizeDoc(printRoot(path$$1, options, print)), hardline$7]); + 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 `*` + .replace( + new RegExp( + [ + `(^|[${util$1.punctuationCharRange}])(_+)`, + `(_+)([${util$1.punctuationCharRange}]|$)` + ].join("|"), + "g" + ), + (_, text1, underscore1, underscore2, text2) => + (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": { + const parentNode = path$$1.getParentNode(); + const index = parentNode.children.indexOf(node); + const nextNode = parentNode.children[index + 1]; + + const 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": { + const parentNode = path$$1.getParentNode(); + const index = parentNode.children.indexOf(node); + const prevNode = parentNode.children[index - 1]; + const nextNode = parentNode.children[index + 1]; + const 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); + const style = + hasPrevOrNextWord || getAncestorNode$1(path$$1, "emphasis") ? "*" : "_"; + return concat$8([style, printChildren(path$$1, options, print), style]); + } + case "strong": + return concat$8(["**", printChildren(path$$1, options, print), "**"]); + case "delete": + return concat$8(["~~", printChildren(path$$1, options, print), "~~"]); + case "inlineCode": { + const backtickCount = util$1.getMaxContinuousCount(node.value, "`"); + const style = backtickCount === 1 ? "``" : "`"; + const gap = backtickCount ? " " : ""; + return concat$8([style, gap, node.value, gap, style]); + } + case "link": + switch (options.originalText[node.position.start.offset]) { + case "<": + return concat$8(["<", node.url, ">"]); + case "[": + return concat$8([ + "[", + 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$8([ + "![", + node.alt || "", + "](", + printUrl(node.url, ")"), + printTitle(node.title, options), + ")" + ]); + case "blockquote": + return concat$8(["> ", align$2("> ", printChildren(path$$1, options, print))]); + case "heading": + return concat$8([ + "#".repeat(node.depth) + " ", + printChildren(path$$1, options, print) + ]); + case "code": { + if ( + // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it + /^\n?( {4,}|\t)/.test( + options.originalText.slice( + node.position.start.offset, + node.position.end.offset + ) + ) + ) { + // indented code block + const alignment = " ".repeat(4); + return align$2( + alignment, + concat$8([alignment, join$7(hardline$7, node.value.split("\n"))]) + ); + } + + // fenced code block + const styleUnit = options.__inJsTemplate ? "~" : "`"; + const style = styleUnit.repeat( + Math.max( + 3, + util$1.getMaxContinuousCount(node.value, styleUnit) + 1 + ) + ); + return concat$8([ + style, + node.lang || "", + hardline$7, + join$7(hardline$7, node.value.split("\n")), + hardline$7, + style + ]); + } + case "yaml": + case "toml": { + const style = node.type === "yaml" ? "---" : "+++"; + return node.value + ? concat$8([style, hardline$7, node.value, hardline$7, style]) + : concat$8([style, hardline$7, style]); + } + case "html": { + const parentNode = path$$1.getParentNode(); + return replaceNewlinesWithHardlines( + parentNode.type === "root" && + util$1.getLast(parentNode.children) === node + ? node.value.trimRight() + : node.value + ); + } + case "list": { + const nthSiblingIndex = getNthListSiblingIndex( + node, + path$$1.getParentNode() + ); + + const isGitDiffFriendlyOrderedList = + node.ordered && + node.children.length > 1 && + /^\s*1(\.|\))/.test( + options.originalText.slice( + node.children[1].position.start.offset, + node.children[1].position.end.offset + ) + ); + + return printChildren(path$$1, options, print, { + processor: (childPath, index) => { + const prefix = getPrefix(); + return concat$8([ + prefix, + align$2( + " ".repeat(prefix.length), + printListItem(childPath, options, print, prefix) + ) + ]); + + function getPrefix() { + const rawPrefix = node.ordered + ? (index === 0 + ? node.start + : isGitDiffFriendlyOrderedList + ? 1 + : node.start + index) + + (nthSiblingIndex % 2 === 0 ? ". " : ") ") + : nthSiblingIndex % 2 === 0 + ? "* " + : "- "; + + // do not print trailing spaces for empty list item since it might be treated as `break` node + // by [doc-printer](https://github.com/prettier/prettier/blob/1.10.2/src/doc/doc-printer.js#L395-L405), + // we don't want to preserve unnecessary trailing spaces. + const listItem = childPath.getValue(); + return listItem.children.length + ? alignListPrefix(rawPrefix, options) + : rawPrefix; + } + } + }); + } + case "thematicBreak": { + const counter = getAncestorCounter$1(path$$1, "list"); + if (counter === -1) { + return "---"; + } + const nthSiblingIndex = getNthListSiblingIndex( + path$$1.getParentNode(counter), + path$$1.getParentNode(counter + 1) + ); + return nthSiblingIndex % 2 === 0 ? "---" : "***"; + } + case "linkReference": + return concat$8([ + "[", + printChildren(path$$1, options, print), + "]", + node.referenceType === "full" + ? concat$8(["[", node.identifier, "]"]) + : node.referenceType === "collapsed" + ? "[]" + : "" + ]); + case "imageReference": + switch (node.referenceType) { + case "full": + return concat$8(["![", node.alt || "", "][", node.identifier, "]"]); + default: + return concat$8([ + "![", + node.alt, + "]", + node.referenceType === "collapsed" ? "[]" : "" + ]); + } + case "definition": + return concat$8([ + "[", + node.identifier, + "]: ", + printUrl(node.url), + printTitle(node.title, options) + ]); + case "footnote": + return concat$8(["[^", printChildren(path$$1, options, print), "]"]); + case "footnoteReference": + return concat$8(["[^", node.identifier, "]"]); + case "footnoteDefinition": { + const nextNode = path$$1.getParentNode().children[path$$1.getName() + 1]; + return concat$8([ + "[^", + node.identifier, + "]: ", + group$5( + concat$8([ + align$2( + " ".repeat(options.tabWidth), + printChildren(path$$1, options, print, { + processor: (childPath, index) => + index === 0 + ? group$5(concat$8([softline$6, softline$6, childPath.call(print)])) + : childPath.call(print) + }) + ), + nextNode && nextNode.type === "footnoteDefinition" ? softline$6 : "" + ]) + ) + ]); + } + case "table": + return printTable(path$$1, options, print); + case "tableCell": + return printChildren(path$$1, options, print); + case "break": + return concat$8([ + /\s/.test(options.originalText[node.position.start.offset]) + ? " " + : "\\", + hardline$7 + ]); + 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) { + const node = path$$1.getValue(); + const prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] "; + return concat$8([ + prefix, + printChildren(path$$1, options, print, { + processor: (childPath, index) => { + if (index === 0 && childPath.getValue().type !== "list") { + return align$2(" ".repeat(prefix.length), childPath.call(print)); + } + + const alignment = " ".repeat( + clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block + ); + return concat$8([alignment, align$2(alignment, childPath.call(print))]); + } + }) + ]); +} + +function alignListPrefix(prefix, options) { + const additionalSpaces = getAdditionalSpaces(); + return ( + prefix + + " ".repeat( + additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block + ) + ); + + function getAdditionalSpaces() { + const restSpaces = prefix.length % options.tabWidth; + return restSpaces === 0 ? 0 : options.tabWidth - restSpaces; + } +} + +function getNthListSiblingIndex(node, parentNode) { + return getNthSiblingIndex( + node, + parentNode, + siblingNode => siblingNode.ordered === node.ordered + ); +} + +function replaceNewlinesWithHardlines(str) { + return join$7(hardline$7, str.split("\n")); +} + +function getNthSiblingIndex(node, parentNode, condition) { + condition = condition || (() => true); + + let index = -1; + + for (const childNode of parentNode.children) { + if (childNode.type === node.type && condition(childNode)) { + index++; + } else { + index = -1; + } + + if (childNode === node) { + return index; + } + } +} + +function getAncestorCounter$1(path$$1, typeOrTypes) { + const types = [].concat(typeOrTypes); + + let counter = -1; + let ancestorNode; + + while ((ancestorNode = path$$1.getParentNode(++counter))) { + if (types.indexOf(ancestorNode.type) !== -1) { + return counter; + } + } + + return -1; +} + +function getAncestorNode$1(path$$1, typeOrTypes) { + const 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$7; + } + + const isBreakable = + options.proseWrap === "always" && + !getAncestorNode$1(path$$1, SINGLE_LINE_NODE_TYPES); + return value !== "" + ? isBreakable + ? line$5 + : " " + : isBreakable + ? softline$6 + : ""; +} + +function printTable(path$$1, options, print) { + const node = path$$1.getValue(); + const contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } } + + path$$1.map(rowPath => { + const rowContents = []; + + rowPath.map(cellPath => { + rowContents.push( + printDocToString$2(cellPath.call(print), options).formatted + ); + }, "children"); + + contents.push(rowContents); + }, "children"); + + const columnMaxWidths = contents.reduce( + (currentWidths, rowContents) => + currentWidths.map((width, columnIndex) => + Math.max(width, util$1.getStringWidth(rowContents[columnIndex])) + ), + contents[0].map(() => 3) // minimum width = 3 (---, :--, :-:, --:) + ); + + return join$7(hardline$7, [ + printRow(contents[0]), + printSeparator(), + join$7(hardline$7, contents.slice(1).map(printRow)) + ]); + + function printSeparator() { + return concat$8([ + "| ", + join$7( + " | ", + columnMaxWidths.map((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$8([ + "| ", + join$7( + " | ", + rowContents.map((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$8([text, " ".repeat(width - util$1.getStringWidth(text))]); + } + + function alignRight(text, width) { + return concat$8([" ".repeat(width - util$1.getStringWidth(text)), text]); + } + + function alignCenter(text, width) { + const spaces = width - util$1.getStringWidth(text); + const left = Math.floor(spaces / 2); + const right = spaces - left; + return concat$8([" ".repeat(left), text, " ".repeat(right)]); + } +} + +function printRoot(path$$1, options, print) { + /** @typedef {{ index: number, offset: number }} IgnorePosition */ + /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */ + const ignoreRanges = []; + + /** @type {IgnorePosition | null} */ + let ignoreStart = null; + + const children = path$$1.getValue().children; + children.forEach((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: (childPath, index) => { + if (ignoreRanges.length !== 0) { + const ignoreRange = ignoreRanges[0]; + + if (index === ignoreRange.start.index) { + return concat$8([ + 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) { + events = events || {}; + + const postprocessor = events.postprocessor || concat$8; + const processor = events.processor || (childPath => childPath.call(print)); + + const node = path$$1.getValue(); + const parts = []; + + let lastChildNode; + + path$$1.map((childPath, index) => { + const childNode = childPath.getValue(); + + const result = processor(childPath, index); + if (result !== false) { + const data = { + parts, + prevNode: lastChildNode, + parentNode: node, + options + }; + + if (!shouldNotPrePrintHardline(childNode, data)) { + parts.push(hardline$7); + + if ( + shouldPrePrintDoubleHardline(childNode, data) || + shouldPrePrintTripleHardline(childNode, data) + ) { + parts.push(hardline$7); + } + + if (shouldPrePrintTripleHardline(childNode, data)) { + parts.push(hardline$7); + } + } + + parts.push(result); + + lastChildNode = childNode; + } + }, "children"); + + return postprocessor(parts); +} + +/** @return {false | 'next' | 'start' | 'end'} */ +function isPrettierIgnore(node) { + if (node.type !== "html") { + return false; + } + const match = node.value.match( + /^$/ + ); + return match === null ? false : match[1] ? match[1] : "next"; +} + +function shouldNotPrePrintHardline(node, data) { + const isFirstNode = data.parts.length === 0; + const isInlineNode = INLINE_NODE_TYPES.indexOf(node.type) !== -1; + + const isInlineHTML = + node.type === "html" && + INLINE_NODE_WRAPPER_TYPES.indexOf(data.parentNode.type) !== -1; + + return isFirstNode || isInlineNode || isInlineHTML; +} + +function shouldPrePrintDoubleHardline(node, data) { + const isSequence = (data.prevNode && data.prevNode.type) === node.type; + const isSiblingNode = + isSequence && SIBLING_NODE_TYPES.indexOf(node.type) !== -1; + + const isInTightListItem = + data.parentNode.type === "listItem" && !data.parentNode.loose; + + const isPrevNodeLooseListItem = + data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose; + + const isPrevNodePrettierIgnore = isPrettierIgnore(data.prevNode) === "next"; + + return ( + isPrevNodeLooseListItem || + !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore) + ); +} + +function shouldPrePrintTripleHardline(node, data) { + const isPrevNodeList = data.prevNode && data.prevNode.type === "list"; + const isIndentedCode = + node.type === "code" && + /\s/.test(data.options.originalText[node.position.start.offset]); + + return isPrevNodeList && isIndentedCode; +} + +function shouldRemainTheSameContent(path$$1) { + const ancestorNode = getAncestorNode$1(path$$1, [ + "linkReference", + "imageReference" + ]); + + return ( + ancestorNode && + (ancestorNode.type !== "linkReference" || + ancestorNode.referenceType !== "full") + ); +} + +function normalizeDoc(doc$$2) { + return docUtils.mapDoc(doc$$2, currentDoc => { + if (!currentDoc.parts) { + return currentDoc; + } + + if (currentDoc.type === "concat" && currentDoc.parts.length === 1) { + return currentDoc.parts[0]; + } + + const parts = []; + + currentDoc.parts.forEach(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$$1, dangerousCharOrChars) { + const dangerousChars = [" "].concat(dangerousCharOrChars || []); + return new RegExp(dangerousChars.map(x => `\\${x}`).join("|")).test(url$$1) + ? `<${url$$1}>` + : url$$1; +} + +function printTitle(title, options) { + if (!title) { + return ""; + } + if (title.includes('"') && title.includes("'") && !title.includes(")")) { + return ` (${title})`; // avoid escaped quotes + } + // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split + const singleCount = title.split("'").length - 1; + const doubleCount = title.split('"').length - 1; + const 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((current, part) => { + const 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$5(ast, newObj, parent) { + // for codeblock + if (ast.type === "code") { + delete newObj.value; + } + // for whitespace: "\n" and " " are considered the same + if (ast.type === "whitespace" && ast.value === "\n") { + newObj.value = " "; + } + // for insert pragma + if ( + parent && + parent.type === "root" && + (parent.children[0] === ast || + ((parent.children[0].type === "yaml" || + parent.children[0].type === "toml") && + parent.children[1] === ast)) && + ast.type === "html" && + pragma$2.startWithPragma(ast.value) + ) { + return null; + } +} + +function hasPrettierIgnore$1(path$$1) { + const index = +path$$1.getName(); + + if (index === 0) { + return false; + } + + const prevNode = path$$1.getParentNode().children[index - 1]; + return isPrettierIgnore(prevNode) === "next"; +} + +var printerMarkdown = { + print: genericPrint$3, + embed: embed_1$2, + massageAstNode: clean$5, + hasPrettierIgnore: hasPrettierIgnore$1, + insertPragma: pragma$2.insertPragma +}; + +const CATEGORY_MARKDOWN = "Markdown"; + +// format based on https://github.com/prettier/prettier/blob/master/src/common/support.js +var options$8 = { + proseWrap: { + since: "1.8.2", + category: CATEGORY_MARKDOWN, + type: "choice", + default: [ + { since: "1.8.2", value: true }, + { since: "1.9.0", value: "preserve" } + ], + description: "How to wrap prose. (markdown)", + 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" } + ] + }, + singleQuote: options.singleQuote +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$4 = [ + { + name: "Markdown", + since: "1.8.0", + parsers: ["remark"], + aliases: ["pandoc"], + aceMode: "markdown", + codemirrorMode: "gfm", + codemirrorMimeType: "text/x-gfm", + wrap: true, + extensions: [ + ".md", + ".markdown", + ".mdown", + ".mdwn", + ".mkd", + ".mkdn", + ".mkdown", + ".ron", + ".workbook" + ], + filenames: ["README"], + tmScope: "source.gfm", + linguistLanguageId: 222, + vscodeLanguageIds: ["markdown"] + } +]; + +const remark = { + get parse() { + return require("./parser-markdown"); + }, + astFormat: "mdast", + hasPragma: pragma$2.hasPragma, + locStart: node => node.position.start.offset, + locEnd: node => node.position.end.offset +}; + +const parsers$4 = { + remark, + // TODO: Delete this in 2.0 + markdown: remark +}; + +const printers$4 = { + mdast: printerMarkdown +}; + +var languageMarkdown = { + languages: languages$4, + options: options$8, + parsers: parsers$4, + printers: printers$4 +}; + +const docUtils$5 = doc.utils; +const docBuilders$11 = doc.builders; +const hardline$10 = docBuilders$11.hardline; +const concat$11 = docBuilders$11.concat; + +function embed$4(path$$1, print, textToDoc, options) { + const node = path$$1.getValue(); + + switch (node.type) { + case "text": { + const parent = path$$1.getParentNode(); + // Inline JavaScript + if ( + parent.type === "script" && + ((!parent.attribs.lang && !parent.attribs.lang) || + parent.attribs.type === "text/javascript" || + parent.attribs.type === "application/javascript") + ) { + const parser = options.parser === "flow" ? "flow" : "babylon"; + const doc$$2 = textToDoc(getText(options, node), { parser }); + return concat$11([hardline$10, doc$$2]); + } + + // Inline TypeScript + if ( + parent.type === "script" && + (parent.attribs.type === "application/x-typescript" || + parent.attribs.lang === "ts") + ) { + const doc$$2 = textToDoc( + getText(options, node), + { parser: "typescript" }, + options + ); + return concat$11([hardline$10, doc$$2]); + } + + // Inline Styles + if (parent.type === "style") { + const doc$$2 = textToDoc(getText(options, node), { parser: "css" }); + return concat$11([hardline$10, docUtils$5.stripTrailingHardline(doc$$2)]); + } + + break; + } + + case "attribute": { + /* + * Vue binding sytax: JS expressions + * :class="{ 'some-key': value }" + * v-bind:id="'list-' + id" + * v-if="foo && !bar" + * @click="someFunction()" + */ + if (/(^@)|(^v-)|:/.test(node.key) && !/^\w+$/.test(node.value)) { + const doc$$2 = textToDoc(node.value, { + parser: parseJavaScriptExpression, + // Use singleQuote since HTML attributes use double-quotes. + // TODO(azz): We still need to do an entity escape on the attribute. + singleQuote: true + }); + return concat$11([ + node.key, + '="', + util$1.hasNewlineInRange(node.value, 0, node.value.length) + ? doc$$2 + : docUtils$5.removeLines(doc$$2), + '"' + ]); + } + } + } +} + +function parseJavaScriptExpression(text, parsers) { + // Force parsing as an expression + const ast = parsers.babylon(`(${text})`); + // Extract expression from the declaration + return { + type: "File", + program: ast.program.body[0].expression + }; +} + +function getText(options, node) { + return options.originalText.slice( + options.locStart(node), + options.locEnd(node) + ); +} + +var embed_1$4 = embed$4; + +const docBuilders$10 = doc.builders; +const concat$10 = docBuilders$10.concat; +const join$8 = docBuilders$10.join; +const hardline$9 = docBuilders$10.hardline; +const line$6 = docBuilders$10.line; +const softline$7 = docBuilders$10.softline; +const group$6 = docBuilders$10.group; +const indent$7 = docBuilders$10.indent; + +// http://w3c.github.io/html/single-page.html#void-elements +const voidTags$1 = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true +}; + +function genericPrint$4(path$$1, options, print) { + const n = path$$1.getValue(); + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + switch (n.type) { + case "root": { + return printChildren$1(path$$1, print); + } + case "directive": { + return concat$10(["<", n.data, ">", hardline$9]); + } + case "text": { + return n.data.replace(/\s+/g, " ").trim(); + } + case "script": + case "style": + case "tag": { + const selfClose = voidTags$1[n.name] ? ">" : " />"; + const children = printChildren$1(path$$1, print); + + const hasNewline = util$1.hasNewlineInRange( + options.originalText, + options.locStart(n), + options.locEnd(n) + ); + + return group$6( + concat$10([ + hasNewline ? hardline$9 : "", + "<", + n.name, + printAttributes(path$$1, print), + + n.children.length ? ">" : selfClose, + + n.name.toLowerCase() === "html" + ? concat$10([hardline$9, children]) + : indent$7(children), + n.children.length ? concat$10([softline$7, ""]) : hardline$9 + ]) + ); + } + case "comment": { + return concat$10([""]); + } + case "attribute": { + if (!n.value) { + return n.key; + } + return concat$10([n.key, '="', n.value, '"']); + } + + default: + /* istanbul ignore next */ + throw new Error("unknown htmlparser2 type: " + n.type); + } +} + +function printAttributes(path$$1, print) { + const node = path$$1.getValue(); + + return concat$10([ + node.attributes.length ? " " : "", + indent$7(join$8(line$6, path$$1.map(print, "attributes"))) + ]); +} + +function printChildren$1(path$$1, print) { + const children = []; + path$$1.each(childPath => { + const child = childPath.getValue(); + if (child.type !== "text") { + children.push(hardline$9); + } + children.push(childPath.call(print)); + }, "children"); + return concat$10(children); +} + +var printerHtmlparser2 = { + print: genericPrint$4, + embed: embed_1$4, + hasPrettierIgnore: util$1.hasIgnoreComment +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$5 = [ + { + name: "HTML", + since: null, // unreleased + parsers: ["parse5"], + group: "HTML", + tmScope: "text.html.basic", + aceMode: "html", + codemirrorMode: "htmlmixed", + codemirrorMimeType: "text/html", + aliases: ["xhtml"], + extensions: [".html", ".htm", ".html.hl", ".inc", ".st", ".xht", ".xhtml"], + linguistLanguageId: 146, + vscodeLanguageIds: ["html"] + } +]; + +const parsers$5 = { + parse5: { + get parse() { + return require("./parser-parse5"); + }, + astFormat: "htmlparser2", + locEnd: function(node) { + return node.__location && node.__location.endOffset; + }, + locStart: function(node) { + return node.__location && node.__location.startOffset; + } + } +}; + +const printers$5 = { + htmlparser2: printerHtmlparser2 +}; + +var languageHtml = { + languages: languages$5, + parsers: parsers$5, + printers: printers$5 +}; + +const docBuilders$13 = doc.builders; +const concat$13 = docBuilders$13.concat; +const hardline$12 = docBuilders$13.hardline; + +function embed$6(path$$1, print, textToDoc, options) { + const node = path$$1.getValue(); + const parent = path$$1.getParentNode(); + if (!parent || parent.tag !== "root" || node.unary) { + return null; + } + + let parser; + + if (node.tag === "style") { + const langAttr = node.attrs.find(attr => attr.name === "lang"); + if (!langAttr || langAttr.value === "postcss") { + parser = "css"; + } else if (langAttr.value === "scss") { + parser = "scss"; + } else if (langAttr.value === "less") { + parser = "less"; + } + } + + if (node.tag === "script") { + const langAttr = node.attrs.find(attr => attr.name === "lang"); + if (!langAttr) { + parser = "babylon"; + } else if (langAttr.value === "ts" || langAttr.value === "tsx") { + parser = "typescript"; + } + } + + if (!parser) { + return null; + } + + return concat$13([ + options.originalText.slice(node.start, node.contentStart), + hardline$12, + textToDoc(options.originalText.slice(node.contentStart, node.contentEnd), { + parser + }), + options.originalText.slice(node.contentEnd, node.end) + ]); +} + +var embed_1$6 = embed$6; + +const docBuilders$12 = doc.builders; +const concat$12 = docBuilders$12.concat; +const hardline$11 = docBuilders$12.hardline; + +function genericPrint$5(path$$1, options, print) { + const n = path$$1.getValue(); + const res = []; + let index = n.start; + + path$$1.each(childPath => { + const child = childPath.getValue(); + res.push(options.originalText.slice(index, child.start)); + res.push(childPath.call(print)); + index = child.end; + }, "children"); + + // If there are no children, we just print the node from start to end. + // Otherwise, index should point to the end of the last child, and we + // need to print the closing tag. + res.push(options.originalText.slice(index, n.end)); + + // Only force a trailing newline if there were any contents. + if (n.tag === "root" && n.children.length) { + res.push(hardline$11); + } + + return concat$12(res); +} + +const clean$6 = (ast, newObj) => { + delete newObj.contentStart; + delete newObj.contentEnd; +}; + +var printerVue = { + print: genericPrint$5, + embed: embed_1$6, + massageAstNode: clean$6 +}; + +// Based on: +// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml + +const languages$6 = [ + { + name: "Vue", + since: "1.10.0", + parsers: ["vue"], + group: "HTML", + tmScope: "text.html.vue", + aceMode: "html", + codemirrorMode: "htmlmixed", + codemirrorMimeType: "text/html", + extensions: [".vue"], + linguistLanguageId: 146, + vscodeLanguageIds: ["vue"] + } +]; + +const parsers$6 = { + vue: { + get parse() { + return require("./parser-vue"); + }, + astFormat: "vue" + } +}; + +const printers$6 = { + vue: printerVue +}; + +var languageVue = { + languages: languages$6, + parsers: parsers$6, + printers: printers$6 +}; + +function loadPlugins(plugins) { + plugins = plugins || []; + + const internalPlugins = [ + languageJs, + languageCss, + languageHandlebars, + languageGraphql, + languageMarkdown, + languageHtml, + languageVue + ]; + + const externalPlugins = plugins + .concat( + getPluginsFromPackage( + readPkgUp.sync({ + normalize: false + }).pkg + ) + ) + .map(plugin => { + if (typeof plugin !== "string") { + return plugin; + } + + const pluginPath = resolve.sync(plugin, { basedir: process.cwd() }); + return Object.assign({ name: plugin }, require(pluginPath)); + }); + + return deduplicate(internalPlugins.concat(externalPlugins)); +} + +function getPluginsFromPackage(pkg) { + if (!pkg) { + return []; + } + const deps = Object.assign({}, pkg.dependencies, pkg.devDependencies); + return Object.keys(deps).filter( + dep => + dep.startsWith("prettier-plugin-") || dep.startsWith("@prettier/plugin-") + ); +} + +function deduplicate(items) { + const uniqItems = []; + for (const item of items) { + if (uniqItems.indexOf(item) < 0) { + uniqItems.push(item); + } + } + return uniqItems; +} + +var loadPlugins_1 = loadPlugins; + +const CATEGORY_CONFIG = "Config"; +const CATEGORY_EDITOR = "Editor"; +const CATEGORY_FORMAT = "Format"; +const CATEGORY_OTHER = "Other"; +const CATEGORY_OUTPUT = "Output"; + +const categoryOrder = [ + CATEGORY_OUTPUT, + CATEGORY_FORMAT, + CATEGORY_CONFIG, + CATEGORY_EDITOR, + 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. + */ +const options$11 = { + 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: CATEGORY_CONFIG, + description: + "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).", + oppositeDescription: "Do not look for a configuration file." + }, + "config-precedence": { + type: "choice", + category: 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-check": { + type: "boolean" + }, + "debug-print-doc": { + type: "boolean" + }, + editorconfig: { + type: "boolean", + category: 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: CATEGORY_CONFIG, + description: + "Find and print the path to a configuration file for the given input file." + }, + help: { + type: "flag", + alias: "h", + description: dedent_1` + Show CLI usage, or details about the given flag. + Example: --help write + ` + }, + "ignore-path": { + type: "path", + category: CATEGORY_CONFIG, + default: ".prettierignore", + description: "Path to a file with patterns describing files to ignore." + }, + "list-different": { + type: "boolean", + category: 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: CATEGORY_CONFIG, + description: "Process files inside 'node_modules' directory." + }, + write: { + type: "boolean", + category: CATEGORY_OUTPUT, + description: "Edit files in-place. (Beware!)" + } +}; + +const 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 = { + CATEGORY_CONFIG, + CATEGORY_EDITOR, + CATEGORY_FORMAT, + CATEGORY_OTHER, + CATEGORY_OUTPUT, + categoryOrder, + options: options$11, + usageSummary +}; + +var require$$0$11 = ( _package$1 && _package ) || _package$1; + +const currentVersion = require$$0$11.version; + + + +const CATEGORY_GLOBAL = "Global"; +const 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 } */ +const supportOptions = { + 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: constant.CATEGORY_EDITOR + }, + filepath: { + since: "1.4.0", + category: CATEGORY_SPECIAL, + type: "path", + default: undefined, + description: + "Specify the input filepath. This will be used to do parser inference.", + cliName: "stdin-filepath", + cliCategory: constant.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: constant.CATEGORY_OTHER + }, + parser: { + since: "0.0.10", + category: CATEGORY_GLOBAL, + type: "choice", + default: "babylon", + description: "Which parser to use.", + exception: value => + 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: "graphql", since: "1.5.0", description: "GraphQL" }, + { value: "markdown", since: "1.8.0", description: "Markdown" }, + { value: "vue", since: "1.10.0", description: "Vue" } + ] + }, + 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: value => typeof value === "string" || typeof value === "object", + cliName: "plugin", + cliCategory: constant.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: constant.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: constant.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: constant.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: false, + 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." + } +}; + +function getSupportInfo$1(version, opts) { + opts = Object.assign( + { + plugins: [], + pluginsLoaded: false, + showUnreleased: false, + showDeprecated: false, + showInternal: false + }, + opts + ); + + if (!version) { + version = currentVersion; + } + + const plugins = opts.pluginsLoaded ? opts.plugins : loadPlugins_1(opts.plugins); + + const options = util$1 + .arrayify( + Object.assign( + plugins.reduce( + (currentOptions, plugin) => + Object.assign(currentOptions, plugin.options), + {} + ), + supportOptions + ), + "name" + ) + .sort((a, b) => (a.name === b.name ? 0 : a.name < b.name ? -1 : 1)) + .filter(filterSince) + .filter(filterDeprecated) + .map(mapDeprecated) + .map(mapInternal) + .map(option => { + const newOption = Object.assign({}, option); + + if (Array.isArray(newOption.default)) { + newOption.default = + newOption.default.length === 1 + ? newOption.default[0].value + : newOption.default + .filter(filterSince) + .sort((info1, info2) => + 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(option => { + const filteredPlugins = plugins.filter( + plugin => plugin.defaultOptions && plugin.defaultOptions[option.name] + ); + const pluginDefaults = filteredPlugins.reduce((reduced, plugin) => { + reduced[plugin.name] = plugin.defaultOptions[option.name]; + return reduced; + }, {}); + return Object.assign(option, { pluginDefaults }); + }); + + const usePostCssParser = semver.lt(version, "1.7.1"); + + const languages = plugins + .reduce((all, plugin) => all.concat(plugin.languages), []) + .filter( + language => + language.since + ? semver.gte(version, language.since) + : language.since !== null + ) + .map(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.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; + } + const newObject = Object.assign({}, object); + delete newObject.deprecated; + delete newObject.redirect; + return newObject; + } + function mapInternal(object) { + if (opts.showInternal) { + return object; + } + const newObject = Object.assign({}, object); + delete newObject.cliName; + delete newObject.cliCategory; + delete newObject.cliDescription; + return newObject; + } +} + +var support = { + getSupportInfo: getSupportInfo$1 +}; + +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() { + const s = this.stack; + const 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() { + const s = this.stack; + return s[s.length - 1]; +}; + +function getNodeHelper(path$$1, count) { + const s = path$$1.stack; + + for (let i = s.length - 1; i >= 0; i -= 2) { + const 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, ... */) { + const s = this.stack; + const origLen = s.length; + let value = s[origLen - 1]; + const argc = arguments.length; + for (let i = 1; i < argc; ++i) { + const name = arguments[i]; + value = value[name]; + s.push(name, value); + } + const 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, ... */) { + const s = this.stack; + const origLen = s.length; + let value = s[origLen - 1]; + const argc = arguments.length; + + for (let i = 1; i < argc; ++i) { + const name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + for (let 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, ... */) { + const s = this.stack; + const origLen = s.length; + let value = s[origLen - 1]; + const argc = arguments.length; + + for (let i = 1; i < argc; ++i) { + const name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + const result = new Array(value.length); + + for (let i = 0; i < value.length; ++i) { + if (i in value) { + s.push(i, value[i]); + result[i] = callback(this, i); + s.length -= 2; + } + } + + s.length = origLen; + + return result; +}; + +var fastPath = FastPath; + +/* eslint-disable no-nested-ternary */ +var arr = []; +var charCodeCache = []; + +var leven = function (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; +}; + +function apiDescriptor(name, value) { + return arguments.length === 1 + ? JSON.stringify(name) + : `\`{ ${apiDescriptor(name)}: ${JSON.stringify(value)} }\``; +} + +function cliDescriptor(name, value) { + return value === false + ? `\`--no-${name}\`` + : value === true || arguments.length === 1 + ? `\`--${name}\`` + : value === "" + ? `\`--${name}\` without an argument` + : `\`--${name}=${value}\``; +} + +var optionsDescriptor = { + apiDescriptor, + cliDescriptor +}; + +function validateOption(value, optionInfo, opts) { + opts = opts || {}; + const descriptor = opts.descriptor || optionsDescriptor.apiDescriptor; + + if ( + typeof optionInfo.exception === "function" && + optionInfo.exception(value) + ) { + return; + } + + try { + validateOptionType(value, optionInfo); + } catch (error) { + throw new Error( + `Invalid \`${descriptor(optionInfo.name)}\` value. ${ + error.message + }, but received \`${JSON.stringify(value)}\`.` + ); + } +} + +function validateOptionType(value, optionInfo) { + if (optionInfo.array) { + if (!Array.isArray(value)) { + throw new Error(`Expected an array`); + } + value.forEach(v => + validateOptionType(v, Object.assign({}, optionInfo, { array: false })) + ); + } else { + switch (optionInfo.type) { + case "int": + validateIntOption(value); + break; + case "boolean": + validateBooleanOption(value); + break; + case "choice": + validateChoiceOption(value, optionInfo.choices); + break; + } + } +} + +function validateBooleanOption(value) { + if (typeof value !== "boolean") { + throw new Error(`Expected a boolean`); + } +} + +function validateIntOption(value) { + if ( + !( + typeof value === "number" && + Math.floor(value) === value && + value >= 0 && + value !== Infinity + ) + ) { + throw new Error(`Expected an integer`); + } +} + +function validateChoiceOption(value, choiceInfos) { + if (!choiceInfos.some(choiceInfo => choiceInfo.value === value)) { + const choices = choiceInfos + .filter(choiceInfo => !choiceInfo.deprecated) + .map(choiceInfo => JSON.stringify(choiceInfo.value)) + .sort(); + const head = choices.slice(0, -2); + const tail = choices.slice(-2); + throw new Error(`Expected ${head.concat(tail.join(" or ")).join(", ")}`); + } +} + +var optionsValidator = { validateOption }; + +function normalizeOptions$1(options, optionInfos, opts) { + opts = opts || {}; + const logger = + opts.logger === false + ? { warn() {} } + : opts.logger !== undefined + ? opts.logger + : console; + const descriptor = opts.descriptor || optionsDescriptor.apiDescriptor; + const passThrough = opts.passThrough || []; + + const optionInfoMap = optionInfos.reduce( + (reduced, optionInfo) => + Object.assign(reduced, { [optionInfo.name]: optionInfo }), + {} + ); + const normalizedOptions = Object.keys(options).reduce((newOptions, key) => { + const optionInfo = optionInfoMap[key]; + + let optionName = key; + let optionValue = options[key]; + + if (!optionInfo) { + if (passThrough === true || passThrough.indexOf(optionName) !== -1) { + newOptions[optionName] = optionValue; + } else { + logger.warn( + createUnknownOptionMessage( + optionName, + optionValue, + optionInfos, + descriptor + ) + ); + } + return newOptions; + } + + if (!optionInfo.deprecated) { + optionValue = normalizeOption(optionValue, optionInfo); + } else if (typeof optionInfo.redirect === "string") { + logger.warn(createRedirectOptionMessage(optionInfo, descriptor)); + optionName = optionInfo.redirect; + } else if (optionValue) { + logger.warn(createRedirectOptionMessage(optionInfo, descriptor)); + optionValue = optionInfo.redirect.value; + optionName = optionInfo.redirect.option; + } + + if (optionInfo.choices) { + const choiceInfo = optionInfo.choices.find( + choice => choice.value === optionValue + ); + if (choiceInfo && choiceInfo.deprecated) { + logger.warn( + createRedirectChoiceMessage(optionInfo, choiceInfo, descriptor) + ); + optionValue = choiceInfo.redirect; + } + } + + if (optionInfo.array && !Array.isArray(optionValue)) { + optionValue = [optionValue]; + } + + if (optionValue !== optionInfo.default) { + optionsValidator.validateOption(optionValue, optionInfoMap[optionName], { + descriptor + }); + } + + newOptions[optionName] = optionValue; + return newOptions; + }, {}); + + return normalizedOptions; +} + +function normalizeOption(option, optionInfo) { + return optionInfo.type === "int" ? Number(option) : option; +} + +function createUnknownOptionMessage(key, value, optionInfos, descriptor) { + const messages = [`Ignored unknown option ${descriptor(key, value)}.`]; + + const suggestedOptionInfo = optionInfos.find( + optionInfo => leven(optionInfo.name, key) < 3 + ); + if (suggestedOptionInfo) { + messages.push(`Did you mean ${JSON.stringify(suggestedOptionInfo.name)}?`); + } + + return messages.join(" "); +} + +function createRedirectOptionMessage(optionInfo, descriptor) { + return `${descriptor( + optionInfo.name + )} is deprecated. Prettier now treats it as ${ + typeof optionInfo.redirect === "string" + ? descriptor(optionInfo.redirect) + : descriptor(optionInfo.redirect.option, optionInfo.redirect.value) + }.`; +} + +function createRedirectChoiceMessage(optionInfo, choiceInfo, descriptor) { + return `${descriptor( + optionInfo.name, + choiceInfo.value + )} is deprecated. Prettier now treats it as ${descriptor( + optionInfo.name, + choiceInfo.redirect + )}.`; +} + +function normalizeApiOptions(options, optionInfos, opts) { + return normalizeOptions$1( + options, + optionInfos, + Object.assign({ descriptor: optionsDescriptor.apiDescriptor }, opts) + ); +} + +function normalizeCliOptions(options, optionInfos, opts) { + const args = options["_"] || []; + + const newOptions = normalizeOptions$1( + Object.keys(options).reduce( + (reduced, key) => + Object.assign( + reduced, + key.length === 1 // omit alias + ? null + : { [key]: options[key] } + ), + {} + ), + optionInfos, + Object.assign({ descriptor: optionsDescriptor.cliDescriptor }, opts) + ); + newOptions["_"] = args; + + return newOptions; +} + +var optionsNormalizer = { + normalizeApiOptions, + normalizeCliOptions +}; + +class ConfigError$1 extends Error {} +class DebugError extends Error {} + +var errors = { + ConfigError: ConfigError$1, + DebugError +}; + +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 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 (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 (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 (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'; + + +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +function assembleStyles() { + const 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; + + Object.keys(styles).forEach(groupName => { + const group = styles[groupName]; + + Object.keys(group).forEach(styleName => { + const style = group[styleName]; + + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + const rgb2rgb = (r, g, b) => [r, g, b]; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = {}; + styles.color.ansi256 = {}; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + + styles.bgColor.ansi = {}; + styles.bgColor.ansi256 = {}; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + for (const key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } + + const suite = colorConvert[key]; + + 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; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); +}); + +var hasFlag = function (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 = createCommonjsModule(function (module) { +'use strict'; + + + +const env = process.env; + +const support = level => { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +}; + +let supportLevel = (() => { + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('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. + const osRelease = os.release().split('.'); + if ( + Number(process.version.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return 2; + } + + return 1; + } + + if ('CI' in env) { + if ('TRAVIS' in env || env.CI === 'Travis' || 'CIRCLECI' in env) { + 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) { + const 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 (/^(screen|xterm)-256(?:color)?/.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|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 = createCommonjsModule(function (module) { +'use strict'; +const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; +const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; +const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; +const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + +const 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) { + const results = []; + const chunks = args.trim().split(/\s*,\s*/g); + let matches; + + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if ((matches = chunk.match(STRING_REGEX))) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + + return results; +} + +function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + + const results = []; + let matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; +} + +function buildStyle(chalk, styles) { + const enabled = {}; + + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + + let current = chalk; + for (const styleName of Object.keys(enabled)) { + 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 = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + + // eslint-disable-next-line max-params + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + const 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) { + const 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'; + + + + + + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = supportsColor ? supportsColor.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) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const 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'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const 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 + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let 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. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // 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 + 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(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let 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 = supportsColor; +module.exports.default = module.exports; // For TypeScript +}); + +var lib$5 = createCommonjsModule(function (module, exports) { +"use strict"; + +exports.__esModule = true; +exports.shouldHighlight = shouldHighlight; +exports.getChalk = getChalk; +exports.default = highlight; + +var _jsTokens = _interopRequireWildcard(jsTokens); + +var _esutils = _interopRequireDefault(utils$2); + +var _chalk = _interopRequireDefault(chalk); + +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$$1) { + return { + keyword: chalk$$1.cyan, + capitalized: chalk$$1.yellow, + jsx_tag: chalk$$1.yellow, + punctuator: chalk$$1.yellow, + number: chalk$$1.magenta, + string: chalk$$1.green, + regex: chalk$$1.magenta, + comment: chalk$$1.grey, + invalid: chalk$$1.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 deprecationError = new Error("Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."); + deprecationError.name = "DeprecationWarning"; + + if (process.emitWarning) { + process.emitWarning(deprecationError); + } else { + console.warn(deprecationError); + } + } + + colNumber = Math.max(colNumber, 0); + var location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); +} +}); + +unwrapExports(lib$4); + +const ConfigError = errors.ConfigError; + + +const locStart$1 = languageJs.locStart; +const locEnd$1 = languageJs.locEnd; + +function getParsers(options) { + return options.plugins.reduce( + (parsers, plugin) => Object.assign({}, parsers, plugin.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$1, + locEnd: locEnd$1 + }; + } + + 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$1, + locEnd: locEnd$1 + }; + } catch (err) { + /* istanbul ignore next */ + throw new ConfigError(`Couldn't resolve parser "${opts.parser}"`); + } + } + /* istanbul ignore next */ + return parsers.babylon; +} + +function parse$3(text, opts) { + const parsers = getParsers(opts); + + // Copy the "parse" function from parser to a new object whose values are + // functions. Use defineProperty()/getOwnPropertyDescriptor() such that we + // don't invoke the parser.parse getters. + const parsersForCustomParserApi = Object.keys(parsers).reduce( + (object, parserName) => + Object.defineProperty( + object, + parserName, + Object.getOwnPropertyDescriptor(parsers[parserName], "parse") + ), + {} + ); + + const parser = resolveParser$1(opts, parsers); + + try { + if (parser.preprocess) { + text = parser.preprocess(text, opts); + } + + return { + text, + ast: parser.parse(text, parsersForCustomParserApi, opts) + }; + } catch (error) { + const loc = error.loc; + + if (loc) { + const codeFrame = lib$4; + error.codeFrame = codeFrame.codeFrameColumns(text, loc, { + highlightCode: true + }); + error.message += "\n" + error.codeFrame; + throw error; + } + + /* istanbul ignore next */ + throw error.stack; + } +} + +var parser$3 = { parse: parse$3, resolveParser: resolveParser$1 }; + +function getPlugin(options) { + const astFormat = options.astFormat; + + if (!astFormat) { + throw new Error("getPlugin() requires astFormat to be set"); + } + const printerPlugin = options.plugins.find( + plugin => plugin.printers[astFormat] + ); + if (!printerPlugin) { + throw new Error(`Couldn't find plugin for AST format "${astFormat}"`); + } + + return printerPlugin; +} + +var getPlugin_1 = getPlugin; + +const getSupportInfo$2 = support.getSupportInfo; + + +const resolveParser = parser$3.resolveParser; + + +const hiddenDefaults = { + astFormat: "estree", + printer: {}, + locStart: null, + locEnd: null +}; + +// Copy options and fill in default values. +function normalize$2(options, opts) { + opts = opts || {}; + + const rawOptions = Object.assign({}, options); + + const plugins = loadPlugins_1(rawOptions.plugins); + rawOptions.plugins = plugins; + + const supportOptions = getSupportInfo$2(null, { + plugins, + pluginsLoaded: true, + showUnreleased: true, + showDeprecated: true + }).options; + const defaults = supportOptions.reduce( + (reduced, optionInfo) => + Object.assign(reduced, { [optionInfo.name]: optionInfo.default }), + Object.assign({}, hiddenDefaults) + ); + + if (opts.inferParser !== false) { + if ( + rawOptions.filepath && + (!rawOptions.parser || rawOptions.parser === defaults.parser) + ) { + const inferredParser = inferParser( + rawOptions.filepath, + rawOptions.plugins + ); + if (inferredParser) { + rawOptions.parser = inferredParser; + } + } + } + + const parser = resolveParser( + !rawOptions.parser + ? rawOptions + : // handle deprecated parsers + optionsNormalizer.normalizeApiOptions( + rawOptions, + [supportOptions.find(x => x.name === "parser")], + { passThrough: true, logger: false } + ) + ); + rawOptions.astFormat = parser.astFormat; + rawOptions.locEnd = parser.locEnd; + rawOptions.locStart = parser.locStart; + + const plugin = getPlugin_1(rawOptions); + rawOptions.printer = plugin.printers[rawOptions.astFormat]; + + const pluginDefaults = supportOptions + .filter( + optionInfo => + optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name] + ) + .reduce( + (reduced, optionInfo) => + Object.assign(reduced, { + [optionInfo.name]: optionInfo.pluginDefaults[plugin.name] + }), + {} + ); + + const mixedDefaults = Object.assign({}, defaults, pluginDefaults); + + Object.keys(mixedDefaults).forEach(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 inferParser(filepath, plugins) { + const extension = path.extname(filepath); + const filename = path.basename(filepath).toLowerCase(); + + const language = getSupportInfo$2(null, { + plugins, + pluginsLoaded: true + }).languages.find( + language => + language.since !== null && + (language.extensions.indexOf(extension) > -1 || + (language.filenames && + language.filenames.find(name => name.toLowerCase() === filename))) + ); + + return language && language.parsers[0]; +} + +var options$12 = { normalize: normalize$2, hiddenDefaults }; + +const normalize$1 = options$12.normalize; + + +function printSubtree(path$$1, print, options) { + if (options.printer.embed) { + return options.printer.embed( + path$$1, + print, + (text, partialNextOptions) => + textToDoc(text, partialNextOptions, options), + options + ); + } +} + +function textToDoc(text, partialNextOptions, parentOptions) { + const nextOptions = normalize$1( + Object.assign({}, parentOptions, partialNextOptions, { + parentParser: parentOptions.parser, + originalText: text + }), + { passThrough: true, inferParser: false } + ); + + const result = parser$3.parse(text, nextOptions); + const ast = result.ast; + text = result.text; + + const astComments = ast.comments; + delete ast.comments; + comments.attach(astComments, ast, text, nextOptions); + return astToDoc(ast, nextOptions); +} + +var multiparser = { + printSubtree +}; + +const doc$3 = doc; +const docBuilders$14 = doc$3.builders; +const concat$14 = docBuilders$14.concat; +const hardline$13 = docBuilders$14.hardline; +const addAlignmentToDoc$2 = docBuilders$14.addAlignmentToDoc; +const docUtils$6 = doc$3.utils; + +function printAstToDoc(ast, options, addAlignmentSize) { + addAlignmentSize = addAlignmentSize || 0; + + const printer = options.printer; + const cache = new Map(); + + function printGenerically(path$$1, args) { + const node = path$$1.getValue(); + + const 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 + let res; + if (printer.willPrintOwnComments && printer.willPrintOwnComments(path$$1)) { + res = genericPrint$6(path$$1, options, printGenerically, args); + } else { + res = comments.printComments( + path$$1, + p => genericPrint$6(p, options, printGenerically, args), + options, + args && args.needsSemi + ); + } + + if (shouldCache) { + cache.set(node, res); + } + + return res; + } + + let doc$$2 = printGenerically(new fastPath(ast)); + if (addAlignmentSize > 0) { + // Add a hardline to make the indents take effect + // It should be removed in index.js format() + doc$$2 = addAlignmentToDoc$2( + docUtils$6.removeLines(concat$14([hardline$13, doc$$2])), + addAlignmentSize, + options.tabWidth + ); + } + docUtils$6.propagateBreaks(doc$$2); + + if (options.parser === "json") { + doc$$2 = concat$14([doc$$2, hardline$13]); + } + + return doc$$2; +} + +function genericPrint$6(path$$1, options, printPath, args) { + assert.ok(path$$1 instanceof fastPath); + + const node = path$$1.getValue(); + const 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 + const sub = multiparser.printSubtree(path$$1, printPath, options); + 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; + +var concatMap = function (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; + +var path$3 = { sep: '/' }; +try { + path$3 = path; +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.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; +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) + } + + 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$3.sep !== '/') { + pattern = pattern.split(path$3.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.prototype.debug = function () {}; + +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) 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.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.prototype.braceExpand = braceExpand; + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + 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.prototype.parse = parse$4; +var SUBPARSE = {}; +function parse$4 (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(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) { + 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(pattern, options); + list = list.filter(function (f) { + return mm.match(f) + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list +}; + +Minimatch.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$3.sep !== '/') { + f = f.split(path$3.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.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 mimicFn = (to, from) => { + // TODO: use `Reflect.ownKeys()` when targeting Node.js 6 + for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } +}; + +var mem = createCommonjsModule(function (module) { +'use strict'; + + +const cacheStore = new WeakMap(); + +const defaultCacheKey = function (x) { + if (arguments.length === 1 && (x === null || x === undefined || (typeof x !== 'function' && typeof x !== 'object'))) { + return x; + } + + return JSON.stringify(arguments); +}; + +module.exports = (fn, opts) => { + opts = Object.assign({ + cacheKey: defaultCacheKey, + cache: new Map() + }, opts); + + const memoized = function () { + const cache = cacheStore.get(memoized); + const key = opts.cacheKey.apply(null, arguments); + + if (cache.has(key)) { + const c = cache.get(key); + + if (typeof opts.maxAge !== 'number' || Date.now() < c.maxAge) { + return c.data; + } + } + + const 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 = fn => { + const 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() { + /* 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() {}; + +// 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, 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) +} + +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 = 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(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 () { + return this._data.size + }, + set: function (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.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.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 = 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 (key) { + return Symbol.for(key) + }; +} else { + makeSymbol = function (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 (mL) { + if (!mL || !(typeof mL === 'number') || mL <= 0) { + mL = Infinity; + } + this[MAX] = mL; + trim(this); + }, + get: function () { + return this[MAX] + }, + enumerable: true +}); + +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function (allowStale) { + this[ALLOW_STALE] = !!allowStale; + }, + get: function () { + return this[ALLOW_STALE] + }, + enumerable: true +}); + +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function (mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0; + } + this[MAX_AGE] = mA; + trim(this); + }, + get: function () { + return this[MAX_AGE] + }, + enumerable: true +}); + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function (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(this); + }, + get: function () { return this[LENGTH_CALCULATOR] }, + enumerable: true +}); + +Object.defineProperty(LRUCache.prototype, 'length', { + get: function () { return this[LENGTH] }, + enumerable: true +}); + +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function () { 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(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(); // 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(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(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(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(this, node); + return node.value +}; + +LRUCache.prototype.del = function (key) { + del(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(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 (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(self, walker); + walker = prev; + } + } +} + +function del (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() { 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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, 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 }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); + +/** + * 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.readFile(file, 'utf8', function (err, data) { + if (err) { + reject(err); + return; + } + resolve(parseString(data)); + }); + })]; + }); + }); +} +exports.parse = parse; +function parseSync(file) { + return parseString(fs.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$1 = "editorconfig"; +var version$2 = "0.15.0"; +var description$1 = "EditorConfig File Locator and Interpreter for Node.js"; +var keywords = ["editorconfig","core"]; +var main$1 = "index.js"; +var bin$1 = {"editorconfig":"bin/editorconfig"}; +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 tslint.json","copy":"cpy package.json .npmignore LICENSE README.md CHANGELOG.md dist && cpy src/bin/* dist/bin && cpy src/lib/fnmatch*.* dist/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$1 = "https://github.com/editorconfig/editorconfig-core-js/issues"; +var author$1 = "EditorConfig Team"; +var license$1 = "MIT"; +var dependencies$1 = {"@types/commander":"^2.11.0","@types/semver":"^5.4.0","commander":"^2.11.0","lru-cache":"^4.1.1","semver":"^5.4.1","sigmund":"^1.0.1"}; +var devDependencies$1 = {"@types/mocha":"^2.2.43","cpy-cli":"^1.0.1","eclint":"^2.4.3","mocha":"^4.0.1","rimraf":"^2.6.2","should":"^13.1.2","tslint":"^5.7.0","typescript":"^2.5.3"}; +var _package$2 = { + name: name$1, + version: version$2, + description: description$1, + keywords: keywords, + main: main$1, + bin: bin$1, + contributors: contributors, + directories: directories, + scripts: scripts$1, + repository: repository$1, + bugs: bugs$1, + author: author$1, + license: license$1, + dependencies: dependencies$1, + devDependencies: devDependencies$1 +}; + +var _package$3 = Object.freeze({ + name: name$1, + version: version$2, + description: description$1, + keywords: keywords, + main: main$1, + bin: bin$1, + contributors: contributors, + directories: directories, + scripts: scripts$1, + repository: repository$1, + bugs: bugs$1, + author: author$1, + license: license$1, + dependencies: dependencies$1, + devDependencies: devDependencies$1, + default: _package$2 +}); + +var pkg = ( _package$3 && _package$2 ) || _package$3; + +var editorconfig = 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() { 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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, 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 }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); + + + + + +exports.parseString = ini.parseString; +// tslint:disable-next-line:no-var-requires + +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(filepath, glob, matchOptions); +} +function getConfigFileNames(filepath, options) { + var paths = []; + do { + filepath = path.dirname(filepath); + paths.push(path.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$3.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 || pkg.version, + root: path.resolve(options.root || path.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.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.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.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.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.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(editorconfig); + +var editorconfigToPrettier = editorConfigToPrettier; + +function editorConfigToPrettier(editorConfig) { + if (!editorConfig || Object.keys(editorConfig).length === 0) { + return null; + } + + const 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; + } + + 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"; + + + + + + + + +const maybeParse = (filePath, config, parse) => { + const root = findProjectRoot(path.dirname(path.resolve(filePath))); + return filePath && parse(filePath, { root }); +}; + +const editorconfigAsyncNoCache = (filePath, config) => { + return Promise.resolve(maybeParse(filePath, config, editorconfig.parse)).then( + editorconfigToPrettier + ); +}; +const editorconfigAsyncWithCache = mem(editorconfigAsyncNoCache); + +const editorconfigSyncNoCache = (filePath, config) => { + return editorconfigToPrettier( + maybeParse(filePath, config, editorconfig.parseSync) + ); +}; +const editorconfigSyncWithCache = mem(editorconfigSyncNoCache); + +function getLoadFunction(opts) { + if (!opts.editorconfig) { + 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 thirdParty$1 = ( thirdParty && thirdParty__default ) || thirdParty; + +var resolveConfig_1 = createCommonjsModule(function (module) { +"use strict"; + + + + + + + + +const getExplorerMemoized = mem(opts => + thirdParty$1.cosmiconfig("prettier", { + sync: opts.sync, + cache: opts.cache, + rcExtensions: true, + transform: result => { + if (result && result.config) { + delete result.config.$schema; + } + return result; + } + }) +); + +/** @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); + const loadOpts = { + cache: !!opts.useCache, + sync: !!sync, + editorconfig: !!opts.editorconfig + }; + const load = getLoadFunction(loadOpts); + const loadEditorConfig = resolveConfigEditorconfig.getLoadFunction(loadOpts); + const arr = [load, loadEditorConfig].map(l => l(filePath, opts.config)); + + const unwrapAndMerge = arr => { + const result = arr[0]; + const editorConfigured = arr[1]; + const merged = Object.assign( + {}, + editorConfigured, + mergeOverrides(Object.assign({}, result), filePath) + ); + + if (!result && !editorConfigured) { + return null; + } + + return merged; + }; + + if (loadOpts.sync) { + return unwrapAndMerge(arr); + } + + return Promise.all(arr).then(unwrapAndMerge); +} + +const resolveConfig = (filePath, opts) => _resolveConfig(filePath, opts, false); + +resolveConfig.sync = (filePath, opts) => _resolveConfig(filePath, opts, true); + +function clearCache() { + mem.clear(getExplorerMemoized); + resolveConfigEditorconfig.clearCache(); +} + +function resolveConfigFile(filePath) { + const load = getLoadFunction({ sync: false }); + return load(filePath).then(result => { + return result ? result.filepath : null; + }); +} + +resolveConfigFile.sync = filePath => { + const load = getLoadFunction({ sync: true }); + const result = load(filePath); + return result ? result.filepath : null; +}; + +function mergeOverrides(configResult, filePath) { + const options = Object.assign({}, configResult.config); + if (filePath && options.overrides) { + const relativeFilePath = path.relative( + path.dirname(configResult.filepath), + filePath + ); + for (const override of options.overrides) { + if ( + pathMatchesGlobs( + relativeFilePath, + override.files, + override.excludeFiles + ) + ) { + Object.assign(options, override.options); + } + } + } + + 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) { + const patternList = [].concat(patterns); + const excludedPatternList = [].concat(excludedPatterns || []); + const opts = { matchBase: true }; + + return ( + patternList.some(pattern => minimatch_1(filePath, pattern, opts)) && + !excludedPatternList.some(excludedPattern => + minimatch_1(filePath, excludedPattern, opts) + ) + ); +} + +module.exports = { + resolveConfig, + resolveConfigFile, + clearCache +}; +}); + +const version = require$$0$11.version; + + + +const getSupportInfo = support.getSupportInfo; + + + +const normalizeOptions = options$12.normalize; + + + + + +const printDocToString = doc.printer.printDocToString; +const printDocToDebug = doc.debug.printDocToDebug; + +function guessLineEnding(text) { + const index = text.indexOf("\n"); + if (index >= 0 && text.charAt(index - 1) === "\r") { + return "\r\n"; + } + return "\n"; +} + +function attachComments(text, ast, opts) { + const astComments = ast.comments; + if (astComments) { + delete ast.comments; + comments.attach(astComments, ast, text, opts); + } + ast.tokens = []; + opts.originalText = text.trimRight(); + return astComments; +} + +function ensureAllCommentsPrinted(astComments) { + if (!astComments) { + return; + } + + for (let 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(comment => { + if (!comment.printed) { + throw new Error( + 'Comment "' + + comment.value.trim() + + '" was not printed. Please report this error!' + ); + } + delete comment.printed; + }); +} + +function formatWithCursor(text, opts, addAlignmentSize) { + const selectedParser = parser$3.resolveParser(opts); + const hasPragma = !selectedParser.hasPragma || selectedParser.hasPragma(text); + if (opts.requirePragma && !hasPragma) { + return { formatted: text }; + } + + const UTF8BOM = 0xfeff; + const hasUnicodeBOM = text.charCodeAt(0) === UTF8BOM; + if (hasUnicodeBOM) { + text = text.substring(1); + } + + if ( + opts.insertPragma && + opts.printer.insertPragma && + !hasPragma && + opts.rangeStart === 0 && + opts.rangeEnd === Infinity + ) { + text = opts.printer.insertPragma(text); + } + + addAlignmentSize = addAlignmentSize || 0; + + const result = parser$3.parse(text, opts); + const ast = result.ast; + text = result.text; + + const formattedRangeOnly = formatRange(text, opts, ast); + if (formattedRangeOnly) { + return { formatted: formattedRangeOnly }; + } + + let cursorOffset; + if (opts.cursorOffset >= 0) { + const cursorNodeAndParents = findNodeAtOffset(ast, opts.cursorOffset, opts); + const cursorNode = cursorNodeAndParents.node; + if (cursorNode) { + cursorOffset = opts.cursorOffset - opts.locStart(cursorNode); + opts.cursorNode = cursorNode; + } + } + + const astComments = attachComments(text, ast, opts); + const doc$$1 = astToDoc(ast, opts, addAlignmentSize); + opts.newLine = guessLineEnding(text); + const toStringResult = printDocToString(doc$$1, opts); + let str = toStringResult.formatted; + if (hasUnicodeBOM) { + str = String.fromCharCode(UTF8BOM) + str; + } + const cursorOffsetResult = toStringResult.cursor; + ensureAllCommentsPrinted(astComments); + // Remove extra leading indentation as well as the added indentation after last newline + if (addAlignmentSize > 0) { + return { formatted: str.trim() + opts.newLine }; + } + + if (cursorOffset !== undefined) { + return { + formatted: str, + cursorOffset: cursorOffsetResult + cursorOffset + }; + } + + return { formatted: str }; +} + +function format(text, opts, addAlignmentSize) { + return formatWithCursor(text, opts, addAlignmentSize).formatted; +} + +function findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts) { + let resultStartNode = startNodeAndParents.node; + let resultEndNode = endNodeAndParents.node; + + if (resultStartNode === resultEndNode) { + return { + startNode: resultStartNode, + endNode: resultEndNode + }; + } + + for (const endParent of endNodeAndParents.parentNodes) { + if ( + endParent.type !== "Program" && + endParent.type !== "File" && + opts.locStart(endParent) >= opts.locStart(startNodeAndParents.node) + ) { + resultEndNode = endParent; + } else { + break; + } + } + + for (const startParent of startNodeAndParents.parentNodes) { + if ( + startParent.type !== "Program" && + startParent.type !== "File" && + opts.locEnd(startParent) <= opts.locEnd(endNodeAndParents.node) + ) { + resultStartNode = startParent; + } else { + break; + } + } + + return { + startNode: resultStartNode, + endNode: resultEndNode + }; +} + +function findNodeAtOffset(node, offset, options, predicate, parentNodes) { + predicate = predicate || (() => true); + parentNodes = parentNodes || []; + const start = options.locStart(node, options.locStart); + const end = options.locEnd(node, options.locEnd); + if (start <= offset && offset <= end) { + for (const childNode of comments.getSortedChildNodes( + node, + undefined /* text */, + options + )) { + const childResult = findNodeAtOffset( + childNode, + offset, + options, + predicate, + [node].concat(parentNodes) + ); + if (childResult) { + return childResult; + } + } + + 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 + const 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 + ]; + const jsonSourceElements = [ + "ObjectExpression", + "ArrayExpression", + "StringLiteral", + "NumericLiteral", + "BooleanLiteral", + "NullLiteral" + ]; + const 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; + } + 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. + const rangeStringOrig = text.slice(opts.rangeStart, opts.rangeEnd); + const startNonWhitespace = Math.max( + opts.rangeStart + rangeStringOrig.search(/\S/), + opts.rangeStart + ); + let endNonWhitespace; + for ( + endNonWhitespace = opts.rangeEnd; + endNonWhitespace > opts.rangeStart; + --endNonWhitespace + ) { + if (text[endNonWhitespace - 1].match(/\S/)) { + break; + } + } + + const startNodeAndParents = findNodeAtOffset( + ast, + startNonWhitespace, + opts, + node => isSourceElement(opts, node) + ); + const endNodeAndParents = findNodeAtOffset( + ast, + endNonWhitespace, + opts, + node => isSourceElement(opts, node) + ); + + if (!startNodeAndParents || !endNodeAndParents) { + return { + rangeStart: 0, + rangeEnd: 0 + }; + } + + const siblingAncestors = findSiblingAncestors( + startNodeAndParents, + endNodeAndParents, + opts + ); + const startNode = siblingAncestors.startNode; + const endNode = siblingAncestors.endNode; + const rangeStart = Math.min( + opts.locStart(startNode, opts.locStart), + opts.locStart(endNode, opts.locStart) + ); + const rangeEnd = Math.max( + opts.locEnd(startNode, opts.locEnd), + opts.locEnd(endNode, opts.locEnd) + ); + + return { + rangeStart: rangeStart, + rangeEnd: rangeEnd + }; +} + +function formatRange(text, opts, ast) { + if (opts.rangeStart <= 0 && text.length <= opts.rangeEnd) { + return; + } + + const range = calculateRange(text, opts, ast); + const rangeStart = range.rangeStart; + const rangeEnd = range.rangeEnd; + const 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 + const rangeStart2 = Math.min( + rangeStart, + text.lastIndexOf("\n", rangeStart) + 1 + ); + const indentString = text.slice(rangeStart2, rangeStart); + + const alignmentSize = util$1.getAlignmentSize( + indentString, + opts.tabWidth + ); + + const rangeFormatted = format( + rangeString, + Object.assign({}, opts, { + rangeStart: 0, + rangeEnd: Infinity, + printWidth: opts.printWidth - alignmentSize + }), + alignmentSize + ); + + // Since the range contracts to avoid trailing whitespace, + // we need to remove the newline that was inserted by the `format` call. + const rangeTrimmed = rangeFormatted.trimRight(); + + return text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd); +} + +var prettier = { + formatWithCursor: function(text, opts) { + return formatWithCursor(text, normalizeOptions(opts)); + }, + + format: function(text, opts) { + return format(text, normalizeOptions(opts)); + }, + + check: function(text, opts) { + try { + const formatted = format(text, normalizeOptions(opts)); + return formatted === text; + } catch (e) { + return false; + } + }, + + doc, + + resolveConfig: resolveConfig_1.resolveConfig, + clearConfigCache: resolveConfig_1.clearCache, + + getSupportInfo, + + version, + + util: utilShared, + + /* istanbul ignore next */ + __debug: { + parse: function(text, opts) { + opts = normalizeOptions(opts); + return parser$3.parse(text, opts); + }, + formatAST: function(ast, opts) { + opts = normalizeOptions(opts); + const doc$$1 = astToDoc(ast, opts); + const str = printDocToString(doc$$1, opts); + return str; + }, + // Doesn't handle shebang for now + formatDoc: function(doc$$1, opts) { + opts = normalizeOptions(opts); + const debug = printDocToDebug(doc$$1); + const str = format(debug, opts); + return str; + }, + printToDoc: function(text, opts) { + opts = normalizeOptions(opts); + const result = parser$3.parse(text, opts); + const ast = result.ast; + text = result.text; + attachComments(text, ast, opts); + const doc$$1 = astToDoc(ast, opts); + return doc$$1; + }, + printDocToString: function(doc$$1, opts) { + opts = normalizeOptions(opts); + const str = printDocToString(doc$$1, opts); + return str; + } + } +}; + +module.exports = prettier; diff --git a/Colorui-UniApp/node_modules/prettier/package.json b/Colorui-UniApp/node_modules/prettier/package.json new file mode 100644 index 0000000..8dd3fb1 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/package.json @@ -0,0 +1,86 @@ +{ + "_from": "prettier@~1.12.0", + "_id": "prettier@1.12.1", + "_inBundle": false, + "_integrity": "sha1-wa0g6APndJ+vkFpAnSNn4Gu+cyU=", + "_location": "/prettier", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "prettier@~1.12.0", + "name": "prettier", + "escapedName": "prettier", + "rawSpec": "~1.12.0", + "saveSpec": null, + "fetchSpec": "~1.12.0" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "http://registry.npm.taobao.org/prettier/download/prettier-1.12.1.tgz", + "_shasum": "c1ad20e803e7749faf905a409d2367e06bbe7325", + "_spec": "prettier@~1.12.0", + "_where": "E:\\weilanwlSVN\\colorui\\github\\ColorUI\\Colorui-UniApp", + "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", + "devDependencies": { + "babel-cli": "6.24.1", + "babel-preset-es2015": "6.24.1", + "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", + "jest": "21.1.0", + "mkdirp": "0.5.1", + "prettier": "1.12.0", + "prettylint": "1.0.0", + "rimraf": "2.6.2", + "rollup": "0.47.6", + "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", + "shelljs": "0.8.1", + "snapshot-diff": "0.2.2", + "strip-ansi": "4.0.0", + "tempy": "0.2.1", + "uglify-es": "3.3.9", + "webpack": "2.6.1" + }, + "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" + }, + "scripts": { + "prepublishOnly": "node -e \"assert.equal(require('.').version, require('..').version)\"" + }, + "version": "1.12.1" +} diff --git a/Colorui-UniApp/node_modules/prettier/parser-babylon.js b/Colorui-UniApp/node_modules/prettier/parser-babylon.js new file mode 100644 index 0000000..401d5a7 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/parser-babylon.js @@ -0,0 +1 @@ +"use strict";function createError(t,e){const s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s}var parserCreateError=createError;function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function createCommonjsModule(t,e){return t(e={exports:{}},e.exports),e.exports}var lib=createCommonjsModule(function(t,e){function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}Object.defineProperty(e,"__esModule",{value:!0});var i={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1};var r=!0,a=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=0===e.binop?0:e.binop||null,this.updateContext=null},n=function(t){function e(e,s){return void 0===s&&(s={}),s.keyword=e,t.call(this,e,s)||this}return s(e,t),e}(a),o=function(t){function e(e,s){return t.call(this,e,{beforeExpr:r,binop:s})||this}return s(e,t),e}(a),h={num:new a("num",{startsExpr:!0}),bigint:new a("bigint",{startsExpr:!0}),regexp:new a("regexp",{startsExpr:!0}),string:new a("string",{startsExpr:!0}),name:new a("name",{startsExpr:!0}),eof:new a("eof"),bracketL:new a("[",{beforeExpr:r,startsExpr:!0}),bracketR:new a("]"),braceL:new a("{",{beforeExpr:r,startsExpr:!0}),braceBarL:new a("{|",{beforeExpr:r,startsExpr:!0}),braceR:new a("}"),braceBarR:new a("|}"),parenL:new a("(",{beforeExpr:r,startsExpr:!0}),parenR:new a(")"),comma:new a(",",{beforeExpr:r}),semi:new a(";",{beforeExpr:r}),colon:new a(":",{beforeExpr:r}),doubleColon:new a("::",{beforeExpr:r}),dot:new a("."),question:new a("?",{beforeExpr:r}),questionDot:new a("?."),arrow:new a("=>",{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("#"),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){var e=t.split(" ");return function(t){return e.indexOf(t)>=0}}Object.keys(p).forEach(function(t){h["_"+t]=p[t]});var l={6:c("enum await"),strict:c("implements interface let package private protected public static yield"),strictBind:c("eval arguments")},u=c("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"),d="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",f="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",m=new RegExp("["+d+"]"),y=new RegExp("["+d+f+"]");d=f=null;var x=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,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,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,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,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,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,10591,541],P=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,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 v(t,e){for(var s=65536,i=0;it)return!1;if((s+=e[i+1])>=t)return!0}return!1}function g(t){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&m.test(String.fromCharCode(t)):v(t,x)))}function b(t){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&y.test(String.fromCharCode(t)):v(t,x)||v(t,P))))}var T=/\r\n?|\n|\u2028|\u2029/,w=new RegExp(T.source,"g");function A(t){return 10===t||13===t||8232===t||8233===t}var N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=function(t,e,s,i){this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=i},E={braceStatement:new C("{",!1),braceExpression:new C("{",!0),templateQuasi:new C("${",!0),parenStatement:new C("(",!1),parenExpression:new C("(",!0),template:new C("`",!0,!0,function(t){return t.readTmplToken()}),functionExpression:new C("function",!0)};h.parenR.updateContext=h.braceR.updateContext=function(){if(1!==this.state.context.length){var t=this.state.context.pop();t===E.braceStatement&&this.curContext()===E.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):t===E.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()!==E.parenStatement?(this.state.exprAllowed=!1,t!==h._let&&t!==h._const&&t!==h._var||T.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)):this.state.exprAllowed=!t.beforeExpr},h.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?E.braceStatement:E.braceExpression),this.state.exprAllowed=!0},h.dollarBraceL.updateContext=function(){this.state.context.push(E.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?E.parenStatement:E.parenExpression),this.state.exprAllowed=!0},h.incDec.updateContext=function(){},h._function.updateContext=function(){this.curContext()!==E.braceStatement&&this.state.context.push(E.functionExpression),this.state.exprAllowed=!1},h.backQuote.updateContext=function(){this.curContext()===E.template?this.state.context.pop():this.state.context.push(E.template),this.state.exprAllowed=!1};var k=function(t,e){this.line=t,this.column=e},S=function(t,e){this.start=t,this.end=e};function L(t){return t[t.length-1]}var I=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.raise=function(t,e,s){var i=function(t,e){for(var s=1,i=0;;){w.lastIndex=i;var r=w.exec(t);if(!(r&&r.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=L(n);o.trailingComments&&o.trailingComments[0].start>=t.end&&(i=o.trailingComments,o.trailingComments=null)}for(n.length>0&&L(n).start>=t.start&&(e=n.pop());n.length>0&&L(n).start>=t.start;)s=n.pop();if(!s&&e&&(s=e),e&&this.state.leadingComments.length>0){var h=L(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=L(t.arguments);p&&h.start>=p.start&&h.end<=t.end&&this.state.commentPreviousNode&&this.state.leadingComments.length>0&&(p.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}if(s){if(s.leadingComments)if(s!==t&&s.leadingComments.length>0&&L(s.leadingComments).end<=t.start)t.leadingComments=s.leadingComments,s.leadingComments=null;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(L(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);t.leadingComments=0===c.length?null:c,0===(i=this.state.leadingComments.slice(r)).length&&(i=null)}this.state.commentPreviousNode=t,i&&(i.length&&i[0].start>=t.start&&L(i).end<=t.end?t.innerComments=i:t.trailingComments=i),n.push(t)}},e}(function(){function t(){}var e=t.prototype;return e.isReservedWord=function(t){return"await"===t?this.inModule:l[6](t)},e.hasPlugin=function(t){return!!this.plugins[t]},t}())),M=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=this.inFunction=this.inParameters=this.maybeInArrowParameters=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldInPossibleArrowParameters=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=[E.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[]},e.curPosition=function(){return new k(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}(),D=function(t){return t>=48&&t<=57},O={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},R={bin:[48,49]};R.oct=R.bin.concat([50,51,52,53,54,55]),R.dec=R.oct.concat([56,57]),R.hex=R.dec.concat([65,66,67,68,69,70,97,98,99,100,101,102]);function _(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}var j=function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var i=e.prototype;return i.addExtra=function(t,e,s){t&&((t.extra=t.extra||{})[e]=s)},i.isRelational=function(t){return this.match(h.relational)&&this.state.value===t},i.expectRelational=function(t){this.isRelational(t)?this.next():this.unexpected(null,h.relational)},i.eatRelational=function(t){return!!this.isRelational(t)&&(this.next(),!0)},i.isContextual=function(t){return this.match(h.name)&&this.state.value===t},i.isLookaheadContextual=function(t){var e=this.lookahead();return e.type===h.name&&e.value===t},i.eatContextual=function(t){return this.state.value===t&&this.eat(h.name)},i.expectContextual=function(t,e){this.eatContextual(t)||this.unexpected(null,e)},i.canInsertSemicolon=function(){return this.match(h.eof)||this.match(h.braceR)||this.hasPrecedingLineBreak()},i.hasPrecedingLineBreak=function(){return T.test(this.input.slice(this.state.lastTokEnd,this.state.start))},i.isLineTerminator=function(){return this.eat(h.semi)||this.canInsertSemicolon()},i.semicolon=function(){this.isLineTerminator()||this.unexpected(null,h.semi)},i.expect=function(t,e){this.eat(t)||this.unexpected(e,t)},i.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)},i.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}'`,[t]);return!0},i.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(", ")}'`,t)},e}(function(t){function e(e,s){var i;return(i=t.call(this)||this).state=new M,i.state.init(e,s),i.isLookahead=!1,i}s(e,t);var i=e.prototype;return i.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 S(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()},i.eat=function(t){return!!this.match(t)&&(this.next(),!0)},i.match=function(t){return this.state.type===t},i.isKeyword=function(t){return u(t)},i.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},i.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.fullCharCodeAtPos())},i.readToken=function(t){g(t)||92===t?this.readWord():this.getTokenFromCode(t)},i.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.state.pos);return t<=55295||t>=57344?t:(t<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},i.pushComment=function(t,e,s,i,r,a){var n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new S(r,a)};this.isLookahead||(this.options.tokens&&this.state.tokens.push(n),this.state.comments.push(n),this.addComment(n))},i.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,w.lastIndex=s;(t=w.exec(this.input))&&t.index8&&t<14||t>=5760&&N.test(String.fromCharCode(t))))break t;++this.state.pos}}},i.finishToken=function(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var s=this.state.type;this.state.type=t,this.state.value=e,this.updateContext(s)},i.readToken_dot=function(){var t=this.input.charCodeAt(this.state.pos+1);if(t>=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))}},i.readToken_slash=function(){if(this.state.exprAllowed)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)},i.readToken_mult_modulo=function(t){var e=42===t?h.star:h.modulo,s=1,i=this.input.charCodeAt(this.state.pos+1),r=this.state.exprAllowed;42===t&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=h.exponent),61!==i||r||(s++,e=h.assign),this.finishOp(e,s)},i.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.state.pos+1);if(e!==t){if(124===t){if(62===e)return void this.finishOp(h.pipeline,2);if(125===e&&this.hasPlugin("flow"))return void this.finishOp(h.braceBarR,2)}61!==e?this.finishOp(124===t?h.bitwiseOR:h.bitwiseAND,1):this.finishOp(h.assign,2)}else this.finishOp(124===t?h.logicalOR:h.logicalAND,2)},i.readToken_caret=function(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(h.assign,2):this.finishOp(h.bitwiseXOR,1)},i.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.state.pos+1);if(e===t)return 45===e&&!this.inModule&&62===this.input.charCodeAt(this.state.pos+2)&&T.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),void this.nextToken()):void this.finishOp(h.incDec,2);61===e?this.finishOp(h.assign,2):this.finishOp(h.plusMin,1)},i.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.state.pos+1),s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?void this.finishOp(h.assign,s+1):void this.finishOp(h.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.state.pos+2)||45!==this.input.charCodeAt(this.state.pos+3)?(61===e&&(s=2),void this.finishOp(h.relational,s)):(this.skipLineComment(4),this.skipSpace(),void this.nextToken())},i.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(h.arrow)):void this.finishOp(61===t?h.eq:h.bang,1);this.finishOp(h.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2)},i.readToken_question=function(){var t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63===t?this.finishOp(h.nullishCoalescing,2):46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(h.question)):(this.state.pos+=2,this.finishToken(h.questionDot))},i.getTokenFromCode=function(t){switch(t){case 35: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 '${_(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 '${_(t)}'`)},i.finishOp=function(t,e){var s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)},i.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(T.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;var a=this.readWord1();if(a){/^[gmsiyu]*$/.test(a)||this.raise(s,"Invalid regular expression flag")}this.finishToken(h.regexp,{pattern:r,flags:a})},i.readInt=function(t,e){for(var s=this.state.pos,i=16===t?O.hex:O.decBinOct,r=16===t?R.hex:10===t?R.dec:8===t?R.oct:R.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:D(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},i.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),g(this.fullCharCodeAtPos())&&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)},i.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),g(this.fullCharCodeAtPos())&&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))},i.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},i.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):(A(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)},i.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(A(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}},i.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:_(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)}},i.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},i.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")},i.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},i.parseBlock=function(t){var e=this.startNode();return this.expect(h.braceL),this.parseBlockBody(e,t,!1,h.braceR),this.finishNode(e,"BlockStatement")},i.isValidDirective=function(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized},i.parseBlockBody=function(t,e,s,i){var r=t.body=[],a=t.directives=[];this.parseBlockOrModuleBlockBody(r,e?a:void 0,s,i)},i.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)},i.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")},i.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)},i.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},i.parseVarHead=function(t){t.id=this.parseBindingAtom(),this.checkLVal(t.id,!0,void 0,"variable declaration")},i.parseFunction=function(t,e,s,i,r){var a=this.state.inFunction,n=this.state.inMethod,o=this.state.inGenerator;return this.state.inFunction=!0,this.state.inMethod=!1,this.initFunction(t,i),this.match(h.star)&&(t.async&&this.expectPlugin("asyncGenerators"),t.generator=!0,this.next()),!e||r||this.match(h.name)||this.match(h._yield)||this.unexpected(),e||(this.state.inGenerator=t.generator),(this.match(h.name)||this.match(h._yield))&&(t.id=this.parseBindingIdentifier()),e&&(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.inGenerator=o,t},i.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},i.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")},i.isClassProperty=function(){return this.match(h.eq)||this.match(h.semi)||this.match(h.braceR)},i.isClassMethod=function(){return this.match(h.parenL)},i.isNonstaticConstructor=function(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)},i.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),this.hasPlugin("decorators2")&&-1===["method","get","set"].indexOf(a.kind)&&a.decorators&&a.decorators.length>0&&this.raise(a.start,"Stage 2 decorators may only be used with a class or a class method")}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},i.parseClassMember=function(t,e,s){var i=!1;if(this.match(h.name)&&"static"===this.state.value){var r=this.parseIdentifier(!0);if(this.isClassMethod()){var a=e;return a.kind="method",a.computed=!1,a.key=r,a.static=!1,void this.pushClassMethod(t,a,!1,!1,!1)}if(this.isClassProperty()){var n=e;return n.computed=!1,n.key=r,n.static=!1,void t.body.push(this.parseClassProperty(n))}i=!0}this.parseClassMemberWithIsStatic(t,e,s,i)},i.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.match(h.star);m&&(this.expectPlugin("asyncGenerators"),this.next()),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.checkGetterSetterParamCount(r))},i.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},i.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))},i.pushClassPrivateProperty=function(t,e){this.expectPlugin("classPrivateProperties",e.key.start),t.body.push(this.parseClassPrivateProperty(e))},i.pushClassMethod=function(t,e,s,i,r){t.body.push(this.parseMethod(e,s,i,r,"ClassMethod"))},i.pushClassPrivateMethod=function(t,e,s,i){this.expectPlugin("classPrivateMethods",e.key.start),t.body.push(this.parseMethod(e,s,i,!1,"ClassPrivateMethod"))},i.parsePostMemberNameModifiers=function(t){},i.parseAccessModifier=function(){},i.parseClassPrivateProperty=function(t){return this.state.inClassProperty=!0,t.value=this.eat(h.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(t,"ClassPrivateProperty")},i.parseClassProperty=function(t){return t.typeAnnotation||this.expectPlugin("classProperties"),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.finishNode(t,"ClassProperty")},i.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")},i.parseClassSuper=function(t){t.superClass=this.eat(h._extends)?this.parseExprSubscripts():null},i.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)){var r=this.startNode(),a=!1;return this.eat(h._function)?r=this.parseFunction(r,!0,!1,!1,!0):this.isContextual("async")&&this.lookahead().type===h._function?(this.eatContextual("async"),this.eat(h._function),r=this.parseFunction(r,!0,!1,!0,!0)):this.match(h._class)?r=this.parseClass(r,!0,!0):(a=!0,r=this.parseMaybeAssign()),t.declaration=r,a&&this.semicolon(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){var n=this.lookahead();n.type!==h._function&&this.unexpected(n.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")},i.parseExportDeclaration=function(t){return this.parseStatement(!0)},i.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},i.parseExportSpecifiersMaybe=function(t){this.eat(h.comma)&&(t.specifiers=t.specifiers.concat(this.parseExportSpecifiers()))},i.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()},i.shouldParseExportStar=function(){return this.match(h.star)},i.parseExportStar=function(t){this.expect(h.star),this.isContextual("as")?this.parseExportNamespace(t):(this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration"))},i.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)},i.shouldParseExportDeclaration=function(){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.isContextual("async")||this.match(h.at)&&this.expectPlugin("decorators2")},i.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)},i.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.`)},i.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},i.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")},i.shouldParseDefaultImport=function(t){return this.match(h.name)},i.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))},i.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)}}},i.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}s(e,t);var i=e.prototype;return i.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)}},i.getExpression=function(){this.nextToken();var t=this.parseExpression();return this.match(h.eof)||this.unexpected(),t.comments=this.state.comments,t},i.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},i.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);if(l.operator=this.state.value,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},i.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)},i.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},i.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)},i.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);n.left=t,n.operator=this.state.value,"**"!==n.operator||"UnaryExpression"!==t.type||!t.extra||t.extra.parenthesizedArgument||t.extra.parenthesized||this.raise(t.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var p=this.state.start,c=this.state.startLoc;return"|>"===n.operator&&(this.expectPlugin("pipelineOperator"),this.state.potentialArrowAt=p),"??"===n.operator&&this.expectPlugin("nullishCoalescingOperator"),n.right=this.parseExprOp(this.parseMaybeUnary(),p,c,o.rightAssociative?a-1:a,r),this.finishNode(n,o===h.logicalOR||o===h.logicalAND||o===h.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(n,e,s,i,r)}return t},i.parseMaybeUnary=function(t){if(this.state.type.prefix){var e=this.startNode(),s=this.match(h.incDec);e.operator=this.state.value,e.prefix=!0,"throw"===e.operator&&this.expectPlugin("throwExpressions"),this.next();var i=this.state.type;if(e.argument=this.parseMaybeUnary(),this.addExtra(e,"parenthesizedArgument",!(i!==h.parenL||e.argument.extra&&e.argument.extra.parenthesized)),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 r=e.argument;"Identifier"===r.type?this.raise(e.start,"Deleting local variable in strict mode"):"MemberExpression"===r.type&&"PrivateName"===r.property.type&&this.raise(e.start,"Deleting a private field is not allowed")}return this.finishNode(e,s?"UpdateExpression":"UnaryExpression")}var a=this.state.start,n=this.state.startLoc,o=this.parseExprSubscripts(t);if(t&&t.start)return o;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var p=this.startNodeAt(a,n);p.operator=this.state.value,p.prefix=!1,p.argument=o,this.checkLVal(o,void 0,void 0,"postfix operation"),this.next(),o=this.finishNode(p,"UpdateExpression")}return o},i.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)},i.parseSubscripts=function(t,e,s,i){var r={stop:!1};do{t=this.parseSubscript(t,e,s,i,r)}while(!r.stop);return t},i.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"),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,"MemberExpression");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,"CallExpression")}return n.object=t,n.property=this.parseIdentifier(!0),n.computed=!1,n.optional=!0,this.finishNode(n,"MemberExpression")}if(this.eat(h.dot)){var p=this.startNodeAt(e,s);return p.object=t,p.property=this.parseMaybePrivateName(),p.computed=!1,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),this.finishNode(c,"MemberExpression")}if(!i&&this.match(h.parenL)){var l=this.atPossibleAsync(t);this.next();var u=this.startNodeAt(e,s);u.callee=t;var d={start:-1};return u.arguments=this.parseCallExpressionArguments(h.parenR,l,d),this.finishCallExpression(u),l&&this.shouldParseAsyncArrow()?(r.stop=!0,d.start>-1&&this.raise(d.start,"A trailing comma is not permitted after the rest element"),this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),u)):(this.toReferencedList(u.arguments),u)}if(this.match(h.backQuote)){var f=this.startNodeAt(e,s);return f.tag=t,f.quasi=this.parseTemplate(!0),this.finishNode(f,"TaggedTemplateExpression")}return r.stop=!0,t},i.atPossibleAsync=function(t){return this.state.potentialArrowAt===t.start&&"Identifier"===t.type&&"async"===t.name&&!this.canInsertSemicolon()},i.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")},i.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},i.shouldParseAsyncArrow=function(){return this.match(h.arrow)},i.parseAsyncArrowFromCallExpression=function(t,e){var s=this.state.yieldInPossibleArrowParameters;return this.state.yieldInPossibleArrowParameters=null,this.expect(h.arrow),this.parseArrowExpression(t,e.arguments,!0),this.state.yieldInPossibleArrowParameters=s,t},i.parseNoCallExpr=function(){var t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)},i.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,r=this.shouldAllowYieldIdentifier(),a=this.parseIdentifier(i||r);if("await"===a.name){if(this.state.inAsync||this.inModule)return this.parseAwait(e)}else{if("async"===a.name&&this.match(h._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(e,!1,!1,!0);if(s&&"async"===a.name&&this.match(h.name)){var n=this.state.yieldInPossibleArrowParameters;this.state.yieldInPossibleArrowParameters=null;var o=[this.parseIdentifier()];return this.expect(h.arrow),this.parseArrowExpression(e,o,!0),this.state.yieldInPossibleArrowParameters=n,e}}if(s&&!this.canInsertSemicolon()&&this.eat(h.arrow)){var p=this.state.yieldInPossibleArrowParameters;return this.state.yieldInPossibleArrowParameters=null,this.parseArrowExpression(e,[a]),this.state.yieldInPossibleArrowParameters=p,e}return a;case h._do:this.expectPlugin("doExpressions");var c=this.startNode();this.next();var l=this.state.inFunction,u=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,c.body=this.parseBlock(!1),this.state.inFunction=l,this.state.labels=u,this.finishNode(c,"DoExpression");case h.regexp:var d=this.state.value;return(e=this.parseLiteral(d.value,"RegExpLiteral")).pattern=d.pattern,e.flags=d.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 f=e.callee=this.parseNoCallExpr();if("MemberExpression"===f.type)return this.finishNode(e,"BindExpression");throw this.raise(f.start,"Binding should be performed on object property.");default:throw this.unexpected()}},i.parseBooleanLiteral=function(){var t=this.startNode();return t.value=this.match(h._true),this.next(),this.finishNode(t,"BooleanLiteral")},i.parseMaybePrivateName=function(){if(this.match(h.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);var t=this.startNode();return this.next(),t.id=this.parseIdentifier(!0),this.finishNode(t,"PrivateName")}return this.parseIdentifier(!0)},i.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)},i.parseMetaProperty=function(t,e,s){return t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected()),t.property=this.parseIdentifier(!0),t.property.name!==s&&this.raise(t.property.start,`The only valid meta property for ${e.name} is ${e.name}.${s}`),this.finishNode(t,"MetaProperty")},i.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').then")),this.inModule||this.raise(e.start,"import.meta may appear only with 'sourceType: \"module\"'"),this.parseMetaProperty(t,e,"meta")},i.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)},i.parseParenExpression=function(){this.expect(h.parenL);var t=this.parseExpression();return this.expect(h.parenR),t},i.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.yieldInPossibleArrowParameters;this.state.maybeInArrowParameters=!0,this.state.yieldInPossibleArrowParameters=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,P=this.state.startLoc;this.expect(h.parenR),this.state.maybeInArrowParameters=r;var v=this.startNodeAt(s,i);if(t&&this.shouldParseArrow()&&(v=this.parseArrow(v))){for(var g=0;g1?((e=this.startNodeAt(p,c)).expressions=l,this.toReferencedList(e.expressions),this.finishNodeAt(e,"SequenceExpression",x,P)):e=l[0],this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",s),e},i.shouldParseArrow=function(){return!this.canInsertSemicolon()},i.parseArrow=function(t){if(this.eat(h.arrow))return t},i.parseParenItem=function(t,e,s){return t},i.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(),this.eat(h.questionDot)&&(t.optional=!0),this.parseNewArguments(t),this.finishNode(t,"NewExpression")},i.parseNewArguments=function(t){if(this.eat(h.parenL)){var e=this.parseExprList(h.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]},i.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")},i.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")},i.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("decorators2"))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(this.expectPlugin("objectRestSpread"),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")}}if(o.method=!1,(t||e)&&(l=this.state.start,u=this.state.startLoc),t||(p=this.eat(h.star)),!t&&this.isContextual("async")){p&&this.unexpected();var f=this.parseIdentifier();this.match(h.colon)||this.match(h.parenL)||this.match(h.braceR)||this.match(h.eq)||this.match(h.comma)?(o.key=f,o.computed=!1):(c=!0,this.match(h.star)&&(this.expectPlugin("asyncGenerators"),this.next(),p=!0),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,l,u,p,c,t,e),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")},i.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)},i.checkGetterSetterParamCount=function(t){var e="get"===t.kind?0:1;if(t.params.length!==e){var s=t.start;"get"===t.kind?this.raise(s,"getter should have no params"):this.raise(s,"setter should have exactly one param")}},i.parseObjectMethod=function(t,e,s,i){return s||e||this.match(h.parenL)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,"ObjectMethod")):this.isGetterOrSetterMethod(t,i)?((e||s)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),this.parseMethod(t,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParamCount(t),t):void 0},i.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"))},i.parseObjPropValue=function(t,e,s,i,r,a,n){var o=this.parseObjectMethod(t,i,r,a)||this.parseObjectProperty(t,e,s,a,n);return o||this.unexpected(),o},i.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},i.initFunction=function(t,e){t.id=null,t.generator=!1,t.async=!!e},i.parseMethod=function(t,e,s,i,r){var a=this.state.inFunction,n=this.state.inMethod,o=this.state.inGenerator;this.state.inFunction=!0,this.state.inMethod=t.kind||!0,this.state.inGenerator=e,this.initFunction(t,s),t.generator=!!e;var h=i;return this.parseFunctionParams(t,h),this.parseFunctionBodyAndFinish(t,r),this.state.inFunction=a,this.state.inMethod=n,this.state.inGenerator=o,t},i.parseArrowExpression=function(t,e,s){this.state.yieldInPossibleArrowParameters&&this.raise(this.state.yieldInPossibleArrowParameters.start,"yield is not allowed in the parameters of an arrow function inside a generator");var i=this.state.inFunction;this.state.inFunction=!0,this.initFunction(t,s),e&&this.setArrowFunctionParameters(t,e);var r=this.state.inGenerator,a=this.state.maybeInArrowParameters;return this.state.inGenerator=!1,this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.state.inGenerator=r,this.state.inFunction=i,this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")},i.setArrowFunctionParameters=function(t,e){t.params=this.toAssignableList(e,!0,"arrow function parameters")},i.isStrictBody=function(t){if("BlockStatement"===t.body.type&&t.body.directives.length)for(var e=0,s=t.body.directives;e",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:"♦"},Q=/^[\da-fA-F]+$/,Y=/^\d+$/;function Z(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function tt(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return tt(t.object)+"."+tt(t.property);throw new Error("Node had unexpected type: "+t.type)}E.j_oTag=new C("...",!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(E.j_expr),this.state.context.push(E.j_oTag),this.state.exprAllowed=!1},h.jsxTagEnd.updateContext=function(t){var e=this.state.context.pop();e===E.j_oTag&&t===h.slash||e===E.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===E.j_expr):this.state.exprAllowed=!0};function et(t){if(null==t)throw new Error(`Unexpected ${t} value.`);return t}function st(t){if(!t)throw new Error("Assert fail")}function it(t,e){return new(t&&t.plugins?function(t){if(t.indexOf("decorators")>=0&&t.indexOf("decorators2")>=0)throw new Error("Cannot use decorators and decorators2 plugin together");var e=t.filter(function(t){return"estree"===t||"flow"===t||"jsx"===t||"typescript"===t});e.indexOf("flow")>=0&&(e=e.filter(function(t){return"flow"!==t})).push("flow");if(e.indexOf("flow")>=0&&e.indexOf("typescript")>=0)throw new Error("Cannot combine flow and typescript plugins.");e.indexOf("typescript")>=0&&(e=e.filter(function(t){return"typescript"!==t})).push("typescript");e.indexOf("estree")>=0&&(e=e.filter(function(t){return"estree"!==t})).unshift("estree");var s=e.join("/"),i=rt[s];if(!i){i=W;for(var r=0,a=e;r0)for(var e=0,s=t.body.body;e-1&&this.raise(e,`Cannot overwrite primitive type ${t}`)},i.flowParseRestrictedIdentifier=function(t){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(t)},i.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")},i.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")},i.flowParseTypeParameter=function(){var t=this.startNode(),e=this.flowParseVariance(),s=this.flowParseTypeAnnotatableIdentifier();return t.name=s.name,t.variance=e,t.bound=s.typeAnnotation,this.match(h.eq)&&(this.eat(h.eq),t.default=this.flowParseType()),this.finishNode(t,"TypeParameter")},i.flowParseTypeParameterDeclaration=function(){var t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(h.jsxTagStart)?this.next():this.unexpected();do{e.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(h.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")},i.flowParseTypeParameterInstantiation=function(){var t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(h.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")},i.flowParseObjectPropertyKey=function(){return this.match(h.num)||this.match(h.string)?this.parseExprAtom():this.parseIdentifier(!0)},i.flowParseObjectTypeIndexer=function(t,e,s){return t.static=e,this.expect(h.bracketL),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")},i.flowParseObjectTypeMethodish=function(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),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")},i.flowParseObjectTypeCallProperty=function(t,e){var s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")},i.flowParseObjectType=function(t,e,s){var i=this.state.inType;this.state.inType=!0;var r,a,n=this.startNode();for(n.callProperties=[],n.properties=[],n.indexers=[],e&&this.match(h.braceBarL)?(this.expect(h.braceBarL),r=h.braceBarR,a=!0):(this.expect(h.braceL),r=h.braceR,a=!1),n.exact=a;!this.match(r);){var o=!1,p=this.startNode();t&&this.isContextual("static")&&this.lookahead().type!==h.colon&&(this.next(),o=!0);var c=this.flowParseVariance();if(this.match(h.bracketL))n.indexers.push(this.flowParseObjectTypeIndexer(p,o,c));else if(this.match(h.parenL)||this.isRelational("<"))c&&this.unexpected(c.start),n.callProperties.push(this.flowParseObjectTypeCallProperty(p,o));else{var l="init";if(this.isContextual("get")||this.isContextual("set")){var u=this.lookahead();u.type!==h.name&&u.type!==h.string&&u.type!==h.num||(l=this.state.value,this.next())}n.properties.push(this.flowParseObjectTypeProperty(p,o,c,l,s))}this.flowObjectTypeSemicolon()}this.expect(r);var d=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=i,d},i.flowParseObjectTypeProperty=function(t,e,s,i,r){if(this.match(h.ellipsis))return r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),s&&this.unexpected(s.start,"Spread properties cannot have variance"),this.expect(h.ellipsis),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty");t.key=this.flowParseObjectPropertyKey(),t.static=e,t.kind=i;var a=!1;return this.isRelational("<")||this.match(h.parenL)?(s&&this.unexpected(s.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParamCount(t)):("init"!==i&&this.unexpected(),this.eat(h.question)&&(a=!0),t.value=this.flowParseTypeInitialiser(),t.variance=s),t.optional=a,this.finishNode(t,"ObjectTypeProperty")},i.flowCheckGetterSetterParamCount=function(t){var e="get"===t.kind?0:1;if(t.value.params.length!==e){var s=t.start;"get"===t.kind?this.raise(s,"getter should have no params"):this.raise(s,"setter should have exactly one param")}},i.flowObjectTypeSemicolon=function(){this.eat(h.semi)||this.eat(h.comma)||this.match(h.braceR)||this.match(h.braceBarR)||this.unexpected()},i.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},i.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")},i.flowParseTypeofType=function(){var t=this.startNode();return this.expect(h._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")},i.flowParseTupleType=function(){var t=this.startNode();for(t.types=[],this.expect(h.bracketL);this.state.pos0){var P=c.concat();if(x.length>0){this.state=p,this.state.noArrowAt=P;for(var v=0;v1&&this.raise(p.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),f&&1===y.length){this.state=p,this.state.noArrowAt=P.concat(y[0].start);var T=this.tryParseConditionalConsequent();d=T.consequent,f=T.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")},i.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}},i.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;o=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:A(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}},i.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},i.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):A(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)},i.jsxReadEntity=function(){for(var t,e="",s=0,i=this.input[this.state.pos],r=++this.state.pos;this.state.pos"):!Z(r)&&Z(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <"+tt(r.name)+">"):Z(r)||Z(a)||tt(a.name)!==tt(r.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+tt(r.name)+">")}return Z(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"),Z(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")},i.jsxParseElement=function(){var t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)},i.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)},i.readToken=function(e){if(this.state.inPropertyName)return t.prototype.readToken.call(this,e);var s=this.curContext();if(s===E.j_expr)return this.jsxReadToken();if(s===E.j_oTag||s===E.j_cTag){if(g(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(h.jsxTagEnd);if((34===e||39===e)&&s===E.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)},i.updateContext=function(e){if(this.match(h.braceL)){var s=this.curContext();s===E.j_oTag?this.state.context.push(E.braceExpression):s===E.j_expr?this.state.context.push(E.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(E.j_cTag),this.state.exprAllowed=!1}},e}(t)},K.typescript=function(t){return function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var i=e.prototype;return i.tsIsIdentifier=function(){return this.match(h.name)},i.tsNextTokenCanFollowModifier=function(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(h.parenL)||this.match(h.colon)||this.match(h.eq)||this.match(h.question))},i.tsParseModifier=function(t){if(this.match(h.name)){var e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}},i.tsIsListTerminator=function(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(h.braceR);case"HeritageClauseElement":return this.match(h.braceL);case"TupleElementTypes":return this.match(h.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")},i.tsParseList=function(t,e){for(var s=[];!this.tsIsListTerminator(t);)s.push(e());return s},i.tsParseDelimitedList=function(t,e){return et(this.tsParseDelimitedListWorker(t,e,!0))},i.tsTryParseDelimitedList=function(t,e){return this.tsParseDelimitedListWorker(t,e,!1)},i.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},i.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},i.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},i.tsParseTypeReference=function(){var t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")},i.tsParseThisTypePredicate=function(t){this.next();var e=this.startNode();return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")},i.tsParseThisTypeNode=function(){var t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")},i.tsParseTypeQuery=function(){var t=this.startNode();return this.expect(h._typeof),t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")},i.tsParseTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),this.eat(h._extends)&&(t.constraint=this.tsParseType()),this.eat(h.eq)&&(t.default=this.tsParseType()),this.finishNode(t,"TSTypeParameter")},i.tsTryParseTypeParameters=function(){if(this.isRelational("<"))return this.tsParseTypeParameters()},i.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")},i.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))},i.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})},i.tsParseTypeMemberSemicolon=function(){this.eat(h.comma)||this.semicolon()},i.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)},i.tsIsUnambiguouslyIndexSignature=function(){return this.next(),this.eat(h.name)&&this.match(h.colon)},i.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")}},i.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")},i.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)},i.tsIsStartOfConstructSignature=function(){return this.next(),this.match(h.parenL)||this.isRelational("<")},i.tsParseTypeLiteral=function(){var t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")},i.tsParseObjectTypeMembers=function(){this.expect(h.braceL);var t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(h.braceR),t},i.tsIsStartOfMappedType=function(){return this.next(),this.isContextual("readonly")&&this.next(),!!this.match(h.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(h._in)))},i.tsParseMappedTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),this.expect(h._in),t.constraint=this.tsParseType(),this.finishNode(t,"TSTypeParameter")},i.tsParseMappedType=function(){var t=this.startNode();return this.expect(h.braceL),this.eatContextual("readonly")&&(t.readonly=!0),this.expect(h.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(h.bracketR),this.eat(h.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(h.braceR),this.finishNode(t,"TSMappedType")},i.tsParseTupleType=function(){var t=this.startNode();return t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseType.bind(this),!0,!1),this.finishNode(t,"TSTupleType")},i.tsParseParenthesizedType=function(){var t=this.startNode();return this.expect(h.parenL),t.typeAnnotation=this.tsParseType(),this.expect(h.parenR),this.finishNode(t,"TSParenthesizedType")},i.tsParseFunctionOrConstructorType=function(t){var e=this.startNode();return"TSConstructorType"===t&&this.expect(h._new),this.tsFillSignature(h.arrow,e),this.finishNode(e,t)},i.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")},i.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";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()},i.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},i.tsParseTypeOperator=function(t){var e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),this.finishNode(e,"TSTypeOperator")},i.tsParseTypeOperatorOrHigher=function(){return this.isContextual("keyof")?this.tsParseTypeOperator("keyof"):this.tsParseArrayTypeOrHigher()},i.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},i.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),h.bitwiseAND)},i.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),h.bitwiseOR)},i.tsIsStartOfFunctionType=function(){return!!this.isRelational("<")||this.match(h.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},i.tsSkipParameterStart=function(){return!(!this.match(h.name)&&!this.match(h._this)||(this.next(),0))},i.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},i.tsParseTypeOrTypePredicateAnnotation=function(t){var e=this.startNode();this.expect(t);var s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return this.tsParseTypeAnnotation(!1,e);var i=this.tsParseTypeAnnotation(!1),r=this.startNodeAtNode(s);return r.parameterName=s,r.typeAnnotation=i,e.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")},i.tsTryParseTypeOrTypePredicateAnnotation=function(){return this.match(h.colon)?this.tsParseTypeOrTypePredicateAnnotation(h.colon):void 0},i.tsTryParseTypeAnnotation=function(){return this.match(h.colon)?this.tsParseTypeAnnotation():void 0},i.tsTryParseType=function(){return this.eat(h.colon)?this.tsParseType():void 0},i.tsParseTypePredicatePrefix=function(){var t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t},i.tsParseTypeAnnotation=function(t,e){return void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),t&&this.expect(h.colon),e.typeAnnotation=this.tsParseType(),this.finishNode(e,"TSTypeAnnotation")},i.tsParseType=function(){var t=this.state.inType;this.state.inType=!0;try{return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(h._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}finally{this.state.inType=t}},i.tsParseTypeAssertion=function(){var t=this.startNode();return t.typeAnnotation=this.tsParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")},i.tsTryParseTypeArgumentsInExpression=function(){var t=this;return this.tsTryParseAndCatch(function(){var e=t.startNode();t.expectRelational("<");var s=t.tsParseDelimitedList("TypeParametersOrArguments",t.tsParseType.bind(t));return t.expectRelational(">"),e.params=s,t.finishNode(e,"TSTypeParameterInstantiation"),t.expect(h.parenL),e})},i.tsParseHeritageClause=function(){return this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this))},i.tsParseExpressionWithTypeArguments=function(){var t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")},i.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")},i.tsParseTypeAliasDeclaration=function(t){return t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),this.expect(h.eq),t.typeAnnotation=this.tsParseType(),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")},i.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")},i.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")},i.tsParseModuleBlock=function(){var t=this.startNode();return this.expect(h.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,h.braceR),this.finishNode(t,"TSModuleBlock")},i.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")},i.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")},i.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")},i.tsIsExternalModuleReference=function(){return this.isContextual("require")&&this.lookahead().type===h.parenL},i.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},i.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")},i.tsLookAhead=function(t){var e=this.state.clone(),s=t();return this.state=e,s},i.tsTryParseAndCatch=function(t){var e=this.state.clone();try{return t()}catch(t){if(t instanceof SyntaxError)return void(this.state=e);throw t}},i.tsTryParse=function(t){var e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)},i.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},i.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)}},i.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)},i.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)}},i.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)}},i.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")},i.tsParseTypeArguments=function(){var t=this.startNode();return this.expectRelational("<"),t.params=this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this)),this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")},i.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},i.isExportDefaultSpecifier=function(){return!this.tsIsDeclarationStart()&&t.prototype.isExportDefaultSpecifier.call(this)},i.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},i.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)},i.parseSubscript=function(e,s,i,r,a){if(this.eat(h.bang)){var n=this.startNodeAt(s,i);return n.expression=e,this.finishNode(n,"TSNonNullExpression")}if(!r&&this.isRelational("<")){if(this.atPossibleAsync(e)){var o=this.tsTryParseGenericAsyncArrowFunction(s,i);if(o)return o}var p=this.startNodeAt(s,i);p.callee=e;var c=this.tsTryParseTypeArgumentsInExpression();if(c)return p.arguments=this.parseCallExpressionArguments(h.parenR,!1),p.typeParameters=c,this.finishCallExpression(p)}return t.prototype.parseSubscript.call(this,e,s,i,r,a)},i.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)},i.parseExprOp=function(e,s,i,r,a){if(et(h._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.eatContextual("as")){var n=this.startNodeAt(s,i);return n.expression=e,n.typeAnnotation=this.tsParseType(),this.finishNode(n,"TSAsExpression"),this.parseExprOp(n,s,i,r,a)}return t.prototype.parseExprOp.call(this,e,s,i,r,a)},i.checkReservedWord=function(t,e,s,i){},i.checkDuplicateExports=function(){},i.parseImport=function(e){return this.match(h.name)&&this.lookahead().type===h.eq?this.tsParseImportEqualsDeclaration(e):t.prototype.parseImport.call(this,e)},i.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)},i.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)},i.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},i.parseClassMember=function(e,s,i){var r=this.parseAccessModifier();r&&(s.accessibility=r),t.prototype.parseClassMember.call(this,e,s,i)},i.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)},i.parsePostMemberNameModifiers=function(t){this.eat(h.question)&&(t.optional=!0)},i.parseExpressionStatement=function(e,s){return("Identifier"===s.type?this.tsParseExpressionStatement(e,s):void 0)||t.prototype.parseExpressionStatement.call(this,e,s)},i.shouldParseExportDeclaration=function(){return!!this.tsIsDeclarationStart()||t.prototype.shouldParseExportDeclaration.call(this)},i.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}},i.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},i.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},i.parseClassId=function(e,s,i){var r;if(s&&!i||!this.isContextual("implements")){(r=t.prototype.parseClassId).call.apply(r,[this].concat(Array.prototype.slice.call(arguments)));var a=this.tsTryParseTypeParameters();a&&(e.typeParameters=a)}},i.parseClassProperty=function(e){var s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),t.prototype.parseClassProperty.call(this,e)},i.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)},i.pushClassPrivateMethod=function(e,s,i,r){var a=this.tsTryParseTypeParameters();a&&(s.typeParameters=a),t.prototype.pushClassPrivateMethod.call(this,e,s,i,r)},i.parseClassSuper=function(e){t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause())},i.parseObjPropValue=function(e){var s;if(this.isRelational("<"))throw new Error("TODO");for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a=r.l||2==r.t&&n>=r.c.length))r.c=4==t.t?mk(t.c,e,n):0==e&&t.c.length==n?t.c:t.c.substr(e,n),r.t=r.c.length==r.l?0:2;else if(2==r.t&&a==r.c.length)r.c+=4==t.t?mk(t.c,e,n):0==e&&t.c.length==n?t.c:t.c.substr(e,n),r.t=r.c.length==r.l?0:2;else{4!=r.t&&wk(r);var s=t.c,c=r.c;if(4==t.t)if(a<=e)for(var i=0;i=0;i--)c[a+i]=s[e+i];else{var u=Math.min(n,s.length-e);for(i=0;i>=1))return r;e+=e,9==++a&&e.slice(0,1)}}function Tk(t){2==t.t?t.c+=_k(t.l-t.c.length,"\0"):t.c=mk(t.c,0,t.c.length),t.t=0}function Sk(t){if(t.length<24){for(var e=0;euo)return!1;return!0}return!/[^\x00-\x7f]/.test(t)}function Ek(t){switch(t.t){case 9:return t.c;default:Tk(t);case 0:if(Sk(t.c))return t.t=9,t.c;t.t=8;case 8:return function(t){for(var e,r,a,n,s=Of,c=Of,i=0,u=t.length;ig?(c.substr(0,1),s+=c,c=Of,s+=t.slice(i,f)):c+=t.slice(i,f),f==u)break;i=f}n=1,++i=55295&&nau)&&(n=3))))),n<4?(i-=n,c+="�"):c+=n>$e?String.fromCharCode(55232+(n>>10),Or+(1023&n)):String.fromCharCode(n),c.length>ve&&(c.substr(0,1),s+=c,c=Of)}return s+c}(t.c)}}function xk(t,e,r){this.t=t,this.c=e,this.l=r}function Ak(t){return new xk(0,t,t.length)}function Ik(t,e){kk(t,Ak(e))}function Ck(t){Ik(dk.Invalid_argument,t)}function Nk(t,e){return e>>>0>=t.length-1&&Ck(zt),t}function Ok(t,e){var r=t[3]<<16,a=e[3]<<16;return r>a?1:re[2]?1:t[2]e[1]?1:t[1]e.c?1:0}function Pk(t,e,r){for(var n=[];;){if(!r||t!==e)if(t instanceof xk){if(!(e instanceof xk))return 1;if(t!==e&&0!=(i=Lk(t,e)))return i}else if(t instanceof Array&&t[0]===(0|t[0])){var s=t[0];if(s===a&&(s=0),s===cf){t=t[1];continue}if(!(e instanceof Array&&e[0]===(0|e[0])))return 1;var c=e[0];if(c===a&&(c=0),c===cf){e=e[1];continue}if(s!=c)return s1&&n.push(t,e,1)}}else{if(e instanceof xk||e instanceof Array&&e[0]===(0|e[0]))return-1;if("number"!=typeof t&&t&&t.compare)return t.compare(e,r);if("function"==typeof t)Ck("compare: functional value");else{if(te)return 1;if(t!=e){if(!r)return NaN;if(t==t)return 1;if(e==e)return-1}}}if(0==n.length)return 0;var u=n.pop();e=n.pop(),u+1<(t=n.pop()).length&&n.push(t,e,u+1),t=t[u],e=e[u]}}function Uk(t,e){return Pk(t,e,!0)}function Dk(t){return t<0&&Ck("String.create"),new xk(t?2:9,Of,t)}function Fk(t,e){return+(0==Pk(t,e,!1))}function Mk(t){Ik(dk.Failure,t)}function Xk(t){return 0!=(6&t.t)&&Tk(t),t.c}function jk(t){var e;if(e=+(t=Xk(t)),t.length>0&&e==e)return e;if(e=+(t=t.replace(/_/g,Of)),t.length>0&&e==e||/^[+-]?nan$/i.test(t))return e;var r=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)p([+-]?[0-9]+)/i.exec(t);if(r){var a=r[3].replace(/0+$/,Of),n=parseInt(r[1]+r[2]+a,16),s=(0|r[4])-4*a.length;return e=n*Math.pow(2,s)}return/^\+?inf(inity)?$/i.test(t)?1/0:/^-inf(inity)?$/i.test(t)?-1/0:void Mk("float_of_string")}function Bk(t){var e=(t=Xk(t)).length;e>31&&Ck("format_int: format too long");for(var r={justify:zf,signstyle:Cu,filler:qb,alternate:!1,base:0,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:rc},a=0;a=0&&n<=9;)r.width=10*r.width+n,a++;a--;break;case".":for(r.prec=0,a++;(n=t.charCodeAt(a)-48)>=0&&n<=9;)r.prec=10*r.prec+n,a++;a--;case"d":case"i":r.signedconv=!0;case"u":r.base=10;break;case"x":r.base=16;break;case"X":r.base=16,r.uppercase=!0;break;case"o":r.base=8;break;case"e":case"f":case"g":r.signedconv=!0,r.conv=n;break;case"E":case"F":case"G":r.signedconv=!0,r.uppercase=!0,r.conv=n.toLowerCase()}}return r}function qk(t,e){t.uppercase&&(e=e.toUpperCase());var r=e.length;t.signedconv&&(t.sign<0||t.signstyle!=Cu)&&r++,t.alternate&&(8==t.base&&(r+=1),16==t.base&&(r+=2));var a=Of;if(t.justify==zf&&t.filler==qb)for(var n=r;n=1e21||e.toFixed(0).length>a){for(s=c-1;n.charAt(s)==Ci;)s--;n.charAt(s)==Qe&&s--,s=(n=n.slice(0,s+1)+n.slice(c)).length,n.charAt(s-3)==At&&(n=n.slice(0,s-1)+Ci+n.slice(s-1));break}var u=a;if(i<0)u-=i+1,n=e.toFixed(u);else for(;(n=e.toFixed(u)).length>a+1;)u--;if(u){for(s=n.length-1;n.charAt(s)==Ci;)s--;n.charAt(s)==Qe&&s--,n=n.slice(0,s+1)}}else n="inf",r.filler=qb;return qk(r,n)}function Yk(t,e){if(Xk(t)==sn)return Ak(Of+e);var r=Bk(t);e<0&&(r.signedconv?(r.sign=-1,e=-e):e>>>=0);var a=e.toString(r.base);if(r.prec>=0){r.filler=qb;var n=r.prec-a.length;n>0&&(a=_k(n,Ci)+a)}return qk(r,a)}xk.prototype.toString=function(){return Ek(this)};var Jk=0;function Hk(){return Jk++}function Wk(t,e){return+(Pk(t,e,!1)>=0)}function Vk(t){var e=9;return Sk(t)||(e=8,t=function(t){for(var e,r,a=Of,n=a,s=0,c=t.length;sg?(n.substr(0,1),a+=n,n=Of,a+=t.slice(s,i)):n+=t.slice(s,i),i==c)break;s=i}e>6),n+=String.fromCharCode(I|63&e)):e=fn?n+=String.fromCharCode(Qu|e>>12,I|e>>6&63,I|63&e):e>=56319||s+1==c||(r=t.charCodeAt(s+1))fn?n+="�":(s++,e=(e<<10)+r-56613888,n+=String.fromCharCode(pl|e>>18,I|e>>12&63,I|e>>6&63,I|63&e)),n.length>ve&&(n.substr(0,1),a+=n,n=Of)}return a+n}(t)),new xk(e,t,t.length)}function zk(t){return 0==(t[3]|t[2]|t[1])}function Kk(t){return[Ll,t&f,t>>24&f,t>>31&$e]}function Qk(t){for(var e=t.length,r=new Array(e),a=0;a>24),n=t[3]-e[3]+(a>>24);return[Ll,r&f,a&f,n&$e]}function Zk(t,e){return t[3]>e[3]?1:t[3]e[2]?1:t[2]e[1]?1:t[1]>23,t[2]=(t[2]<<1|t[1]>>23)&f,t[1]=t[1]<<1&f}function ed(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 rd(t,e){for(var r=0,a=Qk(t),n=Qk(e),s=[Ll,0,0,0];Zk(a,n)>0;)r++,td(n);for(;r>=0;)r--,td(s),Zk(a,n)>=0&&(s[1]++,a=$k(a,n)),ed(n);return[0,s,a]}function ad(t){return t[1]|t[2]<<24}function nd(t){var e=-t[1],r=-t[2]+(e>>24),a=-t[3]+(r>>24);return[Ll,e&f,r&f,a&$e]}function sd(t){return t.l}function cd(t,e){switch(6&t.t){default:if(e>=t.c.length)return 0;case 0:return t.c.charCodeAt(e);case 4:return t.c[e]}}function id(t,e){var r=t[1]+e[1],a=t[2]+e[2]+(r>>24),n=t[3]+e[3]+(a>>24);return[Ll,r&f,a&f,n&$e]}var ud=Math.pow(2,-24);function fd(t,e){var r=t[1]*e[1],a=(r*ud|0)+t[2]*e[1]+t[1]*e[2],n=(a*ud|0)+t[3]*e[1]+t[2]*e[2]+t[1]*e[3];return[Ll,r&f,a&f,n&$e]}function od(t,e){return Zk(t,e)<0}function vd(t){var e=0,r=sd(t),a=10,n=r>0&&45==cd(t,0)?(e++,-1):1;if(e+1=48&&t<=57?t-48:t>=65&&t<=90?t-55:t>=97&&t<=ws?t-87:-1}function bd(t){var e=vd(t),r=e[0],a=e[1],n=e[2],s=Kk(n),c=rd([Ll,f,268435455,$e],s)[1],i=cd(t,r),u=ld(i);(u<0||u>=n)&&Mk(Yv);for(var o=Kk(u);;)if(95!=(i=cd(t,++r))){if((u=ld(i))<0||u>=n)break;od(c,o)&&Mk(Yv),u=Kk(u),od(o=id(fd(s,o),u),u)&&Mk(Yv)}return r!=sd(t)&&Mk(Yv),10==e[2]&&od([Ll,0,0,32768],o)&&Mk(Yv),a<0&&(o=nd(o)),o}function kd(t){return(t[3]<<16)*Math.pow(2,32)+t[2]*Math.pow(2,24)+t[1]}function dd(t){var e=vd(t),r=e[0],a=e[1],n=e[2],s=sd(t),c=r=n)&&Mk(Yv);var u=i;for(r++;r=n)break;(u=n*u+i)>-1>>>0&&Mk(Yv)}return r!=s&&Mk(Yv),u*=a,10==n&&(0|u)!=u&&Mk(Yv),0|u}function hd(t){return pk(t,1,t.length-1)}function pd(t){return t.toString()}function md(t){for(var e={},r=1;r>>0>=t.l&&Sd(),cd(t,e)}function xd(){}function Ad(t){this.data=t}function Id(t,e){this.content={},this.root=t,this.lookupFun=e}function Cd(t){return 4!=t.t&&wk(t),t.c}function Nd(t,e,r){if(r&=Ll,4!=t.t){if(e==t.c.length)return t.c+=String.fromCharCode(r),e+1==t.l&&(t.t=0),0;wk(t)}return t.c[e]=r,0}function Od(t,e,r){return e>>>0>=t.l&&Sd(),Nd(t,e,r)}Td.slice(-1)!==Io&&(Td+=Io),Ad.prototype=new xd,Ad.prototype.truncate=function(t){var e=this.data;this.data=Dk(0|t),yk(e,0,this.data,0,t)},Ad.prototype.length=function(){return sd(this.data)},Ad.prototype.write=function(t,e,r,a){var n=this.length();if(t+a>=n){var s=Dk(t+a),c=this.data;this.data=s,yk(c,0,this.data,0,n)}return yk(e,r,this.data,t,a),0},Ad.prototype.read=function(t,e,r,a){this.length();return yk(this.data,t,e,r,a),0},Ad.prototype.read_one=function(t){return Ed(this.data,t)},Ad.prototype.close=function(){},Ad.prototype.constructor=Ad,Id.prototype.nm=function(t){return this.root+t},Id.prototype.lookup=function(t){if(!this.content[t]&&this.lookupFun){var e=this.lookupFun(Ak(this.root),Ak(t));0!=e&&(this.content[t]=new Ad(e[1]))}},Id.prototype.exists=function(t){if(t==Of)return 1;var e=new RegExp("^"+(t+Io));for(var r in this.content)if(r.match(e))return 1;return this.lookup(t),this.content[t]?1:0},Id.prototype.readdir=function(t){var e=new RegExp("^"+(t==Of?Of:t+Io)+It),r={},a=[];for(var n in this.content){var s=n.match(e);s&&!r[s[1]]&&(r[s[1]]=!0,a.push(s[1]))}return a},Id.prototype.is_dir=function(t){var e=new RegExp("^"+(t==Of?Of:t+Io)+It);for(var r in this.content){if(r.match(e))return 1}return 0},Id.prototype.unlink=function(t){var e=!!this.content[t];return delete this.content[t],e},Id.prototype.open=function(t,e){if(e.rdonly&&e.wronly&&yd(this.nm(t)+" : flags Open_rdonly and Open_wronly are not compatible"),e.text&&e.binary&&yd(this.nm(t)+" : flags Open_text and Open_binary are not compatible"),this.lookup(t),this.content[t]){this.is_dir(t)&&yd(this.nm(t)+" : is a directory"),e.create&&e.excl&&yd(this.nm(t)+Uu);var r=this.content[t];return e.truncate&&r.truncate(),r}if(e.create)return this.content[t]=new Ad(Dk(0)),this.content[t];!function(t){yd((t=t instanceof xk?t.toString():t)+": No such file or directory")}(this.nm(t))},Id.prototype.register=function(t,e){if(this.content[t]&&yd(this.nm(t)+Uu),e instanceof xk)this.content[t]=new Ad(e);else if(e instanceof Array)this.content[t]=new Ad(function(t){return new xk(4,t,t.length)}(e));else if(e.toString){var r=Ak(e.toString());this.content[t]=new Ad(r)}},Id.prototype.constructor=Id;var Rd=r.Buffer;function Ld(t){this.fs=fs,this.fd=t}function Pd(t){this.fs=fs,this.root=t}Ld.prototype=new xd,Ld.prototype.truncate=function(t){this.fs.ftruncateSync(this.fd,0|t)},Ld.prototype.length=function(){return this.fs.fstatSync(this.fd).size},Ld.prototype.write=function(t,e,a,n){var s=Cd(e);s instanceof r.Uint8Array||(s=new r.Uint8Array(s));var c=new Rd(s);return this.fs.writeSync(this.fd,c,a,n,t),0},Ld.prototype.read=function(t,e,a,n){var s=Cd(e);s instanceof r.Uint8Array||(s=new r.Uint8Array(s));var c=new Rd(s);this.fs.readSync(this.fd,c,a,n,t);for(var i=0;idk.fd_last_idx)&&(dk.fd_last_idx=t),t}function Md(t){var e=dk.fds[t];e.flags.rdonly&&yd(X+t+" is readonly");var r={file:e.file,offset:e.offset,fd:t,opened:!0,out:!0,buffer:Of};return gd[r.fd]=r,r.fd}t.exports&&void 0!==commonjsRequire?Dd.push({path:Ud,device:new Pd(Ud)}):Dd.push({path:Ud,device:new Id(Ud)}),Dd.push({path:Ud+yb,device:new Id(Ud+yb)}),Fd(0,function(t,e){var r=gd[t],a=Ak(e),n=sd(a);return r.file.write(r.offset,a,0,n),r.offset+=n,0},new Ad(Dk(0))),Fd(1,function(t){var e=r;if(e.process&&e.process.stdout&&e.process.stdout.write)e.process.stdout.write(t);else{10==t.charCodeAt(t.length-1)&&(t=t.substr(0,t.length-1));var a=e.console;a&&a.log&&a.log(t)}},new Ad(Dk(0))),Fd(2,function(t){var e=r;if(e.process&&e.process.stdout&&e.process.stdout.write)e.process.stderr.write(t);else{10==t.charCodeAt(t.length-1)&&(t=t.substr(0,t.length-1));var a=e.console;a&&a.error&&a.error(t)}},new Ad(Dk(0))),Math.imul||(Math.imul=function(t,e){return((t>>16)*(e|=0)<<16)+(t&$e)*e|0});Math.imul;function Xd(t,e){return+(0!=Pk(t,e,!1))}function jd(t){return t instanceof Array?t[0]:t instanceof xk?Xb:1e3}function Bd(t,e,r){dk[t+1]=e,r&&(dk[r]=e)}var qd={};function Gd(t,e){return t===e?1:(6&t.t&&Tk(t),6&e.t&&Tk(e),t.c==e.c?1:0)}function Yd(t,e){return 1-Gd(t,e)}function Jd(t){var e=r,a=t.toString();if(e.process&&e.process.env&&void 0!=e.process.env[a])return Vk(e.process.env[a]);!function(t){throw t}(dk.Not_found)}function Hd(t){for(;t&&t.joo_tramp;)t=t.joo_tramp.apply(null,t.joo_args),0;return t}function Wd(t,e){return{joo_tramp:t,joo_args:e}}function Vd(t){return t}function zd(t){return qd[t]}function Kd(t){return t instanceof Array?t:r.RangeError&&t instanceof r.RangeError&&t.message&&t.message.match(/maximum call stack/i)?Vd(dk.Stack_overflow):r.InternalError&&t instanceof r.InternalError&&t.message&&t.message.match(/too much recursion/i)?Vd(dk.Stack_overflow):t instanceof r.Error&&zd(tv)?[0,zd(tv),t]:[0,dk.Failure,Vk(String(t))]}function Qd(t,e){return 1==t.length?t(e):gk(t,[e])}function $d(t,e,r){return 2==t.length?t(e,r):gk(t,[e,r])}function Zd(t,e,r,a){return 3==t.length?t(e,r,a):gk(t,[e,r,a])}function th(t,e,r,a,n){return 4==t.length?t(e,r,a,n):gk(t,[e,r,a,n])}function eh(t,e,r,a,n,s){return 5==t.length?t(e,r,a,n,s):gk(t,[e,r,a,n,s])}var rh=[Li,Ak(Bt),-1],ah=[Li,Ak(kv),-3],nh=[Li,Ak(Zc),-4],sh=[Li,Ak(Ps),-7],ch=[Li,Ak(Yf),-8],ih=[Li,Ak(Ts),-9],uh=[Li,Ak(Mr),-11],fh=[Li,Ak(Jb),-12],oh=[0,[11,Ak('File "'),[2,0,[11,Ak('", line '),[4,0,0,0,[11,Ak(", characters "),[4,0,0,0,[12,45,[4,0,0,0,[11,Ak(": "),[2,0,0]]]]]]]]]],Ak('File "%s", line %d, characters %d-%d: %s')],vh=[0,0,[0,0,0,0],[0,0,0,0]],lh=[0,0,0],bh=Ak(""),kh=Ak("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"),dh=[0,0,0,0,0,0,1,0],hh=[0,0,0],ph=[0,0];Bd(11,fh,Jb),Bd(10,uh,Mr),Bd(9,[Li,Ak(Fi),-10],Fi),Bd(8,ih,Ts),Bd(7,ch,Yf),Bd(6,sh,Ps),Bd(5,[Li,Ak(Ya),-6],Ya),Bd(4,[Li,Ak(fv),-5],fv),Bd(3,nh,Zc),Bd(2,ah,kv),Bd(1,[Li,Ak(Uv),-2],Uv),Bd(0,rh,Bt);var mh=Ak("output_substring"),wh=Ak("%.12g"),yh=Ak(Qe),gh=Ak(Wc),_h=Ak(vc),Th=[0,Ak("list.ml"),227,11],Sh=Ak("tl"),Eh=Ak("hd"),xh=Ak("\\\\"),Ah=Ak("\\'"),Ih=Ak("\\b"),Ch=Ak("\\t"),Nh=Ak("\\n"),Oh=Ak("\\r"),Rh=Ak("Char.chr"),Lh=Ak("String.blit / Bytes.blit_string"),Ph=Ak("Bytes.blit"),Uh=Ak("String.sub / Bytes.sub"),Dh=(Ak(Of),Ak("Array.blit")),Fh=Ak("Array.sub"),Mh=Ak("Array.init"),Xh=Ak("Set.remove_min_elt"),jh=[0,0,0,0],Bh=[0,0,0],qh=[0,Ak("set.ml"),389,18],Gh=Ak(ck),Yh=Ak(ck),Jh=Ak(ck),Hh=Ak(ck),Wh=Ak("Buffer.add_substring/add_subbytes"),Vh=Ak("Buffer.add: cannot grow buffer"),zh=Ak("%c"),Kh=Ak("%s"),Qh=Ak("%i"),$h=Ak("%li"),Zh=Ak("%ni"),tp=Ak("%Li"),ep=Ak("%f"),rp=Ak("%B"),ap=Ak("%{"),np=Ak("%}"),sp=Ak("%("),cp=Ak("%)"),ip=Ak("%a"),up=Ak("%t"),fp=Ak("%?"),op=Ak("%r"),vp=Ak("%_r"),lp=[0,Ak(Ov),845,23],bp=[0,Ak(Ov),809,21],kp=[0,Ak(Ov),810,21],dp=[0,Ak(Ov),813,21],hp=[0,Ak(Ov),814,21],pp=[0,Ak(Ov),817,19],mp=[0,Ak(Ov),818,19],wp=[0,Ak(Ov),821,22],yp=[0,Ak(Ov),822,22],gp=[0,Ak(Ov),826,30],_p=[0,Ak(Ov),827,30],Tp=[0,Ak(Ov),831,26],Sp=[0,Ak(Ov),832,26],Ep=[0,Ak(Ov),841,28],xp=[0,Ak(Ov),842,28],Ap=[0,Ak(Ov),846,23],Ip=Ak("%u"),Cp=[0,Ak(Ov),1520,4],Np=Ak("Printf: bad conversion %["),Op=[0,Ak(Ov),1588,39],Rp=[0,Ak(Ov),1611,31],Lp=[0,Ak(Ov),1612,31],Pp=Ak("Printf: bad conversion %_"),Up=Ak("@{"),Dp=Ak("@["),Fp=Ak(mo),Mp=Ak(Qe),Xp=Ak("neg_infinity"),jp=Ak(ge),Bp=Ak("%.12g"),qp=Ak("%nd"),Gp=Ak("%+nd"),Yp=Ak("% nd"),Jp=Ak("%ni"),Hp=Ak("%+ni"),Wp=Ak("% ni"),Vp=Ak("%nx"),zp=Ak("%#nx"),Kp=Ak("%nX"),Qp=Ak("%#nX"),$p=Ak("%no"),Zp=Ak("%#no"),tm=Ak("%nu"),em=Ak("%ld"),rm=Ak("%+ld"),am=Ak("% ld"),nm=Ak("%li"),sm=Ak("%+li"),cm=Ak("% li"),im=Ak("%lx"),um=Ak("%#lx"),fm=Ak("%lX"),om=Ak("%#lX"),vm=Ak("%lo"),lm=Ak("%#lo"),bm=Ak("%lu"),km=Ak("%Ld"),dm=Ak("%+Ld"),hm=Ak("% Ld"),pm=Ak("%Li"),mm=Ak("%+Li"),wm=Ak("% Li"),ym=Ak("%Lx"),gm=Ak("%#Lx"),_m=Ak("%LX"),Tm=Ak("%#LX"),Sm=Ak("%Lo"),Em=Ak("%#Lo"),xm=Ak("%Lu"),Am=Ak(sn),Im=Ak("%+d"),Cm=Ak("% d"),Nm=Ak("%i"),Om=Ak("%+i"),Rm=Ak("% i"),Lm=Ak("%x"),Pm=Ak("%#x"),Um=Ak("%X"),Dm=Ak("%#X"),Fm=Ak("%o"),Mm=Ak("%#o"),Xm=Ak("%u"),jm=Ak("@]"),Bm=Ak("@}"),qm=Ak("@?"),Gm=Ak("@\n"),Ym=Ak("@."),Jm=Ak("@@"),Hm=Ak("@%"),Wm=Ak("@"),Vm=Ak("CamlinternalFormat.Type_mismatch"),zm=Ak(Of),Km=[0,[11,Ak(", "),[2,0,[2,0,0]]],Ak(", %s%s")],Qm=Ak("Out of memory"),$m=Ak("Stack overflow"),Zm=Ak("Pattern matching failed"),tw=Ak("Assertion failed"),ew=Ak("Undefined recursive module"),rw=[0,[12,40,[2,0,[2,0,[12,41,0]]]],Ak("(%s%s)")],aw=Ak(Of),nw=Ak(Of),sw=[0,[12,40,[2,0,[12,41,0]]],Ak("(%s)")],cw=[0,[4,0,0,0,0],Ak(sn)],iw=[0,[3,0,0],Ak("%S")],uw=Ak("_"),fw=[3,0,3],ow=Ak(Qe),vw=Ak(">"),lw=Ak(""),kw=Ak("<"),dw=Ak("\n"),hw=Ak("Format.Empty_queue"),pw=[0,Ak(Of)],mw=Ak("TMPDIR"),ww=Ak("TEMP"),yw=Ak("Cygwin"),gw=Ak(Jv),_w=Ak("Win32"),Tw=[0,Ak("filename.ml"),191,9],Sw=[0,Ak("sedlexing.ml"),51,25],Ew=Ak("Sedlexing.MalFormed"),xw=Ak("Js.Error"),Aw=Ak(tv),Iw=[0,[0]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]]]],Zw=[0,Ak(Bf),1063,6],ty=[0,[0,[0,[0]],[0,[0]]]],ey=[0,Ak(Bf),1093,6],ry=[0,[0]],ay=[0,[0]],ny=[0,[0,[0,[0]]]],sy=[0,[0]],cy=[0,[0]],iy=[0,[0]],uy=[0,[0,[0,[0,[0,[0]],[0,[0]],[0,[0]]]],[0,[0,[0,[0]]]],[0,[0,[0,[0]],[0,[0]],[0,[0]],[0,[0]]]],[0,[0,[0,[0]]]],[0,[0]],[0,[0]]]],fy=[0,[0,[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0,[0,[0]]]],[0,[0]],[0,[0]],[0,[0,[0,[0]]]],[0,[0,[0,[0]]]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0,[0,[0]]]],[0,[0]],[0,[0]],[0,[0]],[0,[0]]]],oy=[0,[0,[0,[0]],[0,[0]],[0,[0,[0,[0]]]],[0,[0]],[0,[0,[0,[0]],[0,[0]]]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0,[0,[0]]]],[0,[0]],[0,[0]],[0,[0]]]],vy=[0,[0,[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]]]],ly=[0,[0,[0,[0,[0,[0]],[0,[0]]]],[0,[0,[0,[0]]]],[0,[0]],[0,[0]]]],by=[0,[0]],ky=[0,[0,[0,[0]],[0,[0]],[0,[0]],[0,[0]],[0,[0]]]],dy=[0,[0,[0,[0]],[0,[0]]]],hy=Ak(ka),py=Ak("Unexpected number"),my=Ak("Unexpected string"),wy=Ak("Unexpected identifier"),yy=Ak("Unexpected reserved word"),gy=Ak("Unexpected reserved type"),_y=Ak("Unexpected `super` outside of a class method"),Ty=Ak("`super()` is only valid in a class constructor"),Sy=Ak("Unexpected end of input"),Ey=Ak("Unexpected variance sigil"),xy=Ak("Unexpected static modifier"),Ay=Ak("Type aliases are not allowed in untyped mode"),Iy=Ak("Opaque type aliases are not allowed in untyped mode"),Cy=Ak("Type annotations are not allowed in untyped mode"),Ny=Ak("Type declarations are not allowed in untyped mode"),Oy=Ak("Type imports are not allowed in untyped mode"),Ry=Ak("Type exports are not allowed in untyped mode"),Ly=Ak("Interfaces are not allowed in untyped mode"),Py=Ak("Illegal newline after throw"),Uy=Ak("Invalid regular expression"),Dy=Ak("Invalid regular expression: missing /"),Fy=Ak("Invalid left-hand side in assignment"),My=Ak("Invalid left-hand side in exponentiation expression"),Xy=Ak("Invalid left-hand side in for-in"),jy=Ak("Invalid left-hand side in for-of"),By=Ak("found an expression instead"),qy=Ak("Expected an object pattern, array pattern, or an identifier but "),Gy=Ak("More than one default clause in switch statement"),Yy=Ak("Missing catch or finally after try"),Jy=Ak("Illegal continue statement"),Hy=Ak("Illegal break statement"),Wy=Ak("Illegal return statement"),Vy=Ak("Illegal Unicode escape"),zy=Ak("Strict mode code may not include a with statement"),Ky=Ak("Catch variable may not be eval or arguments in strict mode"),Qy=Ak("Variable name may not be eval or arguments in strict mode"),$y=Ak("Parameter name eval or arguments is not allowed in strict mode"),Zy=Ak("Strict mode function may not have duplicate parameter names"),tg=Ak("Function name may not be eval or arguments in strict mode"),eg=Ak("Octal literals are not allowed in strict mode."),rg=Ak("Delete of an unqualified identifier in strict mode."),ag=Ak("Duplicate data property in object literal not allowed in strict mode"),ng=Ak("Object literal may not have data and accessor property with the same name"),sg=Ak("Object literal may not have multiple get/set accessors with the same name"),cg=Ak("Assignment to eval or arguments is not allowed in strict mode"),ig=Ak("Postfix increment/decrement may not have eval or arguments operand in strict mode"),ug=Ak("Prefix increment/decrement may not have eval or arguments operand in strict mode"),fg=Ak("Use of future reserved word in strict mode"),og=Ak("JSX attributes must only be assigned a non-empty expression"),vg=Ak("JSX value should be either an expression or a quoted JSX text"),lg=Ak("Const must be initialized"),bg=Ak("Destructuring assignment must be initialized"),kg=Ak("Illegal newline before arrow"),dg=Ak(Qa),hg=Ak("Async functions can only be declared at top level or "),pg=Ak(Qa),mg=Ak("Generators can only be declared at top level or "),wg=Ak("elements must be wrapped in an enclosing parent tag"),yg=Ak("Unexpected token <. Remember, adjacent JSX "),gg=Ak("Rest parameter must be final parameter of an argument list"),_g=Ak("Rest element must be final element of an array pattern"),Tg=Ak("Rest property must be final property of an object pattern"),Sg=Ak("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."),Eg=Ak("`declare export let` is not supported. Use `declare export var` instead."),xg=Ak("`declare export const` is not supported. Use `declare export var` instead."),Ag=Ak("`declare export type` is not supported. Use `export type` instead."),Ig=Ak("`declare export interface` is not supported. Use `export interface` instead."),Cg=Ak("`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"),Ng=Ak("When exporting a class as a named export, you must specify a class name. Did you mean `export default class ...`?"),Og=Ak("When exporting a function as a named export, you must specify a function name. Did you mean `export default function ...`?"),Rg=Ak("Found a decorator in an unsupported position."),Lg=Ak("Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),Pg=Ak("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."),Ug=Ak("Duplicate `declare module.exports` statement!"),Dg=Ak("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."),Fg=Ak("Getter should have zero parameters"),Mg=Ak("Setter should have exactly one parameter"),Xg=Ak("`import type` or `import typeof`!"),jg=Ak("Imports within a `declare module` body must always be "),Bg=Ak("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"),qg=Ak("Missing comma between import specifiers"),Gg=Ak("Missing comma between export specifiers"),Yg=Ak("Malformed unicode"),Jg=Ak("Classes may only have one constructor"),Hg=Ak("Classes may not have private methods."),Wg=Ak("Private fields may not be deleted."),Vg=Ak("Private fields can only be referenced from within a class."),zg=Ak("You may not access a private field through the `super` keyword."),Kg=Ak("Yield expression not allowed in formal parameter"),Qg=Ak("`await` is an invalid identifier in async functions"),$g=Ak("`yield` is an invalid identifier in generators"),Zg=Ak("either a `let` binding pattern, or a member expression."),t_=Ak("`let [` is ambiguous in this position because it is "),e_=Ak("Literals cannot be used as shorthand properties."),r_=Ak("Computed properties must have a value."),a_=Ak("Object pattern can't contain methods"),n_=Ak("A trailing comma is not permitted after the rest element"),s_=Ak("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."),c_=Ak("`new` may not be combined with an optional chain."),i_=Ak("Template literals may not be used in an optional chain."),u_=Ak("Unexpected parser state: "),f_=Ak("Unexpected token "),o_=[0,[11,Ak("Unexpected token `"),[2,0,[11,Ak("`. Did you mean `"),[2,0,[11,Ak("`?"),0]]]]],Ak("Unexpected token `%s`. Did you mean `%s`?")],v_=Ak("'"),l_=Ak("Invalid flags supplied to RegExp constructor '"),b_=Ak("'"),k_=Ak("Undefined label '"),d_=Ak("' has already been declared"),h_=Ak(" '"),p_=Ak("Expected corresponding JSX closing tag for "),m_=Ak(Qa),w_=Ak("In strict mode code, functions can only be declared at top level or "),y_=Ak("inside a block, or as the body of an if statement."),g_=Ak("In non-strict mode code, functions can only be declared at top level, "),__=[0,[11,Ak("Duplicate export for `"),[2,0,[12,96,0]]],Ak("Duplicate export for `%s`")],T_=Ak("` is declared more than once."),S_=Ak("Private fields may only be declared once. `#"),E_=Ak("static "),x_=Ak(Of),A_=Ak("#"),I_=Ak("`."),C_=Ak("fields named `"),N_=Ak("Classes may not have "),O_=Ak("` has not been declared."),R_=Ak("Private fields must be declared before they can be referenced. `#"),L_=Ak("Parse_error.Error"),P_=Ak("comments"),U_=Ak(Rn),D_=Ak("Program"),F_=Ak("DebuggerStatement"),M_=Ak("EmptyStatement"),X_=Ak(mi),j_=Ak("BreakStatement"),B_=Ak(mi),q_=Ak("ContinueStatement"),G_=Ak(ql),Y_=Ak("DeclareExportAllDeclaration"),J_=Ak(ql),H_=Ak(sk),W_=Ak(is),V_=Ak(Cf),z_=Ak("DeclareExportDeclaration"),K_=Ak(tr),Q_=Ak(Rn),$_=Ak(Jc),Z_=Ak("DeclareModule"),tT=Ak(tk),eT=Ak("DeclareModuleExports"),rT=Ak(dc),aT=Ak(Rn),nT=Ak("DoWhileStatement"),sT=Ak(Rf),cT=Ak(is),iT=Ak("ExportDefaultDeclaration"),uT=Ak(Rf),fT=Ak(ql),oT=Ak("ExportAllDeclaration"),vT=Ak(Rf),lT=Ak(ql),bT=Ak(sk),kT=Ak(is),dT=Ak("ExportNamedDeclaration"),hT=Ak("directive"),pT=Ak(Ar),mT=Ak("ExpressionStatement"),wT=Ak(Rn),yT=Ak("update"),gT=Ak(dc),_T=Ak(ks),TT=Ak("ForStatement"),ST=Ak("each"),ET=Ak(Rn),xT=Ak(Cn),AT=Ak(Du),IT=Ak("ForInStatement"),CT=Ak("ForAwaitStatement"),NT=Ak("ForOfStatement"),OT=Ak(Rn),RT=Ak(Cn),LT=Ak(Du),PT=Ak(Je),UT=Ak(y),DT=Ak(dc),FT=Ak("IfStatement"),MT=Ak(se),XT=Ak(Wu),jT=Ak(Cr),BT=Ak(lk),qT=Ak(ql),GT=Ak(sk),YT=Ak("ImportDeclaration"),JT=Ak(Rn),HT=Ak(mi),WT=Ak("LabeledStatement"),VT=Ak(Df),zT=Ak("ReturnStatement"),KT=Ak("cases"),QT=Ak("discriminant"),$T=Ak("SwitchStatement"),ZT=Ak(Df),tS=Ak("ThrowStatement"),eS=Ak("finalizer"),rS=Ak("handler"),aS=Ak("block"),nS=Ak("TryStatement"),sS=Ak(Rn),cS=Ak(dc),iS=Ak("WhileStatement"),uS=Ak(Rn),fS=Ak(uu),oS=Ak("WithStatement"),vS=Ak("Super"),lS=Ak("ThisExpression"),bS=Ak(Rv),kS=Ak("ArrayExpression"),dS=Ak(ic),hS=Ak(xu),pS=Ak(Ar),mS=Ak(vl),wS=Ak(Kl),yS=Ak(Ru),gS=Ak(Rn),_S=Ak(A),TS=Ak(Jc),SS=Ak("ArrowFunctionExpression"),ES=Ak("="),xS=Ak("+="),AS=Ak("-="),IS=Ak("*="),CS=Ak("**="),NS=Ak("/="),OS=Ak("%="),RS=Ak("<<="),LS=Ak(">>="),PS=Ak(">>>="),US=Ak("|="),DS=Ak("^="),FS=Ak("&="),MS=Ak(Cn),XS=Ak(Du),jS=Ak(zv),BS=Ak("AssignmentExpression"),qS=Ak("=="),GS=Ak("!="),YS=Ak("==="),JS=Ak("!=="),HS=Ak("<"),WS=Ak("<="),VS=Ak(">"),zS=Ak(">="),KS=Ak("<<"),QS=Ak(">>"),$S=Ak(">>>"),ZS=Ak(zf),tE=Ak(Cu),eE=Ak("*"),rE=Ak("**"),aE=Ak(Io),nE=Ak("%"),sE=Ak("|"),cE=Ak("^"),iE=Ak("&"),uE=Ak("in"),fE=Ak(Lf),oE=Ak(Cn),vE=Ak(Du),lE=Ak(zv),bE=Ak("BinaryExpression"),kE=Ak(Sl),dE=Ak($n),hE=Ak(rl),pE=Ak(Bs),mE=Ak("filter"),wE=Ak("blocks"),yE=Ak("ComprehensionExpression"),gE=Ak(Je),_E=Ak(y),TE=Ak(dc),SE=Ak("ConditionalExpression"),EE=Ak("filter"),xE=Ak("blocks"),AE=Ak("GeneratorExpression"),IE=Ak($n),CE=Ak("Import"),NE=Ak(rl),OE=Ak(Bs),RE=Ak("&&"),LE=Ak("||"),PE=Ak(Cn),UE=Ak(Du),DE=Ak(zv),FE=Ak("LogicalExpression"),ME=Ak(Sl),XE=Ak(Xc),jE=Ak(Lo),BE=Ak(uu),qE=Ak("MemberExpression"),GE=Ak(Lo),YE=Ak("meta"),JE=Ak("MetaProperty"),HE=Ak($n),WE=Ak(rl),VE=Ak("NewExpression"),zE=Ak(Wn),KE=Ak("ObjectExpression"),QE=Ak(Kr),$E=Ak("SequenceExpression"),ZE=Ak(tk),tx=Ak(Ar),ex=Ak("TypeCastExpression"),rx=Ak(Df),ax=Ak("AwaitExpression"),nx=Ak(Cu),sx=Ak(zf),cx=Ak("!"),ix=Ak("~"),ux=Ak(Wu),fx=Ak(lo),ox=Ak(uc),vx=Ak("matched above"),lx=Ak(Df),bx=Ak("prefix"),kx=Ak(zv),dx=Ak("UnaryExpression"),hx=Ak("--"),px=Ak("++"),mx=Ak("prefix"),wx=Ak(Df),yx=Ak(zv),gx=Ak("UpdateExpression"),_x=Ak("delegate"),Tx=Ak(Df),Sx=Ak("YieldExpression"),Ex=Ak(ic),xx=Ak(xu),Ax=Ak(Ar),Ix=Ak(vl),Cx=Ak(Kl),Nx=Ak(Ru),Ox=Ak(Rn),Rx=Ak(A),Lx=Ak(Jc),Px=Ak("FunctionDeclaration"),Ux=Ak(ic),Dx=Ak(xu),Fx=Ak(Ar),Mx=Ak(vl),Xx=Ak(Kl),jx=Ak(Ru),Bx=Ak(Rn),qx=Ak(A),Gx=Ak(Jc),Yx=Ak("FunctionExpression"),Jx=Ak(Sl),Hx=Ak(tk),Wx=Ak(Kv),Vx=Ak(u),zx=Ak(Jc),Kx=Ak("PrivateName"),Qx=Ak(Sl),$x=Ak(tk),Zx=Ak(Kv),tA=Ak(u),eA=Ak(y),rA=Ak(dc),aA=Ak("SwitchCase"),nA=Ak(Rn),sA=Ak("param"),cA=Ak("CatchClause"),iA=Ak(Rn),uA=Ak("BlockStatement"),fA=Ak(Jc),oA=Ak("DeclareVariable"),vA=Ak(vl),lA=Ak(Jc),bA=Ak("DeclareFunction"),kA=Ak(vk),dA=Ak(Rn),hA=Ak(ic),pA=Ak(Jc),mA=Ak("DeclareClass"),wA=Ak(vk),yA=Ak(Rn),gA=Ak(ic),_A=Ak(Jc),TA=Ak("DeclareInterface"),SA=Ak(Cr),EA=Ak(se),xA=Ak(ta),AA=Ak("ExportNamespaceSpecifier"),IA=Ak(Cn),CA=Ak(ic),NA=Ak(Jc),OA=Ak("DeclareTypeAlias"),RA=Ak(Cn),LA=Ak(ic),PA=Ak(Jc),UA=Ak("TypeAlias"),DA=Ak("DeclareOpaqueType"),FA=Ak("OpaqueType"),MA=Ak("supertype"),XA=Ak("impltype"),jA=Ak(ic),BA=Ak(Jc),qA=Ak(tt),GA=Ak(De),YA=Ak(Xi),JA=Ak(ic),HA=Ak(ec),WA=Ak(Rn),VA=Ak(Jc),zA=Ak("ClassDeclaration"),KA=Ak(tt),QA=Ak(De),$A=Ak(Xi),ZA=Ak(ic),tI=Ak(ec),eI=Ak(Rn),rI=Ak(Jc),aI=Ak("ClassExpression"),nI=Ak(ic),sI=Ak(Jc),cI=Ak("ClassImplements"),iI=Ak(Rn),uI=Ak("ClassBody"),fI=Ak(P),oI=Ak(lt),vI=Ak($r),lI=Ak(En),bI=Ak(tt),kI=Ak(Xc),dI=Ak(cs),hI=Ak(tr),pI=Ak(Cr),mI=Ak(Bb),wI=Ak("MethodDefinition"),yI=Ak(b),gI=Ak(cs),_I=Ak(tk),TI=Ak(Cr),SI=Ak(Bb),EI=Ak("ClassPrivateProperty"),xI=Ak("Internal Error: Private name found in class prop"),AI=Ak(b),II=Ak(cs),CI=Ak(Xc),NI=Ak(tk),OI=Ak(Cr),RI=Ak(Bb),LI=Ak("ClassProperty"),PI=Ak(vk),UI=Ak(Rn),DI=Ak(ic),FI=Ak(Jc),MI=Ak("InterfaceDeclaration"),XI=Ak(ic),jI=Ak(Jc),BI=Ak("InterfaceExtends"),qI=Ak(tk),GI=Ak(Wn),YI=Ak("ObjectPattern"),JI=Ak(tk),HI=Ak(Rv),WI=Ak("ArrayPattern"),VI=Ak(Cn),zI=Ak(Du),KI=Ak("AssignmentPattern"),QI=Ak(Df),$I=Ak(Yb),ZI=Ak(Df),tC=Ak(Yb),eC=Ak(ks),rC=Ak(ks),aC=Ak($r),nC=Ak(En),sC=Ak(ki),cC=Ak(Xc),iC=Ak(Si),uC=Ak(lt),fC=Ak(tr),oC=Ak(Cr),vC=Ak(Bb),lC=Ak(Le),bC=Ak(Df),kC=Ak("SpreadProperty"),dC=Ak(Xc),hC=Ak(Si),pC=Ak(lt),mC=Ak(tr),wC=Ak(Cr),yC=Ak(Bb),gC=Ak(Le),_C=Ak(Df),TC=Ak("RestProperty"),SC=Ak(Df),EC=Ak("SpreadElement"),xC=Ak("each"),AC=Ak(Cn),IC=Ak(Du),CC=Ak("ComprehensionBlock"),NC=Ak("flags"),OC=Ak("pattern"),RC=Ak("regex"),LC=Ak(Be),PC=Ak(Cr),UC=Ak(Be),DC=Ak(Cr),FC=Ak(Xo),MC=Ak(Be),XC=Ak(Cr),jC=Ak(Xo),BC=Ak(Kr),qC=Ak("quasis"),GC=Ak("TemplateLiteral"),YC=Ak("cooked"),JC=Ak(Be),HC=Ak("tail"),WC=Ak(Cr),VC=Ak("TemplateElement"),zC=Ak("quasi"),KC=Ak("tag"),QC=Ak("TaggedTemplateExpression"),$C=Ak(J),ZC=Ak(ko),tN=Ak(cc),eN=Ak(tr),rN=Ak("declarations"),aN=Ak("VariableDeclaration"),nN=Ak(ks),sN=Ak(Jc),cN=Ak("VariableDeclarator"),iN=Ak(tr),uN=Ak("Variance"),fN=Ak("AnyTypeAnnotation"),oN=Ak("MixedTypeAnnotation"),vN=Ak("EmptyTypeAnnotation"),lN=Ak("VoidTypeAnnotation"),bN=Ak("NullLiteralTypeAnnotation"),kN=Ak("NumberTypeAnnotation"),dN=Ak("StringTypeAnnotation"),hN=Ak("BooleanTypeAnnotation"),pN=Ak(tk),mN=Ak("NullableTypeAnnotation"),wN=Ak(ic),yN=Ak("rest"),gN=Ak(xu),_N=Ak(A),TN=Ak("FunctionTypeAnnotation"),SN=Ak(Sl),EN=Ak(tk),xN=Ak(Kv),AN=Ak("FunctionTypeParam"),IN=[0,0,0,0],CN=Ak("callProperties"),NN=Ak("indexers"),ON=Ak(Wn),RN=Ak("exact"),LN=Ak("ObjectTypeAnnotation"),PN=Ak(ki),UN=Ak("There should not be computed object type property keys"),DN=Ak(ks),FN=Ak($r),MN=Ak(En),XN=Ak(tr),jN=Ak(b),BN=Ak(cs),qN=Ak(Sl),GN=Ak(lt),YN=Ak(Cr),JN=Ak(Bb),HN=Ak("ObjectTypeProperty"),WN=Ak(Df),VN=Ak("ObjectTypeSpreadProperty"),zN=Ak(b),KN=Ak(cs),QN=Ak(Cr),$N=Ak(Bb),ZN=Ak(Jc),tO=Ak("ObjectTypeIndexer"),eO=Ak(cs),rO=Ak(Cr),aO=Ak("ObjectTypeCallProperty"),nO=Ak("elementType"),sO=Ak("ArrayTypeAnnotation"),cO=Ak(Jc),iO=Ak("qualification"),uO=Ak("QualifiedTypeIdentifier"),fO=Ak(ic),oO=Ak(Jc),vO=Ak("GenericTypeAnnotation"),lO=Ak(bl),bO=Ak("UnionTypeAnnotation"),kO=Ak(bl),dO=Ak("IntersectionTypeAnnotation"),hO=Ak(Df),pO=Ak("TypeofTypeAnnotation"),mO=Ak(bl),wO=Ak("TupleTypeAnnotation"),yO=Ak(Be),gO=Ak(Cr),_O=Ak("StringLiteralTypeAnnotation"),TO=Ak(Be),SO=Ak(Cr),EO=Ak("NumberLiteralTypeAnnotation"),xO=Ak(Wc),AO=Ak(vc),IO=Ak(Be),CO=Ak(Cr),NO=Ak("BooleanLiteralTypeAnnotation"),OO=Ak("ExistsTypeAnnotation"),RO=Ak(tk),LO=Ak("TypeAnnotation"),PO=Ak(A),UO=Ak("TypeParameterDeclaration"),DO=Ak(Cf),FO=Ak(b),MO=Ak("bound"),XO=Ak(Kv),jO=Ak("TypeParameter"),BO=Ak(A),qO=Ak("TypeParameterInstantiation"),GO=Ak(i),YO=Ak("closingElement"),JO=Ak("openingElement"),HO=Ak("JSXElement"),WO=Ak("closingFragment"),VO=Ak(i),zO=Ak("openingFragment"),KO=Ak("JSXFragment"),QO=Ak("selfClosing"),$O=Ak("attributes"),ZO=Ak(Kv),tR=Ak("JSXOpeningElement"),eR=Ak("JSXOpeningFragment"),rR=Ak(Kv),aR=Ak("JSXClosingElement"),nR=Ak("JSXClosingFragment"),sR=Ak(Ar),cR=Ak("JSXSpreadChild"),iR=Ak(Cr),uR=Ak(Kv),fR=Ak("JSXAttribute"),oR=Ak(Df),vR=Ak("JSXSpreadAttribute"),lR=Ak("JSXEmptyExpression"),bR=Ak(Ar),kR=Ak("JSXExpressionContainer"),dR=Ak(Be),hR=Ak(Cr),pR=Ak("JSXText"),mR=Ak(Lo),wR=Ak(uu),yR=Ak("JSXMemberExpression"),gR=Ak(Kv),_R=Ak("namespace"),TR=Ak("JSXNamespacedName"),SR=Ak(Kv),ER=Ak("JSXIdentifier"),xR=Ak(ta),AR=Ak(hv),IR=Ak("ExportSpecifier"),CR=Ak(hv),NR=Ak("ImportDefaultSpecifier"),OR=Ak(hv),RR=Ak("ImportNamespaceSpecifier"),LR=Ak(lk),PR=Ak(hv),UR=Ak("imported"),DR=Ak("ImportSpecifier"),FR=Ak("Block"),MR=Ak("Line"),XR=Ak(Cr),jR=Ak(Cr),BR=Ak("DeclaredPredicate"),qR=Ak("InferredPredicate"),GR=Ak("message"),YR=Ak("loc"),JR=Ak(se),HR=Ak("loc"),WR=Ak("range"),VR=Ak("end"),zR=Ak("start"),KR=Ak(ql),QR=Ak("column"),$R=Ak("line"),ZR=[0,1,0],tL=Ak("{"),eL=Ak("}"),rL=Ak("{|"),aL=Ak("|}"),nL=Ak("("),sL=Ak(")"),cL=Ak("["),iL=Ak("]"),uL=Ak(";"),fL=Ak(","),oL=Ak(Qe),vL=Ak("=>"),lL=Ak("..."),bL=Ak("@"),kL=Ak("#"),dL=Ak(Ko),hL=Ak("if"),pL=Ak("in"),mL=Ak(Lf),wL=Ak(ca),yL=Ak(Te),gL=Ak(te),_L=Ak(kt),TL=Ak("try"),SL=Ak(J),EL=Ak(Nv),xL=Ak(pv),AL=Ak(cc),IL=Ak(ko),CL=Ak(Hr),NL=Ak(vc),OL=Ak(Wc),RL=Ak(fu),LL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ET"),yU=Ak("T_SEMICOLON"),gU=Ak("T_COMMA"),_U=Ak("T_PERIOD"),TU=Ak("T_ARROW"),SU=Ak("T_ELLIPSIS"),EU=Ak("T_AT"),xU=Ak("T_POUND"),AU=Ak("T_FUNCTION"),IU=Ak("T_IF"),CU=Ak("T_IN"),NU=Ak("T_INSTANCEOF"),OU=Ak("T_RETURN"),RU=Ak("T_SWITCH"),LU=Ak("T_THIS"),PU=Ak("T_THROW"),UU=Ak("T_TRY"),DU=Ak("T_VAR"),FU=Ak("T_WHILE"),MU=Ak("T_WITH"),XU=Ak("T_CONST"),jU=Ak("T_LET"),BU=Ak("T_NULL"),qU=Ak("T_FALSE"),GU=Ak("T_TRUE"),YU=Ak("T_BREAK"),JU=Ak("T_CASE"),HU=Ak("T_CATCH"),WU=Ak("T_CONTINUE"),VU=Ak("T_DEFAULT"),zU=Ak("T_DO"),KU=Ak("T_FINALLY"),QU=Ak("T_FOR"),$U=Ak("T_CLASS"),ZU=Ak("T_EXTENDS"),tD=Ak("T_STATIC"),eD=Ak("T_ELSE"),rD=Ak("T_NEW"),aD=Ak("T_DELETE"),nD=Ak("T_TYPEOF"),sD=Ak("T_VOID"),cD=Ak("T_ENUM"),iD=Ak("T_EXPORT"),uD=Ak("T_IMPORT"),fD=Ak("T_SUPER"),oD=Ak("T_IMPLEMENTS"),vD=Ak("T_INTERFACE"),lD=Ak("T_PACKAGE"),bD=Ak("T_PRIVATE"),kD=Ak("T_PROTECTED"),dD=Ak("T_PUBLIC"),hD=Ak("T_YIELD"),pD=Ak("T_DEBUGGER"),mD=Ak("T_DECLARE"),wD=Ak("T_TYPE"),yD=Ak("T_OPAQUE"),gD=Ak("T_OF"),_D=Ak("T_ASYNC"),TD=Ak("T_AWAIT"),SD=Ak("T_CHECKS"),ED=Ak("T_RSHIFT3_ASSIGN"),xD=Ak("T_RSHIFT_ASSIGN"),AD=Ak("T_LSHIFT_ASSIGN"),ID=Ak("T_BIT_XOR_ASSIGN"),CD=Ak("T_BIT_OR_ASSIGN"),ND=Ak("T_BIT_AND_ASSIGN"),OD=Ak("T_MOD_ASSIGN"),RD=Ak("T_DIV_ASSIGN"),LD=Ak("T_MULT_ASSIGN"),PD=Ak("T_EXP_ASSIGN"),UD=Ak("T_MINUS_ASSIGN"),DD=Ak("T_PLUS_ASSIGN"),FD=Ak("T_ASSIGN"),MD=Ak("T_PLING_PERIOD"),XD=Ak("T_PLING"),jD=Ak("T_COLON"),BD=Ak("T_OR"),qD=Ak("T_AND"),GD=Ak("T_BIT_OR"),YD=Ak("T_BIT_XOR"),JD=Ak("T_BIT_AND"),HD=Ak("T_EQUAL"),WD=Ak("T_NOT_EQUAL"),VD=Ak("T_STRICT_EQUAL"),zD=Ak("T_STRICT_NOT_EQUAL"),KD=Ak("T_LESS_THAN_EQUAL"),QD=Ak("T_GREATER_THAN_EQUAL"),$D=Ak("T_LESS_THAN"),ZD=Ak("T_GREATER_THAN"),tF=Ak("T_LSHIFT"),eF=Ak("T_RSHIFT"),rF=Ak("T_RSHIFT3"),aF=Ak("T_PLUS"),nF=Ak("T_MINUS"),sF=Ak("T_DIV"),cF=Ak("T_MULT"),iF=Ak("T_EXP"),uF=Ak("T_MOD"),fF=Ak("T_NOT"),oF=Ak("T_BIT_NOT"),vF=Ak("T_INCR"),lF=Ak("T_DECR"),bF=Ak("T_EOF"),kF=Ak("T_ANY_TYPE"),dF=Ak("T_MIXED_TYPE"),hF=Ak("T_EMPTY_TYPE"),pF=Ak("T_NUMBER_TYPE"),mF=Ak("T_STRING_TYPE"),wF=Ak("T_VOID_TYPE"),yF=Ak("T_NUMBER"),gF=Ak("T_STRING"),_F=Ak("T_TEMPLATE_PART"),TF=Ak("T_IDENTIFIER"),SF=Ak("T_REGEXP"),EF=Ak("T_ERROR"),xF=Ak("T_JSX_IDENTIFIER"),AF=Ak("T_JSX_TEXT"),IF=Ak("T_BOOLEAN_TYPE"),CF=Ak("T_NUMBER_SINGLETON_TYPE"),NF=Ak("*-/"),OF=Ak("*/"),RF=Ak("*-/"),LF=Ak(iv),PF=Ak(iv),UF=Ak("\\"),DF=Ak(iv),FF=Ak("${"),MF=Ak("\r\n"),XF=Ak("\r\n"),jF=Ak("\n"),BF=Ak(iv),qF=Ak("\\\\"),GF=Ak(iv),YF=Ak(Of),JF=Ak(Of),HF=Ak(Of),WF=Ak(Of),VF=Ak(iv),zF=Ak(iv),KF=Ak("'"),QF=Ak('"'),$F=Ak("<"),ZF=Ak("{"),tM=Ak(_l),eM=Ak("iexcl"),rM=Ak("aelig"),aM=Ak("Nu"),nM=Ak("Eacute"),sM=Ak("Atilde"),cM=Ak("'int'"),iM=Ak("AElig"),uM=Ak("Aacute"),fM=Ak("Acirc"),oM=Ak("Agrave"),vM=Ak("Alpha"),lM=Ak("Aring"),bM=[0,197],kM=[0,913],dM=[0,Ec],hM=[0,194],pM=[0,193],mM=[0,198],wM=[0,8747],yM=Ak("Auml"),gM=Ak("Beta"),_M=Ak("Ccedil"),TM=Ak("Chi"),SM=Ak("Dagger"),EM=Ak("Delta"),xM=Ak("ETH"),AM=[0,208],IM=[0,916],CM=[0,8225],NM=[0,935],OM=[0,199],RM=[0,914],LM=[0,196],PM=[0,195],UM=Ak("Icirc"),DM=Ak("Ecirc"),FM=Ak("Egrave"),MM=Ak("Epsilon"),XM=Ak("Eta"),jM=Ak("Euml"),BM=Ak("Gamma"),qM=Ak("Iacute"),GM=[0,205],YM=[0,915],JM=[0,203],HM=[0,919],WM=[0,917],VM=[0,200],zM=[0,202],KM=Ak("Igrave"),QM=Ak("Iota"),$M=Ak("Iuml"),ZM=Ak("Kappa"),tX=Ak("Lambda"),eX=Ak("Mu"),rX=Ak("Ntilde"),aX=[0,209],nX=[0,924],sX=[0,923],cX=[0,922],iX=[0,207],uX=[0,921],fX=[0,204],oX=[0,206],vX=[0,201],lX=Ak("Sigma"),bX=Ak("Otilde"),kX=Ak("OElig"),dX=Ak("Oacute"),hX=Ak("Ocirc"),pX=Ak("Ograve"),mX=Ak("Omega"),wX=Ak("Omicron"),yX=Ak("Oslash"),gX=[0,216],_X=[0,927],TX=[0,937],SX=[0,210],EX=[0,212],xX=[0,211],AX=[0,338],IX=Ak("Ouml"),CX=Ak("Phi"),NX=Ak("Pi"),OX=Ak("Prime"),RX=Ak("Psi"),LX=Ak("Rho"),PX=Ak("Scaron"),UX=[0,352],DX=[0,929],FX=[0,936],MX=[0,8243],XX=[0,928],jX=[0,934],BX=[0,214],qX=[0,213],GX=Ak("Uuml"),YX=Ak("THORN"),JX=Ak("Tau"),HX=Ak("Theta"),WX=Ak("Uacute"),VX=Ak("Ucirc"),zX=Ak("Ugrave"),KX=Ak("Upsilon"),QX=[0,933],$X=[0,217],ZX=[0,219],tj=[0,218],ej=[0,920],rj=[0,932],aj=[0,222],nj=Ak("Xi"),sj=Ak("Yacute"),cj=Ak("Yuml"),ij=Ak("Zeta"),uj=Ak("aacute"),fj=Ak("acirc"),oj=Ak("acute"),vj=[0,180],lj=[0,226],bj=[0,225],kj=[0,918],dj=[0,376],hj=[0,221],pj=[0,926],mj=[0,220],wj=[0,931],yj=[0,925],gj=Ak("delta"),_j=Ak("cap"),Tj=Ak("aring"),Sj=Ak("agrave"),Ej=Ak("alefsym"),xj=Ak("alpha"),Aj=Ak("amp"),Ij=Ak("and"),Cj=Ak("ang"),Nj=Ak("apos"),Oj=[0,39],Rj=[0,8736],Lj=[0,8743],Pj=[0,38],Uj=[0,945],Dj=[0,8501],Fj=[0,Qu],Mj=Ak("asymp"),Xj=Ak("atilde"),jj=Ak("auml"),Bj=Ak("bdquo"),qj=Ak("beta"),Gj=Ak("brvbar"),Yj=Ak("bull"),Jj=[0,8226],Hj=[0,166],Wj=[0,946],Vj=[0,8222],zj=[0,228],Kj=[0,227],Qj=[0,8776],$j=[0,229],Zj=Ak("copy"),tB=Ak("ccedil"),eB=Ak("cedil"),rB=Ak("cent"),aB=Ak("chi"),nB=Ak("circ"),sB=Ak("clubs"),cB=Ak("cong"),iB=[0,8773],uB=[0,9827],fB=[0,710],oB=[0,967],vB=[0,162],lB=[0,184],bB=[0,231],kB=Ak("crarr"),dB=Ak("cup"),hB=Ak("curren"),pB=Ak("dArr"),mB=Ak("dagger"),wB=Ak("darr"),yB=Ak("deg"),gB=[0,176],_B=[0,8595],TB=[0,8224],SB=[0,8659],EB=[0,164],xB=[0,8746],AB=[0,8629],IB=[0,169],CB=[0,8745],NB=Ak("fnof"),OB=Ak("ensp"),RB=Ak("diams"),LB=Ak("divide"),PB=Ak("eacute"),UB=Ak("ecirc"),DB=Ak("egrave"),FB=Ak(Ia),MB=Ak("emsp"),XB=[0,8195],jB=[0,8709],BB=[0,232],qB=[0,234],GB=[0,233],YB=[0,247],JB=[0,9830],HB=Ak("epsilon"),WB=Ak("equiv"),VB=Ak("eta"),zB=Ak("eth"),KB=Ak("euml"),QB=Ak("euro"),$B=Ak("exist"),ZB=[0,8707],tq=[0,8364],eq=[0,235],rq=[0,pl],aq=[0,951],nq=[0,8801],sq=[0,949],cq=[0,8194],iq=Ak("gt"),uq=Ak("forall"),fq=Ak("frac12"),oq=Ak("frac14"),vq=Ak("frac34"),lq=Ak("frasl"),bq=Ak("gamma"),kq=Ak("ge"),dq=[0,8805],hq=[0,947],pq=[0,8260],mq=[0,190],wq=[0,188],yq=[0,189],gq=[0,8704],_q=Ak("hArr"),Tq=Ak("harr"),Sq=Ak("hearts"),Eq=Ak("hellip"),xq=Ak("iacute"),Aq=Ak("icirc"),Iq=[0,238],Cq=[0,237],Nq=[0,8230],Oq=[0,9829],Rq=[0,8596],Lq=[0,8660],Pq=[0,62],Uq=[0,402],Dq=[0,948],Fq=[0,230],Mq=Ak("prime"),Xq=Ak("ndash"),jq=Ak("le"),Bq=Ak("kappa"),qq=Ak("igrave"),Gq=Ak("image"),Yq=Ak("infin"),Jq=Ak("iota"),Hq=Ak("iquest"),Wq=Ak("isin"),Vq=Ak("iuml"),zq=[0,239],Kq=[0,8712],Qq=[0,191],$q=[0,953],Zq=[0,8734],tG=[0,8465],eG=[0,236],rG=Ak("lArr"),aG=Ak("lambda"),nG=Ak("lang"),sG=Ak("laquo"),cG=Ak("larr"),iG=Ak("lceil"),uG=Ak("ldquo"),fG=[0,8220],oG=[0,8968],vG=[0,8592],lG=[0,171],bG=[0,10216],kG=[0,955],dG=[0,8656],hG=[0,954],pG=Ak("macr"),mG=Ak("lfloor"),wG=Ak("lowast"),yG=Ak("loz"),gG=Ak("lrm"),_G=Ak("lsaquo"),TG=Ak("lsquo"),SG=Ak("lt"),EG=[0,60],xG=[0,8216],AG=[0,8249],IG=[0,8206],CG=[0,9674],NG=[0,8727],OG=[0,8970],RG=Ak("mdash"),LG=Ak("micro"),PG=Ak("middot"),UG=Ak(Rc),DG=Ak("mu"),FG=Ak("nabla"),MG=Ak("nbsp"),XG=[0,160],jG=[0,8711],BG=[0,956],qG=[0,8722],GG=[0,183],YG=[0,181],JG=[0,8212],HG=[0,175],WG=[0,8804],VG=Ak("or"),zG=Ak("oacute"),KG=Ak("ne"),QG=Ak("ni"),$G=Ak("not"),ZG=Ak("notin"),tY=Ak("nsub"),eY=Ak("ntilde"),rY=Ak("nu"),aY=[0,957],nY=[0,241],sY=[0,8836],cY=[0,8713],iY=[0,172],uY=[0,8715],fY=[0,8800],oY=Ak("ocirc"),vY=Ak("oelig"),lY=Ak("ograve"),bY=Ak("oline"),kY=Ak("omega"),dY=Ak("omicron"),hY=Ak("oplus"),pY=[0,8853],mY=[0,959],wY=[0,969],yY=[0,Ce],gY=[0,242],_Y=[0,339],TY=[0,244],SY=[0,243],EY=Ak("part"),xY=Ak("ordf"),AY=Ak("ordm"),IY=Ak("oslash"),CY=Ak("otilde"),NY=Ak("otimes"),OY=Ak("ouml"),RY=Ak("para"),LY=[0,182],PY=[0,as],UY=[0,8855],DY=[0,Pc],FY=[0,Li],MY=[0,186],XY=[0,170],jY=Ak("permil"),BY=Ak("perp"),qY=Ak("phi"),GY=Ak("pi"),YY=Ak("piv"),JY=Ak("plusmn"),HY=Ak("pound"),WY=[0,163],VY=[0,177],zY=[0,982],KY=[0,960],QY=[0,966],$Y=[0,8869],ZY=[0,8240],tJ=[0,8706],eJ=[0,8744],rJ=[0,8211],aJ=Ak("sup1"),nJ=Ak("rlm"),sJ=Ak("raquo"),cJ=Ak("prod"),iJ=Ak("prop"),uJ=Ak("psi"),fJ=Ak("quot"),oJ=Ak("rArr"),vJ=Ak("radic"),lJ=Ak("rang"),bJ=[0,10217],kJ=[0,8730],dJ=[0,8658],hJ=[0,34],pJ=[0,968],mJ=[0,8733],wJ=[0,8719],yJ=Ak("rarr"),gJ=Ak("rceil"),_J=Ak("rdquo"),TJ=Ak("real"),SJ=Ak("reg"),EJ=Ak("rfloor"),xJ=Ak("rho"),AJ=[0,961],IJ=[0,8971],CJ=[0,174],NJ=[0,8476],OJ=[0,8221],RJ=[0,8969],LJ=[0,8594],PJ=[0,187],UJ=Ak("sigma"),DJ=Ak("rsaquo"),FJ=Ak("rsquo"),MJ=Ak("sbquo"),XJ=Ak("scaron"),jJ=Ak("sdot"),BJ=Ak("sect"),qJ=Ak("shy"),GJ=[0,173],YJ=[0,167],JJ=[0,8901],HJ=[0,353],WJ=[0,8218],VJ=[0,8217],zJ=[0,8250],KJ=Ak("sigmaf"),QJ=Ak("sim"),$J=Ak("spades"),ZJ=Ak("sub"),tH=Ak("sube"),eH=Ak("sum"),rH=Ak("sup"),aH=[0,8835],nH=[0,8721],sH=[0,8838],cH=[0,8834],iH=[0,9824],uH=[0,8764],fH=[0,962],oH=[0,963],vH=[0,8207],lH=Ak("uarr"),bH=Ak("thetasym"),kH=Ak("sup2"),dH=Ak("sup3"),hH=Ak("supe"),pH=Ak("szlig"),mH=Ak("tau"),wH=Ak("there4"),yH=Ak("theta"),gH=[0,952],_H=[0,8756],TH=[0,964],SH=[0,223],EH=[0,8839],xH=[0,179],AH=[0,178],IH=Ak("thinsp"),CH=Ak("thorn"),NH=Ak("tilde"),OH=Ak("times"),RH=Ak("trade"),LH=Ak("uArr"),PH=Ak("uacute"),UH=[0,cf],DH=[0,8657],FH=[0,8482],MH=[0,215],XH=[0,732],jH=[0,a],BH=[0,8201],qH=[0,977],GH=Ak("xi"),YH=Ak("ucirc"),JH=Ak("ugrave"),HH=Ak("uml"),WH=Ak("upsih"),VH=Ak("upsilon"),zH=Ak("uuml"),KH=Ak("weierp"),QH=[0,8472],$H=[0,Xb],ZH=[0,965],tW=[0,978],eW=[0,168],rW=[0,249],aW=[0,251],nW=Ak("yacute"),sW=Ak("yen"),cW=Ak("yuml"),iW=Ak("zeta"),uW=Ak("zwj"),fW=Ak("zwnj"),oW=[0,8204],vW=[0,Ou],lW=[0,950],bW=[0,Ll],kW=[0,165],dW=[0,Eu],hW=[0,958],pW=[0,8593],mW=[0,185],wW=[0,8242],yW=[0,161],gW=Ak(";"),_W=Ak("&"),TW=Ak(iv),SW=Ak("}"),EW=[0,Ak(Of),Ak(Of),Ak(Of)],xW=Ak(iv),AW=Ak(iv),IW=Ak(iv),CW=(Ak("789"),Ak(iv)),NW=Ak(iv),OW=Ak(iv),RW=Ak(iv),LW=Ak(":"),PW=Ak(":"),UW=Ak(mr),DW=(Ak("789"),[8,0]),FW=[8,1],MW=Ak(iv),XW=Ak(iv),jW=Ak("'"),BW=Ak(iv),qW=Ak(iv),GW=Ak(iv),YW=Ak(iv),JW=Ak(iv),HW=Ak(iv),WW=Ak(iv),VW=Ak(":"),zW=Ak(":"),KW=Ak(mr),QW=[5,Ak("#!")],$W=Ak("expected ?"),ZW=Ak(iv),tV=Ak(Ci),eV=Ak(V),rV=Ak(V),aV=Ak(Ci),nV=Ak("b"),sV=Ak(rc),cV=Ak("n"),iV=Ak("r"),uV=Ak("t"),fV=Ak("v"),oV=Ak(V),vV=Ak(_l),lV=Ak(_l),bV=Ak(iv),kV=Ak(_l),dV=Ak(_l),hV=Ak(iv),pV=Ak(V),mV=Ak(Ju),wV=Ak(Dn),yV=Ak(Mt),gV=(Ak("src/parser/lexer.ml"),Ak(Of),[1,Ak("ILLEGAL")]),_V=Ak(""),TV=Ak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,Ak(Of)],z0=Ak(Of),K0=Ak(P),Q0=Ak(P),$0=Ak($r),Z0=Ak(En),t1=[0,1],e1=[0,1],r1=[0,1],a1=Ak(P),n1=Ak(oi),s1=Ak(oi),c1=Ak("#constructor"),i1=[1,Ak("=")],u1=Ak(D),f1=Ak(Nu),o1=Ak("Internal Error: private name found in object props"),v1=Ak($r),l1=Ak(En),b1=Ak(Nb),k1=Ak(D),d1=Ak(Nu),h1=Ak(D),p1=Ak(Nu),m1=Ak(Nb),w1=[0,1],y1=Ak(Hc),g1=Ak(yn),_1=[0,Ak(Ct),1199,15],T1=Ak(Hc),S1=Ak(Cf),E1=Ak("other than an interface declaration!"),x1=Ak("Internal Flow Error! Parsed `export interface` into something "),A1=Ak(yn),I1=Ak("Internal Flow Error! Unexpected export statement declaration!"),C1=[0,33],N1=Ak(Hc),O1=Ak(yn),R1=[0,Ak(Of),Ak(Of)],L1=Ak("module"),P1=Ak("exports"),U1=[0,1],D1=Ak("module"),F1=[0,1],M1=Ak("mixins"),X1=[0,0],j1=[0,1],B1=Ak(yn),q1=Ak(Hc),G1=[0,73],Y1=[0,73],J1=[0,0],H1=[0,1],W1=Ak(Hc),V1=Ak(Hc),z1=Ak(Hc),K1=Ak(yn),Q1=[0,Ak(Of),Ak(Of)],$1=Ak("Parser error: No such thing as an expression pattern!"),Z1=Ak("Label"),t2=[0,0,0],e2=[0,23],r2=[0,Ak(Ct),210,20],a2=[0,22],n2=[0,Ak(Ct),232,20],s2=Ak(Nu),c2=Ak(ko),i2=Ak(D),u2=Ak("use strict"),f2=[0,0,0],o2=Ak("\n"),v2=Ak("Nooo: "),l2=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],b2=[0,Ak("src/parser/parser_flow.ml"),34,28],k2=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],d2=Ak("Internal error: ");function h2(t){if("number"==typeof t)return 0;switch(t[0]){case 0:return[0,h2(t[1])];case 1:return[1,h2(t[1])];case 2:return[2,h2(t[1])];case 3:return[3,h2(t[1])];case 4:return[4,h2(t[1])];case 5:return[5,h2(t[1])];case 6:return[6,h2(t[1])];case 7:return[7,h2(t[1])];case 8:return[8,t[1],h2(t[2])];case 9:var e=t[1];return[9,e,e,h2(t[3])];case 10:return[10,h2(t[1])];case 11:return[11,h2(t[1])];case 12:return[12,h2(t[1])];case 13:return[13,h2(t[1])];default:return[14,h2(t[1])]}}function p2(t,e){if("number"==typeof t)return e;switch(t[0]){case 0:return[0,p2(t[1],e)];case 1:return[1,p2(t[1],e)];case 2:return[2,t[1],p2(t[2],e)];case 3:return[3,t[1],p2(t[2],e)];case 4:var r=t[3],a=t[2];return[4,t[1],a,r,p2(t[4],e)];case 5:var n=t[3],s=t[2];return[5,t[1],s,n,p2(t[4],e)];case 6:var c=t[3],i=t[2];return[6,t[1],i,c,p2(t[4],e)];case 7:var u=t[3],f=t[2];return[7,t[1],f,u,p2(t[4],e)];case 8:var o=t[3],v=t[2];return[8,t[1],v,o,p2(t[4],e)];case 9:return[9,p2(t[1],e)];case 10:return[10,p2(t[1],e)];case 11:return[11,t[1],p2(t[2],e)];case 12:return[12,t[1],p2(t[2],e)];case 13:var l=t[2];return[13,t[1],l,p2(t[3],e)];case 14:var b=t[2];return[14,t[1],b,p2(t[3],e)];case 15:return[15,p2(t[1],e)];case 16:return[16,p2(t[1],e)];case 17:return[17,t[1],p2(t[2],e)];case 18:return[18,t[1],p2(t[2],e)];case 19:return[19,p2(t[1],e)];case 20:var k=t[2];return[20,t[1],k,p2(t[3],e)];case 21:return[21,t[1],p2(t[2],e)];case 22:return[22,p2(t[1],e)];case 23:return[23,t[1],p2(t[2],e)];default:var d=t[2];return[24,t[1],d,p2(t[3],e)]}}function m2(t){throw[0,ah,t]}function w2(t){throw[0,nh,t]}function y2(t){return 0<=t?t:0|-t}Hk();var g2=qn;function _2(t,e){var r=sd(t),a=sd(e),n=Dk(r+a|0);return yk(t,0,n,0,r),yk(e,0,n,r,a),n}function T2(t,e){return t?[0,t[1],T2(t[2],e)]:e}!function(t){var e=dk.fds[t];e.flags.wronly&&yd(X+t+" is writeonly");var r={file:e.file,offset:e.offset,fd:t,opened:!0,out:!1,refill:null};gd[r.fd]=r}(0);var S2=Md(1),E2=Md(2),x2=[0,function(t){return function(t){for(var e=t;;){if(!e)return 0;var r=e[2],a=e[1];try{_d(a)}catch(e){}e=r}}(function(){for(var t=0,e=0;e0)if(0==e&&(r>=t.l||2==t.t&&r>=t.c.length))0==a?(t.c=Of,t.t=2):(t.c=_k(r,String.fromCharCode(a)),t.t=r==t.l?0:2);else for(4!=t.t&&wk(t),r+=e;e=1;s--)r[a+s]=t[e+s];return 0}(t,e,r,a,n):w2(Dh)}function K2(t,e){var r=e.length-1-1|0;if(!(r<0))for(var a=0;;){if(Qd(t,e[a+1]),r===a)break;a=a+1|0}return 0}function Q2(t){if(t)for(var e=0,r=t,a=t[2],n=t[1];;)if(r)e=e+1|0,r=r[2];else for(var s=wd(e,n),c=1,i=a;;){if(!i)return s;var u=i[2];s[c+1]=i[1];c=c+1|0,i=u}return[0]}function $2(t){function e(t){return t?t[4]:0}function r(t,e,r){var a=t?t[4]:0,n=r?r[4]:0;return[0,t,e,r,n<=a?a+1|0:n+1|0]}function a(t,a,n){var s=t?t[4]:0,c=n?n[4]:0;if((c+2|0)>1,y=P2(w,e),g=d(w,e),_=d(t-w|0,y),T=0;;){if(g){if(_){var S=_[2],E=_[1],x=g[2],A=g[1],I=$d(b,A,E);if(0===I){g=x,_=S,T=[0,A,T];continue}if(0>1,y=P2(w,e),g=k(w,e),_=k(t-w|0,y),T=0;;){if(g){if(_){var S=_[2],E=_[1],x=g[2],A=g[1],I=$d(b,A,E);if(0===I){g=x,_=S,T=[0,A,T];continue}if(0<=I){_=S,T=[0,E,T];continue}g=x,T=[0,A,T];continue}return C2(g,T)}return C2(_,T)}},h=A2(e),p=2<=h?k(h,e):e,m=function(t,e){if(!(3>>0))switch(t){case 0:return[0,0,e];case 1:if(e)return[0,[0,0,e[1],0,1],e[2]];break;case 2:if(e){var a=e[2];if(a)return[0,[0,[0,0,e[1],0,1],a[1],0,2],a[2]]}break;default:if(e){var n=e[2];if(n){var s=n[2];if(s)return[0,[0,[0,0,e[1],0,1],n[1],[0,0,s[1],0,1],2],s[2]]}}}var c=t/2|0,i=m(c,e),u=i[2],f=i[1];if(u){var o=u[1],v=m((t-c|0)-1|0,u[2]),l=v[2];return[0,r(f,o,v[1]),l]}throw[0,uh,qh]};return m(A2(p),p)[1]}return n(v[1],n(l,n(o,n(u,s(c)))))}return n(l,n(o,n(u,s(c))))}return n(o,n(u,s(c)))}return n(u,s(c))}return s(c)}return 0}]}function Z2(t){var e=1<=t?t:1,r=W2>>0?1:0:65<=n?0:1;else{if(32===n)var c=1;else if(43<=n)switch(n+R|0){case 5:if(a<(r+2|0)&&1>>0)if(93<=n)var s=0;else s=1;else if(56<(n-1|0)>>>0)s=0;else s=1;if(s){e=e+1|0;continue}}else;r=1}if(r){var c=[0,0],i=sd(t)-1|0;if(!(i<0))for(var u=0;;){var f=cd(t,u);if(32<=f){var o=f+Pv|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<=f?13===f?1:0:8<=f?1:0;switch(v){case 0:b=4;break;case 1:b=2}if(c[1]=c[1]+b|0,i===u)break;u=u+1|0}if(c[1]===sd(t)){var k=sd(t),d=Dk(k);yk(t,0,d,0,k);var h=d}else{var p=Dk(c[1]);c[1]=0;var m=sd(t)-1|0;if(!(m<0))for(var w=0;;){var y=cd(t,w);if(35<=y)var g=92===y?1:uo<=y?0:2;else if(32<=y)g=34<=y?1:2;else if(14<=y)g=0;else switch(y){case 8:Nd(p,c[1],92),c[1]++,Nd(p,c[1],98);g=3;break;case 9:Nd(p,c[1],92),c[1]++,Nd(p,c[1],Qb);g=3;break;case 10:Nd(p,c[1],92),c[1]++,Nd(p,c[1],ou);g=3;break;case 13:Nd(p,c[1],92),c[1]++,Nd(p,c[1],Br);g=3;break;default:g=0}switch(g){case 0:Nd(p,c[1],92),c[1]++,Nd(p,c[1],48+(y/Uf|0)|0),c[1]++,Nd(p,c[1],48+((y/10|0)%10|0)|0),c[1]++,Nd(p,c[1],48+(y%10|0)|0);break;case 1:Nd(p,c[1],92),c[1]++,Nd(p,c[1],y);break;case 2:Nd(p,c[1],y)}if(c[1]++,m===w)break;w=w+1|0}h=p}}else h=t;var _=sd(h),T=F2(_+2|0,34);return yk(h,0,T,1,_),T}}function T3(t,e){switch(t){case 0:var r=Am;break;case 1:r=Im;break;case 2:r=Cm;break;case 3:r=Nm;break;case 4:r=Om;break;case 5:r=Rm;break;case 6:r=Lm;break;case 7:r=Pm;break;case 8:r=Um;break;case 9:r=Dm;break;case 10:r=Fm;break;case 11:r=Mm;break;default:r=Xm}return Yk(r,e)}function S3(t,e){switch(t){case 0:var r=em;break;case 1:r=rm;break;case 2:r=am;break;case 3:r=nm;break;case 4:r=sm;break;case 5:r=cm;break;case 6:r=im;break;case 7:r=um;break;case 8:r=fm;break;case 9:r=om;break;case 10:r=vm;break;case 11:r=lm;break;default:r=bm}return Yk(r,e)}function E3(t,e){switch(t){case 0:var r=qp;break;case 1:r=Gp;break;case 2:r=Yp;break;case 3:r=Jp;break;case 4:r=Hp;break;case 5:r=Wp;break;case 6:r=Vp;break;case 7:r=zp;break;case 8:r=Kp;break;case 9:r=Qp;break;case 10:r=$p;break;case 11:r=Zp;break;default:r=tm}return Yk(r,e)}function x3(t,e){switch(t){case 0:var r=km;break;case 1:r=dm;break;case 2:r=hm;break;case 3:r=pm;break;case 4:r=mm;break;case 5:r=wm;break;case 6:r=ym;break;case 7:r=gm;break;case 8:r=_m;break;case 9:r=Tm;break;case 10:r=Sm;break;case 11:r=Em;break;default:r=xm}return function(t,e){var r=Bk(t);r.signedconv&&function(t){return t[3]<<16<0}(e)&&(r.sign=-1,e=nd(e));var a=Of,n=Kk(r.base);do{var s=rd(e,n);e=s[1],a="0123456789abcdef".charAt(ad(s[2]))+a}while(!zk(e));if(r.prec>=0){r.filler=qb;var c=r.prec-a.length;c>0&&(a=_k(c,Ci)+a)}return qk(r,a)}(r,e)}function A3(t,e,r){if(16<=t){if(17<=t)switch(t+jf|0){case 2:var a=0;break;case 0:case 3:var n=43;a=1;break;default:n=32,a=1}else a=0;if(!a)n=45;var s=function(t,e,r){if(!isFinite(t))return isNaN(t)?Vk(mo):Vk(t>0?ge:"-infinity");var a=0==t&&1/t==-1/0?1:t>=0?0:1;a&&(t=-t);var n=0;if(0==t);else if(t<1)for(;t<1&&n>-1022;)t*=2,n--;else for(;t>=2;)t/=2,n++;var s=n<0?Of:zf,c=Of;if(a)c=Cu;else switch(r){case 43:c=zf;break;case 32:c=qb}if(e>=0&&e<13){var i=Math.pow(2,4*e);t=Math.round(t*i)/i}var u=t.toString(16);if(e>=0){var f=u.indexOf(Qe);if(f<0)u+=Qe+_k(e,Ci);else{var o=f+1+e;u.length=2.2250738585072014e-308?0:0!=t?1:2:isNaN(t)?4:3}(r),w=sd(p);if(3===m)return r<0?Xp:jp;if(4<=m)return Fp;for(var y=0;;){if(y===w)var g=0;else{var _=Ed(p,y)+Ms|0;if(!(23<_>>>0?55===_?1:0:21<(_-1|0)>>>0?1:0)){y=y+1|0;continue}g=1}return g?p:_2(p,Mp)}}return p}function I3(t,e,r,a,n,s,c,i){if("number"==typeof n){if("number"==typeof s)return 0===s?function(n){return P3(t,e,[4,r,$d(c,i,n)],a)}:function(n,s){return P3(t,e,[4,r,g3(n,$d(c,i,s))],a)};var u=s[1];return function(n){return P3(t,e,[4,r,g3(u,$d(c,i,n))],a)}}if(0===n[0]){var f=n[2],o=n[1];if("number"==typeof s)return 0===s?function(n){return P3(t,e,[4,r,y3(o,f,$d(c,i,n))],a)}:function(n,s){return P3(t,e,[4,r,y3(o,f,g3(n,$d(c,i,s)))],a)};var v=s[1];return function(n){return P3(t,e,[4,r,y3(o,f,g3(v,$d(c,i,n)))],a)}}var l=n[1];if("number"==typeof s)return 0===s?function(n,s){return P3(t,e,[4,r,y3(l,n,$d(c,i,s))],a)}:function(n,s,u){return P3(t,e,[4,r,y3(l,n,g3(s,$d(c,i,u)))],a)};var b=s[1];return function(n,s){return P3(t,e,[4,r,y3(l,n,g3(b,$d(c,i,s)))],a)}}function C3(t,e,r,a,n,s){if("number"==typeof n)return function(n){return P3(t,e,[4,r,Qd(s,n)],a)};if(0===n[0]){var c=n[2],i=n[1];return function(n){return P3(t,e,[4,r,y3(i,c,Qd(s,n))],a)}}var u=n[1];return function(n,c){return P3(t,e,[4,r,y3(u,n,Qd(s,c))],a)}}function N3(t,e,r,a,n){for(var s=e,c=a,i=n;;){if("number"==typeof i)return $d(s,r,c);switch(i[0]){case 0:var u=i[1];return function(t){return P3(s,r,[5,c,t],u)};case 1:var f=i[1];return function(t){var e=D2(t),a=sd(e),n=F2(a+2|0,39);return yk(e,0,n,1,a),P3(s,r,[4,c,n],f)};case 2:var o=i[2],v=i[1];return C3(s,r,c,o,v,function(t){return t});case 3:return C3(s,r,c,i[2],i[1],_3);case 4:return I3(s,r,c,i[4],i[2],i[3],T3,i[1]);case 5:return I3(s,r,c,i[4],i[2],i[3],S3,i[1]);case 6:return I3(s,r,c,i[4],i[2],i[3],E3,i[1]);case 7:return I3(s,r,c,i[4],i[2],i[3],x3,i[1]);case 8:var l=i[4],b=i[3],k=i[2],d=i[1];if("number"==typeof k){if("number"==typeof b)return 0===b?function(t){return P3(s,r,[4,c,A3(d,n3,t)],l)}:function(t,e){return P3(s,r,[4,c,A3(d,t,e)],l)};var h=b[1];return function(t){return P3(s,r,[4,c,A3(d,h,t)],l)}}if(0===k[0]){var p=k[2],m=k[1];if("number"==typeof b)return 0===b?function(t){return P3(s,r,[4,c,y3(m,p,A3(d,n3,t))],l)}:function(t,e){return P3(s,r,[4,c,y3(m,p,A3(d,t,e))],l)};var w=b[1];return function(t){return P3(s,r,[4,c,y3(m,p,A3(d,w,t))],l)}}var y=k[1];if("number"==typeof b)return 0===b?function(t,e){return P3(s,r,[4,c,y3(y,t,A3(d,n3,e))],l)}:function(t,e,a){return P3(s,r,[4,c,y3(y,t,A3(d,e,a))],l)};var g=b[1];return function(t,e){return P3(s,r,[4,c,y3(y,t,A3(d,g,e))],l)};case 9:var _=i[1];return function(t){return P3(s,r,[4,c,t?gh:_h],_)};case 10:c=[7,c],i=i[1];continue;case 11:c=[2,c,i[1]],i=i[2];continue;case 12:c=[3,c,i[1]],i=i[2];continue;case 13:var T=i[3],S=i[2],E=s3(16);o3(E,S);var x=f3(E);return function(t){return P3(s,r,[4,c,x],T)};case 14:var A=i[3],I=i[2];return function(t){var e=m3(t[1],h2(v3(I)));if("number"==typeof e[2])return P3(s,r,c,p2(e[1],A));throw k3};case 15:var C=i[1];return function(t,e){return P3(s,r,[6,c,function(r){return $d(t,r,e)}],C)};case 16:var N=i[1];return function(t){return P3(s,r,[6,c,t],N)};case 17:c=[0,c,i[1]],i=i[2];continue;case 18:var O=i[1];if(0===O[0]){var R=i[2],L=O[1][1];s=function(t,e,r){return function(a,n){return P3(e,a,[1,t,[0,n]],r)}}(c,s,R),c=0,i=L;continue}var P=i[2],U=O[1][1];s=function(t,e,r){return function(a,n){return P3(e,a,[1,t,[1,n]],r)}}(c,s,P),c=0,i=U;continue;case 19:throw[0,uh,Cp];case 20:var D=i[3],F=[8,c,Np];return function(t){return P3(s,r,F,D)};case 21:var M=i[2];return function(t){return P3(s,r,[4,c,Yk(Ip,t)],M)};case 22:var X=i[1];return function(t){return P3(s,r,[5,c,t],X)};case 23:var j=i[2],B=i[1];if("number"==typeof B)switch(B){case 0:case 1:case 2:return t<50?R3(t+1|0,s,r,c,j):Wd(R3,[0,s,r,c,j]);case 3:throw[0,uh,Op];default:return t<50?R3(t+1|0,s,r,c,j):Wd(R3,[0,s,r,c,j])}else switch(B[0]){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:return t<50?R3(t+1|0,s,r,c,j):Wd(R3,[0,s,r,c,j]);case 8:var q=B[2];return t<50?O3(t+1|0,s,r,c,q,j):Wd(O3,[0,s,r,c,q,j]);case 9:default:return t<50?R3(t+1|0,s,r,c,j):Wd(R3,[0,s,r,c,j])}default:var G=i[3],Y=i[1],J=Qd(i[2],0);return t<50?L3(t+1|0,s,r,c,G,Y,J):Wd(L3,[0,s,r,c,G,Y,J])}}}function O3(t,e,r,a,n,s){if("number"==typeof n)return t<50?R3(t+1|0,e,r,a,s):Wd(R3,[0,e,r,a,s]);switch(n[0]){case 0:var c=n[1];return function(t){return U3(e,r,a,c,s)};case 1:var i=n[1];return function(t){return U3(e,r,a,i,s)};case 2:var u=n[1];return function(t){return U3(e,r,a,u,s)};case 3:var f=n[1];return function(t){return U3(e,r,a,f,s)};case 4:var o=n[1];return function(t){return U3(e,r,a,o,s)};case 5:var v=n[1];return function(t){return U3(e,r,a,v,s)};case 6:var l=n[1];return function(t){return U3(e,r,a,l,s)};case 7:var b=n[1];return function(t){return U3(e,r,a,b,s)};case 8:var k=n[2];return function(t){return U3(e,r,a,k,s)};case 9:var d=n[3],h=n[2],p=b3(v3(n[1]),h);return function(t){return U3(e,r,a,function t(e,r){if("number"==typeof e)return r;switch(e[0]){case 0:return[0,t(e[1],r)];case 1:return[1,t(e[1],r)];case 2:return[2,t(e[1],r)];case 3:return[3,t(e[1],r)];case 4:return[4,t(e[1],r)];case 5:return[5,t(e[1],r)];case 6:return[6,t(e[1],r)];case 7:return[7,t(e[1],r)];case 8:return[8,e[1],t(e[2],r)];case 9:var a=e[2];return[9,e[1],a,t(e[3],r)];case 10:return[10,t(e[1],r)];case 11:return[11,t(e[1],r)];case 12:return[12,t(e[1],r)];case 13:return[13,t(e[1],r)];default:return[14,t(e[1],r)]}}(p,d),s)};case 10:var m=n[1];return function(t,n){return U3(e,r,a,m,s)};case 11:var w=n[1];return function(t){return U3(e,r,a,w,s)};case 12:var y=n[1];return function(t){return U3(e,r,a,y,s)};case 13:throw[0,uh,Rp];default:throw[0,uh,Lp]}}function R3(t,e,r,a,n){var s=[8,a,Pp];return t<50?N3(t+1|0,e,r,s,n):Wd(N3,[0,e,r,s,n])}function L3(t,e,r,a,n,s,c){if(s){var i=s[1];return function(t){return function(t,e,r,a,n,s){return Hd(L3(0,t,e,r,a,n,s))}(e,r,a,n,i,Qd(c,t))}}var u=[4,a,c];return t<50?N3(t+1|0,e,r,u,n):Wd(N3,[0,e,r,u,n])}function P3(t,e,r,a){return Hd(N3(0,t,e,r,a))}function U3(t,e,r,a,n){return Hd(O3(0,t,e,r,a,n))}function D3(t,e){for(var r=e;;){if("number"==typeof r)return 0;switch(r[0]){case 0:var a=r[2],n=r[1];if("number"==typeof a)switch(a){case 0:var s=jm;break;case 1:s=Bm;break;case 2:s=qm;break;case 3:s=Gm;break;case 4:s=Ym;break;case 5:s=Jm;break;default:s=Hm}else switch(a[0]){case 0:case 1:s=a[1];break;default:s=_2(Wm,q2(1,a[1]))}return D3(t,n),a3(t,s);case 1:var c=r[2],i=r[1];if(0===c[0]){var u=c[1];D3(t,i),a3(t,Up);r=u;continue}var f=c[1];D3(t,i),a3(t,Dp);r=f;continue;case 6:var o=r[2];return D3(t,r[1]),a3(t,Qd(o,0));case 7:r=r[1];continue;case 8:var v=r[2];return D3(t,r[1]),w2(v);case 2:case 4:var l=r[2];return D3(t,r[1]),a3(t,l);default:var b=r[2];return D3(t,r[1]),r3(t,b)}}}function F3(t){return P3(function(t,e){var r=Z2(64);return D3(r,e),t3(r)},0,0,t[1])}var M3=[0,0];function X3(t,e){var r=t[e+1];if(function(t){return+(t instanceof Array)}(r)){if(jd(r)===Xb)return Qd(F3(iw),r);if(jd(r)===Eu)for(var a=Gk(wh,r),n=0,s=sd(a);;){if(s<=n)return _2(a,yh);var c=Ed(a,n);if(!(48<=c?58<=c?0:1:45===c?1:0))return a;n=n+1|0}return uw}return Qd(F3(cw),r)}function j3(t){var e=t.length-1;if(2>>0){var r=function t(e,r){if(e.length-1<=r)return zm;var a=t(e,r+1|0),n=X3(e,r);return $d(F3(Km),n,a)}(t,2),a=X3(t,1);return $d(F3(rw),a,r)}switch(e){case 0:return aw;case 1:return nw;default:var n=X3(t,1);return Qd(F3(sw),n)}}function B3(t){return M3[1]=[0,t,M3[1]],0}function q3(t,e){var r=[0,[0,t,0]],a=e[1];if(a){var n=a[1];return e[1]=r,n[2]=r,0}return e[1]=r,e[2]=r,0}var G3=[Li,hw,Hk()];function Y3(t){var e=t[2];if(e){var r=e[1],a=r[2],n=r[1];return t[2]=a,0===a&&(t[1]=0),n}throw G3}function J3(t,e){return t[13]=t[13]+e[3]|0,q3(e,t[27])}var H3=1000000010;function W3(t,e){return Zd(t[17],e,0,sd(e))}function V3(t){return Qd(t[19],0)}function z3(t,e){return Qd(t[20],e)}function K3(t,e,r){V3(t),t[11]=1;var a=(t[6]-r|0)+e|0,n=t[8],s=function(t,e){return+(Pk(t,e,!1)<=0)}(n,a)?n:a;return t[10]=s,t[9]=t[6]-t[10]|0,z3(t,t[10])}function Q3(t,e){return K3(t,0,e)}function $3(t,e){return t[9]=t[9]-e|0,z3(t,e)}function Z3(t,e,r){if("number"==typeof r)switch(r){case 0:var a=t[3];if(a){var n=a[1][1],s=function(t,e){if(e){var r=e[1],a=e[2];return function(t,e){return+(Pk(t,e,!1)<0)}(t,r)?[0,t,e]:[0,r,s(t,a)]}return[0,t,0]};return n[1]=s(t[6]-t[9]|0,n[1]),0}return 0;case 1:var c=t[2];return c?(t[2]=c[2],0):0;case 2:var i=t[3];return i?(t[3]=i[2],0):0;case 3:var u=t[2];return u?Q3(t,u[1][2]):V3(t);case 4:var f=t[10]!==(t[6]-t[9]|0)?1:0;return f?function(t){var e=Y3(t[27]),r=e[1];return t[12]=t[12]-e[3]|0,t[9]=t[9]+r|0,0}(t):f;default:var o=t[5];if(o){var v=o[2];return W3(t,Qd(t[24],o[1])),t[5]=v,0}return 0}else switch(r[0]){case 0:var l=r[1];return t[9]=t[9]-e|0,W3(t,l),t[11]=0,0;case 1:var b=r[2],k=r[1],d=t[2];if(d){var h=d[1],p=h[2];switch(h[1]){case 0:return $3(t,k);case 1:case 2:return K3(t,b,p);case 3:return t[9]>>6|0)?1:0;if(b)var k=b;else k=(2!=(v>>>6|0)?1:0)||(2!=(l>>>6|0)?1:0);if(k)throw h6;var d=(7&u)<<18|(63&o)<<12|(63&v)<<6|63&l;f=1}else if(Qu<=u){var h=Ed(t,s+1|0),p=Ed(t,s+2|0);if((2!=(h>>>6|0)?1:0)||(2!=(p>>>6|0)?1:0))throw h6;var m=(15&u)<<12|(63&h)<<6|63&p,w=Ue<=m?1:0;if(w?m<=57088?1:0:w)throw h6;d=m,f=1}else{var y=Ed(t,s+1|0);if(2!=(y>>>6|0))throw h6;d=(31&u)<<6|63&y,f=1}else if(I<=u)f=0;else d=u,f=1;if(f){Nk(n,c)[c+1]=d;var g=Ed(t,s);s=s+Nk(U6,g)[g+1]|0,c=c+1|0,i=i-1|0;continue}throw h6}return E6(n)}throw h6}var _=Ed(t,a),T=Nk(U6,_)[_+1];if(!(0>>18|0)),r3(s,U2(I|63&(u>>>12|0))),r3(s,U2(I|63&(u>>>6|0))),r3(s,U2(I|63&u))}else{var f=Ue<=u?1:0;if(f?u>>12|0)),r3(s,U2(I|63&(u>>>6|0))),r3(s,U2(I|63&u))}else r3(s,U2(Ec|u>>>6|0)),r3(s,U2(I|63&u));else r3(s,U2(u));c=c+1|0,i=i-1|0}},H6=function(t){return J6(t,0,t[5]-t[6]|0)},W6=function(t,e){function r(e){return r3(t,e)}return Hn<=e?(r(pl|e>>>18|0),r(I|63&(e>>>12|0)),r(I|63&(e>>>6|0)),r(I|63&e)):An<=e?(r(Qu|e>>>12|0),r(I|63&(e>>>6|0)),r(I|63&e)):I<=e?(r(Ec|e>>>6|0),r(I|63&e)):r(e)},V6=r,z6=null,K6=function(t){return void 0!==t?1:0},Q6=V6.Array,$6=[Li,xw,Hk()],Z6=V6.Error;d6(Aw,[0,$6,{}]);var t4=function(t){throw t};B3(function(t){return t[1]===$6?[0,Vk(t[2].toString())]:0}),B3(function(t){return t instanceof Q6?0:[0,Vk(t.toString())]});var e4=$d(k6,Cw,Iw),r4=$d(k6,Ow,Nw),a4=$d(k6,Lw,Rw),n4=$d(k6,Uw,Pw),s4=$d(k6,Fw,Dw),c4=$d(k6,Xw,Mw),i4=$d(k6,Bw,jw),u4=$d(k6,Gw,qw),f4=$d(k6,Jw,Yw),o4=$d(k6,Ww,Hw),v4=$d(k6,zw,Vw),l4=$d(k6,Qw,Kw),b4=$d(k6,Zw,$w),k4=$d(k6,ey,ty);Zd(b6,ry,e4,e4),Zd(b6,ay,r4,r4),Zd(b6,ny,a4,a4),Zd(b6,sy,n4,n4),Zd(b6,cy,s4,s4),Zd(b6,iy,c4,c4),Zd(b6,uy,i4,i4),Zd(b6,fy,u4,u4),Zd(b6,oy,f4,f4),Zd(b6,vy,o4,o4),Zd(b6,ly,v4,v4),Zd(b6,by,l4,l4),Zd(b6,ky,b4,b4),Zd(b6,dy,k4,k4);var d4=function(t){return"number"==typeof t?hy:t[1]},h4=function(t){if("number"==typeof t)return 1;switch(t[0]){case 0:return 2;case 3:return 4;default:return 3}},p4=function(t,e){return[0,t[1],t[2],e[3]]},m4=function(t,e){var r=t[1]-e[1]|0;return 0===r?t[2]-e[2]|0:r},w4=[Li,L_,Hk()],y4=function(t,e){var r=e.slice();return r[2]=t,r},g4=function(t){return t[3][1]},_4=function(t){return t[3][2]},T4=function(t,e){if(t!==e[4]){var r=e.slice();return r[4]=t,r}return e},S4=function(t){return 35>>0)var f=C6(a);else switch(u){case 0:f=2;break;case 1:f=0;break;case 2:f=1;break;default:if(I6(a,2),0===H8(x6(a))){var l=I8(x6(a));if(0===l)f=0===P4(x6(a))&&0===P4(x6(a))&&0===P4(x6(a))?0:C6(a);else if(1===l)if(0===P4(x6(a)))for(;;){var b=j4(x6(a));if(0!==b){f=1===b?0:C6(a);break}}else f=C6(a);else f=C6(a)}else f=C6(a)}if(2<=f){if(!(3<=f))return Z8(t,e,30)}else if(0<=f)return t;return m2(hV)},i5=function(t,e,r){var a=e+O6(r)|0;return[0,K8(t,a,e+R6(r)|0),H6(r)]},u5=function(t,e){for(var r=O6(t[2]),a=Y6(e),n=Z2(sd(e)),s=t;;){A6(a);var c=x6(a),i=92>>0)var u=C6(a);else switch(i){case 0:u=2;break;case 1:u=3;break;default:if(I6(a,3),0===H8(x6(a))){var f=I8(x6(a));if(0===f)u=0===P4(x6(a))&&0===P4(x6(a))&&0===P4(x6(a))?0:C6(a);else if(1===f)if(0===P4(x6(a)))for(;;){var o=j4(x6(a));if(0!==o){u=1===o?1:C6(a);break}}else u=C6(a);else u=C6(a)}else u=C6(a)}if(3>>0)return m2(bV);switch(u){case 0:var v=i5(s,r,a),l=v[2],b=dd(_2(kV,G2(l,2,sd(l)-2|0))),k=c5(s,v[1],b);W6(n,b);s=k;continue;case 1:var d=i5(s,r,a),h=d[2],p=dd(_2(dV,G2(h,3,sd(h)-4|0))),m=c5(s,d[1],p);W6(n,p);s=m;continue;case 2:return[0,s,t3(n)];default:a3(n,H6(a));continue}}},f5=function(t,e,r){var a=e5(t,Q8(t,e));return N6(e),$d(r,a,e)},o5=function(t,e,r){for(var a=t;;){A6(r);var n=x6(r),s=-1>>0)var c=C6(r);else switch(s){case 0:c=3;break;case 1:c=0;break;case 2:I6(r,0);c=0===C8(x6(r))?0:C6(r);break;default:I6(r,3);var i=x6(r),u=44>>0){var f=e5(a,Q8(a,r));return[0,f,Q8(f,r)]}switch(c){case 0:var o=r5(a,r);a3(e,H6(r));a=o;continue;case 1:var v=Q8(a,r);return[0,a[4]?Z8(a,v,[2,OF,NF]):a,v];case 2:if(a[4])return[0,a,Q8(a,r)];a3(e,RF);continue;default:a3(e,H6(r));continue}}},v5=function(t,e,r){for(;;){A6(r);var a=x6(r),n=13>>0)var s=C6(r);else switch(n){case 0:s=0;break;case 1:s=2;break;case 2:s=1;break;default:I6(r,1);s=0===C8(x6(r))?1:C6(r)}if(2>>0)return m2(LF);switch(s){case 0:return[0,t,Q8(t,r)];case 1:var c=Q8(t,r),i=c[3],u=r5(t,r),f=L6(r);return[0,u,[0,c[1],c[2],[0,i[1],i[2]-f|0,i[3]-f|0]]];default:a3(e,H6(r));continue}}},l5=function(t,e){function r(t){return I6(t,3),0===a8(x6(t))?2:C6(t)}A6(e);var a=x6(e),n=ya>>0)var s=C6(e);else switch(n){case 1:s=16;break;case 2:s=15;break;case 3:I6(e,15);s=0===C8(x6(e))?15:C6(e);break;case 4:I6(e,4);s=0===a8(x6(e))?r(e):C6(e);break;case 5:I6(e,11);s=0===a8(x6(e))?r(e):C6(e);break;case 7:s=5;break;case 8:s=6;break;case 9:s=7;break;case 10:s=8;break;case 11:s=9;break;case 12:I6(e,14);var c=I8(x6(e));if(0===c)s=0===P4(x6(e))&&0===P4(x6(e))&&0===P4(x6(e))?12:C6(e);else if(1===c)if(0===P4(x6(e)))for(;;){var i=j4(x6(e));if(0!==i){s=1===i?13:C6(e);break}}else s=C6(e);else s=C6(e);break;case 13:s=10;break;case 14:I6(e,14);s=0===P4(x6(e))&&0===P4(x6(e))?1:C6(e);break;default:s=0}if(16>>0)return m2(ZW);switch(s){case 1:var u=H6(e);return[0,t,u,[0,dd(_2(tV,u))],0];case 2:var f=H6(e),o=dd(_2(eV,f));return 256<=o?[0,t,f,[0,o>>>3|0,48+(7&o)|0],1]:[0,t,f,[0,o],1];case 3:var v=H6(e);return[0,t,v,[0,dd(_2(rV,v))],1];case 4:return[0,t,aV,[0,0],0];case 5:return[0,t,nV,[0,8],0];case 6:return[0,t,sV,[0,12],0];case 7:return[0,t,cV,[0,10],0];case 8:return[0,t,iV,[0,13],0];case 9:return[0,t,uV,[0,9],0];case 10:return[0,t,fV,[0,11],0];case 11:var l=H6(e);return[0,t,l,[0,dd(_2(oV,l))],1];case 12:var b=H6(e);return[0,t,b,[0,dd(_2(vV,G2(b,1,sd(b)-1|0)))],0];case 13:var k=H6(e),d=dd(_2(lV,G2(k,2,sd(k)-3|0)));return[0,au>>0)var o=C6(s);else switch(f){case 1:o=3;break;case 3:o=0;break;case 4:o=1;break;default:o=2}if(3>>0)return m2(PF);switch(o){case 0:var v=H6(s);if(a3(a,v),Gd(e,v))return[0,c,Q8(c,s),i];a3(r,v);continue;case 1:a3(a,UF);var l=l5(c,s),b=l[4]||i;a3(a,l[2]),K2(function(t){return W6(r,t)},l[3]);c=l[1],i=b;continue;case 2:var k=H6(s);a3(a,k);var d=e5(c,Q8(c,s));return a3(r,k),[0,d,Q8(d,s),i];default:var h=H6(s);a3(a,h),a3(r,h);continue}}},k5=function(t,e,r,a,n,s){for(var c=t;;){A6(s);var i=x6(s),u=96>>0)var f=C6(s);else switch(u){case 0:f=0;break;case 1:f=6;break;case 2:f=5;break;case 3:I6(s,5);f=0===C8(x6(s))?4:C6(s);break;case 4:I6(s,6);var o=x6(s);f=0===(ws>>0)return m2(DF);switch(f){case 0:var v=e5(c,Q8(c,s));return[0,v,p4(e,Q8(v,s)),1];case 1:return r3(n,96),[0,c,p4(e,Q8(c,s)),1];case 2:return a3(n,FF),[0,c,p4(e,Q8(c,s)),0];case 3:r3(a,92),r3(n,92);var l=l5(c,s),b=l[2];a3(a,b),a3(n,b),K2(function(t){return W6(r,t)},l[3]);c=l[1];continue;case 4:a3(a,MF),a3(n,XF),a3(r,jF);c=r5(c,s);continue;case 5:var k=H6(s);a3(a,k),a3(n,k),r3(r,10);c=r5(c,s);continue;default:var d=H6(s);a3(a,d),a3(n,d),a3(r,d);continue}}},d5=function(t,e,r,a,n){for(var s=t;;){A6(n);var c=x6(n),i=zr>>0)var u=C6(n);else switch(i){case 0:u=1;break;case 1:u=6;break;case 2:u=2;break;case 3:I6(n,2);u=0===C8(x6(n))?2:C6(n);break;case 4:u=0;break;default:I6(n,6);var f=x6(n),o=34>>0)return m2(zF);switch(u){case 0:var S=H6(n);switch(e){case 0:var E=Yd(S,KF)?0:1;break;case 1:E=Yd(S,QF)?0:1;break;default:if(Yd(S,$F))if(Yd(S,ZF)){E=0;var x=0}else x=1;else x=1;if(x)return N6(n),[0,s,Q8(s,n)]}if(E)return[0,s,Q8(s,n)];a3(a,S),a3(r,S);continue;case 1:var A=e5(s,Q8(s,n));return[0,A,Q8(A,n)];case 2:var I=H6(n);a3(a,I),a3(r,I);s=r5(s,n);continue;case 3:var C=H6(n),N=G2(C,3,sd(C)-4|0);a3(a,C),W6(r,dd(_2(tM,N)));continue;case 4:var O=H6(n),R=G2(O,2,sd(O)-3|0);a3(a,O),W6(r,dd(R));continue;case 5:var L=H6(n),P=G2(L,1,sd(L)-2|0);a3(a,L);var U=Lk(P,eM);if(0<=U)if(0>>0)return C6(t);switch(e){case 0:return i(t);case 1:if(0===O4(x6(t)))for(;;){I6(t,16);var r=S4(x6(t));if(0===r)for(;;)if(I6(t,15),0!==G4(x6(t)))return C6(t);if(1!==r)return C6(t)}return C6(t);default:for(;;){I6(t,16);var a=S4(x6(t));if(0===a)for(;;)if(I6(t,15),0!==G4(x6(t)))return C6(t);if(1!==a)return C6(t)}}}function f(t){I6(t,18);var e=d8(x6(t));if(2>>0)return C6(t);switch(e){case 0:return i(t);case 1:for(;;){I6(t,18);var r=d8(x6(t));if(2>>0)return C6(t);switch(r){case 0:return i(t);case 1:continue;default:return u(t)}}default:return u(t)}}function b(t){for(;;){I6(t,18);var e=p8(x6(t));if(3>>0)return C6(t);switch(e){case 0:return i(t);case 1:return f(t);case 2:continue;default:return u(t)}}}function y(t){I6(t,17);var e=U4(x6(t));if(0===e)return i(t);if(1===e)for(;;){I6(t,14);var r=U4(x6(t));if(0===r)for(;;)if(I6(t,13),0!==G4(x6(t)))return C6(t);if(1!==r)return C6(t)}return C6(t)}function g(t){I6(t,17);var e=h8(x6(t));if(0===e)return i(t);if(1===e)for(;;){I6(t,10);var r=h8(x6(t));if(0===r)for(;;)if(I6(t,9),0!==G4(x6(t)))return C6(t);if(1!==r)return C6(t)}return C6(t)}function A(t){I6(t,17);var e=Y8(x6(t));if(0===e)return i(t);if(1===e)for(;;){I6(t,8);var r=Y8(x6(t));if(0===r)for(;;)if(I6(t,7),0!==G4(x6(t)))return C6(t);if(1!==r)return C6(t)}return C6(t)}function I(t){I6(t,18);var e=S4(x6(t));if(0===e)return i(t);if(1===e)for(;;){I6(t,18);var r=S4(x6(t));if(0===r)return i(t);if(1!==r)return C6(t)}return C6(t)}function R(t){for(;;){I6(t,18);var e=X8(x6(t));if(2>>0)return C6(t);switch(e){case 0:return i(t);case 1:return I(t);default:continue}}}function P(t){for(;;)if(I6(t,11),0!==G4(x6(t)))return C6(t)}function D(t){for(;;){I6(t,12);var e=L8(x6(t));if(3>>0)return C6(t);switch(e){case 0:return P(t);case 1:return I(t);case 2:continue;default:for(;;){I6(t,11);var r=X8(x6(t));if(2>>0)return C6(t);switch(r){case 0:return P(t);case 1:return I(t);default:continue}}}}}function M(t){I6(t,18);var e=J4(x6(t));if(7>>0)return C6(t);switch(e){case 0:return i(t);case 1:return f(t);case 2:return D(t);case 3:return R(t);case 4:return A(t);case 5:return u(t);case 6:return g(t);default:return y(t)}}function X(t){for(;;){I6(t,18);var e=d8(x6(t));if(2>>0)return C6(t);switch(e){case 0:return i(t);case 1:continue;default:return u(t)}}}function q(t){return 0===O4(x6(t))?X(t):C6(t)}function J(t,e){for(;;){I6(e,32);var r=X4(x6(e));if(0!==r)return 1===r?t<50?V(t+1|0,e):Wd(V,[0,e]):C6(e)}}function V(t,e){if(0===H8(x6(e))){var r=I8(x6(e));if(0===r)return 0===P4(x6(e))&&0===P4(x6(e))&&0===P4(x6(e))?t<50?J(t+1|0,e):Wd(J,[0,e]):C6(e);if(1===r){if(0===P4(x6(e)))for(;;){var a=j4(x6(e));if(0!==a)return 1===a?t<50?J(t+1|0,e):Wd(J,[0,e]):C6(e)}return C6(e)}return C6(e)}return C6(e)}function tt(t){return Hd(J(0,t))}function lt(t){return Hd(V(0,t))}A6(e);var kt=function(t){var e=x6(t),I=Uc>>0)return C6(t);switch(I){case 0:return 63;case 1:return 64;case 2:if(I6(t,1),0===C4(x6(t)))for(;;)if(I6(t,1),0!==C4(x6(t)))return C6(t);return C6(t);case 3:return 0;case 4:return I6(t,0),0===C8(x6(t))?0:C6(t);case 5:return 6;case 6:I6(t,32);var P=X4(x6(t));return 0===P?tt(t):1===P?lt(t):C6(t);case 7:if(I6(t,64),0===c8(x6(t))){var J=x6(t);if(0==(je>>0)return C6(t);switch(kt){case 0:for(;;){var gt=u8(x6(t));if(3>>0)return C6(t);switch(gt){case 0:continue;case 1:return q(t);case 2:return M(t);default:return b(t)}}case 1:return q(t);case 2:return M(t);default:return b(t)}case 15:I6(t,43);var Et=A8(x6(t));return 0===Et?0===A4(x6(t))?42:C6(t):1===Et?X(t):C6(t);case 16:I6(t,64);var At=F8(x6(t));if(0===At){I6(t,2);var It=H4(x6(t));if(2>>0)return C6(t);switch(It){case 0:for(;;){var Ct=H4(x6(t));if(2>>0)return C6(t);switch(Ct){case 0:continue;case 1:return a(t);default:return r(t)}}case 1:return a(t);default:return r(t)}}return 1===At?5:C6(t);case 17:I6(t,18);var Ot=J4(x6(t));if(7>>0)return C6(t);switch(Ot){case 0:return i(t);case 1:return f(t);case 2:return D(t);case 3:return R(t);case 4:return A(t);case 5:return u(t);case 6:return g(t);default:return y(t)}case 18:I6(t,18);var Mt=p8(x6(t));if(3>>0)return C6(t);switch(Mt){case 0:return i(t);case 1:return f(t);case 2:return b(t);default:return u(t)}case 19:return 46;case 20:return 44;case 21:return 50;case 22:I6(t,52);var Bt=x6(t);return 0==(61>>0)return C6(t);switch(Kt){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var te=f8(x6(t));if(2>>0)return C6(t);switch(te){case 0:return tt(t);case 1:return lt(t);default:I6(t,19);var se=X4(x6(t));return 0===se?tt(t):1===se?lt(t):C6(t)}}case 29:I6(t,32);var ve=q8(x6(t));if(2>>0)return C6(t);switch(ve){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var ge=q8(x6(t));if(2>>0)return C6(t);switch(ge){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Te=v8(x6(t));if(2>>0)return C6(t);switch(Te){case 0:return tt(t);case 1:return lt(t);default:I6(t,20);var Se=N4(x6(t));if(2>>0)return C6(t);switch(Se){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Le=Q4(x6(t));if(2>>0)return C6(t);switch(Le){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Ue=W4(x6(t));if(2>>0)return C6(t);switch(Ue){case 0:return tt(t);case 1:return lt(t);default:I6(t,21);var De=X4(x6(t));return 0===De?tt(t):1===De?lt(t):C6(t)}}}}}}case 30:I6(t,32);var Xe=O8(x6(t));if(2>>0)return C6(t);switch(Xe){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Be=M4(x6(t));if(2>>0)return C6(t);switch(Be){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var qe=R8(x6(t));if(2>>0)return C6(t);switch(qe){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Je=f8(x6(t));if(2>>0)return C6(t);switch(Je){case 0:return tt(t);case 1:return lt(t);default:I6(t,22);var Ke=X4(x6(t));return 0===Ke?tt(t):1===Ke?lt(t):C6(t)}}}}case 31:I6(t,32);var Qe=Q4(x6(t));if(2>>0)return C6(t);switch(Qe){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var tr=v8(x6(t));if(2>>0)return C6(t);switch(tr){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var ur=j8(x6(t));if(2>>0)return C6(t);switch(ur){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var mr=N4(x6(t));if(2>>0)return C6(t);switch(mr){case 0:return tt(t);case 1:return lt(t);default:I6(t,23);var wr=X4(x6(t));return 0===wr?tt(t):1===wr?lt(t):C6(t)}}}}case 32:I6(t,32);var Ar=G8(x6(t));if(2>>0)return C6(t);switch(Ar){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Cr=x6(t),Or=35>>0)return C6(t);switch(Or){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Mr=N4(x6(t));if(2>>0)return C6(t);switch(Mr){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Br=L4(x6(t));if(2
>>0)return C6(t);switch(Br){case 0:return tt(t);case 1:return lt(t);default:I6(t,24);var Hr=X4(x6(t));return 0===Hr?tt(t):1===Hr?lt(t):C6(t)}}}}case 33:I6(t,32);var Kr=I4(x6(t));if(2>>0)return C6(t);switch(Kr){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var $r=x6(t),ta=35<$r?hn<$r?ml<$r?nf<$r?-1:Co<$r?yl<$r?Ic<$r?rk<$r?wt<$r?zc<$r?ps<$r?cl<$r?0:-1:0:-1:G<$r?Eo<$r?0:-1:0:-1:bu<$r?pe<$r?ik<$r?Fs<$r?0:-1:0:-1:Ul<$r?Ku<$r?0:-1:0:-1:wi<$r?ns<$r?Di<$r?xv<$r?uf<$r?Tt<$r?Lu<$r?sv<$r?$o<$r?Fn<$r?qs<$r?Xv<$r?Us<$r?Qn<$r?wo<$r?ys<$r?0:-1:0:-1:pf<$r?Qt<$r?0:-1:0:-1:jv<$r?rs<$r?ht<$r?jc<$r?0:-1:0:-1:Rs<$r?Ff<$r?0:-1:0:-1:Hi<$r?Lr<$r?Fr<$r?Mf<$r?sr<$r?B<$r?0:-1:0:-1:_a<$r?bc<$r?0:-1:0:-1:Rb<$r?Pu<$r?Oe<$r?ri<$r?0:-1:0:-1:ol<$r?xo<$r?0:-1:0:-1:Zv<$r?ru<$r?Js<$r?wa<$r?Gf<$r?Za<$r?Es<$r?Au<$r?0:-1:0:-1:xa<$r?Vl<$r?0:-1:0:-1:oe<$r?Ri<$r?Gc<$r?ct<$r?0:-1:0:-1:la<$r?Ua<$r?0:-1:0:-1:jb<$r?Er<$r?es<$r?Tn<$r?U<$r?nn<$r?0:-1:0:-1:el<$r?Il<$r?0:-1:0:-1:ja<$r?vf<$r?v<$r?Da<$r?0:-1:0:-1:rn<$r?si<$r?0:-1:0:-1:Ro<$r?Nn<$r?ho<$r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t<$r?Bi<$r?Wl<$r?ei<$r?0:-1:0:-1:Nr<$r?ci<$r?0:-1:0:-1:ii<$r?mb<$r?k<$r?Q<$r?0:-1:0:-1:_n<$r?Sc<$r?0:-1:0:-1:be<$r?kr<$r?Su<$r?ln<$r?Wb<$r?mt<$r?0:-1:0:-1:lc<$r?Zn<$r?0:-1:0:-1:fo<$r?$s<$r?ov<$r?Qr<$r?0:-1:0:-1:He<$r?Gt<$r?0:-1:0:-1:On<$r?yt<$r?wv<$r?Ae<$r?Ne<$r?_r<$r?kc<$r?ra<$r?cu<$r?Xu<$r?0:-1:0:-1:Ao<$r?nc<$r?0:-1:0:-1:Tf<$r?aa<$r?bn<$r?qc<$r?0:-1:0:-1:yu<$r?Go<$r?0:-1:0:-1:er<$r?gl<$r?bo<$r?Gv<$r?br<$r?fe<$r?0:-1:0:-1:Ai<$r?ke<$r?0:-1:0:-1:Wf<$r?gc<$r?pu<$r?Ie<$r?0:-1:0:-1:C<$r?et<$r?0:-1:0:-1:Kn<$r?ls<$r?Xs<$r?Ge<$r?sb<$r?Ob<$r?de<$r?T<$r?0:-1:0:-1:Ze<$r?qi<$r?0:-1:0:-1:Pi<$r?Vt<$r?Pb<$r?Dl<$r?0:-1:0:-1:xs<$r?en<$r?0:-1:0:-1:dr<$r?ub<$r?Ft<$r?Me<$r?_o<$r?af<$r?0:-1:0:-1:wn<$r?va<$r?0:-1:0:-1:Mo<$r?jn<$r?_s<$r?ft<$r?0:-1:0:-1:Ou<$r?Ce<$r?0:-1:0:-1:Ed(nK,$r+_c|0)-1|0:-1;if(3>>0)return C6(t);switch(ta){case 0:return tt(t);case 1:return lt(t);case 2:I6(t,32);var ca=v8(x6(t));if(2>>0)return C6(t);switch(ca){case 0:return tt(t);case 1:return lt(t);default:I6(t,25);var ba=X4(x6(t));return 0===ba?tt(t):1===ba?lt(t):C6(t)}default:I6(t,32);var ka=P8(x6(t));if(2>>0)return C6(t);switch(ka){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var ya=N4(x6(t));if(2>>0)return C6(t);switch(ya){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Ia=Z4(x6(t));if(2>>0)return C6(t);switch(Ia){case 0:return tt(t);case 1:return lt(t);default:I6(t,26);var Ya=X4(x6(t));return 0===Ya?tt(t):1===Ya?lt(t):C6(t)}}}}}case 34:I6(t,32);var Qa=R8(x6(t));if(2>>0)return C6(t);switch(Qa){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var sn=x6(t),fn=35>>0)return C6(t);switch(fn){case 0:return tt(t);case 1:return lt(t);case 2:I6(t,32);var yn=R8(x6(t));if(2>>0)return C6(t);switch(yn){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var En=G8(x6(t));if(2>>0)return C6(t);switch(En){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var An=E8(x6(t));if(2>>0)return C6(t);switch(An){case 0:return tt(t);case 1:return lt(t);default:I6(t,27);var Cn=X4(x6(t));return 0===Cn?tt(t):1===Cn?lt(t):C6(t)}}}default:I6(t,32);var Rn=G8(x6(t));if(2>>0)return C6(t);switch(Rn){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Dn=W4(x6(t));if(2>>0)return C6(t);switch(Dn){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Bn=D4(x6(t));if(2>>0)return C6(t);switch(Bn){case 0:return tt(t);case 1:return lt(t);default:I6(t,28);var qn=X4(x6(t));return 0===qn?tt(t):1===qn?lt(t):C6(t)}}}}}case 35:I6(t,32);var Jn=x6(t),Hn=35>>0)return C6(t);switch(Hn){case 0:return tt(t);case 1:return lt(t);case 2:I6(t,32);var Wn=I4(x6(t));if(2>>0)return C6(t);switch(Wn){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var $n=N4(x6(t));if(2<$n>>>0)return C6(t);switch($n){case 0:return tt(t);case 1:return lt(t);default:I6(t,29);var as=X4(x6(t));return 0===as?tt(t):1===as?lt(t):C6(t)}}default:I6(t,32);var cs=M4(x6(t));if(2>>0)return C6(t);switch(cs){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var is=N4(x6(t));if(2>>0)return C6(t);switch(is){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var fs=q8(x6(t));if(2>>0)return C6(t);switch(fs){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var ks=B8(x6(t));if(2>>0)return C6(t);switch(ks){case 0:return tt(t);case 1:return lt(t);default:I6(t,30);var ws=X4(x6(t));return 0===ws?tt(t):1===ws?lt(t):C6(t)}}}}}case 36:I6(t,32);var Ts=q8(x6(t));if(2>>0)return C6(t);switch(Ts){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Ps=G8(x6(t));if(2>>0)return C6(t);switch(Ps){case 0:return tt(t);case 1:return lt(t);default:I6(t,32);var Ms=L4(x6(t));if(2>>0)return C6(t);switch(Ms){case 0:return tt(t);case 1:return lt(t);default:I6(t,31);var Bs=X4(x6(t));return 0===Bs?tt(t):1===Bs?lt(t):C6(t)}}}case 37:I6(t,36);var ec=x6(t);return 0==(zr>>0)return m2(RW);var gt=kt;if(33<=gt)switch(gt){case 33:return[0,t,66];case 36:return[0,t,0];case 37:return[0,t,1];case 38:return[0,t,2];case 39:return[0,t,3];case 40:return[0,t,4];case 41:return[0,t,5];case 42:return[0,t,12];case 43:return[0,t,10];case 44:return[0,t,8];case 45:return[0,t,9];case 50:return[0,t,94];case 51:return[0,t,95];case 54:return[0,t,wf];case 56:return[0,t,85];case 57:return[0,t,87];case 59:return[0,t,11];case 61:return[0,t,99];case 62:return[0,t,Uf];case 63:return[0,t[4]?Z8(t,Q8(t,e),7):t,Ot];case 64:return[0,t,[5,H6(e)]];case 58:break;case 34:case 48:return[0,t,6];case 35:case 49:return[0,t,7];case 46:case 55:return[0,t,82];case 47:case 53:return[0,t,81];default:return[0,t,79]}else switch(gt){case 0:return[1,r5(t,e)];case 1:return[1,t];case 2:var Et=Q8(t,e),At=Z2(uo),It=o5(t,At,e);return[1,n5(It[1],Et,It[2],At,1)];case 3:var Ct=H6(e);if(t[5]){var Mt=t[4]?t5(t,Q8(t,e),Ct):t,Bt=T4(1,Mt),Jt=L6(e);return Gd(J6(e,Jt-1|0,1),LW)&&Yd(J6(e,Jt-2|0,1),PW)?[0,Bt,82]:[1,Bt]}var zt=Q8(t,e),Kt=Z2(uo);a3(Kt,Ct);var te=o5(t,Kt,e);return[1,n5(te[1],zt,te[2],Kt,1)];case 4:if(t[4])return[1,T4(0,t)];N6(e);return A6(e),0===function(t){return 0===b8(x6(t))?0:C6(t)}(e)?[0,t,wf]:m2(UW);case 5:var se=Q8(t,e),ve=Z2(uo),ge=v5(t,ve,e);return[1,n5(ge[1],se,ge[2],ve,0)];case 6:var Te=H6(e),Se=Q8(t,e),Le=Z2(uo),Ue=Z2(uo);a3(Ue,Te);var De=b5(t,Te,Le,Ue,0,e),Xe=p4(Se,De[2]),Be=De[3],qe=t3(Ue),Je=[1,[0,Xe,t3(Le),qe,Be]];return[0,De[1],Je];case 7:return f5(t,e,function(t,e){function r(t){if(0===t8(x6(t))){if(0===V4(x6(t)))for(;;)if(I6(t,0),0!==V4(x6(t)))return C6(t);return C6(t)}return C6(t)}A6(e);var a=y8(x6(e));if(0===a)for(;;){var n=B4(x6(e));if(0!==n){var s=1===n?r(e):C6(e);break}}else s=1===a?r(e):C6(e);return 0===s?[0,t,s5(0,H6(e))]:m2(OW)});case 8:return[0,t,s5(0,H6(e))];case 9:return f5(t,e,function(t,e){function r(t){if(0===l8(x6(t))){if(0===a8(x6(t)))for(;;)if(I6(t,0),0!==a8(x6(t)))return C6(t);return C6(t)}return C6(t)}A6(e);var a=y8(x6(e));if(0===a)for(;;){var n=B4(x6(e));if(0!==n){var s=1===n?r(e):C6(e);break}}else s=1===a?r(e):C6(e);return 0===s?[0,t,s5(2,H6(e))]:m2(NW)});case 10:return[0,t,s5(2,H6(e))];case 11:return f5(t,e,function(t,e){function r(t){if(0===a8(x6(t)))for(;;)if(I6(t,0),0!==a8(x6(t)))return C6(t);return C6(t)}A6(e);var a=y8(x6(e));if(0===a)for(;;){var n=B4(x6(e));if(0!==n){var s=1===n?r(e):C6(e);break}}else s=1===a?r(e):C6(e);return 0===s?[0,t,s5(1,H6(e))]:m2(CW)});case 12:return[0,t,s5(1,H6(e))];case 13:return f5(t,e,function(t,e){function r(t){if(0===F4(x6(t))){if(0===P4(x6(t)))for(;;)if(I6(t,0),0!==P4(x6(t)))return C6(t);return C6(t)}return C6(t)}if(A6(e),0===function(t){var e=y8(x6(t));if(0===e)for(;;){var a=B4(x6(t));if(0!==a)return 1===a?r(t):C6(t)}return 1===e?r(t):C6(t)}(e)){var a=H6(e);try{return[0,t,s5(3,a)]}catch(t){throw t=Kd(t)}}return m2(IW)});case 14:var Ke=H6(e);try{return[0,t,s5(3,Ke)]}catch(t){throw t=Kd(t)}case 15:return f5(t,e,function(t,e){function r(t){for(;;)if(I6(t,0),0!==O4(x6(t)))return C6(t)}function a(t){var e=R4(x6(t));return 0===e?0===O4(x6(t))?r(t):C6(t):1===e?r(t):C6(t)}function n(t){if(0===O4(x6(t)))for(;;){var e=m8(x6(t));if(0!==e)return 1===e?a(t):C6(t)}return C6(t)}function s(t){for(;;){var e=m8(x6(t));if(0!==e)return 1===e?a(t):C6(t)}}function c(t){var e=q4(x6(t));return 0===e?s(t):1===e?a(t):C6(t)}function i(t){for(;;){var e=o8(x6(t));if(2>>0)return C6(t);switch(e){case 0:return s(t);case 1:continue;default:return a(t)}}}A6(e);var u=x6(e),f=44>>0)var o=C6(e);else switch(f){case 0:for(;;){var v=u8(x6(e));if(3>>0)o=C6(e);else switch(v){case 0:continue;case 1:o=n(e);break;case 2:o=c(e);break;default:o=i(e)}break}break;case 1:o=n(e);break;case 2:o=c(e);break;default:o=i(e)}return 0===o?[0,t,s5(3,H6(e))]:m2(AW)});case 17:return f5(t,e,function(t,e){function r(t){for(;;)if(I6(t,0),0!==O4(x6(t)))return C6(t)}A6(e);var a=x6(e),n=44>>0)var s=C6(e);else switch(n){case 0:for(;;){var c=x6(e),i=8>>0)return C6(e);switch(r){case 0:return t(e);case 1:if(0===O4(x6(e)))for(;;){I6(e,19);var a=S4(x6(e));if(0===a)for(;;)if(I6(e,18),0!==G4(x6(e)))return C6(e);if(1!==a)return C6(e)}return C6(e);default:for(;;){I6(e,19);var n=S4(x6(e));if(0===n)for(;;)if(I6(e,18),0!==G4(x6(e)))return C6(e);if(1!==n)return C6(e)}}}}(P),M=function(t){return I6(t,4),0===z8(x6(t))?4:C6(t)},X=function(t){return 0===T8(x6(t))&&0===s8(x6(t))&&0===M8(x6(t))&&0===g8(x6(t))&&0===_8(x6(t))&&0===n8(x6(t))&&0===c8(x6(t))&&0===T8(x6(t))&&0===H8(x6(t))&&0===S8(x6(t))&&0===D8(x6(t))?4:C6(t)},q=function(t,e){return function(r){I6(r,21);var a=d8(x6(r));if(2>>0)return C6(r);switch(a){case 0:return t(r);case 1:for(;;){I6(r,21);var n=d8(x6(r));if(2>>0)return C6(r);switch(n){case 0:return t(r);case 1:continue;default:return e(r)}}default:return e(r)}}}(P,D),J=function(t){for(;;)if(I6(t,14),0!==G4(x6(t)))return C6(t)},V=function(t){return function(e){I6(e,21);var r=S4(x6(e));if(0===r)return t(e);if(1===r)for(;;){I6(e,21);var a=S4(x6(e));if(0===a)return t(e);if(1!==a)return C6(e)}return C6(e)}}(P);A6(f);var tt=x6(f),lt=Uc>>0)var kt=C6(f);else switch(lt){case 0:kt=131;break;case 1:kt=132;break;case 2:if(I6(f,2),0===C4(x6(f))){for(;;)if(I6(f,2),0!==C4(x6(f))){kt=C6(f);break}}else kt=C6(f);break;case 3:kt=0;break;case 4:I6(f,0);kt=0===C8(x6(f))?0:C6(f);break;case 5:I6(f,zr);kt=0===K4(x6(f))?(I6(f,96),0===K4(x6(f))?92:C6(f)):C6(f);break;case 6:kt=8;break;case 7:I6(f,130);var gt=x6(f);kt=0===(32>>0)kt=C6(f);else switch(Ct){case 0:I6(f,118);kt=0===K4(x6(f))?108:C6(f);break;case 1:kt=5;break;default:kt=Vi}break;case 14:I6(f,115);var Mt=x6(f),Bt=42>>0)kt=C6(f);else switch(se){case 0:kt=P(f);break;case 1:continue;default:kt=D(f)}break}else kt=C6(f);break;case 18:I6(f,I);var ve=w8(x6(f));if(2>>0)kt=C6(f);else switch(ve){case 0:I6(f,3);var ge=H4(x6(f));if(2>>0)kt=C6(f);else switch(ge){case 0:for(;;){var Te=H4(x6(f));if(2>>0)kt=C6(f);else switch(Te){case 0:continue;case 1:kt=M(f);break;default:kt=X(f)}break}break;case 1:kt=M(f);break;default:kt=X(f)}break;case 1:kt=6;break;default:kt=uo}break;case 19:I6(f,21);var Se=J4(x6(f));if(7>>0)kt=C6(f);else switch(Se){case 0:kt=P(f);break;case 1:kt=q(f);break;case 2:for(;;){I6(f,15);var Le=L8(x6(f));if(3>>0)kt=C6(f);else switch(Le){case 0:kt=J(f);break;case 1:kt=V(f);break;case 2:continue;default:for(;;){I6(f,14);var Ue=X8(x6(f));if(2>>0)kt=C6(f);else switch(Ue){case 0:kt=J(f);break;case 1:kt=V(f);break;default:continue}break}}break}break;case 3:for(;;){I6(f,21);var De=X8(x6(f));if(2>>0)kt=C6(f);else switch(De){case 0:kt=P(f);break;case 1:kt=V(f);break;default:continue}break}break;case 4:I6(f,20);var Xe=Y8(x6(f));if(0===Xe)kt=P(f);else if(1===Xe)for(;;){I6(f,11);var Be=Y8(x6(f));if(0===Be){for(;;)if(I6(f,10),0!==G4(x6(f))){kt=C6(f);break}}else{if(1===Be)continue;kt=C6(f)}break}else kt=C6(f);break;case 5:kt=D(f);break;case 6:I6(f,20);var qe=h8(x6(f));if(0===qe)kt=P(f);else if(1===qe)for(;;){I6(f,13);var Je=h8(x6(f));if(0===Je){for(;;)if(I6(f,12),0!==G4(x6(f))){kt=C6(f);break}}else{if(1===Je)continue;kt=C6(f)}break}else kt=C6(f);break;default:I6(f,20);var Ke=U4(x6(f));if(0===Ke)kt=P(f);else if(1===Ke)for(;;){I6(f,17);var Qe=U4(x6(f));if(0===Qe){for(;;)if(I6(f,16),0!==G4(x6(f))){kt=C6(f);break}}else{if(1===Qe)continue;kt=C6(f)}break}else kt=C6(f)}break;case 20:I6(f,21);var tr=p8(x6(f));if(3>>0)kt=C6(f);else switch(tr){case 0:kt=P(f);break;case 1:kt=q(f);break;case 2:for(;;){I6(f,21);var ur=p8(x6(f));if(3>>0)kt=C6(f);else switch(ur){case 0:kt=P(f);break;case 1:kt=q(f);break;case 2:continue;default:kt=D(f)}break}break;default:kt=D(f)}break;case 21:kt=85;break;case 22:kt=83;break;case 23:I6(f,113);var mr=x6(f),wr=59>>0)kt=C6(f);else switch(Ia){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Ya=f8(x6(f));if(2>>0)kt=C6(f);else switch(Ya){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Qa=W4(x6(f));if(2>>0)kt=C6(f);else switch(Qa){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var sn=E8(x6(f));if(2>>0)kt=C6(f);else switch(sn){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,22);var fn=X4(x6(f));kt=0===fn?g(f):1===fn?A(f):C6(f)}}}break;default:I6(f,73);var yn=Q4(x6(f));if(2>>0)kt=C6(f);else switch(yn){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var En=G8(x6(f));if(2>>0)kt=C6(f);else switch(En){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var An=R8(x6(f));if(2>>0)kt=C6(f);else switch(An){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,23);var Cn=X4(x6(f));kt=0===Cn?g(f):1===Cn?A(f):C6(f)}}}}break;case 34:I6(f,73);var Rn=Z4(x6(f));if(2>>0)kt=C6(f);else switch(Rn){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Dn=N4(x6(f));if(2>>0)kt=C6(f);else switch(Dn){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Bn=Q4(x6(f));if(2>>0)kt=C6(f);else switch(Bn){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var qn=x4(x6(f));if(2>>0)kt=C6(f);else switch(qn){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,24);var Jn=X4(x6(f));kt=0===Jn?g(f):1===Jn?A(f):C6(f)}}}}break;case 35:I6(f,73);var Hn=x6(f),Wn=35>>0)kt=C6(f);else switch(Wn){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var $n=U8(x6(f));if(3<$n>>>0)kt=C6(f);else switch($n){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var as=N4(x6(f));if(2>>0)kt=C6(f);else switch(as){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,25);var cs=X4(x6(f));kt=0===cs?g(f):1===cs?A(f):C6(f)}break;default:I6(f,73);var is=E8(x6(f));if(2>>0)kt=C6(f);else switch(is){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var fs=J8(x6(f));if(2>>0)kt=C6(f);else switch(fs){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,26);var ks=X4(x6(f));kt=0===ks?g(f):1===ks?A(f):C6(f)}}}break;case 3:I6(f,73);var Ts=Q4(x6(f));if(2>>0)kt=C6(f);else switch(Ts){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ps=j8(x6(f));if(2>>0)kt=C6(f);else switch(Ps){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Bs=j8(x6(f));if(2>>0)kt=C6(f);else switch(Bs){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,27);var ec=X4(x6(f));kt=0===ec?g(f):1===ec?A(f):C6(f)}}}break;default:I6(f,73);var rc=W4(x6(f));if(2>>0)kt=C6(f);else switch(rc){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var cc=U8(x6(f));if(3>>0)kt=C6(f);else switch(cc){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var ic=R8(x6(f));if(2>>0)kt=C6(f);else switch(ic){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,28);var uc=X4(x6(f));kt=0===uc?g(f):1===uc?A(f):C6(f)}break;default:I6(f,73);var vc=G8(x6(f));if(2>>0)kt=C6(f);else switch(vc){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var dc=W4(x6(f));if(2>>0)kt=C6(f);else switch(dc){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var pc=I4(x6(f));if(2>>0)kt=C6(f);else switch(pc){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ec=N4(x6(f));if(2>>0)kt=C6(f);else switch(Ec){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,29);var Rc=X4(x6(f));kt=0===Rc?g(f):1===Rc?A(f):C6(f)}}}}}}}break;case 36:I6(f,73);var Pc=x6(f),Xc=35>>0)kt=C6(f);else switch(Xc){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Jc=x6(f),Hc=35>>0)kt=C6(f);else switch(Hc){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Wc=I4(x6(f));if(2>>0)kt=C6(f);else switch(Wc){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Zc=D4(x6(f));if(2>>0)kt=C6(f);else switch(Zc){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var fi=D4(x6(f));if(2>>0)kt=C6(f);else switch(fi){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var oi=N4(x6(f));if(2>>0)kt=C6(f);else switch(oi){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var vi=Z4(x6(f));if(2>>0)kt=C6(f);else switch(vi){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,30);var bi=X4(x6(f));kt=0===bi?g(f):1===bi?A(f):C6(f)}}}}}break;case 3:I6(f,73);var ki=v8(x6(f));if(2>>0)kt=C6(f);else switch(ki){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var mi=Q4(x6(f));if(2>>0)kt=C6(f);else switch(mi){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Si=Z4(x6(f));if(2>>0)kt=C6(f);else switch(Si){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ci=N4(x6(f));if(2>>0)kt=C6(f);else switch(Ci){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,31);var Li=X4(x6(f));kt=0===Li?g(f):1===Li?A(f):C6(f)}}}}break;case 4:I6(f,73);var Fi=Q4(x6(f));if(2>>0)kt=C6(f);else switch(Fi){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Xi=I4(x6(f));if(2>>0)kt=C6(f);else switch(Xi){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Wi=v8(x6(f));if(2>>0)kt=C6(f);else switch(Wi){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var eu=R8(x6(f));if(2>>0)kt=C6(f);else switch(eu){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,32);var au=X4(x6(f));kt=0===au?g(f):1===au?A(f):C6(f)}}}}break;default:I6(f,73);var uu=N4(x6(f));if(2>>0)kt=C6(f);else switch(uu){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var fu=R8(x6(f));if(2>>0)kt=C6(f);else switch(fu){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var wu=N4(x6(f));if(2>>0)kt=C6(f);else switch(wu){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,33);var Eu=X4(x6(f));kt=0===Eu?g(f):1===Eu?A(f):C6(f)}}}}break;default:I6(f,34);var xu=X4(x6(f));kt=0===xu?g(f):1===xu?A(f):C6(f)}break;case 37:I6(f,73);var Iu=x6(f),Cu=35>>0)kt=C6(f);else switch(Cu){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Nu=j8(x6(f));if(2>>0)kt=C6(f);else switch(Nu){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ru=N4(x6(f));if(2>>0)kt=C6(f);else switch(Ru){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,35);var Uu=X4(x6(f));kt=0===Uu?g(f):1===Uu?A(f):C6(f)}}break;case 3:I6(f,73);var Du=I4(x6(f));if(2>>0)kt=C6(f);else switch(Du){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Bu=O8(x6(f));if(2>>0)kt=C6(f);else switch(Bu){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,36);var Ju=X4(x6(f));kt=0===Ju?g(f):1===Ju?A(f):C6(f)}}break;default:I6(f,73);var Wu=x6(f),Qu=35>>0)kt=C6(f);else switch(Qu){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var $u=q8(x6(f));if(2<$u>>>0)kt=C6(f);else switch($u){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var ef=Z4(x6(f));if(2>>0)kt=C6(f);else switch(ef){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var cf=R8(x6(f));if(2>>0)kt=C6(f);else switch(cf){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,37);var ff=X4(x6(f));kt=0===ff?g(f):1===ff?A(f):C6(f)}}}break;default:I6(f,73);var of=N4(x6(f));if(2>>0)kt=C6(f);else switch(of){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var df=W4(x6(f));if(2>>0)kt=C6(f);else switch(df){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Af=L4(x6(f));if(2>>0)kt=C6(f);else switch(Af){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var If=j8(x6(f));if(2>>0)kt=C6(f);else switch(If){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,38);var Cf=X4(x6(f));kt=0===Cf?g(f):1===Cf?A(f):C6(f)}}}}}}break;case 38:I6(f,73);var Of=x6(f),Rf=35>>0)kt=C6(f);else switch(Rf){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Lf=v8(x6(f));if(2>>0)kt=C6(f);else switch(Lf){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Df=j8(x6(f));if(2>>0)kt=C6(f);else switch(Df){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var jf=N4(x6(f));if(2>>0)kt=C6(f);else switch(jf){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,39);var Bf=X4(x6(f));kt=0===Bf?g(f):1===Bf?A(f):C6(f)}}}break;case 3:I6(f,73);var Yf=W4(x6(f));if(2>>0)kt=C6(f);else switch(Yf){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var zf=Q4(x6(f));if(2>>0)kt=C6(f);else switch(zf){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var lo=v8(x6(f));if(2>>0)kt=C6(f);else switch(lo){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var ko=v8(x6(f));if(2>>0)kt=C6(f);else switch(ko){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var mo=f8(x6(f));if(2>>0)kt=C6(f);else switch(mo){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,40);var Io=X4(x6(f));kt=0===Io?g(f):1===Io?A(f):C6(f)}}}}}break;case 4:I6(f,73);var Lo=Z4(x6(f));if(2>>0)kt=C6(f);else switch(Lo){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,41);var Xo=X4(x6(f));kt=0===Xo?g(f):1===Xo?A(f):C6(f)}break;default:I6(f,73);var jo=W4(x6(f));if(2>>0)kt=C6(f);else switch(jo){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ko=E8(x6(f));if(2>>0)kt=C6(f);else switch(Ko){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Zo=R8(x6(f));if(2>>0)kt=C6(f);else switch(Zo){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var tv=G8(x6(f));if(2>>0)kt=C6(f);else switch(tv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var iv=q8(x6(f));if(2>>0)kt=C6(f);else switch(iv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var fv=W4(x6(f));if(2>>0)kt=C6(f);else switch(fv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,42);var bv=X4(x6(f));kt=0===bv?g(f):1===bv?A(f):C6(f)}}}}}}}break;case 39:I6(f,73);var kv=x6(f),hv=35>>0)kt=C6(f);else switch(hv){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,43);var pv=X4(x6(f));kt=0===pv?g(f):1===pv?A(f):C6(f);break;case 3:I6(f,73);var Nv=M4(x6(f));if(2>>0)kt=C6(f);else switch(Nv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ov=x6(f),Rv=35>>0)kt=C6(f);else switch(Rv){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Pv=N4(x6(f));if(2>>0)kt=C6(f);else switch(Pv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Uv=O8(x6(f));if(2>>0)kt=C6(f);else switch(Uv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Yv=N4(x6(f));if(2>>0)kt=C6(f);else switch(Yv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Jv=W4(x6(f));if(2>>0)kt=C6(f);else switch(Jv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var zv=R8(x6(f));if(2>>0)kt=C6(f);else switch(zv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Kv=j8(x6(f));if(2>>0)kt=C6(f);else switch(Kv){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,44);var rl=X4(x6(f));kt=0===rl?g(f):1===rl?A(f):C6(f)}}}}}}break;default:I6(f,73);var vl=Z4(x6(f));if(2>>0)kt=C6(f);else switch(vl){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var bl=R8(x6(f));if(2>>0)kt=C6(f);else switch(bl){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,45);var pl=X4(x6(f));kt=0===pl?g(f):1===pl?A(f):C6(f)}}}}break;default:I6(f,46);var _l=U8(x6(f));if(3<_l>>>0)kt=C6(f);else switch(_l){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Sl=R8(x6(f));if(2>>0)kt=C6(f);else switch(Sl){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Nl=Q4(x6(f));if(2>>0)kt=C6(f);else switch(Nl){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ll=W4(x6(f));if(2>>0)kt=C6(f);else switch(Ll){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var ql=E8(x6(f));if(2>>0)kt=C6(f);else switch(ql){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Kl=N4(x6(f));if(2>>0)kt=C6(f);else switch(Kl){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var ab=q8(x6(f));if(2>>0)kt=C6(f);else switch(ab){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var cb=B8(x6(f));if(2>>0)kt=C6(f);else switch(cb){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,47);var yb=X4(x6(f));kt=0===yb?g(f):1===yb?A(f):C6(f)}}}}}}}break;default:I6(f,73);var Nb=N4(x6(f));if(2>>0)kt=C6(f);else switch(Nb){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ub=Z4(x6(f));if(2>>0)kt=C6(f);else switch(Ub){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Fb=B8(x6(f));if(2>>0)kt=C6(f);else switch(Fb){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Xb=Q4(x6(f));if(2>>0)kt=C6(f);else switch(Xb){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Bb=E8(x6(f));if(2>>0)kt=C6(f);else switch(Bb){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var qb=N4(x6(f));if(2>>0)kt=C6(f);else switch(qb){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,48);var Yb=X4(x6(f));kt=0===Yb?g(f):1===Yb?A(f):C6(f)}}}}}}}}break;case 40:I6(f,73);var Jb=N4(x6(f));if(2>>0)kt=C6(f);else switch(Jb){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var tk=R8(x6(f));if(2>>0)kt=C6(f);else switch(tk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,49);var sk=X4(x6(f));kt=0===sk?g(f):1===sk?A(f):C6(f)}}break;case 41:I6(f,73);var ck=x6(f),vk=35>>0)kt=C6(f);else switch(vk){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var lk=W8(x6(f));if(2>>0)kt=C6(f);else switch(lk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,50);var kk=X4(x6(f));kt=0===kk?g(f):1===kk?A(f):C6(f)}break;default:I6(f,73);var dk=v8(x6(f));if(2>>0)kt=C6(f);else switch(dk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var hk=v8(x6(f));if(2>>0)kt=C6(f);else switch(hk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,51);var pk=X4(x6(f));kt=0===pk?g(f):1===pk?A(f):C6(f)}}}break;case 42:I6(f,73);var mk=x6(f),wk=35>>0)kt=C6(f);else switch(wk){case 0:kt=g(f);break;case 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k?0:-1:0:-1:be<_k?kr<_k?Su<_k?ln<_k?Wb<_k?mt<_k?0:-1:0:-1:lc<_k?Zn<_k?0:-1:0:-1:fo<_k?$s<_k?ov<_k?Qr<_k?0:-1:0:-1:He<_k?Gt<_k?0:-1:0:-1:On<_k?yt<_k?wv<_k?Ae<_k?Ne<_k?_r<_k?kc<_k?ra<_k?cu<_k?Xu<_k?0:-1:0:-1:Ao<_k?nc<_k?0:-1:0:-1:Tf<_k?aa<_k?bn<_k?qc<_k?0:-1:0:-1:yu<_k?Go<_k?0:-1:0:-1:er<_k?gl<_k?bo<_k?Gv<_k?br<_k?fe<_k?0:-1:0:-1:Ai<_k?ke<_k?0:-1:0:-1:Wf<_k?gc<_k?pu<_k?Ie<_k?0:-1:0:-1:C<_k?et<_k?0:-1:0:-1:Kn<_k?ls<_k?Xs<_k?Ge<_k?sb<_k?Ob<_k?de<_k?T<_k?0:-1:0:-1:Ze<_k?qi<_k?0:-1:0:-1:Pi<_k?Vt<_k?Pb<_k?Dl<_k?0:-1:0:-1:xs<_k?en<_k?0:-1:0:-1:dr<_k?ub<_k?Ft<_k?Me<_k?_o<_k?af<_k?0:-1:0:-1:wn<_k?va<_k?0:-1:0:-1:Mo<_k?jn<_k?_s<_k?ft<_k?0:-1:0:-1:Ou<_k?Ce<_k?0:-1:0:-1:Ed(Iz,_k+_c|0)-1|0:-1;if(2>>0)kt=C6(f);else switch(Tk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Sk=I4(x6(f));if(2>>0)kt=C6(f);else switch(Sk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ek=N4(x6(f));if(2>>0)kt=C6(f);else switch(Ek){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,53);var xk=X4(x6(f));kt=0===xk?g(f):1===xk?A(f):C6(f)}}}}}break;case 43:I6(f,73);var Ak=x6(f),Ik=35>>0)kt=C6(f);else switch(Ik){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Ck=E8(x6(f));if(2>>0)kt=C6(f);else switch(Ck){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ok=x4(x6(f));if(2>>0)kt=C6(f);else switch(Ok){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Rk=Q4(x6(f));if(2>>0)kt=C6(f);else switch(Rk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Lk=D4(x6(f));if(2>>0)kt=C6(f);else switch(Lk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Pk=N4(x6(f));if(2>>0)kt=C6(f);else switch(Pk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,54);var Uk=X4(x6(f));kt=0===Uk?g(f):1===Uk?A(f):C6(f)}}}}}break;case 3:I6(f,73);var Dk=x6(f),Fk=35>>0)kt=C6(f);else switch(Fk){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Mk=x6(f),Xk=35>>0)kt=C6(f);else switch(Xk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var jk=Q4(x6(f));if(2>>0)kt=C6(f);else switch(jk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Bk=R8(x6(f));if(2>>0)kt=C6(f);else switch(Bk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var qk=N4(x6(f));if(2>>0)kt=C6(f);else switch(qk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,55);var Gk=X4(x6(f));kt=0===Gk?g(f):1===Gk?A(f):C6(f)}}}}break;default:I6(f,73);var Yk=R8(x6(f));if(2>>0)kt=C6(f);else switch(Yk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Jk=N4(x6(f));if(2>>0)kt=C6(f);else switch(Jk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Hk=E8(x6(f));if(2>>0)kt=C6(f);else switch(Hk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Wk=R8(x6(f));if(2>>0)kt=C6(f);else switch(Wk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Vk=N4(x6(f));if(2>>0)kt=C6(f);else switch(Vk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var zk=L4(x6(f));if(2>>0)kt=C6(f);else switch(zk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,56);var Kk=X4(x6(f));kt=0===Kk?g(f):1===Kk?A(f):C6(f)}}}}}}}break;default:I6(f,73);var Qk=P8(x6(f));if(2>>0)kt=C6(f);else switch(Qk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var $k=v8(x6(f));if(2<$k>>>0)kt=C6(f);else switch($k){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Zk=G8(x6(f));if(2>>0)kt=C6(f);else switch(Zk){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var td=E8(x6(f));if(2>>0)kt=C6(f);else switch(td){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,57);var ed=X4(x6(f));kt=0===ed?g(f):1===ed?A(f):C6(f)}}}}}break;case 44:I6(f,73);var rd=N4(x6(f));if(2>>0)kt=C6(f);else switch(rd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var ad=R8(x6(f));if(2>>0)kt=C6(f);else switch(ad){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var nd=I4(x6(f));if(2>>0)kt=C6(f);else switch(nd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var cd=Z4(x6(f));if(2>>0)kt=C6(f);else switch(cd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var id=W4(x6(f));if(2>>0)kt=C6(f);else switch(id){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,58);var ud=X4(x6(f));kt=0===ud?g(f):1===ud?A(f):C6(f)}}}}}break;case 45:I6(f,73);var fd=x6(f),od=35>>0)kt=C6(f);else switch(od){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var vd=Q4(x6(f));if(2>>0)kt=C6(f);else switch(vd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var ld=R8(x6(f));if(2>>0)kt=C6(f);else switch(ld){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var bd=G8(x6(f));if(2>>0)kt=C6(f);else switch(bd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var kd=E8(x6(f));if(2>>0)kt=C6(f);else switch(kd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,59);var dd=X4(x6(f));kt=0===dd?g(f):1===dd?A(f):C6(f)}}}}break;case 3:I6(f,73);var hd=M4(x6(f));if(2>>0)kt=C6(f);else switch(hd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var pd=N4(x6(f));if(2>>0)kt=C6(f);else switch(pd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var md=Z4(x6(f));if(2>>0)kt=C6(f);else switch(md){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,60);var wd=X4(x6(f));kt=0===wd?g(f):1===wd?A(f):C6(f)}}}break;default:I6(f,73);var yd=G8(x6(f));if(2>>0)kt=C6(f);else switch(yd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var gd=R8(x6(f));if(2>>0)kt=C6(f);else switch(gd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var _d=E8(x6(f));if(2<_d>>>0)kt=C6(f);else switch(_d){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Td=J8(x6(f));if(2>>0)kt=C6(f);else switch(Td){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,61);var Sd=X4(x6(f));kt=0===Sd?g(f):1===Sd?A(f):C6(f)}}}}}break;case 46:I6(f,73);var xd=x6(f),Ad=35>>0)kt=C6(f);else switch(Ad){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Id=x6(f),Cd=35>>0)kt=C6(f);else switch(Cd){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Nd=j8(x6(f));if(2>>0)kt=C6(f);else switch(Nd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,62);var Od=X4(x6(f));kt=0===Od?g(f):1===Od?A(f):C6(f)}break;default:I6(f,73);var Rd=q8(x6(f));if(2>>0)kt=C6(f);else switch(Rd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Ld=W8(x6(f));if(2>>0)kt=C6(f);else switch(Ld){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,63);var Pd=X4(x6(f));kt=0===Pd?g(f):1===Pd?A(f):C6(f)}}}break;case 3:I6(f,73);var Ud=x6(f),Dd=35>>0)kt=C6(f);else switch(Dd){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Fd=N4(x6(f));if(2>>0)kt=C6(f);else switch(Fd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,64);var Md=X4(x6(f));kt=0===Md?g(f):1===Md?A(f):C6(f)}break;default:I6(f,65);var Xd=X4(x6(f));kt=0===Xd?g(f):1===Xd?A(f):C6(f)}break;default:I6(f,73);var jd=M4(x6(f));if(2>>0)kt=C6(f);else switch(jd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Bd=N4(x6(f));if(2>>0)kt=C6(f);else switch(Bd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,66);var qd=q8(x6(f));if(2>>0)kt=C6(f);else switch(qd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var Jd=B8(x6(f));if(2>>0)kt=C6(f);else switch(Jd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,67);var Vd=X4(x6(f));kt=0===Vd?g(f):1===Vd?A(f):C6(f)}}}}}break;case 47:I6(f,73);var zd=x6(f),Kd=35>>0)kt=C6(f);else switch(Kd){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var Qd=Z4(x6(f));if(2>>0)kt=C6(f);else switch(Qd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,68);var $d=X4(x6(f));kt=0===$d?g(f):1===$d?A(f):C6(f)}break;default:I6(f,73);var Zd=G8(x6(f));if(2>>0)kt=C6(f);else switch(Zd){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var th=L4(x6(f));if(2>>0)kt=C6(f);else switch(th){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,69);var eh=X4(x6(f));kt=0===eh?g(f):1===eh?A(f):C6(f)}}}break;case 48:I6(f,73);var rh=x6(f),ah=35>>0)kt=C6(f);else switch(ah){case 0:kt=g(f);break;case 1:kt=A(f);break;case 2:I6(f,73);var nh=G8(x6(f));if(2>>0)kt=C6(f);else switch(nh){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var sh=v8(x6(f));if(2>>0)kt=C6(f);else switch(sh){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var ch=N4(x6(f));if(2>>0)kt=C6(f);else switch(ch){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,70);var ih=X4(x6(f));kt=0===ih?g(f):1===ih?A(f):C6(f)}}}break;default:I6(f,73);var uh=R8(x6(f));if(2>>0)kt=C6(f);else switch(uh){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var fh=J8(x6(f));if(2>>0)kt=C6(f);else switch(fh){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,71);var oh=X4(x6(f));kt=0===oh?g(f):1===oh?A(f):C6(f)}}}break;case 49:I6(f,73);var vh=G8(x6(f));if(2>>0)kt=C6(f);else switch(vh){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var lh=N4(x6(f));if(2>>0)kt=C6(f);else switch(lh){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var kh=v8(x6(f));if(2>>0)kt=C6(f);else switch(kh){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,73);var dh=L4(x6(f));if(2>>0)kt=C6(f);else switch(dh){case 0:kt=g(f);break;case 1:kt=A(f);break;default:I6(f,72);var hh=X4(x6(f));kt=0===hh?g(f):1===hh?A(f):C6(f)}}}}break;case 50:kt=75;break;case 51:I6(f,ya);var ph=x6(f),mh=60>>0)var wh=m2(WW);else{var yh=kt;if(67<=yh)if(Uf<=yh)switch(yh){case 100:wh=[0,u,96];break;case 101:wh=[0,u,68];break;case 102:wh=[0,u,67];break;case 103:wh=[0,u,98];break;case 104:wh=[0,u,97];break;case 105:wh=[0,u,78];break;case 106:wh=[0,u,77];break;case 107:wh=[0,u,75];break;case 108:wh=[0,u,76];break;case 109:wh=[0,u,73];break;case 110:wh=[0,u,72];break;case 111:wh=[0,u,71];break;case 112:wh=[0,u,70];break;case 113:wh=[0,u,94];break;case 114:wh=[0,u,95];break;case 115:wh=[0,u,99];break;case 116:wh=[0,u,Uf];break;case 117:wh=[0,u,wf];break;case 118:wh=[0,u,je];break;case 119:wh=[0,u,Kc];break;case 120:wh=[0,u,85];break;case 121:wh=[0,u,87];break;case 122:wh=[0,u,86];break;case 123:wh=[0,u,105];break;case 124:wh=[0,u,tc];break;case 125:wh=[0,u,79];break;case 126:wh=[0,u,11];break;case 127:wh=[0,u,74];break;case 128:wh=[0,u,Jt];break;case 129:wh=[0,u,13];break;case 130:wh=[0,u,14];break;case 131:wh=[0,u[4]?Z8(u,Q8(u,f),7):u,Ot];break;default:wh=[0,e5(u,Q8(u,f)),[5,H6(f)]]}else switch(yh){case 67:wh=[0,u,46];break;case 68:wh=[0,u,24];break;case 69:wh=[0,u,47];break;case 70:wh=[0,u,25];break;case 71:wh=[0,u,26];break;case 72:wh=[0,u,58];break;case 73:var gh=Q8(u,f),_h=H6(f),Th=u5(u,_h);wh=[0,Th[1],[3,gh,Th[2],_h]];break;case 74:var Sh=Q8(u,f),Eh=H6(f);wh=[0,u,[3,Sh,Eh,Eh]];break;case 75:wh=[0,u,0];break;case 76:wh=[0,u,1];break;case 77:wh=[0,u,4];break;case 78:wh=[0,u,5];break;case 79:wh=[0,u,6];break;case 80:wh=[0,u,7];break;case 81:wh=[0,u,12];break;case 82:wh=[0,u,10];break;case 83:wh=[0,u,8];break;case 84:wh=[0,u,9];break;case 85:wh=[0,u,82];break;case 86:N6(f),A6(f);var xh=x6(f);wh=0===(0===(62>>0)var i=C6(e);else switch(c){case 0:if(0===O4(x6(e)))for(;;){var u=m8(x6(e));if(0!==u){i=1===u?a(e):C6(e);break}}else i=C6(e);break;case 1:var f=q4(x6(e));i=0===f?n(e):1===f?a(e):C6(e);break;default:for(;;){var o=o8(x6(e));if(2>>0)i=C6(e);else switch(o){case 0:i=n(e);break;case 1:continue;default:i=a(e)}break}}return 0===i?[0,t,[0,3,H6(e)]]:m2(qW)});break;case 20:wh=f5(u,f,function(t,e){function r(t){for(;;)if(I6(t,0),0!==O4(x6(t)))return C6(t)}A6(e);var a=A8(x6(e));if(0===a)var n=0===O4(x6(e))?r(e):C6(e);else if(1===a)for(;;){I6(e,0);var s=A8(x6(e));if(0===s){I6(e,0);n=0===O4(x6(e))?r(e):C6(e)}else{if(1===s)continue;n=C6(e)}break}else n=C6(e);return 0===n?[0,t,[0,3,H6(e)]]:m2(BW)});break;case 22:wh=[0,u,64];break;case 23:wh=[0,u,65];break;case 24:wh=[0,u,32];break;case 25:wh=[0,u,33];break;case 26:wh=[0,u,34];break;case 27:wh=[0,u,40];break;case 28:wh=[0,u,27];break;case 29:wh=[0,u,35];break;case 30:wh=[0,u,59];break;case 31:wh=[0,u,60];break;case 32:wh=[0,u,36];break;case 33:wh=[0,u,45];break;default:wh=[0,u,[0,3,H6(f)]]}}if(0===wh[0]){var np=$8([0,wh[1],wh[2]]);break}u=wh[1]}break;case 1:for(var sp=i;;){var cp=h5(sp,sp[2]);if(0===cp[0]){np=$8([0,cp[1],cp[2]]);break}sp=cp[1]}break;case 2:for(var ip=i;;){var up=ip[2],fp=function(t,e){for(;;){I6(e,12);var r=r8(x6(e));if(0!==r)return 1===r?t<50?op(t+1|0,e):Wd(op,[0,e]):C6(e)}},op=function(t,e){if(0===H8(x6(e))){var r=I8(x6(e));if(0===r)return 0===P4(x6(e))&&0===P4(x6(e))&&0===P4(x6(e))?t<50?fp(t+1|0,e):Wd(fp,[0,e]):C6(e);if(1===r){if(0===P4(x6(e)))for(;;){var a=j4(x6(e));if(0!==a)return 1===a?t<50?fp(t+1|0,e):Wd(fp,[0,e]):C6(e)}return C6(e)}return C6(e)}return C6(e)},vp=function(t){return Hd(fp(0,t))};A6(up);var lp=x6(up),bp=Uc>>0)var kp=C6(up);else switch(bp){case 0:kp=0;break;case 1:kp=14;break;case 2:if(I6(up,2),0===C4(x6(up))){for(;;)if(I6(up,2),0!==C4(x6(up))){kp=C6(up);break}}else kp=C6(up);break;case 3:kp=1;break;case 4:I6(up,1);kp=0===C8(x6(up))?1:C6(up);break;case 5:kp=13;break;case 6:I6(up,12);var dp=r8(x6(up));kp=0===dp?vp(up):1===dp?function(t){return Hd(op(0,t))}(up):C6(up);break;case 7:kp=10;break;case 8:I6(up,6);var hp=F8(x6(up));kp=0===hp?4:1===hp?3:C6(up);break;case 9:kp=9;break;case 10:kp=5;break;case 11:kp=11;break;case 12:kp=7;break;case 13:if(I6(up,14),0===H8(x6(up))){var pp=I8(x6(up));if(0===pp)kp=0===P4(x6(up))&&0===P4(x6(up))&&0===P4(x6(up))?vp(up):C6(up);else if(1===pp)if(0===P4(x6(up)))for(;;){var mp=j4(x6(up));if(0!==mp){kp=1===mp?vp(up):C6(up);break}}else kp=C6(up);else kp=C6(up)}else kp=C6(up);break;default:kp=8}if(14>>0)var wp=m2(XW);else switch(kp){case 0:wp=[0,ip,Ot];break;case 1:wp=[1,r5(ip,up)];break;case 2:wp=[1,ip];break;case 3:var yp=Q8(ip,up),gp=Z2(uo),_p=v5(ip,gp,up);wp=[1,n5(_p[1],yp,_p[2],gp,0)];break;case 4:var Tp=Q8(ip,up),Sp=Z2(uo),Ep=o5(ip,Sp,up);wp=[1,n5(Ep[1],Tp,Ep[2],Sp,1)];break;case 5:wp=[0,ip,94];break;case 6:wp=[0,ip,Jt];break;case 7:wp=[0,ip,95];break;case 8:wp=[0,ip,0];break;case 9:wp=[0,ip,82];break;case 10:wp=[0,ip,10];break;case 11:wp=[0,ip,79];break;case 12:wp=[0,ip,[6,H6(up)]];break;case 13:var xp=H6(up),Ap=Q8(ip,up),Ip=Z2(uo),Cp=Z2(uo);a3(Cp,xp);var Np=Gd(xp,jW)?0:1,Op=d5(ip,Np,Ip,Cp,up);a3(Cp,xp);var Rp=t3(Ip),Lp=t3(Cp),Pp=[7,[0,p4(Ap,Op[2]),Rp,Lp]];wp=[0,Op[1],Pp];break;default:wp=[0,ip,[5,H6(up)]]}if(0===wp[0]){np=$8([0,wp[1],wp[2]]);break}ip=wp[1]}break;case 3:var Up=R6(i[2]),Dp=K8(i,Up,Up),Fp=Z2(uo),Mp=Z2(uo),Xp=i[2];A6(Xp);var jp=x6(Xp),Bp=zr>>0)var qp=C6(Xp);else switch(Bp){case 0:qp=1;break;case 1:qp=4;break;case 2:qp=0;break;case 3:I6(Xp,0);qp=0===C8(x6(Xp))?0:C6(Xp);break;case 4:qp=2;break;default:qp=3}if(4>>0)var Gp=m2(MW);else switch(qp){case 0:var Yp=H6(Xp);a3(Mp,Yp),a3(Fp,Yp);var Jp=d5(r5(i,Xp),2,Fp,Mp,Xp),Hp=t3(Fp),Wp=t3(Mp),Vp=[7,[0,p4(Dp,Jp[2]),Hp,Wp]];Gp=[0,Jp[1],Vp];break;case 1:Gp=[0,i,Ot];break;case 2:Gp=[0,i,94];break;case 3:Gp=[0,i,0];break;default:var zp=H6(Xp);a3(Mp,zp),a3(Fp,zp);var Kp=d5(i,2,Fp,Mp,Xp),Qp=t3(Fp),$p=t3(Mp),Zp=[7,[0,p4(Dp,Kp[2]),Qp,$p]];Gp=[0,Kp[1],Zp]}np=$8([0,Gp[1],Gp[2]]);break;case 4:for(var tm=i[2],em=i;;){A6(tm);var rm=x6(tm),am=-1>>0)var nm=C6(tm);else switch(am){case 0:nm=5;break;case 1:if(I6(tm,1),0===C4(x6(tm))){for(;;)if(I6(tm,1),0!==C4(x6(tm))){nm=C6(tm);break}}else nm=C6(tm);break;case 2:nm=0;break;case 3:I6(tm,0);nm=0===C8(x6(tm))?0:C6(tm);break;case 4:I6(tm,5);var sm=F8(x6(tm));nm=0===sm?3:1===sm?2:C6(tm);break;default:nm=4}if(5>>0)var cm=m2(TW);else switch(nm){case 0:em=r5(em,tm);continue;case 1:continue;case 2:var im=Q8(em,tm),um=Z2(uo),fm=v5(em,um,tm);em=n5(fm[1],im,fm[2],um,0);continue;case 3:var om=Q8(em,tm),vm=Z2(uo),lm=o5(em,vm,tm);em=n5(lm[1],om,lm[2],vm,1);continue;case 4:var bm=Q8(em,tm),km=Z2(uo),dm=Z2(uo),hm=Z2(uo);a3(hm,SW);var pm=k5(em,bm,km,dm,hm,tm),mm=pm[3],wm=t3(hm),ym=t3(dm),gm=[0,t3(km),ym,wm];cm=[0,pm[1],[2,[0,pm[2],gm,mm]]];break;default:var _m=e5(em,Q8(em,tm));cm=[0,_m,[2,[0,Q8(_m,tm),EW,1]]]}np=$8(cm);break}break;default:for(var Tm=i[2],Sm=i;;){A6(Tm);var Em=x6(Tm),xm=Uc>>0)var Am=C6(Tm);else switch(xm){case 0:Am=0;break;case 1:Am=6;break;case 2:if(I6(Tm,2),0===C4(x6(Tm))){for(;;)if(I6(Tm,2),0!==C4(x6(Tm))){Am=C6(Tm);break}}else Am=C6(Tm);break;case 3:Am=1;break;case 4:I6(Tm,1);Am=0===C8(x6(Tm))?1:C6(Tm);break;default:I6(Tm,5);var Im=F8(x6(Tm));Am=0===Im?4:1===Im?3:C6(Tm)}if(6>>0)var Cm=m2(VF);else switch(Am){case 0:Cm=[0,Sm,Ot];break;case 1:Sm=r5(Sm,Tm);continue;case 2:continue;case 3:var Nm=Q8(Sm,Tm),Om=Z2(uo),Rm=v5(Sm,Om,Tm);Sm=n5(Rm[1],Nm,Rm[2],Om,0);continue;case 4:var Lm=Q8(Sm,Tm),Pm=Z2(uo),Um=o5(Sm,Pm,Tm);Sm=n5(Um[1],Lm,Um[2],Pm,1);continue;case 5:var Dm=Q8(Sm,Tm),Fm=Z2(uo),Mm=Sm;t:for(;;){A6(Tm);var Xm=x6(Tm),jm=92>>0)var Bm=C6(Tm);else switch(jm){case 0:Bm=0;break;case 1:Bm=7;break;case 2:Bm=6;break;case 3:I6(Tm,6);Bm=0===C8(x6(Tm))?6:C6(Tm);break;case 4:if(I6(Tm,4),0===Y4(x6(Tm))){for(;;)if(I6(Tm,3),0!==Y4(x6(Tm))){Bm=C6(Tm);break}}else Bm=C6(Tm);break;case 5:Bm=5;break;default:I6(Tm,7);var qm=x6(Tm),Gm=-1>>0)Bm=C6(Tm);else switch(Gm){case 0:Bm=2;break;case 1:Bm=1;break;default:I6(Tm,1);Bm=0===C8(x6(Tm))?1:C6(Tm)}}if(7>>0)var Ym=m2(GF);else switch(Bm){case 0:Ym=[0,Z8(Mm,Q8(Mm,Tm),19),YF];break;case 1:Ym=[0,Z8(Mm,Q8(Mm,Tm),19),JF];break;case 3:var Jm=H6(Tm);Ym=[0,Mm,G2(Jm,1,sd(Jm)-1|0)];break;case 4:Ym=[0,Mm,HF];break;case 5:for(r3(Fm,91);;){A6(Tm);var Hm=x6(Tm),Wm=93>>0)var Vm=C6(Tm);else switch(Wm){case 0:Vm=0;break;case 1:Vm=4;break;case 2:I6(Tm,4);var zm=x6(Tm),Km=91>>0)var Qm=m2(BF);else switch(Vm){case 0:Qm=Mm;break;case 1:a3(Fm,qF);continue;case 2:r3(Fm,92),r3(Fm,93);continue;case 3:r3(Fm,93);Qm=Mm;break;default:a3(Fm,H6(Tm));continue}Mm=Qm;continue t}case 6:Ym=[0,Z8(Mm,Q8(Mm,Tm),19),WF];break;default:a3(Fm,H6(Tm));continue}var $m=Ym[1],Zm=p4(Dm,Q8($m,Tm)),tw=Ym[2];Cm=[0,$m,[4,[0,Zm,t3(Fm),tw]]];break}break;default:Cm=[0,e5(Sm,Q8(Sm,Tm)),[5,H6(Tm)]]}np=$8(Cm);break}}var ew=np[1],rw=y4(ew[2].slice(),ew);t[4]=ew;var aw=t[2],nw=[0,[0,rw,np[2]]];Nk(t[1],aw)[aw+1]=nw,t[2]=t[2]+1|0}},y5=function(t,e,r,a){var n=t?t[1]:t,s=e?e[1]:e;try{var c=Y6(a),i=0}catch(e){if((e=Kd(e))!==h6)throw e;var u=[0,[0,[0,r,vh[2],vh[3]],76],0];c=Y6(DQ),i=u}var f=s?s[1]:dh,o=function(t,e,r){return[0,t,e,ZR,0,r,lh]}(r,c,f[6]),v=[0,m5(o,0)];return[0,[0,i],[0,0],p5[1],[0,p5[1]],[0,0],f[7],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[0,FQ],[0,o],v,[0,n],f,r,[0,0]]},g5=function(t){return I2(t[22][1])},_5=function(t){return t[26][6]},T5=function(t,e){var r=e[2];t[1][1]=[0,[0,e[1],r],t[1][1]];var a=t[21];return a?$d(a[1],t,r):a},S5=function(t,e){var r=e[2];if(Gd(r,UQ))return 0;if($d(p5[3],r,t[4][1]))return T5(t,[0,e[1],[8,r]]);var a=$d(p5[4],r,t[4][1]);return t[4][1]=a,0},E5=function(t,e){if(t<2){var r=e[24][1];w5(r,t);var a=Nk(r[1],t)[t+1];return a?a[1][2]:m2(XQ)}throw[0,uh,RQ]},x5=function(t,e){var r=e.slice();return r[6]=t,r},A5=function(t,e){var r=e.slice();return r[17]=t,r},I5=function(t,e){var r=e.slice();return r[18]=t,r},C5=function(t,e){var r=e.slice();return r[19]=t,r},N5=function(t,e){var r=e.slice();return r[20]=t,r},O5=function(t,e){var r=e.slice();return r[14]=t,r},R5=function(t,e){var r=e.slice();return r[8]=t,r},L5=function(t,e){var r=e.slice();return r[12]=t,r},P5=function(t,e){var r=e.slice();return r[15]=t,r},U5=function(t,e){var r=e.slice();return r[7]=t,r},D5=function(t,e){var r=e.slice();return r[13]=t,r},F5=function(t,e){var r=e.slice();return r[21]=[0,t],r},M5=function(t){function e(e){return T5(t,e)}return function(t){return R2(e,t)}},X5=function(t){var e=t[5][1];return e?[0,e[1][2]]:e},j5=function(t){var e=t[5][1];return e?[0,e[1][1]]:e},B5=function(t){var e=t.slice();return e[21]=0,e},q5=function(t,e,r){var a=t.slice();return a[3]=p5[1],a[8]=0,a[9]=0,a[10]=0,a[11]=1,a[17]=r,a[18]=e,a},G5=function(t){return Yd(t,QK)?0:1},Y5=function(t){if("number"==typeof t){if(48===t)return 1}else if(3===t[0]&&G5(t[3]))return 1;return 0},J5=function(t){return Yd(t,GK)&&Yd(t,YK)&&Yd(t,JK)&&Yd(t,HK)&&Yd(t,WK)&&Yd(t,VK)&&Yd(t,zK)&&Yd(t,KK)?0:1},H5=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]&&J5(t[3]))return 1;return 0},W5=function(t){return Yd(t,BK)&&Yd(t,qK)?0:1},V5=function(t){var e=Lk(t,$K);if(0<=e)if(0>>0){if(!(108<(r+1|0)>>>0))return 1}else{var a=6!==r?1:0;if(!a)return a}}return e7(t)},a7=function(t,e){var r=K5(t,e);if(H5(r))return 1;if(Y5(r))return 1;if("number"==typeof r)var a=0;else if(3===r[0])if(W5(r[3])){var n=1;a=1}else a=0;else a=0;if(!a)n=0;if(n)return 1;if("number"==typeof r)switch(r){case 14:case 28:case 60:case 61:case 62:case 63:case 64:case 65:var s=1;break;default:s=0}else s=3===r[0]?1:0;return s?1:0},n7=function(t){return a7(0,t)},s7=function(t){var e=15===$5(t)?1:0;if(e)var r=e;else{var a=64===$5(t)?1:0;r=a?15===K5(1,t)?1:0:a}return r},c7=function(t){var e=$5(t);if("number"==typeof e&&(13===e?1:40===e?1:0))return 1;return 0},i7=function(t,e){return T5(t,[0,Z5(t),e])},u7=function(t){var e=t7(t);Qd(M5(t),e);var r=$5(t);if("number"==typeof r)if(Ot===r)var a=7,n=1;else n=0;else switch(r[0]){case 0:a=0,n=1;break;case 3:a=2,n=1;break;case 1:case 7:a=1,n=1;break;default:n=0}if(!n)if(Y5(r))a=3;else if(H5(r))a=45;else{if("number"==typeof r){var s=r;if(58<=s)switch(s){case 58:var c=nP;break;case 59:c=sP;break;case 60:c=cP;break;case 61:c=iP;break;case 62:c=uP;break;case 63:c=fP;break;case 64:c=oP;break;case 65:c=vP;break;case 66:c=lP;break;case 67:c=bP;break;case 68:c=kP;break;case 69:c=dP;break;case 70:c=hP;break;case 71:c=pP;break;case 72:c=mP;break;case 73:c=wP;break;case 74:c=yP;break;case 75:c=gP;break;case 76:c=_P;break;case 77:c=TP;break;case 78:c=SP;break;case 79:c=EP;break;case 80:c=xP;break;case 81:c=AP;break;case 82:c=IP;break;case 83:c=CP;break;case 84:c=NP;break;case 85:c=OP;break;case 86:c=RP;break;case 87:c=LP;break;case 88:c=PP;break;case 89:c=UP;break;case 90:c=DP;break;case 91:c=FP;break;case 92:c=MP;break;case 93:c=XP;break;case 94:c=jP;break;case 95:c=BP;break;case 96:c=qP;break;case 97:c=GP;break;case 98:c=YP;break;case 99:c=JP;break;case 100:c=HP;break;case 101:c=WP;break;case 102:c=VP;break;case 103:c=zP;break;case 104:c=KP;break;case 105:c=QP;break;case 106:c=$P;break;case 107:c=ZP;break;case 108:c=tU;break;case 109:c=eU;break;case 110:c=rU;break;case 111:c=aU;break;case 112:c=nU;break;case 113:c=sU;break;case 114:c=cU;break;default:c=iU}else switch(s){case 0:c=tL;break;case 1:c=eL;break;case 2:c=rL;break;case 3:c=aL;break;case 4:c=nL;break;case 5:c=sL;break;case 6:c=cL;break;case 7:c=iL;break;case 8:c=uL;break;case 9:c=fL;break;case 10:c=oL;break;case 11:c=vL;break;case 12:c=lL;break;case 13:c=bL;break;case 14:c=kL;break;case 15:c=dL;break;case 16:c=hL;break;case 17:c=pL;break;case 18:c=mL;break;case 19:c=wL;break;case 20:c=yL;break;case 21:c=gL;break;case 22:c=_L;break;case 23:c=TL;break;case 24:c=SL;break;case 25:c=EL;break;case 26:c=xL;break;case 27:c=AL;break;case 28:c=IL;break;case 29:c=CL;break;case 30:c=NL;break;case 31:c=OL;break;case 32:c=RL;break;case 33:c=LL;break;case 34:c=PL;break;case 35:c=UL;break;case 36:c=DL;break;case 37:c=FL;break;case 38:c=ML;break;case 39:c=XL;break;case 40:c=jL;break;case 41:c=BL;break;case 42:c=qL;break;case 43:c=GL;break;case 44:c=YL;break;case 45:c=JL;break;case 46:c=HL;break;case 47:c=WL;break;case 48:c=VL;break;case 49:c=zL;break;case 50:c=KL;break;case 51:c=QL;break;case 52:c=$L;break;case 53:c=ZL;break;case 54:c=tP;break;case 55:c=eP;break;case 56:c=rP;break;default:c=aP}}else switch(r[0]){case 0:c=r[2];break;case 2:c=r[1][2][3];break;case 4:var i=r[1],u=_2(uU,i[3]);c=_2(fU,_2(i[2],u));break;case 8:c=0===r[1]?vU:oU;break;case 1:case 7:c=r[1][3];break;case 3:case 9:c=r[3];break;default:c=r[1]}a=[1,c]}return i7(t,a)},f7=function(t){function e(e){return T5(t,[0,e[1],65])}return function(t){return R2(e,t)}},o7=function(t,e){var r=t[6];return r?i7(t,e):r},v7=function(t,e){var r=t[6];return r?T5(t,[0,e[1],e[2]]):r},l7=function(t,e){return T5(t,[0,e,[7,t[6]]])},b7=function(t){var e=t[25][1];if(e){var r=g5(t),a=$5(t),n=[0,Z5(t),a,r];Qd(e[1],n)}var s=t[24][1];w5(s,0);var c=Nk(s[1],0)[1],i=c?c[1][1]:m2(MQ);t[23][1]=i;var u=t7(t);Qd(M5(t),u),R2(function(e){return t[2][1]=[0,e,t[2][1]],0},E5(0,t)[4]);var f=[0,E5(0,t)];t[5][1]=f;var o=t[24][1];w5(o,0),1>>0?$d(h,r,Qd(e,r)):$d(p,r,$d(t[13],0,r))}function U(t,r,a){return E7([0,r],function(t){var r=Qd(w,t);return p7(t,82),[0,r,Qd(e,t),a]},t)}function D(t,e,r,a){var n=U(t,e,$d(I,0,t)),s=[0,n[1],[1,n[2]]];return[0,[0,s[1],[0,a,[0,s],0,r,1,0]]]}function F(t,r,a,n,s){return 1-_5(t)&&i7(t,12),[0,E7([0,r],function(t){var r=w7(t,81);return p7(t,82),[0,s,[0,Qd(e,t)],r,a,0,n]},t)]}function M(t,e){var r=$5(e);if("number"==typeof r&&!(10<=r))switch(r){case 1:if(!t)return 0;break;case 3:if(t)return 0;break;case 8:case 9:return b7(e)}return u7(e)}function X(t,e){return e?T5(t,[0,e[1][1],8]):e}function j(t,e,r){return r&&!e?T5(t,[0,r[1],9]):0}function B(e){p7(e,66);var r=4===$5(e)?1:0;if(r){p7(e,4),k7(e,0);var a=Qd(t[9],e);d7(e),p7(e,5);var n=[0,a]}else n=r;return n}hk(e,function(t){return Qd(n,t)}),hk(r,function(t){return 1-_5(t)&&i7(t,12),E7(0,function(t){return p7(t,82),Qd(e,t)},t)}),hk(a,function(t){var e=Z5(t),r=$5(t);if("number"==typeof r){if(99===r)return b7(t),[0,[0,e,0]];if(Uf===r)return b7(t),[0,[0,e,1]]}return 0}),hk(n,function(t){return w7(t,85),$d(s,t,Qd(c,t))}),hk(s,function(t,e){if(85===$5(t)){var r=[0,e,0];return E7([0,e[1]],function(t){for(var e=r;;){var a=$5(t);if("number"!=typeof a||85!==a){var n=N2(e);if(n){var s=n[2];if(s)return[5,n[1],s[1],s[2]]}throw[0,uh,oZ]}p7(t,85),e=[0,Qd(c,t),e]}},t)}return e}),hk(c,function(t){return w7(t,87),$d(i,t,Qd(u,t))}),hk(i,function(t,e){if(87===$5(t)){var r=[0,e,0];return E7([0,e[1]],function(t){for(var e=r;;){var a=$5(t);if("number"!=typeof a||87!==a){var n=N2(e);if(n){var s=n[2];if(s)return[6,n[1],s[1],s[2]]}throw[0,uh,fZ]}p7(t,87),e=[0,Qd(u,t),e]}},t)}return e}),hk(u,function(t){return $d(f,t,Qd(o,t))}),hk(f,function(t,e){var r=$5(t);if("number"==typeof r&&11===r&&!t[15]){var a=$d(h,t,e);return th(S,t,a[1],0,[0,a[1],[0,[0,a,0],0]])}return e}),hk(o,function(t){var e=$5(t);return"number"==typeof e&&81===e?E7(0,function(t){return p7(t,81),[0,Qd(o,t)]},t):Qd(v,t)}),hk(v,function(t){return $d(l,t,Qd(b,t))}),hk(l,function(t,e){return!e7(t)&&w7(t,6)?$d(l,t,E7([0,e[1]],function(t){return p7(t,7),[3,e]},t)):e}),hk(b,function(t){var e=Z5(t),r=$5(t);if("number"==typeof r)switch(r){case 4:return Qd(_,t);case 6:return Qd(d,t);case 46:return E7(0,function(t){return p7(t,46),[7,Qd(b,t)]},t);case 94:return Qd(T,t);case 102:return p7(t,wf),[0,e,8];case 42:var a=1;break;case 0:case 2:var n=th(E,0,1,1,t);return[0,n[1],[2,n[2]]];case 30:case 31:return p7(t,r),[0,e,[11,31===r?1:0]];default:a=0}else switch(r[0]){case 1:var s=r[1],c=s[4],i=s[3],u=s[2],f=s[1];return c&&o7(t,37),p7(t,[1,[0,f,u,i,c]]),[0,f,[9,[0,u,i]]];case 9:var o=r[3],v=r[2],l=r[1];return p7(t,[9,l,v,o]),1===l&&o7(t,37),[0,e,[10,[0,v,o]]];case 3:a=1;break;default:a=0}if(a){var h=Qd(N,t);return[0,h[1],[4,h[2]]]}var p=Qd(k,r);return p?(p7(t,r),[0,e,p[1]]):(u7(t),[0,e,0])}),hk(k,function(t){if("number"==typeof t)switch(t){case 29:return eZ;case 110:return rZ;case 111:return aZ;case 112:return nZ;case 113:return sZ;case 114:return cZ;case 115:return iZ}else if(8===t[0])return uZ;return 0}),hk(d,function(t){return E7(0,function(t){p7(t,6);for(var r=0;;){var a=$5(t);if("number"==typeof a&&(7===a||Ot===a)){var n=N2(r);return p7(t,7),[8,n]}var s=[0,Qd(e,t),r];7!==$5(t)&&p7(t,9),r=s}},t)}),hk(h,function(t,e){return[0,e[1],[0,0,e,0]]}),hk(p,function(t,r){return 1-_5(t)&&i7(t,12),E7([0,r[1]],function(t){var a=w7(t,81);return p7(t,82),[0,[0,r],Qd(e,t),a]},t)}),hk(m,function(t){return function(e){for(var r=e;;){var a=$5(t);if("number"==typeof a){var n=a-5|0;if(7>>0?Kc===n:5<(n-1|0)>>>0){var s=12===a?1:0,c=s?[0,E7(0,function(t){return p7(t,12),[0,P(t)]},t)]:s;return[0,N2(r),c]}}var i=[0,P(t),r];5!==$5(t)&&p7(t,9),r=i}}}),hk(w,function(t){return E7(0,function(t){p7(t,4);var e=$d(m,t,0);return p7(t,5),e},t)}),hk(y,function(t){p7(t,4);var r=P5(0,t),a=$5(r);if("number"==typeof a)switch(a){case 5:var n=tZ,s=2;break;case 42:s=1;break;case 12:case 109:n=[0,$d(m,r,0)],s=2;break;default:s=0}else s=3===a[0]?1:0;switch(s){case 0:if(Qd(k,a)){var c=K5(1,r);if("number"==typeof c)if(1<(c+vi|0)>>>0)var i=0;else{var u=[0,$d(m,r,0)];i=1}else i=0;i||(u=[1,Qd(e,r)]);var f=u}else f=[1,Qd(e,r)];n=f;break;case 1:n=Qd(g,r)}if(0===n[0])var o=n;else{var v=n[1];if(t[15])var l=n;else{var b=$5(t);if("number"==typeof b)if(5===b)if(11===K5(1,t))var d=[0,$d(m,t,[0,$d(h,t,v),0])],p=1;else d=[1,v],p=1;else 9===b?(p7(t,9),d=[0,$d(m,t,[0,$d(h,t,v),0])],p=1):p=0;else p=0;p||(d=n),l=d}o=l}return p7(t,5),o}),hk(g,function(e){var r=K5(1,e);if("number"==typeof r&&!(1<(r+vi|0)>>>0)){var a=$d(p,e,$d(t[13],0,e));return w7(e,9),[0,$d(m,e,[0,a,0])]}return[1,$d(s,e,$d(i,e,$d(f,e,$d(l,e,$d(R,e,Qd(x,e))))))]}),hk(_,function(t){var e=Z5(t),r=E7(0,y,t),a=r[2];return 0===a[0]?th(S,t,e,0,[0,r[1],a[1]]):a[1]}),hk(T,function(t){var e=Z5(t),r=$d(I,0,t);return th(S,t,e,r,Qd(w,t))}),hk(S,function(t,r,a,n){return E7([0,r],function(t){return p7(t,11),[1,[0,n,Qd(e,t),a]]},t)}),hk(E,function(r,n,s,c){var i=n?2===$5(c)?1:0:n;return E7(0,function(n){p7(n,i?2:i);for(var c=0;;){if(r&&s)throw[0,uh,V$];var u=Z5(n),f=$5(n);if("number"==typeof f)if(42===f){b7(n);var o=1,v=[0,u],l=1}else l=0;else l=0;l||(o=0,v=0);var b=Qd(a,n),k=$5(n);if("number"==typeof k){if(94===k)var d=1;else{if(Ot===k){j(n,r,v);var h=N2(c),p=1}else if(13<=k)d=0,p=0;else switch(k){case 1:i?(d=0,p=0):(j(n,r,v),h=N2(c),p=1);break;case 3:i?(j(n,r,v),h=N2(c),p=1):(d=0,p=0);break;case 6:j(n,r,v);var m=[2,E7([0,u],function(t,r){return function(a){p7(a,6);var n=82===K5(1,a)?1:0;if(n){var s=T7(a);p7(a,82);var c=[0,s]}else c=n;var i=Qd(e,a);return p7(a,7),p7(a,82),[0,c,i,Qd(e,a),t,r]}}(o,b),n)];M(i,n),c=[0,m,c];continue;case 12:if(s){j(n,r,v),X(n,b);var w=[1,E7([0,u],function(t){return b7(t),[0,Qd(e,t)]},n)];M(i,n),c=[0,w,c];continue}d=0,p=0;break;case 4:d=1,p=0;break;default:d=0,p=0}if(p)return p7(n,i?3:1),[0,i,h]}if(d){if(X(n,b),v&&!r){var y=D(n,u,0,[1,[0,v[1],Z$]]);M(i,n),c=[0,y,c];continue}var g=[3,E7([0,u],function(t){return function(e){var r=$d(I,0,e);return[0,U(e,Z5(e),r),t]}}(o),n)];M(i,n),c=[0,g,c];continue}}if(v)if(b)var _=0;else if("number"==typeof k)if(1<(k+vi|0)>>>0)_=0;else{var T=F(n,u,0,b,[1,[0,v[1],z$]]);_=1}else _=0;else _=0;if(!_){j(n,r,v);var S=function(e){k7(e,0);var r=$d(t[21],0,e);return d7(e),r},E=S(n)[2];if(1===E[0]){var x=E[1][2];if(Yd(x,K$))if(Yd(x,Q$))var A=0,C=0;else C=1;else C=1;if(C){var N=$5(n);if("number"==typeof N){var O=N-5|0;if(88>>0)if(90<(O+1|0)>>>0)var R=0,L=0;else{X(n,b);var P=D(n,u,o,E);L=1}else 1<(O-76|0)>>>0?(R=0,L=0):(P=F(n,u,o,b,E),L=1);if(L){var B=P;R=1}}else R=0;if(!R){var q=S(n),G=Gd(x,$$);X(n,b),B=[0,E7([0,u],function(t,e,r,a){return function(n){var s=U(n,t,0),c=s[2][1],i=r[1];if(0===a){var u=c[2],f=u[1];u[2]?T5(n,[0,i,71]):f&&!f[2]||T5(n,[0,i,71])}else{var o=c[2];!o[1]&&!o[2]||T5(n,[0,i,70])}var v=a?[1,s]:[2,s];return[0,r[2],v,0,e,0,0]}}(u,o,q,G),n)]}var Y=B;A=1}}else A=0;if(!A){var J=$5(n);if("number"==typeof J){if(4===J)var H=1;else if(94===J)H=1;else{var W=0;H=0}if(H){X(n,b);var V=D(n,u,o,E);W=1}}else W=0;W||(V=F(n,u,o,b,E)),Y=V}T=Y}M(i,n),c=[0,T,c]}},c)}),hk(x,function(t){var e=T7(t),r=e[2],a=e[1];return z5(r)&&T5(t,[0,a,4]),[0,a,r]}),hk(A,function(t){return E7(0,function(t){var e=Qd(x,t),a=82===$5(t)?1:0;return[0,e,a?[0,Qd(r,t)]:a]},t)}),hk(I,function(t,r){var n=94===$5(r)?1:0;if(n){1-_5(r)&&i7(r,12);var s=[0,E7(0,function(r){p7(r,94);for(var n=0,s=0;;){var c=Qd(a,r),i=Qd(A,r),u=i[2],f=i[1],o=$5(r);if(0===t)var v=0,l=0;else{if("number"==typeof o)if(79===o){b7(r),v=[0,Qd(e,r)],l=1;var b=1}else b=0;else b=0;b||(n&&T5(r,[0,f,66]),v=0,l=n)}var k=[0,[0,f,[0,u[1],u[2],c,v]],s],d=$5(r);if("number"==typeof d){if(95===d)var h=1;else if(Ot===d)h=1;else{var p=0;h=0}if(h){var m=N2(k);p=1}}else p=0;if(!p){if(p7(r,9),95!==$5(r)){n=l,s=k;continue}m=N2(k)}return p7(r,95),[0,m]}},r)]}else s=n;return s}),hk(C,function(t){var r=94===$5(t)?1:0;return r?[0,E7(0,function(t){p7(t,94);for(var r=0;;){var a=$5(t);if("number"==typeof a&&(95===a||Ot===a)){var n=N2(r);return p7(t,95),[0,n]}var s=[0,Qd(e,t),r];95!==$5(t)&&p7(t,9),r=s}},t)]:r}),hk(N,function(t){return $d(O,t,Qd(x,t))}),hk(O,function(t,e){return E7([0,e[1]],function(t){for(var r=[0,e[1],[0,e]];;){var a=r[2],n=r[1];if(10!==$5(t))return[0,a,Qd(C,t)];var s=E7([0,n],function(t){return function(e){return p7(e,10),[0,t,Qd(x,e)]}}(a),t),c=s[1];r=[0,c,[1,[0,c,s[2]]]]}},t)}),hk(R,function(t,e){var r=$d(O,t,e);return[0,r[1],[4,r[2]]]}),hk(L,function(t){var e=$5(t);return"number"==typeof e&&82===e?[0,Qd(r,t)]:0});var q=0;function G(t){var e=P5(0,t),r=$5(e);return"number"==typeof r&&66===r?[0,E7(q,B,e)]:0}function Y(t){var e=$5(t),r=K5(1,t);return"number"==typeof e&&82===e?"number"==typeof r&&66===r?(p7(t,82),[0,0,G(t)]):[0,Qd(L,t),G(t)]:W$}function J(t,e){var r=x5(1,e);k7(r,1);var a=Qd(t,r);return d7(r),a}var H=Qd(I,1);var W=Qd(I,0);return[0,function(t){return J(e,t)},function(t){return J(x,t)},function(t){return J(W,t)},function(t){return J(H,t)},function(t){return J(C,t)},function(t){return J(N,t)},function(t,e){return J(Zd(E,t,0,0),e)},function(t){return J(w,t)},function(t){return J(r,t)},function(t){return J(L,t)},function(t){return J(G,t)},function(t){return J(Y,t)}]}(N7),R7=function(t){function e(t,e){for(var s=e;;){var c=s[2];switch(c[0]){case 0:return L2(r,t,c[1][1]);case 1:return L2(a,t,c[1][1]);case 2:s=c[1][1];continue;case 3:var i=c[1][1],u=i[2],f=t[2],o=t[1];$d(x7[3],u,f)&&T5(o,[0,i[1],35]);var v=n([0,o,f],i),l=$d(x7[4],u,v[2]);return[0,v[1],l];default:return T5(t[1],[0,s[1],24]),t}}}function r(t,r){if(0===r[0]){var a=r[1][2],s=a[1];return e(1===s[0]?n(t,s[1]):t,a[2])}return e(t,r[1][2][1])}function a(t,r){if(r){var a=r[1];return 0===a[0]?e(t,a[1]):e(t,a[1][2][1])}return t}function n(t,e){var r=e[2],a=e[1],n=t[1];return W5(r)&&v7(n,[0,a,34]),(G5(r)||J5(r))&&v7(n,[0,a,45]),[0,n,t[2]]}function s(t,r,a,n,s){var c=r||1-a;if(c){var i=s[2],u=i[2],f=r?x5(1-t[6],t):t;if(n){var o=n[1],v=o[2],l=o[1];W5(v)&&v7(f,[0,l,36]),(G5(v)||J5(v))&&v7(f,[0,l,45])}var b=L2(e,[0,f,x7[1]],i[1]),k=u?(e(b,u[1][2][1]),0):u}else k=c;return k}function c(t,e){function r(r){var a=A5(e,I5(t,r)).slice();a[10]=1,p7(a,4);for(var n=0;;){var s=$5(a);if("number"==typeof s){var c=s-5|0;if(7>>0?Kc===c?1:0:5<(c-1|0)>>>0?1:0){var i=12===s?1:0;if(i){var u=Z5(a);p7(a,12);var f=$d(N7[19],a,34),o=[0,[0,p4(u,f[1]),[0,f]]]}else o=i;5!==$5(a)&&i7(a,54);var v=[0,N2(n),o];return p7(a,5),v}}var l=$d(N7[19],a,34);if(79===$5(a)){p7(a,79);var b=Qd(N7[10],a),k=[0,p4(l[1],b[1]),[2,[0,l,b]]]}else k=l;5!==$5(a)&&p7(a,9);n=[0,k,n]}}return function(t){return E7(0,r,t)}}function i(t,e,r){var a=q5(t,e,r),n=Qd(N7[17],a),s=n[1];return[0,s,[0,[0,s,n[2]]],n[3]]}function u(t){return w7(t,wf)}function f(t){return w7(t,64)}function o(t){var e=t[2],r=0===e[2]?1:0;if(r)for(var a=e[1];;){if(a){var n=a[2],s=3===a[1][2][0]?1:0;if(s){a=n;continue}return s}return 1}return r}function v(t){for(var e=0,r=0;;){var a=E7(0,function(t){var e=$d(N7[19],t,33);if(79===$5(t)){p7(t,79);var r=[0,Qd(N7[10],t)],a=0}else if(3===e[2][0])r=hh[1],a=hh[2];else r=0,a=[0,[0,e[1],49],0];return[0,[0,e,r],a]},t),n=a[2],s=[0,[0,a[1],n[1]],e],c=T2(n[2],r);if(9!==$5(t)){var i=N2(c);return[0,N2(s),i]}p7(t,9);e=s,r=c}}function l(t,e,r){p7(r,t);var a=v(r);return[0,[0,a[1],e],a[2]]}var b=0,k=24;function d(t){return l(k,b,t)}function h(t){var e=l(27,2,O5(1,t)),r=e[1],a=r[1];return[0,r,N2(L2(function(t,e){return e[2][2]?t:[0,[0,e[1],48],t]},e[2],a))]}function p(t){return l(28,1,O5(1,t))}return[0,f,u,function(t,e,r){var a=Z5(t),n=$5(t);if("number"==typeof n)if(99===n){b7(t);var s=[0,[0,a,0]],c=1}else Uf===n?(b7(t),s=[0,[0,a,1]],c=1):c=0;else c=0;c||(s=0);return s&&(e||r)?(T5(t,[0,s[1][1],8]),0):s},c,i,o,s,function(t,e,r){var a=t.slice();a[11]=1;var n=$5(a);if("number"==typeof n&&0===n){var s=i(a,e,r);return[0,s[2],s[3]]}var c=q5(a,e,r);return[0,[1,Qd(N7[10],c)],c[6]]},function(t){var e=E7(0,function(t){var e=$5(t);if("number"==typeof e){var r=e+Iu|0;if(4>>0)var a=0;else{switch(r){case 0:var n=d(t),s=1;break;case 3:n=h(t),s=1;break;case 4:n=p(t),s=1;break;default:a=0,s=0}if(s){var c=n;a=1}}}else a=0;if(!a){u7(t);c=d(t)}return[0,[31,c[1]],c[2]]},t),r=e[2];return[0,[0,e[1],r[1]],r[2]]},v,p,h,d,function(e){var r=Z5(e),a=f(e);p7(e,15);var n=u(e),v=e[7],l=$5(e);if(0===v)var b=0;else if("number"==typeof l)if(4===l){var k=0,d=0;b=1}else 94===l?(k=Qd(t[3],e),d=4===$5(e)?0:[0,$d(N7[13],vZ,e)],b=1):b=0;else b=0;if(!b){var h=[0,$d(N7[13],lZ,e)];k=Qd(t[3],e),d=h}if(0===a)if(0===n)var p=0,m=0;else p=1,m=0;else 0===n?(p=0,m=e[18]):(p=1,m=1);var w=Qd(c(m,p),e),y=Qd(t[12],e),g=i(e,a,n),_=g[2],T=o(w);s(e,g[3],T,d,w);var S=0===_[0]?[0,_[1][1],0]:[0,_[1][1],1],E=[20,[0,d,w,_,a,n,y[2],S[2],y[1],k]];return[0,p4(r,S[1]),E]}]}(O7),L7=function(t){return[0,function(t,e){return 0===e[0]?e[1]:(R2(function(e){return T5(t,e)},e[2][1]),e[1])},function(e,r,a){var n=e?e[1]:20;if(0===a[0])var s=a[1];else R2(function(t){return T5(r,t)},a[2][2]),s=a[1];1-Qd(t[24],s)&&T5(r,[0,s[1],n]);var c=s[2];return"number"==typeof c||10===c[0]&&W5(c[1][2])&&v7(r,[0,s[1],42]),$d(t[20],r,s)},bZ,function(t,e){var r=C2(t[2],e[2]);return[0,C2(t[1],e[1]),r]},function(t){var e=N2(t[2]);return[0,N2(t[1]),e]}]}(N7),P7=function(t){var e=t[1],r=function t(e){return t.fun(e)},a=function t(e){return t.fun(e)},n=function t(e){return t.fun(e)},s=function t(e){return t.fun(e)},c=function t(e){return t.fun(e)},i=function t(e){return t.fun(e)},u=function t(e){return t.fun(e)},f=function t(e){return t.fun(e)},o=function t(e){return t.fun(e)},v=function t(e){return t.fun(e)},l=function t(e){return t.fun(e)},b=function t(e){return t.fun(e)},k=function t(e){return t.fun(e)},d=function t(e){return t.fun(e)},h=function t(e){return t.fun(e)},p=function t(e){return t.fun(e)},m=function t(e){return t.fun(e)},w=function t(e,r,a,n,s){return t.fun(e,r,a,n,s)},y=function t(e,r,a,n){return t.fun(e,r,a,n)},g=function t(e){return t.fun(e)},_=function t(e){return t.fun(e)},T=function t(e,r,a,n,s){return t.fun(e,r,a,n,s)},S=function t(e,r,a,n){return t.fun(e,r,a,n)},E=function t(e){return t.fun(e)},x=function t(e,r,a){return t.fun(e,r,a)},A=function t(e){return t.fun(e)},I=function t(e){return t.fun(e)},C=function t(e,r){return t.fun(e,r)},N=function t(e,r,a,n){return t.fun(e,r,a,n)},O=function t(e){return t.fun(e)},R=function t(e){return t.fun(e)},L=function t(e){return t.fun(e)},P=function t(e){return t.fun(e)},U=function t(e,r){return t.fun(e,r)},D=function t(e){return t.fun(e)},F=t[2];function M(t){var e=Qd(i,t),r=Qd(c,t);if(r){var n=Zd(F,0,t,e),s=Qd(a,t);return[0,[0,p4(n[1],s[1]),[2,[0,r[1],n,s]]]]}return e}function X(t,e){if("number"==typeof e){var r=45!==e?1:0;if(!r)return r}throw y7}function j(t){var e=F5(X,t),r=M(e),a=$5(e);if("number"==typeof a){if(11===a)throw y7;if(82===a&&Fk(j5(e),j0))throw y7}if(n7(e)){if(0===r[0]){var n=r[1][2];if("number"==typeof n);else if(10===n[0])if(Yd(n[1][2],B0));else{if(!e7(e))throw y7}else;}return r}return r}function B(t,r,a,n,s){return[0,[0,s,[15,[0,n,$d(e,t,r),$d(e,t,a)]]]]}function q(t,e,r){for(var a=e,n=r;;){var s=$5(t);if("number"!=typeof s||84!==s)return[0,n,a];p7(t,84);var c=E7(0,o,t),i=p4(n,c[1]);a=B(t,a,c[2],1,i),n=i}}function G(t,e,r,a){return[0,a,[3,[0,r,t,e]]]}function Y(t,r,a,n,s,c){var i=t?t[1]:1,u=r?r[1]:r,f=a?a[1]:a,o=D5(0,n),v=Qd(N7[7],o),l=Z5(n);p7(n,7);var b=p4(s,l);return eh(w,[0,i],[0,u],n,s,[0,[0,b,[16,[0,$d(e,n,c),[2,v],1,f]]]])}function J(t,r,a,n,s,c){var i=t?t[1]:1,u=r?r[1]:r,f=a?a[1]:a,o=Qd(D,n),v=o[3],l=o[2],b=o[1];if(v){var k=n[28][1],d=l[2];if(k){var h=k[1];n[28][1]=[0,[0,h[1],[0,[0,d,b],h[2]]],k[2]]}else T5(n,[0,b,80])}var p=p4(s,b),m=v?[1,[0,b,l]]:[0,l];if(0===c[0]){var y=c[1][2];"number"==typeof y&&0===y&&v&&T5(n,[0,p,81])}else;return eh(w,[0,i],[0,u],n,s,[0,[0,p,[16,[0,$d(e,n,c),m,0,f]]]])}function H(t,e){if("number"==typeof e){if(50<=e)var r=e-51|0,a=30>>0?32<=r?0:1:3===r?1:0;else a=34===e?1:45===e?1:0;if(a)return 0}throw y7}return hk(r,function(t){var e=$5(t),r=n7(t);if("number"==typeof e){var a=e-5|0;if(88>>0)var s=90<(a+1|0)>>>0?0:1;else if(53===a){if(t[17])return[0,Qd(n,t)];s=0}else s=0}else s=0;if(!s&&0===r)return M(t);var c=_7(t,j);if(c)return c[1];var i=_7(t,P);return i?i[1]:M(t)}),hk(a,function(t){return $d(e,t,Qd(r,t))}),hk(n,function(t){return E7(0,function(t){if(t[10]&&i7(t,82),p7(t,58),r7(t))var e=0,r=0;else{var n=w7(t,wf),s=$5(t);if("number"==typeof s){if(82===s)var c=1;else if(10<=s){var i=0;c=0}else switch(s){case 0:case 2:case 3:case 4:case 6:i=0,c=0;break;default:c=1}if(c){var u=0;i=1}}else i=0;if(!i)u=1;var f=n||u;e=f?[0,Qd(a,t)]:f,r=n}return[26,[0,e,r]]},t)}),hk(s,function(t){var e=t[2];if("number"==typeof e)var r=0;else switch(e[0]){case 17:var a=e[1];if(!Yd(a[1][2],M0)){var n=Yd(a[2][2],X0);if(!n)return n}r=1;break;case 10:case 16:r=1;break;default:r=0}return r?1:0}),hk(c,function(t){var e=$5(t);if("number"==typeof e){var r=e-67|0;if(12>>0)var a=0;else{switch(r){case 0:var n=E0;break;case 1:n=x0;break;case 2:n=A0;break;case 3:n=I0;break;case 4:n=C0;break;case 5:n=N0;break;case 6:n=O0;break;case 7:n=R0;break;case 8:n=L0;break;case 9:n=P0;break;case 10:n=U0;break;case 11:n=D0;break;default:n=F0}var s=n;a=1}}else a=0;if(!a)s=0;return 0!==s&&b7(t),s}),hk(i,function(t){var r=Z5(t),n=Qd(f,t);if(81===$5(t)){p7(t,81);var s=Qd(a,L5(0,t));p7(t,82);var c=E7(0,a,t),i=p4(r,c[1]),u=c[2];return[0,[0,i,[7,[0,$d(e,t,n),s,u]]]]}return n}),hk(u,function(t){return $d(e,t,Qd(i,t))}),hk(f,function(t){for(var e=E7(0,o,t),r=q(t,e[2],e[1]),a=r[2],n=r[1];;){var s=$5(t);if("number"!=typeof s||83!==s)return a;p7(t,83);var c=E7(0,o,t),i=q(t,c[2],c[1]),u=p4(n,i[1]);a=B(t,a,i[2],0,u),n=u}}),hk(o,function(t){var r=0;t:for(;;){var a=E7(0,function(t){return[0,0!==Qd(v,t)?1:0,Qd(l,L5(0,t))]},t),n=a[2],s=n[2],c=a[1];if(94===$5(t))if(0===s[0]){var i=s[1][2];"number"==typeof i||12===i[0]&&i7(t,53)}else;var u=$5(t);if("number"==typeof u){var f=u+jf|0;if(1>>0)if(68<=f)switch(f-68|0){case 0:var o=a0,b=1;break;case 1:o=n0,b=1;break;case 2:o=s0,b=1;break;case 3:o=c0,b=1;break;case 4:o=i0,b=1;break;case 5:o=u0,b=1;break;case 6:o=f0,b=1;break;case 7:o=o0,b=1;break;case 8:o=v0,b=1;break;case 9:o=l0,b=1;break;case 10:o=b0,b=1;break;case 11:o=k0,b=1;break;case 12:o=d0,b=1;break;case 13:o=h0,b=1;break;case 14:o=p0,b=1;break;case 15:o=m0,b=1;break;case 16:o=w0,b=1;break;case 17:o=y0,b=1;break;case 18:o=g0,b=1;break;case 19:o=_0,b=1;break;default:var k=0;b=0}else k=0,b=0;else if(0===f)if(t[12])o=0,b=1;else o=S0,b=1;else o=T0,b=1;if(b){var d=o;k=1}}else k=0;if(!k)d=0;if(0!==d&&b7(t),!r&&!d)return s;if(d){var h=d[1],p=h[1],m=n[1];(m?14===p?1:0:m)&&T5(t,[0,c,21]);for(var w=$d(e,t,s),y=[0,p,h[2]],g=c,_=r;;){var T=y[2],S=y[1];if(_){var E=_[1],x=E[2],A=x[2],I=0===A[0]?A[1]:A[1]-1|0;if(T[1]<=I){var C=p4(E[3],g);w=G(E[1],w,x[1],C),y=[0,S,T],g=C,_=_[2];continue}}r=[0,[0,w,[0,S,T],g],_];continue t}}for(var N=$d(e,t,s),O=c,R=r;;){if(!R)return[0,N];var L=R[1],P=p4(L[3],O),U=R[2];N=G(L[1],N,L[2][1],P),O=P,R=U}}}),hk(v,function(t){var e=$5(t);if("number"==typeof e)if(48<=e){if(99<=e){if(!(Vi<=e))switch(e-99|0){case 0:return zZ;case 1:return KZ;case 6:return QZ;case 7:return $Z}}else if(65===e&&t[18])return ZZ}else if(45<=e)switch(e+-45|0){case 0:return t0;case 1:return e0;default:return r0}return 0}),hk(l,function(t){var e=Z5(t),r=Qd(v,t);if(r){var a=r[1];b7(t);var n=E7(0,b,t),c=n[2],i=p4(e,n[1]);if(6===a){var u=c[2];if("number"==typeof u);else switch(u[0]){case 10:v7(t,[0,i,38]);break;case 16:1===u[1][2][0]&&T5(t,[0,i,79]);break;default:}}else;return[0,[0,i,[24,[0,a,1,c]]]]}var f=$5(t);if("number"==typeof f)if(Vi===f)var o=VZ,l=1;else if(108===f)o=WZ,l=1;else l=0;else l=0;if(!l)o=0;if(o){b7(t);var d=E7(0,b,t),h=d[2];1-Qd(s,h)&&T5(t,[0,h[1],20]);var p=h[2];"number"==typeof p||10===p[0]&&W5(p[1][2])&&o7(t,44);return[0,[0,p4(e,d[1]),[25,[0,o[1],h,1]]]]}return Qd(k,t)}),hk(b,function(t){return $d(e,t,Qd(l,t))}),hk(k,function(t){var r=Qd(d,t);if(e7(t))return r;var a=$5(t);if("number"==typeof a)if(Vi===a)var n=HZ,c=1;else if(108===a)n=JZ,c=1;else c=0;else c=0;if(!c)n=0;if(n){var i=$d(e,t,r);1-Qd(s,i)&&T5(t,[0,i[1],20]);var u=i[2],f=("number"==typeof u||10===u[0]&&W5(u[1][2])&&o7(t,43),Z5(t));return b7(t),[0,[0,p4(i[1],f),[25,[0,n[1],i,0]]]]}return r}),hk(d,function(t){var e=Z5(t),r=t.slice(),a=1-t[16];r[16]=0;var n=$5(r);if("number"==typeof n){var s=n-44|0;if(7>>0)var c=0;else{switch(s){case 0:if(a)var i=[0,Qd(g,r)],u=1;else c=0,u=0;break;case 6:i=[0,Qd(m,r)],u=1;break;case 7:i=[0,Qd(p,r)],u=1;break;default:c=0,u=0}if(u){var f=i;c=1}}}else c=0;if(!c)f=s7(r)?[0,Qd(E,r)]:Qd(A,r);return eh(w,0,0,r,e,f)}),hk(h,function(t){return $d(e,t,Qd(d,t))}),hk(p,function(t){switch(t[20]){case 0:var e=MZ;break;case 1:e=XZ;break;default:e=jZ}var r=e[1],a=Z5(t);p7(t,51);var n=[0,a,0],s=$5(t);if("number"==typeof s&&!(11<=s))switch(s){case 4:var c=e[2]?n:(T5(t,[0,a,6]),[0,a,[10,[0,a,BZ]]]);return th(y,qZ,t,a,c);case 6:case 10:var i=r?n:(T5(t,[0,a,5]),[0,a,[10,[0,a,GZ]]]);return th(y,YZ,t,a,i)}return r?u7(t):T5(t,[0,a,5]),n}),hk(m,function(t){return E7(0,function(t){p7(t,50),p7(t,4);var e=Qd(a,L5(0,t));return p7(t,5),[11,e]},t)}),hk(w,function(t,r,a,n,s){var c=t?t[1]:1,i=r?r[1]:r,u=eh(T,[0,c],[0,i],a,n,s),f=Fk(j5(a),FZ),o=$5(a);if("number"==typeof o&&4===o&&!a[13]){var v=Qd(_,a),l=p4(n,v[1]),b=v[2];return eh(w,[0,c],[0,i],a,n,[0,[0,l,[4,[0,$d(e,a,u),b,f]]]])}return u}),hk(y,function(t,r,a,n){var s=t?t[1]:1;return $d(e,r,eh(w,[0,s],0,r,a,[0,n]))}),hk(g,function(t){var e=Z5(t);if(p7(t,44),t[11]&&10===$5(t)){p7(t,10);var r=[0,e,PZ],a=$5(t);if("number"!=typeof a&&3===a[0]&&!Yd(a[3],UZ)){var n=$d(N7[13],0,t);return[0,p4(e,n[1]),[17,[0,r,n]]]}return u7(t),b7(t),[0,e,[10,r]]}var s=Z5(t),c=$5(t);if("number"==typeof c)if(44===c)var i=Qd(g,t),u=1;else if(51===c)i=Qd(p,D5(1,t)),u=1;else u=0;else u=0;if(!u)i=s7(t)?Qd(E,t):Qd(I,t);var f=th(S,DZ,D5(1,t),s,i),o=$5(t);if("number"==typeof o)var v=0;else if(2===o[0]){var l=th(N,t,s,f,o[1]);v=1}else v=0;if(!v)l=f;var b=$5(t);if("number"==typeof b)if(4===b)var k=Qd(_,t),d=k[1],h=k[2],m=1;else m=0;else m=0;if(!m)d=l[1],h=0;return[0,p4(e,d),[18,[0,l,h]]]}),hk(_,function(t){var e=Z5(t);p7(t,4);for(var r=0;;){var n=$5(t);if("number"==typeof n)if(5===n?1:Ot===n?1:0){var s=N2(r),c=Z5(t);return p7(t,5),[0,p4(e,c),s]}var i=$5(t);if("number"==typeof i)if(12===i){var u=Z5(t);p7(t,12);var f=Qd(a,t),o=[1,[0,p4(u,f[1]),[0,f]]],v=1}else v=0;else v=0;if(!v)o=[0,Qd(a,t)];var l=[0,o,r];5!==$5(t)&&p7(t,9);r=l}}),hk(T,function(t,r,a,n,s){var c=t?t[1]:1,i=r?r[1]:r,u=a[26],f=$5(a);if("number"==typeof f)switch(f){case 6:return p7(a,6),Y([0,c],[0,i],0,a,n,s);case 10:return p7(a,10),J([0,c],[0,i],0,a,n,s);case 80:if(1-u[5]&&i7(a,90),1-c&&i7(a,91),p7(a,80),w7(a,6))return Y([0,c],NZ,CZ,a,n,s);if(n7(a))return J([0,c],RZ,OZ,a,n,s);var o=$5(a);if("number"==typeof o){if(4===o)return s}else if(2===o[0])return i7(a,92),s;return u7(a),s}else if(2===f[0]){i&&i7(a,92);var v=f[1];return eh(w,LZ,0,a,n,[0,th(N,a,n,$d(e,a,s),v)])}return s}),hk(S,function(t,r,a,n){var s=t?t[1]:1;return $d(e,r,eh(T,[0,s],0,r,a,[0,n]))}),hk(E,function(t){var e=Z5(t),r=Qd(R7[1],t);p7(t,15);var a=Qd(R7[2],t);if(0===r)if(0===a)var n=0,s=0;else n=1,s=0;else if(0===a)n=0,s=1;else n=1,s=1;if(4===$5(t))var c=0,i=0;else{var u=$5(t);if("number"==typeof u){var f=94!==u?1:0;if(f)var o=0;else{var v=f;o=1}}else o=0;if(!o){var l=A5(n,I5(s,t));v=[0,$d(N7[13],IZ,l)]}c=v,i=Qd(O7[3],t)}var b=N5(0,t),k=Zd(R7[4],s,n,b),d=Qd(O7[12],b),h=Zd(R7[5],b,r,a),p=h[2],m=Qd(R7[6],k);eh(R7[7],b,h[3],m,c,k);var w=0===p[0]?0:1,y=[8,[0,c,k,p,r,a,d[2],w,d[1],i]];return[0,p4(e,h[1]),y]}),hk(x,function(t,e,r){if(0===e)var a=0;else switch(e-1|0){case 0:o7(t,37);try{var n=kd(bd(_2(SZ,r))),s=1}catch(e){if((e=Kd(e))[1]!==ah)throw e;var c=m2(_2(EZ,r));a=1,s=0}if(s)c=n,a=1;break;case 2:try{var i=a5(r),u=1}catch(e){if((e=Kd(e))[1]!==ah)throw e;c=m2(_2(xZ,r)),a=1,u=0}if(u)c=i,a=1;break;default:a=0}if(!a)try{c=kd(bd(r))}catch(a){if((a=Kd(a))[1]!==ah)throw a;c=m2(_2(AZ,r))}return p7(t,[0,e,r]),c}),hk(A,function(t){var e=Z5(t),r=$5(t);if("number"==typeof r)switch(r){case 0:var a=Qd(N7[12],t);return[1,[0,a[1],[19,a[2]]],a[3]];case 4:return[0,Qd(O,t)];case 6:var n=Qd(R,t);return[1,[0,n[1],[0,n[2]]],n[3]];case 21:return p7(t,21),[0,[0,e,1]];case 29:return p7(t,29),[0,[0,e,[14,[0,0,yZ]]]];case 40:return[0,Qd(N7[23],t)];case 94:var s=Qd(N7[18],t),c=s[2];return[0,[0,s[1],of<=c[1]?[13,c[2]]:[12,c[2]]]];case 30:case 31:p7(t,r);var i=31===r?1:0;return[0,[0,e,[14,[0,[1,i],i?_Z:TZ]]]];case 74:case 101:return[0,Qd(L,t)]}else switch(r[0]){case 0:var u=r[2];return[0,[0,e,[14,[0,[2,Zd(x,t,r[1],u)],u]]]];case 1:var f=r[1],o=f[4],v=f[3],l=f[2],b=f[1];return o&&o7(t,37),p7(t,[1,[0,b,l,v,o]]),[0,[0,b,[14,[0,[0,l],v]]]];case 2:var k=$d(C,t,r[1]);return[0,[0,k[1],[22,k[2]]]]}if(n7(t)){var d=$d(N7[13],0,t);return[0,[0,d[1],[10,d]]]}u7(t);"number"==typeof r||5===r[0]&&b7(t);return[0,[0,e,[14,[0,0,gZ]]]]}),hk(I,function(t){return $d(e,t,Qd(A,t))}),hk(C,function(t,e){var r=e[3],a=e[2],n=e[1];p7(t,[2,e]);var s=[0,n,[0,[0,a[2],a[1]],r]];if(r)var c=n,i=[0,s,0],u=0;else for(var f=[0,s,0],o=0;;){var v=Qd(N7[7],t),l=[0,v,o],b=$5(t);if("number"==typeof b)if(1===b){k7(t,4);var k=$5(t);if("number"==typeof k)var d=1;else if(2===k[0]){var h=k[1],p=h[3],m=h[2];b7(t);var w=h[1],y=[0,[0,m[2],m[1]],p];d7(t);var g=[0,[0,w,y],f];if(!p){f=g,o=l;continue}var _=N2(l),T=[0,w,N2(g),_],S=1;d=0}else d=1;if(d)throw[0,uh,mZ]}else S=0;else S=0;if(!S){u7(t);var E=[0,v[1],wZ],x=N2(l),A=N2([0,E,f]);T=[0,v[1],A,x]}c=T[1],i=T[2],u=T[3];break}return[0,p4(n,c),[0,i,u]]}),hk(N,function(t,e,r,a){var n=$d(C,t,a);return[0,p4(e,n[1]),[21,[0,r,n]]]}),hk(O,function(t){p7(t,4);var e=Qd(a,t),r=$5(t);if("number"==typeof r)if(9===r)var n=$d(U,t,[0,e,0]),s=1;else if(82===r){var c=Qd(O7[9],t);n=[0,p4(e[1],c[1]),[23,[0,e,c]]],s=1}else s=0;else s=0;if(!s)n=e;return p7(t,5),n}),hk(R,function(e){var a=E7(0,function(e){p7(e,6);for(var a=[0,0,t[3]];;){var n=a[2],s=a[1],c=$5(e);if("number"==typeof c){if(13<=c)var i=Ot===c?1:0;else if(7<=c)switch(c-7|0){case 2:p7(e,9);a=[0,[0,0,s],n];continue;case 5:var u=E7(0,function(e){p7(e,12);var a=Qd(r,e);return 0===a[0]?[0,a[1],t[3]]:[0,a[1],a[2]]},e),f=u[2],o=f[2],v=u[1],l=[1,[0,v,[0,f[1]]]],b=7===$5(e)?1:0;if(b)var k=0;else if(7===K5(1,e)){var d=[0,o[1],[0,[0,v,55],o[2]]];k=1}else k=0;if(!k)d=o;1-b&&p7(e,9);a=[0,[0,[0,l],s],$d(t[4],d,n)];continue;case 0:i=1;break;default:i=0}else i=0;if(i){var h=Qd(t[5],n),p=[0,N2(s),h];return p7(e,7),p}}var m=Qd(r,e),w=0===m[0]?[0,m[1],t[3]]:[0,m[1],m[2]];7!==$5(e)&&p7(e,9);a=[0,[0,[0,[0,w[1]]],s],$d(t[4],w[2],n)]}},e),n=a[2];return[0,a[1],[0,n[1]],n[2]]}),hk(L,function(t){k7(t,5);var e=Z5(t),r=$5(t);if("number"!=typeof r&&4===r[0]){var a=r[1],n=a[3],s=a[2];b7(t);var c=_2(hZ,_2(s,_2(dZ,n)));d7(t);var i=Z2(sd(n));Y2(function(t){var e=t-103|0;if(!(18>>0))switch(e){case 0:case 2:case 6:case 12:case 14:case 18:return r3(i,t)}return 0},n);var u=t3(i);return Yd(u,n)&&i7(t,[3,n]),[0,e,[14,[0,[3,[0,s,u]],c]]]}throw[0,uh,pZ]}),hk(P,function(t){var e=F5(H,t),r=Z5(e),a=11!==K5(1,e)?1:0,n=a?Qd(R7[1],e):a,s=Qd(O7[3],e);if(n7(e))if(0===s)var c=$d(N7[13],kZ,e),i=c[1],u=[0,i,[0,[0,[0,i,[3,[0,[0,i,c[2]],0,0]]],0],0]],f=0,o=0,v=1;else v=0;else v=0;if(!v){var l=Zd(R7[4],e[18],e[17],e),b=P5(1,e),k=Qd(O7[12],b);u=l,f=k[1],o=k[2]}var d=u[2];if(d[2])var h=0;else if(d[1]){var p=e;h=1}else h=0;if(!h)p=B5(e);var m=e7(p);(m?11===$5(p)?1:0:m)&&i7(p,50),p7(p,11);var w=B5(p),y=R7[8],g=E7(0,function(t){return Zd(y,t,n,0)},w),_=g[2],T=_[1],S=Qd(R7[6],u);eh(R7[7],w,_[2],S,0,u);var E=0===T[0]?0:1;return[0,[0,p4(r,g[1]),[1,[0,0,u,T,n,0,o,E,f,s]]]]}),hk(U,function(t,e){var r=$5(t);if("number"==typeof r&&9===r)return p7(t,9),$d(U,t,[0,Qd(a,t),e]);var n=I2(e),s=N2(e),c=I2(s);return[0,p4(c[1],n[1]),[20,[0,s]]]}),hk(D,function(t){var e=Z5(t),r=w7(t,14),a=T7(t),n=a[1];return[0,p4(e,n),[0,n,a[2]],r]}),[0,a,r,u,D,function(t){var e=t[2];if("number"==typeof e)var r=0;else switch(e[0]){case 17:var a=e[1];if(!Yd(a[1][2],q0)){var n=Yd(a[2][2],G0);if(!n)return n}r=1;break;case 0:case 10:case 16:case 19:r=1;break;default:r=0}return r?1:0},h,x,U]}(L7),U7=function(t){function e(t){var e=t[26][3];if(e)for(var r=0;;){var a=$5(t);if("number"!=typeof a||13!==a)return N2(r);b7(t);r=[0,Qd(P7[6],t),r]}return e}function r(t,e){var r=t?t[1]:t,a=$5(e);if("number"==typeof a)switch(a){case 6:var n=Z5(e);p7(e,6);var s=L5(0,e),c=Qd(N7[10],s),i=Z5(e);return p7(e,7),[0,p4(n,i),[3,c]];case 14:if(r){var u=Qd(P7[4],e),f=u[2],o=u[1],v=e[28][1],l=f[2];if(v){var b=v[1],k=v[2],d=b[2],h=[0,[0,$d(p5[4],l,b[1]),d],k];e[28][1]=h}else m2(LQ);return[0,o,[2,[0,o,f]]]}}else switch(a[0]){case 0:var p=a[2],m=Z5(e);return[0,m,[0,[0,m,[0,[2,Zd(P7[7],e,a[1],p)],p]]]];case 1:var w=a[1],y=w[4],g=w[3],_=w[2],T=w[1];return y&&o7(e,37),p7(e,[1,[0,T,_,g,y]]),[0,T,[0,[0,T,[0,[0,_],g]]]]}var S=Qd(P7[4],e),E=S[1];return S[3]&&T5(e,[0,E,80]),[0,E,[1,S[2]]]}function a(t,e){var a=Qd(R7[2],t),n=r(0,t),s=n[1],c=Z5(t),i=N5(1,t),u=Zd(R7[4],0,0,i);if(0===e){var f=u[2],o=f[1];if(f[2])T5(i,[0,s,71]);else(o?o[2]?0:1:0)||T5(i,[0,s,71])}else{var v=u[2];(v[1]?0:v[2]?0:1)||T5(i,[0,s,70])}var l=Qd(O7[10],i),b=Zd(R7[5],i,0,a),k=b[2],d=Qd(R7[6],u);eh(R7[7],i,b[3],d,0,u);var h=0===k[0]?[0,k[1][1],0]:[0,k[1][1],1],p=p4(c,h[1]);return[0,n[2],[0,p,[0,0,u,k,0,a,0,h[2],l,0]]]}function n(e){var r=Qd(P7[2],e);return 0===r[0]?[0,r[1],t[3]]:[0,r[1],r[2]]}var s=function t(e){return t.fun(e)},c=function t(e,r){return t.fun(e,r)},i=function t(e,r){return t.fun(e,r)},u=function t(e,r,a,n,s){return t.fun(e,r,a,n,s)},f=function t(e,r,a){return t.fun(e,r,a)};function o(t,e,r){var a=Z5(t),n=N5(1,t),s=Qd(O7[3],n);if(0===e)if(0===r)var c=0,i=0;else c=1,i=0;else if(0===r)c=0,i=n[18];else c=1,i=1;var u=Zd(R7[4],i,c,n),f=Qd(O7[10],n),o=Zd(R7[5],n,e,r),v=o[2],l=Qd(R7[6],u);eh(R7[7],n,o[3],l,0,u);var b=0===v[0]?[0,v[1][1],0]:[0,v[1][1],1];return[0,p4(a,b[1]),[0,0,u,v,e,r,0,b[2],f,s]]}function v(t){return p7(t,82),n(t)}function l(t,e){for(var r=e;;){var a=Qd(O7[2],t),n=Qd(O7[5],t),s=[0,[0,n?p4(a[1],n[1][1]):a[1],[0,a,n]],r],c=$5(t);if("number"!=typeof c||9!==c)return N2(s);p7(t,9);r=s}}hk(s,function(e){var a=Z5(e);if(12===$5(e)){p7(e,12);var s=n(e),f=s[1],o=s[2];return[0,[1,[0,p4(a,f[1]),[0,f]]],o]}var v=K5(1,e);if("number"==typeof v){if(82<=v)if(94===v)var l=1;else if(83<=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 k=0;b=1}}else b=0;if(!b)k=Qd(R7[1],e);var d=Qd(R7[2],e),h=$5(e);if(0===k&&0===d&&"number"!=typeof h&&3===h[0]){var p=h[3];if(!Yd(p,v1)){var m=r(0,e),w=$5(e);if("number"==typeof w){if(82<=w)var y=94===w?1:83<=w?0:1;else if(79===w)y=1;else if(10<=w)y=0;else switch(w){case 1:case 4:case 9:y=1;break;default:y=0}if(y)return eh(u,e,a,m[2],0,0)}var g=t[3];return[0,$d(c,e,a),g]}if(!Yd(p,l1)){var _=r(0,e),T=$5(e);if("number"==typeof T){if(82<=T)var S=94===T?1:83<=T?0:1;else if(79===T)S=1;else if(10<=T)S=0;else switch(T){case 1:case 4:case 9:S=1;break;default:S=0}if(S)return eh(u,e,a,_[2],0,0)}var E=t[3];return[0,$d(i,e,a),E]}}return eh(u,e,a,r(0,e)[2],k,d)}),hk(c,function(t,e){var r=a(t,1),n=r[2],s=n[1];return[0,[0,p4(e,s),[2,r[1],[0,s,n[2]]]]]}),hk(i,function(t,e){var r=a(t,0),n=r[2],s=n[1];return[0,[0,p4(e,s),[3,r[1],[0,s,n[2]]]]]}),hk(u,function(e,r,a,n,s){var c=E7(0,function(e){if(!n&&!s){var r=$5(e);if("number"==typeof r){if(79===r){if(1===a[0]){var c=a[1],i=Z5(e);p7(e,79);var u=$d(N7[20],e,[0,c[1],[10,c]]),f=Qd(N7[10],e),l=[0,[0,p4(u[1],f[1]),[2,[0,0,u,f]]],[0,[0,[0,i,i1],0],0]]}else l=v(e);return[0,[0,a,l[1],1],l[2]]}if(94===r)var b=1;else if(10<=r)b=0;else switch(r){case 4:b=1;break;case 1:case 9:switch(a[0]){case 0:var k=a[1],d=k[1];T5(e,[0,d,86]);var h=[0,d,[14,k[2]]];break;case 1:var p=a[1],m=p[2],w=p[1];(V5(m)&&Yd(m,u1)&&Yd(m,f1)?(T5(e,[0,w,3]),1):0)||J5(m)&&v7(e,[0,w,45]);h=[0,w,[10,p]];break;case 2:h=m2(o1);break;default:var y=a[1];T5(e,[0,y[1],87]);h=y}return[0,[0,a,h,1],t[3]];default:b=0}if(b)return[0,[1,a,o(e,n,s)],t[3]]}var g=v(e);return[0,[0,a,g[1],0],g[2]]}return[0,[1,a,o(e,n,s)],t[3]]},e),i=c[2],u=i[2],f=i[1];return[0,[0,[0,p4(r,c[1]),f]],u]}),hk(f,function(e,r,a){var n=a[2],c=a[1],i=$5(e);if("number"==typeof i&&(1===i?1:Ot===i?1:0)){var u=r?[0,n[1],[0,[0,r[1],89],n[2]]]:n,o=Qd(t[5],u);return[0,N2(c),o]}var v=Qd(s,e),l=v[1];if(1===l[0])if(9===$5(e))var b=[0,Z5(e)],k=1;else k=0;else k=0;if(!k)b=0;return 1!==$5(e)&&p7(e,9),Zd(f,e,b,[0,[0,l,c],$d(t[4],v[2],n)])});var b=function t(e){return t.fun(e)},k=function t(e){return t.fun(e)},d=function t(e){return t.fun(e)};function h(t,e){return e?T5(t,[0,e[1][1],8]):e}function p(t,e,r,a,n,s,c,i){for(;;){var u=$5(t);if("number"==typeof u){var f=u+cb|0;if(3>>0)var o=-71===f?0:1;else if(0===f)o=0;else switch(f-1|0){case 0:o=1;break;case 1:u7(t),b7(t);continue;default:o=0}if(!o&&!n&&!s){var v=E7(0,function(t){var e=Qd(O7[10],t),r=t[26],a=79===$5(t)?1:0;if(a){var n=c?r[2]:c;if(n)var s=n;else{var i=1-c;s=i?r[1]:i}if(s){p7(t,79);var u=N5(1,t),f=[0,Qd(N7[7],u)]}else f=s}else f=a;w7(t,8)||((6===$5(t)?1:0)||(4===$5(t)?1:0))&&u7(t);return[0,e,f]},t),l=v[2],b=l[2],k=l[1],d=p4(e,v[1]);return 2===a[0]?[2,[0,d,[0,a[1],b,k,c,i]]]:[1,[0,d,[0,a,b,k,c,i]]]}}if(h(t,i),0===c){switch(a[0]){case 0:var p=a[1][2][1];if("number"==typeof p)var m=1;else if(0===p[0])if(Yd(p[1],K0)){var w=0,y=0;m=0}else y=1,m=0;else m=1;if(m)w=0,y=0;break;case 1:if(Yd(a[1][2],Q0))w=0,y=0;else y=1;break;default:w=0,y=0}if(y){var g=0,_=N5(2,t);w=1}}else w=0;if(!w)g=1,_=N5(1,t);var T=Z5(_),S=Qd(O7[3],_);if(0===n)if(0===s)var E=0,x=0;else E=1,x=0;else if(0===s)E=0,x=_[18];else E=1,x=1;var A=Zd(R7[4],x,E,_),I=Qd(O7[10],_),C=Zd(R7[5],_,n,s),N=C[2],O=Qd(R7[6],A);eh(R7[7],_,C[3],O,0,A);var R=0===N[0]?[0,N[1][1],0]:[0,N[1][1],1],L=R[1],P=[0,g,a,[0,p4(T,L),[0,0,A,N,n,s,0,R[2],I,S]],c,r];return[0,[0,p4(e,L),P]]}}function m(t){var r=x5(1,t),a=e(r);p7(r,40);var n=$5(r);if("number"==typeof n){var s=n-1|0;if(92>>0)if(94<=s)var c=0,i=0;else i=1;else if(40===s)i=1;else c=0,i=0;if(i){var u=0,f=0;c=1}}else c=0;if(!c)u=[0,$d(N7[13],0,r)],f=Qd(O7[4],r);var o=Qd(b,r);return[5,[0,u,o[1],o[2],f,o[3],o[4],a]]}hk(b,function(t){if(41===$5(t)){p7(t,41);var e=A5(0,t),r=[0,Qd(P7[6],e)],a=Qd(O7[5],t)}else r=0,a=0;var n=52===$5(t)?1:0;if(n){1-_5(t)&&i7(t,16),p7(t,52);var s=l(t,0)}else s=n;return[0,Qd(k,t),r,a,s]}),hk(k,function(t){var e=Z5(t);p7(t,0),t[28][1]=[0,[0,p5[1],0],t[28][1]];for(var r=0,a=A7[1],n=0;;){var s=$5(t);if("number"==typeof s){var c=s-2|0;if(tc>>0){if(!(108<(c+1|0)>>>0)){var i=N2(n),u=function(t,e){for(var r=0,a=e;;){if(!a)return N2(r);var n=a[2],s=a[1];if(1-$d(p5[3],s[1],t))r=[0,s,r],a=n;else a=n}},f=t[28][1];if(f){var o=f[2],v=f[1],l=v[2],b=v[1];if(o){var k=u(b,l),h=I2(o),p=o?o[2]:m2(Sh),m=T2(h[2],k);t[28][1]=[0,[0,h[1],m],p]}else{R2(function(e){return T5(t,[0,e[2],[11,e[1]]])},u(b,l)),t[28][1]=0}}else m2(PQ);var w=Z5(t);return p7(t,1),[0,p4(e,w),[0,i]]}}else if(6===c){p7(t,8);continue}}var y=Qd(d,t);switch(y[0]){case 0:var g=y[1],_=g[2],T=g[1],S=_[1];if(1===S){2===_[2][0]&&T5(t,[0,T,78]);var E=[0,r,a]}else{if(0===S)if(_[4])var x=0;else{r&&T5(t,[0,T,77]);E=[0,1,a],x=1}else x=0;if(!x)E=[0,r,a]}var A=E;break;case 1:var I=y[1],C=I[2],N=C[1];if(1===N[0]){var O=N[1][2];if(Gd(O,a1))var R=1;else{if(Gd(O,n1))if(C[4]){R=1;var L=0}else L=1;else L=1;if(L)R=0}if(R){T5(t,[0,I[1],[10,O,Gd(O,s1),0]])}}else;A=[0,r,a];break;default:var P=y[1][2][1],U=P[2][2],D=P[1];if(Gd(U,c1)){T5(t,[0,D,[10,U,0,1]]);var F=[0,r,a]}else{$d(A7[3],U,a)&&T5(t,[0,D,[9,U]]);F=[0,r,$d(A7[4],U,a)]}A=F}r=A[1],a=A[2],n=[0,y,n]}}),hk(d,function(t){var n=Z5(t),s=e(t),c=4!==K5(1,t)?1:0;if(c)var i=94!==K5(1,t)?1:0,u=i?w7(t,42):i;else u=c;var f=4!==K5(1,t)?1:0;if(f)var o=82!==K5(1,t)?1:0,v=o?Qd(R7[1],t):o;else v=f;var l=Qd(R7[2],t),b=Zd(R7[3],t,v,l);if(0===l)if(b)var k=Qd(R7[2],t),d=1;else d=0;else d=0;if(!d)k=l;var m=$5(t);if(0===v&&0===k&&"number"!=typeof m&&3===m[0]){var w=m[3];if(!Yd(w,$0)){var y=r(e1,t),g=$5(t);if("number"==typeof g){if(79<=g)var _=g+Et|0,T=13<_>>>0?15<=_?0:1:2===_?1:0;else T=4===g?1:8===g?1:0;if(T)return p(t,n,s,y[2],v,k,u,b)}h(t,b);var S=a(t,1),E=S[2],x=[0,2,S[1],E,u,s];return[0,[0,p4(n,E[1]),x]]}if(!Yd(w,Z0)){var A=r(t1,t),I=$5(t);if("number"==typeof I){if(79<=I)var C=I+Et|0,N=13>>0?15<=C?0:1:2===C?1:0;else N=4===I?1:8===I?1:0;if(N)return p(t,n,s,A[2],v,k,u,b)}h(t,b);var O=a(t,0),R=O[2],L=[0,3,O[1],R,u,s];return[0,[0,p4(n,R[1]),L]]}}return p(t,n,s,r(r1,t)[2],v,k,u,b)});return[0,r,function(e){var r=E7(0,function(e){p7(e,0);var r=Zd(f,e,0,[0,0,t[3]]);return p7(e,1),[0,[0,r[1]],r[2]]},e),a=r[2];return[0,r[1],a[1],a[2]]},function(t,r){var a=x5(1,t),n=Z5(a),s=T2(r,e(a));p7(a,40);var c=O5(1,a),i=a[7],u=n7(c);if(0===i)var f=0;else{var o=0!==u?1:0;if(o)f=0;else{var v=o;f=1}}f||(v=[0,$d(N7[13],0,c)]);var l=Qd(O7[4],a),k=Qd(b,a),d=k[1];return[0,p4(n,d[1]),[2,[0,v,d,k[2],l,k[3],k[4],s]]]},function(t){return E7(0,m,t)},l,e]}(L7),D7=function(t){function e(t){var e=Qd(R7[14],t);if(t[6])l7(t,e[1]);else{var r=e[2];if("number"==typeof r);else if(20===r[0]){var a=r[1];if(0===a[4])if(0===a[5])var n=0;else{T5(t,[0,e[1],52]);n=1}else{T5(t,[0,e[1],51]);n=1}if(n);}else;}return e}var r=function t(e){return t.fun(e)},a=function t(e){return t.fun(e)},n=function t(e){return t.fun(e)},s=function t(e){return t.fun(e)},c=function t(e){return t.fun(e)},i=function t(e){return t.fun(e)},u=function t(e){return t.fun(e)},f=function t(e){return t.fun(e)},o=function t(e,r){return t.fun(e,r)},v=function t(e){return t.fun(e)},l=function t(e){return t.fun(e)},b=function t(e){return t.fun(e)},k=function t(e){return t.fun(e)},d=function t(e){return t.fun(e)},h=function t(e){return t.fun(e)},p=function t(e){return t.fun(e)},m=function t(e){return t.fun(e)},w=function t(e){return t.fun(e)},y=function t(e){return t.fun(e)},g=function t(e){return t.fun(e)},_=function t(e,r){return t.fun(e,r)},T=function t(e){return t.fun(e)},S=function t(e,r){return t.fun(e,r)},E=function t(e){return t.fun(e)},x=function t(e){return t.fun(e)},A=function t(e,r,a){return t.fun(e,r,a)},I=function t(e,r){return t.fun(e,r)},C=function t(e){return t.fun(e)},N=function t(e){return t.fun(e)};function O(t){return p7(t,59),h7(t),0}var R=0;function L(t){p7(t,37);var e=R5(1,t),r=Qd(N7[2],e),a=1-t[6];(a?S7(r):a)&&l7(t,r[1]),p7(t,25),p7(t,4);var n=Qd(N7[7],t);return p7(t,5),8===$5(t)&&h7(t),[13,[0,r,n]]}var P=0;function U(t,e,r){var a=r[2][1];if(a&&!a[1][2][2]){var n=a[2];if(!n)return n}return T5(t,[0,r[1],e])}function D(t,e){var r=1-t[6],a=r?S7(e):r;return a?l7(t,e[1]):a}function F(e){p7(e,39);var r=e[18],a=r?w7(e,65):r;p7(e,4);var n=L5(1,e),s=$5(n);if("number"==typeof s)if(24<=s)if(29<=s)var c=0;else{switch(s+Iu|0){case 0:var i=E7(0,R7[13],n),u=i[2],f=[0,[0,[1,[0,i[1],u[1]]]],u[2]],o=1;break;case 3:var v=E7(0,R7[12],n),l=v[2];f=[0,[0,[1,[0,v[1],l[1]]]],l[2]],o=1;break;case 4:var b=E7(0,R7[11],n),k=b[2];f=[0,[0,[1,[0,b[1],k[1]]]],k[2]],o=1;break;default:c=0,o=0}if(o){var d=f[1],h=f[2];c=1}}else if(8===s)d=0,h=0,c=1;else c=0;else c=0;if(!c){var p=O5(1,n);d=[0,[0,Qd(N7[8],p)]],h=0}var m=$5(e);if(63!==m&&!a){if("number"==typeof m&&17===m){if(d){var w=d[1];if(0===w[0])var y=[1,Zd(t[2],a2,e,w[1])];else{var g=w[1];U(e,22,g);y=[0,g]}p7(e,17);var _=Qd(N7[7],e);p7(e,5);var T=R5(1,e),S=Qd(N7[2],T);return D(e,S),[18,[0,y,_,S,0]]}throw[0,uh,n2]}if(R2(function(t){return T5(e,t)},h),p7(e,8),d)var E=d[1],x=0===E[0]?[0,[1,$d(t[1],e,E[1])]]:[0,[0,E[1]]];else x=d;var A=$5(e);if("number"==typeof A){var I=8!==A?1:0;if(I)var C=0;else{var N=I;C=1}}else C=0;if(!C)N=[0,Qd(N7[7],e)];p7(e,8);var O=$5(e);if("number"==typeof O){var R=5!==O?1:0;if(R)var L=0;else{var P=R;L=1}}else L=0;if(!L)P=[0,Qd(N7[7],e)];p7(e,5);var F=R5(1,e),M=Qd(N7[2],F);return D(e,M),[17,[0,x,N,P,M]]}if(d){var X=d[1];if(0===X[0])var j=[1,Zd(t[2],e2,e,X[1])];else{var B=X[1];U(e,23,B);j=[0,B]}p7(e,63);var q=Qd(N7[10],e);p7(e,5);var G=R5(1,e),Y=Qd(N7[2],G);return D(e,Y),[19,[0,j,q,Y,a]]}throw[0,uh,r2]}var X=0;function j(t){var r=s7(t)?e(t):Qd(N7[2],t),a=1-t[6];return(a?S7(r):a)&&l7(t,r[1]),r}function B(t){p7(t,16),p7(t,4);var e=Qd(N7[7],t);p7(t,5);var r=j(t),a=43===$5(t)?1:0;return[21,[0,e,r,a?(p7(t,43),[0,j(t)]):a]]}var q=0;function G(t){if(1-t[11]&&i7(t,29),p7(t,19),8===$5(t))var e=0;else if(r7(t))e=0;else{var r=[0,Qd(N7[7],t)];e=1}if(!e)r=0;return h7(t),[25,[0,r]]}var Y=0;function J(t){p7(t,20),p7(t,4);var e=Qd(N7[7],t);p7(t,5),p7(t,0);for(var r=t2;;){var a=r[2],n=r[1],s=$5(t);if("number"==typeof s)if(1===s?1:Ot===s?1:0){var c=N2(a);return p7(t,1),[26,[0,e,c]]}var i=Z5(t),u=$5(t);if("number"==typeof u)if(36===u){n&&i7(t,25),p7(t,36);var f=0,o=1}else o=0;else o=0;if(!o){p7(t,33);f=[0,Qd(N7[7],t)]}var v=n||(0===f?1:0),l=Z5(t);p7(t,82);var b=t.slice();b[9]=1;var k=$d(N7[4],function(t){if("number"==typeof t){var e=t-1|0;if(32>>0?35===e:30<(e-1|0)>>>0)return 1}return 0},b),d=N2(k),h=d?d[1][1]:l;r=[0,v,[0,[0,p4(i,h),[0,f,k]],a]]}}var H=0;function W(t){var e=Z5(t);p7(t,22),e7(t)&&T5(t,[0,e,17]);var r=Qd(N7[7],t);return h7(t),[27,[0,r]]}var V=0;function z(t){p7(t,23);var e=Qd(N7[16],t),r=$5(t);if("number"==typeof r)if(34===r)var a=[0,E7(0,function(t){p7(t,34),p7(t,4);var e=$d(N7[19],t,32);return p7(t,5),[0,e,Qd(N7[16],t)]},t)],n=1;else n=0;else n=0;if(!n)a=0;var s=$5(t);if("number"==typeof s)if(38===s){p7(t,38);var c=[0,Qd(N7[16],t)],i=1}else i=0;else i=0;if(!i)c=0;var u=0===a?1:0;return(u?0===c?1:0:u)&&T5(t,[0,e[1],26]),[28,[0,e,a,c]]}var K=0;function Q(t){var e=Qd(R7[9],t);return h7(t),R2(function(e){return T5(t,e)},e[2]),e[1][2]}var $=0;function Z(t){p7(t,28);var e=O5(1,t),r=Qd(R7[10],e),a=[31,[0,r[1],1]];return h7(t),R2(function(e){return T5(t,e)},r[2]),a}var tt=0;function et(t){p7(t,25),p7(t,4);var e=Qd(N7[7],t);p7(t,5);var r=R5(1,t),a=Qd(N7[2],r),n=1-t[6];return(n?S7(a):n)&&l7(t,a[1]),[32,[0,e,a]]}var rt=0;function at(t){var r=Qd(N7[7],t),a=$5(t),n=r[2];if("number"!=typeof n&&10===n[0]&&"number"==typeof a&&82===a){var s=n[1],c=s[2];p7(t,82),$d(I7[3],c,t[3])&&T5(t,[0,r[1],[5,Z1,c]]);var i=t.slice();return i[3]=$d(p5[4],c,t[3]),[24,[0,s,s7(i)?e(i):Qd(N7[2],i)]]}return h7(t),[16,[0,r,0]]}var nt=0;function st(t){var e=Qd(N7[7],t);h7(t);var r=t[19];if(r){var a=e[2];if("number"==typeof a)var n=0;else if(14===a[0]){var s=a[1],c=s[1];if("number"==typeof c)var i=1;else if(0===c[0]){var u=s[2],f=[0,G2(u,1,sd(u)-2|0)];n=1,i=0}else i=1;if(i)n=0}else n=0;if(!n)f=0;var o=f}else o=r;return[16,[0,e,o]]}var ct=0;function it(t){return E7(ct,st,t)}function ut(t,e){for(var r=e;;){var a=r[2];switch(a[0]){case 0:return L2(function(t,e){return ut(t,0===e[0]?e[1][2][2]:e[1][2][1])},t,a[1][1]);case 1:return L2(function(t,e){if(e){var r=e[1];return ut(t,0===r[0]?r[1]:r[1][2][1])}return t},t,a[1][1]);case 2:r=a[1][1];continue;case 3:return[0,a[1][1],t];default:return m2($1)}}}function ft(t){m7(t,K1);var e=$5(t);if("number"!=typeof e&&1===e[0]){var r=e[1],a=r[4],n=r[3],s=r[2],c=r[1];return a&&o7(t,37),p7(t,[1,[0,c,s,n,a]]),[0,c,[0,s,n]]}var i=[0,Z5(t),Q1];return u7(t),i}function ot(t,e,r){function a(e){return t?Qd(O7[2],e):$d(N7[13],0,e)}var n=K5(1,r);if("number"==typeof n)switch(n){case 1:case 9:case 109:return[0,a(r),0]}else if(3===n[0]&&!Yd(n[3],z1)){var s=T7(r);return b7(r),[0,s,[0,a(r)]]}var c=$5(r);if(e&&"number"==typeof c&&!(46===c?0:61===c?0:1))return i7(r,e[1]),b7(r),[0,Qd(O7[2],r),0];return[0,a(r),0]}function vt(t,e){var r=Z5(t),a=$5(t);if("number"==typeof a&&wf===a){p7(t,wf),m7(t,q1);var n=2<=e?$d(N7[13],0,t):Qd(O7[2],t);return[1,[0,p4(r,n[1]),n]]}p7(t,0);for(var s=0,c=0;;){var i=s?s[1]:1,u=$5(t);if("number"==typeof u)if(1===u?1:Ot===u?1:0){var f=N2(c);return p7(t,1),[0,f]}switch(1-i&&i7(t,74),e){case 0:var o=ot(1,Y1,t),v=[0,0,o[2],o[1]];break;case 1:var l=ot(1,G1,t);v=[0,0,l[2],l[1]];break;default:var b=$5(t);if("number"==typeof b)if(46===b)var k=H1,d=1;else if(61===b)k=J1,d=1;else d=0;else d=0;if(!d)k=0;var h=$5(t);if("number"==typeof h){if(46===h)var p=1;else if(61===h)p=1;else{var m=0;p=0}if(p){var w=1;m=1}}else m=0;if(!m)w=0;if(w){var y=T7(t),g=$5(t);if("number"==typeof g)switch(g){case 1:case 9:case 109:Zd(N7[15],0,t,y);var _=[0,0,0,y],T=1;break;default:T=0}else if(3===g[0])if(Yd(g[3],W1))T=0;else{var S=K5(1,t);if("number"==typeof S)switch(S){case 1:case 9:case 109:_=[0,k,0,Qd(O7[2],t)],T=1;var E=0;break;default:E=1}else if(3===S[0])if(Yd(S[3],V1))E=1;else{var x=T7(t);b7(t);_=[0,k,[0,Qd(O7[2],t)],x],T=1,E=0}else E=1;if(E){Zd(N7[15],0,t,y),b7(t);_=[0,0,[0,$d(N7[13],0,t)],y],T=1}}else T=0;if(!T){var A=ot(1,0,t);_=[0,k,A[2],A[1]]}}else{var I=ot(0,0,t);_=[0,0,I[2],I[1]]}v=_}s=[0,w7(t,9)],c=[0,v,c]}}function lt(t,e){var r=[0,vt(e,t)],a=ft(e);return h7(e),[22,[0,t,a,0,r]]}function bt(t,e){var r=2<=t?$d(N7[13],0,e):Qd(O7[2],e),a=$5(e);if("number"==typeof a)if(9===a){p7(e,9);var n=[0,vt(e,t)],s=1}else s=0;else s=0;if(!s)n=0;var c=ft(e);return h7(e),[22,[0,t,c,[0,r],n]]}function kt(t){var e=x5(1,t);p7(e,50);var r=$5(e);if("number"==typeof r)switch(r){case 46:if(_5(e)){p7(e,46);var a=$5(e);if("number"==typeof a)if(wf===a?1:0===a?1:0)return lt(1,e);return bt(1,e)}break;case 61:if(_5(e)){var n=K5(1,e);if("number"==typeof n)switch(n){case 0:return b7(e),lt(0,e);case 102:return b7(e),u7(e),lt(0,e);case 9:var s=1;break;default:s=0}else s=3===n[0]?Yd(n[3],B1)?0:1:0;return s?bt(2,e):(b7(e),bt(0,e))}break;case 0:case 102:return lt(2,e)}else if(1===r[0]){var c=r[1],i=c[4],u=c[3],f=c[2],o=c[1];return i&&o7(e,37),p7(e,[1,[0,o,f,u,i]]),h7(e),[22,[0,2,[0,o,[0,f,u]],0,0]]}return bt(2,e)}var dt=0;function ht(t){return E7(dt,kt,t)}return hk(r,function(t){var e=Z5(t);return p7(t,8),[0,e,1]}),hk(a,function(t){var e=E7(0,function(t){if(p7(t,32),8===$5(t))var e=0;else if(r7(t))e=0;else{var r=$d(N7[13],0,t),a=r[2];1-$d(I7[3],a,t[3])&&i7(t,[4,a]);var n=[0,r];e=1}if(!e)n=0;return h7(t),n},t),r=e[2],a=e[1],n=0===r?1:0;if(n)var s=1-(t[8]||t[9]);else s=n;return s&&T5(t,[0,a,28]),[0,a,[1,[0,r]]]}),hk(n,function(t){var e=E7(0,function(t){if(p7(t,35),8===$5(t))var e=0;else if(r7(t))e=0;else{var r=$d(N7[13],0,t),a=r[2];1-$d(I7[3],a,t[3])&&i7(t,[4,a]);var n=[0,r];e=1}if(!e)n=0;return h7(t),n},t),r=e[1];return 1-t[8]&&T5(t,[0,r,27]),[0,r,[3,[0,e[2]]]]}),hk(s,function(t){var e=E7(0,function(t){p7(t,26),p7(t,4);var e=Qd(N7[7],t);p7(t,5);var r=Qd(N7[2],t),a=1-t[6];return(a?S7(r):a)&&l7(t,r[1]),[33,[0,e,r]]},t),r=e[1];return v7(t,[0,r,31]),[0,r,e[2]]}),hk(c,function(t){var e=Qd(N7[16],t);return[0,e[1],[0,e[2]]]}),hk(i,function(t){1-_5(t)&&i7(t,10),p7(t,61),k7(t,1);var e=Qd(O7[2],t),r=Qd(O7[4],t);p7(t,79);var a=Qd(O7[1],t);return h7(t),d7(t),[0,e,r,a]}),hk(u,function(t){return E7(0,function(t){return p7(t,60),[10,Qd(i,t)]},t)}),hk(f,function(t){if(a7(1,t)){var e=E7(0,i,t);return[0,e[1],[29,e[2]]]}return Qd(N7[2],t)}),hk(o,function(t,e){var r=t?t[1]:t;1-_5(e)&&i7(e,11),p7(e,62),p7(e,61),k7(e,1);var a=Qd(O7[2],e),n=Qd(O7[4],e),s=$5(e);if("number"==typeof s)if(82===s){p7(e,82);var c=[0,Qd(O7[1],e)],i=1}else i=0;else i=0;if(!i)c=0;var u=1-r,f=u?(p7(e,79),[0,Qd(O7[1],e)]):u;return h7(e),d7(e),[0,a,n,f,c]}),hk(v,function(t){return E7(0,function(t){return p7(t,60),[11,$d(o,j1,t)]},t)}),hk(l,function(t){var e=K5(1,t);if("number"==typeof e&&61===e){var r=E7(0,Qd(o,X1),t);return[0,r[1],[30,r[2]]]}return Qd(N7[2],t)}),hk(b,function(t){1-_5(t)&&i7(t,16),p7(t,53);var e=Qd(O7[2],t),r=Qd(O7[4],t),a=41===$5(t)?1:0;if(a){p7(t,41);for(var n=0;;){var s=[0,Qd(O7[6],t),n],c=$5(t);if("number"!=typeof c||9!==c){var i=N2(s);break}p7(t,9);n=s}}else i=a;return[0,e,r,$d(O7[7],0,t),i]}),hk(k,function(t){return E7(0,function(t){return p7(t,60),[7,Qd(b,t)]},t)}),hk(d,function(t){var e=a7(1,t);if(e)var r=e;else{var a=g5(t);if(1===a){var n=K5(1,t);if("number"==typeof n)var s=0;else if(3===n[0])r=1,s=1;else s=0;if(!s)r=0}else if(0===a){var c=K5(1,t);if("number"==typeof c)switch(c){case 42:case 46:case 47:r=0;var i=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 110:case 111:case 112:case 113:case 114:case 115:i=0;break;default:r=0,i=1}else switch(c[0]){case 3:if(z5(c[3]))r=0,i=1;else i=0;break;case 8:case 9:i=0;break;default:r=0,i=1}if(!i)r=1}else r=0}if(r){var u=E7(0,b,t);return[0,u[1],[23,u[2]]]}return it(t)}),hk(h,function(t){var e=x5(1,t);p7(e,40);var r=$d(N7[13],0,e),a=Qd(O7[4],e),n=w7(e,41),s=n?[0,Qd(O7[6],e)]:n,c=$5(e);if("number"==typeof c)var i=0;else if(3===c[0])if(Yd(c[3],M1))i=0;else{b7(e);for(var u=0;;){var f=[0,Qd(O7[6],e),u],o=$5(e);if("number"!=typeof o||9!==o){var v=N2(f);i=1;break}p7(e,9);u=f}}else i=0;if(!i)v=0;var l=$5(e);if("number"==typeof l)if(52===l){b7(e);var b=$d(U7[5],e,0),k=1}else k=0;else k=0;if(!k)b=0;return[0,r,a,$d(O7[7],1,e),s,v,b]}),hk(p,function(t){return E7(0,function(t){return p7(t,60),[4,Qd(h,t)]},t)}),hk(m,function(t){p7(t,15);var e=$d(N7[13],0,t),r=Z5(t),a=Qd(O7[3],t),n=Qd(O7[8],t);p7(t,82);var s=Qd(O7[1],t),c=[0,p4(r,s[1]),[1,[0,n,s,a]]],i=[0,c[1],c],u=Qd(O7[11],t);return h7(t),[0,e,i,u]}),hk(w,function(t){return E7(0,function(t){p7(t,60);var e=$5(t);"number"==typeof e&&64===e&&(i7(t,57),p7(t,64));return[6,Qd(m,t)]},t)}),hk(y,function(t){p7(t,24);var e=Zd(N7[14],t,F1,33)[2];return h7(t),[0,e[1],e[2]]}),hk(g,function(t){return E7(0,function(t){return p7(t,60),[12,Qd(y,t)]},t)}),hk(_,function(t,e){var r=t?t[1]:t,a=Z5(e);if(p7(e,60),m7(e,D1),!r&&10!==$5(e)){var n=$5(e);if("number"==typeof n)var s=0;else if(1===n[0]){var c=n[1],i=c[4],u=c[3],f=c[2],o=c[1];i&&o7(e,37),p7(e,[1,[0,o,f,u,i]]);var v=[1,[0,o,[0,f,u]]];s=1}else s=0;if(!s)v=[0,$d(N7[13],0,e)];var l=E7(0,function(t){p7(t,0);for(var e=0,r=0;;){var a=$5(t);if("number"==typeof a)if(1===a?1:Ot===a?1:0){var n=[0,e,N2(r)];return p7(t,1),n}var s=$d(S,U1,t),c=s[2],i=s[1];if(e)if(0===e[1][0])if("number"==typeof c)var u=0;else switch(c[0]){case 5:var f=c[1][2];if(f)switch(f[1][0]){case 4:case 6:var o=1;break;default:o=0}else o=0;o||i7(t,69);var v=e;u=1;break;case 9:i7(t,68);v=e,u=1;break;default:u=0}else if("number"==typeof c)u=0;else if(9===c[0]){i7(t,69);v=e,u=1}else u=0;else if("number"==typeof c)u=0;else switch(c[0]){case 5:var l=c[1][2];if(l)switch(l[1][0]){case 4:case 6:var b=e,k=1;break;default:k=0}else k=0;if(!k)b=[0,[1,i]];v=b,u=1;break;case 9:v=[0,[0,i]],u=1;break;default:u=0}if(!u)v=e;e=v,r=[0,s,r]}},e),b=l[2],k=b[1],d=l[1],h=[0,d,[0,b[2]]],p=p4(a,d);return[0,p,[8,[0,v,h,k?k[1]:[0,p]]]]}var m=E7(0,T,e),w=m[2];return[0,p4(a,m[1]),w]}),hk(T,function(t){p7(t,10),m7(t,P1);var e=Qd(O7[9],t);return h7(t),[9,e]}),hk(S,function(t,e){var r=t?t[1]:t;1-_5(e)&&i7(e,13);var a=K5(1,e);if("number"==typeof a)switch(a){case 24:return Qd(g,e);case 40:return Qd(p,e);case 46:if(50===$5(e))return ht(e);break;case 49:if(r)return $d(N,[0,r],e);break;case 53:return Qd(k,e);case 61:var n=$5(e);return"number"==typeof n&&50===n&&r?ht(e):Qd(u,e);case 62:return Qd(v,e);case 15:case 64:return Qd(w,e)}else if(3===a[0]&&!Yd(a[3],L1))return $d(_,[0,r],e);if(r){var s=$5(e);return"number"==typeof s&&50===s?(i7(e,72),Qd(N7[2],e)):Qd(g,e)}return Qd(N7[2],e)}),hk(E,function(t){m7(t,O1);var e=$5(t);if("number"!=typeof e&&1===e[0]){var r=e[1],a=r[4],n=r[3],s=r[2],c=r[1];return a&&o7(t,37),p7(t,[1,[0,c,s,n,a]]),[0,c,[0,s,n]]}var i=[0,Z5(t),R1];return u7(t),i}),hk(x,function(t){return t[2]}),hk(A,function(t,e,r){var a=t?t[1]:1,n=$5(e);if("number"==typeof n&&(1===n?1:Ot===n?1:0))return N2(r);1-a&&i7(e,75);var s=E7(0,function(t){var e=T7(t),r=$5(t);if("number"==typeof r)var a=0;else if(3===r[0])if(Yd(r[3],N1))a=0;else{b7(t);var n=T7(t);S5(t,n);var s=[0,n];a=1}else a=0;if(!a){S5(t,e);s=0}return[0,e,s]},e);return Zd(A,[0,w7(e,9)],e,[0,s,r])}),hk(I,function(t,e){return R2(function(e){var r=e[2];return r[2]?0:Zd(N7[15],C1,t,r[1])},e)}),hk(C,function(t){function e(e){var r=U5(1,x5(1,e)),a=Z5(r);p7(r,49);var n=$5(r);if("number"==typeof n)if(65<=n){if(wf===n){var s=Z5(r);p7(r,wf);var c=r[26][4],u=$5(r);if("number"==typeof u)var f=0;else if(3===u[0])if(Yd(u[3],T1))f=0;else{b7(r);var v=c?[0,$d(N7[13],0,r)]:(i7(r,13),0);f=1}else f=0;if(!f)v=0;var l=[0,Qd(E,r)];return h7(r),[15,[0,0,[0,[1,s,v]],l,1]]}}else if(13<=n)switch(n-13|0){case 23:var b=E7(0,function(t){return p7(t,36)},r);S5(r,[0,p4(a,Z5(r)),S1]);var k=$5(r);if("number"==typeof k)if(15===k)var h=[0,Qd(R7[14],r)],p=1;else p=0;else p=0;if(!p)if(c7(r))h=[0,$d(U7[3],r,t)];else{var m=Qd(N7[10],r);h7(r);h=[1,m]}return[14,[0,b[1],h]];case 40:1-_5(r)&&i7(r,15);var w=Qd(d,r),y=w[2];if("number"==typeof y)var g=0;else if(23===y[0]){var _=Qd(x,y[1][1]);S5(r,[0,w[1],_]);g=1}else g=0;return g||m2(_2(x1,E1)),[15,[0,[0,w],0,0,0]];case 48:if(0!==K5(1,r)){1-_5(r)&&i7(r,15);var T=K5(1,r);if("number"==typeof T&&wf===T){p7(r,61);var S=Z5(r);p7(r,wf);var C=Qd(E,r);return h7(r),[15,[0,0,[0,[1,S,0]],[0,C],0]]}var N=E7(0,i,r),O=N[2],R=N[1];return S5(r,[0,R,Qd(x,O[1])]),[15,[0,[0,[0,R,[29,O]]],0,0,0]]}break;case 49:var L=E7(0,function(t){return $d(o,0,t)},r),P=L[2],U=L[1];return S5(r,[0,U,Qd(x,P[1])]),[15,[0,[0,[0,U,[30,P]]],0,0,0]];case 0:case 2:case 11:case 14:case 15:case 27:case 51:var D=$d(N7[3],[0,t],r),F=D[2],M=D[1];if("number"==typeof F)var X=0;else switch(F[0]){case 2:var j=F[1][1];if(j){var B=j[1];X=2}else{T5(r,[0,M,63]);var q=0;X=1}break;case 20:var G=F[1][1];if(G)B=G[1],X=2;else{T5(r,[0,M,64]);q=0,X=1}break;case 31:q=L2(function(t,e){return L2(ut,t,[0,e[2][1],0])},0,F[1][1]),X=1;break;default:X=0}switch(X){case 0:q=m2(I1);var Y=0;break;case 1:Y=0;break;default:var J=[0,[0,M,Qd(x,B)],0];Y=1}if(!Y)J=q;return R2(function(t){return S5(r,t)},J),[15,[0,[0,D],0,0,1]]}var H=$5(r);if("number"==typeof H)if(61===H){b7(r);var W=0,V=1}else V=0;else V=0;if(!V)W=1;p7(r,0);var z=Zd(A,0,r,0);p7(r,1);var K=$5(r);if("number"==typeof K)var Q=0;else if(3===K[0])if(Yd(K[3],A1))Q=0;else{var $=[0,Qd(E,r)];Q=1}else Q=0;if(!Q){$d(I,r,z);$=0}return h7(r),[15,[0,0,[0,[0,z]],$,W]]}return function(t){return E7(0,e,t)}}),hk(N,function(t){var e=t?t[1]:t;function r(t){1-_5(t)&&i7(t,13),p7(t,60);var r=U5(1,x5(1,t));p7(r,49);var a=$5(r);if("number"==typeof a)if(53<=a){if(wf===a){var n=Z5(r);p7(r,wf);var s=r[26][4],c=$5(r);if("number"==typeof c)var u=0;else if(3===c[0])if(Yd(c[3],y1))u=0;else{b7(r);var f=s?[0,$d(N7[13],0,r)]:(i7(r,13),0);u=1}else u=0;if(!u)f=0;var v=Qd(E,r);return h7(r),[5,[0,0,0,[0,[1,n,f]],[0,v]]]}if(!(63<=a))switch(a+M|0){case 0:if(e)return[5,[0,0,[0,[6,E7(0,b,r)]],0,0]];break;case 8:if(e)return[5,[0,0,[0,[4,E7(0,i,r)]],0,0]];break;case 9:return[5,[0,0,[0,[5,E7(0,Qd(o,w1),r)]],0,0]]}}else{var l=a-15|0;if(!(25>>0))switch(l){case 21:var k=E7(0,function(t){return p7(t,36)},r),d=$5(r);if("number"==typeof d)if(15===d)var p=[0,[1,E7(0,m,r)]],w=1;else if(40===d)p=[0,[2,E7(0,h,r)]],w=1;else w=0;else w=0;if(!w){var g=Qd(O7[1],r);h7(r);p=[0,[3,g]]}return[5,[0,[0,k[1]],p,0,0]];case 0:case 9:case 12:case 13:case 25:var _=$5(r);if("number"==typeof _){if(25<=_)if(29<=_)if(40===_)var T=[0,[2,E7(0,h,r)]],S=2;else S=0;else S=27<=_?1:0;else if(15===_)T=[0,[1,E7(0,m,r)]],S=2;else S=24<=_?1:0;switch(S){case 0:var x=0;break;case 1:"number"==typeof _&&(27===_?i7(r,59):28===_&&i7(r,58)),T=[0,[0,E7(0,y,r)]],x=1;break;default:x=1}if(x)return[5,[0,0,T,0,0]]}throw[0,uh,_1]}}var C=$5(r);"number"==typeof C&&(53===C?i7(r,61):61===C&&i7(r,60));p7(r,0);var N=Zd(A,0,r,0);p7(r,1);var O=$5(r);if("number"==typeof O)var R=0;else if(3===O[0])if(Yd(O[3],g1))R=0;else{var L=[0,Qd(E,r)];R=1}else R=0;if(!R){$d(I,r,N);L=0}return h7(r),[5,[0,0,0,[0,[0,N]],L]]}return function(t){return E7(0,r,t)}}),[0,function(t){return E7(X,F,t)},function(t){return E7(q,B,t)},function(t){return E7(tt,Z,t)},function(t){return E7(K,z,t)},function(t){return E7(rt,et,t)},s,c,a,n,function(t){return E7(R,O,t)},S,N,v,function(t){return E7(P,L,t)},r,C,it,ht,d,function(t){return E7(nt,at,t)},l,function(t){return E7(Y,G,t)},function(t){return E7(H,J,t)},function(t){return E7(V,W,t)},f,function(t){return E7($,Q,t)}]}(L7),F7=function(t){var e=function t(e,r){return t.fun(e,r)},r=function t(e,r){return t.fun(e,r)},a=function t(e,r){return t.fun(e,r)};function n(t,e){return Qd(N7[24],e)?[0,$d(a,t,e)]:(T5(t,[0,e[1],20]),0)}function s(e){function r(r){p7(r,0);for(var a=0,n=0,s=0;;){var c=$5(r);if("number"==typeof c)if(1===c?1:Ot===c?1:0){n&&T5(r,[0,n[1],89]);var u=N2(s);p7(r,1);var f=82===$5(r)?1:0;return[0,[0,u,f?[0,Qd(t[9],r)]:f]]}if(12===$5(r))var o=E7(0,function(t){return p7(t,12),i(t,e)},r),v=[0,[1,[0,o[1],[0,o[2]]]]];else{var l=Z5(r),b=$d(N7[21],0,r)[2];switch(b[0]){case 0:var k=[0,b[1]];break;case 1:k=[1,b[1]];break;case 2:k=m2(b1);break;default:k=[2,b[1]]}var d=$5(r);if("number"==typeof d)if(82===d){p7(r,82);var h=[0,[0,i(r,e),0]],p=1}else p=0;else p=0;if(!p)if(1===k[0]){var m=k[1],w=m[2],y=m[1];(V5(w)&&Yd(w,k1)&&Yd(w,d1)?(T5(r,[0,y,3]),1):0)||J5(w)&&v7(r,[0,y,45]);h=[0,[0,[0,y,[3,[0,m,0,0]]],1]]}else{u7(r);h=0}if(h){var g=h[1],_=g[1],T=$5(r);if("number"==typeof T)if(79===T){p7(r,79);var S=Qd(N7[10],r),E=[0,p4(_[1],S[1]),[2,[0,_,S]]],x=1}else x=0;else x=0;if(!x)E=_;var A=[0,[0,[0,p4(l,E[1]),[0,k,E,g[2]]]]]}else A=h;v=A}if(v){var I=v[1],C=a?(T5(r,[0,I[1][1],56]),0):n;if(0===I[0])var N=a,O=C;else{var R=9===$5(r)?1:0;N=1,O=R?[0,Z5(r)]:R}1!==$5(r)&&p7(r,9);a=N,n=O,s=[0,I,s]}else;}}return function(t){return E7(0,r,t)}}function c(e){function r(r){p7(r,6);for(var a=0;;){var n=$5(r);if("number"==typeof n){if(13<=n)var s=Ot===n?1:0;else if(7<=n)switch(n-7|0){case 2:p7(r,9);a=[0,0,a];continue;case 5:var c=E7(0,function(t){return p7(t,12),i(t,e)},r),u=c[1],f=[1,[0,u,[0,c[2]]]];7!==$5(r)&&(T5(r,[0,u,55]),9===$5(r)&&b7(r));a=[0,[0,f],a];continue;case 0:s=1;break;default:s=0}else s=0;if(s){var o=N2(a);p7(r,7);var v=82===$5(r)?1:0;return[1,[0,o,v?[0,Qd(t[9],r)]:v]]}}var l=i(r,e),b=$5(r);if("number"==typeof b)if(79===b){p7(r,79);var k=Qd(N7[10],r),d=[0,p4(l[1],k[1]),[2,[0,l,k]]],h=1}else h=0;else h=0;if(!h)d=l;var p=[0,d];7!==$5(r)&&p7(r,9);a=[0,[0,p],a]}}return function(t){return E7(0,r,t)}}function i(t,e){var r=$5(t);if("number"==typeof r){if(6===r)return Qd(c(e),t);if(0===r)return Qd(s(e),t)}var a=Zd(N7[14],t,0,e);return[0,a[1],[3,a[2]]]}return hk(e,function(t,e){for(var r=0,n=e[2][1];;){if(!n){var s=[0,[0,N2(r),0]];return[0,e[1],s]}var c=n[1];if(0!==c[0]){var i=n[2],u=c[1],f=u[1];if(i){T5(t,[0,f,56]);n=i}else r=[0,[1,[0,f,[0,$d(a,t,u[2][1])]]],r],n=0}else{var o=c[1],v=o[2];switch(v[0]){case 0:var l=v[3],b=$d(a,t,v[2]),k=[0,v[1],b,l],d=0;break;case 1:var h=v[2],p=h[1];T5(t,[0,p,88]);k=[0,v[1],[0,p,[4,[0,p,[8,h[2]]]]],0],d=0;break;default:var m=v[2],w=m[1];T5(t,[0,w,2]);var y=v[1],g=[0,w,[4,[0,w,[8,m[2]]]]],_=0;d=1}if(!d)y=k[1],g=k[2],_=k[3];switch(y[0]){case 0:var T=[0,y[1]];break;case 1:T=[1,y[1]];break;case 2:T=m2(m1);break;default:T=[2,y[1]]}var r=[0,[0,[0,o[1],[0,T,g,_]]],r],n=n[2]}}}),hk(r,function(t,e){for(var r=0,s=e[2][1];;){if(!s){var c=[1,[0,N2(r),0]];return[0,e[1],c]}var i=s[1];if(i){var u=i[1];if(0===u[0]){var f=u[1],o=f[2];if("number"!=typeof o&&2===o[0]&&0===o[1][1]){r=[0,[0,[0,$d(a,t,f)]],r],s=s[2];continue}var v=n(t,f);r=v?[0,[0,[0,v[1]]],r]:r,s=s[2];continue}var l=s[2],b=u[1],k=b[1];if(l){T5(t,[0,k,55]);s=l;continue}var d=n(t,b[2][1]);r=d?[0,[0,[1,[0,k,[0,d[1]]]]],r]:r,s=0}else r=[0,0,r],s=s[2]}}),hk(a,function(t,a){var n=a[2],s=a[1];if("number"!=typeof n)switch(n[0]){case 0:return $d(r,t,[0,s,n[1]]);case 2:var c=n[1];if(0===c[1])return[0,s,[2,[0,c[2],c[3]]]];break;case 10:var i=n[1],u=i[2],f=i[1];if(!(t[6]&&W5(u)?(T5(t,[0,f,42]),1):0)&&1-t[6])if(!(t[17]&&Gd(u,h1)?(T5(t,[0,f,84]),1):0)){var o=t[18];(o?Gd(u,p1):o)&&T5(t,[0,f,83])}return[0,s,[3,[0,i,0,0]]];case 19:return $d(e,t,[0,s,n[1]])}return[0,s,[4,[0,s,n]]]}),[0,e,r,a,s,c,i]}(O7),M7=function t(e){return t.fun(e)},X7=function t(e,r,a){return t.fun(e,r,a)},j7=function t(e){return t.fun(e)},B7=function t(e,r){return t.fun(e,r)},q7=function t(e,r){return t.fun(e,r)},G7=function t(e,r){return t.fun(e,r)},Y7=function t(e,r){return t.fun(e,r)},J7=function t(e,r){return t.fun(e,r)},H7=function t(e){return t.fun(e)},W7=function t(e){return t.fun(e)},V7=function t(e){return t.fun(e)},z7=function t(e,r,a){return t.fun(e,r,a)},K7=function t(e,r){return t.fun(e,r)},Q7=function t(e,r,a){return t.fun(e,r,a)},$7=function t(e){return t.fun(e)},Z7=function t(e){return t.fun(e)},t9=function(t){function e(e){k7(e,0);var r=Z5(e);p7(e,0),p7(e,12);var a=Qd(t[10],e),n=Z5(e);return p7(e,1),d7(e),[0,p4(r,n),[0,a]]}function r(e,r){if(1===$5(e))var a=Z5(e)[2],n=[1,[0,r[1],r[3],a]];else n=[0,Qd(t[7],e)];var s=Z5(e);return p7(e,1),d7(e),[0,p4(r,s),[0,n]]}function a(t){k7(t,0);var e=Z5(t);return p7(t,0),r(t,e)}function n(e){k7(e,0);var a=Z5(e);p7(e,0);var n=$5(e);if("number"==typeof n&&12===n){p7(e,12);var s=Qd(t[10],e),c=Z5(e);return p7(e,1),d7(e),[0,p4(a,c),[3,s]]}var i=r(e,a);return[0,i[1],[2,i[2]]]}function s(t){var e=Z5(t),r=$5(t);if("number"==typeof r)var a=0;else if(6===r[0]){var n=r[1];a=1}else a=0;return a||(u7(t),n=z0),b7(t),[0,e,[0,n]]}function c(t){var e=s(t),r=$5(t);if("number"==typeof r){if(10===r){p7(t,10);for(var a=s(t),n=[0,p4(e[1],a[1]),[0,[0,e],a]];;){var c=$5(t);if("number"!=typeof c||10!==c)return[2,n];p7(t,10);var i=s(t);n=[0,p4(n[1],i[1]),[0,[1,n],i]]}}if(82===r){p7(t,82);var u=s(t);return[1,[0,p4(e[1],u[1]),[0,e,u]]]}}return[0,e]}function i(t){var e=Z5(t),r=s(t);if(82===$5(t)){p7(t,82);var n=s(t),c=p4(r[1],n[1]),i=c,u=[1,[0,c,[0,r,n]]]}else i=r[1],u=[0,r];if(79===$5(t)){p7(t,79);var f=$5(t);if("number"==typeof f)if(0===f){var o=a(t),v=o[2],l=o[1];0!==v[1][0]&&T5(t,[0,l,46]);var b=[0,l,[0,[1,l,v]]],k=0}else k=1;else if(7===f[0]){var d=f[1],h=d[1];p7(t,f),b=[0,h,[0,[0,h,[0,[0,d[2]],d[3]]]]],k=0}else k=1;if(k){i7(t,47);var p=Z5(t),m=p,w=[0,[0,p,[0,V0,W0]]]}else m=b[1],w=b[2]}else m=i,w=0;return[0,p4(e,m),[0,u,w]]}function u(t,r){var a=$5(t);if("number"==typeof a)if(95===a)var n=0,s=0,u=0,f=1;else f=0;else f=0;if(!f)for(var o=0,v=[0,c(t)];;){var l=$5(t);if("number"==typeof l){if(Jt<=l)if(Ot===l)var b=1;else if(wf<=l){var k=0;b=0}else b=1;else if(95===l)b=1;else{if(0===l){o=[0,[1,e(t)],o];continue}k=0,b=0}b&&(n=v,s=N2(o),u=Jt===$5(t)?1:0,k=1)}else k=0;if(k)break;o=[0,[0,i(t)],o]}u&&p7(t,Jt);var d=Z5(t);if(p7(t,95),d7(t),n){var h=[0,qe,[0,n[1],u,s]];return[0,p4(r,d),h]}return[0,p4(r,d),of]}function f(t,e){p7(t,Jt);var r=$5(t);if("number"==typeof r){var a=95!==r?1:0;if(a)var n=0;else{var s=a;n=1}}else n=0;n||(s=[0,c(t)]);var i=Z5(t);p7(t,95);var u=t[22][1];if(u){var f=u[2];if(f)var o=f[2],v=1;else v=0}else v=0;v||(o=m2(TK)),t[22][1]=o;var l=g5(t),b=m5(t[23][1],l);if(t[24][1]=b,s){var k=[0,qe,[0,s[1]]];return[0,p4(e,i),k]}return[0,p4(e,i),of]}var o=function t(e){return t.fun(e)},v=function t(e,r){return t.fun(e,r)},l=function t(e){return t.fun(e)};function b(t){switch(t[0]){case 0:return t[1][2][1];case 1:var e=t[1][2],r=_2(Y0,e[2][2][1]);return _2(e[1][2][1],r);default:var a=t[1][2],n=a[1];return _2(0===n[0]?n[1][2][1]:b([2,n[1]]),_2(J0,a[2][2][1]))}}return hk(o,function(t){var e=$5(t);if("number"==typeof e){if(0===e)return n(t)}else if(7===e[0]){var r=e[1];return p7(t,e),[0,r[1],[4,[0,r[2],r[3]]]]}var a=Qd(l,t),s=a[2],c=a[1];return of<=s[1]?[0,c,[1,s[2]]]:[0,c,[0,s[2]]]}),hk(v,function(t,e){var r=u(t,e),a=r[2];if("number"!=typeof a&&a[2][2])var n=0,s=Af;else{k7(t,3);for(var c=0;;){var i=$5(t);if("number"==typeof i){if(94===i){k7(t,2);var l=Z5(t);p7(t,94);var k=$5(t);if("number"==typeof k){if(Jt===k)var d=1;else if(Ot===k)d=1;else{var h=0;d=0}if(d){var p=f(t,l),m=p[2],w=p[1];if("number"==typeof m){var y=[1,w];h=1}else y=[0,[0,w,m[2]]],h=1}}else h=0;if(!h){var g=$d(v,t,l),_=g[2],T=g[1];y=of<=_[1]?[3,[0,T,_[2]]]:[2,[0,T,_[2]]]}switch(y[0]){case 0:var S=[0,qe,y[1]],E=[0,N2(c),S],x=1;break;case 1:var A=[0,of,y[1]];E=[0,N2(c),A],x=1;break;case 2:var I=y[1];c=[0,[0,I[1],[0,I[2]]],c];continue;default:var C=y[1];c=[0,[0,C[1],[1,C[2]]],c];continue}}else if(Ot===i)u7(t),E=[0,N2(c),Af],x=1;else{var N=0;x=0}x&&(n=E[1],s=E[2],N=1)}else N=0;if(N)break;c=[0,Qd(o,t),c]}}if("number"==typeof s)var O=0;else{var R=s[1];if(qe===R){var L=s[2],P=r[2];if("number"==typeof P)i7(t,H0);else{var U=b(P[2][1]);Yd(b(L[2][1]),U)&&i7(t,[6,U])}var D=L[1],F=1}else if(of===R){var M=r[2];"number"==typeof M||qe===M[1]&&i7(t,[6,b(M[2][1])]),D=s[2],F=1}else O=0,F=0;if(F){var X=D;O=1}}O||(X=r[1]);var j=r[2];if("number"==typeof j){if("number"==typeof s)var B=0;else if(of===s[1]){var q=[0,s[2]];B=1}else B=0;B||(q=0);var G=[0,of,[0,r[1],q,n]];return[0,p4(r[1],X),G]}if("number"==typeof s)var Y=0;else if(qe===s[1]){var J=[0,s[2]];Y=1}else Y=0;Y||(J=0);var H=[0,qe,[0,[0,r[1],j[2]],J,n]];return[0,p4(r[1],X),H]}),hk(l,function(t){var e=Z5(t);return k7(t,2),p7(t,94),$d(v,t,e)}),[0,e,r,a,n,s,c,i,u,f,o,v,l]}(N7),e9=U7[3],r9=P7[3],a9=P7[1],n9=P7[6],s9=U7[2],c9=U7[1],i9=U7[4],u9=P7[5],f9=t9[12],o9=F7[6],v9=F7[3];hk(M7,function(t){var e=$d(B7,t,function(t){return 0}),r=Z5(t);if(p7(t,Ot),e)var a=I2(N2(e))[1],n=p4(I2(e)[1],a);else n=r;return[0,n,e,N2(t[2][1])]}),hk(X7,function(t,e,r){for(var a=C5(1,t),n=f2;;){var s=n[2],c=n[1],i=$5(a);if("number"==typeof i)if(Ot===i)var u=[0,a,c,s],f=1;else f=0;else f=0;if(!f)if(Qd(e,i))u=[0,a,c,s];else{if("number"==typeof i)var o=0;else if(1===i[0]){var v=Qd(r,a),l=[0,v,s],b=v[2];if("number"!=typeof b&&16===b[0]){var k=b[1][2];if(k){var d=a[6]||Gd(k[1],u2);a=x5(d,a),n=[0,[0,i,c],l];continue}}u=[0,a,c,l],o=1}else o=0;if(!o)u=[0,a,c,s]}var h=C5(0,a);return R2(function(t){if("number"!=typeof t&&1===t[0]){var e=t[1],r=e[4];return r?v7(h,[0,e[1],37]):r}if("number"==typeof t){var a=t;if(58<=a)switch(a){case 58:var n=hD;break;case 59:n=pD;break;case 60:n=mD;break;case 61:n=wD;break;case 62:n=yD;break;case 63:n=gD;break;case 64:n=_D;break;case 65:n=TD;break;case 66:n=SD;break;case 67:n=ED;break;case 68:n=xD;break;case 69:n=AD;break;case 70:n=ID;break;case 71:n=CD;break;case 72:n=ND;break;case 73:n=OD;break;case 74:n=RD;break;case 75:n=LD;break;case 76:n=PD;break;case 77:n=UD;break;case 78:n=DD;break;case 79:n=FD;break;case 80:n=MD;break;case 81:n=XD;break;case 82:n=jD;break;case 83:n=BD;break;case 84:n=qD;break;case 85:n=GD;break;case 86:n=YD;break;case 87:n=JD;break;case 88:n=HD;break;case 89:n=WD;break;case 90:n=VD;break;case 91:n=zD;break;case 92:n=KD;break;case 93:n=QD;break;case 94:n=$D;break;case 95:n=ZD;break;case 96:n=tF;break;case 97:n=eF;break;case 98:n=rF;break;case 99:n=aF;break;case 100:n=nF;break;case 101:n=sF;break;case 102:n=cF;break;case 103:n=iF;break;case 104:n=uF;break;case 105:n=fF;break;case 106:n=oF;break;case 107:n=vF;break;case 108:n=lF;break;case 109:n=bF;break;case 110:n=kF;break;case 111:n=dF;break;case 112:n=hF;break;case 113:n=pF;break;case 114:n=mF;break;default:n=wF}else switch(a){case 0:n=lU;break;case 1:n=bU;break;case 2:n=kU;break;case 3:n=dU;break;case 4:n=hU;break;case 5:n=pU;break;case 6:n=mU;break;case 7:n=wU;break;case 8:n=yU;break;case 9:n=gU;break;case 10:n=_U;break;case 11:n=TU;break;case 12:n=SU;break;case 13:n=EU;break;case 14:n=xU;break;case 15:n=AU;break;case 16:n=IU;break;case 17:n=CU;break;case 18:n=NU;break;case 19:n=OU;break;case 20:n=RU;break;case 21:n=LU;break;case 22:n=PU;break;case 23:n=UU;break;case 24:n=DU;break;case 25:n=FU;break;case 26:n=MU;break;case 27:n=XU;break;case 28:n=jU;break;case 29:n=BU;break;case 30:n=qU;break;case 31:n=GU;break;case 32:n=YU;break;case 33:n=JU;break;case 34:n=HU;break;case 35:n=WU;break;case 36:n=VU;break;case 37:n=zU;break;case 38:n=KU;break;case 39:n=QU;break;case 40:n=$U;break;case 41:n=ZU;break;case 42:n=tD;break;case 43:n=eD;break;case 44:n=rD;break;case 45:n=aD;break;case 46:n=nD;break;case 47:n=sD;break;case 48:n=cD;break;case 49:n=iD;break;case 50:n=uD;break;case 51:n=fD;break;case 52:n=oD;break;case 53:n=vD;break;case 54:n=lD;break;case 55:n=bD;break;case 56:n=kD;break;default:n=dD}}else switch(t[0]){case 0:n=yF;break;case 1:n=gF;break;case 2:n=_F;break;case 3:n=TF;break;case 4:n=SF;break;case 5:n=EF;break;case 6:n=xF;break;case 7:n=AF;break;case 8:n=IF;break;default:n=CF}return m2(_2(v2,_2(n,o2)))},N2(c)),[0,h,u[3]]}}),hk(j7,function(t){var e=Qd(U7[6],t),r=$5(t);if("number"==typeof r){var a=r-49|0;if(!(11>>0))switch(a){case 0:return $d(D7[16],e,t);case 1:Qd(f7(t),e);var n=K5(1,t);return Qd("number"==typeof n&&4===n?D7[17]:D7[18],t);case 11:if(49===K5(1,t))return Qd(f7(t),e),$d(D7[12],0,t)}}return $d(J7,[0,e],t)}),hk(B7,function(t,e){var r=Zd(X7,t,e,j7);return L2(function(t,e){return[0,e,t]},$d(q7,e,r[1]),r[2])}),hk(q7,function(t,e){for(var r=0;;){var a=$5(e);if("number"==typeof a&&Ot===a)return N2(r);if(Qd(t,a))return N2(r);r=[0,Qd(j7,e),r]}}),hk(G7,function(t,e){var r=Zd(X7,e,t,function(t){return $d(J7,0,t)}),a=r[1];return[0,L2(function(t,e){return[0,e,t]},$d(Y7,t,a),r[2]),a[6]]}),hk(Y7,function(t,e){for(var r=0;;){var a=$5(e);if("number"==typeof a&&Ot===a)return N2(r);if(Qd(t,a))return N2(r);r=[0,$d(J7,0,e),r]}}),hk(J7,function(t,e){var r=t?t[1]:t;1-c7(e)&&Qd(f7(e),r);var a=$5(e);if("number"==typeof a){if(27===a)return Qd(D7[26],e);if(28===a)return Qd(D7[3],e)}if(s7(e))return Qd(R7[14],e);if(c7(e))return $d(e9,e,r);if("number"==typeof a){var n=a+M|0;if(!(9>>0))switch(n){case 0:return Qd(D7[19],e);case 7:return $d(D7[11],0,e);case 8:return Qd(D7[25],e);case 9:return Qd(D7[21],e)}}return Qd(H7,e)}),hk(H7,function(t){var e=$5(t);if("number"==typeof e)switch(e){case 0:return Qd(D7[7],t);case 8:return Qd(D7[15],t);case 19:return Qd(D7[22],t);case 20:return Qd(D7[23],t);case 22:return Qd(D7[24],t);case 23:return Qd(D7[4],t);case 24:return Qd(D7[26],t);case 25:return Qd(D7[5],t);case 26:return Qd(D7[6],t);case 32:return Qd(D7[8],t);case 35:return Qd(D7[9],t);case 37:return Qd(D7[14],t);case 39:return Qd(D7[1],t);case 59:return Qd(D7[10],t);case 109:return u7(t),[0,Z5(t),1];case 16:case 43:return Qd(D7[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 82:return u7(t),b7(t),Qd(H7,t)}if(s7(t)){var r=Qd(R7[14],t);return l7(t,r[1]),r}if("number"==typeof e&&28===e&&6===K5(1,t)){var a=Q5(1,t);return T5(t,[0,p4(Z5(t),a),85]),Qd(D7[17],t)}return n7(t)?Qd(D7[20],t):c7(t)?(u7(t),b7(t),Qd(D7[17],t)):Qd(D7[17],t)}),hk(W7,function(t){var e=Qd(P7[1],t),r=$5(t);return"number"==typeof r&&9===r?$d(P7[8],t,[0,e,0]):e}),hk(V7,function(t){var e=Qd(P7[2],t),r=$5(t);if("number"==typeof r&&9===r){var a=[0,$d(L7[1],t,e),0];return[0,$d(P7[8],t,a)]}return e}),hk(z7,function(t,e,r){var a=r[2],n=r[1];if(Yd(a,s2)){if(Yd(a,c2))return Yd(a,i2)?J5(a)?v7(e,[0,n,45]):V5(a)?T5(e,[0,n,[1,a]]):t&&W5(a)?v7(e,[0,n,t[1]]):0:e[17]?T5(e,[0,n,3]):v7(e,[0,n,45]);if(e[6])return v7(e,[0,n,45]);var s=e[14];return s?T5(e,[0,n,[1,a]]):s}var c=e[18];return c?T5(e,[0,n,3]):c}),hk(K7,function(t,e){var r=T7(e);return Zd(z7,t,e,r),r}),hk(Q7,function(t,e,r){var a=e?e[1]:e;return E7(0,function(t){var e=1-a,n=$d(K7,[0,r],t),s=e?81===$5(t)?1:0:e;s&&(1-_5(t)&&i7(t,12),p7(t,81));var c=82===$5(t)?1:0;return[0,n,c?[0,Qd(O7[9],t)]:c,s]},t)}),hk($7,function(t){var e=Z5(t);p7(t,0);var r=$d(Y7,function(t){return 1===t?1:0},t),a=Z5(t);return p7(t,1),[0,p4(e,a),[0,r]]}),hk(Z7,function(t){var e=Z5(t);p7(t,0);var r=$d(G7,function(t){return 1===t?1:0},t),a=Z5(t);p7(t,1);var n=r[2],s=[0,r[1]];return[0,p4(e,a),s,n]}),Zd(b6,k2,N7,[0,M7,H7,J7,Y7,G7,q7,W7,V7,r9,a9,n9,s9,K7,Q7,z7,$7,Z7,f9,o9,v9,c9,e9,i9,u9]);var l9=[0,0],b9=pd,k9=function(t){return md(Q2(t))},d9=function(t){return hd(Q2(t))},h9=function(t,e,r){try{var a=new RegExp(e.toString(),r.toString())}catch(e){l9[1]=[0,[0,t,18],l9[1]];a=new RegExp(Of,r.toString())}return a},p9=function(t,e){var r=Fk(e,void 0)?{}:e,a=r.esproposal_decorators,n=Vk(t);if(K6(a)){var s=dh.slice();s[3]=0|a;var c=s}else c=dh;var i=r.esproposal_class_instance_fields;if(K6(i)){var u=c.slice();u[1]=0|i;var f=u}else f=c;var o=r.esproposal_class_static_fields;if(K6(o)){var v=f.slice();v[2]=0|o;var l=v}else l=f;var b=r.esproposal_export_star_as;if(K6(b)){var k=l.slice();k[4]=0|b;var d=k}else d=l;var h=r.esproposal_optional_chaining;if(K6(h)){var p=d.slice();p[5]=0|h;var m=p}else m=d;var w=r.types;if(K6(w)){var y=m.slice();y[6]=0|w;var g=y}else g=m;var _=[0,[0,g]],T=ph?ph[1]:1,S=[0,_?_[1]:_],E=[0,0],x=y5([0,E?E[1]:E],[0,S?S[1]:S],0,n),A=Qd(N7[1],x),I=N2(x[1][1]),C=N2(L2(function(t,e){var r=t[2],a=t[1];return $d(C7[3],e,a)?[0,a,r]:[0,$d(C7[4],e,a),[0,e,r]]},[0,C7[1],0],I)[2]);if(T?0!==C?1:0:T)throw[0,w4,C];function N(t,e){return d9(O2(t,e))}function O(t,e){return e?Qd(t,e[1]):z6}function R(t){return k9([0,[0,$R,t[1]],[0,[0,QR,t[2]],0]])}function L(t){var e=t[1];if(e)var r=e[1],a="number"==typeof r?ka:r[1].toString();else a=z6;var n=[0,[0,VR,R(t[3])],0];return k9([0,[0,KR,a],[0,[0,zR,R(t[2])],n]])}function P(t,e,r){var a=[0,[0,JR,t.toString()],0],n=[0,[0,HR,L(e)],a];return k9(C2([0,[0,WR,d9([0,e[2][3],[0,e[3][3],0]])],n],r))}function U(t){return N(Y,t)}function D(t){var e=t[2];switch(e[2]){case 0:var r=$C;break;case 1:r=ZC;break;default:r=tN}var a=[0,[0,eN,r.toString()],0],n=[0,[0,rN,N(pt,e[1])],a];return P(aN,t[1],n)}function F(t){var e=t[2],r=[0,[0,PI,N(it,e[4])],0],a=[0,[0,UI,wt(e[3])],r],n=[0,[0,DI,O(xt,e[2])],a],s=[0,[0,FI,z(e[1])],n];return P(MI,t[1],s)}function M(t,e){var r=e[2],a=t?DA:FA,n=[0,[0,MA,O(gt,r[4])],0],s=[0,[0,XA,O(gt,r[3])],n],c=[0,[0,jA,O(xt,r[2])],s],i=[0,[0,BA,z(r[1])],c];return P(a,e[1],i)}function X(t){var e=t[2],r=[0,[0,RA,gt(e[3])],0],a=[0,[0,LA,O(xt,e[2])],r],n=[0,[0,PA,z(e[1])],a];return P(UA,t[1],n)}function j(t){var e=t[2],r=e[4],a=d9(r?[0,it(r[1]),0]:0),n=[0,[0,dA,wt(e[3])],[0,[0,kA,a],0]],s=[0,[0,hA,O(xt,e[2])],n],c=[0,[0,pA,z(e[1])],s];return P(mA,t[1],c)}function B(t){var e=t[2],r=p4(e[1][1],e[2][1]),a=[0,[0,vA,O(jt,e[3])],0],n=[0,[0,lA,Z(r,[0,e[1],[0,e[2]],0])],a];return P(bA,t[1],n)}function q(t){var e=t[2],r=e[2],a=r?r[1][1]:e[1][1],n=p4(e[1][1],a),s=[0,[0,fA,Z(n,[0,e[1],e[2],0])],0];return P(oA,t[1],s)}function G(t){var e=[0,[0,iA,U(t[2][1])],0];return P(uA,t[1],e)}function Y(t){var e=t[2],r=t[1];if("number"==typeof e)return P(0===e?F_:M_,r,0);switch(e[0]){case 0:return G([0,r,e[1]]);case 1:return P(j_,r,[0,[0,X_,O(z,e[1][1])],0]);case 2:var a=e[1],n=[0,[0,qA,N(Q,a[7])],0],s=[0,[0,GA,N(nt,a[6])],n],c=[0,[0,YA,O(It,a[5])],s],i=[0,[0,JA,O(xt,a[4])],c],u=[0,[0,HA,O(Q,a[3])],i],f=[0,[0,WA,st(a[2])],u];return P(zA,r,[0,[0,VA,O(z,a[1])],f]);case 3:return P(q_,r,[0,[0,B_,O(z,e[1][1])],0]);case 4:return j([0,r,e[1]]);case 5:var o=e[1],v=o[3];if(v){var l=v[1];if(0!==l[0]&&!l[2])return P(Y_,r,[0,[0,G_,O(dt,o[4])],0])}var b=o[2];if(b){var k=b[1];switch(k[0]){case 0:var d=q(k[1]);break;case 1:d=B(k[1]);break;case 2:d=j(k[1]);break;case 3:d=gt(k[1]);break;case 4:d=X(k[1]);break;case 5:d=M(1,k[1]);break;default:d=F(k[1])}var h=d}else h=z6;var p=[0,[0,J_,O(dt,o[4])],0],m=[0,[0,W_,h],[0,[0,H_,at(o[3])],p]],w=o[1];return P(z_,r,[0,[0,V_,!!(w?1:w)],m]);case 6:return B([0,r,e[1]]);case 7:var y=e[1],g=[0,[0,wA,N(it,y[4])],0],_=[0,[0,yA,wt(y[3])],g],T=[0,[0,gA,O(xt,y[2])],_];return P(TA,r,[0,[0,_A,z(y[1])],T]);case 8:var S=e[1],E=S[1],x=0===E[0]?z(E[1]):dt(E[1]),A=0===S[3][0]?"CommonJS":"ES";return P(Z_,r,[0,[0,$_,x],[0,[0,Q_,G(S[2])],[0,[0,K_,A],0]]]);case 9:return P(eT,r,[0,[0,tT,Et(e[1])],0]);case 10:var I=e[1],C=[0,[0,IA,gt(I[3])],0],R=[0,[0,CA,O(xt,I[2])],C];return P(OA,r,[0,[0,NA,z(I[1])],R]);case 11:return M(1,[0,r,e[1]]);case 12:return q([0,r,e[1]]);case 13:var L=e[1],U=[0,[0,rT,Q(L[2])],0];return P(nT,r,[0,[0,aT,Y(L[1])],U]);case 14:var J=e[1][2],H=0===J[0]?Y(J[1]):Q(J[1]);return P(iT,r,[0,[0,cT,H],[0,[0,sT,rt(1).toString()],0]]);case 15:var W=e[1],V=W[2];if(V){var K=V[1];if(0!==K[0]&&!K[2]){var $=[0,[0,uT,rt(W[4]).toString()],0];return P(oT,r,[0,[0,fT,O(dt,W[3])],$])}}var Z=[0,[0,vT,rt(W[4]).toString()],0],ct=[0,[0,lT,O(dt,W[3])],Z],ot=[0,[0,bT,at(W[2])],ct];return P(dT,r,[0,[0,kT,O(Y,W[1])],ot]);case 16:var vt=e[1],lt=[0,[0,hT,O(b9,vt[2])],0];return P(mT,r,[0,[0,pT,Q(vt[1])],lt]);case 17:var bt=e[1],kt=[0,[0,wT,Y(bt[4])],0],ht=[0,[0,yT,O(Q,bt[3])],kt],pt=[0,[0,gT,O(Q,bt[2])],ht];return P(TT,r,[0,[0,_T,O(function(t){return 0===t[0]?D(t[1]):Q(t[1])},bt[1])],pt]);case 18:var mt=e[1],yt=mt[1],_t=0===yt[0]?D(yt[1]):ut(yt[1]),Tt=[0,[0,ST,!!mt[4]],0],St=[0,[0,ET,Y(mt[3])],Tt];return P(IT,r,[0,[0,AT,_t],[0,[0,xT,Q(mt[2])],St]]);case 19:var At=e[1],Ct=At[4]?CT:NT,Nt=At[1],Ot=0===Nt[0]?D(Nt[1]):ut(Nt[1]),Rt=[0,[0,OT,Y(At[3])],0];return P(Ct,r,[0,[0,LT,Ot],[0,[0,RT,Q(At[2])],Rt]]);case 20:var Lt=e[1],Pt=Lt[3],Ut=0===Pt[0]?G(Pt[1]):Q(Pt[1]),Dt=[0,[0,Ex,O(xt,Lt[9])],0],Ft=[0,[0,xx,O(Et,Lt[8])],Dt],Mt=[0,[0,Ax,!!Lt[7]],Ft],Xt=[0,[0,Ix,O(jt,Lt[6])],Mt],Bt=[0,[0,Ox,Ut],[0,[0,Nx,!!Lt[4]],[0,[0,Cx,!!Lt[5]],Xt]]],qt=[0,[0,Rx,ft(Lt[2])],Bt];return P(Px,r,[0,[0,Lx,O(z,Lt[1])],qt]);case 21:var Gt=e[1],Yt=[0,[0,PT,O(Y,Gt[3])],0],Jt=[0,[0,UT,Y(Gt[2])],Yt];return P(FT,r,[0,[0,DT,Q(Gt[1])],Jt]);case 22:var Ht=e[1],Wt=Ht[4];if(Wt){var Vt=Wt[1];if(0===Vt[0])var zt=O2(function(t){var e=t[1],r=t[3],a=t[2],n=a?p4(r[1],a[1][1]):r[1],s=a?a[1]:r;if(e)switch(e[1]){case 0:var c=se,i=1;break;case 1:c=Wu,i=1;break;default:i=0}else i=0;if(!i)c=z6;var u=[0,[0,PR,z(s)],[0,[0,LR,c],0]];return P(DR,n,[0,[0,UR,z(r)],u])},Vt[1]);else{var Kt=Vt[1],Qt=[0,[0,OR,z(Kt[2])],0];zt=[0,P(RR,Kt[1],Qt),0]}var $t=zt}else $t=Wt;var Zt=Ht[3];if(Zt)var te=Zt[1],ee=[0,[0,CR,z(te)],0],re=[0,P(NR,te[1],ee),$t];else re=$t;switch(Ht[1]){case 0:var ae=MT;break;case 1:ae=XT;break;default:ae=jT}var ne=[0,[0,BT,ae.toString()],0],ce=[0,[0,qT,dt(Ht[2])],ne];return P(YT,r,[0,[0,GT,d9(re)],ce]);case 23:return F([0,r,e[1]]);case 24:var ie=e[1],ue=[0,[0,JT,Y(ie[2])],0];return P(WT,r,[0,[0,HT,z(ie[1])],ue]);case 25:return P(zT,r,[0,[0,VT,O(Q,e[1][1])],0]);case 26:var fe=e[1],oe=[0,[0,KT,N(tt,fe[2])],0];return P($T,r,[0,[0,QT,Q(fe[1])],oe]);case 27:return P(tS,r,[0,[0,ZT,Q(e[1][1])],0]);case 28:var ve=e[1],le=[0,[0,eS,O(G,ve[3])],0],be=[0,[0,rS,O(et,ve[2])],le];return P(nS,r,[0,[0,aS,G(ve[1])],be]);case 29:return X([0,r,e[1]]);case 30:return M(0,[0,r,e[1]]);case 31:return D([0,r,e[1]]);case 32:var ke=e[1],de=[0,[0,sS,Y(ke[2])],0];return P(iS,r,[0,[0,cS,Q(ke[1])],de]);default:var he=e[1],pe=[0,[0,uS,Y(he[2])],0];return P(oS,r,[0,[0,fS,Q(he[1])],pe])}}function J(t){var e=t[2],r=[0,[0,WO,O(Ot,e[2])],0],a=[0,[0,VO,N(Lt,e[3])],r],n=[0,[0,zO,P(eR,e[1],0)],a];return P(KO,t[1],n)}function H(t){var e=t[2],r=[0,[0,GO,N(Lt,e[3])],0],a=[0,[0,YO,O(Nt,e[2])],r],n=e[1],s=n[2],c=[0,[0,QO,!!s[2]],0],i=[0,[0,$O,N(Ct,s[3])],c],u=[0,[0,ZO,Ft(s[1])],i],f=[0,[0,JO,P(tR,n[1],u)],a];return P(HO,t[1],f)}function W(t){var e=t[2],r=[0,[0,BC,N(Q,e[2])],0],a=[0,[0,qC,N(ht,e[1])],r];return P(GC,t[1],a)}function V(t){var e=t[2],r=e[2],a=e[1],n=t[1];if("number"==typeof a)var s=z6;else switch(a[0]){case 0:s=a[1].toString();break;case 1:s=!!a[1];break;case 2:s=a[1];break;default:var c=a[1];s=h9(n,c[1],c[2])}if("number"==typeof a)var i=0;else if(3===a[0]){var u=a[1],f=[0,[0,RC,k9([0,[0,OC,u[1].toString()],[0,[0,NC,u[2].toString()],0]])],0],o=[0,[0,PC,s],[0,[0,LC,r.toString()],f]];i=1}else i=0;if(!i)o=[0,[0,DC,s],[0,[0,UC,r.toString()],0]];return P(FC,n,o)}function z(t){return P(Vx,t[1],[0,[0,Wx,t[2].toString()],[0,[0,Hx,z6],[0,[0,Jx,!1],0]]])}function K(t){var e=t[2],r=e[3],a=0===r[0]?G(r[1]):Q(r[1]),n=[0,[0,Ux,O(xt,e[9])],0],s=[0,[0,Dx,O(Et,e[8])],n],c=[0,[0,Fx,!!e[7]],s],i=[0,[0,Mx,O(jt,e[6])],c],u=[0,[0,Bx,a],[0,[0,jx,!!e[4]],[0,[0,Xx,!!e[5]],i]]],f=[0,[0,qx,ft(e[2])],u],o=[0,[0,Gx,O(z,e[1])],f];return P(Yx,t[1],o)}function Q(t){var e=t[2],r=t[1];if("number"==typeof e)return P(0===e?vS:lS,r,0);switch(e[0]){case 0:var a=e[1][1];return P(kS,r,[0,[0,bS,N(function(t){return O(bt,t)},a)],0]);case 1:var n=e[1],s=n[3],c=0===s[0]?G(s[1]):Q(s[1]),i=[0,[0,dS,O(xt,n[9])],0],u=[0,[0,hS,O(Et,n[8])],i],f=[0,[0,pS,!!n[7]],u],o=[0,[0,mS,O(jt,n[6])],f],v=[0,[0,gS,c],[0,[0,yS,!!n[4]],[0,[0,wS,!!n[5]],o]]],l=[0,[0,_S,ft(n[2])],v];return P(SS,r,[0,[0,TS,O(z,n[1])],l]);case 2:var b=e[1];switch(b[1]){case 0:var k=ES;break;case 1:k=xS;break;case 2:k=AS;break;case 3:k=IS;break;case 4:k=CS;break;case 5:k=NS;break;case 6:k=OS;break;case 7:k=RS;break;case 8:k=LS;break;case 9:k=PS;break;case 10:k=US;break;case 11:k=DS;break;default:k=FS}var d=[0,[0,MS,Q(b[3])],0],h=[0,[0,XS,ut(b[2])],d];return P(BS,r,[0,[0,jS,k.toString()],h]);case 3:var p=e[1];switch(p[1]){case 0:var m=qS;break;case 1:m=GS;break;case 2:m=YS;break;case 3:m=JS;break;case 4:m=HS;break;case 5:m=WS;break;case 6:m=VS;break;case 7:m=zS;break;case 8:m=KS;break;case 9:m=QS;break;case 10:m=$S;break;case 11:m=ZS;break;case 12:m=tE;break;case 13:m=eE;break;case 14:m=rE;break;case 15:m=aE;break;case 16:m=nE;break;case 17:m=sE;break;case 18:m=cE;break;case 19:m=iE;break;case 20:m=uE;break;default:m=fE}var w=[0,[0,oE,Q(p[3])],0],y=[0,[0,vE,Q(p[2])],w];return P(bE,r,[0,[0,lE,m.toString()],y]);case 4:var g=e[1],_=[0,[0,kE,!!g[3]],0],T=[0,[0,dE,N(bt,g[2])],_];return P(pE,r,[0,[0,hE,Q(g[1])],T]);case 5:var S=e[1],E=[0,[0,KA,N(Q,S[7])],0],x=[0,[0,QA,N(nt,S[6])],E],A=[0,[0,$A,O(It,S[5])],x],I=[0,[0,ZA,O(xt,S[4])],A],C=[0,[0,tI,O(Q,S[3])],I],R=[0,[0,eI,st(S[2])],C];return P(aI,r,[0,[0,rI,O(z,S[1])],R]);case 6:var L=e[1],U=[0,[0,mE,O(Q,L[2])],0];return P(yE,r,[0,[0,wE,N(kt,L[1])],U]);case 7:var D=e[1],F=[0,[0,gE,Q(D[3])],0],M=[0,[0,_E,Q(D[2])],F];return P(SE,r,[0,[0,TE,Q(D[1])],M]);case 8:return K([0,r,e[1]]);case 9:var X=e[1],j=[0,[0,EE,O(Q,X[2])],0];return P(AE,r,[0,[0,xE,N(kt,X[1])],j]);case 10:return z(e[1]);case 11:var B=e[1],q=[0,[0,IE,N(Q,[0,B,0])],0];return P(OE,r,[0,[0,NE,P(CE,p4(r,B[1]),0)],q]);case 12:return H([0,r,e[1]]);case 13:return J([0,r,e[1]]);case 14:return V([0,r,e[1]]);case 15:var Y=e[1],Z=0===Y[1]?LE:RE,tt=[0,[0,PE,Q(Y[3])],0],et=[0,[0,UE,Q(Y[2])],tt];return P(FE,r,[0,[0,DE,Z.toString()],et]);case 16:var rt=e[1],at=rt[2];switch(at[0]){case 0:var ct=z(at[1]);break;case 1:ct=$(at[1]);break;default:ct=Q(at[1])}var it=[0,[0,jE,ct],[0,[0,XE,!!rt[3]],[0,[0,ME,!!rt[4]],0]]];return P(qE,r,[0,[0,BE,Q(rt[1])],it]);case 17:var ot=e[1],lt=[0,[0,GE,z(ot[2])],0];return P(JE,r,[0,[0,YE,z(ot[1])],lt]);case 18:var dt=e[1],ht=[0,[0,HE,N(bt,dt[2])],0];return P(VE,r,[0,[0,WE,Q(dt[1])],ht]);case 19:return P(KE,r,[0,[0,zE,N(vt,e[1][1])],0]);case 20:return P($E,r,[0,[0,QE,N(Q,e[1][1])],0]);case 21:var pt=e[1],mt=[0,[0,zC,W(pt[2])],0];return P(QC,r,[0,[0,KC,Q(pt[1])],mt]);case 22:return W([0,r,e[1]]);case 23:var wt=e[1],yt=[0,[0,ZE,Et(wt[2])],0];return P(ex,r,[0,[0,tx,Q(wt[1])],yt]);case 24:var gt=e[1];if(7<=gt[1])return P(ax,r,[0,[0,rx,Q(gt[3])],0]);switch(gt[1]){case 0:var _t=nx;break;case 1:_t=sx;break;case 2:_t=cx;break;case 3:_t=ix;break;case 4:_t=ux;break;case 5:_t=fx;break;case 6:_t=ox;break;default:_t=m2(vx)}var Tt=[0,[0,lx,Q(gt[3])],0];return P(dx,r,[0,[0,kx,_t.toString()],[0,[0,bx,!!gt[2]],Tt]]);case 25:var St=e[1],At=0===St[1]?px:hx,Ct=[0,[0,mx,!!St[3]],0],Nt=[0,[0,wx,Q(St[2])],Ct];return P(gx,r,[0,[0,yx,At.toString()],Nt]);default:var Ot=e[1],Rt=[0,[0,_x,!!Ot[2]],0];return P(Sx,r,[0,[0,Tx,O(Q,Ot[1])],Rt])}}function $(t){var e=[0,[0,zx,z(t[2])],0];return P(Kx,t[1],e)}function Z(t,e){var r=[0,[0,Qx,!!e[3]],0],a=[0,[0,$x,O(Et,e[2])],r];return P(tA,t,[0,[0,Zx,e[1][2].toString()],a])}function tt(t){var e=t[2],r=[0,[0,eA,N(Y,e[2])],0],a=[0,[0,rA,O(Q,e[1])],r];return P(aA,t[1],a)}function et(t){var e=t[2],r=[0,[0,nA,G(e[2])],0],a=[0,[0,sA,ut(e[1])],r];return P(cA,t[1],a)}function rt(t){return 0===t?EA:SA}function at(t){if(t){var e=t[1];if(0===e[0])return N(Xt,e[1]);var r=e[2];if(r){var a=[0,[0,xA,z(r[1])],0];return d9([0,P(AA,e[1],a),0])}return d9(0)}return d9(0)}function nt(t){var e=t[2],r=[0,[0,nI,O(It,e[2])],0],a=[0,[0,sI,z(e[1])],r];return P(cI,t[1],a)}function st(t){var e=[0,[0,iI,N(ct,t[2][1])],0];return P(uI,t[1],e)}function ct(t){switch(t[0]){case 0:var e=t[1],r=e[2],a=r[2];switch(a[0]){case 0:var n=[0,V(a[1]),0];break;case 1:n=[0,z(a[1]),0];break;case 2:n=[0,$(a[1]),0];break;default:n=[0,Q(a[1]),1]}switch(r[1]){case 0:var s=fI;break;case 1:s=oI;break;case 2:s=vI;break;default:s=lI}var c=[0,[0,bI,N(Q,r[5])],0],i=[0,[0,hI,s.toString()],[0,[0,dI,!!r[4]],[0,[0,kI,!!n[2]],c]]],u=[0,[0,pI,K(r[3])],i];return P(wI,e[1],[0,[0,mI,n[1]],u]);case 1:var f=t[1],o=f[2],v=o[1];switch(v[0]){case 0:var l=[0,V(v[1]),0];break;case 1:l=[0,z(v[1]),0];break;case 2:l=m2(xI);break;default:l=[0,Q(v[1]),1]}var b=[0,[0,AI,O(mt,o[5])],0],k=[0,[0,CI,!!l[2]],[0,[0,II,!!o[4]],b]],d=[0,[0,NI,O(Et,o[3])],k],h=[0,[0,OI,O(Q,o[2])],d];return P(LI,f[1],[0,[0,RI,l[1]],h]);default:var p=t[1],m=p[2],w=m[1],y=[0,[0,yI,O(mt,m[5])],0],g=[0,[0,gI,!!m[4]],y],_=[0,[0,_I,O(Et,m[3])],g],T=[0,[0,TI,O(Q,m[2])],_],S=[0,[0,SI,z(w[2])],T];return P(EI,p[1],S)}}function it(t){var e=t[2],r=e[1],a=0===r[0]?z(r[1]):St(r[1]),n=[0,[0,jI,a],[0,[0,XI,O(It,e[2])],0]];return P(BI,t[1],n)}function ut(t){var e=t[2],r=t[1];switch(e[0]){case 0:var a=e[1],n=[0,[0,qI,O(Et,a[2])],0];return P(YI,r,[0,[0,GI,N(lt,a[1])],n]);case 1:var s=e[1],c=[0,[0,JI,O(Et,s[2])],0],i=s[1];return P(WI,r,[0,[0,HI,N(function(t){return O(ot,t)},i)],c]);case 2:var u=e[1],f=[0,[0,VI,Q(u[2])],0];return P(KI,r,[0,[0,zI,ut(u[1])],f]);case 3:return Z(r,e[1]);default:return Q(e[1])}}function ft(t){var e=t[2],r=e[2],a=e[1];if(r){var n=r[1],s=[0,[0,QI,ut(n[2][1])],0],c=P($I,n[1],s);return d9(N2([0,c,N2(O2(ut,a))]))}return N(ut,a)}function ot(t){if(0===t[0])return ut(t[1]);var e=t[1],r=[0,[0,ZI,ut(e[2][1])],0];return P(tC,e[1],r)}function vt(t){if(0===t[0]){var e=t[1],r=e[2];switch(r[0]){case 0:var a=r[3],n=Q(r[2]),s=[0,r[1],n,eC,0,a];break;case 1:var c=r[2],i=K([0,c[1],c[2]]);s=[0,r[1],i,rC,1,0];break;case 2:var u=r[2],f=K([0,u[1],u[2]]);s=[0,r[1],f,aC,0,0];break;default:var o=r[2],v=K([0,o[1],o[2]]);s=[0,r[1],v,nC,0,0]}var l=s[1];switch(l[0]){case 0:var b=[0,V(l[1]),0];break;case 1:b=[0,z(l[1]),0];break;case 2:b=m2(sC);break;default:b=[0,Q(l[1]),1]}return P(lC,e[1],[0,[0,vC,b[1]],[0,[0,oC,s[2]],[0,[0,fC,s[3].toString()],[0,[0,uC,!!s[4]],[0,[0,iC,!!s[5]],[0,[0,cC,!!b[2]],0]]]]]])}var k=t[1],d=[0,[0,bC,Q(k[2][1])],0];return P(kC,k[1],d)}function lt(t){if(0===t[0]){var e=t[1],r=e[2],a=r[1];switch(a[0]){case 0:var n=[0,V(a[1]),0];break;case 1:n=[0,z(a[1]),0];break;default:n=[0,Q(a[1]),1]}var s=[0,[0,mC,ks],[0,[0,pC,!1],[0,[0,hC,!!r[3]],[0,[0,dC,!!n[2]],0]]]],c=[0,[0,wC,ut(r[2])],s];return P(gC,e[1],[0,[0,yC,n[1]],c])}var i=t[1],u=[0,[0,_C,ut(i[2][1])],0];return P(TC,i[1],u)}function bt(t){if(0===t[0])return Q(t[1]);var e=t[1],r=[0,[0,SC,Q(e[2][1])],0];return P(EC,e[1],r)}function kt(t){var e=t[2],r=[0,[0,xC,!!e[3]],0],a=[0,[0,AC,Q(e[2])],r],n=[0,[0,IC,ut(e[1])],a];return P(CC,t[1],n)}function dt(t){var e=t[2];return P(jC,t[1],[0,[0,XC,e[1].toString()],[0,[0,MC,e[2].toString()],0]])}function ht(t){var e=t[2],r=k9([0,[0,JC,e[1][1].toString()],[0,[0,YC,e[1][2].toString()],0]]);return P(VC,t[1],[0,[0,WC,r],[0,[0,HC,!!e[2]],0]])}function pt(t){var e=t[2],r=[0,[0,nN,O(Q,e[2])],0],a=[0,[0,sN,ut(e[1])],r];return P(cN,t[1],a)}function mt(t){var e=0===t[2]?"plus":Rc;return P(uN,t[1],[0,[0,iN,e],0])}function wt(t){var e=t[2],r=e[2],a=L2(function(t,e){var r=t[3],a=t[2],n=t[1];switch(e[0]){case 0:var s=e[1],c=s[2],i=c[2],u=c[1];switch(u[0]){case 0:var f=V(u[1]);break;case 1:f=z(u[1]);break;case 2:f=m2(PN);break;default:f=m2(UN)}switch(i[0]){case 0:var o=[0,gt(i[1]),DN];break;case 1:var v=i[1];o=[0,yt([0,v[1],v[2]]),FN];break;default:var l=i[1];o=[0,yt([0,l[1],l[2]]),MN]}var b=[0,[0,XN,o[2].toString()],0],k=[0,[0,jN,O(mt,c[6])],b];return[0,[0,P(HN,s[1],[0,[0,JN,f],[0,[0,YN,o[1]],[0,[0,GN,!!c[5]],[0,[0,qN,!!c[3]],[0,[0,BN,!!c[4]],k]]]]]),n],a,r];case 1:var d=e[1],h=[0,[0,WN,gt(d[2][1])],0];return[0,[0,P(VN,d[1],h),n],a,r];case 2:var p=e[1],m=p[2],w=[0,[0,zN,O(mt,m[5])],0],y=[0,[0,KN,!!m[4]],w],g=[0,[0,QN,gt(m[3])],y],_=[0,[0,$N,gt(m[2])],g],T=[0,[0,ZN,O(z,m[1])],_];return[0,n,[0,P(tO,p[1],T),a],r];default:var S=e[1],E=S[2],x=[0,[0,eO,!!E[2]],0],A=[0,[0,rO,yt(E[1])],x];return[0,n,a,[0,P(aO,S[1],A),r]]}},IN,r),n=[0,[0,CN,d9(N2(a[3]))],0],s=[0,[0,NN,d9(N2(a[2]))],n],c=[0,[0,ON,d9(N2(a[1]))],s];return P(LN,t[1],[0,[0,RN,!!e[1]],c])}function yt(t){var e=t[2],r=e[1][2],a=[0,[0,wN,O(xt,e[3])],0],n=[0,[0,yN,O(Tt,r[2])],a],s=[0,[0,gN,gt(e[2])],n],c=[0,[0,_N,N(_t,r[1])],s];return P(TN,t[1],c)}function gt(t){var e=t[2],r=t[1];if("number"==typeof e)switch(e){case 0:return P(fN,r,0);case 1:return P(oN,r,0);case 2:return P(vN,r,0);case 3:return P(lN,r,0);case 4:return P(bN,r,0);case 5:return P(kN,r,0);case 6:return P(dN,r,0);case 7:return P(hN,r,0);default:return P(OO,r,0)}else switch(e[0]){case 0:return P(mN,r,[0,[0,pN,gt(e[1])],0]);case 1:return yt([0,r,e[1]]);case 2:return wt([0,r,e[1]]);case 3:return P(sO,r,[0,[0,nO,gt(e[1])],0]);case 4:var a=e[1],n=a[1],s=0===n[0]?z(n[1]):St(n[1]);return P(vO,r,[0,[0,oO,s],[0,[0,fO,O(It,a[2])],0]]);case 5:return P(bO,r,[0,[0,lO,N(gt,[0,e[1],[0,e[2],e[3]]])],0]);case 6:return P(dO,r,[0,[0,kO,N(gt,[0,e[1],[0,e[2],e[3]]])],0]);case 7:return P(pO,r,[0,[0,hO,gt(e[1])],0]);case 8:return P(wO,r,[0,[0,mO,N(gt,e[1])],0]);case 9:var c=e[1];return P(_O,r,[0,[0,gO,c[1].toString()],[0,[0,yO,c[2].toString()],0]]);case 10:var i=e[1];return P(EO,r,[0,[0,SO,i[1]],[0,[0,TO,i[2].toString()],0]]);default:var u=e[1];return P(NO,r,[0,[0,CO,!!u],[0,[0,IO,(u?xO:AO).toString()],0]])}}function _t(t){var e=t[2],r=[0,[0,SN,!!e[3]],0],a=[0,[0,EN,gt(e[2])],r],n=[0,[0,xN,O(z,e[1])],a];return P(AN,t[1],n)}function Tt(t){return _t(t[2][1])}function St(t){var e=t[2],r=e[1],a=0===r[0]?z(r[1]):St(r[1]),n=[0,[0,iO,a],[0,[0,cO,z(e[2])],0]];return P(uO,t[1],n)}function Et(t){var e=[0,[0,RO,gt(t[2])],0];return P(LO,t[1],e)}function xt(t){var e=[0,[0,PO,N(At,t[2][1])],0];return P(UO,t[1],e)}function At(t){var e=t[2],r=[0,[0,DO,O(gt,e[4])],0],a=[0,[0,FO,O(mt,e[3])],r],n=[0,[0,MO,O(Et,e[2])],a];return P(jO,t[1],[0,[0,XO,e[1][2].toString()],n])}function It(t){var e=[0,[0,BO,N(gt,t[2][1])],0];return P(qO,t[1],e)}function Ct(t){if(0===t[0]){var e=t[1],r=e[2],a=r[1],n=0===a[0]?Pt(a[1]):Ut(a[1]),s=[0,[0,uR,n],[0,[0,iR,O(Mt,r[2])],0]];return P(fR,e[1],s)}var c=t[1],i=[0,[0,oR,Q(c[2][1])],0];return P(vR,c[1],i)}function Nt(t){var e=[0,[0,rR,Ft(t[2][1])],0];return P(aR,t[1],e)}function Ot(t){return P(nR,t,0)}function Rt(t){var e=t[2][1],r=0===e[0]?Q(e[1]):P(lR,e[1],0);return P(kR,t[1],[0,[0,bR,r],0])}function Lt(t){var e=t[2],r=t[1];switch(e[0]){case 0:return H([0,r,e[1]]);case 1:return J([0,r,e[1]]);case 2:return Rt([0,r,e[1]]);case 3:return P(cR,r,[0,[0,sR,Q(e[1])],0]);default:var a=e[1];return P(pR,r,[0,[0,hR,a[1].toString()],[0,[0,dR,a[2].toString()],0]])}}function Pt(t){return P(ER,t[1],[0,[0,SR,t[2][1].toString()],0])}function Ut(t){var e=t[2],r=[0,[0,gR,Pt(e[2])],0],a=[0,[0,_R,Pt(e[1])],r];return P(TR,t[1],a)}function Dt(t){var e=t[2],r=e[1],a=0===r[0]?Pt(r[1]):Dt(r[1]),n=[0,[0,wR,a],[0,[0,mR,Pt(e[2])],0]];return P(yR,t[1],n)}function Ft(t){switch(t[0]){case 0:return Pt(t[1]);case 1:return Ut(t[1]);default:return Dt(t[1])}}function Mt(t){return 0===t[0]?V([0,t[1],t[2]]):Rt([0,t[1],t[2]])}function Xt(t){var e=t[2],r=e[2],a=z(r?r[1]:e[1]),n=[0,[0,AR,z(e[1])],[0,[0,xR,a],0]];return P(IR,t[1],n)}function jt(t){var e=t[2];if(e)var r=BR,a=[0,[0,jR,Q(e[1])],0];else r=qR,a=0;return P(r,t[1],a)}l9[1]=0;var Bt=U(A[2]),qt=[0,[0,U_,Bt],[0,[0,P_,N(function(t){var e=t[2],r=0===e[0]?[0,FR,e[1]]:[0,MR,e[1]];return P(r[1],t[1],[0,[0,XR,r[2].toString()],0])},A[3])],0]],Gt=P(D_,A[1],qt),Yt=T2(C,l9[1]);return Gt.errors=N(function(t){var e=t[2];if("number"==typeof e){var r=e;if(47<=r)switch(r){case 47:var a=vg;break;case 48:a=lg;break;case 49:a=bg;break;case 50:a=kg;break;case 51:a=_2(hg,dg);break;case 52:a=_2(mg,pg);break;case 53:a=_2(yg,wg);break;case 54:a=gg;break;case 55:a=_g;break;case 56:a=Tg;break;case 57:a=Sg;break;case 58:a=Eg;break;case 59:a=xg;break;case 60:a=Ag;break;case 61:a=Ig;break;case 62:a=Cg;break;case 63:a=Ng;break;case 64:a=Og;break;case 65:a=Rg;break;case 66:a=Lg;break;case 67:a=Pg;break;case 68:a=Ug;break;case 69:a=Dg;break;case 70:a=Fg;break;case 71:a=Mg;break;case 72:a=_2(jg,Xg);break;case 73:a=Bg;break;case 74:a=qg;break;case 75:a=Gg;break;case 76:a=Yg;break;case 77:a=Jg;break;case 78:a=Hg;break;case 79:a=Wg;break;case 80:a=Vg;break;case 81:a=zg;break;case 82:a=Kg;break;case 83:a=Qg;break;case 84:a=$g;break;case 85:a=_2(t_,Zg);break;case 86:a=e_;break;case 87:a=r_;break;case 88:a=a_;break;case 89:a=n_;break;case 90:a=s_;break;case 91:a=c_;break;default:a=i_}else switch(r){case 0:a=py;break;case 1:a=my;break;case 2:a=wy;break;case 3:a=yy;break;case 4:a=gy;break;case 5:a=_y;break;case 6:a=Ty;break;case 7:a=Sy;break;case 8:a=Ey;break;case 9:a=xy;break;case 10:a=Ay;break;case 11:a=Iy;break;case 12:a=Cy;break;case 13:a=Ny;break;case 14:a=Oy;break;case 15:a=Ry;break;case 16:a=Ly;break;case 17:a=Py;break;case 18:a=Uy;break;case 19:a=Dy;break;case 20:a=Fy;break;case 21:a=My;break;case 22:a=Xy;break;case 23:a=jy;break;case 24:a=_2(qy,By);break;case 25:a=Gy;break;case 26:a=Yy;break;case 27:a=Jy;break;case 28:a=Hy;break;case 29:a=Wy;break;case 30:a=Vy;break;case 31:a=zy;break;case 32:a=Ky;break;case 33:a=Qy;break;case 34:a=$y;break;case 35:a=Zy;break;case 36:a=tg;break;case 37:a=eg;break;case 38:a=rg;break;case 39:a=ag;break;case 40:a=ng;break;case 41:a=sg;break;case 42:a=cg;break;case 43:a=ig;break;case 44:a=ug;break;case 45:a=fg;break;default:a=og}}else switch(e[0]){case 0:a=_2(u_,e[1]);break;case 1:a=_2(f_,e[1]);break;case 2:var n=e[2],s=e[1];a=$d(F3(o_),s,n);break;case 3:a=_2(l_,_2(e[1],v_));break;case 4:a=_2(k_,_2(e[1],b_));break;case 5:var c=_2(h_,_2(e[2],d_));a=_2(e[1],c);break;case 6:a=_2(p_,e[1]);break;case 7:a=e[1]?_2(w_,m_):_2(g_,y_);break;case 8:var i=e[1];a=Qd(F3(__),i);break;case 9:a=_2(S_,_2(e[1],T_));break;case 10:var u=e[1],f=e[2]?E_:x_,o=e[3]?_2(A_,u):u;a=_2(N_,_2(f,_2(C_,_2(o,I_))));break;default:a=_2(R_,_2(e[1],O_))}var v=[0,[0,GR,a.toString()],0];return k9([0,[0,YR,L(t[1])],v])},Yt),Gt},m9=function(t){if(t[1]===$6)return Qd(t4,t[2]);return Qd(t4,new Z6(_2(d2,function(e){for(var r=e;;){if(!r){if(t===rh)return Qm;if(t===ih)return $m;if(t[1]===ch){var a=t[2],n=a[3],s=a[2],c=a[1];return eh(F3(oh),c,s,n,n+5|0,Zm)}if(t[1]===uh){var i=t[2],u=i[3],f=i[2],o=i[1];return eh(F3(oh),o,f,u,u+6|0,tw)}if(t[1]===fh){var v=t[2],l=v[3],b=v[2],k=v[1];return eh(F3(oh),k,b,l,l+6|0,ew)}return 0===jd(t)?_2(t[1][1],j3(t)):t[1]}var d=r[2],h=r[1];try{var p=Qd(h,t)}catch(t){p=0}if(p)return p[1];r=d}}(M3[1])).toString()))};return e.parse=function(t,e){try{return p9(t,e)}catch(e){return e=Kd(e),m9(e)}},void Qd(x2[1],0)}q6=G6}else j6=B6}else M6=X6}else D6=F6}}(function(){return this}())});function parse(t){"use strict";const e=flow_parser.parse(t,{esproposal_class_instance_fields:!0,esproposal_class_static_fields:!0,esproposal_export_star_as:!0,esproposal_optional_chaining:!0});if(e.errors.length>0){const t=e.errors[0].loc;throw parserCreateError(e.errors[0].message,{start:{line:t.start.line,column:t.start.column+1},end:{line:t.end.line,column:t.end.column+1}})}return parserIncludeShebang(t,e),e}var parserFlow=parse;module.exports=parserFlow; diff --git a/Colorui-UniApp/node_modules/prettier/parser-glimmer.js b/Colorui-UniApp/node_modules/prettier/parser-glimmer.js new file mode 100644 index 0000000..3aa1f71 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/parser-glimmer.js @@ -0,0 +1,1946 @@ +"use strict"; + +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" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +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); } } + +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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _interopDefault(t) { + return t && "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) && "default" in t ? t.default : t; +}var fs = _interopDefault(require("fs"));function createError(t, e) { + var r = new SyntaxError(t + " (" + e.start.line + ":" + e.start.column + ")");return r.loc = e, r; +}var parserCreateError = createError;function isCall(t) { + return "SubExpression" === t.type || "MustacheStatement" === t.type && "PathExpression" === t.path.type; +}function isLiteral(t) { + return !("object" != (typeof t === "undefined" ? "undefined" : _typeof(t)) || !t.type.match(/Literal$/)); +}var nodes = Object.freeze({ isCall: isCall, isLiteral: isLiteral });function buildMustache(t, e, r, a, i) { + return isLiteral(t) || (t = buildPath(t)), { type: "MustacheStatement", path: t, params: e || [], hash: r || buildHash([]), escaped: !a, loc: buildLoc(i || null) }; +}function buildBlock(t, e, r, a, i, n) { + return { type: "BlockStatement", path: buildPath(t), params: e || [], hash: r || buildHash([]), program: a || null, inverse: i || null, loc: buildLoc(n || null) }; +}function buildElementModifier(t, e, r, a) { + return { type: "ElementModifierStatement", path: buildPath(t), params: e || [], hash: r || buildHash([]), loc: buildLoc(a || null) }; +}function buildPartial(t, e, r, a, i) { + return { type: "PartialStatement", name: t, params: e || [], hash: r || buildHash([]), indent: a || "", strip: { open: !1, close: !1 }, loc: buildLoc(i || null) }; +}function buildComment(t, e) { + return { type: "CommentStatement", value: t, loc: buildLoc(e || null) }; +}function buildMustacheComment(t, e) { + return { type: "MustacheCommentStatement", value: t, loc: buildLoc(e || null) }; +}function buildConcat(t, e) { + return { type: "ConcatStatement", parts: t || [], loc: buildLoc(e || null) }; +}function buildElement(t, e, r, a, i, n) { + return Array.isArray(i) || (n = i, i = []), { type: "ElementNode", tag: t || "", attributes: e || [], blockParams: [], modifiers: r || [], comments: i || [], children: a || [], loc: buildLoc(n || null) }; +}function buildAttr(t, e, r) { + return { type: "AttrNode", name: t, value: e, loc: buildLoc(r || null) }; +}function buildText(t, e) { + return { type: "TextNode", chars: t || "", loc: buildLoc(e || null) }; +}function buildSexpr(t, e, r, a) { + return { type: "SubExpression", path: buildPath(t), params: e || [], hash: r || buildHash([]), loc: buildLoc(a || null) }; +}function buildPath(t, e) { + if ("string" != typeof t) return t;var r = t.split("."), + a = !1;return "this" === r[0] && (a = !0, r = r.slice(1)), { type: "PathExpression", original: t, this: a, parts: r, data: !1, loc: buildLoc(e || null) }; +}function buildLiteral(t, e, r) { + return { type: t, value: e, original: e, loc: buildLoc(r || null) }; +}function buildHash(t, e) { + return { type: "Hash", pairs: t || [], loc: buildLoc(e || null) }; +}function buildPair(t, e, r) { + return { type: "HashPair", key: t, value: e, loc: buildLoc(r || null) }; +}function buildProgram(t, e, r) { + return { type: "Program", body: t || [], blockParams: e || [], loc: buildLoc(r || null) }; +}function buildSource(t) { + return t || null; +}function buildPosition(t, e) { + return { line: t, column: e }; +}var SYNTHETIC = { source: "(synthetic)", start: { line: 1, column: 0 }, end: { line: 1, column: 0 } };function buildLoc() { + for (var _len = arguments.length, t = Array(_len), _key = 0; _key < _len; _key++) { + t[_key] = arguments[_key]; + } + + if (1 === t.length) { + var e = t[0];return e && "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) ? { source: buildSource(e.source), start: buildPosition(e.start.line, e.start.column), end: buildPosition(e.end.line, e.end.column) } : SYNTHETIC; + }{ + var _e = t[0], + r = t[1], + a = t[2], + i = t[3], + n = t[4]; + return { source: buildSource(n), start: buildPosition(_e, r), end: buildPosition(a, i) }; + } +}var b = { mustache: buildMustache, block: buildBlock, partial: buildPartial, comment: buildComment, mustacheComment: buildMustacheComment, element: buildElement, elementModifier: buildElementModifier, attr: buildAttr, text: buildText, sexpr: buildSexpr, path: buildPath, concat: buildConcat, hash: buildHash, pair: buildPair, literal: buildLiteral, program: buildProgram, loc: buildLoc, pos: buildPosition, string: literal("StringLiteral"), boolean: literal("BooleanLiteral"), number: literal("NumberLiteral"), undefined: function undefined() { + return buildLiteral("UndefinedLiteral", void 0); + }, null: function _null() { + return buildLiteral("NullLiteral", null); + } };function literal(t) { + return function (e) { + return buildLiteral(t, e); + }; +}var SyntaxError$1 = function () { + function t(t, e) { + var r = Error.call(this, t);this.message = t, this.stack = r.stack, this.location = e; + }return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t; +}();var ID_INVERSE_PATTERN = /[!"#%-,\.\/;->@\[-\^`\{-~]/;function parseElementBlockParams(t) { + var e = parseBlockParams(t);e && (t.blockParams = e); +}function parseBlockParams(t) { + var e = t.attributes.length, + r = [];for (var _a = 0; _a < e; _a++) { + r.push(t.attributes[_a].name); + }var a = r.indexOf("as");if (-1 !== a && e > a && "|" === r[a + 1].charAt(0)) { + var i = r.slice(a).join(" ");if ("|" !== i.charAt(i.length - 1) || 2 !== i.match(/\|/g).length) throw new SyntaxError$1("Invalid block parameters syntax: '" + i + "'", t.loc);var n = [];for (var s = a + 1; s < e; s++) { + var _e2 = r[s].replace(/\|/g, "");if ("" !== _e2) { + if (ID_INVERSE_PATTERN.test(_e2)) throw new SyntaxError$1("Invalid identifier for block parameters: '" + _e2 + "' in '" + i + "'", t.loc);n.push(_e2); + } + }if (0 === n.length) throw new SyntaxError$1("Cannot use zero block parameters: '" + i + "'", t.loc);return t.attributes = t.attributes.slice(0, a), n; + }return null; +}function childrenFor(t) { + switch (t.type) {case "Program": + return t.body;case "ElementNode": + return t.children;} +}function appendChild(t, e) { + childrenFor(t).push(e); +}function isLiteral$1(t) { + return "StringLiteral" === t.type || "BooleanLiteral" === t.type || "NumberLiteral" === t.type || "NullLiteral" === t.type || "UndefinedLiteral" === t.type; +}function printLiteral(t) { + return "UndefinedLiteral" === t.type ? "undefined" : JSON.stringify(t.value); +}var namedCharRefs = { Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳", Acirc: "Â", acirc: "â", acute: "´", Acy: "А", acy: "а", AElig: "Æ", aelig: "æ", af: "⁡", Afr: "𝔄", afr: "𝔞", Agrave: "À", agrave: "à", alefsym: "ℵ", aleph: "ℵ", Alpha: "Α", alpha: "α", Amacr: "Ā", amacr: "ā", amalg: "⨿", AMP: "&", amp: "&", And: "⩓", and: "∧", andand: "⩕", andd: "⩜", andslope: "⩘", andv: "⩚", ang: "∠", ange: "⦤", angle: "∠", angmsd: "∡", angmsdaa: "⦨", angmsdab: "⦩", angmsdac: "⦪", angmsdad: "⦫", angmsdae: "⦬", angmsdaf: "⦭", angmsdag: "⦮", angmsdah: "⦯", angrt: "∟", angrtvb: "⊾", angrtvbd: "⦝", angsph: "∢", angst: "Å", angzarr: "⍼", Aogon: "Ą", aogon: "ą", Aopf: "𝔸", aopf: "𝕒", ap: "≈", apacir: "⩯", apE: "⩰", ape: "≊", apid: "≋", apos: "'", ApplyFunction: "⁡", approx: "≈", approxeq: "≊", Aring: "Å", aring: "å", Ascr: "𝒜", ascr: "𝒶", Assign: "≔", ast: "*", asymp: "≈", asympeq: "≍", Atilde: "Ã", atilde: "ã", Auml: "Ä", auml: "ä", awconint: "∳", awint: "⨑", backcong: "≌", backepsilon: "϶", backprime: "‵", backsim: "∽", backsimeq: "⋍", Backslash: "∖", Barv: "⫧", barvee: "⊽", Barwed: "⌆", barwed: "⌅", barwedge: "⌅", bbrk: "⎵", bbrktbrk: "⎶", bcong: "≌", Bcy: "Б", bcy: "б", bdquo: "„", becaus: "∵", Because: "∵", because: "∵", bemptyv: "⦰", bepsi: "϶", bernou: "ℬ", Bernoullis: "ℬ", Beta: "Β", beta: "β", beth: "ℶ", between: "≬", Bfr: "𝔅", 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: "⫭", bnot: "⌐", Bopf: "𝔹", bopf: "𝕓", bot: "⊥", bottom: "⊥", bowtie: "⋈", boxbox: "⧉", boxDL: "╗", boxDl: "╖", boxdL: "╕", boxdl: "┐", boxDR: "╔", boxDr: "╓", boxdR: "╒", boxdr: "┌", boxH: "═", boxh: "─", boxHD: "╦", boxHd: "╤", boxhD: "╥", boxhd: "┬", boxHU: "╩", boxHu: "╧", boxhU: "╨", boxhu: "┴", boxminus: "⊟", boxplus: "⊞", boxtimes: "⊠", boxUL: "╝", boxUl: "╜", boxuL: "╛", boxul: "┘", boxUR: "╚", boxUr: "╙", boxuR: "╘", boxur: "└", boxV: "║", boxv: "│", boxVH: "╬", boxVh: "╫", boxvH: "╪", boxvh: "┼", boxVL: "╣", boxVl: "╢", boxvL: "╡", boxvl: "┤", boxVR: "╠", boxVr: "╟", boxvR: "╞", boxvr: "├", bprime: "‵", Breve: "˘", breve: "˘", brvbar: "¦", Bscr: "ℬ", bscr: "𝒷", bsemi: "⁏", bsim: "∽", bsime: "⋍", bsol: "\\", bsolb: "⧅", bsolhsub: "⟈", bull: "•", bullet: "•", bump: "≎", bumpE: "⪮", bumpe: "≏", Bumpeq: "≎", bumpeq: "≏", Cacute: "Ć", cacute: "ć", Cap: "⋒", cap: "∩", capand: "⩄", capbrcup: "⩉", capcap: "⩋", capcup: "⩇", capdot: "⩀", CapitalDifferentialD: "ⅅ", caps: "∩︀", caret: "⁁", caron: "ˇ", Cayleys: "ℭ", ccaps: "⩍", Ccaron: "Č", ccaron: "č", Ccedil: "Ç", ccedil: "ç", Ccirc: "Ĉ", ccirc: "ĉ", Cconint: "∰", ccups: "⩌", ccupssm: "⩐", Cdot: "Ċ", cdot: "ċ", cedil: "¸", Cedilla: "¸", cemptyv: "⦲", cent: "¢", CenterDot: "·", centerdot: "·", Cfr: "ℭ", cfr: "𝔠", CHcy: "Ч", chcy: "ч", check: "✓", checkmark: "✓", Chi: "Χ", chi: "χ", cir: "○", circ: "ˆ", circeq: "≗", circlearrowleft: "↺", circlearrowright: "↻", circledast: "⊛", circledcirc: "⊚", circleddash: "⊝", CircleDot: "⊙", circledR: "®", circledS: "Ⓢ", CircleMinus: "⊖", CirclePlus: "⊕", CircleTimes: "⊗", cirE: "⧃", cire: "≗", cirfnint: "⨐", cirmid: "⫯", cirscir: "⧂", ClockwiseContourIntegral: "∲", CloseCurlyDoubleQuote: "”", CloseCurlyQuote: "’", clubs: "♣", clubsuit: "♣", Colon: "∷", colon: ":", Colone: "⩴", colone: "≔", coloneq: "≔", comma: ",", commat: "@", comp: "∁", compfn: "∘", complement: "∁", complexes: "ℂ", cong: "≅", congdot: "⩭", Congruent: "≡", Conint: "∯", conint: "∮", ContourIntegral: "∮", Copf: "ℂ", copf: "𝕔", coprod: "∐", Coproduct: "∐", COPY: "©", copy: "©", copysr: "℗", CounterClockwiseContourIntegral: "∳", crarr: "↵", Cross: "⨯", cross: "✗", Cscr: "𝒞", cscr: "𝒸", csub: "⫏", csube: "⫑", csup: "⫐", csupe: "⫒", ctdot: "⋯", cudarrl: "⤸", cudarrr: "⤵", cuepr: "⋞", cuesc: "⋟", cularr: "↶", cularrp: "⤽", Cup: "⋓", cup: "∪", cupbrcap: "⩈", CupCap: "≍", cupcap: "⩆", cupcup: "⩊", cupdot: "⊍", cupor: "⩅", cups: "∪︀", curarr: "↷", curarrm: "⤼", curlyeqprec: "⋞", curlyeqsucc: "⋟", curlyvee: "⋎", curlywedge: "⋏", curren: "¤", curvearrowleft: "↶", curvearrowright: "↷", cuvee: "⋎", cuwed: "⋏", cwconint: "∲", cwint: "∱", cylcty: "⌭", Dagger: "‡", dagger: "†", daleth: "ℸ", Darr: "↡", dArr: "⇓", darr: "↓", dash: "‐", Dashv: "⫤", dashv: "⊣", dbkarow: "⤏", dblac: "˝", Dcaron: "Ď", dcaron: "ď", Dcy: "Д", dcy: "д", DD: "ⅅ", dd: "ⅆ", ddagger: "‡", ddarr: "⇊", DDotrahd: "⤑", ddotseq: "⩷", deg: "°", Del: "∇", Delta: "Δ", delta: "δ", demptyv: "⦱", dfisht: "⥿", Dfr: "𝔇", dfr: "𝔡", dHar: "⥥", dharl: "⇃", dharr: "⇂", DiacriticalAcute: "´", DiacriticalDot: "˙", DiacriticalDoubleAcute: "˝", DiacriticalGrave: "`", DiacriticalTilde: "˜", diam: "⋄", Diamond: "⋄", diamond: "⋄", diamondsuit: "♦", diams: "♦", die: "¨", DifferentialD: "ⅆ", digamma: "ϝ", disin: "⋲", div: "÷", divide: "÷", divideontimes: "⋇", divonx: "⋇", DJcy: "Ђ", djcy: "ђ", dlcorn: "⌞", dlcrop: "⌍", dollar: "$", Dopf: "𝔻", dopf: "𝕕", Dot: "¨", dot: "˙", DotDot: "⃜", doteq: "≐", doteqdot: "≑", DotEqual: "≐", dotminus: "∸", dotplus: "∔", dotsquare: "⊡", doublebarwedge: "⌆", DoubleContourIntegral: "∯", DoubleDot: "¨", DoubleDownArrow: "⇓", DoubleLeftArrow: "⇐", DoubleLeftRightArrow: "⇔", DoubleLeftTee: "⫤", DoubleLongLeftArrow: "⟸", DoubleLongLeftRightArrow: "⟺", DoubleLongRightArrow: "⟹", DoubleRightArrow: "⇒", DoubleRightTee: "⊨", DoubleUpArrow: "⇑", DoubleUpDownArrow: "⇕", DoubleVerticalBar: "∥", DownArrow: "↓", Downarrow: "⇓", downarrow: "↓", DownArrowBar: "⤓", DownArrowUpArrow: "⇵", DownBreve: "̑", downdownarrows: "⇊", downharpoonleft: "⇃", downharpoonright: "⇂", DownLeftRightVector: "⥐", DownLeftTeeVector: "⥞", DownLeftVector: "↽", DownLeftVectorBar: "⥖", DownRightTeeVector: "⥟", DownRightVector: "⇁", DownRightVectorBar: "⥗", DownTee: "⊤", DownTeeArrow: "↧", drbkarow: "⤐", drcorn: "⌟", drcrop: "⌌", Dscr: "𝒟", dscr: "𝒹", DScy: "Ѕ", dscy: "ѕ", dsol: "⧶", Dstrok: "Đ", dstrok: "đ", dtdot: "⋱", dtri: "▿", dtrif: "▾", duarr: "⇵", duhar: "⥯", dwangle: "⦦", DZcy: "Џ", dzcy: "џ", dzigrarr: "⟿", Eacute: "É", eacute: "é", easter: "⩮", Ecaron: "Ě", ecaron: "ě", ecir: "≖", Ecirc: "Ê", ecirc: "ê", ecolon: "≕", Ecy: "Э", ecy: "э", eDDot: "⩷", Edot: "Ė", eDot: "≑", edot: "ė", ee: "ⅇ", efDot: "≒", Efr: "𝔈", efr: "𝔢", eg: "⪚", Egrave: "È", egrave: "è", egs: "⪖", egsdot: "⪘", el: "⪙", Element: "∈", elinters: "⏧", ell: "ℓ", els: "⪕", elsdot: "⪗", Emacr: "Ē", emacr: "ē", empty: "∅", emptyset: "∅", EmptySmallSquare: "◻", emptyv: "∅", EmptyVerySmallSquare: "▫", emsp: " ", emsp13: " ", emsp14: " ", ENG: "Ŋ", eng: "ŋ", ensp: " ", Eogon: "Ę", eogon: "ę", Eopf: "𝔼", eopf: "𝕖", epar: "⋕", eparsl: "⧣", eplus: "⩱", epsi: "ε", Epsilon: "Ε", epsilon: "ε", epsiv: "ϵ", eqcirc: "≖", eqcolon: "≕", eqsim: "≂", eqslantgtr: "⪖", eqslantless: "⪕", Equal: "⩵", equals: "=", EqualTilde: "≂", equest: "≟", Equilibrium: "⇌", equiv: "≡", equivDD: "⩸", eqvparsl: "⧥", erarr: "⥱", erDot: "≓", Escr: "ℰ", escr: "ℯ", esdot: "≐", Esim: "⩳", esim: "≂", Eta: "Η", eta: "η", ETH: "Ð", eth: "ð", Euml: "Ë", euml: "ë", euro: "€", excl: "!", exist: "∃", Exists: "∃", expectation: "ℰ", ExponentialE: "ⅇ", exponentiale: "ⅇ", fallingdotseq: "≒", Fcy: "Ф", fcy: "ф", female: "♀", ffilig: "ffi", fflig: "ff", ffllig: "ffl", Ffr: "𝔉", ffr: "𝔣", filig: "fi", FilledSmallSquare: "◼", FilledVerySmallSquare: "▪", fjlig: "fj", flat: "♭", fllig: "fl", fltns: "▱", fnof: "ƒ", Fopf: "𝔽", fopf: "𝕗", ForAll: "∀", forall: "∀", fork: "⋔", forkv: "⫙", Fouriertrf: "ℱ", fpartint: "⨍", frac12: "½", frac13: "⅓", frac14: "¼", frac15: "⅕", frac16: "⅙", frac18: "⅛", frac23: "⅔", frac25: "⅖", frac34: "¾", frac35: "⅗", frac38: "⅜", frac45: "⅘", frac56: "⅚", frac58: "⅝", frac78: "⅞", frasl: "⁄", frown: "⌢", Fscr: "ℱ", fscr: "𝒻", gacute: "ǵ", Gamma: "Γ", gamma: "γ", Gammad: "Ϝ", gammad: "ϝ", gap: "⪆", Gbreve: "Ğ", gbreve: "ğ", Gcedil: "Ģ", Gcirc: "Ĝ", gcirc: "ĝ", Gcy: "Г", gcy: "г", Gdot: "Ġ", gdot: "ġ", gE: "≧", ge: "≥", gEl: "⪌", gel: "⋛", geq: "≥", geqq: "≧", geqslant: "⩾", ges: "⩾", gescc: "⪩", gesdot: "⪀", gesdoto: "⪂", gesdotol: "⪄", gesl: "⋛︀", gesles: "⪔", Gfr: "𝔊", gfr: "𝔤", Gg: "⋙", gg: "≫", ggg: "⋙", gimel: "ℷ", GJcy: "Ѓ", gjcy: "ѓ", gl: "≷", gla: "⪥", glE: "⪒", glj: "⪤", gnap: "⪊", gnapprox: "⪊", gnE: "≩", gne: "⪈", gneq: "⪈", gneqq: "≩", gnsim: "⋧", Gopf: "𝔾", gopf: "𝕘", grave: "`", GreaterEqual: "≥", GreaterEqualLess: "⋛", GreaterFullEqual: "≧", GreaterGreater: "⪢", GreaterLess: "≷", GreaterSlantEqual: "⩾", GreaterTilde: "≳", Gscr: "𝒢", gscr: "ℊ", gsim: "≳", gsime: "⪎", gsiml: "⪐", GT: ">", 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: "‌" }, + HEXCHARCODE = /^#[xX]([A-Fa-f0-9]+)$/, + CHARCODE = /^#([0-9]+)$/, + NAMED = /^([A-Za-z0-9]+)$/, + EntityParser = function () { + function t(t) { + this.named = t; + }return t.prototype.parse = function (t) { + if (t) { + var e = t.match(HEXCHARCODE);return e ? String.fromCharCode(parseInt(e[1], 16)) : (e = t.match(CHARCODE)) ? String.fromCharCode(parseInt(e[1], 10)) : (e = t.match(NAMED)) ? this.named[e[1]] : void 0; + } + }, t; +}(), + WSP = /[\t\n\f ]/, + ALPHA = /[A-Za-z]/, + CRLF = /\r\n?/g;function isSpace(t) { + return WSP.test(t); +}function isAlpha(t) { + return ALPHA.test(t); +}function preprocessInput(t) { + return t.replace(CRLF, "\n"); +}function unwrap(t, e) { + if (!t) throw new Error((e || "value") + " was null");return t; +}var EventedTokenizer = function () { + function t(t, e) { + this.delegate = t, this.entityParser = e, this.state = null, this.input = null, this.index = -1, this.tagLine = -1, this.tagColumn = -1, this.line = -1, this.column = -1, this.states = { beforeData: function beforeData() { + "<" === this.peek() ? (this.state = "tagOpen", this.markTagStart(), this.consume()) : (this.state = "data", this.delegate.beginData()); + }, data: function data() { + var t = this.peek();"<" === t ? (this.delegate.finishData(), this.state = "tagOpen", this.markTagStart(), this.consume()) : "&" === t ? (this.consume(), this.delegate.appendToData(this.consumeCharRef() || "&")) : (this.consume(), this.delegate.appendToData(t)); + }, tagOpen: function tagOpen() { + var t = this.consume();"!" === t ? this.state = "markupDeclaration" : "/" === t ? this.state = "endTagOpen" : isAlpha(t) && (this.state = "tagName", this.delegate.beginStartTag(), this.delegate.appendToTagName(t.toLowerCase())); + }, markupDeclaration: function markupDeclaration() { + "-" === this.consume() && "-" === this.input.charAt(this.index) && (this.consume(), this.state = "commentStart", this.delegate.beginComment()); + }, commentStart: function commentStart() { + var t = this.consume();"-" === t ? this.state = "commentStartDash" : ">" === t ? (this.delegate.finishComment(), this.state = "beforeData") : (this.delegate.appendToCommentData(t), this.state = "comment"); + }, commentStartDash: function commentStartDash() { + var t = this.consume();"-" === t ? this.state = "commentEnd" : ">" === t ? (this.delegate.finishComment(), this.state = "beforeData") : (this.delegate.appendToCommentData("-"), this.state = "comment"); + }, comment: function comment() { + var t = this.consume();"-" === t ? this.state = "commentEndDash" : this.delegate.appendToCommentData(t); + }, commentEndDash: function commentEndDash() { + var t = this.consume();"-" === t ? this.state = "commentEnd" : (this.delegate.appendToCommentData("-" + t), this.state = "comment"); + }, commentEnd: function commentEnd() { + var t = this.consume();">" === t ? (this.delegate.finishComment(), this.state = "beforeData") : (this.delegate.appendToCommentData("--" + t), this.state = "comment"); + }, tagName: function tagName() { + var t = this.consume();isSpace(t) ? this.state = "beforeAttributeName" : "/" === t ? this.state = "selfClosingStartTag" : ">" === t ? (this.delegate.finishTag(), this.state = "beforeData") : this.delegate.appendToTagName(t); + }, beforeAttributeName: function beforeAttributeName() { + var t = this.peek();isSpace(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 attributeName() { + var t = this.peek();isSpace(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 afterAttributeName() { + var t = this.peek();isSpace(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 beforeAttributeValue() { + var t = this.peek();isSpace(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 attributeValueDoubleQuoted() { + var t = this.consume();'"' === t ? (this.delegate.finishAttributeValue(), this.state = "afterAttributeValueQuoted") : "&" === t ? this.delegate.appendToAttributeValue(this.consumeCharRef('"') || "&") : this.delegate.appendToAttributeValue(t); + }, attributeValueSingleQuoted: function attributeValueSingleQuoted() { + var t = this.consume();"'" === t ? (this.delegate.finishAttributeValue(), this.state = "afterAttributeValueQuoted") : "&" === t ? this.delegate.appendToAttributeValue(this.consumeCharRef("'") || "&") : this.delegate.appendToAttributeValue(t); + }, attributeValueUnquoted: function attributeValueUnquoted() { + var t = this.peek();isSpace(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 afterAttributeValueQuoted() { + var t = this.peek();isSpace(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 selfClosingStartTag() { + ">" === this.peek() ? (this.consume(), this.delegate.markTagAsSelfClosing(), this.delegate.finishTag(), this.state = "beforeData") : this.state = "beforeAttributeName"; + }, endTagOpen: function endTagOpen() { + var t = this.consume();isAlpha(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 += preprocessInput(t); this.index < this.input.length;) { + this.states[this.state].call(this); + } + }, t.prototype.tokenizeEOF = function () { + this.flushData(); + }, t.prototype.flushData = function () { + "data" === this.state && (this.delegate.finishData(), this.state = "beforeData"); + }, t.prototype.peek = function () { + return this.input.charAt(this.index); + }, t.prototype.consume = function () { + var t = this.peek();return this.index++, "\n" === t ? (this.line++, this.column = 0) : this.column++, t; + }, t.prototype.consumeCharRef = function () { + var t = this.input.indexOf(";", this.index);if (-1 !== t) { + var e = this.input.slice(this.index, t), + r = this.entityParser.parse(e);if (r) { + for (var a = e.length; a;) { + this.consume(), a--; + }return this.consume(), r; + } + } + }, t.prototype.markTagStart = function () { + this.tagLine = this.line, this.tagColumn = this.column, this.delegate.tagOpen && this.delegate.tagOpen(); + }, t; +}(), + Tokenizer = function () { + function t(t, e) { + void 0 === e && (e = {}), this.options = e, this._token = null, this.startLine = 1, this.startColumn = 0, this.tokens = [], this.currentAttribute = null, this.tokenizer = new EventedTokenizer(this, t); + }return Object.defineProperty(t.prototype, "token", { get: function get() { + return unwrap(this._token); + }, set: function set(t) { + this._token = t; + }, enumerable: !0, configurable: !0 }), t.prototype.tokenize = function (t) { + return this.tokens = [], this.tokenizer.tokenize(t), this.tokens; + }, t.prototype.tokenizePart = function (t) { + return this.tokens = [], this.tokenizer.tokenizePart(t), this.tokens; + }, t.prototype.tokenizeEOF = function () { + return this.tokens = [], this.tokenizer.tokenizeEOF(), this.tokens[0]; + }, t.prototype.reset = function () { + this._token = null, this.startLine = 1, this.startColumn = 0; + }, t.prototype.addLocInfo = function () { + this.options.loc && (this.token.loc = { start: { line: this.startLine, column: this.startColumn }, end: { line: this.tokenizer.line, column: this.tokenizer.column } }), this.startLine = this.tokenizer.line, this.startColumn = this.tokenizer.column; + }, t.prototype.beginData = function () { + this.token = { type: "Chars", chars: "" }, this.tokens.push(this.token); + }, t.prototype.appendToData = function (t) { + this.token.chars += t; + }, t.prototype.finishData = function () { + this.addLocInfo(); + }, t.prototype.beginComment = function () { + this.token = { type: "Comment", chars: "" }, this.tokens.push(this.token); + }, t.prototype.appendToCommentData = function (t) { + this.token.chars += t; + }, t.prototype.finishComment = function () { + this.addLocInfo(); + }, t.prototype.beginStartTag = function () { + this.token = { type: "StartTag", tagName: "", attributes: [], selfClosing: !1 }, this.tokens.push(this.token); + }, t.prototype.beginEndTag = function () { + this.token = { type: "EndTag", tagName: "" }, this.tokens.push(this.token); + }, t.prototype.finishTag = function () { + this.addLocInfo(); + }, t.prototype.markTagAsSelfClosing = function () { + this.token.selfClosing = !0; + }, t.prototype.appendToTagName = function (t) { + this.token.tagName += t; + }, t.prototype.beginAttribute = function () { + var t = unwrap(this.token.attributes, "current token's attributs");this.currentAttribute = ["", "", !1], t.push(this.currentAttribute); + }, t.prototype.appendToAttributeName = function (t) { + unwrap(this.currentAttribute)[0] += t; + }, t.prototype.beginAttributeValue = function (t) { + unwrap(this.currentAttribute)[2] = t; + }, t.prototype.appendToAttributeValue = function (t) { + var e = unwrap(this.currentAttribute);e[1] = e[1] || "", e[1] += t; + }, t.prototype.finishAttributeValue = function () {}, t.prototype.reportSyntaxError = function (t) { + this.token.syntaxError = t; + }, t; +}();function debugAssert(t, e) { + if (!t) throw new Error(e || "assertion failure"); +}var objKeys = Object.keys; +function assign(t) { + for (var e = 1; e < arguments.length; e++) { + var r = arguments[e];if (null === r || "object" != (typeof r === "undefined" ? "undefined" : _typeof(r))) continue;var a = objKeys(r);for (var _e3 = 0; _e3 < a.length; _e3++) { + var i = a[_e3];t[i] = r[i]; + } + }return t; +} +var ListSlice = function () { + function ListSlice(t, e) { + _classCallCheck(this, ListSlice); + + this._head = t, this._tail = e; + } + + _createClass(ListSlice, [{ + key: "forEachNode", + value: function forEachNode(t) { + var e = this._head;for (; null !== e;) { + t(e), e = this.nextNode(e); + } + } + }, { + key: "head", + value: function head() { + return this._head; + } + }, { + key: "tail", + value: function tail() { + return this._tail; + } + }, { + key: "toArray", + value: function toArray() { + var t = [];return this.forEachNode(function (e) { + return t.push(e); + }), t; + } + }, { + key: "nextNode", + value: function nextNode(t) { + return t === this._tail ? null : t.next; + } + }]); + + return ListSlice; +}(); + +var EMPTY_SLICE = new ListSlice(null, null), + EMPTY_ARRAY = Object.freeze([]), + entityParser = new EntityParser(namedCharRefs); +var Parser = function () { + function Parser(t) { + var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Parser); + + this.elementStack = [], this.currentAttribute = null, this.currentNode = null, this.tokenizer = new EventedTokenizer(this, entityParser), this.options = e, 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 = t.split(/(?:\r\n?|\n)/g); + } + + _createClass(Parser, [{ + key: "acceptNode", + value: function acceptNode(t) { + return this[t.type](t); + } + }, { + key: "currentElement", + value: function currentElement() { + return this.elementStack[this.elementStack.length - 1]; + } + }, { + key: "sourceForNode", + value: function sourceForNode(t, e) { + var r = void 0, + a = void 0, + i = void 0, + n = t.loc.start.line - 1, + s = n - 1, + o = t.loc.start.column, + l = [];for (e ? (a = e.loc.end.line - 1, i = e.loc.end.column) : (a = t.loc.end.line - 1, i = t.loc.end.column); s < a;) { + s++, r = this.source[s], s === n ? n === a ? l.push(r.slice(o, i)) : l.push(r.slice(o)) : s === a ? l.push(r.slice(0, i)) : l.push(r); + }return l.join("\n"); + } + }, { + key: "currentAttr", + get: function get() { + return this.currentAttribute; + } + }, { + key: "currentTag", + get: function get() { + var t = this.currentNode;return t; + } + }, { + key: "currentStartTag", + get: function get() { + var t = this.currentNode;return t; + } + }, { + key: "currentEndTag", + get: function get() { + var t = this.currentNode;return t; + } + }, { + key: "currentComment", + get: function get() { + var t = this.currentNode;return t; + } + }, { + key: "currentData", + get: function get() { + var t = this.currentNode;return t; + } + }]); + + return Parser; +}(); + +var HandlebarsNodeVisitors = function (_Parser) { + _inherits(HandlebarsNodeVisitors, _Parser); + + function HandlebarsNodeVisitors() { + var _this; + + _classCallCheck(this, HandlebarsNodeVisitors); + + (_this = _possibleConstructorReturn(this, (HandlebarsNodeVisitors.__proto__ || Object.getPrototypeOf(HandlebarsNodeVisitors)).apply(this, arguments)), _this), _this.cursorCount = 0;return _this; + } + + _createClass(HandlebarsNodeVisitors, [{ + key: "cursor", + value: function cursor() { + return "%cursor:" + this.cursorCount++ + "%"; + } + }, { + key: "Program", + value: function Program(t) { + this.cursorCount = 0;var e = void 0, + r = b.program([], t.blockParams, t.loc), + a = t.body.length;if (this.elementStack.push(r), 0 === a) return this.elementStack.pop();for (e = 0; e < a; e++) { + this.acceptNode(t.body[e]); + }var i = this.elementStack.pop();if (i !== r) { + var _t = i;throw new SyntaxError$1("Unclosed element `" + _t.tag + "` (on line " + _t.loc.start.line + ").", _t.loc); + }return r; + } + }, { + key: "BlockStatement", + value: function BlockStatement(t) { + if ("comment" === this.tokenizer.state) return void this.appendToCommentData(this.sourceForNode(t));if ("comment" !== this.tokenizer.state && "data" !== this.tokenizer.state && "beforeData" !== this.tokenizer.state) throw new SyntaxError$1("A block may only be used inside an HTML element or another block.", t.loc); + var _acceptCallNodes = acceptCallNodes(this, t), + e = _acceptCallNodes.path, + r = _acceptCallNodes.params, + a = _acceptCallNodes.hash, + i = this.Program(t.program), + n = t.inverse ? this.Program(t.inverse) : null; + + "in-element" === e.original && (a = addInElementHash(this.cursor(), a, t.loc));var s = b.block(e, r, a, i, n, t.loc);appendChild(this.currentElement(), s); + } + }, { + key: "MustacheStatement", + value: function MustacheStatement(t) { + var e = void 0, + r = this.tokenizer;if ("comment" === r.state) return void this.appendToCommentData(this.sourceForNode(t));var a = t.escaped, + i = t.loc; + if (t.path.type.match(/Literal$/)) e = { type: "MustacheStatement", path: this.acceptNode(t.path), params: [], hash: b.hash(), escaped: a, loc: i };else { + var _acceptCallNodes2 = acceptCallNodes(this, t), + _r = _acceptCallNodes2.path, + n = _acceptCallNodes2.params, + s = _acceptCallNodes2.hash; + + e = b.mustache(_r, n, s, !a, i); + }switch (r.state) {case "tagName": + addElementModifier(this.currentStartTag, e), r.state = "beforeAttributeName";break;case "beforeAttributeName": + addElementModifier(this.currentStartTag, e);break;case "attributeName":case "afterAttributeName": + this.beginAttributeValue(!1), this.finishAttributeValue(), addElementModifier(this.currentStartTag, e), r.state = "beforeAttributeName";break;case "afterAttributeValueQuoted": + addElementModifier(this.currentStartTag, e), r.state = "beforeAttributeName";break;case "beforeAttributeValue": + this.beginAttributeValue(!1), appendDynamicAttributeValuePart(this.currentAttribute, e), r.state = "attributeValueUnquoted";break;case "attributeValueDoubleQuoted":case "attributeValueSingleQuoted":case "attributeValueUnquoted": + appendDynamicAttributeValuePart(this.currentAttribute, e);break;default: + appendChild(this.currentElement(), e);}return e; + } + }, { + key: "ContentStatement", + value: function ContentStatement(t) { + updateTokenizerLocation(this.tokenizer, t), this.tokenizer.tokenizePart(t.value), this.tokenizer.flushData(); + } + }, { + key: "CommentStatement", + value: function CommentStatement(t) { + var e = this.tokenizer; + if ("comment" === e.state) return this.appendToCommentData(this.sourceForNode(t)), null;var r = t.value, + a = t.loc, + i = b.mustacheComment(r, a); + switch (e.state) {case "beforeAttributeName": + this.currentStartTag.comments.push(i);break;case "beforeData":case "data": + appendChild(this.currentElement(), i);break;default: + throw new SyntaxError$1("Using a Handlebars comment when in the `" + e.state + "` state is not supported: \"" + i.value + "\" on line " + a.start.line + ":" + a.start.column, t.loc);}return i; + } + }, { + key: "PartialStatement", + value: function PartialStatement(t) { + var e = t.loc; + throw new SyntaxError$1("Handlebars partials are not supported: \"" + this.sourceForNode(t, t.name) + "\" at L" + e.start.line + ":C" + e.start.column, t.loc); + } + }, { + key: "PartialBlockStatement", + value: function PartialBlockStatement(t) { + var e = t.loc; + throw new SyntaxError$1("Handlebars partial blocks are not supported: \"" + this.sourceForNode(t, t.name) + "\" at L" + e.start.line + ":C" + e.start.column, t.loc); + } + }, { + key: "Decorator", + value: function Decorator(t) { + var e = t.loc; + throw new SyntaxError$1("Handlebars decorators are not supported: \"" + this.sourceForNode(t, t.path) + "\" at L" + e.start.line + ":C" + e.start.column, t.loc); + } + }, { + key: "DecoratorBlock", + value: function DecoratorBlock(t) { + var e = t.loc; + throw new SyntaxError$1("Handlebars decorator blocks are not supported: \"" + this.sourceForNode(t, t.path) + "\" at L" + e.start.line + ":C" + e.start.column, t.loc); + } + }, { + key: "SubExpression", + value: function SubExpression(t) { + var _acceptCallNodes3 = acceptCallNodes(this, t), + e = _acceptCallNodes3.path, + r = _acceptCallNodes3.params, + a = _acceptCallNodes3.hash; + + return b.sexpr(e, r, a, t.loc); + } + }, { + key: "PathExpression", + value: function PathExpression(t) { + var e = void 0, + r = t.original, + a = t.loc;if (-1 !== r.indexOf("/")) { + if ("./" === r.slice(0, 2)) throw new SyntaxError$1("Using \"./\" is not supported in Glimmer and unnecessary: \"" + t.original + "\" on line " + a.start.line + ".", t.loc);if ("../" === r.slice(0, 3)) throw new SyntaxError$1("Changing context using \"../\" is not supported in Glimmer: \"" + t.original + "\" on line " + a.start.line + ".", t.loc);if (-1 !== r.indexOf(".")) throw new SyntaxError$1("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths: \"" + t.original + "\" on line " + a.start.line + ".", t.loc);e = [t.parts.join("/")]; + } else e = t.parts;var i = !1;return r.match(/^this(\..+)?$/) && (i = !0), { type: "PathExpression", original: t.original, this: i, parts: e, data: t.data, loc: t.loc }; + } + }, { + key: "Hash", + value: function Hash(t) { + var e = [];for (var r = 0; r < t.pairs.length; r++) { + var a = t.pairs[r];e.push(b.pair(a.key, this.acceptNode(a.value), a.loc)); + }return b.hash(e, t.loc); + } + }, { + key: "StringLiteral", + value: function StringLiteral(t) { + return b.literal("StringLiteral", t.value, t.loc); + } + }, { + key: "BooleanLiteral", + value: function BooleanLiteral(t) { + return b.literal("BooleanLiteral", t.value, t.loc); + } + }, { + key: "NumberLiteral", + value: function NumberLiteral(t) { + return b.literal("NumberLiteral", t.value, t.loc); + } + }, { + key: "UndefinedLiteral", + value: function UndefinedLiteral(t) { + return b.literal("UndefinedLiteral", void 0, t.loc); + } + }, { + key: "NullLiteral", + value: function NullLiteral(t) { + return b.literal("NullLiteral", null, t.loc); + } + }]); + + return HandlebarsNodeVisitors; +}(Parser); + +function calculateRightStrippedOffsets(t, e) { + if ("" === e) return { lines: t.split("\n").length - 1, columns: 0 };var r = t.split(e)[0].split(/\n/), + a = r.length - 1;return { lines: a, columns: r[a].length }; +}function updateTokenizerLocation(t, e) { + var r = e.loc.start.line, + a = e.loc.start.column, + i = calculateRightStrippedOffsets(e.original, e.value);r += i.lines, i.lines ? a = i.columns : a += i.columns, t.line = r, t.column = a; +}function acceptCallNodes(t, e) { + return { path: t.PathExpression(e.path), params: e.params ? e.params.map(function (e) { + return t.acceptNode(e); + }) : [], hash: e.hash ? t.Hash(e.hash) : b.hash() }; +}function addElementModifier(t, e) { + var r = e.path, + a = e.params, + i = e.hash, + n = e.loc; + if (isLiteral$1(r)) { + var _a2 = "{{" + printLiteral(r) + "}}", + _i = "<" + t.name + " ... " + _a2 + " ...";throw new SyntaxError$1("In " + _i + ", " + _a2 + " is not a valid modifier: \"" + r.original + "\" on line " + (n && n.start.line) + ".", e.loc); + }var s = b.elementModifier(r, a, i, n);t.modifiers.push(s); +}function addInElementHash(t, e, r) { + var a = !1;e.pairs.forEach(function (t) { + if ("guid" === t.key) throw new SyntaxError$1("Cannot pass `guid` from user space", r);"nextSibling" === t.key && (a = !0); + });var i = b.literal("StringLiteral", t), + n = b.pair("guid", i);if (e.pairs.unshift(n), !a) { + var _t2 = b.literal("NullLiteral", null), + _r2 = b.pair("nextSibling", _t2);e.pairs.push(_r2); + }return e; +}function appendDynamicAttributeValuePart(t, e) { + t.isDynamic = !0, t.parts.push(e); +}var visitorKeys = { Program: ["body"], MustacheStatement: ["path", "params", "hash"], BlockStatement: ["path", "params", "hash", "program", "inverse"], ElementModifierStatement: ["path", "params", "hash"], PartialStatement: ["name", "params", "hash"], CommentStatement: [], MustacheCommentStatement: [], ElementNode: ["attributes", "modifiers", "children", "comments"], AttrNode: ["value"], TextNode: [], ConcatStatement: ["parts"], SubExpression: ["path", "params", "hash"], PathExpression: [], StringLiteral: [], BooleanLiteral: [], NumberLiteral: [], NullLiteral: [], UndefinedLiteral: [], Hash: ["pairs"], HashPair: ["value"] };var TraversalError = function () { + function t(t, e, r, a) { + var i = Error.call(this, t);this.key = a, this.message = t, this.node = e, this.parent = r, this.stack = i.stack; + }return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t; +}();function cannotRemoveNode(t, e, r) { + return new TraversalError("Cannot remove a node unless it is part of an array", t, e, r); +}function cannotReplaceNode(t, e, r) { + return new TraversalError("Cannot replace a node with multiple nodes unless it is part of an array", t, e, r); +}function cannotReplaceOrRemoveInKeyHandlerYet(t, e) { + return new TraversalError("Replacing and removing in key handlers is not yet supported.", t, null, e); +}function visitNode(t, e) { + var r = void 0, + a = t[e.type] || t.All || null;if (a && a.enter && (r = a.enter.call(null, e)), void 0 !== r && null !== r) { + if (JSON.stringify(e) !== JSON.stringify(r)) return Array.isArray(r) ? visitArray(t, r) || r : visitNode(t, r) || r;r = void 0; + }if (void 0 === r) { + var i = visitorKeys[e.type];for (var _r3 = 0; _r3 < i.length; _r3++) { + visitKey(t, a, e, i[_r3]); + }a && a.exit && (r = a.exit.call(null, e)); + }return r; +}function visitKey(t, e, r, a) { + var i = r[a];if (!i) return;var n = void 0, + s = e && (e.keys[a] || e.keys.All);if (s && s.enter && void 0 !== (n = s.enter.call(null, r, a))) throw cannotReplaceOrRemoveInKeyHandlerYet(r, a);if (Array.isArray(i)) visitArray(t, i);else { + var _e4 = visitNode(t, i);void 0 !== _e4 && assignKey(r, a, _e4); + }if (s && s.exit && void 0 !== (n = s.exit.call(null, r, a))) throw cannotReplaceOrRemoveInKeyHandlerYet(r, a); +}function visitArray(t, e) { + for (var r = 0; r < e.length; r++) { + var a = visitNode(t, e[r]);void 0 !== a && (r += spliceArray(e, r, a) - 1); + } +}function assignKey(t, e, r) { + if (null === r) throw cannotRemoveNode(t[e], t, e);if (Array.isArray(r)) { + if (1 !== r.length) throw 0 === r.length ? cannotRemoveNode(t[e], t, e) : cannotReplaceNode(t[e], t, e);t[e] = r[0]; + } else t[e] = r; +}function spliceArray(t, e, r) { + return null === r ? (t.splice(e, 1), 0) : Array.isArray(r) ? (t.splice.apply(t, [e, 1].concat(_toConsumableArray(r))), r.length) : (t.splice(e, 1, r), 1); +}function traverse(t, e) { + visitNode(normalizeVisitor(e), t); +}function normalizeVisitor(t) { + var e = {};for (var r in t) { + var a = t[r] || t.All, + i = {};if ("object" == (typeof a === "undefined" ? "undefined" : _typeof(a))) { + var _t3 = a.keys;if (_t3) for (var _e5 in _t3) { + var _r4 = _t3[_e5];"object" == (typeof _r4 === "undefined" ? "undefined" : _typeof(_r4)) ? i[_e5] = { enter: "function" == typeof _r4.enter ? _r4.enter : null, exit: "function" == typeof _r4.exit ? _r4.exit : null } : "function" == typeof _r4 && (i[_e5] = { enter: _r4, exit: null }); + }e[r] = { enter: "function" == typeof a.enter ? a.enter : null, exit: "function" == typeof a.exit ? a.exit : null, keys: i }; + } else "function" == typeof a && (e[r] = { enter: a, exit: null, keys: i }); + }return e; +}function unreachable$1() { + throw new Error("unreachable"); +}function build(t) { + if (!t) return "";var e = [];switch (t.type) {case "Program": + { + var _r5 = t.chained && t.body[0];_r5 && (_r5.chained = !0);var a = buildEach(t.body).join("");e.push(a); + }break;case "ElementNode": + e.push("<", t.tag), t.attributes.length && e.push(" ", buildEach(t.attributes).join(" ")), t.modifiers.length && e.push(" ", buildEach(t.modifiers).join(" ")), t.comments.length && e.push(" ", buildEach(t.comments).join(" ")), e.push(">"), e.push.apply(e, buildEach(t.children)), e.push("");break;case "AttrNode": + e.push(t.name, "=");var r = build(t.value);"TextNode" === t.value.type ? e.push('"', r, '"') : e.push(r);break;case "ConcatStatement": + e.push('"'), t.parts.forEach(function (t) { + "StringLiteral" === t.type ? e.push(t.original) : e.push(build(t)); + }), e.push('"');break;case "TextNode": + e.push(t.chars);break;case "MustacheStatement": + e.push(compactJoin(["{{", pathParams(t), "}}"]));break;case "MustacheCommentStatement": + e.push(compactJoin(["{{!--", t.value, "--}}"]));break;case "ElementModifierStatement": + e.push(compactJoin(["{{", pathParams(t), "}}"]));break;case "PathExpression": + e.push(t.original);break;case "SubExpression": + e.push("(", pathParams(t), ")");break;case "BooleanLiteral": + e.push(t.value ? "true" : "false");break;case "BlockStatement": + { + var _r6 = [];t.chained ? _r6.push(["{{else ", pathParams(t), "}}"].join("")) : _r6.push(openBlock(t)), _r6.push(build(t.program)), t.inverse && (t.inverse.chained || _r6.push("{{else}}"), _r6.push(build(t.inverse))), t.chained || _r6.push(closeBlock(t)), e.push(_r6.join("")); + }break;case "PartialStatement": + e.push(compactJoin(["{{>", pathParams(t), "}}"]));break;case "CommentStatement": + e.push(compactJoin(["\x3c!--", t.value, "--\x3e"]));break;case "StringLiteral": + e.push("\"" + t.value + "\"");break;case "NumberLiteral": + e.push(String(t.value));break;case "UndefinedLiteral": + e.push("undefined");break;case "NullLiteral": + e.push("null");break;case "Hash": + e.push(t.pairs.map(function (t) { + return build(t); + }).join(" "));break;case "HashPair": + e.push(t.key + "=" + build(t.value));}return e.join(""); +}function compact(t) { + var e = [];return t.forEach(function (t) { + void 0 !== t && null !== t && "" !== t && e.push(t); + }), e; +}function buildEach(t) { + return t.map(build); +}function pathParams(t) { + var e = void 0;switch (t.type) {case "MustacheStatement":case "SubExpression":case "ElementModifierStatement":case "BlockStatement": + if (isLiteral(t.path)) return String(t.path.value);e = build(t.path);break;case "PartialStatement": + e = build(t.name);break;default: + return unreachable$1();}return compactJoin([e, buildEach(t.params).join(" "), build(t.hash)], " "); +}function compactJoin(t, e) { + return compact(t).join(e || ""); +}function blockParams(t) { + var e = t.program.blockParams;return e.length ? " as |" + e.join(" ") + "|" : null; +}function openBlock(t) { + return ["{{#", pathParams(t), blockParams(t), "}}"].join(""); +}function closeBlock(t) { + return ["{{/", build(t.path), "}}"].join(""); +} +var Walker = function () { + function Walker(t) { + _classCallCheck(this, Walker); + + this.order = t, this.stack = []; + } + + _createClass(Walker, [{ + key: "visit", + value: function visit(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 children(t, e) { + var r = visitors[t.type];r && r(this, t, e); + } + }]); + + return Walker; +}(); + +var visitors = { + Program: function Program(t, e, r) { + for (var a = 0; a < e.body.length; a++) { + t.visit(e.body[a], r); + } + }, + ElementNode: function ElementNode(t, e, r) { + for (var a = 0; a < e.children.length; a++) { + t.visit(e.children[a], r); + } + }, + BlockStatement: function BlockStatement(t, e, r) { + t.visit(e.program, r), t.visit(e.inverse || null, r); + } +};var commonjsGlobal = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};function unwrapExports(t) { + return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; +}function createCommonjsModule(t, e) { + return t(e = { exports: {} }, e.exports), e.exports; +}var utils = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.extend = s, e.indexOf = function (t, e) { + for (var r = 0, a = t.length; r < a; r++) { + if (t[r] === e) return r; + }return -1; + }, e.escapeExpression = function (t) { + if ("string" != typeof t) { + if (t && t.toHTML) return t.toHTML();if (null == t) return "";if (!t) return t + "";t = "" + t; + }if (!i.test(t)) return t;return t.replace(a, n); + }, e.isEmpty = function (t) { + return !t && 0 !== t || !(!c(t) || 0 !== t.length); + }, e.createFrame = function (t) { + var e = s({}, t);return e._parent = t, e; + }, e.blockParams = function (t, e) { + return t.path = e, t; + }, e.appendContextPath = function (t, e) { + return (t ? t + "." : "") + e; + };var r = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "`": "`", "=": "=" }, + a = /[&<>"'`=]/g, + i = /[&<>"'`=]/;function n(t) { + return r[t]; + }function s(t) { + for (var e = 1; e < arguments.length; e++) { + for (var r in arguments[e]) { + Object.prototype.hasOwnProperty.call(arguments[e], r) && (t[r] = arguments[e][r]); + } + }return t; + }var o = Object.prototype.toString;e.toString = o;var l = function l(t) { + return "function" == typeof t; + };l(/x/) && (e.isFunction = l = function l(t) { + return "function" == typeof t && "[object Function]" === o.call(t); + }), e.isFunction = l;var c = Array.isArray || function (t) { + return !(!t || "object" != (typeof t === "undefined" ? "undefined" : _typeof(t))) && "[object Array]" === o.call(t); + };e.isArray = c; +});unwrapExports(utils);var exception = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r = ["description", "fileName", "lineNumber", "message", "name", "number", "stack"];function a(t, e) { + var i = e && e.loc, + n = void 0, + s = void 0;i && (t += " - " + (n = i.start.line) + ":" + (s = i.start.column));for (var o = Error.prototype.constructor.call(this, t), l = 0; l < r.length; l++) { + this[r[l]] = o[r[l]]; + }Error.captureStackTrace && Error.captureStackTrace(this, a);try { + i && (this.lineNumber = n, Object.defineProperty ? Object.defineProperty(this, "column", { value: s, enumerable: !0 }) : this.column = s); + } catch (t) {} + }a.prototype = new Error(), e.default = a, t.exports = e.default; +});unwrapExports(exception);var blockHelperMissing = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.default = function (t) { + t.registerHelper("blockHelperMissing", function (e, r) { + var a = r.inverse, + i = r.fn;if (!0 === e) return i(this);if (!1 === e || null == e) return a(this);if (utils.isArray(e)) return e.length > 0 ? (r.ids && (r.ids = [r.name]), t.helpers.each(e, r)) : a(this);if (r.data && r.ids) { + var n = utils.createFrame(r.data);n.contextPath = utils.appendContextPath(r.data.contextPath, r.name), r = { data: n }; + }return i(e, r); + }); + }, t.exports = e.default; +});unwrapExports(blockHelperMissing);var each = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r, + a = (r = exception) && r.__esModule ? r : { default: r };e.default = function (t) { + t.registerHelper("each", function (t, e) { + if (!e) throw new a.default("Must pass iterator to #each");var r = e.fn, + i = e.inverse, + n = 0, + s = "", + o = void 0, + l = void 0;function c(e, a, i) { + o && (o.key = e, o.index = a, o.first = 0 === a, o.last = !!i, l && (o.contextPath = l + e)), s += r(t[e], { data: o, blockParams: utils.blockParams([t[e], e], [l + e, null]) }); + }if (e.data && e.ids && (l = utils.appendContextPath(e.data.contextPath, e.ids[0]) + "."), utils.isFunction(t) && (t = t.call(this)), e.data && (o = utils.createFrame(e.data)), t && "object" == (typeof t === "undefined" ? "undefined" : _typeof(t))) if (utils.isArray(t)) for (var u = t.length; n < u; n++) { + n in t && c(n, n, n === t.length - 1); + } else { + var p = void 0;for (var h in t) { + t.hasOwnProperty(h) && (void 0 !== p && c(p, n - 1), p = h, n++); + }void 0 !== p && c(p, n - 1, !0); + }return 0 === n && (s = i(this)), s; + }); + }, t.exports = e.default; +});unwrapExports(each);var helperMissing = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r, + a = (r = exception) && r.__esModule ? r : { default: r };e.default = function (t) { + t.registerHelper("helperMissing", function () { + if (1 !== arguments.length) throw new a.default('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + }); + }, t.exports = e.default; +});unwrapExports(helperMissing);var _if = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.default = function (t) { + t.registerHelper("if", function (t, e) { + return utils.isFunction(t) && (t = t.call(this)), !e.hash.includeZero && !t || utils.isEmpty(t) ? e.inverse(this) : e.fn(this); + }), t.registerHelper("unless", function (e, r) { + return t.helpers.if.call(this, e, { fn: r.inverse, inverse: r.fn, hash: r.hash }); + }); + }, t.exports = e.default; +});unwrapExports(_if);var log = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.default = function (t) { + t.registerHelper("log", function () { + for (var e = [void 0], r = arguments[arguments.length - 1], a = 0; a < arguments.length - 1; a++) { + e.push(arguments[a]); + }var i = 1;null != r.hash.level ? i = r.hash.level : r.data && null != r.data.level && (i = r.data.level), e[0] = i, t.log.apply(t, e); + }); + }, t.exports = e.default; +});unwrapExports(log);var lookup = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.default = function (t) { + t.registerHelper("lookup", function (t, e) { + return t && t[e]; + }); + }, t.exports = e.default; +});unwrapExports(lookup);var _with = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.default = function (t) { + t.registerHelper("with", function (t, e) { + utils.isFunction(t) && (t = t.call(this));var r = e.fn;if (utils.isEmpty(t)) return e.inverse(this);var a = e.data;return e.data && e.ids && ((a = utils.createFrame(e.data)).contextPath = utils.appendContextPath(e.data.contextPath, e.ids[0])), r(t, { data: a, blockParams: utils.blockParams([t], [a && a.contextPath]) }); + }); + }, t.exports = e.default; +});unwrapExports(_with);var helpers = createCommonjsModule(function (t, e) { + function r(t) { + return t && t.__esModule ? t : { default: t }; + }e.__esModule = !0, e.registerDefaultHelpers = function (t) { + a.default(t), i.default(t), n.default(t), s.default(t), o.default(t), l.default(t), c.default(t); + };var a = r(blockHelperMissing), + i = r(each), + n = r(helperMissing), + s = r(_if), + o = r(log), + l = r(lookup), + c = r(_with); +});unwrapExports(helpers);var inline = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.default = function (t) { + t.registerDecorator("inline", function (t, e, r, a) { + var i = t;return e.partials || (e.partials = {}, i = function i(a, _i2) { + var n = r.partials;r.partials = utils.extend({}, n, e.partials);var s = t(a, _i2);return r.partials = n, s; + }), e.partials[a.args[0]] = a.fn, i; + }); + }, t.exports = e.default; +});unwrapExports(inline);var decorators = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.registerDefaultDecorators = function (t) { + a.default(t); + };var r, + a = (r = inline) && r.__esModule ? r : { default: r }; +});unwrapExports(decorators);var logger_1 = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r = { methodMap: ["debug", "info", "warn", "error"], level: "info", lookupLevel: function lookupLevel(t) { + if ("string" == typeof t) { + var e = utils.indexOf(r.methodMap, t.toLowerCase());t = e >= 0 ? e : parseInt(t, 10); + }return t; + }, log: function log(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, i = Array(a > 1 ? a - 1 : 0), n = 1; n < a; n++) { + i[n - 1] = arguments[n]; + }console[e].apply(console, i); + } + } };e.default = r, t.exports = e.default; +});unwrapExports(logger_1);var base = createCommonjsModule(function (t, e) { + function r(t) { + return t && t.__esModule ? t : { default: t }; + }e.__esModule = !0, e.HandlebarsEnvironment = n;var a = r(exception), + i = r(logger_1);e.VERSION = "4.0.10";e.COMPILER_REVISION = 7;e.REVISION_CHANGES = { 1: "<= 1.0.rc.2", 2: "== 1.0.0-rc.3", 3: "== 1.0.0-rc.4", 4: "== 1.x.x", 5: "== 2.0.0-alpha.x", 6: ">= 2.0.0-beta.1", 7: ">= 4.0.0" };function n(t, e, r) { + this.helpers = t || {}, this.partials = e || {}, this.decorators = r || {}, helpers.registerDefaultHelpers(this), decorators.registerDefaultDecorators(this); + }n.prototype = { constructor: n, logger: i.default, log: i.default.log, registerHelper: function registerHelper(t, e) { + if ("[object Object]" === utils.toString.call(t)) { + if (e) throw new a.default("Arg not supported with multiple helpers");utils.extend(this.helpers, t); + } else this.helpers[t] = e; + }, unregisterHelper: function unregisterHelper(t) { + delete this.helpers[t]; + }, registerPartial: function registerPartial(t, e) { + if ("[object Object]" === utils.toString.call(t)) utils.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 unregisterPartial(t) { + delete this.partials[t]; + }, registerDecorator: function registerDecorator(t, e) { + if ("[object Object]" === utils.toString.call(t)) { + if (e) throw new a.default("Arg not supported with multiple decorators");utils.extend(this.decorators, t); + } else this.decorators[t] = e; + }, unregisterDecorator: function unregisterDecorator(t) { + delete this.decorators[t]; + } };var s = i.default.log;e.log = s, e.createFrame = utils.createFrame, e.logger = i.default; +});unwrapExports(base);var safeString = createCommonjsModule(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; +});unwrapExports(safeString);var runtime = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.checkRevision = function (t) { + var e = t && t[0] || 1, + r = base.COMPILER_REVISION;if (e !== r) { + if (e < r) { + var a = base.REVISION_CHANGES[r], + n = base.REVISION_CHANGES[e];throw new i.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + a + ") or downgrade your runtime to an older version (" + n + ")."); + }throw new i.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + t[1] + ")."); + } + }, e.template = function (t, e) { + if (!e) throw new i.default("No environment passed to template");if (!t || !t.main) throw new i.default("Unknown template object: " + (typeof t === "undefined" ? "undefined" : _typeof(t)));t.main.decorator = t.main_d, e.VM.checkRevision(t.compiler);var r = { strict: function strict(t, e) { + if (!(e in t)) throw new i.default('"' + e + '" not defined in ' + t);return t[e]; + }, lookup: function lookup(t, e) { + for (var r = t.length, a = 0; a < r; a++) { + if (t[a] && null != t[a][e]) return t[a][e]; + } + }, lambda: function lambda(t, e) { + return "function" == typeof t ? t.call(e) : t; + }, escapeExpression: a.escapeExpression, invokePartial: function invokePartial(r, n, s) { + s.hash && (n = a.extend({}, n, s.hash), s.ids && (s.ids[0] = !0));r = e.VM.resolvePartial.call(this, r, n, s);var o = e.VM.invokePartial.call(this, r, n, s);null == o && e.compile && (s.partials[s.name] = e.compile(r, t.compilerOptions, e), o = s.partials[s.name](n, s));if (null != o) { + if (s.indent) { + for (var l = o.split("\n"), c = 0, u = l.length; c < u && (l[c] || c + 1 !== u); c++) { + l[c] = s.indent + l[c]; + }o = l.join("\n"); + }return o; + }throw new i.default("The partial " + s.name + " could not be compiled when running in runtime-only mode"); + }, fn: function fn(e) { + var r = t[e];return r.decorator = t[e + "_d"], r; + }, programs: [], program: function program(t, e, r, a, i) { + var s = this.programs[t], + o = this.fn(t);return e || i || a || r ? s = n(this, t, o, e, r, a, i) : s || (s = this.programs[t] = n(this, t, o)), s; + }, data: function data(t, e) { + for (; t && e--;) { + t = t._parent; + }return t; + }, merge: function merge(t, e) { + var r = t || e;return t && e && t !== e && (r = a.extend({}, e, t)), r; + }, nullContext: Object.seal({}), noop: e.VM.noop, compilerInfo: t.compiler };function s(e) { + var a = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], + i = a.data;s._setup(a), !a.partial && t.useData && (i = function (t, e) { + e && "root" in e || ((e = e ? base.createFrame(e) : {}).root = t);return e; + }(e, i));var n = void 0, + l = t.useBlockParams ? [] : void 0;function c(e) { + return "" + t.main(r, e, r.helpers, r.partials, i, l, n); + }return t.useDepths && (n = a.depths ? e != a.depths[0] ? [e].concat(a.depths) : a.depths : [e]), (c = o(t.main, c, r, a.depths || [], i, l))(e, a); + }return s.isTop = !0, s._setup = function (a) { + a.partial ? (r.helpers = a.helpers, r.partials = a.partials, r.decorators = a.decorators) : (r.helpers = r.merge(a.helpers, e.helpers), t.usePartial && (r.partials = r.merge(a.partials, e.partials)), (t.usePartial || t.useDecorators) && (r.decorators = r.merge(a.decorators, e.decorators))); + }, s._child = function (e, a, s, o) { + if (t.useBlockParams && !s) throw new i.default("must pass block params");if (t.useDepths && !o) throw new i.default("must pass parent depths");return n(r, e, t[e], a, 0, s, o); + }, s; + }, e.wrapProgram = n, e.resolvePartial = function (t, e, r) { + t ? t.call || r.name || (r.name = t, t = r.partials[t]) : t = "@partial-block" === r.name ? r.data["partial-block"] : r.partials[r.name];return t; + }, e.invokePartial = function (t, e, r) { + var n = r.data && r.data["partial-block"];r.partial = !0, r.ids && (r.data.contextPath = r.ids[0] || r.data.contextPath);var o = void 0;r.fn && r.fn !== s && function () { + r.data = base.createFrame(r.data);var t = r.fn;o = r.data["partial-block"] = function (e) { + var r = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];return r.data = base.createFrame(r.data), r.data["partial-block"] = n, t(e, r); + }, t.partials && (r.partials = a.extend({}, r.partials, t.partials)); + }();void 0 === t && o && (t = o);if (void 0 === t) throw new i.default("The partial " + r.name + " could not be found");if (t instanceof Function) return t(e, r); + }, e.noop = s;var r, + a = 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; + }(utils), + i = (r = exception) && r.__esModule ? r : { default: r };function n(t, e, r, a, i, n, s) { + function l(e) { + var i = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], + o = s;return !s || e == s[0] || e === t.nullContext && null === s[0] || (o = [e].concat(s)), r(t, e, t.helpers, t.partials, i.data || a, n && [i.blockParams].concat(n), o); + }return (l = o(r, l, t, s, a, n)).program = e, l.depth = s ? s.length : 0, l.blockParams = i || 0, l; + }function s() { + return ""; + }function o(t, e, r, i, n, s) { + if (t.decorator) { + var o = {};e = t.decorator(e, o, r, i && i[0], n, s, i), a.extend(e, o); + }return e; + } +});unwrapExports(runtime);var noConflict = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.default = function (t) { + var e = void 0 !== commonjsGlobal ? commonjsGlobal : window, + r = e.Handlebars;t.noConflict = function () { + return e.Handlebars === t && (e.Handlebars = r), t; + }; + }, t.exports = e.default; +});unwrapExports(noConflict);var handlebars_runtime = createCommonjsModule(function (t, e) { + function r(t) { + return t && t.__esModule ? t : { default: t }; + }function a(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; + }e.__esModule = !0;var i = a(base), + n = r(safeString), + s = r(exception), + o = a(utils), + l = a(runtime), + c = r(noConflict);function u() { + var t = new i.HandlebarsEnvironment();return o.extend(t, i), t.SafeString = n.default, t.Exception = s.default, t.Utils = o, t.escapeExpression = o.escapeExpression, t.VM = l, t.template = function (e) { + return l.template(e, t); + }, t; + }var p = u();p.create = u, c.default(p), p.default = p, e.default = p, t.exports = e.default; +});unwrapExports(handlebars_runtime);var ast = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r = { helpers: { helperExpression: function helperExpression(t) { + return "SubExpression" === t.type || ("MustacheStatement" === t.type || "BlockStatement" === t.type) && !!(t.params && t.params.length || t.hash); + }, scopedId: function scopedId(t) { + return (/^\.|this\b/.test(t.original) + ); + }, simpleId: function simpleId(t) { + return 1 === t.parts.length && !r.helpers.scopedId(t) && !t.depth; + } } };e.default = r, t.exports = e.default; +});unwrapExports(ast);var parser = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r = function () { + var t = { trace: function trace() {}, yy: {}, symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, partialBlock: 12, content: 13, COMMENT: 14, CONTENT: 15, openRawBlock: 16, rawBlock_repetition_plus0: 17, END_RAW_BLOCK: 18, OPEN_RAW_BLOCK: 19, helperName: 20, openRawBlock_repetition0: 21, openRawBlock_option0: 22, CLOSE_RAW_BLOCK: 23, openBlock: 24, block_option0: 25, closeBlock: 26, openInverse: 27, block_option1: 28, OPEN_BLOCK: 29, openBlock_repetition0: 30, openBlock_option0: 31, openBlock_option1: 32, CLOSE: 33, OPEN_INVERSE: 34, openInverse_repetition0: 35, openInverse_option0: 36, openInverse_option1: 37, openInverseChain: 38, OPEN_INVERSE_CHAIN: 39, openInverseChain_repetition0: 40, openInverseChain_option0: 41, openInverseChain_option1: 42, inverseAndProgram: 43, INVERSE: 44, inverseChain: 45, inverseChain_option0: 46, OPEN_ENDBLOCK: 47, OPEN: 48, mustache_repetition0: 49, mustache_option0: 50, OPEN_UNESCAPED: 51, mustache_repetition1: 52, mustache_option1: 53, CLOSE_UNESCAPED: 54, OPEN_PARTIAL: 55, partialName: 56, partial_repetition0: 57, partial_option0: 58, openPartialBlock: 59, OPEN_PARTIAL_BLOCK: 60, openPartialBlock_repetition0: 61, openPartialBlock_option0: 62, param: 63, sexpr: 64, OPEN_SEXPR: 65, sexpr_repetition0: 66, sexpr_option0: 67, CLOSE_SEXPR: 68, hash: 69, hash_repetition_plus0: 70, hashSegment: 71, ID: 72, EQUALS: 73, blockParams: 74, OPEN_BLOCK_PARAMS: 75, blockParams_repetition_plus0: 76, CLOSE_BLOCK_PARAMS: 77, path: 78, dataName: 79, STRING: 80, NUMBER: 81, BOOLEAN: 82, UNDEFINED: 83, NULL: 84, DATA: 85, pathSegments: 86, SEP: 87, $accept: 0, $end: 1 }, terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], performAction: function performAction(t, e, r, a, i, n, s) { + var o = n.length - 1;switch (i) {case 1: + return n[o - 1];case 2: + this.$ = a.prepareProgram(n[o]);break;case 3:case 4:case 5:case 6:case 7:case 8: + this.$ = n[o];break;case 9: + this.$ = { type: "CommentStatement", value: a.stripComment(n[o]), strip: a.stripFlags(n[o], n[o]), loc: a.locInfo(this._$) };break;case 10: + this.$ = { type: "ContentStatement", original: n[o], value: n[o], loc: a.locInfo(this._$) };break;case 11: + this.$ = a.prepareRawBlock(n[o - 2], n[o - 1], n[o], this._$);break;case 12: + this.$ = { path: n[o - 3], params: n[o - 2], hash: n[o - 1] };break;case 13: + this.$ = a.prepareBlock(n[o - 3], n[o - 2], n[o - 1], n[o], !1, this._$);break;case 14: + this.$ = a.prepareBlock(n[o - 3], n[o - 2], n[o - 1], n[o], !0, this._$);break;case 15: + this.$ = { open: n[o - 5], path: n[o - 4], params: n[o - 3], hash: n[o - 2], blockParams: n[o - 1], strip: a.stripFlags(n[o - 5], n[o]) };break;case 16:case 17: + this.$ = { path: n[o - 4], params: n[o - 3], hash: n[o - 2], blockParams: n[o - 1], strip: a.stripFlags(n[o - 5], n[o]) };break;case 18: + this.$ = { strip: a.stripFlags(n[o - 1], n[o - 1]), program: n[o] };break;case 19: + var l = a.prepareBlock(n[o - 2], n[o - 1], n[o], n[o], !1, this._$), + c = a.prepareProgram([l], n[o - 1].loc);c.chained = !0, this.$ = { strip: n[o - 2].strip, program: c, chain: !0 };break;case 20: + this.$ = n[o];break;case 21: + this.$ = { path: n[o - 1], strip: a.stripFlags(n[o - 2], n[o]) };break;case 22:case 23: + this.$ = a.prepareMustache(n[o - 3], n[o - 2], n[o - 1], n[o - 4], a.stripFlags(n[o - 4], n[o]), this._$);break;case 24: + this.$ = { type: "PartialStatement", name: n[o - 3], params: n[o - 2], hash: n[o - 1], indent: "", strip: a.stripFlags(n[o - 4], n[o]), loc: a.locInfo(this._$) };break;case 25: + this.$ = a.preparePartialBlock(n[o - 2], n[o - 1], n[o], this._$);break;case 26: + this.$ = { path: n[o - 3], params: n[o - 2], hash: n[o - 1], strip: a.stripFlags(n[o - 4], n[o]) };break;case 27:case 28: + this.$ = n[o];break;case 29: + this.$ = { type: "SubExpression", path: n[o - 3], params: n[o - 2], hash: n[o - 1], loc: a.locInfo(this._$) };break;case 30: + this.$ = { type: "Hash", pairs: n[o], loc: a.locInfo(this._$) };break;case 31: + this.$ = { type: "HashPair", key: a.id(n[o - 2]), value: n[o], loc: a.locInfo(this._$) };break;case 32: + this.$ = a.id(n[o - 1]);break;case 33:case 34: + this.$ = n[o];break;case 35: + this.$ = { type: "StringLiteral", value: n[o], original: n[o], loc: a.locInfo(this._$) };break;case 36: + this.$ = { type: "NumberLiteral", value: Number(n[o]), original: Number(n[o]), loc: a.locInfo(this._$) };break;case 37: + this.$ = { type: "BooleanLiteral", value: "true" === n[o], original: "true" === n[o], loc: a.locInfo(this._$) };break;case 38: + this.$ = { type: "UndefinedLiteral", original: void 0, value: void 0, loc: a.locInfo(this._$) };break;case 39: + this.$ = { type: "NullLiteral", original: null, value: null, loc: a.locInfo(this._$) };break;case 40:case 41: + this.$ = n[o];break;case 42: + this.$ = a.preparePath(!0, n[o], this._$);break;case 43: + this.$ = a.preparePath(!1, n[o], this._$);break;case 44: + n[o - 2].push({ part: a.id(n[o]), original: n[o], separator: n[o - 1] }), this.$ = n[o - 2];break;case 45: + this.$ = [{ part: a.id(n[o]), original: n[o] }];break;case 46: + this.$ = [];break;case 47: + n[o - 1].push(n[o]);break;case 48: + this.$ = [n[o]];break;case 49: + n[o - 1].push(n[o]);break;case 50: + this.$ = [];break;case 51: + n[o - 1].push(n[o]);break;case 58: + this.$ = [];break;case 59: + n[o - 1].push(n[o]);break;case 64: + this.$ = [];break;case 65: + n[o - 1].push(n[o]);break;case 70: + this.$ = [];break;case 71: + n[o - 1].push(n[o]);break;case 78: + this.$ = [];break;case 79: + n[o - 1].push(n[o]);break;case 82: + this.$ = [];break;case 83: + n[o - 1].push(n[o]);break;case 86: + this.$ = [];break;case 87: + n[o - 1].push(n[o]);break;case 90: + this.$ = [];break;case 91: + n[o - 1].push(n[o]);break;case 94: + this.$ = [];break;case 95: + n[o - 1].push(n[o]);break;case 98: + this.$ = [n[o]];break;case 99: + n[o - 1].push(n[o]);break;case 100: + this.$ = [n[o]];break;case 101: + n[o - 1].push(n[o]);} + }, table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] }, parseError: function parseError(t, e) { + throw new Error(t); + }, parse: function parse(t) { + var e = this, + r = [0], + a = [null], + i = [], + n = this.table, + s = "", + o = 0, + l = 0, + c = 0;this.lexer.setInput(t), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, this.yy.parser = this, void 0 === this.lexer.yylloc && (this.lexer.yylloc = {});var u = this.lexer.yylloc;i.push(u);var p = this.lexer.options && this.lexer.options.ranges;"function" == typeof this.yy.parseError && (this.parseError = this.yy.parseError);for (var h, d, m, f, g, b, v, y, k, S, w = {};;) { + if (m = r[r.length - 1], this.defaultActions[m] ? f = this.defaultActions[m] : (null !== h && void 0 !== h || (S = void 0, "number" != typeof (S = e.lexer.lex() || 1) && (S = e.symbols_[S] || S), h = S), f = n[m] && n[m][h]), void 0 === f || !f.length || !f[0]) { + var E = "";if (!c) { + for (b in k = [], n[m]) { + this.terminals_[b] && b > 2 && k.push("'" + this.terminals_[b] + "'"); + }E = this.lexer.showPosition ? "Parse error on line " + (o + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + k.join(", ") + ", got '" + (this.terminals_[h] || h) + "'" : "Parse error on line " + (o + 1) + ": Unexpected " + (1 == h ? "end of input" : "'" + (this.terminals_[h] || h) + "'"), this.parseError(E, { text: this.lexer.match, token: this.terminals_[h] || h, line: this.lexer.yylineno, loc: u, expected: k }); + } + }if (f[0] instanceof Array && f.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + m + ", token: " + h);switch (f[0]) {case 1: + r.push(h), a.push(this.lexer.yytext), i.push(this.lexer.yylloc), r.push(f[1]), h = null, d ? (h = d, d = null) : (l = this.lexer.yyleng, s = this.lexer.yytext, o = this.lexer.yylineno, u = this.lexer.yylloc, c > 0 && c--);break;case 2: + if (v = this.productions_[f[1]][1], w.$ = a[a.length - v], w._$ = { first_line: i[i.length - (v || 1)].first_line, last_line: i[i.length - 1].last_line, first_column: i[i.length - (v || 1)].first_column, last_column: i[i.length - 1].last_column }, p && (w._$.range = [i[i.length - (v || 1)].range[0], i[i.length - 1].range[1]]), void 0 !== (g = this.performAction.call(w, s, l, o, this.yy, f[1], a, i))) return g;v && (r = r.slice(0, -1 * v * 2), a = a.slice(0, -1 * v), i = i.slice(0, -1 * v)), r.push(this.productions_[f[1]][0]), a.push(w.$), i.push(w._$), y = n[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 parseError(t, e) { + if (!this.yy.parser) throw new Error(t);this.yy.parser.parseError(t, e); + }, setInput: function setInput(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 input() { + 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 unput(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 i = 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 = [i[0], i[0] + this.yyleng - e]), this; + }, more: function more() { + return this._more = !0, this; + }, less: function less(t) { + this.unput(this.match.slice(t)); + }, pastInput: function pastInput() { + var t = this.matched.substr(0, this.matched.length - this.match.length);return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, ""); + }, upcomingInput: function upcomingInput() { + 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 showPosition() { + var t = this.pastInput(), + e = new Array(t.length + 1).join("-");return t + this.upcomingInput() + "\n" + e + "^"; + }, next: function next() { + if (this.done) return this.EOF;var t, e, r, a, i;this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");for (var n = this._currentRules(), s = 0; s < n.length && (!(r = this._input.match(this.rules[n[s]])) || e && !(r[0].length > e[0].length) || (e = r, a = s, this.options.flex)); s++) {}return e ? ((i = e[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += i.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: i ? i[i.length - 1].length - i[i.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, n[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 lex() { + var t = this.next();return void 0 !== t ? t : this.lex(); + }, begin: function begin(t) { + this.conditionStack.push(t); + }, popState: function popState() { + return this.conditionStack.pop(); + }, _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, pushState: function pushState(t) { + this.begin(t); + }, options: {}, performAction: function performAction(t, e, r, a) { + function i(t, r) { + return e.yytext = e.yytext.substr(t, e.yyleng - r); + }switch (r) {case 0: + if ("\\\\" === e.yytext.slice(-2) ? (i(0, 1), this.begin("mu")) : "\\" === e.yytext.slice(-1) ? (i(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 = i(1, 2).replace(/\\"/g, '"'), 80;case 32: + return e.yytext = i(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; +});unwrapExports(parser);var visitor = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r, + a = (r = exception) && r.__esModule ? r : { default: r };function i() { + this.parents = []; + }function n(t) { + this.acceptRequired(t, "path"), this.acceptArray(t.params), this.acceptKey(t, "hash"); + }function s(t) { + n.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"); + }i.prototype = { constructor: i, mutating: !1, acceptKey: function acceptKey(t, e) { + var r = this.accept(t[e]);if (this.mutating) { + if (r && !i.prototype[r.type]) throw new a.default('Unexpected node type "' + r.type + '" found when accepting ' + e + " on " + t.type);t[e] = r; + } + }, acceptRequired: function acceptRequired(t, e) { + if (this.acceptKey(t, e), !t[e]) throw new a.default(t.type + " requires " + e); + }, acceptArray: function acceptArray(t) { + for (var e = 0, r = t.length; e < r; e++) { + this.acceptKey(t, e), t[e] || (t.splice(e, 1), e--, r--); + } + }, accept: function accept(t) { + if (t) { + if (!this[t.type]) throw new a.default("Unknown type: " + t.type, t);this.current && this.parents.unshift(this.current), this.current = t;var e = this[t.type](t);return this.current = this.parents.shift(), !this.mutating || e ? e : !1 !== e ? t : void 0; + } + }, Program: function Program(t) { + this.acceptArray(t.body); + }, MustacheStatement: n, Decorator: n, BlockStatement: s, DecoratorBlock: s, PartialStatement: o, PartialBlockStatement: function PartialBlockStatement(t) { + o.call(this, t), this.acceptKey(t, "program"); + }, ContentStatement: function ContentStatement() {}, CommentStatement: function CommentStatement() {}, SubExpression: n, PathExpression: function PathExpression() {}, StringLiteral: function StringLiteral() {}, NumberLiteral: function NumberLiteral() {}, BooleanLiteral: function BooleanLiteral() {}, UndefinedLiteral: function UndefinedLiteral() {}, NullLiteral: function NullLiteral() {}, Hash: function Hash(t) { + this.acceptArray(t.pairs); + }, HashPair: function HashPair(t) { + this.acceptRequired(t, "value"); + } }, e.default = i, t.exports = e.default; +});unwrapExports(visitor);var whitespaceControl = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r, + a = (r = visitor) && r.__esModule ? r : { default: r };function i() { + var t = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];this.options = t; + }function n(t, e, r) { + void 0 === e && (e = t.length);var a = t[e - 1], + i = t[e - 2];return a ? "ContentStatement" === a.type ? (i || !r ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(a.original) : void 0 : r; + }function s(t, e, r) { + void 0 === e && (e = -1);var a = t[e + 1], + i = t[e + 2];return a ? "ContentStatement" === a.type ? (i || !r ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(a.original) : void 0 : r; + }function o(t, e, r) { + var a = t[null == e ? 0 : e + 1];if (a && "ContentStatement" === a.type && (r || !a.rightStripped)) { + var i = a.value;a.value = a.value.replace(r ? /^\s+/ : /^[ \t]*\r?\n?/, ""), a.rightStripped = a.value !== i; + } + }function l(t, e, r) { + var a = t[null == e ? t.length - 1 : e - 1];if (a && "ContentStatement" === a.type && (r || !a.leftStripped)) { + var i = a.value;return a.value = a.value.replace(r ? /\s+$/ : /[ \t]+$/, ""), a.leftStripped = a.value !== i, a.leftStripped; + } + }i.prototype = new a.default(), i.prototype.Program = function (t) { + var e = !this.options.ignoreStandalone, + r = !this.isRootSeen;this.isRootSeen = !0;for (var a = t.body, i = 0, c = a.length; i < c; i++) { + var u = a[i], + p = this.accept(u);if (p) { + var h = n(a, i, r), + d = s(a, i, r), + m = p.openStandalone && h, + f = p.closeStandalone && d, + g = p.inlineStandalone && h && d;p.close && o(a, i, !0), p.open && l(a, i, !0), e && g && (o(a, i), l(a, i) && "PartialStatement" === u.type && (u.indent = /([ \t]+$)/.exec(a[i - 1].original)[1])), e && m && (o((u.program || u.inverse).body), l(a, i)), e && f && (o(a, i), l((u.inverse || u.program).body)); + } + }return t; + }, i.prototype.BlockStatement = i.prototype.DecoratorBlock = i.prototype.PartialBlockStatement = function (t) { + this.accept(t.program), this.accept(t.inverse);var e = t.program || t.inverse, + r = t.program && t.inverse, + a = r, + i = r;if (r && r.chained) for (a = r.body[0].program; i.chained;) { + i = i.body[i.body.length - 1].program; + }var c = { open: t.openStrip.open, close: t.closeStrip.close, openStandalone: s(e.body), closeStandalone: n((a || e).body) };if (t.openStrip.close && o(e.body, null, !0), r) { + var u = t.inverseStrip;u.open && l(e.body, null, !0), u.close && o(a.body, null, !0), t.closeStrip.open && l(i.body, null, !0), !this.options.ignoreStandalone && n(e.body) && s(a.body) && (l(e.body), o(a.body)); + } else t.closeStrip.open && l(e.body, null, !0);return c; + }, i.prototype.Decorator = i.prototype.MustacheStatement = function (t) { + return t.strip; + }, i.prototype.PartialStatement = i.prototype.CommentStatement = function (t) { + var e = t.strip || {};return { inlineStandalone: !0, open: e.open, close: e.close }; + }, e.default = i, t.exports = e.default; +});unwrapExports(whitespaceControl);var helpers$2 = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.SourceLocation = function (t, e) { + this.source = t, this.start = { line: e.first_line, column: e.first_column }, this.end = { line: e.last_line, column: e.last_column }; + }, e.id = function (t) { + return (/^\[.*\]$/.test(t) ? t.substr(1, t.length - 2) : t + ); + }, e.stripFlags = function (t, e) { + return { open: "~" === t.charAt(2), close: "~" === e.charAt(e.length - 3) }; + }, e.stripComment = function (t) { + return t.replace(/^\{\{~?\!-?-?/, "").replace(/-?-?~?\}\}$/, ""); + }, e.preparePath = function (t, e, r) { + r = this.locInfo(r);for (var i = t ? "@" : "", n = [], s = 0, o = 0, l = e.length; o < l; o++) { + var c = e[o].part, + u = e[o].original !== c;if (i += (e[o].separator || "") + c, u || ".." !== c && "." !== c && "this" !== c) n.push(c);else { + if (n.length > 0) throw new a.default("Invalid path: " + i, { loc: r });".." === c && (s++, "../"); + } + }return { type: "PathExpression", data: t, depth: s, parts: n, original: i, loc: r }; + }, e.prepareMustache = function (t, e, r, a, i, n) { + 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: i, loc: this.locInfo(n) }; + }, e.prepareRawBlock = function (t, e, r, a) { + i(t, r), a = this.locInfo(a);var n = { type: "Program", body: e, strip: {}, loc: a };return { type: "BlockStatement", path: t.path, params: t.params, hash: t.hash, program: n, openStrip: {}, inverseStrip: {}, closeStrip: {}, loc: a }; + }, e.prepareBlock = function (t, e, r, n, s, o) { + n && n.path && i(t, n);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 = n.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: n && n.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 i(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 = exception) && r.__esModule ? r : { default: r };function i(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); + } + } +});unwrapExports(helpers$2);var base$2 = createCommonjsModule(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 i.default(e).accept(a.default.parse(t)); + };var a = r(parser), + i = r(whitespaceControl), + n = 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; + }(helpers$2);e.parser = a.default;var s = {};utils.extend(s, n); +});unwrapExports(base$2);var compiler = createCommonjsModule(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 i = r.parse(t, e), + n = new r.Compiler().compile(i, e);return new r.JavaScriptCompiler().compile(n, 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 = utils.extend({}, e)) || (e.data = !0);e.compat && (e.useDepths = !0);var i = void 0;function n() { + var a = r.parse(t, e), + i = new r.Compiler().compile(a, e), + n = new r.JavaScriptCompiler().compile(i, e, void 0, !0);return r.template(n); + }function s(t, e) { + return i || (i = n()), i.call(this, t, e); + }return s._setup = function (t) { + return i || (i = n()), i._setup(t); + }, s._child = function (t, e, r, a) { + return i || (i = n()), i._child(t, e, r, a); + }, s; + };var a = r(exception), + i = r(ast), + n = [].slice;function s() {}function o(t, e) { + if (t === e) return !0;if (utils.isArray(t) && utils.isArray(e) && t.length === e.length) { + for (var r = 0; r < t.length; r++) { + if (!o(t[r], e[r])) return !1; + }return !0; + } + }function l(t) { + if (!t.path.parts) { + var e = t.path;t.path = { type: "PathExpression", data: !1, depth: 0, parts: [e.original + ""], original: e.original + "", loc: e.loc }; + } + }s.prototype = { compiler: s, equals: function equals(t) { + var e = this.opcodes.length;if (t.opcodes.length !== e) return !1;for (var r = 0; r < e; r++) { + var a = this.opcodes[r], + i = t.opcodes[r];if (a.opcode !== i.opcode || !o(a.args, i.args)) return !1; + }e = this.children.length;for (r = 0; r < e; r++) { + if (!this.children[r].equals(t.children[r])) return !1; + }return !0; + }, guid: 0, compile: function compile(t, e) { + this.sourceNode = [], this.opcodes = [], this.children = [], this.options = e, this.stringParams = e.stringParams, this.trackIds = e.trackIds, e.blockParams = e.blockParams || [];var r = e.knownHelpers;if (e.knownHelpers = { helperMissing: !0, blockHelperMissing: !0, each: !0, if: !0, unless: !0, with: !0, log: !0, lookup: !0 }, r) for (var a in r) { + a in r && (this.options.knownHelpers[a] = r[a]); + }return this.accept(t); + }, compileProgram: function compileProgram(t) { + var e = new this.compiler().compile(t, this.options), + r = this.guid++;return this.usePartial = this.usePartial || e.usePartial, this.children[r] = e, this.useDepths = this.useDepths || e.useDepths, r; + }, accept: function accept(t) { + if (!this[t.type]) throw new a.default("Unknown type: " + t.type, t);this.sourceNode.unshift(t);var e = this[t.type](t);return this.sourceNode.shift(), e; + }, Program: function Program(t) { + this.options.blockParams.unshift(t.blockParams);for (var e = t.body, r = e.length, a = 0; a < r; a++) { + this.accept(e[a]); + }return this.options.blockParams.shift(), this.isSimple = 1 === r, this.blockParams = t.blockParams ? t.blockParams.length : 0, this; + }, BlockStatement: function BlockStatement(t) { + l(t);var e = t.program, + r = t.inverse;e = e && this.compileProgram(e), r = r && this.compileProgram(r);var a = this.classifySexpr(t);"helper" === a ? this.helperSexpr(t, e, r) : "simple" === a ? (this.simpleSexpr(t), this.opcode("pushProgram", e), this.opcode("pushProgram", r), this.opcode("emptyHash"), this.opcode("blockValue", t.path.original)) : (this.ambiguousSexpr(t, e, r), this.opcode("pushProgram", e), this.opcode("pushProgram", r), this.opcode("emptyHash"), this.opcode("ambiguousBlockValue")), this.opcode("append"); + }, DecoratorBlock: function DecoratorBlock(t) { + var e = t.program && this.compileProgram(t.program), + r = this.setupFullMustacheParams(t, e, void 0), + a = t.path;this.useDecorators = !0, this.opcode("registerDecorator", r.length, a.original); + }, PartialStatement: function PartialStatement(t) { + this.usePartial = !0;var e = t.program;e && (e = this.compileProgram(t.program));var r = t.params;if (r.length > 1) 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 i = t.name.original, + n = "SubExpression" === t.name.type;n && 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", n, i, s), this.opcode("append"); + }, PartialBlockStatement: function PartialBlockStatement(t) { + this.PartialStatement(t); + }, MustacheStatement: function MustacheStatement(t) { + this.SubExpression(t), t.escaped && !this.options.noEscape ? this.opcode("appendEscaped") : this.opcode("append"); + }, Decorator: function Decorator(t) { + this.DecoratorBlock(t); + }, ContentStatement: function ContentStatement(t) { + t.value && this.opcode("appendContent", t.value); + }, CommentStatement: function CommentStatement() {}, SubExpression: function SubExpression(t) { + l(t);var e = this.classifySexpr(t);"simple" === e ? this.simpleSexpr(t) : "helper" === e ? this.helperSexpr(t) : this.ambiguousSexpr(t); + }, ambiguousSexpr: function ambiguousSexpr(t, e, r) { + var a = t.path, + i = a.parts[0], + n = 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", i, n); + }, simpleSexpr: function simpleSexpr(t) { + var e = t.path;e.strict = !0, this.accept(e), this.opcode("resolvePossibleLambda"); + }, helperSexpr: function helperSexpr(t, e, r) { + var n = this.setupFullMustacheParams(t, e, r), + s = t.path, + o = s.parts[0];if (this.options.knownHelpers[o]) this.opcode("invokeKnownHelper", n.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", n.length, s.original, i.default.helpers.simpleId(s)); + } + }, PathExpression: function PathExpression(t) { + this.addDepth(t.depth), this.opcode("getContext", t.depth);var e = t.parts[0], + r = i.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 StringLiteral(t) { + this.opcode("pushString", t.value); + }, NumberLiteral: function NumberLiteral(t) { + this.opcode("pushLiteral", t.value); + }, BooleanLiteral: function BooleanLiteral(t) { + this.opcode("pushLiteral", t.value); + }, UndefinedLiteral: function UndefinedLiteral() { + this.opcode("pushLiteral", "undefined"); + }, NullLiteral: function NullLiteral() { + this.opcode("pushLiteral", "null"); + }, Hash: function Hash(t) { + var e = t.pairs, + r = 0, + a = e.length;for (this.opcode("pushHash"); r < a; r++) { + this.pushParam(e[r].value); + }for (; r--;) { + this.opcode("assignToHash", e[r].key); + }this.opcode("popHash"); + }, opcode: function opcode(t) { + this.opcodes.push({ opcode: t, args: n.call(arguments, 1), loc: this.sourceNode[0].loc }); + }, addDepth: function addDepth(t) { + t && (this.useDepths = !0); + }, classifySexpr: function classifySexpr(t) { + var e = i.default.helpers.simpleId(t.path), + r = e && !!this.blockParamIndex(t.path.parts[0]), + a = !r && i.default.helpers.helperExpression(t), + n = !r && (a || e);if (n && !a) { + var s = t.path.parts[0], + o = this.options;o.knownHelpers[s] ? a = !0 : o.knownHelpersOnly && (n = !1); + }return a ? "helper" : n ? "ambiguous" : "simple"; + }, pushParams: function pushParams(t) { + for (var e = 0, r = t.length; e < r; e++) { + this.pushParam(t[e]); + } + }, pushParam: function pushParam(t) { + var e = null != t.value ? t.value : t.original || "";if (this.stringParams) e.replace && (e = e.replace(/^(\.?\.\/)*/g, "").replace(/\//g, ".")), t.depth && this.addDepth(t.depth), this.opcode("getContext", t.depth || 0), this.opcode("pushStringParam", e, t.type), "SubExpression" === t.type && this.accept(t);else { + if (this.trackIds) { + var r = void 0;if (!t.parts || i.default.helpers.scopedId(t) || t.depth || (r = this.blockParamIndex(t.parts[0])), r) { + var a = t.parts.slice(1).join(".");this.opcode("pushId", "BlockParam", r, a); + } else (e = t.original || e).replace && (e = e.replace(/^this(?:\.|$)/, "").replace(/^\.\//, "").replace(/^\.$/, "")), this.opcode("pushId", t.type, e); + }this.accept(t); + } + }, setupFullMustacheParams: function setupFullMustacheParams(t, e, r, a) { + var i = t.params;return this.pushParams(i), this.opcode("pushProgram", e), this.opcode("pushProgram", r), t.hash ? this.accept(t.hash) : this.opcode("emptyHash", a), i; + }, blockParamIndex: function blockParamIndex(t) { + for (var e = 0, r = this.options.blockParams.length; e < r; e++) { + var a = this.options.blockParams[e], + i = a && utils.indexOf(a, t);if (a && i >= 0) return [e, i]; + } + } }; +});unwrapExports(compiler);var codeGen = createCommonjsModule(function (t, e) { + e.__esModule = !0;var r = void 0;try { + var a = require("source-map");r = a.SourceNode; + } catch (t) {}function i(t, e, r) { + if (utils.isArray(t)) { + for (var a = [], i = 0, n = t.length; i < n; i++) { + a.push(e.wrap(t[i], r)); + }return a; + }return "boolean" == typeof t || "number" == typeof t ? t + "" : t; + }function n(t) { + this.srcFile = t, this.source = []; + }r || ((r = function r(t, e, _r7, a) { + this.src = "", a && this.add(a); + }).prototype = { add: function add(t) { + utils.isArray(t) && (t = t.join("")), this.src += t; + }, prepend: function prepend(t) { + utils.isArray(t) && (t = t.join("")), this.src = t + this.src; + }, toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, toString: function toString() { + return this.src; + } }), n.prototype = { isEmpty: function isEmpty() { + return !this.source.length; + }, prepend: function prepend(t, e) { + this.source.unshift(this.wrap(t, e)); + }, push: function push(t, e) { + this.source.push(this.wrap(t, e)); + }, merge: function merge() { + var t = this.empty();return this.each(function (e) { + t.add([" ", e, "\n"]); + }), t; + }, each: function each(t) { + for (var e = 0, r = this.source.length; e < r; e++) { + t(this.source[e]); + } + }, empty: function empty() { + var t = this.currentLocation || { start: {} };return new r(t.start.line, t.start.column, this.srcFile); + }, wrap: function wrap(t) { + var e = arguments.length <= 1 || void 0 === arguments[1] ? this.currentLocation || { start: {} } : arguments[1];return t instanceof r ? t : (t = i(t, this, e), new r(e.start.line, e.start.column, this.srcFile, t)); + }, functionCall: function functionCall(t, e, r) { + return r = this.generateList(r), this.wrap([t, e ? "." + e + "(" : "(", r, ")"]); + }, quotedString: function quotedString(t) { + return '"' + (t + "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"'; + }, objectLiteral: function objectLiteral(t) { + var e = [];for (var r in t) { + if (t.hasOwnProperty(r)) { + var a = i(t[r], this);"undefined" !== a && e.push([this.quotedString(r), ":", a]); + } + }var n = this.generateList(e);return n.prepend("{"), n.add("}"), n; + }, generateList: function generateList(t) { + for (var e = this.empty(), r = 0, a = t.length; r < a; r++) { + r && e.add(","), e.add(i(t[r], this)); + }return e; + }, generateArray: function generateArray(t) { + var e = this.generateList(t);return e.prepend("["), e.add("]"), e; + } }, e.default = n, t.exports = e.default; +});unwrapExports(codeGen);var javascriptCompiler = createCommonjsModule(function (t, e) { + function r(t) { + return t && t.__esModule ? t : { default: t }; + }e.__esModule = !0;var a = r(exception), + i = r(codeGen);function n(t) { + this.value = t; + }function s() {}s.prototype = { nameLookup: function nameLookup(t, e) { + return s.isValidJavaScriptVariableName(e) ? [t, ".", e] : [t, "[", JSON.stringify(e), "]"]; + }, depthedLookup: function depthedLookup(t) { + return [this.aliasable("container.lookup"), '(depths, "', t, '")']; + }, compilerInfo: function compilerInfo() { + var t = base.COMPILER_REVISION;return [t, base.REVISION_CHANGES[t]]; + }, appendToBuffer: function appendToBuffer(t, e, r) { + return utils.isArray(t) || (t = [t]), t = this.source.wrap(t, e), this.environment.isSimple ? ["return ", t, ";"] : r ? ["buffer += ", t, ";"] : (t.appendToBuffer = !0, t); + }, initializeBuffer: function initializeBuffer() { + return this.quotedString(""); + }, compile: function compile(t, e, r, i) { + this.environment = t, this.options = e, this.stringParams = this.options.stringParams, this.trackIds = this.options.trackIds, this.precompile = !i, this.name = this.environment.name, this.isChild = !!r, this.context = r || { decorators: [], programs: [], environments: [] }, this.preamble(), this.stackSlot = 0, this.stackVars = [], this.aliases = {}, this.registers = { list: [] }, this.hashes = [], this.compileStack = [], this.inlineStack = [], this.blockParams = [], this.compileChildren(t, e), this.useDepths = this.useDepths || t.useDepths || t.useDecorators || this.options.compat, this.useBlockParams = this.useBlockParams || t.useBlockParams;var n = t.opcodes, + s = void 0, + o = void 0, + l = void 0, + c = void 0;for (l = 0, c = n.length; l < c; l++) { + s = n[l], this.source.currentLocation = s.loc, o = o || s.loc, this[s.opcode].apply(this, s.args); + }if (this.source.currentLocation = o, this.pushSource(""), this.stackSlot || this.inlineStack.length || this.compileStack.length) throw new a.default("Compile completed with content left on stack");this.decorators.isEmpty() ? this.decorators = void 0 : (this.useDecorators = !0, this.decorators.prepend("var decorators = container.decorators;\n"), this.decorators.push("return fn;"), i ? this.decorators = Function.apply(this, ["fn", "props", "container", "depth0", "data", "blockParams", "depths", this.decorators.merge()]) : (this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"), this.decorators.push("}\n"), this.decorators = this.decorators.merge()));var u = this.createFunctionContext(i);if (this.isChild) return u;var p = { compiler: this.compilerInfo(), main: u };this.decorators && (p.main_d = this.decorators, p.useDecorators = !0);var h = this.context, + d = h.programs, + m = h.decorators;for (l = 0, c = d.length; l < c; l++) { + d[l] && (p[l] = d[l], m[l] && (p[l + "_d"] = m[l], p.useDecorators = !0)); + }return this.environment.usePartial && (p.usePartial = !0), this.options.data && (p.useData = !0), this.useDepths && (p.useDepths = !0), this.useBlockParams && (p.useBlockParams = !0), this.options.compat && (p.compat = !0), i ? p.compilerOptions = this.options : (p.compiler = JSON.stringify(p.compiler), this.source.currentLocation = { start: { line: 1, column: 0 } }, p = this.objectLiteral(p), e.srcName ? (p = p.toStringWithSourceMap({ file: e.destName })).map = p.map && p.map.toString() : p = p.toString()), p; + }, preamble: function preamble() { + this.lastContext = 0, this.source = new i.default(this.options.srcName), this.decorators = new i.default(this.options.srcName); + }, createFunctionContext: function createFunctionContext(t) { + var e = "", + r = this.stackVars.concat(this.registers.list);r.length > 0 && (e += ", " + r.join(", "));var a = 0;for (var i in this.aliases) { + var n = this.aliases[i];this.aliases.hasOwnProperty(i) && n.children && n.referenceCount > 1 && (e += ", alias" + ++a + "=" + i, n.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 mergeSource(t) { + var e = this.environment.isSimple, + r = !this.forceBuffer, + a = void 0, + i = void 0, + n = void 0, + s = void 0;return this.source.each(function (t) { + t.appendToBuffer ? (n ? t.prepend(" + ") : n = t, s = t) : (n && (i ? n.prepend("buffer += ") : a = !0, s.add(";"), n = s = void 0), i = !0, e || (r = !1)); + }), r ? n ? (n.prepend("return "), s.add(";")) : i || this.source.push('return "";') : (t += ", buffer = " + (a ? "" : this.initializeBuffer()), n ? (n.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 blockValue(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 ambiguousBlockValue() { + 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 appendContent(t) { + this.pendingContent ? t = this.pendingContent + t : this.pendingLocation = this.source.currentLocation, this.pendingContent = t; + }, append: function append() { + 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 appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"), "(", this.popStack(), ")"])); + }, getContext: function getContext(t) { + this.lastContext = t; + }, pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, lookupOnContext: function lookupOnContext(t, e, r, a) { + var i = 0;a || !this.options.compat || this.lastContext ? this.pushContext() : this.push(this.depthedLookup(t[i++])), this.resolvePath("context", t, i, e, r); + }, lookupBlockParam: function lookupBlockParam(t, e) { + this.useBlockParams = !0, this.push(["blockParams[", t[0], "][", t[1], "]"]), this.resolvePath("context", e, 1); + }, lookupData: function lookupData(t, e, r) { + t ? this.pushStackLiteral("container.data(data, " + t + ")") : this.pushStackLiteral("data"), this.resolvePath("data", e, 0, !0, r); + }, resolvePath: function resolvePath(t, e, r, a, i) { + var n = this;if (this.options.strict || this.options.assumeObjects) this.push(function (t, e, r, a) { + var i = e.popStack(), + n = 0, + s = r.length;t && s--;for (; n < s; n++) { + i = e.nameLookup(i, r[n], a); + }return t ? [e.aliasable("container.strict"), "(", i, ", ", e.quotedString(r[n]), ")"] : i; + }(this.options.strict && i, this, e, t));else for (var s = e.length; r < s; r++) { + this.replaceStack(function (i) { + var s = n.nameLookup(i, e[r], t);return a ? [" && ", s] : [" != null ? ", s, " : ", i]; + }); + } + }, resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable("container.lambda"), "(", this.popStack(), ", ", this.contextName(0), ")"]); + }, pushStringParam: function pushStringParam(t, e) { + this.pushContext(), this.pushString(e), "SubExpression" !== e && ("string" == typeof t ? this.pushString(t) : this.pushStackLiteral(t)); + }, emptyHash: function emptyHash(t) { + this.trackIds && this.push("{}"), this.stringParams && (this.push("{}"), this.push("{}")), this.pushStackLiteral(t ? "undefined" : "{}"); + }, pushHash: function pushHash() { + this.hash && this.hashes.push(this.hash), this.hash = { values: [], types: [], contexts: [], ids: [] }; + }, popHash: function popHash() { + var t = this.hash;this.hash = this.hashes.pop(), this.trackIds && this.push(this.objectLiteral(t.ids)), this.stringParams && (this.push(this.objectLiteral(t.contexts)), this.push(this.objectLiteral(t.types))), this.push(this.objectLiteral(t.values)); + }, pushString: function pushString(t) { + this.pushStackLiteral(this.quotedString(t)); + }, pushLiteral: function pushLiteral(t) { + this.pushStackLiteral(t); + }, pushProgram: function pushProgram(t) { + null != t ? this.pushStackLiteral(this.programExpression(t)) : this.pushStackLiteral(null); + }, registerDecorator: function registerDecorator(t, e) { + var r = this.nameLookup("decorators", e, "decorator"), + a = this.setupHelperArgs(e, t);this.decorators.push(["fn = ", this.decorators.functionCall(r, "", ["fn", "props", "container", a]), " || fn;"]); + }, invokeHelper: function invokeHelper(t, e, r) { + var a = this.popStack(), + i = this.setupHelper(t, e), + n = r ? [i.name, " || "] : "", + s = ["("].concat(n, a);this.options.strict || s.push(" || ", this.aliasable("helpers.helperMissing")), s.push(")"), this.push(this.source.functionCall(s, "call", i.callParams)); + }, invokeKnownHelper: function invokeKnownHelper(t, e) { + var r = this.setupHelper(t, e);this.push(this.source.functionCall(r.name, "call", r.callParams)); + }, invokeAmbiguous: function invokeAmbiguous(t, e) { + this.useRegister("helper");var r = this.popStack();this.emptyHash();var a = this.setupHelper(0, t, e), + i = ["(", "(helper = ", this.lastHelper = this.nameLookup("helpers", t, "helper"), " || ", r, ")"];this.options.strict || (i[0] = "(helper = ", i.push(" != null ? helper : ", this.aliasable("helpers.helperMissing"))), this.push(["(", i, a.paramsInit ? ["),(", a.paramsInit] : [], "),", "(typeof helper === ", this.aliasable('"function"'), " ? ", this.source.functionCall("helper", "call", a.callParams), " : helper))"]); + }, invokePartial: function invokePartial(t, e, r) { + var a = [], + i = this.setupParams(e, 1, a);t && (e = this.popStack(), delete i.name), r && (i.indent = JSON.stringify(r)), i.helpers = "helpers", i.partials = "partials", i.decorators = "container.decorators", t ? a.unshift(e) : a.unshift(this.nameLookup("partials", e, "partial")), this.options.compat && (i.depths = "depths"), i = this.objectLiteral(i), a.push(i), this.push(this.source.functionCall("container.invokePartial", "", a)); + }, assignToHash: function assignToHash(t) { + var e = this.popStack(), + r = void 0, + a = void 0, + i = void 0;this.trackIds && (i = this.popStack()), this.stringParams && (a = this.popStack(), r = this.popStack());var n = this.hash;r && (n.contexts[t] = r), a && (n.types[t] = a), i && (n.ids[t] = i), n.values[t] = e; + }, pushId: function pushId(t, e, r) { + "BlockParam" === t ? this.pushStackLiteral("blockParams[" + e[0] + "].path[" + e[1] + "]" + (r ? " + " + JSON.stringify("." + r) : "")) : "PathExpression" === t ? this.pushString(e) : "SubExpression" === t ? this.pushStackLiteral("true") : this.pushStackLiteral("null"); + }, compiler: s, compileChildren: function compileChildren(t, e) { + for (var r = t.children, a = void 0, i = void 0, n = 0, s = r.length; n < s; n++) { + a = r[n], i = new this.compiler();var o = this.matchExistingProgram(a);if (null == o) { + this.context.programs.push("");var l = this.context.programs.length;a.index = l, a.name = "program" + l, this.context.programs[l] = i.compile(a, e, this.context, !this.precompile), this.context.decorators[l] = i.decorators, this.context.environments[l] = a, this.useDepths = this.useDepths || i.useDepths, this.useBlockParams = this.useBlockParams || i.useBlockParams, a.useDepths = this.useDepths, a.useBlockParams = this.useBlockParams; + } else a.index = o.index, a.name = "program" + o.index, this.useDepths = this.useDepths || o.useDepths, this.useBlockParams = this.useBlockParams || o.useBlockParams; + } + }, matchExistingProgram: function matchExistingProgram(t) { + for (var e = 0, r = this.context.environments.length; e < r; e++) { + var a = this.context.environments[e];if (a && a.equals(t)) return a; + } + }, programExpression: function programExpression(t) { + var e = this.environment.children[t], + r = [e.index, "data", e.blockParams];return (this.useBlockParams || this.useDepths) && r.push("blockParams"), this.useDepths && r.push("depths"), "container.program(" + r.join(", ") + ")"; + }, useRegister: function useRegister(t) { + this.registers[t] || (this.registers[t] = !0, this.registers.list.push(t)); + }, push: function push(t) { + return t instanceof n || (t = this.source.wrap(t)), this.inlineStack.push(t), t; + }, pushStackLiteral: function pushStackLiteral(t) { + this.push(new n(t)); + }, pushSource: function pushSource(t) { + this.pendingContent && (this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)), this.pendingContent = void 0), t && this.source.push(t); + }, replaceStack: function replaceStack(t) { + var e = ["("], + r = void 0, + i = void 0, + s = void 0;if (!this.isInline()) throw new a.default("replaceStack on non-inline");var o = this.popStack(!0);if (o instanceof n) e = ["(", r = [o.value]], s = !0;else { + i = !0;var l = this.incrStack();e = ["((", this.push(l), " = ", o, ")"], r = this.topStack(); + }var c = t.call(this, r);s || this.popStack(), i && this.stackSlot--, this.push(e.concat(c, ")")); + }, incrStack: function incrStack() { + return this.stackSlot++, this.stackSlot > this.stackVars.length && this.stackVars.push("stack" + this.stackSlot), this.topStackName(); + }, topStackName: function topStackName() { + return "stack" + this.stackSlot; + }, flushInline: function flushInline() { + var t = this.inlineStack;this.inlineStack = [];for (var e = 0, r = t.length; e < r; e++) { + var a = t[e];if (a instanceof n) this.compileStack.push(a);else { + var i = this.incrStack();this.pushSource([i, " = ", a, ";"]), this.compileStack.push(i); + } + } + }, isInline: function isInline() { + return this.inlineStack.length; + }, popStack: function popStack(t) { + var e = this.isInline(), + r = (e ? this.inlineStack : this.compileStack).pop();if (!t && r instanceof n) return r.value;if (!e) { + if (!this.stackSlot) throw new a.default("Invalid stack pop");this.stackSlot--; + }return r; + }, topStack: function topStack() { + var t = this.isInline() ? this.inlineStack : this.compileStack, + e = t[t.length - 1];return e instanceof n ? e.value : e; + }, contextName: function contextName(t) { + return this.useDepths && t ? "depths[" + t + "]" : "depth" + t; + }, quotedString: function quotedString(t) { + return this.source.quotedString(t); + }, objectLiteral: function objectLiteral(t) { + return this.source.objectLiteral(t); + }, aliasable: function aliasable(t) { + var e = this.aliases[t];return e ? (e.referenceCount++, e) : ((e = this.aliases[t] = this.source.wrap(t)).aliasable = !0, e.referenceCount = 1, e); + }, setupHelper: function setupHelper(t, e, r) { + var a = [];return { params: a, paramsInit: this.setupHelperArgs(e, t, a, r), name: this.nameLookup("helpers", e, "helper"), callParams: [this.aliasable(this.contextName(0) + " != null ? " + this.contextName(0) + " : (container.nullContext || {})")].concat(a) }; + }, setupParams: function setupParams(t, e, r) { + var a = {}, + i = [], + n = [], + s = [], + o = !r, + l = void 0;o && (r = []), a.name = this.quotedString(t), a.hash = this.popStack(), this.trackIds && (a.hashIds = this.popStack()), this.stringParams && (a.hashTypes = this.popStack(), a.hashContexts = this.popStack());var c = this.popStack(), + u = this.popStack();(u || c) && (a.fn = u || "container.noop", a.inverse = c || "container.noop");for (var p = e; p--;) { + l = this.popStack(), r[p] = l, this.trackIds && (s[p] = this.popStack()), this.stringParams && (n[p] = this.popStack(), i[p] = this.popStack()); + }return o && (a.args = this.source.generateArray(r)), this.trackIds && (a.ids = this.source.generateArray(s)), this.stringParams && (a.types = this.source.generateArray(n), a.contexts = this.source.generateArray(i)), this.options.data && (a.data = "data"), this.useBlockParams && (a.blockParams = "blockParams"), a; + }, setupHelperArgs: function setupHelperArgs(t, e, r, a) { + var i = this.setupParams(t, e, r);return i = this.objectLiteral(i), a ? (this.useRegister("options"), r.push("options"), ["options=", i]) : r ? (r.push(i), "") : i; + } }, function () { + for (var t = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "), e = s.RESERVED_WORDS = {}, r = 0, a = t.length; r < a; r++) { + e[t[r]] = !0; + } + }(), s.isValidJavaScriptVariableName = function (t) { + return !s.RESERVED_WORDS[t] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t); + }, e.default = s, t.exports = e.default; +});unwrapExports(javascriptCompiler);var handlebars$1 = createCommonjsModule(function (t, e) { + function r(t) { + return t && t.__esModule ? t : { default: t }; + }e.__esModule = !0;var a = r(handlebars_runtime), + i = r(ast), + n = r(javascriptCompiler), + s = r(visitor), + o = r(noConflict), + l = a.default.create;function c() { + var t = l();return t.compile = function (e, r) { + return compiler.compile(e, r, t); + }, t.precompile = function (e, r) { + return compiler.precompile(e, r, t); + }, t.AST = i.default, t.Compiler = compiler.Compiler, t.JavaScriptCompiler = n.default, t.Parser = base$2.parser, t.parse = base$2.parse, t; + }var u = c();u.create = c, o.default(u), u.Visitor = s.default, u.default = u, e.default = u, t.exports = e.default; +});unwrapExports(handlebars$1);var printer = createCommonjsModule(function (t, e) { + e.__esModule = !0, e.print = function (t) { + return new i().accept(t); + }, e.PrintVisitor = i;var r, + a = (r = visitor) && r.__esModule ? r : { default: r };function i() { + this.padding = 0; + }i.prototype = new a.default(), i.prototype.pad = function (t) { + for (var e = "", r = 0, a = this.padding; r < a; r++) { + e += " "; + }return e += t + "\n"; + }, i.prototype.Program = function (t) { + var e = "", + r = t.body, + a = void 0, + i = void 0;if (t.blockParams) { + var n = "BLOCK PARAMS: [";for (a = 0, i = t.blockParams.length; a < i; a++) { + n += " " + t.blockParams[a]; + }n += " ]", e += this.pad(n); + }for (a = 0, i = r.length; a < i; a++) { + e += this.accept(r[a]); + }return this.padding--, e; + }, i.prototype.MustacheStatement = function (t) { + return this.pad("{{ " + this.SubExpression(t) + " }}"); + }, i.prototype.Decorator = function (t) { + return this.pad("{{ DIRECTIVE " + this.SubExpression(t) + " }}"); + }, i.prototype.BlockStatement = i.prototype.DecoratorBlock = function (t) { + var e = "";return e += this.pad(("DecoratorBlock" === t.type ? "DIRECTIVE " : "") + "BLOCK:"), this.padding++, e += this.pad(this.SubExpression(t)), t.program && (e += this.pad("PROGRAM:"), this.padding++, e += this.accept(t.program), this.padding--), t.inverse && (t.program && this.padding++, e += this.pad("{{^}}"), this.padding++, e += this.accept(t.inverse), this.padding--, t.program && this.padding--), this.padding--, e; + }, i.prototype.PartialStatement = function (t) { + var e = "PARTIAL:" + t.name.original;return t.params[0] && (e += " " + this.accept(t.params[0])), t.hash && (e += " " + this.accept(t.hash)), this.pad("{{> " + e + " }}"); + }, i.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 + " }}"); + }, i.prototype.ContentStatement = function (t) { + return this.pad("CONTENT[ '" + t.value + "' ]"); + }, i.prototype.CommentStatement = function (t) { + return this.pad("{{! '" + t.value + "' }}"); + }, i.prototype.SubExpression = function (t) { + for (var e, r = t.params, a = [], i = 0, n = r.length; i < n; i++) { + a.push(this.accept(r[i])); + }return r = "[" + a.join(", ") + "]", e = t.hash ? " " + this.accept(t.hash) : "", this.accept(t.path) + " " + r + e; + }, i.prototype.PathExpression = function (t) { + var e = t.parts.join("/");return (t.data ? "@" : "") + "PATH:" + e; + }, i.prototype.StringLiteral = function (t) { + return '"' + t.value + '"'; + }, i.prototype.NumberLiteral = function (t) { + return "NUMBER{" + t.value + "}"; + }, i.prototype.BooleanLiteral = function (t) { + return "BOOLEAN{" + t.value + "}"; + }, i.prototype.UndefinedLiteral = function () { + return "UNDEFINED"; + }, i.prototype.NullLiteral = function () { + return "NULL"; + }, i.prototype.Hash = function (t) { + for (var e = t.pairs, r = [], a = 0, i = e.length; a < i; a++) { + r.push(this.accept(e[a])); + }return "HASH{" + r.join(", ") + "}"; + }, i.prototype.HashPair = function (t) { + return t.key + "=" + this.accept(t.value); + }; +});unwrapExports(printer);var handlebars = handlebars$1.default;handlebars.PrintVisitor = printer.PrintVisitor, handlebars.print = printer.print;var lib = handlebars;function extension(t, e) { + var r = fs.readFileSync(e, "utf8");t.exports = handlebars.compile(r); +}"undefined" != typeof require && require.extensions && (require.extensions[".handlebars"] = extension, require.extensions[".hbs"] = extension);var lib_1 = lib.parse;var voidMap = Object.create(null);var voidTagNames = "area base br col command embed hr img input keygen link meta param source track wbr";voidTagNames.split(" ").forEach(function (t) { + voidMap[t] = !0; +}); +var TokenizerEventHandlers = function (_HandlebarsNodeVisito) { + _inherits(TokenizerEventHandlers, _HandlebarsNodeVisito); + + function TokenizerEventHandlers() { + var _this2; + + _classCallCheck(this, TokenizerEventHandlers); + + (_this2 = _possibleConstructorReturn(this, (TokenizerEventHandlers.__proto__ || Object.getPrototypeOf(TokenizerEventHandlers)).apply(this, arguments)), _this2), _this2.tagOpenLine = 0, _this2.tagOpenColumn = 0;return _this2; + } + + _createClass(TokenizerEventHandlers, [{ + key: "reset", + value: function reset() { + this.currentNode = null; + } + }, { + key: "beginComment", + value: function beginComment() { + this.currentNode = b.comment(""), this.currentNode.loc = { source: null, start: b.pos(this.tagOpenLine, this.tagOpenColumn), end: null }; + } + }, { + key: "appendToCommentData", + value: function appendToCommentData(t) { + this.currentComment.value += t; + } + }, { + key: "finishComment", + value: function finishComment() { + this.currentComment.loc.end = b.pos(this.tokenizer.line, this.tokenizer.column), appendChild(this.currentElement(), this.currentComment); + } + }, { + key: "beginData", + value: function beginData() { + this.currentNode = b.text(), this.currentNode.loc = { source: null, start: b.pos(this.tokenizer.line, this.tokenizer.column), end: null }; + } + }, { + key: "appendToData", + value: function appendToData(t) { + this.currentData.chars += t; + } + }, { + key: "finishData", + value: function finishData() { + this.currentData.loc.end = b.pos(this.tokenizer.line, this.tokenizer.column), appendChild(this.currentElement(), this.currentData); + } + }, { + key: "tagOpen", + value: function tagOpen() { + this.tagOpenLine = this.tokenizer.line, this.tagOpenColumn = this.tokenizer.column; + } + }, { + key: "beginStartTag", + value: function beginStartTag() { + this.currentNode = { type: "StartTag", name: "", attributes: [], modifiers: [], comments: [], selfClosing: !1, loc: SYNTHETIC }; + } + }, { + key: "beginEndTag", + value: function beginEndTag() { + this.currentNode = { type: "EndTag", name: "", attributes: [], modifiers: [], comments: [], selfClosing: !1, loc: SYNTHETIC }; + } + }, { + key: "finishTag", + value: function finishTag() { + var _tokenizer = this.tokenizer, + t = _tokenizer.line, + e = _tokenizer.column, + r = this.currentTag; + r.loc = b.loc(this.tagOpenLine, this.tagOpenColumn, t, e), "StartTag" === r.type ? (this.finishStartTag(), (voidMap[r.name] || r.selfClosing) && this.finishEndTag(!0)) : "EndTag" === r.type && this.finishEndTag(!1); + } + }, { + key: "finishStartTag", + value: function finishStartTag() { + var _currentStartTag = this.currentStartTag, + t = _currentStartTag.name, + e = _currentStartTag.attributes, + r = _currentStartTag.modifiers, + a = _currentStartTag.comments, + i = b.loc(this.tagOpenLine, this.tagOpenColumn), + n = b.element(t, e, r, [], a, i); + this.elementStack.push(n); + } + }, { + key: "finishEndTag", + value: function finishEndTag(t) { + var e = this.currentTag, + r = this.elementStack.pop(), + a = this.currentElement();validateEndTag(e, r, t), r.loc.end.line = this.tokenizer.line, r.loc.end.column = this.tokenizer.column, parseElementBlockParams(r), appendChild(a, r); + } + }, { + key: "markTagAsSelfClosing", + value: function markTagAsSelfClosing() { + this.currentTag.selfClosing = !0; + } + }, { + key: "appendToTagName", + value: function appendToTagName(t) { + this.currentTag.name += t; + } + }, { + key: "beginAttribute", + value: function beginAttribute() { + var t = this.currentTag;if ("EndTag" === t.type) throw new SyntaxError$1("Invalid end tag: closing tag must not have attributes, " + ("in `" + t.name + "` (on line " + this.tokenizer.line + ")."), t.loc);this.currentAttribute = { name: "", parts: [], isQuoted: !1, isDynamic: !1, start: b.pos(this.tokenizer.line, this.tokenizer.column), valueStartLine: 0, valueStartColumn: 0 }; + } + }, { + key: "appendToAttributeName", + value: function appendToAttributeName(t) { + this.currentAttr.name += t; + } + }, { + key: "beginAttributeValue", + value: function beginAttributeValue(t) { + this.currentAttr.isQuoted = t, this.currentAttr.valueStartLine = this.tokenizer.line, this.currentAttr.valueStartColumn = this.tokenizer.column; + } + }, { + key: "appendToAttributeValue", + value: function appendToAttributeValue(t) { + var e = this.currentAttr.parts, + r = e[e.length - 1];if (r && "TextNode" === r.type) r.chars += t, r.loc.end.line = this.tokenizer.line, r.loc.end.column = this.tokenizer.column;else { + var a = b.loc(this.tokenizer.line, this.tokenizer.column, this.tokenizer.line, this.tokenizer.column);"\n" === t && (a.start.line -= 1, a.start.column = r ? r.loc.end.column : this.currentAttr.valueStartColumn);var i = b.text(t, a);e.push(i); + } + } + }, { + key: "finishAttributeValue", + value: function finishAttributeValue() { + var _currentAttr = this.currentAttr, + t = _currentAttr.name, + e = _currentAttr.parts, + r = _currentAttr.isQuoted, + a = _currentAttr.isDynamic, + i = _currentAttr.valueStartLine, + n = _currentAttr.valueStartColumn, + s = assembleAttributeValue(e, r, a, this.tokenizer.line); + s.loc = b.loc(i, n, this.tokenizer.line, this.tokenizer.column);var o = b.loc(this.currentAttr.start.line, this.currentAttr.start.column, this.tokenizer.line, this.tokenizer.column), + l = b.attr(t, s, o);this.currentStartTag.attributes.push(l); + } + }, { + key: "reportSyntaxError", + value: function reportSyntaxError(t) { + throw new SyntaxError$1("Syntax error at line " + this.tokenizer.line + " col " + this.tokenizer.column + ": " + t, b.loc(this.tokenizer.line, this.tokenizer.column)); + } + }]); + + return TokenizerEventHandlers; +}(HandlebarsNodeVisitors); + +function assembleAttributeValue(t, e, r, a) { + if (r) { + if (e) return assembleConcatenatedValue(t);if (1 === t.length || 2 === t.length && "TextNode" === t[1].type && "/" === t[1].chars) return t[0];throw new SyntaxError$1("An unquoted attribute value must be a string or a mustache, preceeded by whitespace or a '=' character, and " + ("followed by whitespace, a '>' character, or '/>' (on line " + a + ")"), b.loc(a, 0)); + }return t.length > 0 ? t[0] : b.text(""); +}function assembleConcatenatedValue(t) { + for (var e = 0; e < t.length; e++) { + var r = t[e];if ("MustacheStatement" !== r.type && "TextNode" !== r.type) throw new SyntaxError$1("Unsupported node in quoted attribute value: " + r.type, r.loc); + }return b.concat(t); +}function validateEndTag(t, e, r) { + var a = void 0;if (voidMap[t.name] && !r ? a = "Invalid end tag " + formatEndTagInfo(t) + " (void elements cannot have end tags)." : void 0 === e.tag ? a = "Closing tag " + formatEndTagInfo(t) + " without an open tag." : e.tag !== t.name && (a = "Closing tag " + formatEndTagInfo(t) + " did not match last open tag `" + e.tag + "` (on line " + e.loc.start.line + ")."), a) throw new SyntaxError$1(a, e.loc); +}function formatEndTagInfo(t) { + return "`" + t.name + "` (on line " + t.loc.end.line + ")"; +}var syntax = { parse: preprocess, builders: b, print: build, traverse: traverse, Walker: Walker };function preprocess(t, e) { + var r = "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) ? t : lib_1(t), + a = new TokenizerEventHandlers(t, e).acceptNode(r);if (e && e.plugins && e.plugins.ast) for (var _t4 = 0, _r8 = e.plugins.ast.length; _t4 < _r8; _t4++) { + traverse(a, (0, e.plugins.ast[_t4])(assign({}, e, { syntax: syntax }, { plugins: void 0 })).visitor); + }return a; +}var es2017 = Object.freeze({ AST: nodes, preprocess: preprocess, builders: b, TraversalError: TraversalError, cannotRemoveNode: cannotRemoveNode, cannotReplaceNode: cannotReplaceNode, cannotReplaceOrRemoveInKeyHandlerYet: cannotReplaceOrRemoveInKeyHandlerYet, traverse: traverse, Walker: Walker, print: build, SyntaxError: SyntaxError$1, isLiteral: isLiteral$1, printLiteral: printLiteral });function removeEmptyNodes(t) { + return "TextNode" !== t.type || "TextNode" === t.type && "" !== t.chars.replace(/^\s+/, "").replace(/\s+$/, ""); +}function removeWhiteSpace() { + return { visitor: { + Program: function Program(t) { + t.body = t.body.filter(removeEmptyNodes); + }, + ElementNode: function ElementNode(t) { + t.children = t.children.filter(removeEmptyNodes); + } + } }; +}function parse(t) { + try { + return (0, es2017.preprocess)(t, { plugins: { ast: [removeWhiteSpace] } }); + } catch (t) { + var e = t.message.match(/on line (\d+)/);throw e ? parserCreateError(t.message, { start: { line: +e[1], column: 0 }, end: { line: +e[1], column: 80 } }) : t; + } +}var parserGlimmer = parse;module.exports = parserGlimmer; diff --git a/Colorui-UniApp/node_modules/prettier/parser-graphql.js b/Colorui-UniApp/node_modules/prettier/parser-graphql.js new file mode 100644 index 0000000..a2354a4 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/parser-graphql.js @@ -0,0 +1 @@ +"use strict";function createError(e,n){const r=new SyntaxError(e+" ("+n.start.line+":"+n.start.column+")");return r.loc=n,r}var parserCreateError=createError;function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,n){return e(n={exports:{}},n.exports),n.exports}var location=createCommonjsModule(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(e,n){var r=/\r\n|[\n\r]/g,t=1,i=n+1,o=void 0;for(;(o=r.exec(e.body))&&o.index=2&&i(f,l)+": "+v[r-2],i(f,s)+": "+v[r-1],t(2+f+u-1)+"^",r0&&t(n[0]);)n.shift();for(;n.length>0&&t(n[n.length-1]);)n.pop();return n.join("\n")}});unwrapExports(blockStringValue_1);var lexer=createCommonjsModule(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenKind=void 0,n.createLexer=function(e,n){var r=new l(a.SOF,0,0,0,0,null);return{source:e,options:n,lastToken:r,token:r,line:1,lineStart:0,advance:i,lookahead:o}},n.getTokenDesc=function(e){var n=e.value;return n?e.kind+' "'+n+'"':e.kind};var r,t=(r=blockStringValue_1)&&r.__esModule?r:{default:r};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 l(e,n,r,t,i,o,a){this.kind=e,this.start=n,this.end=r,this.line=t,this.column=i,this.value=a,this.prev=o,this.next=null}function s(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 r=e.source,i=r.body,o=i.length,d=function(e,n,r){var t=e.length,i=n;for(;i=o)return new l(a.EOF,o,o,E,p,n);var T=c.call(i,d);if(T<32&&9!==T&&10!==T&&13!==T)throw(0,error.syntaxError)(r,d,"Cannot contain the invalid character "+s(T)+".");switch(T){case 33:return new l(a.BANG,d,d+1,E,p,n);case 35:return function(e,n,r,t,i){var o=e.body,s=void 0,d=n;do{s=c.call(o,++d)}while(null!==s&&(s>31||9===s));return new l(a.COMMENT,n,d,r,t,i,u.call(o,n+1,d))}(r,d,E,p,n);case 36:return new l(a.DOLLAR,d,d+1,E,p,n);case 38:return new l(a.AMP,d,d+1,E,p,n);case 40:return new l(a.PAREN_L,d,d+1,E,p,n);case 41:return new l(a.PAREN_R,d,d+1,E,p,n);case 46:if(46===c.call(i,d+1)&&46===c.call(i,d+2))return new l(a.SPREAD,d,d+3,E,p,n);break;case 58:return new l(a.COLON,d,d+1,E,p,n);case 61:return new l(a.EQUALS,d,d+1,E,p,n);case 64:return new l(a.AT,d,d+1,E,p,n);case 91:return new l(a.BRACKET_L,d,d+1,E,p,n);case 93:return new l(a.BRACKET_R,d,d+1,E,p,n);case 123:return new l(a.BRACE_L,d,d+1,E,p,n);case 124:return new l(a.PIPE,d,d+1,E,p,n);case 125:return new l(a.BRACE_R,d,d+1,E,p,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,r,t,i){var o=e.body,s=o.length,d=n+1,f=0;for(;d!==s&&null!==(f=c.call(o,d))&&(95===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122);)++d;return new l(a.NAME,n,d,r,t,i,u.call(o,n,d))}(r,d,E,p,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,r,t,i,o){var d=e.body,v=r,E=n,p=!1;45===v&&(v=c.call(d,++E));if(48===v){if((v=c.call(d,++E))>=48&&v<=57)throw(0,error.syntaxError)(e,E,"Invalid number, unexpected digit after 0: "+s(v)+".")}else E=f(e,E,v),v=c.call(d,E);46===v&&(p=!0,v=c.call(d,++E),E=f(e,E,v),v=c.call(d,E));69!==v&&101!==v||(p=!0,43!==(v=c.call(d,++E))&&45!==v||(v=c.call(d,++E)),E=f(e,E,v));return new l(p?a.FLOAT:a.INT,n,E,t,i,o,u.call(d,n,E))}(r,d,T,E,p,n);case 34:return 34===c.call(i,d+1)&&34===c.call(i,d+2)?function(e,n,r,i,o){var d=e.body,f=n+3,v=f,E=0,p="";for(;f=48&&o<=57){do{o=c.call(t,++i)}while(o>=48&&o<=57);return i}throw(0,error.syntaxError)(e,i,"Invalid number, expected digit but got: "+s(o)+".")}function v(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}l.prototype.toJSON=l.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}});unwrapExports(lexer);var source=createCommonjsModule(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var r,t=(r=invariant_1)&&r.__esModule?r:{default:r};n.Source=function e(n,r,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=r||"GraphQL request",this.locationOffset=i||{line:1,column:1},this.locationOffset.line>0||(0,t.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,t.default)(0,"column in locationOffset is 1-indexed and must be positive")}});unwrapExports(source);var directiveLocation=createCommonjsModule(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"})});unwrapExports(directiveLocation);var parser=createCommonjsModule(function(e,n){function r(e){var n=G(e,lexer.TokenKind.NAME);return{kind:kinds.Kind.NAME,value:n.value,loc:j(e,n)}}function t(e){if(U(e,lexer.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 x(e)}else{if(U(e,lexer.TokenKind.BRACE_L))return i(e);if(A(e))return x(e)}throw J(e)}function i(e){if(U(e,lexer.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(Y(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:kinds.Kind.FRAGMENT_DEFINITION,name:p(e),variableDefinitions:c(e),typeCondition:(Y(e,"on"),h(e)),directives:O(e,!1),selectionSet:s(e),loc:j(e,n)};return{kind:kinds.Kind.FRAGMENT_DEFINITION,name:p(e),typeCondition:(Y(e,"on"),h(e)),directives:O(e,!1),selectionSet:s(e),loc:j(e,n)}}(e)}else if(U(e,lexer.TokenKind.BRACE_L))return o(e);throw J(e)}function o(e){var n=e.token;if(U(e,lexer.TokenKind.BRACE_L))return{kind:kinds.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:s(e),loc:j(e,n)};var t=a(e),i=void 0;return U(e,lexer.TokenKind.NAME)&&(i=r(e)),{kind:kinds.Kind.OPERATION_DEFINITION,operation:t,name:i,variableDefinitions:c(e),directives:O(e,!1),selectionSet:s(e),loc:j(e,n)}}function a(e){var n=G(e,lexer.TokenKind.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw J(e,n)}function c(e){return U(e,lexer.TokenKind.PAREN_L)?Q(e,lexer.TokenKind.PAREN_L,u,lexer.TokenKind.PAREN_R):[]}function u(e){var n=e.token;return{kind:kinds.Kind.VARIABLE_DEFINITION,variable:l(e),type:(G(e,lexer.TokenKind.COLON),y(e)),defaultValue:V(e,lexer.TokenKind.EQUALS)?T(e,!0):void 0,loc:j(e,n)}}function l(e){var n=e.token;return G(e,lexer.TokenKind.DOLLAR),{kind:kinds.Kind.VARIABLE,name:r(e),loc:j(e,n)}}function s(e){var n=e.token;return{kind:kinds.Kind.SELECTION_SET,selections:Q(e,lexer.TokenKind.BRACE_L,d,lexer.TokenKind.BRACE_R),loc:j(e,n)}}function d(e){return U(e,lexer.TokenKind.SPREAD)?function(e){var n=e.token;if(G(e,lexer.TokenKind.SPREAD),U(e,lexer.TokenKind.NAME)&&"on"!==e.token.value)return{kind:kinds.Kind.FRAGMENT_SPREAD,name:p(e),directives:O(e,!1),loc:j(e,n)};var r=void 0;"on"===e.token.value&&(e.advance(),r=h(e));return{kind:kinds.Kind.INLINE_FRAGMENT,typeCondition:r,directives:O(e,!1),selectionSet:s(e),loc:j(e,n)}}(e):function(e){var n=e.token,t=r(e),i=void 0,o=void 0;V(e,lexer.TokenKind.COLON)?(i=t,o=r(e)):o=t;return{kind:kinds.Kind.FIELD,alias:i,name:o,arguments:f(e,!1),directives:O(e,!1),selectionSet:U(e,lexer.TokenKind.BRACE_L)?s(e):void 0,loc:j(e,n)}}(e)}function f(e,n){var r=n?E:v;return U(e,lexer.TokenKind.PAREN_L)?Q(e,lexer.TokenKind.PAREN_L,r,lexer.TokenKind.PAREN_R):[]}function v(e){var n=e.token;return{kind:kinds.Kind.ARGUMENT,name:r(e),value:(G(e,lexer.TokenKind.COLON),T(e,!1)),loc:j(e,n)}}function E(e){var n=e.token;return{kind:kinds.Kind.ARGUMENT,name:r(e),value:(G(e,lexer.TokenKind.COLON),N(e)),loc:j(e,n)}}function p(e){if("on"===e.token.value)throw J(e);return r(e)}function T(e,n){var r=e.token;switch(r.kind){case lexer.TokenKind.BRACKET_L:return function(e,n){var r=e.token,t=n?N:m;return{kind:kinds.Kind.LIST,values:function(e,n,r,t){G(e,n);var i=[];for(;!V(e,t);)i.push(r(e));return i}(e,lexer.TokenKind.BRACKET_L,t,lexer.TokenKind.BRACKET_R),loc:j(e,r)}}(e,n);case lexer.TokenKind.BRACE_L:return function(e,n){var r=e.token;G(e,lexer.TokenKind.BRACE_L);var t=[];for(;!V(e,lexer.TokenKind.BRACE_R);)t.push(I(e,n));return{kind:kinds.Kind.OBJECT,fields:t,loc:j(e,r)}}(e,n);case lexer.TokenKind.INT:return e.advance(),{kind:kinds.Kind.INT,value:r.value,loc:j(e,r)};case lexer.TokenKind.FLOAT:return e.advance(),{kind:kinds.Kind.FLOAT,value:r.value,loc:j(e,r)};case lexer.TokenKind.STRING:case lexer.TokenKind.BLOCK_STRING:return k(e);case lexer.TokenKind.NAME:return"true"===r.value||"false"===r.value?(e.advance(),{kind:kinds.Kind.BOOLEAN,value:"true"===r.value,loc:j(e,r)}):"null"===r.value?(e.advance(),{kind:kinds.Kind.NULL,loc:j(e,r)}):(e.advance(),{kind:kinds.Kind.ENUM,value:r.value,loc:j(e,r)});case lexer.TokenKind.DOLLAR:if(!n)return l(e)}throw J(e)}function k(e){var n=e.token;return e.advance(),{kind:kinds.Kind.STRING,value:n.value,block:n.kind===lexer.TokenKind.BLOCK_STRING,loc:j(e,n)}}function N(e){return T(e,!0)}function m(e){return T(e,!1)}function I(e,n){var t=e.token;return{kind:kinds.Kind.OBJECT_FIELD,name:r(e),value:(G(e,lexer.TokenKind.COLON),T(e,n)),loc:j(e,t)}}function O(e,n){for(var r=[];U(e,lexer.TokenKind.AT);)r.push(_(e,n));return r}function _(e,n){var t=e.token;return G(e,lexer.TokenKind.AT),{kind:kinds.Kind.DIRECTIVE,name:r(e),arguments:f(e,n),loc:j(e,t)}}function y(e){var n=e.token,r=void 0;return V(e,lexer.TokenKind.BRACKET_L)?(r=y(e),G(e,lexer.TokenKind.BRACKET_R),r={kind:kinds.Kind.LIST_TYPE,type:r,loc:j(e,n)}):r=h(e),V(e,lexer.TokenKind.BANG)?{kind:kinds.Kind.NON_NULL_TYPE,type:r,loc:j(e,n)}:r}function h(e){var n=e.token;return{kind:kinds.Kind.NAMED_TYPE,name:r(e),loc:j(e,n)}}function x(e){var n=A(e)?e.lookahead():e.token;if(n.kind===lexer.TokenKind.NAME)switch(n.value){case"schema":return function(e){var n=e.token;Y(e,"schema");var r=O(e,!0),t=Q(e,lexer.TokenKind.BRACE_L,L,lexer.TokenKind.BRACE_R);return{kind:kinds.Kind.SCHEMA_DEFINITION,directives:r,operationTypes:t,loc:j(e,n)}}(e);case"scalar":return function(e){var n=e.token,t=g(e);Y(e,"scalar");var i=r(e),o=O(e,!0);return{kind:kinds.Kind.SCALAR_TYPE_DEFINITION,description:t,name:i,directives:o,loc:j(e,n)}}(e);case"type":return function(e){var n=e.token,t=g(e);Y(e,"type");var i=r(e),o=K(e),a=O(e,!0),c=b(e);return{kind:kinds.Kind.OBJECT_TYPE_DEFINITION,description:t,name:i,interfaces:o,directives:a,fields:c,loc:j(e,n)}}(e);case"interface":return function(e){var n=e.token,t=g(e);Y(e,"interface");var i=r(e),o=O(e,!0),a=b(e);return{kind:kinds.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:i,directives:o,fields:a,loc:j(e,n)}}(e);case"union":return function(e){var n=e.token,t=g(e);Y(e,"union");var i=r(e),o=O(e,!0),a=C(e);return{kind:kinds.Kind.UNION_TYPE_DEFINITION,description:t,name:i,directives:o,types:a,loc:j(e,n)}}(e);case"enum":return function(e){var n=e.token,t=g(e);Y(e,"enum");var i=r(e),o=O(e,!0),a=P(e);return{kind:kinds.Kind.ENUM_TYPE_DEFINITION,description:t,name:i,directives:o,values:a,loc:j(e,n)}}(e);case"input":return function(e){var n=e.token,t=g(e);Y(e,"input");var i=r(e),o=O(e,!0),a=w(e);return{kind:kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:i,directives:o,fields:a,loc:j(e,n)}}(e);case"extend":return function(e){var n=e.lookahead();if(n.kind===lexer.TokenKind.NAME)switch(n.value){case"scalar":return function(e){var n=e.token;Y(e,"extend"),Y(e,"scalar");var t=r(e),i=O(e,!0);if(0===i.length)throw J(e);return{kind:kinds.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:i,loc:j(e,n)}}(e);case"type":return function(e){var n=e.token;Y(e,"extend"),Y(e,"type");var t=r(e),i=K(e),o=O(e,!0),a=b(e);if(0===i.length&&0===o.length&&0===a.length)throw J(e);return{kind:kinds.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:i,directives:o,fields:a,loc:j(e,n)}}(e);case"interface":return function(e){var n=e.token;Y(e,"extend"),Y(e,"interface");var t=r(e),i=O(e,!0),o=b(e);if(0===i.length&&0===o.length)throw J(e);return{kind:kinds.Kind.INTERFACE_TYPE_EXTENSION,name:t,directives:i,fields:o,loc:j(e,n)}}(e);case"union":return function(e){var n=e.token;Y(e,"extend"),Y(e,"union");var t=r(e),i=O(e,!0),o=C(e);if(0===i.length&&0===o.length)throw J(e);return{kind:kinds.Kind.UNION_TYPE_EXTENSION,name:t,directives:i,types:o,loc:j(e,n)}}(e);case"enum":return function(e){var n=e.token;Y(e,"extend"),Y(e,"enum");var t=r(e),i=O(e,!0),o=P(e);if(0===i.length&&0===o.length)throw J(e);return{kind:kinds.Kind.ENUM_TYPE_EXTENSION,name:t,directives:i,values:o,loc:j(e,n)}}(e);case"input":return function(e){var n=e.token;Y(e,"extend"),Y(e,"input");var t=r(e),i=O(e,!0),o=w(e);if(0===i.length&&0===o.length)throw J(e);return{kind:kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:i,fields:o,loc:j(e,n)}}(e)}throw J(e,n)}(e);case"directive":return function(e){var n=e.token,t=g(e);Y(e,"directive"),G(e,lexer.TokenKind.AT);var i=r(e),o=S(e);Y(e,"on");var a=function(e){V(e,lexer.TokenKind.PIPE);var n=[];do{n.push(M(e))}while(V(e,lexer.TokenKind.PIPE));return n}(e);return{kind:kinds.Kind.DIRECTIVE_DEFINITION,description:t,name:i,arguments:o,locations:a,loc:j(e,n)}}(e)}throw J(e,n)}function A(e){return U(e,lexer.TokenKind.STRING)||U(e,lexer.TokenKind.BLOCK_STRING)}function g(e){if(A(e))return k(e)}function L(e){var n=e.token,r=a(e);G(e,lexer.TokenKind.COLON);var t=h(e);return{kind:kinds.Kind.OPERATION_TYPE_DEFINITION,operation:r,type:t,loc:j(e,n)}}function K(e){var n=[];if("implements"===e.token.value){e.advance(),V(e,lexer.TokenKind.AMP);do{n.push(h(e))}while(V(e,lexer.TokenKind.AMP)||e.options.allowLegacySDLImplementsInterfaces&&U(e,lexer.TokenKind.NAME))}return n}function b(e){return e.options.allowLegacySDLEmptyFields&&U(e,lexer.TokenKind.BRACE_L)&&e.lookahead().kind===lexer.TokenKind.BRACE_R?(e.advance(),e.advance(),[]):U(e,lexer.TokenKind.BRACE_L)?Q(e,lexer.TokenKind.BRACE_L,D,lexer.TokenKind.BRACE_R):[]}function D(e){var n=e.token,t=g(e),i=r(e),o=S(e);G(e,lexer.TokenKind.COLON);var a=y(e),c=O(e,!0);return{kind:kinds.Kind.FIELD_DEFINITION,description:t,name:i,arguments:o,type:a,directives:c,loc:j(e,n)}}function S(e){return U(e,lexer.TokenKind.PAREN_L)?Q(e,lexer.TokenKind.PAREN_L,R,lexer.TokenKind.PAREN_R):[]}function R(e){var n=e.token,t=g(e),i=r(e);G(e,lexer.TokenKind.COLON);var o=y(e),a=void 0;V(e,lexer.TokenKind.EQUALS)&&(a=N(e));var c=O(e,!0);return{kind:kinds.Kind.INPUT_VALUE_DEFINITION,description:t,name:i,type:o,defaultValue:a,directives:c,loc:j(e,n)}}function C(e){var n=[];if(V(e,lexer.TokenKind.EQUALS)){V(e,lexer.TokenKind.PIPE);do{n.push(h(e))}while(V(e,lexer.TokenKind.PIPE))}return n}function P(e){return U(e,lexer.TokenKind.BRACE_L)?Q(e,lexer.TokenKind.BRACE_L,F,lexer.TokenKind.BRACE_R):[]}function F(e){var n=e.token,t=g(e),i=r(e),o=O(e,!0);return{kind:kinds.Kind.ENUM_VALUE_DEFINITION,description:t,name:i,directives:o,loc:j(e,n)}}function w(e){return U(e,lexer.TokenKind.BRACE_L)?Q(e,lexer.TokenKind.BRACE_L,R,lexer.TokenKind.BRACE_R):[]}function M(e){var n=e.token,t=r(e);if(directiveLocation.DirectiveLocation.hasOwnProperty(t.value))return t;throw J(e,n)}function j(e,n){if(!e.options.noLocation)return new B(n,e.lastToken,e.source)}function B(e,n,r){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=r}function U(e,n){return e.token.kind===n}function V(e,n){var r=e.token.kind===n;return r&&e.advance(),r}function G(e,n){var r=e.token;if(r.kind===n)return e.advance(),r;throw(0,error.syntaxError)(e.source,r.start,"Expected "+n+", found "+(0,lexer.getTokenDesc)(r))}function Y(e,n){var r=e.token;if(r.kind===lexer.TokenKind.NAME&&r.value===n)return e.advance(),r;throw(0,error.syntaxError)(e.source,r.start,'Expected "'+n+'", found '+(0,lexer.getTokenDesc)(r))}function J(e,n){var r=n||e.token;return(0,error.syntaxError)(e.source,r.start,"Unexpected "+(0,lexer.getTokenDesc)(r))}function Q(e,n,r,t){G(e,n);for(var i=[r(e)];!V(e,t);)i.push(r(e));return i}Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(e,n){var r="string"==typeof e?new source.Source(e):e;if(!(r instanceof source.Source))throw new TypeError("Must provide Source. Received: "+String(r));return function(e){var n=e.token;G(e,lexer.TokenKind.SOF);var r=[];do{r.push(t(e))}while(!V(e,lexer.TokenKind.EOF));return{kind:kinds.Kind.DOCUMENT,definitions:r,loc:j(e,n)}}((0,lexer.createLexer)(r,n||{}))},n.parseValue=function(e,n){var r="string"==typeof e?new source.Source(e):e,t=(0,lexer.createLexer)(r,n||{});G(t,lexer.TokenKind.SOF);var i=T(t,!1);return G(t,lexer.TokenKind.EOF),i},n.parseType=function(e,n){var r="string"==typeof e?new source.Source(e):e,t=(0,lexer.createLexer)(r,n||{});G(t,lexer.TokenKind.SOF);var i=y(t);return G(t,lexer.TokenKind.EOF),i},n.parseConstValue=N,n.parseTypeReference=y,n.parseNamedType=h,B.prototype.toJSON=B.prototype.inspect=function(){return{start:this.start,end:this.end}}});unwrapExports(parser);var visitor=createCommonjsModule(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]:r,c=void 0,u=Array.isArray(e),l=[e],s=-1,d=[],f=void 0,v=void 0,E=void 0,p=[],T=[],k=e;do{var N=++s===l.length,m=N&&0!==d.length;if(N){if(v=0===T.length?void 0:p[p.length-1],f=E,E=T.pop(),m){if(u)f=f.slice();else{var I={};for(var O in f)f.hasOwnProperty(O)&&(I[O]=f[O]);f=I}for(var _=0,y=0;y"!==r.kind;)"Comment"===r.kind&&(Object.assign(r,{column:r.column-1}),n.push(r)),r=r.next;return n}function removeTokens(e){if(e&&"object"==typeof e){delete e.startToken,delete e.endToken,delete e.prev,delete e.next;for(const n in e)removeTokens(e[n])}return e}function fallbackParser(e,n){try{return e(n,{allowLegacySDLImplementsInterfaces:!1})}catch(r){return e(n,{allowLegacySDLImplementsInterfaces:!0})}}function parse(e){const n=language;try{const r=fallbackParser(n.parse,e);return r.comments=parseComments(r),removeTokens(r),r}catch(e){throw e instanceof error.GraphQLError?parserCreateError(e.message,{start:{line:e.locations[0].line,column:e.locations[0].column}}):e}}unwrapExports(language);var parserGraphql=parse;module.exports=parserGraphql; diff --git a/Colorui-UniApp/node_modules/prettier/parser-markdown.js b/Colorui-UniApp/node_modules/prettier/parser-markdown.js new file mode 100644 index 0000000..dbf6797 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/parser-markdown.js @@ -0,0 +1 @@ +"use strict";function _interopDefault(r){return r&&"object"==typeof r&&"default"in r?r.default:r}var util=_interopDefault(require("util")),path=_interopDefault(require("path")),immutable=extend,hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){for(var r={},e=0;e0?parseInt(t):null};se)return{line:t+1,column:e-(r[t-1]||0)+1,offset:e};return{}}}function positionToOffsetFactory(r){return function(e){var t=e&&e.line,a=e&&e.column;if(!isNaN(t)&&!isNaN(a)&&t-1 in r)return(r[t-2]||0)+a-1||0;return-1}}function indices(r){for(var e=[],t=r.indexOf("\n");-1!==t;)e.push(t+1),t=r.indexOf("\n",t+1);return e.push(r.length+1),e}var _unescape=factory$2;function factory$2(r,e){return function(t){var a,o=0,i=t.indexOf("\\"),n=r[e],s=[];for(;-1!==i;)s.push(t.slice(o,i)),o=i+1,(a=t.charAt(o))&&-1!==n.indexOf(a)||s.push("\\"),i=t.indexOf("\\",o);return s.push(t.slice(o)),s.join("")}}var 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$1="↦",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="‌",index={AEli:AEli,AElig:AElig,AM:AM,AMP:AMP,Aacut:Aacut,Aacute:Aacute,Abreve:Abreve,Acir:Acir,Acirc:Acirc,Acy:Acy,Afr:Afr,Agrav:Agrav,Agrave:Agrave,Alpha:Alpha,Amacr:Amacr,And:And,Aogon:Aogon,Aopf:Aopf,ApplyFunction:ApplyFunction,Arin:Arin,Aring:Aring,Ascr:Ascr,Assign:Assign,Atild:Atild,Atilde:Atilde,Aum:Aum,Auml:Auml,Backslash:Backslash,Barv:Barv,Barwed:Barwed,Bcy:Bcy,Because:Because,Bernoullis:Bernoullis,Beta:Beta,Bfr:Bfr,Bopf:Bopf,Breve:Breve,Bscr:Bscr,Bumpeq:Bumpeq,CHcy:CHcy,COP:COP,COPY:COPY,Cacute:Cacute,Cap:Cap,CapitalDifferentialD:CapitalDifferentialD,Cayleys:Cayleys,Ccaron:Ccaron,Ccedi:Ccedi,Ccedil:Ccedil,Ccirc:Ccirc,Cconint:Cconint,Cdot:Cdot,Cedilla:Cedilla,CenterDot:CenterDot,Cfr:Cfr,Chi:Chi,CircleDot:CircleDot,CircleMinus:CircleMinus,CirclePlus:CirclePlus,CircleTimes:CircleTimes,ClockwiseContourIntegral:ClockwiseContourIntegral,CloseCurlyDoubleQuote:CloseCurlyDoubleQuote,CloseCurlyQuote:CloseCurlyQuote,Colon:Colon,Colone:Colone,Congruent:Congruent,Conint:Conint,ContourIntegral:ContourIntegral,Copf:Copf,Coproduct:Coproduct,CounterClockwiseContourIntegral:CounterClockwiseContourIntegral,Cross:Cross,Cscr:Cscr,Cup:Cup,CupCap:CupCap,DD:DD,DDotrahd:DDotrahd,DJcy:DJcy,DScy:DScy,DZcy:DZcy,Dagger:Dagger,Darr:Darr,Dashv:Dashv,Dcaron:Dcaron,Dcy:Dcy,Del:Del,Delta:Delta,Dfr:Dfr,DiacriticalAcute:DiacriticalAcute,DiacriticalDot:DiacriticalDot,DiacriticalDoubleAcute:DiacriticalDoubleAcute,DiacriticalGrave:DiacriticalGrave,DiacriticalTilde:DiacriticalTilde,Diamond:Diamond,DifferentialD:DifferentialD,Dopf:Dopf,Dot:Dot,DotDot:DotDot,DotEqual:DotEqual,DoubleContourIntegral:DoubleContourIntegral,DoubleDot:DoubleDot,DoubleDownArrow:DoubleDownArrow,DoubleLeftArrow:DoubleLeftArrow,DoubleLeftRightArrow:DoubleLeftRightArrow,DoubleLeftTee:DoubleLeftTee,DoubleLongLeftArrow:DoubleLongLeftArrow,DoubleLongLeftRightArrow:DoubleLongLeftRightArrow,DoubleLongRightArrow:DoubleLongRightArrow,DoubleRightArrow:DoubleRightArrow,DoubleRightTee:DoubleRightTee,DoubleUpArrow:DoubleUpArrow,DoubleUpDownArrow:DoubleUpDownArrow,DoubleVerticalBar:DoubleVerticalBar,DownArrow:DownArrow,DownArrowBar:DownArrowBar,DownArrowUpArrow:DownArrowUpArrow,DownBreve:DownBreve,DownLeftRightVector:DownLeftRightVector,DownLeftTeeVector:DownLeftTeeVector,DownLeftVector:DownLeftVector,DownLeftVectorBar:DownLeftVectorBar,DownRightTeeVector:DownRightTeeVector,DownRightVector:DownRightVector,DownRightVectorBar:DownRightVectorBar,DownTee:DownTee,DownTeeArrow:DownTeeArrow,Downarrow:Downarrow,Dscr:Dscr,Dstrok:Dstrok,ENG:ENG,ET:ET,ETH:ETH,Eacut:Eacut,Eacute:Eacute,Ecaron:Ecaron,Ecir:Ecir,Ecirc:Ecirc,Ecy:Ecy,Edot:Edot,Efr:Efr,Egrav:Egrav,Egrave:Egrave,Element:Element,Emacr:Emacr,EmptySmallSquare:EmptySmallSquare,EmptyVerySmallSquare:EmptyVerySmallSquare,Eogon:Eogon,Eopf:Eopf,Epsilon:Epsilon,Equal:Equal,EqualTilde:EqualTilde,Equilibrium:Equilibrium,Escr:Escr,Esim:Esim,Eta:Eta,Eum:Eum,Euml:Euml,Exists:Exists,ExponentialE:ExponentialE,Fcy:Fcy,Ffr:Ffr,FilledSmallSquare:FilledSmallSquare,FilledVerySmallSquare:FilledVerySmallSquare,Fopf:Fopf,ForAll:ForAll,Fouriertrf:Fouriertrf,Fscr:Fscr,GJcy:GJcy,G:G,GT:GT,Gamma:Gamma,Gammad:Gammad,Gbreve:Gbreve,Gcedil:Gcedil,Gcirc:Gcirc,Gcy:Gcy,Gdot:Gdot,Gfr:Gfr,Gg:Gg,Gopf:Gopf,GreaterEqual:GreaterEqual,GreaterEqualLess:GreaterEqualLess,GreaterFullEqual:GreaterFullEqual,GreaterGreater:GreaterGreater,GreaterLess:GreaterLess,GreaterSlantEqual:GreaterSlantEqual,GreaterTilde:GreaterTilde,Gscr:Gscr,Gt:Gt,HARDcy:HARDcy,Hacek:Hacek,Hat:Hat,Hcirc:Hcirc,Hfr:Hfr,HilbertSpace:HilbertSpace,Hopf:Hopf,HorizontalLine:HorizontalLine,Hscr:Hscr,Hstrok:Hstrok,HumpDownHump:HumpDownHump,HumpEqual:HumpEqual,IEcy:IEcy,IJlig:IJlig,IOcy:IOcy,Iacut:Iacut,Iacute:Iacute,Icir:Icir,Icirc:Icirc,Icy:Icy,Idot:Idot,Ifr:Ifr,Igrav:Igrav,Igrave:Igrave,Im:Im,Imacr:Imacr,ImaginaryI:ImaginaryI,Implies:Implies,Int:Int,Integral:Integral,Intersection:Intersection,InvisibleComma:InvisibleComma,InvisibleTimes:InvisibleTimes,Iogon:Iogon,Iopf:Iopf,Iota:Iota,Iscr:Iscr,Itilde:Itilde,Iukcy:Iukcy,Ium:Ium,Iuml:Iuml,Jcirc:Jcirc,Jcy:Jcy,Jfr:Jfr,Jopf:Jopf,Jscr:Jscr,Jsercy:Jsercy,Jukcy:Jukcy,KHcy:KHcy,KJcy:KJcy,Kappa:Kappa,Kcedil:Kcedil,Kcy:Kcy,Kfr:Kfr,Kopf:Kopf,Kscr:Kscr,LJcy:LJcy,L:L,LT:LT,Lacute:Lacute,Lambda:Lambda,Lang:Lang,Laplacetrf:Laplacetrf,Larr:Larr,Lcaron:Lcaron,Lcedil:Lcedil,Lcy:Lcy,LeftAngleBracket:LeftAngleBracket,LeftArrow:LeftArrow,LeftArrowBar:LeftArrowBar,LeftArrowRightArrow:LeftArrowRightArrow,LeftCeiling:LeftCeiling,LeftDoubleBracket:LeftDoubleBracket,LeftDownTeeVector:LeftDownTeeVector,LeftDownVector:LeftDownVector,LeftDownVectorBar:LeftDownVectorBar,LeftFloor:LeftFloor,LeftRightArrow:LeftRightArrow,LeftRightVector:LeftRightVector,LeftTee:LeftTee,LeftTeeArrow:LeftTeeArrow,LeftTeeVector:LeftTeeVector,LeftTriangle:LeftTriangle,LeftTriangleBar:LeftTriangleBar,LeftTriangleEqual:LeftTriangleEqual,LeftUpDownVector:LeftUpDownVector,LeftUpTeeVector:LeftUpTeeVector,LeftUpVector:LeftUpVector,LeftUpVectorBar:LeftUpVectorBar,LeftVector:LeftVector,LeftVectorBar:LeftVectorBar,Leftarrow:Leftarrow,Leftrightarrow:Leftrightarrow,LessEqualGreater:LessEqualGreater,LessFullEqual:LessFullEqual,LessGreater:LessGreater,LessLess:LessLess,LessSlantEqual:LessSlantEqual,LessTilde:LessTilde,Lfr:Lfr,Ll:Ll,Lleftarrow:Lleftarrow,Lmidot:Lmidot,LongLeftArrow:LongLeftArrow,LongLeftRightArrow:LongLeftRightArrow,LongRightArrow:LongRightArrow,Longleftarrow:Longleftarrow,Longleftrightarrow:Longleftrightarrow,Longrightarrow:Longrightarrow,Lopf:Lopf,LowerLeftArrow:LowerLeftArrow,LowerRightArrow:LowerRightArrow,Lscr:Lscr,Lsh:Lsh,Lstrok:Lstrok,Lt:Lt,Mcy:Mcy,MediumSpace:MediumSpace,Mellintrf:Mellintrf,Mfr:Mfr,MinusPlus:MinusPlus,Mopf:Mopf,Mscr:Mscr,Mu:Mu,NJcy:NJcy,Nacute:Nacute,Ncaron:Ncaron,Ncedil:Ncedil,Ncy:Ncy,NegativeMediumSpace:NegativeMediumSpace,NegativeThickSpace:NegativeThickSpace,NegativeThinSpace:NegativeThinSpace,NegativeVeryThinSpace:NegativeVeryThinSpace,NestedGreaterGreater:NestedGreaterGreater,NestedLessLess:NestedLessLess,NewLine:NewLine,Nfr:Nfr,NoBreak:NoBreak,NonBreakingSpace:NonBreakingSpace,Nopf:Nopf,Not:Not,NotCongruent:NotCongruent,NotCupCap:NotCupCap,NotDoubleVerticalBar:NotDoubleVerticalBar,NotElement:NotElement,NotEqual:NotEqual,NotEqualTilde:NotEqualTilde,NotExists:NotExists,NotGreater:NotGreater,NotGreaterEqual:NotGreaterEqual,NotGreaterFullEqual:NotGreaterFullEqual,NotGreaterGreater:NotGreaterGreater,NotGreaterLess:NotGreaterLess,NotGreaterSlantEqual:NotGreaterSlantEqual,NotGreaterTilde:NotGreaterTilde,NotHumpDownHump:NotHumpDownHump,NotHumpEqual:NotHumpEqual,NotLeftTriangle:NotLeftTriangle,NotLeftTriangleBar:NotLeftTriangleBar,NotLeftTriangleEqual:NotLeftTriangleEqual,NotLess:NotLess,NotLessEqual:NotLessEqual,NotLessGreater:NotLessGreater,NotLessLess:NotLessLess,NotLessSlantEqual:NotLessSlantEqual,NotLessTilde:NotLessTilde,NotNestedGreaterGreater:NotNestedGreaterGreater,NotNestedLessLess:NotNestedLessLess,NotPrecedes:NotPrecedes,NotPrecedesEqual:NotPrecedesEqual,NotPrecedesSlantEqual:NotPrecedesSlantEqual,NotReverseElement:NotReverseElement,NotRightTriangle:NotRightTriangle,NotRightTriangleBar:NotRightTriangleBar,NotRightTriangleEqual:NotRightTriangleEqual,NotSquareSubset:NotSquareSubset,NotSquareSubsetEqual:NotSquareSubsetEqual,NotSquareSuperset:NotSquareSuperset,NotSquareSupersetEqual:NotSquareSupersetEqual,NotSubset:NotSubset,NotSubsetEqual:NotSubsetEqual,NotSucceeds:NotSucceeds,NotSucceedsEqual:NotSucceedsEqual,NotSucceedsSlantEqual:NotSucceedsSlantEqual,NotSucceedsTilde:NotSucceedsTilde,NotSuperset:NotSuperset,NotSupersetEqual:NotSupersetEqual,NotTilde:NotTilde,NotTildeEqual:NotTildeEqual,NotTildeFullEqual:NotTildeFullEqual,NotTildeTilde:NotTildeTilde,NotVerticalBar:NotVerticalBar,Nscr:Nscr,Ntild:Ntild,Ntilde:Ntilde,Nu:Nu,OElig:OElig,Oacut:Oacut,Oacute:Oacute,Ocir:Ocir,Ocirc:Ocirc,Ocy:Ocy,Odblac:Odblac,Ofr:Ofr,Ograv:Ograv,Ograve:Ograve,Omacr:Omacr,Omega:Omega,Omicron:Omicron,Oopf:Oopf,OpenCurlyDoubleQuote:OpenCurlyDoubleQuote,OpenCurlyQuote:OpenCurlyQuote,Or:Or,Oscr:Oscr,Oslas:Oslas,Oslash:Oslash,Otild:Otild,Otilde:Otilde,Otimes:Otimes,Oum:Oum,Ouml:Ouml,OverBar:OverBar,OverBrace:OverBrace,OverBracket:OverBracket,OverParenthesis:OverParenthesis,PartialD:PartialD,Pcy:Pcy,Pfr:Pfr,Phi:Phi,Pi:Pi,PlusMinus:PlusMinus,Poincareplane:Poincareplane,Popf:Popf,Pr:Pr,Precedes:Precedes,PrecedesEqual:PrecedesEqual,PrecedesSlantEqual:PrecedesSlantEqual,PrecedesTilde:PrecedesTilde,Prime:Prime,Product:Product,Proportion:Proportion,Proportional:Proportional,Pscr:Pscr,Psi:Psi,QUO:QUO,QUOT:QUOT,Qfr:Qfr,Qopf:Qopf,Qscr:Qscr,RBarr:RBarr,RE:RE,REG:REG,Racute:Racute,Rang:Rang,Rarr:Rarr,Rarrtl:Rarrtl,Rcaron:Rcaron,Rcedil:Rcedil,Rcy:Rcy,Re:Re,ReverseElement:ReverseElement,ReverseEquilibrium:ReverseEquilibrium,ReverseUpEquilibrium:ReverseUpEquilibrium,Rfr:Rfr,Rho:Rho,RightAngleBracket:RightAngleBracket,RightArrow:RightArrow,RightArrowBar:RightArrowBar,RightArrowLeftArrow:RightArrowLeftArrow,RightCeiling:RightCeiling,RightDoubleBracket:RightDoubleBracket,RightDownTeeVector:RightDownTeeVector,RightDownVector:RightDownVector,RightDownVectorBar:RightDownVectorBar,RightFloor:RightFloor,RightTee:RightTee,RightTeeArrow:RightTeeArrow,RightTeeVector:RightTeeVector,RightTriangle:RightTriangle,RightTriangleBar:RightTriangleBar,RightTriangleEqual:RightTriangleEqual,RightUpDownVector:RightUpDownVector,RightUpTeeVector:RightUpTeeVector,RightUpVector:RightUpVector,RightUpVectorBar:RightUpVectorBar,RightVector:RightVector,RightVectorBar:RightVectorBar,Rightarrow:Rightarrow,Ropf:Ropf,RoundImplies:RoundImplies,Rrightarrow:Rrightarrow,Rscr:Rscr,Rsh:Rsh,RuleDelayed:RuleDelayed,SHCHcy:SHCHcy,SHcy:SHcy,SOFTcy:SOFTcy,Sacute:Sacute,Sc:Sc,Scaron:Scaron,Scedil:Scedil,Scirc:Scirc,Scy:Scy,Sfr:Sfr,ShortDownArrow:ShortDownArrow,ShortLeftArrow:ShortLeftArrow,ShortRightArrow:ShortRightArrow,ShortUpArrow:ShortUpArrow,Sigma:Sigma,SmallCircle:SmallCircle,Sopf:Sopf,Sqrt:Sqrt,Square:Square,SquareIntersection:SquareIntersection,SquareSubset:SquareSubset,SquareSubsetEqual:SquareSubsetEqual,SquareSuperset:SquareSuperset,SquareSupersetEqual:SquareSupersetEqual,SquareUnion:SquareUnion,Sscr:Sscr,Star:Star,Sub:Sub,Subset:Subset,SubsetEqual:SubsetEqual,Succeeds:Succeeds,SucceedsEqual:SucceedsEqual,SucceedsSlantEqual:SucceedsSlantEqual,SucceedsTilde:SucceedsTilde,SuchThat:SuchThat,Sum:Sum,Sup:Sup,Superset:Superset,SupersetEqual:SupersetEqual,Supset:Supset,THOR:THOR,THORN:THORN,TRADE:TRADE,TSHcy:TSHcy,TScy:TScy,Tab:Tab,Tau:Tau,Tcaron:Tcaron,Tcedil:Tcedil,Tcy:Tcy,Tfr:Tfr,Therefore:Therefore,Theta:Theta,ThickSpace:ThickSpace,ThinSpace:ThinSpace,Tilde:Tilde,TildeEqual:TildeEqual,TildeFullEqual:TildeFullEqual,TildeTilde:TildeTilde,Topf:Topf,TripleDot:TripleDot,Tscr:Tscr,Tstrok:Tstrok,Uacut:Uacut,Uacute:Uacute,Uarr:Uarr,Uarrocir:Uarrocir,Ubrcy:Ubrcy,Ubreve:Ubreve,Ucir:Ucir,Ucirc:Ucirc,Ucy:Ucy,Udblac:Udblac,Ufr:Ufr,Ugrav:Ugrav,Ugrave:Ugrave,Umacr:Umacr,UnderBar:UnderBar,UnderBrace:UnderBrace,UnderBracket:UnderBracket,UnderParenthesis:UnderParenthesis,Union:Union,UnionPlus:UnionPlus,Uogon:Uogon,Uopf:Uopf,UpArrow:UpArrow,UpArrowBar:UpArrowBar,UpArrowDownArrow:UpArrowDownArrow,UpDownArrow:UpDownArrow,UpEquilibrium:UpEquilibrium,UpTee:UpTee,UpTeeArrow:UpTeeArrow,Uparrow:Uparrow,Updownarrow:Updownarrow,UpperLeftArrow:UpperLeftArrow,UpperRightArrow:UpperRightArrow,Upsi:Upsi,Upsilon:Upsilon,Uring:Uring,Uscr:Uscr,Utilde:Utilde,Uum:Uum,Uuml:Uuml,VDash:VDash,Vbar:Vbar,Vcy:Vcy,Vdash:Vdash,Vdashl:Vdashl,Vee:Vee,Verbar:Verbar,Vert:Vert,VerticalBar:VerticalBar,VerticalLine:VerticalLine,VerticalSeparator:VerticalSeparator,VerticalTilde:VerticalTilde,VeryThinSpace:VeryThinSpace,Vfr:Vfr,Vopf:Vopf,Vscr:Vscr,Vvdash:Vvdash,Wcirc:Wcirc,Wedge:Wedge,Wfr:Wfr,Wopf:Wopf,Wscr:Wscr,Xfr:Xfr,Xi:Xi,Xopf:Xopf,Xscr:Xscr,YAcy:YAcy,YIcy:YIcy,YUcy:YUcy,Yacut:Yacut,Yacute:Yacute,Ycirc:Ycirc,Ycy:Ycy,Yfr:Yfr,Yopf:Yopf,Yscr:Yscr,Yuml:Yuml,ZHcy:ZHcy,Zacute:Zacute,Zcaron:Zcaron,Zcy:Zcy,Zdot:Zdot,ZeroWidthSpace:ZeroWidthSpace,Zeta:Zeta,Zfr:Zfr,Zopf:Zopf,Zscr:Zscr,aacut:aacut,aacute:aacute,abreve:abreve,ac:ac,acE:acE,acd:acd,acir:acir,acirc:acirc,acut:acut,acute:acute,acy:acy,aeli:aeli,aelig:aelig,af:af,afr:afr,agrav:agrav,agrave:agrave,alefsym:alefsym,aleph:aleph,alpha:alpha,amacr:amacr,amalg:amalg,am:am,amp:amp,and:and,andand:andand,andd:andd,andslope:andslope,andv:andv,ang:ang,ange:ange,angle:angle,angmsd:angmsd,angmsdaa:angmsdaa,angmsdab:angmsdab,angmsdac:angmsdac,angmsdad:angmsdad,angmsdae:angmsdae,angmsdaf:angmsdaf,angmsdag:angmsdag,angmsdah:angmsdah,angrt:angrt,angrtvb:angrtvb,angrtvbd:angrtvbd,angsph:angsph,angst:angst,angzarr:angzarr,aogon:aogon,aopf:aopf,ap:ap,apE:apE,apacir:apacir,ape:ape,apid:apid,apos:apos,approx:approx,approxeq:approxeq,arin:arin,aring:aring,ascr:ascr,ast:ast,asymp:asymp,asympeq:asympeq,atild:atild,atilde:atilde,aum:aum,auml:auml,awconint:awconint,awint:awint,bNot:bNot,backcong:backcong,backepsilon:backepsilon,backprime:backprime,backsim:backsim,backsimeq:backsimeq,barvee:barvee,barwed:barwed,barwedge:barwedge,bbrk:bbrk,bbrktbrk:bbrktbrk,bcong:bcong,bcy:bcy,bdquo:bdquo,becaus:becaus,because:because,bemptyv:bemptyv,bepsi:bepsi,bernou:bernou,beta:beta,beth:beth,between:between,bfr:bfr,bigcap:bigcap,bigcirc:bigcirc,bigcup:bigcup,bigodot:bigodot,bigoplus:bigoplus,bigotimes:bigotimes,bigsqcup:bigsqcup,bigstar:bigstar,bigtriangledown:bigtriangledown,bigtriangleup:bigtriangleup,biguplus:biguplus,bigvee:bigvee,bigwedge:bigwedge,bkarow:bkarow,blacklozenge:blacklozenge,blacksquare:blacksquare,blacktriangle:blacktriangle,blacktriangledown:blacktriangledown,blacktriangleleft:blacktriangleleft,blacktriangleright:blacktriangleright,blank:blank,blk12:blk12,blk14:blk14,blk34:blk34,block:block,bne:bne,bnequiv:bnequiv,bnot:bnot,bopf:bopf,bot:bot,bottom:bottom,bowtie:bowtie,boxDL:boxDL,boxDR:boxDR,boxDl:boxDl,boxDr:boxDr,boxH:boxH,boxHD:boxHD,boxHU:boxHU,boxHd:boxHd,boxHu:boxHu,boxUL:boxUL,boxUR:boxUR,boxUl:boxUl,boxUr:boxUr,boxV:boxV,boxVH:boxVH,boxVL:boxVL,boxVR:boxVR,boxVh:boxVh,boxVl:boxVl,boxVr:boxVr,boxbox:boxbox,boxdL:boxdL,boxdR:boxdR,boxdl:boxdl,boxdr:boxdr,boxh:boxh,boxhD:boxhD,boxhU:boxhU,boxhd:boxhd,boxhu:boxhu,boxminus:boxminus,boxplus:boxplus,boxtimes:boxtimes,boxuL:boxuL,boxuR:boxuR,boxul:boxul,boxur:boxur,boxv:boxv,boxvH:boxvH,boxvL:boxvL,boxvR:boxvR,boxvh:boxvh,boxvl:boxvl,boxvr:boxvr,bprime:bprime,breve:breve,brvba:brvba,brvbar:brvbar,bscr:bscr,bsemi:bsemi,bsim:bsim,bsime:bsime,bsol:bsol,bsolb:bsolb,bsolhsub:bsolhsub,bull:bull,bullet:bullet,bump:bump,bumpE:bumpE,bumpe:bumpe,bumpeq:bumpeq,cacute:cacute,cap:cap,capand:capand,capbrcup:capbrcup,capcap:capcap,capcup:capcup,capdot:capdot,caps:caps,caret:caret,caron:caron,ccaps:ccaps,ccaron:ccaron,ccedi:ccedi,ccedil:ccedil,ccirc:ccirc,ccups:ccups,ccupssm:ccupssm,cdot:cdot,cedi:cedi,cedil:cedil,cemptyv:cemptyv,cen:cen,cent:cent,centerdot:centerdot,cfr:cfr,chcy:chcy,check:check,checkmark:checkmark,chi:chi,cir:cir,cirE:cirE,circ:circ,circeq:circeq,circlearrowleft:circlearrowleft,circlearrowright:circlearrowright,circledR:circledR,circledS:circledS,circledast:circledast,circledcirc:circledcirc,circleddash:circleddash,cire:cire,cirfnint:cirfnint,cirmid:cirmid,cirscir:cirscir,clubs:clubs,clubsuit:clubsuit,colon:colon,colone:colone,coloneq:coloneq,comma:comma,commat:commat,comp:comp,compfn:compfn,complement:complement,complexes:complexes,cong:cong,congdot:congdot,conint:conint,copf:copf,coprod:coprod,cop:cop,copy:copy,copysr:copysr,crarr:crarr,cross:cross,cscr:cscr,csub:csub,csube:csube,csup:csup,csupe:csupe,ctdot:ctdot,cudarrl:cudarrl,cudarrr:cudarrr,cuepr:cuepr,cuesc:cuesc,cularr:cularr,cularrp:cularrp,cup:cup,cupbrcap:cupbrcap,cupcap:cupcap,cupcup:cupcup,cupdot:cupdot,cupor:cupor,cups:cups,curarr:curarr,curarrm:curarrm,curlyeqprec:curlyeqprec,curlyeqsucc:curlyeqsucc,curlyvee:curlyvee,curlywedge:curlywedge,curre:curre,curren:curren,curvearrowleft:curvearrowleft,curvearrowright:curvearrowright,cuvee:cuvee,cuwed:cuwed,cwconint:cwconint,cwint:cwint,cylcty:cylcty,dArr:dArr,dHar:dHar,dagger:dagger,daleth:daleth,darr:darr,dash:dash,dashv:dashv,dbkarow:dbkarow,dblac:dblac,dcaron:dcaron,dcy:dcy,dd:dd,ddagger:ddagger,ddarr:ddarr,ddotseq:ddotseq,de:de,deg:deg,delta:delta,demptyv:demptyv,dfisht:dfisht,dfr:dfr,dharl:dharl,dharr:dharr,diam:diam,diamond:diamond,diamondsuit:diamondsuit,diams:diams,die:die,digamma:digamma,disin:disin,div:div,divid:divid,divide:divide,divideontimes:divideontimes,divonx:divonx,djcy:djcy,dlcorn:dlcorn,dlcrop:dlcrop,dollar:dollar,dopf:dopf,dot:dot,doteq:doteq,doteqdot:doteqdot,dotminus:dotminus,dotplus:dotplus,dotsquare:dotsquare,doublebarwedge:doublebarwedge,downarrow:downarrow,downdownarrows:downdownarrows,downharpoonleft:downharpoonleft,downharpoonright:downharpoonright,drbkarow:drbkarow,drcorn:drcorn,drcrop:drcrop,dscr:dscr,dscy:dscy,dsol:dsol,dstrok:dstrok,dtdot:dtdot,dtri:dtri,dtrif:dtrif,duarr:duarr,duhar:duhar,dwangle:dwangle,dzcy:dzcy,dzigrarr:dzigrarr,eDDot:eDDot,eDot:eDot,eacut:eacut,eacute:eacute,easter:easter,ecaron:ecaron,ecir:ecir,ecirc:ecirc,ecolon:ecolon,ecy:ecy,edot:edot,ee:ee,efDot:efDot,efr:efr,eg:eg,egrav:egrav,egrave:egrave,egs:egs,egsdot:egsdot,el:el,elinters:elinters,ell:ell,els:els,elsdot:elsdot,emacr:emacr,empty:empty,emptyset:emptyset,emptyv:emptyv,emsp13:emsp13,emsp14:emsp14,emsp:emsp,eng:eng,ensp:ensp,eogon:eogon,eopf:eopf,epar:epar,eparsl:eparsl,eplus:eplus,epsi:epsi,epsilon:epsilon,epsiv:epsiv,eqcirc:eqcirc,eqcolon:eqcolon,eqsim:eqsim,eqslantgtr:eqslantgtr,eqslantless:eqslantless,equals:equals,equest:equest,equiv:equiv,equivDD:equivDD,eqvparsl:eqvparsl,erDot:erDot,erarr:erarr,escr:escr,esdot:esdot,esim:esim,eta:eta,et:et,eth:eth,eum:eum,euml:euml,euro:euro,excl:excl,exist:exist,expectation:expectation,exponentiale:exponentiale,fallingdotseq:fallingdotseq,fcy:fcy,female:female,ffilig:ffilig,fflig:fflig,ffllig:ffllig,ffr:ffr,filig:filig,fjlig:fjlig,flat:flat,fllig:fllig,fltns:fltns,fnof:fnof,fopf:fopf,forall:forall,fork:fork,forkv:forkv,fpartint:fpartint,frac1:frac1,frac12:frac12,frac13:frac13,frac14:frac14,frac15:frac15,frac16:frac16,frac18:frac18,frac23:frac23,frac25:frac25,frac3:frac3,frac34:frac34,frac35:frac35,frac38:frac38,frac45:frac45,frac56:frac56,frac58:frac58,frac78:frac78,frasl:frasl,frown:frown,fscr:fscr,gE:gE,gEl:gEl,gacute:gacute,gamma:gamma,gammad:gammad,gap:gap,gbreve:gbreve,gcirc:gcirc,gcy:gcy,gdot:gdot,ge:ge,gel:gel,geq:geq,geqq:geqq,geqslant:geqslant,ges:ges,gescc:gescc,gesdot:gesdot,gesdoto:gesdoto,gesdotol:gesdotol,gesl:gesl,gesles:gesles,gfr:gfr,gg:gg,ggg:ggg,gimel:gimel,gjcy:gjcy,gl:gl,glE:glE,gla:gla,glj:glj,gnE:gnE,gnap:gnap,gnapprox:gnapprox,gne:gne,gneq:gneq,gneqq:gneqq,gnsim:gnsim,gopf:gopf,grave:grave,gscr:gscr,gsim:gsim,gsime:gsime,gsiml:gsiml,g:g,gt:gt,gtcc:gtcc,gtcir:gtcir,gtdot:gtdot,gtlPar:gtlPar,gtquest:gtquest,gtrapprox:gtrapprox,gtrarr:gtrarr,gtrdot:gtrdot,gtreqless:gtreqless,gtreqqless:gtreqqless,gtrless:gtrless,gtrsim:gtrsim,gvertneqq:gvertneqq,gvnE:gvnE,hArr:hArr,hairsp:hairsp,half:half,hamilt:hamilt,hardcy:hardcy,harr:harr,harrcir:harrcir,harrw:harrw,hbar:hbar,hcirc:hcirc,hearts:hearts,heartsuit:heartsuit,hellip:hellip,hercon:hercon,hfr:hfr,hksearow:hksearow,hkswarow:hkswarow,hoarr:hoarr,homtht:homtht,hookleftarrow:hookleftarrow,hookrightarrow:hookrightarrow,hopf:hopf,horbar:horbar,hscr:hscr,hslash:hslash,hstrok:hstrok,hybull:hybull,hyphen:hyphen,iacut:iacut,iacute:iacute,ic:ic,icir:icir,icirc:icirc,icy:icy,iecy:iecy,iexc:iexc,iexcl:iexcl,iff:iff,ifr:ifr,igrav:igrav,igrave:igrave,ii:ii,iiiint:iiiint,iiint:iiint,iinfin:iinfin,iiota:iiota,ijlig:ijlig,imacr:imacr,image:image,imagline:imagline,imagpart:imagpart,imath:imath,imof:imof,imped:imped,incare:incare,infin:infin,infintie:infintie,inodot:inodot,int:int,intcal:intcal,integers:integers,intercal:intercal,intlarhk:intlarhk,intprod:intprod,iocy:iocy,iogon:iogon,iopf:iopf,iota:iota,iprod:iprod,iques:iques,iquest:iquest,iscr:iscr,isin:isin,isinE:isinE,isindot:isindot,isins:isins,isinsv:isinsv,isinv:isinv,it:it,itilde:itilde,iukcy:iukcy,ium:ium,iuml:iuml,jcirc:jcirc,jcy:jcy,jfr:jfr,jmath:jmath,jopf:jopf,jscr:jscr,jsercy:jsercy,jukcy:jukcy,kappa:kappa,kappav:kappav,kcedil:kcedil,kcy:kcy,kfr:kfr,kgreen:kgreen,khcy:khcy,kjcy:kjcy,kopf:kopf,kscr:kscr,lAarr:lAarr,lArr:lArr,lAtail:lAtail,lBarr:lBarr,lE:lE,lEg:lEg,lHar:lHar,lacute:lacute,laemptyv:laemptyv,lagran:lagran,lambda:lambda,lang:lang,langd:langd,langle:langle,lap:lap,laqu:laqu,laquo:laquo,larr:larr,larrb:larrb,larrbfs:larrbfs,larrfs:larrfs,larrhk:larrhk,larrlp:larrlp,larrpl:larrpl,larrsim:larrsim,larrtl:larrtl,lat:lat,latail:latail,late:late,lates:lates,lbarr:lbarr,lbbrk:lbbrk,lbrace:lbrace,lbrack:lbrack,lbrke:lbrke,lbrksld:lbrksld,lbrkslu:lbrkslu,lcaron:lcaron,lcedil:lcedil,lceil:lceil,lcub:lcub,lcy:lcy,ldca:ldca,ldquo:ldquo,ldquor:ldquor,ldrdhar:ldrdhar,ldrushar:ldrushar,ldsh:ldsh,le:le,leftarrow:leftarrow,leftarrowtail:leftarrowtail,leftharpoondown:leftharpoondown,leftharpoonup:leftharpoonup,leftleftarrows:leftleftarrows,leftrightarrow:leftrightarrow,leftrightarrows:leftrightarrows,leftrightharpoons:leftrightharpoons,leftrightsquigarrow:leftrightsquigarrow,leftthreetimes:leftthreetimes,leg:leg,leq:leq,leqq:leqq,leqslant:leqslant,les:les,lescc:lescc,lesdot:lesdot,lesdoto:lesdoto,lesdotor:lesdotor,lesg:lesg,lesges:lesges,lessapprox:lessapprox,lessdot:lessdot,lesseqgtr:lesseqgtr,lesseqqgtr:lesseqqgtr,lessgtr:lessgtr,lesssim:lesssim,lfisht:lfisht,lfloor:lfloor,lfr:lfr,lg:lg,lgE:lgE,lhard:lhard,lharu:lharu,lharul:lharul,lhblk:lhblk,ljcy:ljcy,ll:ll,llarr:llarr,llcorner:llcorner,llhard:llhard,lltri:lltri,lmidot:lmidot,lmoust:lmoust,lmoustache:lmoustache,lnE:lnE,lnap:lnap,lnapprox:lnapprox,lne:lne,lneq:lneq,lneqq:lneqq,lnsim:lnsim,loang:loang,loarr:loarr,lobrk:lobrk,longleftarrow:longleftarrow,longleftrightarrow:longleftrightarrow,longmapsto:longmapsto,longrightarrow:longrightarrow,looparrowleft:looparrowleft,looparrowright:looparrowright,lopar:lopar,lopf:lopf,loplus:loplus,lotimes:lotimes,lowast:lowast,lowbar:lowbar,loz:loz,lozenge:lozenge,lozf:lozf,lpar:lpar,lparlt:lparlt,lrarr:lrarr,lrcorner:lrcorner,lrhar:lrhar,lrhard:lrhard,lrm:lrm,lrtri:lrtri,lsaquo:lsaquo,lscr:lscr,lsh:lsh,lsim:lsim,lsime:lsime,lsimg:lsimg,lsqb:lsqb,lsquo:lsquo,lsquor:lsquor,lstrok:lstrok,l:l,lt:lt,ltcc:ltcc,ltcir:ltcir,ltdot:ltdot,lthree:lthree,ltimes:ltimes,ltlarr:ltlarr,ltquest:ltquest,ltrPar:ltrPar,ltri:ltri,ltrie:ltrie,ltrif:ltrif,lurdshar:lurdshar,luruhar:luruhar,lvertneqq:lvertneqq,lvnE:lvnE,mDDot:mDDot,mac:mac,macr:macr,male:male,malt:malt,maltese:maltese,map:map$1,mapsto:mapsto,mapstodown:mapstodown,mapstoleft:mapstoleft,mapstoup:mapstoup,marker:marker,mcomma:mcomma,mcy:mcy,mdash:mdash,measuredangle:measuredangle,mfr:mfr,mho:mho,micr:micr,micro:micro,mid:mid,midast:midast,midcir:midcir,middo:middo,middot:middot,minus:minus,minusb:minusb,minusd:minusd,minusdu:minusdu,mlcp:mlcp,mldr:mldr,mnplus:mnplus,models:models,mopf:mopf,mp:mp,mscr:mscr,mstpos:mstpos,mu:mu,multimap:multimap,mumap:mumap,nGg:nGg,nGt:nGt,nGtv:nGtv,nLeftarrow:nLeftarrow,nLeftrightarrow:nLeftrightarrow,nLl:nLl,nLt:nLt,nLtv:nLtv,nRightarrow:nRightarrow,nVDash:nVDash,nVdash:nVdash,nabla:nabla,nacute:nacute,nang:nang,nap:nap,napE:napE,napid:napid,napos:napos,napprox:napprox,natur:natur,natural:natural,naturals:naturals,nbs:nbs,nbsp:nbsp,nbump:nbump,nbumpe:nbumpe,ncap:ncap,ncaron:ncaron,ncedil:ncedil,ncong:ncong,ncongdot:ncongdot,ncup:ncup,ncy:ncy,ndash:ndash,ne:ne,neArr:neArr,nearhk:nearhk,nearr:nearr,nearrow:nearrow,nedot:nedot,nequiv:nequiv,nesear:nesear,nesim:nesim,nexist:nexist,nexists:nexists,nfr:nfr,ngE:ngE,nge:nge,ngeq:ngeq,ngeqq:ngeqq,ngeqslant:ngeqslant,nges:nges,ngsim:ngsim,ngt:ngt,ngtr:ngtr,nhArr:nhArr,nharr:nharr,nhpar:nhpar,ni:ni,nis:nis,nisd:nisd,niv:niv,njcy:njcy,nlArr:nlArr,nlE:nlE,nlarr:nlarr,nldr:nldr,nle:nle,nleftarrow:nleftarrow,nleftrightarrow:nleftrightarrow,nleq:nleq,nleqq:nleqq,nleqslant:nleqslant,nles:nles,nless:nless,nlsim:nlsim,nlt:nlt,nltri:nltri,nltrie:nltrie,nmid:nmid,nopf:nopf,no:no,not:not,notin:notin,notinE:notinE,notindot:notindot,notinva:notinva,notinvb:notinvb,notinvc:notinvc,notni:notni,notniva:notniva,notnivb:notnivb,notnivc:notnivc,npar:npar,nparallel:nparallel,nparsl:nparsl,npart:npart,npolint:npolint,npr:npr,nprcue:nprcue,npre:npre,nprec:nprec,npreceq:npreceq,nrArr:nrArr,nrarr:nrarr,nrarrc:nrarrc,nrarrw:nrarrw,nrightarrow:nrightarrow,nrtri:nrtri,nrtrie:nrtrie,nsc:nsc,nsccue:nsccue,nsce:nsce,nscr:nscr,nshortmid:nshortmid,nshortparallel:nshortparallel,nsim:nsim,nsime:nsime,nsimeq:nsimeq,nsmid:nsmid,nspar:nspar,nsqsube:nsqsube,nsqsupe:nsqsupe,nsub:nsub,nsubE:nsubE,nsube:nsube,nsubset:nsubset,nsubseteq:nsubseteq,nsubseteqq:nsubseteqq,nsucc:nsucc,nsucceq:nsucceq,nsup:nsup,nsupE:nsupE,nsupe:nsupe,nsupset:nsupset,nsupseteq:nsupseteq,nsupseteqq:nsupseteqq,ntgl:ntgl,ntild:ntild,ntilde:ntilde,ntlg:ntlg,ntriangleleft:ntriangleleft,ntrianglelefteq:ntrianglelefteq,ntriangleright:ntriangleright,ntrianglerighteq:ntrianglerighteq,nu:nu,num:num,numero:numero,numsp:numsp,nvDash:nvDash,nvHarr:nvHarr,nvap:nvap,nvdash:nvdash,nvge:nvge,nvgt:nvgt,nvinfin:nvinfin,nvlArr:nvlArr,nvle:nvle,nvlt:nvlt,nvltrie:nvltrie,nvrArr:nvrArr,nvrtrie:nvrtrie,nvsim:nvsim,nwArr:nwArr,nwarhk:nwarhk,nwarr:nwarr,nwarrow:nwarrow,nwnear:nwnear,oS:oS,oacut:oacut,oacute:oacute,oast:oast,ocir:ocir,ocirc:ocirc,ocy:ocy,odash:odash,odblac:odblac,odiv:odiv,odot:odot,odsold:odsold,oelig:oelig,ofcir:ofcir,ofr:ofr,ogon:ogon,ograv:ograv,ograve:ograve,ogt:ogt,ohbar:ohbar,ohm:ohm,oint:oint,olarr:olarr,olcir:olcir,olcross:olcross,oline:oline,olt:olt,omacr:omacr,omega:omega,omicron:omicron,omid:omid,ominus:ominus,oopf:oopf,opar:opar,operp:operp,oplus:oplus,or:or,orarr:orarr,ord:ord,order:order,orderof:orderof,ordf:ordf,ordm:ordm,origof:origof,oror:oror,orslope:orslope,orv:orv,oscr:oscr,oslas:oslas,oslash:oslash,osol:osol,otild:otild,otilde:otilde,otimes:otimes,otimesas:otimesas,oum:oum,ouml:ouml,ovbar:ovbar,par:par,para:para,parallel:parallel,parsim:parsim,parsl:parsl,part:part,pcy:pcy,percnt:percnt,period:period,permil:permil,perp:perp,pertenk:pertenk,pfr:pfr,phi:phi,phiv:phiv,phmmat:phmmat,phone:phone,pi:pi,pitchfork:pitchfork,piv:piv,planck:planck,planckh:planckh,plankv:plankv,plus:plus,plusacir:plusacir,plusb:plusb,pluscir:pluscir,plusdo:plusdo,plusdu:plusdu,pluse:pluse,plusm:plusm,plusmn:plusmn,plussim:plussim,plustwo:plustwo,pm:pm,pointint:pointint,popf:popf,poun:poun,pound:pound,pr:pr,prE:prE,prap:prap,prcue:prcue,pre:pre,prec:prec,precapprox:precapprox,preccurlyeq:preccurlyeq,preceq:preceq,precnapprox:precnapprox,precneqq:precneqq,precnsim:precnsim,precsim:precsim,prime:prime,primes:primes,prnE:prnE,prnap:prnap,prnsim:prnsim,prod:prod,profalar:profalar,profline:profline,profsurf:profsurf,prop:prop,propto:propto,prsim:prsim,prurel:prurel,pscr:pscr,psi:psi,puncsp:puncsp,qfr:qfr,qint:qint,qopf:qopf,qprime:qprime,qscr:qscr,quaternions:quaternions,quatint:quatint,quest:quest,questeq:questeq,quo:quo,quot:quot,rAarr:rAarr,rArr:rArr,rAtail:rAtail,rBarr:rBarr,rHar:rHar,race:race,racute:racute,radic:radic,raemptyv:raemptyv,rang:rang,rangd:rangd,range:range,rangle:rangle,raqu:raqu,raquo:raquo,rarr:rarr,rarrap:rarrap,rarrb:rarrb,rarrbfs:rarrbfs,rarrc:rarrc,rarrfs:rarrfs,rarrhk:rarrhk,rarrlp:rarrlp,rarrpl:rarrpl,rarrsim:rarrsim,rarrtl:rarrtl,rarrw:rarrw,ratail:ratail,ratio:ratio,rationals:rationals,rbarr:rbarr,rbbrk:rbbrk,rbrace:rbrace,rbrack:rbrack,rbrke:rbrke,rbrksld:rbrksld,rbrkslu:rbrkslu,rcaron:rcaron,rcedil:rcedil,rceil:rceil,rcub:rcub,rcy:rcy,rdca:rdca,rdldhar:rdldhar,rdquo:rdquo,rdquor:rdquor,rdsh:rdsh,real:real,realine:realine,realpart:realpart,reals:reals,rect:rect,re:re,reg:reg,rfisht:rfisht,rfloor:rfloor,rfr:rfr,rhard:rhard,rharu:rharu,rharul:rharul,rho:rho,rhov:rhov,rightarrow:rightarrow,rightarrowtail:rightarrowtail,rightharpoondown:rightharpoondown,rightharpoonup:rightharpoonup,rightleftarrows:rightleftarrows,rightleftharpoons:rightleftharpoons,rightrightarrows:rightrightarrows,rightsquigarrow:rightsquigarrow,rightthreetimes:rightthreetimes,ring:ring,risingdotseq:risingdotseq,rlarr:rlarr,rlhar:rlhar,rlm:rlm,rmoust:rmoust,rmoustache:rmoustache,rnmid:rnmid,roang:roang,roarr:roarr,robrk:robrk,ropar:ropar,ropf:ropf,roplus:roplus,rotimes:rotimes,rpar:rpar,rpargt:rpargt,rppolint:rppolint,rrarr:rrarr,rsaquo:rsaquo,rscr:rscr,rsh:rsh,rsqb:rsqb,rsquo:rsquo,rsquor:rsquor,rthree:rthree,rtimes:rtimes,rtri:rtri,rtrie:rtrie,rtrif:rtrif,rtriltri:rtriltri,ruluhar:ruluhar,rx:rx,sacute:sacute,sbquo:sbquo,sc:sc,scE:scE,scap:scap,scaron:scaron,sccue:sccue,sce:sce,scedil:scedil,scirc:scirc,scnE:scnE,scnap:scnap,scnsim:scnsim,scpolint:scpolint,scsim:scsim,scy:scy,sdot:sdot,sdotb:sdotb,sdote:sdote,seArr:seArr,searhk:searhk,searr:searr,searrow:searrow,sec:sec,sect:sect,semi:semi,seswar:seswar,setminus:setminus,setmn:setmn,sext:sext,sfr:sfr,sfrown:sfrown,sharp:sharp,shchcy:shchcy,shcy:shcy,shortmid:shortmid,shortparallel:shortparallel,sh:sh,shy:shy,sigma:sigma,sigmaf:sigmaf,sigmav:sigmav,sim:sim,simdot:simdot,sime:sime,simeq:simeq,simg:simg,simgE:simgE,siml:siml,simlE:simlE,simne:simne,simplus:simplus,simrarr:simrarr,slarr:slarr,smallsetminus:smallsetminus,smashp:smashp,smeparsl:smeparsl,smid:smid,smile:smile,smt:smt,smte:smte,smtes:smtes,softcy:softcy,sol:sol,solb:solb,solbar:solbar,sopf:sopf,spades:spades,spadesuit:spadesuit,spar:spar,sqcap:sqcap,sqcaps:sqcaps,sqcup:sqcup,sqcups:sqcups,sqsub:sqsub,sqsube:sqsube,sqsubset:sqsubset,sqsubseteq:sqsubseteq,sqsup:sqsup,sqsupe:sqsupe,sqsupset:sqsupset,sqsupseteq:sqsupseteq,squ:squ,square:square,squarf:squarf,squf:squf,srarr:srarr,sscr:sscr,ssetmn:ssetmn,ssmile:ssmile,sstarf:sstarf,star:star,starf:starf,straightepsilon:straightepsilon,straightphi:straightphi,strns:strns,sub:sub,subE:subE,subdot:subdot,sube:sube,subedot:subedot,submult:submult,subnE:subnE,subne:subne,subplus:subplus,subrarr:subrarr,subset:subset,subseteq:subseteq,subseteqq:subseteqq,subsetneq:subsetneq,subsetneqq:subsetneqq,subsim:subsim,subsub:subsub,subsup:subsup,succ:succ,succapprox:succapprox,succcurlyeq:succcurlyeq,succeq:succeq,succnapprox:succnapprox,succneqq:succneqq,succnsim:succnsim,succsim:succsim,sum:sum,sung:sung,sup:sup,sup1:sup1,sup2:sup2,sup3:sup3,supE:supE,supdot:supdot,supdsub:supdsub,supe:supe,supedot:supedot,suphsol:suphsol,suphsub:suphsub,suplarr:suplarr,supmult:supmult,supnE:supnE,supne:supne,supplus:supplus,supset:supset,supseteq:supseteq,supseteqq:supseteqq,supsetneq:supsetneq,supsetneqq:supsetneqq,supsim:supsim,supsub:supsub,supsup:supsup,swArr:swArr,swarhk:swarhk,swarr:swarr,swarrow:swarrow,swnwar:swnwar,szli:szli,szlig:szlig,target:target,tau:tau,tbrk:tbrk,tcaron:tcaron,tcedil:tcedil,tcy:tcy,tdot:tdot,telrec:telrec,tfr:tfr,there4:there4,therefore:therefore,theta:theta,thetasym:thetasym,thetav:thetav,thickapprox:thickapprox,thicksim:thicksim,thinsp:thinsp,thkap:thkap,thksim:thksim,thor:thor,thorn:thorn,tilde:tilde,time:time,times:times,timesb:timesb,timesbar:timesbar,timesd:timesd,tint:tint,toea:toea,top:top,topbot:topbot,topcir:topcir,topf:topf,topfork:topfork,tosa:tosa,tprime:tprime,trade:trade,triangle:triangle,triangledown:triangledown,triangleleft:triangleleft,trianglelefteq:trianglelefteq,triangleq:triangleq,triangleright:triangleright,trianglerighteq:trianglerighteq,tridot:tridot,trie:trie,triminus:triminus,triplus:triplus,trisb:trisb,tritime:tritime,trpezium:trpezium,tscr:tscr,tscy:tscy,tshcy:tshcy,tstrok:tstrok,twixt:twixt,twoheadleftarrow:twoheadleftarrow,twoheadrightarrow:twoheadrightarrow,uArr:uArr,uHar:uHar,uacut:uacut,uacute:uacute,uarr:uarr,ubrcy:ubrcy,ubreve:ubreve,ucir:ucir,ucirc:ucirc,ucy:ucy,udarr:udarr,udblac:udblac,udhar:udhar,ufisht:ufisht,ufr:ufr,ugrav:ugrav,ugrave:ugrave,uharl:uharl,uharr:uharr,uhblk:uhblk,ulcorn:ulcorn,ulcorner:ulcorner,ulcrop:ulcrop,ultri:ultri,umacr:umacr,um:um,uml:uml,uogon:uogon,uopf:uopf,uparrow:uparrow,updownarrow:updownarrow,upharpoonleft:upharpoonleft,upharpoonright:upharpoonright,uplus:uplus,upsi:upsi,upsih:upsih,upsilon:upsilon,upuparrows:upuparrows,urcorn:urcorn,urcorner:urcorner,urcrop:urcrop,uring:uring,urtri:urtri,uscr:uscr,utdot:utdot,utilde:utilde,utri:utri,utrif:utrif,uuarr:uuarr,uum:uum,uuml:uuml,uwangle:uwangle,vArr:vArr,vBar:vBar,vBarv:vBarv,vDash:vDash,vangrt:vangrt,varepsilon:varepsilon,varkappa:varkappa,varnothing:varnothing,varphi:varphi,varpi:varpi,varpropto:varpropto,varr:varr,varrho:varrho,varsigma:varsigma,varsubsetneq:varsubsetneq,varsubsetneqq:varsubsetneqq,varsupsetneq:varsupsetneq,varsupsetneqq:varsupsetneqq,vartheta:vartheta,vartriangleleft:vartriangleleft,vartriangleright:vartriangleright,vcy:vcy,vdash:vdash,vee:vee,veebar:veebar,veeeq:veeeq,vellip:vellip,verbar:verbar,vert:vert,vfr:vfr,vltri:vltri,vnsub:vnsub,vnsup:vnsup,vopf:vopf,vprop:vprop,vrtri:vrtri,vscr:vscr,vsubnE:vsubnE,vsubne:vsubne,vsupnE:vsupnE,vsupne:vsupne,vzigzag:vzigzag,wcirc:wcirc,wedbar:wedbar,wedge:wedge,wedgeq:wedgeq,weierp:weierp,wfr:wfr,wopf:wopf,wp:wp,wr:wr,wreath:wreath,wscr:wscr,xcap:xcap,xcirc:xcirc,xcup:xcup,xdtri:xdtri,xfr:xfr,xhArr:xhArr,xharr:xharr,xi:xi,xlArr:xlArr,xlarr:xlarr,xmap:xmap,xnis:xnis,xodot:xodot,xopf:xopf,xoplus:xoplus,xotime:xotime,xrArr:xrArr,xrarr:xrarr,xscr:xscr,xsqcup:xsqcup,xuplus:xuplus,xutri:xutri,xvee:xvee,xwedge:xwedge,yacut:yacut,yacute:yacute,yacy:yacy,ycirc:ycirc,ycy:ycy,ye:ye,yen:yen,yfr:yfr,yicy:yicy,yopf:yopf,yscr:yscr,yucy:yucy,yum:yum,yuml:yuml,zacute:zacute,zcaron:zcaron,zcy:zcy,zdot:zdot,zeetrf:zeetrf,zeta:zeta,zfr:zfr,zhcy:zhcy,zigrarr:zigrarr,zopf:zopf,zscr:zscr,zwj:zwj,zwnj:zwnj,Map:"⤅",in:"∈"},characterEntities=Object.freeze({AEli:AEli,AElig:AElig,AM:AM,AMP:AMP,Aacut:Aacut,Aacute:Aacute,Abreve:Abreve,Acir:Acir,Acirc:Acirc,Acy:Acy,Afr:Afr,Agrav:Agrav,Agrave:Agrave,Alpha:Alpha,Amacr:Amacr,And:And,Aogon:Aogon,Aopf:Aopf,ApplyFunction:ApplyFunction,Arin:Arin,Aring:Aring,Ascr:Ascr,Assign:Assign,Atild:Atild,Atilde:Atilde,Aum:Aum,Auml:Auml,Backslash:Backslash,Barv:Barv,Barwed:Barwed,Bcy:Bcy,Because:Because,Bernoullis:Bernoullis,Beta:Beta,Bfr:Bfr,Bopf:Bopf,Breve:Breve,Bscr:Bscr,Bumpeq:Bumpeq,CHcy:CHcy,COP:COP,COPY:COPY,Cacute:Cacute,Cap:Cap,CapitalDifferentialD:CapitalDifferentialD,Cayleys:Cayleys,Ccaron:Ccaron,Ccedi:Ccedi,Ccedil:Ccedil,Ccirc:Ccirc,Cconint:Cconint,Cdot:Cdot,Cedilla:Cedilla,CenterDot:CenterDot,Cfr:Cfr,Chi:Chi,CircleDot:CircleDot,CircleMinus:CircleMinus,CirclePlus:CirclePlus,CircleTimes:CircleTimes,ClockwiseContourIntegral:ClockwiseContourIntegral,CloseCurlyDoubleQuote:CloseCurlyDoubleQuote,CloseCurlyQuote:CloseCurlyQuote,Colon:Colon,Colone:Colone,Congruent:Congruent,Conint:Conint,ContourIntegral:ContourIntegral,Copf:Copf,Coproduct:Coproduct,CounterClockwiseContourIntegral:CounterClockwiseContourIntegral,Cross:Cross,Cscr:Cscr,Cup:Cup,CupCap:CupCap,DD:DD,DDotrahd:DDotrahd,DJcy:DJcy,DScy:DScy,DZcy:DZcy,Dagger:Dagger,Darr:Darr,Dashv:Dashv,Dcaron:Dcaron,Dcy:Dcy,Del:Del,Delta:Delta,Dfr:Dfr,DiacriticalAcute:DiacriticalAcute,DiacriticalDot:DiacriticalDot,DiacriticalDoubleAcute:DiacriticalDoubleAcute,DiacriticalGrave:DiacriticalGrave,DiacriticalTilde:DiacriticalTilde,Diamond:Diamond,DifferentialD:DifferentialD,Dopf:Dopf,Dot:Dot,DotDot:DotDot,DotEqual:DotEqual,DoubleContourIntegral:DoubleContourIntegral,DoubleDot:DoubleDot,DoubleDownArrow:DoubleDownArrow,DoubleLeftArrow:DoubleLeftArrow,DoubleLeftRightArrow:DoubleLeftRightArrow,DoubleLeftTee:DoubleLeftTee,DoubleLongLeftArrow:DoubleLongLeftArrow,DoubleLongLeftRightArrow:DoubleLongLeftRightArrow,DoubleLongRightArrow:DoubleLongRightArrow,DoubleRightArrow:DoubleRightArrow,DoubleRightTee:DoubleRightTee,DoubleUpArrow:DoubleUpArrow,DoubleUpDownArrow:DoubleUpDownArrow,DoubleVerticalBar:DoubleVerticalBar,DownArrow:DownArrow,DownArrowBar:DownArrowBar,DownArrowUpArrow:DownArrowUpArrow,DownBreve:DownBreve,DownLeftRightVector:DownLeftRightVector,DownLeftTeeVector:DownLeftTeeVector,DownLeftVector:DownLeftVector,DownLeftVectorBar:DownLeftVectorBar,DownRightTeeVector:DownRightTeeVector,DownRightVector:DownRightVector,DownRightVectorBar:DownRightVectorBar,DownTee:DownTee,DownTeeArrow:DownTeeArrow,Downarrow:Downarrow,Dscr:Dscr,Dstrok:Dstrok,ENG:ENG,ET:ET,ETH:ETH,Eacut:Eacut,Eacute:Eacute,Ecaron:Ecaron,Ecir:Ecir,Ecirc:Ecirc,Ecy:Ecy,Edot:Edot,Efr:Efr,Egrav:Egrav,Egrave:Egrave,Element:Element,Emacr:Emacr,EmptySmallSquare:EmptySmallSquare,EmptyVerySmallSquare:EmptyVerySmallSquare,Eogon:Eogon,Eopf:Eopf,Epsilon:Epsilon,Equal:Equal,EqualTilde:EqualTilde,Equilibrium:Equilibrium,Escr:Escr,Esim:Esim,Eta:Eta,Eum:Eum,Euml:Euml,Exists:Exists,ExponentialE:ExponentialE,Fcy:Fcy,Ffr:Ffr,FilledSmallSquare:FilledSmallSquare,FilledVerySmallSquare:FilledVerySmallSquare,Fopf:Fopf,ForAll:ForAll,Fouriertrf:Fouriertrf,Fscr:Fscr,GJcy:GJcy,G:G,GT:GT,Gamma:Gamma,Gammad:Gammad,Gbreve:Gbreve,Gcedil:Gcedil,Gcirc:Gcirc,Gcy:Gcy,Gdot:Gdot,Gfr:Gfr,Gg:Gg,Gopf:Gopf,GreaterEqual:GreaterEqual,GreaterEqualLess:GreaterEqualLess,GreaterFullEqual:GreaterFullEqual,GreaterGreater:GreaterGreater,GreaterLess:GreaterLess,GreaterSlantEqual:GreaterSlantEqual,GreaterTilde:GreaterTilde,Gscr:Gscr,Gt:Gt,HARDcy:HARDcy,Hacek:Hacek,Hat:Hat,Hcirc:Hcirc,Hfr:Hfr,HilbertSpace:HilbertSpace,Hopf:Hopf,HorizontalLine:HorizontalLine,Hscr:Hscr,Hstrok:Hstrok,HumpDownHump:HumpDownHump,HumpEqual:HumpEqual,IEcy:IEcy,IJlig:IJlig,IOcy:IOcy,Iacut:Iacut,Iacute:Iacute,Icir:Icir,Icirc:Icirc,Icy:Icy,Idot:Idot,Ifr:Ifr,Igrav:Igrav,Igrave:Igrave,Im:Im,Imacr:Imacr,ImaginaryI:ImaginaryI,Implies:Implies,Int:Int,Integral:Integral,Intersection:Intersection,InvisibleComma:InvisibleComma,InvisibleTimes:InvisibleTimes,Iogon:Iogon,Iopf:Iopf,Iota:Iota,Iscr:Iscr,Itilde:Itilde,Iukcy:Iukcy,Ium:Ium,Iuml:Iuml,Jcirc:Jcirc,Jcy:Jcy,Jfr:Jfr,Jopf:Jopf,Jscr:Jscr,Jsercy:Jsercy,Jukcy:Jukcy,KHcy:KHcy,KJcy:KJcy,Kappa:Kappa,Kcedil:Kcedil,Kcy:Kcy,Kfr:Kfr,Kopf:Kopf,Kscr:Kscr,LJcy:LJcy,L:L,LT:LT,Lacute:Lacute,Lambda:Lambda,Lang:Lang,Laplacetrf:Laplacetrf,Larr:Larr,Lcaron:Lcaron,Lcedil:Lcedil,Lcy:Lcy,LeftAngleBracket:LeftAngleBracket,LeftArrow:LeftArrow,LeftArrowBar:LeftArrowBar,LeftArrowRightArrow:LeftArrowRightArrow,LeftCeiling:LeftCeiling,LeftDoubleBracket:LeftDoubleBracket,LeftDownTeeVector:LeftDownTeeVector,LeftDownVector:LeftDownVector,LeftDownVectorBar:LeftDownVectorBar,LeftFloor:LeftFloor,LeftRightArrow:LeftRightArrow,LeftRightVector:LeftRightVector,LeftTee:LeftTee,LeftTeeArrow:LeftTeeArrow,LeftTeeVector:LeftTeeVector,LeftTriangle:LeftTriangle,LeftTriangleBar:LeftTriangleBar,LeftTriangleEqual:LeftTriangleEqual,LeftUpDownVector:LeftUpDownVector,LeftUpTeeVector:LeftUpTeeVector,LeftUpVector:LeftUpVector,LeftUpVectorBar:LeftUpVectorBar,LeftVector:LeftVector,LeftVectorBar:LeftVectorBar,Leftarrow:Leftarrow,Leftrightarrow:Leftrightarrow,LessEqualGreater:LessEqualGreater,LessFullEqual:LessFullEqual,LessGreater:LessGreater,LessLess:LessLess,LessSlantEqual:LessSlantEqual,LessTilde:LessTilde,Lfr:Lfr,Ll:Ll,Lleftarrow:Lleftarrow,Lmidot:Lmidot,LongLeftArrow:LongLeftArrow,LongLeftRightArrow:LongLeftRightArrow,LongRightArrow:LongRightArrow,Longleftarrow:Longleftarrow,Longleftrightarrow:Longleftrightarrow,Longrightarrow:Longrightarrow,Lopf:Lopf,LowerLeftArrow:LowerLeftArrow,LowerRightArrow:LowerRightArrow,Lscr:Lscr,Lsh:Lsh,Lstrok:Lstrok,Lt:Lt,Mcy:Mcy,MediumSpace:MediumSpace,Mellintrf:Mellintrf,Mfr:Mfr,MinusPlus:MinusPlus,Mopf:Mopf,Mscr:Mscr,Mu:Mu,NJcy:NJcy,Nacute:Nacute,Ncaron:Ncaron,Ncedil:Ncedil,Ncy:Ncy,NegativeMediumSpace:NegativeMediumSpace,NegativeThickSpace:NegativeThickSpace,NegativeThinSpace:NegativeThinSpace,NegativeVeryThinSpace:NegativeVeryThinSpace,NestedGreaterGreater:NestedGreaterGreater,NestedLessLess:NestedLessLess,NewLine:NewLine,Nfr:Nfr,NoBreak:NoBreak,NonBreakingSpace:NonBreakingSpace,Nopf:Nopf,Not:Not,NotCongruent:NotCongruent,NotCupCap:NotCupCap,NotDoubleVerticalBar:NotDoubleVerticalBar,NotElement:NotElement,NotEqual:NotEqual,NotEqualTilde:NotEqualTilde,NotExists:NotExists,NotGreater:NotGreater,NotGreaterEqual:NotGreaterEqual,NotGreaterFullEqual:NotGreaterFullEqual,NotGreaterGreater:NotGreaterGreater,NotGreaterLess:NotGreaterLess,NotGreaterSlantEqual:NotGreaterSlantEqual,NotGreaterTilde:NotGreaterTilde,NotHumpDownHump:NotHumpDownHump,NotHumpEqual:NotHumpEqual,NotLeftTriangle:NotLeftTriangle,NotLeftTriangleBar:NotLeftTriangleBar,NotLeftTriangleEqual:NotLeftTriangleEqual,NotLess:NotLess,NotLessEqual:NotLessEqual,NotLessGreater:NotLessGreater,NotLessLess:NotLessLess,NotLessSlantEqual:NotLessSlantEqual,NotLessTilde:NotLessTilde,NotNestedGreaterGreater:NotNestedGreaterGreater,NotNestedLessLess:NotNestedLessLess,NotPrecedes:NotPrecedes,NotPrecedesEqual:NotPrecedesEqual,NotPrecedesSlantEqual:NotPrecedesSlantEqual,NotReverseElement:NotReverseElement,NotRightTriangle:NotRightTriangle,NotRightTriangleBar:NotRightTriangleBar,NotRightTriangleEqual:NotRightTriangleEqual,NotSquareSubset:NotSquareSubset,NotSquareSubsetEqual:NotSquareSubsetEqual,NotSquareSuperset:NotSquareSuperset,NotSquareSupersetEqual:NotSquareSupersetEqual,NotSubset:NotSubset,NotSubsetEqual:NotSubsetEqual,NotSucceeds:NotSucceeds,NotSucceedsEqual:NotSucceedsEqual,NotSucceedsSlantEqual:NotSucceedsSlantEqual,NotSucceedsTilde:NotSucceedsTilde,NotSuperset:NotSuperset,NotSupersetEqual:NotSupersetEqual,NotTilde:NotTilde,NotTildeEqual:NotTildeEqual,NotTildeFullEqual:NotTildeFullEqual,NotTildeTilde:NotTildeTilde,NotVerticalBar:NotVerticalBar,Nscr:Nscr,Ntild:Ntild,Ntilde:Ntilde,Nu:Nu,OElig:OElig,Oacut:Oacut,Oacute:Oacute,Ocir:Ocir,Ocirc:Ocirc,Ocy:Ocy,Odblac:Odblac,Ofr:Ofr,Ograv:Ograv,Ograve:Ograve,Omacr:Omacr,Omega:Omega,Omicron:Omicron,Oopf:Oopf,OpenCurlyDoubleQuote:OpenCurlyDoubleQuote,OpenCurlyQuote:OpenCurlyQuote,Or:Or,Oscr:Oscr,Oslas:Oslas,Oslash:Oslash,Otild:Otild,Otilde:Otilde,Otimes:Otimes,Oum:Oum,Ouml:Ouml,OverBar:OverBar,OverBrace:OverBrace,OverBracket:OverBracket,OverParenthesis:OverParenthesis,PartialD:PartialD,Pcy:Pcy,Pfr:Pfr,Phi:Phi,Pi:Pi,PlusMinus:PlusMinus,Poincareplane:Poincareplane,Popf:Popf,Pr:Pr,Precedes:Precedes,PrecedesEqual:PrecedesEqual,PrecedesSlantEqual:PrecedesSlantEqual,PrecedesTilde:PrecedesTilde,Prime:Prime,Product:Product,Proportion:Proportion,Proportional:Proportional,Pscr:Pscr,Psi:Psi,QUO:QUO,QUOT:QUOT,Qfr:Qfr,Qopf:Qopf,Qscr:Qscr,RBarr:RBarr,RE:RE,REG:REG,Racute:Racute,Rang:Rang,Rarr:Rarr,Rarrtl:Rarrtl,Rcaron:Rcaron,Rcedil:Rcedil,Rcy:Rcy,Re:Re,ReverseElement:ReverseElement,ReverseEquilibrium:ReverseEquilibrium,ReverseUpEquilibrium:ReverseUpEquilibrium,Rfr:Rfr,Rho:Rho,RightAngleBracket:RightAngleBracket,RightArrow:RightArrow,RightArrowBar:RightArrowBar,RightArrowLeftArrow:RightArrowLeftArrow,RightCeiling:RightCeiling,RightDoubleBracket:RightDoubleBracket,RightDownTeeVector:RightDownTeeVector,RightDownVector:RightDownVector,RightDownVectorBar:RightDownVectorBar,RightFloor:RightFloor,RightTee:RightTee,RightTeeArrow:RightTeeArrow,RightTeeVector:RightTeeVector,RightTriangle:RightTriangle,RightTriangleBar:RightTriangleBar,RightTriangleEqual:RightTriangleEqual,RightUpDownVector:RightUpDownVector,RightUpTeeVector:RightUpTeeVector,RightUpVector:RightUpVector,RightUpVectorBar:RightUpVectorBar,RightVector:RightVector,RightVectorBar:RightVectorBar,Rightarrow:Rightarrow,Ropf:Ropf,RoundImplies:RoundImplies,Rrightarrow:Rrightarrow,Rscr:Rscr,Rsh:Rsh,RuleDelayed:RuleDelayed,SHCHcy:SHCHcy,SHcy:SHcy,SOFTcy:SOFTcy,Sacute:Sacute,Sc:Sc,Scaron:Scaron,Scedil:Scedil,Scirc:Scirc,Scy:Scy,Sfr:Sfr,ShortDownArrow:ShortDownArrow,ShortLeftArrow:ShortLeftArrow,ShortRightArrow:ShortRightArrow,ShortUpArrow:ShortUpArrow,Sigma:Sigma,SmallCircle:SmallCircle,Sopf:Sopf,Sqrt:Sqrt,Square:Square,SquareIntersection:SquareIntersection,SquareSubset:SquareSubset,SquareSubsetEqual:SquareSubsetEqual,SquareSuperset:SquareSuperset,SquareSupersetEqual:SquareSupersetEqual,SquareUnion:SquareUnion,Sscr:Sscr,Star:Star,Sub:Sub,Subset:Subset,SubsetEqual:SubsetEqual,Succeeds:Succeeds,SucceedsEqual:SucceedsEqual,SucceedsSlantEqual:SucceedsSlantEqual,SucceedsTilde:SucceedsTilde,SuchThat:SuchThat,Sum:Sum,Sup:Sup,Superset:Superset,SupersetEqual:SupersetEqual,Supset:Supset,THOR:THOR,THORN:THORN,TRADE:TRADE,TSHcy:TSHcy,TScy:TScy,Tab:Tab,Tau:Tau,Tcaron:Tcaron,Tcedil:Tcedil,Tcy:Tcy,Tfr:Tfr,Therefore:Therefore,Theta:Theta,ThickSpace:ThickSpace,ThinSpace:ThinSpace,Tilde:Tilde,TildeEqual:TildeEqual,TildeFullEqual:TildeFullEqual,TildeTilde:TildeTilde,Topf:Topf,TripleDot:TripleDot,Tscr:Tscr,Tstrok:Tstrok,Uacut:Uacut,Uacute:Uacute,Uarr:Uarr,Uarrocir:Uarrocir,Ubrcy:Ubrcy,Ubreve:Ubreve,Ucir:Ucir,Ucirc:Ucirc,Ucy:Ucy,Udblac:Udblac,Ufr:Ufr,Ugrav:Ugrav,Ugrave:Ugrave,Umacr:Umacr,UnderBar:UnderBar,UnderBrace:UnderBrace,UnderBracket:UnderBracket,UnderParenthesis:UnderParenthesis,Union:Union,UnionPlus:UnionPlus,Uogon:Uogon,Uopf:Uopf,UpArrow:UpArrow,UpArrowBar:UpArrowBar,UpArrowDownArrow:UpArrowDownArrow,UpDownArrow:UpDownArrow,UpEquilibrium:UpEquilibrium,UpTee:UpTee,UpTeeArrow:UpTeeArrow,Uparrow:Uparrow,Updownarrow:Updownarrow,UpperLeftArrow:UpperLeftArrow,UpperRightArrow:UpperRightArrow,Upsi:Upsi,Upsilon:Upsilon,Uring:Uring,Uscr:Uscr,Utilde:Utilde,Uum:Uum,Uuml:Uuml,VDash:VDash,Vbar:Vbar,Vcy:Vcy,Vdash:Vdash,Vdashl:Vdashl,Vee:Vee,Verbar:Verbar,Vert:Vert,VerticalBar:VerticalBar,VerticalLine:VerticalLine,VerticalSeparator:VerticalSeparator,VerticalTilde:VerticalTilde,VeryThinSpace:VeryThinSpace,Vfr:Vfr,Vopf:Vopf,Vscr:Vscr,Vvdash:Vvdash,Wcirc:Wcirc,Wedge:Wedge,Wfr:Wfr,Wopf:Wopf,Wscr:Wscr,Xfr:Xfr,Xi:Xi,Xopf:Xopf,Xscr:Xscr,YAcy:YAcy,YIcy:YIcy,YUcy:YUcy,Yacut:Yacut,Yacute:Yacute,Ycirc:Ycirc,Ycy:Ycy,Yfr:Yfr,Yopf:Yopf,Yscr:Yscr,Yuml:Yuml,ZHcy:ZHcy,Zacute:Zacute,Zcaron:Zcaron,Zcy:Zcy,Zdot:Zdot,ZeroWidthSpace:ZeroWidthSpace,Zeta:Zeta,Zfr:Zfr,Zopf:Zopf,Zscr:Zscr,aacut:aacut,aacute:aacute,abreve:abreve,ac:ac,acE:acE,acd:acd,acir:acir,acirc:acirc,acut:acut,acute:acute,acy:acy,aeli:aeli,aelig:aelig,af:af,afr:afr,agrav:agrav,agrave:agrave,alefsym:alefsym,aleph:aleph,alpha:alpha,amacr:amacr,amalg:amalg,am:am,amp:amp,and:and,andand:andand,andd:andd,andslope:andslope,andv:andv,ang:ang,ange:ange,angle:angle,angmsd:angmsd,angmsdaa:angmsdaa,angmsdab:angmsdab,angmsdac:angmsdac,angmsdad:angmsdad,angmsdae:angmsdae,angmsdaf:angmsdaf,angmsdag:angmsdag,angmsdah:angmsdah,angrt:angrt,angrtvb:angrtvb,angrtvbd:angrtvbd,angsph:angsph,angst:angst,angzarr:angzarr,aogon:aogon,aopf:aopf,ap:ap,apE:apE,apacir:apacir,ape:ape,apid:apid,apos:apos,approx:approx,approxeq:approxeq,arin:arin,aring:aring,ascr:ascr,ast:ast,asymp:asymp,asympeq:asympeq,atild:atild,atilde:atilde,aum:aum,auml:auml,awconint:awconint,awint:awint,bNot:bNot,backcong:backcong,backepsilon:backepsilon,backprime:backprime,backsim:backsim,backsimeq:backsimeq,barvee:barvee,barwed:barwed,barwedge:barwedge,bbrk:bbrk,bbrktbrk:bbrktbrk,bcong:bcong,bcy:bcy,bdquo:bdquo,becaus:becaus,because:because,bemptyv:bemptyv,bepsi:bepsi,bernou:bernou,beta:beta,beth:beth,between:between,bfr:bfr,bigcap:bigcap,bigcirc:bigcirc,bigcup:bigcup,bigodot:bigodot,bigoplus:bigoplus,bigotimes:bigotimes,bigsqcup:bigsqcup,bigstar:bigstar,bigtriangledown:bigtriangledown,bigtriangleup:bigtriangleup,biguplus:biguplus,bigvee:bigvee,bigwedge:bigwedge,bkarow:bkarow,blacklozenge:blacklozenge,blacksquare:blacksquare,blacktriangle:blacktriangle,blacktriangledown:blacktriangledown,blacktriangleleft:blacktriangleleft,blacktriangleright:blacktriangleright,blank:blank,blk12:blk12,blk14:blk14,blk34:blk34,block:block,bne:bne,bnequiv:bnequiv,bnot:bnot,bopf:bopf,bot:bot,bottom:bottom,bowtie:bowtie,boxDL:boxDL,boxDR:boxDR,boxDl:boxDl,boxDr:boxDr,boxH:boxH,boxHD:boxHD,boxHU:boxHU,boxHd:boxHd,boxHu:boxHu,boxUL:boxUL,boxUR:boxUR,boxUl:boxUl,boxUr:boxUr,boxV:boxV,boxVH:boxVH,boxVL:boxVL,boxVR:boxVR,boxVh:boxVh,boxVl:boxVl,boxVr:boxVr,boxbox:boxbox,boxdL:boxdL,boxdR:boxdR,boxdl:boxdl,boxdr:boxdr,boxh:boxh,boxhD:boxhD,boxhU:boxhU,boxhd:boxhd,boxhu:boxhu,boxminus:boxminus,boxplus:boxplus,boxtimes:boxtimes,boxuL:boxuL,boxuR:boxuR,boxul:boxul,boxur:boxur,boxv:boxv,boxvH:boxvH,boxvL:boxvL,boxvR:boxvR,boxvh:boxvh,boxvl:boxvl,boxvr:boxvr,bprime:bprime,breve:breve,brvba:brvba,brvbar:brvbar,bscr:bscr,bsemi:bsemi,bsim:bsim,bsime:bsime,bsol:bsol,bsolb:bsolb,bsolhsub:bsolhsub,bull:bull,bullet:bullet,bump:bump,bumpE:bumpE,bumpe:bumpe,bumpeq:bumpeq,cacute:cacute,cap:cap,capand:capand,capbrcup:capbrcup,capcap:capcap,capcup:capcup,capdot:capdot,caps:caps,caret:caret,caron:caron,ccaps:ccaps,ccaron:ccaron,ccedi:ccedi,ccedil:ccedil,ccirc:ccirc,ccups:ccups,ccupssm:ccupssm,cdot:cdot,cedi:cedi,cedil:cedil,cemptyv:cemptyv,cen:cen,cent:cent,centerdot:centerdot,cfr:cfr,chcy:chcy,check:check,checkmark:checkmark,chi:chi,cir:cir,cirE:cirE,circ:circ,circeq:circeq,circlearrowleft:circlearrowleft,circlearrowright:circlearrowright,circledR:circledR,circledS:circledS,circledast:circledast,circledcirc:circledcirc,circleddash:circleddash,cire:cire,cirfnint:cirfnint,cirmid:cirmid,cirscir:cirscir,clubs:clubs,clubsuit:clubsuit,colon:colon,colone:colone,coloneq:coloneq,comma:comma,commat:commat,comp:comp,compfn:compfn,complement:complement,complexes:complexes,cong:cong,congdot:congdot,conint:conint,copf:copf,coprod:coprod,cop:cop,copy:copy,copysr:copysr,crarr:crarr,cross:cross,cscr:cscr,csub:csub,csube:csube,csup:csup,csupe:csupe,ctdot:ctdot,cudarrl:cudarrl,cudarrr:cudarrr,cuepr:cuepr,cuesc:cuesc,cularr:cularr,cularrp:cularrp,cup:cup,cupbrcap:cupbrcap,cupcap:cupcap,cupcup:cupcup,cupdot:cupdot,cupor:cupor,cups:cups,curarr:curarr,curarrm:curarrm,curlyeqprec:curlyeqprec,curlyeqsucc:curlyeqsucc,curlyvee:curlyvee,curlywedge:curlywedge,curre:curre,curren:curren,curvearrowleft:curvearrowleft,curvearrowright:curvearrowright,cuvee:cuvee,cuwed:cuwed,cwconint:cwconint,cwint:cwint,cylcty:cylcty,dArr:dArr,dHar:dHar,dagger:dagger,daleth:daleth,darr:darr,dash:dash,dashv:dashv,dbkarow:dbkarow,dblac:dblac,dcaron:dcaron,dcy:dcy,dd:dd,ddagger:ddagger,ddarr:ddarr,ddotseq:ddotseq,de:de,deg:deg,delta:delta,demptyv:demptyv,dfisht:dfisht,dfr:dfr,dharl:dharl,dharr:dharr,diam:diam,diamond:diamond,diamondsuit:diamondsuit,diams:diams,die:die,digamma:digamma,disin:disin,div:div,divid:divid,divide:divide,divideontimes:divideontimes,divonx:divonx,djcy:djcy,dlcorn:dlcorn,dlcrop:dlcrop,dollar:dollar,dopf:dopf,dot:dot,doteq:doteq,doteqdot:doteqdot,dotminus:dotminus,dotplus:dotplus,dotsquare:dotsquare,doublebarwedge:doublebarwedge,downarrow:downarrow,downdownarrows:downdownarrows,downharpoonleft:downharpoonleft,downharpoonright:downharpoonright,drbkarow:drbkarow,drcorn:drcorn,drcrop:drcrop,dscr:dscr,dscy:dscy,dsol:dsol,dstrok:dstrok,dtdot:dtdot,dtri:dtri,dtrif:dtrif,duarr:duarr,duhar:duhar,dwangle:dwangle,dzcy:dzcy,dzigrarr:dzigrarr,eDDot:eDDot,eDot:eDot,eacut:eacut,eacute:eacute,easter:easter,ecaron:ecaron,ecir:ecir,ecirc:ecirc,ecolon:ecolon,ecy:ecy,edot:edot,ee:ee,efDot:efDot,efr:efr,eg:eg,egrav:egrav,egrave:egrave,egs:egs,egsdot:egsdot,el:el,elinters:elinters,ell:ell,els:els,elsdot:elsdot,emacr:emacr,empty:empty,emptyset:emptyset,emptyv:emptyv,emsp13:emsp13,emsp14:emsp14,emsp:emsp,eng:eng,ensp:ensp,eogon:eogon,eopf:eopf,epar:epar,eparsl:eparsl,eplus:eplus,epsi:epsi,epsilon:epsilon,epsiv:epsiv,eqcirc:eqcirc,eqcolon:eqcolon,eqsim:eqsim,eqslantgtr:eqslantgtr,eqslantless:eqslantless,equals:equals,equest:equest,equiv:equiv,equivDD:equivDD,eqvparsl:eqvparsl,erDot:erDot,erarr:erarr,escr:escr,esdot:esdot,esim:esim,eta:eta,et:et,eth:eth,eum:eum,euml:euml,euro:euro,excl:excl,exist:exist,expectation:expectation,exponentiale:exponentiale,fallingdotseq:fallingdotseq,fcy:fcy,female:female,ffilig:ffilig,fflig:fflig,ffllig:ffllig,ffr:ffr,filig:filig,fjlig:fjlig,flat:flat,fllig:fllig,fltns:fltns,fnof:fnof,fopf:fopf,forall:forall,fork:fork,forkv:forkv,fpartint:fpartint,frac1:frac1,frac12:frac12,frac13:frac13,frac14:frac14,frac15:frac15,frac16:frac16,frac18:frac18,frac23:frac23,frac25:frac25,frac3:frac3,frac34:frac34,frac35:frac35,frac38:frac38,frac45:frac45,frac56:frac56,frac58:frac58,frac78:frac78,frasl:frasl,frown:frown,fscr:fscr,gE:gE,gEl:gEl,gacute:gacute,gamma:gamma,gammad:gammad,gap:gap,gbreve:gbreve,gcirc:gcirc,gcy:gcy,gdot:gdot,ge:ge,gel:gel,geq:geq,geqq:geqq,geqslant:geqslant,ges:ges,gescc:gescc,gesdot:gesdot,gesdoto:gesdoto,gesdotol:gesdotol,gesl:gesl,gesles:gesles,gfr:gfr,gg:gg,ggg:ggg,gimel:gimel,gjcy:gjcy,gl:gl,glE:glE,gla:gla,glj:glj,gnE:gnE,gnap:gnap,gnapprox:gnapprox,gne:gne,gneq:gneq,gneqq:gneqq,gnsim:gnsim,gopf:gopf,grave:grave,gscr:gscr,gsim:gsim,gsime:gsime,gsiml:gsiml,g:g,gt:gt,gtcc:gtcc,gtcir:gtcir,gtdot:gtdot,gtlPar:gtlPar,gtquest:gtquest,gtrapprox:gtrapprox,gtrarr:gtrarr,gtrdot:gtrdot,gtreqless:gtreqless,gtreqqless:gtreqqless,gtrless:gtrless,gtrsim:gtrsim,gvertneqq:gvertneqq,gvnE:gvnE,hArr:hArr,hairsp:hairsp,half:half,hamilt:hamilt,hardcy:hardcy,harr:harr,harrcir:harrcir,harrw:harrw,hbar:hbar,hcirc:hcirc,hearts:hearts,heartsuit:heartsuit,hellip:hellip,hercon:hercon,hfr:hfr,hksearow:hksearow,hkswarow:hkswarow,hoarr:hoarr,homtht:homtht,hookleftarrow:hookleftarrow,hookrightarrow:hookrightarrow,hopf:hopf,horbar:horbar,hscr:hscr,hslash:hslash,hstrok:hstrok,hybull:hybull,hyphen:hyphen,iacut:iacut,iacute:iacute,ic:ic,icir:icir,icirc:icirc,icy:icy,iecy:iecy,iexc:iexc,iexcl:iexcl,iff:iff,ifr:ifr,igrav:igrav,igrave:igrave,ii:ii,iiiint:iiiint,iiint:iiint,iinfin:iinfin,iiota:iiota,ijlig:ijlig,imacr:imacr,image:image,imagline:imagline,imagpart:imagpart,imath:imath,imof:imof,imped:imped,incare:incare,infin:infin,infintie:infintie,inodot:inodot,int:int,intcal:intcal,integers:integers,intercal:intercal,intlarhk:intlarhk,intprod:intprod,iocy:iocy,iogon:iogon,iopf:iopf,iota:iota,iprod:iprod,iques:iques,iquest:iquest,iscr:iscr,isin:isin,isinE:isinE,isindot:isindot,isins:isins,isinsv:isinsv,isinv:isinv,it:it,itilde:itilde,iukcy:iukcy,ium:ium,iuml:iuml,jcirc:jcirc,jcy:jcy,jfr:jfr,jmath:jmath,jopf:jopf,jscr:jscr,jsercy:jsercy,jukcy:jukcy,kappa:kappa,kappav:kappav,kcedil:kcedil,kcy:kcy,kfr:kfr,kgreen:kgreen,khcy:khcy,kjcy:kjcy,kopf:kopf,kscr:kscr,lAarr:lAarr,lArr:lArr,lAtail:lAtail,lBarr:lBarr,lE:lE,lEg:lEg,lHar:lHar,lacute:lacute,laemptyv:laemptyv,lagran:lagran,lambda:lambda,lang:lang,langd:langd,langle:langle,lap:lap,laqu:laqu,laquo:laquo,larr:larr,larrb:larrb,larrbfs:larrbfs,larrfs:larrfs,larrhk:larrhk,larrlp:larrlp,larrpl:larrpl,larrsim:larrsim,larrtl:larrtl,lat:lat,latail:latail,late:late,lates:lates,lbarr:lbarr,lbbrk:lbbrk,lbrace:lbrace,lbrack:lbrack,lbrke:lbrke,lbrksld:lbrksld,lbrkslu:lbrkslu,lcaron:lcaron,lcedil:lcedil,lceil:lceil,lcub:lcub,lcy:lcy,ldca:ldca,ldquo:ldquo,ldquor:ldquor,ldrdhar:ldrdhar,ldrushar:ldrushar,ldsh:ldsh,le:le,leftarrow:leftarrow,leftarrowtail:leftarrowtail,leftharpoondown:leftharpoondown,leftharpoonup:leftharpoonup,leftleftarrows:leftleftarrows,leftrightarrow:leftrightarrow,leftrightarrows:leftrightarrows,leftrightharpoons:leftrightharpoons,leftrightsquigarrow:leftrightsquigarrow,leftthreetimes:leftthreetimes,leg:leg,leq:leq,leqq:leqq,leqslant:leqslant,les:les,lescc:lescc,lesdot:lesdot,lesdoto:lesdoto,lesdotor:lesdotor,lesg:lesg,lesges:lesges,lessapprox:lessapprox,lessdot:lessdot,lesseqgtr:lesseqgtr,lesseqqgtr:lesseqqgtr,lessgtr:lessgtr,lesssim:lesssim,lfisht:lfisht,lfloor:lfloor,lfr:lfr,lg:lg,lgE:lgE,lhard:lhard,lharu:lharu,lharul:lharul,lhblk:lhblk,ljcy:ljcy,ll:ll,llarr:llarr,llcorner:llcorner,llhard:llhard,lltri:lltri,lmidot:lmidot,lmoust:lmoust,lmoustache:lmoustache,lnE:lnE,lnap:lnap,lnapprox:lnapprox,lne:lne,lneq:lneq,lneqq:lneqq,lnsim:lnsim,loang:loang,loarr:loarr,lobrk:lobrk,longleftarrow:longleftarrow,longleftrightarrow:longleftrightarrow,longmapsto:longmapsto,longrightarrow:longrightarrow,looparrowleft:looparrowleft,looparrowright:looparrowright,lopar:lopar,lopf:lopf,loplus:loplus,lotimes:lotimes,lowast:lowast,lowbar:lowbar,loz:loz,lozenge:lozenge,lozf:lozf,lpar:lpar,lparlt:lparlt,lrarr:lrarr,lrcorner:lrcorner,lrhar:lrhar,lrhard:lrhard,lrm:lrm,lrtri:lrtri,lsaquo:lsaquo,lscr:lscr,lsh:lsh,lsim:lsim,lsime:lsime,lsimg:lsimg,lsqb:lsqb,lsquo:lsquo,lsquor:lsquor,lstrok:lstrok,l:l,lt:lt,ltcc:ltcc,ltcir:ltcir,ltdot:ltdot,lthree:lthree,ltimes:ltimes,ltlarr:ltlarr,ltquest:ltquest,ltrPar:ltrPar,ltri:ltri,ltrie:ltrie,ltrif:ltrif,lurdshar:lurdshar,luruhar:luruhar,lvertneqq:lvertneqq,lvnE:lvnE,mDDot:mDDot,mac:mac,macr:macr,male:male,malt:malt,maltese:maltese,map:map$1,mapsto:mapsto,mapstodown:mapstodown,mapstoleft:mapstoleft,mapstoup:mapstoup,marker:marker,mcomma:mcomma,mcy:mcy,mdash:mdash,measuredangle:measuredangle,mfr:mfr,mho:mho,micr:micr,micro:micro,mid:mid,midast:midast,midcir:midcir,middo:middo,middot:middot,minus:minus,minusb:minusb,minusd:minusd,minusdu:minusdu,mlcp:mlcp,mldr:mldr,mnplus:mnplus,models:models,mopf:mopf,mp:mp,mscr:mscr,mstpos:mstpos,mu:mu,multimap:multimap,mumap:mumap,nGg:nGg,nGt:nGt,nGtv:nGtv,nLeftarrow:nLeftarrow,nLeftrightarrow:nLeftrightarrow,nLl:nLl,nLt:nLt,nLtv:nLtv,nRightarrow:nRightarrow,nVDash:nVDash,nVdash:nVdash,nabla:nabla,nacute:nacute,nang:nang,nap:nap,napE:napE,napid:napid,napos:napos,napprox:napprox,natur:natur,natural:natural,naturals:naturals,nbs:nbs,nbsp:nbsp,nbump:nbump,nbumpe:nbumpe,ncap:ncap,ncaron:ncaron,ncedil:ncedil,ncong:ncong,ncongdot:ncongdot,ncup:ncup,ncy:ncy,ndash:ndash,ne:ne,neArr:neArr,nearhk:nearhk,nearr:nearr,nearrow:nearrow,nedot:nedot,nequiv:nequiv,nesear:nesear,nesim:nesim,nexist:nexist,nexists:nexists,nfr:nfr,ngE:ngE,nge:nge,ngeq:ngeq,ngeqq:ngeqq,ngeqslant:ngeqslant,nges:nges,ngsim:ngsim,ngt:ngt,ngtr:ngtr,nhArr:nhArr,nharr:nharr,nhpar:nhpar,ni:ni,nis:nis,nisd:nisd,niv:niv,njcy:njcy,nlArr:nlArr,nlE:nlE,nlarr:nlarr,nldr:nldr,nle:nle,nleftarrow:nleftarrow,nleftrightarrow:nleftrightarrow,nleq:nleq,nleqq:nleqq,nleqslant:nleqslant,nles:nles,nless:nless,nlsim:nlsim,nlt:nlt,nltri:nltri,nltrie:nltrie,nmid:nmid,nopf:nopf,no:no,not:not,notin:notin,notinE:notinE,notindot:notindot,notinva:notinva,notinvb:notinvb,notinvc:notinvc,notni:notni,notniva:notniva,notnivb:notnivb,notnivc:notnivc,npar:npar,nparallel:nparallel,nparsl:nparsl,npart:npart,npolint:npolint,npr:npr,nprcue:nprcue,npre:npre,nprec:nprec,npreceq:npreceq,nrArr:nrArr,nrarr:nrarr,nrarrc:nrarrc,nrarrw:nrarrw,nrightarrow:nrightarrow,nrtri:nrtri,nrtrie:nrtrie,nsc:nsc,nsccue:nsccue,nsce:nsce,nscr:nscr,nshortmid:nshortmid,nshortparallel:nshortparallel,nsim:nsim,nsime:nsime,nsimeq:nsimeq,nsmid:nsmid,nspar:nspar,nsqsube:nsqsube,nsqsupe:nsqsupe,nsub:nsub,nsubE:nsubE,nsube:nsube,nsubset:nsubset,nsubseteq:nsubseteq,nsubseteqq:nsubseteqq,nsucc:nsucc,nsucceq:nsucceq,nsup:nsup,nsupE:nsupE,nsupe:nsupe,nsupset:nsupset,nsupseteq:nsupseteq,nsupseteqq:nsupseteqq,ntgl:ntgl,ntild:ntild,ntilde:ntilde,ntlg:ntlg,ntriangleleft:ntriangleleft,ntrianglelefteq:ntrianglelefteq,ntriangleright:ntriangleright,ntrianglerighteq:ntrianglerighteq,nu:nu,num:num,numero:numero,numsp:numsp,nvDash:nvDash,nvHarr:nvHarr,nvap:nvap,nvdash:nvdash,nvge:nvge,nvgt:nvgt,nvinfin:nvinfin,nvlArr:nvlArr,nvle:nvle,nvlt:nvlt,nvltrie:nvltrie,nvrArr:nvrArr,nvrtrie:nvrtrie,nvsim:nvsim,nwArr:nwArr,nwarhk:nwarhk,nwarr:nwarr,nwarrow:nwarrow,nwnear:nwnear,oS:oS,oacut:oacut,oacute:oacute,oast:oast,ocir:ocir,ocirc:ocirc,ocy:ocy,odash:odash,odblac:odblac,odiv:odiv,odot:odot,odsold:odsold,oelig:oelig,ofcir:ofcir,ofr:ofr,ogon:ogon,ograv:ograv,ograve:ograve,ogt:ogt,ohbar:ohbar,ohm:ohm,oint:oint,olarr:olarr,olcir:olcir,olcross:olcross,oline:oline,olt:olt,omacr:omacr,omega:omega,omicron:omicron,omid:omid,ominus:ominus,oopf:oopf,opar:opar,operp:operp,oplus:oplus,or:or,orarr:orarr,ord:ord,order:order,orderof:orderof,ordf:ordf,ordm:ordm,origof:origof,oror:oror,orslope:orslope,orv:orv,oscr:oscr,oslas:oslas,oslash:oslash,osol:osol,otild:otild,otilde:otilde,otimes:otimes,otimesas:otimesas,oum:oum,ouml:ouml,ovbar:ovbar,par:par,para:para,parallel:parallel,parsim:parsim,parsl:parsl,part:part,pcy:pcy,percnt:percnt,period:period,permil:permil,perp:perp,pertenk:pertenk,pfr:pfr,phi:phi,phiv:phiv,phmmat:phmmat,phone:phone,pi:pi,pitchfork:pitchfork,piv:piv,planck:planck,planckh:planckh,plankv:plankv,plus:plus,plusacir:plusacir,plusb:plusb,pluscir:pluscir,plusdo:plusdo,plusdu:plusdu,pluse:pluse,plusm:plusm,plusmn:plusmn,plussim:plussim,plustwo:plustwo,pm:pm,pointint:pointint,popf:popf,poun:poun,pound:pound,pr:pr,prE:prE,prap:prap,prcue:prcue,pre:pre,prec:prec,precapprox:precapprox,preccurlyeq:preccurlyeq,preceq:preceq,precnapprox:precnapprox,precneqq:precneqq,precnsim:precnsim,precsim:precsim,prime:prime,primes:primes,prnE:prnE,prnap:prnap,prnsim:prnsim,prod:prod,profalar:profalar,profline:profline,profsurf:profsurf,prop:prop,propto:propto,prsim:prsim,prurel:prurel,pscr:pscr,psi:psi,puncsp:puncsp,qfr:qfr,qint:qint,qopf:qopf,qprime:qprime,qscr:qscr,quaternions:quaternions,quatint:quatint,quest:quest,questeq:questeq,quo:quo,quot:quot,rAarr:rAarr,rArr:rArr,rAtail:rAtail,rBarr:rBarr,rHar:rHar,race:race,racute:racute,radic:radic,raemptyv:raemptyv,rang:rang,rangd:rangd,range:range,rangle:rangle,raqu:raqu,raquo:raquo,rarr:rarr,rarrap:rarrap,rarrb:rarrb,rarrbfs:rarrbfs,rarrc:rarrc,rarrfs:rarrfs,rarrhk:rarrhk,rarrlp:rarrlp,rarrpl:rarrpl,rarrsim:rarrsim,rarrtl:rarrtl,rarrw:rarrw,ratail:ratail,ratio:ratio,rationals:rationals,rbarr:rbarr,rbbrk:rbbrk,rbrace:rbrace,rbrack:rbrack,rbrke:rbrke,rbrksld:rbrksld,rbrkslu:rbrkslu,rcaron:rcaron,rcedil:rcedil,rceil:rceil,rcub:rcub,rcy:rcy,rdca:rdca,rdldhar:rdldhar,rdquo:rdquo,rdquor:rdquor,rdsh:rdsh,real:real,realine:realine,realpart:realpart,reals:reals,rect:rect,re:re,reg:reg,rfisht:rfisht,rfloor:rfloor,rfr:rfr,rhard:rhard,rharu:rharu,rharul:rharul,rho:rho,rhov:rhov,rightarrow:rightarrow,rightarrowtail:rightarrowtail,rightharpoondown:rightharpoondown,rightharpoonup:rightharpoonup,rightleftarrows:rightleftarrows,rightleftharpoons:rightleftharpoons,rightrightarrows:rightrightarrows,rightsquigarrow:rightsquigarrow,rightthreetimes:rightthreetimes,ring:ring,risingdotseq:risingdotseq,rlarr:rlarr,rlhar:rlhar,rlm:rlm,rmoust:rmoust,rmoustache:rmoustache,rnmid:rnmid,roang:roang,roarr:roarr,robrk:robrk,ropar:ropar,ropf:ropf,roplus:roplus,rotimes:rotimes,rpar:rpar,rpargt:rpargt,rppolint:rppolint,rrarr:rrarr,rsaquo:rsaquo,rscr:rscr,rsh:rsh,rsqb:rsqb,rsquo:rsquo,rsquor:rsquor,rthree:rthree,rtimes:rtimes,rtri:rtri,rtrie:rtrie,rtrif:rtrif,rtriltri:rtriltri,ruluhar:ruluhar,rx:rx,sacute:sacute,sbquo:sbquo,sc:sc,scE:scE,scap:scap,scaron:scaron,sccue:sccue,sce:sce,scedil:scedil,scirc:scirc,scnE:scnE,scnap:scnap,scnsim:scnsim,scpolint:scpolint,scsim:scsim,scy:scy,sdot:sdot,sdotb:sdotb,sdote:sdote,seArr:seArr,searhk:searhk,searr:searr,searrow:searrow,sec:sec,sect:sect,semi:semi,seswar:seswar,setminus:setminus,setmn:setmn,sext:sext,sfr:sfr,sfrown:sfrown,sharp:sharp,shchcy:shchcy,shcy:shcy,shortmid:shortmid,shortparallel:shortparallel,sh:sh,shy:shy,sigma:sigma,sigmaf:sigmaf,sigmav:sigmav,sim:sim,simdot:simdot,sime:sime,simeq:simeq,simg:simg,simgE:simgE,siml:siml,simlE:simlE,simne:simne,simplus:simplus,simrarr:simrarr,slarr:slarr,smallsetminus:smallsetminus,smashp:smashp,smeparsl:smeparsl,smid:smid,smile:smile,smt:smt,smte:smte,smtes:smtes,softcy:softcy,sol:sol,solb:solb,solbar:solbar,sopf:sopf,spades:spades,spadesuit:spadesuit,spar:spar,sqcap:sqcap,sqcaps:sqcaps,sqcup:sqcup,sqcups:sqcups,sqsub:sqsub,sqsube:sqsube,sqsubset:sqsubset,sqsubseteq:sqsubseteq,sqsup:sqsup,sqsupe:sqsupe,sqsupset:sqsupset,sqsupseteq:sqsupseteq,squ:squ,square:square,squarf:squarf,squf:squf,srarr:srarr,sscr:sscr,ssetmn:ssetmn,ssmile:ssmile,sstarf:sstarf,star:star,starf:starf,straightepsilon:straightepsilon,straightphi:straightphi,strns:strns,sub:sub,subE:subE,subdot:subdot,sube:sube,subedot:subedot,submult:submult,subnE:subnE,subne:subne,subplus:subplus,subrarr:subrarr,subset:subset,subseteq:subseteq,subseteqq:subseteqq,subsetneq:subsetneq,subsetneqq:subsetneqq,subsim:subsim,subsub:subsub,subsup:subsup,succ:succ,succapprox:succapprox,succcurlyeq:succcurlyeq,succeq:succeq,succnapprox:succnapprox,succneqq:succneqq,succnsim:succnsim,succsim:succsim,sum:sum,sung:sung,sup:sup,sup1:sup1,sup2:sup2,sup3:sup3,supE:supE,supdot:supdot,supdsub:supdsub,supe:supe,supedot:supedot,suphsol:suphsol,suphsub:suphsub,suplarr:suplarr,supmult:supmult,supnE:supnE,supne:supne,supplus:supplus,supset:supset,supseteq:supseteq,supseteqq:supseteqq,supsetneq:supsetneq,supsetneqq:supsetneqq,supsim:supsim,supsub:supsub,supsup:supsup,swArr:swArr,swarhk:swarhk,swarr:swarr,swarrow:swarrow,swnwar:swnwar,szli:szli,szlig:szlig,target:target,tau:tau,tbrk:tbrk,tcaron:tcaron,tcedil:tcedil,tcy:tcy,tdot:tdot,telrec:telrec,tfr:tfr,there4:there4,therefore:therefore,theta:theta,thetasym:thetasym,thetav:thetav,thickapprox:thickapprox,thicksim:thicksim,thinsp:thinsp,thkap:thkap,thksim:thksim,thor:thor,thorn:thorn,tilde:tilde,time:time,times:times,timesb:timesb,timesbar:timesbar,timesd:timesd,tint:tint,toea:toea,top:top,topbot:topbot,topcir:topcir,topf:topf,topfork:topfork,tosa:tosa,tprime:tprime,trade:trade,triangle:triangle,triangledown:triangledown,triangleleft:triangleleft,trianglelefteq:trianglelefteq,triangleq:triangleq,triangleright:triangleright,trianglerighteq:trianglerighteq,tridot:tridot,trie:trie,triminus:triminus,triplus:triplus,trisb:trisb,tritime:tritime,trpezium:trpezium,tscr:tscr,tscy:tscy,tshcy:tshcy,tstrok:tstrok,twixt:twixt,twoheadleftarrow:twoheadleftarrow,twoheadrightarrow:twoheadrightarrow,uArr:uArr,uHar:uHar,uacut:uacut,uacute:uacute,uarr:uarr,ubrcy:ubrcy,ubreve:ubreve,ucir:ucir,ucirc:ucirc,ucy:ucy,udarr:udarr,udblac:udblac,udhar:udhar,ufisht:ufisht,ufr:ufr,ugrav:ugrav,ugrave:ugrave,uharl:uharl,uharr:uharr,uhblk:uhblk,ulcorn:ulcorn,ulcorner:ulcorner,ulcrop:ulcrop,ultri:ultri,umacr:umacr,um:um,uml:uml,uogon:uogon,uopf:uopf,uparrow:uparrow,updownarrow:updownarrow,upharpoonleft:upharpoonleft,upharpoonright:upharpoonright,uplus:uplus,upsi:upsi,upsih:upsih,upsilon:upsilon,upuparrows:upuparrows,urcorn:urcorn,urcorner:urcorner,urcrop:urcrop,uring:uring,urtri:urtri,uscr:uscr,utdot:utdot,utilde:utilde,utri:utri,utrif:utrif,uuarr:uuarr,uum:uum,uuml:uuml,uwangle:uwangle,vArr:vArr,vBar:vBar,vBarv:vBarv,vDash:vDash,vangrt:vangrt,varepsilon:varepsilon,varkappa:varkappa,varnothing:varnothing,varphi:varphi,varpi:varpi,varpropto:varpropto,varr:varr,varrho:varrho,varsigma:varsigma,varsubsetneq:varsubsetneq,varsubsetneqq:varsubsetneqq,varsupsetneq:varsupsetneq,varsupsetneqq:varsupsetneqq,vartheta:vartheta,vartriangleleft:vartriangleleft,vartriangleright:vartriangleright,vcy:vcy,vdash:vdash,vee:vee,veebar:veebar,veeeq:veeeq,vellip:vellip,verbar:verbar,vert:vert,vfr:vfr,vltri:vltri,vnsub:vnsub,vnsup:vnsup,vopf:vopf,vprop:vprop,vrtri:vrtri,vscr:vscr,vsubnE:vsubnE,vsubne:vsubne,vsupnE:vsupnE,vsupne:vsupne,vzigzag:vzigzag,wcirc:wcirc,wedbar:wedbar,wedge:wedge,wedgeq:wedgeq,weierp:weierp,wfr:wfr,wopf:wopf,wp:wp,wr:wr,wreath:wreath,wscr:wscr,xcap:xcap,xcirc:xcirc,xcup:xcup,xdtri:xdtri,xfr:xfr,xhArr:xhArr,xharr:xharr,xi:xi,xlArr:xlArr,xlarr:xlarr,xmap:xmap,xnis:xnis,xodot:xodot,xopf:xopf,xoplus:xoplus,xotime:xotime,xrArr:xrArr,xrarr:xrarr,xscr:xscr,xsqcup:xsqcup,xuplus:xuplus,xutri:xutri,xvee:xvee,xwedge:xwedge,yacut:yacut,yacute:yacute,yacy:yacy,ycirc:ycirc,ycy:ycy,ye:ye,yen:yen,yfr:yfr,yicy:yicy,yopf:yopf,yscr:yscr,yucy:yucy,yum:yum,yuml:yuml,zacute:zacute,zcaron:zcaron,zcy:zcy,zdot:zdot,zeetrf:zeetrf,zeta:zeta,zfr:zfr,zhcy:zhcy,zigrarr:zigrarr,zopf:zopf,zscr:zscr,zwj:zwj,zwnj:zwnj,default:index}),AElig$1="Æ",AMP$1="&",Aacute$1="Á",Acirc$1="Â",Agrave$1="À",Aring$1="Å",Atilde$1="Ã",Auml$1="Ä",COPY$1="©",Ccedil$1="Ç",ETH$1="Ð",Eacute$1="É",Ecirc$1="Ê",Egrave$1="È",Euml$1="Ë",GT$1=">",Iacute$1="Í",Icirc$1="Î",Igrave$1="Ì",Iuml$1="Ï",LT$1="<",Ntilde$1="Ñ",Oacute$1="Ó",Ocirc$1="Ô",Ograve$1="Ò",Oslash$1="Ø",Otilde$1="Õ",Ouml$1="Ö",QUOT$1='"',REG$1="®",THORN$1="Þ",Uacute$1="Ú",Ucirc$1="Û",Ugrave$1="Ù",Uuml$1="Ü",Yacute$1="Ý",aacute$1="á",acirc$1="â",acute$1="´",aelig$1="æ",agrave$1="à",amp$1="&",aring$1="å",atilde$1="ã",auml$1="ä",brvbar$1="¦",ccedil$1="ç",cedil$1="¸",cent$1="¢",copy$1="©",curren$1="¤",deg$1="°",divide$1="÷",eacute$1="é",ecirc$1="ê",egrave$1="è",eth$1="ð",euml$1="ë",frac12$1="½",frac14$1="¼",frac34$1="¾",gt$1=">",iacute$1="í",icirc$1="î",iexcl$1="¡",igrave$1="ì",iquest$1="¿",iuml$1="ï",laquo$1="«",lt$1="<",macr$1="¯",micro$1="µ",middot$1="·",nbsp$1=" ",not$1="¬",ntilde$1="ñ",oacute$1="ó",ocirc$1="ô",ograve$1="ò",ordf$1="ª",ordm$1="º",oslash$1="ø",otilde$1="õ",ouml$1="ö",para$1="¶",plusmn$1="±",pound$1="£",quot$1='"',raquo$1="»",reg$1="®",sect$1="§",shy$1="­",sup1$1="¹",sup2$1="²",sup3$1="³",szlig$1="ß",thorn$1="þ",times$1="×",uacute$1="ú",ucirc$1="û",ugrave$1="ù",uml$1="¨",uuml$1="ü",yacute$1="ý",yen$1="¥",yuml$1="ÿ",index$1={AElig:AElig$1,AMP:AMP$1,Aacute:Aacute$1,Acirc:Acirc$1,Agrave:Agrave$1,Aring:Aring$1,Atilde:Atilde$1,Auml:Auml$1,COPY:COPY$1,Ccedil:Ccedil$1,ETH:ETH$1,Eacute:Eacute$1,Ecirc:Ecirc$1,Egrave:Egrave$1,Euml:Euml$1,GT:GT$1,Iacute:Iacute$1,Icirc:Icirc$1,Igrave:Igrave$1,Iuml:Iuml$1,LT:LT$1,Ntilde:Ntilde$1,Oacute:Oacute$1,Ocirc:Ocirc$1,Ograve:Ograve$1,Oslash:Oslash$1,Otilde:Otilde$1,Ouml:Ouml$1,QUOT:QUOT$1,REG:REG$1,THORN:THORN$1,Uacute:Uacute$1,Ucirc:Ucirc$1,Ugrave:Ugrave$1,Uuml:Uuml$1,Yacute:Yacute$1,aacute:aacute$1,acirc:acirc$1,acute:acute$1,aelig:aelig$1,agrave:agrave$1,amp:amp$1,aring:aring$1,atilde:atilde$1,auml:auml$1,brvbar:brvbar$1,ccedil:ccedil$1,cedil:cedil$1,cent:cent$1,copy:copy$1,curren:curren$1,deg:deg$1,divide:divide$1,eacute:eacute$1,ecirc:ecirc$1,egrave:egrave$1,eth:eth$1,euml:euml$1,frac12:frac12$1,frac14:frac14$1,frac34:frac34$1,gt:gt$1,iacute:iacute$1,icirc:icirc$1,iexcl:iexcl$1,igrave:igrave$1,iquest:iquest$1,iuml:iuml$1,laquo:laquo$1,lt:lt$1,macr:macr$1,micro:micro$1,middot:middot$1,nbsp:nbsp$1,not:not$1,ntilde:ntilde$1,oacute:oacute$1,ocirc:ocirc$1,ograve:ograve$1,ordf:ordf$1,ordm:ordm$1,oslash:oslash$1,otilde:otilde$1,ouml:ouml$1,para:para$1,plusmn:plusmn$1,pound:pound$1,quot:quot$1,raquo:raquo$1,reg:reg$1,sect:sect$1,shy:shy$1,sup1:sup1$1,sup2:sup2$1,sup3:sup3$1,szlig:szlig$1,thorn:thorn$1,times:times$1,uacute:uacute$1,ucirc:ucirc$1,ugrave:ugrave$1,uml:uml$1,uuml:uuml$1,yacute:yacute$1,yen:yen$1,yuml:yuml$1},characterEntitiesLegacy=Object.freeze({AElig:AElig$1,AMP:AMP$1,Aacute:Aacute$1,Acirc:Acirc$1,Agrave:Agrave$1,Aring:Aring$1,Atilde:Atilde$1,Auml:Auml$1,COPY:COPY$1,Ccedil:Ccedil$1,ETH:ETH$1,Eacute:Eacute$1,Ecirc:Ecirc$1,Egrave:Egrave$1,Euml:Euml$1,GT:GT$1,Iacute:Iacute$1,Icirc:Icirc$1,Igrave:Igrave$1,Iuml:Iuml$1,LT:LT$1,Ntilde:Ntilde$1,Oacute:Oacute$1,Ocirc:Ocirc$1,Ograve:Ograve$1,Oslash:Oslash$1,Otilde:Otilde$1,Ouml:Ouml$1,QUOT:QUOT$1,REG:REG$1,THORN:THORN$1,Uacute:Uacute$1,Ucirc:Ucirc$1,Ugrave:Ugrave$1,Uuml:Uuml$1,Yacute:Yacute$1,aacute:aacute$1,acirc:acirc$1,acute:acute$1,aelig:aelig$1,agrave:agrave$1,amp:amp$1,aring:aring$1,atilde:atilde$1,auml:auml$1,brvbar:brvbar$1,ccedil:ccedil$1,cedil:cedil$1,cent:cent$1,copy:copy$1,curren:curren$1,deg:deg$1,divide:divide$1,eacute:eacute$1,ecirc:ecirc$1,egrave:egrave$1,eth:eth$1,euml:euml$1,frac12:frac12$1,frac14:frac14$1,frac34:frac34$1,gt:gt$1,iacute:iacute$1,icirc:icirc$1,iexcl:iexcl$1,igrave:igrave$1,iquest:iquest$1,iuml:iuml$1,laquo:laquo$1,lt:lt$1,macr:macr$1,micro:micro$1,middot:middot$1,nbsp:nbsp$1,not:not$1,ntilde:ntilde$1,oacute:oacute$1,ocirc:ocirc$1,ograve:ograve$1,ordf:ordf$1,ordm:ordm$1,oslash:oslash$1,otilde:otilde$1,ouml:ouml$1,para:para$1,plusmn:plusmn$1,pound:pound$1,quot:quot$1,raquo:raquo$1,reg:reg$1,sect:sect$1,shy:shy$1,sup1:sup1$1,sup2:sup2$1,sup3:sup3$1,szlig:szlig$1,thorn:thorn$1,times:times$1,uacute:uacute$1,ucirc:ucirc$1,ugrave:ugrave$1,uml:uml$1,uuml:uuml$1,yacute:yacute$1,yen:yen$1,yuml:yuml$1,default:index$1}),index$2={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:"Ÿ"},characterReferenceInvalid=Object.freeze({default:index$2}),isDecimal=decimal;function decimal(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=48&&e<=57}var isHexadecimal=hexadecimal;function hexadecimal(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}var isAlphabetical=alphabetical;function alphabetical(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=97&&e<=122||e>=65&&e<=90}var isAlphanumerical=alphanumerical;function alphanumerical(r){return isAlphabetical(r)||isDecimal(r)}var characterEntities$1=characterEntities&&index||characterEntities,legacy=characterEntitiesLegacy&&index$1||characterEntitiesLegacy,invalid=characterReferenceInvalid&&index$2||characterReferenceInvalid,parseEntities=wrapper,own$1={}.hasOwnProperty,fromCharCode=String.fromCharCode,noop=Function.prototype,REPLACEMENT="�",FORM_FEED="\f",AMPERSAND="&",OCTOTHORP="#",SEMICOLON=";",NEWLINE="\n",X_LOWER="x",X_UPPER="X",SPACE=" ",LESS_THAN="<",EQUAL="=",EMPTY="",TAB="\t",defaults={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},NAMED="named",HEXADECIMAL="hexadecimal",DECIMAL="decimal",BASE={};BASE[HEXADECIMAL]=16,BASE[DECIMAL]=10;var TESTS={};TESTS[NAMED]=isAlphanumerical,TESTS[DECIMAL]=isDecimal,TESTS[HEXADECIMAL]=isHexadecimal;var NAMED_NOT_TERMINATED=1,NUMERIC_NOT_TERMINATED=2,NAMED_EMPTY=3,NUMERIC_EMPTY=4,NAMED_UNKNOWN=5,NUMERIC_DISALLOWED=6,NUMERIC_PROHIBITED=7,NUMERIC_REFERENCE="Numeric character references",NAMED_REFERENCE="Named character references",TERMINATED=" must be terminated by a semicolon",VOID=" cannot be empty",MESSAGES={};function wrapper(r,e){var t,a,o={};for(a in e||(e={}),defaults)t=e[a],o[a]=null===t||void 0===t?defaults[a]:t;return(o.position.indent||o.position.start)&&(o.indent=o.position.indent||[],o.position=o.position.start),parse$5(r,o)}function parse$5(r,e){var t,a,o,i,n,s,u,l,c,p,g,f,d,h,m,D,E,b,C=e.additional,A=e.nonTerminated,v=e.text,w=e.reference,q=e.warning,y=e.textContext,L=e.referenceContext,T=e.warningContext,S=e.position,N=e.indent||[],k=r.length,_=0,$=-1,R=S.column||1,x=S.line||1,O=EMPTY,I=[];for(m=B(),u=q?function(r,e){var t=B();t.column+=e,t.offset+=e,q.call(T,MESSAGES[r],t,r)}:noop,_--,k++;++_65535&&(c+=fromCharCode((n-=65536)>>>10|55296),n=56320|1023&n),n=c+fromCharCode(n))):d!==NAMED&&u(NUMERIC_EMPTY,E)),n?(P(),m=B(),_=b-1,R+=b-f+1,I.push(n),(D=B()).offset++,w&&w.call(L,n,{start:m,end:D},r.slice(f-1,b)),m=D):(o=r.slice(f-1,b),O+=o,R+=o.length,_=b-1)}return I.join(EMPTY);function B(){return{line:x,column:R,offset:_+(S.offset||0)}}function F(e){return r.charAt(e)}function P(){O&&(I.push(O),v&&v.call(y,O,{start:m,end:B()}),O=EMPTY)}}function isProhibited(r){return r>=55296&&r<=57343||r>1114111}function isWarning(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)}MESSAGES[NAMED_NOT_TERMINATED]=NAMED_REFERENCE+TERMINATED,MESSAGES[NUMERIC_NOT_TERMINATED]=NUMERIC_REFERENCE+TERMINATED,MESSAGES[NAMED_EMPTY]=NAMED_REFERENCE+VOID,MESSAGES[NUMERIC_EMPTY]=NUMERIC_REFERENCE+VOID,MESSAGES[NAMED_UNKNOWN]=NAMED_REFERENCE+" must be known",MESSAGES[NUMERIC_DISALLOWED]=NUMERIC_REFERENCE+" cannot be disallowed",MESSAGES[NUMERIC_PROHIBITED]=NUMERIC_REFERENCE+" cannot be outside the permissible Unicode range";var decode=factory$3;function factory$3(r){return a.raw=function(r,a,o){return parseEntities(r,immutable(o,{position:e(a),warning:t}))},a;function e(e){for(var t=r.offset,a=e.line,o=[];++a&&a in t;)o.push((t[a]||0)+1);return{start:e,indent:o}}function t(e,t,a){3!==a&&r.file.message(e,t)}function a(a,o,i){parseEntities(a,{position:e(o),warning:t,text:i,reference:i,textContext:r,referenceContext:r})}}var tokenizer=factory$4,MERGEABLE_NODES={text:mergeText,blockquote:mergeBlockquote};function mergeable(r){var e,t;return"text"!==r.type||!r.position||(e=r.position.start,t=r.position.end,e.line!==t.line||t.column-e.column===r.value.length)}function mergeText(r,e){return r.value+=e.value,r}function mergeBlockquote(r,e){return this.options.commonmark?e:(r.children=r.children.concat(e.children),r)}function factory$4(r){return function(e,t){var a,o,i,n,s,u,l=this,c=l.offset,p=[],g=l[r+"Methods"],f=l[r+"Tokenizers"],d=t.line,h=t.column;if(!e)return p;b.now=D,b.file=l.file,m("");for(;e;){for(a=-1,o=g.length,s=!1;++a"],gfm=defaults$1.concat(["~","|"]),commonmark=gfm.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function escapes(r){var e=r||{};return e.commonmark?commonmark:e.gfm?gfm:defaults$1}escapes.default=defaults$1,escapes.gfm=gfm,escapes.commonmark=commonmark;var blockElements=["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"],blockElements$1=Object.freeze({default:blockElements}),require$$0$1=blockElements$1&&blockElements||blockElements$1,defaults$2={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:require$$0$1},setOptions_1=setOptions;function setOptions(r){var e,t,a=this.options;if(null==r)r={};else{if("object"!=typeof r)throw new Error("Invalid value `"+r+"` for setting `options`");r=immutable(r)}for(e in defaults$2){if(null==(t=r[e])&&(t=a[e]),"blocks"!==e&&"boolean"!=typeof t||"blocks"===e&&"object"!=typeof t)throw new Error("Invalid value `"+t+"` for setting `options."+e+"`");r[e]=t}return this.options=r,this.escape=markdownEscapes(r),this}var unistUtilVisit=visit;function visit(r,e,t,a){function o(r,i,n){var s;return i=i||(n?0:null),e&&r.type!==e||(s=t(r,i,n||null)),r.children&&!1!==s?function(r,e){var t,i=a?-1:1,n=r.length,s=(a?n:-1)+i;for(;s>-1&&s=t)return res.substr(0,t);for(;t>res.length&&e>1;)1&e&&(res+=r),e>>=1,r+=r;return res=(res+=r).substr(0,t)}var trimTrailingLines_1=trimTrailingLines,line="\n";function trimTrailingLines(r){for(var e=String(r),t=e.length;e.charAt(--t)===line;);return e.slice(0,t+1)}var codeIndented=indentedCode,C_NEWLINE$1="\n",C_TAB="\t",C_SPACE=" ",CODE_INDENT_COUNT=4,CODE_INDENT=repeatString(C_SPACE,CODE_INDENT_COUNT);function indentedCode(r,e,t){for(var a,o,i,n=-1,s=e.length,u="",l="",c="",p="";++n=CODE_INDENT_COUNT$1)){for(s="";mMAX_ATX_COUNT)&&i&&(n.pedantic||e.charAt(u+1)!==C_HASH)){for(s=e.length+1,o="";++u=THEMATIC_BREAK_MARKER_COUNT&&(!a||a===C_NEWLINE$5)?(l+=n,!!t||r(l)({type:"thematicBreak"})):void 0;n+=a}}var getIndentation=indentation,characters={" ":1,"\t":4};function indentation(r){for(var e,t=0,a=0,o=r.charAt(t),i={};o in characters;)a+=e=characters[o],e>1&&(a=Math.floor(a/e)*e),i[a]=t,o=r.charAt(++t);return{indent:a,stops:i}}var removeIndentation=indentation$1,C_SPACE$6=" ",C_NEWLINE$7="\n",C_TAB$6="\t";function indentation$1(r,e){var t,a,o,i,n=r.split(C_NEWLINE$7),s=n.length+1,u=1/0,l=[];for(n.unshift(repeatString(C_SPACE$6,e)+"!");s--;)if(a=getIndentation(n[s]),l[s]=a.stops,0!==trim_1(n[s]).length){if(!a.indent){u=1/0;break}a.indent>0&&a.indent=TAB_SIZE)){if(n=e.charAt(_),a=T?LIST_ORDERED_COMMONMARK_MARKERS:LIST_ORDERED_MARKERS,!0===LIST_UNORDERED_MARKERS[n])s=n,i=!1;else{for(i=!0,o="";_<$&&(n=e.charAt(_),isDecimal(n));)o+=n,_++;if(n=e.charAt(_),!o||!0!==a[n])return;R=parseInt(o,10),s=n}if((n=e.charAt(++_))===C_SPACE$5||n===C_TAB$5){if(t)return!0;for(_=0,m=[],D=[],E=[];_<$;){for(l=_,c=!1,L=!1,-1===(u=e.indexOf(C_NEWLINE$6,_))&&(u=$),y=_+TAB_SIZE,x=0;_<$;){if((n=e.charAt(_))===C_TAB$5)x+=TAB_SIZE-x%TAB_SIZE;else{if(n!==C_SPACE$5)break;x++}_++}if(x>=TAB_SIZE&&(L=!0),b&&x>=b.indent&&(L=!0),n=e.charAt(_),p=null,!L){if(!0===LIST_UNORDERED_MARKERS[n])p=n,_++,x++;else{for(o="";_<$&&(n=e.charAt(_),isDecimal(n));)o+=n,_++;n=e.charAt(_),_++,o&&!0===a[n]&&(p=n,x+=o.length+1)}if(p)if((n=e.charAt(_))===C_TAB$5)x+=TAB_SIZE-x%TAB_SIZE,_++;else if(n===C_SPACE$5){for(y=_+TAB_SIZE;_=b.indent||x>TAB_SIZE):L=!0,c=!1,_=l;if(f=e.slice(l,u),g=l===_?f:e.slice(_,u),(p===C_ASTERISK$1||p===C_UNDERSCORE$1||p===C_DASH$1)&&N.thematicBreak.call(this,r,f,!0))break;if(d=h,h=!trim_1(g).length,L&&b)b.value=b.value.concat(E,f),D=D.concat(E,f),E=[];else if(c)0!==E.length&&(b.value.push(""),b.trail=E.concat()),b={value:[f],indent:x,trail:[]},m.push(b),D=D.concat(E,f),E=[];else if(h){if(d)break;E.push(f)}else{if(d)break;if(interrupt_1(k,N,this,[r,f,!0]))break;b.value=b.value.concat(E,f),D=D.concat(E,f),E=[]}_=u+1}for(w=r(D.join(C_NEWLINE$6)).reset({type:"list",ordered:i,start:R,loose:null,children:[]}),C=this.enterList(),A=this.enterBlock(),v=!1,_=-1,$=m.length;++_<$;)b=m[_].value.join(C_NEWLINE$6),q=r.now(),(b=r(b)(listItem(this,b,q),w)).loose&&(v=!0),b=m[_].trail.join(C_NEWLINE$6),_!==$-1&&(b+=C_NEWLINE$6),r(b);return C(),A(),w.loose=v,w}}}function listItem(r,e,t){var a,o,i=r.offset,n=null;return e=(r.options.pedantic?pedanticListItem:normalListItem).apply(null,arguments),r.options.gfm&&(a=e.match(EXPRESSION_TASK_ITEM))&&(o=a[0].length,n=a[1].toLowerCase()===C_X_LOWER,i[t.line]+=o,e=e.slice(o)),{type:"listItem",loose:EXPRESSION_LOOSE_LIST_ITEM.test(e)||e.charAt(e.length-1)===C_NEWLINE$6,checked:n,children:r.tokenizeBlock(e,t)}}function pedanticListItem(r,e,t){var a=r.offset,o=t.line;return e=e.replace(EXPRESSION_PEDANTIC_BULLET,i),o=t.line,e.replace(EXPRESSION_INITIAL_INDENT,i);function i(r){return a[o]=(a[o]||0)+r.length,o++,""}}function normalListItem(r,e,t){var a,o,i,n,s,u,l,c=r.offset,p=t.line;for(n=(e=e.replace(EXPRESSION_BULLET,function(r,e,t,n,s){o=e+t+n,i=s,Number(t)<10&&o.length%2==1&&(t=C_SPACE$5+t);return(a=e+repeatString(C_SPACE$5,t.length)+n)+i})).split(C_NEWLINE$6),(s=removeIndentation(e,getIndentation(a).indent).split(C_NEWLINE$6))[0]=i,c[p]=(c[p]||0)+o.length,p++,u=0,l=n.length;++u=MAX_HEADING_INDENT){c--;break}p+=i}for(a="",o="";++c`\\u0000-\\u0020]+",singleQuoted="'[^']*'",doubleQuoted='"[^"]*"',attributeValue="(?:"+unquoted+"|"+singleQuoted+"|"+doubleQuoted+")",attribute="(?:\\s+"+attributeName+"(?:\\s*=\\s*"+attributeValue+")?)",openTag="<[A-Za-z][A-Za-z0-9\\-]*"+attribute+"*\\s*\\/?>",closeTag="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",comment="\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e",processing="<[?].*?[?]>",declaration="]*>",cdata="",openCloseTag$1=new RegExp("^(?:"+openTag+"|"+closeTag+")"),tag=new RegExp("^(?:"+openTag+"|"+closeTag+"|"+comment+"|"+processing+"|"+declaration+"|"+cdata+")"),html={openCloseTag:openCloseTag$1,tag:tag},openCloseTag=html.openCloseTag,htmlBlock=blockHTML,C_TAB$8="\t",C_SPACE$8=" ",C_NEWLINE$9="\n",C_LT="<";function blockHTML(r,e,t){for(var a,o,i,n,s,u,l,c=this.options.blocks,p=e.length,g=0,f=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(openCloseTag.source+"\\s*$"),/^$/,!1]];gq){if(C1&&(p?(n+=c.slice(0,c.length-1),c=c.charAt(c.length-1)):(n+=c,c="")),E=r.now(),r(n)({type:"tableCell",children:this.tokenizeInline(d,E)},s)),r(c+p),c="",d=""}else if(c&&(d+=c,c=""),d+=p,p===C_BACKSLASH$2&&a!==u-2&&(d+=A.charAt(a+1),a++),p===C_TICK$1){for(m=1;A.charAt(a+1)===p;)d+=p,a++,m++;D?m>=D&&(D=0):D=m}h=!1,a++}else d?c+=p:r(p),a++;b||r(C_NEWLINE$12+o)}return w}}}var paragraph_1=paragraph,C_NEWLINE$13="\n",C_TAB$12="\t",C_SPACE$12=" ",TAB_SIZE$1=4;function paragraph(r,e,t){for(var a,o,i,n,s,u=this.options,l=u.commonmark,c=u.gfm,p=this.blockTokenizers,g=this.interruptParagraph,f=e.indexOf(C_NEWLINE$13),d=e.length;f=TAB_SIZE$1){f=e.indexOf(C_NEWLINE$13,f+1);continue}}if(o=e.slice(f+1),interrupt_1(g,p,this,[r,o,!0]))break;if(p.list.call(this,r,o,!0)&&(this.inList||l||c&&!isDecimal(trim_1.left(o).charAt(0))))break;if(a=f,-1!==(f=e.indexOf(C_NEWLINE$13,f+1))&&""===trim_1(e.slice(a,f))){f=a;break}}return o=e.slice(0,f),""===trim_1(o)?(r(o),null):!!t||(s=r.now(),r(o=trimTrailingLines_1(o))({type:"paragraph",children:this.tokenizeInline(o,s)}))}var _escape$2=locate;function locate(r,e){return r.indexOf("\\",e)}var _escape=escape;function escape(r,e,t){var a,o;if("\\"===e.charAt(0)&&(a=e.charAt(1),-1!==this.escape.indexOf(a)))return!!t||(o="\n"===a?{type:"break"}:{type:"text",value:a},r("\\"+a)(o))}escape.locator=_escape$2;var tag$1=locate$2;function locate$2(r,e){return r.indexOf("<",e)}var autoLink_1=autoLink;autoLink.locator=tag$1,autoLink.notInLink=!0;var C_LT$2="<",C_GT$2=">",C_AT_SIGN="@",C_SLASH="/",MAILTO="mailto:",MAILTO_LENGTH=MAILTO.length;function autoLink(r,e,t){var a,o,i,n,s,u,l,c,p,g,f;if(e.charAt(0)===C_LT$2){for(this,a="",o=e.length,i=0,n="",u=!1,l="",i++,a=C_LT$2;i/i;function inlineHTML(r,e,t){var a,o,i=e.length;if(!("<"!==e.charAt(0)||i<3)&&(a=e.charAt(1),(isAlphabetical(a)||"?"===a||"!"===a||"/"===a)&&(o=e.match(tag$3))))return!!t||(o=o[0],!this.inLink&&EXPRESSION_HTML_LINK_OPEN.test(o)?this.inLink=!0:this.inLink&&EXPRESSION_HTML_LINK_CLOSE.test(o)&&(this.inLink=!1),r(o)({type:"html",value:o}))}var link$1=locate$6;function locate$6(r,e){var t=r.indexOf("[",e),a=r.indexOf("![",e);return-1===a?t:t",C_TICK$2="`",C_DOUBLE_QUOTE$1='"',C_SINGLE_QUOTE$1="'",LINK_MARKERS={};LINK_MARKERS[C_DOUBLE_QUOTE$1]=C_DOUBLE_QUOTE$1,LINK_MARKERS[C_SINGLE_QUOTE$1]=C_SINGLE_QUOTE$1;var COMMONMARK_LINK_MARKERS={};function link(r,e,t){var a,o,i,n,s,u,l,c,p,g,f,d,h,m,D,E,b,C,A,v="",w=0,q=e.charAt(0),y=this.options.pedantic,L=this.options.commonmark,T=this.options.gfm;if("!"===q&&(p=!0,v=q,q=e.charAt(++w)),q===C_BRACKET_OPEN$3&&(p||!this.inLink)){for(v+=q,D="",w++,d=e.length,m=0,(b=r.now()).column+=w,b.offset+=w;w=i&&(i=0):i=o}else if(q===C_BACKSLASH$3)w++,u+=e.charAt(w);else if(i&&!T||q!==C_BRACKET_OPEN$3){if((!i||T)&&q===C_BRACKET_CLOSE$3){if(!m){if(!y)for(;we&&" "===r.charAt(t-1);)t--;return t}var _break=hardBreak;hardBreak.locator=_break$2;var MIN_BREAK_LENGTH=2;function hardBreak(r,e,t){for(var a,o=e.length,i=-1,n="";++ii.length;n&&i.push(a);try{e=r.apply(null,i)}catch(r){if(n&&t)throw r;return a(r)}n||(e&&"function"==typeof e.then?e.then(o,a):e instanceof Error?a(e):o(e))};function a(){t||(t=!0,e.apply(null,arguments))}function o(r){a(null,r)}}var toString$1=Object.prototype.toString,xIsString=isString;function isString(r){return"[object String]"===toString$1.call(r)}var xIsFunction=function(r){return"[object Function]"===Object.prototype.toString.call(r)},toString$2=Object.prototype.toString,isPlainObj=function(r){var e;return"[object Object]"===toString$2.call(r)&&(null===(e=Object.getPrototypeOf(r))||e===Object.getPrototypeOf({}))},unified_1=unified().freeze(),slice=[].slice,own$3={}.hasOwnProperty,pipeline=trough_1().use(pipelineParse).use(pipelineRun).use(pipelineStringify);function pipelineParse(r,e){e.tree=r.parse(e.file)}function pipelineRun(r,e,t){r.run(e.tree,e.file,function(r,a,o){r?t(r):(e.tree=a,e.file=o,t())})}function pipelineStringify(r,e){e.file.contents=r.stringify(e.tree,e.file)}function unified(){var r=[],e=trough_1(),t={},a=!1,o=-1;return i.data=function(r,e){if(xIsString(r))return 2===arguments.length?(assertUnfrozen("data",a),t[r]=e,i):own$3.call(t,r)&&t[r]||null;if(r)return assertUnfrozen("data",a),t=r,i;return t},i.freeze=n,i.attachers=r,i.use=function(e){var o;if(assertUnfrozen("use",a),null===e||void 0===e);else if(xIsFunction(e))l.apply(null,arguments);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u(e):n(e)}o&&(t.settings=extend$1(t.settings||{},o));return i;function n(r){u(r.plugins),r.settings&&(o=extend$1(o||{},r.settings))}function s(r){if(xIsFunction(r))l(r);else{if("object"!=typeof r)throw new Error("Expected usable value, not `"+r+"`");"length"in r?l.apply(null,r):n(r)}}function u(r){var e,t;if(null===r||void 0===r);else{if(!("object"==typeof r&&"length"in r))throw new Error("Expected a list of plugins, not `"+r+"`");for(e=r.length,t=-1;++t{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(r,"g")})}),stripAnsi=r=>"string"==typeof r?r.replace(ansiRegex(),""):r,isFullwidthCodePoint=createCommonjsModule(function(r){r.exports=(r=>!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)))}),stringWidth=createCommonjsModule(function(r){r.exports=(r=>{if("string"!=typeof r||0===r.length)return 0;r=stripAnsi(r);let e=0;for(let t=0;t=127&&a<=159||(a>=768&&a<=879||(a>65535&&t++,e+=isFullwidthCodePoint(a)?2:1))}return e})}),emojiRegex$1=function(){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\uDD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DD96\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},matchOperatorsRe=/[|\\{}()[\]^$+*?.]/g,escapeStringRegexp=function(r){if("string"!=typeof r)throw new TypeError("Expected a string");return r.replace(matchOperatorsRe,"\\$&")},punctuation_ranges=[[12288,12351],[44032,55215],[65040,65055],[65072,65135],[65280,65376],[65504,65519]],character_ranges=[[4352,4607],[11904,12255],[12352,12687],[12800,19903],[19968,40959],[43360,43391],[63744,64255]];function get_regex(){return create_regex(character_ranges.concat(punctuation_ranges))}function create_regex(r){return new RegExp("["+r.map(get_bracket_content).reduce(function(r,e){return r+e})+"]","g")}function get_bracket_content(r){return get_escaped_unicode(r[0])+"-"+get_escaped_unicode(r[1])}function get_escaped_unicode(r){return"\\u"+r.toString(16)}!function(r){r.punctuations=function(){return create_regex(punctuation_ranges)},r.characters=function(){return create_regex(character_ranges)}}(get_regex||(get_regex={}));var lib=get_regex,data_generated=createCommonjsModule(function(r,e){e.__esModule=!0,e.get_data=function(){return{Pc:[[95,95],[8255,8256],[8276,8276],[65075,65076],[65101,65103],[65343,65343]],Pe:[[41,41],[93,93],[125,125],[3899,3899],[3901,3901],[5788,5788],[8262,8262],[8318,8318],[8334,8334],[8969,8969],[8971,8971],[9002,9002],[10089,10089],[10091,10091],[10093,10093],[10095,10095],[10097,10097],[10099,10099],[10101,10101],[10182,10182],[10215,10215],[10217,10217],[10219,10219],[10221,10221],[10223,10223],[10628,10628],[10630,10630],[10632,10632],[10634,10634],[10636,10636],[10638,10638],[10640,10640],[10642,10642],[10644,10644],[10646,10646],[10648,10648],[10713,10713],[10715,10715],[10749,10749],[11811,11811],[11813,11813],[11815,11815],[11817,11817],[12297,12297],[12299,12299],[12301,12301],[12303,12303],[12305,12305],[12309,12309],[12311,12311],[12313,12313],[12315,12315],[12318,12319],[64830,64830],[65048,65048],[65078,65078],[65080,65080],[65082,65082],[65084,65084],[65086,65086],[65088,65088],[65090,65090],[65092,65092],[65096,65096],[65114,65114],[65116,65116],[65118,65118],[65289,65289],[65341,65341],[65373,65373],[65376,65376],[65379,65379]],Ps:[[40,40],[91,91],[123,123],[3898,3898],[3900,3900],[5787,5787],[8218,8218],[8222,8222],[8261,8261],[8317,8317],[8333,8333],[8968,8968],[8970,8970],[9001,9001],[10088,10088],[10090,10090],[10092,10092],[10094,10094],[10096,10096],[10098,10098],[10100,10100],[10181,10181],[10214,10214],[10216,10216],[10218,10218],[10220,10220],[10222,10222],[10627,10627],[10629,10629],[10631,10631],[10633,10633],[10635,10635],[10637,10637],[10639,10639],[10641,10641],[10643,10643],[10645,10645],[10647,10647],[10712,10712],[10714,10714],[10748,10748],[11810,11810],[11812,11812],[11814,11814],[11816,11816],[11842,11842],[12296,12296],[12298,12298],[12300,12300],[12302,12302],[12304,12304],[12308,12308],[12310,12310],[12312,12312],[12314,12314],[12317,12317],[64831,64831],[65047,65047],[65077,65077],[65079,65079],[65081,65081],[65083,65083],[65085,65085],[65087,65087],[65089,65089],[65091,65091],[65095,65095],[65113,65113],[65115,65115],[65117,65117],[65288,65288],[65339,65339],[65371,65371],[65375,65375],[65378,65378]],Lm:[[688,705],[710,721],[736,740],[748,748],[750,750],[884,884],[890,890],[1369,1369],[1600,1600],[1765,1766],[2036,2037],[2042,2042],[2074,2074],[2084,2084],[2088,2088],[2417,2417],[3654,3654],[3782,3782],[4348,4348],[6103,6103],[6211,6211],[6823,6823],[7288,7293],[7468,7530],[7544,7544],[7579,7615],[8305,8305],[8319,8319],[8336,8348],[11388,11389],[11631,11631],[11823,11823],[12293,12293],[12337,12341],[12347,12347],[12445,12446],[12540,12542],[40981,40981],[42232,42237],[42508,42508],[42623,42623],[42652,42653],[42775,42783],[42864,42864],[42888,42888],[43e3,43001],[43471,43471],[43494,43494],[43632,43632],[43741,43741],[43763,43764],[43868,43871],[65392,65392],[65438,65439]],Mc:[[2307,2307],[2363,2363],[2366,2368],[2377,2380],[2382,2383],[2434,2435],[2494,2496],[2503,2504],[2507,2508],[2519,2519],[2563,2563],[2622,2624],[2691,2691],[2750,2752],[2761,2761],[2763,2764],[2818,2819],[2878,2878],[2880,2880],[2887,2888],[2891,2892],[2903,2903],[3006,3007],[3009,3010],[3014,3016],[3018,3020],[3031,3031],[3073,3075],[3137,3140],[3202,3203],[3262,3262],[3264,3268],[3271,3272],[3274,3275],[3285,3286],[3330,3331],[3390,3392],[3398,3400],[3402,3404],[3415,3415],[3458,3459],[3535,3537],[3544,3551],[3570,3571],[3902,3903],[3967,3967],[4139,4140],[4145,4145],[4152,4152],[4155,4156],[4182,4183],[4194,4196],[4199,4205],[4227,4228],[4231,4236],[4239,4239],[4250,4252],[6070,6070],[6078,6085],[6087,6088],[6435,6438],[6441,6443],[6448,6449],[6451,6456],[6681,6682],[6741,6741],[6743,6743],[6753,6753],[6755,6756],[6765,6770],[6916,6916],[6965,6965],[6971,6971],[6973,6977],[6979,6980],[7042,7042],[7073,7073],[7078,7079],[7082,7082],[7143,7143],[7146,7148],[7150,7150],[7154,7155],[7204,7211],[7220,7221],[7393,7393],[7410,7411],[7415,7415],[12334,12335],[43043,43044],[43047,43047],[43136,43137],[43188,43203],[43346,43347],[43395,43395],[43444,43445],[43450,43451],[43453,43456],[43567,43568],[43571,43572],[43597,43597],[43643,43643],[43645,43645],[43755,43755],[43758,43759],[43765,43765],[44003,44004],[44006,44007],[44009,44010],[44012,44012]],Zp:[[8233,8233]],Sc:[[36,36],[162,165],[1423,1423],[1547,1547],[2546,2547],[2555,2555],[2801,2801],[3065,3065],[3647,3647],[6107,6107],[8352,8383],[43064,43064],[65020,65020],[65129,65129],[65284,65284],[65504,65505],[65509,65510]],Me:[[1160,1161],[6846,6846],[8413,8416],[8418,8420],[42608,42610]],Sk:[[94,94],[96,96],[168,168],[175,175],[180,180],[184,184],[706,709],[722,735],[741,747],[749,749],[751,767],[885,885],[900,901],[8125,8125],[8127,8129],[8141,8143],[8157,8159],[8173,8175],[8189,8190],[12443,12444],[42752,42774],[42784,42785],[42889,42890],[43867,43867],[64434,64449],[65342,65342],[65344,65344],[65507,65507]],Cs:[[55296,55296],[56191,56192],[56319,56320],[57343,57343]],Nl:[[5870,5872],[8544,8578],[8581,8584],[12295,12295],[12321,12329],[12344,12346],[42726,42735]],So:[[166,166],[169,169],[174,174],[176,176],[1154,1154],[1421,1422],[1550,1551],[1758,1758],[1769,1769],[1789,1790],[2038,2038],[2554,2554],[2928,2928],[3059,3064],[3066,3066],[3199,3199],[3407,3407],[3449,3449],[3841,3843],[3859,3859],[3861,3863],[3866,3871],[3892,3892],[3894,3894],[3896,3896],[4030,4037],[4039,4044],[4046,4047],[4053,4056],[4254,4255],[5008,5017],[6464,6464],[6622,6655],[7009,7018],[7028,7036],[8448,8449],[8451,8454],[8456,8457],[8468,8468],[8470,8471],[8478,8483],[8485,8485],[8487,8487],[8489,8489],[8494,8494],[8506,8507],[8522,8522],[8524,8525],[8527,8527],[8586,8587],[8597,8601],[8604,8607],[8609,8610],[8612,8613],[8615,8621],[8623,8653],[8656,8657],[8659,8659],[8661,8691],[8960,8967],[8972,8991],[8994,9e3],[9003,9083],[9085,9114],[9140,9179],[9186,9254],[9280,9290],[9372,9449],[9472,9654],[9656,9664],[9666,9719],[9728,9838],[9840,10087],[10132,10175],[10240,10495],[11008,11055],[11077,11078],[11085,11123],[11126,11157],[11160,11193],[11197,11208],[11210,11218],[11244,11247],[11493,11498],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12292,12292],[12306,12307],[12320,12320],[12342,12343],[12350,12351],[12688,12689],[12694,12703],[12736,12771],[12800,12830],[12842,12871],[12880,12880],[12896,12927],[12938,12976],[12992,13054],[13056,13311],[19904,19967],[42128,42182],[43048,43051],[43062,43063],[43065,43065],[43639,43641],[65021,65021],[65508,65508],[65512,65512],[65517,65518],[65532,65533]],Lt:[[453,453],[456,456],[459,459],[498,498],[8072,8079],[8088,8095],[8104,8111],[8124,8124],[8140,8140],[8188,8188]],Zl:[[8232,8232]],Lo:[[170,170],[186,186],[443,443],[448,451],[660,660],[1488,1514],[1520,1522],[1568,1599],[1601,1610],[1646,1647],[1649,1747],[1749,1749],[1774,1775],[1786,1788],[1791,1791],[1808,1808],[1810,1839],[1869,1957],[1969,1969],[1994,2026],[2048,2069],[2112,2136],[2144,2154],[2208,2228],[2230,2237],[2308,2361],[2365,2365],[2384,2384],[2392,2401],[2418,2432],[2437,2444],[2447,2448],[2451,2472],[2474,2480],[2482,2482],[2486,2489],[2493,2493],[2510,2510],[2524,2525],[2527,2529],[2544,2545],[2556,2556],[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],[2809,2809],[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,3129],[3133,3133],[3160,3162],[3168,3169],[3200,3200],[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],[3412,3414],[3423,3425],[3450,3455],[3461,3478],[3482,3505],[3507,3515],[3517,3517],[3520,3526],[3585,3632],[3634,3635],[3648,3653],[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],[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],[4304,4346],[4349,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],[5121,5740],[5743,5759],[5761,5786],[5792,5866],[5873,5880],[5888,5900],[5902,5905],[5920,5937],[5952,5969],[5984,5996],[5998,6e3],[6016,6067],[6108,6108],[6176,6210],[6212,6263],[6272,6276],[6279,6312],[6314,6314],[6320,6389],[6400,6430],[6480,6509],[6512,6516],[6528,6571],[6576,6601],[6656,6678],[6688,6740],[6917,6963],[6981,6987],[7043,7072],[7086,7087],[7098,7141],[7168,7203],[7245,7247],[7258,7287],[7401,7404],[7406,7409],[7413,7414],[8501,8504],[11568,11623],[11648,11670],[11680,11686],[11688,11694],[11696,11702],[11704,11710],[11712,11718],[11720,11726],[11728,11734],[11736,11742],[12294,12294],[12348,12348],[12353,12438],[12447,12447],[12449,12538],[12543,12543],[12549,12590],[12593,12686],[12704,12730],[12784,12799],[13312,13312],[19893,19893],[19968,19968],[40938,40938],[40960,40980],[40982,42124],[42192,42231],[42240,42507],[42512,42527],[42538,42539],[42606,42606],[42656,42725],[42895,42895],[42999,42999],[43003,43009],[43011,43013],[43015,43018],[43020,43042],[43072,43123],[43138,43187],[43250,43255],[43259,43259],[43261,43261],[43274,43301],[43312,43334],[43360,43388],[43396,43442],[43488,43492],[43495,43503],[43514,43518],[43520,43560],[43584,43586],[43588,43595],[43616,43631],[43633,43638],[43642,43642],[43646,43695],[43697,43697],[43701,43702],[43705,43709],[43712,43712],[43714,43714],[43739,43740],[43744,43754],[43762,43762],[43777,43782],[43785,43790],[43793,43798],[43808,43814],[43816,43822],[43968,44002],[44032,44032],[55203,55203],[55216,55238],[55243,55291],[63744,64109],[64112,64217],[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],[65382,65391],[65393,65437],[65440,65470],[65474,65479],[65482,65487],[65490,65495],[65498,65500]],Mn:[[768,879],[1155,1159],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1552,1562],[1611,1631],[1648,1648],[1750,1756],[1759,1764],[1767,1768],[1770,1773],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2260,2273],[2275,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6845],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8400,8412],[8417,8417],[8421,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42607],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43452],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071]],Po:[[33,35],[37,39],[42,42],[44,44],[46,47],[58,59],[63,64],[92,92],[161,161],[167,167],[182,183],[191,191],[894,894],[903,903],[1370,1375],[1417,1417],[1472,1472],[1475,1475],[1478,1478],[1523,1524],[1545,1546],[1548,1549],[1563,1563],[1566,1567],[1642,1645],[1748,1748],[1792,1805],[2039,2041],[2096,2110],[2142,2142],[2404,2405],[2416,2416],[2557,2557],[2800,2800],[3572,3572],[3663,3663],[3674,3675],[3844,3858],[3860,3860],[3973,3973],[4048,4052],[4057,4058],[4170,4175],[4347,4347],[4960,4968],[5741,5742],[5867,5869],[5941,5942],[6100,6102],[6104,6106],[6144,6149],[6151,6154],[6468,6469],[6686,6687],[6816,6822],[6824,6829],[7002,7008],[7164,7167],[7227,7231],[7294,7295],[7360,7367],[7379,7379],[8214,8215],[8224,8231],[8240,8248],[8251,8254],[8257,8259],[8263,8273],[8275,8275],[8277,8286],[11513,11516],[11518,11519],[11632,11632],[11776,11777],[11782,11784],[11787,11787],[11790,11798],[11800,11801],[11803,11803],[11806,11807],[11818,11822],[11824,11833],[11836,11839],[11841,11841],[11843,11849],[12289,12291],[12349,12349],[12539,12539],[42238,42239],[42509,42511],[42611,42611],[42622,42622],[42738,42743],[43124,43127],[43214,43215],[43256,43258],[43260,43260],[43310,43311],[43359,43359],[43457,43469],[43486,43487],[43612,43615],[43742,43743],[43760,43761],[44011,44011],[65040,65046],[65049,65049],[65072,65072],[65093,65094],[65097,65100],[65104,65106],[65108,65111],[65119,65121],[65128,65128],[65130,65131],[65281,65283],[65285,65287],[65290,65290],[65292,65292],[65294,65295],[65306,65307],[65311,65312],[65340,65340],[65377,65377],[65380,65381]],Co:[[57344,57344],[63743,63743]],Sm:[[43,43],[60,62],[124,124],[126,126],[172,172],[177,177],[215,215],[247,247],[1014,1014],[1542,1544],[8260,8260],[8274,8274],[8314,8316],[8330,8332],[8472,8472],[8512,8516],[8523,8523],[8592,8596],[8602,8603],[8608,8608],[8611,8611],[8614,8614],[8622,8622],[8654,8655],[8658,8658],[8660,8660],[8692,8959],[8992,8993],[9084,9084],[9115,9139],[9180,9185],[9655,9655],[9665,9665],[9720,9727],[9839,9839],[10176,10180],[10183,10213],[10224,10239],[10496,10626],[10649,10711],[10716,10747],[10750,11007],[11056,11076],[11079,11084],[64297,64297],[65122,65122],[65124,65126],[65291,65291],[65308,65310],[65372,65372],[65374,65374],[65506,65506],[65513,65516]],Pf:[[187,187],[8217,8217],[8221,8221],[8250,8250],[11779,11779],[11781,11781],[11786,11786],[11789,11789],[11805,11805],[11809,11809]],Cc:[[0,31],[127,159]],Pi:[[171,171],[8216,8216],[8219,8220],[8223,8223],[8249,8249],[11778,11778],[11780,11780],[11785,11785],[11788,11788],[11804,11804],[11808,11808]],Lu:[[65,90],[192,214],[216,222],[256,256],[258,258],[260,260],[262,262],[264,264],[266,266],[268,268],[270,270],[272,272],[274,274],[276,276],[278,278],[280,280],[282,282],[284,284],[286,286],[288,288],[290,290],[292,292],[294,294],[296,296],[298,298],[300,300],[302,302],[304,304],[306,306],[308,308],[310,310],[313,313],[315,315],[317,317],[319,319],[321,321],[323,323],[325,325],[327,327],[330,330],[332,332],[334,334],[336,336],[338,338],[340,340],[342,342],[344,344],[346,346],[348,348],[350,350],[352,352],[354,354],[356,356],[358,358],[360,360],[362,362],[364,364],[366,366],[368,368],[370,370],[372,372],[374,374],[376,377],[379,379],[381,381],[385,386],[388,388],[390,391],[393,395],[398,401],[403,404],[406,408],[412,413],[415,416],[418,418],[420,420],[422,423],[425,425],[428,428],[430,431],[433,435],[437,437],[439,440],[444,444],[452,452],[455,455],[458,458],[461,461],[463,463],[465,465],[467,467],[469,469],[471,471],[473,473],[475,475],[478,478],[480,480],[482,482],[484,484],[486,486],[488,488],[490,490],[492,492],[494,494],[497,497],[500,500],[502,504],[506,506],[508,508],[510,510],[512,512],[514,514],[516,516],[518,518],[520,520],[522,522],[524,524],[526,526],[528,528],[530,530],[532,532],[534,534],[536,536],[538,538],[540,540],[542,542],[544,544],[546,546],[548,548],[550,550],[552,552],[554,554],[556,556],[558,558],[560,560],[562,562],[570,571],[573,574],[577,577],[579,582],[584,584],[586,586],[588,588],[590,590],[880,880],[882,882],[886,886],[895,895],[902,902],[904,906],[908,908],[910,911],[913,929],[931,939],[975,975],[978,980],[984,984],[986,986],[988,988],[990,990],[992,992],[994,994],[996,996],[998,998],[1e3,1e3],[1002,1002],[1004,1004],[1006,1006],[1012,1012],[1015,1015],[1017,1018],[1021,1071],[1120,1120],[1122,1122],[1124,1124],[1126,1126],[1128,1128],[1130,1130],[1132,1132],[1134,1134],[1136,1136],[1138,1138],[1140,1140],[1142,1142],[1144,1144],[1146,1146],[1148,1148],[1150,1150],[1152,1152],[1162,1162],[1164,1164],[1166,1166],[1168,1168],[1170,1170],[1172,1172],[1174,1174],[1176,1176],[1178,1178],[1180,1180],[1182,1182],[1184,1184],[1186,1186],[1188,1188],[1190,1190],[1192,1192],[1194,1194],[1196,1196],[1198,1198],[1200,1200],[1202,1202],[1204,1204],[1206,1206],[1208,1208],[1210,1210],[1212,1212],[1214,1214],[1216,1217],[1219,1219],[1221,1221],[1223,1223],[1225,1225],[1227,1227],[1229,1229],[1232,1232],[1234,1234],[1236,1236],[1238,1238],[1240,1240],[1242,1242],[1244,1244],[1246,1246],[1248,1248],[1250,1250],[1252,1252],[1254,1254],[1256,1256],[1258,1258],[1260,1260],[1262,1262],[1264,1264],[1266,1266],[1268,1268],[1270,1270],[1272,1272],[1274,1274],[1276,1276],[1278,1278],[1280,1280],[1282,1282],[1284,1284],[1286,1286],[1288,1288],[1290,1290],[1292,1292],[1294,1294],[1296,1296],[1298,1298],[1300,1300],[1302,1302],[1304,1304],[1306,1306],[1308,1308],[1310,1310],[1312,1312],[1314,1314],[1316,1316],[1318,1318],[1320,1320],[1322,1322],[1324,1324],[1326,1326],[1329,1366],[4256,4293],[4295,4295],[4301,4301],[5024,5109],[7680,7680],[7682,7682],[7684,7684],[7686,7686],[7688,7688],[7690,7690],[7692,7692],[7694,7694],[7696,7696],[7698,7698],[7700,7700],[7702,7702],[7704,7704],[7706,7706],[7708,7708],[7710,7710],[7712,7712],[7714,7714],[7716,7716],[7718,7718],[7720,7720],[7722,7722],[7724,7724],[7726,7726],[7728,7728],[7730,7730],[7732,7732],[7734,7734],[7736,7736],[7738,7738],[7740,7740],[7742,7742],[7744,7744],[7746,7746],[7748,7748],[7750,7750],[7752,7752],[7754,7754],[7756,7756],[7758,7758],[7760,7760],[7762,7762],[7764,7764],[7766,7766],[7768,7768],[7770,7770],[7772,7772],[7774,7774],[7776,7776],[7778,7778],[7780,7780],[7782,7782],[7784,7784],[7786,7786],[7788,7788],[7790,7790],[7792,7792],[7794,7794],[7796,7796],[7798,7798],[7800,7800],[7802,7802],[7804,7804],[7806,7806],[7808,7808],[7810,7810],[7812,7812],[7814,7814],[7816,7816],[7818,7818],[7820,7820],[7822,7822],[7824,7824],[7826,7826],[7828,7828],[7838,7838],[7840,7840],[7842,7842],[7844,7844],[7846,7846],[7848,7848],[7850,7850],[7852,7852],[7854,7854],[7856,7856],[7858,7858],[7860,7860],[7862,7862],[7864,7864],[7866,7866],[7868,7868],[7870,7870],[7872,7872],[7874,7874],[7876,7876],[7878,7878],[7880,7880],[7882,7882],[7884,7884],[7886,7886],[7888,7888],[7890,7890],[7892,7892],[7894,7894],[7896,7896],[7898,7898],[7900,7900],[7902,7902],[7904,7904],[7906,7906],[7908,7908],[7910,7910],[7912,7912],[7914,7914],[7916,7916],[7918,7918],[7920,7920],[7922,7922],[7924,7924],[7926,7926],[7928,7928],[7930,7930],[7932,7932],[7934,7934],[7944,7951],[7960,7965],[7976,7983],[7992,7999],[8008,8013],[8025,8025],[8027,8027],[8029,8029],[8031,8031],[8040,8047],[8120,8123],[8136,8139],[8152,8155],[8168,8172],[8184,8187],[8450,8450],[8455,8455],[8459,8461],[8464,8466],[8469,8469],[8473,8477],[8484,8484],[8486,8486],[8488,8488],[8490,8493],[8496,8499],[8510,8511],[8517,8517],[8579,8579],[11264,11310],[11360,11360],[11362,11364],[11367,11367],[11369,11369],[11371,11371],[11373,11376],[11378,11378],[11381,11381],[11390,11392],[11394,11394],[11396,11396],[11398,11398],[11400,11400],[11402,11402],[11404,11404],[11406,11406],[11408,11408],[11410,11410],[11412,11412],[11414,11414],[11416,11416],[11418,11418],[11420,11420],[11422,11422],[11424,11424],[11426,11426],[11428,11428],[11430,11430],[11432,11432],[11434,11434],[11436,11436],[11438,11438],[11440,11440],[11442,11442],[11444,11444],[11446,11446],[11448,11448],[11450,11450],[11452,11452],[11454,11454],[11456,11456],[11458,11458],[11460,11460],[11462,11462],[11464,11464],[11466,11466],[11468,11468],[11470,11470],[11472,11472],[11474,11474],[11476,11476],[11478,11478],[11480,11480],[11482,11482],[11484,11484],[11486,11486],[11488,11488],[11490,11490],[11499,11499],[11501,11501],[11506,11506],[42560,42560],[42562,42562],[42564,42564],[42566,42566],[42568,42568],[42570,42570],[42572,42572],[42574,42574],[42576,42576],[42578,42578],[42580,42580],[42582,42582],[42584,42584],[42586,42586],[42588,42588],[42590,42590],[42592,42592],[42594,42594],[42596,42596],[42598,42598],[42600,42600],[42602,42602],[42604,42604],[42624,42624],[42626,42626],[42628,42628],[42630,42630],[42632,42632],[42634,42634],[42636,42636],[42638,42638],[42640,42640],[42642,42642],[42644,42644],[42646,42646],[42648,42648],[42650,42650],[42786,42786],[42788,42788],[42790,42790],[42792,42792],[42794,42794],[42796,42796],[42798,42798],[42802,42802],[42804,42804],[42806,42806],[42808,42808],[42810,42810],[42812,42812],[42814,42814],[42816,42816],[42818,42818],[42820,42820],[42822,42822],[42824,42824],[42826,42826],[42828,42828],[42830,42830],[42832,42832],[42834,42834],[42836,42836],[42838,42838],[42840,42840],[42842,42842],[42844,42844],[42846,42846],[42848,42848],[42850,42850],[42852,42852],[42854,42854],[42856,42856],[42858,42858],[42860,42860],[42862,42862],[42873,42873],[42875,42875],[42877,42878],[42880,42880],[42882,42882],[42884,42884],[42886,42886],[42891,42891],[42893,42893],[42896,42896],[42898,42898],[42902,42902],[42904,42904],[42906,42906],[42908,42908],[42910,42910],[42912,42912],[42914,42914],[42916,42916],[42918,42918],[42920,42920],[42922,42926],[42928,42932],[42934,42934],[65313,65338]],Pd:[[45,45],[1418,1418],[1470,1470],[5120,5120],[6150,6150],[8208,8213],[11799,11799],[11802,11802],[11834,11835],[11840,11840],[12316,12316],[12336,12336],[12448,12448],[65073,65074],[65112,65112],[65123,65123],[65293,65293]],Cf:[[173,173],[1536,1541],[1564,1564],[1757,1757],[1807,1807],[2274,2274],[6158,6158],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[65279,65279],[65529,65531]],Nd:[[48,57],[1632,1641],[1776,1785],[1984,1993],[2406,2415],[2534,2543],[2662,2671],[2790,2799],[2918,2927],[3046,3055],[3174,3183],[3302,3311],[3430,3439],[3558,3567],[3664,3673],[3792,3801],[3872,3881],[4160,4169],[4240,4249],[6112,6121],[6160,6169],[6470,6479],[6608,6617],[6784,6793],[6800,6809],[6992,7001],[7088,7097],[7232,7241],[7248,7257],[42528,42537],[43216,43225],[43264,43273],[43472,43481],[43504,43513],[43600,43609],[44016,44025],[65296,65305]],Ll:[[97,122],[181,181],[223,246],[248,255],[257,257],[259,259],[261,261],[263,263],[265,265],[267,267],[269,269],[271,271],[273,273],[275,275],[277,277],[279,279],[281,281],[283,283],[285,285],[287,287],[289,289],[291,291],[293,293],[295,295],[297,297],[299,299],[301,301],[303,303],[305,305],[307,307],[309,309],[311,312],[314,314],[316,316],[318,318],[320,320],[322,322],[324,324],[326,326],[328,329],[331,331],[333,333],[335,335],[337,337],[339,339],[341,341],[343,343],[345,345],[347,347],[349,349],[351,351],[353,353],[355,355],[357,357],[359,359],[361,361],[363,363],[365,365],[367,367],[369,369],[371,371],[373,373],[375,375],[378,378],[380,380],[382,384],[387,387],[389,389],[392,392],[396,397],[402,402],[405,405],[409,411],[414,414],[417,417],[419,419],[421,421],[424,424],[426,427],[429,429],[432,432],[436,436],[438,438],[441,442],[445,447],[454,454],[457,457],[460,460],[462,462],[464,464],[466,466],[468,468],[470,470],[472,472],[474,474],[476,477],[479,479],[481,481],[483,483],[485,485],[487,487],[489,489],[491,491],[493,493],[495,496],[499,499],[501,501],[505,505],[507,507],[509,509],[511,511],[513,513],[515,515],[517,517],[519,519],[521,521],[523,523],[525,525],[527,527],[529,529],[531,531],[533,533],[535,535],[537,537],[539,539],[541,541],[543,543],[545,545],[547,547],[549,549],[551,551],[553,553],[555,555],[557,557],[559,559],[561,561],[563,569],[572,572],[575,576],[578,578],[583,583],[585,585],[587,587],[589,589],[591,659],[661,687],[881,881],[883,883],[887,887],[891,893],[912,912],[940,974],[976,977],[981,983],[985,985],[987,987],[989,989],[991,991],[993,993],[995,995],[997,997],[999,999],[1001,1001],[1003,1003],[1005,1005],[1007,1011],[1013,1013],[1016,1016],[1019,1020],[1072,1119],[1121,1121],[1123,1123],[1125,1125],[1127,1127],[1129,1129],[1131,1131],[1133,1133],[1135,1135],[1137,1137],[1139,1139],[1141,1141],[1143,1143],[1145,1145],[1147,1147],[1149,1149],[1151,1151],[1153,1153],[1163,1163],[1165,1165],[1167,1167],[1169,1169],[1171,1171],[1173,1173],[1175,1175],[1177,1177],[1179,1179],[1181,1181],[1183,1183],[1185,1185],[1187,1187],[1189,1189],[1191,1191],[1193,1193],[1195,1195],[1197,1197],[1199,1199],[1201,1201],[1203,1203],[1205,1205],[1207,1207],[1209,1209],[1211,1211],[1213,1213],[1215,1215],[1218,1218],[1220,1220],[1222,1222],[1224,1224],[1226,1226],[1228,1228],[1230,1231],[1233,1233],[1235,1235],[1237,1237],[1239,1239],[1241,1241],[1243,1243],[1245,1245],[1247,1247],[1249,1249],[1251,1251],[1253,1253],[1255,1255],[1257,1257],[1259,1259],[1261,1261],[1263,1263],[1265,1265],[1267,1267],[1269,1269],[1271,1271],[1273,1273],[1275,1275],[1277,1277],[1279,1279],[1281,1281],[1283,1283],[1285,1285],[1287,1287],[1289,1289],[1291,1291],[1293,1293],[1295,1295],[1297,1297],[1299,1299],[1301,1301],[1303,1303],[1305,1305],[1307,1307],[1309,1309],[1311,1311],[1313,1313],[1315,1315],[1317,1317],[1319,1319],[1321,1321],[1323,1323],[1325,1325],[1327,1327],[1377,1415],[5112,5117],[7296,7304],[7424,7467],[7531,7543],[7545,7578],[7681,7681],[7683,7683],[7685,7685],[7687,7687],[7689,7689],[7691,7691],[7693,7693],[7695,7695],[7697,7697],[7699,7699],[7701,7701],[7703,7703],[7705,7705],[7707,7707],[7709,7709],[7711,7711],[7713,7713],[7715,7715],[7717,7717],[7719,7719],[7721,7721],[7723,7723],[7725,7725],[7727,7727],[7729,7729],[7731,7731],[7733,7733],[7735,7735],[7737,7737],[7739,7739],[7741,7741],[7743,7743],[7745,7745],[7747,7747],[7749,7749],[7751,7751],[7753,7753],[7755,7755],[7757,7757],[7759,7759],[7761,7761],[7763,7763],[7765,7765],[7767,7767],[7769,7769],[7771,7771],[7773,7773],[7775,7775],[7777,7777],[7779,7779],[7781,7781],[7783,7783],[7785,7785],[7787,7787],[7789,7789],[7791,7791],[7793,7793],[7795,7795],[7797,7797],[7799,7799],[7801,7801],[7803,7803],[7805,7805],[7807,7807],[7809,7809],[7811,7811],[7813,7813],[7815,7815],[7817,7817],[7819,7819],[7821,7821],[7823,7823],[7825,7825],[7827,7827],[7829,7837],[7839,7839],[7841,7841],[7843,7843],[7845,7845],[7847,7847],[7849,7849],[7851,7851],[7853,7853],[7855,7855],[7857,7857],[7859,7859],[7861,7861],[7863,7863],[7865,7865],[7867,7867],[7869,7869],[7871,7871],[7873,7873],[7875,7875],[7877,7877],[7879,7879],[7881,7881],[7883,7883],[7885,7885],[7887,7887],[7889,7889],[7891,7891],[7893,7893],[7895,7895],[7897,7897],[7899,7899],[7901,7901],[7903,7903],[7905,7905],[7907,7907],[7909,7909],[7911,7911],[7913,7913],[7915,7915],[7917,7917],[7919,7919],[7921,7921],[7923,7923],[7925,7925],[7927,7927],[7929,7929],[7931,7931],[7933,7933],[7935,7943],[7952,7957],[7968,7975],[7984,7991],[8e3,8005],[8016,8023],[8032,8039],[8048,8061],[8064,8071],[8080,8087],[8096,8103],[8112,8116],[8118,8119],[8126,8126],[8130,8132],[8134,8135],[8144,8147],[8150,8151],[8160,8167],[8178,8180],[8182,8183],[8458,8458],[8462,8463],[8467,8467],[8495,8495],[8500,8500],[8505,8505],[8508,8509],[8518,8521],[8526,8526],[8580,8580],[11312,11358],[11361,11361],[11365,11366],[11368,11368],[11370,11370],[11372,11372],[11377,11377],[11379,11380],[11382,11387],[11393,11393],[11395,11395],[11397,11397],[11399,11399],[11401,11401],[11403,11403],[11405,11405],[11407,11407],[11409,11409],[11411,11411],[11413,11413],[11415,11415],[11417,11417],[11419,11419],[11421,11421],[11423,11423],[11425,11425],[11427,11427],[11429,11429],[11431,11431],[11433,11433],[11435,11435],[11437,11437],[11439,11439],[11441,11441],[11443,11443],[11445,11445],[11447,11447],[11449,11449],[11451,11451],[11453,11453],[11455,11455],[11457,11457],[11459,11459],[11461,11461],[11463,11463],[11465,11465],[11467,11467],[11469,11469],[11471,11471],[11473,11473],[11475,11475],[11477,11477],[11479,11479],[11481,11481],[11483,11483],[11485,11485],[11487,11487],[11489,11489],[11491,11492],[11500,11500],[11502,11502],[11507,11507],[11520,11557],[11559,11559],[11565,11565],[42561,42561],[42563,42563],[42565,42565],[42567,42567],[42569,42569],[42571,42571],[42573,42573],[42575,42575],[42577,42577],[42579,42579],[42581,42581],[42583,42583],[42585,42585],[42587,42587],[42589,42589],[42591,42591],[42593,42593],[42595,42595],[42597,42597],[42599,42599],[42601,42601],[42603,42603],[42605,42605],[42625,42625],[42627,42627],[42629,42629],[42631,42631],[42633,42633],[42635,42635],[42637,42637],[42639,42639],[42641,42641],[42643,42643],[42645,42645],[42647,42647],[42649,42649],[42651,42651],[42787,42787],[42789,42789],[42791,42791],[42793,42793],[42795,42795],[42797,42797],[42799,42801],[42803,42803],[42805,42805],[42807,42807],[42809,42809],[42811,42811],[42813,42813],[42815,42815],[42817,42817],[42819,42819],[42821,42821],[42823,42823],[42825,42825],[42827,42827],[42829,42829],[42831,42831],[42833,42833],[42835,42835],[42837,42837],[42839,42839],[42841,42841],[42843,42843],[42845,42845],[42847,42847],[42849,42849],[42851,42851],[42853,42853],[42855,42855],[42857,42857],[42859,42859],[42861,42861],[42863,42863],[42865,42872],[42874,42874],[42876,42876],[42879,42879],[42881,42881],[42883,42883],[42885,42885],[42887,42887],[42892,42892],[42894,42894],[42897,42897],[42899,42901],[42903,42903],[42905,42905],[42907,42907],[42909,42909],[42911,42911],[42913,42913],[42915,42915],[42917,42917],[42919,42919],[42921,42921],[42933,42933],[42935,42935],[43002,43002],[43824,43866],[43872,43877],[43888,43967],[64256,64262],[64275,64279],[65345,65370]],No:[[178,179],[185,185],[188,190],[2548,2553],[2930,2935],[3056,3058],[3192,3198],[3416,3422],[3440,3448],[3882,3891],[4969,4988],[6128,6137],[6618,6618],[8304,8304],[8308,8313],[8320,8329],[8528,8543],[8585,8585],[9312,9371],[9450,9471],[10102,10131],[11517,11517],[12690,12693],[12832,12841],[12872,12879],[12881,12895],[12928,12937],[12977,12991],[43056,43061]],Zs:[[32,32],[160,160],[5760,5760],[8192,8202],[8239,8239],[8287,8287],[12288,12288]]}}});unwrapExports(data_generated);var utils=createCommonjsModule(function(r,e){function t(r){for(var e=r.toString(16);e.length<4;)e="0"+e;return e}e.__esModule=!0,e.normalize_ranges=function(r){return r.sort(function(r,e){return r[0]-e[0]}).reduce(function(r,e,t){if(0===t)return[e];var a=r[r.length-1],o=a[0],i=a[1],n=e[0],s=e[1];return i+1===n?r.slice(0,-1).concat([[o,s]]):r.concat([e])},[])},e.build_regex=function(r,e){var a=r.map(function(r){var e=r[0],a=r[1];return e===a?"\\u"+t(e):"\\u"+t(e)+"-\\u"+t(a)}).join("");return new RegExp("["+a+"]",e)}});unwrapExports(utils);var lib$2=function(r,e){var t=data_generated.get_data(),a=r.reduce(function(r,e){return r.concat(t[e])},[]);return utils.build_regex(utils.normalize_ranges(a),e)};const emojiRegex=emojiRegex$1(),cjkPattern=lib().source,asciiPunctuationCharRange=escapeStringRegexp("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"),punctuationCharRange=`${asciiPunctuationCharRange}${lib$2(["Pc","Pd","Pe","Pf","Pi","Po","Ps"]).source.slice(1,-1)}`,punctuationRegex=new RegExp(`[${punctuationCharRange}]`);function isExportDeclaration(r){if(r)switch(r.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function getParentExportDeclaration(r){const e=r.getParentNode();return"declaration"===r.getName()&&isExportDeclaration(e)?e:null}function getPenultimate(r){return r.length>1?r[r.length-2]:null}function getLast(r){return r.length>0?r[r.length-1]:null}function skip(r){return(e,t,a)=>{const o=a&&a.backwards;if(!1===t)return!1;const i=e.length;let n=t;for(;n>=0&&n"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((r,e)=>{r.forEach(r=>{PRECEDENCE[r]=e})});const equalityOperators={"==":!0,"!=":!0,"===":!0,"!==":!0},multiplicativeOperators={"*":!0,"/":!0,"%":!0},bitshiftOperators={">>":!0,">>>":!0,"<<":!0};function shouldFlatten(r,e){return getPrecedence(e)===getPrecedence(r)&&("**"!==r&&((!equalityOperators[r]||!equalityOperators[e])&&(!("%"===e&&multiplicativeOperators[r]||"%"===r&&multiplicativeOperators[e])&&(!bitshiftOperators[r]||!bitshiftOperators[e]))))}function isBitwiseOperator(r){return!!bitshiftOperators[r]||"|"===r||"^"===r||"&"===r}function startsWithNoLookaheadToken(r,e){switch((r=getLeftMost(r)).type){case"ObjectPattern":return!e;case"FunctionExpression":case"ClassExpression":return e;case"ObjectExpression":return!0;case"MemberExpression":return startsWithNoLookaheadToken(r.object,e);case"TaggedTemplateExpression":return"FunctionExpression"!==r.tag.type&&startsWithNoLookaheadToken(r.tag,e);case"CallExpression":return"FunctionExpression"!==r.callee.type&&startsWithNoLookaheadToken(r.callee,e);case"ConditionalExpression":return startsWithNoLookaheadToken(r.test,e);case"UpdateExpression":return!r.prefix&&startsWithNoLookaheadToken(r.argument,e);case"BindExpression":return r.object&&startsWithNoLookaheadToken(r.object,e);case"SequenceExpression":return startsWithNoLookaheadToken(r.expressions[0],e);case"TSAsExpression":return startsWithNoLookaheadToken(r.expression,e);default:return!1}}function getLeftMost(r){return r.left?getLeftMost(r.left):r}function hasBlockComments(r){return r.comments&&r.comments.some(isBlockComment)}function isBlockComment(r){return"Block"===r.type||"CommentBlock"===r.type}function hasClosureCompilerTypeCastComment(r,e,t){return e.comments&&e.comments.some(e=>e.leading&&isBlockComment(e)&&e.value.match(/^\*\s*@type\s*{[^}]+}\s*$/)&&"("===getNextNonSpaceNonCommentCharacter(r,e,t))}function getAlignmentSize(r,e,t){let a=0;for(let o=t=t||0;o(a.match(s.regex)||[]).length}else l=!0;const c="json"===e.parser?o.quote:u?s.quote:n.quote;return t?l?c+a+c:r:makeString(a,c,!("css"===e.parser||"less"===e.parser||"scss"===e.parser))}function makeString(r,e,t){const a='"'===e?"'":'"',o=r.replace(/\\([\s\S])|(['"])/g,(r,o,i)=>o===a?o:i===e?"\\"+i:i||(t&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(o)?o:"\\"+o));return e+o+e}function printNumber(r){return r.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}function getMaxContinuousCount(r,e){const t=r.match(new RegExp(`(${escapeStringRegexp(e)})+`,"g"));return null===t?0:t.reduce((r,t)=>Math.max(r,t.length/e.length),0)}function splitText$1(r){const e="non-cjk",t="cjk-character",a="cjk-punctuation",o=[];return r.replace(new RegExp(`(${cjkPattern})\n(${cjkPattern})`,"g"),"$1$2").split(/([ \t\n]+)/).forEach((r,n,s)=>{n%2!=1?(0!==n&&n!==s.length-1||""!==r)&&r.split(new RegExp(`(${cjkPattern})`)).forEach((r,o,n)=>{(0!==o&&o!==n.length-1||""!==r)&&(o%2!=0?i(punctuationRegex.test(r)?{type:"word",value:r,kind:a,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:r,kind:t,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1}):""!==r&&i({type:"word",value:r,kind:e,hasLeadingPunctuation:punctuationRegex.test(r[0]),hasTrailingPunctuation:punctuationRegex.test(getLast(r))}))}):o.push({type:"whitespace",value:/\n/.test(r)?"\n":" "})}),o;function i(r){const i=getLast(o);var n,s;i&&"word"===i.type&&(i.kind===e&&r.kind===t&&!i.hasTrailingPunctuation||i.kind===t&&r.kind===e&&!r.hasLeadingPunctuation?o.push({type:"whitespace",value:" "}):(n=e,s=a,i.kind===n&&r.kind===s||i.kind===s&&r.kind===n||[i.value,r.value].some(r=>/\u3000/.test(r))||o.push({type:"whitespace",value:""}))),o.push(r)}}function getStringWidth(r){return r?stringWidth(r.replace(emojiRegex," ")):0}function hasIgnoreComment(r){return hasNodeIgnoreComment(r.getValue())}function hasNodeIgnoreComment(r){return r&&r.comments&&r.comments.length>0&&r.comments.some(r=>"prettier-ignore"===r.value.trim())}function arrayify(r,e){return Object.keys(r).reduce((t,a)=>t.concat(Object.assign({[e]:a},r[a])),[])}function addCommentHelper(r,e){(r.comments||(r.comments=[])).push(e),e.printed=!1,"JSXText"===r.type&&(e.printed=!0)}function addLeadingComment(r,e){e.leading=!0,e.trailing=!1,addCommentHelper(r,e)}function addDanglingComment(r,e){e.leading=!1,e.trailing=!1,addCommentHelper(r,e)}function addTrailingComment(r,e){e.leading=!1,e.trailing=!0,addCommentHelper(r,e)}var util$1={arrayify:arrayify,punctuationRegex:punctuationRegex,punctuationCharRange:punctuationCharRange,getStringWidth:getStringWidth,splitText:splitText$1,getMaxContinuousCount:getMaxContinuousCount,getPrecedence:getPrecedence,shouldFlatten:shouldFlatten,isBitwiseOperator:isBitwiseOperator,isExportDeclaration:isExportDeclaration,getParentExportDeclaration:getParentExportDeclaration,getPenultimate:getPenultimate,getLast:getLast,getNextNonSpaceNonCommentCharacterIndex:getNextNonSpaceNonCommentCharacterIndex,getNextNonSpaceNonCommentCharacter:getNextNonSpaceNonCommentCharacter,skipWhitespace:skipWhitespace,skipSpaces:skipSpaces,skipNewline:skipNewline,isNextLineEmptyAfterIndex:isNextLineEmptyAfterIndex,isNextLineEmpty:isNextLineEmpty,isPreviousLineEmpty:isPreviousLineEmpty,hasNewline:hasNewline,hasNewlineInRange:hasNewlineInRange,hasSpaces:hasSpaces,setLocStart:setLocStart,setLocEnd:setLocEnd,startsWithNoLookaheadToken:startsWithNoLookaheadToken,hasBlockComments:hasBlockComments,isBlockComment:isBlockComment,hasClosureCompilerTypeCastComment:hasClosureCompilerTypeCastComment,getAlignmentSize:getAlignmentSize,getIndentSize:getIndentSize,printString:printString,printNumber:printNumber,hasIgnoreComment:hasIgnoreComment,hasNodeIgnoreComment:hasNodeIgnoreComment,lineColumnToIndex:lineColumnToIndex,makeString:makeString,addLeadingComment:addLeadingComment,addDanglingComment:addDanglingComment,addTrailingComment:addTrailingComment};function parse(r){const e=unified_1().use(remarkParse,{footnotes:!0,commonmark:!0}).use(remarkFrontmatter,["yaml","toml"]).use(restoreUnescapedCharacter(r)).use(mergeContinuousTexts).use(transformInlineCode).use(splitText);return e.runSync(e.parse(r))}function map(r,e){return function r(t,a,o){const i=Object.assign({},e(t,a,o));return i.children&&(i.children=i.children.map((e,t)=>r(e,t,i))),i}(r,null,null)}function transformInlineCode(){return r=>map(r,r=>"inlineCode"!==r.type?r:Object.assign({},r,{value:r.value.replace(/\s+/g," ")}))}function restoreUnescapedCharacter(r){return()=>e=>map(e,e=>"text"!==e.type?e:Object.assign({},e,{value:"*"!==e.value&&"_"!==e.value&&1===e.value.length&&e.position.end.offset-e.position.start.offset>1?r.slice(e.position.start.offset,e.position.end.offset):e.value}))}function mergeContinuousTexts(){return r=>map(r,r=>{if(!r.children)return r;const e=r.children.reduce((r,e)=>{const t=r[r.length-1];return t&&"text"===t.type&&"text"===e.type?r.splice(-1,1,{type:"text",value:t.value+e.value,position:{start:t.position.start,end:e.position.end}}):r.push(e),r},[]);return Object.assign({},r,{children:e})})}function splitText(){return r=>map(r,(r,e,t)=>{if("text"!==r.type)return r;let a=r.value;return"paragraph"===t.type&&(0===e&&(a=a.trimLeft()),e===t.children.length-1&&(a=a.trimRight())),{type:"sentence",position:r.position,children:util$1.splitText(a)}})}var parserMarkdown=parse;module.exports=parserMarkdown; diff --git a/Colorui-UniApp/node_modules/prettier/parser-parse5.js b/Colorui-UniApp/node_modules/prettier/parser-parse5.js new file mode 100644 index 0000000..fa3f3c0 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/parser-parse5.js @@ -0,0 +1 @@ +"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var require$$1=_interopDefault(require("util")),require$$0=_interopDefault(require("stream"));function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var REPLACEMENT_CHARACTER="�",CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],CDATA_END_STRING:[93,93,62],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},unicode={REPLACEMENT_CHARACTER:REPLACEMENT_CHARACTER,CODE_POINTS:CODE_POINTS,CODE_POINT_SEQUENCES:CODE_POINT_SEQUENCES},preprocessor=createCommonjsModule(function(e){var t=unicode.CODE_POINTS;var n=e.exports=function(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536};n.prototype.dropParsedChunk=function(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])},n.prototype._addGap=function(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos},n.prototype._processHighRangeCodePoint=function(e){if(this.pos!==this.lastCharPos){var n=this.html.charCodeAt(this.pos+1);i=n,(r=e)>=55296&&r<=56319&&i>=56320&&i<=57343&&(this.pos++,e=function(e,t){return 1024*(e-55296)+9216+t}(e,n),this._addGap())}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,t.EOF;var r,i;return e},n.prototype.write=function(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t},n.prototype.insertHtmlAtCurrentPos=function(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1},n.prototype.advance=function(){if(this.pos++,this.pos>this.lastCharPos)return this.lastChunkWritten||(this.endOfChunkHit=!0),t.EOF;var e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===t.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===t.CARRIAGE_RETURN?(this.skipNextNewLine=!0,t.LINE_FEED):(this.skipNextNewLine=!1,e>=55296?this._processHighRangeCodePoint(e):e)},n.prototype.retreat=function(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}),named_entity_data=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]),tokenizer=createCommonjsModule(function(e){var t=unicode.CODE_POINTS,n=unicode.CODE_POINT_SEQUENCES,r={0:65533,13:13,128:8364,129:129,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,141:141,142:381,143:143,144:144,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,157:157,158:382,159:376},i="DATA_STATE";function o(e){return e===t.SPACE||e===t.LINE_FEED||e===t.TABULATION||e===t.FORM_FEED}function s(e){return e>=t.DIGIT_0&&e<=t.DIGIT_9}function a(e){return e>=t.LATIN_CAPITAL_A&&e<=t.LATIN_CAPITAL_Z}function T(e){return e>=t.LATIN_SMALL_A&&e<=t.LATIN_SMALL_Z}function E(e){return T(e)||a(e)}function _(e,n){return s(e)||n&&(e>=t.LATIN_CAPITAL_A&&e<=t.LATIN_CAPITAL_F||e>=t.LATIN_SMALL_A&&e<=t.LATIN_SMALL_F)}function c(e){return e+32}function p(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function h(e){return String.fromCharCode(c(e))}function A(e,t){for(var n=named_entity_data[++e],r=++e,i=r+n-1;r<=i;){var o=r+i>>>1,s=named_entity_data[o];if(st))return named_entity_data[o+n];i=o-1}}return-1}var l=e.exports=function(){this.preprocessor=new preprocessor,this.tokenQueue=[],this.allowCDATA=!1,this.state=i,this.returnState="",this.tempBuff=[],this.additionalAllowedCp=void 0,this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null};l.CHARACTER_TOKEN="CHARACTER_TOKEN",l.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",l.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",l.START_TAG_TOKEN="START_TAG_TOKEN",l.END_TAG_TOKEN="END_TAG_TOKEN",l.COMMENT_TOKEN="COMMENT_TOKEN",l.DOCTYPE_TOKEN="DOCTYPE_TOKEN",l.EOF_TOKEN="EOF_TOKEN",l.HIBERNATION_TOKEN="HIBERNATION_TOKEN",l.MODE={DATA:i,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},l.getTokenAttr=function(e,t){for(var n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},l.prototype.getNextToken=function(){for(;!this.tokenQueue.length&&this.active;){this._hibernationSnapshot();var e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()},l.prototype.write=function(e,t){this.active=!0,this.preprocessor.write(e,t)},l.prototype.insertHtmlAtCurrentPos=function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)},l.prototype._hibernationSnapshot=function(){this.consumedAfterSnapshot=0},l.prototype._ensureHibernation=function(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:l.HIBERNATION_TOKEN}),!0}return!1},l.prototype._consume=function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()},l.prototype._unconsume=function(){this.consumedAfterSnapshot--,this.preprocessor.retreat()},l.prototype._unconsumeSeveral=function(e){for(;e--;)this._unconsume()},l.prototype._reconsumeInState=function(e){this.state=e,this._unconsume()},l.prototype._consumeSubsequentIfMatch=function(e,n,r){for(var i=0,o=!0,s=e.length,a=0,T=n,E=void 0;a0&&(T=this._consume(),i++),T===t.EOF){o=!1;break}if(T!==(E=e[a])&&(r||T!==c(E))){o=!1;break}}return o||this._unconsumeSeveral(i),o},l.prototype._lookahead=function(){var e=this._consume();return this._unconsume(),e},l.prototype.isTempBufferEqualToScriptString=function(){if(this.tempBuff.length!==n.SCRIPT_STRING.length)return!1;for(var e=0;e=55296&&o<=57343||o>1114111?t.REPLACEMENT_CHARACTER:s)},l.prototype._consumeNamedEntity=function(e){for(var n=null,r=0,i=null,o=0,a=!1,T=0;T>-1;){var _=named_entity_data[T],c=_<7;if(c&&1&_&&(n=2&_?[named_entity_data[++T],named_entity_data[++T]]:[named_entity_data[++T]],r=o,i===t.SEMICOLON)){a=!0;break}if(o++,(i=this._consume())===t.EOF)break;T=c?4&_?A(T,i):-1:i===_?++T:-1}if(n){if(!a&&(this._unconsumeSeveral(o-r),e)){var p=this._lookahead();if(p===t.EQUALS_SIGN||function(e){return E(e)||s(e)}(p))return this._unconsumeSeveral(r),null}return n}return this._unconsumeSeveral(o),null},l.prototype._consumeCharacterReference=function(e,n){if(o(e)||e===t.GREATER_THAN_SIGN||e===t.AMPERSAND||e===this.additionalAllowedCp||e===t.EOF)return this._unconsume(),null;if(e===t.NUMBER_SIGN){var r=!1,i=this._lookahead();return i!==t.LATIN_SMALL_X&&i!==t.LATIN_CAPITAL_X||(this._consume(),r=!0),(i=this._lookahead())!==t.EOF&&_(i,r)?[this._consumeNumericEntity(r)]:(this._unconsumeSeveral(r?2:1),null)}return this._unconsume(),this._consumeNamedEntity(n)};var u=l.prototype;u.DATA_STATE=function(e){this.preprocessor.dropParsedChunk(),e===t.AMPERSAND?this.state="CHARACTER_REFERENCE_IN_DATA_STATE":e===t.LESS_THAN_SIGN?this.state="TAG_OPEN_STATE":e===t.NULL?this._emitCodePoint(e):e===t.EOF?this._emitEOFToken():this._emitCodePoint(e)},u.CHARACTER_REFERENCE_IN_DATA_STATE=function(e){this.additionalAllowedCp=void 0;var t=this._consumeCharacterReference(e,!1);this._ensureHibernation()||(t?this._emitSeveralCodePoints(t):this._emitChar("&"),this.state=i)},u.RCDATA_STATE=function(e){this.preprocessor.dropParsedChunk(),e===t.AMPERSAND?this.state="CHARACTER_REFERENCE_IN_RCDATA_STATE":e===t.LESS_THAN_SIGN?this.state="RCDATA_LESS_THAN_SIGN_STATE":e===t.NULL?this._emitChar(unicode.REPLACEMENT_CHARACTER):e===t.EOF?this._emitEOFToken():this._emitCodePoint(e)},u.CHARACTER_REFERENCE_IN_RCDATA_STATE=function(e){this.additionalAllowedCp=void 0;var t=this._consumeCharacterReference(e,!1);this._ensureHibernation()||(t?this._emitSeveralCodePoints(t):this._emitChar("&"),this.state="RCDATA_STATE")},u.RAWTEXT_STATE=function(e){this.preprocessor.dropParsedChunk(),e===t.LESS_THAN_SIGN?this.state="RAWTEXT_LESS_THAN_SIGN_STATE":e===t.NULL?this._emitChar(unicode.REPLACEMENT_CHARACTER):e===t.EOF?this._emitEOFToken():this._emitCodePoint(e)},u.SCRIPT_DATA_STATE=function(e){this.preprocessor.dropParsedChunk(),e===t.LESS_THAN_SIGN?this.state="SCRIPT_DATA_LESS_THAN_SIGN_STATE":e===t.NULL?this._emitChar(unicode.REPLACEMENT_CHARACTER):e===t.EOF?this._emitEOFToken():this._emitCodePoint(e)},u.PLAINTEXT_STATE=function(e){this.preprocessor.dropParsedChunk(),e===t.NULL?this._emitChar(unicode.REPLACEMENT_CHARACTER):e===t.EOF?this._emitEOFToken():this._emitCodePoint(e)},u.TAG_OPEN_STATE=function(e){e===t.EXCLAMATION_MARK?this.state="MARKUP_DECLARATION_OPEN_STATE":e===t.SOLIDUS?this.state="END_TAG_OPEN_STATE":E(e)?(this._createStartTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===t.QUESTION_MARK?this._reconsumeInState("BOGUS_COMMENT_STATE"):(this._emitChar("<"),this._reconsumeInState(i))},u.END_TAG_OPEN_STATE=function(e){E(e)?(this._createEndTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===t.GREATER_THAN_SIGN?this.state=i:e===t.EOF?(this._reconsumeInState(i),this._emitChar("<"),this._emitChar("/")):this._reconsumeInState("BOGUS_COMMENT_STATE")},u.TAG_NAME_STATE=function(e){o(e)?this.state="BEFORE_ATTRIBUTE_NAME_STATE":e===t.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===t.GREATER_THAN_SIGN?(this.state=i,this._emitCurrentToken()):a(e)?this.currentToken.tagName+=h(e):e===t.NULL?this.currentToken.tagName+=unicode.REPLACEMENT_CHARACTER:e===t.EOF?this._reconsumeInState(i):this.currentToken.tagName+=p(e)},u.RCDATA_LESS_THAN_SIGN_STATE=function(e){e===t.SOLIDUS?(this.tempBuff=[],this.state="RCDATA_END_TAG_OPEN_STATE"):(this._emitChar("<"),this._reconsumeInState("RCDATA_STATE"))},u.RCDATA_END_TAG_OPEN_STATE=function(e){E(e)?(this._createEndTagToken(),this._reconsumeInState("RCDATA_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("RCDATA_STATE"))},u.RCDATA_END_TAG_NAME_STATE=function(e){if(a(e))this.currentToken.tagName+=h(e),this.tempBuff.push(e);else if(T(e))this.currentToken.tagName+=p(e),this.tempBuff.push(e);else{if(this._isAppropriateEndTagToken()){if(o(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===t.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===t.GREATER_THAN_SIGN)return this.state=i,void this._emitCurrentToken()}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RCDATA_STATE")}},u.RAWTEXT_LESS_THAN_SIGN_STATE=function(e){e===t.SOLIDUS?(this.tempBuff=[],this.state="RAWTEXT_END_TAG_OPEN_STATE"):(this._emitChar("<"),this._reconsumeInState("RAWTEXT_STATE"))},u.RAWTEXT_END_TAG_OPEN_STATE=function(e){E(e)?(this._createEndTagToken(),this._reconsumeInState("RAWTEXT_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("RAWTEXT_STATE"))},u.RAWTEXT_END_TAG_NAME_STATE=function(e){if(a(e))this.currentToken.tagName+=h(e),this.tempBuff.push(e);else if(T(e))this.currentToken.tagName+=p(e),this.tempBuff.push(e);else{if(this._isAppropriateEndTagToken()){if(o(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===t.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===t.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=i)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RAWTEXT_STATE")}},u.SCRIPT_DATA_LESS_THAN_SIGN_STATE=function(e){e===t.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_END_TAG_OPEN_STATE"):e===t.EXCLAMATION_MARK?(this.state="SCRIPT_DATA_ESCAPE_START_STATE",this._emitChar("<"),this._emitChar("!")):(this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_STATE"))},u.SCRIPT_DATA_END_TAG_OPEN_STATE=function(e){E(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("SCRIPT_DATA_STATE"))},u.SCRIPT_DATA_END_TAG_NAME_STATE=function(e){if(a(e))this.currentToken.tagName+=h(e),this.tempBuff.push(e);else if(T(e))this.currentToken.tagName+=p(e),this.tempBuff.push(e);else{if(this._isAppropriateEndTagToken()){if(o(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===t.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===t.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=i)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_STATE")}},u.SCRIPT_DATA_ESCAPE_START_STATE=function(e){e===t.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPE_START_DASH_STATE",this._emitChar("-")):this._reconsumeInState("SCRIPT_DATA_STATE")},u.SCRIPT_DATA_ESCAPE_START_DASH_STATE=function(e){e===t.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):this._reconsumeInState("SCRIPT_DATA_STATE")},u.SCRIPT_DATA_ESCAPED_STATE=function(e){e===t.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_STATE",this._emitChar("-")):e===t.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===t.NULL?this._emitChar(unicode.REPLACEMENT_CHARACTER):e===t.EOF?this._reconsumeInState(i):this._emitCodePoint(e)},u.SCRIPT_DATA_ESCAPED_DASH_STATE=function(e){e===t.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):e===t.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===t.NULL?(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChar(unicode.REPLACEMENT_CHARACTER)):e===t.EOF?this._reconsumeInState(i):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))},u.SCRIPT_DATA_ESCAPED_DASH_DASH_STATE=function(e){e===t.HYPHEN_MINUS?this._emitChar("-"):e===t.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===t.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChar(">")):e===t.NULL?(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChar(unicode.REPLACEMENT_CHARACTER)):e===t.EOF?this._reconsumeInState(i):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))},u.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE=function(e){e===t.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):E(e)?(this.tempBuff=[],this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))},u.SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE=function(e){E(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))},u.SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE=function(e){if(a(e))this.currentToken.tagName+=h(e),this.tempBuff.push(e);else if(T(e))this.currentToken.tagName+=p(e),this.tempBuff.push(e);else{if(this._isAppropriateEndTagToken()){if(o(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===t.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===t.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=i)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")}},u.SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE=function(e){o(e)||e===t.SOLIDUS||e===t.GREATER_THAN_SIGN?(this.state=this.isTempBufferEqualToScriptString()?"SCRIPT_DATA_DOUBLE_ESCAPED_STATE":"SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e)):a(e)?(this.tempBuff.push(c(e)),this._emitCodePoint(e)):T(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")},u.SCRIPT_DATA_DOUBLE_ESCAPED_STATE=function(e){e===t.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",this._emitChar("-")):e===t.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):e===t.NULL?this._emitChar(unicode.REPLACEMENT_CHARACTER):e===t.EOF?this._reconsumeInState(i):this._emitCodePoint(e)},u.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE=function(e){e===t.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):e===t.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):e===t.NULL?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChar(unicode.REPLACEMENT_CHARACTER)):e===t.EOF?this._reconsumeInState(i):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))},u.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE=function(e){e===t.HYPHEN_MINUS?this._emitChar("-"):e===t.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):e===t.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChar(">")):e===t.NULL?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChar(unicode.REPLACEMENT_CHARACTER)):e===t.EOF?this._reconsumeInState(i):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))},u.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE=function(e){e===t.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChar("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")},u.SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE=function(e){o(e)||e===t.SOLIDUS||e===t.GREATER_THAN_SIGN?(this.state=this.isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):a(e)?(this.tempBuff.push(c(e)),this._emitCodePoint(e)):T(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")},u.BEFORE_ATTRIBUTE_NAME_STATE=function(e){o(e)||(e===t.SOLIDUS||e===t.GREATER_THAN_SIGN||e===t.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===t.EQUALS_SIGN?(this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))},u.ATTRIBUTE_NAME_STATE=function(e){o(e)||e===t.SOLIDUS||e===t.GREATER_THAN_SIGN||e===t.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===t.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):a(e)?this.currentAttr.name+=h(e):e===t.QUOTATION_MARK||e===t.APOSTROPHE||e===t.LESS_THAN_SIGN?this.currentAttr.name+=p(e):e===t.NULL?this.currentAttr.name+=unicode.REPLACEMENT_CHARACTER:this.currentAttr.name+=p(e)},u.AFTER_ATTRIBUTE_NAME_STATE=function(e){o(e)||(e===t.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===t.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===t.GREATER_THAN_SIGN?(this.state=i,this._emitCurrentToken()):e===t.EOF?this._reconsumeInState(i):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))},u.BEFORE_ATTRIBUTE_VALUE_STATE=function(e){o(e)||(e===t.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===t.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))},u.ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE=function(e){e===t.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===t.AMPERSAND?(this.additionalAllowedCp=t.QUOTATION_MARK,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):e===t.NULL?this.currentAttr.value+=unicode.REPLACEMENT_CHARACTER:e===t.EOF?this._reconsumeInState(i):this.currentAttr.value+=p(e)},u.ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE=function(e){e===t.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===t.AMPERSAND?(this.additionalAllowedCp=t.APOSTROPHE,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):e===t.NULL?this.currentAttr.value+=unicode.REPLACEMENT_CHARACTER:e===t.EOF?this._reconsumeInState(i):this.currentAttr.value+=p(e)},u.ATTRIBUTE_VALUE_UNQUOTED_STATE=function(e){o(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===t.AMPERSAND?(this.additionalAllowedCp=t.GREATER_THAN_SIGN,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):e===t.GREATER_THAN_SIGN?(this._leaveAttrValue(i),this._emitCurrentToken()):e===t.NULL?this.currentAttr.value+=unicode.REPLACEMENT_CHARACTER:e===t.QUOTATION_MARK||e===t.APOSTROPHE||e===t.LESS_THAN_SIGN||e===t.EQUALS_SIGN||e===t.GRAVE_ACCENT?this.currentAttr.value+=p(e):e===t.EOF?this._reconsumeInState(i):this.currentAttr.value+=p(e)},u.CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE=function(e){var t=this._consumeCharacterReference(e,!0);if(!this._ensureHibernation()){if(t)for(var n=0;n=0;n--)if(this.items[n]===e){t=n;break}return t},o.prototype._isInTemplate=function(){return this.currentTagName===t.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===n.HTML},o.prototype._updateCurrentElement=function(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null},o.prototype.push=function(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++},o.prototype.pop=function(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()},o.prototype.replace=function(e,t){var n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()},o.prototype.insertAfter=function(e,t){var n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()},o.prototype.popUntilTagNamePopped=function(e){for(;this.stackTop>-1;){var t=this.currentTagName,r=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&r===n.HTML)break}},o.prototype.popUntilElementPopped=function(e){for(;this.stackTop>-1;){var t=this.current;if(this.pop(),t===e)break}},o.prototype.popUntilNumberedHeaderPopped=function(){for(;this.stackTop>-1;){var e=this.currentTagName,r=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===t.H1||e===t.H2||e===t.H3||e===t.H4||e===t.H5||e===t.H6&&r===n.HTML)break}},o.prototype.popUntilTableCellPopped=function(){for(;this.stackTop>-1;){var e=this.currentTagName,r=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===t.TD||e===t.TH&&r===n.HTML)break}},o.prototype.popAllUpToHtmlElement=function(){this.stackTop=0,this._updateCurrentElement()},o.prototype.clearBackToTableContext=function(){for(;this.currentTagName!==t.TABLE&&this.currentTagName!==t.TEMPLATE&&this.currentTagName!==t.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()},o.prototype.clearBackToTableBodyContext=function(){for(;this.currentTagName!==t.TBODY&&this.currentTagName!==t.TFOOT&&this.currentTagName!==t.THEAD&&this.currentTagName!==t.TEMPLATE&&this.currentTagName!==t.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()},o.prototype.clearBackToTableRowContext=function(){for(;this.currentTagName!==t.TR&&this.currentTagName!==t.TEMPLATE&&this.currentTagName!==t.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()},o.prototype.remove=function(e){for(var t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}},o.prototype.tryPeekProperlyNestedBodyElement=function(){var e=this.items[1];return e&&this.treeAdapter.getTagName(e)===t.BODY?e:null},o.prototype.contains=function(e){return this._indexOf(e)>-1},o.prototype.getCommonAncestor=function(e){var t=this._indexOf(e);return--t>=0?this.items[t]:null},o.prototype.isRootHtmlElementCurrent=function(){return 0===this.stackTop&&this.currentTagName===t.HTML},o.prototype.hasInScope=function(e){for(var t=this.stackTop;t>=0;t--){var r=this.treeAdapter.getTagName(this.items[t]),o=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&o===n.HTML)return!0;if(i(r,o))return!1}return!0},o.prototype.hasNumberedHeaderInScope=function(){for(var e=this.stackTop;e>=0;e--){var r=this.treeAdapter.getTagName(this.items[e]),o=this.treeAdapter.getNamespaceURI(this.items[e]);if((r===t.H1||r===t.H2||r===t.H3||r===t.H4||r===t.H5||r===t.H6)&&o===n.HTML)return!0;if(i(r,o))return!1}return!0},o.prototype.hasInListItemScope=function(e){for(var r=this.stackTop;r>=0;r--){var o=this.treeAdapter.getTagName(this.items[r]),s=this.treeAdapter.getNamespaceURI(this.items[r]);if(o===e&&s===n.HTML)return!0;if((o===t.UL||o===t.OL)&&s===n.HTML||i(o,s))return!1}return!0},o.prototype.hasInButtonScope=function(e){for(var r=this.stackTop;r>=0;r--){var o=this.treeAdapter.getTagName(this.items[r]),s=this.treeAdapter.getNamespaceURI(this.items[r]);if(o===e&&s===n.HTML)return!0;if(o===t.BUTTON&&s===n.HTML||i(o,s))return!1}return!0},o.prototype.hasInTableScope=function(e){for(var r=this.stackTop;r>=0;r--){var i=this.treeAdapter.getTagName(this.items[r]);if(this.treeAdapter.getNamespaceURI(this.items[r])===n.HTML){if(i===e)return!0;if(i===t.TABLE||i===t.TEMPLATE||i===t.HTML)return!1}}return!0},o.prototype.hasTableBodyContextInTableScope=function(){for(var e=this.stackTop;e>=0;e--){var r=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===n.HTML){if(r===t.TBODY||r===t.THEAD||r===t.TFOOT)return!0;if(r===t.TABLE||r===t.HTML)return!1}}return!0},o.prototype.hasInSelectScope=function(e){for(var r=this.stackTop;r>=0;r--){var i=this.treeAdapter.getTagName(this.items[r]);if(this.treeAdapter.getNamespaceURI(this.items[r])===n.HTML){if(i===e)return!0;if(i!==t.OPTION&&i!==t.OPTGROUP)return!1}}return!0},o.prototype.generateImpliedEndTags=function(){for(;r(this.currentTagName);)this.pop()},o.prototype.generateImpliedEndTagsWithExclusion=function(e){for(;r(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}),formatting_element_list=createCommonjsModule(function(e){var t=e.exports=function(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null};t.MARKER_ENTRY="MARKER_ENTRY",t.ELEMENT_ENTRY="ELEMENT_ENTRY",t.prototype._getNoahArkConditionCandidates=function(e){var n=[];if(this.length>=3)for(var r=this.treeAdapter.getAttrList(e).length,i=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e),s=this.length-1;s>=0;s--){var a=this.entries[s];if(a.type===t.MARKER_ENTRY)break;var T=a.element,E=this.treeAdapter.getAttrList(T);this.treeAdapter.getTagName(T)===i&&this.treeAdapter.getNamespaceURI(T)===o&&E.length===r&&n.push({idx:s,attrs:E})}return n.length<3?[]:n},t.prototype._ensureNoahArkCondition=function(e){var t=this._getNoahArkConditionCandidates(e),n=t.length;if(n){for(var r=this.treeAdapter.getAttrList(e),i=r.length,o=Object.create(null),s=0;s=2;s--)this.entries.splice(t[s].idx,1),this.length--}},t.prototype.insertMarker=function(){this.entries.push({type:t.MARKER_ENTRY}),this.length++},t.prototype.pushElement=function(e,n){this._ensureNoahArkCondition(e),this.entries.push({type:t.ELEMENT_ENTRY,element:e,token:n}),this.length++},t.prototype.insertElementAfterBookmark=function(e,n){for(var r=this.length-1;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:t.ELEMENT_ENTRY,element:e,token:n}),this.length++},t.prototype.removeEntry=function(e){for(var t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}},t.prototype.clearToLastMarker=function(){for(;this.length;){var e=this.entries.pop();if(this.length--,e.type===t.MARKER_ENTRY)break}},t.prototype.getElementEntryInScopeWithTagName=function(e){for(var n=this.length-1;n>=0;n--){var r=this.entries[n];if(r.type===t.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===e)return r}return null},t.prototype.getElementEntry=function(e){for(var n=this.length-1;n>=0;n--){var r=this.entries[n];if(r.type===t.ELEMENT_ENTRY&&r.element===e)return r}return null}}),mixin=createCommonjsModule(function(e){(e.exports=function(e){var t={},n=this._getOverriddenMethods(this,t);Object.keys(n).forEach(function(r){"function"==typeof n[r]&&(t[r]=e[r],e[r]=n[r])})}).prototype._getOverriddenMethods=function(){throw new Error("Not implemented")}}),preprocessor_mixin=createCommonjsModule(function(e){var t=require$$1.inherits,n=unicode.CODE_POINTS,r=e.exports=function(e){return e.__locTracker||(e.__locTracker=this,mixin.call(this,e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.col=-1,this.line=1),e.__locTracker};t(r,mixin),Object.defineProperty(r.prototype,"offset",{get:function(){return this.droppedBufferSize+this.preprocessor.pos}}),r.prototype._getOverriddenMethods=function(e,t){return{advance:function(){var r=t.advance.call(this);return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=e.offset),r===n.LINE_FEED&&(e.isEol=!0),e.col=e.offset-e.lineStartPos+1,r},retreat:function(){t.retreat.call(this),e.isEol=!1,e.col=e.offset-e.lineStartPos+1},dropParsedChunk:function(){var n=this.pos;t.dropParsedChunk.call(this),e.droppedBufferSize+=n-this.pos}}}}),tokenizer_mixin=createCommonjsModule(function(e){var t=require$$1.inherits,n=e.exports=function(e){mixin.call(this,e),this.tokenizer=e,this.posTracker=new preprocessor_mixin(e.preprocessor),this.currentAttrLocation=null,this.currentTokenLocation=null};t(n,mixin),n.prototype._getCurrentLocation=function(){return{line:this.posTracker.line,col:this.posTracker.col,startOffset:this.posTracker.offset,endOffset:-1}},n.prototype._attachCurrentAttrLocationInfo=function(){this.currentAttrLocation.endOffset=this.posTracker.offset;var e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation},n.prototype._getOverriddenMethods=function(e,t){var n={_createStartTagToken:function(){t._createStartTagToken.call(this),this.currentToken.location=e.currentTokenLocation},_createEndTagToken:function(){t._createEndTagToken.call(this),this.currentToken.location=e.currentTokenLocation},_createCommentToken:function(){t._createCommentToken.call(this),this.currentToken.location=e.currentTokenLocation},_createDoctypeToken:function(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.currentTokenLocation},_createCharacterToken:function(n,r){t._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=e.currentTokenLocation},_createAttr:function(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName:function(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo()},_leaveAttrValue:function(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo()},_emitCurrentToken:function(){this.currentCharacterToken&&(this.currentCharacterToken.location.endOffset=this.currentToken.location.startOffset),this.currentToken.location.endOffset=e.posTracker.offset+1,t._emitCurrentToken.call(this)},_emitCurrentCharacterToken:function(){this.currentCharacterToken&&-1===this.currentCharacterToken.location.endOffset&&(this.currentCharacterToken.location.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(tokenizer.MODE).forEach(function(r){var i=tokenizer.MODE[r];n[i]=function(n){e.currentTokenLocation=e._getCurrentLocation(),t[i].call(this,n)}}),n}}),open_element_stack_mixin=createCommonjsModule(function(e){var t=require$$1.inherits,n=e.exports=function(e,t){mixin.call(this,e),this.onItemPop=t.onItemPop};t(n,mixin),n.prototype._getOverriddenMethods=function(e,t){return{pop:function(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement:function(){for(var n=this.stackTop;n>0;n--)e.onItemPop(this.items[n]);t.popAllUpToHtmlElement.call(this)},remove:function(n){e.onItemPop(this.current),t.remove.call(this,n)}}}}),parser_mixin=createCommonjsModule(function(e){var t=require$$1.inherits,n=html.TAG_NAMES,r=e.exports=function(e){mixin.call(this,e),this.parser=e,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null};t(r,mixin),r.prototype._setStartLocation=function(e){this.lastStartTagToken?(e.__location=Object.create(this.lastStartTagToken.location),e.__location.startTag=this.lastStartTagToken.location):e.__location=null},r.prototype._setEndLocation=function(e,t){var n=e.__location;if(n)if(t.location){var r=t.location,i=this.parser.treeAdapter.getTagName(e);t.type===tokenizer.END_TAG_TOKEN&&i===t.tagName?(n.endTag=Object.create(r),n.endOffset=r.endOffset):n.endOffset=r.startOffset}else t.type===tokenizer.EOF_TOKEN&&(n.endOffset=this.posTracker.offset)},r.prototype._getOverriddenMethods=function(e,t){return{_bootstrap:function(n,r){t._bootstrap.call(this,n,r),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null,e.posTracker=new preprocessor_mixin(this.tokenizer.preprocessor),new tokenizer_mixin(this.tokenizer),new open_element_stack_mixin(this.openElements,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop:function(n){t._runParsingLoop.call(this,n);for(var r=this.openElements.stackTop;r>=0;r--)e._setEndLocation(this.openElements.items[r],e.currentToken)},_processTokenInForeignContent:function(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken:function(r){if(e.currentToken=r,t._processToken.call(this,r),r.type===tokenizer.END_TAG_TOKEN&&(r.tagName===n.HTML||r.tagName===n.BODY&&this.openElements.hasInScope(n.BODY)))for(var i=this.openElements.stackTop;i>=0;i--){var o=this.openElements.items[i];if(this.treeAdapter.getTagName(o)===r.tagName){e._setEndLocation(o,r);break}}},_setDocumentType:function(e){t._setDocumentType.call(this,e);for(var n=this.treeAdapter.getChildNodes(this.document),r=n.length,i=0;i-1)return DOCUMENT_MODE.QUIRKS;var r=null===n?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES:QUIRKS_MODE_PUBLIC_ID_PREFIXES;if(hasPrefix(t,r))return DOCUMENT_MODE.QUIRKS;if(hasPrefix(t,r=null===n?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES))return DOCUMENT_MODE.LIMITED_QUIRKS}return DOCUMENT_MODE.NO_QUIRKS},serializeContent=function(e,t,n){var r="!DOCTYPE ";return e&&(r+=e),null!==t?r+=" PUBLIC "+enquoteDoctypeId(t):null!==n&&(r+=" SYSTEM"),null!==n&&(r+=" "+enquoteDoctypeId(n)),r},doctype={getDocumentMode:getDocumentMode,serializeContent:serializeContent},foreign_content=createCommonjsModule(function(e,t){var n=html.TAG_NAMES,r=html.NAMESPACES,i=html.ATTRS,o={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},s={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},a={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:r.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:r.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:r.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:r.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:r.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:r.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:r.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:r.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:r.XML},"xml:space":{prefix:"xml",name:"space",namespace:r.XML},xmlns:{prefix:"",name:"xmlns",namespace:r.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:r.XMLNS}},T=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},E=Object.create(null);E[n.B]=!0,E[n.BIG]=!0,E[n.BLOCKQUOTE]=!0,E[n.BODY]=!0,E[n.BR]=!0,E[n.CENTER]=!0,E[n.CODE]=!0,E[n.DD]=!0,E[n.DIV]=!0,E[n.DL]=!0,E[n.DT]=!0,E[n.EM]=!0,E[n.EMBED]=!0,E[n.H1]=!0,E[n.H2]=!0,E[n.H3]=!0,E[n.H4]=!0,E[n.H5]=!0,E[n.H6]=!0,E[n.HEAD]=!0,E[n.HR]=!0,E[n.I]=!0,E[n.IMG]=!0,E[n.LI]=!0,E[n.LISTING]=!0,E[n.MENU]=!0,E[n.META]=!0,E[n.NOBR]=!0,E[n.OL]=!0,E[n.P]=!0,E[n.PRE]=!0,E[n.RUBY]=!0,E[n.S]=!0,E[n.SMALL]=!0,E[n.SPAN]=!0,E[n.STRONG]=!0,E[n.STRIKE]=!0,E[n.SUB]=!0,E[n.SUP]=!0,E[n.TABLE]=!0,E[n.TT]=!0,E[n.U]=!0,E[n.UL]=!0,E[n.VAR]=!0,t.causesExit=function(e){var t=e.tagName;return!!(t===n.FONT&&(null!==tokenizer.getTokenAttr(e,i.COLOR)||null!==tokenizer.getTokenAttr(e,i.SIZE)||null!==tokenizer.getTokenAttr(e,i.FACE)))||E[t]},t.adjustTokenMathMLAttrs=function(e){for(var t=0;t=0;r--){var i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function F(e,t,n){for(var r=t,i=e.openElements.getCommonAncestor(t),o=0,s=i;s!==n;o++,s=i){i=e.openElements.getCommonAncestor(s);var T=e.activeFormattingElements.getElementEntry(s),E=T&&o>=a;!T||E?(E&&e.activeFormattingElements.removeEntry(T),e.openElements.remove(s)):(s=y(e,T),r===t&&(e.activeFormattingElements.bookmark=T),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function y(e,t){var n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function G(e,r,i){if(e._isElementCausesFosterParenting(r))e._fosterParentElement(i);else{var o=e.treeAdapter.getTagName(r),s=e.treeAdapter.getNamespaceURI(r);o===t.TEMPLATE&&s===n.HTML&&(r=e.treeAdapter.getTemplateContent(r)),e.treeAdapter.appendChild(r,i)}}function B(e,t,n){var r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o)}function b(e,t){for(var n,r=0;r0&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(t.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode())}function q(e,t){e.openElements.pop(),e.insertionMode=c,e._processToken(t)}function $(e,n){e._insertFakeElement(t.BODY),e.insertionMode=p,e._processToken(n)}function J(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Z(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function ee(e,r){e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e._insertElement(r,n.HTML)}function te(e,r){e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e._insertElement(r,n.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ne(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,n.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function re(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,n.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ie(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,n.HTML),e.framesetOk=!1}function oe(e,t){e._appendElement(t,n.HTML)}function se(e,t){e._switchToTextParsing(t,tokenizer.MODE.RAWTEXT)}function ae(e,r){e.openElements.currentTagName===t.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(r,n.HTML)}function Te(e,r){e.openElements.hasInScope(t.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(r,n.HTML)}function Ee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,n.HTML)}function _e(e,i){var s=i.tagName;switch(s.length){case 1:s===t.I||s===t.S||s===t.B||s===t.U?ne(e,i):s===t.P?ee(e,i):s===t.A?function(e,r){var i=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.A);i&&(b(e,r),e.openElements.remove(i.element),e.activeFormattingElements.removeEntry(i)),e._reconstructActiveFormattingElements(),e._insertElement(r,n.HTML),e.activeFormattingElements.pushElement(e.openElements.current,r)}(e,i):Ee(e,i);break;case 2:s===t.DL||s===t.OL||s===t.UL?ee(e,i):s===t.H1||s===t.H2||s===t.H3||s===t.H4||s===t.H5||s===t.H6?function(e,r){e.openElements.hasInButtonScope(t.P)&&e._closePElement();var i=e.openElements.currentTagName;i!==t.H1&&i!==t.H2&&i!==t.H3&&i!==t.H4&&i!==t.H5&&i!==t.H6||e.openElements.pop(),e._insertElement(r,n.HTML)}(e,i):s===t.LI||s===t.DD||s===t.DT?function(e,r){e.framesetOk=!1;for(var i=r.tagName,o=e.openElements.stackTop;o>=0;o--){var s=e.openElements.items[o],a=e.treeAdapter.getTagName(s),T=null;if(i===t.LI&&a===t.LI?T=t.LI:i!==t.DD&&i!==t.DT||a!==t.DD&&a!==t.DT||(T=a),T){e.openElements.generateImpliedEndTagsWithExclusion(T),e.openElements.popUntilTagNamePopped(T);break}if(a!==t.ADDRESS&&a!==t.DIV&&a!==t.P&&e._isSpecialElement(s))break}e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e._insertElement(r,n.HTML)}(e,i):s===t.EM||s===t.TT?ne(e,i):s===t.BR?ie(e,i):s===t.HR?function(e,r){e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e.openElements.currentTagName===t.MENUITEM&&e.openElements.pop(),e._appendElement(r,n.HTML),e.framesetOk=!1}(e,i):s===t.RB?Te(e,i):s===t.RT||s===t.RP?function(e,r){e.openElements.hasInScope(t.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(t.RTC),e._insertElement(r,n.HTML)}(e,i):s!==t.TH&&s!==t.TD&&s!==t.TR&&Ee(e,i);break;case 3:s===t.DIV||s===t.DIR||s===t.NAV?ee(e,i):s===t.PRE?te(e,i):s===t.BIG?ne(e,i):s===t.IMG||s===t.WBR?ie(e,i):s===t.XMP?function(e,n){e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(n,tokenizer.MODE.RAWTEXT)}(e,i):s===t.SVG?function(e,t){e._reconstructActiveFormattingElements(),foreign_content.adjustTokenSVGAttrs(t),foreign_content.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,n.SVG):e._insertElement(t,n.SVG)}(e,i):s===t.RTC?Te(e,i):s!==t.COL&&Ee(e,i);break;case 4:s===t.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,i):s===t.BASE||s===t.LINK||s===t.META?W(e,i):s===t.BODY?function(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,i):s===t.MAIN?ee(e,i):s===t.FORM?function(e,r){var i=e.openElements.tmplCount>0;e.formElement&&!i||(e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e._insertElement(r,n.HTML),i||(e.formElement=e.openElements.current))}(e,i):s===t.CODE||s===t.FONT?ne(e,i):s===t.NOBR?function(e,r){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(t.NOBR)&&(b(e,r),e._reconstructActiveFormattingElements()),e._insertElement(r,n.HTML),e.activeFormattingElements.pushElement(e.openElements.current,r)}(e,i):s===t.AREA?ie(e,i):s===t.MATH?function(e,t){e._reconstructActiveFormattingElements(),foreign_content.adjustTokenMathMLAttrs(t),foreign_content.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,n.MATHML):e._insertElement(t,n.MATHML)}(e,i):s===t.MENU?function(e,r){e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e.openElements.currentTagName===t.MENUITEM&&e.openElements.pop(),e._insertElement(r,n.HTML)}(e,i):s!==t.HEAD&&Ee(e,i);break;case 5:s===t.STYLE||s===t.TITLE?W(e,i):s===t.ASIDE?ee(e,i):s===t.SMALL?ne(e,i):s===t.TABLE?function(e,r){e.treeAdapter.getDocumentMode(e.document)!==html.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e._insertElement(r,n.HTML),e.framesetOk=!1,e.insertionMode=A}(e,i):s===t.EMBED?ie(e,i):s===t.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,n.HTML);var i=tokenizer.getTokenAttr(t,r.TYPE);i&&i.toLowerCase()===o||(e.framesetOk=!1)}(e,i):s===t.PARAM||s===t.TRACK?oe(e,i):s===t.IMAGE?function(e,n){n.tagName=t.IMG,ie(e,n)}(e,i):s!==t.FRAME&&s!==t.TBODY&&s!==t.TFOOT&&s!==t.THEAD&&Ee(e,i);break;case 6:s===t.SCRIPT?W(e,i):s===t.CENTER||s===t.FIGURE||s===t.FOOTER||s===t.HEADER||s===t.HGROUP?ee(e,i):s===t.BUTTON?function(e,r){e.openElements.hasInScope(t.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(t.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(r,n.HTML),e.framesetOk=!1}(e,i):s===t.STRIKE||s===t.STRONG?ne(e,i):s===t.APPLET||s===t.OBJECT?re(e,i):s===t.KEYGEN?ie(e,i):s===t.SOURCE?oe(e,i):s===t.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,tokenizer.MODE.RAWTEXT)}(e,i):s===t.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,n.HTML),e.framesetOk=!1,e.insertionMode===A||e.insertionMode===u||e.insertionMode===N||e.insertionMode===d||e.insertionMode===C?e.insertionMode=f:e.insertionMode=S}(e,i):s===t.OPTION?ae(e,i):Ee(e,i);break;case 7:s===t.BGSOUND?W(e,i):s===t.DETAILS||s===t.ADDRESS||s===t.ARTICLE||s===t.SECTION||s===t.SUMMARY?ee(e,i):s===t.LISTING?te(e,i):s===t.MARQUEE?re(e,i):s===t.NOEMBED?se(e,i):s!==t.CAPTION&&Ee(e,i);break;case 8:s===t.BASEFONT?W(e,i):s===t.MENUITEM?function(e,r){e.openElements.currentTagName===t.MENUITEM&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(r,n.HTML)}(e,i):s===t.FRAMESET?function(e,t){var r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,n.HTML),e.insertionMode=R)}(e,i):s===t.FIELDSET?ee(e,i):s===t.TEXTAREA?function(e,t){e._insertElement(t,n.HTML),e.skipNextNewLine=!0,e.tokenizer.state=tokenizer.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=h}(e,i):s===t.TEMPLATE?W(e,i):s===t.NOSCRIPT?se(e,i):s===t.OPTGROUP?ae(e,i):s!==t.COLGROUP&&Ee(e,i);break;case 9:s===t.PLAINTEXT?function(e,r){e.openElements.hasInButtonScope(t.P)&&e._closePElement(),e._insertElement(r,n.HTML),e.tokenizer.state=tokenizer.MODE.PLAINTEXT}(e,i):Ee(e,i);break;case 10:s===t.BLOCKQUOTE||s===t.FIGCAPTION?ee(e,i):Ee(e,i);break;default:Ee(e,i)}}function ce(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function pe(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function he(e,t){for(var n=t.tagName,r=e.openElements.stackTop;r>0;r--){var i=e.openElements.items[r];if(e.treeAdapter.getTagName(i)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(i);break}if(e._isSpecialElement(i))break}}function Ae(e,n){var r=n.tagName;switch(r.length){case 1:r===t.A||r===t.B||r===t.I||r===t.S||r===t.U?b(e,n):r===t.P?function(e){e.openElements.hasInButtonScope(t.P)||e._insertFakeElement(t.P),e._closePElement()}(e):he(e,n);break;case 2:r===t.DL||r===t.UL||r===t.OL?ce(e,n):r===t.LI?function(e){e.openElements.hasInListItemScope(t.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(t.LI),e.openElements.popUntilTagNamePopped(t.LI))}(e):r===t.DD||r===t.DT?function(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,n):r===t.H1||r===t.H2||r===t.H3||r===t.H4||r===t.H5||r===t.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):r===t.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(t.BR),e.openElements.pop(),e.framesetOk=!1}(e):r===t.EM||r===t.TT?b(e,n):he(e,n);break;case 3:r===t.BIG?b(e,n):r===t.DIR||r===t.DIV||r===t.NAV?ce(e,n):he(e,n);break;case 4:r===t.BODY?function(e){e.openElements.hasInScope(t.BODY)&&(e.insertionMode=I)}(e):r===t.HTML?function(e,n){e.openElements.hasInScope(t.BODY)&&(e.insertionMode=I,e._processToken(n))}(e,n):r===t.FORM?function(e){var n=e.openElements.tmplCount>0,r=e.formElement;n||(e.formElement=null),(r||n)&&e.openElements.hasInScope(t.FORM)&&(e.openElements.generateImpliedEndTags(),n?e.openElements.popUntilTagNamePopped(t.FORM):e.openElements.remove(r))}(e):r===t.CODE||r===t.FONT||r===t.NOBR?b(e,n):r===t.MAIN||r===t.MENU?ce(e,n):he(e,n);break;case 5:r===t.ASIDE?ce(e,n):r===t.SMALL?b(e,n):he(e,n);break;case 6:r===t.CENTER||r===t.FIGURE||r===t.FOOTER||r===t.HEADER||r===t.HGROUP?ce(e,n):r===t.APPLET||r===t.OBJECT?pe(e,n):r===t.STRIKE||r===t.STRONG?b(e,n):he(e,n);break;case 7:r===t.ADDRESS||r===t.ARTICLE||r===t.DETAILS||r===t.SECTION||r===t.SUMMARY?ce(e,n):r===t.MARQUEE?pe(e,n):he(e,n);break;case 8:r===t.FIELDSET?ce(e,n):r===t.TEMPLATE?V(e,n):he(e,n);break;case 10:r===t.BLOCKQUOTE||r===t.FIGCAPTION?ce(e,n):he(e,n);break;default:he(e,n)}}function le(e,t){e.tmplInsertionModeStackTop>-1?Oe(e,t):e.stopped=!0}function ue(e,n){var r=e.openElements.currentTagName;r===t.TABLE||r===t.TBODY||r===t.TFOOT||r===t.THEAD||r===t.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=l,e._processToken(n)):de(e,n)}function me(e,i){var s=i.tagName;switch(s.length){case 2:s===t.TD||s===t.TH||s===t.TR?function(e,n){e.openElements.clearBackToTableContext(),e._insertFakeElement(t.TBODY),e.insertionMode=N,e._processToken(n)}(e,i):de(e,i);break;case 3:s===t.COL?function(e,n){e.openElements.clearBackToTableContext(),e._insertFakeElement(t.COLGROUP),e.insertionMode=m,e._processToken(n)}(e,i):de(e,i);break;case 4:s===t.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,n.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,i):de(e,i);break;case 5:s===t.TABLE?function(e,n){e.openElements.hasInTableScope(t.TABLE)&&(e.openElements.popUntilTagNamePopped(t.TABLE),e._resetInsertionMode(),e._processToken(n))}(e,i):s===t.STYLE?W(e,i):s===t.TBODY||s===t.TFOOT||s===t.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,n.HTML),e.insertionMode=N}(e,i):s===t.INPUT?function(e,t){var i=tokenizer.getTokenAttr(t,r.TYPE);i&&i.toLowerCase()===o?e._appendElement(t,n.HTML):de(e,t)}(e,i):de(e,i);break;case 6:s===t.SCRIPT?W(e,i):de(e,i);break;case 7:s===t.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,n.HTML),e.insertionMode=u}(e,i):de(e,i);break;case 8:s===t.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,n.HTML),e.insertionMode=m}(e,i):s===t.TEMPLATE?W(e,i):de(e,i);break;default:de(e,i)}}function Ne(e,n){var r=n.tagName;r===t.TABLE?e.openElements.hasInTableScope(t.TABLE)&&(e.openElements.popUntilTagNamePopped(t.TABLE),e._resetInsertionMode()):r===t.TEMPLATE?V(e,n):r!==t.BODY&&r!==t.CAPTION&&r!==t.COL&&r!==t.COLGROUP&&r!==t.HTML&&r!==t.TBODY&&r!==t.TD&&r!==t.TFOOT&&r!==t.TH&&r!==t.THEAD&&r!==t.TR&&de(e,n)}function de(e,t){var n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function Ce(e,n){e.openElements.currentTagName===t.COLGROUP&&(e.openElements.pop(),e.insertionMode=A,e._processToken(n))}function Se(e,r){var i=r.tagName;i===t.HTML?_e(e,r):i===t.OPTION?(e.openElements.currentTagName===t.OPTION&&e.openElements.pop(),e._insertElement(r,n.HTML)):i===t.OPTGROUP?(e.openElements.currentTagName===t.OPTION&&e.openElements.pop(),e.openElements.currentTagName===t.OPTGROUP&&e.openElements.pop(),e._insertElement(r,n.HTML)):i===t.INPUT||i===t.KEYGEN||i===t.TEXTAREA||i===t.SELECT?e.openElements.hasInSelectScope(t.SELECT)&&(e.openElements.popUntilTagNamePopped(t.SELECT),e._resetInsertionMode(),i!==t.SELECT&&e._processToken(r)):i!==t.SCRIPT&&i!==t.TEMPLATE||W(e,r)}function fe(e,n){var r=n.tagName;if(r===t.OPTGROUP){var i=e.openElements.items[e.openElements.stackTop-1],o=i&&e.treeAdapter.getTagName(i);e.openElements.currentTagName===t.OPTION&&o===t.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===t.OPTGROUP&&e.openElements.pop()}else r===t.OPTION?e.openElements.currentTagName===t.OPTION&&e.openElements.pop():r===t.SELECT&&e.openElements.hasInSelectScope(t.SELECT)?(e.openElements.popUntilTagNamePopped(t.SELECT),e._resetInsertionMode()):r===t.TEMPLATE&&V(e,n)}function Oe(e,n){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(t.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(n)):e.stopped=!0}function Ie(e,t){e.insertionMode=p,e._processToken(t)}function Re(e,t){e.insertionMode=p,e._processToken(t)}H.prototype.parse=function(e){var t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t},H.prototype.parseFragment=function(e,r){r||(r=this.treeAdapter.createElement(t.TEMPLATE,n.HTML,[]));var i=this.treeAdapter.createElement("documentmock",n.HTML,[]);this._bootstrap(i,r),this.treeAdapter.getTagName(r)===t.TEMPLATE&&this._pushTmplInsertionMode(O),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);var o=this.treeAdapter.getFirstChild(i),s=this.treeAdapter.createDocumentFragment();return this._adoptNodes(o,s),s},H.prototype._bootstrap=function(e,t){this.tokenizer=new tokenizer(this.options),this.stopped=!1,this.insertionMode="INITIAL_MODE",this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new open_element_stack(this.document,this.treeAdapter),this.activeFormattingElements=new formatting_element_list(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1},H.prototype._runParsingLoop=function(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();var t=this.tokenizer.getNextToken();if(t.type===tokenizer.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===tokenizer.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}},H.prototype.runParsingLoopForCurrentChunk=function(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){var n=this.pendingScript;return this.pendingScript=null,void t(n)}e&&e()},H.prototype._setupTokenizerCDATAMode=function(){var e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==n.HTML&&!this._isIntegrationPoint(e)},H.prototype._switchToTextParsing=function(e,t){this._insertElement(e,n.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=h},H.prototype.switchToPlaintextParsing=function(){this.insertionMode=h,this.originalInsertionMode=p,this.tokenizer.state=tokenizer.MODE.PLAINTEXT},H.prototype._getAdjustedCurrentElement=function(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current},H.prototype._findFormInFragmentContext=function(){var e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===t.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)},H.prototype._initTokenizerForFragmentParsing=function(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===n.HTML){var e=this.treeAdapter.getTagName(this.fragmentContext);e===t.TITLE||e===t.TEXTAREA?this.tokenizer.state=tokenizer.MODE.RCDATA:e===t.STYLE||e===t.XMP||e===t.IFRAME||e===t.NOEMBED||e===t.NOFRAMES||e===t.NOSCRIPT?this.tokenizer.state=tokenizer.MODE.RAWTEXT:e===t.SCRIPT?this.tokenizer.state=tokenizer.MODE.SCRIPT_DATA:e===t.PLAINTEXT&&(this.tokenizer.state=tokenizer.MODE.PLAINTEXT)}},H.prototype._setDocumentType=function(e){this.treeAdapter.setDocumentType(this.document,e.name,e.publicId,e.systemId)},H.prototype._attachElementToTree=function(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{var t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}},H.prototype._appendElement=function(e,t){var n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)},H.prototype._insertElement=function(e,t){var n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)},H.prototype._insertFakeElement=function(e){var t=this.treeAdapter.createElement(e,n.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)},H.prototype._insertTemplate=function(e){var t=this.treeAdapter.createElement(e.tagName,n.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t),this.openElements.push(t)},H.prototype._insertFakeRootElement=function(){var e=this.treeAdapter.createElement(t.HTML,n.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)},H.prototype._appendCommentNode=function(e,t){var n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)},H.prototype._insertCharacters=function(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{var t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}},H.prototype._adoptNodes=function(e,t){for(;;){var n=this.treeAdapter.getFirstChild(e);if(!n)break;this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}},H.prototype._shouldProcessTokenInForeignContent=function(e){var r=this._getAdjustedCurrentElement();if(!r||r===this.document)return!1;var i=this.treeAdapter.getNamespaceURI(r);if(i===n.HTML)return!1;if(this.treeAdapter.getTagName(r)===t.ANNOTATION_XML&&i===n.MATHML&&e.type===tokenizer.START_TAG_TOKEN&&e.tagName===t.SVG)return!1;var o=e.type===tokenizer.CHARACTER_TOKEN||e.type===tokenizer.NULL_CHARACTER_TOKEN||e.type===tokenizer.WHITESPACE_CHARACTER_TOKEN;return(!(e.type===tokenizer.START_TAG_TOKEN&&e.tagName!==t.MGLYPH&&e.tagName!==t.MALIGNMARK)&&!o||!this._isIntegrationPoint(r,n.MATHML))&&((e.type!==tokenizer.START_TAG_TOKEN&&!o||!this._isIntegrationPoint(r,n.HTML))&&e.type!==tokenizer.EOF_TOKEN)},H.prototype._processToken=function(e){D[this.insertionMode][e.type](this,e)},H.prototype._processTokenInBodyMode=function(e){D[p][e.type](this,e)},H.prototype._processTokenInForeignContent=function(e){e.type===tokenizer.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e):e.type===tokenizer.NULL_CHARACTER_TOKEN?function(e,t){t.chars=unicode.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e):e.type===tokenizer.WHITESPACE_CHARACTER_TOKEN?Y(this,e):e.type===tokenizer.COMMENT_TOKEN?z(this,e):e.type===tokenizer.START_TAG_TOKEN?function(e,t){if(foreign_content.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==n.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{var r=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(r);i===n.MATHML?foreign_content.adjustTokenMathMLAttrs(t):i===n.SVG&&(foreign_content.adjustTokenSVGTagName(t),foreign_content.adjustTokenSVGAttrs(t)),foreign_content.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i)}}(this,e):e.type===tokenizer.END_TAG_TOKEN&&function(e,t){for(var r=e.openElements.stackTop;r>0;r--){var i=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(i)===n.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(i).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(i);break}}}(this,e)},H.prototype._processInputToken=function(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e)},H.prototype._isIntegrationPoint=function(e,t){var n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),i=this.treeAdapter.getAttrList(e);return foreign_content.isIntegrationPoint(n,r,i,t)},H.prototype._reconstructActiveFormattingElements=function(){var e=this.activeFormattingElements.length;if(e){var t=e,n=null;do{if(t--,(n=this.activeFormattingElements.entries[t]).type===formatting_element_list.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(var r=t;r=0;e--){var r=this.openElements.items[e];0===e&&(n=!0,this.fragmentContext&&(r=this.fragmentContext));var i=this.treeAdapter.getTagName(r),o=g[i];if(o){this.insertionMode=o;break}if(!(n||i!==t.TD&&i!==t.TH)){this.insertionMode=C;break}if(!n&&i===t.HEAD){this.insertionMode=_;break}if(i===t.SELECT){this._resetInsertionModeForSelect(e);break}if(i===t.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(i===t.HTML){this.insertionMode=this.headElement?c:E;break}if(n){this.insertionMode=p;break}}},H.prototype._resetInsertionModeForSelect=function(e){if(e>0)for(var n=e-1;n>0;n--){var r=this.openElements.items[n],i=this.treeAdapter.getTagName(r);if(i===t.TEMPLATE)break;if(i===t.TABLE)return void(this.insertionMode=f)}this.insertionMode=S},H.prototype._pushTmplInsertionMode=function(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e},H.prototype._popTmplInsertionMode=function(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]},H.prototype._isElementCausesFosterParenting=function(e){var n=this.treeAdapter.getTagName(e);return n===t.TABLE||n===t.TBODY||n===t.TFOOT||n===t.THEAD||n===t.TR},H.prototype._shouldFosterParentOnInsertion=function(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)},H.prototype._findFosterParentingLocation=function(){for(var e={parent:null,beforeElement:null},r=this.openElements.stackTop;r>=0;r--){var i=this.openElements.items[r],o=this.treeAdapter.getTagName(i),s=this.treeAdapter.getNamespaceURI(i);if(o===t.TEMPLATE&&s===n.HTML){e.parent=this.treeAdapter.getTemplateContent(i);break}if(o===t.TABLE){e.parent=this.treeAdapter.getParentNode(i),e.parent?e.beforeElement=i:e.parent=this.openElements.items[r-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e},H.prototype._fosterParentElement=function(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)},H.prototype._fosterParentText=function(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)},H.prototype._isSpecialElement=function(e){var t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return html.SPECIAL_ELEMENTS[n][t]}}),serializer=createCommonjsModule(function(e){var t=html.TAG_NAMES,n=html.NAMESPACES,r={treeAdapter:_default},i=/&/g,o=/\u00a0/g,s=/"/g,a=//g,E=e.exports=function(e,t){this.options=merge_options(r,t),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=e};E.escapeString=function(e,t){return e=e.replace(i,"&").replace(o," "),e=t?e.replace(s,"""):e.replace(a,"<").replace(T,">")},E.prototype.serialize=function(){return this._serializeChildNodes(this.startNode),this.html},E.prototype._serializeChildNodes=function(e){var t=this.treeAdapter.getChildNodes(e);if(t)for(var n=0,r=t.length;n",r!==t.AREA&&r!==t.BASE&&r!==t.BASEFONT&&r!==t.BGSOUND&&r!==t.BR&&r!==t.BR&&r!==t.COL&&r!==t.EMBED&&r!==t.FRAME&&r!==t.HR&&r!==t.IMG&&r!==t.INPUT&&r!==t.KEYGEN&&r!==t.LINK&&r!==t.MENUITEM&&r!==t.META&&r!==t.PARAM&&r!==t.SOURCE&&r!==t.TRACK&&r!==t.WBR){var o=r===t.TEMPLATE&&i===n.HTML?this.treeAdapter.getTemplateContent(e):e;this._serializeChildNodes(o),this.html+=""}},E.prototype._serializeAttributes=function(e){for(var t=this.treeAdapter.getAttrList(e),r=0,i=t.length;r"}}),htmlparser2=createCommonjsModule(function(e,t){var n=html.DOCUMENT_MODE,r={element:1,text:3,cdata:4,comment:8},i={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},o=function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])};o.prototype={get firstChild(){var e=this.children;return e&&e[0]||null},get lastChild(){var e=this.children;return e&&e[e.length-1]||null},get nodeType(){return r[this.type]||r.element}},Object.keys(i).forEach(function(e){var t=i[e];Object.defineProperty(o.prototype,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})}),t.createDocument=function(){return new o({type:"root",name:"root",parent:null,prev:null,next:null,children:[],"x-mode":n.NO_QUIRKS})},t.createDocumentFragment=function(){return new o({type:"root",name:"root",parent:null,prev:null,next:null,children:[]})},t.createElement=function(e,t,n){for(var r=Object.create(null),i=Object.create(null),s=Object.create(null),a=0;a({type:"attribute",key:t,value:e[t]}))}var parserParse5=parse;module.exports=parserParse5; diff --git a/Colorui-UniApp/node_modules/prettier/parser-postcss.js b/Colorui-UniApp/node_modules/prettier/parser-postcss.js new file mode 100644 index 0000000..8a3bcdf --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/parser-postcss.js @@ -0,0 +1,40612 @@ +module.exports = /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // 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 = 215); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var YAMLException = __webpack_require__(11); + +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(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('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 YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; + + +/***/ }), +/* 1 */ +/***/ (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'; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Node = __webpack_require__(4); + +class Container extends Node { + + constructor (opts) { + super(opts); + + if (!this.nodes) { + this.nodes = []; + } + } + + push (child) { + child.parent = this; + this.nodes.push(child); + return this; + } + + each (callback) { + if (!this.lastEach) this.lastEach = 0; + if (!this.indexes) this.indexes = { }; + + this.lastEach += 1; + + let 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; + } + + walk (callback) { + return this.each((child, i) => { + let result = callback(child, i); + if (result !== false && child.walk) { + result = child.walk(callback); + } + return result; + }); + } + + walkType (type, callback) { + 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((node, index) => { + if (node.type === type) { + return callback.call(this, node, index); + } + }); + } + + append (node) { + node.parent = this; + this.nodes.push(node); + return this; + } + + prepend (node) { + node.parent = this; + this.nodes.unshift(node); + return this; + } + + cleanRaws (keepBetween) { + super.cleanRaws(keepBetween); + if (this.nodes) { + for (let node of this.nodes) node.cleanRaws(keepBetween); + } + } + + insertAfter (oldNode, newNode) { + let oldIndex = this.index(oldNode), + index; + + this.nodes.splice(oldIndex + 1, 0, newNode); + + for (let id in this.indexes) { + index = this.indexes[id]; + if (oldIndex <= index) { + this.indexes[id] = index + this.nodes.length; + } + } + + return this; + } + + insertBefore (oldNode, newNode) { + let oldIndex = this.index(oldNode), + index; + + this.nodes.splice(oldIndex, 0, newNode); + + for (let id in this.indexes) { + index = this.indexes[id]; + if (oldIndex <= index) { + this.indexes[id] = index + this.nodes.length; + } + } + + return this; + } + + removeChild (child) { + child = this.index(child); + this.nodes[child].parent = undefined; + this.nodes.splice(child, 1); + + let index; + for (let id in this.indexes) { + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + return this; + } + + removeAll () { + for (let node of this.nodes) node.parent = undefined; + this.nodes = []; + return this; + } + + every (condition) { + return this.nodes.every(condition); + } + + some (condition) { + return this.nodes.some(condition); + } + + index (child) { + if (typeof child === 'number') { + return child; + } + else { + return this.nodes.indexOf(child); + } + } + + get first () { + if (!this.nodes) return undefined; + return this.nodes[0]; + } + + get last () { + if (!this.nodes) return undefined; + return this.nodes[this.nodes.length - 1]; + } + + toString () { + let 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; + } +} + +Container.registerWalker = (constructor) => { + let 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; + + +/***/ }), +/* 3 */ +/***/ (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}$/; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +let cloneNode = function (obj, parent) { + let cloned = new obj.constructor(); + + for (let i in obj) { + if (!obj.hasOwnProperty(i)) continue; + + let 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(j => 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 = class Node { + + constructor (defaults) { + defaults = defaults || {}; + this.raws = { before: '', after: '' }; + + for (let name in defaults) { + this[name] = defaults[name]; + } + } + + remove () { + if (this.parent) { + this.parent.removeChild(this); + } + + this.parent = undefined; + + return this; + } + + toString () { + return [ + this.raws.before, + String(this.value), + this.raws.after + ].join(''); + } + + clone (overrides) { + overrides = overrides || {}; + + let cloned = cloneNode(this); + + for (let name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + } + + cloneBefore (overrides) { + overrides = overrides || {}; + + let cloned = this.clone(overrides); + + this.parent.insertBefore(this, cloned); + return cloned; + } + + cloneAfter (overrides) { + overrides = overrides || {}; + + let cloned = this.clone(overrides); + + this.parent.insertAfter(this, cloned); + return cloned; + } + + replaceWith () { + let nodes = Array.prototype.slice.call(arguments); + + if (this.parent) { + for (let node of nodes) { + this.parent.insertBefore(this, node); + } + + this.remove(); + } + + return this; + } + + moveTo (container) { + this.cleanRaws(this.root() === container.root()); + this.remove(); + + container.append(this); + + return this; + } + + moveBefore (node) { + this.cleanRaws(this.root() === node.root()); + this.remove(); + + node.parent.insertBefore(node, this); + + return this; + } + + moveAfter (node) { + this.cleanRaws(this.root() === node.root()); + this.remove(); + node.parent.insertAfter(node, this); + return this; + } + + next () { + let index = this.parent.index(this); + + return this.parent.nodes[index + 1]; + } + + prev () { + let index = this.parent.index(this); + + return this.parent.nodes[index - 1]; + } + + toJSON () { + let fixed = { }; + + for (let name in this) { + if (!this.hasOwnProperty(name)) continue; + if (name === 'parent') continue; + let value = this[name]; + + if (value instanceof Array) { + fixed[name] = value.map(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; + } + + root () { + let result = this; + + while (result.parent) result = result.parent; + + return result; + } + + cleanRaws (keepBetween) { + delete this.raws.before; + delete this.raws.after; + if (!keepBetween) delete this.raws.between; + } + + positionInside (index) { + let string = this.toString(), + column = this.source.start.column, + line = this.source.start.line; + + for (let i = 0; i < index; i++) { + if (string[i] === '\n') { + column = 1; + line += 1; + } + else { + column += 1; + } + } + + return { line, column }; + } + + positionBy (opts) { + let pos = this.source.start; + + if (opts.index) { + pos = this.positionInside(opts.index); + } + else if (opts.word) { + let index = this.toString().indexOf(opts.word); + if (index !== -1) pos = this.positionInside(index); + } + + return pos; + } +}; + + +/***/ }), +/* 5 */ +/***/ (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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndhcm4tb25jZS5lczYiXSwibmFtZXMiOlsid2Fybk9uY2UiLCJwcmludGVkIiwibWVzc2FnZSIsImNvbnNvbGUiLCJ3YXJuIl0sIm1hcHBpbmdzIjoiOzs7a0JBRXdCQSxRO0FBRnhCLElBQUlDLFVBQVUsRUFBZDs7QUFFZSxTQUFTRCxRQUFULENBQWtCRSxPQUFsQixFQUEyQjtBQUN0QyxRQUFLRCxRQUFRQyxPQUFSLENBQUwsRUFBd0I7QUFDeEJELFlBQVFDLE9BQVIsSUFBbUIsSUFBbkI7O0FBRUEsUUFBSyxPQUFPQyxPQUFQLEtBQW1CLFdBQW5CLElBQWtDQSxRQUFRQyxJQUEvQyxFQUFzREQsUUFBUUMsSUFBUixDQUFhRixPQUFiO0FBQ3pEIiwiZmlsZSI6Indhcm4tb25jZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImxldCBwcmludGVkID0geyB9O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiB3YXJuT25jZShtZXNzYWdlKSB7XG4gICAgaWYgKCBwcmludGVkW21lc3NhZ2VdICkgcmV0dXJuO1xuICAgIHByaW50ZWRbbWVzc2FnZV0gPSB0cnVlO1xuXG4gICAgaWYgKCB0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcgJiYgY29uc29sZS53YXJuICkgY29uc29sZS53YXJuKG1lc3NhZ2UpO1xufVxuIl19 + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + + +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); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/*eslint-disable max-len*/ + +var common = __webpack_require__(6); +var YAMLException = __webpack_require__(11); +var Type = __webpack_require__(0); + + +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, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + + function collectType(type) { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('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.DEFAULT = null; + + +Schema.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new YAMLException('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; })) { + throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type) { return type instanceof Type; })) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema({ + include: schemas, + explicit: types + }); +}; + + +module.exports = Schema; + + +/***/ }), +/* 8 */ +/***/ (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(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__(23))) + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof 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']; + +/***/ }), +/* 10 */ +/***/ (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__(112) +var ieee754 = __webpack_require__(119) +var isArray = __webpack_require__(121) + +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 () { 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__(41))) + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// YAML error class. http://stackoverflow.com/questions/8458984 +// + + +function YAMLException(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.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + + +module.exports = YAMLException; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + + + + +var Schema = __webpack_require__(7); + + +module.exports = new Schema({ + include: [ + __webpack_require__(50) + ], + implicit: [ + __webpack_require__(142), + __webpack_require__(135) + ], + explicit: [ + __webpack_require__(127), + __webpack_require__(137), + __webpack_require__(138), + __webpack_require__(140) + ] +}); + + +/***/ }), +/* 13 */ +/***/ (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"]; + +/***/ }), +/* 14 */ +/***/ (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; + + +/***/ }), +/* 15 */ +/***/ (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 _node = __webpack_require__(9); + +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']; + +/***/ }), +/* 16 */ +/***/ (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 _container = __webpack_require__(36); + +var _container2 = _interopRequireDefault(_container); + +var _warnOnce = __webpack_require__(5); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _list = __webpack_require__(193); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGUuZXM2Il0sIm5hbWVzIjpbIlJ1bGUiLCJkZWZhdWx0cyIsInR5cGUiLCJub2RlcyIsImNvbW1hIiwic2VsZWN0b3IiLCJ2YWx1ZXMiLCJtYXRjaCIsInNlcCIsInJhdyIsImpvaW4iLCJyYXdzIiwidmFsIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTs7OztBQUNBOzs7O0FBQ0E7Ozs7Ozs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BkZWNsYXJhdGlvbnMsIHNlbGVjdG9yIGFuZCBge2AgZm9yIHJ1bGVzLCBvciBsYXN0IHBhcmFtZXRlclxuICAgICAqICAgYW5kIGB7YCBmb3IgYXQtcnVsZXMuXG4gICAgICogKiBgc2VtaWNvbG9uYDogY29udGFpbnMgdHJ1ZSBpZiB0aGUgbGFzdCBjaGlsZCBoYXNcbiAgICAgKiAgIGFuIChvcHRpb25hbCkgc2VtaWNvbG9uLlxuICAgICAqXG4gICAgICogUG9zdENTUyBjbGVhbnMgc2VsZWN0b3JzIGZyb20gY29tbWVudHMgYW5kIGV4dHJhIHNwYWNlcyxcbiAgICAgKiBidXQgaXQgc3RvcmVzIG9yaWdpbiBjb250ZW50IGluIHJhd3MgcHJvcGVydGllcy5cbiAgICAgKiBBcyBzdWNoLCBpZiB5b3UgZG9u4oCZdCBjaGFuZ2UgYSBkZWNsYXJhdGlvbuKAmXMgdmFsdWUsXG4gICAgICogUG9zdENTUyB3aWxsIHVzZSB0aGUgcmF3IHZhbHVlIHdpdGggY29tbWVudHMuXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCdhIHtcXG4gIGNvbG9yOmJsYWNrXFxufScpXG4gICAgICogcm9vdC5maXJzdC5maXJzdC5yYXdzIC8vPT4geyBiZWZvcmU6ICcnLCBiZXR3ZWVuOiAnICcsIGFmdGVyOiAnXFxuJyB9XG4gICAgICovXG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgUnVsZTtcbiJdfQ== + + +/***/ }), +/* 17 */ +/***/ (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; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isObject = __webpack_require__(120); + +module.exports = function extend(o/*, objects*/) { + if (!isObject(o)) { o = {}; } + + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + + if (isObject(obj)) { + assign(o, obj); + } + } + return o; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var extend = __webpack_require__(18); +var engines = __webpack_require__(46); +var utils = __webpack_require__(24); + +module.exports = function(options) { + var opts = extend({}, options); + + // ensure that delimiters are an array + opts.delimiters = utils.arrayify(opts.delims || opts.delimiters || '---'); + if (opts.delimiters.length === 1) { + opts.delimiters.push(opts.delimiters[0]); + } + + opts.language = (opts.language || opts.lang || 'yaml').toLowerCase(); + opts.engines = extend({}, engines, opts.parsers, opts.engines); + return opts; +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// JS-YAML's default schema for `load` function. +// It is not described in the YAML specification. +// +// This schema is based on JS-YAML's default safe schema and includes +// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. +// +// Also this schema is used as default base schema at `Schema.create` function. + + + + + +var Schema = __webpack_require__(7); + + +module.exports = Schema.DEFAULT = new Schema({ + include: [ + __webpack_require__(12) + ], + explicit: [ + __webpack_require__(133), + __webpack_require__(132), + __webpack_require__(131) + ] +}); + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = lessStringify; + +var _lessStringifier = __webpack_require__(147); + +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']; + +/***/ }), +/* 22 */ +/***/ (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 _declaration = __webpack_require__(55); + +var _declaration2 = _interopRequireDefault(_declaration); + +var _comment = __webpack_require__(28); + +var _comment2 = _interopRequireDefault(_comment); + +var _node = __webpack_require__(30); + +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__(57); + 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__(31); + nodes = [new Rule(nodes)]; + } else if (nodes.name) { + var AtRule = __webpack_require__(27); + 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__(59); + fix = new Root(); + } else if (node.type === 'atrule') { + var AtRule = __webpack_require__(27); + fix = new AtRule(); + } else if (node.type === 'rule') { + var Rule = __webpack_require__(31); + 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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbnRhaW5lci5lczYiXSwibmFtZXMiOlsiY2xlYW5Tb3VyY2UiLCJub2RlcyIsIm1hcCIsImkiLCJzb3VyY2UiLCJDb250YWluZXIiLCJwdXNoIiwiY2hpbGQiLCJwYXJlbnQiLCJlYWNoIiwiY2FsbGJhY2siLCJsYXN0RWFjaCIsImluZGV4ZXMiLCJpZCIsInVuZGVmaW5lZCIsImluZGV4IiwicmVzdWx0IiwibGVuZ3RoIiwid2FsayIsIndhbGtEZWNscyIsInByb3AiLCJ0eXBlIiwiUmVnRXhwIiwidGVzdCIsIndhbGtSdWxlcyIsInNlbGVjdG9yIiwid2Fsa0F0UnVsZXMiLCJuYW1lIiwid2Fsa0NvbW1lbnRzIiwiYXBwZW5kIiwiY2hpbGRyZW4iLCJub3JtYWxpemUiLCJsYXN0Iiwibm9kZSIsInByZXBlbmQiLCJyZXZlcnNlIiwiZmlyc3QiLCJ1bnNoaWZ0IiwiY2xlYW5SYXdzIiwia2VlcEJldHdlZW4iLCJpbnNlcnRCZWZvcmUiLCJleGlzdCIsImFkZCIsInNwbGljZSIsImluc2VydEFmdGVyIiwicmVtb3ZlQ2hpbGQiLCJyZW1vdmVBbGwiLCJyZXBsYWNlVmFsdWVzIiwicGF0dGVybiIsIm9wdHMiLCJwcm9wcyIsImluZGV4T2YiLCJkZWNsIiwiZmFzdCIsInZhbHVlIiwicmVwbGFjZSIsImV2ZXJ5IiwiY29uZGl0aW9uIiwic29tZSIsInNhbXBsZSIsInBhcnNlIiwicmVxdWlyZSIsIkFycmF5IiwiaXNBcnJheSIsInNsaWNlIiwiRXJyb3IiLCJ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gICogQGV4YW1wbGVcbiAgICAgKiByb290LndhbGsobm9kZSA9PiB7XG4gICAgICogICAvLyBUcmF2ZXJzZXMgYWxsIGRlc2NlbmRhbnQgbm9kZXMuXG4gICAgICogfSk7XG4gICAgICovXG4gICAgd2FsayhjYWxsYmFjaykge1xuICAgICAgICByZXR1cm4gdGhpcy5lYWNoKCAoY2hpbGQsIGkpID0+IHtcbiAgICAgICAgICAgIGxldCByZXN1bHQgPSBjYWxsYmFjayhjaGlsZCwgaSk7XG4gICAgICAgICAgICBpZiAoIHJlc3VsdCAhPT0gZmFsc2UgJiYgY2hpbGQud2FsayApIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBjaGlsZC53YWxrKGNhbGxiYWNrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRyYXZlcnNlcyB0aGUgY29udGFpbmVy4oCZcyBkZXNjZW5kYW50IG5vZGVzLCBjYWxsaW5nIGNhbGxiYWNrXG4gICAgICogZm9yIGVhY2ggZGVjbGFyYXRpb24gbm9kZS5cbiAgICAgKlxuICAgICAqIElmIHlvdSBwYXNzIGEgZmlsdGVyLCBpdGVyYXRpb24gd2lsbCBvbmx5IGhhcHBlbiBvdmVyIGRlY2xhcmF0aW9uc1xuICAgICAqIHdpdGggbWF0Y2hpbmcgcHJvcGVydGllcy5cbiAgICAgKlxuICAgICAqIExpa2Uge0BsaW5rIENvbnRhaW5lciNlYWNofSwgdGhpcyBtZXRob2QgaXMgc2FmZVxuICAgICAqIHRvIHVzZSBpZiB5b3UgYXJlIG11dGF0aW5nIGFycmF5cyBkdXJpbmcgaXRlcmF0aW9uLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtzdHJpbmd8UmVnRXhwfSBbcHJvcF0gICAtIHN0cmluZyBvciByZWd1bGFyIGV4cHJlc3Npb25cbiAgICAgKiAgICAgICAgICAgICAgICAgICAgIC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BlbHNlIGlmICggcHJvcCBpbnN0YW5jZW9mIFJlZ0V4cCApIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLndhbGsoIChjaGlsZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmICggY2hpbGQudHlwZSA9PT0gJ2RlY2wnICYmIHByb3AudGVzdChjaGlsZC5wcm9wKSApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGNoaWxkLCBpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLndhbGsoIChjaGlsZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmICggY2hpbGQudHlwZSA9PT0gJ2RlY2wnICYmIGNoaWxkLnByb3AgPT09IHByb3AgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhjaGlsZCwgaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUcmF2ZXJzZXMgdGhlIGNvbnRhaW5lcuKAmXMgZGVzY2VuZGFudCBub2RlcywgY2FsbGluZyBjYWxsYmFja1xuICAgICAqIGZvciBlYWNoIHJ1bGUgbm9kZS5cbiAgICAgKlxuICAgICAqIElmIHlvdSBwYXNzIGEgZmlsdGVyLCBpdGVyYXRpb24gd2lsbCBvbmx5IGhhcHBlbiBvdmVyIHJ1bGVzXG4gICAgICogd2l0aCBtYXRjaGluZyBzZWxlY3RvcnMuXG4gICAgICpcbiAgICAgKiBMaWtlIHtAbGluayBDb250YWluZXIjZWFjaH0sIHRoaXMgbWV0aG9kIGlzIHNhZmVcbiAgICAgKiB0byB1c2UgaWYgeW91IGFyZSBtdXRhdGluZyBhcnJheXMgZHVyaW5nIGl0ZXJhdGlvbi5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7c3R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gICAgICAgICAgcmV0dXJuIHRoaXMud2FsayggKGNoaWxkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKCBjaGlsZC50eXBlID09PSAncnVsZScgJiYgc2VsZWN0b3IudGVzdChjaGlsZC5zZWxlY3RvcikgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhjaGlsZCwgaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy53YWxrKCAoY2hpbGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIGNoaWxkLnR5cGUgPT09ICdydWxlJyAmJiBjaGlsZC5zZWxlY3RvciA9PT0gc2VsZWN0b3IgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhjaGlsZCwgaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUcmF2ZXJzZXMgdGhlIGNvbnRhaW5lcuKAmXMgZGVzY2VuZGFudCBub2RlcywgY2FsbGluZyBjYWxsYmFja1xuICAgICAqIGZvciBlYWNoIGF0LXJ1bGUgbm9kZS5cbiAgICAgKlxuICAgICAqIElmIHlvdSBwYXNzIGEgZmlsdGVyLCBpdGVyYXRpb24gd2lsbCBvbmx5IGhhcHBlbiBvdmVyIGF0LXJ1bGVzXG4gICAgICogdGhhdCBoYXZlIG1hdGNoaW5nIG5hbWVzLlxuICAgICAqXG4gICAgICogTGlrZSB7QGxpbmsgQ29udGFpbmVyI2VhY2h9LCB0aGlzIG1ldGhvZCBpcyBzYWZlXG4gICAgICogdG8gdXNlIGlmIHlvdSBhcmUgbXV0YXRpbmcgYXJyYXlzIGR1cmluZyBpdGVyYXRpb24uXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge3N0cmluZ3xSZWdFeHB9IFtu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gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2UgaWYgKCBuYW1lIGluc3RhbmNlb2YgUmVnRXhwICkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMud2FsayggKGNoaWxkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKCBjaGlsZC50eXBlID09PSAnYXRydWxlJyAmJiBuYW1lLnRlc3QoY2hpbGQubmFtZSkgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhjaGlsZCwgaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy53YWxrKCAoY2hpbGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIGNoaWxkLnR5cGUgPT09ICdhdHJ1bGUnICYmIGNoaWxkLm5hbWUgPT09IG5hbWUgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhjaGlsZCwgaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUcmF2ZXJzZXMgdGhlIGNvbnRhaW5lcuKAmXMgZGVzY2VuZGFudCBub2RlcywgY2FsbGluZyBjYWxsYmFja1xuICAgICAqIGZvciBlYWNoIGNvbW1lbnQgbm9kZS5cbiAgICAgKlxuICAgICAqIExpa2Uge0BsaW5rIENvbnRhaW5lciNlYWNofSwgdGhpcyBtZXRob2QgaXMgc2FmZVxuICAgICAqIHRvIHVzZSBpZiB5b3UgYXJlIG11dGF0aW5nIGFycmF5cyBkdXJpbmcgaXRlcmF0aW9uLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtjaGlsZEl0ZXJhdG9yfSBjYWxsYmFjayAtIGl0ZXJhdG9yIHJlY2VpdmVzIGVhY2ggbm9kZSBhbmQgaW5kZX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5nIHRob3NlIHZhbHVlcyB3aXRoIHRoZSByZXR1cm5lZCByZXN1bHRcbiAgICAgKiBvZiBjYWxsYmFjay5cbiAgICAgKlxuICAgICAqIFRoaXMgbWV0aG9kIGlzIHVzZWZ1bCBpZiB5b3UgYXJlIHVzaW5nIGEgY3VzdG9tIHVuaXQgb3IgZnVuY3Rpb25cbiAgICAgKiBhbmQgbmVlZCB0byBpdGVyYXRlIHRocm91Z2ggYWxsIHZhbHVlcy5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7c3RyaW5nfFJlZ0V4cH0gcGF0dGVybiAgICAgIC0gcmVwbGFjZSBwYXR0ZXJuXG4gICAgICogQHBhcmFtIHtvYmplY3R9IG9wdHMgICAgICAgICAgICAgICAgLSBvcHRpb25zIHRvIHNwZWVkIHVwIHRoZSBzZWFyY2hcbiAgICAgKiBAcGFyYW0ge3N0cmluZ3xzdHJpbmdbXX0gb3B0cy5wcm9wcyAtIGFuIGFycmF5IG9mIHByb3BlcnR5IG5hbWVzXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IG9wdHMuZmFzdCAgICAgICAgICAgLSBzdHJpbmcgdGhhdOKAmXMgdXNlZFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gbmFycm93IGRvd24gdmFsdWVzIGFuZCBzcGVlZCB1cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHJlZ2V4cCBzZWFyY2hcbiAgICAgKiBAcGFyYW0ge2Z1bmN0aW9ufHN0cmluZ30gY2FsbGJhY2sgICAtIHN0cmluZyB0byByZXBsYWNlIHBhdHRlcm5cbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yIGNhbGxiYWNrIHRoYXQgcmV0dXJucyBhIG5ld1xuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUuXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgY2FsbGJhY2sgd2lsbCByZWNlaXZlXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgc2FtZSBhcmd1bWVudHMgYXMgdGhvc2VcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhc3NlZCB0byBhIGZ1bmN0aW9uIHBhcmFtZXRlclxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2YgYFN0cmluZyNyZXBsYWNlYC5cbiAgICAgKlxuICAgICAqIEByZXR1cm4ge05vZGV9IHRoaXMgbm9kZSBmb3IgbWV0aG9kcyBjaGFpblxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiByb290LnJlcGxhY2VWYWx1ZXMoL1xcZCtyZW0vLCB7IGZhc3Q6ICdyZW0nIH0sIHN0cmluZyA9PiB7XG4gICAgICogICByZXR1cm4gMTUgKiBwYXJzZUludChzdHJpbmcpICsgJ3B4JztcbiAgICAgKiB9KTtcbiAgICAgKi9cbiAgICByZXBsYWNlVmFsdWVzKHBhdHRlcm4sIG9wdHMsIGNhbGxiYWNrKSB7XG4gICAgICAgIGlmICggIWNhbGxiYWNrICkge1xuICAgICAgICAgICAgY2FsbGJhY2sgPSBvcHRzO1xuICAgICAgICAgICAgb3B0cyA9IHsgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMud2Fsa0RlY2xzKCBkZWNsID0+IHtcbiAgICAgICAgICAgIGlmICggb3B0cy5wcm9wcyAmJiBvcHRzLnByb3BzLmluZGV4T2YoZGVjbC5wcm9wKSA9PT0gLTEgKSByZXR1cm47XG4gICAgICAgICAgICBpZiAoIG9wdHMuZmFzdCAgJiYgZGVjbC52YWx1ZS5pbmRleE9mKG9wdHMuZmFzdCkgPT09IC0xICkgcmV0dXJuO1xuXG4gICAgICAgICAgICBkZWNsLnZhbHVlID0gZGVjbC52YWx1ZS5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c29tZShpID0+IGkucHJvcFswXSA9PT0gJy0nKTtcbiAgICAgKi9cbiAgICBzb21lKGNvbmRpdGlvbikge1xuICAgICAgICByZXR1cm4gdGhpcy5ub2Rlcy5zb21lKGNvbmRpdGlvbik7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBhIGBjaGlsZGDigJlzIGluZGV4IHdpdGhpbiB0aGUge0BsaW5rIENvbnRhaW5lciNub2Rlc30gYXJyYXkuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge05vZGV9IGNoaWxkIC0gY2hpbGQgb2YgdGhlIGN1cnJlbnQgY29udGFpbmVyLlxuICAgICAqXG4gICAgICogQHJldHVybiB7bnVtYmVyfSBjaGlsZCBpbmRleFxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBydWxlLmluZGV4KCBydWxlLm5vZGVzWzJdICkgLy89PiAyXG4gICAgICovXG4gICAgaW5kZXgoY2hpbGQpIHtcbiAgICAgICAgaWYgKCB0eXBlb2YgY2hpbGQgPT09ICdudW1iZXInICkge1xuICAgICAgICAgICAgcmV0dXJuIGNoaWxkO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMubm9kZXMuaW5kZXhPZihjaGlsZCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUaGUgY29udGFpbmVy4oCZcyBmaXJzdCBjaGlsZC5cbiAgICAgKlxuICAgICAqIEB0eXBlIHtOb2RlfVxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBydWxlLmZpcnN0ID09IHJ1bGVzLm5vZGVzWzBdO1xuICAgICAqL1xuICAgIGdldCBmaXJzdCgpIHtcbiAgICAgICAgaWYgKCAhdGhpcy5ub2RlcyApIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIHJldHVybiB0aGlzLm5vZGVzWzBdO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoZSBjb250YWluZXLigJlzIGxhc3QgY2hpbGQuXG4gICAgICpcbiAgICAgKiBAdHlwZSB7Tm9kZX1cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogcnVsZS5sYXN0ID09IHJ1bGUubm9kZXNbcnVsZS5ub2Rlcy5sZW5ndGggLSAxXTtcbiAgICAgKi9cbiAgICBnZXQgbGFzdCgpIHtcbiAgICAgICAgaWYgKCAhdGhpcy5ub2RlcyApIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIHJldHVybiB0aGlzLm5vZGVzW3RoaXMubm9kZXMubGVuZ3RoIC0gMV07XG4gICAgfVxuXG4gICAgbm9ybWFsaXplKG5vZGVzLCBzYW1wbGUpIHtcbiAgICAgICAgaWYgKCB0eXBlb2Ygbm9kZXMgPT09ICdzdHJpbmcnICkge1xuICAgICAgICAgICAgbGV0IHBhcnNlID0gcmVxdWlyZSgnLi9wYXJzZScpO1xuICAgICAgICAgICAgbm9kZXMgPSBjbGVhblNvdXJjZShwYXJzZShub2Rlcykubm9kZXMpO1xuICAgICAgICB9IGVsc2UgaWYgKCBBcnJheS5pc0FycmF5KG5vZGVzKSApIHtcbiAgICAgICAgICAgIG5vZGVzID0gbm9kZXMuc2xpY2UoMCk7XG4gICAgICAgICAgICBmb3IgKCBsZXQgaSBvZiBub2RlcyApIHtcbiAgICAgICAgICAgICAgICBpZiAoIGkucGFyZW50ICkgaS5wYXJlbnQucmVtb3ZlQ2hpbGQoaSwgJ2lnbm9yZScpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKCBub2Rlcy50eXBlID09PSAncm9vdCcgKSB7XG4gICAgICAgICAgICBub2RlcyA9IG5vZGVzLm5vZGVzLnNsaWNlKDApO1xuICAgICAgICAgICAgZm9yICggbGV0IGkgb2Ygbm9kZXMgKSB7XG4gICAgICAgICAgICAgICAgaWYgKCBpLnBhcmVudCApIGkucGFyZW50LnJlbW92ZUNoaWxkKGksICdpZ25vcmUnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICggbm9kZXMudHlwZSApIHtcbiAgICAgICAgICAgIG5vZGVzID0gW25vZGVzXTtcbiAgICAgICAgfSBlbHNlIGlmICggbm9kZXMucHJvcCApIHtcbiAgICAgICAgICAgIGlmICggdHlwZW9mIG5vZGVzLnZhbHVlID09PSAndW5kZWZpbmVkJyApIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1ZhbHVlIGZpZWxkIGlzIG1pc3NlZCBpbiBub2RlIGNyZWF0aW9uJyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCB0eXBlb2Ygbm9kZXMudmFsdWUgIT09ICdzdHJpbmcnICkge1xuICAgICAgICAgICAgICAgIG5vZGVzLnZhbHVlID0gU3RyaW5nKG5vZGVzLnZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG5vZGVzID0gW25ldyBEZWNsYXJhdGlvbihub2RlcyldO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2Rlcy5zZWxlY3RvciApIHtcbiAgICAgICAgICAgIGxldCBSdWxlID0gcmVxdWlyZSgnLi9ydWxlJyk7XG4gICAgICAgICAgICBub2RlcyA9IFtuZXcgUnVsZShub2RlcyldO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2Rlcy5uYW1lICkge1xuICAgICAgICAgICAgbGV0IEF0UnVsZSA9IHJlcXVpcmUoJy4vYXQtcnVsZScpO1xuICAgICAgICAgICAgbm9kZXMgPSBbbmV3IEF0UnVsZShub2RlcyldO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2Rlcy50ZXh0ICkge1xuICAgICAgICAgICAgbm9kZXMgPSBbbmV3IENvbW1lbnQobm9kZXMpXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignVW5rbm93biBub2RlIHR5cGUgaW4gbm9kZSBjcmVhdGlvbicpO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IHByb2Nlc3NlZCA9IG5vZGVzLm1hcCggaSA9PiB7XG4gICAgICAgICAgICBpZiAoIHR5cGVvZiBpLmJlZm9yZSAhPT0gJ2Z1bmN0aW9uJyApIGkgPSB0aGlzLnJlYnVpbGQoaSk7XG5cbiAgICAgICAgICAgIGlmICggaS5wYXJlbnQgKSBpLnBhcmVudC5yZW1vdmVDaGlsZChpKTtcbiAgICAgICAgICAgIGlmICggdHlwZW9mIGkucmF3cy5iZWZvcmUgPT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgIGlmICggc2FtcGxlICYmIHR5cGVvZiBzYW1wbGUucmF3cy5iZWZvcmUgIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgICAgICBpLnJhd3MuYmVmb3JlID0gc2FtcGxlLnJhd3MuYmVmb3JlLnJlcGxhY2UoL1teXFxzXS9nLCAnJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaS5wYXJlbnQgPSB0aGlzO1xuICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBwcm9jZXNzZWQ7XG4gICAgfVxuXG4gICAgcmVidWlsZChub2RlLCBwYXJlbnQpIHtcbiAgICAgICAgbGV0IGZpeDtcbiAgICAgICAgaWYgKCBub2RlLnR5cGUgPT09ICdyb290JyApIHtcbiAgICAgICAgICAgIGxldCBSb290ID0gcmVxdWlyZSgnLi9yb290Jyk7XG4gICAgICAgICAgICBmaXggPSBuZXcgUm9vdCgpO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2RlLnR5cGUgPT09ICdhdHJ1bGUnICkge1xuICAgICAgICAgICAgbGV0IEF0UnVsZSA9IHJlcXVpcmUoJy4vYXQtcnVsZScpO1xuICAgICAgICAgICAgZml4ID0gbmV3IEF0UnVsZSgpO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2RlLnR5cGUgPT09ICdydWxlJyApIHtcbiAgICAgICAgICAgIGxldCBSdWxlID0gcmVxdWlyZSgnLi9ydWxlJyk7XG4gICAgICAgICAgICBmaXggPSBuZXcgUnVsZSgpO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2RlLnR5cGUgPT09ICdkZWNsJyApIHtcbiAgICAgICAgICAgIGZpeCA9IG5ldyBEZWNsYXJhdGlvbigpO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2RlLnR5cGUgPT09ICdjb21tZW50JyApIHtcbiAgICAgICAgICAgIGZpeCA9IG5ldyBDb21tZW50KCk7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKCBsZXQgaSBpbiBub2RlICkge1xuICAgICAgICAgICAgaWYgKCBpID09PSAnbm9kZXMnICkge1xuICAgICAgICAgICAgICAgIGZpeC5ub2RlcyA9IG5vZGUubm9kZXMubWFwKCBqID0+IHRoaXMucmVidWlsZChqLCBmaXgpICk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBpID09PSAncGFyZW50JyAmJiBwYXJlbnQgKSB7XG4gICAgICAgICAgICAgICAgZml4LnBhcmVudCA9IHBhcmVudDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIG5vZGUuaGFzT3duUHJvcGVydHkoaSkgKSB7XG4gICAgICAgICAgICAgICAgZml4W2ldID0gbm9kZVtpXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBmaXg7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQG1lbWJlcm9mIENvbnRhaW5lciNcbiAgICAgKiBAbWVtYmVyIHtOb2RlW119IG5vZGVzIC0gYW4gYXJyYXkgY29udGFpbmluZyB0aGUgY29udGFpbmVy4oCZcyBjaGlsZHJlblxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZSgnYSB7IGNvbG9yOiBibGFjayB9Jyk7XG4gICAgICogcm9vdC5ub2Rlcy5sZW5ndGggICAgICAgICAgIC8vPT4gMVxuICAgICAqIHJvb3Qubm9kZXNbMF0uc2VsZWN0b3IgICAgICAvLz0+ICdhJ1xuICAgICAqIHJvb3Qubm9kZXNbMF0ubm9kZXNbMF0ucHJvcCAvLz0+ICdjb2xvcidcbiAgICAgKi9cblxufVxuXG5leHBvcnQgZGVmYXVsdCBDb250YWluZXI7XG5cblxuLyoqXG4gKiBAY2FsbGJhY2sgY2hpbGRDb25kaXRpb25cbiAqIEBwYXJhbSB7Tm9kZX0gbm9kZSAgICAtIGNvbnRhaW5lciBjaGlsZFxuICogQHBhcmFtIHtudW1iZXJ9IGluZGV4IC0gY2hpbGQgaW5kZXhcbiAqIEBwYXJhbSB7Tm9kZVtdfSBub2RlcyAtIGFsbCBjb250YWluZXIgY2hpbGRyZW5cbiAqIEByZXR1cm4ge2Jvb2xlYW59XG4gKi9cblxuLyoqXG4gKiBAY2FsbGJhY2sgY2hpbGRJdGVyYXRvclxuICogQHBhcmFtIHtOb2RlfSBub2RlICAgIC0gY29udGFpbmVyIGNoaWxkXG4gKiBAcGFyYW0ge251bWJlcn0gaW5kZXggLSBjaGlsZCBpbmRleFxuICogQHJldHVybiB7ZmFsc2V8dW5kZWZpbmVkfSByZXR1cm5pbmcgYGZhbHNlYCB3aWxsIGJyZWFrIGl0ZXJhdGlvblxuICovXG4iXX0= + + +/***/ }), +/* 23 */ +/***/ (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; }; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) { + +var stripBom = __webpack_require__(209); +exports.typeOf = __webpack_require__(25); + +/** + * Returns true if `val` is a buffer + */ + +exports.isBuffer = function(val) { + return exports.typeOf(val) === 'buffer'; +}; + +/** + * Returns true if `val` is an object + */ + +exports.isObject = function(val) { + return exports.typeOf(val) === 'object'; +}; + +/** + * Cast `input` to a buffer + */ + +exports.toBuffer = function(input) { + if (typeof input === 'string') { + return new Buffer(input); + } + return input; +}; + +/** + * Cast `val` to a string. + */ + +exports.toString = function(input) { + if (exports.isBuffer(input)) { + return stripBom(String(input)); + } + if (typeof input !== 'string') { + throw new TypeError('expected input to be a string or buffer'); + } + return stripBom(input); +}; + +/** + * Cast `val` to an array. + */ + +exports.arrayify = function(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Returns true if `str` starts with `substr`. + */ + +exports.startsWith = function(str, substr, len) { + if (typeof len !== 'number') len = substr.length; + return str.slice(0, len) === substr; +}; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10).Buffer)) + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + var type = typeof val; + + // primitivies + if (type === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (type === 'string' || val instanceof String) { + return 'string'; + } + if (type === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (type === 'function' || val instanceof Function) { + if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') { + return 'generatorfunction'; + } + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + if (type === '[object Map Iterator]') { + return 'mapiterator'; + } + if (type === '[object Set Iterator]') { + return 'setiterator'; + } + if (type === '[object String Iterator]') { + return 'stringiterator'; + } + if (type === '[object Array Iterator]') { + return 'arrayiterator'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + return val.constructor + && typeof val.constructor.isBuffer === 'function' + && val.constructor.isBuffer(val); +} + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + + + + +var Schema = __webpack_require__(7); + + +module.exports = new Schema({ + explicit: [ + __webpack_require__(141), + __webpack_require__(139), + __webpack_require__(134) + ] +}); + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _container = __webpack_require__(22); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF0LXJ1bGUuZXM2Il0sIm5hbWVzIjpbIkF0UnVsZSIsImRlZmF1bHRzIiwidHlwZSIsImFwcGVuZCIsIm5vZGVzIiwiY2hpbGRyZW4iLCJwcmVwZW5kIl0sIm1hcHBpbmdzIjoiOzs7O0FBQUE7Ozs7Ozs7Ozs7OztBQUVBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7SUFrQk1BLE07OztBQUVGLGtCQUFZQyxRQUFaLEVBQXNCO0FBQUE7O0FBQUEsaURBQ2xCLHNCQUFNQSxRQUFOLENBRGtCOztBQUVsQixVQUFLQyxJQUFMLEdBQVksUUFBWjtBQUZrQjtBQUdyQjs7bUJBRURDLE0scUJBQW9CO0FBQUE7O0FBQ2hCLFFBQUssQ0FBQyxLQUFLQyxLQUFYLEVBQW1CLEtBQUtBLEtBQUwsR0FBYSxFQUFiOztBQURILHNDQUFWQyxRQUFVO0FBQVZBLGNBQVU7QUFBQTs7QUFFaEIsV0FBTyw4Q0FBTUYsTUFBTixrREFBZ0JFLFFBQWhCLEVBQVA7QUFDSCxHOzttQkFFREMsTyxzQkFBcUI7QUFBQTs7QUFDakIsUUFBSyxDQUFDLEtBQUtGLEtBQVgsRUFBbUIsS0FBS0EsS0FBTCxHQUFhLEVBQWI7O0FBREYsdUNBQV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W1pY29sb25gOiBjb250YWlucyB0cnVlIGlmIHRoZSBsYXN0IGNoaWxkIGhhc1xuICAgICAqICAgYW4gKG9wdGlvbmFsKSBzZW1pY29sb24uXG4gICAgICogKiBgYWZ0ZXJOYW1lYDogdGhlIHNwYWNlIGJldHdlZW4gdGhlIGF0LXJ1bGUgbmFtZSBhbmQgaXRzIHBhcmFtZXRlcnMuXG4gICAgICpcbiAgICAgKiBQb3N0Q1NTIGNsZWFucyBhdC1ydWxlIHBhcmFtZXRlcnMgZnJvbSBjb21tZW50cyBhbmQgZXh0cmEgc3BhY2VzLFxuICAgICAqIGJ1dCBpdCBzdG9yZXMgb3JpZ2luIGNvbnRlbnQgaW4gcmF3cyBwcm9wZXJ0aWVzLlxuICAgICAqIEFzIHN1Y2gsIGlmIHlvdSBkb27igJl0IGNoYW5nZSBhIGRlY2xhcmF0aW9u4oCZcyB2YWx1ZSxcbiAgICAgKiBQb3N0Q1NTIHdpbGwgdXNlIHRoZSByYXcgdmFsdWUgd2l0aCBjb21tZW50cy5cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJyAgQG1lZGlhXFxucHJpbnQge1xcbn0nKVxuICAgICAqIHJvb3QuZmlyc3QuZmlyc3QucmF3cyAvLz0+IHsgYmVmb3JlOiAnICAnLFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYmV0d2VlbjogJyAnLFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYWZ0ZXJOYW1lOiAnXFxuJyxcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIGFmdGVyOiAnXFxuJyB9XG4gICAgICovXG59XG5cbmV4cG9ydCBkZWZhdWx0IEF0UnVsZTtcbiJdfQ== + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _node = __webpack_require__(30); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiXSwibWFwcGluZ3MiOiI7Ozs7QUFBQTs7Ozs7Ozs7Ozs7O0FBRUE7Ozs7Ozs7O0lBUU1BLE87OztBQUVGLG1CQUFZQyxRQUFaLEVBQXNCO0FB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IGFzIGl0IHdhcyBpbiB0aGUgb3JpZ2luIGlucHV0LlxuICAgICAqXG4gICAgICogRXZlcnkgcGFyc2VyIHNhdmVzIGl0cyBvd24gcHJvcGVydGllcyxcbiAgICAgKiBidXQgdGhlIGRlZmF1bHQgQ1NTIHBhcnNlciB1c2VzOlxuICAgICAqXG4gICAgICogKiBgYmVmb3JlYDogdGhlIHNwYWNlIHN5bWJvbHMgYmVmb3JlIHRoZSBub2RlLlxuICAgICAqICogYGxlZnRgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZXR3ZWVuIGAvKmAgYW5kIHRoZSBjb21tZW504oCZcyB0ZXh0LlxuICAgICAqICogYHJpZ2h0YDogdGhlIHNwYWNlIHN5bWJvbHMgYmV0d2VlbiB0aGUgY29tbWVudOKAmXMgdGV4dC5cbiAgICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29tbWVudDtcbiJdfQ== + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof 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__(54); + +var _cssSyntaxError2 = _interopRequireDefault(_cssSyntaxError); + +var _previousMap = __webpack_require__(173); + +var _previousMap2 = _interopRequireDefault(_previousMap); + +var _path = __webpack_require__(8); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LmVzNiJdLCJuYW1lcyI6WyJzZXF1ZW5jZSIsIklucHV0IiwiY3NzIiwib3B0cyIsInRvU3RyaW5nIiwiRXJyb3IiLCJzbGljZSIsImZyb20iLCJ0ZXN0IiwiZmlsZSIsInJl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mplY3R9IFtvcHRzXSAtIHtAbGluayBQcm9jZXNzb3IjcHJvY2Vzc30gb3B0aW9uc1xuICAgICAqL1xuICAgIGNvbnN0cnVjdG9yKGNzcywgb3B0cyA9IHsgfSkge1xuICAgICAgICBpZiAoIGNzcyA9PT0gbnVsbCB8fCB0eXBlb2YgY3NzID09PSAnb2JqZWN0JyAmJiAhY3NzLnRvU3RyaW5nICkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBQb3N0Q1NTIHJlY2VpdmVkICR7IGNzcyB9IGluc3RlYWQgb2YgQ1NTIHN0cmluZ2ApO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEBtZW1iZXIge3N0cmluZ30gLSBpbnB1dCBDU1Mgc291cmNlXG4gICAgICAgICAqXG4gICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAqIGNvbnN0IGlucHV0ID0gcG9zdGNzcy5wYXJzZSgnYXt9JywgeyBmcm9tOiBmaWxlIH0pLmlucHV0O1xuICAgICAgICAgKiBpbnB1dC5jc3MgLy89PiBcImF7fVwiO1xuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5jc3MgPSBjc3MudG9TdHJpbmcoKTtcblxuICAgICAgICBpZiAoIHRoaXMuY3NzWzBdID09PSAnXFx1RkVGRicgfHwgdGhpcy5jc3NbMF0gPT09ICdcXHVGRkZFJyApIHtcbiAgICAgICAgICAgIHRoaXMuY3NzID0gdGhpcy5jc3Muc2xpY2UoMSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIG9wdHMuZnJvbSApIHtcbiAgICAgICAgICAgIGlmICggL15cXHcrOlxcL1xcLy8udGVzdChvcHRzLmZyb20pICkge1xuICAgICAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICAgICAqIEBtZW1iZXIge3N0cmluZ30gLSBUaGUgYWJzb2x1dGUgcGF0aCB0byB0aGUgQ1NTIHNvdXJjZSBmaWxlXG4gICAgICAgICAgICAgICAgICogICAgICAgICAgICAgICAgICAgIGRlZmluZWQgd2l0aCB0aGUgYGZyb21gIG9wdGlvbi5cbiAgICAgICAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAgICAgICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoY3NzLCB7IGZyb206ICdhLmNzcycgfSk7XG4gICAgICAgICAgICAgICAgICogcm9vdC5zb3VyY2UuaW5wdXQuZmlsZSAvLz0+ICcvaG9tZS9haS9hLmNzcydcbiAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICB0aGlzLmZpbGUgPSBvcHRzLmZyb207XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuZmlsZSA9IHBhdGgucmVzb2x2ZShvcHRzLmZyb20pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbGV0IG1hcCA9IG5ldyBQcmV2aW91c01hcCh0aGlzLmNzcywgb3B0cyk7XG4gICAgICAgIGlmICggbWFwLnRleHQgKSB7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEBtZW1iZXIge1ByZXZpb3VzTWFwfSAtIFRoZSBpbnB1dCBzb3VyY2UgbWFwIHBhc3NlZCBmcm9tXG4gICAgICAgICAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICBhIGNvbXBpbGF0aW9uIHN0ZXAgYmVmb3JlIFBvc3RDU1NcbiAgICAgICAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIChmb3IgZXhhbXBsZSwgZnJvbSBTYXNzIGNvbXBpbGVyKS5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgICAgICogcm9vdC5zb3VyY2UuaW5wdXQubWFwLmNvbnN1bWVyKCkuc291cmNlcyAvLz0+IFsnYS5zYXNzJ11cbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5tYXAgPSBtYXA7XG4gICAgICAgICAgICBsZXQgZmlsZSA9IG1hcC5jb25zdW1lcigpLmZpbGU7XG4gICAgICAgICAgICBpZiAoICF0aGlzLmZpbGUgJiYgZmlsZSApIHRoaXMuZmlsZSA9IHRoaXMubWFwUmVzb2x2ZShmaWxlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICggIXRoaXMuZmlsZSApIHtcbiAgICAgICAgICAgIHNlcXVlbmNlICs9IDE7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEBtZW1iZXIge3N0cmluZ30gLSBUaGUgdW5pcXVlIElEIG9mIHRoZSBDU1Mgc291cmNlLiBJdCB3aWxsIGJlXG4gICAgICAgICAgICAgKiAgICAgICAgICAgICAgICAgICAgY3JlYXRlZCBpZiBgZnJvbWAgb3B0aW9uIGlzIG5vdCBwcm92aWRlZFxuICAgICAgICAgICAgICogICAgICAgICAgICAgICAgICAgIChiZWNhdXNlIFBvc3RDU1MgZG9lcyBub3Qga25vdyB0aGUgZmlsZSBwYXRoKS5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoY3NzKTtcbiAgICAgICAgICAgICAqIHJvb3Quc291cmNlLmlucHV0LmZpbGUgLy89PiB1bmRlZmluZWRcbiAgICAgICAgICAgICAqIHJvb3Quc291cmNlLmlucHV0LmlkICAgLy89PiBcIjxpbnB1dCBjc3MgMT5cIlxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmlkICAgPSAnPGlucHV0IGNzcyAnICsgc2VxdWVuY2UgKyAnPic7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCB0aGlzLm1hcCApIHRoaXMubWFwLmZpbGUgPSB0aGlzLmZyb207XG4gICAgfVxuXG4gICAgZXJyb3IobWVzc2FnZSwgbGluZSwgY29sdW1uLCBvcHRzID0geyB9KSB7XG4gICAgICAgIGxldCByZ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EByZXR1cm4ge2ZpbGVQb3NpdGlvbn0gcG9zaXRpb24gaW4gaW5wdXQgc291cmNlXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIHJvb3Quc291cmNlLmlucHV0Lm9yaWdpbigxLCAxKSAvLz0+IHsgZmlsZTogJ2EuY3NzJywgbGluZTogMywgY29sdW1uOiAxIH1cbiAgICAgKi9cbiAgICBvcmlnaW4obGluZSwgY29sdW1uKSB7XG4gICAgICAgIGlmICggIXRoaXMubWFwICkgcmV0dXJuIGZhbHNlO1xuICAgICAgICBsZXQgY29uc3VtZXIgPSB0aGlzLm1hcC5jb25zdW1lcigpO1xuXG4gICAgICAgIGxldCBmcm9tID0gY29uc3VtZXIub3JpZ2luYWxQb3NpdGlvbkZvcih7IGxpbmUsIGNvbHVtbiB9KTtcbiAgICAgICAgaWYgKCAhZnJvbS5zb3VyY2UgKSByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgbGV0IHJlc3VsdCA9IHtcbiAgICAgICAgICAgIGZpbGU6ICAgdGhpcy5tYXBSZXNvbHZlKGZyb20uc291cmNlKSxcbiAgICAgICAgICAgIGxpbmU6ICAgZnJvbS5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBmcm9tLmNvbHVtblxuICAgICAgICB9O1xuXG4gICAgICAgIGxldCBzb3VyY2UgPSBjb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKGZyb20uc291cmNlKTtcbiAgICAgICAgaWYgKCBzb3VyY2UgKSByZXN1bHQuc291cmNlID0gc291cmNlO1xuXG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuXG4gICAgbWFwUmVzb2x2ZShmaWxlKSB7XG4gICAgICAgIGlmICggL15cXHcrOlxcL1xcLy8udGVzdChmaWxlKSApIHtcbiAgICAgICAgICAgIHJldHVybiBmaWxlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHBhdGgucmVzb2x2ZSh0aGlzLm1hcC5jb25zdW1lcigpLnNvdXJjZVJvb3QgfHwgJy4nLCBmaWxlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoZSBDU1Mgc291cmNlIGlkZW50aWZpZXIuIENvbnRhaW5zIHtAbGluayBJbnB1dCNmaWxlfSBpZiB0aGUgdXNlclxuICAgICAqIHNldCB0aGUgYGZyb21gIG9wdGlvbiwgb3Ige0BsaW5rIElucHV0I2lkfSBpZiB0aGV5IGRpZCBub3QuXG4gICAgICogQHR5cGUge3N0cmluZ31cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoY3NzLCB7IGZyb206ICdhLmNzcycgfSk7XG4gICAgICogcm9vdC5zb3VyY2UuaW5wdXQuZnJvbSAvLz0+IFwiL2hvbWUvYWkvYS5jc3NcIlxuICAgICAqXG4gICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoY3NzKTtcbiAgICAgKiByb290LnNvdXJjZS5pbnB1dC5mcm9tIC8vPT4gXCI8aW5wdXQgY3NzIDE+XCJcbiAgICAgKi9cbiAgICBnZXQgZnJvbSgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuZmlsZSB8fCB0aGlzLmlkO1xuICAgIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBJbnB1dDtcblxuLyoqXG4gKiBAdHlwZWRlZiAge29iamVjdH0gZmlsZVBvc2l0aW9uXG4gKiBAcHJvcGVydHkge3N0cmluZ30gZmlsZSAgIC0gcGF0aCB0byBmaWxlXG4gKiBAcHJvcGVydHkge251bWJlcn0gbGluZSAgIC0gc291cmNlIGxpbmUgaW4gZmlsZVxuICogQHByb3BlcnR5IHtudW1iZXJ9IGNvbHVtbiAtIHNvdXJjZSBjb2x1bW4gaW4gZmlsZVxuICovXG4iXX0= + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _cssSyntaxError = __webpack_require__(54); + +var _cssSyntaxError2 = _interopRequireDefault(_cssSyntaxError); + +var _stringifier = __webpack_require__(32); + +var _stringifier2 = _interopRequireDefault(_stringifier); + +var _stringify = __webpack_require__(60); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _warnOnce = __webpack_require__(62); + +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() { + 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]; + }; + + /** + * 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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGUuZXM2Il0sIm5hbWVzIjpbImNsb25lTm9kZSIsIm9iaiIsInBhcmVudCIsImNsb25lZCIsImNvbnN0cnVjdG9yIiwiaSIsImhhc093blByb3BlcnR5IiwidmFsdWUiLCJ0eXBlIiwiQXJyYXkiLCJtYXAiLCJqIiwiTm9kZSIsImRlZmF1bHRzIiwicmF3cyIsIkVycm9yIiwiSlNPTiIsInN0cmluZ2lmeSIsIm5hbWUiLCJlcnJvciIsIm1lc3NhZ2UiLCJvcHRzIiwic291cmNlIiwicG9zIiwicG9zaXRpb25CeSIsImlucHV0IiwibGluZSIsImNvbHVtbiIsIndhcm4iLCJyZXN1bHQiLCJ0ZXh0IiwiZGF0YSIsIm5vZGUiLCJyZW1vdmUiLCJyZW1vdmVDaGlsZCIsInVuZGVmaW5lZCIsInRvU3RyaW5nIiwic3RyaW5naWZpZXIiLCJjbG9uZSIsIm92ZXJyaWRlcyIsImNsb25lQmVmb3JlIiwiaW5zZXJ0QmVmb3JlIiwiY2xvbm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ICAgKiBAZXhhbXBsZVxuICAgICAqIGRlY2wuYmVmb3JlKCdjb250ZW50OiBcIlwiJyk7XG4gICAgICovXG4gICAgYmVmb3JlKGFkZCkge1xuICAgICAgICB0aGlzLnBhcmVudC5pbnNlcnRCZWZvcmUodGhpcywgYWRkKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogSW5zZXJ0IG5ldyBub2RlIGFmdGVyIGN1cnJlbnQgbm9kZSB0byBjdXJyZW50IG5vZGXigJlzIHBhcmVudC5cbiAgICAgKlxuICAgICAqIEp1c3QgYWxpYXMgZm9yIGBub2RlLnBhcmVudC5pbnNlcnRBZnRlcihub2RlLCBhZGQpYC5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7Tm9kZXxvYmplY3R8c3RyaW5nfE5vZGVbXX0gYWRkIC0gbmV3IG5vZGVcbiAgICAgKlxuICAgICAqIEByZXR1cm4ge05vZGV9IHRoaXMgbm9kZSBmb3IgbWV0aG9kcyBjaGFpbi5cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogZGVjbC5hZnRlcignY29sb3I6IGJsYWNrJyk7XG4gICAgICovXG4gICAgYWZ0ZXIoYWRkKSB7XG4gICAgICAgIHRoaXMucGFyZW50Lmluc2VydEFmdGVyKHRoaXMsIGFkZCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHRvSlNPTigpIHtcbiAgICAgICAgbGV0IGZpeGVkID0geyB9O1xuXG4gICAgICAgIGZvciAoIGxldCBuYW1lIGluIHRoaXMgKSB7XG4gICAgICAgICAgICBpZiAoICF0aGlzLmhhc093blByb3BlcnR5KG5hbWUpICkgY29udGludWU7XG4gICAgICAgICAgICBpZiAoIG5hbWUgPT09ICdwYXJlbnQnICkgY29udGludWU7XG4gICAgICAgICAgICBsZXQgdmFsdWUgPSB0aGlzW25hbWVdO1xuXG4gICAgICAgICAgICBpZiAoIHZhbHVlIGluc3RhbmNlb2YgQXJyYXkgKSB7XG4gICAgICAgICAgICAgICAgZml4ZWRbbmFtZV0gPSB2YWx1ZS5tYXAoIGkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiBpID09PSAnb2JqZWN0JyAmJiBpLnRvSlNPTiApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpLnRvSlNPTigpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIHR5cGVvZiB2YWx1ZSA9PT0gJ29iamVjdCcgJiYgdmFsdWUudG9KU09OICkge1xuICAgICAgICAgICAgICAgIGZpeGVkW25hbWVdID0gdmFsdWUudG9KU09OKCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZpeGVkW25hbWVdID0gdmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZml4ZWQ7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBhIHtAbGluayBOb2RlI3Jhd3N9IHZhbHVlLiBJZiB0aGUgbm9kZSBpcyBtaXNzaW5nXG4gICAgICogdGhlIGNvZGUgc3R5bGUgcHJvcGVydHkgKGJlY2F1c2UgdGhlIG5vZGUgd2FzIG1hbnVhbGx5IGJ1aWx0IG9yIGNsb25lZCksXG4gICAgICogUG9zdENTUyB3aWxsIHRyeSB0byBhdXRvZGV0ZWN0IHRoZSBjb2RlIHN0eWxlIHByb3BlcnR5IGJ5IGxvb2tpbmdcbiAgICAgKiBhdCBvdGhlciBub2RlcyBpbiB0aGUgdHJlZS5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwcm9wICAgICAgICAgIC0gbmFtZSBvZiBjb2RlIHN0eWxlIH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GxldCByZXN1bHQgPSB0aGlzO1xuICAgICAgICB3aGlsZSAoIHJlc3VsdC5wYXJlbnQgKSByZXN1bHQgPSByZXN1bHQucGFyZW50O1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIGNsZWFuUmF3cyhrZWVwQmV0d2Vlbikge1xuICAgICAgICBkZWxldGUgdGhpcy5yYXdzLmJlZm9yZTtcbiAgICAgICAgZGVsZXRlIHRoaXMucmF3cy5hZnRlcjtcbiAgICAgICAgaWYgKCAha2VlcEJldHdlZW4gKSBkZWxldGUgdGhpcy5yYXdzLmJldHdlZW47XG4gICAgfVxuXG4gICAgcG9zaXRpb25JbnNpZGUoaW5kZXgpIHtcbiAgICAgICAgbGV0IHN0cmluZyA9IHRoaXMudG9TdHJpbmcoKTtcbiAgICAgICAgbGV0IGNvbHVtbiA9IHRoaXMuc291cmNlLnN0YXJ0LmNvbHVtbjtcbiAgICAgICAgbGV0IGxpbmUgICA9IHRoaXMuc291cmNlLnN0YXJ0LmxpbmU7XG5cbiAgICAgICAgZm9yICggbGV0IGkgPSAwOyBpIDwgaW5kZXg7IGkrKyApIHtcbiAgICAgICAgICAgIGlmICggc3RyaW5nW2ldID09PSAnXFxuJyApIHtcbiAgICAgICAgICAgICAgICBjb2x1bW4gPSAxO1xuICAgICAgICAgICAgICAgIGxpbmUgICs9IDE7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbHVtbiArPSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHsgbGluZSwgY29sdW1uIH07XG4gICAgfVxuXG4gICAgcG9zaXRpb25CeShvcHRzKSB7XG4gICAgICAgIGxldCBwb3MgPSB0aGlzLnNvdXJjZS5zdGFydDtcbiAgICAgICAgaWYgKCBvcHRzLmluZGV4ICkge1xuICAgICAgICAgICAgcG9zID0gdGhpcy5wb3NpdGlvbkluc2lkZShvcHRzLmluZGV4KTtcbiAgICAgIC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wgaWYgeW91IGRvbuKAmXQgY2hhbmdlIGEgZGVjbGFyYXRpb27igJlzIHZhbHVlLFxuICAgICAqIFBvc3RDU1Mgd2lsbCB1c2UgdGhlIHJhdyB2YWx1ZSB3aXRoIGNvbW1lbnRzLlxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZSgnYSB7XFxuICBjb2xvcjpibGFja1xcbn0nKVxuICAgICAqIHJvb3QuZmlyc3QuZmlyc3QucmF3cyAvLz0+IHsgYmVmb3JlOiAnXFxuICAnLCBiZXR3ZWVuOiAnOicgfVxuICAgICAqL1xuXG59XG5cbmV4cG9ydCBkZWZhdWx0IE5vZGU7XG5cbi8qKlxuICogQHR5cGVkZWYge29iamVjdH0gcG9zaXRpb25cbiAqIEBwcm9wZXJ0eSB7bnVtYmVyfSBsaW5lICAgLSBzb3VyY2UgbGluZSBpbiBmaWxlXG4gKiBAcHJvcGVydHkge251bWJlcn0gY29sdW1uIC0gc291cmNlIGNvbHVtbiBpbiBmaWxlXG4gKi9cblxuLyoqXG4gKiBAdHlwZWRlZiB7b2JqZWN0fSBzb3VyY2VcbiAqIEBwcm9wZXJ0eSB7SW5wdXR9IGlucHV0ICAgIC0ge0BsaW5rIElucHV0fSB3aXRoIGlucHV0IGZpbGVcbiAqIEBwcm9wZXJ0eSB7cG9zaXRpb259IHN0YXJ0IC0gVGhlIHN0YXJ0aW5nIHBvc2l0aW9uIG9mIHRoZSBub2Rl4oCZcyBzb3VyY2VcbiAqIEBwcm9wZXJ0eSB7cG9zaXRpb259IGVuZCAgIC0gVGhlIGVuZGluZyBwb3NpdGlvbiBvZiB0aGUgbm9kZeKAmXMgc291cmNlXG4gKi9cbiJdfQ== + + +/***/ }), +/* 31 */ +/***/ (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 _container = __webpack_require__(22); + +var _container2 = _interopRequireDefault(_container); + +var _list = __webpack_require__(171); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGUuZXM2Il0sIm5hbWVzIjpbIlJ1bGUiLCJkZWZhdWx0cyIsInR5cGUiLCJub2RlcyIsImNvbW1hIiwic2VsZWN0b3IiLCJ2YWx1ZXMiLCJtYXRjaCIsInNlcCIsInJhdyIsImpvaW4iXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBOzs7O0FBQ0E7Ozs7Ozs7Ozs7OztBQUVBOzs7Ozs7Ozs7OztJQVdNQSxJOzs7QUFFRixnQkFBWUMsUUFBWixFQUFzQjtBQUFBOztBQUFBLGlEQUNsQixzQkFBTUEsUUFBTixDQURrQjs7QUFFbEIsVUFBS0MsSUFBTC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UoJ2Ege1xcbiAgY29sb3I6YmxhY2tcXG59JylcbiAgICAgKiByb290LmZpcnN0LmZpcnN0LnJhd3MgLy89PiB7IGJlZm9yZTogJycsIGJldHdlZW46ICcgJywgYWZ0ZXI6ICdcXG4nIH1cbiAgICAgKi9cblxufVxuXG5leHBvcnQgZGVmYXVsdCBSdWxlO1xuIl19 + + +/***/ }), +/* 32 */ +/***/ (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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmaWVyLmVzNiJdLCJuYW1lcyI6WyJkZWZhdWx0UmF3IiwiY29sb24iLCJpbmRlbnQiLCJiZWZvcmVEZWNsIiwiYmVmb3JlUnVsZSIsImJlZm9yZU9wZW4iLCJiZWZvcmVDbG9zZSIsImJlZm9yZUNvbW1lbnQiLCJhZnRlciIsImVtcHR5Qm9keSIsImNvbW1lbnRMZ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gICB0aGlzLmJ1aWxkZXIoc3RyaW5nLCBub2RlKTtcbiAgICB9XG5cbiAgICBydWxlKG5vZGUpIHtcbiAgICAgICAgdGhpcy5ibG9jayhub2RlLCB0aGlzLnJhd1ZhbHVlKG5vZGUsICdzZWxlY3RvcicpKTtcbiAgICAgICAgaWYgKCBub2RlLnJhd3Mub3duU2VtaWNvbG9uICkge1xuICAgICAgICAgICAgdGhpcy5idWlsZGVyKG5vZGUucmF3cy5vd25TZW1pY29sb24sIG5vZGUsICdlbmQnKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGF0cnVsZShub2RlLCBzZW1pY29sb24pIHtcbiAgICAgICAgbGV0IG5hbWUgICA9ICdAJyArIG5vZGUubmFtZTtcbiAgICAgICAgbGV0IHBhcmFtcyA9IG5vZGUucGFyYW1zID8gdGhpcy5yYXdWYWx1ZShub2RlLCAncGFyYW1zJykgOiAnJztcblxuICAgICAgICBpZiAoIHR5cGVvZiBub2RlLnJhd3MuYWZ0ZXJOYW1lICE9PSAndW5kZWZpbmVkJyApIHtcbiAgICAgICAgICAgIG5hbWUgKz0gbm9kZS5yYXdzLmFmdGVyTmFtZTtcbiAgICAgICAgfSBlbHNlIGlmICggcGFyYW1zICkge1xuICAgICAgICAgICAgbmFtZSArPSAnICc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIG5vZGUubm9kZXMgKSB7XG4gICAgICAgICAgICB0aGlzLmJsb2NrKG5vZGUsIG5hbWUgKyBwYXJhbXMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbGV0IGVuZCA9IChub2RlLnJhd3MuYmV0d2VlbiB8fCAnJykgKyAoc2VtaWNvbG9uID8gJzsnIDogJycpO1xuICAgICAgICAgICAgdGhpcy5idWlsZGVyKG5hbWUgKyBwYXJhbXMgKyBlbmQsIG5vZGUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgYm9keShub2RlKSB7XG4gICAgICAgIGxldCBsYXN0ID0gbm9kZS5ub2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PSB7IH07XG4gICAgICAgIGlmICggdHlwZW9mIHJvb3QucmF3Q2FjaGVbZGV0ZWN0XSAhPT0gJ3VuZGVmaW5lZCcgKSB7XG4gICAgICAgICAgICByZXR1cm4gcm9vdC5yYXdDYWNoZVtkZXRlY3RdO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCBkZXRlY3QgPT09ICdiZWZvcmUnIHx8IGRldGVjdCA9PT0gJ2FmdGVyJyApIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmJlZm9yZUFmdGVyKG5vZGUsIGRldGVjdCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsZXQgbWV0aG9kID0gJ3JhdycgKyBjYXBpdGFsaXplKGRldGVjdCk7XG4gICAgICAgICAgICBpZiAoIHRoaXNbbWV0aG9kXSApIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXNbbWV0aG9kXShyb290LCBub2RlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcm9vdC53YWxrKCBpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBpLnJhd3Nbb3duXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCB0eXBlb2YgdmFsdWUgIT09ICd1bmRlZmluZWQnICkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCB0eXBlb2YgdmFsdWUgPT09ICd1bmRlZmluZWQnICkgdmFsdWUgPSBkZWZhdWx0UmF3W2RldGVjdF07XG5cbiAgICAgICAgcm9vdC5yYXdDYWNoZVtkZXRlY3RdID0gdmFsdWU7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdTZW1pY29sb24ocm9vdCkge1xuICAgICAgICBsZXQgdmFsdWU7XG4gICAgICAgIHJvb3Qud2FsayggaSA9PiB7XG4gICAgICAgICAgICBpZiAoIGkubm9kZXMgJiYgaS5ub2Rlcy5sZW5ndGggJiYgaS5sYXN0LnR5cGUgPT09ICdkZWNsJyApIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IGkucmF3cy5zZW1pY29sb247XG4gICAgICAgICAgICAgICAgaWYgKCB0eXBlb2YgdmFsdWUgIT09ICd1bmRlZmluZWQnICkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cblxuICAgIHJhd0VtcHR5Qm9keShyb290KSB7XG4gICAgICAgIGxldCB2YWx1ZTtcbiAgICAgICAgcm9vdC53YWxrKCBpID0+IHtcbiAgICAgICAgICAgIGlmICggaS5ub2RlcyAmJiBpLm5vZGVzLmxlbmd0aCA9PT0gMCApIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IGkucmF3cy5hZnRlcjtcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiB2YWx1ZSAhPT0gJ3VuZGVmaW5lZCcgKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuXG4gICAgcmF3SW5kZW50KHJvb3QpIHtcbiAgICAgICAgaWYgKCByb290LnJhd3MuaW5kZW50ICkgcmV0dXJuIHJvb3QucmF3cy5pbmRlbnQ7XG4gICAgICAgIGxldCB2YWx1ZTtcbiAgICAgICAgcm9vdC53YWxrKCBpID0+IHtcbiAgICAgICAgICAgIGxldCBwID0gaS5wYXJlbnQ7XG4gICAgICAgICAgICBpZiAoIHAgJiYgcCAhPT0gcm9vdCAmJiBwLnBhcmVudCAmJiBwLnBhcmVudCA9PT0gcm9vdCApIHtcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiBpLnJhd3MuYmVmb3JlICE9PSAndW5kZWZpbmVkJyApIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHBhcnRzID0gaS5yYXdzLmJlZm9yZS5zcGxpdCgnXFxuJyk7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gcGFydHNbcGFydHMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUucmVwbGFjZSgvW15cXHNdL2csICcnKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdCZWZvcmVDb21tZW50KHJvb3QsIG5vZGUpIHtcbiAgICAgICAgbGV0IHZhbHVlO1xuICAgICAgICByb290LndhbGtDb21tZW50cyggaSA9PiB7XG4gICAgICAgICAgICBpZiAoIHR5cGVvZiBpLnJhd3MuYmVmb3JlICE9PSAndW5kZWZpbmVkJyApIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IGkucmF3cy5iZWZvcmU7XG4gICAgICAgICAgICAgICAgaWYgKCB2YWx1ZS5pbmRleE9mKCdcXG4nKSAhPT0gLTEgKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUucmVwbGFjZSgvW15cXG5dKyQvLCAnJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmICggdHlwZW9mIHZhbHVlID09PSAndW5kZWZpbmVkJyApIHtcbiAgICAgICAgICAgIHZhbHVlID0gdGhpcy5yYXcobm9kZSwgbnVsbCwgJ2JlZm9yZURlY2wnKTtcbiAgICAgICAgfSBlbHNlIGlmICggdmFsdWUgKSB7XG4gICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnJlcGxhY2UoL1teXFxzXS9nLCAnJyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cblxuICAgIHJhd0JlZm9yZURlY2wocm9vdCwgbm9kZSkge1xuICAgICAgICBsZXQgdmFsdWU7XG4gICAgICAgIHJvb3Qud2Fsa0RlY2xzKCBpID0+IHtcbiAgICAgICAgICAgIGlmICggdHlwZW9mIGkucmF3cy5iZWZvcmUgIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmJlZm9yZTtcbiAgICAgICAgICAgICAgICBpZiAoIHZhbHVlLmluZGV4T2YoJ1xcbicpICE9PSAtMSApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5yZXBsYWNlKC9bXlxcbl0rJC8sICcnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKCB0eXBlb2YgdmFsdWUgPT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnYmVmb3JlUnVsZScpO1xuICAgICAgICB9IGVsc2UgaWYgKCB2YWx1ZSApIHtcbiAgICAgICAgICAgIHZhbHVlID0gdmFsdWUucmVwbGFjZSgvW15cXHNdL2csICcnKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuXG4gICAgcmF3QmVmb3JlUnVsZShyb290KSB7XG4gICAgICAgIGxldCB2YWx1ZTtcbiAgICAgICAgcm9vdC53YWxrKCBpID0+IHtcbiAgICAgICAgICAgIGlmICggaS5ub2RlcyAmJiAoaS5wYXJlbnQgIT09IHJvb3QgfHwgcm9vdC5maXJzdCAhPT0gaSkgKSB7XG4gICAgICAgICAgICAgICAgaWYgKCB0eXBlb2YgaS5yYXdzLmJlZm9yZSAhPT0gJ3VuZGVmaW5lZCcgKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmJlZm9yZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCB2YWx1ZS5pbmRleE9mKCdcXG4nKSAhPT0gLTEgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnJlcGxhY2UoL1teXFxuXSskLywgJycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBpZiAoIHZhbHVlICkgdmFsdWUgPSB2YWx1ZS5yZXBsYWNlKC9bXlxcc10vZywgJycpO1xuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuXG4gICAgcmF3QmVmb3JlQ2xvc2Uocm9vdCkge1xuICAgICAgICBsZXQgdmFsdWU7XG4gICAgICAgIHJvb3Qud2FsayggaSA9PiB7XG4gICAgICAgICAgICBpZiAoIGkubm9kZXMgJiYgaS5ub2Rlcy5sZW5ndGggPiAwICkge1xuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIGkucmF3cy5hZnRlciAhPT0gJ3VuZGVmaW5lZCcgKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmFmdGVyO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIHZhbHVlLmluZGV4T2YoJ1xcbicpICE9PSAtMSApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUucmVwbGFjZSgvW15cXG5dKyQvLCAnJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmICggdmFsdWUgKSB2YWx1ZSA9IHZhbHVlLnJlcGxhY2UoL1teXFxzXS9nLCAnJyk7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdCZWZvcmVPcGVuKHJvb3QpIHtcbiAgICAgICAgbGV0IHZhbHVlO1xuICAgICAgICByb290LndhbGsoIGkgPT4ge1xuICAgICAgICAgICAgaWYgKCBpLnR5cGUgIT09ICdkZWNsJyApIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IGkucmF3cy5iZXR3ZWVuO1xuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIHZhbHVlICE9PSAndW5kZWZpbmVkJyApIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdDb2xvbihyb290KSB7XG4gICAgICAgIGxldCB2YWx1ZTtcbiAgICAgICAgcm9vdC53YWxrRGVjbHMoIGkgPT4ge1xuICAgICAgICAgICAgaWYgKCB0eXBlb2YgaS5yYXdzLmJldHdlZW4gIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmJldHdlZW4ucmVwbGFjZSgvW15cXHM6XS9nLCAnJyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cblxuICAgIGJlZm9yZUFmdGVyKG5vZGUsIGRldGVjdCkge1xuICAgICAgICBsZXQgdmFsdWU7XG4gICAgICAgIGlmICggbm9kZS50eXBlID09PSAnZGVjbCcgKSB7XG4gICAgICAgICAgICB2YWx1ZSA9IHRoaXMucmF3KG5vZGUsIG51bGwsICdiZWZvcmVEZWNsJyk7XG4gICAgICAgIH0gZWxzZSBpZiAoIG5vZGUudHlwZSA9PT0gJ2NvbW1lbnQnICkge1xuICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnYmVmb3JlQ29tbWVudCcpO1xuICAgICAgICB9IGVsc2UgaWYgKCBkZXRlY3QgPT09ICdiZWZvcmUnICkge1xuICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnYmVmb3JlUnVsZScpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnYmVmb3JlQ2xvc2UnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCBidWYgICA9IG5vZGUucGFyZW50O1xuICAgICAgICBsZXQgZGVwdGggPSAwO1xuICAgICAgICB3aGlsZSAoIGJ1ZiAmJiBidWYudHlwZSAhPT0gJ3Jvb3QnICkge1xuICAgICAgICAgICAgZGVwdGggKz0gMTtcbiAgICAgICAgICAgIGJ1ZiA9IGJ1Zi5wYXJlbnQ7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIHZhbHVlLmluZGV4T2YoJ1xcbicpICE9PSAtMSApIHtcbiAgICAgICAgICAgIGxldCBpbmRlbnQgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnaW5kZW50Jyk7XG4gICAgICAgICAgICBpZiAoIGluZGVudC5sZW5ndGggKSB7XG4gICAgICAgICAgICAgICAgZm9yICggbGV0IHN0ZXAgPSAwOyBzdGVwIDwgZGVwdGg7IHN0ZXArKyApIHZhbHVlICs9IGluZGVudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdWYWx1ZShub2RlLCBwcm9wKSB7XG4gICAgICAgIGxldCB2YWx1ZSA9IG5vZGVbcHJvcF07XG4gICAgICAgIGxldCByYXcgICA9IG5vZGUucmF3c1twcm9wXTtcbiAgICAgICAgaWYgKCByYXcgJiYgcmF3LnZhbHVlID09PSB2YWx1ZSApIHtcbiAgICAgICAgICAgIHJldHVybiByYXcucmF3O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgICAgICB9XG4gICAgfVxuXG59XG5cbmV4cG9ydCBkZWZhdWx0IFN0cmluZ2lmaWVyO1xuIl19 + + +/***/ }), +/* 33 */ +/***/ (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 _node = __webpack_require__(9); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 34 */ +/***/ (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 _container = __webpack_require__(36); + +var _container2 = _interopRequireDefault(_container); + +var _warnOnce = __webpack_require__(5); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF0LXJ1bGUuZXM2Il0sIm5hbWVzIjpbIkF0UnVsZSIsImRlZmF1bHRzIiwidHlwZSIsImFwcGVuZCIsIm5vZGVzIiwiY2hpbGRyZW4iLCJwcmVwZW5kIiwicmF3cyIsImFmdGVyTmFtZSIsInZhbCIsInBhcmFtcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUE7Ozs7QUFDQTs7Ozs7Ozs7Ozs7O0FBRUE7Ozs7Ozs7Ozs7Ozs7Ozs7OztJQWtCTUEsTTs7O0FBR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bmdlIGEgZGVjbGFyYXRpb27igJlzIHZhbHVlLFxuICAgICAqIFBvc3RDU1Mgd2lsbCB1c2UgdGhlIHJhdyB2YWx1ZSB3aXRoIGNvbW1lbnRzLlxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZSgnICBAbWVkaWFcXG5wcmludCB7XFxufScpXG4gICAgICogcm9vdC5maXJzdC5maXJzdC5yYXdzIC8vPT4geyBiZWZvcmU6ICcgICcsXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgIC8vICAgICBiZXR3ZWVuOiAnICcsXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgIC8vICAgICBhZnRlck5hbWU6ICdcXG4nLFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYWZ0ZXI6ICdcXG4nIH1cbiAgICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgQXRSdWxlO1xuIl19 + + +/***/ }), +/* 35 */ +/***/ (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 _warnOnce = __webpack_require__(5); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _node = __webpack_require__(38); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiLCJyYXdzIiwibGVmdCIsInZ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dGV4dCAtIHRoZSBjb21tZW504oCZcyB0ZXh0XG4gICAgICovXG5cbiAgICAvKipcbiAgICAgKiBAbWVtYmVyb2YgQ29tbWVudCNcbiAgICAgKiBAbWVtYmVyIHtvYmplY3R9IHJhd3MgLSBJbmZvcm1hdGlvbiB0byBnZW5lcmF0ZSBieXRlLXRvLWJ5dGUgZXF1YWxcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICBub2RlIHN0cmluZyBhcyBpdCB3YXMgaW4gdGhlIG9yaWdpbiBpbnB1dC5cbiAgICAgKlxuICAgICAqIEV2ZXJ5IHBhcnNlciBzYXZlcyBpdHMgb3duIHByb3BlcnRpZXMsXG4gICAgICogYnV0IHRoZSBkZWZhdWx0IENTUyBwYXJzZXIgdXNlczpcbiAgICAgKlxuICAgICAqICogYGJlZm9yZWA6IHRoZSBzcGFjZSBzeW1ib2xzIGJlZm9yZSB0aGUgbm9kZS5cbiAgICAgKiAqIGBsZWZ0YDogdGhlIHNwYWNlIHN5bWJvbHMgYmV0d2VlbiBgLypgIGFuZCB0aGUgY29tbWVudOKAmXMgdGV4dC5cbiAgICAgKiAqIGByaWdodGA6IHRoZSBzcGFjZSBzeW1ib2xzIGJldHdlZW4gdGhlIGNvbW1lbnTigJlzIHRleHQuXG4gICAgICovXG59XG5cbmV4cG9ydCBkZWZhdWx0IENvbW1lbnQ7XG4iXX0= + + +/***/ }), +/* 36 */ +/***/ (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 _declaration = __webpack_require__(92); + +var _declaration2 = _interopRequireDefault(_declaration); + +var _warnOnce = __webpack_require__(5); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _comment = __webpack_require__(35); + +var _comment2 = _interopRequireDefault(_comment); + +var _node = __webpack_require__(38); + +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__(94); + 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__(16); + nodes = [new Rule(nodes)]; + } else if (nodes.name) { + var AtRule = __webpack_require__(34); + 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__(39); + fix = new Root(); + } else if (node.type === 'atrule') { + var AtRule = __webpack_require__(34); + fix = new AtRule(); + } else if (node.type === 'rule') { + var Rule = __webpack_require__(16); + 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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbnRhaW5lci5lczYiXSwibmFtZXMiOlsiY2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IHdhcyBicm9rZVxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiByb290LndhbGtEZWNscyhkZWNsID0+IHtcbiAgICAgKiAgIGNoZWNrUHJvcGVydHlTdXBwb3J0KGRlY2wucHJvcCk7XG4gICAgICogfSk7XG4gICAgICpcbiAgICAgKiByb290LndhbGtEZWNscygnYm9yZGVyLXJhZGl1cycsIGRlY2wgPT4ge1xuICAgICAqICAgZGVjbC5yZW1vdmUoKTtcbiAgICAgKiB9KTtcbiAgICAgKlxuICAgICAqIHJvb3Qud2Fsa0RlY2xzKC9eYmFja2dyb3VuZC8sIGRlY2wgPT4ge1xuICAgICAqICAgZGVjbC52YWx1ZSA9IHRha2VGaXJzdENvbG9yRnJvbUdyYWRpZW50KGRlY2wudmFsdWUpO1xuICAgICAqIH0pO1xuICAgICAqL1xuICAgIHdhbGtEZWNscyhwcm9wLCBjYWxsYmFjaykge1xuICAgICAgICBpZiAoICFjYWxsYmFjayApIHtcbiAgICAgICAgICAgIGNhbGxiYWNrID0gcHJvcDtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLndhbGsoIChjaGlsZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmICggY2hpbGQudHlwZSA9PT0gJ2RlY2wnICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soY2hpbGQsIGkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2UgaWYgKCBwcm9wIGluc3RhbmNlb2YgUmVnRXhwICkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMud2FsayggKGNoaWxkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKCBjaGlsZC50eXBlID09PSAnZGVjbCcgJiYgcHJvcC50ZXN0KGNoaWxkLnByb3ApICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soY2hpbGQsIGkpO1xuICAgICAgICAgICAgICAgIH1cbiAg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xuICAgICAqIEByZXR1cm4ge2ZhbHNlfHVuZGVmaW5lZH0gcmV0dXJucyBgZmFsc2VgIGlmIGl0ZXJhdGlvbiB3YXMgYnJva2VcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogY29uc3Qgc2VsZWN0b3JzID0gW107XG4gICAgICogcm9vdC53YWxrUnVsZXMocnVsZSA9PiB7XG4gICAgICogICBzZWxlY3RvcnMucHVzaChydWxlLnNlbGVjdG9yKTtcbiAgICAgKiB9KTtcbiAgICAgKiBjb25zb2xlLmxvZyhgWW91ciBDU1MgdXNlcyAke3NlbGVjdG9ycy5sZW5ndGh9IHNlbGVjdG9yc2ApO1xuICAgICAqL1xuICAgIHdhbGtSdWxlcyhzZWxlY3RvciwgY2FsbGJhY2spIHtcbiAgICAgICAgaWYgKCAhY2FsbGJhY2sgKSB7XG4gICAgICAgICAgICBjYWxsYmFjayA9IHNlbGVjdG9yO1xuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy53YWxrKCAoY2hpbGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIGNoaWxkLnR5cGUgPT09ICdydWxlJyApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGNoaWxkLCBpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIGlmICggc2VsZWN0b3IgaW5zdGFuY2VvZiBSZWdFeHAgKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy53YWxrKCAoY2hpbGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIGNoaWxkLnR5cGUgPT09ICdydWxlJyAmJiBzZWxlY3Rvci50ZXN0KGNoaWxkLnNlbGVjdG9yKSApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGNoaWxkLCBpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbH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hbHNlfHVuZGVmaW5lZH0gcmV0dXJucyBgZmFsc2VgIGlmIGl0ZXJhdGlvbiB3YXMgYnJva2VcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogcm9vdC53YWxrQXRSdWxlcyhydWxlID0+IHtcbiAgICAgKiAgIGlmICggaXNPbGQocnVsZS5uYW1lKSApIHJ1bGUucmVtb3ZlKCk7XG4gICAgICogfSk7XG4gICAgICpcbiAgICAgKiBsZXQgZmlyc3QgPSBmYWxzZTtcbiAgICAgKiByb290LndhbGtBdFJ1bGVzKCdjaGFyc2V0JywgcnVsZSA9PiB7XG4gICAgICogICBpZiAoICFmaXJzdCApIHtcbiAgICAgKiAgICAgZmlyc3QgPSB0cnVlO1xuICAgICAqICAgfSBlbHNlIHtcbiAgICAgKiAgICAgcnVsZS5yZW1vdmUoKTtcbiAgICAgKiAgIH1cbiAgICAgKiB9KTtcbiAgICAgKi9cbiAgICB3YWxrQXRSdWxlcyhuYW1lLCBjYWxsYmFjaykge1xuICAgICAgICBpZiAoICFjYWxsYmFjayApIHtcbiAgICAgICAgICAgIGNhbGxiYWNrID0gbmFtZTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLndhbGsoIChjaGlsZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmICggY2hpbGQudHlwZSA9PT0gJ2F0cnVsZScgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhjaGlsZCwgaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSBpZiAoIG5hbWUgaW5zdGFuY2VvZiBSZWdFeHAgKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy53YWxrKCAoY2hpbGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIGNoaWxkLnR5cGUgPT09ICdhdHJ1bGUnICYmIG5hbWUudGVzdChjaGlsZC5uYW1lKSApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGNoaWxkLCBpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLndhbGsoIChjaGlsZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmICggY2hpbGQudHlwZSA9PT0gJ2F0cnVsZScgJiYgY2hpbGQubmFtZSA9PT0gbmFtZSApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGNoaWxkLCBpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRyYXZlcnNlcyB0aGUgY29udGFpbmVy4oCZcyBkZXNjZW5kYW50IG5vZGVzLCBjYWxsaW5nIGNhbGxiYWNrXG4gICAgICogZm9yIGVhY2ggY29tbWVudCBub2RlLlxuICAgICAqXG4gICAgICogTGlrZSB7QGxpbmsgQ29udGFpbmVyI2VhY2h9LCB0aGlzIG1ldGhvZCBpcyBzYWZlXG4gICAgICogdG8gdXNlIGlmIHlvdSBhcmUgbXV0YXRpbmcgYXJyYXlzIGR1cmluZyBpdGVyYXRpb24uXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge2NoaWxkSXRlcmF0b3J9IGNhbGxiYWNrIC0gaXRlcmF0b3IgcmVjZWl2ZXMgZWFjaCBub2RlIGFuZCBpbmRleFxuICAgICAqXG4gICAgICogQHJldHVybiB7ZmFsc2V8dW5kZWZpbmVkfSByZXR1cm5zIGBmYWxzZWAgaWYgaXRlcmF0aW9uIHdhcyBicm9rZVxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiByb290LndhbGtDb21tZW50cyhjb21tZW50ID0+IHtcbiAgICAgKiAgIGNvbW1lbnQucmVtb3ZlKCk7XG4gICAgICogfSk7XG4gICAgICovXG4gICAgd2Fsa0NvbW1lbnRzKGNhbG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blxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3IgY2FsbGJhY2sgdGhhdCByZXR1cm5zIGEgbmV3XG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS5cbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBjYWxsYmFjayB3aWxsIHJlY2VpdmVcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBzYW1lIGFyZ3VtZW50cyBhcyB0aG9zZVxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFzc2VkIHRvIGEgZnVuY3Rpb24gcGFyYW1ldGVyXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZiBgU3RyaW5nI3JlcGxhY2VgLlxuICAgICAqXG4gICAgICogQHJldHVybiB7Tm9kZX0gdGhpcyBub2RlIGZvciBtZXRob2RzIGNoYWluXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIHJvb3QucmVwbGFjZVZhbHVlcygvXFxkK3JlbS8sIHsgZmFzdDogJ3JlbScgfSwgc3RyaW5nID0+IHtcbiAgICAgKiAgIHJldHVybiAxNSAqIHBhcnNlSW50KHN0cmluZykgKyAncHgnO1xuICAgICAqIH0pO1xuICAgICAqL1xuICAgIHJlcGxhY2VWYWx1ZXMocGF0dGVybiwgb3B0cywgY2FsbGJhY2spIHtcbiAgICAgICAgaWYgKCAhY2FsbGJhY2sgKSB7XG4gICAgICAgICAgICBjYWxsYmFjayA9IG9wdHM7XG4gICAgICAgICAgICBvcHRzID0geyB9O1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy53YWxrRGVjbHMoIGRlY2wgPT4ge1xuICAgICAgICAgICAgaWYgKCBvcHRzLnByb3BzICYmIG9wdHMucHJvcHMuaW5kZXhPZihkZWNsLnByb3ApID09PS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mFsdWUgPT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1ZhbHVlIGZpZWxkIGlzIG1pc3NlZCBpbiBub2RlIGNyZWF0aW9uJyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICggdHlwZW9mIG5vZGVzLnZhbHVlICE9PSAnc3RyaW5nJyApIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZXMudmFsdWUgPSBTdHJpbmcobm9kZXMudmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBub2RlcyA9IFtuZXcgRGVjbGFyYXRpb24obm9kZXMpXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIG5vZGVzLnNlbGVjdG9yICkge1xuICAgICAgICAgICAgICAgIGxldCBSdWxlID0gcmVxdWlyZSgnLi9ydWxlJyk7XG4gICAgICAgICAgICAgICAgbm9kZXMgPSBbbmV3IFJ1bGUobm9kZXMpXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIG5vZGVzLm5hbWUgKSB7XG4gICAgICAgICAgICAgICAgbGV0IEF0UnVsZSA9IHJlcXVpcmUoJy4vYXQtcnVsZScpO1xuICAgICAgICAgICAgICAgIG5vZGVzID0gW25ldyBBdFJ1bGUobm9kZXMpXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIG5vZGVzLnRleHQgKSB7XG4gICAgICAgICAgICAgICAgbm9kZXMgPSBbbmV3IENvbW1lbnQobm9kZXMpXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdVbmtub3duIG5vZGUgdHlwZSBpbiBub2RlIGNyZWF0aW9uJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgcHJvY2Vzc2VkID0gbm9kZXMubWFwKCBpID0+IHtcbiAgICAgICAgICAgIGlmICggdHlwZW9mIGkucmF3cyA9PT0gJ3VuZGVmaW5lZCcgKSBpID0gdGhpcy5yZWJ1aWxkKGkpO1xuXG4gICAgICAgICAgICBpZiAoIGkucGFyZW50ICkgaSA9IGkuY2xvbmUoKTtcbiAgICAgICAgICAgIGlmICggdHlwZW9mIGkucmF3cy5iZWZvcmUgPT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgIGlmICggc2FtcGxlICYmIHR5cGVvZiBzYW1wbGUucmF3cy5iZWZvcmUgIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgICAgICBpLnJhd3MuYmVmb3JlID0gc2FtcGxlLnJhd3MuYmVmb3JlLnJlcGxhY2UoL1teXFxzXS9nLCAnJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaS5wYXJlbnQgPSB0aGlzO1xuICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBwcm9jZXNzZWQ7XG4gICAgfVxuXG4gICAgcmVidWlsZChub2RlLCBwYXJlbnQpIHtcbiAgICAgICAgbGV0IGZpeDtcbiAgICAgICAgaWYgKCBub2RlLnR5cGUgPT09ICdyb290JyApIHtcbiAgICAgICAgICAgIGxldCBSb290ID0gcmVxdWlyZSgnLi9yb290Jyk7XG4gICAgICAgICAgICBmaXggPSBuZXcgUm9vdCgpO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2RlLnR5cGUgPT09ICdhdHJ1bGUnICkge1xuICAgICAgICAgICAgbGV0IEF0UnVsZSA9IHJlcXVpcmUoJy4vYXQtcnVsZScpO1xuICAgICAgICAgICAgZml4ID0gbmV3IEF0UnVsZSgpO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2RlLnR5cGUgPT09ICdydWxlJyApIHtcbiAgICAgICAgICAgIGxldCBSdWxlID0gcmVxdWlyZSgnLi9ydWxlJyk7XG4gICAgICAgICAgICBmaXggPSBuZXcgUnVsZSgpO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2RlLnR5cGUgPT09ICdkZWNsJyApIHtcbiAgICAgICAgICAgIGZpeCA9IG5ldyBEZWNsYXJhdGlvbigpO1xuICAgICAgICB9IGVsc2UgaWYgKCBub2RlLnR5cGUgPT09ICdjb21tZW50JyApIHtcbiAgICAgICAgICAgIGZpeCA9IG5ldyBDb21tZW50KCk7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKCBsZXQgaSBpbiBub2RlICkge1xuICAgICAgICAgICAgaWYgKCBpID09PSAnbm9kZXMnICkge1xuICAgICAgICAgICAgICAgIGZpeC5ub2RlcyA9IG5vZGUubm9kZXMubWFwKCBqID0+IHRoaXMucmVidWlsZChqLCBmaXgpICk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBpID09PSAncGFyZW50JyAmJiBwYXJlbnQgKSB7XG4gICAgICAgICAgICAgICAgZml4LnBhcmVudCA9IHBhcmVudDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIG5vZGUuaGFzT3duUHJvcGVydHkoaSkgKSB7XG4gICAgICAgICAgICAgICAgZml4W2ldID0gbm9kZVtpXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBmaXg7XG4gICAgfVxuXG4gICAgZWFjaEluc2lkZShjYWxsYmFjaykge1xuICAgICAgICB3YXJuT25jZSgnQ29udGFpbmVyI2VhY2hJbnNpZGUgaXMgZGVwcmVjYXRlZC4gJyArXG4gICAgICAgICAgICAgICAgICdVc2UgQ29udGFpbmVyI3dhbGsgaW5zdGVhZC4nKTtcbiAgICAgICAgcmV0dXJuIHRoaXMud2FsayhjYWxsYmFjayk7XG4gICAgfVxuXG4gICAgZWFjaERlY2wocHJvcCwgY2FsbGJhY2spIHtcbiAgICAgICAgd2Fybk9uY2UoJ0NvbnRhaW5lciNlYWNoRGVjbCBpcyBkZXByZWNhdGVkLiAnICtcbiAgICAgICAgICAgICAgICAgJ1VzZSBDb250YWluZXIjd2Fsa0RlY2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29uZGl0aW9uXG4gKiBAcGFyYW0ge05vZGV9IG5vZGUgICAgLSBjb250YWluZXIgY2hpbGRcbiAqIEBwYXJhbSB7bnVtYmVyfSBpbmRleCAtIGNoaWxkIGluZGV4XG4gKiBAcGFyYW0ge05vZGVbXX0gbm9kZXMgLSBhbGwgY29udGFpbmVyIGNoaWxkcmVuXG4gKiBAcmV0dXJuIHtib29sZWFufVxuICovXG5cbi8qKlxuICogQGNhbGxiYWNrIGNoaWxkSXRlcmF0b3JcbiAqIEBwYXJhbSB7Tm9kZX0gbm9kZSAgICAtIGNvbnRhaW5lciBjaGlsZFxuICogQHBhcmFtIHtudW1iZXJ9IGluZGV4IC0gY2hpbGQgaW5kZXhcbiAqIEByZXR1cm4ge2ZhbHNlfHVuZGVmaW5lZH0gcmV0dXJuaW5nIGBmYWxzZWAgd2lsbCBicmVhayBpdGVyYXRpb25cbiAqL1xuIl19 + + +/***/ }), +/* 37 */ +/***/ (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__(91); + +var _cssSyntaxError2 = _interopRequireDefault(_cssSyntaxError); + +var _previousMap = __webpack_require__(195); + +var _previousMap2 = _interopRequireDefault(_previousMap); + +var _path = __webpack_require__(8); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LmVzNiJdLCJuYW1lcyI6WyJzZXF1ZW5jZSIsIklucHV0IiwiY3NzIiwib3B0cyIsInRvU3RyaW5nIiwic2xpY2UiLCJmcm9tIiwidGVzdCIsImZpbGUiLCJyZXNvbHZlIiwibWFwIiwidGV4dCIsImNvbnN1bWVyIiwibWFwUmVzb2x2ZSIsImlkIiwiZXJyb3IiLCJtZXNzYWdlIiwibGluZSIsImNvbHVtbiIsInJlc3VsdCIsIm9yaWdpbiIsInNvdXJjZSIsInBsdWdpbiIsImlucHV0Iiwib3JpZ2luYWxQb3NpdGlvbkZvciIsInNvdXJjZUNvbnRlbnRGb3IiLCJzb3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AgICAgIGlmICggdGhpcy5jc3NbMF0gPT09ICdcXHVGRUZGJyB8fCB0aGlzLmNzc1swXSA9PT0gJ1xcdUZGRkUnICkge1xuICAgICAgICAgICAgdGhpcy5jc3MgPSB0aGlzLmNzcy5zbGljZSgxKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICggb3B0cy5mcm9tICkge1xuICAgICAgICAgICAgaWYgKCAvXlxcdys6XFwvXFwvLy50ZXN0KG9wdHMuZnJvbSkgKSB7XG4gICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICogQG1lbWJlciB7c3RyaW5nfSAtIFRoZSBhYnNvbHV0ZSBwYXRoIHRvIHRoZSBDU1Mgc291cmNlIGZpbGVcbiAgICAgICAgICAgICAgICAgKiAgICAgICAgICAgICAgICAgICAgZGVmaW5lZCB3aXRoIHRoZSBgZnJvbWAgb3B0aW9uLlxuICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICAgICAgICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZShjc3MsIHsgZnJvbTogJ2EuY3NzJyB9KTtcbiAgICAgICAgICAgICAgICAgKiByb290LnNvdXJjZS5pbnB1dC5maWxlIC8vPT4gJy9ob21lL2FpL2EuY3NzJ1xuICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgIHRoaXMuZmlsZSA9IG9wdHMuZnJvbTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5maWxlID0gcGF0aC5yZXNvbHZlKG9wdHMuZnJvbSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgbWFwID0gbmV3IFByZXZpb3VzTWFwKHRoaXMuY3NzLCBvcHRzKTtcbiAgICAgICAgaWYgKCBtYXAudGV4dCApIHtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogQG1lbWJlciB7UHJldmlvdXNNYXB9IC0gVGhlIGlucHV0IHNvdXJjZSBtYXAgcGFzc2VkIGZyb21cbiAgICAgICAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIGEgY29tcGlsYXRpb24gc3RlcCBiZWZvcmUgUG9zdENTU1xuICAgICAgICAgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgKGZvciBleGFtcGxlLCBmcm9tIFNhc3MgY29tcGlsZXIpLlxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAgICAgKiByb290LnNvdXJjZS5pbnB1dC5tYXAuY29uc3VtZXIoKS5zb3VyY2VzIC8vPT4gWydhLnNhc3MnXVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLm1hcCA9IG1hcDtcbiAgICAgICAgICAgIGxldCBmaWxlID0gbWFwLmNvbnN1bWVyKCkuZmlsZTtcbiAgICAgICAgICAgIGlmICggIXRoaXMuZmlsZSAmJiBmaWxlICkgdGhpcy5maWxlID0gdGhpcy5tYXBSZXNvbHZlKGZpbGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCAhdGhpcy5maWxlICkge1xuICAgICAgICAgICAgc2VxdWVuY2UgKz0gMTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogQG1lbWJlciB7c3RyaW5nfSAtIFRoZSB1bmlxdWUgSUQgb2YgdGhlIENTUyBzb3VyY2UuIEl0IHdpbGwgYmVcbiAgICAgICAgICAgICAqICAgICAgICAgICAgICAgICAgICBjcmVhdGVkIGlmIGBmcm9tYCBvcHRpb24gaXMgbm90IHByb3ZpZGVkXG4gICAgICAgICAgICAgKiAgICAgICAgICAgICAgICAgICAgKGJlY2F1c2UgUG9zdENTUyBkb2VzIG5vdCBrbm93IHRoZSBmaWxlIHBhdGgpLlxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAgICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZShjc3MpO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1cm4gdGhpcy5maWxlIHx8IHRoaXMuaWQ7XG4gICAgfVxuXG59XG5cbmV4cG9ydCBkZWZhdWx0IElucHV0O1xuXG4vKipcbiAqIEB0eXBlZGVmICB7b2JqZWN0fSBmaWxlUG9zaXRpb25cbiAqIEBwcm9wZXJ0eSB7c3RyaW5nfSBmaWxlICAgLSBwYXRoIHRvIGZpbGVcbiAqIEBwcm9wZXJ0eSB7bnVtYmVyfSBsaW5lICAgLSBzb3VyY2UgbGluZSBpbiBmaWxlXG4gKiBAcHJvcGVydHkge251bWJlcn0gY29sdW1uIC0gc291cmNlIGNvbHVtbiBpbiBmaWxlXG4gKi9cbiJdfQ== + + +/***/ }), +/* 38 */ +/***/ (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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _cssSyntaxError = __webpack_require__(91); + +var _cssSyntaxError2 = _interopRequireDefault(_cssSyntaxError); + +var _stringifier = __webpack_require__(40); + +var _stringifier2 = _interopRequireDefault(_stringifier); + +var _stringify = __webpack_require__(96); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _warnOnce = __webpack_require__(5); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGUuZXM2Il0sIm5hbWVzIjpbImNsb25lTm9kZSIsIm9iaiIsInBhcmVudCIsImNsb25lZCIsImNvbnN0cnVjdG9yIiwiaSIsImhhc093blByb3BlcnR5IiwidmFsdWUiLCJ0eXBlIiwiQXJyYXkiLCJtYXAiLCJqIiwiTm9kZSIsImRlZmF1bHRzIiwicmF3cyIsIkVycm9yIiwiSlNPTiIsInN0cmluZ2lmeSIsIm5hbWUiLCJlcnJvciIsIm1lc3NhZ2UiLCJvcHRzIiwic291cmNlIiwicG9zIiwicG9zaXRpb25CeSIsImlucHV0IiwibGluZSIsImNvbHVtb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1iZXJ9IG9wdHMuaW5kZXggIC0gYW4gaW5kZXggaW5zaWRlIGEgbm9kZeKAmXMgc3RyaW5nIHRoYXQgc2hvdWxkXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmUgaGlnaGxpZ2h0ZWQgYXMgdGhlIHNvdXJjZSBvZiB0aGUgZXJyb3JcbiAgICAgKlxuICAgICAqIEByZXR1cm4ge0Nzc1N5bnRheEVycm9yfSBlcnJvciBvYmplY3QgdG8gdGhyb3cgaXRcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogaWYgKCAhdmFyaWFibGVzW25hbWVdICkge1xuICAgICAqICAgdGhyb3cgZGVjbC5lcnJvcignVW5rbm93biB2YXJpYWJsZSAnICsgbmFtZSwgeyB3b3JkOiBuYW1lIH0pO1xuICAgICAqICAgLy8gQ3NzU3ludGF4RXJyb3I6IHBvc3Rjc3MtdmFyczphLnNhc3M6NDozOiBVbmtub3duIHZhcmlhYmxlICRibGFja1xuICAgICAqICAgLy8gICBjb2xvcjogJGJsYWNrXG4gICAgICogICAvLyBhXG4gICAgICogICAvLyAgICAgICAgICBeXG4gICAgICogICAvLyAgIGJhY2tncm91bmQ6IHdoaXRlXG4gICAgICogfVxuICAgICAqL1xuICAgIGVycm9yKG1lc3NhZ2UsIG9wdHMgPSB7IH0pIHtcbiAgICAgICAgaWYgKCB0aGlzLnNvdXJjZSApIHtcbiAgICAgICAgICAgIGxldCBwb3MgPSB0aGlzLnBvc2l0aW9uQnkob3B0cyk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2UuaW5wdXQuZXJyb3IobWVzc2FnZSwgcG9zLmxpbmUsIHBvcy5jb2x1bW4sIG9wdHMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBDc3NTeW50YXhFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoaXMgbWV0aG9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xuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBjb25zdCBwbHVnaW4gPSBwb3N0Y3NzLnBsdWdpbigncG9zdGNzcy1kZXByZWNhdGVkJywgKCkgPT4ge1xuICAgICAqICAgcmV0dXJuIChyb290LCByZXN1bHQpID0+IHtcbiAgICAgKiAgICAgcm9vdC53YWxrRGVjbHMoJ2JhZCcsIGRlY2wgPT4ge1xuICAgICAqICAgICAgIGRlY2wud2FybihyZXN1bHQsICdEZXByZWNhdGVkIHByb3BlcnR5IGJhZCcpO1xuICAgICAqICAgICB9KTtcbiAgICAgKiAgIH07XG4gICAgICogfSk7XG4gICAgICovXG4gICAgd2FybihyZXN1bHQsIHRleHQsIG9wdHMpIHtcbiAgICAgICAgbGV0IGRhdGEgPSB7IG5vZGU6IHRoaXMgfTtcbiAgICAgICAgZm9yICggbGV0IGkgaW4gb3B0cyApIGRhdGFbaV0gPSBvcHRzW2ldO1xuICAgICAgICByZXR1cm4gcmVzdWx0Lndhcm4odGV4dCwgZGF0YSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmVtb3ZlcyB0aGUgbm9kZSBmcm9tIGl0cyBwYXJlbnQgYW5kIGNsZWFucyB0aGUgcGFyZW50IHByb3BlcnRpZXNcbiAgICAgKiBmcm9tIHRoZSBub2RlIGFuZCBpdHMgY2hpbGRyZW4uXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGlmICggZGVjbC5wcm9wLm1hdGNoKC9eLXdlYmtpdC0vKSApIHtcbiAgICAgKiAgIGRlY2wucmVtb3ZlKCk7XG4gICAgICogfVxuICAgICAqXG4gICAgICogQHJldHVybiB7Tm9kZX0gbm9kZSB0byBtYWtlIGNhbGxzIGNoYWluXG4gICAgICovXG4gICAgcmVtb3ZlKCkge1xuICAgICAgICBpZiAoIHRoaXMucGFyZW50ICkge1xuICAgICAgICAgICAgdGhpcy5wYXJlbnQucmVtb3ZlQ2hpbGQodGhpcyk7XG4gICAgICAgI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G4gICAgICogUmV0dXJucyBgdW5kZWZpbmVkYCBpZiB0aGUgY3VycmVudCBub2RlIGlzIHRoZSBsYXN0IGNoaWxkLlxuICAgICAqXG4gICAgICogQHJldHVybiB7Tm9kZXx1bmRlZmluZWR9IG5leHQgbm9kZVxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBpZiAoIGNvbW1lbnQudGV4dCA9PT0gJ2RlbGV0ZSBuZXh0JyApIHtcbiAgICAgKiAgIGNvbnN0IG5leHQgPSBjb21tZW50Lm5leHQoKTtcbiAgICAgKiAgIGlmICggbmV4dCApIHtcbiAgICAgKiAgICAgbmV4dC5yZW1vdmUoKTtcbiAgICAgKiAgIH1cbiAgICAgKiB9XG4gICAgICovXG4gICAgbmV4dCgpIHtcbiAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5wYXJlbnQuaW5kZXgodGhpcyk7XG4gICAgICAgIHJldHVybiB0aGlzLnBhcmVudC5ub2Rlc1tpbmRleCArIDFdO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgdGhlIHByZXZpb3VzIGNoaWxkIG9mIHRoZSBub2Rl4oCZcyBwYXJlbnQuXG4gICAgICogUmV0dXJucyBgdW5kZWZpbmVkYCBpZiB0aGUgY3VycmVudCBub2RlIGlzIHRoZSBmaXJzdCBjaGlsZC5cbiAgICAgKlxuICAgICAqIEByZXR1cm4ge05vZGV8dW5kZWZpbmVkfSBwcmV2aW91cyBub2RlXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGNvbnN0IGFubm90YXRpb24gPSBkZWNsLnByZXYoKTtcbiAgICAgKiBpZiAoIGFubm90YXRpb24udHlwZSA9PSAnY29tbWVudCcgKSB7XG4gICAgICogIHJlYWRBbm5vdGF0aW9uKGFubm90YXRpb24udGV4dCk7XG4gICAgICogfVxuICAgICAqL1xuICAgIHByZXYoKSB7XG4gICAgICAgIGxldCBpbmRleCA9IHRoaXMucGFyZW50LmluZGV4KHRoaXMpO1xuICAgICAgICByZXR1cm4gdGhpcy5wYXJlbnQubm9kZXNbaW5kZXggLSAxXTtcbiAgICB9XG5cbiAgICB0b0pTT04oKSB7XG4gICAgICAgIGxldCBmaXhlZCA9IHsgfTtcblxuICAgICAgICBmb3IgKCBsZXQgbmFtZSBpbiB0aGlzICkge1xuICAgICAgICAgICAgaWYgKCAhdGhpcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSApIGNvbnRpbnVlO1xuICAgICAgICAgICAgaWYgKCBuYW1lID09PSAncGFyZW50JyApIGNvbnRpbnVlO1xuICAgICAgICAgICAgbGV0IHZhbHVlID0gdGhpc1tuYW1lXTtcblxuICAgICAgICAgICAgaWYgKCB2YWx1ZSBpbnN0YW5jZW9mIEFycmF5ICkge1xuICAgICAgICAgICAgICAgIGZpeGVkW25hbWVdID0gdmFsdWUubWFwKCBpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCB0eXBlb2YgaSA9PT0gJ29iamVjdCcgJiYgaS50b0pTT04gKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaS50b0pTT04oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCB0eXBlb2YgdmFsdWUgPT09ICdvYmplY3QnICYmIHZhbHVlLnRvSlNPTiApIHtcbiAgICAgICAgICAgICAgICBmaXhlZFtuYW1lXSA9IHZhbHVlLnRvSlNPTigpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaXhlZFtuYW1lXSA9IHZhbHVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZpeGVkO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgYSB7QGxpbmsgTm9kZSNyY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N0LmZpcnN0LnJhd3MgLy89PiB7IGJlZm9yZTogJ1xcbiAgJywgYmV0d2VlbjogJzonIH1cbiAgICAgKi9cblxufVxuXG5leHBvcnQgZGVmYXVsdCBOb2RlO1xuXG4vKipcbiAqIEB0eXBlZGVmIHtvYmplY3R9IHBvc2l0aW9uXG4gKiBAcHJvcGVydHkge251bWJlcn0gbGluZSAgIC0gc291cmNlIGxpbmUgaW4gZmlsZVxuICogQHByb3BlcnR5IHtudW1iZXJ9IGNvbHVtbiAtIHNvdXJjZSBjb2x1bW4gaW4gZmlsZVxuICovXG5cbi8qKlxuICogQHR5cGVkZWYge29iamVjdH0gc291cmNlXG4gKiBAcHJvcGVydHkge0lucHV0fSBpbnB1dCAgICAtIHtAbGluayBJbnB1dH0gd2l0aCBpbnB1dCBmaWxlXG4gKiBAcHJvcGVydHkge3Bvc2l0aW9ufSBzdGFydCAtIFRoZSBzdGFydGluZyBwb3NpdGlvbiBvZiB0aGUgbm9kZeKAmXMgc291cmNlXG4gKiBAcHJvcGVydHkge3Bvc2l0aW9ufSBlbmQgICAtIFRoZSBlbmRpbmcgcG9zaXRpb24gb2YgdGhlIG5vZGXigJlzIHNvdXJjZVxuICovXG4iXX0= + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _container = __webpack_require__(36); + +var _container2 = _interopRequireDefault(_container); + +var _warnOnce = __webpack_require__(5); + +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__(93); + var Processor = __webpack_require__(196); + + 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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJvb3QuZXM2Il0sIm5hbWVzIjpbIlJvb3QiLCJkZWZhdWx0cyIsInR5cGUiLCJub2RlcyIsInJlbW92ZUNoaWxkIiwiY2hpbGQiLCJpbmRleCIsImxlbmd0aCIsInJhd3MiLCJiZWZvcmUiLCJub3JtYWxpemUiLCJzYW1wbGUiLCJmaXJzdCIsIm5vZGUiLCJ0b1Jlc3VsdCIsIm9wdHMiLCJMYXp5UmVzdWx0IiwicmVxdWlyZSIsIlByb2Nlc3NvciIsImxhenkiLCJzdHJpbmdpZnkiLCJyZW1vdmUiLCJwcmV2TWFwIiwic291cmNlIiwiaW5wdXQiLCJtYXAiXSwibWFwcGluZ3MiOiI7Ozs7QUFBQTs7OztBQUNBOzs7Ozs7Ozs7Ozs7QUFFQTs7Ozs7Ozs7OztJQVVNQSxJOzs7QUFFRixrQkFBWUMsUUFBWixFQUFzQjtBQUFBOztBQUFBLHFEQUNsQixzQkFBTUEsUUFBTixDQURrQjs7QUFFbEIsY0FBS0MsSUFBTCxHQUFZLE1BQVo7QUF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ICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBzYW1wbGUucmF3cy5iZWZvcmU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICggdGhpcy5maXJzdCAhPT0gc2FtcGxlICkge1xuICAgICAgICAgICAgICAgIGZvciAoIGxldCBub2RlIG9mIG5vZGVzICkge1xuICAgICAgICAgICAgICAgICAgICBub2RlLnJhd3MuYmVmb3JlID0gc2FtcGxlLnJhd3MuYmVmb3JlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBub2RlcztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZXR1cm5zIGEge0BsaW5rIFJlc3VsdH0gaW5zdGFuY2UgcmVwcmVzZW50aW5nIHRoZSByb2904oCZcyBDU1MuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge3Byb2Nlc3NPcHRpb25zfSBbb3B0c10gLSBvcHRpb25zIHdpdGggb25seSBgdG9gIGFuZCBgbWFwYCBrZXlzXG4gICAgICpcbiAgICAgKiBAcmV0dXJuIHtSZXN1bHR9IHJlc3VsdCB3aXRoIGN1cnJlbnQgcm9vdOKAmXMgQ1NTXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGNvbnN0IHJvb3QxID0gcG9zdGNzcy5wYXJzZShjc3MxLCB7IGZyb206ICdhLmNzcycgfSk7XG4gICAgICogY29uc3Qgcm9vdDIgPSBwb3N0Y3NzLnBhcnNlKGNzczIsIHsgZnJvbTogJ2IuY3NzJyB9KTtcbiAgICAgKiByb290MS5hcHBlbmQocm9vdDIpO1xuICAgICAqIGNvbnN0IHJlc3VsdCA9IHJvb3QxLnRvUmVzdWx0KHsgdG86ICdhbGwuY3NzJywgbWFwOiB0cnVlIH0pO1xuICAgICAqL1xuICAgIHRvUmVzdWx0KG9wdHMgPSB7IH0pIHtcbiA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XN0IGNoaWxkIHRvIHRoZSBlbmQgb2YgZmlsZS5cbiAgICAgKiAqIGBzZW1pY29sb25gOiBpcyB0aGUgbGFzdCBjaGlsZCBoYXMgYW4gKG9wdGlvbmFsKSBzZW1pY29sb24uXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIHBvc3Rjc3MucGFyc2UoJ2Ege31cXG4nKS5yYXdzIC8vPT4geyBhZnRlcjogJ1xcbicgfVxuICAgICAqIHBvc3Rjc3MucGFyc2UoJ2Ege30nKS5yYXdzICAgLy89PiB7IGFmdGVyOiAnJyB9XG4gICAgICovXG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgUm9vdDtcbiJdfQ== + + +/***/ }), +/* 40 */ +/***/ (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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmaWVyLmVzNiJdLCJuYW1lcyI6WyJkZWZhdWx0UmF3IiwiY29sb24iLCJpbmRlbnQiLCJiZWZvcmVEZWNsIiwiYmVmb3JlUnVsZSIsImJlZm9yZU9wZW4iLCJiZWZvcmVDbG9zZSIsImJlZm9yZUNvbW1lbnQiLCJhZnRlciIsIm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1aWxkZXIoJy8qJyArIGxlZnQgKyBub2RlLnRleHQgKyByaWdodCArICcqLycsIG5vZGUpO1xuICAgIH1cblxuICAgIGRlY2wobm9kZSwgc2VtaWNvbG9uKSB7XG4gICAgICAgIGxldCBiZXR3ZWVuID0gdGhpcy5yYXcobm9kZSwgJ2JldHdlZW4nLCAnY29sb24nKTtcbiAgICAgICAgbGV0IHN0cmluZyAgPSBub2RlLnByb3AgKyBiZXR3ZWVuICsgdGhpcy5yYXdWYWx1ZShub2RlLCAndmFsdWUnKTtcblxuICAgICAgICBpZiAoIG5vZGUuaW1wb3J0YW50ICkge1xuICAgICAgICAgICAgc3RyaW5nICs9IG5vZGUucmF3cy5pbXBvcnRhbnQgfHwgJyAhaW1wb3J0YW50JztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICggc2VtaWNvbG9uICkgc3RyaW5nICs9ICc7JztcbiAgICAgICAgdGhpcy5idWlsZGVyKHN0cmluZywgbm9kZSk7XG4gICAgfVxuXG4gICAgcnVsZShub2RlKSB7XG4gICAgICAgIHRoaXMuYmxvY2sobm9kZSwgdGhpcy5yYXdWYWx1ZShub2RlLCAnc2VsZWN0b3InKSk7XG4gICAgfVxuXG4gICAgYXRydWxlKG5vZGUsIHNlbWljb2xvbikge1xuICAgICAgICBsZXQgbmFtZSAgID0gJ0AnICsgbm9kZS5uYW1lO1xuICAgICAgICBsZXQgcGFyYW1zID0gbm9kZS5wYXJhbXMgPyB0aGlzLnJhd1ZhbHVlKG5vZGUsICdwYXJhbXMnKSA6ICcnO1xuXG4gICAgICAgIGlmICggdHlwZW9mIG5vZGUucmF3cy5hZnRlck5hbWUgIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgbmFtZSArPSBub2RlLnJhd3MuYWZ0ZXJOYW1lO1xuICAgICAgICB9IGVsc2UgaWYgKCBwYXJhbXMgKSB7XG4gICAgICAgICAgICBuYW1lICs9ICcgJztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICggbm9kZS5ub2RlcyApIHtcbiAgICAgICAgICAgIHRoaXMuYmxvY2sobm9kZSwgbmFtZSArIHBhcmFtcyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsZXQgZW5kID0gKG5vZGUucmF3cy5iZXR3ZWVuIHx8ICcnKSArIChzZW1pY29sb24gPyAnOycgOiAnJyk7XG4gICAgICAgICAgICB0aGlzLmJ1aWxkZXIobmFtZSArIHBhcmFtcyArIGVuZCwgbm9kZSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBib2R5KG5vZGUpIHtcbiAgICAgICAgbGV0IGxhc3QgPSBub2RlLm5vZGVzLmxlbmd0aCAtIDE7XG4gICAgICAgIHdoaWxlICggbGFzdCA+IDAgKSB7XG4gICAgICAgICAgICBpZiAoIG5vZGUubm9kZXNbbGFzdF0udHlwZSAhPT0gJ2NvbW1lbnQnICkgYnJlYWs7XG4gICAgICAgICAgICBsYXN0IC09IDE7XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgc2VtaWNvbG9uID0gdGhpcy5yYXcobm9kZSwgJ3NlbWljb2xvbicpO1xuICAgICAgICBmb3IgKCBsZXQgaSA9IDA7IGkgPCBub2RlLm5vZGVzLmxlbmd0aDsgaSsrICkge1xuICAgICAgICAgICAgbGV0IGNoaWxkICA9IG5vZGUubm9kZXNbaV07XG4gICAgICAgICAgICBsZXQgYmVmb3JlID0gdGhpcy5yYXcoY2hpbGQsICdiZWZvcmUnKTtcbiAgICAgICAgICAgIGlmICggYmVmb3JlICkgdGhpcy5idWlsZGVyKGJlZm9yZSk7XG4gICAgICAgICAgICB0aGlzLnN0cmluZ2lmeShjaGlsZCwgbGFzdCAhPT0gaSB8fCBzZW1pY29sb24pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgYmxvY2sobm9kZSwgc3RhcnQpIHtcbiAgICAgICAgbGV0IGJldHdlZW4gPSB0aGlzLnJhdyhub2RlLCAnYmV0d2VlbicsICdiZWZvcmVPcGVuJyk7XG4gICAgICAgIHRoaXMuYnVpbGRlcihzdGFydCArIGJldHdlZW4gKyAneycsIG5vZGUsICdzdGFydCcpO1xuXG4gICAgICAgIGxldCBhZnRlcjtcbiAgICAgICAgaWYgKCBub2RlLm5vZGVzICYmIG5vZGUubm9kZXMubGVuZ3RoICkge1xuICAgICAgICAgICAgdGhpcy5ib2R5KG5vZGUpO1xuICAgICAgICAgICAgYWZ0ZXIgPSB0aGlzLnJhdyhub2RlLCAnYWZ0ZXInKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGFmdGVyID0gdGhpcy5yYXcobm9kZSwgJ2FmdGVyJywgJ2VtcHR5Qm9keScpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCBhZnRlciApIHRoaXMuYnVpbGRlcihhZnRlcik7XG4gICAgICAgIHRoaXMuYnVpbGRlcignfScsIG5vZGUsICdlbmQnKTtcbiAgICB9XG5cbiAgICByYXcobm9kZSwgb3duLCBkZXRlY3QpIHtcbiAgICAgICAgbGV0IHZhbHVlO1xuICAgICAgICBpZiAoICFkZXRlY3QgKSBkZXRlY3QgPSBvd247XG5cbiAgICAgICAgLy8gQWxyZWFkeSBoYWRcbiAgICAgICAgaWYgKCBvd24gKSB7XG4gICAgICAgICAgICB2YWx1ZSA9IG5vZGUucmF3c1tvd25dO1xuICAgICAgICAgICAgaWYgKCB0eXBlb2YgdmFsdWUgIT09ICd1bmRlZmluZWQnICkgcmV0dXJuIHZhbHVlO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IHBhcmVudCA9IG5vZGUucGFyZW50O1xuXG4gICAgICAgIC8vIEhhY2sgZm9yIGZpcnN0IHJ1bGUgaW4gQ1NTXG4gICAgICAgIGlmICggZGV0ZWN0ID09PSAnYmVmb3JlJyApIHtcbiAgICAgICAgICAgIGlmICggIXBhcmVudCB8fCBwYXJlbnQudHlwZSA9PT0gJ3Jvb3QnICYmIHBhcmVudC5maXJzdCA9PT0gbm9kZSApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBGbG9hdGluZyBjaGlsZCB3aXRob3V0IHBhcmVudFxuICAgICAgICBpZiAoICFwYXJlbnQgKSByZXR1cm4gZGVmYXVsdFJhd1tkZXRlY3RdO1xuXG4gICAgICAgIC8vIERldGVjdCBzdHlsZSBieSBvdGhlciBub2Rlc1xuICAgICAgICBsZXQgcm9vdCA9IG5vZGUucm9vdCgpO1xuICAgICAgICBpZiAoICFyb290LnJhd0NhY2hlICkgcm9vdC5yYXdDYWNoZSA9IHsgfTtcbiAgICAgICAgaWYgKCB0eXBlb2Ygcm9vdC5yYXdDYWNoZVtkZXRlY3RdICE9PSAndW5kZWZpbmVkJyApIHtcbiAgICAgICAgICAgIHJldHVybiByb290LnJhd0NhY2hlW2RldGVjdF07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIGRldGVjdCA9PT0gJ2JlZm9yZScgfHwgZGV0ZWN0ID09PSAnYWZ0ZXInICkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYmVmb3JlQWZ0ZXIobm9kZSwgZGV0ZWN0KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGxldCBtZXRob2QgPSAncmF3JyArIGNhcGl0YWxpemUoZGV0ZWN0KTtcbiAgICAgICAgICAgIGlmICggdGhpc1ttZXRob2RdICkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpc1ttZXRob2RdKHJvb3QsIG5vZGUpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByb290LndhbGsoIGkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IGkucmF3c1tvd25dO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiB2YWx1ZSAhPT0gJ3VuZGVmaW5lZCcgKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIHR5cGVvZiB2YWx1ZSA9PT0gJ3VuZGVmaW5lZCcgKSB2YWx1ZSA9IGRlZmF1bHRSYXdbZGV0ZWN0XTtcblxuICAgICAgICByb290LnJhd0NhY2hlW2RldGVjdF0gPSB2YWx1ZTtcbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cblxuICAgIHJhd1NlbWljb2xvbihyb290KSB7XG4gICAgICAgIGxldCB2YWx1ZTtcbiAgICAgICAgcm9vdC53YWxrKCBpID0+IHtcbiAgICAgICAgICAgIGlmICggaS5ub2RlcyAmJiBpLm5vZGVzLmxlbmd0aCAmJiBpLmxhc3QudHlwZSA9PT0gJ2RlY2wnICkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLnNlbWljb2xvbjtcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiB2YWx1ZSAhPT0gJ3VuZGVmaW5lZCcgKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuXG4gICAgcmF3RW1wdHlCb2R5KHJvb3QpIHtcbiAgICAgICAgbGV0IHZhbHVlO1xuICAgICAgICByb290LndhbGsoIGkgPT4ge1xuICAgICAgICAgICAgaWYgKCBpLm5vZGVzICYmIGkubm9kZXMubGVuZ3RoID09PSAwICkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmFmdGVyO1xuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIHZhbHVlICE9PSAndW5kZWZpbmVkJyApIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdJbmRlbnQocm9vdCkge1xuICAgICAgICBpZiAoIHJvb3QucmF3cy5pbmRlbnQgKSByZXR1cm4gcm9vdC5yYXdzLmluZGVudDtcbiAgICAgICAgbGV0IHZhbHVlO1xuICAgICAgICByb290LndhbGsoIGkgPT4ge1xuICAgICAgICAgICAgbGV0IHAgPSBpLnBhcmVudDtcbiAgICAgICAgICAgIGlmICggcCAmJiBwICE9PSByb290ICYmIHAucGFyZW50ICYmIHAucGFyZW50ID09PSByb290ICkge1xuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIGkucmF3cy5iZWZvcmUgIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgcGFydHMgPSBpLnJhd3MuYmVmb3JlLnNwbGl0KCdcXG4nKTtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJ0c1twYXJ0cy5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5yZXBsYWNlKC9bXlxcc10vZywgJycpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cblxuICAgIHJhd0JlZm9yZUNvbW1lbnQocm9vdCwgbm9kZSkge1xuICAgICAgICBsZXQgdmFsdWU7XG4gICAgICAgIHJvb3Qud2Fsa0NvbW1lbnRzKCBpID0+IHtcbiAgICAgICAgICAgIGlmICggdHlwZW9mIGkucmF3cy5iZWZvcmUgIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmJlZm9yZTtcbiAgICAgICAgICAgICAgICBpZiAoIHZhbHVlLmluZGV4T2YoJ1xcbicpICE9PSAtMSApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5yZXBsYWNlKC9bXlxcbl0rJC8sICcnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKCB0eXBlb2YgdmFsdWUgPT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnYmVmb3JlRGVjbCcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdCZWZvcmVEZWNsKHJvb3QsIG5vZGUpIHtcbiAgICAgICAgbGV0IHZhbHVlO1xuICAgICAgICByb290LndhbGtEZWNscyggaSA9PiB7XG4gICAgICAgICAgICBpZiAoIHR5cGVvZiBpLnJhd3MuYmVmb3JlICE9PSAndW5kZWZpbmVkJyApIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IGkucmF3cy5iZWZvcmU7XG4gICAgICAgICAgICAgICAgaWYgKCB2YWx1ZS5pbmRleE9mKCdcXG4nKSAhPT0gLTEgKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUucmVwbGFjZSgvW15cXG5dKyQvLCAnJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmICggdHlwZW9mIHZhbHVlID09PSAndW5kZWZpbmVkJyApIHtcbiAgICAgICAgICAgIHZhbHVlID0gdGhpcy5yYXcobm9kZSwgbnVsbCwgJ2JlZm9yZVJ1bGUnKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuXG4gICAgcmF3QmVmb3JlUnVsZShyb290KSB7XG4gICAgICAgIGxldCB2YWx1ZTtcbiAgICAgICAgcm9vdC53YWxrKCBpID0+IHtcbiAgICAgICAgICAgIGlmICggaS5ub2RlcyAmJiAoaS5wYXJlbnQgIT09IHJvb3QgfHwgcm9vdC5maXJzdCAhPT0gaSkgKSB7XG4gICAgICAgICAgICAgICAgaWYgKCB0eXBlb2YgaS5yYXdzLmJlZm9yZSAhPT0gJ3VuZGVmaW5lZCcgKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmJlZm9yZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCB2YWx1ZS5pbmRleE9mKCdcXG4nKSAhPT0gLTEgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnJlcGxhY2UoL1teXFxuXSskLywgJycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuXG4gICAgcmF3QmVmb3JlQ2xvc2Uocm9vdCkge1xuICAgICAgICBsZXQgdmFsdWU7XG4gICAgICAgIHJvb3Qud2FsayggaSA9PiB7XG4gICAgICAgICAgICBpZiAoIGkubm9kZXMgJiYgaS5ub2Rlcy5sZW5ndGggPiAwICkge1xuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIGkucmF3cy5hZnRlciAhPT0gJ3VuZGVmaW5lZCcgKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmFmdGVyO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIHZhbHVlLmluZGV4T2YoJ1xcbicpICE9PSAtMSApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUucmVwbGFjZSgvW15cXG5dKyQvLCAnJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdCZWZvcmVPcGVuKHJvb3QpIHtcbiAgICAgICAgbGV0IHZhbHVlO1xuICAgICAgICByb290LndhbGsoIGkgPT4ge1xuICAgICAgICAgICAgaWYgKCBpLnR5cGUgIT09ICdkZWNsJyApIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IGkucmF3cy5iZXR3ZWVuO1xuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIHZhbHVlICE9PSAndW5kZWZpbmVkJyApIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdDb2xvbihyb290KSB7XG4gICAgICAgIGxldCB2YWx1ZTtcbiAgICAgICAgcm9vdC53YWxrRGVjbHMoIGkgPT4ge1xuICAgICAgICAgICAgaWYgKCB0eXBlb2YgaS5yYXdzLmJldHdlZW4gIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gaS5yYXdzLmJldHdlZW4ucmVwbGFjZSgvW15cXHM6XS9nLCAnJyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cblxuICAgIGJlZm9yZUFmdGVyKG5vZGUsIGRldGVjdCkge1xuICAgICAgICBsZXQgdmFsdWU7XG4gICAgICAgIGlmICggbm9kZS50eXBlID09PSAnZGVjbCcgKSB7XG4gICAgICAgICAgICB2YWx1ZSA9IHRoaXMucmF3KG5vZGUsIG51bGwsICdiZWZvcmVEZWNsJyk7XG4gICAgICAgIH0gZWxzZSBpZiAoIG5vZGUudHlwZSA9PT0gJ2NvbW1lbnQnICkge1xuICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnYmVmb3JlQ29tbWVudCcpO1xuICAgICAgICB9IGVsc2UgaWYgKCBkZXRlY3QgPT09ICdiZWZvcmUnICkge1xuICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnYmVmb3JlUnVsZScpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnYmVmb3JlQ2xvc2UnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCBidWYgICA9IG5vZGUucGFyZW50O1xuICAgICAgICBsZXQgZGVwdGggPSAwO1xuICAgICAgICB3aGlsZSAoIGJ1ZiAmJiBidWYudHlwZSAhPT0gJ3Jvb3QnICkge1xuICAgICAgICAgICAgZGVwdGggKz0gMTtcbiAgICAgICAgICAgIGJ1ZiA9IGJ1Zi5wYXJlbnQ7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIHZhbHVlLmluZGV4T2YoJ1xcbicpICE9PSAtMSApIHtcbiAgICAgICAgICAgIGxldCBpbmRlbnQgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnaW5kZW50Jyk7XG4gICAgICAgICAgICBpZiAoIGluZGVudC5sZW5ndGggKSB7XG4gICAgICAgICAgICAgICAgZm9yICggbGV0IHN0ZXAgPSAwOyBzdGVwIDwgZGVwdGg7IHN0ZXArKyApIHZhbHVlICs9IGluZGVudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByYXdWYWx1ZShub2RlLCBwcm9wKSB7XG4gICAgICAgIGxldCB2YWx1ZSA9IG5vZGVbcHJvcF07XG4gICAgICAgIGxldCByYXcgICA9IG5vZGUucmF3c1twcm9wXTtcbiAgICAgICAgaWYgKCByYXcgJiYgcmF3LnZhbHVlID09PSB2YWx1ZSApIHtcbiAgICAgICAgICAgIHJldHVybiByYXcucmF3O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgICAgICB9XG4gICAgfVxuXG59XG5cbmV4cG9ydCBkZWZhdWx0IFN0cmluZ2lmaWVyO1xuIl19 + + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + +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 === "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; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +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__(35); + +var _comment2 = _interopRequireDefault(_comment); + +var _import2 = __webpack_require__(144); + +var _import3 = _interopRequireDefault(_import2); + +var _parser = __webpack_require__(95); + +var _parser2 = _interopRequireDefault(_parser); + +var _rule = __webpack_require__(150); + +var _rule2 = _interopRequireDefault(_rule); + +var _root = __webpack_require__(149); + +var _root2 = _interopRequireDefault(_root); + +var _findExtendRule = __webpack_require__(143); + +var _findExtendRule2 = _interopRequireDefault(_findExtendRule); + +var _isMixinToken = __webpack_require__(145); + +var _isMixinToken2 = _interopRequireDefault(_isMixinToken); + +var _lessTokenize = __webpack_require__(148); + +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']; + +/***/ }), +/* 43 */ +/***/ (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; +}; + + +/***/ }), +/* 44 */ +/***/ (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); + } + }, []); + } +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function(name, options) { + var engine = options.engines[name] || options.engines[aliase(name)]; + if (typeof engine === 'undefined') { + throw new Error('gray-matter engine "' + name + '" is not registered'); + } + if (typeof engine === 'function') { + engine = { parse: engine }; + } + return engine; +}; + +function aliase(name) { + switch (name.toLowerCase()) { + case 'js': + case 'javascript': + return 'javascript'; + case 'coffee': + case 'coffeescript': + case 'cson': + return 'coffee'; + case 'yaml': + case 'yml': + return 'yaml'; + default: { + return name; + } + } +} + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var extend = __webpack_require__(18); +var yaml = __webpack_require__(122); + +/** + * Default engines + */ + +var engines = exports = module.exports; + +/** + * YAML + */ + +engines.yaml = { + parse: yaml.safeLoad.bind(yaml), + stringify: yaml.safeDump.bind(yaml) +}; + +/** + * JSON + */ + +engines.json = { + parse: JSON.parse.bind(JSON), + stringify: function(obj, options) { + var opts = extend({replacer: null, space: 2}, options); + return JSON.stringify(obj, opts.replacer, opts.space); + } +}; + +/** + * JavaScript + */ + +engines.javascript = { + parse: function parse(str, options, wrap) { + /* eslint no-eval: 0 */ + try { + if (wrap !== false) { + str = '(function() {\nreturn ' + str.trim() + ';\n}());'; + } + return eval(str) || {}; + } catch (err) { + if (wrap !== false && /(unexpected|identifier)/i.test(err.message)) { + return parse(str, options, false); + } + throw new SyntaxError(err); + } + }, + stringify: function() { + throw new Error('stringifying JavaScript is not supported'); + } +}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var extend = __webpack_require__(18); +var typeOf = __webpack_require__(25); +var getEngine = __webpack_require__(45); +var defaults = __webpack_require__(19); + +module.exports = function(file, data, options) { + if (data == null && options == null) { + switch (typeOf(file)) { + case 'object': + data = file.data; + options = {}; + break; + case 'string': + return file; + default: { + throw new TypeError('expected file to be a string or object'); + } + } + } + + var str = file.content; + var opts = defaults(options); + if (data == null) { + if (!opts.data) { + return file; + } + data = opts.data; + } + + var language = file.language || opts.language; + var engine = getEngine(language, opts); + if (typeof engine.stringify !== 'function') { + throw new TypeError('expected "' + language + '.stringify" to be a function'); + } + + data = extend({}, file.data, data); + var open = opts.delimiters[0]; + var close = opts.delimiters[1]; + var matter = engine.stringify(data, options).trim(); + var buf = ''; + + if (matter !== '{}') { + buf = newline(open) + newline(matter) + newline(close); + } + + if (typeof file.excerpt === 'string' && file.excerpt !== '') { + if (str.indexOf(file.excerpt.trim()) === -1) { + buf += newline(file.excerpt) + newline(close); + } + } + + return buf + newline(str); +}; + +function newline(str) { + return str.slice(-1) !== '\n' ? str + '\n' : str; +} + + +/***/ }), +/* 48 */ +/***/ (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 +} + + +/***/ }), +/* 49 */ +/***/ (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__(10).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(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(u) { + return u.replace(re_utob, cb_utob); + }; + var cb_encode = function(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(u, urisafe) { + return !urisafe + ? _encode(String(u)) + : _encode(String(u)).replace(/[+\/]/g, function(m0) { + return m0 == '+' ? '-' : '_'; + }).replace(/=/g, ''); + }; + var encodeURI = function(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(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(b) { + return b.replace(re_btou, cb_btou); + }; + var cb_decode = function(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(a){ + return _decode( + String(a).replace(/[-_]/g, function(m0) { return m0 == '-' ? '+' : '/' }) + .replace(/[^A-Za-z0-9\+\/]/g, '') + ); + }; + var noConflict = function() { + 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(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__(41))) + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + + + + +var Schema = __webpack_require__(7); + + +module.exports = new Schema({ + include: [ + __webpack_require__(51) + ] +}); + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + + + + +var Schema = __webpack_require__(7); + + +module.exports = new Schema({ + include: [ + __webpack_require__(26) + ], + implicit: [ + __webpack_require__(136), + __webpack_require__(128), + __webpack_require__(130), + __webpack_require__(129) + ] +}); + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _Node = __webpack_require__(53); + +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; + +/***/ }), +/* 53 */ +/***/ (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; + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _supportsColor = __webpack_require__(218); + +var _supportsColor2 = _interopRequireDefault(_supportsColor); + +var _chalk = __webpack_require__(104); + +var _chalk2 = _interopRequireDefault(_chalk); + +var _terminalHighlight = __webpack_require__(176); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1zeW50YXgtZXJyb3IuZXM2Il0sIm5hbWVzIjpbIkNzc1N5bnRheEVycm9yIiwibWVzc2FnZSIsImxpbmUiLCJjb2x1bW4iLCJzb3VyY2UiLCJmaWxlIiwicGx1Z2luIiwibmFtZSIsInJ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Jvci5uYW1lID09PSAnQ3NzU3ludGF4RXJyb3InYCBpbnN0ZWFkIG9mXG4gICAgICAgICAqICAgICAgICAgICAgICAgICAgICBgZXJyb3IgaW5zdGFuY2VvZiBDc3NTeW50YXhFcnJvcmAsIGJlY2F1c2VcbiAgICAgICAgICogICAgICAgICAgICAgICAgICAgIG5wbSBjb3VsZCBoYXZlIHNldmVyYWwgUG9zdENTUyB2ZXJzaW9ucy5cbiAgICAgICAgICpcbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICogaWYgKCBlcnJvci5uYW1lID09PSAnQ3NzU3ludGF4RXJyb3InICkge1xuICAgICAgICAgKiAgIGVycm9yIC8vPT4gQ3NzU3ludGF4RXJyb3JcbiAgICAgICAgICogfVxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5uYW1lID0gJ0Nzc1N5bnRheEVycm9yJztcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEBtZW1iZXIge3N0cmluZ30gLSBFcnJvciBtZXNzYWdlLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgKiBlcnJvci5tZXNzYWdlIC8vPT4gJ1VuY2xvc2VkIGJsb2NrJ1xuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5yZWFzb24gPSBtZXNzYWdlO1xuXG4gICAgICAgIGlmICggZmlsZSApIHtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogQG1lbWJlciB7c3RyaW5nfSAtIEFic29sdXRlIHBhdGggdG8gdGhlIGJyb2tlbiBmaWxlLlxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAgICAgKiBlcnJvci5maWxlICAgICAgIC8vPT4gJ2Euc2FzcydcbiAgICAgICAgICAgICAqIGVycm9yLmlucHV0LmZpbGUgLy89PiAnYS5jc3MnXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMuZmlsZSA9IGZpbGU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCBzb3VyY2UgKSB7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEBtZW1iZXIge3N0cmluZ30gLSBTb3VyY2UgY29kZSBvZiB0aGUgYnJva2VuIGZpbGUuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICAgICAqIGVycm9yLnNvdXJjZSAgICAgICAvLz0+ICdhIHsgYiB7fSB9J1xuICAgICAgICAgICAgICogZXJyb3IuaW5wdXQuY29sdW1uIC8vPT4gJ2EgYiB7IH0nXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMuc291cmNlID0gc291cmNlO1xuICAgICAgICB9XG4gICAgICAgIGlmICggcGx1Z2luICkge1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBAbWVtYmVyIHtzdHJpbmd9IC0gUGx1Z2luIG5hbWUsIGlmIGVycm9yIGNhbWUgZnJvbSBwbHVnaW4uXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICAgICAqIGVycm9yLnBsdWdpbiAvLz0+ICdwb3N0Y3NzLXZhcnMnXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMucGx1Z2luID0gcGx1Z2luO1xuICAgICAgICB9XG4gICAgICAgIGlmICggdHlwZW9mIGxpbmUgIT09ICd1bmRlZmluZWQnICYmIHR5cGVvZiBjb2x1bW4gIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBAbWVtYmVyIHtudW1iZXJ9IC0gU291cmNlIGxpbmUgb2YgdGhlIGVycm9yLlxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAgICAgKiBlcnJvci5saW5lICAgICAgIC8vPT4gMlxuICAgICAgICAgICAgICogZXJyb3IuaW5wdXQubGluZSAvLz0+IDRcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5saW5lICAgPSBsaW5lO1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBAbWVtYmVyIHtudW1iZXJ9IC0gU291cmNlIGNvbHVtbiBvZiB0aGUgZXJyb3IuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICAgICAqIGVycm9yLmNvbHVtbiAgICAgICAvLz0+IDFcbiAgICAgICAgICAgICAqIGVycm9yLmlucHV0LmNvbHVtbiAvLz0+IDRcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5jb2x1bW4gPSBjb2x1bW47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnNldE1lc3NhZ2UoKTtcblxuICAgICAgICBpZiAoIEVycm9yLmNhcHR1cmVTdGFja1RyYWNlICkge1xuICAgICAgICAgICAgRXJyb3IuY2FwdHVyZVN0YWNrVHJhY2UodGhpcywgQ3NzU3ludGF4RXJyb3IpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgc2V0TWVzc2FnZSgpIHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEBtZW1iZXIge3N0cmluZ30gLSBGdWxsIGVycm9yIHRleHQgaW4gdGhlIEdOVSBlcnJvciBmb3JtYXRcbiAgICAgICAgICogICAgICAgICAgICAgICAgICAgIHdpdGggcGx1Z2luLCBmaWxlLCBsaW5lIGFuZCBjb2x1bW4uXG4gICAgICAgICAqXG4gICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAqIGVycm9yLm1lc3NhZ2UgLy89PiAnYS5jc3M6MToxOiBVbmNsb3NlZCBibG9jaydcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMubWVzc2FnZSAgPSB0aGlzLnBsdWdpbiA/IHRoaXMucGx1Z2luICsgJzogJyA6ICcnO1xuICAgICAgICB0aGlzLm1lc3NhZ2UgKz0gdGhpcy5maWxlID8gdGhpcy5maWxlIDogJzxjc3MgaW5wdXQ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AgLy8gICAgPiA2IHwgICBiYWRcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICB8ICAgXlxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICA3IHwgfVxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICA4IHwgYiB7XCJcbiAgICAgKlxuICAgICAqIEByZXR1cm4ge3N0cmluZ30gZmV3IGxpbmVzIG9mIENTUyBzb3VyY2UgdGhhdCBjYXVzZWQgdGhlIGVycm9yXG4gICAgICovXG4gICAgc2hvd1NvdXJjZUNvZGUoY29sb3IpIHtcbiAgICAgICAgaWYgKCAhdGhpcy5zb3VyY2UgKSByZXR1cm4gJyc7XG5cbiAgICAgICAgbGV0IGNzcyA9IHRoaXMuc291cmNlO1xuICAgICAgICBpZiAoIHR5cGVvZiBjb2xvciA9PT0gJ3VuZGVmaW5lZCcgKSBjb2xvciA9IHN1cHBvcnRzQ29sb3Iuc3Rkb3V0O1xuICAgICAgICBpZiAoIGNvbG9yICkgY3NzID0gdGVybWluYWxIaWdobGlnaHQoY3NzKTtcblxuICAgICAgICBsZXQgbGluZXMgPSBjc3Muc3BsaXQoL1xccj9cXG4vKTtcbiAgICAgICAgbGV0IHN0YXJ0ID0gTWF0aC5tYXgodGhpcy5saW5lIC0gMywgMCk7XG4gICAgICAgIGxldCBlbmQgICA9IE1hdGgubWluKHRoaXMubGluZSArIDIsIGxpbmVzLmxlbmd0aCk7XG5cbiAgICAgICAgbGV0IG1heFdpZHRoID0gU3RyaW5nKGVuZCkubGVuZ3RoO1xuXG4gICAgICAgIGZ1bmN0aW9uIG1hcmsodGV4dCkge1xuICAgICAgICAgICAgaWYgKCBjb2xvciAmJiBjaGFsay5yZWQgKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNoYWxrLnJlZC5ib2xkKHRleHQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGV4dDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBhc2lkZSh0ZXh0KSB7XG4gICAgICAgICAgICBpZiAoIGNvbG9yICYmIGNoYWxrLmdyYXkgKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNoYWxrLmdyYXkodGV4dCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiB0ZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGxpbmVzLnNsaWNlKHN0YXJ0LCBlbmQpLm1hcCggKGxpbmUsIGluZGV4KSA9PiB7XG4gICAgICAgICAgICBsZXQgbnVtYmVyID0gc3RhcnQgKyAxICsgaW5kZXg7XG4gICAgICAgICAgICBsZXQgZ3V0dGVyID0gJyAnICsgKCcgJyArIG51bWJlcikuc2xpY2UoLW1heFdpZHRoKSArICcgfCAnO1xuICAgICAgICAgICAgaWYgKCBudW1iZXIgPT09IHRoaXMubGluZSApIHtcbiAgICAgICAgICAgICAgICBsZXQgc3BhY2luZyA9XG4gICAgICAgICAgICAgICAgICAgIGFzaWRlKGd1dHRlci5yZXBsYWNlKC9cXGQvZywgJyAnKSkgK1xuICAgICAgICAgICAgICAgICAgICBsaW5lLnNsaWNlKDAsIHRoaXMuY29sdW1uIC0gMSkucmVwbGFjZSgvW15cXHRdL2csICcgJyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1hcmsoJz4nKSArIGFzaWRlKGd1dHRlcikgKyBsaW5lICsgJ1xcbiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgc3BhY2luZyArIG1hcmsoJ14nKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICcgJyArIGFzaWRlKGd1dHRlcikgKyBsaW5lO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KS5qb2luKCdcXG4nKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZXR1cm5zIGVycm9yIHBvc2l0aW9uLCBtZXNzYWdlIGFuZCBzb3VyY2UgY29kZSBvZiB0aGUgYnJva2VuIHBhcnQuXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGVycm9yLnRvU3RyaW5nKCkgLy89PiBcIkNzc1N5bnRheEVycm9yOiBhcHAuY3NzOjE6MTogVW5jbG9zZWQgYmxvY2tcbiAgICAgKiAgICAgICAgICAgICAgICAgIC8vICAgID4gMSB8IGEge1xuICAgICAqICAgICAgICAgICAgICAgICAgLy8gICAgICAgIHwgXlwiXG4gICAgICpcbiAgICAgKiBAcmV0dXJuIHtzdHJpbmd9IGVycm9yIHBvc2l0aW9uLCBtZXNzYWdlIGFuZCBzb3VyY2UgY29kZVxuICAgICAqL1xuICAgIHRvU3RyaW5nKCkge1xuICAgICAgICBsZXQgY29kZSA9IHRoaXMuc2hvd1NvdXJjZUNvZGUoKTtcbiAgICAgICAgaWYgKCBjb2RlICkge1xuICAgICAgICAgICAgY29kZSA9ICdcXG5cXG4nICsgY29kZSArICdcXG4nO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLm5hbWUgKyAnOiAnICsgdGhpcy5tZXNzYWdlICsgY29kZTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAbWVtYmVyb2YgQ3NzU3ludGF4RXJyb3IjXG4gICAgICogQG1lbWJlciB7SW5wdXR9IGlucHV0IC0gSW5wdXQgb2JqZWN0IHdpdGggUG9zdENTUyBpbnRlcm5hbCBpbmZvcm1hdGlvblxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIGFib3V0IGlucHV0IGZpbGUuIElmIGlucHV0IGhhcyBzb3VyY2UgbWFwXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSBwcmV2aW91cyB0b29sLCBQb3N0Q1NTIHdpbGwgdXNlIG9yaWdpblxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIChmb3IgZXhhbXBsZSwgU2Fzcykgc291cmNlLiBZb3UgY2FuIHVzZSB0aGlzXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0IHRvIGdldCBQb3N0Q1NTIGlucHV0IHNvdXJjZS5cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogZXJyb3IuaW5wdXQuZmlsZSAvLz0+ICdhLmNzcydcbiAgICAgKiBlcnJvci5maWxlICAgICAgIC8vPT4gJ2Euc2FzcydcbiAgICAgKi9cblxufVxuXG5leHBvcnQgZGVmYXVsdCBDc3NTeW50YXhFcnJvcjtcbiJdfQ== + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _node = __webpack_require__(30); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uLmVzNiJdLCJuYW1lcyI6WyJEZWNsYXJhdGlvbiIsImRlZmF1bHRzIiwidHlwZSJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBOzs7Ozs7Ozs7Ozs7QUFFQTs7Ozs7Ozs7Ozs7SUFXTUEsVzs7O0FBRUYsdUJBQVlDLFFBQVosRUFBc0I7QUFBQTs7QUFBQSxpREFDbEIsaUJBQU1BLFFBQU4sQ0FEa0I7O0FBRWxCLFVBQUtDLElBQUwsR0FBWSxNQUFaO0FBRmtCO0FBR3JCOztBQUVEOzs7Ozs7Ozs7O0FBVUE7Ozs7Ozs7Ozs7QUFVQTs7Ozs7Ozs7Ozs7QUFXQTs7Ozs7Ozs7Ozs7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}), +/* 56 */ +/***/ (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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _mapGenerator = __webpack_require__(172); + +var _mapGenerator2 = _interopRequireDefault(_mapGenerator); + +var _stringify2 = __webpack_require__(60); + +var _stringify3 = _interopRequireDefault(_stringify2); + +var _warnOnce = __webpack_require__(62); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _result = __webpack_require__(175); + +var _result2 = _interopRequireDefault(_result); + +var _parse = __webpack_require__(57); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhenktcmVzdWx0LmVzNiJdLCJuYW1lcyI6WyJpc1Byb21pc2UiLCJvYmoiLCJ0aGVuIiwiTGF6eVJlc3VsdCIsInByb2Nlc3NvciIsImNzcyIsIm9wdHMiLCJzdHJpbmdpZmllZCIsInByb2Nlc3NlZCIsInJvb3QiLCJ0eXBlIiwibWFwIiwiaW5saW5lIiwicHJldiIsInBhcnNlciIsInN5bnRheCIsInBhcnNlIiwiZXJyb3IiLCJyZXN1bHQiLCJ3YXJuaW5ncyIsInN5bmMiLCJ0b1N0cmluZyIsIm9uRnVsZmlsbGVkIiwib25SZWplY3RlZCIsImFzeW5jIiwiY2F0Y2giLCJoYW5kbGVFcnJvciIsInBsdWdpbiIsIm5hbWUiLCJwb3N0Y3NzUGx1Z2luIiwic2V0TWVzc2FnZSIsInBvc3Rjc3NWZXJzaW9uIiwicGx1Z2luTmFtZSIsInBsdWdpblZlciIsInJ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zeW5jaHJvbm91cyBwbHVnaW5zXG4gICAgICogYW5kIGNhbGxzIG9uUmVqZWN0ZWQgZm9yIGVhY2ggZXJyb3IgdGhyb3duIGluIGFueSBwbHVnaW4uXG4gICAgICpcbiAgICAgKiBJdCBpbXBsZW1lbnRzIHN0YW5kYXJkIFByb21pc2UgQVBJLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtvblJlamVjdGVkfSBvblJlamVjdGVkIC0gY2FsbGJhY2sgd2lsbCBiZSBleGVjdXRlZCBvbiBhbnkgZXJyb3JcbiAgICAgKlxuICAgICAqIEByZXR1cm4ge1Byb21pc2V9IFByb21pc2UgQVBJIHRvIG1ha2UgcXVldWVcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogcG9zdGNzcyhbY3NzbmV4dF0pLnByb2Nlc3MoY3NzKS50aGVuKHJlc3VsdCA9PiB7XG4gICAgICogICBjb25zb2xlLmxvZyhyZXN1bHQuY3NzKTtcbiAgICAgKiB9KS5jYXRjaChlcnJvciA9PiB7XG4gICAgICogICBjb25zb2xlLmVycm9yKGVycm9yKTtcbiAgICAgKiB9KTtcbiAgICAgKi9cbiAgICBjYXRjaChvblJlamVjdGVkKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmFzeW5jKCkuY2F0Y2gob25SZWplY3RlZCk7XG4gICAgfVxuXG4gICAgaGFuZGxlRXJyb3IoZXJyb3IsIHBsdWdpbikge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGhpcy5lcnJvciA9IGVycm9yO1xuICAgICAgICAgICAgaWYgKCBlcnJvci5uYW1lID09PSAnQ3NzU3ludGF4RXJyb3InICYmICFlcnJvci5wbHVnaW4gKSB7XG4gICAgICAgICAgICAgICAgZXJyb3IucGx1Z2luID0gcGx1Z2luLnBvc3Rjc3NQbHVnaW47XG4gICAgICAgICAgICAgICAgZXJyb3Iuc2V0TWVzc2FnZSgpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICggcGx1Z2luLnBvc3Rjc3NWZXJzaW9uICkge1xuICAgICAgICAgICAgICAgIGxldCBwbHVnaW5OYW1lID0gcGx1Z2luLnBvc3Rjc3NQbHVnaW47XG4gICAgICAgICAgICAgICAgbGV0IHBsdWdpblZlciAgPSBwbHVnaW4ucG9zdGNzc1ZlcnNpb247XG4gICAgICAgICAgICAgICAgbGV0IHJ1bnRpbWVWZXIgPSB0aGlzLnJlc3VsdC5wcm9jZXNzb3IudmVyc2lvbjtcbiAgICAgICAgICAgICAgICBsZXQgYSA9IHBsdWdpblZlci5zcGxpdCgnLicpO1xuICAgICAgICAgICAgICAgIGxldCBiID0gcnVudGltZVZlci5zcGxpdCgnLicpO1xuXG4gICAgICAgICAgICAgICAgaWYgKCBhWzBdICE9PSBiWzBdIHx8IHBhcnNlSW50KGFbMV0pID4gcGFyc2VJbnQoYlsxXSkgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAnVW5rbm93biBlcnJvciBmcm9tIFBvc3RDU1MgcGx1Z2luLiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICdZb3VyIGN1cnJlbnQgUG9zdENTUyB2ZXJzaW9uICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2lzICcgKyBydW50aW1lVmVyICsgJywgYnV0ICcgKyBwbHVnaW5OYW1lICsgJyAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICd1c2VzICcgKyBwbHVnaW5WZXIgKyAnLiBQZXJoYXBzIHRoaXMgaXMgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAndGhlIHNvdXJjZSBvZiB0aGUgZXJyb3IgYmVsb3cuJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGlmICggY29uc29sZSAmJiBjb25zb2xlLmVycm9yICkgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgYXN5bmNUaWNrKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICBpZiAoIHRoaXMucGx1Z2luID49IHRoaXMucHJvY2Vzc29yLnBsdWdpbnMubGVuZ3RoICkge1xuICAgICAgICAgICAgdGhpcy5wcm9jZXNzZWQgPSB0cnVlO1xuICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBsZXQgcGx1Z2luICA9IHRoaXMucHJvY2Vzc29yLnBsdWdpbnNbdGhpcy5wbHVnaW5dO1xuICAgICAgICAgICAgbGV0IHByb21pc2UgPSB0aGlzLnJ1bihwbHVnaW4pO1xuICAgICAgICAgICAgdGhpcy5wbHVnaW4gKz0gMTtcblxuICAgICAgICAgICAgaWYgKCBpc1Byb21pc2UocHJvbWlzZSkgKSB7XG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYXN5bmNUaWNrKHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgICAgICAgfSkuY2F0Y2goIGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVFcnJvcihlcnJvciwgcGx1Z2luKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLmFzeW5jVGljayhyZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICB0aGlzLnByb2Nlc3NlZCA9IHRydWU7XG4gICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgYXN5bmMoKSB7XG4gICAgICAgIGlmICggdGhpcy5wcm9jZXNzZWQgKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoIChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIHRoaXMuZXJyb3IgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdCh0aGlzLmVycm9yKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHRoaXMuc3RyaW5naWZ5KCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGlmICggdGhpcy5wcm9jZXNzaW5nICkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucHJvY2Vzc2luZztcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMucHJvY2Vzc2luZyA9IG5ldyBQcm9taXNlKCAocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgICBpZiAoIHRoaXMuZXJyb3IgKSByZXR1cm4gcmVqZWN0KHRoaXMuZXJyb3IpO1xuICAgICAgICAgICAgdGhpcy5wbHVnaW4gPSAwO1xuICAgICAgICAgICAgdGhpcy5hc3luY1RpY2socmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgfSkudGhlbiggKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5wcm9jZXNzZWQgPSB0cnVlO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3RyaW5naWZ5KCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiB0aGlzLnByb2Nlc3Npbmc7XG4gICAgfVxuXG4gICAgc3luYygpIHtcbiAgICAgICAgaWYgKCB0aGlzLnByb2Nlc3NlZCApIHJldHVybiB0aGlzLnJlc3VsdDtcbiAgICAgICAgdGhpcy5wcm9jZXNzZWQgPSB0cnVlO1xuXG4gICAgICAgIGlmICggdGhpcy5wcm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GlzLnN0cmluZ2lmaWVkID0gdHJ1ZTtcblxuICAgICAgICB0aGlzLnN5bmMoKTtcblxuICAgICAgICBsZXQgb3B0cyA9IHRoaXMucmVzdWx0Lm9wdHM7XG4gICAgICAgIGxldCBzdHIgID0gc3RyaW5naWZ5O1xuICAgICAgICBpZiAoIG9wdHMuc3ludGF4ICkgICAgICBzdHIgPSBvcHRzLnN5bnRheC5zdHJpbmdpZnk7XG4gICAgICAgIGlmICggb3B0cy5zdHJpbmdpZmllciApIHN0ciA9IG9wdHMuc3RyaW5naWZpZXI7XG4gICAgICAgIGlmICggc3RyLnN0cmluZ2lmeSApICAgIHN0ciA9IHN0ci5zdHJpbmdpZnk7XG5cbiAgICAgICAgbGV0IG1hcCAgPSBuZXcgTWFwR2VuZXJhdG9yKHN0ciwgdGhpcy5yZXN1bHQucm9vdCwgdGhpcy5yZXN1bHQub3B0cyk7XG4gICAgICAgIGxldCBkYXRhID0gbWFwLmdlbmVyYXRlKCk7XG4gICAgICAgIHRoaXMucmVzdWx0LmNzcyA9IGRhdGFbMF07XG4gICAgICAgIHRoaXMucmVzdWx0Lm1hcCA9IGRhdGFbMV07XG5cbiAgICAgICAgcmV0dXJuIHRoaXMucmVzdWx0O1xuICAgIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBMYXp5UmVzdWx0O1xuXG4vKipcbiAqIEBjYWxsYmFjayBvbkZ1bGZpbGxlZFxuICogQHBhcmFtIHtSZXN1bHR9IHJlc3VsdFxuICovXG5cbi8qKlxuICogQGNhbGxiYWNrIG9uUmVqZWN0ZWRcbiAqIEBwYXJhbSB7RXJyb3J9IGVycm9yXG4gKi9cbiJdfQ== + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = parse; + +var _parser = __webpack_require__(58); + +var _parser2 = _interopRequireDefault(_parser); + +var _input = __webpack_require__(29); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsImNzcyIsIm9wdHMiLCJzYWZlIiwiRXJyb3IiLCJpbnB1dCIsInBhcnNlciIsImUiLCJuYW1lIiwiZnJvbSIsInRlc3QiLCJtZXNzYWdlIiwicm9vdCJdLCJtYXBwaW5ncyI6Ijs7O2tCQUd3QkEsSzs7QUFIeEI7Ozs7QUFDQTs7Ozs7O0FBRWUsU0FBU0EsS0FBVCxDQUFlQyxHQUFmLEVBQW9CQyxJQUFwQixFQUEwQjtBQUNyQyxRQUFLQSxRQUFRQSxLQUFLQyxJQUFsQixFQUF5QjtBQUNyQixjQUFNLElBQUlDLEtBQUosQ0FBVSw4QkFDQSw0Q0FEVixDQUFOO0FBRUg7O0FBRUQsUUFBSUMsUUFBUSxvQkFBVUosR0FBVixFQUFlQyxJQUFmLENBQVo7QUFDQSxRQUFJSSxTQUFTLHFCQUFXRCxLQUFYLENBQWI7QUFDQSxRQUFJO0FBQ0FDLGVBQU9OLEtBQVA7QUFDSCxLQUZELENBRUUsT0FBT08sQ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jsgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0cnkgYWdhaW4gd2l0aCB0aGUgcG9zdGNzcy1sZXNzIHBhcnNlcic7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZTtcbiAgICB9XG5cbiAgICByZXR1cm4gcGFyc2VyLnJvb3Q7XG59XG4iXX0= + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _declaration = __webpack_require__(55); + +var _declaration2 = _interopRequireDefault(_declaration); + +var _tokenize = __webpack_require__(61); + +var _tokenize2 = _interopRequireDefault(_tokenize); + +var _comment = __webpack_require__(28); + +var _comment2 = _interopRequireDefault(_comment); + +var _atRule = __webpack_require__(27); + +var _atRule2 = _interopRequireDefault(_atRule); + +var _root = __webpack_require__(59); + +var _root2 = _interopRequireDefault(_root); + +var _rule = __webpack_require__(31); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlci5lczYiXSwibmFtZXMiOlsiUGFyc2VyIiwiaW5wdXQiLCJyb290IiwiY3VycmVudCIsInNwYWNlcyIsInNlbWljb2xvbiIsImNyZWF0ZVRva2VuaXplciIsInNvdXJjZSIsInN0YXJ0IiwibGluZSIsImNvbHVtbiIsInRva2VuaXplciIsInBhcnNlIiwidG9rZW4iLCJlbmRPZkZpbGUiLCJuZXh0VG9rZW4iLCJmcmVlU2VtaWNvbG9uIiwiZW5kIiw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AgICAgICB0b2tlbiA9IHRoaXMudG9rZW5pemVyLm5leHRUb2tlbigpO1xuXG4gICAgICAgICAgICBzd2l0Y2ggKCB0b2tlblswXSApIHtcblxuICAgICAgICAgICAgY2FzZSAnc3BhY2UnOlxuICAgICAgICAgICAgICAgIHRoaXMuc3BhY2VzICs9IHRva2VuWzFdO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICc7JzpcbiAgICAgICAgICAgICAgICB0aGlzLmZyZWVTZW1pY29sb24odG9rZW4pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICd9JzpcbiAgICAgICAgICAgICAgICB0aGlzLmVuZCh0b2tlbik7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ2NvbW1lbnQnOlxuICAgICAgICAgICAgICAgIHRoaXMuY29tbWVudCh0b2tlbik7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ2F0LXdvcmQnOlxuICAgICAgICAgICAgICAgIHRoaXMuYXRydWxlKHRva2VuKTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAneyc6XG4gICAgICAgICAgICAgICAgdGhpcy5lbXB0eVJ1bGUodG9rZW4pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRoaXMub3RoZXIodG9rZW4pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRoaXMuZW5kRmlsZSgpO1xuICAgIH1cblxuICAgIGNvbW1lbnQodG9rZW4pIHtcbiAgICAgICAgbGV0IG5vZGUgPSBuZXcgQ29tbWVudCgpO1xuICAgICAgICB0aGlzLmluaXQobm9kZSwgdG9rZW5bMl0sIHRva2VuWzNdKTtcbiAgICAgICAgbm9kZS5zb3VyY2UuZW5kID0geyBsaW5lOiB0b2tlbls0XSwgY29sdW1uOiB0b2tlbls1XSB9O1xuXG4gICAgICAgIGxldCB0ZXh0ID0gdG9rZW5bMV0uc2xpY2UoMiwgLTIpO1xuICAgICAgICBpZiAoIC9eXFxzKiQvLnRlc3QodGV4dCkgKSB7XG4gICAgICAgICAgICBub2RlLnRleHQgICAgICAgPSAnJztcbiAgICAgICAgICAgIG5vZGUucmF3cy5sZWZ0ICA9IHRleHQ7XG4gICAgICAgICAgICBub2RlLnJhd3MucmlnaHQgPSAnJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGxldCBtYXRjaCA9IHRleHQubWF0Y2goL14oXFxzKikoW15dKlteXFxzXSkoXFxzKikkLyk7XG4gICAgICAgICAgICBub2RlLnRleHQgICAgICAgPSBtYXRjaFsyXTtcbiAgICAgICAgICAgIG5vZGUucmF3cy5sZWZ0ICA9IG1hdGNoWzFdO1xuICAgICAgICAgICAgbm9kZS5yYXdzLnJpZ2h0ID0gbWF0Y2hbM107XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBlbXB0eVJ1bGUodG9rZW4pIHtcbiAgICAgICAgbGV0IG5vZGUgPSBuZXcgUnVsZSgpO1xuICAgICAgICB0aGlzLmluaXQobm9kZSwgdG9rZW5bMl0sIHRva2VuWzNdKTtcbiAgICAgICAgbm9kZS5zZWxlY3RvciA9ICcnO1xuICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiA9ICcnO1xuICAgICAgICB0aGlzLmN1cnJlbnQgPSBub2RlO1xuICAgIH1cblxuICAgIG90aGVyKHN0YXJ0KSB7XG4gICAgICAgIGxldCBlbmQgICAgICA9IGZhbHNlO1xuICAgICAgICBsZXQgdHlwZSAgICAgPSBudWxsO1xuICAgICAgICBsZXQgY29sb24gICAgPSBmYWxzZTtcbiAgICAgICAgbGV0IGJyYWNrZXQgID0gbnVsbDtcbiAgICAgICAgbGV0IGJyYWNrZXRzID0gW107XG5cbiAgICAgICAgbGV0IHRva2VucyA9IFtdO1xuICAgICAgICBsZXQgdG9rZW4gPSBzdGFydDtcbiAgICAgICAgd2hpbGUgKCB0b2tlbiApIHtcbiAgICAgICAgICAgIHR5cGUgPSB0b2tlblswXTtcbiAgICAgICAgICAgIHRva2Vucy5wdXNoKHRva2VuKTtcblxuICAgICAgICAgICAgaWYgKCB0eXBlID09PSAnKCcgfHwgdHlwZSA9PT0gJ1snICkge1xuICAgICAgICAgICAgICAgIGlmICggIWJyYWNrZXQgKSBicmFja2V0ID0gdG9rZW47XG4gICAgICAgICAgICAgICAgYnJhY2tldHMucHVzaCh0eXBlID09PSAnKCcgPyAnKScgOiAnXScpO1xuXG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBicmFja2V0cy5sZW5ndGggPT09IDAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKCB0eXBlID09PSAnOycgKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICggY29sb24gKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRlY2wodG9rZW5zKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCB0eXBlID09PSAneycgKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucnVsZSh0b2tlbnMpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCB0eXBlID09PSAnfScgKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudG9rZW5pemVyLmJhY2sodG9rZW5zLnBvcCgpKTtcbiAgICAgICAgICAgICAgICAgICAgZW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCB0eXBlID09PSAnOicgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbG9uID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIHR5cGUgPT09IGJyYWNrZXRzW2JyYWNrZXRzLmxlbmd0aCAtIDFdICkge1xuICAgICAgICAgICAgICAgIGJyYWNrZXRzLnBvcCgpO1xuICAgICAgICAgICAgICAgIGlmICggYnJhY2tldHMubGVuZ3RoID09PSAwICkgYnJhY2tldCA9IG51bGw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRva2VuID0gdGhpcy50b2tlbml6ZXIubmV4dFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIHRoaXMudG9rZW5pemVyLmVuZE9mRmlsZSgpICkgZW5kID0gdHJ1ZTtcbiAgICAgICAgaWYgKCBicmFja2V0cy5sZW5ndGggPiAwICkgdGhpcy51bmNsb3NlZEJyYWNrZXQoYnJhY2tldCk7XG5cbiAgICAgICAgaWYgKCBlbmQgJiYgY29sb24gKSB7XG4gICAgICAgICAgICB3aGlsZSAoIHRva2Vucy5sZW5ndGggKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnNbdG9rZW5zLmxlbmd0aCAtIDFdWzBdO1xuICAgICAgICAgICAgICAgIGlmICggdG9rZW4gIT09ICdzcGFjZScgJiYgdG9rZW4gIT09ICdjb21tZW50JyApIGJyZWFrO1xuICAgICAgICAgICAgICAgIHRoaXMudG9rZW5pemVyLmJhY2sodG9rZW5zLnBvcCgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuZGVjbCh0b2tlbnMpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy51bmtub3duV29yZCh0b2tlbnMpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcnVsZSh0b2tlbnMpIHtcbiAgICAgICAgdG9rZW5zLnBvcCgpO1xuXG4gICAgICAgIGxldCBub2RlID0gbmV3IFJ1bGUoKTtcbiAgICAgICAgdGhpcy5pbml0KG5vZGUsIHRva2Vuc1swXVsyXSwgdG9rZW5zWzBdWzNdKTtcblxuICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiA9IHRoaXMuc3BhY2VzQW5kQ29tbWVudHNGcm9tRW5kKHRva2Vucyk7XG4gICAgICAgIHRoaXMucmF3KG5vZGUsICdzZWxlY3RvcicsIHRva2Vucyk7XG4gICAgICAgIHRoaXMuY3VycmVudCA9IG5vZGU7XG4gICAgfVxuXG4gICAgZGVjbCh0b2tlbnMpIHtcbiAgICAgICAgbGV0IG5vZGUgPSBuZXcgRGVjbGFyYXRpb24oKTtcbiAgICAgICAgdGhpcy5pbml0KG5vZGUpO1xuXG4gICAgICAgIGxldCBsYXN0ID0gdG9rZW5zW3Rva2Vucy5sZW5ndGggLSAxXTtcbiAgICAgICAgaWYgKCBsYXN0WzBdID09PSAnOycgKSB7XG4gICAgICAgICAgICB0aGlzLnNlbWljb2xvbiA9IHRydWU7XG4gICAgICAgICAgICB0b2tlbnMucG9wKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCBsYXN0WzRdICkge1xuICAgICAgICAgICAgbm9kZS5zb3VyY2UuZW5kID0geyBsaW5lOiBsYXN0WzRdLCBjb2x1bW46IGxhc3RbNV0gfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG5vZGUuc291cmNlLmVuZCA9IHsgbGluZTogbGFzdFsyXSwgY29sdW1uOiBsYXN0WzNdIH07XG4gICAgICAgIH1cblxuICAgICAgICB3aGlsZSAoIHRva2Vuc1swXVswXSAhPT0gJ3dvcmQnICkge1xuICAgICAgICAgICAgaWYgKCB0b2tlbnMubGVuZ3RoID09PSAxICkgdGhpcy51bmtub3duV29yZCh0b2tlbnMpO1xuICAgICAgICAgICAgbm9kZS5yYXdzLmJlZm9yZSArPSB0b2tlbnMuc2hpZnQoKVsxXTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNvdXJjZS5zdGFydCA9IHsgbGluZTogdG9rZW5zWzBdWzJdLCBjb2x1bW46IHRva2Vuc1swXVszXSB9O1xuXG4gICAgICAgIG5vZGUucHJvcCA9ICcnO1xuICAgICAgICB3aGlsZSAoIHRva2Vucy5sZW5ndGggKSB7XG4gICAgICAgICAgICBsZXQgdHlwZSA9IHRva2Vuc1swXVswXTtcbiAgICAgICAgICAgIGlmICggdHlwZSA9PT0gJzonIHx8IHR5cGUgPT09ICdzcGFjZScgfHwgdHlwZSA9PT0gJ2NvbW1lbnQnICkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbm9kZS5wcm9wICs9IHRva2Vucy5zaGlmdCgpWzFdO1xuICAgICAgICB9XG5cbiAgICAgICAgbm9kZS5yYXdzLmJldHdlZW4gPSAnJztcblxuICAgICAgICBsZXQgdG9rZW47XG4gICAgICAgIHdoaWxlICggdG9rZW5zLmxlbmd0aCApIHtcbiAgICAgICAgICAgIHRva2VuID0gdG9rZW5zLnNoaWZ0KCk7XG5cbiAgICAgICAgICAgIGlmICggdG9rZW5bMF0gPT09ICc6JyApIHtcbiAgICAgICAgICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiArPSB0b2tlblsxXTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbm9kZS5yYXdzLmJldHdlZW4gKz0gdG9rZW5bMV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIG5vZGUucHJvcFswXSA9PT0gJ18nIHx8IG5vZGUucHJvcFswXSA9PT0gJyonICkge1xuICAgICAgICAgICAgbm9kZS5yYXdzLmJlZm9yZSArPSBub2RlLnByb3BbMF07XG4gICAgICAgICAgICBub2RlLnByb3AgPSBub2RlLnByb3Auc2xpY2UoMSk7XG4gICAgICAgIH1cbiAgICAgICAgbm9kZS5yYXdzLmJldHdlZW4gKz0gdGhpcy5zcGFjZXNBbmRDb21tZW50c0Zyb21TdGFydCh0b2tlbnMpO1xuICAgICAgICB0aGlzLnByZWNoZWNrTWlzc2VkU2VtaWNvbG9uKHRva2Vucyk7XG5cbiAgICAgICAgZm9yICggbGV0IGkgPSB0b2tlbnMubGVuZ3RoIC0gMTsgaSA+IDA7IGktLSApIHtcbiAgICAgICAgICAgIHRva2VuID0gdG9rZW5zW2ldO1xuICAgICAgICAgICAgaWYgKCB0b2tlblsxXS50b0xvd2VyQ2FzZSgpID09PSAnIWltcG9ydGFudCcgKSB7XG4gICAgICAgICAgICAgICAgbm9kZS5pbXBvcnRhbnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGxldCBzdHJpbmcgPSB0aGlzLnN0cmluZ0Zyb20odG9rZW5zLCBpKTtcbiAgICAgICAgICAgICAgICBzdHJpbmcgPSB0aGlzLnNwYWNlc0Zyb21FbmQodG9rZW5zKSArIHN0cmluZztcbiAgICAgICAgICAgICAgICBpZiAoIHN0cmluZyAhPT0gJyAhaW1wb3J0YW50JyApIG5vZGUucmF3cy5pbXBvcnRhbnQgPSBzdHJpbmc7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodG9rZW5bMV0udG9Mb3dlckNhc2UoKSA9PT0gJ2ltcG9ydGFudCcpIHtcbiAgICAgICAgICAgICAgICBsZXQgY2FjaGUgPSB0b2tlbnMuc2xpY2UoMCk7XG4gICAgICAgICAgICAgICAgbGV0IHN0ciAgID0gJyc7XG4gICAgICAgICAgICAgICAgZm9yICggbGV0IGogPSBpOyBqID4gMDsgai0tICkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZSA9IGNhY2hlW2pdWzBdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIHN0ci50cmltKCkuaW5kZXhPZignIScpID09PSAwICYmIHR5cGUgIT09ICdzcGFjZScgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBjYWNoZS5wb3AoKVsxXSArIHN0cjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCBzdHIudHJpbSgpLmluZGV4T2YoJyEnKSA9PT0gMCApIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5pbXBvcnRhbnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBub2RlLnJhd3MuaW1wb3J0YW50ID0gc3RyO1xuICAgICAgICAgICAgICAgICAgICB0b2tlbnMgPSBjYWNoZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICggdG9rZW5bMF0gIT09ICdzcGFjZScgJiYgdG9rZW5bMF0gIT09ICdjb21tZW50JyApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMucmF3KG5vZGUsICd2YWx1ZScsIHRva2Vucyk7XG5cbiAgICAgICAgaWYgKCBub2RlLnZhbHVlLmluZGV4T2YoJzonKSAhPT0gLTEgKSB0aGlzLmNoZWNrTWlzc2VkU2VtaWNvbG9uKHRva2Vucyk7XG4gICAgfVxuXG4gICAgYXRydWxlKHRva2VuKSB7XG4gICAgICAgIGxldCBub2RlICA9IG5ldyBBdFJ1bGUoKTtcbiAgICAgICAgbm9kZS5uYW1lID0gdG9rZW5bMV0uc2xpY2UoMSk7XG4gICAgICAgIGlmICggbm9kZS5uYW1lID09PSAnJyApIHtcbiAgICAgICAgICAgIHRoaXMudW5uYW1lZEF0cnVsZShub2RlLCB0b2tlbik7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5pbml0KG5vZGUsIHRva2VuWzJdLCB0b2tlblszXSk7XG5cbiAgICAgICAgbGV0IHByZXY7XG4gICAgICAgIGxldCBzaGlmdDtcbiAgICAgICAgbGV0IGxhc3QgICA9IGZhbHNlO1xuICAgICAgICBsZXQgb3BlbiAgID0gZmFsc2U7XG4gICAgICAgIGxldCBwYXJhbXMgPSBbXTtcblxuICAgICAgICB3aGlsZSAoICF0aGlzLnRva2VuaXplci5lbmRPZkZpbGUoKSApIHtcbiAgICAgICAgICAgIHRva2VuID0gdGhpcy50b2tlbml6ZXIubmV4dFRva2VuKCk7XG5cbiAgICAgICAgICAgIGlmICggdG9rZW5bMF0gPT09ICc7JyApIHtcbiAgICAgICAgICAgICAgICBub2RlLnNvdXJjZS5lbmQgPSB7IGxpbmU6IHRva2VuWzJdLCBjb2x1bW46IHRva2VuWzNdIH07XG4gICAgICAgICAgICAgICAgdGhpcy5zZW1pY29sb24gPSB0cnVlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIGlmICggdG9rZW5bMF0gPT09ICd7JyApIHtcbiAgICAgICAgICAgICAgICBvcGVuID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIHRva2VuWzBdID09PSAnfScpIHtcbiAgICAgICAgICAgICAgICBpZiAoIHBhcmFtcy5sZW5ndGggPiAwICkge1xuICAgICAgICAgICAgICAgICAgICBzaGlmdCA9IHBhcmFtcy5sZW5ndGggLSAxO1xuICAgICAgICAgICAgICAgICAgICBwcmV2ID0gcGFyYW1zW3NoaWZ0XTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKCBwcmV2ICYmIHByZXZbMF0gPT09ICdzcGFjZScgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcmV2ID0gcGFyYW1zWy0tc2hpZnRdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICggcHJldiApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuc291cmNlLmVuZCA9IHsgbGluZTogcHJldls0XSwgY29sdW1uOiBwcmV2WzVdIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5lbmQodG9rZW4pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwYXJhbXMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICggdGhpcy50b2tlbml6ZXIuZW5kT2ZGaWxlKCkgKSB7XG4gICAgICAgICAgICAgICAgbGFzdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiA9IHRoaXMuc3BhY2VzQW5kQ29tbWVudHNGcm9tRW5kKHBhcmFtcyk7XG4gICAgICAgIGlmICggcGFyYW1zLmxlbmd0aCApIHtcbiAgICAgICAgICAgIG5vZGUucmF3cy5hZnRlck5hbWUgPSB0aGlzLnNwYWNlc0FuZENvbW1lbnRzRnJvbVN0YXJ0KHBhcmFtcyk7XG4gICAgICAgICAgICB0aGlzLnJhdyhub2RlLCAncGFyYW1zJywgcGFyYW1zKTtcbiAgICAgICAgICAgIGlmICggbGFzdCApIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IHBhcmFtc1twYXJhbXMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICAgICAgbm9kZS5zb3VyY2UuZW5kICAgPSB7IGxpbmU6IHRva2VuWzRdLCBjb2x1bW46IHRva2VuWzVdIH07XG4gICAgICAgICAgICAgICAgdGhpcy5zcGFjZXMgICAgICAgPSBub2RlLnJhd3MuYmV0d2VlbjtcbiAgICAgICAgICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiA9ICcnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbm9kZS5yYXdzLmFmdGVyTmFtZSA9ICcnO1xuICAgICAgICAgICAgbm9kZS5wYXJhbXMgICAgICAgICA9ICcnO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCBvcGVuICkge1xuICAgICAgICAgICAgbm9kZS5ub2RlcyAgID0gW107XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnQgPSBub2RlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZW5kKHRva2VuKSB7XG4gICAgICAgIGlmICggdGhpcy5jdXJyZW50Lm5vZGVzICYmIHRoaXMuY3VycmVudC5ub2Rlcy5sZW5ndGggKSB7XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnQucmF3cy5zZW1pY29sb24gPSB0aGlzLnNlbWljb2xvbjtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNlbWljb2xvbiA9IGZhbHNlO1xuXG4gICAgICAgIHRoaXMuY3VycmVudC5yYXdzLmFmdGVyID0gKHRoaXMuY3VycmVudC5yYXdzLmFmdGVyIHx8ICcnKSArIHRoaXMuc3BhY2VzO1xuICAgICAgICB0aGlzLnNwYWNlcyA9ICcnO1xuXG4gICAgICAgIGlmICggdGhpcy5jdXJyZW50LnBhcmVudCApIHtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudC5zb3VyY2UuZW5kID0geyBsaW5lOiB0b2tlblsyXSwgY29sdW1uOiB0b2tlblszXSB9O1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50ID0gdGhpcy5jdXJyZW50LnBhcmVudDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMudW5leHBlY3RlZENsb3NlKHRva2VuKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGVuZEZpbGUoKSB7XG4gICAgICAgIGlmICggdGhpcy5jdXJyZW50LnBhcmVudCApIHRoaXMudW5jbG9zZWRCbG9jaygpO1xuICAgICAgICBpZiAoIHRoaXMuY3VycmVudC5ub2RlcyAmJiB0aGlzLmN1cnJlbnQubm9kZXMubGVuZ3RoICkge1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50LnJhd3Muc2VtaWNvbG9uID0gdGhpcy5zZW1pY29sb247XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5jdXJyZW50LnJhd3MuYWZ0ZXIgPSAodGhpcy5jdXJyZW50LnJhd3MuYWZ0ZXIgfHwgJycpICsgdGhpcy5zcGFjZXM7XG4gICAgfVxuXG4gICAgZnJlZVNlbWljb2xvbih0b2tlbikge1xuICAgICAgICB0aGlzLnNwYWNlcyArPSB0b2tlblsxXTtcbiAgICAgICAgaWYgKCB0aGlzLmN1cnJlbnQubm9kZXMgKSB7XG4gICAgICAgICAgICBsZXQgcHJldiA9IHRoaXMuY3VycmVudC5ub2Rlc1t0aGlzLmN1cnJlbnQubm9kZXMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICBpZiAoIHByZXYgJiYgcHJldi50eXBlID09PSAncnVsZScgJiYgIXByZXYucmF3cy5vd25TZW1pY29sb24gKSB7XG4gICAgICAgICAgICAgICAgcHJldi5yYXdzLm93blNlbWljb2xvbiA9IHRoaXMuc3BhY2VzO1xuICAgICAgICAgICAgICAgIHRoaXMuc3BhY2VzID0gJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBIZWxwZXJzXG5cbiAgICBpbml0KG5vZGUsIGxpbmUsIGNvbHVtbikge1xuICAgICAgICB0aGlzLmN1cnJlbnQucHVzaChub2RlKTtcblxuICAgICAgICBub2RlLnNvdXJjZSA9IHsgc3RhcnQ6IHsgbGluZSwgY29sdW1uIH0sIGlucHV0OiB0aGlzLmlucHV0IH07XG4gICAgICAgIG5vZGUucmF3cy5iZWZvcmUgPSB0aGlzLnNwYWNlcztcbiAgICAgICAgdGhpcy5zcGFjZXMgPSAnJztcbiAgICAgICAgaWYgKCBub2RlLnR5cGUgIT09ICdjb21tZW50JyApIHRoaXMuc2VtaWNvbG9uID0gZmFsc2U7XG4gICAgfVxuXG4gICAgcmF3KG5vZGUsIHByb3AsIHRva2Vucykge1xuICAgICAgICBsZXQgdG9rZW4sIHR5cGU7XG4gICAgICAgIGxldCBsZW5ndGggPSB0b2tlbnMubGVuZ3RoO1xuICAgICAgICBsZXQgdmFsdWUgID0gJyc7XG4gICAgICAgIGxldCBjbGVhbiAgPSB0cnVlO1xuICAgICAgICBsZXQgbmV4dCwgcHJldjtcbiAgICAgICAgY29uc3QgcGF0dGVybiA9IC9eKFsufCNdKT8oW1xcd10pKy9pO1xuXG4gICAgICAgIGZvciAoIGxldCBpID0gMDsgaSA8IGxlbmd0aDsgaSArPSAxICkge1xuICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnNbaV07XG4gICAgICAgICAgICB0eXBlICA9IHRva2VuWzBdO1xuXG4gICAgICAgICAgICBpZiAoIHR5cGUgPT09ICdjb21tZW50JyAmJiBub2RlLnR5cGUgPT09ICdydWxlJyApIHtcbiAgICAgICAgICAgICAgICBwcmV2ID0gdG9rZW5zW2kgLSAxXTtcbiAgICAgICAgICAgICAgICBuZXh0ID0gdG9rZW5zW2kgKyAxXTtcblxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgcHJldlswXSAhPT0gJ3NwYWNlJyAmJlxuICAgICAgICAgICAgICAgICAgICBuZXh0WzBdICE9PSAnc3BhY2UnICYmXG4gICAgICAgICAgICAgICAgICAgIHBhdHRlcm4udGVzdChwcmV2WzFdKSAmJlxuICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuLnRlc3QobmV4dFsxXSlcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgKz0gdG9rZW5bMV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY2xlYW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCB0eXBlID09PSAnY29tbWVudCcgfHwgdHlwZSA9PT0gJ3NwYWNlJyAmJiBpID09PSBsZW5ndGggLSAxICkge1xuICAgICAgICAgICAgICAgIGNsZWFuID0gZmFsc2U7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhbHVlICs9IHRva2VuWzFdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICggIWNsZWFuICkge1xuICAgICAgICAgICAgbGV0IHJhdyA9IHRva2Vucy5yZWR1Y2UoIChhbGwsIGkpID0+IGFsbCArIGlbMV0sICcnKTtcbiAgICAgICAgICAgIG5vZGUucmF3c1twcm9wXSA9IHsgdmFsdWUsIHJhdyB9O1xuICAgICAgICB9XG4gICAgICAgIG5vZGVbcHJvcF0gPSB2YWx1ZTtcbiAgICB9XG5cbiAgICBzcGFjZXNBbmRDb21tZW50c0Zyb21FbmQodG9rZW5zKSB7XG4gICAgICAgIGxldCBsYXN0VG9rZW5UeXBlO1xuICAgICAgICBsZXQgc3BhY2VzID0gJyc7XG4gICAgICAgIHdoaWxlICggdG9rZW5zLmxlbmd0aCApIHtcbiAgICAgICAgICAgIGxhc3RUb2tlblR5cGUgPSB0b2tlbnNbdG9rZW5zLmxlbmd0aCAtIDFdWzBdO1xuICAgICAgICAgICAgaWYgKCBsYXN0VG9rZW5UeXBlICE9PSAnc3BhY2UnICYmXG4gICAgICAgICAgICAgICAgbGFzdFRva2VuVHlwZSAhPT0gJ2NvbW1lbnQnICkgYnJlYWs7XG4gICAgICAgICAgICBzcGFjZXMgPSB0b2tlbnMucG9wKClbMV0gKyBzcGFjZXM7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNwYWNlcztcbiAgICB9XG5cbiAgICBzcGFjZXNBbmRDb21tZW50c0Zyb21TdGFydCh0b2tlbnMpIHtcbiAgICAgICAgbGV0IG5leHQ7XG4gICAgICAgIGxldCBzcGFjZXMgPSAnJztcbiAgICAgICAgd2hpbGUgKCB0b2tlbnMubGVuZ3RoICkge1xuICAgICAgICAgICAgbmV4dCA9IHRva2Vuc1swXVswXTtcbiAgICAgICAgICAgIGlmICggbmV4dCAhPT0gJ3NwYWNlJyAmJiBuZXh0ICE9PSAnY29tbWVudCcgKSBicmVhaztcbiAgICAgICAgICAgIHNwYWNlcyArPSB0b2tlbnMuc2hpZnQoKVsxXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3BhY2VzO1xuICAgIH1cblxuICAgIHNwYWNlc0Zyb21FbmQodG9rZW5zKSB7XG4gICAgICAgIGxldCBsYXN0VG9rZW5UeXBlO1xuICAgICAgICBsZXQgc3BhY2VzID0gJyc7XG4gICAgICAgIHdoaWxlICggdG9rZW5zLmxlbmd0aCApIHtcbiAgICAgICAgICAgIGxhc3RUb2tlblR5cGUgPSB0b2tlbnNbdG9rZW5zLmxlbmd0aCAtIDFdWzBdO1xuICAgICAgICAgICAgaWYgKCBsYXN0VG9rZW5UeXBlICE9PSAnc3BhY2UnICkgYnJlYWs7XG4gICAgICAgICAgICBzcGFjZXMgPSB0b2tlbnMucG9wKClbMV0gKyBzcGFjZXM7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNwYWNlcztcbiAgICB9XG5cbiAgICBzdHJpbmdGcm9tKHRva2VucywgZnJvbSkge1xuICAgICAgICBsZXQgcmVzdWx0ID0gJyc7XG4gICAgICAgIGZvciAoIGxldCBpID0gZnJvbTsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKyApIHtcbiAgICAgICAgICAgIHJlc3VsdCArPSB0b2tlbnNbaV1bMV07XG4gICAgICAgIH1cbiAgICAgICAgdG9rZW5zLnNwbGljZShmcm9tLCB0b2tlbnMubGVuZ3RoIC0gZnJvbSk7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuXG4gICAgY29sb24odG9rZW5zKSB7XG4gICAgICAgIGxldCBicmFja2V0cyA9IDA7XG4gICAgICAgIGxldCB0b2tlbiwgdHlwZSwgcHJldjtcbiAgICAgICAgZm9yICggbGV0IGkgPSAwOyBpIDwgdG9rZW5zLmxlbmd0aDsgaSsrICkge1xuICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnNbaV07XG4gICAgICAgICAgICB0eXBlICA9IHRva2VuWzBdO1xuXG4gICAgICAgICAgICBpZiAoIHR5cGUgPT09ICcoJyApIHtcbiAgICAgICAgICAgICAgICBicmFja2V0cyArPSAxO1xuICAgICAgICAgICAgfSBlbHNlIGlmICggdHlwZSA9PT0gJyknICkge1xuICAgICAgICAgICAgICAgIGJyYWNrZXRzIC09IDE7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBicmFja2V0cyA9PT0gMCAmJiB0eXBlID09PSAnOicgKSB7XG4gICAgICAgICAgICAgICAgaWYgKCAhcHJldiApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kb3VibGVDb2xvbih0b2tlbik7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICggcHJldlswXSA9PT0gJ3dvcmQnICYmIHByZXZbMV0gPT09ICdwcm9naWQnICkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHByZXYgPSB0b2tlbjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgLy8gRXJyb3JzXG5cbiAgICB1bmNsb3NlZEJyYWNrZXQoYnJhY2tldCkge1xuICAgICAgICB0aHJvdyB0aGlzLmlucHV0LmVycm9yKCdVbmNsb3NlZCBicmFja2V0JywgYnJhY2tldFsyXSwgYnJhY2tldFszXSk7XG4gICAgfVxuXG4gICAgdW5rbm93bldvcmQodG9rZW5zKSB7XG4gICAgICAgIHRocm93IHRoaXMuaW5wdXQuZXJyb3IoJ1Vua25vd24gd29yZCcsIHRva2Vuc1swXVsyXSwgdG9rZW5zWzB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uc1tqXTtcbiAgICAgICAgICAgIGlmICggdG9rZW5bMF0gIT09ICdzcGFjZScgKSB7XG4gICAgICAgICAgICAgICAgZm91bmRlZCArPSAxO1xuICAgICAgICAgICAgICAgIGlmICggZm91bmRlZCA9PT0gMiApIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRocm93IHRoaXMuaW5wdXQuZXJyb3IoJ01pc3NlZCBzZW1pY29sb24nLCB0b2tlblsyXSwgdG9rZW5bM10pO1xuICAgIH1cblxufVxuIl19 + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _container = __webpack_require__(22); + +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__(56); + var Processor = __webpack_require__(174); + + 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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJvb3QuZXM2Il0sIm5hbWVzIjpbIlJvb3Qi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ICAgICBsZXQgbm9kZXMgPSBzdXBlci5ub3JtYWxpemUoY2hpbGQpO1xuXG4gICAgICAgIGlmICggc2FtcGxlICkge1xuICAgICAgICAgICAgaWYgKCB0eXBlID09PSAncHJlcGVuZCcgKSB7XG4gICAgICAgICAgICAgICAgaWYgKCB0aGlzLm5vZGVzLmxlbmd0aCA+IDEgKSB7XG4gICAgICAgICAgICAgICAgICAgIHNhbXBsZS5yYXdzLmJlZm9yZSA9IHRoaXMubm9kZXNbMV0ucmF3cy5iZWZvcmU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHNhbXBsZS5yYXdzLmJlZm9yZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCB0aGlzLmZpcnN0ICE9PSBzYW1wbGUgKSB7XG4gICAgICAgICAgICAgICAgZm9yICggbGV0IG5vZGUgb2Ygbm9kZXMgKSB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGUucmF3cy5iZWZvcmUgPSBzYW1wbGUucmF3cy5iZWZvcmU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG5vZGVzO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgYSB7QGxpbmsgUmVzdWx0fSBpbnN0YW5jZSByZXByZXNlbnRpbmcgdGhlIHJvb3TigJlzIENTUy5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7cHJvY2Vzc09wdGlvbnN9IFtvcHRzXSAtIG9wdGlvbnMgd2l0aCBvbmx5IGB0b2AgYW5kIGBtYXBgIGtleXNcbiAgICAgKlxuICAgICAqIEByZXR1cm4ge1Jlc3VsdH0gcmVzdWx0IHdpdGggY3VycmVudCByb2904oCZcyBDU1NcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogY29uc3Qgcm9vdDEgPSBwb3N0Y3NzLnBhcnN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OiBpcyB0aGUgbGFzdCBjaGlsZCBoYXMgYW4gKG9wdGlvbmFsKSBzZW1pY29sb24uXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIHBvc3Rjc3MucGFyc2UoJ2Ege31cXG4nKS5yYXdzIC8vPT4geyBhZnRlcjogJ1xcbicgfVxuICAgICAqIHBvc3Rjc3MucGFyc2UoJ2Ege30nKS5yYXdzICAgLy89PiB7IGFmdGVyOiAnJyB9XG4gICAgICovXG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgUm9vdDtcbiJdfQ== + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = stringify; + +var _stringifier = __webpack_require__(32); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmeS5lczYiXSwibmFtZXMiOlsic3RyaW5naWZ5Iiwibm9kZSIsImJ1aWxkZXIiLCJzdHIiXSwibWFwcGluZ3MiOiI7OztrQkFFd0JBLFM7O0FBRnhCOzs7Ozs7QUFFZSxTQUFTQSxTQUFULENBQW1CQyxJQUFuQixFQUF5QkMsT0FBekIsRUFBa0M7QUFDN0MsUUFBSUMsTUFBTSwwQkFBZ0JELE9BQWhCLENBQVY7QUFDQUMsUUFBSUgsU0FBSixDQUFjQyxJQUFkO0FBQ0giLCJmaWxlIjoic3RyaW5naWZ5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFN0cmluZ2lmaWVyIGZyb20gJy4vc3RyaW5naWZpZXInO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBzdHJpbmdpZnkobm9kZSwgYnVpbGRlcikge1xuICAgIGxldCBzdHIgPSBuZXcgU3RyaW5naWZpZXIoYnVpbGRlcik7XG4gICAgc3RyLnN0cmluZ2lmeShub2RlKTtcbn1cbiJdfQ== + + +/***/ }), +/* 61 */ +/***/ (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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRva2VuaXplLmVzNiJdLCJuYW1lcyI6WyJ0b2tlbml6ZXIiLCJTSU5HTEVfUVVPVEUiLCJET1VCTEVfUVVPVEUiLCJCQUNLU0xBU0giLCJTTEFTSCIsIk5FV0xJTkUiLCJTUEFDRSIsIkZFRUQiLCJUQUIiLCJDUiIsIk9QRU5fU1FVQVJFIiwiQ0xPU0VfU1FVQVJFIiwiT1BFTl9QQVJFTlRIRVNFUyIsIkNMT1NFX1BBUkVOVEhFU0VTIiwiT1BFTl9DVVJMWSIsIkNMT1NFX0NVUkxZIiwiU0VNSUNPTE9OIiwiQVNURVJJU0siLCJDT0xPTiIsIkFUIiwiUkVfQVRfRU5EIiwiUkVfV09SRF9FTkQiLCJSRV9CQURfQlJBQ0tFVCIsIlJFX0hFWF9FU0NBUEUiLCJpbnB1dCIsIm9wdGlvbnMiLCJjc3MiLCJ2YWx1ZU9mIiwiaWdub3JlIiwiaWdub3JlRXJyb3JzIiwiY29kZSIsIm5leHQiLCJxdW90ZSIsImxpbmVzIiwibGFzdCIsImNvbnRlbnQiLCJlc2NhcGUiLCJuZXh0TGluZSIsIm5leHRPZmZzZXQiLCJlc2NhcGVkIiwiZXNjYXBlUG9zIiwicHJldiIsIm4iLCJjdXJyZW50VG9rZW4iLCJsZW5ndGgiLCJvZmZzZXQiLCJsaW5lIiwicG9zIiwiYnVmZmVyIiwicmV0dXJuZWQiLCJ1bmNsb3NlZCIsIndoYXQiLCJlcnJvciIsImVuZE9mRmlsZSIsIm5leHRUb2tlbiIsInBvcCIsImNoYXJDb2RlQXQiL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TkVXTElORTpcbiAgICAgICAgY2FzZSBTUEFDRTpcbiAgICAgICAgY2FzZSBUQUI6XG4gICAgICAgIGNhc2UgQ1I6XG4gICAgICAgIGNhc2UgRkVFRDpcbiAgICAgICAgICAgIG5leHQgPSBwb3M7XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgbmV4dCArPSAxO1xuICAgICAgICAgICAgICAgIGNvZGUgPSBjc3MuY2hhckNvZGVBdChuZXh0KTtcbiAgICAgICAgICAgICAgICBpZiAoIGNvZGUgPT09IE5FV0xJTkUgKSB7XG4gICAgICAgICAgICAgICAgICAgIG9mZnNldCA9IG5leHQ7XG4gICAgICAgICAgICAgICAgICAgIGxpbmUgKz0gMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlICggY29kZSA9PT0gU1BBQ0UgICB8fFxuICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPT09IE5FV0xJTkUgfHxcbiAgICAgICAgICAgICAgICAgICAgICBjb2RlID09PSBUQUIgICAgIHx8XG4gICAgICAgICAgICAgICAgICAgICAgY29kZSA9PT0gQ1IgICAgICB8fFxuICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPT09IEZFRUQgKTtcblxuICAgICAgICAgICAgY3VycmVudFRva2VuID0gWydzcGFjZScsIGNzcy5zbGljZShwb3MsIG5leHQpXTtcbiAgICAgICAgICAgIHBvcyA9IG5leHQgLSAxO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSBPUEVOX1NRVUFSRTpcbiAgICAgICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnWycsICdbJywgbGluZSwgcG9zIC0gb2Zmc2V0XTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgQ0xPU0VfU1FVQVJFOlxuICAgICAgICAgICAgY3VycmVudFRva2VuID0gWyddJywgJ10nLCBsaW5lLCBwb3MgLSBvZmZzZXRdO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSBPUEVOX0NVUkxZOlxuICAgICAgICAgICAgY3VycmVudFRva2VuID0gWyd7JywgJ3snLCBsaW5lLCBwb3MgLSBvZmZzZXRdO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSBDTE9TRV9DVVJMWTpcbiAgICAgICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnfScsICd9JywgbGluZSwgcG9zIC0gb2Zmc2V0XTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgQ09MT046XG4gICAgICAgICAgICBjdXJyZW50VG9rZW4gPSBbJzonLCAnOicsIGxpbmUsIHBvcyAtIG9mZnNldF07XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIFNFTUlDT0xPTjpcbiAgICAgICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnOycsICc7JywgbGluZSwgcG9zIC0gb2Zmc2V0XTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgT1BFTl9QQVJFTlRIRVNFUzpcbiAgICAgICAgICAgIHByZXYgPSBidWZmZXIubGVuZ3RoID8gYnVmZmVyLnBvcCgpWzFdIDogJyc7XG4gICAgICAgICAgICBuICAgID0gY3NzLmNoYXJDb2RlQXQocG9zICsgMSk7XG4gICAgICAgICAgICBpZiAoIHByZXYgPT09ICd1cmwnICYmXG4gICAgICAgICAgICAgICAgIG4gIT09IFNJTkdMRV9RVU9URSAmJiBuICE9PSBET1VCTEVfUVVPVEUgJiZcbiAgICAgICAgICAgICAgICAgbiAhPT0gU1BBQ0UgJiYgbiAhPT0gTkVXTElORSAmJiBuICE9PSBUQUIgJiZcbiAgICAgICAgICAgICAgICAgbiAhPT0gRkVFRCAmJiBuICE9PSBDUiApIHtcbiAgICAgICAgICAgICAgICBuZXh0ID0gcG9zO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgZXNjYXBlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBuZXh0ICAgID0gY3NzLmluZGV4T2YoJyknLCBuZXh0ICsgMSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICggbmV4dCA9PT0gLTEgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIGlnbm9yZSApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXh0ID0gcG9zO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmNsb3NlZCgnYnJhY2tldCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVzY2FwZVBvcyA9IG5leHQ7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICggY3NzLmNoYXJDb2RlQXQoZXNjYXBlUG9zIC0gMSkgPT09IEJBQ0tTTEFTSCApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVzY2FwZVBvcyAtPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXNjYXBlZCA9ICFlc2NhcGVkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoIGVzY2FwZWQgKTtcblxuICAgICAgICAgICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnYnJhY2tldHMnLCBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSksXG4gICAgICAgICAgICAgICAgICAgIGxpbmUsIHBvcyAgLSBvZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgIGxpbmUsIG5leHQgLSBvZmZzZXRcbiAgICAgICAgICAgICAgICBdO1xuXG4gICAgICAgICAgICAgICAgcG9zID0gbmV4dDtcblxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBuZXh0ICAgID0gY3NzLmluZGV4T2YoJyknLCBwb3MgKyAxKTtcbiAgICAgICAgICAgICAgICBjb250ZW50ID0gY3NzLnNsaWNlKHBvcywgbmV4dCArIDEpO1xuXG4gICAgICAgICAgICAgICAgaWYgKCBuZXh0ID09PSAtMSB8fCBSRV9CQURfQlJBQ0tFVC50ZXN0KGNvbnRlbnQpICkge1xuICAgICAgICAgICAgICAgICAgICBjdXJyZW50VG9rZW4gPSBbJygnLCAnKCcsIGxpbmUsIHBvcyAtIG9mZnNldF07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudFRva2VuID0gWydicmFja2V0cycsIGNvbnRlbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lLCBwb3MgIC0gb2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZSwgbmV4dCAtIG9mZnNldFxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgICAgICBwb3MgPSBuZXh0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSBDTE9TRV9QQVJFTlRIRVNFUzpcbiAgICAgICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnKScsICcpJywgbGluZSwgcG9zIC0gb2Zmc2V0XTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgU0lOR0xFX1FVT1RFOlxuICAgICAgICBjYXNlIERPVUJMRV9RVU9URTpcbiAgICAgICAgICAgIHF1b3RlID0gY29kZSA9PT0gU0lOR0xFX1FVT1RFID8gJ1xcJycgOiAnXCInO1xuICAgICAgICAgICAgbmV4dCAgPSBwb3M7XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgZXNjYXBlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIG5leHQgICAgPSBjc3MuaW5kZXhPZihxdW90ZSwgbmV4dCArIDEpO1xuICAgICAgICAgICAgICAgIGlmICggbmV4dCA9PT0gLTEgKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICggaWdub3JlICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dCA9IHBvcyArIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuY2xvc2VkKCdzdHJpbmcnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlc2NhcGVQb3MgPSBuZXh0O1xuICAgICAgICAgICAgICAgIHdoaWxlICggY3NzLmNoYXJDb2RlQXQoZXNjYXBlUG9zIC0gMSkgPT09IEJBQ0tTTEFTSCApIHtcbiAgICAgICAgICAgICAgICAgICAgZXNjYXBlUG9zIC09IDE7XG4gICAgICAgICAgICAgICAgICAgIGVzY2FwZWQgPSAhZXNjYXBlZDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlICggZXNjYXBlZCApO1xuXG4gICAgICAgICAgICBjb250ZW50ID0gY3NzLnNsaWNlKHBvcywgbmV4dCArIDEpO1xuICAgICAgICAgICAgbGluZXMgICA9IGNvbnRlbnQuc3BsaXQoJ1xcbicpO1xuICAgICAgICAgICAgbGFzdCAgICA9IGxpbmVzLmxlbmd0aCAtIDE7XG5cbiAgICAgICAgICAgIGlmICggbGFzdCA+IDAgKSB7XG4gICAgICAgICAgICAgICAgbmV4dExpbmUgICA9IGxpbmUgKyBsYXN0O1xuICAgICAgICAgICAgICAgIG5leHRPZmZzZXQgPSBuZXh0IC0gbGluZXNbbGFzdF0ubGVuZ3RoO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBuZXh0TGluZSAgID0gbGluZTtcbiAgICAgICAgICAgICAgICBuZXh0T2Zmc2V0ID0gb2Zmc2V0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjdXJyZW50VG9rZW4gPSBbJ3N0cmluZycsIGNzcy5zbGljZShwb3MsIG5leHQgKyAxKSxcbiAgICAgICAgICAgICAgICBsaW5lLCBwb3MgIC0gb2Zmc2V0LFxuICAgICAgICAgICAgICAgIG5leHRMaW5lLCBuZXh0IC0gbmV4dE9mZnNldFxuICAgICAgICAgICAgXTtcblxuICAgICAgICAgICAgb2Zmc2V0ID0gbmV4dE9mZnNldDtcbiAgICAgICAgICAgIGxpbmUgICA9IG5leHRMaW5lO1xuICAgICAgICAgICAgcG9zICAgID0gbmV4dDtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgQVQ6XG4gICAgICAgICAgICBSRV9BVF9FTkQubGFzdEluZGV4ID0gcG9zICsgMTtcbiAgICAgICAgICAgIFJFX0FUX0VORC50ZXN0KGNzcyk7XG4gICAgICAgICAgICBpZiAoIFJFX0FUX0VORC5sYXN0SW5kZXggPT09IDAgKSB7XG4gICAgICAgICAgICAgICAgbmV4dCA9IGNzcy5sZW5ndGggLSAxO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBuZXh0ID0gUkVfQVRfRU5ELmxhc3RJbmRleCAtIDI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnYXQtd29yZCcsIGNzcy5zbGljZShwb3MsIG5leHQgKyAxKSxcbiAgICAgICAgICAgICAgICBsaW5lLCBwb3MgIC0gb2Zmc2V0LFxuICAgICAgICAgICAgICAgIGxpbmUsIG5leHQgLSBvZmZzZXRcbiAgICAgICAgICAgIF07XG5cbiAgICAgICAgICAgIHBvcyA9IG5leHQ7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIEJBQ0tTTEFTSDpcbiAgICAgICAgICAgIG5leHQgICA9IHBvcztcbiAgICAgICAgICAgIGVzY2FwZSA9IHRydWU7XG4gICAgICAgICAgICB3aGlsZSAoIGNzcy5jaGFyQ29kZUF0KG5leHQgKyAxKSA9PT0gQkFDS1NMQVNIICkge1xuICAgICAgICAgICAgICAgIG5leHQgICs9IDE7XG4gICAgICAgICAgICAgICAgZXNjYXBlID0gIWVzY2FwZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvZGUgPSBjc3MuY2hhckNvZGVBdChuZXh0ICsgMSk7XG4gICAgICAgICAgICBpZiAoIGVzY2FwZSAmJiAoY29kZSAhPT0gU0xBU0ggICAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgIT09IFNQQUNFICAgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlICE9PSBORVdMSU5FICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSAhPT0gVEFCICAgICAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgIT09IENSICAgICAgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlICE9PSBGRUVEICkgKSB7XG4gICAgICAgICAgICAgICAgbmV4dCArPSAxO1xuICAgICAgICAgICAgICAgIGlmICggUkVfSEVYX0VTQ0FQRS50ZXN0KGNzcy5jaGFyQXQobmV4dCkpICkge1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoIFJFX0hFWF9FU0NBUEUudGVzdChjc3MuY2hhckF0KG5leHQgKyAxKSkgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0ICs9IDE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCBjc3MuY2hhckNvZGVBdChuZXh0ICsgMSkgPT09IFNQQUNFICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dCArPSAxO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjdXJyZW50VG9rZW4gPSBbJ3dvcmQnLCBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSksXG4gICAgICAgICAgICAgICAgbGluZSwgcG9zICAtIG9mZnNldCxcbiAgICAgICAgICAgICAgICBsaW5lLCBuZXh0IC0gb2Zmc2V0XG4gICAgICAgICAgICBdO1xuXG4gICAgICAgICAgICBwb3MgPSBuZXh0O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGlmICggY29kZSA9PT0gU0xBU0ggJiYgY3NzLmNoYXJDb2RlQXQocG9zICsgMSkgPT09IEFTVEVSSVNLICkge1xuICAgICAgICAgICAgICAgIG5leHQgPSBjc3MuaW5kZXhPZignKi8nLCBwb3MgKyAyKSArIDE7XG4gICAgICAgICAgICAgICAgaWYgKCBuZXh0ID09PSAwICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIGlnbm9yZSApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQgPSBjc3MubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdW5jbG9zZWQoJ2NvbW1lbnQnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSk7XG4gICAgICAgICAgICAgICAgbGluZXMgICA9IGNvbnRlbnQuc3BsaXQoJ1xcbicpO1xuICAgICAgICAgICAgICAgIGxhc3QgICAgPSBsaW5lcy5sZW5ndGggLSAxO1xuXG4gICAgICAgICAgICAgICAgaWYgKCBsYXN0ID4gMCApIHtcbiAgICAgICAgICAgICAgICAgICAgbmV4dExpbmUgICA9IGxpbmUgKyBsYXN0O1xuICAgICAgICAgICAgICAgICAgICBuZXh0T2Zmc2V0ID0gbmV4dCAtIGxpbmVzW2xhc3RdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBuZXh0TGluZSAgID0gbGluZTtcbiAgICAgICAgICAgICAgICAgICAgbmV4dE9mZnNldCA9IG9mZnNldDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjdXJyZW50VG9rZW4gPSBbJ2NvbW1lbnQnLCBjb250ZW50LFxuICAgICAgICAgICAgICAgICAgICBsaW5lLCAgICAgcG9zICAtIG9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgbmV4dExpbmUsIG5leHQgLSBuZXh0T2Zmc2V0XG4gICAgICAgICAgICAgICAgXTtcblxuICAgICAgICAgICAgICAgIG9mZnNldCA9IG5leHRPZmZzZXQ7XG4gICAgICAgICAgICAgICAgbGluZSAgID0gbmV4dExpbmU7XG4gICAgICAgICAgICAgICAgcG9zICAgID0gbmV4dDtcblxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBSRV9XT1JEX0VORC5sYXN0SW5kZXggPSBwb3MgKyAxO1xuICAgICAgICAgICAgICAgIFJFX1dPUkRfRU5ELnRlc3QoY3NzKTtcbiAgICAgICAgICAgICAgICBpZiAoIFJFX1dPUkRfRU5ELmxhc3RJbmRleCA9PT0gMCApIHtcbiAgICAgICAgICAgICAgICAgICAgbmV4dCA9IGNzcy5sZW5ndGggLSAxO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG5leHQgPSBSRV9XT1JEX0VORC5sYXN0SW5kZXggLSAyO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnd29yZCcsIGNzcy5zbGljZShwb3MsIG5leHQgKyAxKSxcbiAgICAgICAgICAgICAgICAgICAgbGluZSwgcG9zICAtIG9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgbGluZSwgbmV4dCAtIG9mZnNldFxuICAgICAgICAgICAgICAgIF07XG5cbiAgICAgICAgICAgICAgICBidWZmZXIucHVzaChjdXJyZW50VG9rZW4pO1xuXG4gICAgICAgICAgICAgICAgcG9zID0gbmV4dDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICBwb3MrKztcbiAgICAgICAgcmV0dXJuIGN1cnJlbnRUb2tlbjtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBiYWNrKHRva2VuKSB7XG4gICAgICAgIHJldHVybmVkLnB1c2godG9rZW4pO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICAgIGJhY2ssXG4gICAgICAgIG5leHRUb2tlbixcbiAgICAgICAgZW5kT2ZGaWxlXG4gICAgfTtcbn1cbiJdfQ== + + +/***/ }), +/* 62 */ +/***/ (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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndhcm4tb25jZS5lczYiXSwibmFtZXMiOlsid2Fybk9uY2UiLCJwcmludGVkIiwibWVzc2FnZSIsImNvbnNvbGUiLCJ3YXJuIl0sIm1hcHBpbmdzIjoiOzs7a0JBRXdCQSxRO0FBRnhCLElBQUlDLFVBQVUsRUFBZDs7QUFFZSxTQUFTRCxRQUFULENBQWtCRSxPQUFsQixFQUEyQjtBQUN0QyxRQUFLRCxRQUFRQyxPQUFSLENBQUwsRUFBd0I7QUFDeEJELFlBQVFDLE9BQVIsSUFBbUIsSUFBbkI7O0FBRUEsUUFBSyxPQUFPQyxPQUFQLEtBQW1CLFdBQW5CLElBQWtDQSxRQUFRQyxJQUEvQyxFQUFzREQsUUFBUUMsSUFBUixDQUFhRixPQUFiO0FBQ3pEIiwiZmlsZSI6Indhcm4tb25jZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImxldCBwcmludGVkID0geyB9O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiB3YXJuT25jZShtZXNzYWdlKSB7XG4gICAgaWYgKCBwcmludGVkW21lc3NhZ2VdICkgcmV0dXJuO1xuICAgIHByaW50ZWRbbWVzc2FnZV0gPSB0cnVlO1xuXG4gICAgaWYgKCB0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcgJiYgY29uc29sZS53YXJuICkgY29uc29sZS53YXJuKG1lc3NhZ2UpO1xufVxuIl19 + + +/***/ }), +/* 63 */ +/***/ (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__(14); +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; + + +/***/ }), +/* 64 */ +/***/ (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__(178); + +// 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; +}; + + +/***/ }), +/* 65 */ +/***/ (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__(64); +var util = __webpack_require__(14); +var ArraySet = __webpack_require__(63).ArraySet; +var MappingList = __webpack_require__(180).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; + + +/***/ }), +/* 66 */ +/***/ (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__(65).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(182).SourceMapConsumer; +exports.SourceNode = __webpack_require__(183).SourceNode; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _namespace = __webpack_require__(15); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _namespace = __webpack_require__(15); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _node = __webpack_require__(9); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _node = __webpack_require__(9); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _namespace = __webpack_require__(15); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _node = __webpack_require__(9); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _container = __webpack_require__(33); + +var _container2 = _interopRequireDefault(_container); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _container = __webpack_require__(33); + +var _container2 = _interopRequireDefault(_container); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _container = __webpack_require__(33); + +var _container2 = _interopRequireDefault(_container); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _node = __webpack_require__(9); + +var _node2 = _interopRequireDefault(_node); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _namespace = __webpack_require__(15); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _namespace = __webpack_require__(15); + +var _namespace2 = _interopRequireDefault(_namespace); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); + +class AtWord extends Container { + constructor (opts) { + super(opts); + this.type = 'atword'; + } + + toString () { + let 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(''); + } +} + +Container.registerWalker(AtWord); + +module.exports = AtWord; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class Colon extends Node { + constructor (opts) { + super(opts); + this.type = 'colon'; + } +} + +Container.registerWalker(Colon); + +module.exports = Colon; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class Comma extends Node { + constructor (opts) { + super(opts); + this.type = 'comma'; + } +} + +Container.registerWalker(Comma); + +module.exports = Comma; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class Comment extends Node { + constructor (opts) { + super(opts); + this.type = 'comment'; + this.inline = opts.inline || false; + } + + toString () { + return [ + this.raws.before, + this.inline ? '//' : '/*', + String(this.value), + this.inline ? '' : '*/', + this.raws.after + ].join(''); + } +}; + +Container.registerWalker(Comment); + +module.exports = Comment; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); + +class FunctionNode extends Container { + constructor (opts) { + super(opts); + this.type = 'func'; + // start off at -1 so we know there haven't been any parens added + this.unbalanced = -1; + } +}; + +Container.registerWalker(FunctionNode); + +module.exports = FunctionNode; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class NumberNode extends Node { + constructor (opts) { + super(opts); + this.type = 'number'; + this.unit = opts.unit || ''; + } + + toString () { + return [ + this.raws.before, + String(this.value), + this.unit, + this.raws.after + ].join(''); + } +}; + +Container.registerWalker(NumberNode); + +module.exports = NumberNode; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class Operator extends Node { + constructor (opts) { + super(opts); + this.type = 'operator'; + } +} + +Container.registerWalker(Operator); + +module.exports = Operator; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class Parenthesis extends Node { + constructor (opts) { + super(opts); + this.type = 'paren'; + this.parenType = ''; + } +} + +Container.registerWalker(Parenthesis); + +module.exports = Parenthesis; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class StringNode extends Node { + constructor (opts) { + super(opts); + this.type = 'string'; + } + + toString () { + let 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(''); + } +} + +Container.registerWalker(StringNode); + +module.exports = StringNode; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class UnicodeRange extends Node { + constructor (opts) { + super(opts); + this.type = 'unicode-range'; + } +} + +Container.registerWalker(UnicodeRange); + +module.exports = UnicodeRange; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); + +module.exports = class Value extends Container { + constructor (opts) { + super(opts); + this.type = 'value'; + this.unbalanced = 0; + } +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Container = __webpack_require__(2); +const Node = __webpack_require__(4); + +class Word extends Node { + constructor (opts) { + super(opts); + this.type = 'word'; + } +} + +Container.registerWalker(Word); + +module.exports = Word; + + +/***/ }), +/* 91 */ +/***/ (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__(210); + +var _supportsColor2 = _interopRequireDefault(_supportsColor); + +var _chalk = __webpack_require__(98); + +var _chalk2 = _interopRequireDefault(_chalk); + +var _terminalHighlight = __webpack_require__(198); + +var _terminalHighlight2 = _interopRequireDefault(_terminalHighlight); + +var _warnOnce = __webpack_require__(5); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1zeW50YXgtZXJyb3IuZXM2Il0sIm5hbWVzIjpbIkNzc1N5bnRheEVycm9yIiwibWVzc2FnZSIsImxpbmUiLCJjb2x1bW4iLCJzb3VyY2UiLCJmaWxlIiwicGx1Z2luIiwibmFtZSIsInJlYXNvbiIsInNldE1lc3NhZ2UiLCJFcnJvciIsImNhcHR1cmVTdGFja1RyYWNlIiwic2hvd1NvdXJjZUNvZGUiLCJjb2xvciIsImNzcyIsImxpbmVzIiwic3BsaXQiLCJzdGFydCIsIk1hdGgiLCJtYXgiLCJlbmQiLCJtaW4iLCJsZW5ndGgiLCJtYXhXaWR0aCIsIlN0cmluZyIsImNvbG9ycyIsImNvbnN0cnVjdG9yIiwiZW5hYmxlZCIsIm1hcmsiLCJ0ZXh0IiwicmVkIiwiYm9sZCIsImFzaWRlIiwiZ3JheSIsInNsaWNlIiwibWFwIiwiaW5kZXgiLCJudW1iZXIiLCJndXR0ZXIiLCJzcGFjaW5nIiwicmVwbGFjZSIsImpvaW4iLCJ0b1N0cmluZyIsImNvZGUiLCJpbnB1dCJdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUE7Ozs7QUFDQTs7OztBQUVBOzs7O0FBQ0E7Ozs7Ozs7O0FBRUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztJQTJCTUEsYzs7QUFFRjs7Ozs7Ozs7QUFRQSw0QkFBWUMsT0FBWixFQUFxQkMsSUFBckIsRUFBMkJDLE1BQTNCLEVBQW1DQyxNQUFuQyxFQUEyQ0MsSUFBM0MsRUFBaURDLE1BQWpELEVBQXlEO0FBQUE7O0FBQ3JEOzs7Ozs7Ozs7Ozs7QUFZQSxhQUFLQyxJQUFMLEdBQWMsZ0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30gW2ZpbGVdICAgLSBhYnNvbHV0ZSBwYXRoIHRvIHRoZSBicm9rZW4gZmlsZVxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbcGx1Z2luXSAtIFBvc3RDU1MgcGx1Z2luIG5hbWUsIGlmIGVycm9yIGNhbWUgZnJvbSBwbHVnaW5cbiAgICAgKi9cbiAgICBjb25zdHJ1Y3RvcihtZXNzYWdlLCBsaW5lLCBjb2x1bW4sIHNvdXJjZSwgZmlsZSwgcGx1Z2luKSB7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAbWVtYmVyIHtzdHJpbmd9IC0gQWx3YXlzIGVxdWFsIHRvIGAnQ3NzU3ludGF4RXJyb3InYC4gWW91IHNob3VsZFxuICAgICAgICAgKiAgICAgICAgICAgICAgICAgICAgYWx3YXlzIGNoZWNrIGVycm9yIHR5cGVcbiAgICAgICAgICogICAgICAgICAgICAgICAgICAgIGJ5IGBlcnJvci5uYW1lID09PSAnQ3NzU3ludGF4RXJyb3InYCBpbnN0ZWFkIG9mXG4gICAgICAgICAqICAgICAgICAgICAgICAgICAgICBgZXJyb3IgaW5zdGFuY2VvZiBDc3NTeW50YXhFcnJvcmAsIGJlY2F1c2VcbiAgICAgICAgICogICAgICAgICAgICAgICAgICAgIG5wbSBjb3VsZCBoYXZlIHNldmVyYWwgUG9zdENTUyB2ZXJzaW9ucy5cbiAgICAgICAgICpcbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICogaWYgKCBlcnJvci5uYW1lID09PSAnQ3NzU3ludGF4RXJyb3InICkge1xuICAgICAgICAgKiAgIGVycm9yIC8vPT4gQ3NzU3ludGF4RXJyb3JcbiAgICAgICAgICogfVxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5uYW1lICAgPSAnQ3NzU3ludGF4RXJyb3InO1xuICAgICAgICAvKipcbiAgICAgICAgICogQG1lbWJlciB7c3RyaW5nfSAtIEVycm9yIG1lc3NhZ2UuXG4gICAgICAgICAqXG4gICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAqIGVycm9yLm1lc3NhZ2UgLy89PiAnVW5jbG9zZWQgYmxvY2snXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLnJlYXNvbiA9IG1lc3NhZ2U7XG5cbiAgICAgICAgaWYgKCBmaWxlICkge1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBAbWVtYmVyIHtzdHJpbmd9IC0gQWJzb2x1dGUgcGF0aCB0byB0aGUgYnJva2VuIGZpbGUuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICAgICAqIGVycm9yLmZpbGUgICAgICAgLy89PiAnYS5zYXNzJ1xuICAgICAgICAgICAgICogZXJyb3IuaW5wdXQuZmlsZSAvLz0+ICdhLmNzcydcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5maWxlID0gZmlsZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIHNvdXJjZSApIHtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogQG1lbWJlciB7c3RyaW5nfSAtIFNvdXJjZSBjb2RlIG9mIHRoZSBicm9rZW4gZmlsZS5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgICAgICogZXJyb3Iuc291cmNlICAgICAgIC8vPT4gJ2EgeyBiIHt9IH0nXG4gICAgICAgICAgICAgKiBlcnJvci5pbnB1dC5jb2x1bW4gLy89PiAnYSBiIHsgfSdcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5zb3VyY2UgPSBzb3VyY2U7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCBwbHVnaW4gKSB7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEBtZW1iZXIge3N0cmluZ30gLSBQbHVnaW4gbmFtZSwgaWYgZXJyb3IgY2FtZSBmcm9tIHBsdWdpbi5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgICAgICogZXJyb3IucGx1Z2luIC8vPT4gJ3Bvc3Rjc3MtdmFycydcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5wbHVnaW4gPSBwbHVnaW47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCB0eXBlb2YgbGluZSAhPT0gJ3VuZGVmaW5lZCcgJiYgdHlwZW9mIGNvbHVtbiAhPT0gJ3VuZGVmaW5lZCcgKSB7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEBtZW1iZXIge251bWJlcn0gLSBTb3VyY2UgbGluZSBvZiB0aGUgZXJyb3IuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICAgICAqIGVycm9yLmxpbmUgICAgICAgLy89PiAyXG4gICAgICAgICAgICAgKiBlcnJvci5pbnB1dC5saW5lIC8vPT4gNFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmxpbmUgICA9IGxpbmU7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEBtZW1iZXIge251bWJlcn0gLSBTb3VyY2UgY29sdW1uIG9mIHRoZSBlcnJvci5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgICAgICogZXJyb3IuY29sdW1uICAgICAgIC8vPT4gMVxuICAgICAgICAgICAgICogZXJyb3IuaW5wdXQuY29sdW1uIC8vPT4gNFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuc2V0TWVzc2FnZSgpO1xuXG4gICAgICAgIGlmICggRXJyb3IuY2FwdHVyZVN0YWNrVHJhY2UgKSB7XG4gICAgICAgICAgICBFcnJvci5jYXB0dXJlU3RhY2tUcmFjZSh0aGlzLCBDc3NTeW50YXhFcnJvcik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBzZXRNZXNzYWdlKCkge1xuICAgICAgICAvKipcbiAgICAgICAgICogQG1lbWJlciB7c3RyaW5nfSAtIEZ1bGwgZXJyb3IgdGV4dCBpbiB0aGUgR05VIGVycm9yIGZvcm1hdFxuICAgICAgICAgKiAgICAgICAgICAgICAgICAgICAgd2l0aCBwbHVnaW4sIGZpbGUsIGxpbmUgYW5kIGNvbHVtbi5cbiAgICAgICAgICpcbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICogZXJyb3IubWVzc2FnZSAvLz0+ICdhLmNzczoxOjE6IFVuY2xvc2VkIGJsb2NrJ1xuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5tZXNzYWdlICA9IHRoaXMucGx1Z2luID8gdGhpcy5wbHVnaW4gKyAnOiAnIDogJyc7XG4gICAgICAgIHRoaXMubWVzc2FnZSArPSB0aGlzLmZpbGUgPyB0aGlzLmZpbGUgOiAnPGNzcyBpbnB1dD4nO1xuICAgICAgICBpZiAoIHR5cGVvZiB0aGlzLmxpbmUgIT09ICd1bmRlZmluZWQnICkge1xuICAgICAgICAgICAgdGhpcy5tZXNzYWdlICs9ICc6JyArIHRoaXMubGluZSArICc6JyArIHRoaXMuY29sdW1uO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMubWVzc2FnZSArPSAnOiAnICsgdGhpcy5yZWFzb247XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBhIGZldyBsaW5lcyBvZiBDU1Mgc291cmNlIHRoYXQgY2F1c2VkIHRoZSBlcnJvci5cbiAgICAgKlxuICAgICAqIElmIHRoZSBDU1MgaGFzIGFuIGlucHV0IHNvdXJjZSBtYXAgd2l0aG91dCBgc291cmNlQ29udGVudGAsXG4gICAgICogdGhpcyBtZXRob2Qgd2lsbCByZXR1cm4gYW4gZW1wdHkgc3RyaW5nLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtib29sZWFufSBbY29sb3JdIHdoZXRoZXIgYXJyb3cgd2lsbCBiZSBjb2xvcmVkIHJlZCBieSB0ZXJtaW5hbFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvciBjb2Rlcy4gQnkgZGVmYXVsdCwgUG9zdENTUyB3aWxsIGRldGVjdFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvciBzdXBwb3J0IGJ5IGBwcm9jZXNzLnN0ZG91dC5pc1RUWWBcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kIGBwcm9jZXNzLmVudi5OT0RFX0RJU0FCTEVfQ09MT1JTYC5cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogZXJyb3Iuc2hvd1NvdXJjZUNvZGUoKSAvLz0+IFwiICA0IHwgfVxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICA1IHwgYSB7XG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAvLyAgICA+IDYgfCAgIGJhZFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgIHwgICBeXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgIDcgfCB9XG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgIDggfCBiIHtcIlxuICAgICAqXG4gICAgICogQHJldHVybiB7c3RyaW5nfSBmZXcgbGluZXMgb2YgQ1NTIHNvdXJjZSB0aGF0IGNhdXNlZCB0aGUgZXJyb3JcbiAgICAgKi9cbiAgICBzaG93U291cmNlQ29kZShjb2xvcikge1xuICAgICAgICBpZiAoICF0aGlzLnNvdXJjZSApIHJldHVybiAnJztcblxuICAgICAgICBsZXQgY3NzID0gdGhpcy5zb3VyY2U7XG4gICAgICAgIGlmICggdHlwZW9mIGNvbG9yID09PSAndW5kZWZpbmVkJyApIGNvbG9yID0gc3VwcG9ydHNDb2xvcjtcbiAgICAgICAgaWYgKCBjb2xvciApIGNzcyA9IHRlcm1pbmFsSGlnaGxpZ2h0KGNzcyk7XG5cbiAgICAgICAgbGV0IGxpbmVzID0gY3NzLnNwbGl0KC9cXHI/XFxuLyk7XG4gICAgICAgIGxldCBzdGFydCA9IE1hdGgubWF4KHRoaXMubGluZSAtIDMsIDApO1xuICAgICAgICBsZXQgZW5kICAgPSBNYXRoLm1pbih0aGlzLmxpbmUgKyAyLCBsaW5lcy5sZW5ndGgpO1xuXG4gICAgICAgIGxldCBtYXhXaWR0aCA9IFN0cmluZyhlbmQpLmxlbmd0aDtcbiAgICAgICAgbGV0IGNvbG9ycyA9IG5ldyBjaGFsay5jb25zdHJ1Y3Rvcih7IGVuYWJsZWQ6IHRydWUgfSk7XG5cbiAgICAgICAgZnVuY3Rpb24gbWFyayh0ZXh0KSB7XG4gICAgICAgICAgICBpZiAoIGNvbG9yICkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb2xvcnMucmVkLmJvbGQodGV4dCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiB0ZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGFzaWRlKHRleHQpIHtcbiAgICAgICAgICAgIGlmICggY29sb3IgKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbG9ycy5ncmF5KHRleHQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGV4dDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBsaW5lcy5zbGljZShzdGFydCwgZW5kKS5tYXAoIChsaW5lLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgbGV0IG51bWJlciA9IHN0YXJ0ICsgMSArIGluZGV4O1xuICAgICAgICAgICAgbGV0IGd1dHRlciA9ICcgJyArICgnICcgKyBudW1iZXIpLnNsaWNlKC1tYXhXaWR0aCkgKyAnIHwgJztcbiAgICAgICAgICAgIGlmICggbnVtYmVyID09PSB0aGlzLmxpbmUgKSB7XG4gICAgICAgICAgICAgICAgbGV0IHNwYWNpbmcgPVxuICAgICAgICAgICAgICAgICAgICBhc2lkZShndXR0ZXIucmVwbGFjZSgvXFxkL2csICcgJykpICtcbiAgICAgICAgICAgICAgICAgICAgbGluZS5zbGljZSgwLCB0aGlzLmNvbHVtbiAtIDEpLnJlcGxhY2UoL1teXFx0XS9nLCAnICcpO1xuICAgICAgICAgICAgICAgIHJldHVybiBtYXJrKCc+JykgKyBhc2lkZShndXR0ZXIpICsgbGluZSArICdcXG4gJyArXG4gICAgICAgICAgICAgICAgICAgICAgIHNwYWNpbmcgKyBtYXJrKCdeJyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiAnICcgKyBhc2lkZShndXR0ZXIpICsgbGluZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkuam9pbignXFxuJyk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBlcnJvciBwb3NpdGlvbiwgbWVzc2FnZSBhbmQgc291cmNlIGNvZGUgb2YgdGhlIGJyb2tlbiBwYXJ0LlxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBlcnJvci50b1N0cmluZygpIC8vPT4gXCJDc3NTeW50YXhFcnJvcjogYXBwLmNzczoxOjE6IFVuY2xvc2VkIGJsb2NrXG4gICAgICogICAgICAgICAgICAgICAgICAvLyAgICA+IDEgfCBhIHtcbiAgICAgKiAgICAgICAgICAgICAgICAgIC8vICAgICAgICB8IF5cIlxuICAgICAqXG4gICAgICogQHJldHVybiB7c3RyaW5nfSBlcnJvciBwb3NpdGlvbiwgbWVzc2FnZSBhbmQgc291cmNlIGNvZGVcbiAgICAgKi9cbiAgICB0b1N0cmluZygpIHtcbiAgICAgICAgbGV0IGNvZGUgPSB0aGlzLnNob3dTb3VyY2VDb2RlKCk7XG4gICAgICAgIGlmICggY29kZSApIHtcbiAgICAgICAgICAgIGNvZGUgPSAnXFxuXFxuJyArIGNvZGUgKyAnXFxuJztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5uYW1lICsgJzogJyArIHRoaXMubWVzc2FnZSArIGNvZGU7XG4gICAgfVxuXG4gICAgZ2V0IGdlbmVyYXRlZCgpIHtcbiAgICAgICAgd2Fybk9uY2UoJ0Nzc1N5bnRheEVycm9yI2dlbmVyYXRlZCBpcyBkZXByZWNhdGVkLiBVc2UgaW5wdXQgaW5zdGVhZC4nKTtcbiAgICAgICAgcmV0dXJuIHRoaXMuaW5wdXQ7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQG1lbWJlcm9mIENzc1N5bnRheEVycm9yI1xuICAgICAqIEBtZW1iZXIge0lucHV0fSBpbnB1dCAtIElucHV0IG9iamVjdCB3aXRoIFBvc3RDU1MgaW50ZXJuYWwgaW5mb3JtYXRpb25cbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICBhYm91dCBpbnB1dCBmaWxlLiBJZiBpbnB1dCBoYXMgc291cmNlIG1hcFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20gcHJldmlvdXMgdG9vbCwgUG9zdENTUyB3aWxsIHVzZSBvcmlnaW5cbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAoZm9yIGV4YW1wbGUsIFNhc3MpIHNvdXJjZS4gWW91IGNhbiB1c2UgdGhpc1xuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdCB0byBnZXQgUG9zdENTUyBpbnB1dCBzb3VyY2UuXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGVycm9yLmlucHV0LmZpbGUgLy89PiAnYS5jc3MnXG4gICAgICogZXJyb3IuZmlsZSAgICAgICAvLz0+ICdhLnNhc3MnXG4gICAgICovXG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ3NzU3ludGF4RXJyb3I7XG4iXX0= + + +/***/ }), +/* 92 */ +/***/ (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 _warnOnce = __webpack_require__(5); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _node = __webpack_require__(38); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uLmVzNiJdLCJuYW1lcyI6WyJEZWNsYXJhdGlvbiIsImRlZmF1bHRzIiwidHlwZSIsInJhd3MiLCJ2YWx1ZSIsInZhbCIsImltcG9ydGFudCJdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUE7Ozs7QUFDQTs7Ozs7Ozs7Ozs7O0FBRUE7Ozs7Ozs7Ozs7O0lBV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HZhbHVlLFxuICAgICAqIFBvc3RDU1Mgd2lsbCB1c2UgdGhlIHJhdyB2YWx1ZSB3aXRoIGNvbW1lbnRzLlxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZSgnYSB7XFxuICBjb2xvcjpibGFja1xcbn0nKVxuICAgICAqIHJvb3QuZmlyc3QuZmlyc3QucmF3cyAvLz0+IHsgYmVmb3JlOiAnXFxuICAnLCBiZXR3ZWVuOiAnOicgfVxuICAgICAqL1xuXG59XG5cbmV4cG9ydCBkZWZhdWx0IERlY2xhcmF0aW9uO1xuIl19 + + +/***/ }), +/* 93 */ +/***/ (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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _mapGenerator = __webpack_require__(194); + +var _mapGenerator2 = _interopRequireDefault(_mapGenerator); + +var _stringify2 = __webpack_require__(96); + +var _stringify3 = _interopRequireDefault(_stringify2); + +var _warnOnce = __webpack_require__(5); + +var _warnOnce2 = _interopRequireDefault(_warnOnce); + +var _result = __webpack_require__(197); + +var _result2 = _interopRequireDefault(_result); + +var _parse = __webpack_require__(94); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhenktcmVzdWx0LmVzNiJdLCJuYW1lcyI6WyJpc1Byb21pc2UiLCJvYmoiLCJ0aGVuIiwiTGF6eVJlc3VsdCIsInByb2Nlc3NvciIsImNzcyIsIm9wdHMiLCJzdHJpbmdpZmllZCIsInByb2Nlc3NlZCIsInJvb3QiLCJ0eXBlIiwibWFwIiwiaW5saW5lIiwicHJldiIsInBhcnNlciIsInN5bnRheCIsInBhcnNlIiwiZXJyb3IiLCJyZXN1bHQiLCJ3YXJua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dGlvbnMuXG4gKlxuICogQSBgTGF6eVJlc3VsdGAgaW5zdGFuY2UgaXMgcmV0dXJuZWQgYnkge0BsaW5rIFByb2Nlc3NvciNwcm9jZXNzfS5cbiAqXG4gKiBAZXhhbXBsZVxuICogY29uc3QgbGF6eSA9IHBvc3Rjc3MoW2Nzc25leHRdKS5wcm9jZXNzKGNzcyk7XG4gKi9cbmNsYXNzIExhenlSZXN1bHQge1xuXG4gICAgY29uc3RydWN0b3IocHJvY2Vzc29yLCBjc3MsIG9wdHMpIHtcbiAgICAgICAgdGhpcy5zdHJpbmdpZmllZCA9IGZhbHNlO1xuICAgICAgICB0aGlzLnByb2Nlc3NlZCAgID0gZmFsc2U7XG5cbiAgICAgICAgbGV0IHJvb3Q7XG4gICAgICAgIGlmICggdHlwZW9mIGNzcyA9PT0gJ29iamVjdCcgJiYgY3NzLnR5cGUgPT09ICdyb290JyApIHtcbiAgICAgICAgICAgIHJvb3QgPSBjc3M7XG4gICAgICAgIH0gZWxzZSBpZiAoIGNzcyBpbnN0YW5jZW9mIExhenlSZXN1bHQgfHwgY3NzIGluc3RhbmNlb2YgUmVzdWx0ICkge1xuICAgICAgICAgICAgcm9vdCA9IGNzcy5yb290O1xuICAgICAgICAgICAgaWYgKCBjc3MubWFwICkge1xuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIG9wdHMubWFwID09PSAndW5kZWZpbmVkJyApIG9wdHMubWFwID0geyB9O1xuICAgICAgICAgICAgICAgIGlmICggIW9wdHMubWFwLmlubGluZSApIG9wdHMubWFwLmlubGluZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIG9wdHMubWFwLnByZXYgPSBjc3MubWFwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbGV0IHBhcnNlciA9IHBhcnNlO1xuICAgICAgICAgICAgaWYgKCBvcHRzLnN5bnRheCApICBwYXJzZXIgPSBvcHRzLnN5bnRheC5wYXJzZTtcbiAgICAgICAgICAgI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oW2Nzc25leHRdKS5wcm9jZXNzKGNzcykudGhlbihyZXN1bHQgPT4ge1xuICAgICAqICAgY29uc29sZS5sb2cocmVzdWx0LmNzcyk7XG4gICAgICogfSkuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAqICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICogfSk7XG4gICAgICovXG4gICAgY2F0Y2gob25SZWplY3RlZCkge1xuICAgICAgICByZXR1cm4gdGhpcy5hc3luYygpLmNhdGNoKG9uUmVqZWN0ZWQpO1xuICAgIH1cblxuICAgIGhhbmRsZUVycm9yKGVycm9yLCBwbHVnaW4pIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRoaXMuZXJyb3IgPSBlcnJvcjtcbiAgICAgICAgICAgIGlmICggZXJyb3IubmFtZSA9PT0gJ0Nzc1N5bnRheEVycm9yJyAmJiAhZXJyb3IucGx1Z2luICkge1xuICAgICAgICAgICAgICAgIGVycm9yLnBsdWdpbiA9IHBsdWdpbi5wb3N0Y3NzUGx1Z2luO1xuICAgICAgICAgICAgICAgIGVycm9yLnNldE1lc3NhZ2UoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIHBsdWdpbi5wb3N0Y3NzVmVyc2lvbiApIHtcbiAgICAgICAgICAgICAgICBsZXQgcGx1Z2luTmFtZSA9IHBsdWdpbi5wb3N0Y3NzUGx1Z2luO1xuICAgICAgICAgICAgICAgIGxldCBwbHVnaW5WZXIgID0gcGx1Z2luLnBvc3Rjc3NWZXJzaW9uO1xuICAgICAgICAgICAgICAgIGxldCBydW50aW1lVmVyID0gdGhpcy5yZXN1bHQucHJvY2Vzc29yLnZlcnNpb247XG4gICAgICAgICAgICAgICAgbGV0IGEgPSBwbHVnaW5WZXIuc3BsaXQoJy4nKTtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IHJ1bnRpbWVWZXIuc3BsaXQoJy4nKTtcblxuICAgICAgICAgICAgICAgIGlmICggYVswXSAhPT0gYlswXSB8fCBwYXJzZUludChhWzFdKSA+IHBhcnNlSW50KGJbMV0pICkge1xuICAgICAgICAgICAgICAgICAgICB3YXJuT25jZSgnWW91ciBjdXJyZW50IFBvc3RDU1MgdmVyc2lvbiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lzICcgKyBydW50aW1lVmVyICsgJywgYnV0ICcgKyBwbHVnaW5OYW1lICsgJyAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VzZXMgJyArIHBsdWdpblZlciArICcuIFBlcmhhcHMgdGhpcyBpcyAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RoZSBzb3VyY2Ugb2YgdGhlIGVycm9yIGJlbG93LicpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBpZiAoIGNvbnNvbGUgJiYgY29uc29sZS5lcnJvciApIGNvbnNvbGUuZXJyb3IoZXJyKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFzeW5jVGljayhyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgaWYgKCB0aGlzLnBsdWdpbiA+PSB0aGlzLnByb2Nlc3Nvci5wbHVnaW5zLmxlbmd0aCApIHtcbiAgICAgICAgICAgIHRoaXMucHJvY2Vzc2VkID0gdHJ1ZTtcbiAgICAgICAgICAgIHJldHVybiByZXNvbHZlKCk7XG4gICAgICAgIH1cblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgbGV0IHBsdWdpbiAgPSB0aGlzLnByb2Nlc3Nvci5wbHVnaW5zW3RoaXMucGx1Z2luXTtcbiAgICAgICAgICAgIGxldCBwcm9taXNlID0gdGhpcy5ydW4ocGx1Z2luKTtcbiAgICAgICAgICAgIHRoaXMucGx1Z2luICs9IDE7XG5cbiAgICAgICAgICAgIGlmICggaXNQcm9taXNlKHByb21pc2UpICkge1xuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbiggKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFzeW5jVGljayhyZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgICAgICAgIH0pLmNhdGNoKCBlcnJvciA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlRXJyb3IoZXJyb3IsIHBsdWdpbik7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHJvY2Vzc2VkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5hc3luY1RpY2socmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgdGhpcy5wcm9jZXNzZWQgPSB0cnVlO1xuICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFzeW5jKCkge1xuICAgICAgICBpZiAoIHRoaXMucHJvY2Vzc2VkICkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKCAocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKCB0aGlzLmVycm9yICkge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QodGhpcy5lcnJvcik7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh0aGlzLnN0cmluZ2lmeSgpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIHRoaXMucHJvY2Vzc2luZyApIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnByb2Nlc3Npbmc7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnByb2Nlc3NpbmcgPSBuZXcgUHJvbWlzZSggKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgaWYgKCB0aGlzLmVycm9yICkgcmV0dXJuIHJlamVjdCh0aGlzLmVycm9yKTtcbiAgICAgICAgICAgIHRoaXMucGx1Z2luID0gMDtcbiAgICAgICAgICAgIHRoaXMuYXN5bmNUaWNrKHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgIH0pLnRoZW4oICgpID0+IHtcbiAgICAgICAgICAgIHRoaXMucHJvY2Vzc2VkID0gdHJ1ZTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnN0cmluZ2lmeSgpO1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gdGhpcy5wcm9jZXNzaW5nO1xuICAgIH1cblxuICAgIHN5bmMoKSB7XG4gICAgICAgIGlmICggdGhpcy5wcm9jZXNzZWQgKSByZXR1cm4gdGhpcy5yZXN1bHQ7XG4gICAgICAgIHRoaXMucHJvY2Vzc2VkID0gdHJ1ZTtcblxuICAgICAgICBpZiAoIHRoaXMucHJvY2Vzc2luZyApIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAnVXNlIHByb2Nlc3MoY3NzKS50aGVuKGNiKSB0byB3b3JrIHdpdGggYXN5bmMgcGx1Z2lucycpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCB0aGlzLmVycm9yICkgdGhyb3cgdGhpcy5lcnJvcjtcblxuICAgICAgICBmb3IgKCBsZXQgcGx1Z2luIG9mIHRoaXMucmVzdWx0LnByb2Nlc3Nvci5wbHVnaW5zICkge1xuICAgICAgICAgICAgbGV0IHByb21pc2UgPSB0aGlzLnJ1bihwbHVnaW4pO1xuICAgICAgICAgICAgaWYgKCBpc1Byb21pc2UocHJvbWlzZSkgKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICAnVXNlIHByb2Nlc3MoY3NzKS50aGVuKGNiKS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0ZSgpO1xuICAgICAgICB0aGlzLnJlc3VsdC5jc3MgPSBkYXRhWzBdO1xuICAgICAgICB0aGlzLnJlc3VsdC5tYXAgPSBkYXRhWzFdO1xuXG4gICAgICAgIHJldHVybiB0aGlzLnJlc3VsdDtcbiAgICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgTGF6eVJlc3VsdDtcblxuLyoqXG4gKiBAY2FsbGJhY2sgb25GdWxmaWxsZWRcbiAqIEBwYXJhbSB7UmVzdWx0fSByZXN1bHRcbiAqL1xuXG4vKipcbiAqIEBjYWxsYmFjayBvblJlamVjdGVkXG4gKiBAcGFyYW0ge0Vycm9yfSBlcnJvclxuICovXG4iXX0= + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = parse; + +var _parser = __webpack_require__(95); + +var _parser2 = _interopRequireDefault(_parser); + +var _input = __webpack_require__(37); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVz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1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndHJ5IGFnYWluIHdpdGggdGhlIHBvc3Rjc3Mtc2NzcyBwYXJzZXInO1xuICAgICAgICAgICAgfSBlbHNlIGlmICggL1xcLnNhc3MvaS50ZXN0KG9wdHMuZnJvbSkgKSB7XG4gICAgICAgICAgICAgICAgZS5tZXNzYWdlICs9ICdcXG5Zb3UgdHJpZWQgdG8gcGFyc2UgU2FzcyB3aXRoICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGhlIHN0YW5kYXJkIENTUyBwYXJzZXI7ICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndHJ5IGFnYWluIHdpdGggdGhlIHBvc3Rjc3Mtc2FzcyBwYXJzZXInO1xuICAgICAgICAgICAgfSBlbHNlIGlmICggL1xcLmxlc3MkL2kudGVzdChvcHRzLmZyb20pICkge1xuICAgICAgICAgICAgICAgIGUubWVzc2FnZSArPSAnXFxuWW91IHRyaWVkIHRvIHBhcnNlIExlc3Mgd2l0aCAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RoZSBzdGFuZGFyZCBDU1MgcGFyc2VyOyAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RyeSBhZ2FpbiB3aXRoIHRoZSBwb3N0Y3NzLWxlc3MgcGFyc2VyJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aHJvdyBlO1xuICAgIH1cblxuICAgIHJldHVybiBwYXJzZXIucm9vdDtcbn1cbiJdfQ== + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _declaration = __webpack_require__(92); + +var _declaration2 = _interopRequireDefault(_declaration); + +var _tokenize = __webpack_require__(97); + +var _tokenize2 = _interopRequireDefault(_tokenize); + +var _comment = __webpack_require__(35); + +var _comment2 = _interopRequireDefault(_comment); + +var _atRule = __webpack_require__(34); + +var _atRule2 = _interopRequireDefault(_atRule); + +var _root = __webpack_require__(39); + +var _root2 = _interopRequireDefault(_root); + +var _rule = __webpack_require__(16); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlci5lczYiXSwibmFtZXMiOlsiUGFyc2VyIiwiaW5wdXQiLCJwb3MiLCJyb290IiwiY3VycmVudCIsInNwYW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9rZW5pemUnO1xuaW1wb3J0IENvbW1lbnQgICAgIGZyb20gJy4vY29tbWVudCc7XG5pbXBvcnQgQXRSdWxlICAgICAgZnJvbSAnLi9hdC1ydWxlJztcbmltcG9ydCBSb290ICAgICAgICBmcm9tICcuL3Jvb3QnO1xuaW1wb3J0IFJ1bGUgICAgICAgIGZyb20gJy4vcnVsZSc7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFBhcnNlciB7XG5cbiAgICBjb25zdHJ1Y3RvcihpbnB1dCkge1xuICAgICAgICB0aGlzLmlucHV0ID0gaW5wdXQ7XG5cbiAgICAgICAgdGhpcy5wb3MgICAgICAgPSAwO1xuICAgICAgICB0aGlzLnJvb3QgICAgICA9IG5ldyBSb290KCk7XG4gICAgICAgIHRoaXMuY3VycmVudCAgID0gdGhpcy5yb290O1xuICAgICAgICB0aGlzLnNwYWNlcyAgICA9ICcnO1xuICAgICAgICB0aGlzLnNlbWljb2xvbiA9IGZhbHNlO1xuXG4gICAgICAgIHRoaXMucm9vdC5zb3VyY2UgPSB7IGlucHV0LCBzdGFydDogeyBsaW5lOiAxLCBjb2x1bW46IDEgfSB9O1xuICAgIH1cblxuICAgIHRva2VuaXplKCkge1xuICAgICAgICB0aGlzLnRva2VucyA9IHRva2VuaXplcih0aGlzLmlucHV0KTtcbiAgICB9XG5cbiAgICBsb29wKCkge1xuICAgICAgICBsZXQgdG9rZW47XG4gICAgICAgIHdoaWxlICggdGhpcy5wb3MgPCB0aGlzLnRva2Vucy5sZW5ndGggKSB7XG4gICAgICAgICAgICB0b2tlbiA9IHRoaXMudG9rZW5zW3RoaXMucG9zXTtcblxuICAgICAgICAgICAgc3dpdGNoICggdG9rZW5bMF0gKSB7XG5cbiAgICAgICAgICAgIGNhc2UgJ3NwYWNlJzpcbiAgICAgICAgICAgIGNhc2UgJzsnOlxuICAgICAgICAgICAgICAgIHRoaXMuc3BhY2VzICs9IHRva2VuWzFdO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICd9JzpcbiAgICAgICAgICAgICAgICB0aGlzLmVuZCh0b2tlbik7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ2NvbW1lbnQnOlxuICAgICAgICAgICAgICAgIHRoaXMuY29tbWVudCh0b2tlbik7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ2F0LXdvcmQnOlxuICAgICAgICAgICAgICAgIHRoaXMuYXRydWxlKHRva2VuKTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAneyc6XG4gICAgICAgICAgICAgICAgdGhpcy5lbXB0eVJ1bGUodG9rZW4pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRoaXMub3RoZXIoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5wb3MgKz0gMTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmVuZEZpbGUoKTtcbiAgICB9XG5cbiAgICBjb21tZW50KHRva2VuKSB7XG4gICAgICAgIGxldCBub2RlID0gbmV3IENvbW1lbnQoKTtcbiAgICAgICAgdGhpcy5pbml0KG5vZGUsIHRva2VuWzJdLCB0b2tlblszXSk7XG4gICAgICAgIG5vZGUuc291cmNlLmVuZCA9IHsgbGluZTogdG9rZW5bNF0sIGNvbHVtbjogdG9rZW5bNV0gfTtcblxuICAgICAgICBsZXQgdGV4dCA9IHRva2VuWzFdLnNsaWNlKDIsIC0yKTtcbiAgICAgICAgaWYgKCAvXlxccyokLy50ZXN0KHRleHQpICkge1xuICAgICAgICAgICAgbm9kZS50ZXh0ICAgICAgID0gJyc7XG4gICAgICAgICAgICBub2RlLnJhd3MubGVmdCAgPSB0ZXh0O1xuICAgICAgICAgICAgbm9kZS5yYXdzLnJpZ2h0ID0gJyc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsZXQgbWF0Y2ggPSB0ZXh0Lm1hdGNoKC9eKFxccyopKFteXSpbXlxcc10pKFxccyopJC8pO1xuICAgICAgICAgICAgbm9kZS50ZXh0ICAgICAgID0gbWF0Y2hbMl07XG4gICAgICAgICAgICBub2RlLnJhd3MubGVmdCAgPSBtYXRjaFsxXTtcbiAgICAgICAgICAgIG5vZGUucmF3cy5yaWdodCA9IG1hdGNoWzNdO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZW1wdHlSdWxlKHRva2VuKSB7XG4gICAgICAgIGxldCBub2RlID0gbmV3IFJ1bGUoKTtcbiAgICAgICAgdGhpcy5pbml0KG5vZGUsIHRva2VuWzJdLCB0b2tlblszXSk7XG4gICAgICAgIG5vZGUuc2VsZWN0b3IgPSAnJztcbiAgICAgICAgbm9kZS5yYXdzLmJldHdlZW4gPSAnJztcbiAgICAgICAgdGhpcy5jdXJyZW50ID0gbm9kZTtcbiAgICB9XG5cbiAgICBvdGhlcigpIHtcbiAgICAgICAgbGV0IHRva2VuO1xuICAgICAgICBsZXQgZW5kICAgICAgPSBmYWxzZTtcbiAgICAgICAgbGV0IHR5cGUgICAgID0gbnVsbDtcbiAgICAgICAgbGV0IGNvbG9uICAgID0gZmFsc2U7XG4gICAgICAgIGxldCBicmFja2V0ICA9IG51bGw7XG4gICAgICAgIGxldCBicmFja2V0cyA9IFtdO1xuXG4gICAgICAgIGxldCBzdGFydCA9IHRoaXMucG9zO1xuICAgICAgICB3aGlsZSAoIHRoaXMucG9zIDwgdGhpcy50b2tlbnMubGVuZ3RoICkge1xuICAgICAgICAgICAgdG9rZW4gPSB0aGlzLnRva2Vuc1t0aGlzLnBvc107XG4gICAgICAgICAgICB0eXBlICA9IHRva2VuWzBdO1xuXG4gICAgICAgICAgICBpZiAoIHR5cGUgPT09ICcoJyB8fCB0eXBlID09PSAnWycgKSB7XG4gICAgICAgICAgICAgICAgaWYgKCAhYnJhY2tldCApIGJyYWNrZXQgPSB0b2tlbjtcbiAgICAgICAgICAgICAgICBicmFja2V0cy5wdXNoKHR5cGUgPT09ICcoJyA/ICcpJyA6ICddJyk7XG5cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIGJyYWNrZXRzLmxlbmd0aCA9PT0gMCApIHtcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGUgPT09ICc7JyApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBjb2xvbiApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGVjbCh0aGlzLnRva2Vucy5zbGljZShzdGFydCwgdGhpcy5wb3MgKyAxKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICggdHlwZSA9PT0gJ3snICkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJ1bGUodGhpcy50b2tlbnMuc2xpY2Uoc3RhcnQsIHRoaXMucG9zICsgMSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCB0eXBlID09PSAnfScgKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucG9zIC09IDE7XG4gICAgICAgICAgICAgICAgICAgIGVuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICggdHlwZSA9PT0gJzonICkge1xuICAgICAgICAgICAgICAgICAgICBjb2xvbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB9IGVsc2UgaWYgKCB0eXBlID09PSBicmFja2V0c1ticmFja2V0cy5sZW5ndGggLSAxXSApIHtcbiAgICAgICAgICAgICAgICBicmFja2V0cy5wb3AoKTtcbiAgICAgICAgICAgICAgICBpZiAoIGJyYWNrZXRzLmxlbmd0aCA9PT0gMCApIGJyYWNrZXQgPSBudWxsO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnBvcyArPSAxO1xuICAgICAgICB9XG4gICAgICAgIGlmICggdGhpcy5wb3MgPT09IHRoaXMudG9rZW5zLmxlbmd0aCApIHtcbiAgICAgICAgICAgIHRoaXMucG9zIC09IDE7XG4gICAgICAgICAgICBlbmQgPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCBicmFja2V0cy5sZW5ndGggPiAwICkgdGhpcy51bmNsb3NlZEJyYWNrZXQoYnJhY2tldCk7XG5cbiAgICAgICAgaWYgKCBlbmQgJiYgY29sb24gKSB7XG4gICAgICAgICAgICB3aGlsZSAoIHRoaXMucG9zID4gc3RhcnQgKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSB0aGlzLnRva2Vuc1t0aGlzLnBvc11bMF07XG4gICAgICAgICAgICAgICAgaWYgKCB0b2tlbiAhPT0gJ3NwYWNlJyAmJiB0b2tlbiAhPT0gJ2NvbW1lbnQnICkgYnJlYWs7XG4gICAgICAgICAgICAgICAgdGhpcy5wb3MgLT0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuZGVjbCh0aGlzLnRva2Vucy5zbGljZShzdGFydCwgdGhpcy5wb3MgKyAxKSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnVua25vd25Xb3JkKHN0YXJ0KTtcbiAgICB9XG5cbiAgICBydWxlKHRva2Vucykge1xuICAgICAgICB0b2tlbnMucG9wKCk7XG5cbiAgICAgICAgbGV0IG5vZGUgPSBuZXcgUnVsZSgpO1xuICAgICAgICB0aGlzLmluaXQobm9kZSwgdG9rZW5zWzBdWzJdLCB0b2tlbnNbMF1bM10pO1xuXG4gICAgICAgIG5vZGUucmF3cy5iZXR3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dWzBdO1xuICAgICAgICAgICAgaWYgKCB0eXBlID09PSAnOicgfHwgdHlwZSA9PT0gJ3NwYWNlJyB8fCB0eXBlID09PSAnY29tbWVudCcgKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBub2RlLnByb3AgKz0gdG9rZW5zLnNoaWZ0KClbMV07XG4gICAgICAgIH1cblxuICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiA9ICcnO1xuXG4gICAgICAgIGxldCB0b2tlbjtcbiAgICAgICAgd2hpbGUgKCB0b2tlbnMubGVuZ3RoICkge1xuICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnMuc2hpZnQoKTtcblxuICAgICAgICAgICAgaWYgKCB0b2tlblswXSA9PT0gJzonICkge1xuICAgICAgICAgICAgICAgIG5vZGUucmF3cy5iZXR3ZWVuICs9IHRva2VuWzFdO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiArPSB0b2tlblsxXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICggbm9kZS5wcm9wWzBdID09PSAnXycgfHwgbm9kZS5wcm9wWzBdID09PSAnKicgKSB7XG4gICAgICAgICAgICBub2RlLnJhd3MuYmVmb3JlICs9IG5vZGUucHJvcFswXTtcbiAgICAgICAgICAgIG5vZGUucHJvcCA9IG5vZGUucHJvcC5zbGljZSgxKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiArPSB0aGlzLnNwYWNlc0FuZENvbW1lbnRzRnJvbVN0YXJ0KHRva2Vucyk7XG4gICAgICAgIHRoaXMucHJlY2hlY2tNaXNzZWRTZW1pY29sb24odG9rZW5zKTtcblxuICAgICAgICBmb3IgKCBsZXQgaSA9IHRva2Vucy5sZW5ndGggLSAxOyBpID4gMDsgaS0tICkge1xuICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnNbaV07XG4gICAgICAgICAgICBpZiAoIHRva2VuWzFdID09PSAnIWltcG9ydGFudCcgKSB7XG4gICAgICAgICAgICAgICAgbm9kZS5pbXBvcnRhbnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGxldCBzdHJpbmcgPSB0aGlzLnN0cmluZ0Zyb20odG9rZW5zLCBpKTtcbiAgICAgICAgICAgICAgICBzdHJpbmcgPSB0aGlzLnNwYWNlc0Zyb21FbmQodG9rZW5zKSArIHN0cmluZztcbiAgICAgICAgICAgICAgICBpZiAoIHN0cmluZyAhPT0gJyAhaW1wb3J0YW50JyApIG5vZGUucmF3cy5pbXBvcnRhbnQgPSBzdHJpbmc7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodG9rZW5bMV0gPT09ICdpbXBvcnRhbnQnKSB7XG4gICAgICAgICAgICAgICAgbGV0IGNhY2hlID0gdG9rZW5zLnNsaWNlKDApO1xuICAgICAgICAgICAgICAgIGxldCBzdHIgICA9ICcnO1xuICAgICAgICAgICAgICAgIGZvciAoIGxldCBqID0gaTsgaiA+IDA7IGotLSApIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGUgPSBjYWNoZVtqXVswXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBzdHIudHJpbSgpLmluZGV4T2YoJyEnKSA9PT0gMCAmJiB0eXBlICE9PSAnc3BhY2UnICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc3RyID0gY2FjaGUucG9wKClbMV0gKyBzdHI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICggc3RyLnRyaW0oKS5pbmRleE9mKCchJykgPT09IDAgKSB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGUuaW1wb3J0YW50ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5yYXdzLmltcG9ydGFudCA9IHN0cjtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW5zID0gY2FjaGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIHRva2VuWzBdICE9PSAnc3BhY2UnICYmIHRva2VuWzBdICE9PSAnY29tbWVudCcgKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnJhdyhub2RlLCAndmFsdWUnLCB0b2tlbnMpO1xuXG4gICAgICAgIGlmICggbm9kZS52YWx1ZS5pbmRleE9mKCc6JykgIT09IC0xICkgdGhpcy5jaGVja01pc3NlZFNlbWljb2xvbih0b2tlbnMpO1xuICAgIH1cblxuICAgIGF0cnVsZSh0b2tlbikge1xuICAgICAgICBsZXQgbm9kZSAgPSBuZXcgQXRSdWxlKCk7XG4gICAgICAgIG5vZGUubmFtZSA9IHRva2VuWzFdLnNsaWNlKDEpO1xuICAgICAgICBpZiAoIG5vZGUubmFtZSA9PT0gJycgKSB7XG4gICAgICAgICAgICB0aGlzLnVubmFtZWRBdHJ1bGUobm9kZSwgdG9rZW4pO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuaW5pdChub2RlLCB0b2tlblsyXSwgdG9rZW5bM10pO1xuXG4gICAgICAgIGxldCBsYXN0ICAgPSBmYWxzZTtcbiAgICAgICAgbGV0IG9wZW4gICA9IGZhbHNlO1xuICAgICAgICBsZXQgcGFyYW1zID0gW107XG5cbiAgICAgICAgdGhpcy5wb3MgKz0gMTtcbiAgICAgICAgd2hpbGUgKCB0aGlzLnBvcyA8IHRoaXMudG9rZW5zLmxlbmd0aCApIHtcbiAgICAgICAgICAgIHRva2VuID0gdGhpcy50b2tlbnNbdGhpcy5wb3NdO1xuXG4gICAgICAgICAgICBpZiAoIHRva2VuWzBdID09PSAnOycgKSB7XG4gICAgICAgICAgICAgICAgbm9kZS5zb3VyY2UuZW5kID0geyBsaW5lOiB0b2tlblsyXSwgY29sdW1uOiB0b2tlblszXSB9O1xuICAgICAgICAgICAgICAgIHRoaXMuc2VtaWNvbG9uID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIHRva2VuWzBdID09PSAneycgKSB7XG4gICAgICAgICAgICAgICAgb3BlbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCB0b2tlblswXSA9PT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5lbmQodG9rZW4pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwYXJhbXMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMucG9zICs9IDE7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCB0aGlzLnBvcyA9PT0gdGhpcy50b2tlbnMubGVuZ3RoICkge1xuICAgICAgICAgICAgbGFzdCA9IHRydWU7XG4gICAgICAgIH1cblxuICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiA9IHRoaXMuc3BhY2VzQW5kQ29tbWVudHNGcm9tRW5kKHBhcmFtcyk7XG4gICAgICAgIGlmICggcGFyYW1zLmxlbmd0aCApIHtcbiAgICAgICAgICAgIG5vZGUucmF3cy5hZnRlck5hbWUgPSB0aGlzLnNwYWNlc0FuZENvbW1lbnRzRnJvbVN0YXJ0KHBhcmFtcyk7XG4gICAgICAgICAgICB0aGlzLnJhdyhub2RlLCAncGFyYW1zJywgcGFyYW1zKTtcbiAgICAgICAgICAgIGlmICggbGFzdCApIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IHBhcmFtc1twYXJhbXMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICAgICAgbm9kZS5zb3VyY2UuZW5kICAgPSB7IGxpbmU6IHRva2VuWzRdLCBjb2x1bW46IHRva2VuWzVdIH07XG4gICAgICAgICAgICAgICAgdGhpcy5zcGFjZXMgICAgICAgPSBub2RlLnJhd3MuYmV0d2VlbjtcbiAgICAgICAgICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiA9ICcnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbm9kZS5yYXdzLmFmdGVyTmFtZSA9ICcnO1xuICAgICAgICAgICAgbm9kZS5wYXJhbXMgICAgICAgICA9ICcnO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCBvcGVuICkge1xuICAgICAgICAgICAgbm9kZS5ub2RlcyAgID0gW107XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnQgPSBub2RlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZW5kKHRva2VuKSB7XG4gICAgICAgIGlmICggdGhpcy5jdXJyZW50Lm5vZGVzICYmIHRoaXMuY3VycmVudC5ub2Rlcy5sZW5ndGggKSB7XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnQucmF3cy5zZW1pY29sb24gPSB0aGlzLnNlbWljb2xvbjtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNlbWljb2xvbiA9IGZhbHNlO1xuXG4gICAgICAgIHRoaXMuY3VycmVudC5yYXdzLmFmdGVyID0gKHRoaXMuY3VycmVudC5yYXdzLmFmdGVyIHx8ICcnKSArIHRoaXMuc3BhY2VzO1xuICAgICAgICB0aGlzLnNwYWNlcyA9ICcnO1xuXG4gICAgICAgIGlmICggdGhpcy5jdXJyZW50LnBhcmVudCApIHtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudC5zb3VyY2UuZW5kID0geyBsaW5lOiB0b2tlblsyXSwgY29sdW1uOiB0b2tlblszXSB9O1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50ID0gdGhpcy5jdXJyZW50LnBhcmVudDtcbiAgICAgICAgfSBlbHNlIHtcbi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DwgbGVuZ3RoOyBpICs9IDEgKSB7XG4gICAgICAgICAgICB0b2tlbiA9IHRva2Vuc1tpXTtcbiAgICAgICAgICAgIHR5cGUgID0gdG9rZW5bMF07XG4gICAgICAgICAgICBpZiAoIHR5cGUgPT09ICdjb21tZW50JyB8fCB0eXBlID09PSAnc3BhY2UnICYmIGkgPT09IGxlbmd0aCAtIDEgKSB7XG4gICAgICAgICAgICAgICAgY2xlYW4gPSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgKz0gdG9rZW5bMV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCAhY2xlYW4gKSB7XG4gICAgICAgICAgICBsZXQgcmF3ID0gdG9rZW5zLnJlZHVjZSggKGFsbCwgaSkgPT4gYWxsICsgaVsxXSwgJycpO1xuICAgICAgICAgICAgbm9kZS5yYXdzW3Byb3BdID0geyB2YWx1ZSwgcmF3IH07XG4gICAgICAgIH1cbiAgICAgICAgbm9kZVtwcm9wXSA9IHZhbHVlO1xuICAgIH1cblxuICAgIHNwYWNlc0FuZENvbW1lbnRzRnJvbUVuZCh0b2tlbnMpIHtcbiAgICAgICAgbGV0IGxhc3RUb2tlblR5cGU7XG4gICAgICAgIGxldCBzcGFjZXMgPSAnJztcbiAgICAgICAgd2hpbGUgKCB0b2tlbnMubGVuZ3RoICkge1xuICAgICAgICAgICAgbGFzdFRva2VuVHlwZSA9IHRva2Vuc1t0b2tlbnMubGVuZ3RoIC0gMV1bMF07XG4gICAgICAgICAgICBpZiAoIGxhc3RUb2tlblR5cGUgIT09ICdzcGFjZScgJiZcbiAgICAgICAgICAgICAgICBsYXN0VG9rZW5UeXBlICE9PSAnY29tbWVudCcgKSBicmVhaztcbiAgICAgICAgICAgIHNwYWNlcyA9IHRva2Vucy5wb3AoKVsxXSArIHNwYWNlcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3BhY2VzO1xuICAgIH1cblxuICAgIHNwYWNlc0FuZENvbW1lbnRzRnJvbVN0YXJ0KHRva2Vucykge1xuICAgICAgICBsZXQgbmV4dDtcbiAgICAgICAgbGV0IHNwYWNlcyA9ICcnO1xuICAgICAgICB3aGlsZSAoIHRva2Vucy5sZW5ndGggKSB7XG4gICAgICAgICAgICBuZXh0ID0gdG9rZW5zWzBdWzBdO1xuICAgICAgICAgICAgaWYgKCBuZXh0ICE9PSAnc3BhY2UnICYmIG5leHQgIT09ICdjb21tZW50JyApIGJyZWFrO1xuICAgICAgICAgICAgc3BhY2VzICs9IHRva2Vucy5zaGlmdCgpWzFdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBzcGFjZXM7XG4gICAgfVxuXG4gICAgc3BhY2VzRnJvbUVuZCh0b2tlbnMpIHtcbiAgICAgICAgbGV0IGxhc3RUb2tlblR5cGU7XG4gICAgICAgIGxldCBzcGFjZXMgPSAnJztcbiAgICAgICAgd2hpbGUgKCB0b2tlbnMubGVuZ3RoICkge1xuICAgICAgICAgICAgbGFzdFRva2VuVHlwZSA9IHRva2Vuc1t0b2tlbnMubGVuZ3RoIC0gMV1bMF07XG4gICAgICAgICAgICBpZiAoIGxhc3RUb2tlblR5cGUgIT09ICdzcGFjZScgKSBicmVhaztcbiAgICAgICAgICAgIHNwYWNlcyA9IHRva2Vucy5wb3AoKVsxXSArIHNwYWNlcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3BhY2VzO1xuICAgIH1cblxuICAgIHN0cmluZ0Zyb20odG9rZW5zLCBmcm9tKSB7XG4gICAgICAgIGxldCByZXN1bHQgPSAnJztcbiAgICAgICAgZm9yICggbGV0IGkgPSBmcm9tOyBpIDwgdG9rZW5zLmxlbmd0aDsgaSsrICkge1xuICAgICAgICAgICAgcmVzdWx0ICs9IHRva2Vuc1tpXVsxXTtcbiAgICAgICAgfVxuICAgICAgICB0b2tlbnMuc3BsaWNlKGZyb20sIHRva2Vucy5sZW5ndGggLSBmcm9tKTtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICBjb2xvbih0b2tlbnMpIHtcbiAgICAgICAgbGV0IGJyYWNrZXRzID0gMDtcbiAgICAgICAgbGV0IHRva2VuLCB0eXBlLCBwcmV2O1xuICAgICAgICBmb3IgKCBsZXQgaSA9IDA7IGkgPCB0b2tlbnMubGVuZ3RoOyBpKysgKSB7XG4gICAgICAgICAgICB0b2tlbiA9IHRva2Vuc1tpXTtcbiAgICAgICAgICAgIHR5cGUgID0gdG9rZW5bMF07XG5cbiAgICAgICAgICAgIGlmICggdHlwZSA9PT0gJygnICkge1xuICAgICAgICAgICAgICAgIGJyYWNrZXRzICs9IDE7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCB0eXBlID09PSAnKScgKSB7XG4gICAgICAgICAgICAgICAgYnJhY2tldHMgLT0gMTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIGJyYWNrZXRzID09PSAwICYmIHR5cGUgPT09ICc6JyApIHtcbiAgICAgICAgICAgICAgICBpZiAoICFwcmV2ICkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmRvdWJsZUNvbG9uKHRva2VuKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCBwcmV2WzBdID09PSAnd29yZCcgJiYgcHJldlsxXSA9PT0gJ3Byb2dpZCcgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcHJldiA9IHRva2VuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbiAgICAvLyBFcnJvcnNcblxuICAgIHVuY2xvc2VkQnJhY2tldChicmFja2V0KSB7XG4gICAgICAgIHRocm93IHRoaXMuaW5wdXQuZXJyb3IoJ1VuY2xvc2VkIGJyYW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bnMpO1xuICAgICAgICBpZiAoIGNvbG9uID09PSBmYWxzZSApIHJldHVybjtcblxuICAgICAgICBsZXQgZm91bmRlZCA9IDA7XG4gICAgICAgIGxldCB0b2tlbjtcbiAgICAgICAgZm9yICggbGV0IGogPSBjb2xvbiAtIDE7IGogPj0gMDsgai0tICkge1xuICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnNbal07XG4gICAgICAgICAgICBpZiAoIHRva2VuWzBdICE9PSAnc3BhY2UnICkge1xuICAgICAgICAgICAgICAgIGZvdW5kZWQgKz0gMTtcbiAgICAgICAgICAgICAgICBpZiAoIGZvdW5kZWQgPT09IDIgKSBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aHJvdyB0aGlzLmlucHV0LmVycm9yKCdNaXNzZWQgc2VtaWNvbG9uJywgdG9rZW5bMl0sIHRva2VuWzNdKTtcbiAgICB9XG5cbn1cbiJdfQ== + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = stringify; + +var _stringifier = __webpack_require__(40); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmeS5lczYiXSwibmFtZXMiOlsic3RyaW5naWZ5Iiwibm9kZSIsImJ1aWxkZXIiLCJzdHIiXSwibWFwcGluZ3MiOiI7OztrQkFFd0JBLFM7O0FBRnhCOzs7Ozs7QUFFZSxTQUFTQSxTQUFULENBQW1CQyxJQUFuQixFQUF5QkMsT0FBekIsRUFBa0M7QUFDN0MsUUFBSUMsTUFBTSwwQkFBZ0JELE9BQWhCLENBQVY7QUFDQUMsUUFBSUgsU0FBSixDQUFjQyxJQUFkO0FBQ0giLCJmaWxlIjoic3RyaW5naWZ5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFN0cmluZ2lmaWVyIGZyb20gJy4vc3RyaW5naWZpZXInO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBzdHJpbmdpZnkobm9kZSwgYnVpbGRlcikge1xuICAgIGxldCBzdHIgPSBuZXcgU3RyaW5naWZpZXIoYnVpbGRlcik7XG4gICAgc3RyLnN0cmluZ2lmeShub2RlKTtcbn1cbiJdfQ== + + +/***/ }), +/* 97 */ +/***/ (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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRva2VuaXplLmVzNiJdLCJuYW1lcyI6WyJ0b2tlbml6ZSIsIlNJTkdMRV9RVU9URSIsIkRPVUJMRV9RVU9URSIsIkJBQ0tTTEFTSCIsIlNMQVNIIiwiTkVXTElORSIsIlNQQUNFIiwiRkVFRCIsIlRBQiIsIkNSIiwiT1BFTl9TUVVBUkUiLCJDTE9TRV9TUVVBUkUiLCJPUEVOX1BBUkVOVEhFU0VTIiwiQ0xPU0VfUEFSRU5USEVTRVMiLCJPUEVOX0NVUkxZIiwiQ0xPU0VfQ1VSTFkiLCJTRU1JQ09MT04iLCJBU1RFUklTSyIsIkNPTE9OIiwiQVQiLCJSRV9BVF9FTkQiLCJSRV9XT1JEX0VORCIsIlJFX0JBRF9CUkFDS0VUIiwiaW5wdXQiLCJvcHRpb25zIiwidG9rZW5zIiwiY3NzIiwidmFsdWVPZiIsImlnbm9yZSIsImlnbm9yZUVycm9ycyIsImNvZGUiLCJuZXh0IiwicXVvdGUiLCJsaW5lcyIsImxhc3QiLCJjb250ZW50IiwiZXNjYXBlIiwibmV4dExpbmUiLCJuZXh0T2Zmc2V0IiwiZXNjYXBlZCIsImVzY2FwZVBvcyIsInByZXYiLCJuIiwibGVuZ3RoIiwib2Zmc2V0IiwibGluZSIsInBvcyIsInVuY2xvc2VkIiwid2hhdCIsImVycm9yIiwiY2hhckNvZGVBdCIsInB1c2giLCJzbGljZSIsImluZGV4T2YiLCJ0ZXN0Iiwic3BsaXQiLCJsYXN0SW5kZXgiXSwibWFwcGluZ3MiOiI7OztrQkF3QndCQSxRO0FBeEJ4QixJQUFNQyxpQkFBTjtBQUNBLElBQU1DLGlCQUFOO0FBQ0EsSUFBTUMsY0FBTjtBQUNBLElBQU1DLFVBQ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gIGNhc2UgQ1I6XG4gICAgICAgIGNhc2UgRkVFRDpcbiAgICAgICAgICAgIG5leHQgPSBwb3M7XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgbmV4dCArPSAxO1xuICAgICAgICAgICAgICAgIGNvZGUgPSBjc3MuY2hhckNvZGVBdChuZXh0KTtcbiAgICAgICAgICAgICAgICBpZiAoIGNvZGUgPT09IE5FV0xJTkUgKSB7XG4gICAgICAgICAgICAgICAgICAgIG9mZnNldCA9IG5leHQ7XG4gICAgICAgICAgICAgICAgICAgIGxpbmUgICs9IDE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAoIGNvZGUgPT09IFNQQUNFICAgfHxcbiAgICAgICAgICAgICAgICAgICAgICBjb2RlID09PSBORVdMSU5FIHx8XG4gICAgICAgICAgICAgICAgICAgICAgY29kZSA9PT0gVEFCICAgICB8fFxuICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPT09IENSICAgICAgfHxcbiAgICAgICAgICAgICAgICAgICAgICBjb2RlID09PSBGRUVEICk7XG5cbiAgICAgICAgICAgIHRva2Vucy5wdXNoKFsnc3BhY2UnLCBjc3Muc2xpY2UocG9zLCBuZXh0KV0pO1xuICAgICAgICAgICAgcG9zID0gbmV4dCAtIDE7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIE9QRU5fU1FVQVJFOlxuICAgICAgICAgICAgdG9rZW5zLnB1c2goWydbJywgJ1snLCBsaW5lLCBwb3MgLSBvZmZzZXRdKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgQ0xPU0VfU1FVQVJFOlxuICAgICAgICAgICAgdG9rZW5zLnB1c2goWyddJywgJ10nLCBsaW5lLCBwb3MgLSBvZmZzZXRdKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgT1BFTl9DVVJMWTpcbiAgICAgICAgICAgIHRva2Vucy5wdXNoKFsneycsICd7JywgbGluZSwgcG9zIC0gb2Zmc2V0XSk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIENMT1NFX0NVUkxZOlxuICAgICAgICAgICAgdG9rZW5zLnB1c2goWyd9JywgJ30nLCBsaW5lLCBwb3MgLSBvZmZzZXRdKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgQ09MT046XG4gICAgICAgICAgICB0b2tlbnMucHVzaChbJzonLCAnOicsIGxpbmUsIHBvcyAtIG9mZnNldF0pO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSBTRU1JQ09MT046XG4gICAgICAgICAgICB0b2tlbnMucHVzaChbJzsnLCAnOycsIGxpbmUsIHBvcyAtIG9mZnNldF0pO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSBPUEVOX1BBUkVOVEhFU0VTOlxuICAgICAgICAgICAgcHJldiA9IHRva2Vucy5sZW5ndGggPyB0b2tlbnNbdG9rZW5zLmxlbmd0aCAtIDFdWzFdIDogJyc7XG4gICAgICAgICAgICBuICAgID0gY3NzLmNoYXJDb2RlQXQocG9zICsgMSk7XG4gICAgICAgICAgICBpZiAoIHByZXYgPT09ICd1cmwnICYmIG4gIT09IFNJTkdMRV9RVU9URSAmJiBuICE9PSBET1VCTEVfUVVPVEUgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbiAhPT0gU1BBQ0UgJiYgbiAhPT0gTkVXTElORSAmJiBuICE9PSBUQUIgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbiAhPT0gRkVFRCAmJiBuICE9PSBDUiApIHtcbiAgICAgICAgICAgICAgICBuZXh0ID0gcG9zO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgZXNjYXBlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBuZXh0ICAgID0gY3NzLmluZGV4T2YoJyknLCBuZXh0ICsgMSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICggbmV4dCA9PT0gLTEgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIGlnbm9yZSApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXh0ID0gcG9zO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmNsb3NlZCgnYnJhY2tldCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVzY2FwZVBvcyA9IG5leHQ7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICggY3NzLmNoYXJDb2RlQXQoZXNjYXBlUG9zIC0gMSkgPT09IEJBQ0tTTEFTSCApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVzY2FwZVBvcyAtPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXNjYXBlZCA9ICFlc2NhcGVkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoIGVzY2FwZWQgKTtcblxuICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKFsnYnJhY2tldHMnLCBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSksXG4gICAgICAgICAgICAgICAgICAgIGxpbmUsIHBvcyAgLSBvZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgIGxpbmUsIG5leHQgLSBvZmZzZXRcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgICAgICBwb3MgPSBuZXh0O1xuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5leHQgICAgPSBjc3MuaW5kZXhPZignKScsIHBvcyArIDEpO1xuICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoIG5leHQgPT09IC0xIHx8IFJFX0JBRF9CUkFDS0VULnRlc3QoY29udGVudCkgKSB7XG4gICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKFsnKCcsICcoJywgbGluZSwgcG9zIC0gb2Zmc2V0XSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW5zLnB1c2goWydicmFja2V0cycsIGNvbnRlbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lLCBwb3MgIC0gb2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZSwgbmV4dCAtIG9mZnNldFxuICAgICAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgICAgICAgICAgcG9zID0gbmV4dDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgQ0xPU0VfUEFSRU5USEVTRVM6XG4gICAgICAgICAgICB0b2tlbnMucHVzaChbJyknLCAnKScsIGxpbmUsIHBvcyAtIG9mZnNldF0pO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSBTSU5HTEVfUVVPVEU6XG4gICAgICAgIGNhc2UgRE9VQkxFX1FVT1RFOlxuICAgICAgICAgICAgcXVvdGUgPSBjb2RlID09PSBTSU5HTEVfUVVPVEUgPyAnXFwnJyA6ICdcIic7XG4gICAgICAgICAgICBuZXh0ICA9IHBvcztcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICBlc2NhcGVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgbmV4dCAgICA9IGNzcy5pbmRleE9mKHF1b3RlLCBuZXh0ICsgMSk7XG4gICAgICAgICAgICAgICAgaWYgKCBuZXh0ID09PSAtMSApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBpZ25vcmUgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0ID0gcG9zICsgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdW5jbG9zZWQoJ3N0cmluZycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVzY2FwZVBvcyA9IG5leHQ7XG4gICAgICAgICAgICAgICAgd2hpbGUgKCBjc3MuY2hhckNvZGVBdChlc2NhcGVQb3MgLSAxKSA9PT0gQkFDS1NMQVNIICkge1xuICAgICAgICAgICAgICAgICAgICBlc2NhcGVQb3MgLT0gMTtcbiAgICAgICAgICAgICAgICAgICAgZXNjYXBlZCA9ICFlc2NhcGVkO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gd2hpbGUgKCBlc2NhcGVkICk7XG5cbiAgICAgICAgICAgIGNvbnRlbnQgPSBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSk7XG4gICAgICAgICAgICBsaW5lcyAgID0gY29udGVudC5zcGxpdCgnXFxuJyk7XG4gICAgICAgICAgICBsYXN0ICAgID0gbGluZXMubGVuZ3RoIC0gMTtcblxuICAgICAgICAgICAgaWYgKCBsYXN0ID4gMCApIHtcbiAgICAgICAgICAgICAgICBuZXh0TGluZSAgID0gbGluZSArIGxhc3Q7XG4gICAgICAgICAgICAgICAgbmV4dE9mZnNldCA9IG5leHQgLSBsaW5lc1tsYXN0XS5sZW5ndGg7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5leHRMaW5lICAgPSBsaW5lO1xuICAgICAgICAgICAgICAgIG5leHRPZmZzZXQgPSBvZmZzZXQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRva2Vucy5wdXNoKFsnc3RyaW5nJywgY3NzLnNsaWNlKHBvcywgbmV4dCArIDEpLFxuICAgICAgICAgICAgICAgIGxpbmUsIHBvcyAgLSBvZmZzZXQsXG4gICAgICAgICAgICAgICAgbmV4dExpbmUsIG5leHQgLSBuZXh0T2Zmc2V0XG4gICAgICAgICAgICBdKTtcblxuICAgICAgICAgICAgb2Zmc2V0ID0gbmV4dE9mZnNldDtcbiAgICAgICAgICAgIGxpbmUgICA9IG5leHRMaW5lO1xuICAgICAgICAgICAgcG9zICAgID0gbmV4dDtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgQVQ6XG4gICAgICAgICAgICBSRV9BVF9FTkQubGFzdEluZGV4ID0gcG9zICsgMTtcbiAgICAgICAgICAgIFJFX0FUX0VORC50ZXN0KGNzcyk7XG4gICAgICAgICAgICBpZiAoIFJFX0FUX0VORC5sYXN0SW5kZXggPT09IDAgKSB7XG4gICAgICAgICAgICAgICAgbmV4dCA9IGNzcy5sZW5ndGggLSAxO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBuZXh0ID0gUkVfQVRfRU5ELmxhc3RJbmRleCAtIDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0b2tlbnMucHVzaChbJ2F0LXdvcmQnLCBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSksXG4gICAgICAgICAgICAgICAgbGluZSwgcG9zICAtIG9mZnNldCxcbiAgICAgICAgICAgICAgICBsaW5lLCBuZXh0IC0gb2Zmc2V0XG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIHBvcyA9IG5leHQ7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIEJBQ0tTTEFTSDpcbiAgICAgICAgICAgIG5leHQgICA9IHBvcztcbiAgICAgICAgICAgIGVzY2FwZSA9IHRydWU7XG4gICAgICAgICAgICB3aGlsZSAoIGNzcy5jaGFyQ29kZUF0KG5leHQgKyAxKSA9PT0gQkFDS1NMQVNIICkge1xuICAgICAgICAgICAgICAgIG5leHQgICs9IDE7XG4gICAgICAgICAgICAgICAgZXNjYXBlID0gIWVzY2FwZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvZGUgPSBjc3MuY2hhckNvZGVBdChuZXh0ICsgMSk7XG4gICAgICAgICAgICBpZiAoIGVzY2FwZSAmJiAoY29kZSAhPT0gU0xBU0ggICAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgIT09IFNQQUNFICAgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlICE9PSBORVdMSU5FICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSAhPT0gVEFCICAgICAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgIT09IENSICAgICAgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlICE9PSBGRUVEICkgKSB7XG4gICAgICAgICAgICAgICAgbmV4dCArPSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdG9rZW5zLnB1c2goWyd3b3JkJywgY3NzLnNsaWNlKHBvcywgbmV4dCArIDEpLFxuICAgICAgICAgICAgICAgIGxpbmUsIHBvcyAgLSBvZmZzZXQsXG4gICAgICAgICAgICAgICAgbGluZSwgbmV4dCAtIG9mZnNldFxuICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICBwb3MgPSBuZXh0O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGlmICggY29kZSA9PT0gU0xBU0ggJiYgY3NzLmNoYXJDb2RlQXQocG9zICsgMSkgPT09IEFTVEVSSVNLICkge1xuICAgICAgICAgICAgICAgIG5leHQgPSBjc3MuaW5kZXhPZignKi8nLCBwb3MgKyAyKSArIDE7XG4gICAgICAgICAgICAgICAgaWYgKCBuZXh0ID09PSAwICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIGlnbm9yZSApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQgPSBjc3MubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdW5jbG9zZWQoJ2NvbW1lbnQnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSk7XG4gICAgICAgICAgICAgICAgbGluZXMgICA9IGNvbnRlbnQuc3BsaXQoJ1xcbicpO1xuICAgICAgICAgICAgICAgIGxhc3QgICAgPSBsaW5lcy5sZW5ndGggLSAxO1xuXG4gICAgICAgICAgICAgICAgaWYgKCBsYXN0ID4gMCApIHtcbiAgICAgICAgICAgICAgICAgICAgbmV4dExpbmUgICA9IGxpbmUgKyBsYXN0O1xuICAgICAgICAgICAgICAgICAgICBuZXh0T2Zmc2V0ID0gbmV4dCAtIGxpbmVzW2xhc3RdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBuZXh0TGluZSAgID0gbGluZTtcbiAgICAgICAgICAgICAgICAgICAgbmV4dE9mZnNldCA9IG9mZnNldDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0b2tlbnMucHVzaChbJ2NvbW1lbnQnLCBjb250ZW50LFxuICAgICAgICAgICAgICAgICAgICBsaW5lLCAgICAgcG9zICAtIG9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgbmV4dExpbmUsIG5leHQgLSBuZXh0T2Zmc2V0XG4gICAgICAgICAgICAgICAgXSk7XG5cbiAgICAgICAgICAgICAgICBvZmZzZXQgPSBuZXh0T2Zmc2V0O1xuICAgICAgICAgICAgICAgIGxpbmUgICA9IG5leHRMaW5lO1xuICAgICAgICAgICAgICAgIHBvcyAgICA9IG5leHQ7XG5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgUkVfV09SRF9FTkQubGFzdEluZGV4ID0gcG9zICsgMTtcbiAgICAgICAgICAgICAgICBSRV9XT1JEX0VORC50ZXN0KGNzcyk7XG4gICAgICAgICAgICAgICAgaWYgKCBSRV9XT1JEX0VORC5sYXN0SW5kZXggPT09IDAgKSB7XG4gICAgICAgICAgICAgICAgICAgIG5leHQgPSBjc3MubGVuZ3RoIC0gMTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBuZXh0ID0gUkVfV09SRF9FTkQubGFzdEluZGV4IC0gMjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0b2tlbnMucHVzaChbJ3dvcmQnLCBjc3Muc2xpY2UocG9zLCBuZXh0ICsgMSksXG4gICAgICAgICAgICAgICAgICAgIGxpbmUsIHBvcyAgLSBvZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgIGxpbmUsIG5leHQgLSBvZmZzZXRcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgICAgICBwb3MgPSBuZXh0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIHBvcysrO1xuICAgIH1cblxuICAgIHJldHVybiB0b2tlbnM7XG59XG4iXX0= + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { +var escapeStringRegexp = __webpack_require__(113); +var ansiStyles = __webpack_require__(200); +var stripAnsi = __webpack_require__(202); +var hasAnsi = __webpack_require__(118); +var supportsColor = __webpack_require__(201); +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 = '\u001b[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 () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + 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 () { + 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__(23))) + +/***/ }), +/* 99 */ +/***/ (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__(17); +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; + + +/***/ }), +/* 100 */ +/***/ (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__(203); + +// 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; +}; + + +/***/ }), +/* 101 */ +/***/ (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__(100); +var util = __webpack_require__(17); +var ArraySet = __webpack_require__(99).ArraySet; +var MappingList = __webpack_require__(205).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; + + +/***/ }), +/* 102 */ +/***/ (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__(101).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(207).SourceMapConsumer; +exports.SourceNode = __webpack_require__(208).SourceNode; + + +/***/ }), +/* 103 */ +/***/ (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 { data: { title: 'Home'}, content: 'Other stuff' } + * ``` + * @param {Object|String} `input` String, or object with `content` string + * @param {Object} `options` + * @return {Object} + * @api public + */ + +function matter(input, options) { + var file = {data: {}, content: input, excerpt: '', orig: input}; + if (input === '') return file; + + file = toFile(input); + var cached = cache[file.content]; + + if (!options) { + if (cached) { + file = extend({}, cached); + file.orig = cached.orig; + return file; + } + cache[file.content] = file; + } + + return parseMatter(file, options); +} + +function parseMatter(file, options) { + var opts = defaults(options); + var open = opts.delimiters[0]; + var close = '\n' + opts.delimiters[1]; + var str = file.content; + + if (opts.language) { + file.language = opts.language; + } + + // get the length of the opening delimiter + var openLen = open.length; + if (!utils.startsWith(str, open, openLen)) { + excerpt(file, opts); + return file; + } + + // if the next character after the opening delimiter is + // a character from the delimiter, then it's not a front- + // matter delimiter + if (str.charAt(openLen) === open.slice(-1)) { + return file; + } + + // strip the opening delimiter + str = str.slice(openLen); + var len = str.length; + + // use the language defined after first delimiter, if it exists + var language = matter.language(str, opts); + if (language.name) { + file.language = language.name; + str = str.slice(language.raw.length); + } + + // get the index of the closing delimiter + var closeIndex = str.indexOf(close); + if (closeIndex === -1) { + closeIndex = len; + } + + // get the raw front-matter block + file.matter = str.slice(0, closeIndex); + + // create file.data by parsing the raw file.matter block + file.data = parse(file.language, file.matter, opts); + + // update file.content + if (closeIndex === len) { + file.content = ''; + } else { + file.content = str.slice(closeIndex + close.length); + if (file.content[0] === '\r') { + file.content = file.content.slice(1); + } + if (file.content[0] === '\n') { + file.content = file.content.slice(1); + } + } + + excerpt(file, opts); + return file; +} + +/** + * Expose engines + */ + +matter.engines = engines; + +/** + * Stringify an object to YAML or the specified language, and + * append it to the given string. By default, only YAML and JSON + * can be stringified. See the [engines](#engines) section to learn + * how to stringify other languages. + * + * ```js + * console.log(matter.stringify('foo bar baz', {title: 'Home'})); + * // results in: + * // --- + * // title: Home + * // --- + * // foo bar baz + * ``` + * @param {String|Object} `file` The content string to append to stringified front-matter, or a file object with `file.content` string. + * @param {Object} `data` Front matter to stringify. + * @param {Object} `options` [Options](#options) to pass to gray-matter and [js-yaml]. + * @return {String} Returns a string created by wrapping stringified yaml with delimiters, and appending that to the given string. + * @api public + */ + +matter.stringify = function(file, data, options) { + if (typeof file === 'string') { + file = matter(file, options); + } + return stringify(file, data, options); +}; + +/** + * Synchronously read a file from the file system and parse + * front matter. Returns the same object as the [main function](#matter). + * + * ```js + * var file = matter.read('./content/blog-post.md'); + * ``` + * @param {String} `filepath` file path of the file to read. + * @param {Object} `options` [Options](#options) to pass to gray-matter. + * @return {Object} Returns [an object](#returned-object) with `data` and `content` + * @api public + */ + +matter.read = function(filepath, options) { + var str = fs.readFileSync(filepath, 'utf8'); + var file = matter(str, options); + file.path = filepath; + return file; +}; + +/** + * Returns true if the given `string` has front matter. + * @param {String} `string` + * @param {Object} `options` + * @return {Boolean} True if front matter exists. + * @api public + */ + +matter.test = function(str, options) { + var opts = defaults(options); + return utils.startsWith(str, opts.delimiters[0]); +}; + +/** + * Detect the language to use, if one is defined after the + * first front-matter delimiter. + * @param {String} `string` + * @param {Object} `options` + * @return {Object} Object with `raw` (actual language string), and `name`, the language with whitespace trimmed + */ + +matter.language = function(str, options) { + var opts = defaults(options); + var open = opts.delimiters[0]; + + if (matter.test(str)) { + str = str.slice(open.length); + } + + var language = str.slice(0, str.search(/\r?\n/)); + return { + raw: language, + name: language ? language.trim() : '' + }; +}; + +/** + * Expose `matter` + */ + +module.exports = matter; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lessParse = __webpack_require__(146); + +var _lessParse2 = _interopRequireDefault(_lessParse); + +var _lessStringify = __webpack_require__(21); + +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']; + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = parseMedia; + +var _Container = __webpack_require__(52); + +var _Container2 = _interopRequireDefault(_Container); + +var _parsers = __webpack_require__(164); + +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() + }); +} + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _scssStringify = __webpack_require__(169); + +var _scssStringify2 = _interopRequireDefault(_scssStringify); + +var _scssParse = __webpack_require__(166); + +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']; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNjc3Mtc3ludGF4LmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsInN0cmluZ2lmeSJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBOzs7O0FBQ0E7Ozs7OztrQkFFZSxFQUFFQSwwQkFBRixFQUFTQyxrQ0FBVCxFIiwiZmlsZSI6InNjc3Mtc3ludGF4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0cmluZ2lmeSBmcm9tICcuL3Njc3Mtc3RyaW5naWZ5JztcbmltcG9ydCBwYXJzZSAgICAgZnJvbSAnLi9zY3NzLXBhcnNlJztcblxuZXhwb3J0IGRlZmF1bHQgeyBwYXJzZSwgc3RyaW5naWZ5IH07XG4iXX0= + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _processor = __webpack_require__(185); + +var _processor2 = _interopRequireDefault(_processor); + +var _attribute = __webpack_require__(67); + +var _attribute2 = _interopRequireDefault(_attribute); + +var _className = __webpack_require__(68); + +var _className2 = _interopRequireDefault(_className); + +var _combinator = __webpack_require__(69); + +var _combinator2 = _interopRequireDefault(_combinator); + +var _comment = __webpack_require__(70); + +var _comment2 = _interopRequireDefault(_comment); + +var _id = __webpack_require__(71); + +var _id2 = _interopRequireDefault(_id); + +var _nesting = __webpack_require__(72); + +var _nesting2 = _interopRequireDefault(_nesting); + +var _pseudo = __webpack_require__(73); + +var _pseudo2 = _interopRequireDefault(_pseudo); + +var _root = __webpack_require__(74); + +var _root2 = _interopRequireDefault(_root); + +var _selector = __webpack_require__(75); + +var _selector2 = _interopRequireDefault(_selector); + +var _string = __webpack_require__(76); + +var _string2 = _interopRequireDefault(_string); + +var _tag = __webpack_require__(77); + +var _tag2 = _interopRequireDefault(_tag); + +var _universal = __webpack_require__(78); + +var _universal2 = _interopRequireDefault(_universal); + +var _types = __webpack_require__(1); + +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']; + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Parser = __webpack_require__(190); +const AtWord = __webpack_require__(79); +const Colon = __webpack_require__(80); +const Comma = __webpack_require__(81); +const Comment = __webpack_require__(82); +const Func = __webpack_require__(83); +const Num = __webpack_require__(84); +const Operator = __webpack_require__(85); +const Paren = __webpack_require__(86); +const Str = __webpack_require__(87); +const UnicodeRange = __webpack_require__(88); +const Value = __webpack_require__(89); +const Word = __webpack_require__(90); + +let parser = function (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; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function createError(message, loc) { + // Construct an error similar to the ones thrown by Babylon. + const error = new SyntaxError( + message + " (" + loc.start.line + ":" + loc.start.column + ")" + ); + error.loc = loc; + return error; +} + +module.exports = createError; + + +/***/ }), +/* 112 */ +/***/ (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('') +} + + +/***/ }), +/* 113 */ +/***/ (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, '\\$&'); +}; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +(function webpackUniversalModuleDefinition(root, factory) { +/* istanbul ignore next */ + if(true) + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); +/* istanbul ignore next */ + else if(typeof exports === 'object') + exports["esprima"] = factory(); + else + root["esprima"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/* istanbul ignore if */ +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + /* + Copyright JS Foundation and other contributors, https://js.foundation/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + Object.defineProperty(exports, "__esModule", { value: true }); + var comment_handler_1 = __webpack_require__(1); + var jsx_parser_1 = __webpack_require__(3); + var parser_1 = __webpack_require__(8); + var tokenizer_1 = __webpack_require__(15); + function parse(code, options, delegate) { + var commentHandler = null; + var proxyDelegate = function (node, metadata) { + if (delegate) { + delegate(node, metadata); + } + if (commentHandler) { + commentHandler.visit(node, metadata); + } + }; + var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null; + var collectComment = false; + if (options) { + collectComment = (typeof options.comment === 'boolean' && options.comment); + var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment); + if (collectComment || attachComment) { + commentHandler = new comment_handler_1.CommentHandler(); + commentHandler.attach = attachComment; + options.comment = true; + parserDelegate = proxyDelegate; + } + } + var isModule = false; + if (options && typeof options.sourceType === 'string') { + isModule = (options.sourceType === 'module'); + } + var parser; + if (options && typeof options.jsx === 'boolean' && options.jsx) { + parser = new jsx_parser_1.JSXParser(code, options, parserDelegate); + } + else { + parser = new parser_1.Parser(code, options, parserDelegate); + } + var program = isModule ? parser.parseModule() : parser.parseScript(); + var ast = program; + if (collectComment && commentHandler) { + ast.comments = commentHandler.comments; + } + if (parser.config.tokens) { + ast.tokens = parser.tokens; + } + if (parser.config.tolerant) { + ast.errors = parser.errorHandler.errors; + } + return ast; + } + exports.parse = parse; + function parseModule(code, options, delegate) { + var parsingOptions = options || {}; + parsingOptions.sourceType = 'module'; + return parse(code, parsingOptions, delegate); + } + exports.parseModule = parseModule; + function parseScript(code, options, delegate) { + var parsingOptions = options || {}; + parsingOptions.sourceType = 'script'; + return parse(code, parsingOptions, delegate); + } + exports.parseScript = parseScript; + function tokenize(code, options, delegate) { + var tokenizer = new tokenizer_1.Tokenizer(code, options); + var tokens; + tokens = []; + try { + while (true) { + var token = tokenizer.getNextToken(); + if (!token) { + break; + } + if (delegate) { + token = delegate(token); + } + tokens.push(token); + } + } + catch (e) { + tokenizer.errorHandler.tolerate(e); + } + if (tokenizer.errorHandler.tolerant) { + tokens.errors = tokenizer.errors(); + } + return tokens; + } + exports.tokenize = tokenize; + var syntax_1 = __webpack_require__(2); + exports.Syntax = syntax_1.Syntax; + // Sync with *.json manifests. + exports.version = '4.0.0'; + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var syntax_1 = __webpack_require__(2); + var CommentHandler = (function () { + function CommentHandler() { + this.attach = false; + this.comments = []; + this.stack = []; + this.leading = []; + this.trailing = []; + } + CommentHandler.prototype.insertInnerComments = function (node, metadata) { + // innnerComments for properties empty block + // `function a() {/** comments **\/}` + if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) { + var innerComments = []; + for (var i = this.leading.length - 1; i >= 0; --i) { + var entry = this.leading[i]; + if (metadata.end.offset >= entry.start) { + innerComments.unshift(entry.comment); + this.leading.splice(i, 1); + this.trailing.splice(i, 1); + } + } + if (innerComments.length) { + node.innerComments = innerComments; + } + } + }; + CommentHandler.prototype.findTrailingComments = function (metadata) { + var trailingComments = []; + if (this.trailing.length > 0) { + for (var i = this.trailing.length - 1; i >= 0; --i) { + var entry_1 = this.trailing[i]; + if (entry_1.start >= metadata.end.offset) { + trailingComments.unshift(entry_1.comment); + } + } + this.trailing.length = 0; + return trailingComments; + } + var entry = this.stack[this.stack.length - 1]; + if (entry && entry.node.trailingComments) { + var firstComment = entry.node.trailingComments[0]; + if (firstComment && firstComment.range[0] >= metadata.end.offset) { + trailingComments = entry.node.trailingComments; + delete entry.node.trailingComments; + } + } + return trailingComments; + }; + CommentHandler.prototype.findLeadingComments = function (metadata) { + var leadingComments = []; + var target; + while (this.stack.length > 0) { + var entry = this.stack[this.stack.length - 1]; + if (entry && entry.start >= metadata.start.offset) { + target = entry.node; + this.stack.pop(); + } + else { + break; + } + } + if (target) { + var count = target.leadingComments ? target.leadingComments.length : 0; + for (var i = count - 1; i >= 0; --i) { + var comment = target.leadingComments[i]; + if (comment.range[1] <= metadata.start.offset) { + leadingComments.unshift(comment); + target.leadingComments.splice(i, 1); + } + } + if (target.leadingComments && target.leadingComments.length === 0) { + delete target.leadingComments; + } + return leadingComments; + } + for (var i = this.leading.length - 1; i >= 0; --i) { + var entry = this.leading[i]; + if (entry.start <= metadata.start.offset) { + leadingComments.unshift(entry.comment); + this.leading.splice(i, 1); + } + } + return leadingComments; + }; + CommentHandler.prototype.visitNode = function (node, metadata) { + if (node.type === syntax_1.Syntax.Program && node.body.length > 0) { + return; + } + this.insertInnerComments(node, metadata); + var trailingComments = this.findTrailingComments(metadata); + var leadingComments = this.findLeadingComments(metadata); + if (leadingComments.length > 0) { + node.leadingComments = leadingComments; + } + if (trailingComments.length > 0) { + node.trailingComments = trailingComments; + } + this.stack.push({ + node: node, + start: metadata.start.offset + }); + }; + CommentHandler.prototype.visitComment = function (node, metadata) { + var type = (node.type[0] === 'L') ? 'Line' : 'Block'; + var comment = { + type: type, + value: node.value + }; + if (node.range) { + comment.range = node.range; + } + if (node.loc) { + comment.loc = node.loc; + } + this.comments.push(comment); + if (this.attach) { + var entry = { + comment: { + type: type, + value: node.value, + range: [metadata.start.offset, metadata.end.offset] + }, + start: metadata.start.offset + }; + if (node.loc) { + entry.comment.loc = node.loc; + } + node.type = type; + this.leading.push(entry); + this.trailing.push(entry); + } + }; + CommentHandler.prototype.visit = function (node, metadata) { + if (node.type === 'LineComment') { + this.visitComment(node, metadata); + } + else if (node.type === 'BlockComment') { + this.visitComment(node, metadata); + } + else if (this.attach) { + this.visitNode(node, metadata); + } + }; + return CommentHandler; + }()); + exports.CommentHandler = CommentHandler; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AwaitExpression: 'AwaitExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForOfStatement: 'ForOfStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; +/* istanbul ignore next */ + var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + var character_1 = __webpack_require__(4); + var JSXNode = __webpack_require__(5); + var jsx_syntax_1 = __webpack_require__(6); + var Node = __webpack_require__(7); + var parser_1 = __webpack_require__(8); + var token_1 = __webpack_require__(13); + var xhtml_entities_1 = __webpack_require__(14); + token_1.TokenName[100 /* Identifier */] = 'JSXIdentifier'; + token_1.TokenName[101 /* Text */] = 'JSXText'; + // Fully qualified element name, e.g. returns "svg:path" + function getQualifiedElementName(elementName) { + var qualifiedName; + switch (elementName.type) { + case jsx_syntax_1.JSXSyntax.JSXIdentifier: + var id = elementName; + qualifiedName = id.name; + break; + case jsx_syntax_1.JSXSyntax.JSXNamespacedName: + var ns = elementName; + qualifiedName = getQualifiedElementName(ns.namespace) + ':' + + getQualifiedElementName(ns.name); + break; + case jsx_syntax_1.JSXSyntax.JSXMemberExpression: + var expr = elementName; + qualifiedName = getQualifiedElementName(expr.object) + '.' + + getQualifiedElementName(expr.property); + break; + /* istanbul ignore next */ + default: + break; + } + return qualifiedName; + } + var JSXParser = (function (_super) { + __extends(JSXParser, _super); + function JSXParser(code, options, delegate) { + return _super.call(this, code, options, delegate) || this; + } + JSXParser.prototype.parsePrimaryExpression = function () { + return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this); + }; + JSXParser.prototype.startJSX = function () { + // Unwind the scanner before the lookahead token. + this.scanner.index = this.startMarker.index; + this.scanner.lineNumber = this.startMarker.line; + this.scanner.lineStart = this.startMarker.index - this.startMarker.column; + }; + JSXParser.prototype.finishJSX = function () { + // Prime the next lookahead. + this.nextToken(); + }; + JSXParser.prototype.reenterJSX = function () { + this.startJSX(); + this.expectJSX('}'); + // Pop the closing '}' added from the lookahead. + if (this.config.tokens) { + this.tokens.pop(); + } + }; + JSXParser.prototype.createJSXNode = function () { + this.collectComments(); + return { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + }; + JSXParser.prototype.createJSXChildNode = function () { + return { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + }; + JSXParser.prototype.scanXHTMLEntity = function (quote) { + var result = '&'; + var valid = true; + var terminated = false; + var numeric = false; + var hex = false; + while (!this.scanner.eof() && valid && !terminated) { + var ch = this.scanner.source[this.scanner.index]; + if (ch === quote) { + break; + } + terminated = (ch === ';'); + result += ch; + ++this.scanner.index; + if (!terminated) { + switch (result.length) { + case 2: + // e.g. '{' + numeric = (ch === '#'); + break; + case 3: + if (numeric) { + // e.g. 'A' + hex = (ch === 'x'); + valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0)); + numeric = numeric && !hex; + } + break; + default: + valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0))); + valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0))); + break; + } + } + } + if (valid && terminated && result.length > 2) { + // e.g. 'A' becomes just '#x41' + var str = result.substr(1, result.length - 2); + if (numeric && str.length > 1) { + result = String.fromCharCode(parseInt(str.substr(1), 10)); + } + else if (hex && str.length > 2) { + result = String.fromCharCode(parseInt('0' + str.substr(1), 16)); + } + else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) { + result = xhtml_entities_1.XHTMLEntities[str]; + } + } + return result; + }; + // Scan the next JSX token. This replaces Scanner#lex when in JSX mode. + JSXParser.prototype.lexJSX = function () { + var cp = this.scanner.source.charCodeAt(this.scanner.index); + // < > / : = { } + if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) { + var value = this.scanner.source[this.scanner.index++]; + return { + type: 7 /* Punctuator */, + value: value, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: this.scanner.index - 1, + end: this.scanner.index + }; + } + // " ' + if (cp === 34 || cp === 39) { + var start = this.scanner.index; + var quote = this.scanner.source[this.scanner.index++]; + var str = ''; + while (!this.scanner.eof()) { + var ch = this.scanner.source[this.scanner.index++]; + if (ch === quote) { + break; + } + else if (ch === '&') { + str += this.scanXHTMLEntity(quote); + } + else { + str += ch; + } + } + return { + type: 8 /* StringLiteral */, + value: str, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + // ... or . + if (cp === 46) { + var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1); + var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2); + var value = (n1 === 46 && n2 === 46) ? '...' : '.'; + var start = this.scanner.index; + this.scanner.index += value.length; + return { + type: 7 /* Punctuator */, + value: value, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + // ` + if (cp === 96) { + // Only placeholder, since it will be rescanned as a real assignment expression. + return { + type: 10 /* Template */, + value: '', + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: this.scanner.index, + end: this.scanner.index + }; + } + // Identifer can not contain backslash (char code 92). + if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) { + var start = this.scanner.index; + ++this.scanner.index; + while (!this.scanner.eof()) { + var ch = this.scanner.source.charCodeAt(this.scanner.index); + if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) { + ++this.scanner.index; + } + else if (ch === 45) { + // Hyphen (char code 45) can be part of an identifier. + ++this.scanner.index; + } + else { + break; + } + } + var id = this.scanner.source.slice(start, this.scanner.index); + return { + type: 100 /* Identifier */, + value: id, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + return this.scanner.lex(); + }; + JSXParser.prototype.nextJSXToken = function () { + this.collectComments(); + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + var token = this.lexJSX(); + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + if (this.config.tokens) { + this.tokens.push(this.convertToken(token)); + } + return token; + }; + JSXParser.prototype.nextJSXText = function () { + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + var start = this.scanner.index; + var text = ''; + while (!this.scanner.eof()) { + var ch = this.scanner.source[this.scanner.index]; + if (ch === '{' || ch === '<') { + break; + } + ++this.scanner.index; + text += ch; + if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + ++this.scanner.lineNumber; + if (ch === '\r' && this.scanner.source[this.scanner.index] === '\n') { + ++this.scanner.index; + } + this.scanner.lineStart = this.scanner.index; + } + } + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + var token = { + type: 101 /* Text */, + value: text, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + if ((text.length > 0) && this.config.tokens) { + this.tokens.push(this.convertToken(token)); + } + return token; + }; + JSXParser.prototype.peekJSXToken = function () { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.lexJSX(); + this.scanner.restoreState(state); + return next; + }; + // Expect the next JSX token to match the specified punctuator. + // If not, an exception will be thrown. + JSXParser.prototype.expectJSX = function (value) { + var token = this.nextJSXToken(); + if (token.type !== 7 /* Punctuator */ || token.value !== value) { + this.throwUnexpectedToken(token); + } + }; + // Return true if the next JSX token matches the specified punctuator. + JSXParser.prototype.matchJSX = function (value) { + var next = this.peekJSXToken(); + return next.type === 7 /* Punctuator */ && next.value === value; + }; + JSXParser.prototype.parseJSXIdentifier = function () { + var node = this.createJSXNode(); + var token = this.nextJSXToken(); + if (token.type !== 100 /* Identifier */) { + this.throwUnexpectedToken(token); + } + return this.finalize(node, new JSXNode.JSXIdentifier(token.value)); + }; + JSXParser.prototype.parseJSXElementName = function () { + var node = this.createJSXNode(); + var elementName = this.parseJSXIdentifier(); + if (this.matchJSX(':')) { + var namespace = elementName; + this.expectJSX(':'); + var name_1 = this.parseJSXIdentifier(); + elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1)); + } + else if (this.matchJSX('.')) { + while (this.matchJSX('.')) { + var object = elementName; + this.expectJSX('.'); + var property = this.parseJSXIdentifier(); + elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property)); + } + } + return elementName; + }; + JSXParser.prototype.parseJSXAttributeName = function () { + var node = this.createJSXNode(); + var attributeName; + var identifier = this.parseJSXIdentifier(); + if (this.matchJSX(':')) { + var namespace = identifier; + this.expectJSX(':'); + var name_2 = this.parseJSXIdentifier(); + attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2)); + } + else { + attributeName = identifier; + } + return attributeName; + }; + JSXParser.prototype.parseJSXStringLiteralAttribute = function () { + var node = this.createJSXNode(); + var token = this.nextJSXToken(); + if (token.type !== 8 /* StringLiteral */) { + this.throwUnexpectedToken(token); + } + var raw = this.getTokenRaw(token); + return this.finalize(node, new Node.Literal(token.value, raw)); + }; + JSXParser.prototype.parseJSXExpressionAttribute = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + this.finishJSX(); + if (this.match('}')) { + this.tolerateError('JSX attributes must only be assigned a non-empty expression'); + } + var expression = this.parseAssignmentExpression(); + this.reenterJSX(); + return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); + }; + JSXParser.prototype.parseJSXAttributeValue = function () { + return this.matchJSX('{') ? this.parseJSXExpressionAttribute() : + this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute(); + }; + JSXParser.prototype.parseJSXNameValueAttribute = function () { + var node = this.createJSXNode(); + var name = this.parseJSXAttributeName(); + var value = null; + if (this.matchJSX('=')) { + this.expectJSX('='); + value = this.parseJSXAttributeValue(); + } + return this.finalize(node, new JSXNode.JSXAttribute(name, value)); + }; + JSXParser.prototype.parseJSXSpreadAttribute = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + this.expectJSX('...'); + this.finishJSX(); + var argument = this.parseAssignmentExpression(); + this.reenterJSX(); + return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument)); + }; + JSXParser.prototype.parseJSXAttributes = function () { + var attributes = []; + while (!this.matchJSX('/') && !this.matchJSX('>')) { + var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() : + this.parseJSXNameValueAttribute(); + attributes.push(attribute); + } + return attributes; + }; + JSXParser.prototype.parseJSXOpeningElement = function () { + var node = this.createJSXNode(); + this.expectJSX('<'); + var name = this.parseJSXElementName(); + var attributes = this.parseJSXAttributes(); + var selfClosing = this.matchJSX('/'); + if (selfClosing) { + this.expectJSX('/'); + } + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); + }; + JSXParser.prototype.parseJSXBoundaryElement = function () { + var node = this.createJSXNode(); + this.expectJSX('<'); + if (this.matchJSX('/')) { + this.expectJSX('/'); + var name_3 = this.parseJSXElementName(); + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXClosingElement(name_3)); + } + var name = this.parseJSXElementName(); + var attributes = this.parseJSXAttributes(); + var selfClosing = this.matchJSX('/'); + if (selfClosing) { + this.expectJSX('/'); + } + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); + }; + JSXParser.prototype.parseJSXEmptyExpression = function () { + var node = this.createJSXChildNode(); + this.collectComments(); + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + return this.finalize(node, new JSXNode.JSXEmptyExpression()); + }; + JSXParser.prototype.parseJSXExpressionContainer = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + var expression; + if (this.matchJSX('}')) { + expression = this.parseJSXEmptyExpression(); + this.expectJSX('}'); + } + else { + this.finishJSX(); + expression = this.parseAssignmentExpression(); + this.reenterJSX(); + } + return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); + }; + JSXParser.prototype.parseJSXChildren = function () { + var children = []; + while (!this.scanner.eof()) { + var node = this.createJSXChildNode(); + var token = this.nextJSXText(); + if (token.start < token.end) { + var raw = this.getTokenRaw(token); + var child = this.finalize(node, new JSXNode.JSXText(token.value, raw)); + children.push(child); + } + if (this.scanner.source[this.scanner.index] === '{') { + var container = this.parseJSXExpressionContainer(); + children.push(container); + } + else { + break; + } + } + return children; + }; + JSXParser.prototype.parseComplexJSXElement = function (el) { + var stack = []; + while (!this.scanner.eof()) { + el.children = el.children.concat(this.parseJSXChildren()); + var node = this.createJSXChildNode(); + var element = this.parseJSXBoundaryElement(); + if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) { + var opening = element; + if (opening.selfClosing) { + var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null)); + el.children.push(child); + } + else { + stack.push(el); + el = { node: node, opening: opening, closing: null, children: [] }; + } + } + if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) { + el.closing = element; + var open_1 = getQualifiedElementName(el.opening.name); + var close_1 = getQualifiedElementName(el.closing.name); + if (open_1 !== close_1) { + this.tolerateError('Expected corresponding JSX closing tag for %0', open_1); + } + if (stack.length > 0) { + var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing)); + el = stack[stack.length - 1]; + el.children.push(child); + stack.pop(); + } + else { + break; + } + } + } + return el; + }; + JSXParser.prototype.parseJSXElement = function () { + var node = this.createJSXNode(); + var opening = this.parseJSXOpeningElement(); + var children = []; + var closing = null; + if (!opening.selfClosing) { + var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children }); + children = el.children; + closing = el.closing; + } + return this.finalize(node, new JSXNode.JSXElement(opening, children, closing)); + }; + JSXParser.prototype.parseJSXRoot = function () { + // Pop the opening '<' added from the lookahead. + if (this.config.tokens) { + this.tokens.pop(); + } + this.startJSX(); + var element = this.parseJSXElement(); + this.finishJSX(); + return element; + }; + JSXParser.prototype.isStartOfExpression = function () { + return _super.prototype.isStartOfExpression.call(this) || this.match('<'); + }; + return JSXParser; + }(parser_1.Parser)); + exports.JSXParser = JSXParser; + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + // See also tools/generate-unicode-regex.js. + var Regex = { + // Unicode v8.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, + // Unicode v8.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u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EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65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uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC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[\uDD00-\uDDEF]/ + }; + exports.Character = { + /* tslint:disable:no-bitwise */ + fromCodePoint: function (cp) { + return (cp < 0x10000) ? String.fromCharCode(cp) : + String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + + String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); + }, + // https://tc39.github.io/ecma262/#sec-white-space + isWhiteSpace: function (cp) { + return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) || + (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0); + }, + // https://tc39.github.io/ecma262/#sec-line-terminators + isLineTerminator: function (cp) { + return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029); + }, + // https://tc39.github.io/ecma262/#sec-names-and-keywords + isIdentifierStart: function (cp) { + return (cp === 0x24) || (cp === 0x5F) || + (cp >= 0x41 && cp <= 0x5A) || + (cp >= 0x61 && cp <= 0x7A) || + (cp === 0x5C) || + ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp))); + }, + isIdentifierPart: function (cp) { + return (cp === 0x24) || (cp === 0x5F) || + (cp >= 0x41 && cp <= 0x5A) || + (cp >= 0x61 && cp <= 0x7A) || + (cp >= 0x30 && cp <= 0x39) || + (cp === 0x5C) || + ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp))); + }, + // https://tc39.github.io/ecma262/#sec-literals-numeric-literals + isDecimalDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x39); // 0..9 + }, + isHexDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x39) || + (cp >= 0x41 && cp <= 0x46) || + (cp >= 0x61 && cp <= 0x66); // a..f + }, + isOctalDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x37); // 0..7 + } + }; + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var jsx_syntax_1 = __webpack_require__(6); + /* tslint:disable:max-classes-per-file */ + var JSXClosingElement = (function () { + function JSXClosingElement(name) { + this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement; + this.name = name; + } + return JSXClosingElement; + }()); + exports.JSXClosingElement = JSXClosingElement; + var JSXElement = (function () { + function JSXElement(openingElement, children, closingElement) { + this.type = jsx_syntax_1.JSXSyntax.JSXElement; + this.openingElement = openingElement; + this.children = children; + this.closingElement = closingElement; + } + return JSXElement; + }()); + exports.JSXElement = JSXElement; + var JSXEmptyExpression = (function () { + function JSXEmptyExpression() { + this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression; + } + return JSXEmptyExpression; + }()); + exports.JSXEmptyExpression = JSXEmptyExpression; + var JSXExpressionContainer = (function () { + function JSXExpressionContainer(expression) { + this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer; + this.expression = expression; + } + return JSXExpressionContainer; + }()); + exports.JSXExpressionContainer = JSXExpressionContainer; + var JSXIdentifier = (function () { + function JSXIdentifier(name) { + this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier; + this.name = name; + } + return JSXIdentifier; + }()); + exports.JSXIdentifier = JSXIdentifier; + var JSXMemberExpression = (function () { + function JSXMemberExpression(object, property) { + this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression; + this.object = object; + this.property = property; + } + return JSXMemberExpression; + }()); + exports.JSXMemberExpression = JSXMemberExpression; + var JSXAttribute = (function () { + function JSXAttribute(name, value) { + this.type = jsx_syntax_1.JSXSyntax.JSXAttribute; + this.name = name; + this.value = value; + } + return JSXAttribute; + }()); + exports.JSXAttribute = JSXAttribute; + var JSXNamespacedName = (function () { + function JSXNamespacedName(namespace, name) { + this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName; + this.namespace = namespace; + this.name = name; + } + return JSXNamespacedName; + }()); + exports.JSXNamespacedName = JSXNamespacedName; + var JSXOpeningElement = (function () { + function JSXOpeningElement(name, selfClosing, attributes) { + this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement; + this.name = name; + this.selfClosing = selfClosing; + this.attributes = attributes; + } + return JSXOpeningElement; + }()); + exports.JSXOpeningElement = JSXOpeningElement; + var JSXSpreadAttribute = (function () { + function JSXSpreadAttribute(argument) { + this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute; + this.argument = argument; + } + return JSXSpreadAttribute; + }()); + exports.JSXSpreadAttribute = JSXSpreadAttribute; + var JSXText = (function () { + function JSXText(value, raw) { + this.type = jsx_syntax_1.JSXSyntax.JSXText; + this.value = value; + this.raw = raw; + } + return JSXText; + }()); + exports.JSXText = JSXText; + + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JSXSyntax = { + JSXAttribute: 'JSXAttribute', + JSXClosingElement: 'JSXClosingElement', + JSXElement: 'JSXElement', + JSXEmptyExpression: 'JSXEmptyExpression', + JSXExpressionContainer: 'JSXExpressionContainer', + JSXIdentifier: 'JSXIdentifier', + JSXMemberExpression: 'JSXMemberExpression', + JSXNamespacedName: 'JSXNamespacedName', + JSXOpeningElement: 'JSXOpeningElement', + JSXSpreadAttribute: 'JSXSpreadAttribute', + JSXText: 'JSXText' + }; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var syntax_1 = __webpack_require__(2); + /* tslint:disable:max-classes-per-file */ + var ArrayExpression = (function () { + function ArrayExpression(elements) { + this.type = syntax_1.Syntax.ArrayExpression; + this.elements = elements; + } + return ArrayExpression; + }()); + exports.ArrayExpression = ArrayExpression; + var ArrayPattern = (function () { + function ArrayPattern(elements) { + this.type = syntax_1.Syntax.ArrayPattern; + this.elements = elements; + } + return ArrayPattern; + }()); + exports.ArrayPattern = ArrayPattern; + var ArrowFunctionExpression = (function () { + function ArrowFunctionExpression(params, body, expression) { + this.type = syntax_1.Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.body = body; + this.generator = false; + this.expression = expression; + this.async = false; + } + return ArrowFunctionExpression; + }()); + exports.ArrowFunctionExpression = ArrowFunctionExpression; + var AssignmentExpression = (function () { + function AssignmentExpression(operator, left, right) { + this.type = syntax_1.Syntax.AssignmentExpression; + this.operator = operator; + this.left = left; + this.right = right; + } + return AssignmentExpression; + }()); + exports.AssignmentExpression = AssignmentExpression; + var AssignmentPattern = (function () { + function AssignmentPattern(left, right) { + this.type = syntax_1.Syntax.AssignmentPattern; + this.left = left; + this.right = right; + } + return AssignmentPattern; + }()); + exports.AssignmentPattern = AssignmentPattern; + var AsyncArrowFunctionExpression = (function () { + function AsyncArrowFunctionExpression(params, body, expression) { + this.type = syntax_1.Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.body = body; + this.generator = false; + this.expression = expression; + this.async = true; + } + return AsyncArrowFunctionExpression; + }()); + exports.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression; + var AsyncFunctionDeclaration = (function () { + function AsyncFunctionDeclaration(id, params, body) { + this.type = syntax_1.Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.body = body; + this.generator = false; + this.expression = false; + this.async = true; + } + return AsyncFunctionDeclaration; + }()); + exports.AsyncFunctionDeclaration = AsyncFunctionDeclaration; + var AsyncFunctionExpression = (function () { + function AsyncFunctionExpression(id, params, body) { + this.type = syntax_1.Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.body = body; + this.generator = false; + this.expression = false; + this.async = true; + } + return AsyncFunctionExpression; + }()); + exports.AsyncFunctionExpression = AsyncFunctionExpression; + var AwaitExpression = (function () { + function AwaitExpression(argument) { + this.type = syntax_1.Syntax.AwaitExpression; + this.argument = argument; + } + return AwaitExpression; + }()); + exports.AwaitExpression = AwaitExpression; + var BinaryExpression = (function () { + function BinaryExpression(operator, left, right) { + var logical = (operator === '||' || operator === '&&'); + this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression; + this.operator = operator; + this.left = left; + this.right = right; + } + return BinaryExpression; + }()); + exports.BinaryExpression = BinaryExpression; + var BlockStatement = (function () { + function BlockStatement(body) { + this.type = syntax_1.Syntax.BlockStatement; + this.body = body; + } + return BlockStatement; + }()); + exports.BlockStatement = BlockStatement; + var BreakStatement = (function () { + function BreakStatement(label) { + this.type = syntax_1.Syntax.BreakStatement; + this.label = label; + } + return BreakStatement; + }()); + exports.BreakStatement = BreakStatement; + var CallExpression = (function () { + function CallExpression(callee, args) { + this.type = syntax_1.Syntax.CallExpression; + this.callee = callee; + this.arguments = args; + } + return CallExpression; + }()); + exports.CallExpression = CallExpression; + var CatchClause = (function () { + function CatchClause(param, body) { + this.type = syntax_1.Syntax.CatchClause; + this.param = param; + this.body = body; + } + return CatchClause; + }()); + exports.CatchClause = CatchClause; + var ClassBody = (function () { + function ClassBody(body) { + this.type = syntax_1.Syntax.ClassBody; + this.body = body; + } + return ClassBody; + }()); + exports.ClassBody = ClassBody; + var ClassDeclaration = (function () { + function ClassDeclaration(id, superClass, body) { + this.type = syntax_1.Syntax.ClassDeclaration; + this.id = id; + this.superClass = superClass; + this.body = body; + } + return ClassDeclaration; + }()); + exports.ClassDeclaration = ClassDeclaration; + var ClassExpression = (function () { + function ClassExpression(id, superClass, body) { + this.type = syntax_1.Syntax.ClassExpression; + this.id = id; + this.superClass = superClass; + this.body = body; + } + return ClassExpression; + }()); + exports.ClassExpression = ClassExpression; + var ComputedMemberExpression = (function () { + function ComputedMemberExpression(object, property) { + this.type = syntax_1.Syntax.MemberExpression; + this.computed = true; + this.object = object; + this.property = property; + } + return ComputedMemberExpression; + }()); + exports.ComputedMemberExpression = ComputedMemberExpression; + var ConditionalExpression = (function () { + function ConditionalExpression(test, consequent, alternate) { + this.type = syntax_1.Syntax.ConditionalExpression; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + } + return ConditionalExpression; + }()); + exports.ConditionalExpression = ConditionalExpression; + var ContinueStatement = (function () { + function ContinueStatement(label) { + this.type = syntax_1.Syntax.ContinueStatement; + this.label = label; + } + return ContinueStatement; + }()); + exports.ContinueStatement = ContinueStatement; + var DebuggerStatement = (function () { + function DebuggerStatement() { + this.type = syntax_1.Syntax.DebuggerStatement; + } + return DebuggerStatement; + }()); + exports.DebuggerStatement = DebuggerStatement; + var Directive = (function () { + function Directive(expression, directive) { + this.type = syntax_1.Syntax.ExpressionStatement; + this.expression = expression; + this.directive = directive; + } + return Directive; + }()); + exports.Directive = Directive; + var DoWhileStatement = (function () { + function DoWhileStatement(body, test) { + this.type = syntax_1.Syntax.DoWhileStatement; + this.body = body; + this.test = test; + } + return DoWhileStatement; + }()); + exports.DoWhileStatement = DoWhileStatement; + var EmptyStatement = (function () { + function EmptyStatement() { + this.type = syntax_1.Syntax.EmptyStatement; + } + return EmptyStatement; + }()); + exports.EmptyStatement = EmptyStatement; + var ExportAllDeclaration = (function () { + function ExportAllDeclaration(source) { + this.type = syntax_1.Syntax.ExportAllDeclaration; + this.source = source; + } + return ExportAllDeclaration; + }()); + exports.ExportAllDeclaration = ExportAllDeclaration; + var ExportDefaultDeclaration = (function () { + function ExportDefaultDeclaration(declaration) { + this.type = syntax_1.Syntax.ExportDefaultDeclaration; + this.declaration = declaration; + } + return ExportDefaultDeclaration; + }()); + exports.ExportDefaultDeclaration = ExportDefaultDeclaration; + var ExportNamedDeclaration = (function () { + function ExportNamedDeclaration(declaration, specifiers, source) { + this.type = syntax_1.Syntax.ExportNamedDeclaration; + this.declaration = declaration; + this.specifiers = specifiers; + this.source = source; + } + return ExportNamedDeclaration; + }()); + exports.ExportNamedDeclaration = ExportNamedDeclaration; + var ExportSpecifier = (function () { + function ExportSpecifier(local, exported) { + this.type = syntax_1.Syntax.ExportSpecifier; + this.exported = exported; + this.local = local; + } + return ExportSpecifier; + }()); + exports.ExportSpecifier = ExportSpecifier; + var ExpressionStatement = (function () { + function ExpressionStatement(expression) { + this.type = syntax_1.Syntax.ExpressionStatement; + this.expression = expression; + } + return ExpressionStatement; + }()); + exports.ExpressionStatement = ExpressionStatement; + var ForInStatement = (function () { + function ForInStatement(left, right, body) { + this.type = syntax_1.Syntax.ForInStatement; + this.left = left; + this.right = right; + this.body = body; + this.each = false; + } + return ForInStatement; + }()); + exports.ForInStatement = ForInStatement; + var ForOfStatement = (function () { + function ForOfStatement(left, right, body) { + this.type = syntax_1.Syntax.ForOfStatement; + this.left = left; + this.right = right; + this.body = body; + } + return ForOfStatement; + }()); + exports.ForOfStatement = ForOfStatement; + var ForStatement = (function () { + function ForStatement(init, test, update, body) { + this.type = syntax_1.Syntax.ForStatement; + this.init = init; + this.test = test; + this.update = update; + this.body = body; + } + return ForStatement; + }()); + exports.ForStatement = ForStatement; + var FunctionDeclaration = (function () { + function FunctionDeclaration(id, params, body, generator) { + this.type = syntax_1.Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.body = body; + this.generator = generator; + this.expression = false; + this.async = false; + } + return FunctionDeclaration; + }()); + exports.FunctionDeclaration = FunctionDeclaration; + var FunctionExpression = (function () { + function FunctionExpression(id, params, body, generator) { + this.type = syntax_1.Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.body = body; + this.generator = generator; + this.expression = false; + this.async = false; + } + return FunctionExpression; + }()); + exports.FunctionExpression = FunctionExpression; + var Identifier = (function () { + function Identifier(name) { + this.type = syntax_1.Syntax.Identifier; + this.name = name; + } + return Identifier; + }()); + exports.Identifier = Identifier; + var IfStatement = (function () { + function IfStatement(test, consequent, alternate) { + this.type = syntax_1.Syntax.IfStatement; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + } + return IfStatement; + }()); + exports.IfStatement = IfStatement; + var ImportDeclaration = (function () { + function ImportDeclaration(specifiers, source) { + this.type = syntax_1.Syntax.ImportDeclaration; + this.specifiers = specifiers; + this.source = source; + } + return ImportDeclaration; + }()); + exports.ImportDeclaration = ImportDeclaration; + var ImportDefaultSpecifier = (function () { + function ImportDefaultSpecifier(local) { + this.type = syntax_1.Syntax.ImportDefaultSpecifier; + this.local = local; + } + return ImportDefaultSpecifier; + }()); + exports.ImportDefaultSpecifier = ImportDefaultSpecifier; + var ImportNamespaceSpecifier = (function () { + function ImportNamespaceSpecifier(local) { + this.type = syntax_1.Syntax.ImportNamespaceSpecifier; + this.local = local; + } + return ImportNamespaceSpecifier; + }()); + exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; + var ImportSpecifier = (function () { + function ImportSpecifier(local, imported) { + this.type = syntax_1.Syntax.ImportSpecifier; + this.local = local; + this.imported = imported; + } + return ImportSpecifier; + }()); + exports.ImportSpecifier = ImportSpecifier; + var LabeledStatement = (function () { + function LabeledStatement(label, body) { + this.type = syntax_1.Syntax.LabeledStatement; + this.label = label; + this.body = body; + } + return LabeledStatement; + }()); + exports.LabeledStatement = LabeledStatement; + var Literal = (function () { + function Literal(value, raw) { + this.type = syntax_1.Syntax.Literal; + this.value = value; + this.raw = raw; + } + return Literal; + }()); + exports.Literal = Literal; + var MetaProperty = (function () { + function MetaProperty(meta, property) { + this.type = syntax_1.Syntax.MetaProperty; + this.meta = meta; + this.property = property; + } + return MetaProperty; + }()); + exports.MetaProperty = MetaProperty; + var MethodDefinition = (function () { + function MethodDefinition(key, computed, value, kind, isStatic) { + this.type = syntax_1.Syntax.MethodDefinition; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.static = isStatic; + } + return MethodDefinition; + }()); + exports.MethodDefinition = MethodDefinition; + var Module = (function () { + function Module(body) { + this.type = syntax_1.Syntax.Program; + this.body = body; + this.sourceType = 'module'; + } + return Module; + }()); + exports.Module = Module; + var NewExpression = (function () { + function NewExpression(callee, args) { + this.type = syntax_1.Syntax.NewExpression; + this.callee = callee; + this.arguments = args; + } + return NewExpression; + }()); + exports.NewExpression = NewExpression; + var ObjectExpression = (function () { + function ObjectExpression(properties) { + this.type = syntax_1.Syntax.ObjectExpression; + this.properties = properties; + } + return ObjectExpression; + }()); + exports.ObjectExpression = ObjectExpression; + var ObjectPattern = (function () { + function ObjectPattern(properties) { + this.type = syntax_1.Syntax.ObjectPattern; + this.properties = properties; + } + return ObjectPattern; + }()); + exports.ObjectPattern = ObjectPattern; + var Property = (function () { + function Property(kind, key, computed, value, method, shorthand) { + this.type = syntax_1.Syntax.Property; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.method = method; + this.shorthand = shorthand; + } + return Property; + }()); + exports.Property = Property; + var RegexLiteral = (function () { + function RegexLiteral(value, raw, pattern, flags) { + this.type = syntax_1.Syntax.Literal; + this.value = value; + this.raw = raw; + this.regex = { pattern: pattern, flags: flags }; + } + return RegexLiteral; + }()); + exports.RegexLiteral = RegexLiteral; + var RestElement = (function () { + function RestElement(argument) { + this.type = syntax_1.Syntax.RestElement; + this.argument = argument; + } + return RestElement; + }()); + exports.RestElement = RestElement; + var ReturnStatement = (function () { + function ReturnStatement(argument) { + this.type = syntax_1.Syntax.ReturnStatement; + this.argument = argument; + } + return ReturnStatement; + }()); + exports.ReturnStatement = ReturnStatement; + var Script = (function () { + function Script(body) { + this.type = syntax_1.Syntax.Program; + this.body = body; + this.sourceType = 'script'; + } + return Script; + }()); + exports.Script = Script; + var SequenceExpression = (function () { + function SequenceExpression(expressions) { + this.type = syntax_1.Syntax.SequenceExpression; + this.expressions = expressions; + } + return SequenceExpression; + }()); + exports.SequenceExpression = SequenceExpression; + var SpreadElement = (function () { + function SpreadElement(argument) { + this.type = syntax_1.Syntax.SpreadElement; + this.argument = argument; + } + return SpreadElement; + }()); + exports.SpreadElement = SpreadElement; + var StaticMemberExpression = (function () { + function StaticMemberExpression(object, property) { + this.type = syntax_1.Syntax.MemberExpression; + this.computed = false; + this.object = object; + this.property = property; + } + return StaticMemberExpression; + }()); + exports.StaticMemberExpression = StaticMemberExpression; + var Super = (function () { + function Super() { + this.type = syntax_1.Syntax.Super; + } + return Super; + }()); + exports.Super = Super; + var SwitchCase = (function () { + function SwitchCase(test, consequent) { + this.type = syntax_1.Syntax.SwitchCase; + this.test = test; + this.consequent = consequent; + } + return SwitchCase; + }()); + exports.SwitchCase = SwitchCase; + var SwitchStatement = (function () { + function SwitchStatement(discriminant, cases) { + this.type = syntax_1.Syntax.SwitchStatement; + this.discriminant = discriminant; + this.cases = cases; + } + return SwitchStatement; + }()); + exports.SwitchStatement = SwitchStatement; + var TaggedTemplateExpression = (function () { + function TaggedTemplateExpression(tag, quasi) { + this.type = syntax_1.Syntax.TaggedTemplateExpression; + this.tag = tag; + this.quasi = quasi; + } + return TaggedTemplateExpression; + }()); + exports.TaggedTemplateExpression = TaggedTemplateExpression; + var TemplateElement = (function () { + function TemplateElement(value, tail) { + this.type = syntax_1.Syntax.TemplateElement; + this.value = value; + this.tail = tail; + } + return TemplateElement; + }()); + exports.TemplateElement = TemplateElement; + var TemplateLiteral = (function () { + function TemplateLiteral(quasis, expressions) { + this.type = syntax_1.Syntax.TemplateLiteral; + this.quasis = quasis; + this.expressions = expressions; + } + return TemplateLiteral; + }()); + exports.TemplateLiteral = TemplateLiteral; + var ThisExpression = (function () { + function ThisExpression() { + this.type = syntax_1.Syntax.ThisExpression; + } + return ThisExpression; + }()); + exports.ThisExpression = ThisExpression; + var ThrowStatement = (function () { + function ThrowStatement(argument) { + this.type = syntax_1.Syntax.ThrowStatement; + this.argument = argument; + } + return ThrowStatement; + }()); + exports.ThrowStatement = ThrowStatement; + var TryStatement = (function () { + function TryStatement(block, handler, finalizer) { + this.type = syntax_1.Syntax.TryStatement; + this.block = block; + this.handler = handler; + this.finalizer = finalizer; + } + return TryStatement; + }()); + exports.TryStatement = TryStatement; + var UnaryExpression = (function () { + function UnaryExpression(operator, argument) { + this.type = syntax_1.Syntax.UnaryExpression; + this.operator = operator; + this.argument = argument; + this.prefix = true; + } + return UnaryExpression; + }()); + exports.UnaryExpression = UnaryExpression; + var UpdateExpression = (function () { + function UpdateExpression(operator, argument, prefix) { + this.type = syntax_1.Syntax.UpdateExpression; + this.operator = operator; + this.argument = argument; + this.prefix = prefix; + } + return UpdateExpression; + }()); + exports.UpdateExpression = UpdateExpression; + var VariableDeclaration = (function () { + function VariableDeclaration(declarations, kind) { + this.type = syntax_1.Syntax.VariableDeclaration; + this.declarations = declarations; + this.kind = kind; + } + return VariableDeclaration; + }()); + exports.VariableDeclaration = VariableDeclaration; + var VariableDeclarator = (function () { + function VariableDeclarator(id, init) { + this.type = syntax_1.Syntax.VariableDeclarator; + this.id = id; + this.init = init; + } + return VariableDeclarator; + }()); + exports.VariableDeclarator = VariableDeclarator; + var WhileStatement = (function () { + function WhileStatement(test, body) { + this.type = syntax_1.Syntax.WhileStatement; + this.test = test; + this.body = body; + } + return WhileStatement; + }()); + exports.WhileStatement = WhileStatement; + var WithStatement = (function () { + function WithStatement(object, body) { + this.type = syntax_1.Syntax.WithStatement; + this.object = object; + this.body = body; + } + return WithStatement; + }()); + exports.WithStatement = WithStatement; + var YieldExpression = (function () { + function YieldExpression(argument, delegate) { + this.type = syntax_1.Syntax.YieldExpression; + this.argument = argument; + this.delegate = delegate; + } + return YieldExpression; + }()); + exports.YieldExpression = YieldExpression; + + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var assert_1 = __webpack_require__(9); + var error_handler_1 = __webpack_require__(10); + var messages_1 = __webpack_require__(11); + var Node = __webpack_require__(7); + var scanner_1 = __webpack_require__(12); + var syntax_1 = __webpack_require__(2); + var token_1 = __webpack_require__(13); + var ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder'; + var Parser = (function () { + function Parser(code, options, delegate) { + if (options === void 0) { options = {}; } + this.config = { + range: (typeof options.range === 'boolean') && options.range, + loc: (typeof options.loc === 'boolean') && options.loc, + source: null, + tokens: (typeof options.tokens === 'boolean') && options.tokens, + comment: (typeof options.comment === 'boolean') && options.comment, + tolerant: (typeof options.tolerant === 'boolean') && options.tolerant + }; + if (this.config.loc && options.source && options.source !== null) { + this.config.source = String(options.source); + } + this.delegate = delegate; + this.errorHandler = new error_handler_1.ErrorHandler(); + this.errorHandler.tolerant = this.config.tolerant; + this.scanner = new scanner_1.Scanner(code, this.errorHandler); + this.scanner.trackComment = this.config.comment; + this.operatorPrecedence = { + ')': 0, + ';': 0, + ',': 0, + '=': 0, + ']': 0, + '||': 1, + '&&': 2, + '|': 3, + '^': 4, + '&': 5, + '==': 6, + '!=': 6, + '===': 6, + '!==': 6, + '<': 7, + '>': 7, + '<=': 7, + '>=': 7, + '<<': 8, + '>>': 8, + '>>>': 8, + '+': 9, + '-': 9, + '*': 11, + '/': 11, + '%': 11 + }; + this.lookahead = { + type: 2 /* EOF */, + value: '', + lineNumber: this.scanner.lineNumber, + lineStart: 0, + start: 0, + end: 0 + }; + this.hasLineTerminator = false; + this.context = { + isModule: false, + await: false, + allowIn: true, + allowStrictDirective: true, + allowYield: true, + firstCoverInitializedNameError: null, + isAssignmentTarget: false, + isBindingElement: false, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + labelSet: {}, + strict: false + }; + this.tokens = []; + this.startMarker = { + index: 0, + line: this.scanner.lineNumber, + column: 0 + }; + this.lastMarker = { + index: 0, + line: this.scanner.lineNumber, + column: 0 + }; + this.nextToken(); + this.lastMarker = { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + } + Parser.prototype.throwError = function (messageFormat) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } + var args = Array.prototype.slice.call(arguments, 1); + var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) { + assert_1.assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + }); + var index = this.lastMarker.index; + var line = this.lastMarker.line; + var column = this.lastMarker.column + 1; + throw this.errorHandler.createError(index, line, column, msg); + }; + Parser.prototype.tolerateError = function (messageFormat) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } + var args = Array.prototype.slice.call(arguments, 1); + var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) { + assert_1.assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + }); + var index = this.lastMarker.index; + var line = this.scanner.lineNumber; + var column = this.lastMarker.column + 1; + this.errorHandler.tolerateError(index, line, column, msg); + }; + // Throw an exception because of the token. + Parser.prototype.unexpectedTokenError = function (token, message) { + var msg = message || messages_1.Messages.UnexpectedToken; + var value; + if (token) { + if (!message) { + msg = (token.type === 2 /* EOF */) ? messages_1.Messages.UnexpectedEOS : + (token.type === 3 /* Identifier */) ? messages_1.Messages.UnexpectedIdentifier : + (token.type === 6 /* NumericLiteral */) ? messages_1.Messages.UnexpectedNumber : + (token.type === 8 /* StringLiteral */) ? messages_1.Messages.UnexpectedString : + (token.type === 10 /* Template */) ? messages_1.Messages.UnexpectedTemplate : + messages_1.Messages.UnexpectedToken; + if (token.type === 4 /* Keyword */) { + if (this.scanner.isFutureReservedWord(token.value)) { + msg = messages_1.Messages.UnexpectedReserved; + } + else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) { + msg = messages_1.Messages.StrictReservedWord; + } + } + } + value = token.value; + } + else { + value = 'ILLEGAL'; + } + msg = msg.replace('%0', value); + if (token && typeof token.lineNumber === 'number') { + var index = token.start; + var line = token.lineNumber; + var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column; + var column = token.start - lastMarkerLineStart + 1; + return this.errorHandler.createError(index, line, column, msg); + } + else { + var index = this.lastMarker.index; + var line = this.lastMarker.line; + var column = this.lastMarker.column + 1; + return this.errorHandler.createError(index, line, column, msg); + } + }; + Parser.prototype.throwUnexpectedToken = function (token, message) { + throw this.unexpectedTokenError(token, message); + }; + Parser.prototype.tolerateUnexpectedToken = function (token, message) { + this.errorHandler.tolerate(this.unexpectedTokenError(token, message)); + }; + Parser.prototype.collectComments = function () { + if (!this.config.comment) { + this.scanner.scanComments(); + } + else { + var comments = this.scanner.scanComments(); + if (comments.length > 0 && this.delegate) { + for (var i = 0; i < comments.length; ++i) { + var e = comments[i]; + var node = void 0; + node = { + type: e.multiLine ? 'BlockComment' : 'LineComment', + value: this.scanner.source.slice(e.slice[0], e.slice[1]) + }; + if (this.config.range) { + node.range = e.range; + } + if (this.config.loc) { + node.loc = e.loc; + } + var metadata = { + start: { + line: e.loc.start.line, + column: e.loc.start.column, + offset: e.range[0] + }, + end: { + line: e.loc.end.line, + column: e.loc.end.column, + offset: e.range[1] + } + }; + this.delegate(node, metadata); + } + } + } + }; + // From internal representation to an external structure + Parser.prototype.getTokenRaw = function (token) { + return this.scanner.source.slice(token.start, token.end); + }; + Parser.prototype.convertToken = function (token) { + var t = { + type: token_1.TokenName[token.type], + value: this.getTokenRaw(token) + }; + if (this.config.range) { + t.range = [token.start, token.end]; + } + if (this.config.loc) { + t.loc = { + start: { + line: this.startMarker.line, + column: this.startMarker.column + }, + end: { + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + } + }; + } + if (token.type === 9 /* RegularExpression */) { + var pattern = token.pattern; + var flags = token.flags; + t.regex = { pattern: pattern, flags: flags }; + } + return t; + }; + Parser.prototype.nextToken = function () { + var token = this.lookahead; + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + this.collectComments(); + if (this.scanner.index !== this.startMarker.index) { + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + } + var next = this.scanner.lex(); + this.hasLineTerminator = (token.lineNumber !== next.lineNumber); + if (next && this.context.strict && next.type === 3 /* Identifier */) { + if (this.scanner.isStrictModeReservedWord(next.value)) { + next.type = 4 /* Keyword */; + } + } + this.lookahead = next; + if (this.config.tokens && next.type !== 2 /* EOF */) { + this.tokens.push(this.convertToken(next)); + } + return token; + }; + Parser.prototype.nextRegexToken = function () { + this.collectComments(); + var token = this.scanner.scanRegExp(); + if (this.config.tokens) { + // Pop the previous token, '/' or '/=' + // This is added from the lookahead token. + this.tokens.pop(); + this.tokens.push(this.convertToken(token)); + } + // Prime the next lookahead. + this.lookahead = token; + this.nextToken(); + return token; + }; + Parser.prototype.createNode = function () { + return { + index: this.startMarker.index, + line: this.startMarker.line, + column: this.startMarker.column + }; + }; + Parser.prototype.startNode = function (token) { + return { + index: token.start, + line: token.lineNumber, + column: token.start - token.lineStart + }; + }; + Parser.prototype.finalize = function (marker, node) { + if (this.config.range) { + node.range = [marker.index, this.lastMarker.index]; + } + if (this.config.loc) { + node.loc = { + start: { + line: marker.line, + column: marker.column, + }, + end: { + line: this.lastMarker.line, + column: this.lastMarker.column + } + }; + if (this.config.source) { + node.loc.source = this.config.source; + } + } + if (this.delegate) { + var metadata = { + start: { + line: marker.line, + column: marker.column, + offset: marker.index + }, + end: { + line: this.lastMarker.line, + column: this.lastMarker.column, + offset: this.lastMarker.index + } + }; + this.delegate(node, metadata); + } + return node; + }; + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + Parser.prototype.expect = function (value) { + var token = this.nextToken(); + if (token.type !== 7 /* Punctuator */ || token.value !== value) { + this.throwUnexpectedToken(token); + } + }; + // Quietly expect a comma when in tolerant mode, otherwise delegates to expect(). + Parser.prototype.expectCommaSeparator = function () { + if (this.config.tolerant) { + var token = this.lookahead; + if (token.type === 7 /* Punctuator */ && token.value === ',') { + this.nextToken(); + } + else if (token.type === 7 /* Punctuator */ && token.value === ';') { + this.nextToken(); + this.tolerateUnexpectedToken(token); + } + else { + this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken); + } + } + else { + this.expect(','); + } + }; + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + Parser.prototype.expectKeyword = function (keyword) { + var token = this.nextToken(); + if (token.type !== 4 /* Keyword */ || token.value !== keyword) { + this.throwUnexpectedToken(token); + } + }; + // Return true if the next token matches the specified punctuator. + Parser.prototype.match = function (value) { + return this.lookahead.type === 7 /* Punctuator */ && this.lookahead.value === value; + }; + // Return true if the next token matches the specified keyword + Parser.prototype.matchKeyword = function (keyword) { + return this.lookahead.type === 4 /* Keyword */ && this.lookahead.value === keyword; + }; + // Return true if the next token matches the specified contextual keyword + // (where an identifier is sometimes a keyword depending on the context) + Parser.prototype.matchContextualKeyword = function (keyword) { + return this.lookahead.type === 3 /* Identifier */ && this.lookahead.value === keyword; + }; + // Return true if the next token is an assignment operator + Parser.prototype.matchAssign = function () { + if (this.lookahead.type !== 7 /* Punctuator */) { + return false; + } + var op = this.lookahead.value; + return op === '=' || + op === '*=' || + op === '**=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + }; + // Cover grammar support. + // + // When an assignment expression position starts with an left parenthesis, the determination of the type + // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead) + // or the first comma. This situation also defers the determination of all the expressions nested in the pair. + // + // There are three productions that can be parsed in a parentheses pair that needs to be determined + // after the outermost pair is closed. They are: + // + // 1. AssignmentExpression + // 2. BindingElements + // 3. AssignmentTargets + // + // In order to avoid exponential backtracking, we use two flags to denote if the production can be + // binding element or assignment target. + // + // The three productions have the relationship: + // + // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression + // + // with a single exception that CoverInitializedName when used directly in an Expression, generates + // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the + // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair. + // + // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not + // effect the current flags. This means the production the parser parses is only used as an expression. Therefore + // the CoverInitializedName check is conducted. + // + // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates + // the flags outside of the parser. This means the production the parser parses is used as a part of a potential + // pattern. The CoverInitializedName check is deferred. + Parser.prototype.isolateCoverGrammar = function (parseFunction) { + var previousIsBindingElement = this.context.isBindingElement; + var previousIsAssignmentTarget = this.context.isAssignmentTarget; + var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; + this.context.isBindingElement = true; + this.context.isAssignmentTarget = true; + this.context.firstCoverInitializedNameError = null; + var result = parseFunction.call(this); + if (this.context.firstCoverInitializedNameError !== null) { + this.throwUnexpectedToken(this.context.firstCoverInitializedNameError); + } + this.context.isBindingElement = previousIsBindingElement; + this.context.isAssignmentTarget = previousIsAssignmentTarget; + this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError; + return result; + }; + Parser.prototype.inheritCoverGrammar = function (parseFunction) { + var previousIsBindingElement = this.context.isBindingElement; + var previousIsAssignmentTarget = this.context.isAssignmentTarget; + var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; + this.context.isBindingElement = true; + this.context.isAssignmentTarget = true; + this.context.firstCoverInitializedNameError = null; + var result = parseFunction.call(this); + this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement; + this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget; + this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError; + return result; + }; + Parser.prototype.consumeSemicolon = function () { + if (this.match(';')) { + this.nextToken(); + } + else if (!this.hasLineTerminator) { + if (this.lookahead.type !== 2 /* EOF */ && !this.match('}')) { + this.throwUnexpectedToken(this.lookahead); + } + this.lastMarker.index = this.startMarker.index; + this.lastMarker.line = this.startMarker.line; + this.lastMarker.column = this.startMarker.column; + } + }; + // https://tc39.github.io/ecma262/#sec-primary-expression + Parser.prototype.parsePrimaryExpression = function () { + var node = this.createNode(); + var expr; + var token, raw; + switch (this.lookahead.type) { + case 3 /* Identifier */: + if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') { + this.tolerateUnexpectedToken(this.lookahead); + } + expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value)); + break; + case 6 /* NumericLiteral */: + case 8 /* StringLiteral */: + if (this.context.strict && this.lookahead.octal) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(token.value, raw)); + break; + case 1 /* BooleanLiteral */: + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(token.value === 'true', raw)); + break; + case 5 /* NullLiteral */: + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(null, raw)); + break; + case 10 /* Template */: + expr = this.parseTemplateLiteral(); + break; + case 7 /* Punctuator */: + switch (this.lookahead.value) { + case '(': + this.context.isBindingElement = false; + expr = this.inheritCoverGrammar(this.parseGroupExpression); + break; + case '[': + expr = this.inheritCoverGrammar(this.parseArrayInitializer); + break; + case '{': + expr = this.inheritCoverGrammar(this.parseObjectInitializer); + break; + case '/': + case '/=': + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + this.scanner.index = this.startMarker.index; + token = this.nextRegexToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags)); + break; + default: + expr = this.throwUnexpectedToken(this.nextToken()); + } + break; + case 4 /* Keyword */: + if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) { + expr = this.parseIdentifierName(); + } + else if (!this.context.strict && this.matchKeyword('let')) { + expr = this.finalize(node, new Node.Identifier(this.nextToken().value)); + } + else { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + if (this.matchKeyword('function')) { + expr = this.parseFunctionExpression(); + } + else if (this.matchKeyword('this')) { + this.nextToken(); + expr = this.finalize(node, new Node.ThisExpression()); + } + else if (this.matchKeyword('class')) { + expr = this.parseClassExpression(); + } + else { + expr = this.throwUnexpectedToken(this.nextToken()); + } + } + break; + default: + expr = this.throwUnexpectedToken(this.nextToken()); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-array-initializer + Parser.prototype.parseSpreadElement = function () { + var node = this.createNode(); + this.expect('...'); + var arg = this.inheritCoverGrammar(this.parseAssignmentExpression); + return this.finalize(node, new Node.SpreadElement(arg)); + }; + Parser.prototype.parseArrayInitializer = function () { + var node = this.createNode(); + var elements = []; + this.expect('['); + while (!this.match(']')) { + if (this.match(',')) { + this.nextToken(); + elements.push(null); + } + else if (this.match('...')) { + var element = this.parseSpreadElement(); + if (!this.match(']')) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + this.expect(','); + } + elements.push(element); + } + else { + elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); + if (!this.match(']')) { + this.expect(','); + } + } + } + this.expect(']'); + return this.finalize(node, new Node.ArrayExpression(elements)); + }; + // https://tc39.github.io/ecma262/#sec-object-initializer + Parser.prototype.parsePropertyMethod = function (params) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = params.simple; + var body = this.isolateCoverGrammar(this.parseFunctionSourceElements); + if (this.context.strict && params.firstRestricted) { + this.tolerateUnexpectedToken(params.firstRestricted, params.message); + } + if (this.context.strict && params.stricted) { + this.tolerateUnexpectedToken(params.stricted, params.message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + return body; + }; + Parser.prototype.parsePropertyMethodFunction = function () { + var isGenerator = false; + var node = this.createNode(); + var previousAllowYield = this.context.allowYield; + this.context.allowYield = false; + var params = this.parseFormalParameters(); + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); + }; + Parser.prototype.parsePropertyMethodAsyncFunction = function () { + var node = this.createNode(); + var previousAllowYield = this.context.allowYield; + var previousAwait = this.context.await; + this.context.allowYield = false; + this.context.await = true; + var params = this.parseFormalParameters(); + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + this.context.await = previousAwait; + return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method)); + }; + Parser.prototype.parseObjectPropertyKey = function () { + var node = this.createNode(); + var token = this.nextToken(); + var key; + switch (token.type) { + case 8 /* StringLiteral */: + case 6 /* NumericLiteral */: + if (this.context.strict && token.octal) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral); + } + var raw = this.getTokenRaw(token); + key = this.finalize(node, new Node.Literal(token.value, raw)); + break; + case 3 /* Identifier */: + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 4 /* Keyword */: + key = this.finalize(node, new Node.Identifier(token.value)); + break; + case 7 /* Punctuator */: + if (token.value === '[') { + key = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.expect(']'); + } + else { + key = this.throwUnexpectedToken(token); + } + break; + default: + key = this.throwUnexpectedToken(token); + } + return key; + }; + Parser.prototype.isPropertyKey = function (key, value) { + return (key.type === syntax_1.Syntax.Identifier && key.name === value) || + (key.type === syntax_1.Syntax.Literal && key.value === value); + }; + Parser.prototype.parseObjectProperty = function (hasProto) { + var node = this.createNode(); + var token = this.lookahead; + var kind; + var key = null; + var value = null; + var computed = false; + var method = false; + var shorthand = false; + var isAsync = false; + if (token.type === 3 /* Identifier */) { + var id = token.value; + this.nextToken(); + computed = this.match('['); + isAsync = !this.hasLineTerminator && (id === 'async') && + !this.match(':') && !this.match('(') && !this.match('*'); + key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id)); + } + else if (this.match('*')) { + this.nextToken(); + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + } + var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); + if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'get' && lookaheadPropertyKey) { + kind = 'get'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.context.allowYield = false; + value = this.parseGetterMethod(); + } + else if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'set' && lookaheadPropertyKey) { + kind = 'set'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseSetterMethod(); + } + else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) { + kind = 'init'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseGeneratorMethod(); + method = true; + } + else { + if (!key) { + this.throwUnexpectedToken(this.lookahead); + } + kind = 'init'; + if (this.match(':') && !isAsync) { + if (!computed && this.isPropertyKey(key, '__proto__')) { + if (hasProto.value) { + this.tolerateError(messages_1.Messages.DuplicateProtoProperty); + } + hasProto.value = true; + } + this.nextToken(); + value = this.inheritCoverGrammar(this.parseAssignmentExpression); + } + else if (this.match('(')) { + value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); + method = true; + } + else if (token.type === 3 /* Identifier */) { + var id = this.finalize(node, new Node.Identifier(token.value)); + if (this.match('=')) { + this.context.firstCoverInitializedNameError = this.lookahead; + this.nextToken(); + shorthand = true; + var init = this.isolateCoverGrammar(this.parseAssignmentExpression); + value = this.finalize(node, new Node.AssignmentPattern(id, init)); + } + else { + shorthand = true; + value = id; + } + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + } + return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand)); + }; + Parser.prototype.parseObjectInitializer = function () { + var node = this.createNode(); + this.expect('{'); + var properties = []; + var hasProto = { value: false }; + while (!this.match('}')) { + properties.push(this.parseObjectProperty(hasProto)); + if (!this.match('}')) { + this.expectCommaSeparator(); + } + } + this.expect('}'); + return this.finalize(node, new Node.ObjectExpression(properties)); + }; + // https://tc39.github.io/ecma262/#sec-template-literals + Parser.prototype.parseTemplateHead = function () { + assert_1.assert(this.lookahead.head, 'Template literal must start with a template head'); + var node = this.createNode(); + var token = this.nextToken(); + var raw = token.value; + var cooked = token.cooked; + return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail)); + }; + Parser.prototype.parseTemplateElement = function () { + if (this.lookahead.type !== 10 /* Template */) { + this.throwUnexpectedToken(); + } + var node = this.createNode(); + var token = this.nextToken(); + var raw = token.value; + var cooked = token.cooked; + return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail)); + }; + Parser.prototype.parseTemplateLiteral = function () { + var node = this.createNode(); + var expressions = []; + var quasis = []; + var quasi = this.parseTemplateHead(); + quasis.push(quasi); + while (!quasi.tail) { + expressions.push(this.parseExpression()); + quasi = this.parseTemplateElement(); + quasis.push(quasi); + } + return this.finalize(node, new Node.TemplateLiteral(quasis, expressions)); + }; + // https://tc39.github.io/ecma262/#sec-grouping-operator + Parser.prototype.reinterpretExpressionAsPattern = function (expr) { + switch (expr.type) { + case syntax_1.Syntax.Identifier: + case syntax_1.Syntax.MemberExpression: + case syntax_1.Syntax.RestElement: + case syntax_1.Syntax.AssignmentPattern: + break; + case syntax_1.Syntax.SpreadElement: + expr.type = syntax_1.Syntax.RestElement; + this.reinterpretExpressionAsPattern(expr.argument); + break; + case syntax_1.Syntax.ArrayExpression: + expr.type = syntax_1.Syntax.ArrayPattern; + for (var i = 0; i < expr.elements.length; i++) { + if (expr.elements[i] !== null) { + this.reinterpretExpressionAsPattern(expr.elements[i]); + } + } + break; + case syntax_1.Syntax.ObjectExpression: + expr.type = syntax_1.Syntax.ObjectPattern; + for (var i = 0; i < expr.properties.length; i++) { + this.reinterpretExpressionAsPattern(expr.properties[i].value); + } + break; + case syntax_1.Syntax.AssignmentExpression: + expr.type = syntax_1.Syntax.AssignmentPattern; + delete expr.operator; + this.reinterpretExpressionAsPattern(expr.left); + break; + default: + // Allow other node type for tolerant parsing. + break; + } + }; + Parser.prototype.parseGroupExpression = function () { + var expr; + this.expect('('); + if (this.match(')')) { + this.nextToken(); + if (!this.match('=>')) { + this.expect('=>'); + } + expr = { + type: ArrowParameterPlaceHolder, + params: [], + async: false + }; + } + else { + var startToken = this.lookahead; + var params = []; + if (this.match('...')) { + expr = this.parseRestElement(params); + this.expect(')'); + if (!this.match('=>')) { + this.expect('=>'); + } + expr = { + type: ArrowParameterPlaceHolder, + params: [expr], + async: false + }; + } + else { + var arrow = false; + this.context.isBindingElement = true; + expr = this.inheritCoverGrammar(this.parseAssignmentExpression); + if (this.match(',')) { + var expressions = []; + this.context.isAssignmentTarget = false; + expressions.push(expr); + while (this.lookahead.type !== 2 /* EOF */) { + if (!this.match(',')) { + break; + } + this.nextToken(); + if (this.match(')')) { + this.nextToken(); + for (var i = 0; i < expressions.length; i++) { + this.reinterpretExpressionAsPattern(expressions[i]); + } + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: expressions, + async: false + }; + } + else if (this.match('...')) { + if (!this.context.isBindingElement) { + this.throwUnexpectedToken(this.lookahead); + } + expressions.push(this.parseRestElement(params)); + this.expect(')'); + if (!this.match('=>')) { + this.expect('=>'); + } + this.context.isBindingElement = false; + for (var i = 0; i < expressions.length; i++) { + this.reinterpretExpressionAsPattern(expressions[i]); + } + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: expressions, + async: false + }; + } + else { + expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); + } + if (arrow) { + break; + } + } + if (!arrow) { + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); + } + } + if (!arrow) { + this.expect(')'); + if (this.match('=>')) { + if (expr.type === syntax_1.Syntax.Identifier && expr.name === 'yield') { + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: [expr], + async: false + }; + } + if (!arrow) { + if (!this.context.isBindingElement) { + this.throwUnexpectedToken(this.lookahead); + } + if (expr.type === syntax_1.Syntax.SequenceExpression) { + for (var i = 0; i < expr.expressions.length; i++) { + this.reinterpretExpressionAsPattern(expr.expressions[i]); + } + } + else { + this.reinterpretExpressionAsPattern(expr); + } + var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]); + expr = { + type: ArrowParameterPlaceHolder, + params: parameters, + async: false + }; + } + } + this.context.isBindingElement = false; + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-left-hand-side-expressions + Parser.prototype.parseArguments = function () { + this.expect('('); + var args = []; + if (!this.match(')')) { + while (true) { + var expr = this.match('...') ? this.parseSpreadElement() : + this.isolateCoverGrammar(this.parseAssignmentExpression); + args.push(expr); + if (this.match(')')) { + break; + } + this.expectCommaSeparator(); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return args; + }; + Parser.prototype.isIdentifierName = function (token) { + return token.type === 3 /* Identifier */ || + token.type === 4 /* Keyword */ || + token.type === 1 /* BooleanLiteral */ || + token.type === 5 /* NullLiteral */; + }; + Parser.prototype.parseIdentifierName = function () { + var node = this.createNode(); + var token = this.nextToken(); + if (!this.isIdentifierName(token)) { + this.throwUnexpectedToken(token); + } + return this.finalize(node, new Node.Identifier(token.value)); + }; + Parser.prototype.parseNewExpression = function () { + var node = this.createNode(); + var id = this.parseIdentifierName(); + assert_1.assert(id.name === 'new', 'New expression must start with `new`'); + var expr; + if (this.match('.')) { + this.nextToken(); + if (this.lookahead.type === 3 /* Identifier */ && this.context.inFunctionBody && this.lookahead.value === 'target') { + var property = this.parseIdentifierName(); + expr = new Node.MetaProperty(id, property); + } + else { + this.throwUnexpectedToken(this.lookahead); + } + } + else { + var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression); + var args = this.match('(') ? this.parseArguments() : []; + expr = new Node.NewExpression(callee, args); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + return this.finalize(node, expr); + }; + Parser.prototype.parseAsyncArgument = function () { + var arg = this.parseAssignmentExpression(); + this.context.firstCoverInitializedNameError = null; + return arg; + }; + Parser.prototype.parseAsyncArguments = function () { + this.expect('('); + var args = []; + if (!this.match(')')) { + while (true) { + var expr = this.match('...') ? this.parseSpreadElement() : + this.isolateCoverGrammar(this.parseAsyncArgument); + args.push(expr); + if (this.match(')')) { + break; + } + this.expectCommaSeparator(); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return args; + }; + Parser.prototype.parseLeftHandSideExpressionAllowCall = function () { + var startToken = this.lookahead; + var maybeAsync = this.matchContextualKeyword('async'); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + var expr; + if (this.matchKeyword('super') && this.context.inFunctionBody) { + expr = this.createNode(); + this.nextToken(); + expr = this.finalize(expr, new Node.Super()); + if (!this.match('(') && !this.match('.') && !this.match('[')) { + this.throwUnexpectedToken(this.lookahead); + } + } + else { + expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); + } + while (true) { + if (this.match('.')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('.'); + var property = this.parseIdentifierName(); + expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property)); + } + else if (this.match('(')) { + var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber); + this.context.isBindingElement = false; + this.context.isAssignmentTarget = false; + var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments(); + expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args)); + if (asyncArrow && this.match('=>')) { + for (var i = 0; i < args.length; ++i) { + this.reinterpretExpressionAsPattern(args[i]); + } + expr = { + type: ArrowParameterPlaceHolder, + params: args, + async: true + }; + } + } + else if (this.match('[')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('['); + var property = this.isolateCoverGrammar(this.parseExpression); + this.expect(']'); + expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property)); + } + else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) { + var quasi = this.parseTemplateLiteral(); + expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi)); + } + else { + break; + } + } + this.context.allowIn = previousAllowIn; + return expr; + }; + Parser.prototype.parseSuper = function () { + var node = this.createNode(); + this.expectKeyword('super'); + if (!this.match('[') && !this.match('.')) { + this.throwUnexpectedToken(this.lookahead); + } + return this.finalize(node, new Node.Super()); + }; + Parser.prototype.parseLeftHandSideExpression = function () { + assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.'); + var node = this.startNode(this.lookahead); + var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() : + this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); + while (true) { + if (this.match('[')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('['); + var property = this.isolateCoverGrammar(this.parseExpression); + this.expect(']'); + expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property)); + } + else if (this.match('.')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('.'); + var property = this.parseIdentifierName(); + expr = this.finalize(node, new Node.StaticMemberExpression(expr, property)); + } + else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) { + var quasi = this.parseTemplateLiteral(); + expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi)); + } + else { + break; + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-update-expressions + Parser.prototype.parseUpdateExpression = function () { + var expr; + var startToken = this.lookahead; + if (this.match('++') || this.match('--')) { + var node = this.startNode(startToken); + var token = this.nextToken(); + expr = this.inheritCoverGrammar(this.parseUnaryExpression); + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { + this.tolerateError(messages_1.Messages.StrictLHSPrefix); + } + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + var prefix = true; + expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix)); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else { + expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + if (!this.hasLineTerminator && this.lookahead.type === 7 /* Punctuator */) { + if (this.match('++') || this.match('--')) { + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { + this.tolerateError(messages_1.Messages.StrictLHSPostfix); + } + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var operator = this.nextToken().value; + var prefix = false; + expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix)); + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-unary-operators + Parser.prototype.parseAwaitExpression = function () { + var node = this.createNode(); + this.nextToken(); + var argument = this.parseUnaryExpression(); + return this.finalize(node, new Node.AwaitExpression(argument)); + }; + Parser.prototype.parseUnaryExpression = function () { + var expr; + if (this.match('+') || this.match('-') || this.match('~') || this.match('!') || + this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) { + var node = this.startNode(this.lookahead); + var token = this.nextToken(); + expr = this.inheritCoverGrammar(this.parseUnaryExpression); + expr = this.finalize(node, new Node.UnaryExpression(token.value, expr)); + if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) { + this.tolerateError(messages_1.Messages.StrictDelete); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else if (this.context.await && this.matchContextualKeyword('await')) { + expr = this.parseAwaitExpression(); + } + else { + expr = this.parseUpdateExpression(); + } + return expr; + }; + Parser.prototype.parseExponentiationExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseUnaryExpression); + if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) { + this.nextToken(); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var left = expr; + var right = this.isolateCoverGrammar(this.parseExponentiationExpression); + expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right)); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-exp-operator + // https://tc39.github.io/ecma262/#sec-multiplicative-operators + // https://tc39.github.io/ecma262/#sec-additive-operators + // https://tc39.github.io/ecma262/#sec-bitwise-shift-operators + // https://tc39.github.io/ecma262/#sec-relational-operators + // https://tc39.github.io/ecma262/#sec-equality-operators + // https://tc39.github.io/ecma262/#sec-binary-bitwise-operators + // https://tc39.github.io/ecma262/#sec-binary-logical-operators + Parser.prototype.binaryPrecedence = function (token) { + var op = token.value; + var precedence; + if (token.type === 7 /* Punctuator */) { + precedence = this.operatorPrecedence[op] || 0; + } + else if (token.type === 4 /* Keyword */) { + precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0; + } + else { + precedence = 0; + } + return precedence; + }; + Parser.prototype.parseBinaryExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseExponentiationExpression); + var token = this.lookahead; + var prec = this.binaryPrecedence(token); + if (prec > 0) { + this.nextToken(); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var markers = [startToken, this.lookahead]; + var left = expr; + var right = this.isolateCoverGrammar(this.parseExponentiationExpression); + var stack = [left, token.value, right]; + var precedences = [prec]; + while (true) { + prec = this.binaryPrecedence(this.lookahead); + if (prec <= 0) { + break; + } + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) { + right = stack.pop(); + var operator = stack.pop(); + precedences.pop(); + left = stack.pop(); + markers.pop(); + var node = this.startNode(markers[markers.length - 1]); + stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right))); + } + // Shift. + stack.push(this.nextToken().value); + precedences.push(prec); + markers.push(this.lookahead); + stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression)); + } + // Final reduce to clean-up the stack. + var i = stack.length - 1; + expr = stack[i]; + markers.pop(); + while (i > 1) { + var node = this.startNode(markers.pop()); + var operator = stack[i - 1]; + expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr)); + i -= 2; + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-conditional-operator + Parser.prototype.parseConditionalExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseBinaryExpression); + if (this.match('?')) { + this.nextToken(); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.context.allowIn = previousAllowIn; + this.expect(':'); + var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression); + expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate)); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-assignment-operators + Parser.prototype.checkPatternParam = function (options, param) { + switch (param.type) { + case syntax_1.Syntax.Identifier: + this.validateParam(options, param, param.name); + break; + case syntax_1.Syntax.RestElement: + this.checkPatternParam(options, param.argument); + break; + case syntax_1.Syntax.AssignmentPattern: + this.checkPatternParam(options, param.left); + break; + case syntax_1.Syntax.ArrayPattern: + for (var i = 0; i < param.elements.length; i++) { + if (param.elements[i] !== null) { + this.checkPatternParam(options, param.elements[i]); + } + } + break; + case syntax_1.Syntax.ObjectPattern: + for (var i = 0; i < param.properties.length; i++) { + this.checkPatternParam(options, param.properties[i].value); + } + break; + default: + break; + } + options.simple = options.simple && (param instanceof Node.Identifier); + }; + Parser.prototype.reinterpretAsCoverFormalsList = function (expr) { + var params = [expr]; + var options; + var asyncArrow = false; + switch (expr.type) { + case syntax_1.Syntax.Identifier: + break; + case ArrowParameterPlaceHolder: + params = expr.params; + asyncArrow = expr.async; + break; + default: + return null; + } + options = { + simple: true, + paramSet: {} + }; + for (var i = 0; i < params.length; ++i) { + var param = params[i]; + if (param.type === syntax_1.Syntax.AssignmentPattern) { + if (param.right.type === syntax_1.Syntax.YieldExpression) { + if (param.right.argument) { + this.throwUnexpectedToken(this.lookahead); + } + param.right.type = syntax_1.Syntax.Identifier; + param.right.name = 'yield'; + delete param.right.argument; + delete param.right.delegate; + } + } + else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === 'await') { + this.throwUnexpectedToken(this.lookahead); + } + this.checkPatternParam(options, param); + params[i] = param; + } + if (this.context.strict || !this.context.allowYield) { + for (var i = 0; i < params.length; ++i) { + var param = params[i]; + if (param.type === syntax_1.Syntax.YieldExpression) { + this.throwUnexpectedToken(this.lookahead); + } + } + } + if (options.message === messages_1.Messages.StrictParamDupe) { + var token = this.context.strict ? options.stricted : options.firstRestricted; + this.throwUnexpectedToken(token, options.message); + } + return { + simple: options.simple, + params: params, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + }; + Parser.prototype.parseAssignmentExpression = function () { + var expr; + if (!this.context.allowYield && this.matchKeyword('yield')) { + expr = this.parseYieldExpression(); + } + else { + var startToken = this.lookahead; + var token = startToken; + expr = this.parseConditionalExpression(); + if (token.type === 3 /* Identifier */ && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') { + if (this.lookahead.type === 3 /* Identifier */ || this.matchKeyword('yield')) { + var arg = this.parsePrimaryExpression(); + this.reinterpretExpressionAsPattern(arg); + expr = { + type: ArrowParameterPlaceHolder, + params: [arg], + async: true + }; + } + } + if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) { + // https://tc39.github.io/ecma262/#sec-arrow-function-definitions + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var isAsync = expr.async; + var list = this.reinterpretAsCoverFormalsList(expr); + if (list) { + if (this.hasLineTerminator) { + this.tolerateUnexpectedToken(this.lookahead); + } + this.context.firstCoverInitializedNameError = null; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = list.simple; + var previousAllowYield = this.context.allowYield; + var previousAwait = this.context.await; + this.context.allowYield = true; + this.context.await = isAsync; + var node = this.startNode(startToken); + this.expect('=>'); + var body = void 0; + if (this.match('{')) { + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + body = this.parseFunctionSourceElements(); + this.context.allowIn = previousAllowIn; + } + else { + body = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + var expression = body.type !== syntax_1.Syntax.BlockStatement; + if (this.context.strict && list.firstRestricted) { + this.throwUnexpectedToken(list.firstRestricted, list.message); + } + if (this.context.strict && list.stricted) { + this.tolerateUnexpectedToken(list.stricted, list.message); + } + expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) : + this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression)); + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.allowYield = previousAllowYield; + this.context.await = previousAwait; + } + } + else { + if (this.matchAssign()) { + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) { + var id = expr; + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment); + } + if (this.scanner.isStrictModeReservedWord(id.name)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + } + if (!this.match('=')) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else { + this.reinterpretExpressionAsPattern(expr); + } + token = this.nextToken(); + var operator = token.value; + var right = this.isolateCoverGrammar(this.parseAssignmentExpression); + expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right)); + this.context.firstCoverInitializedNameError = null; + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-comma-operator + Parser.prototype.parseExpression = function () { + var startToken = this.lookahead; + var expr = this.isolateCoverGrammar(this.parseAssignmentExpression); + if (this.match(',')) { + var expressions = []; + expressions.push(expr); + while (this.lookahead.type !== 2 /* EOF */) { + if (!this.match(',')) { + break; + } + this.nextToken(); + expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); + } + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-block + Parser.prototype.parseStatementListItem = function () { + var statement; + this.context.isAssignmentTarget = true; + this.context.isBindingElement = true; + if (this.lookahead.type === 4 /* Keyword */) { + switch (this.lookahead.value) { + case 'export': + if (!this.context.isModule) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration); + } + statement = this.parseExportDeclaration(); + break; + case 'import': + if (!this.context.isModule) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration); + } + statement = this.parseImportDeclaration(); + break; + case 'const': + statement = this.parseLexicalDeclaration({ inFor: false }); + break; + case 'function': + statement = this.parseFunctionDeclaration(); + break; + case 'class': + statement = this.parseClassDeclaration(); + break; + case 'let': + statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement(); + break; + default: + statement = this.parseStatement(); + break; + } + } + else { + statement = this.parseStatement(); + } + return statement; + }; + Parser.prototype.parseBlock = function () { + var node = this.createNode(); + this.expect('{'); + var block = []; + while (true) { + if (this.match('}')) { + break; + } + block.push(this.parseStatementListItem()); + } + this.expect('}'); + return this.finalize(node, new Node.BlockStatement(block)); + }; + // https://tc39.github.io/ecma262/#sec-let-and-const-declarations + Parser.prototype.parseLexicalBinding = function (kind, options) { + var node = this.createNode(); + var params = []; + var id = this.parsePattern(params, kind); + if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateError(messages_1.Messages.StrictVarName); + } + } + var init = null; + if (kind === 'const') { + if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) { + if (this.match('=')) { + this.nextToken(); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + else { + this.throwError(messages_1.Messages.DeclarationMissingInitializer, 'const'); + } + } + } + else if ((!options.inFor && id.type !== syntax_1.Syntax.Identifier) || this.match('=')) { + this.expect('='); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + return this.finalize(node, new Node.VariableDeclarator(id, init)); + }; + Parser.prototype.parseBindingList = function (kind, options) { + var list = [this.parseLexicalBinding(kind, options)]; + while (this.match(',')) { + this.nextToken(); + list.push(this.parseLexicalBinding(kind, options)); + } + return list; + }; + Parser.prototype.isLexicalDeclaration = function () { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.scanner.lex(); + this.scanner.restoreState(state); + return (next.type === 3 /* Identifier */) || + (next.type === 7 /* Punctuator */ && next.value === '[') || + (next.type === 7 /* Punctuator */ && next.value === '{') || + (next.type === 4 /* Keyword */ && next.value === 'let') || + (next.type === 4 /* Keyword */ && next.value === 'yield'); + }; + Parser.prototype.parseLexicalDeclaration = function (options) { + var node = this.createNode(); + var kind = this.nextToken().value; + assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const'); + var declarations = this.parseBindingList(kind, options); + this.consumeSemicolon(); + return this.finalize(node, new Node.VariableDeclaration(declarations, kind)); + }; + // https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns + Parser.prototype.parseBindingRestElement = function (params, kind) { + var node = this.createNode(); + this.expect('...'); + var arg = this.parsePattern(params, kind); + return this.finalize(node, new Node.RestElement(arg)); + }; + Parser.prototype.parseArrayPattern = function (params, kind) { + var node = this.createNode(); + this.expect('['); + var elements = []; + while (!this.match(']')) { + if (this.match(',')) { + this.nextToken(); + elements.push(null); + } + else { + if (this.match('...')) { + elements.push(this.parseBindingRestElement(params, kind)); + break; + } + else { + elements.push(this.parsePatternWithDefault(params, kind)); + } + if (!this.match(']')) { + this.expect(','); + } + } + } + this.expect(']'); + return this.finalize(node, new Node.ArrayPattern(elements)); + }; + Parser.prototype.parsePropertyPattern = function (params, kind) { + var node = this.createNode(); + var computed = false; + var shorthand = false; + var method = false; + var key; + var value; + if (this.lookahead.type === 3 /* Identifier */) { + var keyToken = this.lookahead; + key = this.parseVariableIdentifier(); + var init = this.finalize(node, new Node.Identifier(keyToken.value)); + if (this.match('=')) { + params.push(keyToken); + shorthand = true; + this.nextToken(); + var expr = this.parseAssignmentExpression(); + value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr)); + } + else if (!this.match(':')) { + params.push(keyToken); + shorthand = true; + value = init; + } + else { + this.expect(':'); + value = this.parsePatternWithDefault(params, kind); + } + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.expect(':'); + value = this.parsePatternWithDefault(params, kind); + } + return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand)); + }; + Parser.prototype.parseObjectPattern = function (params, kind) { + var node = this.createNode(); + var properties = []; + this.expect('{'); + while (!this.match('}')) { + properties.push(this.parsePropertyPattern(params, kind)); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + return this.finalize(node, new Node.ObjectPattern(properties)); + }; + Parser.prototype.parsePattern = function (params, kind) { + var pattern; + if (this.match('[')) { + pattern = this.parseArrayPattern(params, kind); + } + else if (this.match('{')) { + pattern = this.parseObjectPattern(params, kind); + } + else { + if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding); + } + params.push(this.lookahead); + pattern = this.parseVariableIdentifier(kind); + } + return pattern; + }; + Parser.prototype.parsePatternWithDefault = function (params, kind) { + var startToken = this.lookahead; + var pattern = this.parsePattern(params, kind); + if (this.match('=')) { + this.nextToken(); + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var right = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.context.allowYield = previousAllowYield; + pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right)); + } + return pattern; + }; + // https://tc39.github.io/ecma262/#sec-variable-statement + Parser.prototype.parseVariableIdentifier = function (kind) { + var node = this.createNode(); + var token = this.nextToken(); + if (token.type === 4 /* Keyword */ && token.value === 'yield') { + if (this.context.strict) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + else if (!this.context.allowYield) { + this.throwUnexpectedToken(token); + } + } + else if (token.type !== 3 /* Identifier */) { + if (this.context.strict && token.type === 4 /* Keyword */ && this.scanner.isStrictModeReservedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + else { + if (this.context.strict || token.value !== 'let' || kind !== 'var') { + this.throwUnexpectedToken(token); + } + } + } + else if ((this.context.isModule || this.context.await) && token.type === 3 /* Identifier */ && token.value === 'await') { + this.tolerateUnexpectedToken(token); + } + return this.finalize(node, new Node.Identifier(token.value)); + }; + Parser.prototype.parseVariableDeclaration = function (options) { + var node = this.createNode(); + var params = []; + var id = this.parsePattern(params, 'var'); + if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateError(messages_1.Messages.StrictVarName); + } + } + var init = null; + if (this.match('=')) { + this.nextToken(); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) { + this.expect('='); + } + return this.finalize(node, new Node.VariableDeclarator(id, init)); + }; + Parser.prototype.parseVariableDeclarationList = function (options) { + var opt = { inFor: options.inFor }; + var list = []; + list.push(this.parseVariableDeclaration(opt)); + while (this.match(',')) { + this.nextToken(); + list.push(this.parseVariableDeclaration(opt)); + } + return list; + }; + Parser.prototype.parseVariableStatement = function () { + var node = this.createNode(); + this.expectKeyword('var'); + var declarations = this.parseVariableDeclarationList({ inFor: false }); + this.consumeSemicolon(); + return this.finalize(node, new Node.VariableDeclaration(declarations, 'var')); + }; + // https://tc39.github.io/ecma262/#sec-empty-statement + Parser.prototype.parseEmptyStatement = function () { + var node = this.createNode(); + this.expect(';'); + return this.finalize(node, new Node.EmptyStatement()); + }; + // https://tc39.github.io/ecma262/#sec-expression-statement + Parser.prototype.parseExpressionStatement = function () { + var node = this.createNode(); + var expr = this.parseExpression(); + this.consumeSemicolon(); + return this.finalize(node, new Node.ExpressionStatement(expr)); + }; + // https://tc39.github.io/ecma262/#sec-if-statement + Parser.prototype.parseIfClause = function () { + if (this.context.strict && this.matchKeyword('function')) { + this.tolerateError(messages_1.Messages.StrictFunction); + } + return this.parseStatement(); + }; + Parser.prototype.parseIfStatement = function () { + var node = this.createNode(); + var consequent; + var alternate = null; + this.expectKeyword('if'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + consequent = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + consequent = this.parseIfClause(); + if (this.matchKeyword('else')) { + this.nextToken(); + alternate = this.parseIfClause(); + } + } + return this.finalize(node, new Node.IfStatement(test, consequent, alternate)); + }; + // https://tc39.github.io/ecma262/#sec-do-while-statement + Parser.prototype.parseDoWhileStatement = function () { + var node = this.createNode(); + this.expectKeyword('do'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + var body = this.parseStatement(); + this.context.inIteration = previousInIteration; + this.expectKeyword('while'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + } + else { + this.expect(')'); + if (this.match(';')) { + this.nextToken(); + } + } + return this.finalize(node, new Node.DoWhileStatement(body, test)); + }; + // https://tc39.github.io/ecma262/#sec-while-statement + Parser.prototype.parseWhileStatement = function () { + var node = this.createNode(); + var body; + this.expectKeyword('while'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + body = this.parseStatement(); + this.context.inIteration = previousInIteration; + } + return this.finalize(node, new Node.WhileStatement(test, body)); + }; + // https://tc39.github.io/ecma262/#sec-for-statement + // https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements + Parser.prototype.parseForStatement = function () { + var init = null; + var test = null; + var update = null; + var forIn = true; + var left, right; + var node = this.createNode(); + this.expectKeyword('for'); + this.expect('('); + if (this.match(';')) { + this.nextToken(); + } + else { + if (this.matchKeyword('var')) { + init = this.createNode(); + this.nextToken(); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + var declarations = this.parseVariableDeclarationList({ inFor: true }); + this.context.allowIn = previousAllowIn; + if (declarations.length === 1 && this.matchKeyword('in')) { + var decl = declarations[0]; + if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) { + this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in'); + } + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.nextToken(); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.expect(';'); + } + } + else if (this.matchKeyword('const') || this.matchKeyword('let')) { + init = this.createNode(); + var kind = this.nextToken().value; + if (!this.context.strict && this.lookahead.value === 'in') { + init = this.finalize(init, new Node.Identifier(kind)); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else { + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + var declarations = this.parseBindingList(kind, { inFor: true }); + this.context.allowIn = previousAllowIn; + if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + this.nextToken(); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + this.consumeSemicolon(); + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + } + } + } + else { + var initStartToken = this.lookahead; + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + init = this.inheritCoverGrammar(this.parseAssignmentExpression); + this.context.allowIn = previousAllowIn; + if (this.matchKeyword('in')) { + if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) { + this.tolerateError(messages_1.Messages.InvalidLHSInForIn); + } + this.nextToken(); + this.reinterpretExpressionAsPattern(init); + left = init; + right = this.parseExpression(); + init = null; + } + else if (this.matchContextualKeyword('of')) { + if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) { + this.tolerateError(messages_1.Messages.InvalidLHSInForLoop); + } + this.nextToken(); + this.reinterpretExpressionAsPattern(init); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + if (this.match(',')) { + var initSeq = [init]; + while (this.match(',')) { + this.nextToken(); + initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); + } + init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq)); + } + this.expect(';'); + } + } + } + if (typeof left === 'undefined') { + if (!this.match(';')) { + test = this.parseExpression(); + } + this.expect(';'); + if (!this.match(')')) { + update = this.parseExpression(); + } + } + var body; + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + body = this.isolateCoverGrammar(this.parseStatement); + this.context.inIteration = previousInIteration; + } + return (typeof left === 'undefined') ? + this.finalize(node, new Node.ForStatement(init, test, update, body)) : + forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : + this.finalize(node, new Node.ForOfStatement(left, right, body)); + }; + // https://tc39.github.io/ecma262/#sec-continue-statement + Parser.prototype.parseContinueStatement = function () { + var node = this.createNode(); + this.expectKeyword('continue'); + var label = null; + if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) { + var id = this.parseVariableIdentifier(); + label = id; + var key = '$' + id.name; + if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.UnknownLabel, id.name); + } + } + this.consumeSemicolon(); + if (label === null && !this.context.inIteration) { + this.throwError(messages_1.Messages.IllegalContinue); + } + return this.finalize(node, new Node.ContinueStatement(label)); + }; + // https://tc39.github.io/ecma262/#sec-break-statement + Parser.prototype.parseBreakStatement = function () { + var node = this.createNode(); + this.expectKeyword('break'); + var label = null; + if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) { + var id = this.parseVariableIdentifier(); + var key = '$' + id.name; + if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.UnknownLabel, id.name); + } + label = id; + } + this.consumeSemicolon(); + if (label === null && !this.context.inIteration && !this.context.inSwitch) { + this.throwError(messages_1.Messages.IllegalBreak); + } + return this.finalize(node, new Node.BreakStatement(label)); + }; + // https://tc39.github.io/ecma262/#sec-return-statement + Parser.prototype.parseReturnStatement = function () { + if (!this.context.inFunctionBody) { + this.tolerateError(messages_1.Messages.IllegalReturn); + } + var node = this.createNode(); + this.expectKeyword('return'); + var hasArgument = !this.match(';') && !this.match('}') && + !this.hasLineTerminator && this.lookahead.type !== 2 /* EOF */; + var argument = hasArgument ? this.parseExpression() : null; + this.consumeSemicolon(); + return this.finalize(node, new Node.ReturnStatement(argument)); + }; + // https://tc39.github.io/ecma262/#sec-with-statement + Parser.prototype.parseWithStatement = function () { + if (this.context.strict) { + this.tolerateError(messages_1.Messages.StrictModeWith); + } + var node = this.createNode(); + var body; + this.expectKeyword('with'); + this.expect('('); + var object = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + body = this.parseStatement(); + } + return this.finalize(node, new Node.WithStatement(object, body)); + }; + // https://tc39.github.io/ecma262/#sec-switch-statement + Parser.prototype.parseSwitchCase = function () { + var node = this.createNode(); + var test; + if (this.matchKeyword('default')) { + this.nextToken(); + test = null; + } + else { + this.expectKeyword('case'); + test = this.parseExpression(); + } + this.expect(':'); + var consequent = []; + while (true) { + if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) { + break; + } + consequent.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.SwitchCase(test, consequent)); + }; + Parser.prototype.parseSwitchStatement = function () { + var node = this.createNode(); + this.expectKeyword('switch'); + this.expect('('); + var discriminant = this.parseExpression(); + this.expect(')'); + var previousInSwitch = this.context.inSwitch; + this.context.inSwitch = true; + var cases = []; + var defaultFound = false; + this.expect('{'); + while (true) { + if (this.match('}')) { + break; + } + var clause = this.parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + this.throwError(messages_1.Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + this.expect('}'); + this.context.inSwitch = previousInSwitch; + return this.finalize(node, new Node.SwitchStatement(discriminant, cases)); + }; + // https://tc39.github.io/ecma262/#sec-labelled-statements + Parser.prototype.parseLabelledStatement = function () { + var node = this.createNode(); + var expr = this.parseExpression(); + var statement; + if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) { + this.nextToken(); + var id = expr; + var key = '$' + id.name; + if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name); + } + this.context.labelSet[key] = true; + var body = void 0; + if (this.matchKeyword('class')) { + this.tolerateUnexpectedToken(this.lookahead); + body = this.parseClassDeclaration(); + } + else if (this.matchKeyword('function')) { + var token = this.lookahead; + var declaration = this.parseFunctionDeclaration(); + if (this.context.strict) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction); + } + else if (declaration.generator) { + this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext); + } + body = declaration; + } + else { + body = this.parseStatement(); + } + delete this.context.labelSet[key]; + statement = new Node.LabeledStatement(id, body); + } + else { + this.consumeSemicolon(); + statement = new Node.ExpressionStatement(expr); + } + return this.finalize(node, statement); + }; + // https://tc39.github.io/ecma262/#sec-throw-statement + Parser.prototype.parseThrowStatement = function () { + var node = this.createNode(); + this.expectKeyword('throw'); + if (this.hasLineTerminator) { + this.throwError(messages_1.Messages.NewlineAfterThrow); + } + var argument = this.parseExpression(); + this.consumeSemicolon(); + return this.finalize(node, new Node.ThrowStatement(argument)); + }; + // https://tc39.github.io/ecma262/#sec-try-statement + Parser.prototype.parseCatchClause = function () { + var node = this.createNode(); + this.expectKeyword('catch'); + this.expect('('); + if (this.match(')')) { + this.throwUnexpectedToken(this.lookahead); + } + var params = []; + var param = this.parsePattern(params); + var paramMap = {}; + for (var i = 0; i < params.length; i++) { + var key = '$' + params[i].value; + if (Object.prototype.hasOwnProperty.call(paramMap, key)) { + this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value); + } + paramMap[key] = true; + } + if (this.context.strict && param.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(param.name)) { + this.tolerateError(messages_1.Messages.StrictCatchVariable); + } + } + this.expect(')'); + var body = this.parseBlock(); + return this.finalize(node, new Node.CatchClause(param, body)); + }; + Parser.prototype.parseFinallyClause = function () { + this.expectKeyword('finally'); + return this.parseBlock(); + }; + Parser.prototype.parseTryStatement = function () { + var node = this.createNode(); + this.expectKeyword('try'); + var block = this.parseBlock(); + var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null; + var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null; + if (!handler && !finalizer) { + this.throwError(messages_1.Messages.NoCatchOrFinally); + } + return this.finalize(node, new Node.TryStatement(block, handler, finalizer)); + }; + // https://tc39.github.io/ecma262/#sec-debugger-statement + Parser.prototype.parseDebuggerStatement = function () { + var node = this.createNode(); + this.expectKeyword('debugger'); + this.consumeSemicolon(); + return this.finalize(node, new Node.DebuggerStatement()); + }; + // https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations + Parser.prototype.parseStatement = function () { + var statement; + switch (this.lookahead.type) { + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 6 /* NumericLiteral */: + case 8 /* StringLiteral */: + case 10 /* Template */: + case 9 /* RegularExpression */: + statement = this.parseExpressionStatement(); + break; + case 7 /* Punctuator */: + var value = this.lookahead.value; + if (value === '{') { + statement = this.parseBlock(); + } + else if (value === '(') { + statement = this.parseExpressionStatement(); + } + else if (value === ';') { + statement = this.parseEmptyStatement(); + } + else { + statement = this.parseExpressionStatement(); + } + break; + case 3 /* Identifier */: + statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement(); + break; + case 4 /* Keyword */: + switch (this.lookahead.value) { + case 'break': + statement = this.parseBreakStatement(); + break; + case 'continue': + statement = this.parseContinueStatement(); + break; + case 'debugger': + statement = this.parseDebuggerStatement(); + break; + case 'do': + statement = this.parseDoWhileStatement(); + break; + case 'for': + statement = this.parseForStatement(); + break; + case 'function': + statement = this.parseFunctionDeclaration(); + break; + case 'if': + statement = this.parseIfStatement(); + break; + case 'return': + statement = this.parseReturnStatement(); + break; + case 'switch': + statement = this.parseSwitchStatement(); + break; + case 'throw': + statement = this.parseThrowStatement(); + break; + case 'try': + statement = this.parseTryStatement(); + break; + case 'var': + statement = this.parseVariableStatement(); + break; + case 'while': + statement = this.parseWhileStatement(); + break; + case 'with': + statement = this.parseWithStatement(); + break; + default: + statement = this.parseExpressionStatement(); + break; + } + break; + default: + statement = this.throwUnexpectedToken(this.lookahead); + } + return statement; + }; + // https://tc39.github.io/ecma262/#sec-function-definitions + Parser.prototype.parseFunctionSourceElements = function () { + var node = this.createNode(); + this.expect('{'); + var body = this.parseDirectivePrologues(); + var previousLabelSet = this.context.labelSet; + var previousInIteration = this.context.inIteration; + var previousInSwitch = this.context.inSwitch; + var previousInFunctionBody = this.context.inFunctionBody; + this.context.labelSet = {}; + this.context.inIteration = false; + this.context.inSwitch = false; + this.context.inFunctionBody = true; + while (this.lookahead.type !== 2 /* EOF */) { + if (this.match('}')) { + break; + } + body.push(this.parseStatementListItem()); + } + this.expect('}'); + this.context.labelSet = previousLabelSet; + this.context.inIteration = previousInIteration; + this.context.inSwitch = previousInSwitch; + this.context.inFunctionBody = previousInFunctionBody; + return this.finalize(node, new Node.BlockStatement(body)); + }; + Parser.prototype.validateParam = function (options, param, name) { + var key = '$' + name; + if (this.context.strict) { + if (this.scanner.isRestrictedWord(name)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamDupe; + } + } + else if (!options.firstRestricted) { + if (this.scanner.isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = messages_1.Messages.StrictParamName; + } + else if (this.scanner.isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = messages_1.Messages.StrictReservedWord; + } + else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamDupe; + } + } + /* istanbul ignore next */ + if (typeof Object.defineProperty === 'function') { + Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true }); + } + else { + options.paramSet[key] = true; + } + }; + Parser.prototype.parseRestElement = function (params) { + var node = this.createNode(); + this.expect('...'); + var arg = this.parsePattern(params); + if (this.match('=')) { + this.throwError(messages_1.Messages.DefaultRestParameter); + } + if (!this.match(')')) { + this.throwError(messages_1.Messages.ParameterAfterRestParameter); + } + return this.finalize(node, new Node.RestElement(arg)); + }; + Parser.prototype.parseFormalParameter = function (options) { + var params = []; + var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params); + for (var i = 0; i < params.length; i++) { + this.validateParam(options, params[i], params[i].value); + } + options.simple = options.simple && (param instanceof Node.Identifier); + options.params.push(param); + }; + Parser.prototype.parseFormalParameters = function (firstRestricted) { + var options; + options = { + simple: true, + params: [], + firstRestricted: firstRestricted + }; + this.expect('('); + if (!this.match(')')) { + options.paramSet = {}; + while (this.lookahead.type !== 2 /* EOF */) { + this.parseFormalParameter(options); + if (this.match(')')) { + break; + } + this.expect(','); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return { + simple: options.simple, + params: options.params, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + }; + Parser.prototype.matchAsyncFunction = function () { + var match = this.matchContextualKeyword('async'); + if (match) { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.scanner.lex(); + this.scanner.restoreState(state); + match = (state.lineNumber === next.lineNumber) && (next.type === 4 /* Keyword */) && (next.value === 'function'); + } + return match; + }; + Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) { + var node = this.createNode(); + var isAsync = this.matchContextualKeyword('async'); + if (isAsync) { + this.nextToken(); + } + this.expectKeyword('function'); + var isGenerator = isAsync ? false : this.match('*'); + if (isGenerator) { + this.nextToken(); + } + var message; + var id = null; + var firstRestricted = null; + if (!identifierIsOptional || !this.match('(')) { + var token = this.lookahead; + id = this.parseVariableIdentifier(); + if (this.context.strict) { + if (this.scanner.isRestrictedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); + } + } + else { + if (this.scanner.isRestrictedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictFunctionName; + } + else if (this.scanner.isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictReservedWord; + } + } + } + var previousAllowAwait = this.context.await; + var previousAllowYield = this.context.allowYield; + this.context.await = isAsync; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(firstRestricted); + var params = formalParameters.params; + var stricted = formalParameters.stricted; + firstRestricted = formalParameters.firstRestricted; + if (formalParameters.message) { + message = formalParameters.message; + } + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = formalParameters.simple; + var body = this.parseFunctionSourceElements(); + if (this.context.strict && firstRestricted) { + this.throwUnexpectedToken(firstRestricted, message); + } + if (this.context.strict && stricted) { + this.tolerateUnexpectedToken(stricted, message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.await = previousAllowAwait; + this.context.allowYield = previousAllowYield; + return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) : + this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator)); + }; + Parser.prototype.parseFunctionExpression = function () { + var node = this.createNode(); + var isAsync = this.matchContextualKeyword('async'); + if (isAsync) { + this.nextToken(); + } + this.expectKeyword('function'); + var isGenerator = isAsync ? false : this.match('*'); + if (isGenerator) { + this.nextToken(); + } + var message; + var id = null; + var firstRestricted; + var previousAllowAwait = this.context.await; + var previousAllowYield = this.context.allowYield; + this.context.await = isAsync; + this.context.allowYield = !isGenerator; + if (!this.match('(')) { + var token = this.lookahead; + id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier(); + if (this.context.strict) { + if (this.scanner.isRestrictedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); + } + } + else { + if (this.scanner.isRestrictedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictFunctionName; + } + else if (this.scanner.isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictReservedWord; + } + } + } + var formalParameters = this.parseFormalParameters(firstRestricted); + var params = formalParameters.params; + var stricted = formalParameters.stricted; + firstRestricted = formalParameters.firstRestricted; + if (formalParameters.message) { + message = formalParameters.message; + } + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = formalParameters.simple; + var body = this.parseFunctionSourceElements(); + if (this.context.strict && firstRestricted) { + this.throwUnexpectedToken(firstRestricted, message); + } + if (this.context.strict && stricted) { + this.tolerateUnexpectedToken(stricted, message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.await = previousAllowAwait; + this.context.allowYield = previousAllowYield; + return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) : + this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator)); + }; + // https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive + Parser.prototype.parseDirective = function () { + var token = this.lookahead; + var node = this.createNode(); + var expr = this.parseExpression(); + var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null; + this.consumeSemicolon(); + return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr)); + }; + Parser.prototype.parseDirectivePrologues = function () { + var firstRestricted = null; + var body = []; + while (true) { + var token = this.lookahead; + if (token.type !== 8 /* StringLiteral */) { + break; + } + var statement = this.parseDirective(); + body.push(statement); + var directive = statement.directive; + if (typeof directive !== 'string') { + break; + } + if (directive === 'use strict') { + this.context.strict = true; + if (firstRestricted) { + this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral); + } + if (!this.context.allowStrictDirective) { + this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective); + } + } + else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + return body; + }; + // https://tc39.github.io/ecma262/#sec-method-definitions + Parser.prototype.qualifiedPropertyName = function (token) { + switch (token.type) { + case 3 /* Identifier */: + case 8 /* StringLiteral */: + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 6 /* NumericLiteral */: + case 4 /* Keyword */: + return true; + case 7 /* Punctuator */: + return token.value === '['; + default: + break; + } + return false; + }; + Parser.prototype.parseGetterMethod = function () { + var node = this.createNode(); + var isGenerator = false; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = false; + var formalParameters = this.parseFormalParameters(); + if (formalParameters.params.length > 0) { + this.tolerateError(messages_1.Messages.BadGetterArity); + } + var method = this.parsePropertyMethod(formalParameters); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); + }; + Parser.prototype.parseSetterMethod = function () { + var node = this.createNode(); + var isGenerator = false; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = false; + var formalParameters = this.parseFormalParameters(); + if (formalParameters.params.length !== 1) { + this.tolerateError(messages_1.Messages.BadSetterArity); + } + else if (formalParameters.params[0] instanceof Node.RestElement) { + this.tolerateError(messages_1.Messages.BadSetterRestParameter); + } + var method = this.parsePropertyMethod(formalParameters); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); + }; + Parser.prototype.parseGeneratorMethod = function () { + var node = this.createNode(); + var isGenerator = true; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var params = this.parseFormalParameters(); + this.context.allowYield = false; + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); + }; + // https://tc39.github.io/ecma262/#sec-generator-function-definitions + Parser.prototype.isStartOfExpression = function () { + var start = true; + var value = this.lookahead.value; + switch (this.lookahead.type) { + case 7 /* Punctuator */: + start = (value === '[') || (value === '(') || (value === '{') || + (value === '+') || (value === '-') || + (value === '!') || (value === '~') || + (value === '++') || (value === '--') || + (value === '/') || (value === '/='); // regular expression literal + break; + case 4 /* Keyword */: + start = (value === 'class') || (value === 'delete') || + (value === 'function') || (value === 'let') || (value === 'new') || + (value === 'super') || (value === 'this') || (value === 'typeof') || + (value === 'void') || (value === 'yield'); + break; + default: + break; + } + return start; + }; + Parser.prototype.parseYieldExpression = function () { + var node = this.createNode(); + this.expectKeyword('yield'); + var argument = null; + var delegate = false; + if (!this.hasLineTerminator) { + var previousAllowYield = this.context.allowYield; + this.context.allowYield = false; + delegate = this.match('*'); + if (delegate) { + this.nextToken(); + argument = this.parseAssignmentExpression(); + } + else if (this.isStartOfExpression()) { + argument = this.parseAssignmentExpression(); + } + this.context.allowYield = previousAllowYield; + } + return this.finalize(node, new Node.YieldExpression(argument, delegate)); + }; + // https://tc39.github.io/ecma262/#sec-class-definitions + Parser.prototype.parseClassElement = function (hasConstructor) { + var token = this.lookahead; + var node = this.createNode(); + var kind = ''; + var key = null; + var value = null; + var computed = false; + var method = false; + var isStatic = false; + var isAsync = false; + if (this.match('*')) { + this.nextToken(); + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + var id = key; + if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) { + token = this.lookahead; + isStatic = true; + computed = this.match('['); + if (this.match('*')) { + this.nextToken(); + } + else { + key = this.parseObjectPropertyKey(); + } + } + if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) { + var punctuator = this.lookahead.value; + if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') { + isAsync = true; + token = this.lookahead; + key = this.parseObjectPropertyKey(); + if (token.type === 3 /* Identifier */) { + if (token.value === 'get' || token.value === 'set') { + this.tolerateUnexpectedToken(token); + } + else if (token.value === 'constructor') { + this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync); + } + } + } + } + } + var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); + if (token.type === 3 /* Identifier */) { + if (token.value === 'get' && lookaheadPropertyKey) { + kind = 'get'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.context.allowYield = false; + value = this.parseGetterMethod(); + } + else if (token.value === 'set' && lookaheadPropertyKey) { + kind = 'set'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseSetterMethod(); + } + } + else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) { + kind = 'init'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseGeneratorMethod(); + method = true; + } + if (!kind && key && this.match('(')) { + kind = 'init'; + value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); + method = true; + } + if (!kind) { + this.throwUnexpectedToken(this.lookahead); + } + if (kind === 'init') { + kind = 'method'; + } + if (!computed) { + if (isStatic && this.isPropertyKey(key, 'prototype')) { + this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype); + } + if (!isStatic && this.isPropertyKey(key, 'constructor')) { + if (kind !== 'method' || !method || (value && value.generator)) { + this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod); + } + if (hasConstructor.value) { + this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor); + } + else { + hasConstructor.value = true; + } + kind = 'constructor'; + } + } + return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic)); + }; + Parser.prototype.parseClassElementList = function () { + var body = []; + var hasConstructor = { value: false }; + this.expect('{'); + while (!this.match('}')) { + if (this.match(';')) { + this.nextToken(); + } + else { + body.push(this.parseClassElement(hasConstructor)); + } + } + this.expect('}'); + return body; + }; + Parser.prototype.parseClassBody = function () { + var node = this.createNode(); + var elementList = this.parseClassElementList(); + return this.finalize(node, new Node.ClassBody(elementList)); + }; + Parser.prototype.parseClassDeclaration = function (identifierIsOptional) { + var node = this.createNode(); + var previousStrict = this.context.strict; + this.context.strict = true; + this.expectKeyword('class'); + var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier(); + var superClass = null; + if (this.matchKeyword('extends')) { + this.nextToken(); + superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + } + var classBody = this.parseClassBody(); + this.context.strict = previousStrict; + return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody)); + }; + Parser.prototype.parseClassExpression = function () { + var node = this.createNode(); + var previousStrict = this.context.strict; + this.context.strict = true; + this.expectKeyword('class'); + var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null; + var superClass = null; + if (this.matchKeyword('extends')) { + this.nextToken(); + superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + } + var classBody = this.parseClassBody(); + this.context.strict = previousStrict; + return this.finalize(node, new Node.ClassExpression(id, superClass, classBody)); + }; + // https://tc39.github.io/ecma262/#sec-scripts + // https://tc39.github.io/ecma262/#sec-modules + Parser.prototype.parseModule = function () { + this.context.strict = true; + this.context.isModule = true; + var node = this.createNode(); + var body = this.parseDirectivePrologues(); + while (this.lookahead.type !== 2 /* EOF */) { + body.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.Module(body)); + }; + Parser.prototype.parseScript = function () { + var node = this.createNode(); + var body = this.parseDirectivePrologues(); + while (this.lookahead.type !== 2 /* EOF */) { + body.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.Script(body)); + }; + // https://tc39.github.io/ecma262/#sec-imports + Parser.prototype.parseModuleSpecifier = function () { + var node = this.createNode(); + if (this.lookahead.type !== 8 /* StringLiteral */) { + this.throwError(messages_1.Messages.InvalidModuleSpecifier); + } + var token = this.nextToken(); + var raw = this.getTokenRaw(token); + return this.finalize(node, new Node.Literal(token.value, raw)); + }; + // import {} ...; + Parser.prototype.parseImportSpecifier = function () { + var node = this.createNode(); + var imported; + var local; + if (this.lookahead.type === 3 /* Identifier */) { + imported = this.parseVariableIdentifier(); + local = imported; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + local = this.parseVariableIdentifier(); + } + } + else { + imported = this.parseIdentifierName(); + local = imported; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + local = this.parseVariableIdentifier(); + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + } + return this.finalize(node, new Node.ImportSpecifier(local, imported)); + }; + // {foo, bar as bas} + Parser.prototype.parseNamedImports = function () { + this.expect('{'); + var specifiers = []; + while (!this.match('}')) { + specifiers.push(this.parseImportSpecifier()); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + return specifiers; + }; + // import ...; + Parser.prototype.parseImportDefaultSpecifier = function () { + var node = this.createNode(); + var local = this.parseIdentifierName(); + return this.finalize(node, new Node.ImportDefaultSpecifier(local)); + }; + // import <* as foo> ...; + Parser.prototype.parseImportNamespaceSpecifier = function () { + var node = this.createNode(); + this.expect('*'); + if (!this.matchContextualKeyword('as')) { + this.throwError(messages_1.Messages.NoAsAfterImportNamespace); + } + this.nextToken(); + var local = this.parseIdentifierName(); + return this.finalize(node, new Node.ImportNamespaceSpecifier(local)); + }; + Parser.prototype.parseImportDeclaration = function () { + if (this.context.inFunctionBody) { + this.throwError(messages_1.Messages.IllegalImportDeclaration); + } + var node = this.createNode(); + this.expectKeyword('import'); + var src; + var specifiers = []; + if (this.lookahead.type === 8 /* StringLiteral */) { + // import 'foo'; + src = this.parseModuleSpecifier(); + } + else { + if (this.match('{')) { + // import {bar} + specifiers = specifiers.concat(this.parseNamedImports()); + } + else if (this.match('*')) { + // import * as foo + specifiers.push(this.parseImportNamespaceSpecifier()); + } + else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) { + // import foo + specifiers.push(this.parseImportDefaultSpecifier()); + if (this.match(',')) { + this.nextToken(); + if (this.match('*')) { + // import foo, * as foo + specifiers.push(this.parseImportNamespaceSpecifier()); + } + else if (this.match('{')) { + // import foo, {bar} + specifiers = specifiers.concat(this.parseNamedImports()); + } + else { + this.throwUnexpectedToken(this.lookahead); + } + } + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + if (!this.matchContextualKeyword('from')) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + this.nextToken(); + src = this.parseModuleSpecifier(); + } + this.consumeSemicolon(); + return this.finalize(node, new Node.ImportDeclaration(specifiers, src)); + }; + // https://tc39.github.io/ecma262/#sec-exports + Parser.prototype.parseExportSpecifier = function () { + var node = this.createNode(); + var local = this.parseIdentifierName(); + var exported = local; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + exported = this.parseIdentifierName(); + } + return this.finalize(node, new Node.ExportSpecifier(local, exported)); + }; + Parser.prototype.parseExportDeclaration = function () { + if (this.context.inFunctionBody) { + this.throwError(messages_1.Messages.IllegalExportDeclaration); + } + var node = this.createNode(); + this.expectKeyword('export'); + var exportDeclaration; + if (this.matchKeyword('default')) { + // export default ... + this.nextToken(); + if (this.matchKeyword('function')) { + // export default function foo () {} + // export default function () {} + var declaration = this.parseFunctionDeclaration(true); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else if (this.matchKeyword('class')) { + // export default class foo {} + var declaration = this.parseClassDeclaration(true); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else if (this.matchContextualKeyword('async')) { + // export default async function f () {} + // export default async function () {} + // export default async x => x + var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression(); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else { + if (this.matchContextualKeyword('from')) { + this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value); + } + // export default {}; + // export default []; + // export default (1 + 2); + var declaration = this.match('{') ? this.parseObjectInitializer() : + this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression(); + this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + } + else if (this.match('*')) { + // export * from 'foo'; + this.nextToken(); + if (!this.matchContextualKeyword('from')) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + this.nextToken(); + var src = this.parseModuleSpecifier(); + this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src)); + } + else if (this.lookahead.type === 4 /* Keyword */) { + // export var f = 1; + var declaration = void 0; + switch (this.lookahead.value) { + case 'let': + case 'const': + declaration = this.parseLexicalDeclaration({ inFor: false }); + break; + case 'var': + case 'class': + case 'function': + declaration = this.parseStatementListItem(); + break; + default: + this.throwUnexpectedToken(this.lookahead); + } + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); + } + else if (this.matchAsyncFunction()) { + var declaration = this.parseFunctionDeclaration(); + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); + } + else { + var specifiers = []; + var source = null; + var isExportFromIdentifier = false; + this.expect('{'); + while (!this.match('}')) { + isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default'); + specifiers.push(this.parseExportSpecifier()); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + if (this.matchContextualKeyword('from')) { + // export {default} from 'foo'; + // export {foo} from 'foo'; + this.nextToken(); + source = this.parseModuleSpecifier(); + this.consumeSemicolon(); + } + else if (isExportFromIdentifier) { + // export {default}; // missing fromClause + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + else { + // export {foo}; + this.consumeSemicolon(); + } + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source)); + } + return exportDeclaration; + }; + return Parser; + }()); + exports.Parser = Parser; + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + "use strict"; + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + Object.defineProperty(exports, "__esModule", { value: true }); + function assert(condition, message) { + /* istanbul ignore if */ + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + exports.assert = assert; + + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + "use strict"; + /* tslint:disable:max-classes-per-file */ + Object.defineProperty(exports, "__esModule", { value: true }); + var ErrorHandler = (function () { + function ErrorHandler() { + this.errors = []; + this.tolerant = false; + } + ErrorHandler.prototype.recordError = function (error) { + this.errors.push(error); + }; + ErrorHandler.prototype.tolerate = function (error) { + if (this.tolerant) { + this.recordError(error); + } + else { + throw error; + } + }; + ErrorHandler.prototype.constructError = function (msg, column) { + var error = new Error(msg); + try { + throw error; + } + catch (base) { + /* istanbul ignore else */ + if (Object.create && Object.defineProperty) { + error = Object.create(base); + Object.defineProperty(error, 'column', { value: column }); + } + } + /* istanbul ignore next */ + return error; + }; + ErrorHandler.prototype.createError = function (index, line, col, description) { + var msg = 'Line ' + line + ': ' + description; + var error = this.constructError(msg, col); + error.index = index; + error.lineNumber = line; + error.description = description; + return error; + }; + ErrorHandler.prototype.throwError = function (index, line, col, description) { + throw this.createError(index, line, col, description); + }; + ErrorHandler.prototype.tolerateError = function (index, line, col, description) { + var error = this.createError(index, line, col, description); + if (this.tolerant) { + this.recordError(error); + } + else { + throw error; + } + }; + return ErrorHandler; + }()); + exports.ErrorHandler = ErrorHandler; + + +/***/ }, +/* 11 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + // Error messages should be identical to V8. + exports.Messages = { + BadGetterArity: 'Getter must not have any formal parameters', + BadSetterArity: 'Setter must have exactly one formal parameter', + BadSetterRestParameter: 'Setter function argument must not be a rest parameter', + ConstructorIsAsync: 'Class constructor may not be an async method', + ConstructorSpecialMethod: 'Class constructor may not be an accessor', + DeclarationMissingInitializer: 'Missing initializer in %0 declaration', + DefaultRestParameter: 'Unexpected token =', + DuplicateBinding: 'Duplicate binding %0', + DuplicateConstructor: 'A class may only have one constructor', + DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', + ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer', + GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts', + IllegalBreak: 'Illegal break statement', + IllegalContinue: 'Illegal continue statement', + IllegalExportDeclaration: 'Unexpected token', + IllegalImportDeclaration: 'Unexpected token', + IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list', + IllegalReturn: 'Illegal return statement', + InvalidEscapedReservedWord: 'Keyword must not contain escaped characters', + InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', + InvalidModuleSpecifier: 'Unexpected token', + InvalidRegExp: 'Invalid regular expression', + LetInLexicalBinding: 'let is disallowed as a lexically bound name', + MissingFromClause: 'Unexpected token', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NewlineAfterThrow: 'Illegal newline after throw', + NoAsAfterImportNamespace: 'Unexpected token', + NoCatchOrFinally: 'Missing catch or finally after try', + ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', + Redeclaration: '%0 \'%1\' has already been declared', + StaticPrototype: 'Classes may not have static property named prototype', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', + UnexpectedEOS: 'Unexpected end of input', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedNumber: 'Unexpected number', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedString: 'Unexpected string', + UnexpectedTemplate: 'Unexpected quasi %0', + UnexpectedToken: 'Unexpected token %0', + UnexpectedTokenIllegal: 'Unexpected token ILLEGAL', + UnknownLabel: 'Undefined label \'%0\'', + UnterminatedRegExp: 'Invalid regular expression: missing /' + }; + + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var assert_1 = __webpack_require__(9); + var character_1 = __webpack_require__(4); + var messages_1 = __webpack_require__(11); + function hexValue(ch) { + return '0123456789abcdef'.indexOf(ch.toLowerCase()); + } + function octalValue(ch) { + return '01234567'.indexOf(ch); + } + var Scanner = (function () { + function Scanner(code, handler) { + this.source = code; + this.errorHandler = handler; + this.trackComment = false; + this.length = code.length; + this.index = 0; + this.lineNumber = (code.length > 0) ? 1 : 0; + this.lineStart = 0; + this.curlyStack = []; + } + Scanner.prototype.saveState = function () { + return { + index: this.index, + lineNumber: this.lineNumber, + lineStart: this.lineStart + }; + }; + Scanner.prototype.restoreState = function (state) { + this.index = state.index; + this.lineNumber = state.lineNumber; + this.lineStart = state.lineStart; + }; + Scanner.prototype.eof = function () { + return this.index >= this.length; + }; + Scanner.prototype.throwUnexpectedToken = function (message) { + if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; } + return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); + }; + Scanner.prototype.tolerateUnexpectedToken = function (message) { + if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; } + this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); + }; + // https://tc39.github.io/ecma262/#sec-comments + Scanner.prototype.skipSingleLineComment = function (offset) { + var comments = []; + var start, loc; + if (this.trackComment) { + comments = []; + start = this.index - offset; + loc = { + start: { + line: this.lineNumber, + column: this.index - this.lineStart - offset + }, + end: {} + }; + } + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + ++this.index; + if (character_1.Character.isLineTerminator(ch)) { + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart - 1 + }; + var entry = { + multiLine: false, + slice: [start + offset, this.index - 1], + range: [start, this.index - 1], + loc: loc + }; + comments.push(entry); + } + if (ch === 13 && this.source.charCodeAt(this.index) === 10) { + ++this.index; + } + ++this.lineNumber; + this.lineStart = this.index; + return comments; + } + } + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: false, + slice: [start + offset, this.index], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + return comments; + }; + Scanner.prototype.skipMultiLineComment = function () { + var comments = []; + var start, loc; + if (this.trackComment) { + comments = []; + start = this.index - 2; + loc = { + start: { + line: this.lineNumber, + column: this.index - this.lineStart - 2 + }, + end: {} + }; + } + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (character_1.Character.isLineTerminator(ch)) { + if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) { + ++this.index; + } + ++this.lineNumber; + ++this.index; + this.lineStart = this.index; + } + else if (ch === 0x2A) { + // Block comment ends with '*/'. + if (this.source.charCodeAt(this.index + 1) === 0x2F) { + this.index += 2; + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: true, + slice: [start + 2, this.index - 2], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + return comments; + } + ++this.index; + } + else { + ++this.index; + } + } + // Ran off the end of the file - the whole thing is a comment + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: true, + slice: [start + 2, this.index], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + this.tolerateUnexpectedToken(); + return comments; + }; + Scanner.prototype.scanComments = function () { + var comments; + if (this.trackComment) { + comments = []; + } + var start = (this.index === 0); + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (character_1.Character.isWhiteSpace(ch)) { + ++this.index; + } + else if (character_1.Character.isLineTerminator(ch)) { + ++this.index; + if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) { + ++this.index; + } + ++this.lineNumber; + this.lineStart = this.index; + start = true; + } + else if (ch === 0x2F) { + ch = this.source.charCodeAt(this.index + 1); + if (ch === 0x2F) { + this.index += 2; + var comment = this.skipSingleLineComment(2); + if (this.trackComment) { + comments = comments.concat(comment); + } + start = true; + } + else if (ch === 0x2A) { + this.index += 2; + var comment = this.skipMultiLineComment(); + if (this.trackComment) { + comments = comments.concat(comment); + } + } + else { + break; + } + } + else if (start && ch === 0x2D) { + // U+003E is '>' + if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) { + // '-->' is a single-line comment + this.index += 3; + var comment = this.skipSingleLineComment(3); + if (this.trackComment) { + comments = comments.concat(comment); + } + } + else { + break; + } + } + else if (ch === 0x3C) { + if (this.source.slice(this.index + 1, this.index + 4) === '!--') { + this.index += 4; // `/g,"$1").replace(//g,"$1")),shouldIgnoreFirstNewline(a,r)&&(r=r.slice(1)),t.chars&&t.chars(r),""));i+=e.length-o.length,e=o,h(a,i-n,i)}else{let n,a,r,o=e.indexOf("<");if(0===o){if(comment.test(e)){const n=e.indexOf("--\x3e");if(n>=0){t.shouldKeepComment&&t.comment(e.substring(4,n)),l(n+3);continue}}if(conditionalComment.test(e)){const t=e.indexOf("]>");if(t>=0){l(t+2);continue}}const n=e.match(doctype);if(n){l(n[0].length);continue}const a=e.match(endTag);if(a){const e=i;l(a[0].length),h(a[1],e,i);continue}const r=d();if(r){g(r),shouldIgnoreFirstNewline(c,e)&&l(1);continue}}if(o>=0){for(a=e.slice(o);!(endTag.test(a)||startTagOpen.test(a)||comment.test(a)||conditionalComment.test(a)||(r=a.indexOf("<",1))<0);)o+=r,a=e.slice(o);n=e.substring(0,o),l(o)}o<0&&(n=e,e=""),t.chars&&n&&t.chars(n)}if(e===s){t.chars&&t.chars(e),"production"!==process.env.NODE_ENV&&!n.length&&t.warn&&t.warn(`Mal-formatted tag at end of template: "${e}"`);break}}function l(t){i+=t,e=e.substring(t)}function d(){const t=e.match(startTagOpen);if(t){const n={tagName:t[1],attrs:[],start:i};let a,r;for(l(t[0].length);!(a=e.match(startTagClose))&&(r=e.match(attribute));)l(r[0].length),n.attrs.push(r);if(a)return n.unarySlash=a[1],l(a[0].length),n.end=i,n}}function g(e){const s=e.tagName,i=e.unarySlash;a&&("p"===c&&isNonPhrasingTag(s)&&h(c),o(s)&&c===s&&h(s));const l=r(s)||!!i,d=e.attrs.length,g=new Array(d);for(let n=0;n=0&&n[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(let s=n.length-1;s>=o;s--)"production"!==process.env.NODE_ENV&&(s>o||!e)&&t.warn&&t.warn(`tag <${n[s].tag}> has no matching end tag.`),t.end&&t.end(n[s].tag,a,r);n.length=o,c=o&&n[o-1].tag}else"br"===s?t.start&&t.start(e,[],!0,a,r):"p"===s&&(t.start&&t.start(e,[],!1,a,r),t.end&&t.end(e,a,r))}h()}function parse(e){const t={tag:"root",attrs:[],unary:!1,start:0,contentStart:0,contentEnd:e.length,end:e.length,children:[],comments:[]},n=[t];let a=t;return parseHTML(e,{start:function(e,t,r,o,s){const c={tag:e,attrs:t,unary:r,start:o,children:[]};a.children.push(c),r?c.end=s:(c.contentStart=s,n.push(c),a=c)},end:function(e,t,r){n.pop(),a.contentEnd=t,a.end=r,a=n[n.length-1]}}),t}var parserVue=parse;module.exports=parserVue; diff --git a/Colorui-UniApp/node_modules/prettier/third-party.js b/Colorui-UniApp/node_modules/prettier/third-party.js new file mode 100644 index 0000000..9ee3939 --- /dev/null +++ b/Colorui-UniApp/node_modules/prettier/third-party.js @@ -0,0 +1,5495 @@ +'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 fs = _interopDefault(require('fs')); +var util = _interopDefault(require('util')); +var module$1 = _interopDefault(require('module')); + +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'; +const PassThrough = stream.PassThrough; + +module.exports = opts => { + opts = Object.assign({}, opts); + + const array = opts.array; + let encoding = opts.encoding; + const buffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } + + if (buffer) { + encoding = null; + } + + let len = 0; + const ret = []; + const stream$$1 = new PassThrough({objectMode}); + + if (encoding) { + stream$$1.setEncoding(encoding); + } + + stream$$1.on('data', chunk => { + ret.push(chunk); + + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); + + stream$$1.getBufferedValue = () => { + if (array) { + return ret; + } + + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; + + stream$$1.getBufferedLength = () => len; + + return stream$$1; +}; +}); + +function getStream(inputStream, opts) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + opts = Object.assign({maxBuffer: Infinity}, opts); + + const maxBuffer = opts.maxBuffer; + let stream$$1; + let clean; + + const p = new Promise((resolve, reject) => { + const 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', () => { + if (stream$$1.getBufferedLength() > maxBuffer) { + reject(new Error('maxBuffer exceeded')); + } + }); + stream$$1.once('error', error); + stream$$1.on('end', resolve); + + 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(() => stream$$1.getBufferedValue()); +} + +var getStream_1 = getStream; +var buffer = (stream$$1, opts) => getStream(stream$$1, Object.assign({}, opts, {encoding: 'buffer'})); +var array = (stream$$1, opts) => getStream(stream$$1, Object.assign({}, opts, {array: true})); + +getStream_1.buffer = buffer; +getStream_1.array = array; + +function readFile(filepath , options ) { + options = options || {}; + const throwNotFound = options.throwNotFound || false; + + return new Promise((resolve, reject) => { + fs.readFile(filepath, 'utf8', (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 || {}; + const 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; + +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 () { + 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 (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 (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (v) { + v = v || def; + + if (v) { + return str.replace('%s', v.toString()); + } + + return null; + } + }; +}; + +var errorEx_1 = errorEx; + +var unicode = createCommonjsModule(function (module) { +// This is autogenerated with esprima tools, see: +// https://github.com/ariya/esprima/blob/master/esprima.js +// +// PS: oh God, I hate Unicode + +// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart: + +var Uni = module.exports; + +module.exports.isWhiteSpace = function isWhiteSpace(x) { + // section 7.2, table 2 + return x === '\u0020' + || x === '\u00A0' + || x === '\uFEFF' // <-- this is not a Unicode WS, only a JS one + || (x >= '\u0009' && x <= '\u000D') // 9 A B C D + + // + whitespace characters from unicode, category Zs + || x === '\u1680' + || x === '\u180E' + || (x >= '\u2000' && x <= '\u200A') // 0 1 2 3 4 5 6 7 8 9 A + || x === '\u2028' + || x === '\u2029' + || x === '\u202F' + || x === '\u205F' + || x === '\u3000' +}; + +module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) { + return x === '\u0020' + || x === '\u0009' + || x === '\u000A' + || x === '\u000D' +}; + +module.exports.isLineTerminator = function isLineTerminator(x) { + // ok, here is the part when JSON is wrong + // section 7.3, table 3 + return x === '\u000A' + || x === '\u000D' + || x === '\u2028' + || x === '\u2029' +}; + +module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) { + return x === '\u000A' + || x === '\u000D' +}; + +module.exports.isIdentifierStart = function isIdentifierStart(x) { + return x === '$' + || x === '_' + || (x >= 'A' && x <= 'Z') + || (x >= 'a' && x <= 'z') + || (x >= '\u0080' && Uni.NonAsciiIdentifierStart.test(x)) +}; + +module.exports.isIdentifierPart = function isIdentifierPart(x) { + return x === '$' + || x === '_' + || (x >= 'A' && x <= 'Z') + || (x >= 'a' && x <= 'z') + || (x >= '0' && x <= '9') // <-- addition to Start + || (x >= '\u0080' && Uni.NonAsciiIdentifierPart.test(x)) +}; + +module.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\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\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\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-\u0C33\u0C35-\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-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\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-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\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 v6.3.0 NonAsciiIdentifierPart: + +module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\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\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\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\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\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\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-\u16F0\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-\u191C\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\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\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-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\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-\uFE26\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]/; +}); + +var parse_1 = createCommonjsModule(function (module) { +/* + * Author: Alex Kocharin + * GIT: https://github.com/rlidwka/jju + * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/ + */ + +// RTFM: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + + + +function isHexDigit(x) { + return (x >= '0' && x <= '9') + || (x >= 'A' && x <= 'F') + || (x >= 'a' && x <= 'f') +} + +function isOctDigit(x) { + return x >= '0' && x <= '7' +} + +function isDecDigit(x) { + return x >= '0' && x <= '9' +} + +var unescapeMap = { + '\'': '\'', + '"' : '"', + '\\': '\\', + 'b' : '\b', + 'f' : '\f', + 'n' : '\n', + 'r' : '\r', + 't' : '\t', + 'v' : '\v', + '/' : '/', +}; + +function formatError(input, msg, position, lineno, column, json5) { + var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1) + , tmppos = position - column - 1 + , srcline = '' + , underline = ''; + + var isLineTerminator = json5 ? unicode.isLineTerminator : unicode.isLineTerminatorJSON; + + // output no more than 70 characters before the wrong ones + if (tmppos < position - 70) { + tmppos = position - 70; + } + + while (1) { + var chr = input[++tmppos]; + + if (isLineTerminator(chr) || tmppos === input.length) { + if (position >= tmppos) { + // ending line error, so show it after the last char + underline += '^'; + } + break + } + srcline += chr; + + if (position === tmppos) { + underline += '^'; + } else if (position > tmppos) { + underline += input[tmppos] === '\t' ? '\t' : ' '; + } + + // output no more than 78 characters on the string + if (srcline.length > 78) break + } + + return result + '\n' + srcline + '\n' + underline +} + +function parse(input, options) { + // parse as a standard JSON mode + var json5 = !(options.mode === 'json' || options.legacy); + var isLineTerminator = json5 ? unicode.isLineTerminator : unicode.isLineTerminatorJSON; + var isWhiteSpace = json5 ? unicode.isWhiteSpace : unicode.isWhiteSpaceJSON; + + var length = input.length + , lineno = 0 + , linestart = 0 + , position = 0 + , stack = []; + + var tokenStart = function() {}; + var tokenEnd = function(v) {return v}; + + /* tokenize({ + raw: '...', + type: 'whitespace'|'comment'|'key'|'literal'|'separator'|'newline', + value: 'number'|'string'|'whatever', + path: [...], + }) + */ + if (options._tokenize) { + (function() { + var start = null; + tokenStart = function() { + if (start !== null) throw Error('internal error, token overlap') + start = position; + }; + + tokenEnd = function(v, type) { + if (start != position) { + var hash = { + raw: input.substr(start, position-start), + type: type, + stack: stack.slice(0), + }; + if (v !== undefined) hash.value = v; + options._tokenize.call(null, hash); + } + start = null; + return v + }; + })(); + } + + function fail(msg) { + var column = position - linestart; + + if (!msg) { + if (position < length) { + var token = '\'' + + JSON + .stringify(input[position]) + .replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + + '\''; + + if (!msg) msg = 'Unexpected token ' + token; + } else { + if (!msg) msg = 'Unexpected end of input'; + } + } + + var error = SyntaxError(formatError(input, msg, position, lineno, column, json5)); + error.row = lineno + 1; + error.column = column + 1; + throw error + } + + function newline(chr) { + // account for + if (chr === '\r' && input[position] === '\n') position++; + linestart = position; + lineno++; + } + + function parseGeneric() { + var result; + + while (position < length) { + tokenStart(); + var chr = input[position++]; + + if (chr === '"' || (chr === '\'' && json5)) { + return tokenEnd(parseString(chr), 'literal') + + } else if (chr === '{') { + tokenEnd(undefined, 'separator'); + return parseObject() + + } else if (chr === '[') { + tokenEnd(undefined, 'separator'); + return parseArray() + + } else if (chr === '-' + || chr === '.' + || isDecDigit(chr) + // + number Infinity NaN + || (json5 && (chr === '+' || chr === 'I' || chr === 'N')) + ) { + return tokenEnd(parseNumber(), 'literal') + + } else if (chr === 'n') { + parseKeyword('null'); + return tokenEnd(null, 'literal') + + } else if (chr === 't') { + parseKeyword('true'); + return tokenEnd(true, 'literal') + + } else if (chr === 'f') { + parseKeyword('false'); + return tokenEnd(false, 'literal') + + } else { + position--; + return tokenEnd(undefined) + } + } + } + + function parseKey() { + var result; + + while (position < length) { + tokenStart(); + var chr = input[position++]; + + if (chr === '"' || (chr === '\'' && json5)) { + return tokenEnd(parseString(chr), 'key') + + } else if (chr === '{') { + tokenEnd(undefined, 'separator'); + return parseObject() + + } else if (chr === '[') { + tokenEnd(undefined, 'separator'); + return parseArray() + + } else if (chr === '.' + || isDecDigit(chr) + ) { + return tokenEnd(parseNumber(true), 'key') + + } else if (json5 + && unicode.isIdentifierStart(chr) || (chr === '\\' && input[position] === 'u')) { + // unicode char or a unicode sequence + var rollback = position - 1; + var result = parseIdentifier(); + + if (result === undefined) { + position = rollback; + return tokenEnd(undefined) + } else { + return tokenEnd(result, 'key') + } + + } else { + position--; + return tokenEnd(undefined) + } + } + } + + function skipWhiteSpace() { + tokenStart(); + while (position < length) { + var chr = input[position++]; + + if (isLineTerminator(chr)) { + position--; + tokenEnd(undefined, 'whitespace'); + tokenStart(); + position++; + newline(chr); + tokenEnd(undefined, 'newline'); + tokenStart(); + + } else if (isWhiteSpace(chr)) { + // nothing + + } else if (chr === '/' + && json5 + && (input[position] === '/' || input[position] === '*') + ) { + position--; + tokenEnd(undefined, 'whitespace'); + tokenStart(); + position++; + skipComment(input[position++] === '*'); + tokenEnd(undefined, 'comment'); + tokenStart(); + + } else { + position--; + break + } + } + return tokenEnd(undefined, 'whitespace') + } + + function skipComment(multi) { + while (position < length) { + var chr = input[position++]; + + if (isLineTerminator(chr)) { + // LineTerminator is an end of singleline comment + if (!multi) { + // let parent function deal with newline + position--; + return + } + + newline(chr); + + } else if (chr === '*' && multi) { + // end of multiline comment + if (input[position] === '/') { + position++; + return + } + + } else { + // nothing + } + } + + if (multi) { + fail('Unclosed multiline comment'); + } + } + + function parseKeyword(keyword) { + // keyword[0] is not checked because it should've checked earlier + var _pos = position; + var len = keyword.length; + for (var i=1; i= length || keyword[i] != input[position]) { + position = _pos-1; + fail(); + } + position++; + } + } + + function parseObject() { + var result = options.null_prototype ? Object.create(null) : {} + , empty_object = {} + , is_non_empty = false; + + while (position < length) { + skipWhiteSpace(); + var item1 = parseKey(); + skipWhiteSpace(); + tokenStart(); + var chr = input[position++]; + tokenEnd(undefined, 'separator'); + + if (chr === '}' && item1 === undefined) { + if (!json5 && is_non_empty) { + position--; + fail('Trailing comma in object'); + } + return result + + } else if (chr === ':' && item1 !== undefined) { + skipWhiteSpace(); + stack.push(item1); + var item2 = parseGeneric(); + stack.pop(); + + if (item2 === undefined) fail('No value found for key ' + item1); + if (typeof(item1) !== 'string') { + if (!json5 || typeof(item1) !== 'number') { + fail('Wrong key type: ' + item1); + } + } + + if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== 'replace') { + if (options.reserved_keys === 'throw') { + fail('Reserved key: ' + item1); + } else { + // silently ignore it + } + } else { + if (typeof(options.reviver) === 'function') { + item2 = options.reviver.call(null, item1, item2); + } + + if (item2 !== undefined) { + is_non_empty = true; + Object.defineProperty(result, item1, { + value: item2, + enumerable: true, + configurable: true, + writable: true, + }); + } + } + + skipWhiteSpace(); + + tokenStart(); + var chr = input[position++]; + tokenEnd(undefined, 'separator'); + + if (chr === ',') { + continue + + } else if (chr === '}') { + return result + + } else { + fail(); + } + + } else { + position--; + fail(); + } + } + + fail(); + } + + function parseArray() { + var result = []; + + while (position < length) { + skipWhiteSpace(); + stack.push(result.length); + var item = parseGeneric(); + stack.pop(); + skipWhiteSpace(); + tokenStart(); + var chr = input[position++]; + tokenEnd(undefined, 'separator'); + + if (item !== undefined) { + if (typeof(options.reviver) === 'function') { + item = options.reviver.call(null, String(result.length), item); + } + if (item === undefined) { + result.length++; + item = true; // hack for check below, not included into result + } else { + result.push(item); + } + } + + if (chr === ',') { + if (item === undefined) { + fail('Elisions are not supported'); + } + + } else if (chr === ']') { + if (!json5 && item === undefined && result.length) { + position--; + fail('Trailing comma in array'); + } + return result + + } else { + position--; + fail(); + } + } + } + + function parseNumber() { + // rewind because we don't know first char + position--; + + var start = position + , chr = input[position++] + , t; + + var to_num = function(is_octal) { + var str = input.substr(start, position - start); + + if (is_octal) { + var result = parseInt(str.replace(/^0o?/, ''), 8); + } else { + var result = Number(str); + } + + if (Number.isNaN(result)) { + position--; + fail('Bad numeric literal - "' + input.substr(start, position - start + 1) + '"'); + } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) { + // additional restrictions imposed by json + position--; + fail('Non-json numeric literal - "' + input.substr(start, position - start + 1) + '"'); + } else { + return result + } + }; + + // ex: -5982475.249875e+29384 + // ^ skipping this + if (chr === '-' || (chr === '+' && json5)) chr = input[position++]; + + if (chr === 'N' && json5) { + parseKeyword('NaN'); + return NaN + } + + if (chr === 'I' && json5) { + parseKeyword('Infinity'); + + // returning +inf or -inf + return to_num() + } + + if (chr >= '1' && chr <= '9') { + // ex: -5982475.249875e+29384 + // ^^^ skipping these + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + + // special case for leading zero: 0.123456 + if (chr === '0') { + chr = input[position++]; + + // new syntax, "0o777" old syntax, "0777" + var is_octal = chr === 'o' || chr === 'O' || isOctDigit(chr); + var is_hex = chr === 'x' || chr === 'X'; + + if (json5 && (is_octal || is_hex)) { + while (position < length + && (is_hex ? isHexDigit : isOctDigit)( input[position] ) + ) position++; + + var sign = 1; + if (input[start] === '-') { + sign = -1; + start++; + } else if (input[start] === '+') { + start++; + } + + return sign * to_num(is_octal) + } + } + + if (chr === '.') { + // ex: -5982475.249875e+29384 + // ^^^ skipping these + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + + if (chr === 'e' || chr === 'E') { + chr = input[position++]; + if (chr === '-' || chr === '+') position++; + // ex: -5982475.249875e+29384 + // ^^^ skipping these + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + + // we have char in the buffer, so count for it + position--; + return to_num() + } + + function parseIdentifier() { + // rewind because we don't know first char + position--; + + var result = ''; + + while (position < length) { + var chr = input[position++]; + + if (chr === '\\' + && input[position] === 'u' + && isHexDigit(input[position+1]) + && isHexDigit(input[position+2]) + && isHexDigit(input[position+3]) + && isHexDigit(input[position+4]) + ) { + // UnicodeEscapeSequence + chr = String.fromCharCode(parseInt(input.substr(position+1, 4), 16)); + position += 5; + } + + if (result.length) { + // identifier started + if (unicode.isIdentifierPart(chr)) { + result += chr; + } else { + position--; + return result + } + + } else { + if (unicode.isIdentifierStart(chr)) { + result += chr; + } else { + return undefined + } + } + } + + fail(); + } + + function parseString(endChar) { + // 7.8.4 of ES262 spec + var result = ''; + + while (position < length) { + var chr = input[position++]; + + if (chr === endChar) { + return result + + } else if (chr === '\\') { + if (position >= length) fail(); + chr = input[position++]; + + if (unescapeMap[chr] && (json5 || (chr != 'v' && chr != "'"))) { + result += unescapeMap[chr]; + + } else if (json5 && isLineTerminator(chr)) { + // line continuation + newline(chr); + + } else if (chr === 'u' || (chr === 'x' && json5)) { + // unicode/character escape sequence + var off = chr === 'u' ? 4 : 2; + + // validation for \uXXXX + for (var i=0; i= length) fail(); + if (!isHexDigit(input[position])) fail('Bad escape sequence'); + position++; + } + + result += String.fromCharCode(parseInt(input.substr(position-off, off), 16)); + } else if (json5 && isOctDigit(chr)) { + if (chr < '4' && isOctDigit(input[position]) && isOctDigit(input[position+1])) { + // three-digit octal + var digits = 3; + } else if (isOctDigit(input[position])) { + // two-digit octal + var digits = 2; + } else { + var digits = 1; + } + position += digits - 1; + result += String.fromCharCode(parseInt(input.substr(position-digits, digits), 8)); + /*if (!isOctDigit(input[position])) { + // \0 is allowed still + result += '\0' + } else { + fail('Octal literals are not supported') + }*/ + + } else if (json5) { + // \X -> x + result += chr; + + } else { + position--; + fail(); + } + + } else if (isLineTerminator(chr)) { + fail(); + + } else { + if (!json5 && chr.charCodeAt(0) < 32) { + position--; + fail('Unexpected control character'); + } + + // SourceCharacter but not one of " or \ or LineTerminator + result += chr; + } + } + + fail(); + } + + skipWhiteSpace(); + var return_value = parseGeneric(); + if (return_value !== undefined || position < length) { + skipWhiteSpace(); + + if (position >= length) { + if (typeof(options.reviver) === 'function') { + return_value = options.reviver.call(null, '', return_value); + } + return return_value + } else { + fail(); + } + + } else { + if (position) { + fail('No data, only a whitespace'); + } else { + fail('No data, empty input'); + } + } +} + +/* + * parse(text, options) + * or + * parse(text, reviver) + * + * where: + * text - string + * options - object + * reviver - function + */ +module.exports.parse = function parseJSON(input, options) { + // support legacy functions + if (typeof(options) === 'function') { + options = { + reviver: options + }; + } + + if (input === undefined) { + // parse(stringify(x)) should be equal x + // with JSON functions it is not 'cause of undefined + // so we're fixing it + return undefined + } + + // JSON.parse compat + if (typeof(input) !== 'string') input = String(input); + if (options == null) options = {}; + if (options.reserved_keys == null) options.reserved_keys = 'ignore'; + + if (options.reserved_keys === 'throw' || options.reserved_keys === 'ignore') { + if (options.null_prototype == null) { + options.null_prototype = true; + } + } + + try { + return parse(input, options) + } catch(err) { + // jju is a recursive parser, so JSON.parse("{{{{{{{") could blow up the stack + // + // this catch is used to skip all those internal calls + if (err instanceof SyntaxError && err.row != null && err.column != null) { + var old_err = err; + err = SyntaxError(old_err.message); + err.column = old_err.column; + err.row = old_err.row; + } + throw err + } +}; + +module.exports.tokenize = function tokenizeJSON(input, options) { + if (options == null) options = {}; + + options._tokenize = function(smth) { + if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack); + tokens.push(smth); + }; + + var tokens = []; + tokens.data = module.exports.parse(input, options); + return tokens +}; +}); + +var parseJson = createCommonjsModule(function (module) { +'use strict'; + + + +function appendPosition(message) { + const posRe = / at (\d+:\d+) in/; + const numbers = posRe.exec(message); + return message.replace(posRe, ' in') + ':' + numbers[1]; +} + +const JSONError = errorEx_1('JSONError', { + fileName: errorEx_1.append('in %s'), + appendPosition: { + message: (shouldAppend, original) => { + if (shouldAppend) { + original[0] = appendPosition(original[0]); + } + return original; + } + } +}); + +module.exports = (input, reviver, filename) => { + if (typeof reviver === 'string') { + filename = reviver; + reviver = null; + } + + try { + try { + return JSON.parse(input, reviver); + } catch (err) { + parse_1.parse(input, { + mode: 'json', + reviver + }); + + throw err; + } + } catch (err) { + const jsonErr = new JSONError(err); + + if (filename) { + jsonErr.fileName = filename; + jsonErr.appendPosition = true; + } + + throw jsonErr; + } +}; +}); + +var parseJson_1 = function parseJsonWrapper( + json , + filepath +) { + try { + return parseJson(json); + } catch (err) { + err.message = `JSON Error in ${filepath}:\n${err.message}`; + throw err; + } +}; + +var loadPackageProp = function loadPackageProp( + packageDir , + options + + + +) { + const packagePath = path.join(packageDir, 'package.json'); + + function parseContent(content ) { + if (!content) return null; + const parsedContent = parseJson_1(content, packagePath); + const packagePropValue = parsedContent[options.packageProp]; + if (!packagePropValue) return null; + + return { + config: packagePropValue, + filepath: packagePath, + }; + } + + return !options.sync + ? readFile_1(packagePath).then(parseContent) + : parseContent(readFile_1.sync(packagePath)); +}; + +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 (data) { return data !== null ? data : ''; } +}); + +var seq = new type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + +var map = new type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (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 () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { 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 (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (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 (object) { return '0b' + object.toString(2); }, + octal: function (object) { return '0' + object.toString(8); }, + decimal: function (object) { return object.toString(10); }, + hexadecimal: function (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 = 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 + ] +}); + +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'); + } + + 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; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + 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 = ''; + + 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 ? '' : ' '); + + 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; + +var requireFromString = createCommonjsModule(function (module) { +'use strict'; + + + + +module.exports = function requireFromString(code, filename, opts) { + if (typeof filename === 'object') { + opts = filename; + filename = undefined; + } + + opts = opts || {}; + filename = filename || ''; + + opts.appendPaths = opts.appendPaths || []; + opts.prependPaths = opts.prependPaths || []; + + if (typeof code !== 'string') { + throw new Error('code must be a string, not ' + typeof code); + } + + var paths = module$1._nodeModulePaths(path.dirname(filename)); + + var parent = (module.parent || module); + var m = new module$1(filename, parent); + m.filename = filename; + m.paths = [].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths); + m._compile(code, filename); + + var exports = m.exports; + parent.children && parent.children.splice(parent.children.indexOf(m), 1); + + return exports; +}; +}); + +// +const chainFuncsAsync = (result, func) => result.then(func); +const chainFuncsSync = (result, func) => func(result); + +/** + * Runs the given functions sequentially. If the `init` param is a promise, + * functions are chained using `p.then()`. Otherwise, functions are chained by passing + * the result of each function to the next. + */ +var funcRunner = function funcRunner( + init , + funcs +) { + const isAsync = init instanceof Promise; + + return funcs.reduce( + isAsync === true ? chainFuncsAsync : chainFuncsSync, + init + ); +}; + +var loadRc = function loadRc( + filepath , + options + + + + +) { + if (!options.sync) { + return readFile_1(filepath) + .then(parseExtensionlessRcFile) + .then(checkExtensionlessRcResult); + } else { + return checkExtensionlessRcResult( + parseExtensionlessRcFile(readFile_1.sync(filepath)) + ); + } + + function checkExtensionlessRcResult(result) { + if (result) return result; + if (options.rcExtensions) return loadRcWithExtensions(); + return null; + } + + function parseExtensionlessRcFile(content ) { + if (!content) return null; + const pasedConfig = options.rcStrictJson + ? parseJson_1(content, filepath) + : jsYaml.safeLoad(content, { filename: filepath }); + return { + config: pasedConfig, + filepath, + }; + } + + function loadRcWithExtensions() { + let foundConfig = null; + return funcRunner(readRcFile('json'), [ + (jsonContent ) => { + // Since this is the first try, config cannot have been found, so don't + // check `if (foundConfig)`. + if (jsonContent) { + const successFilepath = `${filepath}.json`; + foundConfig = { + config: parseJson_1(jsonContent, successFilepath), + filepath: successFilepath, + }; + } else { + return readRcFile('yaml'); + } + }, + (yamlContent ) => { + if (foundConfig) { + return; + } else if (yamlContent) { + const successFilepath = `${filepath}.yaml`; + foundConfig = { + config: jsYaml.safeLoad(yamlContent, { filename: successFilepath }), + filepath: successFilepath, + }; + } else { + return readRcFile('yml'); + } + }, + (ymlContent ) => { + if (foundConfig) { + return; + } else if (ymlContent) { + const successFilepath = `${filepath}.yml`; + foundConfig = { + config: jsYaml.safeLoad(ymlContent, { filename: successFilepath }), + filepath: successFilepath, + }; + } else { + return readRcFile('js'); + } + }, + (jsContent ) => { + if (foundConfig) { + return; + } else if (jsContent) { + const successFilepath = `${filepath}.js`; + foundConfig = { + config: requireFromString(jsContent, successFilepath), + filepath: successFilepath, + }; + } else { + return; + } + }, + () => foundConfig, + ]); + } + + function readRcFile(extension ) { + const filepathWithExtension = `${filepath}.${extension}`; + return !options.sync + ? readFile_1(filepathWithExtension) + : readFile_1.sync(filepathWithExtension); + } +}; + +var loadJs = function loadJs( + filepath , + options +) { + function parseJsFile(content ) { + if (!content) return null; + + return { + config: requireFromString(content, filepath), + filepath, + }; + } + + return !options.sync + ? readFile_1(filepath).then(parseJsFile) + : parseJsFile(readFile_1.sync(filepath)); +}; + +var loadDefinedFile = function loadDefinedFile( + filepath , + options + + + +) { + function parseContent(content ) { + if (!content) { + throw new Error(`Config file is empty! Filepath - "${filepath}".`); + } + + let parsedConfig; + + switch (options.format || inferFormat(filepath)) { + case 'json': + parsedConfig = parseJson_1(content, filepath); + break; + case 'yaml': + parsedConfig = jsYaml.safeLoad(content, { + filename: filepath, + }); + break; + case 'js': + parsedConfig = requireFromString(content, filepath); + break; + default: + parsedConfig = tryAllParsing(content, filepath); + } + + if (!parsedConfig) { + throw new Error(`Failed to parse "${filepath}" as JSON, JS, or YAML.`); + } + + return { + config: parsedConfig, + filepath, + }; + } + + return !options.sync + ? readFile_1(filepath, { throwNotFound: true }).then(parseContent) + : parseContent(readFile_1.sync(filepath, { throwNotFound: true })); +}; + +function inferFormat(filepath ) { + switch (path.extname(filepath)) { + case '.js': + return 'js'; + case '.json': + return 'json'; + // istanbul ignore next + case '.yml': + case '.yaml': + return 'yaml'; + default: + return undefined; + } +} + +function tryAllParsing(content , filepath ) { + return tryYaml(content, filepath, () => { + return tryRequire(content, filepath, () => { + return null; + }); + }); +} + +function tryYaml(content , filepath , cb ) { + try { + const result = jsYaml.safeLoad(content, { + filename: filepath, + }); + if (typeof result === 'string') { + return cb(); + } + return result; + } catch (e) { + return cb(); + } +} + +function tryRequire(content , filepath , cb ) { + try { + return requireFromString(content, filepath); + } catch (e) { + return cb(); + } +} + +/** + * 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; + +var getDirectory = function getDirectory( + filepath , + sync +) { + if (sync === true) { + return isDirectory_1.sync(filepath) ? filepath : path.dirname(filepath); + } + + return new Promise((resolve, reject) => { + return isDirectory_1(filepath, (err, filepathIsDirectory) => { + if (err) { + return reject(err); + } + return resolve(filepathIsDirectory ? filepath : path.dirname(filepath)); + }); + }); +}; + +var createExplorer = function createExplorer(options + + + + + + + + + + + + ) { + // When `options.sync` is `false` (default), + // these cache Promises that resolve with results, not the results themselves. + const fileCache = options.cache ? new Map() : null; + const directoryCache = options.cache ? new Map() : null; + const transform = options.transform || identity; + const packageProp = options.packageProp; + + function clearFileCache() { + if (fileCache) fileCache.clear(); + } + + function clearDirectoryCache() { + if (directoryCache) directoryCache.clear(); + } + + function clearCaches() { + clearFileCache(); + clearDirectoryCache(); + } + + function throwError(error) { + if (options.sync) { + throw error; + } else { + return Promise.reject(error); + } + } + + function load( + searchPath , + configPath + ) { + if (!configPath && options.configPath) { + configPath = options.configPath; + } + + if (configPath) { + const absoluteConfigPath = path.resolve(process.cwd(), configPath); + if (fileCache && fileCache.has(absoluteConfigPath)) { + return fileCache.get(absoluteConfigPath); + } + + let load; + if (path.basename(absoluteConfigPath) === 'package.json') { + if (!packageProp) { + return throwError( + new Error( + 'Please specify the packageProp option. The configPath argument cannot point to a package.json file if packageProp is false.' + ) + ); + } + load = () => + loadPackageProp(path.dirname(absoluteConfigPath), { + packageProp, + sync: options.sync, + }); + } else { + load = () => + loadDefinedFile(absoluteConfigPath, { + sync: options.sync, + format: options.format, + }); + } + + const loadResult = load(); + const result = + loadResult instanceof Promise + ? loadResult.then(transform) + : transform(loadResult); + if (fileCache) fileCache.set(absoluteConfigPath, result); + return result; + } + + if (!searchPath) return !options.sync ? Promise.resolve(null) : null; + + const absoluteSearchPath = path.resolve(process.cwd(), searchPath); + const searchPathDir = getDirectory(absoluteSearchPath, options.sync); + + return searchPathDir instanceof Promise + ? searchPathDir.then(searchDirectory) + : searchDirectory(searchPathDir); + } + + function searchDirectory( + directory + ) { + if (directoryCache && directoryCache.has(directory)) { + return directoryCache.get(directory); + } + + const result = funcRunner(!options.sync ? Promise.resolve() : undefined, [ + () => { + if (!packageProp) return; + return loadPackageProp(directory, { + packageProp, + sync: options.sync, + }); + }, + result => { + if (result || !options.rc) return result; + return loadRc(path.join(directory, options.rc), { + sync: options.sync, + rcStrictJson: options.rcStrictJson, + rcExtensions: options.rcExtensions, + }); + }, + result => { + if (result || !options.js) return result; + return loadJs(path.join(directory, options.js), { sync: options.sync }); + }, + result => { + if (result) return result; + + const nextDirectory = path.dirname(directory); + + if (nextDirectory === directory || directory === options.stopDir) + return null; + + return searchDirectory(nextDirectory); + }, + transform, + ]); + + if (directoryCache) directoryCache.set(directory, result); + return result; + } + + return { + load, + clearFileCache, + clearDirectoryCache, + clearCaches, + }; +}; + +function identity(x) { + return x; +} + +const homedir = os.homedir(); + +var dist = function cosmiconfig( + moduleName , + options + + + + + + + + + + + + +) { + options = Object.assign( + {}, + { + packageProp: moduleName, + rc: `.${moduleName}rc`, + js: `${moduleName}.config.js`, + rcStrictJson: false, + stopDir: homedir, + cache: true, + sync: false, + }, + options + ); + + return createExplorer(options); +}; + +var thirdParty = { + getStream: getStream_1, + cosmiconfig: dist +}; + +module.exports = thirdParty; diff --git a/Colorui-UniApp/package-lock.json b/Colorui-UniApp/package-lock.json new file mode 100644 index 0000000..d4ce2f0 --- /dev/null +++ b/Colorui-UniApp/package-lock.json @@ -0,0 +1,11 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "prettier": { + "version": "1.12.1", + "resolved": "http://registry.npm.taobao.org/prettier/download/prettier-1.12.1.tgz", + "integrity": "sha1-wa0g6APndJ+vkFpAnSNn4Gu+cyU=" + } + } +} diff --git a/Colorui-UniApp/pages.json b/Colorui-UniApp/pages.json index 5c455eb..d2b78e7 100644 --- a/Colorui-UniApp/pages.json +++ b/Colorui-UniApp/pages.json @@ -4,178 +4,166 @@ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "主页面" - } - }, - { - "path": "pages/basics/home", - "style": { - "navigationBarTitleText": "基础元素" + "navigationBarTitleText": "" } }, { "path": "pages/basics/layout", "style": { - "navigationBarTitleText": "布局" + "navigationBarTitleText": "" } }, { "path": "pages/basics/background", "style": { - "navigationBarTitleText": "背景" + "navigationBarTitleText": "" } }, { "path": "pages/basics/text", "style": { - "navigationBarTitleText": "文本" + "navigationBarTitleText": "" } }, { "path": "pages/basics/icon", "style": { - "navigationBarTitleText": "图标" + "navigationBarTitleText": "" } }, { "path": "pages/basics/button", "style": { - "navigationBarTitleText": "按钮" + "navigationBarTitleText": "" } }, { "path": "pages/basics/design", "style": { - "navigationBarTitleText": "按钮/设计" + "navigationBarTitleText": "" } }, { "path": "pages/basics/tag", "style": { - "navigationBarTitleText": "标签" + "navigationBarTitleText": "" } }, { "path": "pages/basics/avatar", "style": { - "navigationBarTitleText": "头像" + "navigationBarTitleText": "" } }, { "path": "pages/basics/progress", "style": { - "navigationBarTitleText": "进度条" + "navigationBarTitleText": "" } }, { "path": "pages/basics/shadow", "style": { - "navigationBarTitleText": "边框阴影" + "navigationBarTitleText": "" } }, { "path": "pages/basics/loading", "style": { - "navigationBarTitleText": "加载" - } - }, - { - "path": "pages/component/home", - "style": { - "navigationBarTitleText": "交互组件" + "navigationBarTitleText": "" } }, { "path": "pages/component/bar", "style": { - "navigationBarTitleText": "操作条" + "navigationBarTitleText": "" } }, { "path": "pages/component/nav", "style": { - "navigationBarTitleText": "导航栏" + "navigationBarTitleText": "" } }, { "path": "pages/component/list", "style": { - "navigationBarTitleText": "列表" + "navigationBarTitleText": "" } }, { "path": "pages/component/card", "style": { - "navigationBarTitleText": "卡片" + "navigationBarTitleText": "" } }, { "path": "pages/component/form", "style": { - "navigationBarTitleText": "表单" + "navigationBarTitleText": "" } }, { "path": "pages/component/timeline", "style": { - "navigationBarTitleText": "时间轴" + "navigationBarTitleText": "" } }, { "path": "pages/component/chat", "style": { - "navigationBarTitleText": "聊天" + "navigationBarTitleText": "" } }, { "path": "pages/component/swiper", "style": { - "navigationBarTitleText": "轮播" + "navigationBarTitleText": "" } }, { "path": "pages/component/modal", "style": { - "navigationBarTitleText": "模态框" + "navigationBarTitleText": "" } }, { "path": "pages/component/steps", "style": { - "navigationBarTitleText": "步骤条" - } - }, { - "path": "pages/plugin/home", - "style": { - "navigationBarTitleText": "插件扩展" + "navigationBarTitleText": "" } }, { "path": "pages/plugin/indexes", "style": { - "navigationBarTitleText": "索引列表" + "navigationBarTitleText": "" } }, { "path": "pages/plugin/animation", "style": { - "navigationBarTitleText": "微动画" + "navigationBarTitleText": "" } }, { "path": "pages/plugin/drawer", "style": { - "navigationBarTitleText": "全屏抽屉" + "navigationBarTitleText": "" } }, { "path": "pages/plugin/verticalnav", "style": { - "navigationBarTitleText": "垂直导航" + "navigationBarTitleText": "" } } ], "globalStyle": { - "navigationBarBackgroundColor": "#39b54a", + "mp-alipay": { + /* 支付宝小程序特有相关 */ + "transparentTitle": "always", + "allowsBounceVertical": "NO" + }, + "navigationBarBackgroundColor": "#0081ff", "navigationBarTitleText": "ColorUi for UniApp", "navigationStyle": "custom", "navigationBarTextStyle": "white" }, - "usingComponts":true + "usingComponts": true } diff --git a/Colorui-UniApp/pages/basics/background.vue b/Colorui-UniApp/pages/basics/background.vue index 6da2527..2fa6559 100644 --- a/Colorui-UniApp/pages/basics/background.vue +++ b/Colorui-UniApp/pages/basics/background.vue @@ -23,7 +23,7 @@ - + {{item.title}} {{item.name}} @@ -88,8 +88,7 @@ - - + + --> + 透明背景(文字层) diff --git a/Colorui-UniApp/pages/basics/button.vue b/Colorui-UniApp/pages/basics/button.vue index 56cd205..a0d02d1 100644 --- a/Colorui-UniApp/pages/basics/button.vue +++ b/Colorui-UniApp/pages/basics/button.vue @@ -35,7 +35,7 @@ 阴影 - + @@ -93,7 +93,7 @@ 图标 - + diff --git a/Colorui-UniApp/pages/basics/home.vue b/Colorui-UniApp/pages/basics/home.vue index 717865a..6456f5d 100644 --- a/Colorui-UniApp/pages/basics/home.vue +++ b/Colorui-UniApp/pages/basics/home.vue @@ -1,4 +1,4 @@ -